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
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
|
#pragma once
#include <Windows.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
struct ISystem;
struct IEntitySystem
{
enum SinkEventSubscriptions : UINT32
{
OnBeforeSpawn = 1,
OnSpawn = 2,
OnRemove = 4,
OnReused = 8,
Last = OnReused,
Count = 4,
AllSinkEvents = ~0u,
};
virtual ~IEntitySystem() {}
virtual void Release() = 0;
virtual void PrePhysicsUpdate() = 0;
virtual void Update() = 0;
virtual void Reset() = 0;
virtual void Unload() = 0;
virtual void PurgeHeaps() = 0;
virtual void DeletePendingEntities() = 0;
virtual PVOID GetClassRegistry() = 0;
virtual PVOID GetReflectionRegistry() const = 0;
virtual PVOID SpawnEntity(void) = 0;
virtual bool InitEntity(void) = 0;
virtual PVOID GetEntity(void) const = 0;
virtual PVOID FindEntityByName(void) const = 0;
virtual void ReserveEntityId(void) = 0;
virtual int ReserveNewEntityId() = 0;
virtual void RemoveEntity(void) = 0;
virtual unsigned int GetNumEntities(void) const = 0;
virtual PVOID GetEntityIterator() = 0;
virtual void SendEventToAll(void) = 0;
virtual void OnLevelLoaded() = 0;
virtual void OnLevelGameplayStart() = 0;
virtual int QueryProximity(void) = 0;
virtual void ResizeProximityGrid(int, int) = 0;
virtual int GetPhysicalEntitiesInBox(void) const = 0;
virtual PVOID GetEntityFromPhysics(PVOID) const = 0;
virtual void AddSink(PVOID) = 0;
virtual void RemoveSink(PVOID) = 0;
virtual void PauseTimers(bool bPause, bool bResume = false) = 0;
virtual bool IsIDUsed(int) const = 0;
virtual void GetMemoryStatistics(PVOID) const = 0;
virtual ISystem* GetSystem() const = 0;
virtual bool ExtractArcheTypeLoadParams(void) const = 0;
virtual bool ExtractEntityLoadParams(void) const = 0;
virtual void BeginCreateEntities(int amtToCreate) = 0;
virtual bool CreateEntity(void) = 0;
virtual void EndCreateEntities() = 0;
virtual void LoadEntities(bool bIsLoadingLevelFile) = 0;
virtual void LoadEntities(bool bIsLoadingLevelFile, const int) = 0;
virtual void AddEntityLayerListener(PVOID, PVOID, const bool bCaseSensitive = true) = 0;
virtual void RemoveEntityLayerListener(PVOID, PVOID, const bool bCaseSensitive = true) = 0;
virtual int FindEntityByGuid(int) const = 0;
virtual PVOID GetAreaManager() const = 0;
virtual PVOID GetBreakableManager() const = 0;
virtual PVOID LoadEntityArchetype(void) = 0;
virtual PVOID LoadEntityArchetype(const char* sArchetype) = 0;
virtual void UnloadEntityArchetype(const char* sArchetype) = 0;
virtual PVOID CreateEntityArchetype(PVOID, const char* sArchetype) = 0;
virtual void RefreshEntityArchetypesInRegistry() = 0;
virtual void SetEntityArchetypeManagerExtension(PVOID) = 0;
virtual PVOID GetEntityArchetypeManagerExtension() const = 0;
virtual void Serialize(void) = 0;
virtual void SetNextSpawnId(int id) = 0;
virtual void ResetAreas() = 0;
virtual void UnloadAreas() = 0;
virtual void DumpEntities() = 0;
virtual void LockSpawning(bool lock) = 0;
virtual bool OnLoadLevel(const char* szLevelPath) = 0;
virtual PVOID AddLayer(const char* szName, const char* szParent, UINT16 id, bool bHasPhysics, int specs, bool bDefaultLoaded) = 0;
virtual void LoadLayers(const char* dataFile) = 0;
virtual void LinkLayerChildren() = 0;
virtual void AddEntityToLayer(const char* layer, int id) = 0;
virtual void RemoveEntityFromLayers(int id) = 0;
virtual void ClearLayers() = 0;
virtual void EnableDefaultLayers(bool isSerialized = true) = 0;
virtual void EnableLayer(const char* layer, bool isEnable, bool isSerialized = true) = 0;
virtual void EnableLayerSet(const char* const* pLayers, size_t layerCount, bool isSerialized = true, PVOID pListener = nullptr) = 0;
virtual void EnableScopedLayerSet(const char* const* pLayers, size_t layerCount, const char* const* pScopeLayers, size_t scopeLayerCount, bool isSerialized = true, PVOID pListener = nullptr) = 0;
virtual PVOID FindLayer(const char* szLayerName, const bool bCaseSensitive = true) const = 0;
virtual bool IsLayerEnabled(const char* layer, bool bMustBeLoaded, bool bCaseSensitive = true) const = 0;
virtual bool ShouldSerializedEntity(PVOID pEntity) = 0;
virtual void RegisterPhysicCallbacks() = 0;
virtual void UnregisterPhysicCallbacks() = 0;
virtual void PurgeDeferredCollisionEvents(bool bForce = false) = 0;
virtual void ResumePhysicsForSuppressedEntities(bool bWakeUp) = 0;
virtual void SaveInternalState(struct IDataWriteStream& writer) const = 0;
virtual void LoadInternalState(struct IDataReadStream& reader) = 0;
virtual int GetLayerId(const char* szLayerName) const = 0;
virtual const char* GetLayerName(int layerId) const = 0;
virtual int GetLayerChildCount(const char* szLayerName) const = 0;
virtual const char* GetLayerChild(const char* szLayerName, int childIdx) const = 0;
virtual int GetVisibleLayerIDs(UINT8* pLayerMask, const UINT32 maxCount) const = 0;
virtual void ToggleLayerVisibility(const char* layer, bool isEnabled, bool includeParent = true) = 0;
virtual void ToggleLayersBySubstring(const char* pSearchSubstring, const char* pExceptionSubstring, bool isEnable) = 0;
virtual PVOID CreateBSPTree3D(void) = 0;
virtual void ReleaseBSPTree3D(PVOID) = 0;
//! Represents a unique identifier for a static entity loaded from disk
//! Used to quickly identify static entities over the network, instead of needing to send over long GUIDs
using StaticEntityNetworkIdentifier = UINT16;
//! Queries an entity identifier from its static entity network id, most likely sent by the server
virtual int GetEntityIdFromStaticEntityNetworkId(StaticEntityNetworkIdentifier id) const = 0;
};
template<typename T, int N>
struct INumberArray
{
};
template<typename T, int N, typename Final>
struct INumberVector : INumberArray<T, N>
{
};
template<typename T> struct Vec2_tpl;
template<class F> struct Vec2_tpl
: INumberVector<F, 2, Vec2_tpl<F>>
{
F x, y;
};
typedef Vec2_tpl<float> Vec2;
template<typename F> struct Vec3_tpl;
template<typename F> struct Vec3_tpl
: INumberVector<F, 3, Vec3_tpl<F>>
{
F x, y, z;
};
typedef Vec3_tpl<float> Vec3;
struct SDrawTextInfo
{
//! One of EDrawTextFlags flags.
int flags;
//! Text color, (r,g,b,a) all members must be specified.
float color[4];
Vec2 scale;
PVOID pFont;
SDrawTextInfo()
{
flags = 0;
color[0] = color[1] = color[2] = color[3] = 1;
scale.x = 0.0f;
scale.y = 0.0f;
pFont = nullptr;
}
};
template<class T> struct Color_tpl
{
T r, g, b, a;
};
typedef Color_tpl<float> ColorF;
typedef Color_tpl<UINT8> ColorB;
enum EDrawTextFlags : UINT32
{
eDrawText_Default,
eDrawText_Center = 1,
eDrawText_Right = 2,
eDrawText_CenterV = 4,
eDrawText_Bottom = 8,
eDrawText_2D = 16,
eDrawText_FixedSize = 32,
eDrawText_800x600 = 64,
eDrawText_Monospace = 128,
eDrawText_Framed = 256,
eDrawText_DepthTest = 512,
eDrawText_IgnoreOverscan = 1024,
eDrawText_LegacyBehavior = 2048
};
class IRenderAuxGeom
{
public:
virtual ~IRenderAuxGeom() {}
virtual void SetRenderFlags(void) = 0;
virtual void GetRenderFlags() = 0;
virtual const void GetCamera() const = 0;
virtual void SetCurrentDisplayContext(void) = 0;
virtual void DrawPoint(void) = 0;
virtual void DrawPoints(void) = 0;
virtual void DrawPoints(int) = 0;
virtual void DrawLine(const Vec3& v0, const ColorB& colV0, const Vec3& v1, const ColorB& colV1, float thickness = 1.0f) = 0;
virtual void DrawLines(void) = 0;
virtual void DrawLines(int) = 0;
virtual void DrawLines(int, int) = 0;
virtual void DrawLines(int, int, int) = 0;
virtual void DrawLines(int, int, int, int) = 0;
virtual void DrawLineStrip(void) = 0;
virtual void DrawPolyline(void) = 0;
virtual void DrawPolyline(int) = 0;
virtual void DrawTriangle(void) = 0;
virtual void DrawTriangles(void) = 0;
virtual void DrawTriangles(int) = 0;
virtual void DrawTriangles(int, int) = 0;
virtual void DrawTriangles(int, int, int) = 0;
virtual void DrawBuffer(void) = 0;
virtual void BeginDrawBuffer(void) = 0;
virtual void EndDrawBuffer(void) = 0;
virtual void DrawAABB(void) = 0;
virtual void DrawAABBs(void) = 0;
virtual void DrawAABB(int) = 0;
virtual void DrawOBB(void) = 0;
virtual void DrawOBB(int) = 0;
virtual void DrawSphere(void) = 0;
virtual void DrawCone(void) = 0;
virtual void DrawCylinder(void) = 0;
virtual void DrawBone(void) = 0;
virtual void RenderTextQueued(Vec3 pos, const SDrawTextInfo& ti, const char* text) = 0;
virtual int PushMatrix(void) = 0;
virtual void PushImage(void) = 0;
virtual int SetTexture(void) { return -1; }
virtual PVOID GetMatrix() = 0;
virtual void SetMatrixIndex(void) = 0;
virtual void Submit(void) = 0;
virtual void SetOrthographicProjection(void) = 0;
void RenderText(Vec3 pos, const SDrawTextInfo& ti, const char* format, va_list args)
{
if (format)
{
char str[512];
vsnprintf(str, sizeof str, format, args);
RenderTextQueued(pos, ti, str);
}
}
void Draw2dLabel(float x, float y, float font_size, const ColorF& fColor, bool bCenter, const char* format, va_list args)
{
SDrawTextInfo ti;
ti.scale.x = font_size;
ti.scale.y = font_size;
ti.flags = eDrawText_2D | eDrawText_800x600 | eDrawText_FixedSize | ((bCenter) ? eDrawText_Center : 0);
ti.color[0] = fColor.r;
ti.color[1] = fColor.g;
ti.color[2] = fColor.b;
ti.color[3] = fColor.a;
Vec3 pos;
pos.x = x;
pos.y = y;
pos.z = 0.5f;
RenderText(pos, ti, format, args);
}
void Draw2dLabel(float x, float y, float font_size, const ColorF& fColor, bool bCenter, const char* label_text, ...)
{
va_list args;
va_start(args, label_text);
Draw2dLabel(x, y, font_size, fColor, bCenter, label_text, args);
va_end(args);
}
};
struct IRenderer//: public IRendererCallbackServer
{
virtual ~IRenderer() {}
virtual void fn_00(void) = 0;
virtual void fn_01(void) = 0;
virtual void fn_02(void) = 0;
virtual void fn_03(void) = 0;
virtual void fn_04(void) = 0;
virtual void fn_05(void) = 0;
virtual void fn_06(void) = 0;
virtual void fn_07(void) = 0;
virtual void fn_08(void) = 0;
virtual void fn_09(void) = 0;
virtual void fn_10(void) = 0;
virtual void fn_11(void) = 0;
virtual int GetFeatures() = 0;
virtual void fn_12(void) = 0;
virtual int GetNumGeomInstances() = 0;
virtual int GetNumGeomInstanceDrawCalls() = 0;
virtual int GetCurrentNumberOfDrawCalls() = 0;
virtual void fn_13(void) = 0;
virtual void fn_14(void) = 0;
virtual void fn_15(void) = 0;
virtual void fn_16(void) = 0;
virtual void fn_17(void) = 0;
virtual void fn_18(void) = 0;
virtual void fn_19(void) = 0;
virtual void fn_20(void) = 0;
virtual void fn_21(void) = 0;
virtual void fn_22(void) = 0;
virtual void fn_23(void) = 0;
virtual void fn_24(void) = 0;
virtual void fn_25(void) = 0;
virtual void fn_26(void) = 0;
virtual void fn_27(void) = 0;
virtual void fn_28(void) = 0;
virtual void fn_29(void) = 0;
virtual void fn_30(void) = 0;
virtual void fn_31(void) = 0;
virtual void fn_32(void) = 0;
virtual void fn_33(void) = 0;
virtual void fn_34(void) = 0;
virtual void fn_35(void) = 0;
virtual void fn_36(void) = 0;
virtual void fn_37(void) = 0;
virtual int GetWhiteTextureId() const = 0;
virtual void fn_38(void) = 0;
virtual void fn_39(void) = 0;
virtual int GetHeight() const = 0;
virtual int GetWidth() const = 0;
virtual float GetPixelAspectRatio() const = 0;
virtual int GetOverlayHeight() const = 0;
virtual int GetOverlayWidth() const = 0;
virtual void GetMemoryUsage(PVOID Sizer) = 0;
virtual void GetBandwidthStats(float* fBandwidthRequested) = 0;
virtual void fn_40(void) = 0;
virtual void fn_41(void) = 0;
virtual void fn_42(void) = 0;
virtual int GetColorBpp() = 0;
virtual int GetDepthBpp() = 0;
virtual int GetStencilBpp() = 0;
virtual bool IsStereoEnabled() const = 0;
virtual float GetNearestRangeMax() const = 0;
virtual bool ProjectToScreen(
float ptx, float pty, float ptz,
float* sx, float* sy, float* sz) = 0;
};
struct IGameFramework
{
virtual void RegisterFactory(const char* name, PVOID, bool isAI) = 0;
virtual void RegisterFactory(const char* name, PVOID*, bool isAI) = 0;
virtual void RegisterFactory(const char* name, PVOID**, bool isAI) = 0;
virtual void RegisterFactory(const char* name, PVOID***, bool isAI) = 0;
virtual void RegisterFactory(const char* name, PVOID****, bool isAI) = 0;
virtual void RegisterFactory(const char* name, PVOID*****, bool isAI) = 0;
virtual ~IGameFramework() {}
virtual void ShutDown() = 0;
virtual void PreSystemUpdate() = 0;
virtual bool PostSystemUpdate(bool hasFocus, int updateFlags) = 0;
virtual void PreFinalizeCamera(int updateFlags) = 0;
virtual void PreRender() = 0;
virtual void PostRender(int updateFlags) = 0;
virtual void PostRenderSubmit() = 0;
virtual void InitGameType(bool multiplayer, bool fromInit) = 0;
virtual void PrePhysicsUpdate() = 0;
virtual void Reset(bool clients) = 0;
virtual void PauseGame(bool pause, bool force, unsigned int nFadeOutInMS = 0) = 0;
virtual bool IsGamePaused() = 0;
virtual bool IsGameStarted() = 0;
virtual ISystem* GetISystem() = 0;
virtual PVOID GetILanQueryListener() = 0;
virtual PVOID GetIUIDraw() = 0;
virtual PVOID GetMannequinInterface() = 0;
virtual PVOID GetIGameObjectSystem() = 0;
virtual PVOID GetILevelSystem() = 0;
virtual PVOID GetIActorSystem() = 0;
virtual PVOID GetIItemSystem() = 0;
virtual PVOID GetIBreakReplicator() = 0;
virtual PVOID GetIActionMapManager() = 0;
virtual PVOID GetIViewSystem() = 0;
virtual PVOID GetIGameplayRecorder() = 0;
virtual PVOID GetIVehicleSystem() = 0;
virtual PVOID GetIGameRulesSystem() = 0;
virtual PVOID GetIFlowSystem() = 0;
virtual PVOID GetIGameTokenSystem() = 0;
virtual PVOID GetIEffectSystem() = 0;
virtual PVOID GetIMaterialEffects() = 0;
virtual PVOID GetIPlayerProfileManager() = 0;
virtual PVOID GetIRealTimeRemoteUpdate() = 0;
virtual PVOID GetIGameStatistics() = 0;
virtual PVOID GetICooperativeAnimationManager() = 0;
virtual PVOID GetICheckpointSystem() = 0;
virtual PVOID GetIForceFeedbackSystem() const = 0;
virtual PVOID GetICustomActionManager() const = 0;
virtual PVOID GetICustomEventManager() const = 0;
virtual PVOID GetIGameSessionHandler() = 0;
virtual PVOID GetISharedParamsManager() = 0;
virtual PVOID GetIGame() = 0;
virtual PVOID GetGameModuleHandle() const = 0;
virtual bool StartGameContext(const PVOID pGameStartParams) = 0;
virtual bool ChangeGameContext(const PVOID pGameContextParams) = 0;
virtual void EndGameContext() = 0;
virtual bool StartedGameContext() const = 0;
virtual bool StartingGameContext() const = 0;
virtual void SetGameSessionHandler(PVOID pSessionHandler) = 0;
virtual bool BlockingSpawnPlayer() = 0;
virtual void FlushBreakableObjects() = 0;
virtual void ResetBrokenGameObjects() = 0;
virtual void CloneBrokenObjectsAndRevertToStateAtTime(INT32 iFirstBreakEventIndex, UINT16* pBreakEventIndices, INT32* iNumBreakEvents, PVOID* outClonedNodes, INT32* iNumClonedNodes, PVOID renderNodeLookup) = 0;
virtual void ApplySingleProceduralBreakFromEventIndex(UINT16 uBreakEventIndex, PVOID renderNodeLookup) = 0;
virtual void UnhideBrokenObjectsByIndex(UINT16* ObjectIndicies, INT32 iNumObjectIndices) = 0;
virtual void InitEditor(PVOID pGameToEditor) = 0;
virtual void SetEditorLevel(const char* levelName, const char* levelFolder) = 0;
virtual void GetEditorLevel(char** levelName, char** levelFolder) = 0;
virtual void BeginLanQuery() = 0;
virtual void EndCurrentQuery() = 0;
virtual PVOID GetClientActor() const = 0;
virtual int GetClientActorId() const = 0;
virtual PVOID GetClientEntity() const = 0;
virtual int GetClientEntityId() const = 0;
virtual PVOID GetClientChannel() const = 0;
virtual int GetServerTime() = 0;
virtual UINT16 GetGameChannelId(PVOID pNetChannel) = 0;
virtual bool IsChannelOnHold(UINT16 channelId) = 0;
virtual PVOID GetNetChannel(UINT16 channelId) = 0;
virtual void SetServerChannelPlayerId(UINT16 channelId, int id) = 0;
virtual const PVOID GetEntitySchedulerProfiles(int* pEnt) = 0;
virtual PVOID GetGameObject(int id) = 0;
virtual bool GetNetworkSafeClassId(UINT16& id, const char* className) = 0;
virtual bool GetNetworkSafeClassName(char* className, size_t maxn, UINT16 id) = 0;
virtual PVOID QueryGameObjectExtension(int id, const char* name) = 0;
virtual PVOID GetITimeDemoRecorder() const = 0;
virtual PVOID SetITimeDemoRecorder(PVOID pRecorder) = 0;
virtual bool SaveGame(const char* path, bool quick, bool bForceImmediate, int reason, bool ignoreDelay = false, const char* checkPoint = NULL) = 0;
virtual int LoadGame(const char* path, bool quick = false, bool ignoreDelay = false) = 0;
virtual int CreateSaveGameName() = 0;
virtual void ScheduleEndLevel(const char* nextLevel) = 0;
virtual void ScheduleEndLevelNow(const char* nextLevel) = 0;
virtual void OnEditorSetGameMode(int iMode) = 0;
virtual bool IsEditing() = 0;
virtual bool IsInLevelLoad() = 0;
virtual bool IsLoadingSaveGame() = 0;
virtual bool IsInTimeDemo() = 0;
virtual bool IsTimeDemoRecording() = 0;
virtual void AllowSave(bool bAllow = true) = 0;
virtual void AllowLoad(bool bAllow = true) = 0;
virtual bool CanSave() = 0;
virtual bool CanLoad() = 0;
virtual PVOID GetSerializeHelper() const = 0;
virtual bool CanCheat() = 0;
virtual const char* GetLevelName() = 0;
virtual void GetAbsLevelPath(char* pPathBuffer, UINT32 pathBufferSize) = 0;
virtual PVOID GetIPersistantDebug() = 0;
virtual void AddBreakEventListener(PVOID pListener) = 0;
virtual void RemoveBreakEventListener(PVOID pListener) = 0;
virtual void RegisterListener(PVOID pGameFrameworkListener, const char* name, int eFrameworkListenerPriority) = 0;
virtual void UnregisterListener(PVOID pGameFrameworkListener) = 0;
virtual PVOID GetServerNetNub() = 0;
virtual PVOID GetIGameServerNub() = 0;
virtual PVOID GetClientNetNub() = 0;
virtual PVOID GetIGameClientNub() = 0;
virtual void SetGameGUID(const char* gameGUID) = 0;
virtual const char* GetGameGUID() = 0;
virtual PVOID GetNetContext() = 0;
virtual void GetMemoryUsage(PVOID pSizer) const = 0;
};
struct SSystemGlobalEnvironment {
UINT64 pDialogSystem;
UINT64 p3DEngine;
UINT64 pNetwork;
UINT64 pNetContext;
UINT64 pLobby;
UINT64 pScriptSystem;
UINT64 pPhysicalWorld;
UINT64 pFlowSystem;
UINT64 pInput;
UINT64 pStatoscope;
UINT64 pCryPak;
UINT64 pFileChangeMonitor;
UINT64 pParticleManager;
UINT64 pOpticsManager;
UINT64 pTimer;
UINT64 pCryFont;
IGameFramework* pGameFramework;
UINT64 pLocalMemoryUsage;
IEntitySystem* pEntitySystem;
UINT64 pConsole;
UINT64 pAudioSystem;
ISystem* pSystem;
UINT64 pCharacterManager;
UINT64 pAISystem;
UINT64 pLog;
UINT64 pCodeCheckpointMgr;
UINT64 pMovieSystem;
UINT64 pNameTable;
IRenderer* pRenderer;
IRenderAuxGeom* pAuxGeomRenderer;
UINT64 pHardwareMouse;
UINT64 pMaterialEffects;
UINT64 pJobManager;
UINT64 pOverloadSceneManager;
UINT64 pFlashUI;
UINT64 pUIFramework;
UINT64 pServiceNetwork;
UINT64 pRemoteCommandManager;
UINT64 pDynamicResponseSystem;
UINT64 pThreadManager;
UINT64 pScaleformHelper;
UINT64 pSchematyc;
UINT64 pSchematyc2;
UINT64 pReflection;
UINT64 pScriptCoreEnv;
UINT64 pScriptCoreRegistry;
UINT64 pUDR;
UINT64 pLiveCreateManager;
UINT64 pLiveCreateHost;
UINT64 pMonoRuntime;
UINT32 mMainThreadId;
UINT32 nMainFrameID;
UINT64 szCmdLine;
CHAR szDebugStatus[128];
BOOL bServer;
BOOL bMultiplayer;
BOOL bHostMigrating;
UCHAR padding_00;
UINT64 startProfilingSection;
UINT64 endProfilingSection;
UINT64 recordProfilingMarker;
BOOL bUnattendedMode;
BOOL bTesting;
BOOL bNoRandomSeed;
UCHAR padding_01;
UINT32 assertSettings;
UCHAR platformInfo[286];
UCHAR protectedFunctions[80];
BOOL bIsOutOfMemory;
BOOL bIsOutOfVideoMemory;
BOOL bDedicatedArbitrator;
BOOL bEditor;
BOOL bEditorGameMode;
BOOL bEditorSimulationMode;
BOOL bDedicated;
BOOL bClient;
BOOL m_isFMVPlaying;
BOOL m_isCutscenePlaying;
};
struct ISystem
{
virtual ~ISystem() {}
virtual PVOID GetCVarsWhiteListConfigSink() const = 0;
virtual SSystemGlobalEnvironment* GetGlobalEnvironment() = 0;
virtual PVOID GetUserCallback() const = 0;
virtual const char* GetRootFolder() const = 0;
virtual bool DoFrame(void) = 0;
virtual void RenderBegin(void) = 0;
virtual void RenderEnd(bool bRenderStats = true) = 0;
virtual bool Update(int updateFlags, int nPauseMode = 0) = 0;
virtual void RenderPhysicsHelpers() = 0;
virtual PVOID GetManualFrameStepController() const = 0;
virtual bool UpdateLoadtime() = 0;
virtual void SynchronousLoadingTick(const char* pFunc, int line) = 0;
virtual void RenderStatistics() = 0;
virtual void RenderPhysicsStatistics(PVOID pWorld) = 0;
virtual UINT32 GetUsedMemory() = 0;
virtual const char* GetUserName() = 0;
virtual UINT32 GetCPUFlags() = 0;
virtual int GetLogicalCPUCount() = 0;
virtual void DumpMemoryUsageStatistics(bool bUseKB = false) = 0;
virtual void Quit() = 0;
virtual void Relaunch(bool bRelaunch) = 0;
virtual bool IsQuitting() const = 0;
virtual bool IsShaderCacheGenMode() const = 0;
virtual void SerializingFile(int mode) = 0;
virtual int IsSerializingFile() const = 0;
virtual bool IsRelaunch() const = 0;
virtual void DisplayErrorMessage(const char* acMessage, float fTime, const float* pfColor = 0, bool bHardError = true) = 0;
virtual void FatalError(const char* sFormat, ...) = 0;
virtual void ReportBug(const char* sFormat, ...) = 0;
virtual void WarningV(int module, int severity, int flags, const char* file, const char* format, va_list args) = 0;
virtual void Warning(int module, int severity, int flags, const char* file, const char* format, ...) = 0;
virtual void WarningOnce(int module, int severity, int flags, const char* file, const char* format, ...) = 0;
virtual bool CheckLogVerbosity(int verbosity) = 0;
virtual bool IsUIFrameworkMode() { return false; }
virtual void FillRandomMT(UINT32* pOutWords, UINT32 numWords) = 0;
virtual PVOID GetRandomGenerator() = 0;
virtual PVOID GetIZLibCompressor() = 0;
virtual PVOID GetIZLibDecompressor() = 0;
virtual PVOID GetLZ4Decompressor() = 0;
virtual PVOID GetPerfHUD() = 0;
virtual PVOID GetMiniGUI() = 0;
virtual PVOID GetPlatformOS() = 0;
virtual PVOID GetINotificationNetwork() = 0;
virtual PVOID GetIHardwareMouse() = 0;
virtual PVOID GetIDialogSystem() = 0;
virtual PVOID GetIFlowSystem() = 0;
virtual PVOID GetIBudgetingSystem() = 0;
virtual PVOID GetINameTable() = 0;
virtual PVOID GetIDiskProfiler() = 0;
virtual PVOID GetProfilingSystem() = 0;
virtual PVOID GetLegacyProfilerInterface() = 0;
virtual PVOID GetIValidator() = 0;
virtual PVOID GetIPhysicsDebugRenderer() = 0;
virtual PVOID GetIPhysRenderer() = 0;
virtual PVOID GetIAnimationSystem() = 0;
virtual PVOID GetStreamEngine() = 0;
virtual PVOID GetICmdLine() = 0;
virtual PVOID GetILog() = 0;
virtual PVOID GetIPak() = 0;
virtual PVOID GetICryFont() = 0;
virtual IEntitySystem* GetIEntitySystem() = 0;
virtual PVOID GetIMemoryManager() = 0;
virtual PVOID GetAISystem() = 0;
virtual PVOID GetIMovieSystem() = 0;
virtual PVOID GetIPhysicalWorld() = 0;
virtual PVOID GetIAudioSystem() = 0;
virtual PVOID GetI3DEngine() = 0;
virtual PVOID GetIScriptSystem() = 0;
virtual PVOID GetIConsole() = 0;
virtual PVOID GetIRemoteConsole() = 0;
virtual PVOID GetIUserAnalyticsSystem() = 0;
virtual PVOID GetIPluginManager() = 0;
virtual PVOID GetIProjectManager() = 0;
virtual PVOID GetIUDR() = 0;
virtual PVOID GetIResourceManager() = 0;
virtual PVOID GetISystemEventDispatcher() = 0;
virtual PVOID GetIFileChangeMonitor() = 0;
virtual PVOID GetHWND() = 0;
virtual PVOID GetActiveHWND() = 0;
virtual PVOID GetINetwork() = 0;
virtual IRenderer* GetIRenderer() = 0;
virtual PVOID GetIInput() = 0;
virtual PVOID GetITimer() = 0;
virtual PVOID GetIThreadManager() = 0;
virtual PVOID GetIMonoEngineModule() = 0;
/* some more virtual functions */
};
|