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
|
#ifndef GAMECONTROLLER_H
#define GAMECONTROLLER_H
#include <queue>
#include "GameView.h"
#include "GameModel.h"
#include "interface/Point.h"
#include "simulation/Simulation.h"
#include "search/SearchController.h"
#include "render/RenderController.h"
#include "login/LoginController.h"
#include "ssave/SSaveController.h"
#include "tags/TagsController.h"
#include "console/ConsoleController.h"
#include "stamps/StampsController.h"
//#include "cat/TPTScriptInterface.h"
#include "cat/LuaScriptInterface.h"
#include "Menu.h"
using namespace std;
class GameModel;
class GameView;
class CommandInterface;
class ConsoleController;
class GameController
{
private:
//Simulation * sim;
GameView * gameView;
GameModel * gameModel;
SearchController * search;
RenderController * renderOptions;
LoginController * loginWindow;
SSaveController * ssave;
ConsoleController * console;
TagsController * tagsWindow;
StampsController * stamps;
CommandInterface * commandInterface;
public:
class LoginCallback;
class SearchCallback;
class RenderCallback;
class SSaveCallback;
class TagsCallback;
class StampsCallback;
GameController();
~GameController();
GameView * GetView();
bool MouseMove(int x, int y, int dx, int dy);
bool MouseDown(int x, int y, unsigned button);
bool MouseUp(int x, int y, unsigned button);
bool MouseWheel(int x, int y, int d);
bool KeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt);
bool KeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt);
void Tick();
void SetZoomEnabled(bool zoomEnable);
void SetZoomPosition(ui::Point position);
void AdjustBrushSize(int direction, bool logarithmic = false);
void AdjustZoomSize(int direction, bool logarithmic = false);
void DrawPoints(int toolSelection, queue<ui::Point*> & pointQueue);
void DrawRect(int toolSelection, ui::Point point1, ui::Point point2);
void DrawLine(int toolSelection, ui::Point point1, ui::Point point2);
void DrawFill(int toolSelection, ui::Point point);
void StampRegion(ui::Point point1, ui::Point point2);
void CopyRegion(ui::Point point1, ui::Point point2);
void Update();
void SetPaused(bool pauseState);
void SetPaused();
void SetDecoration(bool decorationState);
void SetDecoration();
void SetActiveMenu(Menu * menu);
void SetActiveTool(int toolSelection, Tool * tool);
void SetColour(ui::Colour colour);
void OpenSearch();
void OpenLogin();
void OpenTags();
void OpenDisplayOptions();
void OpenRenderOptions();
void OpenSaveWindow();
void OpenStamps();
void PlaceStamp(ui::Point position);
void PlaceClipboard(ui::Point position);
void ClearSim();
void ReloadSim();
void Vote(int direction);
void ChangeBrush();
void ShowConsole();
void FrameStep();
ui::Point PointTranslate(ui::Point point);
std::string ElementResolve(int type);
};
#endif // GAMECONTROLLER_H
|