Arch Game Engine  0.2
stage.h
1 #ifndef STAGE_H
2 #define STAGE_H
3 
4 #include "tileset.h"
5 #include "map.h"
6 
8 class Stage {
9 private:
10  Map map;
11  Tileset tileset;
12 public:
13  Stage();
14  ~Stage();
16  void createStage(Map m, Tileset t) { setMap(m); setTileset(t); }
18  void createStage(string filename, string name, string img, SDL_Renderer* ren, int width, int height, int r, int count);
19  void createStage(string filename, string name, string img, SDL_Renderer* ren, int width, int height, int r, int rcount, int count);
20  void createStage(string filename, int startid, string name, string img, SDL_Renderer* ren, int width, int height, int r, int count);
21  void createStage(string filename, int startid, string name, string img, SDL_Renderer* ren, int width, int height, int r, int rcount, int count);
23  void setMap(Map m) { map = m; }
25  Map setMap(string filename) { map.loadMap(filename); return map; }
27  Map getMap() const { return map; }
29  void setTileset(Tileset t) { tileset = t; }
30  Tileset setTileset(string name, string img, SDL_Renderer* ren, int width, int height, int r, int count);
31  Tileset setTileset(string name, string img, SDL_Renderer* ren, int width, int height, int r, int rcount, int count);
32  Tileset setTileset(int startid, string name, string img, SDL_Renderer* ren, int width, int height, int r, int count);
33  Tileset setTileset(int startid, string name, string img, SDL_Renderer* ren, int width, int height, int r, int rcount, int count);
35  Tileset getTileset() const { return tileset; }
36 };
37 
38 #endif //STAGE_H
Class for loading in multiple Tiles.
Definition: tileset.h:8
void loadMap(string filename)
Read in map file with given path to the file.
Definition: map.cpp:8
void createStage(Map m, Tileset t)
Create a stage by passing in a Map and Tileset.
Definition: stage.h:16
Map getMap() const
Get the Map.
Definition: stage.h:27
The Stage class stores a Map and Tileset.
Definition: stage.h:8
Map setMap(string filename)
Load in a new map by passing in the map file.
Definition: stage.h:25
Tileset getTileset() const
Get the Tileset.
Definition: stage.h:35
This class takes in a file and loads it in for the map.
Definition: map.h:10
void setMap(Map m)
Set the Map by passing in a Map.
Definition: stage.h:23
void setTileset(Tileset t)
Set the Tileset with a given Tileset.
Definition: stage.h:29