-
Notifications
You must be signed in to change notification settings - Fork 1
/
Map.h
50 lines (35 loc) · 823 Bytes
/
Map.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
//
// Created by debowin on 11/17/17.
//
#ifndef GAMEGL_MAP_H
#define GAMEGL_MAP_H
#include "Entity.h"
#include "Shader.h"
#include "Display.h"
#include <string>
enum{
STATUS_INVALID,
STATUS_VALID,
STATUS_COMPLETE
};
class Map {
Entity* m_entities{};
Entity m_floor{};
int m_width{}, m_height{};
glm::vec3 m_startPos{};
Entity m_heldKey{};
public:
explicit Map(const std::string &fileName);
glm::vec3 &GetStartPos();
void Draw(Shader &shader, Camera &camera, float counter);
int processMovement(glm::vec3 playerPosition);
void GetCellCoords(glm::vec3 tvec3, int &x, int &z);
bool PickUpKey(glm::vec3 position);
int GetWidth() const {
return m_width;
}
int GetHeight() const {
return m_height;
}
};
#endif //GAMEGL_MAP_H