sourcemm/CServerGameDLL.h
author David Anderson <dvander@alliedmods.net>
Sat Apr 16 23:33:39 2005 +0000 (2005-04-16)
changeset 9 01b8b7435e67
parent 7 8ef11f6189e4
child 14 a3f323f6f91d
permissions -rw-r--r--
Implemented factory hooks
Added commands: clear, load, pause, unload, unpause
Rewrote headers
     1 /* ======== SourceMM ========
     2 * Copyright (C) 2004-2005 Metamod:Source Development Team
     3 * No warranties of any kind
     4 *
     5 * License: zlib/libpng
     6 *
     7 * Author(s): David "BAILOPAN" Anderson
     8 * ============================
     9 */
    10 
    11 #ifndef _INCLUDE_CSERVER_GAMEDLL_H
    12 #define _INCLUDE_CSERVER_GAMEDLL_H
    13 
    14 /**
    15  * @brief Defines wrapper class for gamedll interfaces
    16  * @file CServerGameDLL.h
    17  */
    18 
    19 #include <eiface.h>
    20 
    21 /**
    22  * @brief Empty class.  We only care about DLLInit.
    23  */
    24 class CServerGameDLL : public IServerGameDLL
    25 {
    26 public:
    27 	virtual bool DLLInit(	CreateInterfaceFn engineFactory, CreateInterfaceFn physicsFactory, CreateInterfaceFn fileSystemFactory, CGlobalVars *pGlobals);
    28 	virtual bool GameInit( void ) { return false; }
    29 	virtual bool LevelInit( char const *pMapName, char const *pMapEntities, char const *pOldLevel, char const *pLandmarkName, bool loadGame, bool background )  { return false; }
    30 	virtual void ServerActivate( edict_t *pEdictList, int edictCount, int clientMax ) { }
    31 	virtual void GameFrame( bool simulating ) { }
    32 	virtual void PreClientUpdate( bool simulating ) { }
    33 	virtual void LevelShutdown( void ) { }
    34 	virtual void GameShutdown( void ) { }
    35 	virtual void DLLShutdown( void ) { }
    36 	virtual float GetTickInterval( void ) const { return 0.0f; }
    37 	virtual ServerClass *GetAllServerClasses( void ) { return NULL; }
    38 	virtual const char *GetGameDescription( void ) { return NULL; }
    39 	virtual void CreateNetworkStringTables( void ) { }
    40 	virtual CSaveRestoreData  *SaveInit( int size ) { return NULL; }
    41 	virtual void SaveWriteFields( CSaveRestoreData *, const char *, void *, datamap_t *, typedescription_t *, int ) { }
    42 	virtual void SaveReadFields( CSaveRestoreData *, const char *, void *, datamap_t *, typedescription_t *, int ) { }
    43 	virtual void SaveGlobalState( CSaveRestoreData * ) { }
    44 	virtual void RestoreGlobalState( CSaveRestoreData * ) { }
    45 	virtual void PreSave( CSaveRestoreData * ) { }
    46 	virtual void Save( CSaveRestoreData * ) { }
    47 	virtual void GetSaveComment( char *comment, int maxlength ) { }
    48 	virtual void WriteSaveHeaders( CSaveRestoreData * ) { }
    49 	virtual void ReadRestoreHeaders( CSaveRestoreData * ) { }
    50 	virtual void Restore( CSaveRestoreData *, bool ) { }
    51 	virtual bool IsRestoring() { return false; }
    52 	virtual int CreateEntityTransitionList( CSaveRestoreData *, int ) { return 0; }
    53 	virtual void BuildAdjacentMapList( void ) { }
    54 	virtual bool GetUserMessageInfo( int msg_type, char *name, int maxnamelength, int& size ) { return false; }
    55 	virtual CStandardSendProxies* GetStandardSendProxies() { return NULL; }
    56 };
    57 
    58 #endif //_INCLUDE_CSERVER_GAMEDLL_H