From 9510e4fbbe817ab62ce014ee50283edd62fa00d9 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Tue, 9 Feb 2021 18:27:03 -0500 Subject: Entity prototypes can be stored in the map file now --- src/map.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/map.h') diff --git a/src/map.h b/src/map.h index de18e68..a896b00 100644 --- a/src/map.h +++ b/src/map.h @@ -1,6 +1,7 @@ #ifndef MAP_H_D95D6D47 #define MAP_H_D95D6D47 +#include #include #include #include "renderer.h" @@ -17,6 +18,15 @@ struct Tile { StepType step = StepType::none; }; +struct Prototype { + std::string name; + vec2i pos; + vec2i collisionOffset; + vec2i collisionSize; + std::string animationFilename; + std::string interactionScript; +}; + class Map { public: @@ -36,6 +46,8 @@ public: StepType getStepType(int x, int y) const; + const std::vector& getPrototypes() const { return prototypes_; } + private: vec2i mapSize_; @@ -43,6 +55,7 @@ private: std::vector> layers_; int tilesetTextureId_; int tilesetColumns_; + std::vector prototypes_; }; #endif /* end of include guard: MAP_H_D95D6D47 */ -- cgit 1.4.1