ScummVM API documentation
Init.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/*
23 * Copyright (C) 2006-2010 - Frictional Games
24 *
25 * This file is part of Penumbra Overture.
26 */
27
28#ifndef GAME_INIT_H
29#define GAME_INIT_H
30
31#include "hpl1/engine/engine.h"
32
33using namespace hpl;
34
35class cMapHandler;
36class cButtonHandler;
37class cPlayer;
38class cGameScripts;
40class cInventory;
41class cFadeHandler;
42class cSaveHandler;
43class cTriggerHandler;
44class cAttackHandler;
45class cNotebook;
46class cNumericalPanel;
47class cDeathMenu;
48class cGraphicsHelper;
49class cEffectHandler;
50class cPlayerHands;
52class cRadioHandler;
53class cMapLoadText;
54class cPreMenu;
55class cCredits;
56class cDemoEndText;
57
58class cIntroStory;
59
60class cMainMenu;
61
62#include "hpl1/penumbra-overture/GameTypes.h"
63
64//--------------------------------------------------------
65
66//#define DEMO_VERSION
67
68//--------------------------------------------------------
69
70class cInit : public iUpdateable {
71public:
72 cInit();
73 ~cInit();
74
75 bool Init(tString saveToLoad);
76 void Run();
77 void Exit();
78
79 void OnStart();
80 void Update(float afTimeStep);
81 void Reset();
82
83 void ResetGame(bool abRunInitScript);
84
85 void RunScriptCommand(const tString &asCommand);
86
87 void CreateHardCodedPS(iParticleEmitterData *apPE);
88
89 void PreloadSoundEntityData(const tString &asFile);
90 void PreloadParticleSystem(const tString &asFile);
91
92 // Main objects
93 cConfigFile *mpConfig;
94 cConfigFile *mpGameConfig;
95 cGame *mpGame;
96 iScript *mpGlobalScript;
97
98 FontData *mpDefaultFont;
99
100 // Main properties
101 cVector2l mvScreenSize;
102 bool mbFullScreen;
103 bool mbVsync;
104 tString msGlobalScriptFile;
105 tString msLanguageFile;
106 bool mbLogResources;
107 bool mbShowPreMenu;
108 bool mbShowMenu;
109 bool mbShowIntro;
110 int mlFSAA;
111 eGameDifficulty mDifficulty;
112 // indicates if the game was already started
113 bool _firstStart;
114
115 int mlMaxSoundChannels;
116 int mlStreamUpdateFreq;
117 bool mbUseSoundHardware;
118 bool mbUseSoundThreading;
119 int mlMaxMonoChannelsHint;
120 int mlMaxStereoChannelsHint;
121 tString msDeviceName;
122
123 ePhysicsAccuracy mPhysicsAccuracy;
124 float mfPhysicsUpdatesPerSec;
125
126 tString msStartMap;
127 tString msStartLink;
128
129 bool mbSubtitles;
130 bool mbSimpleWeaponSwing;
131 bool mbDisablePersonalNotes;
132 bool mbAllowQuickSave;
133 bool _allowInputUnlock;
134 bool mbFlashItems;
135 bool mbSimpleSwingInOptions;
136 bool mbShowCrossHair;
137
138 tWString msErrorMessage;
139
140 bool mbDebugInteraction;
141 float mfMaxPhysicsTimeStep;
142 bool mbDestroyGraphics; // If graphics should be destroyed by the entities. Set to false at map change.
143 bool mbResetCache;
144 bool mbPostEffects;
145 int mlMaxSoundDataNum;
146 int mlMaxPSDataNum;
147
148 bool mbWeaponAttacking; // To see if it is a weapon that is dealing the damage.
149
150 // Game objects
151 cMapHandler *mpMapHandler;
152 cButtonHandler *mpButtonHandler;
153 cPlayer *mpPlayer;
154 // cGameScripts *mpGameScripts;
155 cGameMessageHandler *mpGameMessageHandler;
156 cInventory *mpInventory;
157 cFadeHandler *mpFadeHandler;
158 cSaveHandler *mpSaveHandler;
159 cTriggerHandler *mpTriggerHandler;
160 cAttackHandler *mpAttackHandler;
161 cNotebook *mpNotebook;
162 cNumericalPanel *mpNumericalPanel;
163 cDeathMenu *mpDeathMenu;
164 cGraphicsHelper *mpGraphicsHelper;
165 cEffectHandler *mpEffectHandler;
166 cPlayerHands *mpPlayerHands;
167 cGameMusicHandler *mpMusicHandler;
168 cRadioHandler *mpRadioHandler;
169 cMapLoadText *mpMapLoadText;
170 cPreMenu *mpPreMenu;
171 cCredits *mpCredits;
172 cDemoEndText *mpDemoEndText;
173
174 cMainMenu *mpMainMenu;
175
176 cIntroStory *mpIntroStory;
177};
178
179#endif // GAME_INIT_H
Definition: str.h:59
Definition: ustr.h:57
Definition: AttackHandler.h:85
Definition: ButtonHandler.h:40
Definition: Credits.h:41
Definition: DeathMenu.h:100
Definition: DemoEndText.h:40
Definition: EffectHandler.h:267
Definition: FadeHandler.h:37
Definition: GameMessageHandler.h:61
Definition: GameMusicHandler.h:64
Definition: GameScripts.h:38
Definition: GraphicsHelper.h:40
Definition: Init.h:70
Definition: IntroStory.h:91
Definition: Inventory.h:290
Definition: MainMenu.h:351
Definition: MapHandler.h:155
Definition: MapLoadText.h:41
Definition: Notebook.h:263
Definition: NumericalPanel.h:79
Definition: PlayerHands.h:159
Definition: Player.h:145
Definition: PreMenu.h:51
Definition: RadioHandler.h:56
Definition: SaveHandler.h:323
Definition: TriggerHandler.h:74
Definition: font_data.h:67
Definition: ConfigFile.h:38
Definition: Game.h:91
Definition: ParticleEmitter.h:203
Definition: Script.h:223
Definition: Updateable.h:35