Arch Game Engine  0.2
stage.cpp
1 #include "stage.h"
2 
3 Stage::Stage() {
4 
5 }
6 Stage::~Stage() {}
7 
8 void Stage::createStage(string filename, string name, string img, SDL_Renderer* ren, int width, int height, int r, int count) {
9  createStage(filename, 1, name, img, ren, width, height, r, count);
10 }
11 void Stage::createStage(string filename, string name, string img, SDL_Renderer* ren, int width, int height, int r, int rcount, int count) {
12  createStage(filename, 1, name, img, ren, width, height, r, rcount, count);
13 }
14 void Stage::createStage(string filename, int startid, string name, string img, SDL_Renderer* ren, int width, int height, int r, int count) {
15  createStage(filename, startid, name, img, ren, width, height, r, count, count);
16 }
17 void Stage::createStage(string filename, int startid, string name, string img, SDL_Renderer* ren, int width, int height, int r, int rcount, int count) {
18  setMap(filename);
19  setTileset(startid, name, img, ren, width, height, r, rcount, count);
20 }
21 
22 Tileset Stage::setTileset(string name, string img, SDL_Renderer* ren, int width, int height, int r, int count) {
23  setTileset(1, name, img, ren, width, height, r, count);
24  return tileset;
25 }
26 Tileset Stage::setTileset(string name, string img, SDL_Renderer* ren, int width, int height, int r, int rcount, int count) {
27  setTileset(1, name, img, ren, width, height, r, rcount, count);
28  return tileset;
29 }
30 Tileset Stage::setTileset(int startid, string name, string img, SDL_Renderer* ren, int width, int height, int r, int count) {
31  setTileset(startid, name, img, ren, width, height, r, count, count);
32  return tileset;
33 }
34 Tileset Stage::setTileset(int startid, string name, string img, SDL_Renderer* ren, int width, int height, int r, int rcount, int count) {
35  tileset.create(startid, name, img, ren, width, height, r, rcount, count);
36  return tileset;
37 }
Class for loading in multiple Tiles.
Definition: tileset.h:8
void createStage(Map m, Tileset t)
Create a stage by passing in a Map and Tileset.
Definition: stage.h:16
vector< Tile > create(string name, string img, SDL_Renderer *ren, int width, int height, int r, int count)
Load in a map file with the name for all the tiles, the path to the map file, path to the tileset ima...
Definition: tileset.cpp:7
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