-
Notifications
You must be signed in to change notification settings - Fork 66
/
defs.h
430 lines (351 loc) · 8.71 KB
/
defs.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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
///////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2004-2011 by The Allacrost Project
// All Rights Reserved
//
// This code is licensed under the GNU GPL version 2. It is free software
// and you may modify it and/or redistribute it under the terms of this license.
// See http://www.gnu.org/copyleft/gpl.html for details.
///////////////////////////////////////////////////////////////////////////////
/** ***************************************************************************
*** \file defs.h
*** \author Tyler Olsen, roots@allacrost.org
*** \brief Header file for forward declarations of classes and debug variables.
***
*** This file serves two purposes. The first purpose of this file is to forward
*** declare classes and shared variables in order to avoid problems with
*** recursive inclusion. The second purpose of this file is to declare
*** the function that contains all of the Lua binding code. This makes
*** the C++ engine code available for use in Lua scripts.
***
*** \note Pretty much every header file in the source tree will need to include
*** this file, with a few exceptions (utils.h is one). The only source file
*** that should need to include this file is defs.cpp
***
*** \note The commenting for all namespaces, variables, and classes declared in
*** this file can be found in the respective header files for where these
*** structures reside in. There are no doxygen comments for the classes and
*** namespaces found here.
***
*** \note You should not need to use the hoa_defs namespace unless you are
*** making the call to bind the engine to Lua.
*** **************************************************************************/
#ifndef __DEFS_HEADER__
#define __DEFS_HEADER__
////////////////////////////////////////////////////////////////////////////////
// Game Engine Declarations
////////////////////////////////////////////////////////////////////////////////
// Audio declarations, see src/engine/audio/
namespace hoa_audio
{
extern bool AUDIO_DEBUG;
class AudioEngine;
class AudioDescriptor;
class MusicDescriptor;
class SoundDescriptor;
namespace private_audio
{
class AudioCacheElement;
class AudioBuffer;
class AudioSource;
class AudioStream;
class AudioInput;
class WavFile;
class OggFile;
class AudioMemory;
class AudioEffect;
class FadeInEffect;
class FadeOutEffect;
}
}
// Video declarations, see src/engine/video/
namespace hoa_video
{
extern bool VIDEO_DEBUG;
class VideoEngine;
class Color;
class CoordSys;
class ScreenRect;
class FixedImageNode;
class VariableImageNode;
class ImageDescriptor;
class StillImage;
class AnimatedImage;
class CompositeImage;
class TextureController;
class TextSupervisor;
class FontGlyph;
class FontProperties;
class TextImage;
class Interpolator;
namespace private_video
{
class Context;
class TexSheet;
class FixedTexSheet;
class VariableTexSheet;
class FixedTexNode;
class VariableTexNode;
class ImageMemory;
class BaseTexture;
class ImageTexture;
class TextTexture;
class TextElement;
class AnimationFrame;
class ImageElement;
class ScreenFader;
class ShakeForce;
}
}
// Script declarations, see src/engine/script/
namespace hoa_script
{
extern bool SCRIPT_DEBUG;
class ScriptEngine;
class ScriptDescriptor;
class ReadScriptDescriptor;
class WriteScriptDescriptor;
class ModifyScriptDescriptor;
}
// Mode manager declarations, see src/engine/
namespace hoa_mode_manager
{
extern bool MODE_MANAGER_DEBUG;
class ModeEngine;
class GameMode;
class ParticleEffect;
class ParticleEffectDef;
class ParticleEmitter;
class EffectParameters;
class ParticleManager;
class ParticleSystem;
class ParticleSystemDef;
class Particle;
class ParticleVertex;
class ParticleTexCoord;
class ParticleKeyframe;
}
// Input declarations, see src/engine/
namespace hoa_input
{
extern bool INPUT_DEBUG;
class InputEngine;
}
// Settings declarations, see src/engine/
namespace hoa_system
{
extern bool SYSTEM_DEBUG;
class SystemEngine;
class Timer;
}
////////////////////////////////////////////////////////////////////////////////
// Common Code Declarations
////////////////////////////////////////////////////////////////////////////////
// Common declarations, see src/common
namespace hoa_common
{
extern bool COMMON_DEBUG;
class CommonDialogue;
class CommonDialogueOptions;
class CommonDialogueWindow;
class CommonDialogueSupervisor;
}
// Global declarations, see src/common/global/
namespace hoa_global
{
extern bool GLOBAL_DEBUG;
class GameGlobal;
class GlobalEventGroup;
class GlobalObject;
class GlobalItem;
class GlobalWeapon;
class GlobalArmor;
class GlobalShard;
class GlobalKeyItem;
class GlobalStatusEffect;
class GlobalElementalEffect;
class GlobalSkill;
class GlobalAttackPoint;
class GlobalActor;
class GlobalCharacter;
class GlobalEnemy;
class GlobalParty;
}
// GUI declarations, see src/common/gui
namespace hoa_gui
{
class GUISystem;
class MenuWindow;
class TextBox;
class OptionBox;
namespace private_gui
{
class GUIElement;
class GUIControl;
class MenuSkin;
class Option;
class OptionElement;
class OptionCellBounds;
}
}
////////////////////////////////////////////////////////////////////////////////
// Game Mode Declarations
////////////////////////////////////////////////////////////////////////////////
// Battle mode declarations, see src/modes/battle/
namespace hoa_battle
{
extern bool BATTLE_DEBUG;
class BattleMode;
namespace private_battle
{
class BattleMedia;
class SequenceSupervisor;
class BattleActor;
class BattleCharacter;
class BattleEnemy;
class BattleAction;
class SkillAction;
class ItemAction;
class BattleTarget;
class BattleItem;
class BattleSpeaker;
class BattleDialogue;
class DialogueSupervisor;
class BattleStatusEffect;
class EffectsSupervisor;
class IndicatorElement;
class IndicatorText;
class IndicatorImage;
class IndicatorSupervisor;
class ItemCommand;
class SkillCommand;
class CharacterCommand;
class CommandSupervisor;
class CharacterGrowth;
class FinishDefeatAssistant;
class FinishVictoryAssistant;
class FinishSupervisor;
}
}
// Boot mode declarations, see src/modes/boot/
namespace hoa_boot
{
extern bool BOOT_DEBUG;
class BootMode;
namespace private_boot
{
class BootMenu;
}
}
// Map mode declarations, see src/modes/map/
namespace hoa_map
{
extern bool MAP_DEBUG;
class MapMode;
namespace private_map
{
class TileSupervisor;
class MapTile;
class MapRectangle;
class MapFrame;
class PathNode;
class ObjectSupervisor;
class MapObject;
class PhysicalObject;
class TreasureObject;
class VirtualSprite;
class MapSprite;
class EnemySprite;
class DialogueSupervisor;
class SpriteDialogue;
class MapDialogueOptions;
class EventSupervisor;
class MapEvent;
class DialogueEvent;
class ScriptedEvent;
class ShopEvent;
class SoundEvent;
class MapTransitionEvent;
class JoinPartyEvent;
class BattleEncounterEvent;
class SpriteEvent;
class ScriptedSpriteEvent;
class ChangeDirectionSpriteEvent;
class PathMoveSpriteEvent;
class RandomMoveSpriteEvent;
class AnimateSpriteEvent;
class TreasureSupervisor;
class MapTreasure;
class ZoneSection;
class MapZone;
class ResidentZone;
class EnemyZone;
class ContextZone;
}
}
// Menu mode declarations, see src/modes/menu/
namespace hoa_menu
{
extern bool MENU_DEBUG;
class MenuMode;
}
// Pause mode declarations, see src/modes/
namespace hoa_pause
{
extern bool PAUSE_DEBUG;
class PauseMode;
}
// Scene mode declarations, see src/modes/
namespace hoa_scene
{
extern bool SCENE_DEBUG;
class SceneMode;
}
// Shop mode declarations, see src/modes/shop/
namespace hoa_shop
{
extern bool SHOP_DEBUG;
class ShopMode;
namespace private_shop
{
class ShopMedia;
class ShopInterface;
class ShopObject;
class ShopObjectViewer;
class ObjectListDisplay;
class RootInterface;
class CategoryDrawData;
class BuyInterface;
class BuyListDisplay;
class SellInterface;
class SellListDisplay;
class TradeInterface;
class ConfirmInterface;
class LeaveInterface;
}
}
////////////////////////////////////////////////////////////////////////////////
// Miscellaneous Declarations
////////////////////////////////////////////////////////////////////////////////
// Utils declarations, see src/utils.h
namespace hoa_utils
{
extern bool UTILS_DEBUG;
class ustring;
class Exception;
extern float RandomFloat();
}
////////////////////////////////////////////////////////////////////////////////
// Binding Declarations
////////////////////////////////////////////////////////////////////////////////
//! \brief Namespace which contains all binding functions
namespace hoa_defs
{
/** \brief Contains the binding code which makes the C++ engine available to Lua
*** This method should <b>only be called once</b>. It must be called after the
*** ScriptEngine is initialized, otherwise the application will crash.
**/
void BindEngineCode();
void BindCommonCode();
void BindModeCode();
} // namespace hoa_defs
#endif // __DEFS_HEADER__