SDL SPOOKY PLATFORMER ENGINE  0.2.0
An implementation of a platformer using sdl, implemented using an entity component system and efficient collision management.
LevelManager.hpp
Go to the documentation of this file.
1 #ifndef LEVEL_MANAGER_HPP
2 #define LEVEL_MANAGER_HPP
3 
4 #include <vector>
5 #include "TileMapComponent.hpp"
6 #include "MainTileMap.hpp"
7 #include "TinyMath.hpp"
8 #include <string>
9 #include <fstream>
10 #include <memory>
11 #include <sstream>
12 #include "ColliderManager.hpp"
14 #include "ColliderComponent.hpp"
15 
16 using namespace std;
17 
19 {
20  std::string tileSheetFileName;
25  SDL_Renderer *ren;
26 
27  TileMapDescription(std::string tileSheetFileName, int TileMapRows, int TileMapCols, int _TileWidth, int _TileHeight, SDL_Renderer *ren)
28  : tileSheetFileName(tileSheetFileName), _TileMapRows(TileMapRows), _TileMapCols(TileMapCols), _TileWidth(_TileWidth), _TileHeight(_TileHeight), ren(ren)
29  {
30  }
31 };
32 
42 {
43 public:
44  LevelManager() = delete;
45  LevelManager(const LevelManager &lm) = delete;
46  void operator=(const LevelManager &lm) = delete;
47 
54  static pair<GameObject*, std::vector<GameObject*>> Load(const std::string &levelPath, const TileMapDescription &descrip);
55 
56 private:
57  static pair<string, vector<int>> parseData(string line);
58 };
59 
60 #endif
Definition: LevelManager.hpp:41
TileMapDescription(std::string tileSheetFileName, int TileMapRows, int TileMapCols, int _TileWidth, int _TileHeight, SDL_Renderer *ren)
Definition: LevelManager.hpp:27
SDL_Renderer * ren
Definition: LevelManager.hpp:25
int _TileHeight
Definition: LevelManager.hpp:24
int _TileWidth
Definition: LevelManager.hpp:23
int _TileMapCols
Definition: LevelManager.hpp:22
int _TileMapRows
Definition: LevelManager.hpp:21
std::string tileSheetFileName
Definition: LevelManager.hpp:20
Definition: LevelManager.hpp:18