-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathroom.hpp
71 lines (57 loc) · 1.89 KB
/
room.hpp
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
68
69
70
#ifndef _ROOM_HPP_
#define _ROOM_HPP_
#include "sprite.hpp"
#include "object3d.hpp"
#include "terrain.hpp"
#include <map>
#include <memory>
typedef std::map<std::string, std::shared_ptr<Sprite> > spriteContainer;
typedef std::map<std::string, std::shared_ptr<Object3D> > modelContainer;
typedef std::map<std::string, std::shared_ptr<Terrain> > terrainContainer;
class Room
{
private:
std::string name;
int roomNumber;
int roomType;
spriteContainer spriteMap;
spriteContainer::iterator spriteIterator;
modelContainer modelMap;
modelContainer::iterator modelIterator;
terrainContainer terrainMap;
terrainContainer::iterator terrainIterator;
double roomStartTime;
bool firstRun;
double timePerPicture; // For cinematics
double pictureChangeTime; // For cinematics
std::string music;
std::shared_ptr<Sprite> worldSprite;
public:
Room(std::string s, std::string mus, int n, int t);
~Room();
void operate();
std::shared_ptr<Sprite> getSprite(std::string name);
void addSprite(std::string name, std::shared_ptr<Sprite> s);
void removeSprite(std::string name);
void iterateSprites();
void toggleShaders();
void shaderAction1();
void shaderAction2();
void shaderAction3();
void shaderAction4();
void shaderAction5();
void shaderAction6();
void shaderAction7();
void shaderAction8();
void synthAction(unsigned char input_data[]);
void addModel(std::string name, std::shared_ptr<Object3D> m);
void removeModel(std::string name);
void addTerrain(std::string name, std::shared_ptr<Terrain> t);
void removeTerrain(std::string name);
std::shared_ptr<Sprite> findSprite(std::string f);
std::shared_ptr<Object3D> findModel(std::string f);
std::shared_ptr<Terrain> findTerrain(std::string f);
std::string getName() { return name; }
int getType() { return roomType; }
};
#endif