From 022d138d26c16406de89461e1c18745f86ee5c35 Mon Sep 17 00:00:00 2001 From: scawful Date: Fri, 9 Aug 2024 01:42:55 -0400 Subject: [PATCH] add base/overworld.h --- src/base/overworld.h | 28 ++++++++++++++++++++++++++++ src/base/sprite.h | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 src/base/overworld.h diff --git a/src/base/overworld.h b/src/base/overworld.h new file mode 100644 index 00000000..783b7617 --- /dev/null +++ b/src/base/overworld.h @@ -0,0 +1,28 @@ +#ifndef YAZE_OVERWORLD_H +#define YAZE_OVERWORLD_H + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct z3_overworld z3_overworld; +typedef struct z3_overworld_map z3_overworld_map; + +/** + * @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. */ +}; + +struct z3_overworld { + z3_overworld_map* maps; /**< Pointer to the overworld maps. */ + void* impl; // yaze::app::Overworld* +}; + +#ifdef __cplusplus +} + +#endif \ No newline at end of file diff --git a/src/base/sprite.h b/src/base/sprite.h index 3b5c3aff..e5923566 100644 --- a/src/base/sprite.h +++ b/src/base/sprite.h @@ -25,7 +25,7 @@ struct z3_sprite { const char* name; /**< Name of the sprite. */ uint8_t id; /**< ID of the sprite. */ - sprite_action* actions; /**< Pointer to the actions of the sprite. */ + z3_sprite_action* actions; /**< Pointer to the actions of the sprite. */ }; typedef struct z3_sprite z3_sprite;