Continued work on the forward registering stuff

This commit is contained in:
Johnny Bergström 2004-08-03 19:45:48 +00:00
parent 453d8d8f47
commit 98f946c544

View File

@ -413,63 +413,189 @@ static cell AMX_NATIVE_CALL register_forward(AMX *amx, cell *params)
case FM_PlaybackEvent: case FM_PlaybackEvent:
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_CELL, FP_CELL, FP_FLOAT, FP_ARRAY, FP_ARRAY, FP_FLOAT, FP_FLOAT, FP_CELL, FP_CELL, FP_CELL, FP_CELL, FP_DONE); fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_CELL, FP_CELL, FP_FLOAT, FP_ARRAY, FP_ARRAY, FP_FLOAT, FP_FLOAT, FP_CELL, FP_CELL, FP_CELL, FP_CELL, FP_DONE);
break; break;
#if 0 //EngFunc_CheckVisibility, //) ( const edict_t *entity, unsigned char *pset );
EngFunc_CheckVisibility, //) ( const edict_t *entity, unsigned char *pset ); case FM_CheckVisibility:
EngFunc_GetCurrentPlayer, //) ( void ); fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_STRING, FP_DONE);
EngFunc_CanSkipPlayer, //) ( const edict_t *player ); break;
EngFunc_SetGroupMask, //) ( int mask, int op ); //EngFunc_GetCurrentPlayer, //) ( void );
EngFunc_GetClientListening, // bool (int iReceiver, int iSender) case FM_GetCurrentPlayer:
EngFunc_SetClientListening, // bool (int iReceiver, int iSender, bool Listen) fId = MF_RegisterSPForwardByName(amx, funcname, FP_DONE);
EngFunc_MessageBegin, // void (int msg_dest, int msg_type, const float *pOrigin, edict_t *ed) break;
EngFunc_WriteCoord, // void (float) //EngFunc_CanSkipPlayer, //) ( const edict_t *player );
EngFunc_WriteAngle, // void (float) case FM_CanSkipPlayer:
EngFunc_InfoKeyValue, // char* ) (char *infobuffer, char *key); fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_DONE);
EngFunc_SetKeyValue, // void ) (char *infobuffer, char *key, char *value); break;
EngFunc_SetClientKeyValue // void ) (int clientIndex, char *infobuffer, char *key, char *value); //EngFunc_SetGroupMask, //) ( int mask, int op );
DLLFunc_GameInit, // void) ( void ); case FM_SetGroupMask:
DLLFunc_Spawn, // int ) ( edict_t *pent ); fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_CELL, FP_DONE);
DLLFunc_Think, // void ) ( edict_t *pent ); break;
DLLFunc_Use, // void ) ( edict_t *pentUsed, edict_t *pentOther ); //EngFunc_GetClientListening, // bool (int iReceiver, int iSender)
DLLFunc_Touch, // void ) ( edict_t *pentTouched, edict_t *pentOther ); case FM_GetClientListening:
DLLFunc_Blocked, // void ) ( edict_t *pentBlocked, edict_t *pentOther ); fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_CELL, FP_DONE);
DLLFunc_KeyValue, // void ) ( edict_t *pentKeyvalue, KeyValueData *pkvd ); break;
DLLFunc_SetAbsBox, // void ) ( edict_t *pent ); //EngFunc_SetClientListening, // bool (int iReceiver, int iSender, bool Listen)
DLLFunc_ClientConnect, // bool) ( edict_t *pEntity, const char *pszName, const char *pszAddress, char szRejectReason[ 128 ] ); case FM_SetClientListening:
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_CELL, FP_CELL, FP_DONE); // TODO: bool as cell 3rd arg?
break;
//EngFunc_MessageBegin, // void (int msg_dest, int msg_type, const float *pOrigin, edict_t *ed)
case FM_MessageBegin:
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_CELL, FP_ARRAY, FP_CELL, FP_DONE);
break;
//EngFunc_WriteCoord, // void (float)
case FM_WriteCoord:
fId = MF_RegisterSPForwardByName(amx, funcname, FP_FLOAT, FP_DONE);
break;
//EngFunc_WriteAngle, // void (float)
case FM_WriteAngle:
fId = MF_RegisterSPForwardByName(amx, funcname, FP_FLOAT, FP_DONE);
break;
//EngFunc_InfoKeyValue, // char* ) (char *infobuffer, char *key);
case FM_InfoKeyValue:
fId = MF_RegisterSPForwardByName(amx, funcname, FP_STRING, FP_STRING, FP_DONE);
break;
//EngFunc_SetKeyValue, // void ) (char *infobuffer, char *key, char *value);
case FM_SetKeyValue:
fId = MF_RegisterSPForwardByName(amx, funcname, FP_STRING, FP_STRING, FP_STRING, FP_DONE);
break;
//EngFunc_SetClientKeyValue // void ) (int clientIndex, char *infobuffer, char *key, char *value);
case FM_SetClientKeyValue:
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_STRING, FP_STRING, FP_STRING, FP_DONE);
break;
//DLLFunc_GameInit, // void) ( void );
case FM_GameInit:
fId = MF_RegisterSPForwardByName(amx, funcname, FP_DONE);
break;
//DLLFunc_Spawn, // int ) ( edict_t *pent );
case FM_Spawn:
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_DONE);
break;
//DLLFunc_Think, // void ) ( edict_t *pent );
case FM_Think:
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_DONE);
break;
//DLLFunc_Use, // void ) ( edict_t *pentUsed, edict_t *pentOther );
case FM_Use:
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_CELL, FP_DONE);
break;
//DLLFunc_Touch, // void ) ( edict_t *pentTouched, edict_t *pentOther );
case FM_Touch:
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_CELL, FP_DONE);
break;
//DLLFunc_Blocked, // void ) ( edict_t *pentBlocked, edict_t *pentOther );
case FM_Blocked:
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_CELL, FP_DONE);
break;
//DLLFunc_KeyValue, // void ) ( edict_t *pentKeyvalue, KeyValueData *pkvd );
/*
case FM_KeyValue:
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_????, FP_DONE); // TODO: undefined structure?
break;
*/
//DLLFunc_SetAbsBox, // void ) ( edict_t *pent );
case FM_SetAbsBox:
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_DONE);
break;
DLLFunc_ClientDisconnect, // void ) ( edict_t *pEntity ); //DLLFunc_ClientConnect, // bool) ( edict_t *pEntity, const char *pszName, const char *pszAddress, char szRejectReason[ 128 ] );
DLLFunc_ClientKill, // void ) ( edict_t *pEntity ); case FM_ClientConnect:
DLLFunc_ClientPutInServer, // void ) ( edict_t *pEntity ); fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_STRING, FP_STRING, FP_STRING, FP_DONE); // TODO: 4th arg must be of set size 128?
DLLFunc_ClientCommand, // void ) ( edict_t *pEntity ); break;
//DLLFunc_ClientDisconnect, // void ) ( edict_t *pEntity );
case FM_ClientDisconnect:
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_DONE);
break;
//DLLFunc_ClientKill, // void ) ( edict_t *pEntity );
case FM_ClientKill:
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_DONE);
break;
//DLLFunc_ClientPutInServer, // void ) ( edict_t *pEntity );
case FM_ClientPutInServer:
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_DONE);
break;
//DLLFunc_ClientCommand, // void ) ( edict_t *pEntity );
case FM_ClientCommand:
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_DONE);
break;
DLLFunc_ServerDeactivate, // void) ( void ); //DLLFunc_ServerDeactivate, // void) ( void );
case FM_ServerDeactivate:
fId = MF_RegisterSPForwardByName(amx, funcname, FP_DONE);
break;
DLLFunc_PlayerPreThink, // void ) ( edict_t *pEntity ); //DLLFunc_PlayerPreThink, // void ) ( edict_t *pEntity );
DLLFunc_PlayerPostThink, // void ) ( edict_t *pEntity ); case FM_PlayerPreThink:
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_DONE);
break;
//DLLFunc_PlayerPostThink, // void ) ( edict_t *pEntity );
case FM_PlayerPostThink:
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_DONE);
break;
DLLFunc_StartFrame, // void ) ( void ); //DLLFunc_StartFrame, // void ) ( void );
DLLFunc_ParmsNewLevel, // void ) ( void ); case FM_StartFrame:
DLLFunc_ParmsChangeLevel, // void ) ( void ); fId = MF_RegisterSPForwardByName(amx, funcname, FP_DONE);
break;
//DLLFunc_ParmsNewLevel, // void ) ( void );
case FM_ParmsNewLevel:
fId = MF_RegisterSPForwardByName(amx, funcname, FP_DONE);
break;
//DLLFunc_ParmsChangeLevel, // void ) ( void );
case FM_ParmsChangeLevel:
fId = MF_RegisterSPForwardByName(amx, funcname, FP_DONE);
break;
// Returns string describing current .dll. E.g., TeamFotrress 2, Half-Life // Returns string describing current .dll. E.g., TeamFotrress 2, Half-Life
DLLFunc_GetGameDescription, // const char * )( void ); //DLLFunc_GetGameDescription, // const char * )( void );
case FM_GetGameDescription:
fId = MF_RegisterSPForwardByName(amx, funcname, FP_DONE);
break;
// Spectator funcs // Spectator funcs
DLLFunc_SpectatorConnect, // void) ( edict_t *pEntity ); //DLLFunc_SpectatorConnect, // void) ( edict_t *pEntity );
DLLFunc_SpectatorDisconnect, // void ) ( edict_t *pEntity ); case FM_SpectatorConnect:
DLLFunc_SpectatorThink, // void ) ( edict_t *pEntity ); fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_DONE);
break;
//DLLFunc_SpectatorDisconnect, // void ) ( edict_t *pEntity );
case FM_SpectatorDisconnect:
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_DONE);
break;
//DLLFunc_SpectatorThink, // void ) ( edict_t *pEntity );
case FM_SpectatorThink:
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_DONE);
break;
// Notify game .dll that engine is going to shut down. Allows mod authors to set a breakpoint. // Notify game .dll that engine is going to shut down. Allows mod authors to set a breakpoint.
DLLFunc_Sys_Error, // void ) ( const char *error_string ); //DLLFunc_Sys_Error, // void ) ( const char *error_string );
case FM_Sys_Error:
fId = MF_RegisterSPForwardByName(amx, funcname, FP_STRING, FP_DONE);
break;
DLLFunc_PM_FindTextureType, // char )( char *name ); //DLLFunc_PM_FindTextureType, // char )( char *name );
DLLFunc_RegisterEncoders, // void ) ( void ); case FM_PM_FindTextureType:
fId = MF_RegisterSPForwardByName(amx, funcname, FP_STRING, FP_DONE);
break;
//DLLFunc_RegisterEncoders, // void ) ( void );
case FM_RegisterEncoders:
fId = MF_RegisterSPForwardByName(amx, funcname, FP_DONE);
break;
// Enumerates player hulls. Returns 0 if the hull number doesn't exist, 1 otherwise // Enumerates player hulls. Returns 0 if the hull number doesn't exist, 1 otherwise
DLLFunc_GetHullBounds, // int) ( int hullnumber, float *mins, float *maxs ); //DLLFunc_GetHullBounds, // int) ( int hullnumber, float *mins, float *maxs );
case FM_GetHullBounds:
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_ARRAY, FP_ARRAY, FP_DONE);
break;
// Create baselines for certain "unplaced" items. // Create baselines for certain "unplaced" items.
DLLFunc_CreateInstancedBaselines, // void ) ( void ); //DLLFunc_CreateInstancedBaselines, // void ) ( void );
DLLFunc_pfnAllowLagCompensation, // int )( void ); case FM_CreateInstancedBaselines:
fId = MF_RegisterSPForwardByName(amx, funcname, FP_DONE);
break;
//DLLFunc_pfnAllowLagCompensation, // int )( void );
case FM_pfnAllowLagCompensation:
fId = MF_RegisterSPForwardByName(amx, funcname, FP_DONE);
break;
#if 0
// I know this does not fit with DLLFUNC(), but I dont want another native just for it. // I know this does not fit with DLLFUNC(), but I dont want another native just for it.
MetaFunc_CallGameEntity // bool (plid_t plid, const char *entStr,entvars_t *pev); MetaFunc_CallGameEntity // bool (plid_t plid, const char *entStr,entvars_t *pev);
#endif #endif