-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathObjectDataBase.h
More file actions
101 lines (101 loc) · 6.51 KB
/
ObjectDataBase.h
File metadata and controls
101 lines (101 loc) · 6.51 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#pragma once
#include "TextObject.h"
class ObjectDataBase
{
public:
int xoff = 10;
int yoff = 10;
std::vector<DetailObject*> detailedObjects = {};
std::vector<TextObject*> textObjects = {};
std::vector<ButtonObject*> buttonObjects = {};
std::vector<KeyInputObject*> keyInputObjects = {};
std::vector<AdvancedButtonObject*> advancedButtonObjects = {};
std::vector<AdvancedHexagonalButtonObject*> advancedHexagonalButtonObjects = {};
void addObject(DetailObject* newObject);
void addObject(TextObject* newObject);
void addObject(ButtonObject* newObject);
void addObject(KeyInputObject* newObject);
void addObject(AdvancedButtonObject* newObject);//
void addObject(AdvancedHexagonalButtonObject* newObject);//
void deleteDetailObject(int at);
void deleteTextObject(int at);
void deleteButtonObject(int at);
void deleteAdvancedButtonObject(int at);//
void deleteAdvancedHexagonalButtonObject(int at);//
void deleteKeyInputObject(int at);
void deleteAll();//
void deleteAllDetailObject();
void deleteAllButtonObject();
void deleteAllAdvancedButtonObject();//
void deleteAllAdvancedHexagonalButtonObject();//
void deleteAllTextObject();
void deleteAllKeyInputObject();
void updateObjects();//
void renderObjects();//
void deleteObject(std::string objectID);//
void deleteDetailObject(std::string objectID);
void deleteButtonObject(std::string objectID);
void deleteAdvancedButtonObject(std::string objectID);//
void deleteAdvancedHexagonalButtonObject(std::string objectID);//
void deleteTextObject(std::string objectID);
void deleteKeyInputObject(std::string objectID);
bool ObjectCollide(DetailObject* initialObject, DetailObject* otherObject);
bool ObjectCollide(DetailObject* initialObject, ButtonObject* otherObject);
bool ObjectCollide(ButtonObject* initialObject, ButtonObject* otherObject);
bool ObjectCollide(ButtonObject* initialObject, DetailObject* otherObject);
bool DetailObjectCollide(std::string thisobjID, std::string otherobjID);
bool ButtonObjectCollide(std::string thisobjID, std::string otherobjID);
bool DetectObject(std::string objectID);
bool DetectDetailObject(std::string objectID);
bool DetectButtonObject(std::string objectID);
bool DetectAdvancedButtonObject(std::string objectID);//
bool DetectAdvancedHexagonalButtonObject(std::string objectID);//
bool DetectTextObject(std::string objectID);
bool DetectKeyInputObject(std::string objectID);
KeyInputObject* getKeyInputObject(std::string objectID);
DetailObject* getDetailObject(std::string objectID);
ButtonObject* getButtonObject(std::string objectID);
AdvancedButtonObject* getAdvancedButtonObject(std::string objectID);//
AdvancedHexagonalButtonObject* getAdvancedHexagonalButtonObject(std::string objectID);//
TextObject* getTextObject(std::string objectID);
std::vector<DetailObject*> getAllDetailObject(std::string objectID);
std::vector<ButtonObject*> getAllButtonObject(std::string objectID);
std::vector<TextObject*> getAllTextObject(std::string objectID);
std::vector<DetailObject*> getListDetailObject(std::vector<std::string> objectIDs);
std::vector<ButtonObject*> getListButtonObject(std::vector<std::string> objectIDs);
std::vector<TextObject*> getListTextObject(std::vector<std::string> objectIDs);
DetailObject* createDetailCopy(std::string objID, bool exact = false);
ButtonObject* createButtonCopy(std::string objID, bool exact = false);
TextObject* createTextCopy(std::string objID, bool exact = false);
bool TopCollision(DetailObject* initialObject, DetailObject* otherObject);
bool BottomCollision(DetailObject* initialObject, DetailObject* otherObject);
bool LeftCollision(DetailObject* initialObject, DetailObject* otherObject);
bool RightCollision(DetailObject* initialObject, DetailObject* otherObject);
bool TopCollision(DetailObject* initialObject, ButtonObject* otherObject);
bool BottomCollision(DetailObject* initialObject, ButtonObject* otherObject);
bool LeftCollision(DetailObject* initialObject, ButtonObject* otherObject);
bool RightCollision(DetailObject* initialObject, ButtonObject* otherObject);
bool TopCollision(ButtonObject* initialObject, ButtonObject* otherObject);
bool BottomCollision(ButtonObject* initialObject, ButtonObject* otherObject);
bool LeftCollision(ButtonObject* initialObject, ButtonObject* otherObject);
bool RightCollision(ButtonObject* initialObject, ButtonObject* otherObject);
bool TopCollision(ButtonObject* initialObject, DetailObject* otherObject);
bool BottomCollision(ButtonObject* initialObject, DetailObject* otherObject);
bool LeftCollision(ButtonObject* initialObject, DetailObject* otherObject);
bool RightCollision(ButtonObject* initialObject, DetailObject* otherObject);
bool collisionDetailGroup(DetailObject* initialObject, std::vector<DetailObject*> otherObjects);
bool collisionDetailButtonGroup(DetailObject* initialObject, std::vector<ButtonObject*> otherObjects);
bool collisionButtonGroup(ButtonObject* initialObject, std::vector<ButtonObject*> otherObjects);
bool collisionButtonDetailGroup(ButtonObject* initialObject, std::vector<DetailObject*> otherObjects);
bool detailObjectCollisionGroup(std::string initialObject, std::vector<std::string> otherObjects);
bool buttonObjectCollisionGroup(std::string initialObject, std::vector<std::string> otherObjects);
void directionalCollisionHandler(bool& up, bool& left, bool& down, bool& right, DetailObject* initialObject, DetailObject* otherObject);
void directionalCollisionHandler(bool& up, bool& left, bool& down, bool& right, DetailObject* initialObject, ButtonObject* otherObject);
void directionalCollisionHandler(bool& up, bool& left, bool& down, bool& right, ButtonObject* initialObject, ButtonObject* otherObject);
void directionalCollisionHandler(bool& up, bool& left, bool& down, bool& right, ButtonObject* initialObject, DetailObject* otherObject);
bool directionalCollisionDetailHandlerGroup(bool& up, bool& left, bool& down, bool& right, DetailObject* initialObject, std::vector<DetailObject*> otherObjects);
bool directionalCollisionDetailButtonHandlerGroup(bool& up, bool& left, bool& down, bool& right, DetailObject* initialObject, std::vector<ButtonObject*> otherObjects);
bool directionalCollisionButtonHandlerGroup(bool& up, bool& left, bool& down, bool& right, ButtonObject* initialObject, std::vector<ButtonObject*> otherObjects);
bool directionalCollisionButtonDetailHandlerGroup(bool& up, bool& left, bool& down, bool& right, ButtonObject* initialObject, std::vector<DetailObject*> otherObjects);
void changeText(std::string, std::string);
};