From 77be863f4f15d2481a64e4e8dadb4060a6e4e590 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 11 Feb 2018 12:34:52 -0500 Subject: Implemented map rendering and basic collision Only wall and platform collision currently works, and map edges are not currently implemented. --- src/world.h | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/world.h (limited to 'src/world.h') diff --git a/src/world.h b/src/world.h new file mode 100644 index 0000000..b88adf4 --- /dev/null +++ b/src/world.h @@ -0,0 +1,41 @@ +#ifndef WORLD_H_153C698B +#define WORLD_H_153C698B + +#include +#include +#include "map.h" + +class World { +public: + + explicit World(std::string filename); + + inline const Map& getMap(size_t id) const + { + return maps_.at(id); + } + + inline size_t getStartingMapId() const + { + return startMap_; + } + + inline int getStartingX() const + { + return startX_; + } + + inline int getStartingY() const + { + return startY_; + } + +private: + + std::map maps_; + size_t startMap_; + int startX_; + int startY_; +}; + +#endif /* end of include guard: WORLD_H_153C698B */ -- cgit 1.4.1