-
Notifications
You must be signed in to change notification settings - Fork 0
/
Level.h
56 lines (44 loc) · 1.05 KB
/
Level.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifndef __Level__
#define __Level__
#include <fstream>
#include <string.h>
#include <string>
#include "Tile.h"
#include "../Animator/TileAnimator.h"
class Level {
public:
Level();
~Level();
unsigned int levelHeight;
unsigned int levelWidth;
static const int TILESIZEX = 16;
static const int TILESIZEY = 16;
//bool loadLevel();
bool loadLevel(std::string levelName);
bool initLevel();
Tile *getTile(int x, int y);
bool getColTile(int x, int y);
bool **getCollisionTiles();
void debug();
//enum TileType {NoTile, Solid, Slope, OneWay, Water, Ladder};
enum levelAttributes { Dimensions, ScrollLock, AutoScroll, Tiles };
private:
struct TileInfo{
Tile *tile;
TileAnimator *tAnimator;
//TileType type;
//spawnpoint
};
bool initiated;
void initColTileset();
void initTileset();
void createTile(int width, int height);
void clearTile(int x, int y);
void testInit();
TileInfo **tileSet_;
Tile ***tileset;
bool **colTileset;
int playerSpawnPosX = 0;
int playerSpawnPosY = 0;
};
#endif