Enhance overworld structures by adding new fields to z3_overworld_map and z3_overworld; improve map and sprite management
This commit is contained in:
@@ -7,28 +7,41 @@ extern "C" {
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct z3_overworld z3_overworld;
|
||||
typedef struct z3_overworld_map z3_overworld_map;
|
||||
#include "incl/sprite.h"
|
||||
|
||||
/**
|
||||
* @brief Primitive of an overworld map.
|
||||
*/
|
||||
struct z3_overworld_map {
|
||||
uint8_t id; /**< ID of the overworld map. */
|
||||
uint8_t* tile32_data; /**< Pointer to the 32x32 tile data. */
|
||||
uint8_t* tile16_data; /**< Pointer to the 16x16 tile data. */
|
||||
};
|
||||
typedef struct z3_overworld_map {
|
||||
uint8_t id; /**< ID of the overworld map. */
|
||||
uint8_t parent_id;
|
||||
uint8_t quadrant_id;
|
||||
uint8_t world_id;
|
||||
uint8_t game_state;
|
||||
uint8_t area_graphics;
|
||||
uint8_t area_palette;
|
||||
|
||||
uint8_t sprite_graphics[3];
|
||||
uint8_t sprite_palette[3];
|
||||
uint8_t area_music[4];
|
||||
uint8_t static_graphics[16];
|
||||
} z3_overworld_map;
|
||||
|
||||
/**
|
||||
* @brief Primitive of the overworld.
|
||||
*/
|
||||
struct z3_overworld {
|
||||
z3_overworld_map** maps; /**< Pointer to the overworld maps. */
|
||||
void* impl; // yaze::app::Overworld*
|
||||
};
|
||||
typedef struct z3_overworld {
|
||||
void *impl; // yaze::app::Overworld*
|
||||
|
||||
uint8_t *tile32_data; /**< Pointer to the 32x32 tile data. */
|
||||
uint8_t *tile16_data; /**< Pointer to the 16x16 tile data. */
|
||||
|
||||
z3_sprite **sprites; /**< Pointer to the sprites per map. */
|
||||
z3_overworld_map **maps; /**< Pointer to the overworld maps. */
|
||||
} z3_overworld;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // YAZE_OVERWORLD_H
|
||||
#endif // YAZE_OVERWORLD_H
|
||||
|
||||
Reference in New Issue
Block a user