ScummVM API documentation
logic.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef KINGDOM_LOGIC_H
23#define KINGDOM_LOGIC_H
24
25namespace Kingdom {
26
27class KingdomGame;
28
29class Logic {
30
31typedef void (Kingdom::Logic::*Opcode)(void);
32
33private:
34 KingdomGame *_vm;
35
37 void initOpcodes();
38 void initOpcodesDemo();
39 void initOpcodesFull();
40
41 void GPL1_10();
42 void GPL1_11();
43 void GPL1_20();
44 void GPL1_30();
45 void GPL1_31();
46 void GPL1_32();
47 void GPL1_40();
48 void GPL1_41();
49 void GPL1_42();
50 void GPL1_50();
51 void GPL1_51();
52 void GPL1_52();
53 void GPL1_53();
54 void GPL1_60();
55 void GPL1_70();
56 void GPL1_71();
57 void GPL1_72();
58 void GPL1_80();
59 void GPL1_81();
60 void GPL1_82();
61 void GPL1_90();
62 void GPL1_91();
63 void GPL1_92();
64 void GPL1_100();
65 void GPL1_101();
66 void GPL1_102();
67 void GPL1_110();
68 void GPL1_111();
69 void GPL1_112();
70 void GPL1_120();
71 void GPL1_121();
72 void GPL1_130();
73 void GPL1_140();
74 void GPL1_141();
75 void GPL1_142();
76 void GPL1_150();
77 void GPL1_151();
78 void GPL1_160();
79 void GPL1_161();
80 void GPL1_162();
81 void GPL1_170();
82 void GPL1_171();
83 void GPL1_172();
84 void GPL1_180();
85 void GPL1_181();
86 void GPL1_182();
87 void GPL1_190();
88 void GPL1_200();
89 void GPL1_201();
90 void GPL1_202();
91 void GPL1_210();
92 void GPL1_211();
93 void GPL1_212();
94 void GPL1_220();
95 void GPL1_221();
96 void GPL1_222();
97 void GPL1_230();
98 void GPL1_240();
99 void GPL1_241();
100 void GPL1_242();
101
102 void GPL2_250();
103 void GPL2_251();
104 void GPL2_252();
105 void GPL2_260();
106 void GPL2_261();
107 void GPL2_270();
108 void GPL2_271();
109 void GPL2_272();
110 void GPL2_280();
111 void GPL2_290();
112 void GPL2_291();
113 void GPL2_292();
114 void GPL2_300();
115 void GPL2_301();
116 void GPL2_302();
117 void GPL2_310();
118 void GPL2_311();
119 void GPL2_312();
120 void GPL2_320();
121 void GPL2_321();
122 void GPL2_322();
123 void GPL2_330();
124 void GPL2_331();
125 void GPL2_332();
126 void GPL2_340();
127 void GPL2_341();
128 void GPL2_342();
129 void GPL2_350();
130 void GPL2_351();
131 void GPL2_360();
132 void GPL2_361();
133 void GPL2_362();
134 void GPL2_370();
135 void GPL2_371();
136 void GPL2_372();
137 void GPL2_380();
138 void GPL2_381();
139 void GPL2_382();
140 void GPL2_390();
141 void GPL2_400();
142 void GPL2_401();
143 void GPL2_402();
144 void GPL2_410();
145 void GPL2_411();
146 void GPL2_420();
147 void GPL2_421();
148 void GPL2_422();
149 void GPL2_430();
150 void GPL2_431();
151 void GPL2_440();
152 void GPL2_441();
153 void GPL2_442();
154 void GPL2_450();
155 void GPL2_451();
156 void GPL2_460();
157 void GPL2_461();
158 void GPL2_462();
159 void GPL2_480();
160 void GPL2_481();
161 void GPL2_482();
162 void GPL2_490();
163 void GPL2_491();
164
165 void GPL3_500();
166 void GPL3_501();
167 void GPL3_502();
168 void GPL3_510();
169 void GPL3_511();
170 void GPL3_512();
171 void GPL3_520();
172 void GPL3_521();
173 void GPL3_522();
174 void GPL3_530();
175 void GPL3_531();
176 void GPL3_540();
177 void GPL3_541();
178 void GPL3_542();
179 void GPL3_550();
180 void GPL3_551();
181 void GPL3_552();
182 void GPL3_560();
183 void GPL3_561();
184 void GPL3_562();
185 void GPL3_570();
186 void GPL3_571();
187 void GPL3_572();
188 void GPL3_580();
189 void GPL3_581();
190 void GPL3_582();
191 void GPL3_590();
192 void GPL3_591();
193 void GPL3_592();
194 void GPL3_600();
195 void GPL3_610();
196 void GPL3_611();
197 void GPL3_620();
198 void GPL3_621();
199 void GPL3_630();
200 void GPL3_631();
201 void GPL3_640();
202 void GPL3_641();
203 void GPL3_642();
204 void GPL3_650();
205 void GPL3_651();
206 void GPL3_660();
207 void GPL3_661();
208 void GPL3_670();
209 void GPL3_671();
210 void GPL3_680();
211 void GPL3_690();
212 void GPL3_691();
213 void GPL3_692();
214 void GPL3_700();
215 void GPL3_701();
216 void GPL3_710();
217 void GPL3_711();
218 void GPL3_712();
219 void GPL3_720();
220 void GPL3_721();
221 void GPL3_730();
222 void GPL3_731();
223 void GPL3_740();
224 void GPL3_741();
225 void GPL3_760();
226 void GPL3_761();
227 void GPL3_780();
228 void GPL3_781();
229 void GPL3_790();
230 void GPL3_791();
231
232 void GPL4_900();
233 void GPL4_901();
234 void GPL4_991();
235 void GPL4_992();
236 void GPL4_992_demo();
237 void GPL4_993();
238 void GPL4_993_demo();
239 void GPL4_994();
240
241public:
242 int _statPlay;
243 int _oldStatPlay;
244 int _nodeNum;
245 int _oldNode; // CHECKME: Useless? If so, to be removed
246 int _nextNode;
247 int _robberyNode;
248 int16 _nodes[99];
249 int _currMap;
250 bool _oldEye;
251 bool _eye;
252 bool _oldHelp;
253 bool _help;
254 int _lastObstacle;
255 bool _lastObs;
256 int _inventory[19];
257 bool _replay;
258 bool _pouch;
259 bool _oldPouch;
260 bool _resurrect;
261 bool _tideCntl;
262 int _rtnNode;
263 int _health;
264 int _healthOld;
265 bool _fstFwd;
266 bool _spell1;
267 bool _spell2;
268 bool _spell3;
269
270 int _mapStat; // CHECKME: Useless? If so, to be removed
271
272 void enableUIButtons();
273 void disableUIButtons();
274 bool wound();
275 void GPLogic1_SubSP10();
276 void GPLogic1_SubSP121();
277 void GPLogic2_SubSP361();
278 bool chkDesertObstacles();
279 void increaseHealth();
280 void endCredits();
281 void gameHelp_Sub43C();
282 void initVariables();
283
284public:
285 explicit Logic(Kingdom::KingdomGame *vm);
286 virtual ~Logic(void) {}
287
288 void gameHelp();
289 void inventoryDel(int item);
290 void inventoryAdd(int item);
291 void executeOpcode();
292 void initPlay();
293 void switchAS();
294 void characterDeath();
295 void synchronize(Common::Serializer &s);
296};
297}
298
299#endif
Definition: serializer.h:80
Definition: kingdom.h:85
Definition: logic.h:29