2010-11-20 10:37:14 +00:00
|
|
|
/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
|
|
|
|
/* If you are missing that file, acquire a complete release at teeworlds.com. */
|
2010-05-29 07:25:38 +00:00
|
|
|
#ifndef ENGINE_CLIENT_CLIENT_H
|
|
|
|
#define ENGINE_CLIENT_CLIENT_H
|
2009-10-29 12:14:31 +00:00
|
|
|
|
2017-11-23 14:47:38 +00:00
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
#include "fetcher.h"
|
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
class CGraph
|
2009-10-29 12:14:31 +00:00
|
|
|
{
|
|
|
|
public:
|
2010-05-29 07:25:38 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
// restrictions: Must be power of two
|
|
|
|
MAX_VALUES=128,
|
|
|
|
};
|
|
|
|
|
|
|
|
float m_Min, m_Max;
|
|
|
|
float m_aValues[MAX_VALUES];
|
|
|
|
float m_aColors[MAX_VALUES][3];
|
|
|
|
int m_Index;
|
|
|
|
|
|
|
|
void Init(float Min, float Max);
|
|
|
|
|
|
|
|
void ScaleMax();
|
|
|
|
void ScaleMin();
|
|
|
|
|
|
|
|
void Add(float v, float r, float g, float b);
|
|
|
|
void Render(IGraphics *pGraphics, int Font, float x, float y, float w, float h, const char *pDescription);
|
2009-10-29 12:14:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
class CSmoothTime
|
2009-10-29 12:14:31 +00:00
|
|
|
{
|
2010-05-29 07:25:38 +00:00
|
|
|
int64 m_Snap;
|
|
|
|
int64 m_Current;
|
|
|
|
int64 m_Target;
|
|
|
|
|
|
|
|
CGraph m_Graph;
|
|
|
|
|
|
|
|
int m_SpikeCounter;
|
|
|
|
|
|
|
|
float m_aAdjustSpeed[2]; // 0 = down, 1 = up
|
2009-10-29 12:14:31 +00:00
|
|
|
public:
|
2010-05-29 07:25:38 +00:00
|
|
|
void Init(int64 Target);
|
|
|
|
void SetAdjustSpeed(int Direction, float Value);
|
|
|
|
|
|
|
|
int64 Get(int64 Now);
|
|
|
|
|
|
|
|
void UpdateInt(int64 Target);
|
|
|
|
void Update(CGraph *pGraph, int64 Target, int TimeLeft, int AdjustDirection);
|
2009-10-29 12:14:31 +00:00
|
|
|
};
|
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
|
2016-04-27 15:05:30 +00:00
|
|
|
class CClient : public IClient, public CDemoPlayer::IListener
|
2010-05-29 07:25:38 +00:00
|
|
|
{
|
|
|
|
// needed interfaces
|
2011-02-27 14:03:57 +00:00
|
|
|
IEngine *m_pEngine;
|
2010-05-29 07:25:38 +00:00
|
|
|
IEditor *m_pEditor;
|
|
|
|
IEngineInput *m_pInput;
|
|
|
|
IEngineGraphics *m_pGraphics;
|
|
|
|
IEngineSound *m_pSound;
|
|
|
|
IGameClient *m_pGameClient;
|
|
|
|
IEngineMap *m_pMap;
|
|
|
|
IConsole *m_pConsole;
|
|
|
|
IStorage *m_pStorage;
|
2015-04-18 19:17:27 +00:00
|
|
|
IUpdater *m_pUpdater;
|
2010-05-29 07:25:38 +00:00
|
|
|
IEngineMasterServer *m_pMasterServer;
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
NUM_SNAPSHOT_TYPES=2,
|
|
|
|
PREDICTION_MARGIN=1000/50/2, // magic network prediction value
|
|
|
|
};
|
|
|
|
|
2014-08-13 10:03:53 +00:00
|
|
|
class CNetClient m_NetClient[3];
|
2011-02-27 14:03:57 +00:00
|
|
|
class CDemoPlayer m_DemoPlayer;
|
2014-10-16 15:42:13 +00:00
|
|
|
class CDemoRecorder m_DemoRecorder[RECORDER_MAX];
|
2014-08-12 14:21:06 +00:00
|
|
|
class CDemoEditor m_DemoEditor;
|
2017-09-09 15:04:19 +00:00
|
|
|
class CGhostRecorder m_GhostRecorder;
|
|
|
|
class CGhostLoader m_GhostLoader;
|
2011-02-27 14:03:57 +00:00
|
|
|
class CServerBrowser m_ServerBrowser;
|
2015-04-18 19:17:27 +00:00
|
|
|
class CUpdater m_Updater;
|
2011-03-23 12:06:35 +00:00
|
|
|
class CFriends m_Friends;
|
2015-07-22 20:16:49 +00:00
|
|
|
class CFriends m_Foes;
|
2010-05-29 07:25:38 +00:00
|
|
|
|
|
|
|
char m_aServerAddressStr[256];
|
|
|
|
|
|
|
|
unsigned m_SnapshotParts;
|
|
|
|
int64 m_LocalStartTime;
|
|
|
|
|
|
|
|
int m_DebugFont;
|
2015-07-09 00:08:14 +00:00
|
|
|
|
2012-01-01 12:38:46 +00:00
|
|
|
int64 m_LastRenderTime;
|
|
|
|
float m_RenderFrameTimeLow;
|
|
|
|
float m_RenderFrameTimeHigh;
|
|
|
|
int m_RenderFrames;
|
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
NETADDR m_ServerAddress;
|
|
|
|
int m_SnapCrcErrors;
|
2010-12-12 15:48:13 +00:00
|
|
|
bool m_AutoScreenshotRecycle;
|
2015-05-19 22:51:02 +00:00
|
|
|
bool m_AutoStatScreenshotRecycle;
|
2017-04-26 03:10:31 +00:00
|
|
|
bool m_AutoCSVRecycle;
|
2011-01-17 11:28:37 +00:00
|
|
|
bool m_EditorActive;
|
2011-01-17 12:28:15 +00:00
|
|
|
bool m_SoundInitFailed;
|
2011-03-18 18:03:13 +00:00
|
|
|
bool m_ResortServerBrowser;
|
2010-05-29 07:25:38 +00:00
|
|
|
|
2014-04-28 15:26:31 +00:00
|
|
|
int m_AckGameTick[2];
|
|
|
|
int m_CurrentRecvTick[2];
|
2014-04-27 11:44:04 +00:00
|
|
|
int m_RconAuthed[2];
|
2014-08-22 11:54:13 +00:00
|
|
|
char m_RconPassword[32];
|
2011-07-14 20:07:21 +00:00
|
|
|
int m_UseTempRconCommands;
|
2017-07-15 15:29:20 +00:00
|
|
|
char m_Password[32];
|
2010-05-29 07:25:38 +00:00
|
|
|
|
|
|
|
// version-checking
|
|
|
|
char m_aVersionStr[10];
|
|
|
|
|
|
|
|
// pinging
|
|
|
|
int64 m_PingStartTime;
|
|
|
|
|
|
|
|
char m_aCurrentMap[256];
|
2016-09-05 15:54:35 +00:00
|
|
|
char m_aCurrentMapPath[CEditor::MAX_PATH_LENGTH];
|
2010-05-29 07:25:38 +00:00
|
|
|
|
2016-10-02 09:31:11 +00:00
|
|
|
char m_aTimeoutCodes[2][32];
|
|
|
|
bool m_aTimeoutCodeSent[2];
|
|
|
|
bool m_GenerateTimeoutSeed;
|
2014-08-17 17:19:40 +00:00
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
//
|
|
|
|
char m_aCmdConnect[256];
|
|
|
|
|
|
|
|
// map download
|
2017-11-23 14:47:38 +00:00
|
|
|
std::shared_ptr<CFetchTask> m_pMapdownloadTask;
|
2010-05-29 07:25:38 +00:00
|
|
|
char m_aMapdownloadFilename[256];
|
|
|
|
char m_aMapdownloadName[256];
|
|
|
|
IOHANDLE m_MapdownloadFile;
|
|
|
|
int m_MapdownloadChunk;
|
|
|
|
int m_MapdownloadCrc;
|
|
|
|
int m_MapdownloadAmount;
|
|
|
|
int m_MapdownloadTotalsize;
|
2017-09-03 15:36:51 +00:00
|
|
|
|
2017-11-23 14:47:38 +00:00
|
|
|
std::shared_ptr<CFetchTask> m_pDDNetInfoTask;
|
2010-05-29 07:25:38 +00:00
|
|
|
|
|
|
|
// time
|
2014-04-28 15:26:31 +00:00
|
|
|
CSmoothTime m_GameTime[2];
|
2014-05-03 21:28:48 +00:00
|
|
|
CSmoothTime m_PredictedTime;
|
2010-05-29 07:25:38 +00:00
|
|
|
|
|
|
|
// input
|
|
|
|
struct // TODO: handle input better
|
|
|
|
{
|
|
|
|
int m_aData[MAX_INPUT_SIZE]; // the input data
|
|
|
|
int m_Tick; // the tick that the input is for
|
|
|
|
int64 m_PredictedTime; // prediction latency when we sent this input
|
|
|
|
int64 m_Time;
|
2014-10-12 15:52:53 +00:00
|
|
|
} m_aInputs[2][200];
|
2010-05-29 07:25:38 +00:00
|
|
|
|
2014-10-12 15:52:53 +00:00
|
|
|
int m_CurrentInput[2];
|
2014-04-28 18:43:08 +00:00
|
|
|
bool m_LastDummy;
|
2014-05-03 21:28:48 +00:00
|
|
|
bool m_LastDummy2;
|
2017-02-28 09:08:14 +00:00
|
|
|
bool m_DummySendConnInfo;
|
2010-05-29 07:25:38 +00:00
|
|
|
|
|
|
|
// graphs
|
|
|
|
CGraph m_InputtimeMarginGraph;
|
|
|
|
CGraph m_GametimeMarginGraph;
|
|
|
|
CGraph m_FpsGraph;
|
|
|
|
|
|
|
|
// the game snapshots are modifiable by the game
|
2014-05-03 18:24:45 +00:00
|
|
|
class CSnapshotStorage m_SnapshotStorage[2];
|
|
|
|
CSnapshotStorage::CHolder *m_aSnapshots[2][NUM_SNAPSHOT_TYPES];
|
2010-05-29 07:25:38 +00:00
|
|
|
|
2016-01-23 20:44:45 +00:00
|
|
|
int m_ReceivedSnapshots[2];
|
|
|
|
char m_aSnapshotIncomingData[CSnapshot::MAX_SIZE];
|
2010-05-29 07:25:38 +00:00
|
|
|
|
2011-02-27 14:03:57 +00:00
|
|
|
class CSnapshotStorage::CHolder m_aDemorecSnapshotHolders[NUM_SNAPSHOT_TYPES];
|
2010-05-29 07:25:38 +00:00
|
|
|
char *m_aDemorecSnapshotData[NUM_SNAPSHOT_TYPES][2][CSnapshot::MAX_SIZE];
|
|
|
|
|
2011-02-27 14:03:57 +00:00
|
|
|
class CSnapshotDelta m_SnapshotDelta;
|
2010-05-29 07:25:38 +00:00
|
|
|
|
|
|
|
//
|
2011-02-27 14:03:57 +00:00
|
|
|
class CServerInfo m_CurrentServerInfo;
|
2010-05-29 07:25:38 +00:00
|
|
|
int64 m_CurrentServerInfoRequestTime; // >= 0 should request, == -1 got info
|
|
|
|
|
|
|
|
// version info
|
2011-03-17 16:41:57 +00:00
|
|
|
struct CVersionInfo
|
2010-05-29 07:25:38 +00:00
|
|
|
{
|
2011-03-17 16:41:57 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
STATE_INIT=0,
|
|
|
|
STATE_START,
|
|
|
|
STATE_READY,
|
|
|
|
};
|
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
int m_State;
|
2011-02-27 14:03:57 +00:00
|
|
|
class CHostLookup m_VersionServeraddr;
|
2010-05-29 07:25:38 +00:00
|
|
|
} m_VersionInfo;
|
2011-02-27 14:03:57 +00:00
|
|
|
|
2011-12-30 15:02:22 +00:00
|
|
|
volatile int m_GfxState;
|
|
|
|
static void GraphicsThreadProxy(void *pThis) { ((CClient*)pThis)->GraphicsThread(); }
|
|
|
|
void GraphicsThread();
|
2015-07-09 00:08:14 +00:00
|
|
|
vec3 GetColorV3(int v);
|
2011-12-30 15:02:22 +00:00
|
|
|
|
2016-05-02 21:36:21 +00:00
|
|
|
#if defined(CONF_FAMILY_UNIX)
|
|
|
|
CFifo m_Fifo;
|
|
|
|
#endif
|
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
public:
|
2011-02-27 14:03:57 +00:00
|
|
|
IEngine *Engine() { return m_pEngine; }
|
2010-05-29 07:25:38 +00:00
|
|
|
IEngineGraphics *Graphics() { return m_pGraphics; }
|
|
|
|
IEngineInput *Input() { return m_pInput; }
|
|
|
|
IEngineSound *Sound() { return m_pSound; }
|
|
|
|
IGameClient *GameClient() { return m_pGameClient; }
|
|
|
|
IEngineMasterServer *MasterServer() { return m_pMasterServer; }
|
|
|
|
IStorage *Storage() { return m_pStorage; }
|
2015-04-18 19:17:27 +00:00
|
|
|
IUpdater *Updater() { return m_pUpdater; }
|
2010-05-29 07:25:38 +00:00
|
|
|
|
|
|
|
CClient();
|
|
|
|
|
|
|
|
// ----- send functions -----
|
|
|
|
virtual int SendMsg(CMsgPacker *pMsg, int Flags);
|
2014-04-28 13:19:57 +00:00
|
|
|
virtual int SendMsgExY(CMsgPacker *pMsg, int Flags, bool System=true, int NetClient=1);
|
2010-05-29 07:25:38 +00:00
|
|
|
|
|
|
|
int SendMsgEx(CMsgPacker *pMsg, int Flags, bool System=true);
|
|
|
|
void SendInfo();
|
|
|
|
void SendEnterGame();
|
|
|
|
void SendReady();
|
2014-10-29 12:37:38 +00:00
|
|
|
void SendMapRequest();
|
2010-05-29 07:25:38 +00:00
|
|
|
|
2014-04-27 11:44:04 +00:00
|
|
|
virtual bool RconAuthed() { return m_RconAuthed[g_Config.m_ClDummy] != 0; }
|
2011-07-14 20:07:21 +00:00
|
|
|
virtual bool UseTempRconCommands() { return m_UseTempRconCommands != 0; }
|
2010-05-29 07:25:38 +00:00
|
|
|
void RconAuth(const char *pName, const char *pPassword);
|
|
|
|
virtual void Rcon(const char *pCmd);
|
|
|
|
|
|
|
|
virtual bool ConnectionProblems();
|
|
|
|
|
2011-01-17 12:28:15 +00:00
|
|
|
virtual bool SoundInitFailed() { return m_SoundInitFailed; }
|
|
|
|
|
2011-02-18 10:41:27 +00:00
|
|
|
virtual int GetDebugFont() { return m_DebugFont; }
|
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
void DirectInput(int *pInput, int Size);
|
|
|
|
void SendInput();
|
|
|
|
|
2018-02-04 15:00:47 +00:00
|
|
|
// TODO: OPT: do this a lot smarter!
|
2010-05-29 07:25:38 +00:00
|
|
|
virtual int *GetInput(int Tick);
|
2014-12-01 00:31:58 +00:00
|
|
|
virtual bool InputExists(int Tick);
|
2010-05-29 07:25:38 +00:00
|
|
|
|
|
|
|
const char *LatestVersion();
|
|
|
|
|
|
|
|
// ------ state handling -----
|
|
|
|
void SetState(int s);
|
|
|
|
|
|
|
|
// called when the map is loaded and we should init for a new round
|
|
|
|
void OnEnterGame();
|
|
|
|
virtual void EnterGame();
|
|
|
|
|
2017-07-15 15:29:20 +00:00
|
|
|
virtual void Connect(const char *pAddress, const char *pPassword = NULL);
|
2010-05-29 07:25:38 +00:00
|
|
|
void DisconnectWithReason(const char *pReason);
|
|
|
|
virtual void Disconnect();
|
|
|
|
|
2014-04-26 18:29:42 +00:00
|
|
|
virtual void DummyDisconnect(const char *pReason);
|
2014-04-28 13:19:57 +00:00
|
|
|
virtual void DummyConnect();
|
2014-04-26 18:29:42 +00:00
|
|
|
virtual bool DummyConnected();
|
2015-04-19 12:40:05 +00:00
|
|
|
virtual bool DummyConnecting();
|
2014-04-26 18:29:42 +00:00
|
|
|
int m_DummyConnected;
|
|
|
|
int m_LastDummyConnectTime;
|
2010-05-29 07:25:38 +00:00
|
|
|
|
|
|
|
virtual void GetServerInfo(CServerInfo *pServerInfo);
|
|
|
|
void ServerInfoRequest();
|
|
|
|
|
|
|
|
int LoadData();
|
|
|
|
|
|
|
|
// ---
|
|
|
|
|
2016-05-05 16:07:00 +00:00
|
|
|
int GetPredictionTime();
|
2011-02-12 10:40:36 +00:00
|
|
|
void *SnapGetItem(int SnapID, int Index, CSnapItem *pItem);
|
|
|
|
void SnapInvalidateItem(int SnapID, int Index);
|
|
|
|
void *SnapFindItem(int SnapID, int Type, int ID);
|
|
|
|
int SnapNumItems(int SnapID);
|
2010-05-29 07:25:38 +00:00
|
|
|
void SnapSetStaticsize(int ItemType, int Size);
|
|
|
|
|
|
|
|
void Render();
|
|
|
|
void DebugRender();
|
|
|
|
|
2014-12-31 14:35:49 +00:00
|
|
|
virtual void Restart();
|
2010-05-29 07:25:38 +00:00
|
|
|
virtual void Quit();
|
|
|
|
|
|
|
|
virtual const char *ErrorString();
|
|
|
|
|
|
|
|
const char *LoadMap(const char *pName, const char *pFilename, unsigned WantedCrc);
|
|
|
|
const char *LoadMapSearch(const char *pMapName, int WantedCrc);
|
|
|
|
|
2015-07-10 20:26:55 +00:00
|
|
|
static int PlayerScoreNameComp(const void *a, const void *b);
|
2010-05-29 07:25:38 +00:00
|
|
|
|
2011-03-17 16:41:57 +00:00
|
|
|
void ProcessConnlessPacket(CNetChunk *pPacket);
|
2017-03-29 10:56:13 +00:00
|
|
|
void ProcessServerInfo(int Type, NETADDR *pFrom, const void *pData, int DataSize);
|
2011-03-17 16:41:57 +00:00
|
|
|
void ProcessServerPacket(CNetChunk *pPacket);
|
2014-05-03 00:30:05 +00:00
|
|
|
void ProcessServerPacketDummy(CNetChunk *pPacket);
|
2010-05-29 07:25:38 +00:00
|
|
|
|
2014-10-29 12:37:38 +00:00
|
|
|
void ResetMapDownload();
|
|
|
|
void FinishMapDownload();
|
2017-09-03 15:36:51 +00:00
|
|
|
|
|
|
|
void RequestDDNetInfo();
|
|
|
|
void ResetDDNetInfo();
|
|
|
|
void FinishDDNetInfo();
|
|
|
|
void LoadDDNetInfo();
|
2014-10-29 12:37:38 +00:00
|
|
|
|
2014-08-15 23:06:17 +00:00
|
|
|
virtual const char *MapDownloadName() { return m_aMapdownloadName; }
|
2014-10-29 12:37:38 +00:00
|
|
|
virtual int MapDownloadAmount() { return !m_pMapdownloadTask ? m_MapdownloadAmount : (int)m_pMapdownloadTask->Current(); }
|
|
|
|
virtual int MapDownloadTotalsize() { return !m_pMapdownloadTask ? m_MapdownloadTotalsize : (int)m_pMapdownloadTask->Size(); }
|
2010-05-29 07:25:38 +00:00
|
|
|
|
|
|
|
void PumpNetwork();
|
|
|
|
|
|
|
|
virtual void OnDemoPlayerSnapshot(void *pData, int Size);
|
|
|
|
virtual void OnDemoPlayerMessage(void *pData, int Size);
|
|
|
|
|
|
|
|
void Update();
|
|
|
|
|
|
|
|
void RegisterInterfaces();
|
|
|
|
void InitInterfaces();
|
|
|
|
|
|
|
|
void Run();
|
|
|
|
|
2014-01-31 00:41:57 +00:00
|
|
|
bool CtrlShiftKey(int Key, bool &Last);
|
2010-05-29 07:25:38 +00:00
|
|
|
|
2011-08-13 00:11:06 +00:00
|
|
|
static void Con_Connect(IConsole::IResult *pResult, void *pUserData);
|
|
|
|
static void Con_Disconnect(IConsole::IResult *pResult, void *pUserData);
|
2014-04-26 18:29:42 +00:00
|
|
|
|
|
|
|
static void Con_DummyConnect(IConsole::IResult *pResult, void *pUserData);
|
|
|
|
static void Con_DummyDisconnect(IConsole::IResult *pResult, void *pUserData);
|
|
|
|
|
2011-08-13 00:11:06 +00:00
|
|
|
static void Con_Quit(IConsole::IResult *pResult, void *pUserData);
|
2015-08-12 12:26:48 +00:00
|
|
|
static void Con_DemoPlay(IConsole::IResult *pResult, void *pUserData);
|
2016-04-27 15:21:40 +00:00
|
|
|
static void Con_DemoSpeed(IConsole::IResult *pResult, void *pUserData);
|
2011-08-13 00:11:06 +00:00
|
|
|
static void Con_Minimize(IConsole::IResult *pResult, void *pUserData);
|
|
|
|
static void Con_Ping(IConsole::IResult *pResult, void *pUserData);
|
|
|
|
static void Con_Screenshot(IConsole::IResult *pResult, void *pUserData);
|
|
|
|
static void Con_Rcon(IConsole::IResult *pResult, void *pUserData);
|
|
|
|
static void Con_RconAuth(IConsole::IResult *pResult, void *pUserData);
|
2017-03-06 09:31:05 +00:00
|
|
|
static void Con_RconLogin(IConsole::IResult *pResult, void *pUserData);
|
2011-08-13 00:11:06 +00:00
|
|
|
static void Con_AddFavorite(IConsole::IResult *pResult, void *pUserData);
|
|
|
|
static void Con_RemoveFavorite(IConsole::IResult *pResult, void *pUserData);
|
|
|
|
static void Con_Play(IConsole::IResult *pResult, void *pUserData);
|
|
|
|
static void Con_Record(IConsole::IResult *pResult, void *pUserData);
|
|
|
|
static void Con_StopRecord(IConsole::IResult *pResult, void *pUserData);
|
2012-01-10 22:13:19 +00:00
|
|
|
static void Con_AddDemoMarker(IConsole::IResult *pResult, void *pUserData);
|
2011-03-18 18:03:13 +00:00
|
|
|
static void ConchainServerBrowserUpdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
|
2016-04-29 22:34:12 +00:00
|
|
|
static void ConchainFullscreen(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
|
|
|
|
static void ConchainWindowBordered(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
|
|
|
|
static void ConchainWindowScreen(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
|
|
|
|
static void ConchainWindowVSync(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
|
2016-10-02 09:31:11 +00:00
|
|
|
static void ConchainTimeoutSeed(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
|
2010-05-29 07:25:38 +00:00
|
|
|
|
2014-08-12 14:21:06 +00:00
|
|
|
static void Con_DemoSlice(IConsole::IResult *pResult, void *pUserData);
|
2014-08-13 14:35:15 +00:00
|
|
|
static void Con_DemoSliceBegin(IConsole::IResult *pResult, void *pUserData);
|
2014-08-12 14:21:06 +00:00
|
|
|
static void Con_DemoSliceEnd(IConsole::IResult *pResult, void *pUserData);
|
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
void RegisterCommands();
|
|
|
|
|
2010-10-06 21:07:35 +00:00
|
|
|
const char *DemoPlayer_Play(const char *pFilename, int StorageType);
|
2014-10-16 15:42:13 +00:00
|
|
|
void DemoRecorder_Start(const char *pFilename, bool WithTimestamp, int Recorder);
|
2010-12-08 00:42:32 +00:00
|
|
|
void DemoRecorder_HandleAutoStart();
|
2014-10-16 15:42:13 +00:00
|
|
|
void DemoRecorder_Stop(int Recorder);
|
|
|
|
void DemoRecorder_AddDemoMarker(int Recorder);
|
|
|
|
class IDemoRecorder *DemoRecorder(int Recorder);
|
2010-05-29 07:25:38 +00:00
|
|
|
|
2010-12-12 15:48:13 +00:00
|
|
|
void AutoScreenshot_Start();
|
2015-05-19 22:51:02 +00:00
|
|
|
void AutoStatScreenshot_Start();
|
2010-12-12 15:48:13 +00:00
|
|
|
void AutoScreenshot_Cleanup();
|
2015-05-19 22:51:02 +00:00
|
|
|
void AutoStatScreenshot_Cleanup();
|
2010-12-12 15:48:13 +00:00
|
|
|
|
2017-04-26 03:10:31 +00:00
|
|
|
void AutoCSV_Start();
|
|
|
|
void AutoCSV_Cleanup();
|
|
|
|
|
2011-03-18 18:03:13 +00:00
|
|
|
void ServerBrowserUpdate();
|
2011-02-13 05:35:13 +00:00
|
|
|
|
2016-04-29 22:34:12 +00:00
|
|
|
// gfx
|
|
|
|
void SwitchWindowScreen(int Index);
|
|
|
|
void ToggleFullscreen();
|
|
|
|
void ToggleWindowBordered();
|
|
|
|
void ToggleWindowVSync();
|
|
|
|
|
2011-02-13 05:35:13 +00:00
|
|
|
// DDRace
|
2011-04-09 06:41:31 +00:00
|
|
|
|
2016-10-02 09:31:11 +00:00
|
|
|
void GenerateTimeoutSeed();
|
|
|
|
void GenerateTimeoutCodes();
|
|
|
|
|
2017-09-09 21:10:42 +00:00
|
|
|
const char *GetCurrentMap();
|
|
|
|
const char *GetCurrentMapPath();
|
2017-09-28 17:13:20 +00:00
|
|
|
unsigned GetMapCrc();
|
2017-09-09 21:10:42 +00:00
|
|
|
|
2017-09-28 17:13:20 +00:00
|
|
|
void RaceRecord_Start(const char *pFilename);
|
2017-09-09 21:10:42 +00:00
|
|
|
void RaceRecord_Stop();
|
|
|
|
bool RaceRecord_IsRecording();
|
2014-08-13 14:35:15 +00:00
|
|
|
|
|
|
|
virtual void DemoSliceBegin();
|
|
|
|
virtual void DemoSliceEnd();
|
2017-02-28 09:08:14 +00:00
|
|
|
virtual void DemoSlice(const char *pDstPath, CLIENTFUNC_FILTER pfnFilter, void *pUser);
|
2014-09-19 22:36:22 +00:00
|
|
|
|
2015-03-14 15:10:46 +00:00
|
|
|
bool EditorHasUnsavedData() { return m_pEditor->HasUnsavedData(); }
|
2015-07-22 20:16:49 +00:00
|
|
|
|
|
|
|
virtual IFriends* Foes() {return &m_Foes; }
|
2010-05-29 07:25:38 +00:00
|
|
|
};
|
|
|
|
#endif
|