Rename z3 structures to zelda3 for consistency and clarity; add zelda3_rom struct and related functions
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
23
incl/yaze.h
23
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);
|
||||
|
||||
12
incl/zelda.h
12
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
|
||||
#endif // ZELDA_H
|
||||
Reference in New Issue
Block a user