From a475b843e7d37f128ce30140d193f0312aa70c9c Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Tue, 2 Feb 2021 15:36:09 -0500 Subject: Using tmxlite instead of Tileson --- src/game.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/game.h') diff --git a/src/game.h b/src/game.h index e5976b1..2c1680a 100644 --- a/src/game.h +++ b/src/game.h @@ -4,8 +4,9 @@ #include #include #include -#include +#include #include "sprite.h" +#include "map.h" struct Input { bool left = false; @@ -55,18 +56,15 @@ public: } } - void loadMapFromFile(std::string_view filename) { - tson::Tileson t; - map_ = t.parse(fs::path(filename)); - } + void setMap(std::unique_ptr map) { map_ = std::move(map); } - tson::Map* getMap() const { return map_.get(); } + const Map& getMap() const { return *map_; } private: std::vector sprites_; std::set> spritesByY_; - std::unique_ptr map_; + std::unique_ptr map_; }; #endif /* end of include guard: GAME_H_E6F1396E */ -- cgit 1.4.1