-
Notifications
You must be signed in to change notification settings - Fork 0
/
GameMap.hh
67 lines (57 loc) · 1.31 KB
/
GameMap.hh
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
57
58
59
60
61
62
63
64
65
66
67
#ifndef GAMEMAP_HH_
#define GAMEMAP_HH_
// mathematic include
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
// gdl include
#include <Game.hh>
#include <Clock.hh>
#include <SdlContext.hh>
#include <BasicShader.hh>
#include <Input.hh>
#include <AShader.hh>
// stl
#include <vector>
#include <iostream>
#include "Cube.hpp"
#include "Character.hpp"
#include "Bomb.hpp"
class Character;
class GameMap
{
//Ctor && Dtor
public:
GameMap(const int &, const int &, std::deque<Bomb *> &objects);
~GameMap();
// Method
public:
bool movePlayer(gdl::Clock const& clock, gdl::Input& input, Character &);
void createCustomMap();
void createMap(int);
void createMap2();
void createMap3();
void createMap4();
void createMap5();
std::vector<AObject*> getWalls() const;
std::vector<AObject*> getPlayers() const;
int getCoordType(int, int) const;
void showMap();
void setTypeAtPos(int x, int z, int type);
void putWall();
void setRandomBonusAtPos(int x, int z);
int **getMap() const;
int getHeight() const;
int getSpawnX(int) const;
int getSpawnZ(int) const;
// Attribut
private:
typedef void (GameMap::*callMap)();
int _width;
int _height;
int **_map;
callMap tab[4];
int spawPoint[8][2];
std::deque<Bomb *> &_objects;
std::vector<AObject*> _players;
};
#endif