darope@0: // vi: set ts=4 sw=4 : darope@0: // vim: set tw=75 : darope@0: darope@0: // dllapi_post.cpp - implementation of "post" versions of Half-Life DLL routines darope@0: darope@0: /* darope@0: * Copyright (c) 2001-2003 Will Day darope@0: * darope@0: * This file is part of Metamod. darope@0: * darope@0: * Metamod is free software; you can redistribute it and/or modify it darope@0: * under the terms of the GNU General Public License as published by the darope@0: * Free Software Foundation; either version 2 of the License, or (at darope@0: * your option) any later version. darope@0: * darope@0: * Metamod is distributed in the hope that it will be useful, but darope@0: * WITHOUT ANY WARRANTY; without even the implied warranty of darope@0: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU darope@0: * General Public License for more details. darope@0: * darope@0: * You should have received a copy of the GNU General Public License darope@0: * along with Metamod; if not, write to the Free Software Foundation, darope@0: * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA darope@0: * darope@0: * In addition, as a special exception, the author gives permission to darope@0: * link the code of this program with the Half-Life Game Engine ("HL darope@0: * Engine") and Modified Game Libraries ("MODs") developed by Valve, darope@0: * L.L.C ("Valve"). You must obey the GNU General Public License in all darope@0: * respects for all of the code used other than the HL Engine and MODs darope@0: * from Valve. If you modify this file, you may extend this exception darope@0: * to your version of the file, but you are not obligated to do so. If darope@0: * you do not wish to do so, delete this exception statement from your darope@0: * version. darope@0: * darope@0: */ darope@0: darope@0: #include darope@0: darope@0: #include darope@0: darope@0: #include "dllapi_post.h" darope@0: #include "trace_api.h" darope@0: #include "log_plugin.h" darope@0: darope@0: // from SDK dlls/game.cpp: darope@0: void GameDLLInit_Post( void ) { darope@0: DLL_TRACE(pfnGameInit, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: darope@0: // from SDK dlls/cbase.cpp: darope@0: int DispatchSpawn_Post( edict_t *pent ) { darope@0: edict_t *ed=pent; darope@0: DLL_TRACE(pfnSpawn, P_POST, ("classname=%s, returning %d", darope@0: ed ? STRING(ed->v.classname) : "nil", darope@0: META_RESULT_ORIG_RET(int))); darope@0: // 0==Success, -1==Failure ? darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: void DispatchThink_Post( edict_t *pent ) { darope@0: DLL_TRACE(pfnThink, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void DispatchUse_Post( edict_t *pentUsed, edict_t *pentOther ) { darope@0: DLL_TRACE(pfnUse, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void DispatchTouch_Post( edict_t *pentTouched, edict_t *pentOther ) { darope@0: DLL_TRACE(pfnTouch, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void DispatchBlocked_Post( edict_t *pentBlocked, edict_t *pentOther ) { darope@0: DLL_TRACE(pfnBlocked, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void DispatchKeyValue_Post( edict_t *pentKeyvalue, KeyValueData *pkvd ) { darope@0: DLL_TRACE(pfnKeyValue, P_POST, ("classname=%s keyname=%s value=%s", darope@0: pkvd->szClassName, pkvd->szKeyName, pkvd->szValue)); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void DispatchSave_Post( edict_t *pent, SAVERESTOREDATA *pSaveData ) { darope@0: DLL_TRACE(pfnSave, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: int DispatchRestore_Post( edict_t *pent, SAVERESTOREDATA *pSaveData, int globalEntity ) { darope@0: DLL_TRACE(pfnRestore, P_POST, ("returning %d", META_RESULT_ORIG_RET(int))); darope@0: // 0==Success, -1==Failure ? darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: void DispatchObjectCollsionBox_Post( edict_t *pent ) { darope@0: DLL_TRACE(pfnSetAbsBox, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void SaveWriteFields_Post( SAVERESTOREDATA *pSaveData, const char *pname, void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount ) { darope@0: DLL_TRACE(pfnSaveWriteFields, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void SaveReadFields_Post( SAVERESTOREDATA *pSaveData, const char *pname, void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount ) { darope@0: DLL_TRACE(pfnSaveReadFields, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: darope@0: // from SDK dlls/world.cpp: darope@0: void SaveGlobalState_Post( SAVERESTOREDATA *pSaveData ) { darope@0: DLL_TRACE(pfnSaveGlobalState, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void RestoreGlobalState_Post( SAVERESTOREDATA *pSaveData ) { darope@0: DLL_TRACE(pfnRestoreGlobalState, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void ResetGlobalState_Post( void ) { darope@0: DLL_TRACE(pfnResetGlobalState, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: darope@0: //! from SDK dlls/client.cpp: darope@0: BOOL ClientConnect_Post( edict_t *pEntity, const char *pszName, const char *pszAddress, char szRejectReason[ 128 ] ) { darope@0: BOOL ret=META_RESULT_ORIG_RET(BOOL); darope@0: if(ret) DLL_TRACE(pfnClientConnect, P_POST, ("returning %d", ret)); darope@0: else DLL_TRACE(pfnClientConnect, P_POST, ("returning %d, reason=%s", ret, szRejectReason)); darope@0: RETURN_META_VALUE(MRES_IGNORED, TRUE); darope@0: } darope@0: void ClientDisconnect_Post( edict_t *pEntity ) { darope@0: DLL_TRACE(pfnClientDisconnect, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void ClientKill_Post( edict_t *pEntity ) { darope@0: DLL_TRACE(pfnClientKill, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void ClientPutInServer_Post( edict_t *pEntity ) { darope@0: DLL_TRACE(pfnClientPutInServer, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void ClientCommand_Post( edict_t *pEntity ) { darope@0: DLL_TRACE(pfnClientCommand, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void ClientUserInfoChanged_Post( edict_t *pEntity, char *infobuffer ) { darope@0: DLL_TRACE(pfnClientUserInfoChanged, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void ServerActivate_Post( edict_t *pEdictList, int edictCount, int clientMax ) { darope@0: DLL_TRACE(pfnServerActivate, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void ServerDeactivate_Post( void ) { darope@0: DLL_TRACE(pfnServerDeactivate, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void PlayerPreThink_Post( edict_t *pEntity ) { darope@0: DLL_TRACE(pfnPlayerPreThink, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void PlayerPostThink_Post( edict_t *pEntity ) { darope@0: DLL_TRACE(pfnPlayerPostThink, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void StartFrame_Post( void ) { darope@0: DLL_TRACE(pfnStartFrame, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void ParmsNewLevel_Post( void ) { darope@0: DLL_TRACE(pfnParmsNewLevel, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void ParmsChangeLevel_Post( void ) { darope@0: DLL_TRACE(pfnParmsChangeLevel, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: const char *GetGameDescription_Post( void ) { darope@0: DLL_TRACE(pfnGetGameDescription, P_POST, ("returning %s", META_RESULT_ORIG_RET(char *))); darope@0: RETURN_META_VALUE(MRES_IGNORED, ""); darope@0: } darope@0: void PlayerCustomization_Post( edict_t *pEntity, customization_t *pCust ) { darope@0: DLL_TRACE(pfnPlayerCustomization, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void SpectatorConnect_Post( edict_t *pEntity ) { darope@0: DLL_TRACE(pfnSpectatorConnect, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void SpectatorDisconnect_Post( edict_t *pEntity ) { darope@0: DLL_TRACE(pfnSpectatorDisconnect, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void SpectatorThink_Post( edict_t *pEntity ) { darope@0: DLL_TRACE(pfnSpectatorThink, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void Sys_Error_Post( const char *error_string ) { darope@0: DLL_TRACE(pfnSys_Error, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: darope@0: // from SDK pm_shared/pm_shared.c: darope@0: void PM_Move_Post( struct playermove_s *ppmove, int server ) { darope@0: DLL_TRACE(pfnPM_Move, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void PM_Init_Post( struct playermove_s *ppmove ) { darope@0: DLL_TRACE(pfnPM_Init, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } ds@265: char PM_FindTextureType_Post( const char *name ) { darope@0: DLL_TRACE(pfnPM_FindTextureType, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, '\0'); darope@0: } darope@0: darope@0: // from SDK dlls/client.cpp: darope@0: void SetupVisibility_Post( edict_t *pViewEntity, edict_t *pClient, unsigned char **pvs, unsigned char **pas ) { darope@0: DLL_TRACE(pfnSetupVisibility, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void UpdateClientData_Post ( const struct edict_s *ent, int sendweapons, struct clientdata_s *cd ) { darope@0: DLL_TRACE(pfnUpdateClientData, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: int AddToFullPack_Post( struct entity_state_s *state, int e, edict_t *ent, edict_t *host, int hostflags, int player, unsigned char *pSet ) { darope@0: DLL_TRACE(pfnAddToFullPack, P_POST, ("returning %d", META_RESULT_ORIG_RET(int))); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: void CreateBaseline_Post( int player, int eindex, struct entity_state_s *baseline, struct edict_s *entity, int playermodelindex, vec3_t player_mins, vec3_t player_maxs ) { darope@0: DLL_TRACE(pfnCreateBaseline, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void RegisterEncoders_Post( void ) { darope@0: DLL_TRACE(pfnRegisterEncoders, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: int GetWeaponData_Post( struct edict_s *player, struct weapon_data_s *info ) { darope@0: DLL_TRACE(pfnGetWeaponData, P_POST, ("returning %d", META_RESULT_ORIG_RET(int))); darope@0: RETURN_META_VALUE(MRES_IGNORED, 1); darope@0: } darope@0: void CmdStart_Post( const edict_t *player, const struct usercmd_s *cmd, unsigned int random_seed ) { darope@0: DLL_TRACE(pfnCmdStart, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void CmdEnd_Post ( const edict_t *player ) { darope@0: DLL_TRACE(pfnCmdEnd, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: int ConnectionlessPacket_Post( const struct netadr_s *net_from, const char *args, char *response_buffer, int *response_buffer_size ) { darope@0: DLL_TRACE(pfnConnectionlessPacket, P_POST, ("returning %d", META_RESULT_ORIG_RET(int))); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: int GetHullBounds_Post( int hullnumber, float *mins, float *maxs ) { darope@0: DLL_TRACE(pfnGetHullBounds, P_POST, ("returning %d", META_RESULT_ORIG_RET(int))); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: void CreateInstancedBaselines_Post ( void ) { darope@0: DLL_TRACE(pfnCreateInstancedBaselines, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: int InconsistentFile_Post( const edict_t *player, const char *filename, char *disconnect_message ) { darope@0: DLL_TRACE(pfnInconsistentFile, P_POST, ("returning %d, message=%s", META_RESULT_ORIG_RET(int), disconnect_message)); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: int AllowLagCompensation_Post( void ) { darope@0: DLL_TRACE(pfnAllowLagCompensation, P_POST, ("returning %d", META_RESULT_ORIG_RET(int))); darope@0: RETURN_META_VALUE(MRES_IGNORED, 1); darope@0: } darope@0: darope@0: darope@0: // from SDK ? darope@0: void OnFreeEntPrivateData_Post(edict_t *pEnt) { darope@0: NEWDLL_TRACE(pfnOnFreeEntPrivateData, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void GameShutdown_Post(void) { darope@0: NEWDLL_TRACE(pfnGameShutdown, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: int ShouldCollide_Post(edict_t *pentTouched, edict_t *pentOther) { darope@0: NEWDLL_TRACE(pfnShouldCollide, P_POST, ("returning %d", META_RESULT_ORIG_RET(int))); darope@0: RETURN_META_VALUE(MRES_IGNORED, 1); darope@0: } darope@0: darope@249: // Added 2005-08-11 (no SDK update) darope@248: void CvarValue_Post(const edict_t *pEdict, const char *szValue) darope@248: { darope@248: NEWDLL_TRACE(pfnCvarValue, P_POST, ("")); darope@248: RETURN_META(MRES_IGNORED); darope@248: } darope@248: darope@249: // Added 2005-11-22 (no SDK update) darope@249: void CvarValue2_Post(const edict_t *pEdict, int requestID, const char *cvarName, const char *value) { darope@249: NEWDLL_TRACE(pfnCvarValue2, P_POST, ("player=%s, requestID=%d, cvar=%s, value=%s", darope@249: STRING(pEdict->v.netname), requestID, cvarName?cvarName:"nil", value?value:"nil")); darope@249: RETURN_META(MRES_IGNORED); darope@249: } darope@249: darope@0: darope@0: // from SDK dlls/cbase.cpp: darope@0: // (wd) indicates my comments on the functions darope@0: static DLL_FUNCTIONS gFunctionTable_Post = darope@0: { darope@0: GameDLLInit_Post, //! pfnGameInit() Initialize the game (one-time call after loading of game .dll) darope@0: DispatchSpawn_Post, //! pfnSpawn() darope@0: DispatchThink_Post, //! pfnThink() darope@0: DispatchUse_Post, //! pfnUse() darope@0: DispatchTouch_Post, //! pfnTouch() darope@0: DispatchBlocked_Post, //! pfnBlocked() darope@0: DispatchKeyValue_Post, //! pfnKeyValue() darope@0: DispatchSave_Post, //! pfnSave() darope@0: DispatchRestore_Post, //! pfnRestore() darope@0: DispatchObjectCollsionBox_Post, //! pfnSetAbsBox() darope@0: darope@0: SaveWriteFields_Post, //! pfnSaveWriteFields() darope@0: SaveReadFields_Post, //! pfnSaveReadFields() darope@0: darope@0: SaveGlobalState_Post, //! pfnSaveGlobalState() darope@0: RestoreGlobalState_Post, //! pfnRestoreGlobalState() darope@0: ResetGlobalState_Post, //! pfnResetGlobalState() darope@0: darope@0: ClientConnect_Post, //! pfnClientConnect() (wd) Client has connected darope@0: ClientDisconnect_Post, //! pfnClientDisconnect() (wd) Player has left the game darope@0: ClientKill_Post, //! pfnClientKill() (wd) Player has typed "kill" darope@0: ClientPutInServer_Post, //! pfnClientPutInServer() (wd) Client is entering the game darope@0: ClientCommand_Post, //! pfnClientCommand() (wd) Player has sent a command (typed, or from a bind) darope@0: ClientUserInfoChanged_Post, //! pfnClientUserInfoChanged() (wd) Client has updated their setinfo structure darope@0: ServerActivate_Post, //! pfnServerActivate() (wd) Server is starting a new map darope@0: ServerDeactivate_Post, //! pfnServerDeactivate() (wd) Server is leaving the map (shutdown, or changelevel); SDK2 darope@0: darope@0: PlayerPreThink_Post, //! pfnPlayerPreThink() darope@0: PlayerPostThink_Post, //! pfnPlayerPostThink() darope@0: darope@0: StartFrame_Post, //! pfnStartFrame() darope@0: ParmsNewLevel_Post, //! pfnParmsNewLevel() darope@0: ParmsChangeLevel_Post, //! pfnParmsChangeLevel() darope@0: darope@0: GetGameDescription_Post, //! pfnGetGameDescription() Returns string describing current .dll. E.g. "TeamFotrress 2", "Half-Life" darope@0: PlayerCustomization_Post, //! pfnPlayerCustomization() Notifies .dll of new customization for player. darope@0: darope@0: SpectatorConnect_Post, //! pfnSpectatorConnect() Called when spectator joins server darope@0: SpectatorDisconnect_Post, //! pfnSpectatorDisconnect() Called when spectator leaves the server darope@0: SpectatorThink_Post, //! pfnSpectatorThink() Called when spectator sends a command packet (usercmd_t) darope@0: darope@0: Sys_Error_Post, //! pfnSys_Error() Notify game .dll that engine is going to shut down. Allows mod authors to set a breakpoint. SDK2 darope@0: darope@0: PM_Move_Post, //! pfnPM_Move() (wd) SDK2 darope@0: PM_Init_Post, //! pfnPM_Init() Server version of player movement initialization; (wd) SDK2 darope@0: PM_FindTextureType_Post, //! pfnPM_FindTextureType() (wd) SDK2 darope@0: darope@0: SetupVisibility_Post, //! pfnSetupVisibility() Set up PVS and PAS for networking for this client; (wd) SDK2 darope@0: UpdateClientData_Post, //! pfnUpdateClientData() Set up data sent only to specific client; (wd) SDK2 darope@0: AddToFullPack_Post, //! pfnAddToFullPack() (wd) SDK2 darope@0: CreateBaseline_Post, //! pfnCreateBaseline() Tweak entity baseline for network encoding, allows setup of player baselines, too.; (wd) SDK2 darope@0: RegisterEncoders_Post, //! pfnRegisterEncoders() Callbacks for network encoding; (wd) SDK2 darope@0: GetWeaponData_Post, //! pfnGetWeaponData() (wd) SDK2 darope@0: CmdStart_Post, //! pfnCmdStart() (wd) SDK2 darope@0: CmdEnd_Post, //! pfnCmdEnd() (wd) SDK2 darope@0: ConnectionlessPacket_Post, //! pfnConnectionlessPacket() (wd) SDK2 darope@0: GetHullBounds_Post, //! pfnGetHullBounds() (wd) SDK2 darope@0: CreateInstancedBaselines_Post, //! pfnCreateInstancedBaselines() (wd) SDK2 darope@0: InconsistentFile_Post, //! pfnInconsistentFile() (wd) SDK2 darope@0: AllowLagCompensation_Post, //! pfnAllowLagCompensation() (wd) SDK2 darope@0: }; darope@0: darope@0: C_DLLEXPORT int GetEntityAPI_Post( DLL_FUNCTIONS *pFunctionTable, int interfaceVersion ) darope@0: { darope@0: LOG_DEVELOPER(PLID, "called: GetEntityAPI_Post; version=%d", interfaceVersion); darope@0: if(!pFunctionTable) { darope@0: LOG_ERROR(PLID, "GetEntityAPI_Post called with null pFunctionTable"); darope@0: return(FALSE); darope@0: } darope@0: else if(interfaceVersion != INTERFACE_VERSION) { darope@0: LOG_ERROR(PLID, "GetEntityAPI_Post version mismatch; requested=%d ours=%d", interfaceVersion, INTERFACE_VERSION); darope@0: return(FALSE); darope@0: } darope@0: memcpy(pFunctionTable, &gFunctionTable_Post, sizeof( DLL_FUNCTIONS ) ); darope@0: return(TRUE); darope@0: } darope@0: darope@0: C_DLLEXPORT int GetEntityAPI2_Post( DLL_FUNCTIONS *pFunctionTable, int *interfaceVersion ) darope@0: { darope@0: LOG_DEVELOPER(PLID, "called: GetEntityAPI2_Post; version=%d", *interfaceVersion); darope@0: if(!pFunctionTable) { darope@0: LOG_ERROR(PLID, "GetEntityAPI2_Post called with null pFunctionTable"); darope@0: return(FALSE); darope@0: } darope@0: else if(*interfaceVersion != INTERFACE_VERSION) { darope@0: LOG_ERROR(PLID, "GetEntityAPI2_Post version mismatch; requested=%d ours=%d", *interfaceVersion, INTERFACE_VERSION); darope@0: //! Tell engine what version we had, so it can figure out who is out of date. darope@0: *interfaceVersion = INTERFACE_VERSION; darope@0: return(FALSE); darope@0: } darope@0: memcpy( pFunctionTable, &gFunctionTable_Post, sizeof( DLL_FUNCTIONS ) ); darope@0: return(TRUE); darope@0: } darope@0: darope@0: darope@0: static NEW_DLL_FUNCTIONS gNewFunctionTable_Post = darope@0: { darope@0: OnFreeEntPrivateData_Post, //! pfnOnFreeEntPrivateData() Called right before the object's memory is freed. Calls its destructor. darope@0: GameShutdown_Post, //! pfnGameShutdown() darope@0: ShouldCollide_Post, //! pfnShouldCollide() darope@248: CvarValue_Post, //! pfnCvarValue() darope@249: CvarValue2_Post, //! pfnCvarValue2() darope@0: }; darope@0: darope@0: C_DLLEXPORT int GetNewDLLFunctions_Post( NEW_DLL_FUNCTIONS *pNewFunctionTable, int *interfaceVersion ) darope@0: { darope@0: LOG_DEVELOPER(PLID, "called: GetNewDLLFunctions_Post; version=%d", *interfaceVersion); darope@0: if(!pNewFunctionTable) { darope@0: LOG_ERROR(PLID, "GetNewDLLFunctions_Post called with null pNewFunctionTable"); darope@0: return(FALSE); darope@0: } darope@0: else if(*interfaceVersion != NEW_DLL_FUNCTIONS_VERSION) { darope@0: LOG_ERROR(PLID, "GetNewDLLFunctions_Post version mismatch; requested=%d ours=%d", *interfaceVersion, NEW_DLL_FUNCTIONS_VERSION); darope@0: //! Tell engine what version we had, so it can figure out who is out of date. darope@0: *interfaceVersion = NEW_DLL_FUNCTIONS_VERSION; darope@0: return(FALSE); darope@0: } darope@0: memcpy(pNewFunctionTable, &gNewFunctionTable_Post, sizeof(NEW_DLL_FUNCTIONS)); darope@0: return TRUE; darope@0: }