diff --git a/src/yaze.cc b/src/yaze.cc index b3cf7f46..5af7e32a 100644 --- a/src/yaze.cc +++ b/src/yaze.cc @@ -16,16 +16,12 @@ void yaze_check_version(const char* version) { } int yaze_init(yaze_editor_context* yaze_ctx) { - if (yaze_ctx->flags == nullptr) { + if (yaze_ctx->project->rom_filename == nullptr) { return -1; } - if (yaze_ctx->flags->rom_filename == nullptr) { - return -1; - } - - yaze_ctx->flags->rom = yaze_load_rom(yaze_ctx->flags->rom_filename); - if (yaze_ctx->flags->rom == nullptr) { + yaze_ctx->rom = yaze_load_rom(yaze_ctx->project->rom_filename); + if (yaze_ctx->rom == nullptr) { return -1; } @@ -33,8 +29,8 @@ int yaze_init(yaze_editor_context* yaze_ctx) { } void yaze_cleanup(yaze_editor_context* yaze_ctx) { - if (yaze_ctx->flags->rom) { - yaze_unload_rom(yaze_ctx->flags->rom); + if (yaze_ctx->rom) { + yaze_unload_rom(yaze_ctx->rom); } } diff --git a/src/yaze.h b/src/yaze.h index 0f806178..a0a9a0a9 100644 --- a/src/yaze.h +++ b/src/yaze.h @@ -8,10 +8,10 @@ extern "C" { #include #include -#include "incl/dungeon.h" -#include "incl/overworld.h" -#include "incl/snes_color.h" -#include "incl/sprite.h" +#include "dungeon.h" +#include "overworld.h" +#include "snes_color.h" +#include "sprite.h" typedef struct z3_rom z3_rom; @@ -23,6 +23,7 @@ typedef struct yaze_event_dispatcher yaze_event_dispatcher; * @brief Extension editor context. */ typedef struct yaze_editor_context { + z3_rom* rom; yaze_project* project; yaze_command_registry* command_registry;