Rename OverworldEntity to GameEntity for shared code between dungeon and overworld sprites
This commit is contained in:
@@ -25,10 +25,10 @@ struct OWMapTiles {
|
|||||||
using OWMapTiles = struct OWMapTiles;
|
using OWMapTiles = struct OWMapTiles;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @class OverworldEntity
|
* @class GameEntity
|
||||||
* @brief Base class for all overworld entities.
|
* @brief Base class for all overworld and dungeon entities.
|
||||||
*/
|
*/
|
||||||
class OverworldEntity {
|
class GameEntity {
|
||||||
public:
|
public:
|
||||||
enum EntityType {
|
enum EntityType {
|
||||||
kEntrance = 0,
|
kEntrance = 0,
|
||||||
@@ -38,8 +38,9 @@ class OverworldEntity {
|
|||||||
kTransport = 4,
|
kTransport = 4,
|
||||||
kMusic = 5,
|
kMusic = 5,
|
||||||
kTilemap = 6,
|
kTilemap = 6,
|
||||||
kProperties = 7
|
kProperties = 7,
|
||||||
} type_;
|
kDungeonSprite = 8,
|
||||||
|
} entity_type_;
|
||||||
int x_;
|
int x_;
|
||||||
int y_;
|
int y_;
|
||||||
int game_x_;
|
int game_x_;
|
||||||
@@ -50,7 +51,7 @@ class OverworldEntity {
|
|||||||
auto set_x(int x) { x_ = x; }
|
auto set_x(int x) { x_ = x; }
|
||||||
auto set_y(int y) { y_ = y; }
|
auto set_y(int y) { y_ = y; }
|
||||||
|
|
||||||
OverworldEntity() = default;
|
GameEntity() = default;
|
||||||
|
|
||||||
virtual void UpdateMapProperties(uint16_t map_id) = 0;
|
virtual void UpdateMapProperties(uint16_t map_id) = 0;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user