From d1c84e7b919ea8a8ca93be08540aef96a314ff1c Mon Sep 17 00:00:00 2001 From: scawful Date: Wed, 13 Nov 2024 09:18:12 -0500 Subject: [PATCH] Update CMakeLists.txt to include snes_tile.h and dungeon.h; remove yaze_flags structure from yaze.h to simplify initialization --- src/CMakeLists.txt | 16 ++++++++++------ src/yaze.h | 26 ++++++++------------------ 2 files changed, 18 insertions(+), 24 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f424f19a..107e8b9f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -123,11 +123,15 @@ if (YAZE_BUILD_LIB) ARCHIVE DESTINATION lib/static) install( - FILES - yaze.h - incl/sprite.h - incl/snes_color.h - incl/overworld.h - DESTINATION include) + FILES + yaze.h + incl/sprite.h + incl/snes_tile.h + incl/snes_color.h + incl/overworld.h + incl/dungeon.h + DESTINATION + include + ) endif() endif() diff --git a/src/yaze.h b/src/yaze.h index 6df30fe9..0f806178 100644 --- a/src/yaze.h +++ b/src/yaze.h @@ -15,9 +15,7 @@ extern "C" { typedef struct z3_rom z3_rom; -typedef struct yaze_flags yaze_flags; typedef struct yaze_project yaze_project; - typedef struct yaze_command_registry yaze_command_registry; typedef struct yaze_event_dispatcher yaze_event_dispatcher; @@ -26,34 +24,18 @@ typedef struct yaze_event_dispatcher yaze_event_dispatcher; */ typedef struct yaze_editor_context { yaze_project* project; - yaze_flags* flags; yaze_command_registry* command_registry; yaze_event_dispatcher* event_dispatcher; } yaze_editor_context; -/** - * @brief Flags to initialize the Yaze library. - */ -struct yaze_flags { - int debug; - const char* rom_filename; - z3_rom* rom; -}; - -void yaze_check_version(const char* version); - /** * @brief Initialize the Yaze library. - * - * @param flags Flags to initialize the library. */ int yaze_init(yaze_editor_context*); /** * @brief Clean up the Yaze library. - * - * @param flags Flags used to initialize the library. */ void yaze_cleanup(yaze_editor_context*); @@ -111,8 +93,16 @@ yaze_bitmap yaze_load_bitmap(const char* filename); snes_color yaze_get_color_from_paletteset(const z3_rom* rom, int palette_set, int palette, int color); +/** + * @brief Load the overworld from a Zelda3 ROM. + */ z3_overworld* yaze_load_overworld(const z3_rom* rom); +/** + * @brief Check the version of the Yaze library. + */ +void yaze_check_version(const char* version); + /** * @brief Command registry. */