-
Notifications
You must be signed in to change notification settings - Fork 8
/
cheat_screen.h
149 lines (130 loc) · 4.24 KB
/
cheat_screen.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
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
/*
* Copyright (C) 2000-2013 The Exult Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef CHEAT_SCREEN_H
#define CHEAT_SCREEN_H
class Game_window;
class Image_buffer8;
class Font;
class Game_clock;
class Actor;
class CheatScreen {
Actor *grabbed;
static const char *schedules[33];
static const char *flag_names[64];
static const char *alignments[4];
#ifdef __IPHONEOS__
static const int offsetx = 15;
#else
static const int offsetx = 0;
#endif
static const int offsety1 = 0;
static const int offsety2 = 0;
public:
CheatScreen();
~CheatScreen();
void show_screen();
void SetGrabbedActor(Actor *g) {
grabbed = g;
}
void ClearThisGrabbedActor(Actor *g) const {
if (g == grabbed) g = 0;
}
private:
enum Cheat_Prompt {
CP_Command = 0,
CP_HitKey = 1,
CP_NotAvail = 2,
CP_InvalidNPC = 3,
CP_InvalidCom = 4,
CP_Canceled = 5,
CP_ClockSet = 6,
CP_InvalidTime = 7,
CP_InvalidShape = 8,
CP_InvalidValue = 9,
CP_Created = 10,
CP_ShapeSet = 11,
CP_ValueSet = 12,
CP_NameSet = 13,
CP_WrongShapeFile = 14,
CP_ChooseNPC = 16,
CP_EnterValue = 17,
CP_Minute = 18,
CP_Hour = 19,
CP_Day = 20,
CP_Shape = 21,
CP_Activity = 22,
CP_XCoord = 23,
CP_YCoord = 24,
CP_Lift = 25,
CP_GFlagNum = 26,
CP_NFlagNum = 27,
CP_TempNum = 28,
CP_NLatitude = 29,
CP_SLatitude = 30,
CP_WLongitude = 31,
CP_ELongitude = 32,
CP_Name = 33,
CP_NorthSouth = 34,
CP_WestEast = 35,
CP_HexXCoord = 37,
CP_HexYCoord = 38,
CP_EnterValueNoCancel = 39
};
Game_window *gwin;
Image_buffer8 *ibuf;
Font *font;
Game_clock *clock;
int maxx, maxy;
int centerx, centery;
Palette pal;
void SharedPrompt(char *input, const Cheat_Prompt &mode);
bool SharedInput(char *input, int len, int &command, Cheat_Prompt &mode, bool &activate);
void NormalLoop();
void NormalDisplay();
void NormalMenu();
void NormalActivate(char *input, int &command, Cheat_Prompt &mode);
bool NormalCheck(char *input, int &command, Cheat_Prompt &mode, bool &activate);
void ActivityDisplay();
Cheat_Prompt GlobalFlagLoop(int num);
Cheat_Prompt TimeSetLoop();
Cheat_Prompt NPCLoop(int num);
void NPCDisplay(Actor *actor, int &num);
void NPCMenu(Actor *actor, int &num);
void NPCActivate(char *input, int &command, Cheat_Prompt &mode, Actor *actor, int &num);
bool NPCCheck(char *input, int &command, Cheat_Prompt &mode, bool &activate, Actor *actor, int &num);
void FlagLoop(Actor *actor);
void FlagMenu(Actor *actor);
void FlagActivate(char *input, int &command, Cheat_Prompt &mode, Actor *actor);
bool FlagCheck(char *input, int &command, Cheat_Prompt &mode, bool &activate, Actor *actor);
Cheat_Prompt AdvancedFlagLoop(int flagnum, Actor *actor);
void BusinessLoop(Actor *actor);
void BusinessDisplay(Actor *actor);
void BusinessMenu(Actor *actor);
void BusinessActivate(char *input, int &command, Cheat_Prompt &mode, Actor *actor, int &time, int &prev);
bool BusinessCheck(char *input, int &command, Cheat_Prompt &mode, bool &activate, Actor *actor, int &time);
void StatLoop(Actor *actor);
void StatMenu(Actor *actor);
void StatActivate(char *input, int &command, Cheat_Prompt &mode, Actor *actor);
bool StatCheck(char *input, int &command, Cheat_Prompt &mode, bool &activate, Actor *actor);
void TeleportLoop();
void TeleportDisplay();
void TeleportMenu();
void TeleportActivate(char *input, int &command, Cheat_Prompt &mode, int &prev);
bool TeleportCheck(char *input, int &command, Cheat_Prompt &mode, bool &activate);
};
#endif