diff --git a/incl/dungeon.h b/incl/dungeon.h index e2795748..bb151e59 100644 --- a/incl/dungeon.h +++ b/incl/dungeon.h @@ -60,7 +60,7 @@ typedef struct destination { uint8_t target_layer; } destination; -typedef struct z3_dungeon_room { +typedef struct zelda3_dungeon_room { background2 bg2; dungeon_sprite* sprites; object_door* doors; @@ -69,7 +69,7 @@ typedef struct z3_dungeon_room { chest_data* chests_in_room; destination pits; destination stairs[4]; -} z3_dungeon_room; +} zelda3_dungeon_room; #ifdef __cplusplus } diff --git a/incl/overworld.h b/incl/overworld.h index b88164e8..22240f45 100644 --- a/incl/overworld.h +++ b/incl/overworld.h @@ -10,7 +10,7 @@ extern "C" { /** * @brief Primitive of an overworld map. */ -typedef struct z3_overworld_map { +typedef struct zelda3_overworld_map { uint8_t id; /**< ID of the overworld map. */ uint8_t parent_id; uint8_t quadrant_id; @@ -23,18 +23,18 @@ typedef struct z3_overworld_map { uint8_t sprite_palette[3]; uint8_t area_music[4]; uint8_t static_graphics[16]; -} z3_overworld_map; +} zelda3_overworld_map; /** * @brief Primitive of the overworld. */ -typedef struct z3_overworld { - void *impl; // yaze::Overworld* - z3_overworld_map **maps; /**< Pointer to the overworld maps. */ -} z3_overworld; +typedef struct zelda3_overworld { + void *impl; // yaze::Overworld* + zelda3_overworld_map **maps; /**< Pointer to the overworld maps. */ +} zelda3_overworld; #ifdef __cplusplus } #endif -#endif // YAZE_OVERWORLD_H +#endif // YAZE_OVERWORLD_H diff --git a/incl/yaze.h b/incl/yaze.h index 4813f2b0..e69b879c 100644 --- a/incl/yaze.h +++ b/incl/yaze.h @@ -11,12 +11,12 @@ extern "C" { #include "dungeon.h" #include "overworld.h" #include "snes_color.h" +#include "zelda.h" -typedef struct z3_rom z3_rom; typedef struct yaze_project yaze_project; typedef struct yaze_editor_context { - z3_rom* rom; + zelda3_rom* rom; yaze_project* project; const char* error_message; } yaze_editor_context; @@ -42,16 +42,6 @@ struct yaze_project { yaze_project yaze_load_project(const char* filename); -struct z3_rom { - const char* filename; - const uint8_t* data; - size_t size; - void* impl; // yaze::Rom* -}; - -z3_rom* yaze_load_rom(const char* filename); -void yaze_unload_rom(z3_rom* rom); - typedef struct yaze_bitmap { int width; int height; @@ -61,12 +51,13 @@ typedef struct yaze_bitmap { 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); +snes_color yaze_get_color_from_paletteset(const zelda3_rom* rom, + int palette_set, int palette, + int color); -z3_overworld* yaze_load_overworld(const z3_rom* rom); +zelda3_overworld* yaze_load_overworld(const zelda3_rom* rom); -z3_dungeon_room* yaze_load_all_rooms(const z3_rom* rom); +zelda3_dungeon_room* yaze_load_all_rooms(const zelda3_rom* rom); typedef void (*yaze_initialize_func)(yaze_editor_context* context); typedef void (*yaze_cleanup_func)(void); diff --git a/incl/zelda.h b/incl/zelda.h index 6a4c5d5d..12ae3855 100644 --- a/incl/zelda.h +++ b/incl/zelda.h @@ -83,8 +83,18 @@ const static zelda3_version_pointers zelda3_jp_pointers = { 0x67DD0, // kDungeonPalettesGroups }; +typedef struct zelda3_rom { + const char* filename; + const uint8_t* data; + size_t size; + void* impl; // yaze::Rom* +} zelda3_rom; + +zelda3_rom* yaze_load_rom(const char* filename); +void yaze_unload_rom(zelda3_rom* rom); + #ifdef __cplusplus } #endif -#endif \ No newline at end of file +#endif // ZELDA_H \ No newline at end of file