-
Notifications
You must be signed in to change notification settings - Fork 1
/
EditorGame.h
83 lines (66 loc) · 2.65 KB
/
EditorGame.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
/*************************************************************************
Crytek Source File.
Copyright (C), Crytek Studios, 2001-2004.
-------------------------------------------------------------------------
$Id$
$DateTime$
Description: Implements the Editor->Game communication interface.
-------------------------------------------------------------------------
History:
- 30:8:2004 11:17 : Created by Marcio Martins
*************************************************************************/
#ifndef __EDITORGAME_H__
#define __EDITORGAME_H__
#if _MSC_VER > 1000
# pragma once
#endif
#include <IGameRef.h>
#include <IEditorGame.h>
struct IGameStartup;
class CEquipmentSystemInterface;
class CEditorGame :
public IEditorGame
{
public:
CEditorGame();
virtual ~CEditorGame();
VIRTUAL bool Init(ISystem *pSystem,IGameToEditorInterface *pGameToEditorInterface);
VIRTUAL int Update(bool haveFocus, unsigned int updateFlags);
VIRTUAL void Shutdown();
VIRTUAL bool SetGameMode(bool bGameMode);
VIRTUAL IEntity * GetPlayer();
VIRTUAL void SetPlayerPosAng(Vec3 pos,Vec3 viewDir);
VIRTUAL void HidePlayer(bool bHide);
VIRTUAL void OnBeforeLevelLoad();
VIRTUAL void OnAfterLevelLoad(const char *levelName, const char *levelFolder);
VIRTUAL void OnCloseLevel() {}
VIRTUAL bool BuildEntitySerializationList(XmlNodeRef output) { return true; }
VIRTUAL bool GetAdditionalMinimapData(XmlNodeRef output) { return true; }
VIRTUAL IFlowSystem * GetIFlowSystem();
VIRTUAL IGameTokenSystem* GetIGameTokenSystem();
VIRTUAL IEquipmentSystemInterface* GetIEquipmentSystemInterface();
VIRTUAL bool SupportsMultiplayerGameRules() { return true; }
VIRTUAL void ToggleMultiplayerGameRules();
VIRTUAL void RegisterTelemetryTimelineRenderers(Telemetry::ITelemetryRepository* pRepository);
private:
void InitUIEnums(IGameToEditorInterface* pGTE);
void InitGlobalFileEnums(IGameToEditorInterface* pGTE);
void InitActionEnums(IGameToEditorInterface* pGTE);
void InitActionInputEnums(IGameToEditorInterface* pGTE);
void InitActionMapsEnums(IGameToEditorInterface* pGTE);
bool ConfigureNetContext( bool on );
static void OnChangeEditorMode( ICVar * );
void EnablePlayer(bool bPlayer);
static void ResetClient(IConsoleCmdArgs*);
static void SetGameRules();
IGameRef m_pGame;
IGameStartup *m_pGameStartup;
CEquipmentSystemInterface* m_pEquipmentSystemInterface;
bool m_bEnabled;
bool m_bGameMode;
bool m_bPlayer;
bool m_bUsingMultiplayerGameRules;
static ICVar *s_pEditorGameMode;
static CEditorGame * s_pEditorGame;
};
#endif //__EDITORGAME_H__