From d9ce7203871cea0046144bce175df5bf1d7fcc19 Mon Sep 17 00:00:00 2001 From: oy Date: Sun, 27 Feb 2011 15:03:57 +0100 Subject: made engine an interface --- src/engine/client/client.h | 47 ++++++++++++---------------------------------- 1 file changed, 12 insertions(+), 35 deletions(-) (limited to 'src/engine/client/client.h') diff --git a/src/engine/client/client.h b/src/engine/client/client.h index 8768f23a..2c0f5f86 100644 --- a/src/engine/client/client.h +++ b/src/engine/client/client.h @@ -3,28 +3,6 @@ #ifndef ENGINE_CLIENT_CLIENT_H #define ENGINE_CLIENT_CLIENT_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "srvbrowse.h" - class CGraph { public: @@ -106,6 +84,7 @@ public: class CClient : public IClient, public CDemoPlayer::IListner { // needed interfaces + IEngine *m_pEngine; IEditor *m_pEditor; IEngineInput *m_pInput; IEngineGraphics *m_pGraphics; @@ -122,11 +101,10 @@ class CClient : public IClient, public CDemoPlayer::IListner PREDICTION_MARGIN=1000/50/2, // magic network prediction value }; - CNetClient m_NetClient; - CDemoPlayer m_DemoPlayer; - CDemoRecorder m_DemoRecorder; - CEngine m_Engine; - CServerBrowser m_ServerBrowser; + class CNetClient m_NetClient; + class CDemoPlayer m_DemoPlayer; + class CDemoRecorder m_DemoRecorder; + class CServerBrowser m_ServerBrowser; char m_aServerAddressStr[256]; @@ -191,28 +169,30 @@ class CClient : public IClient, public CDemoPlayer::IListner CGraph m_FpsGraph; // the game snapshots are modifiable by the game - CSnapshotStorage m_SnapshotStorage; + class CSnapshotStorage m_SnapshotStorage; CSnapshotStorage::CHolder *m_aSnapshots[NUM_SNAPSHOT_TYPES]; int m_RecivedSnapshots; char m_aSnapshotIncommingData[CSnapshot::MAX_SIZE]; - CSnapshotStorage::CHolder m_aDemorecSnapshotHolders[NUM_SNAPSHOT_TYPES]; + class CSnapshotStorage::CHolder m_aDemorecSnapshotHolders[NUM_SNAPSHOT_TYPES]; char *m_aDemorecSnapshotData[NUM_SNAPSHOT_TYPES][2][CSnapshot::MAX_SIZE]; - CSnapshotDelta m_SnapshotDelta; + class CSnapshotDelta m_SnapshotDelta; // - CServerInfo m_CurrentServerInfo; + class CServerInfo m_CurrentServerInfo; int64 m_CurrentServerInfoRequestTime; // >= 0 should request, == -1 got info // version info struct { int m_State; - CHostLookup m_VersionServeraddr; + class CHostLookup m_VersionServeraddr; } m_VersionInfo; + public: + IEngine *Engine() { return m_pEngine; } IEngineGraphics *Graphics() { return m_pGraphics; } IEngineInput *Input() { return m_pInput; } IEngineSound *Sound() { return m_pSound; } @@ -298,7 +278,6 @@ public: void Update(); - void InitEngine(const char *pAppname); void RegisterInterfaces(); void InitInterfaces(); @@ -327,7 +306,5 @@ public: void AutoScreenshot_Start(); void AutoScreenshot_Cleanup(); - - virtual class CEngine *Engine() { return &m_Engine; } }; #endif -- cgit 1.4.1