OpenClonk
C4Game.h
Go to the documentation of this file.
1 /*
2  * OpenClonk, http://www.openclonk.org
3  *
4  * Copyright (c) 1998-2000, Matthes Bender
5  * Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de/
6  * Copyright (c) 2009-2016, The OpenClonk Team and contributors
7  *
8  * Distributed under the terms of the ISC license; see accompanying file
9  * "COPYING" for details.
10  *
11  * "Clonk" is a registered trademark of Matthes Bender, used with permission.
12  * See accompanying file "TRADEMARK" for details.
13  *
14  * To redistribute this file separately, substitute the full license texts
15  * for the above references.
16  */
17 
18 /* Main class to run the game */
19 
20 #ifndef INC_C4Game
21 #define INC_C4Game
22 
23 #include "c4group/C4Extra.h"
25 #include "gui/C4Scoreboard.h"
26 #include "landscape/C4PathFinder.h"
27 #include "landscape/C4Scenario.h"
29 
30 class C4ScriptGuiWindow;
31 
32 class C4Game
33 {
34 public:
35  // Initialization mode: Regular game start, section load or editor reload
36  enum InitMode
37  {
38  IM_Normal = 0,
41  };
42 private:
43  // used as StdCompiler-parameter
44  struct CompileSettings
45  {
46  InitMode init_mode;
47  bool fPlayers;
48  bool fExact;
49  bool fSync;
50 
51  CompileSettings(InitMode init_mode, bool fPlayers, bool fExact, bool fSync)
52  : init_mode(init_mode), fPlayers(fPlayers), fExact(fExact), fSync(fSync) { }
53  };
54 
55  // struct of keyboard set and indexed control key
56  struct C4KeySetCtrl
57  {
58  int32_t iKeySet, iCtrl;
59 
60  C4KeySetCtrl(int32_t iKeySet, int32_t iCtrl) : iKeySet(iKeySet), iCtrl(iCtrl) {}
61  };
62 
63 public:
64  C4Game();
65  ~C4Game();
66 
68  class C4ScenarioParameters &StartupScenarioParameters; // parameters given on command line or during startup UI
69  C4ClientList &Clients; // Shortcut
70  C4TeamList &Teams; // Shortcut
82  C4Control &Input; // shortcut
83 
95  std::unique_ptr<C4Network2Stats> pNetworkStatistics; // may be nullptr if no statistics are recorded
97  std::unique_ptr<C4FileMonitor> pFileMonitor;
98  std::unique_ptr<C4GameSec1Timer> pSec1Timer;
99  C4Value &GlobalSoundModifier; // contains proplist for sound modifier to be applied to all new sounds played
100 
108  std::unique_ptr<C4Network2Reference> pJoinReference;
111  int32_t FPS,cFPS;
112  int32_t HaltCount;
113  bool InitialPlayersJoined; // true after the InitializeFinal callback has been made
114  bool GameOver;
115  bool EvaluateOnAbort; // set in Scenario.txt, copied here because of sections
116  bool Evaluated;
119  bool fLobby;
120  int32_t iLobbyTimeout;
121  bool fObserve;
124  bool Record;
128  bool fPreinited{false}; // set after PreInit has been called; unset by Clear and Default
129  int32_t FrameCounter;
131  bool TimeGo;
132  int32_t Time;
133  int32_t StartTime;
135  int32_t RandomSeed;
136  bool GameGo;
137  bool FullSpeed;
138  int32_t FrameSkip; bool DoSkipFrame;
139  bool fResortAnyObject; // if set, object list will be checked for unsorted objects next frame
140  bool IsRunning; // (NoSave) if set, the game is running; if not, just the startup message board is painted
141  bool PointersDenumerated; // (NoSave) set after object pointers have been denumerated
142  size_t StartupLogPos{0}, QuitLogPos{0}; // current log positions when game was last started and cleared
143  bool fQuitWithError{false}; // if set, game shut down irregularly
144  // Show errors and allow debug commands?
145  bool DebugMode;
146  // next mission to be played after this one
148  // debug settings
150 
151  // Init and execution
152  void Clear();
153  void Abort(bool fApproved = false); // hard-quit on Esc+Y (/J/O)
154  void Evaluate();
155  void ShowGameOverDlg();
156  bool DoKeyboardInput(C4KeyCode vk_code, C4KeyEventType eEventType, bool fAlt, bool fCtrl, bool fShift, bool fRepeated, class C4GUI::Dialog *pForDialog=nullptr, bool fPlrCtrlOnly=false, int32_t iStrength=-1);
157  bool DoKeyboardInput(C4KeyCodeEx Key, C4KeyEventType eEventType, class C4GUI::Dialog *pForDialog=nullptr, bool fPlrCtrlOnly=false, int32_t iStrength=-1);
158  void DrawCrewOverheadText(C4TargetFacet &cgo, int32_t iPlayer);
159  void FixRandom(uint64_t iSeed);
160  bool Init();
161  bool PreInit();
162  void SetScenarioFilename(const char*);
163  bool HasScenario() { return *DirectJoinAddress || *ScenarioFilename || RecordStream.getSize(); }
164  bool Execute();
165  C4Player *JoinPlayer(const char *szFilename, int32_t iAtClient, const char *szAtClientName, C4PlayerInfo *pInfo);
166  void OnPlayerJoinFinished();
167  bool DoGameOver();
168  bool CanQuickSave();
169  bool QuickSave(const char *strFilename, const char *strTitle, bool fForceSave=false);
170  void SetInitProgress(float fToProgress);
171  void OnResolutionChanged(unsigned int iXRes, unsigned int iYRes); // update anything that's dependant on screen resolution
173  void InitFullscreenComponents(bool fRunning);
174  bool ToggleChat();
175  // Pause
176  bool TogglePause();
177  bool Pause();
178  bool Unpause();
179  bool IsPaused();
180  // Network
181  void Synchronize(bool fSavePlayerFiles);
182  void SyncClearance();
183  // Editing
184  bool DropFile(const char *szFilename, float iX, float iY);
185  bool DropDef(C4ID id, float iX, float iY);
186  bool ReloadFile(const char *szPath);
187  bool ReloadDef(C4ID id);
188  bool ReloadParticle(const char *szName);
189  // Object functions
190  void ClearPointers(C4Object *cobj);
191  C4Object *CreateObject(C4PropList * type, C4Object *pCreator, int32_t owner=NO_OWNER,
192  int32_t x=50, int32_t y=50, int32_t r=0, bool grow_from_center=false,
193  C4Real xdir=Fix0, C4Real ydir=Fix0, C4Real rdir=Fix0, int32_t iController=NO_OWNER);
194  C4Object *CreateObject(C4ID type, C4Object *pCreator, int32_t owner=NO_OWNER,
195  int32_t x=50, int32_t y=50, int32_t r=0, bool grow_from_center=false,
196  C4Real xdir=Fix0, C4Real ydir=Fix0, C4Real rdir=Fix0, int32_t iController=NO_OWNER);
198  C4Object *pCreator,
199  int32_t owner,
200  int32_t ctx=0, int32_t bty=0,
201  int32_t con=1, bool terrain=false);
202  C4Object *CreateInfoObject(C4ObjectInfo *cinf, int32_t owner,
203  int32_t tx=50, int32_t ty=50);
204  C4Object *FindConstuctionSiteBlock(int32_t tx, int32_t ty, int32_t wdt, int32_t hgt);
205  C4Object *FindObject(C4Def * pDef,
206  int32_t iX=0, int32_t iY=0, int32_t iWdt=0, int32_t iHgt=0,
207  DWORD ocf=OCF_All,
208  C4Object *pFindNext=nullptr);
209  C4Object *FindVisObject( // find object in view at pos, regarding parallaxity and visibility (but not distance)
210  float tx, float ty, int32_t iPlr, const C4Facet &fctViewportGame, const C4Facet &fctViewportGUI,
211  float iX, float iY,
212  DWORD category,
213  float gui_x, float gui_y);
214  int32_t ObjectCount(C4ID id);
215  void CastObjects(C4ID id, C4Object *pCreator, int32_t num, int32_t level, int32_t tx, int32_t ty, int32_t iOwner=NO_OWNER, int32_t iController=NO_OWNER, C4ValueArray *out_objects=nullptr);
216  C4Object *PlaceVegetation(C4PropList *def, int32_t iX, int32_t iY, int32_t iWdt, int32_t iHgt, int32_t iGrowth, C4PropList *shape_proplist, C4PropList * out_pos_proplist);
218  C4Value GRBroadcast(const char *szFunction, C4AulParSet *pPars = nullptr, bool fPassError=false, bool fRejectTest=false); // call function in scenario script and all goals/rules/environment objects
219 
220  bool LoadScenarioSection(const char *szSection, DWORD dwFlags);
221  bool CreateSectionFromTempFile(const char *section_name, const char *temp_filename);
222 
223  bool DrawTextSpecImage(C4Facet& fctTarget, const char *szSpec, class C4DrawTransform* pTransform, uint32_t dwClr=0xff);
224  float GetTextSpecImageAspect(const char* szSpec);
225  bool DrawPropListSpecImage(C4Facet& fctTarget, C4PropList *pSpec);
226  bool SpeedUp();
227  bool SlowDown();
228  bool InitKeyboard(); // register main keyboard input functions
229  void UpdateLanguage();
231  bool InitPlayerControlUserSettings(); // merge player control default settings and config overloads into user setting
232  void SetDefaultGamma();
233 
234  std::unique_ptr<C4ScriptGuiWindow> ScriptGuiRoot;
235 protected:
236  void Default();
237  void InitInEarth();
238  void InitVegetation();
239  void InitAnimals();
240  void InitGoals();
241  void InitRules();
242  void InitValueOverloads();
243  void InitEnvironment();
244  void CloseScenario();
245  void DeleteObjects(bool fDeleteInactive);
246  void ExecObjects();
247  void Ticks();
248  bool CheckObjectEnumeration();
249  bool LoadScenarioComponents();
250 public:
251  bool LoadAdditionalSystemGroup(class C4Group &parent_group);
252  bool SaveGameTitle(C4Group &hGroup);
253 protected:
254  bool InitGame(C4Group &hGroup, InitMode init_mode, bool fLoadSky, C4ValueNumbers *);
255  bool InitGameFinal(InitMode init_mode);
256  bool InitNetworkFromAddress(const char *szAddress);
257  bool InitNetworkFromReferenceFile(const char *temp_filename);
258  bool InitNetworkFromReference(const C4Network2Reference &Reference);
259  bool InitNetworkHost();
260  bool InitControl();
261  bool InitScriptEngine();
262  bool LinkScriptEngine();
263  bool ReLinkScriptEngine();
264  bool InitPlayers(C4ValueNumbers *);
265  bool OpenScenario();
266  bool InitDefs();
267  bool InitMaterialTexture();
268  bool GameOverCheck();
269  bool PlaceInEarth(C4ID id);
270 public:
271  void CompileFunc(StdCompiler *pComp, CompileSettings comp, C4ValueNumbers *);
272  bool SaveData(C4Group &hGroup, bool fSaveSection, bool fSaveExact, bool fSaveSync, C4ValueNumbers *);
273 protected:
274  bool CompileRuntimeData(C4Group &hGroup, InitMode init_mode, bool exact, bool sync, C4ValueNumbers *);
275 
276  // Object function internals
277  C4Object *NewObject( C4PropList *ndef, C4Object *pCreator,
278  int32_t owner, C4ObjectInfo *info,
279  int32_t tx, int32_t ty, int32_t tr,
280  C4Real xdir, C4Real ydir, C4Real rdir,
281  int32_t con, int32_t iController, bool grow_from_center);
282  void ClearObjectPtrs(C4Object *tptr);
283  void ObjectRemovalCheck();
284 
285  bool ToggleDebugMode(); // dbg modeon/off if allowed
286  bool ActivateMenu(const char *szCommand); // exec given menu command for first local player
287 
288 public:
289  bool ToggleChart(); // chart dlg on/off
290  void SetGlobalSoundModifier(C4PropList *modifier_props);
291 
292  // Localized strings in editor props
293  C4String *GetTranslatedString(const class C4Value &input_string, C4Value *selected_language, bool fail_silently) const;
295 
296  static constexpr const char * DirectJoinFilePrefix = "file:";
297 };
298 
299 extern C4Game Game;
300 
301 // a global wrapper
302 inline StdStrBuf GetKeyboardInputName(const char *szKeyName, bool fShort = false, int32_t iIndex = 0)
303 {
304  return Game.KeyboardInput.GetKeyCodeNameByKeyName(szKeyName, fShort, iIndex);
305 }
306 
307 
308 #endif
bool DoGameOver()
Definition: C4Game.cpp:3098
void SetInitProgress(float fToProgress)
Definition: C4Game.cpp:3386
void InitValueOverloads()
Definition: C4Game.cpp:3347
C4Group * pParentGroup
Definition: C4Game.h:88
bool IsRunning
Definition: C4Game.h:140
bool InitMaterialTexture()
Definition: C4Game.cpp:807
bool InitGame(C4Group &hGroup, InitMode init_mode, bool fLoadSky, C4ValueNumbers *)
Definition: C4Game.cpp:2101
bool CreateSectionFromTempFile(const char *section_name, const char *temp_filename)
Definition: C4Game.cpp:3426
C4PlayerInfoList & RestorePlayerInfos
Definition: C4Game.h:72
int32_t iLobbyTimeout
Definition: C4Game.h:120
C4Game Game
Definition: C4Globals.cpp:52
char ScenarioFilename[_MAX_PATH+1]
Definition: C4Game.h:102
C4Object * CreateObjectConstruction(C4PropList *type, C4Object *pCreator, int32_t owner, int32_t ctx=0, int32_t bty=0, int32_t con=1, bool terrain=false)
Definition: C4Game.cpp:1102
StdStrBuf TempScenarioFile
Definition: C4Game.h:127
int32_t RandomSeed
Definition: C4Game.h:135
int32_t iTick255
Definition: C4Game.h:130
bool ToggleChat()
Definition: C4Game.cpp:3848
C4Object * NewObject(C4PropList *ndef, C4Object *pCreator, int32_t owner, C4ObjectInfo *info, int32_t tx, int32_t ty, int32_t tr, C4Real xdir, C4Real ydir, C4Real rdir, int32_t con, int32_t iController, bool grow_from_center)
Definition: C4Game.cpp:1011
InitMode
Definition: C4Game.h:36
std::unique_ptr< C4Network2Reference > pJoinReference
Definition: C4Game.h:108
StdStrBuf RecordDumpFile
Definition: C4Game.h:125
void InitEnvironment()
Definition: C4Game.cpp:3356
C4Value & GlobalSoundModifier
Definition: C4Game.h:99
StdCopyStrBuf NextMission
Definition: C4Game.h:147
float GetTextSpecImageAspect(const char *szSpec)
Definition: C4Game.cpp:3766
int32_t iTick5
Definition: C4Game.h:130
void SyncClearance()
Definition: C4Game.cpp:3132
~C4Game()
Definition: C4Game.cpp:114
int32_t iTick35
Definition: C4Game.h:130
C4LangStringTable MainSysLangStringTable
Definition: C4Game.h:80
C4Scenario C4S
Definition: C4Game.h:74
C4GroupSet GroupSet
Definition: C4Game.h:87
StdCopyStrBuf ScenarioTitle
Definition: C4Game.h:103
static constexpr const char * DirectJoinFilePrefix
Definition: C4Game.h:296
void InitGoals()
Definition: C4Game.cpp:3376
C4ComponentHost GameText
Definition: C4Game.h:79
void OnPlayerJoinFinished()
Definition: C4Game.cpp:3083
bool GameOverDlgShown
Definition: C4Game.h:117
bool EvaluateOnAbort
Definition: C4Game.h:115
char DirectJoinTempFilename[_MAX_PATH+1]
Definition: C4Game.h:107
int32_t ObjectCount(C4ID id)
Definition: C4Game.cpp:1289
StdStrBuf DebugHost
Definition: C4Game.h:149
bool Execute()
Definition: C4Game.cpp:709
C4PropList * AllocateTranslatedString()
Definition: C4Game.cpp:3970
int32_t LastInitProgress
Definition: C4Game.h:134
class C4ScenarioObjectsScriptHost * pScenarioObjectsScript
Definition: C4Game.h:90
C4Scoreboard Scoreboard
Definition: C4Game.h:94
bool LoadScenarioSection(const char *szSection, DWORD dwFlags)
Definition: C4Game.cpp:3468
#define _MAX_PATH
bool DoSkipFrame
Definition: C4Game.h:138
class C4ScenarioParameterDefs & ScenarioParameterDefs
Definition: C4Game.h:75
StdStrBuf PlayerNames
Definition: C4Game.h:81
bool SaveData(C4Group &hGroup, bool fSaveSection, bool fSaveExact, bool fSaveSync, C4ValueNumbers *)
Definition: C4Game.cpp:1776
C4ComponentHost Names
Definition: C4Game.h:78
bool InitPlayers(C4ValueNumbers *)
Definition: C4Game.cpp:2451
void CastObjects(C4ID id, C4Object *pCreator, int32_t num, int32_t level, int32_t tx, int32_t ty, int32_t iOwner=NO_OWNER, int32_t iController=NO_OWNER, C4ValueArray *out_objects=nullptr)
Definition: C4Game.cpp:1411
StdStrBuf DebugPassword
Definition: C4Game.h:149
C4GameParameters & Parameters
Definition: C4Game.h:67
C4Player * JoinPlayer(const char *szFilename, int32_t iAtClient, const char *szAtClientName, C4PlayerInfo *pInfo)
Definition: C4Game.cpp:3059
bool InitNetworkFromReferenceFile(const char *temp_filename)
Definition: C4Game.cpp:3214
bool OpenScenario()
Definition: C4Game.cpp:165
C4TeamList & Teams
Definition: C4Game.h:70
bool InitNetworkHost()
Definition: C4Game.cpp:3257
bool DoKeyboardInput(C4KeyCode vk_code, C4KeyEventType eEventType, bool fAlt, bool fCtrl, bool fShift, bool fRepeated, class C4GUI::Dialog *pForDialog=nullptr, bool fPlrCtrlOnly=false, int32_t iStrength=-1)
Definition: C4Game.cpp:1866
bool SlowDown()
Definition: C4Game.cpp:3839
bool ReLinkScriptEngine()
Definition: C4Game.cpp:2438
bool PlaceInEarth(C4ID id)
Definition: C4Game.cpp:2605
Definition: C4Real.h:58
bool Pause()
Definition: C4Game.cpp:950
size_t StartupLogPos
Definition: C4Game.h:142
StdCopyStrBuf NextMissionDesc
Definition: C4Game.h:147
C4LangStringTable ScenarioLangStringTable
Definition: C4Game.h:80
bool InitControl()
Definition: C4Game.cpp:2536
int32_t InitProgress
Definition: C4Game.h:134
void FixRandom(uint64_t iSeed)
Definition: C4Game.cpp:3093
void ShowGameOverDlg()
Definition: C4Game.cpp:3116
StdStrBuf GetKeyCodeNameByKeyName(const char *szKeyName, bool fShort=false, int32_t iIndex=0)
bool Init()
Definition: C4Game.cpp:328
uint16_t DebugPort
Definition: C4Game.h:149
int32_t FrameCounter
Definition: C4Game.h:129
bool LoadScenarioComponents()
Definition: C4Game.cpp:2856
void ObjectRemovalCheck()
Definition: C4Game.cpp:1309
std::unique_ptr< C4FileMonitor > pFileMonitor
Definition: C4Game.h:97
void Ticks()
Definition: C4Game.cpp:1637
C4Object * FindObject(C4Def *pDef, int32_t iX=0, int32_t iY=0, int32_t iWdt=0, int32_t iHgt=0, DWORD ocf=OCF_All, C4Object *pFindNext=nullptr)
Definition: C4Game.cpp:1158
int32_t StartTime
Definition: C4Game.h:133
bool CheckObjectEnumeration()
Definition: C4Game.cpp:3298
int32_t FrameSkip
Definition: C4Game.h:138
int32_t iTick1000
Definition: C4Game.h:130
bool GameOverCheck()
Definition: C4Game.cpp:670
bool fPreinited
Definition: C4Game.h:128
bool GameOver
Definition: C4Game.h:114
bool CompileRuntimeData(C4Group &hGroup, InitMode init_mode, bool exact, bool sync, C4ValueNumbers *)
Definition: C4Game.cpp:1754
int32_t FPS
Definition: C4Game.h:111
C4KeyboardInput & KeyboardInput
Definition: C4Game.h:96
bool SaveGameTitle(C4Group &hGroup)
Definition: C4Game.cpp:1830
bool ReloadParticle(const char *szName)
Definition: C4Game.cpp:2074
void CompileFunc(StdCompiler *pComp, CompileSettings comp, C4ValueNumbers *)
Definition: C4Game.cpp:1661
void UpdateLanguage()
Definition: C4Game.cpp:3027
bool QuickSave(const char *strFilename, const char *strTitle, bool fForceSave=false)
Definition: C4Game.cpp:1940
C4Group ScenarioFile
Definition: C4Game.h:86
void Abort(bool fApproved=false)
Definition: C4Game.cpp:3667
bool Unpause()
Definition: C4Game.cpp:976
bool InitialPlayersJoined
Definition: C4Game.h:113
int32_t Time
Definition: C4Game.h:132
C4Object * PlaceAnimal(C4PropList *def)
Definition: C4Game.cpp:2775
void Default()
Definition: C4Game.cpp:1444
C4Game()
Definition: C4Game.cpp:97
C4ScenarioSection * pScenarioSections
Definition: C4Game.h:91
bool fQuitWithError
Definition: C4Game.h:143
Definition: C4Def.h:98
C4TransferZones TransferZones
Definition: C4Game.h:85
const unsigned int C4MaxName
const int NO_OWNER
Definition: C4Constants.h:137
bool InitDefs()
Definition: C4Game.cpp:120
StdCopyStrBuf NextMissionText
Definition: C4Game.h:147
C4Object * FindConstuctionSiteBlock(int32_t tx, int32_t ty, int32_t wdt, int32_t hgt)
Definition: C4Game.cpp:1142
bool ReloadDef(C4ID id)
Definition: C4Game.cpp:2016
void SetGlobalSoundModifier(C4PropList *modifier_props)
Definition: C4Game.cpp:3880
int32_t LastInitProgressShowTime
Definition: C4Game.h:134
int32_t iTick3
Definition: C4Game.h:130
bool InitNetworkFromReference(const C4Network2Reference &Reference)
Definition: C4Game.cpp:3232
void InitInEarth()
Definition: C4Game.cpp:2810
bool CanQuickSave()
Definition: C4Game.cpp:1931
bool ReloadFile(const char *szPath)
Definition: C4Game.cpp:1999
bool DropDef(C4ID id, float iX, float iY)
Definition: C4Game.cpp:1394
bool NetworkActive
Definition: C4Game.h:123
C4PlayerControlDefs PlayerControlDefs
Definition: C4Game.h:92
Definition: C4Id.h:25
C4RoundResults & RoundResults
Definition: C4Game.h:73
void SetScenarioFilename(const char *)
Definition: C4Game.cpp:528
int32_t iTick10
Definition: C4Game.h:130
bool ToggleDebugMode()
Definition: C4Game.cpp:3640
bool PreInit()
Definition: C4Game.cpp:282
void SetDefaultGamma()
Definition: C4Game.cpp:3867
size_t getSize() const
Definition: StdBuf.h:444
bool fObserve
Definition: C4Game.h:121
C4Control & Input
Definition: C4Game.h:82
Definition: C4Game.h:32
C4String * GetTranslatedString(const class C4Value &input_string, C4Value *selected_language, bool fail_silently) const
Definition: C4Game.cpp:3897
bool fResortAnyObject
Definition: C4Game.h:139
bool IsPaused()
Definition: C4Game.cpp:1002
bool InitNetworkFromAddress(const char *szAddress)
Definition: C4Game.cpp:3161
void ClearPointers(C4Object *cobj)
Definition: C4Game.cpp:921
int32_t StartupPlayerCount
Definition: C4Game.h:109
C4PlayerInfoList & PlayerInfos
Definition: C4Game.h:71
void InitFullscreenComponents(bool fRunning)
Definition: C4Game.cpp:785
size_t QuitLogPos
Definition: C4Game.h:142
bool FullSpeed
Definition: C4Game.h:137
C4KeyEventType
bool PointersDenumerated
Definition: C4Game.h:141
void OnResolutionChanged(unsigned int iXRes, unsigned int iYRes)
Definition: C4Game.cpp:3407
char PlayerFilenames[20 *_MAX_PATH+1]
Definition: C4Game.h:104
bool Evaluated
Definition: C4Game.h:116
bool LinkScriptEngine()
Definition: C4Game.cpp:2417
void InitRules()
Definition: C4Game.cpp:3366
bool HasScenario()
Definition: C4Game.h:163
class C4ScenarioParameters & StartupScenarioParameters
Definition: C4Game.h:68
bool InitKeyboard()
Definition: C4Game.cpp:2933
C4PathFinder PathFinder
Definition: C4Game.h:84
void ExecObjects()
Definition: C4Game.cpp:1321
const uint32_t OCF_All
Definition: C4Constants.h:78
bool InitPlayerControlUserSettings()
Definition: C4Game.cpp:3049
void DeleteObjects(bool fDeleteInactive)
Definition: C4Game.cpp:1049
void Synchronize(bool fSavePlayerFiles)
Definition: C4Game.cpp:3137
C4Value GRBroadcast(const char *szFunction, C4AulParSet *pPars=nullptr, bool fPassError=false, bool fRejectTest=false)
Definition: C4Game.cpp:3853
bool SpeedUp()
Definition: C4Game.cpp:3829
bool GameGo
Definition: C4Game.h:136
C4ClientList & Clients
Definition: C4Game.h:69
bool Record
Definition: C4Game.h:124
StdStrBuf RecordStream
Definition: C4Game.h:126
bool ToggleChart()
Definition: C4Game.cpp:3661
char DefinitionFilenames[20 *_MAX_PATH+1]
Definition: C4Game.h:105
std::unique_ptr< C4GameSec1Timer > pSec1Timer
Definition: C4Game.h:98
void InitAnimals()
Definition: C4Game.cpp:2841
void InitVegetation()
Definition: C4Game.cpp:2826
int32_t StartupTeamCount
Definition: C4Game.h:110
C4ComponentHost Info
Definition: C4Game.h:76
bool TogglePause()
Definition: C4Game.cpp:942
bool fReferenceDefinitionOverride
Definition: C4Game.h:122
int32_t HaltCount
Definition: C4Game.h:112
bool LoadAdditionalSystemGroup(class C4Group &parent_group)
Definition: C4Game.cpp:2887
void Clear()
Definition: C4Game.cpp:537
bool DropFile(const char *szFilename, float iX, float iY)
Definition: C4Game.cpp:1373
bool InitScriptEngine()
Definition: C4Game.cpp:2376
bool InitGameFinal(InitMode init_mode)
Definition: C4Game.cpp:2330
std::unique_ptr< C4ScriptGuiWindow > ScriptGuiRoot
Definition: C4Game.h:234
char DirectJoinAddress[_MAX_PATH+1]
Definition: C4Game.h:106
bool InitPlayerControlSettings()
Definition: C4Game.cpp:3033
int32_t cFPS
Definition: C4Game.h:111
C4Object * FindVisObject(float tx, float ty, int32_t iPlr, const C4Facet &fctViewportGame, const C4Facet &fctViewportGUI, float iX, float iY, DWORD category, float gui_x, float gui_y)
Definition: C4Game.cpp:1225
C4Extra Extra
Definition: C4Game.h:89
std::unique_ptr< C4Network2Stats > pNetworkStatistics
Definition: C4Game.h:95
uint32_t DWORD
void ClearObjectPtrs(C4Object *tptr)
Definition: C4Game.cpp:905
bool DrawPropListSpecImage(C4Facet &fctTarget, C4PropList *pSpec)
Definition: C4Game.cpp:3798
bool fScriptCreatedObjects
Definition: C4Game.h:118
bool fLobby
Definition: C4Game.h:119
C4PlayerControlAssignmentSets PlayerControlDefaultAssignmentSets
Definition: C4Game.h:93
void CloseScenario()
Definition: C4Game.cpp:263
char CurrentScenarioSection[C4MaxName+1]
Definition: C4Game.h:101
C4PlayerControlAssignmentSets PlayerControlUserAssignmentSets
Definition: C4Game.h:93
unsigned long C4KeyCode
C4Object * PlaceVegetation(C4PropList *def, int32_t iX, int32_t iY, int32_t iWdt, int32_t iHgt, int32_t iGrowth, C4PropList *shape_proplist, C4PropList *out_pos_proplist)
Definition: C4Game.cpp:2652
StdStrBuf GetKeyboardInputName(const char *szKeyName, bool fShort=false, int32_t iIndex=0)
Definition: C4Game.h:302
void Evaluate()
Definition: C4Game.cpp:1504
C4Object * CreateInfoObject(C4ObjectInfo *cinf, int32_t owner, int32_t tx=50, int32_t ty=50)
Definition: C4Game.cpp:1086
C4ComponentHost Title
Definition: C4Game.h:77
C4ScenarioSection * pCurrentScenarioSection
Definition: C4Game.h:91
bool TimeGo
Definition: C4Game.h:131
bool DebugMode
Definition: C4Game.h:145
C4Object * CreateObject(C4PropList *type, C4Object *pCreator, int32_t owner=NO_OWNER, int32_t x=50, int32_t y=50, int32_t r=0, bool grow_from_center=false, C4Real xdir=Fix0, C4Real ydir=Fix0, C4Real rdir=Fix0, int32_t iController=NO_OWNER)
Definition: C4Game.cpp:1072
bool ActivateMenu(const char *szCommand)
Definition: C4Game.cpp:3650
void OnKeyboardLayoutChanged()
Definition: C4Game.cpp:3419
void DrawCrewOverheadText(C4TargetFacet &cgo, int32_t iPlayer)
Definition: C4Game.cpp:1533
bool DrawTextSpecImage(C4Facet &fctTarget, const char *szSpec, class C4DrawTransform *pTransform, uint32_t dwClr=0xff)
Definition: C4Game.cpp:3744
const C4Real Fix0
Definition: C4Real.h:312
int DebugWait
Definition: C4Game.h:149
int32_t iTick2
Definition: C4Game.h:130