Refactor OverworldEntity to use uint16_t for map_id and improve code organization

This commit is contained in:
scawful
2024-08-22 10:49:12 -04:00
parent 4099d8731d
commit 270bef0973
7 changed files with 50 additions and 54 deletions

View File

@@ -6,7 +6,7 @@ namespace yaze {
namespace app {
namespace zelda3 {
void Sprite::UpdateMapProperties(short map_id) {
void Sprite::UpdateMapProperties(uint16_t map_id) {
map_x_ = x_;
map_y_ = y_;
name_ = kSpriteDefaultNames[id_];

View File

@@ -328,7 +328,7 @@ class Sprite : public OverworldEntity {
bool mirror_x = false, bool mirror_y = false,
int sizex = 2, int sizey = 2);
void UpdateMapProperties(short map_id) override;
void UpdateMapProperties(uint16_t map_id) override;
// New methods
void UpdateCoordinates(int map_x, int map_y);