diff --git a/dlls/BB/amxxmodule.cpp b/dlls/BB/amxxmodule.cpp deleted file mode 100644 index c38a396b..00000000 --- a/dlls/BB/amxxmodule.cpp +++ /dev/null @@ -1,3051 +0,0 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* Parts Copyright (C) 2001-2003 Will Day -* -* This program is free software; you can redistribute it and/or modify it -* under the terms of the GNU General Public License as published by the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -* -* Description: AMX Mod X Module Interface Functions -*/ - -#include -#include -#include -#include -#include -#include "amxxmodule.h" - -/************* METAMOD SUPPORT *************/ -#ifdef USE_METAMOD - -enginefuncs_t g_engfuncs; -globalvars_t *gpGlobals; - - - -DLL_FUNCTIONS *g_pFunctionTable; -DLL_FUNCTIONS *g_pFunctionTable_Post; -enginefuncs_t *g_pengfuncsTable; -enginefuncs_t *g_pengfuncsTable_Post; -NEW_DLL_FUNCTIONS *g_pNewFunctionsTable; -NEW_DLL_FUNCTIONS *g_pNewFunctionsTable_Post; - - -// GetEntityAPI2 functions -static DLL_FUNCTIONS g_EntityAPI_Table = -{ -#ifdef FN_GameDLLInit - FN_GameDLLInit, -#else - NULL, -#endif -#ifdef FN_DispatchSpawn - FN_DispatchSpawn, -#else - NULL, -#endif -#ifdef FN_DispatchThink - FN_DispatchThink, -#else - NULL, -#endif -#ifdef FN_DispatchUse - FN_DispatchUse, -#else - NULL, -#endif -#ifdef FN_DispatchTouch - FN_DispatchTouch, -#else - NULL, -#endif -#ifdef FN_DispatchBlocked - FN_DispatchBlocked, -#else - NULL, -#endif -#ifdef FN_DispatchKeyValue - FN_DispatchKeyValue, -#else - NULL, -#endif -#ifdef FN_DispatchSave - FN_DispatchSave, -#else - NULL, -#endif -#ifdef FN_DispatchRestore - FN_DispatchRestore, -#else - NULL, -#endif -#ifdef FN_DispatchObjectCollsionBox - FN_DispatchObjectCollsionBox, -#else - NULL, -#endif -#ifdef FN_SaveWriteFields - FN_SaveWriteFields, -#else - NULL, -#endif -#ifdef FN_SaveReadFields - FN_SaveReadFields, -#else - NULL, -#endif -#ifdef FN_SaveGlobalState - FN_SaveGlobalState, -#else - NULL, -#endif -#ifdef FN_RestoreGlobalState - FN_RestoreGlobalState, -#else - NULL, -#endif -#ifdef FN_ResetGlobalState - FN_ResetGlobalState, -#else - NULL, -#endif -#ifdef FN_ClientConnect - FN_ClientConnect, -#else - NULL, -#endif -#ifdef FN_ClientDisconnect - FN_ClientDisconnect, -#else - NULL, -#endif -#ifdef FN_ClientKill - FN_ClientKill, -#else - NULL, -#endif -#ifdef FN_ClientPutInServer - FN_ClientPutInServer, -#else - NULL, -#endif -#ifdef FN_ClientCommand - FN_ClientCommand, -#else - NULL, -#endif -#ifdef FN_ClientUserInfoChanged - FN_ClientUserInfoChanged, -#else - NULL, -#endif -#ifdef FN_ServerActivate - FN_ServerActivate, -#else - NULL, -#endif -#ifdef FN_ServerDeactivate - FN_ServerDeactivate, -#else - NULL, -#endif -#ifdef FN_PlayerPreThink - FN_PlayerPreThink, -#else - NULL, -#endif -#ifdef FN_PlayerPostThink - FN_PlayerPostThink, -#else - NULL, -#endif -#ifdef FN_StartFrame - FN_StartFrame, -#else - NULL, -#endif -#ifdef FN_ParmsNewLevel - FN_ParmsNewLevel, -#else - NULL, -#endif -#ifdef FN_ParmsChangeLevel - FN_ParmsChangeLevel, -#else - NULL, -#endif -#ifdef FN_GetGameDescription - FN_GetGameDescription, -#else - NULL, -#endif -#ifdef FN_PlayerCustomization - FN_PlayerCustomization, -#else - NULL, -#endif -#ifdef FN_SpectatorConnect - FN_SpectatorConnect, -#else - NULL, -#endif -#ifdef FN_SpectatorDisconnect - FN_SpectatorDisconnect, -#else - NULL, -#endif -#ifdef FN_SpectatorThink - FN_SpectatorThink, -#else - NULL, -#endif -#ifdef FN_Sys_Error - FN_Sys_Error, -#else - NULL, -#endif -#ifdef FN_PM_Move - FN_PM_Move, -#else - NULL, -#endif -#ifdef FN_PM_Init - FN_PM_Init, -#else - NULL, -#endif -#ifdef FN_PM_FindTextureType - FN_PM_FindTextureType, -#else - NULL, -#endif -#ifdef FN_SetupVisibility - FN_SetupVisibility, -#else - NULL, -#endif -#ifdef FN_UpdateClientData - FN_UpdateClientData, -#else - NULL, -#endif -#ifdef FN_AddToFullPack - FN_AddToFullPack, -#else - NULL, -#endif -#ifdef FN_CreateBaseline - FN_CreateBaseline, -#else - NULL, -#endif -#ifdef FN_RegisterEncoders - FN_RegisterEncoders, -#else - NULL, -#endif -#ifdef FN_GetWeaponData - FN_GetWeaponData, -#else - NULL, -#endif -#ifdef FN_CmdStart - FN_CmdStart, -#else - NULL, -#endif -#ifdef FN_CmdEnd - FN_CmdEnd, -#else - NULL, -#endif -#ifdef FN_ConnectionlessPacket - FN_ConnectionlessPacket, -#else - NULL, -#endif -#ifdef FN_GetHullBounds - FN_GetHullBounds, -#else - NULL, -#endif -#ifdef FN_CreateInstancedBaselines - FN_CreateInstancedBaselines, -#else - NULL, -#endif -#ifdef FN_InconsistentFile - FN_InconsistentFile, -#else - NULL, -#endif -#ifdef FN_AllowLagCompensation - FN_AllowLagCompensation -#else - NULL -#endif -}; // g_EntityAPI2_Table - -// GetEntityAPI2_Post functions -static DLL_FUNCTIONS g_EntityAPI_Post_Table = -{ -#ifdef FN_GameDLLInit_Post - FN_GameDLLInit_Post, -#else - NULL, -#endif -#ifdef FN_DispatchSpawn_Post - FN_DispatchSpawn_Post, -#else - NULL, -#endif -#ifdef FN_DispatchThink_Post - FN_DispatchThink_Post, -#else - NULL, -#endif -#ifdef FN_DispatchUse_Post - FN_DispatchUse_Post, -#else - NULL, -#endif -#ifdef FN_DispatchTouch_Post - FN_DispatchTouch_Post, -#else - NULL, -#endif -#ifdef FN_DispatchBlocked_Post - FN_DispatchBlocked_Post, -#else - NULL, -#endif -#ifdef FN_DispatchKeyValue_Post - FN_DispatchKeyValue_Post, -#else - NULL, -#endif -#ifdef FN_DispatchSave_Post - FN_DispatchSave_Post, -#else - NULL, -#endif -#ifdef FN_DispatchRestore_Post - FN_DispatchRestore_Post, -#else - NULL, -#endif -#ifdef FN_DispatchObjectCollsionBox_Post - FN_DispatchObjectCollsionBox_Post, -#else - NULL, -#endif -#ifdef FN_SaveWriteFields_Post - FN_SaveWriteFields_Post, -#else - NULL, -#endif -#ifdef FN_SaveReadFields_Post - FN_SaveReadFields_Post, -#else - NULL, -#endif -#ifdef FN_SaveGlobalState_Post - FN_SaveGlobalState_Post, -#else - NULL, -#endif -#ifdef FN_RestoreGlobalState_Post - FN_RestoreGlobalState_Post, -#else - NULL, -#endif -#ifdef FN_ResetGlobalState_Post - FN_ResetGlobalState_Post, -#else - NULL, -#endif -#ifdef FN_ClientConnect_Post - FN_ClientConnect_Post, -#else - NULL, -#endif -#ifdef FN_ClientDisconnect_Post - FN_ClientDisconnect_Post, -#else - NULL, -#endif -#ifdef FN_ClientKill_Post - FN_ClientKill_Post, -#else - NULL, -#endif -#ifdef FN_ClientPutInServer_Post - FN_ClientPutInServer_Post, -#else - NULL, -#endif -#ifdef FN_ClientCommand_Post - FN_ClientCommand_Post, -#else - NULL, -#endif -#ifdef FN_ClientUserInfoChanged_Post - FN_ClientUserInfoChanged_Post, -#else - NULL, -#endif -#ifdef FN_ServerActivate_Post - FN_ServerActivate_Post, -#else - NULL, -#endif -#ifdef FN_ServerDeactivate_Post - FN_ServerDeactivate_Post, -#else - NULL, -#endif -#ifdef FN_PlayerPreThink_Post - FN_PlayerPreThink_Post, -#else - NULL, -#endif -#ifdef FN_PlayerPostThink_Post - FN_PlayerPostThink_Post, -#else - NULL, -#endif -#ifdef FN_StartFrame_Post - FN_StartFrame_Post, -#else - NULL, -#endif -#ifdef FN_ParmsNewLevel_Post - FN_ParmsNewLevel_Post, -#else - NULL, -#endif -#ifdef FN_ParmsChangeLevel_Post - FN_ParmsChangeLevel_Post, -#else - NULL, -#endif -#ifdef FN_GetGameDescription_Post - FN_GetGameDescription_Post, -#else - NULL, -#endif -#ifdef FN_PlayerCustomization_Post - FN_PlayerCustomization_Post, -#else - NULL, -#endif -#ifdef FN_SpectatorConnect_Post - FN_SpectatorConnect_Post, -#else - NULL, -#endif -#ifdef FN_SpectatorDisconnect_Post - FN_SpectatorDisconnect_Post, -#else - NULL, -#endif -#ifdef FN_SpectatorThink_Post - FN_SpectatorThink_Post, -#else - NULL, -#endif -#ifdef FN_Sys_Error_Post - FN_Sys_Error_Post, -#else - NULL, -#endif -#ifdef FN_PM_Move_Post - FN_PM_Move_Post, -#else - NULL, -#endif -#ifdef FN_PM_Init_Post - FN_PM_Init_Post, -#else - NULL, -#endif -#ifdef FN_PM_FindTextureType_Post - FN_PM_FindTextureType_Post, -#else - NULL, -#endif -#ifdef FN_SetupVisibility_Post - FN_SetupVisibility_Post, -#else - NULL, -#endif -#ifdef FN_UpdateClientData_Post - FN_UpdateClientData_Post, -#else - NULL, -#endif -#ifdef FN_AddToFullPack_Post - FN_AddToFullPack_Post, -#else - NULL, -#endif -#ifdef FN_CreateBaseline_Post - FN_CreateBaseline_Post, -#else - NULL, -#endif -#ifdef FN_RegisterEncoders_Post - FN_RegisterEncoders_Post, -#else - NULL, -#endif -#ifdef FN_GetWeaponData_Post - FN_GetWeaponData_Post, -#else - NULL, -#endif -#ifdef FN_CmdStart_Post - FN_CmdStart_Post, -#else - NULL, -#endif -#ifdef FN_CmdEnd_Post - FN_CmdEnd_Post, -#else - NULL, -#endif -#ifdef FN_ConnectionlessPacket_Post - FN_ConnectionlessPacket_Post, -#else - NULL, -#endif -#ifdef FN_GetHullBounds_Post - FN_GetHullBounds_Post, -#else - NULL, -#endif -#ifdef FN_CreateInstancedBaselines_Post - FN_CreateInstancedBaselines_Post, -#else - NULL, -#endif -#ifdef FN_InconsistentFile_Post - FN_InconsistentFile_Post, -#else - NULL, -#endif -#ifdef FN_AllowLagCompensation - FN_AllowLagCompensation, -#else - NULL, -#endif -}; // g_EntityAPI2_Table - -static enginefuncs_t g_EngineFuncs_Table = -{ -#ifdef FN_PrecacheModel - FN_PrecacheModel, -#else - NULL, -#endif -#ifdef FN_PrecacheSound - FN_PrecacheSound, -#else - NULL, -#endif -#ifdef FN_SetModel - FN_SetModel, -#else - NULL, -#endif -#ifdef FN_ModelIndex - FN_ModelIndex, -#else - NULL, -#endif -#ifdef FN_ModelFrames - FN_ModelFrames, -#else - NULL, -#endif -#ifdef FN_SetSize - FN_SetSize, -#else - NULL, -#endif -#ifdef FN_ChangeLevel - FN_ChangeLevel, -#else - NULL, -#endif -#ifdef FN_GetSpawnParms - FN_GetSpawnParms, -#else - NULL, -#endif -#ifdef FN_SaveSpawnParms - FN_SaveSpawnParms, -#else - NULL, -#endif -#ifdef FN_VecToYaw - FN_VecToYaw, -#else - NULL, -#endif -#ifdef FN_VecToAngles - FN_VecToAngles, -#else - NULL, -#endif -#ifdef FN_MoveToOrigin - FN_MoveToOrigin, -#else - NULL, -#endif -#ifdef FN_ChangeYaw - FN_ChangeYaw, -#else - NULL, -#endif -#ifdef FN_ChangePitch - FN_ChangePitch, -#else - NULL, -#endif -#ifdef FN_FindEntityByString - FN_FindEntityByString, -#else - NULL, -#endif -#ifdef FN_GetEntityIllum - FN_GetEntityIllum, -#else - NULL, -#endif -#ifdef FN_FindEntityInSphere - FN_FindEntityInSphere, -#else - NULL, -#endif -#ifdef FN_FindClientInPVS - FN_FindClientInPVS, -#else - NULL, -#endif -#ifdef FN_EntitiesInPVS - FN_EntitiesInPVS, -#else - NULL, -#endif -#ifdef FN_MakeVectors - FN_MakeVectors, -#else - NULL, -#endif -#ifdef FN_AngleVectors - FN_AngleVectors, -#else - NULL, -#endif -#ifdef FN_CreateEntity - FN_CreateEntity, -#else - NULL, -#endif -#ifdef FN_RemoveEntity - FN_RemoveEntity, -#else - NULL, -#endif -#ifdef FN_CreateNamedEntity - FN_CreateNamedEntity, -#else - NULL, -#endif -#ifdef FN_MakeStatic - FN_MakeStatic, -#else - NULL, -#endif -#ifdef FN_EntIsOnFloor - FN_EntIsOnFloor, -#else - NULL, -#endif -#ifdef FN_DropToFloor - FN_DropToFloor, -#else - NULL, -#endif -#ifdef FN_WalkMove - FN_WalkMove, -#else - NULL, -#endif -#ifdef FN_SetOrigin - FN_SetOrigin, -#else - NULL, -#endif -#ifdef FN_EmitSound - FN_EmitSound, -#else - NULL, -#endif -#ifdef FN_EmitAmbientSound - FN_EmitAmbientSound, -#else - NULL, -#endif -#ifdef FN_TraceLine - FN_TraceLine, -#else - NULL, -#endif -#ifdef FN_TraceToss - FN_TraceToss, -#else - NULL, -#endif -#ifdef FN_TraceMonsterHull - FN_TraceMonsterHull, -#else - NULL, -#endif -#ifdef FN_TraceHull - FN_TraceHull, -#else - NULL, -#endif -#ifdef FN_TraceModel - FN_TraceModel, -#else - NULL, -#endif -#ifdef FN_TraceTexture - FN_TraceTexture, -#else - NULL, -#endif -#ifdef FN_TraceSphere - FN_TraceSphere, -#else - NULL, -#endif -#ifdef FN_GetAimVector - FN_GetAimVector, -#else - NULL, -#endif -#ifdef FN_ServerCommand - FN_ServerCommand, -#else - NULL, -#endif -#ifdef FN_ServerExecute - FN_ServerExecute, -#else - NULL, -#endif -#ifdef FN_engClientCommand - FN_engClientCommand, -#else - NULL, -#endif -#ifdef FN_ParticleEffect - FN_ParticleEffect, -#else - NULL, -#endif -#ifdef FN_LightStyle - FN_LightStyle, -#else - NULL, -#endif -#ifdef FN_DecalIndex - FN_DecalIndex, -#else - NULL, -#endif -#ifdef FN_PointContents - FN_PointContents, -#else - NULL, -#endif -#ifdef FN_MessageBegin - FN_MessageBegin, -#else - NULL, -#endif -#ifdef FN_MessageEnd - FN_MessageEnd, -#else - NULL, -#endif -#ifdef FN_WriteByte - FN_WriteByte, -#else - NULL, -#endif -#ifdef FN_WriteChar - FN_WriteChar, -#else - NULL, -#endif -#ifdef FN_WriteShort - FN_WriteShort, -#else - NULL, -#endif -#ifdef FN_WriteLong - FN_WriteLong, -#else - NULL, -#endif -#ifdef FN_WriteAngle - FN_WriteAngle, -#else - NULL, -#endif -#ifdef FN_WriteCoord - FN_WriteCoord, -#else - NULL, -#endif -#ifdef FN_WriteString - FN_WriteString, -#else - NULL, -#endif -#ifdef FN_WriteEntity - FN_WriteEntity, -#else - NULL, -#endif -#ifdef FN_CVarRegister - FN_CVarRegister, -#else - NULL, -#endif -#ifdef FN_CVarGetFloat - FN_CVarGetFloat, -#else - NULL, -#endif -#ifdef FN_CVarGetString - FN_CVarGetString, -#else - NULL, -#endif -#ifdef FN_CVarSetFloat - FN_CVarSetFloat, -#else - NULL, -#endif -#ifdef FN_CVarSetString - FN_CVarSetString, -#else - NULL, -#endif -#ifdef FN_AlertMessage - FN_AlertMessage, -#else - NULL, -#endif -#ifdef FN_EngineFprintf - FN_EngineFprintf, -#else - NULL, -#endif -#ifdef FN_PvAllocEntPrivateData - FN_PvAllocEntPrivateData, -#else - NULL, -#endif -#ifdef FN_PvEntPrivateData - FN_PvEntPrivateData, -#else - NULL, -#endif -#ifdef FN_FreeEntPrivateData - FN_FreeEntPrivateData, -#else - NULL, -#endif -#ifdef FN_SzFromIndex - FN_SzFromIndex, -#else - NULL, -#endif -#ifdef FN_AllocString - FN_AllocString, -#else - NULL, -#endif -#ifdef FN_GetVarsOfEnt - FN_GetVarsOfEnt, -#else - NULL, -#endif -#ifdef FN_PEntityOfEntOffset - FN_PEntityOfEntOffset, -#else - NULL, -#endif -#ifdef FN_EntOffsetOfPEntity - FN_EntOffsetOfPEntity, -#else - NULL, -#endif -#ifdef FN_IndexOfEdict - FN_IndexOfEdict, -#else - NULL, -#endif -#ifdef FN_PEntityOfEntIndex - FN_PEntityOfEntIndex, -#else - NULL, -#endif -#ifdef FN_FindEntityByVars - FN_FindEntityByVars, -#else - NULL, -#endif -#ifdef FN_GetModelPtr - FN_GetModelPtr, -#else - NULL, -#endif -#ifdef FN_RegUserMsg - FN_RegUserMsg, -#else - NULL, -#endif -#ifdef FN_AnimationAutomove - FN_AnimationAutomove, -#else - NULL, -#endif -#ifdef FN_GetBonePosition - FN_GetBonePosition, -#else - NULL, -#endif -#ifdef FN_FunctionFromName - FN_FunctionFromName, -#else - NULL, -#endif -#ifdef FN_NameForFunction - FN_NameForFunction, -#else - NULL, -#endif -#ifdef FN_ClientPrintf - FN_ClientPrintf, -#else - NULL, -#endif -#ifdef FN_ServerPrint - FN_ServerPrint, -#else - NULL, -#endif -#ifdef FN_Cmd_Args - FN_Cmd_Args, -#else - NULL, -#endif -#ifdef FN_Cmd_Argv - FN_Cmd_Argv, -#else - NULL, -#endif -#ifdef FN_Cmd_Argc - FN_Cmd_Argc, -#else - NULL, -#endif -#ifdef FN_GetAttachment - FN_GetAttachment, -#else - NULL, -#endif -#ifdef FN_CRC32_Init - FN_CRC32_Init, -#else - NULL, -#endif -#ifdef FN_CRC32_ProcessBuffer - FN_CRC32_ProcessBuffer, -#else - NULL, -#endif -#ifdef FN_CRC32_ProcessByte - FN_CRC32_ProcessByte, -#else - NULL, -#endif -#ifdef FN_CRC32_Final - FN_CRC32_Final, -#else - NULL, -#endif -#ifdef FN_RandomLong - FN_RandomLong, -#else - NULL, -#endif -#ifdef FN_RandomFloat - FN_RandomFloat, -#else - NULL, -#endif -#ifdef FN_SetView - FN_SetView, -#else - NULL, -#endif -#ifdef FN_Time - FN_Time, -#else - NULL, -#endif -#ifdef FN_CrosshairAngle - FN_CrosshairAngle, -#else - NULL, -#endif -#ifdef FN_LoadFileForMe - FN_LoadFileForMe, -#else - NULL, -#endif -#ifdef FN_FreeFile - FN_FreeFile, -#else - NULL, -#endif -#ifdef FN_EndSection - FN_EndSection, -#else - NULL, -#endif -#ifdef FN_CompareFileTime - FN_CompareFileTime, -#else - NULL, -#endif -#ifdef FN_GetGameDir - FN_GetGameDir, -#else - NULL, -#endif -#ifdef FN_Cvar_RegisterVariable - FN_Cvar_RegisterVariable, -#else - NULL, -#endif -#ifdef FN_FadeClientVolume - FN_FadeClientVolume, -#else - NULL, -#endif -#ifdef FN_SetClientMaxspeed - FN_SetClientMaxspeed, -#else - NULL, -#endif -#ifdef FN_CreateFakeClient - FN_CreateFakeClient, -#else - NULL, -#endif -#ifdef FN_RunPlayerMove - FN_RunPlayerMove, -#else - NULL, -#endif -#ifdef FN_NumberOfEntities - FN_NumberOfEntities, -#else - NULL, -#endif -#ifdef FN_GetInfoKeyBuffer - FN_GetInfoKeyBuffer, -#else - NULL, -#endif -#ifdef FN_InfoKeyValue - FN_InfoKeyValue, -#else - NULL, -#endif -#ifdef FN_SetKeyValue - FN_SetKeyValue, -#else - NULL, -#endif -#ifdef FN_SetClientKeyValue - FN_SetClientKeyValue, -#else - NULL, -#endif -#ifdef FN_IsMapValid - FN_IsMapValid, -#else - NULL, -#endif -#ifdef FN_StaticDecal - FN_StaticDecal, -#else - NULL, -#endif -#ifdef FN_PrecacheGeneric - FN_PrecacheGeneric, -#else - NULL, -#endif -#ifdef FN_GetPlayerUserId - FN_GetPlayerUserId, -#else - NULL, -#endif -#ifdef FN_BuildSoundMsg - FN_BuildSoundMsg, -#else - NULL, -#endif -#ifdef FN_IsDedicatedServer - FN_IsDedicatedServer, -#else - NULL, -#endif -#ifdef FN_CVarGetPointer - FN_CVarGetPointer, -#else - NULL, -#endif -#ifdef FN_GetPlayerWONId - FN_GetPlayerWONId, -#else - NULL, -#endif -#ifdef FN_Info_RemoveKey - FN_Info_RemoveKey, -#else - NULL, -#endif -#ifdef FN_GetPhysicsKeyValue - FN_GetPhysicsKeyValue, -#else - NULL, -#endif -#ifdef FN_SetPhysicsKeyValue - FN_SetPhysicsKeyValue, -#else - NULL, -#endif -#ifdef FN_GetPhysicsInfoString - FN_GetPhysicsInfoString, -#else - NULL, -#endif -#ifdef FN_PrecacheEvent - FN_PrecacheEvent, -#else - NULL, -#endif -#ifdef FN_PlaybackEvent - FN_PlaybackEvent, -#else - NULL, -#endif -#ifdef FN_SetFatPVS - FN_SetFatPVS, -#else - NULL, -#endif -#ifdef FN_SetFatPAS - FN_SetFatPAS, -#else - NULL, -#endif -#ifdef FN_CheckVisibility - FN_CheckVisibility, -#else - NULL, -#endif -#ifdef FN_DeltaSetField - FN_DeltaSetField, -#else - NULL, -#endif -#ifdef FN_DeltaUnsetField - FN_DeltaUnsetField, -#else - NULL, -#endif -#ifdef FN_DeltaAddEncoder - FN_DeltaAddEncoder, -#else - NULL, -#endif -#ifdef FN_GetCurrentPlayer - FN_GetCurrentPlayer, -#else - NULL, -#endif -#ifdef FN_CanSkipPlayer - FN_CanSkipPlayer, -#else - NULL, -#endif -#ifdef FN_DeltaFindField - FN_DeltaFindField, -#else - NULL, -#endif -#ifdef FN_DeltaSetFieldByIndex - FN_DeltaSetFieldByIndex, -#else - NULL, -#endif -#ifdef FN_DeltaUnsetFieldByIndex - FN_DeltaUnsetFieldByIndex, -#else - NULL, -#endif -#ifdef FN_SetGroupMask - FN_SetGroupMask, -#else - NULL, -#endif -#ifdef FN_engCreateInstancedBaseline - FN_engCreateInstancedBaseline, -#else - NULL, -#endif -#ifdef FN_Cvar_DirectSet - FN_Cvar_DirectSet, -#else - NULL, -#endif -#ifdef FN_ForceUnmodified - FN_ForceUnmodified, -#else - NULL, -#endif -#ifdef FN_GetPlayerStats - FN_GetPlayerStats, -#else - NULL, -#endif -#ifdef FN_AddServerCommand - FN_AddServerCommand, -#else - NULL, -#endif -#ifdef FN_Voice_GetClientListening - FN_Voice_GetClientListening, -#else - NULL, -#endif -#ifdef FN_Voice_SetClientListening - FN_Voice_SetClientListening, -#else - NULL, -#endif -#ifdef FN_GetPlayerAuthId - FN_GetPlayerAuthId -#else - NULL -#endif -}; // g_EngineFuncs_Table - - -static enginefuncs_t g_EngineFuncs_Post_Table = -{ -#ifdef FN_PrecacheModel_Post - FN_PrecacheModel_Post, -#else - NULL, -#endif -#ifdef FN_PrecacheSound_Post - FN_PrecacheSound_Post, -#else - NULL, -#endif -#ifdef FN_SetModel_Post - FN_SetModel_Post, -#else - NULL, -#endif -#ifdef FN_ModelIndex_Post - FN_ModelIndex_Post, -#else - NULL, -#endif -#ifdef FN_ModelFrames_Post - FN_ModelFrames_Post, -#else - NULL, -#endif -#ifdef FN_SetSize_Post - FN_SetSize_Post, -#else - NULL, -#endif -#ifdef FN_ChangeLevel_Post - FN_ChangeLevel_Post, -#else - NULL, -#endif -#ifdef FN_GetSpawnParms_Post - FN_GetSpawnParms_Post, -#else - NULL, -#endif -#ifdef FN_SaveSpawnParms_Post - FN_SaveSpawnParms_Post, -#else - NULL, -#endif -#ifdef FN_VecToYaw_Post - FN_VecToYaw_Post, -#else - NULL, -#endif -#ifdef FN_VecToAngles_Post - FN_VecToAngles_Post, -#else - NULL, -#endif -#ifdef FN_MoveToOrigin_Post - FN_MoveToOrigin_Post, -#else - NULL, -#endif -#ifdef FN_ChangeYaw_Post - FN_ChangeYaw_Post, -#else - NULL, -#endif -#ifdef FN_ChangePitch_Post - FN_ChangePitch_Post, -#else - NULL, -#endif -#ifdef FN_FindEntityByString_Post - FN_FindEntityByString_Post, -#else - NULL, -#endif -#ifdef FN_GetEntityIllum_Post - FN_GetEntityIllum_Post, -#else - NULL, -#endif -#ifdef FN_FindEntityInSphere_Post - FN_FindEntityInSphere_Post, -#else - NULL, -#endif -#ifdef FN_FindClientInPVS_Post - FN_FindClientInPVS_Post, -#else - NULL, -#endif -#ifdef FN_EntitiesInPVS_Post - FN_EntitiesInPVS_Post, -#else - NULL, -#endif -#ifdef FN_MakeVectors_Post - FN_MakeVectors_Post, -#else - NULL, -#endif -#ifdef FN_AngleVectors_Post - FN_AngleVectors_Post, -#else - NULL, -#endif -#ifdef FN_CreateEntity_Post - FN_CreateEntity_Post, -#else - NULL, -#endif -#ifdef FN_RemoveEntity_Post - FN_RemoveEntity_Post, -#else - NULL, -#endif -#ifdef FN_CreateNamedEntity_Post - FN_CreateNamedEntity_Post, -#else - NULL, -#endif -#ifdef FN_MakeStatic_Post - FN_MakeStatic_Post, -#else - NULL, -#endif -#ifdef FN_EntIsOnFloor_Post - FN_EntIsOnFloor_Post, -#else - NULL, -#endif -#ifdef FN_DropToFloor_Post - FN_DropToFloor_Post, -#else - NULL, -#endif -#ifdef FN_WalkMove_Post - FN_WalkMove_Post, -#else - NULL, -#endif -#ifdef FN_SetOrigin_Post - FN_SetOrigin_Post, -#else - NULL, -#endif -#ifdef FN_EmitSound_Post - FN_EmitSound_Post, -#else - NULL, -#endif -#ifdef FN_EmitAmbientSound_Post - FN_EmitAmbientSound_Post, -#else - NULL, -#endif -#ifdef FN_TraceLine_Post - FN_TraceLine_Post, -#else - NULL, -#endif -#ifdef FN_TraceToss_Post - FN_TraceToss_Post, -#else - NULL, -#endif -#ifdef FN_TraceMonsterHull_Post - FN_TraceMonsterHull_Post, -#else - NULL, -#endif -#ifdef FN_TraceHull_Post - FN_TraceHull_Post, -#else - NULL, -#endif -#ifdef FN_TraceModel_Post - FN_TraceModel_Post, -#else - NULL, -#endif -#ifdef FN_TraceTexture_Post - FN_TraceTexture_Post, -#else - NULL, -#endif -#ifdef FN_TraceSphere_Post - FN_TraceSphere_Post, -#else - NULL, -#endif -#ifdef FN_GetAimVector_Post - FN_GetAimVector_Post, -#else - NULL, -#endif -#ifdef FN_ServerCommand_Post - FN_ServerCommand_Post, -#else - NULL, -#endif -#ifdef FN_ServerExecute_Post - FN_ServerExecute_Post, -#else - NULL, -#endif -#ifdef FN_engClientCommand_Post - FN_engClientCommand_Post, -#else - NULL, -#endif -#ifdef FN_ParticleEffect_Post - FN_ParticleEffect_Post, -#else - NULL, -#endif -#ifdef FN_LightStyle_Post - FN_LightStyle_Post, -#else - NULL, -#endif -#ifdef FN_DecalIndex_Post - FN_DecalIndex_Post, -#else - NULL, -#endif -#ifdef FN_PointContents_Post - FN_PointContents_Post, -#else - NULL, -#endif -#ifdef FN_MessageBegin_Post - FN_MessageBegin_Post, -#else - NULL, -#endif -#ifdef FN_MessageEnd_Post - FN_MessageEnd_Post, -#else - NULL, -#endif -#ifdef FN_WriteByte_Post - FN_WriteByte_Post, -#else - NULL, -#endif -#ifdef FN_WriteChar_Post - FN_WriteChar_Post, -#else - NULL, -#endif -#ifdef FN_WriteShort_Post - FN_WriteShort_Post, -#else - NULL, -#endif -#ifdef FN_WriteLong_Post - FN_WriteLong_Post, -#else - NULL, -#endif -#ifdef FN_WriteAngle_Post - FN_WriteAngle_Post, -#else - NULL, -#endif -#ifdef FN_WriteCoord_Post - FN_WriteCoord_Post, -#else - NULL, -#endif -#ifdef FN_WriteString_Post - FN_WriteString_Post, -#else - NULL, -#endif -#ifdef FN_WriteEntity_Post - FN_WriteEntity_Post, -#else - NULL, -#endif -#ifdef FN_CVarRegister_Post - FN_CVarRegister_Post, -#else - NULL, -#endif -#ifdef FN_CVarGetFloat_Post - FN_CVarGetFloat_Post, -#else - NULL, -#endif -#ifdef FN_CVarGetString_Post - FN_CVarGetString_Post, -#else - NULL, -#endif -#ifdef FN_CVarSetFloat_Post - FN_CVarSetFloat_Post, -#else - NULL, -#endif -#ifdef FN_CVarSetString_Post - FN_CVarSetString_Post, -#else - NULL, -#endif -#ifdef FN_AlertMessage_Post - FN_AlertMessage_Post, -#else - NULL, -#endif -#ifdef FN_EngineFprintf_Post - FN_EngineFprintf_Post, -#else - NULL, -#endif -#ifdef FN_PvAllocEntPrivateData_Post - FN_PvAllocEntPrivateData_Post, -#else - NULL, -#endif -#ifdef FN_PvEntPrivateData_Post - FN_PvEntPrivateData_Post, -#else - NULL, -#endif -#ifdef FN_FreeEntPrivateData_Post - FN_FreeEntPrivateData_Post, -#else - NULL, -#endif -#ifdef FN_SzFromIndex_Post - FN_SzFromIndex_Post, -#else - NULL, -#endif -#ifdef FN_AllocString_Post - FN_AllocString_Post, -#else - NULL, -#endif -#ifdef FN_GetVarsOfEnt_Post - FN_GetVarsOfEnt_Post, -#else - NULL, -#endif -#ifdef FN_PEntityOfEntOffset_Post - FN_PEntityOfEntOffset_Post, -#else - NULL, -#endif -#ifdef FN_EntOffsetOfPEntity_Post - FN_EntOffsetOfPEntity_Post, -#else - NULL, -#endif -#ifdef FN_IndexOfEdict_Post - FN_IndexOfEdict_Post, -#else - NULL, -#endif -#ifdef FN_PEntityOfEntIndex_Post - FN_PEntityOfEntIndex_Post, -#else - NULL, -#endif -#ifdef FN_FindEntityByVars_Post - FN_FindEntityByVars_Post, -#else - NULL, -#endif -#ifdef FN_GetModelPtr_Post - FN_GetModelPtr_Post, -#else - NULL, -#endif -#ifdef FN_RegUserMsg_Post - FN_RegUserMsg_Post, -#else - NULL, -#endif -#ifdef FN_AnimationAutomove_Post - FN_AnimationAutomove_Post, -#else - NULL, -#endif -#ifdef FN_GetBonePosition_Post - FN_GetBonePosition_Post, -#else - NULL, -#endif -#ifdef FN_FunctionFromName_Post - FN_FunctionFromName_Post, -#else - NULL, -#endif -#ifdef FN_NameForFunction_Post - FN_NameForFunction_Post, -#else - NULL, -#endif -#ifdef FN_ClientPrintf_Post - FN_ClientPrintf_Post, -#else - NULL, -#endif -#ifdef FN_ServerPrint_Post - FN_ServerPrint_Post, -#else - NULL, -#endif -#ifdef FN_Cmd_Args_Post - FN_Cmd_Args_Post, -#else - NULL, -#endif -#ifdef FN_Cmd_Argv_Post - FN_Cmd_Argv_Post, -#else - NULL, -#endif -#ifdef FN_Cmd_Argc_Post - FN_Cmd_Argc_Post, -#else - NULL, -#endif -#ifdef FN_GetAttachment_Post - FN_GetAttachment_Post, -#else - NULL, -#endif -#ifdef FN_CRC32_Init_Post - FN_CRC32_Init_Post, -#else - NULL, -#endif -#ifdef FN_CRC32_ProcessBuffer_Post - FN_CRC32_ProcessBuffer_Post, -#else - NULL, -#endif -#ifdef FN_CRC32_ProcessByte_Post - FN_CRC32_ProcessByte_Post, -#else - NULL, -#endif -#ifdef FN_CRC32_Final_Post - FN_CRC32_Final_Post, -#else - NULL, -#endif -#ifdef FN_RandomLong_Post - FN_RandomLong_Post, -#else - NULL, -#endif -#ifdef FN_RandomFloat_Post - FN_RandomFloat_Post, -#else - NULL, -#endif -#ifdef FN_SetView_Post - FN_SetView_Post, -#else - NULL, -#endif -#ifdef FN_Time_Post - FN_Time_Post, -#else - NULL, -#endif -#ifdef FN_CrosshairAngle_Post - FN_CrosshairAngle_Post, -#else - NULL, -#endif -#ifdef FN_LoadFileForMe_Post - FN_LoadFileForMe_Post, -#else - NULL, -#endif -#ifdef FN_FreeFile_Post - FN_FreeFile_Post, -#else - NULL, -#endif -#ifdef FN_EndSection_Post - FN_EndSection_Post, -#else - NULL, -#endif -#ifdef FN_CompareFileTime_Post - FN_CompareFileTime_Post, -#else - NULL, -#endif -#ifdef FN_GetGameDir_Post - FN_GetGameDir_Post, -#else - NULL, -#endif -#ifdef FN_Cvar_RegisterVariable_Post - FN_Cvar_RegisterVariable_Post, -#else - NULL, -#endif -#ifdef FN_FadeClientVolume_Post - FN_FadeClientVolume_Post, -#else - NULL, -#endif -#ifdef FN_SetClientMaxspeed_Post - FN_SetClientMaxspeed_Post, -#else - NULL, -#endif -#ifdef FN_CreateFakeClient_Post - FN_CreateFakeClient_Post, -#else - NULL, -#endif -#ifdef FN_RunPlayerMove_Post - FN_RunPlayerMove_Post, -#else - NULL, -#endif -#ifdef FN_NumberOfEntities_Post - FN_NumberOfEntities_Post, -#else - NULL, -#endif -#ifdef FN_GetInfoKeyBuffer_Post - FN_GetInfoKeyBuffer_Post, -#else - NULL, -#endif -#ifdef FN_InfoKeyValue_Post - FN_InfoKeyValue_Post, -#else - NULL, -#endif -#ifdef FN_SetKeyValue_Post - FN_SetKeyValue_Post, -#else - NULL, -#endif -#ifdef FN_SetClientKeyValue_Post - FN_SetClientKeyValue_Post, -#else - NULL, -#endif -#ifdef FN_IsMapValid_Post - FN_IsMapValid_Post, -#else - NULL, -#endif -#ifdef FN_StaticDecal_Post - FN_StaticDecal_Post, -#else - NULL, -#endif -#ifdef FN_PrecacheGeneric_Post - FN_PrecacheGeneric_Post, -#else - NULL, -#endif -#ifdef FN_GetPlayerUserId_Post - FN_GetPlayerUserId_Post, -#else - NULL, -#endif -#ifdef FN_BuildSoundMsg_Post - FN_BuildSoundMsg_Post, -#else - NULL, -#endif -#ifdef FN_IsDedicatedServer_Post - FN_IsDedicatedServer_Post, -#else - NULL, -#endif -#ifdef FN_CVarGetPointer_Post - FN_CVarGetPointer_Post, -#else - NULL, -#endif -#ifdef FN_GetPlayerWONId_Post - FN_GetPlayerWONId_Post, -#else - NULL, -#endif -#ifdef FN_Info_RemoveKey_Post - FN_Info_RemoveKey_Post, -#else - NULL, -#endif -#ifdef FN_GetPhysicsKeyValue_Post - FN_GetPhysicsKeyValue_Post, -#else - NULL, -#endif -#ifdef FN_SetPhysicsKeyValue_Post - FN_SetPhysicsKeyValue_Post, -#else - NULL, -#endif -#ifdef FN_GetPhysicsInfoString_Post - FN_GetPhysicsInfoString_Post, -#else - NULL, -#endif -#ifdef FN_PrecacheEvent_Post - FN_PrecacheEvent_Post, -#else - NULL, -#endif -#ifdef FN_PlaybackEvent_Post - FN_PlaybackEvent_Post, -#else - NULL, -#endif -#ifdef FN_SetFatPVS_Post - FN_SetFatPVS_Post, -#else - NULL, -#endif -#ifdef FN_SetFatPAS_Post - FN_SetFatPAS_Post, -#else - NULL, -#endif -#ifdef FN_CheckVisibility_Post - FN_CheckVisibility_Post, -#else - NULL, -#endif -#ifdef FN_DeltaSetField_Post - FN_DeltaSetField_Post, -#else - NULL, -#endif -#ifdef FN_DeltaUnsetField_Post - FN_DeltaUnsetField_Post, -#else - NULL, -#endif -#ifdef FN_DeltaAddEncoder_Post - FN_DeltaAddEncoder_Post, -#else - NULL, -#endif -#ifdef FN_GetCurrentPlayer_Post - FN_GetCurrentPlayer_Post, -#else - NULL, -#endif -#ifdef FN_CanSkipPlayer_Post - FN_CanSkipPlayer_Post, -#else - NULL, -#endif -#ifdef FN_DeltaFindField_Post - FN_DeltaFindField_Post, -#else - NULL, -#endif -#ifdef FN_DeltaSetFieldByIndex_Post - FN_DeltaSetFieldByIndex_Post, -#else - NULL, -#endif -#ifdef FN_DeltaUnsetFieldByIndex_Post - FN_DeltaUnsetFieldByIndex_Post, -#else - NULL, -#endif -#ifdef FN_SetGroupMask_Post - FN_SetGroupMask_Post, -#else - NULL, -#endif -#ifdef FN_engCreateInstancedBaseline_Post - FN_engCreateInstancedBaseline_Post, -#else - NULL, -#endif -#ifdef FN_Cvar_DirectSet_Post - FN_Cvar_DirectSet_Post, -#else - NULL, -#endif -#ifdef FN_ForceUnmodified_Post - FN_ForceUnmodified_Post, -#else - NULL, -#endif -#ifdef FN_GetPlayerStats_Post - FN_GetPlayerStats_Post, -#else - NULL, -#endif -#ifdef FN_AddServerCommand_Post - FN_AddServerCommand_Post, -#else - NULL, -#endif -#ifdef FN_Voice_GetClientListening_Post - FN_Voice_GetClientListening_Post, -#else - NULL, -#endif -#ifdef FN_Voice_SetClientListening_Post - FN_Voice_SetClientListening_Post, -#else - NULL, -#endif -#ifdef FN_GetPlayerAuthId_Post - FN_GetPlayerAuthId_Post -#else - NULL -#endif -}; // g_EngineFuncs_Post_Table - - -static NEW_DLL_FUNCTIONS g_NewFuncs_Table = -{ -#ifdef FN_OnFreeEntPrivateData - FN_OnFreeEntPrivateData, -#else - NULL, -#endif -#ifdef FN_GameShutdown - FN_GameShutdown, -#else - NULL, -#endif -#ifdef FN_ShouldCollide - ShouldCollide, -#else - NULL, -#endif -}; - - -static NEW_DLL_FUNCTIONS g_NewFuncs_Post_Table = -{ -#ifdef FN_OnFreeEntPrivateData_Post - FN_OnFreeEntPrivateData_Post, -#else - NULL, -#endif -#ifdef FN_GameShutdown_Post - FN_GameShutdown_Post, -#else - NULL, -#endif -#ifdef FN_ShouldCollide_Post - ShouldCollide_Post, -#else - NULL, -#endif -}; - -// Global variables from metamod. These variable names are referenced by -// various macros. -meta_globals_t *gpMetaGlobals; // metamod globals -gamedll_funcs_t *gpGamedllFuncs; // gameDLL function tables -mutil_funcs_t *gpMetaUtilFuncs; // metamod utility functions - - -plugin_info_t Plugin_info = { - META_INTERFACE_VERSION, - MODULE_NAME, - MODULE_VERSION, - MODULE_DATE, - MODULE_AUTHOR, - MODULE_URL, - MODULE_LOGTAG, - PT_ANYTIME, - PT_ANYTIME -}; - -/* -C_DLLEXPORT int GetEntityAPI(DLL_FUNCTIONS *pFunctionTable, int interfaceVersion) -{ - LOG_DEVELOPER(PLID, "called: GetEntityAPI; version=%d", interfaceVersion); - if(!pFunctionTable) { - LOG_ERROR(PLID, "GetEntityAPI called with null pFunctionTable"); - return(FALSE); - } - else if(interfaceVersion != INTERFACE_VERSION) { - LOG_ERROR(PLID, "GetEntityAPI version mismatch; requested=%d ours=%d", interfaceVersion, INTERFACE_VERSION); - return(FALSE); - } - memcpy(pFunctionTable, &g_EntityAPI_Table, sizeof( DLL_FUNCTIONS ) ); - - return (TRUE); -} - -C_DLLEXPORT int GetEntityAPI_Post(DLL_FUNCTIONS *pFunctionTable, int interfaceVersion) -{ - LOG_DEVELOPER(PLID, "called: GetEntityAPI_Post; version=%d", interfaceVersion); - if(!pFunctionTable) { - LOG_ERROR(PLID, "GetEntityAPI_Post called with null pFunctionTable"); - return(FALSE); - } - else if(interfaceVersion != INTERFACE_VERSION) { - LOG_ERROR(PLID, "GetEntityAPI_Post version mismatch; requested=%d ours=%d", interfaceVersion, INTERFACE_VERSION); - return(FALSE); - } - memcpy(pFunctionTable, &g_EntityAPI_Post_Table, sizeof( DLL_FUNCTIONS ) ); - - return(TRUE); -} -*/ - -C_DLLEXPORT int GetEntityAPI2(DLL_FUNCTIONS *pFunctionTable, int *interfaceVersion) -{ - LOG_DEVELOPER(PLID, "called: GetEntityAPI2; version=%d", *interfaceVersion); - if(!pFunctionTable) { - LOG_ERROR(PLID, "GetEntityAPI2 called with null pFunctionTable"); - return(FALSE); - } - else if(*interfaceVersion != INTERFACE_VERSION) { - LOG_ERROR(PLID, - "GetEntityAPI2 version mismatch; requested=%d ours=%d", - *interfaceVersion, INTERFACE_VERSION); - //! Tell engine what version we had, so it can figure out who is - //! out of date. - *interfaceVersion = INTERFACE_VERSION; - return(FALSE); - } - memcpy(pFunctionTable, &g_EntityAPI_Table, sizeof(DLL_FUNCTIONS)); - g_pFunctionTable=pFunctionTable; - return(TRUE); -} - -C_DLLEXPORT int GetEntityAPI2_Post(DLL_FUNCTIONS *pFunctionTable, int *interfaceVersion) -{ - LOG_DEVELOPER(PLID, "called: GetEntityAPI2_Post; version=%d", *interfaceVersion); - if(!pFunctionTable) { - LOG_ERROR(PLID, "GetEntityAPI2_Post called with null pFunctionTable"); - return(FALSE); - } - else if(*interfaceVersion != INTERFACE_VERSION) { - LOG_ERROR(PLID, "GetEntityAPI2_Post version mismatch; requested=%d ours=%d", *interfaceVersion, INTERFACE_VERSION); - //! Tell engine what version we had, so it can figure out who is out of date. - *interfaceVersion = INTERFACE_VERSION; - return(FALSE); - } - memcpy( pFunctionTable, &g_EntityAPI_Post_Table, sizeof( DLL_FUNCTIONS ) ); - g_pFunctionTable_Post=pFunctionTable; - return(TRUE); -} - -C_DLLEXPORT int GetEngineFunctions(enginefuncs_t *pengfuncsFromEngine, int *interfaceVersion) -{ - LOG_DEVELOPER(PLID, "called: GetEngineFunctions; version=%d", - *interfaceVersion); - if(!pengfuncsFromEngine) { - LOG_ERROR(PLID, - "GetEngineFunctions called with null pengfuncsFromEngine"); - return(FALSE); - } - else if(*interfaceVersion != ENGINE_INTERFACE_VERSION) { - LOG_ERROR(PLID, - "GetEngineFunctions version mismatch; requested=%d ours=%d", - *interfaceVersion, ENGINE_INTERFACE_VERSION); - // Tell metamod what version we had, so it can figure out who is - // out of date. - *interfaceVersion = ENGINE_INTERFACE_VERSION; - return(FALSE); - } - memcpy(pengfuncsFromEngine, &g_EngineFuncs_Table, sizeof(enginefuncs_t)); - g_pengfuncsTable=pengfuncsFromEngine; - return TRUE; -} - -C_DLLEXPORT int GetEngineFunctions_Post(enginefuncs_t *pengfuncsFromEngine, int *interfaceVersion) -{ - LOG_DEVELOPER(PLID, "called: GetEngineFunctions_Post; version=%d", *interfaceVersion); - if(!pengfuncsFromEngine) { - LOG_ERROR(PLID, "GetEngineFunctions_Post called with null pengfuncsFromEngine"); - return(FALSE); - } - else if(*interfaceVersion != ENGINE_INTERFACE_VERSION) { - LOG_ERROR(PLID, "GetEngineFunctions_Post version mismatch; requested=%d ours=%d", *interfaceVersion, ENGINE_INTERFACE_VERSION); - // Tell metamod what version we had, so it can figure out who is out of date. - *interfaceVersion = ENGINE_INTERFACE_VERSION; - return(FALSE); - } - memcpy(pengfuncsFromEngine, &g_EngineFuncs_Post_Table, sizeof(enginefuncs_t)); - g_pengfuncsTable_Post=pengfuncsFromEngine; - return TRUE; - -} - -C_DLLEXPORT int GetNewDLLFunctions(NEW_DLL_FUNCTIONS *pNewFunctionTable, - int *interfaceVersion) -{ - LOG_DEVELOPER(PLID, "called: GetNewDLLFunctions; version=%d", - *interfaceVersion); - if(!pNewFunctionTable) { - LOG_ERROR(PLID, - "GetNewDLLFunctions called with null pNewFunctionTable"); - return(FALSE); - } - else if(*interfaceVersion != NEW_DLL_FUNCTIONS_VERSION) { - LOG_ERROR(PLID, - "GetNewDLLFunctions version mismatch; requested=%d ours=%d", - *interfaceVersion, NEW_DLL_FUNCTIONS_VERSION); - //! Tell engine what version we had, so it can figure out who is - //! out of date. - *interfaceVersion = NEW_DLL_FUNCTIONS_VERSION; - return(FALSE); - } - memcpy(pNewFunctionTable, &g_NewFuncs_Table, sizeof(NEW_DLL_FUNCTIONS)); - g_pNewFunctionsTable=pNewFunctionTable; - return TRUE; -} - -C_DLLEXPORT int GetNewDLLFunctions_Post( NEW_DLL_FUNCTIONS *pNewFunctionTable, int *interfaceVersion ) -{ - LOG_DEVELOPER(PLID, "called: GetNewDLLFunctions_Post; version=%d", *interfaceVersion); - if(!pNewFunctionTable) { - LOG_ERROR(PLID, "GetNewDLLFunctions_Post called with null pNewFunctionTable"); - return(FALSE); - } - else if(*interfaceVersion != NEW_DLL_FUNCTIONS_VERSION) { - LOG_ERROR(PLID, "GetNewDLLFunctions_Post version mismatch; requested=%d ours=%d", *interfaceVersion, NEW_DLL_FUNCTIONS_VERSION); - //! Tell engine what version we had, so it can figure out who is out of date. - *interfaceVersion = NEW_DLL_FUNCTIONS_VERSION; - return(FALSE); - } - memcpy(pNewFunctionTable, &g_NewFuncs_Post_Table, sizeof(NEW_DLL_FUNCTIONS)); - g_pNewFunctionsTable_Post=pNewFunctionTable; - return TRUE; -} - - -static META_FUNCTIONS g_MetaFunctions_Table = -{ - NULL, - NULL, - GetEntityAPI2, - GetEntityAPI2_Post, - GetNewDLLFunctions, - GetNewDLLFunctions_Post, - GetEngineFunctions, - GetEngineFunctions_Post -}; - -C_DLLEXPORT int Meta_Query(char *ifvers, plugin_info_t **pPlugInfo, mutil_funcs_t *pMetaUtilFuncs) -{ - if ((int) CVAR_GET_FLOAT("developer") != 0) - UTIL_LogPrintf("[%s] dev: called: Meta_Query; version=%s, ours=%s\n", - Plugin_info.logtag, ifvers, Plugin_info.ifvers); - - // Check for valid pMetaUtilFuncs before we continue. - if(!pMetaUtilFuncs) { - UTIL_LogPrintf("[%s] ERROR: Meta_Query called with null pMetaUtilFuncs\n", Plugin_info.logtag); - return(FALSE); - } - - gpMetaUtilFuncs = pMetaUtilFuncs; - - *pPlugInfo = &Plugin_info; - - // Check for interface version compatibility. - if(!FStrEq(ifvers, Plugin_info.ifvers)) { - int mmajor=0, mminor=0, pmajor=0, pminor=0; - LOG_MESSAGE(PLID, "WARNING: meta-interface version mismatch; requested=%s ours=%s", - Plugin_info.logtag, ifvers); - // If plugin has later interface version, it's incompatible (update - // metamod). - sscanf(ifvers, "%d:%d", &mmajor, &mminor); - sscanf(META_INTERFACE_VERSION, "%d:%d", &pmajor, &pminor); - if(pmajor > mmajor || (pmajor==mmajor && pminor > mminor)) { - LOG_ERROR(PLID, "metamod version is too old for this module; update metamod"); - return(FALSE); - } - // If plugin has older major interface version, it's incompatible - // (update plugin). - else if(pmajor < mmajor) { - LOG_ERROR(PLID, "metamod version is incompatible with this module; please find a newer version of this module"); - return(FALSE); - } - // Minor interface is older, but this is guaranteed to be backwards - // compatible, so we warn, but we still accept it. - else if(pmajor==mmajor && pminor < mminor) - LOG_MESSAGE(PLID, "WARNING: metamod version is newer than expected; consider finding a newer version of this module"); - else - LOG_ERROR(PLID, "unexpected version comparison; metavers=%s, mmajor=%d, mminor=%d; plugvers=%s, pmajor=%d, pminor=%d", ifvers, mmajor, mminor, META_INTERFACE_VERSION, pmajor, pminor); - } - -#ifdef FN_META_QUERY - return FN_META_QUERY(); -#endif // FN_META_QUERY - - return 1; -} - - -C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME now, META_FUNCTIONS *pFunctionTable, meta_globals_t *pMGlobals, gamedll_funcs_t *pGamedllFuncs) -{ - if(now > Plugin_info.loadable) { - LOG_ERROR(PLID, "Can't load module right now"); - return(FALSE); - } - if(!pMGlobals) { - LOG_ERROR(PLID, "Meta_Attach called with null pMGlobals"); - return(FALSE); - } - gpMetaGlobals=pMGlobals; - if(!pFunctionTable) { - LOG_ERROR(PLID, "Meta_Attach called with null pFunctionTable"); - return(FALSE); - } - - memcpy(pFunctionTable, &g_MetaFunctions_Table, sizeof(META_FUNCTIONS)); - gpGamedllFuncs=pGamedllFuncs; - - // Let's go. - -#ifdef FN_META_ATTACH - FN_META_ATTACH(); -#endif // FN_META_ATTACH - - return TRUE; -} - -C_DLLEXPORT int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason) -{ - if(now > Plugin_info.unloadable && reason != PNL_CMD_FORCED) { - LOG_ERROR(PLID, "Can't unload plugin right now"); - return(FALSE); - } - -#ifdef FN_META_DETACH - return FN_META_DETACH(); -#endif // FN_META_DETACH - return TRUE; -} - - - -#ifdef __linux__ -// linux prototype -C_DLLEXPORT void GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine, globalvars_t *pGlobals ) { - -#else -#ifdef _MSC_VER -// MSVC: Simulate __stdcall calling convention -C_DLLEXPORT __declspec(naked) void GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine, globalvars_t *pGlobals ) -{ - __asm // Prolog - { - // Save ebp - push ebp - // Set stack frame pointer - mov ebp, esp - // Allocate space for local variables - // The MSVC compiler gives us the needed size in __LOCAL_SIZE. - sub esp, __LOCAL_SIZE - // Push registers - push ebx - push esi - push edi - } -#else // _MSC_VER -#ifdef __GNUC__ -// GCC can also work with this -C_DLLEXPORT void __stdcall GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine, globalvars_t *pGlobals ) -{ -#else // __GNUC__ -// compiler not known -#error There is no support (yet) for your compiler. Please use MSVC or GCC compilers or contact the AMX Mod X dev team. -#endif // __GNUC__ -#endif // _MSC_VER -#endif // __linux__ - - // ** Function core <-- - memcpy(&g_engfuncs, pengfuncsFromEngine, sizeof(enginefuncs_t)); - gpGlobals = pGlobals; - // NOTE! Have to call logging function _after_ copying into g_engfuncs, so - // that g_engfuncs.pfnAlertMessage() can be resolved properly, heh. :) - UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag); - // --> ** Function core - -#ifdef _MSC_VER - // Epilog - if (sizeof(int*) == 8) - { // 64 bit - __asm - { - // Pop registers - pop edi - pop esi - pop ebx - // Restore stack frame pointer - mov esp, ebp - // Restore ebp - pop ebp - // 2 * sizeof(int*) = 16 on 64 bit - ret 16 - } - } - else - { // 32 bit - __asm - { - // Pop registers - pop edi - pop esi - pop ebx - // Restore stack frame pointer - mov esp, ebp - // Restore ebp - pop ebp - // 2 * sizeof(int*) = 8 on 32 bit - ret 8 - } - } -#endif // #ifdef _MSC_VER -} - -#endif // #ifdef USE_METAMOD - -/************* AMXX Stuff *************/ - -// *** Globals *** -// Module info -static amxx_module_info_s g_ModuleInfo = -{ - MODULE_NAME, - MODULE_AUTHOR, - MODULE_VERSION, -#ifdef MODULE_RELOAD_ON_MAPCHANGE - 1, -#else // MODULE_RELOAD_ON_MAPCHANGE - 0, -#endif // MODULE_RELOAD_ON_MAPCHANGE - MODULE_LOGTAG -}; - -// Storage for the requested functions -PFN_ADD_NATIVES g_fn_AddNatives; -PFN_BUILD_PATHNAME g_fn_BuildPathname; -PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR; -PFN_GET_AMXADDR g_fn_GetAmxAddr; -PFN_PRINT_SRVCONSOLE g_fn_PrintSrvConsole; -PFN_GET_MODNAME g_fn_GetModname; -PFN_GET_AMXSCRIPTNAME g_fn_GetAmxScriptName; -PFN_GET_AMXSCRIPT g_fn_GetAmxScript; -PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; -PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; -PFN_SET_AMXSTRING g_fn_SetAmxString; -PFN_GET_AMXSTRING g_fn_GetAmxString; -PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; -PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; -PFN_COPY_AMXMEMORY g_fn_CopyAmxMemory; -PFN_LOG g_fn_Log; -PFN_LOG_ERROR g_fn_LogErrorFunc; -PFN_RAISE_AMXERROR g_fn_RaiseAmxError; -PFN_REGISTER_FORWARD g_fn_RegisterForward; -PFN_EXECUTE_FORWARD g_fn_ExecuteForward; -PFN_PREPARE_CELLARRAY g_fn_PrepareCellArray; -PFN_PREPARE_CHARARRAY g_fn_PrepareCharArray; -PFN_PREPARE_CELLARRAY_A g_fn_PrepareCellArrayA; -PFN_PREPARE_CHARARRAY_A g_fn_PrepareCharArrayA; -PFN_IS_PLAYER_VALID g_fn_IsPlayerValid; -PFN_GET_PLAYER_NAME g_fn_GetPlayerName; -PFN_GET_PLAYER_IP g_fn_GetPlayerIP; -PFN_IS_PLAYER_INGAME g_fn_IsPlayerIngame; -PFN_IS_PLAYER_BOT g_fn_IsPlayerBot; -PFN_IS_PLAYER_AUTHORIZED g_fn_IsPlayerAuthorized; -PFN_GET_PLAYER_TIME g_fn_GetPlayerTime; -PFN_GET_PLAYER_PLAYTIME g_fn_GetPlayerPlayTime; -PFN_GET_PLAYER_CURWEAPON g_fn_GetPlayerCurweapon; -PFN_GET_PLAYER_TEAM g_fn_GetPlayerTeam; -PFN_GET_PLAYER_TEAMID g_fn_GetPlayerTeamID; -PFN_GET_PLAYER_DEATHS g_fn_GetPlayerDeaths; -PFN_GET_PLAYER_MENU g_fn_GetPlayerMenu; -PFN_GET_PLAYER_KEYS g_fn_GetPlayerKeys; -PFN_IS_PLAYER_ALIVE g_fn_IsPlayerAlive; -PFN_GET_PLAYER_FRAGS g_fn_GetPlayerFrags; -PFN_IS_PLAYER_CONNECTING g_fn_IsPlayerConnecting; -PFN_IS_PLAYER_HLTV g_fn_IsPlayerHLTV; -PFN_GET_PLAYER_ARMOR g_fn_GetPlayerArmor; -PFN_GET_PLAYER_HEALTH g_fn_GetPlayerHealth; -PFN_ALLOCATOR g_fn_Allocator; -PFN_REALLOCATOR g_fn_Reallocator; -PFN_DEALLOCATOR g_fn_Deallocator; -PFN_AMX_EXEC g_fn_AmxExec; -PFN_AMX_EXECV g_fn_AmxExecv; -PFN_AMX_ALLOT g_fn_AmxAllot; -PFN_AMX_FINDPUBLIC g_fn_AmxFindPublic; -PFN_LOAD_AMXSCRIPT g_fn_LoadAmxScript; -PFN_UNLOAD_AMXSCRIPT g_fn_UnloadAmxScript; -PFN_REAL_TO_CELL g_fn_RealToCell; -PFN_CELL_TO_REAL g_fn_CellToReal; -PFN_REGISTER_SPFORWARD g_fn_RegisterSPForward; -PFN_REGISTER_SPFORWARD_BYNAME g_fn_RegisterSPForwardByName; -PFN_UNREGISTER_SPFORWARD g_fn_UnregisterSPForward; -PFN_MERGEDEFINITION_FILE g_fn_MergeDefinition_File; -PFN_AMX_FINDNATIVE g_fn_AmxFindNative; -PFN_GETPLAYERFLAGS g_fn_GetPlayerFlags; -PFN_GET_PLAYER_EDICT g_fn_GetPlayerEdict; -PFN_FORMAT g_fn_Format; -PFN_REGISTERFUNCTION g_fn_RegisterFunction; -PFN_REQ_FNPTR g_fn_RequestFunction; -PFN_AMX_PUSH g_fn_AmxPush; - -// *** Exports *** -C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo) -{ - // check parameters - if (!interfaceVersion || !moduleInfo) - return AMXX_PARAM; - - // check interface version - if (*interfaceVersion != AMXX_INTERFACE_VERSION) - { - // Tell amxx core our interface version - *interfaceVersion = AMXX_INTERFACE_VERSION; - return AMXX_IFVERS; - } - - // copy module info - memcpy(moduleInfo, &g_ModuleInfo, sizeof(amxx_module_info_s)); - -#ifdef FN_AMXX_QUERY - FN_AMXX_QUERY(); -#endif // FN_AMXX_QUERY - // Everything ok :) - return AMXX_OK; -} - -// request function -#define REQFUNC(name, fptr, type) if ((fptr = (type)reqFnptrFunc(name)) == 0) return AMXX_FUNC_NOT_PRESENT -// request optional function -#define REQFUNC_OPT(name, fptr, type) fptr = (type)reqFnptrFunc(name) - -C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) -{ - // Check pointer - if (!reqFnptrFunc) - return AMXX_PARAM; - - g_fn_RequestFunction = reqFnptrFunc; - - // Req all known functions - // Misc - REQFUNC("BuildPathname", g_fn_BuildPathname, PFN_BUILD_PATHNAME); - REQFUNC("BuildPathnameR", g_fn_BuildPathnameR, PFN_BUILD_PATHNAME_R); - REQFUNC("PrintSrvConsole", g_fn_PrintSrvConsole, PFN_PRINT_SRVCONSOLE); - REQFUNC("GetModname", g_fn_GetModname, PFN_GET_MODNAME); - REQFUNC("Log", g_fn_Log, PFN_LOG); - REQFUNC("LogError", g_fn_LogErrorFunc, PFN_LOG_ERROR); - REQFUNC("MergeDefinitionFile", g_fn_MergeDefinition_File, PFN_MERGEDEFINITION_FILE); - REQFUNC("Format", g_fn_Format, PFN_FORMAT); - REQFUNC("RegisterFunction", g_fn_RegisterFunction, PFN_REGISTERFUNCTION); - - // Amx scripts - REQFUNC("GetAmxScript", g_fn_GetAmxScript, PFN_GET_AMXSCRIPT); - REQFUNC("FindAmxScriptByAmx", g_fn_FindAmxScriptByAmx, PFN_FIND_AMXSCRIPT_BYAMX); - REQFUNC("FindAmxScriptByName", g_fn_FindAmxScriptByName, PFN_FIND_AMXSCRIPT_BYNAME); - REQFUNC("LoadAmxScript", g_fn_LoadAmxScript, PFN_LOAD_AMXSCRIPT); - REQFUNC("UnloadAmxScript", g_fn_UnloadAmxScript, PFN_UNLOAD_AMXSCRIPT); - REQFUNC("GetAmxScriptName", g_fn_GetAmxScriptName, PFN_GET_AMXSCRIPTNAME); - - // String / mem in amx scripts support - REQFUNC("SetAmxString", g_fn_SetAmxString, PFN_SET_AMXSTRING); - REQFUNC("GetAmxString", g_fn_GetAmxString, PFN_GET_AMXSTRING); - REQFUNC("GetAmxStringLen", g_fn_GetAmxStringLen, PFN_GET_AMXSTRINGLEN); - REQFUNC("FormatAmxString", g_fn_FormatAmxString, PFN_FORMAT_AMXSTRING); - REQFUNC("CopyAmxMemory", g_fn_CopyAmxMemory, PFN_COPY_AMXMEMORY); - REQFUNC("GetAmxAddr", g_fn_GetAmxAddr, PFN_GET_AMXADDR); - - REQFUNC("amx_Exec", g_fn_AmxExec, PFN_AMX_EXEC); - REQFUNC("amx_Execv", g_fn_AmxExecv, PFN_AMX_EXECV); - REQFUNC("amx_FindPublic", g_fn_AmxFindPublic, PFN_AMX_FINDPUBLIC); - REQFUNC("amx_Allot", g_fn_AmxAllot, PFN_AMX_ALLOT); - REQFUNC("amx_FindNative", g_fn_AmxFindNative, PFN_AMX_FINDNATIVE); - - // Natives / Forwards - REQFUNC("AddNatives", g_fn_AddNatives, PFN_ADD_NATIVES); - REQFUNC("RaiseAmxError", g_fn_RaiseAmxError, PFN_RAISE_AMXERROR); - REQFUNC("RegisterForward", g_fn_RegisterForward, PFN_REGISTER_FORWARD); - REQFUNC("RegisterSPForward", g_fn_RegisterSPForward, PFN_REGISTER_SPFORWARD); - REQFUNC("RegisterSPForwardByName", g_fn_RegisterSPForwardByName, PFN_REGISTER_SPFORWARD_BYNAME); - REQFUNC("UnregisterSPForward", g_fn_UnregisterSPForward, PFN_UNREGISTER_SPFORWARD); - REQFUNC("ExecuteForward", g_fn_ExecuteForward, PFN_EXECUTE_FORWARD); - REQFUNC("PrepareCellArray", g_fn_PrepareCellArray, PFN_PREPARE_CELLARRAY); - REQFUNC("PrepareCharArray", g_fn_PrepareCharArray, PFN_PREPARE_CHARARRAY); - REQFUNC("PrepareCellArrayA", g_fn_PrepareCellArrayA, PFN_PREPARE_CELLARRAY_A); - REQFUNC("PrepareCharArrayA", g_fn_PrepareCharArrayA, PFN_PREPARE_CHARARRAY_A); - // Player - REQFUNC("IsPlayerValid", g_fn_IsPlayerValid, PFN_IS_PLAYER_VALID); - REQFUNC("GetPlayerName", g_fn_GetPlayerName, PFN_GET_PLAYER_NAME); - REQFUNC("GetPlayerIP", g_fn_GetPlayerIP, PFN_GET_PLAYER_IP); - REQFUNC("IsPlayerInGame", g_fn_IsPlayerIngame, PFN_IS_PLAYER_INGAME); - REQFUNC("IsPlayerBot", g_fn_IsPlayerBot, PFN_IS_PLAYER_BOT); - REQFUNC("IsPlayerAuthorized", g_fn_IsPlayerAuthorized, PFN_IS_PLAYER_AUTHORIZED); - REQFUNC("GetPlayerTime", g_fn_GetPlayerTime, PFN_GET_PLAYER_TIME); - REQFUNC("GetPlayerPlayTime", g_fn_GetPlayerPlayTime, PFN_GET_PLAYER_PLAYTIME); - REQFUNC("GetPlayerCurweapon", g_fn_GetPlayerCurweapon, PFN_GET_PLAYER_CURWEAPON); - REQFUNC("GetPlayerTeamID", g_fn_GetPlayerTeamID, PFN_GET_PLAYER_TEAMID); - REQFUNC("GetPlayerTeam",g_fn_GetPlayerTeam, PFN_GET_PLAYER_TEAM); - REQFUNC("GetPlayerDeaths", g_fn_GetPlayerDeaths, PFN_GET_PLAYER_DEATHS); - REQFUNC("GetPlayerMenu", g_fn_GetPlayerMenu, PFN_GET_PLAYER_MENU); - REQFUNC("GetPlayerKeys", g_fn_GetPlayerKeys, PFN_GET_PLAYER_KEYS); - REQFUNC("IsPlayerAlive", g_fn_IsPlayerAlive, PFN_IS_PLAYER_ALIVE); - REQFUNC("GetPlayerFrags", g_fn_GetPlayerFrags, PFN_GET_PLAYER_FRAGS); - REQFUNC("IsPlayerConnecting", g_fn_IsPlayerConnecting, PFN_IS_PLAYER_CONNECTING); - REQFUNC("IsPlayerHLTV", g_fn_IsPlayerHLTV, PFN_IS_PLAYER_HLTV); - REQFUNC("GetPlayerArmor", g_fn_GetPlayerArmor, PFN_GET_PLAYER_ARMOR); - REQFUNC("GetPlayerHealth", g_fn_GetPlayerHealth, PFN_GET_PLAYER_HEALTH); - REQFUNC("GetPlayerFlags", g_fn_GetPlayerFlags, PFN_GETPLAYERFLAGS); - REQFUNC("GetPlayerEdict", g_fn_GetPlayerEdict, PFN_GET_PLAYER_EDICT); - REQFUNC("amx_Push", g_fn_AmxPush, PFN_AMX_PUSH); - - // Memory - REQFUNC_OPT("Allocator", g_fn_Allocator, PFN_ALLOCATOR); - REQFUNC_OPT("Reallocator", g_fn_Reallocator, PFN_REALLOCATOR); - REQFUNC_OPT("Deallocator", g_fn_Deallocator, PFN_DEALLOCATOR); - - REQFUNC("CellToReal", g_fn_CellToReal, PFN_CELL_TO_REAL); - REQFUNC("RealToCell", g_fn_RealToCell, PFN_REAL_TO_CELL); - -#ifdef FN_AMXX_ATTACH - FN_AMXX_ATTACH(); -#endif // FN_AMXX_ATACH - - return AMXX_OK; -} - -C_DLLEXPORT int AMXX_Detach() -{ -#ifdef FN_AMXX_DETACH - FN_AMXX_DETACH(); -#endif // FN_AMXX_DETACH - - return AMXX_OK; -} - -C_DLLEXPORT int AMXX_PluginsLoaded() -{ -#ifdef FN_AMXX_PLUGINSLOADED - FN_AMXX_PLUGINSLOADED(); -#endif // FN_AMXX_PLUGINSLOADED - return AMXX_OK; -} - -// Advanced MF functions -void MF_Log(const char *fmt, ...) -{ - // :TODO: Overflow possible here - char msg[3072]; - va_list arglst; - va_start(arglst, fmt); - vsprintf(msg, fmt, arglst); - va_end(arglst); - - g_fn_Log("[%s] %s", MODULE_LOGTAG, msg); -} - -void MF_LogError(AMX *amx, int err, const char *fmt, ...) -{ - // :TODO: Overflow possible here - char msg[3072]; - va_list arglst; - va_start(arglst, fmt); - vsprintf(msg, fmt, arglst); - va_end(arglst); - - g_fn_LogErrorFunc(amx, err, "[%s] %s", MODULE_LOGTAG, msg); -} - - -#ifdef _DEBUG -// validate macros -// Makes sure compiler reports errors when macros are invalid -void ValidateMacros_DontCallThis_Smiley() -{ - MF_BuildPathname("str", "str", 0); - MF_BuildPathnameR(NULL, 0, "%d", 0); - MF_FormatAmxString(NULL, 0, 0, NULL); - MF_GetAmxAddr(NULL, 0); - MF_PrintSrvConsole("str", "str", 0); - MF_GetModname(); - MF_GetScriptName(0); - MF_GetScriptAmx(0); - MF_FindScriptByAmx(NULL); - MF_FindScriptByName("str"); - MF_SetAmxString(NULL, 0, "str", 0); - MF_GetAmxString(NULL, 0, 0, 0); - MF_GetAmxStringLen(NULL); - MF_CopyAmxMemory(NULL, NULL, 0); - MF_Log("str", "str", 0); - MF_LogError(NULL, 0, NULL); - MF_RaiseAmxError(NULL, 0); - MF_RegisterForward("str", (ForwardExecType)0, 0, 0, 0); - MF_ExecuteForward(0, 0, 0); - MF_PrepareCellArray(NULL, 0); - MF_PrepareCharArray(NULL, 0); - MF_PrepareCellArrayA(NULL, 0, true); - MF_PrepareCharArrayA(NULL, 0, true); - MF_IsPlayerValid(0); - MF_GetPlayerName(0); - MF_GetPlayerIP(0); - MF_IsPlayerIngame(0); - MF_IsPlayerBot(0); - MF_IsPlayerAuthorized(0); - MF_GetPlayerTime(0); - MF_GetPlayerPlayTime(0); - MF_GetPlayerCurweapon(0); - MF_GetPlayerTeamID(0); - MF_GetPlayerTeam(0); - MF_GetPlayerDeaths(0); - MF_GetPlayerMenu(0); - MF_GetPlayerKeys(0); - MF_IsPlayerAlive(0); - MF_GetPlayerFrags(0); - MF_IsPlayerConnecting(0); - MF_IsPlayerHLTV(0); - MF_GetPlayerArmor(0); - MF_GetPlayerHealth(0); - MF_AmxExec(0, 0, 0); - MF_AmxExecv(0, 0, 0, 0, 0); - MF_AmxFindPublic(0, 0, 0); - MF_AmxAllot(0, 0, 0, 0); - MF_LoadAmxScript(0, 0, 0, 0, 0); - MF_UnloadAmxScript(0, 0); - MF_RegisterSPForward(0, 0, 0, 0, 0, 0); - MF_RegisterSPForwardByName(0, 0, 0, 0, 0, 0); - MF_UnregisterSPForward(0); - MF_GetPlayerFrags(0); - MF_GetPlayerEdict(0); - MF_Format("", 4, "str"); - MF_RegisterFunction(NULL, ""); -} -#endif - -/************* MEMORY *************/ -// undef all defined macros -#undef new -#undef delete -#undef malloc -#undef calloc -#undef realloc -#undef free - -const unsigned int m_alloc_unknown = 0; -const unsigned int m_alloc_new = 1; -const unsigned int m_alloc_new_array = 2; -const unsigned int m_alloc_malloc = 3; -const unsigned int m_alloc_calloc = 4; -const unsigned int m_alloc_realloc = 5; -const unsigned int m_alloc_delete = 6; -const unsigned int m_alloc_delete_array = 7; -const unsigned int m_alloc_free = 8; - -const char *g_Mem_CurrentFilename = "??"; -int g_Mem_CurrentLine = 0; -const char *g_Mem_CurrentFunc = "??"; - -const char *Mem_MakeSourceFile(const char *sourceFile) -{ - static char buffer[512]; - static size_t pos = 0; - if (!pos) - { - // init - buffer[0] = '['; - strcpy(buffer + 1, MODULE_NAME); - pos = strlen(MODULE_NAME) + 1; - buffer[pos++] = ']'; - } - - // convert from absolute path to [modulename]filename - const char *ptr = strrchr(sourceFile, '\\'); - if (ptr) - ptr++; - else - { - ptr = strrchr(sourceFile, '/'); - if (ptr) - ptr++; - else - ptr = sourceFile; - } - strcpy(buffer + pos, ptr); - return buffer; -} - -void Mem_SetOwner(const char *filename, int line, const char *function) -{ - g_Mem_CurrentFilename = filename; - g_Mem_CurrentLine = line; - g_Mem_CurrentFunc = function; -} - -void Mem_ResetGlobals() -{ - Mem_SetOwner("??", 0, "??"); -} - -// raw (re/de)allocators -void * Mem_Allocator(const char *sourceFile, const unsigned int sourceLine, const char *sourceFunc, - const unsigned int allocationType, const size_t reportedSize) -{ - if (g_fn_Allocator) - return g_fn_Allocator(Mem_MakeSourceFile(sourceFile), sourceLine, sourceFunc, allocationType, reportedSize); - else - return malloc(reportedSize); -} - -void * Mem_Reallocator(const char *sourceFile, const unsigned int sourceLine, const char *sourceFunc, - const unsigned int reallocationType, const size_t reportedSize, void *reportedAddress) -{ - if (g_fn_Reallocator) - return g_fn_Reallocator(Mem_MakeSourceFile(sourceFile), sourceLine, sourceFunc, reallocationType, reportedSize, reportedAddress); - else - return realloc(reportedAddress, reportedSize); -} - -void Mem_Deallocator(const char *sourceFile, const unsigned int sourceLine, const char *sourceFunc, - const unsigned int deallocationType, void *reportedAddress) -{ - // If you you get user breakpoint here, something failed :) - // - invalid pointer - // - alloc type mismatch ( for example - // char *a = new char[5]; delete char; - // ) - // - The allocation unit is damaged (for example - // char *a = new char[5]; a[6] = 8; - // ) - // - break on dealloc flag set (somehow) - - if (g_fn_Deallocator) - g_fn_Deallocator(Mem_MakeSourceFile(sourceFile), sourceLine, sourceFunc, deallocationType, reportedAddress); - else - free(reportedAddress); -} - -// new and delete operators -void *operator new(size_t reportedSize) -{ - if (reportedSize == 0) - reportedSize = 1; - void *ptr = Mem_Allocator(g_Mem_CurrentFilename, g_Mem_CurrentLine, g_Mem_CurrentFunc, m_alloc_new, reportedSize); - // :TODO: Handler support ? - if (ptr) - return ptr; - - // allocation failed - return NULL; -} - -void *operator new[](size_t reportedSize) -{ - if (reportedSize == 0) - reportedSize = 1; - void *ptr = Mem_Allocator(g_Mem_CurrentFilename, g_Mem_CurrentLine, g_Mem_CurrentFunc, m_alloc_new_array, reportedSize); - // :TODO: Handler support ? - if (ptr) - return ptr; - - // allocation failed - return NULL; -} - -// Microsoft memory tracking operators -void *operator new(size_t reportedSize, const char *sourceFile, int sourceLine) -{ - if (reportedSize == 0) - reportedSize = 1; - void *ptr = Mem_Allocator(g_Mem_CurrentFilename, g_Mem_CurrentLine, g_Mem_CurrentFunc, m_alloc_new, reportedSize); - // :TODO: Handler support ? - if (ptr) - return ptr; - - // allocation failed - return NULL; -} -void *operator new[](size_t reportedSize, const char *sourceFile, int sourceLine) -{ - if (reportedSize == 0) - reportedSize = 1; - void *ptr = Mem_Allocator(g_Mem_CurrentFilename, g_Mem_CurrentLine, g_Mem_CurrentFunc, m_alloc_new_array, reportedSize); - // :TODO: Handler support ? - if (ptr) - return ptr; - - // allocation failed - return NULL; -} - -void operator delete(void *reportedAddress) -{ - if (!reportedAddress) - return; - - Mem_Deallocator(g_Mem_CurrentFilename, g_Mem_CurrentLine, g_Mem_CurrentFunc, m_alloc_delete, reportedAddress); -} - -void operator delete[](void *reportedAddress) -{ - if (!reportedAddress) - return; - - Mem_Deallocator(g_Mem_CurrentFilename, g_Mem_CurrentLine, g_Mem_CurrentFunc, m_alloc_delete_array, reportedAddress); -} - -/************* stuff from dlls/util.cpp *************/ -// must come here because cbase.h declares it's own operator new - -#ifdef USE_METAMOD - -// Selected portions of dlls/util.cpp from SDK 2.1. -// Functions copied from there as needed... -// And modified to avoid buffer overflows (argh). - -/*** -* -* Copyright (c) 1999, 2000 Valve LLC. All rights reserved. -* -* This product contains software technology licensed from Id -* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. -* All Rights Reserved. -* -* Use, distribution, and modification of this source code and/or resulting -* object code is restricted to non-commercial enhancements to products from -* Valve LLC. All other use, distribution, or modification is prohibited -* without written permission from Valve LLC. -* -****/ -/* - -===== util.cpp ======================================================== - - Utility code. Really not optional after all. - -*/ - -#include -#include "sdk_util.h" -#include - -#include // for strncpy(), etc - -#include "osdep.h" // win32 vsnprintf, etc - -char* UTIL_VarArgs( char *format, ... ) -{ - va_list argptr; - static char string[1024]; - - va_start (argptr, format); - vsnprintf (string, sizeof(string), format, argptr); - va_end (argptr); - - return string; -} - - -//========================================================= -// UTIL_LogPrintf - Prints a logged message to console. -// Preceded by LOG: ( timestamp ) < message > -//========================================================= -void UTIL_LogPrintf( char *fmt, ... ) -{ - va_list argptr; - static char string[1024]; - - va_start ( argptr, fmt ); - vsnprintf ( string, sizeof(string), fmt, argptr ); - va_end ( argptr ); - - // Print to server console - ALERT( at_logged, "%s", string ); -} - - -void UTIL_HudMessage(CBaseEntity *pEntity, const hudtextparms_t &textparms, - const char *pMessage) -{ - if ( !pEntity ) - return; - - MESSAGE_BEGIN( MSG_ONE, SVC_TEMPENTITY, NULL, ENT(pEntity->pev) ); - WRITE_BYTE( TE_TEXTMESSAGE ); - WRITE_BYTE( textparms.channel & 0xFF ); - - WRITE_SHORT( FixedSigned16( textparms.x, 1<<13 ) ); - WRITE_SHORT( FixedSigned16( textparms.y, 1<<13 ) ); - WRITE_BYTE( textparms.effect ); - - WRITE_BYTE( textparms.r1 ); - WRITE_BYTE( textparms.g1 ); - WRITE_BYTE( textparms.b1 ); - WRITE_BYTE( textparms.a1 ); - - WRITE_BYTE( textparms.r2 ); - WRITE_BYTE( textparms.g2 ); - WRITE_BYTE( textparms.b2 ); - WRITE_BYTE( textparms.a2 ); - - WRITE_SHORT( FixedUnsigned16( textparms.fadeinTime, 1<<8 ) ); - WRITE_SHORT( FixedUnsigned16( textparms.fadeoutTime, 1<<8 ) ); - WRITE_SHORT( FixedUnsigned16( textparms.holdTime, 1<<8 ) ); - - if ( textparms.effect == 2 ) - WRITE_SHORT( FixedUnsigned16( textparms.fxTime, 1<<8 ) ); - - if ( strlen( pMessage ) < 512 ) - { - WRITE_STRING( pMessage ); - } - else - { - char tmp[512]; - strncpy( tmp, pMessage, 511 ); - tmp[511] = 0; - WRITE_STRING( tmp ); - } - MESSAGE_END(); -} - -short FixedSigned16( float value, float scale ) -{ - int output; - - output = (int) (value * scale); - - if ( output > 32767 ) - output = 32767; - - if ( output < -32768 ) - output = -32768; - - return (short)output; -} - -unsigned short FixedUnsigned16( float value, float scale ) -{ - int output; - - output = (int) (value * scale); - if ( output < 0 ) - output = 0; - if ( output > 0xFFFF ) - output = 0xFFFF; - - return (unsigned short)output; -} -#endif // USE_METAMOD diff --git a/dlls/BB/amxxmodule.h b/dlls/BB/amxxmodule.h deleted file mode 100644 index baf6d259..00000000 --- a/dlls/BB/amxxmodule.h +++ /dev/null @@ -1,2239 +0,0 @@ -/* - * AMX Mod X Module Interface Functions - * This file may be freely used -*/ - -// prevent double include -#ifndef __AMXXMODULE_H__ -#define __AMXXMODULE_H__ - -// config -#include "moduleconfig.h" - -// metamod include files -#ifdef USE_METAMOD -#include -#include -#include "osdep.h" -#endif // #ifdef USE_METAMOD - -// DLL Export -#undef DLLEXPORT -#ifndef __linux__ -#define DLLEXPORT __declspec(dllexport) -#else -#define DLLEXPORT -#define LINUX -#endif - -#undef C_DLLEXPORT -#define C_DLLEXPORT extern "C" DLLEXPORT - -// ***** AMXX stuff ***** - -// module interface version was 1 -// 2 - added logtag to struct (amxx1.1-rc1) -// 3 - added new tagAMX structure (amxx1.5) -#define AMXX_INTERFACE_VERSION 3 - -// amxx module info -struct amxx_module_info_s -{ - const char *name; - const char *author; - const char *version; - int reload; // reload on mapchange when nonzero - const char *logtag; // added in version 2 -}; - - - -// return values from functions called by amxx -#define AMXX_OK 0 /* no error */ -#define AMXX_IFVERS 1 /* interface version */ -#define AMXX_PARAM 2 /* Invalid parameter */ -#define AMXX_FUNC_NOT_PRESENT 3 /* Function not present */ - -// *** Small stuff *** -// The next section is copied from the amx.h file -// Copyright (c) ITB CompuPhase, 1997-2005 - -#if defined HAVE_STDINT_H - #include -#else - #if defined __LCC__ || defined __DMC__ || defined LINUX - #if defined HAVE_INTTYPES_H - #include - #else - #include - #endif - #elif !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L - /* The ISO C99 defines the int16_t and int_32t types. If the compiler got - * here, these types are probably undefined. - */ - #if defined __MACH__ - #include - typedef unsigned short int uint16_t; - typedef unsigned long int uint32_t; - #elif defined __FreeBSD__ - #include - #else - typedef short int int16_t; - typedef unsigned short int uint16_t; - #if defined SN_TARGET_PS2 - typedef int int32_t; - typedef unsigned int uint32_t; - #else - typedef long int int32_t; - typedef unsigned long int uint32_t; - #endif - #if defined __WIN32__ || defined _WIN32 || defined WIN32 - typedef __int64 int64_t; - typedef unsigned __int64 uint64_t; - #define HAVE_I64 - #elif defined __GNUC__ - typedef long long int64_t; - typedef unsigned long long uint64_t; - #define HAVE_I64 - #endif - #endif - #endif - #define HAVE_STDINT_H -#endif -#if defined _LP64 || defined WIN64 || defined _WIN64 - #if !defined __64BIT__ - #define __64BIT__ - #endif -#endif - -/* calling convention for native functions */ -#if !defined AMX_NATIVE_CALL - #define AMX_NATIVE_CALL -#endif -/* calling convention for all interface functions and callback functions */ -#if !defined AMXAPI - #if defined STDECL - #define AMXAPI __stdcall - #elif defined CDECL - #define AMXAPI __cdecl - #else - #define AMXAPI - #endif -#endif -#if !defined AMXEXPORT - #define AMXEXPORT -#endif - -#if !defined PAWN_CELL_SIZE - #define PAWN_CELL_SIZE 32 /* by default, use 32-bit cells */ -#endif -#if PAWN_CELL_SIZE==16 - typedef uint16_t ucell; - typedef int16_t cell; -#elif PAWN_CELL_SIZE==32 - typedef uint32_t ucell; - typedef int32_t cell; -#define REAL float -#elif PAWN_CELL_SIZE==64 - typedef uint64_t ucell; - typedef int64_t cell; -#define REAL double -#else - #error Unsupported cell size (PAWN_CELL_SIZE) -#endif - -#define UNPACKEDMAX ((1 << (sizeof(cell)-1)*8) - 1) -#define UNLIMITED (~1u >> 1) - -struct tagAMX; -typedef cell (AMX_NATIVE_CALL *AMX_NATIVE)(struct tagAMX *amx, cell *params); -typedef int (AMXAPI *AMX_CALLBACK)(struct tagAMX *amx, cell index, - cell *result, cell *params); -typedef int (AMXAPI *AMX_DEBUG)(struct tagAMX *amx); -#if !defined _FAR - #define _FAR -#endif - -#if defined _MSC_VER - #pragma warning(disable:4103) /* disable warning message 4103 that complains - * about pragma pack in a header file */ - #pragma warning(disable:4100) /* "'%$S' : unreferenced formal parameter" */ -#endif - - -/* Some compilers do not support the #pragma align, which should be fine. Some - * compilers give a warning on unknown #pragmas, which is not so fine... - */ -#if (defined SN_TARGET_PS2 || defined __GNUC__) && !defined AMX_NO_ALIGN - #define AMX_NO_ALIGN -#endif - -#if defined __GNUC__ - #define PACKED __attribute__((packed)) -#else - #define PACKED -#endif - -#if !defined AMX_NO_ALIGN - #if defined LINUX || defined __FreeBSD__ - #pragma pack(1) /* structures must be packed (byte-aligned) */ - #elif defined MACOS && defined __MWERKS__ - #pragma options align=mac68k - #else - #pragma pack(push) - #pragma pack(1) /* structures must be packed (byte-aligned) */ - #if defined __TURBOC__ - #pragma option -a- /* "pack" pragma for older Borland compilers */ - #endif - #endif -#endif - -typedef struct { - const char _FAR *name PACKED; - AMX_NATIVE func PACKED; -} AMX_NATIVE_INFO; - -#define AMX_USERNUM 4 - -/* The AMX structure is the internal structure for many functions. Not all - * fields are valid at all times; many fields are cached in local variables. - */ -typedef struct tagAMX { - unsigned char _FAR *base PACKED; /* points to the AMX header plus the code, optionally also the data */ - unsigned char _FAR *data PACKED; /* points to separate data+stack+heap, may be NULL */ - AMX_CALLBACK callback PACKED; - AMX_DEBUG debug PACKED; /* debug callback */ - /* for external functions a few registers must be accessible from the outside */ - cell cip PACKED; /* instruction pointer: relative to base + amxhdr->cod */ - cell frm PACKED; /* stack frame base: relative to base + amxhdr->dat */ - cell hea PACKED; /* top of the heap: relative to base + amxhdr->dat */ - cell hlw PACKED; /* bottom of the heap: relative to base + amxhdr->dat */ - cell stk PACKED; /* stack pointer: relative to base + amxhdr->dat */ - cell stp PACKED; /* top of the stack: relative to base + amxhdr->dat */ - int flags PACKED; /* current status, see amx_Flags() */ - /* user data */ - long usertags[AMX_USERNUM] PACKED; - //okay userdata[3] in AMX Mod X is for the CPlugin * pointer - //we're also gonna set userdata[2] to a special debug structure - void _FAR *userdata[AMX_USERNUM] PACKED; - /* native functions can raise an error */ - int error PACKED; - /* passing parameters requires a "count" field */ - int paramcount; - /* the sleep opcode needs to store the full AMX status */ - cell pri PACKED; - cell alt PACKED; - cell reset_stk PACKED; - cell reset_hea PACKED; - cell sysreq_d PACKED; /* relocated address/value for the SYSREQ.D opcode */ - /* support variables for the JIT */ - int reloc_size PACKED; /* required temporary buffer for relocations */ - long code_size PACKED; /* estimated memory footprint of the native code */ -} PACKED AMX; - -enum { - AMX_ERR_NONE, - /* reserve the first 15 error codes for exit codes of the abstract machine */ - AMX_ERR_EXIT, /* forced exit */ - AMX_ERR_ASSERT, /* assertion failed */ - AMX_ERR_STACKERR, /* stack/heap collision */ - AMX_ERR_BOUNDS, /* index out of bounds */ - AMX_ERR_MEMACCESS, /* invalid memory access */ - AMX_ERR_INVINSTR, /* invalid instruction */ - AMX_ERR_STACKLOW, /* stack underflow */ - AMX_ERR_HEAPLOW, /* heap underflow */ - AMX_ERR_CALLBACK, /* no callback, or invalid callback */ - AMX_ERR_NATIVE, /* native function failed */ - AMX_ERR_DIVIDE, /* divide by zero */ - AMX_ERR_SLEEP, /* go into sleepmode - code can be restarted */ - AMX_ERR_INVSTATE, /* invalid state for this access */ - - AMX_ERR_MEMORY = 16, /* out of memory */ - AMX_ERR_FORMAT, /* invalid file format */ - AMX_ERR_VERSION, /* file is for a newer version of the AMX */ - AMX_ERR_NOTFOUND, /* function not found */ - AMX_ERR_INDEX, /* invalid index parameter (bad entry point) */ - AMX_ERR_DEBUG, /* debugger cannot run */ - AMX_ERR_INIT, /* AMX not initialized (or doubly initialized) */ - AMX_ERR_USERDATA, /* unable to set user data field (table full) */ - AMX_ERR_INIT_JIT, /* cannot initialize the JIT */ - AMX_ERR_PARAMS, /* parameter error */ - AMX_ERR_DOMAIN, /* domain error, expression result does not fit in range */ -}; - -#if !defined AMX_NO_ALIGN - #if defined __linux__ - #pragma pack() /* reset default packing */ - #else - #pragma pack(pop) /* reset previous packing */ - #endif -#endif - - -// ***** declare functions ***** - -#ifdef USE_METAMOD -void UTIL_LogPrintf( char *fmt, ... ); -void UTIL_HudMessage(CBaseEntity *pEntity, const hudtextparms_t &textparms, const char *pMessage); -short FixedSigned16( float value, float scale ); -unsigned short FixedUnsigned16( float value, float scale ); - -#ifdef FN_META_QUERY -void FN_META_QUERY(void); -#endif // FN_META_QUERY - -#ifdef FN_META_ATTACH -void FN_META_ATTACH(void); -#endif // FN_META_ATTACH - -#ifdef FN_META_DETACH -void FN_META_DETACH(void); -#endif // FN_META_DETACH - - - - - -#ifdef FN_GameDLLInit -void FN_GameDLLInit(void); -#endif // FN_GameDLLInit - -#ifdef FN_DispatchSpawn -int FN_DispatchSpawn(edict_t *pent); -#endif // FN_DispatchSpawn - -#ifdef FN_DispatchThink -void FN_DispatchThink(edict_t *pent); -#endif // FN_DispatchThink - -#ifdef FN_DispatchUse -void FN_DispatchUse(edict_t *pentUser, edict_t *pentOther); -#endif // FN_DispatchUse - -#ifdef FN_DispatchTouch -void FN_DispatchTouch(edict_t *pentTouched, edict_t *pentOther); -#endif // FN_DispatchTouch - -#ifdef FN_DispatchBlocked -void FN_DispatchBlocked(edict_t *pentBlocked, edict_t *pentOther); -#endif // FN_DispatchBlocked - -#ifdef FN_DispatchKeyValue -void FN_DispatchKeyValue(edict_t *pentKeyvalue, KeyValueData *pkvd); -#endif // FN_DispatchKeyValue - -#ifdef FN_DispatchSave -void FN_DispatchSave(edict_t *pent, SAVERESTOREDATA *pSaveData); -#endif // FN_DispatchSave - -#ifdef FN_DispatchRestore -int FN_DispatchRestore(edict_t *pent, SAVERESTOREDATA *pSaveData, int globalEntity); -#endif // FN_DispatchRestore - -#ifdef FN_DispatchObjectCollsionBox -void FN_DispatchObjectCollsionBox(edict_t *pent); -#endif // FN_DispatchObjectCollsionBox - -#ifdef FN_SaveWriteFields -void FN_SaveWriteFields(SAVERESTOREDATA *pSaveData, const char *pname, void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount); -#endif // FN_SaveWriteFields - -#ifdef FN_SaveReadFields -void FN_SaveReadFields(SAVERESTOREDATA *pSaveData, const char *pname, void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount); -#endif // FN_SaveReadFields - -#ifdef FN_SaveGlobalState -void FN_SaveGlobalState(SAVERESTOREDATA *pSaveData); -#endif // FN_SaveGlobalState - -#ifdef FN_RestoreGlobalState -void FN_RestoreGlobalState(SAVERESTOREDATA *pSaveData); -#endif // FN_RestoreGlobalState - -#ifdef FN_ResetGlobalState -void FN_ResetGlobalState(void); -#endif // FN_ResetGlobalState - -#ifdef FN_ClientConnect -BOOL FN_ClientConnect(edict_t *pEntity, const char *pszName, const char *pszAddress, char szRejectReason[ 128 ]); -#endif // FN_ClientConnect - -#ifdef FN_ClientDisconnect -void FN_ClientDisconnect(edict_t *pEntity); -#endif // FN_ClientDisconnect - -#ifdef FN_ClientKill -void FN_ClientKill(edict_t *pEntity); -#endif // FN_ClientKill - -#ifdef FN_ClientPutInServer -void FN_ClientPutInServer(edict_t *pEntity); -#endif // FN_ClientPutInServer - -#ifdef FN_ClientCommand -void FN_ClientCommand(edict_t *pEntity); -#endif // FN_ClientCommand - -#ifdef FN_ClientUserInfoChanged -void FN_ClientUserInfoChanged(edict_t *pEntity, char *infobuffer); -#endif // FN_ClientUserInfoChanged - -#ifdef FN_ServerActivate -void FN_ServerActivate(edict_t *pEdictList, int edictCount, int clientMax); -#endif // FN_ServerActivate - -#ifdef FN_ServerDeactivate -void FN_ServerDeactivate(void); -#endif // FN_ServerDeactivate - -#ifdef FN_PlayerPreThink -void FN_PlayerPreThink(edict_t *pEntity); -#endif // FN_PlayerPreThink - -#ifdef FN_PlayerPostThink -void FN_PlayerPostThink(edict_t *pEntity); -#endif // FN_PlayerPostThink - -#ifdef FN_StartFrame -void FN_StartFrame(void); -#endif // FN_StartFrame - -#ifdef FN_ParmsNewLevel -void FN_ParmsNewLevel(void); -#endif // FN_ParmsNewLevel - -#ifdef FN_ParmsChangeLevel -void FN_ParmsChangeLevel(void); -#endif // FN_ParmsChangeLevel - -#ifdef FN_GetGameDescription -const char *FN_GetGameDescription(void); -#endif // FN_GetGameDescription - -#ifdef FN_PlayerCustomization -void FN_PlayerCustomization(edict_t *pEntity, customization_t *pCust); -#endif // FN_PlayerCustomization - -#ifdef FN_SpectatorConnect -void FN_SpectatorConnect(edict_t *pEntity); -#endif // FN_SpectatorConnect - -#ifdef FN_SpectatorDisconnect -void FN_SpectatorDisconnect(edict_t *pEntity); -#endif // FN_SpectatorDisconnect - -#ifdef FN_SpectatorThink -void FN_SpectatorThink(edict_t *pEntity); -#endif // FN_SpectatorThink - -#ifdef FN_Sys_Error -void FN_Sys_Error(const char *error_string); -#endif // FN_Sys_Error - -#ifdef FN_PM_Move -void FN_PM_Move(struct playermove_s *ppmove, int server); -#endif // FN_PM_Move - -#ifdef FN_PM_Init -void FN_PM_Init(struct playermove_s *ppmove); -#endif // FN_PM_Init - -#ifdef FN_PM_FindTextureType -char FN_PM_FindTextureType(char *name); -#endif // FN_PM_FindTextureType - -#ifdef FN_SetupVisibility -void FN_SetupVisibility(edict_t *pViewEntity, edict_t *pClient, unsigned char **pvs, unsigned char **pas); -#endif // FN_SetupVisibility - -#ifdef FN_UpdateClientData -void FN_UpdateClientData(const struct edict_s *ent, int sendweapons, struct clientdata_s *cd); -#endif // FN_UpdateClientData - -#ifdef FN_AddToFullPack -int FN_AddToFullPack(struct entity_state_s *state, int e, edict_t *ent, edict_t *host, int hostflags, int player, unsigned char *pSet); -#endif // FN_AddToFullPack - -#ifdef FN_CreateBaseline -void FN_CreateBaseline(int player, int eindex, struct entity_state_s *baseline, struct edict_s *entity, int playermodelindex, vec3_t player_mins, vec3_t player_maxs); -#endif // FN_CreateBaseline - -#ifdef FN_RegisterEncoders -void FN_RegisterEncoders(void); -#endif // FN_RegisterEncoders - -#ifdef FN_GetWeaponData -int FN_GetWeaponData(struct edict_s *player, struct weapon_data_s *info); -#endif // FN_GetWeaponData - -#ifdef FN_CmdStart -void FN_CmdStart(const edict_t *player, const struct usercmd_s *cmd, unsigned int random_seed); -#endif // FN_CmdStart - -#ifdef FN_CmdEnd -void FN_CmdEnd(const edict_t *player); -#endif // FN_CmdEnd - -#ifdef FN_ConnectionlessPacket -int FN_ConnectionlessPacket(const struct netadr_s *net_from, const char *args, char *response_buffer, int *response_buffer_size); -#endif // FN_ConnectionlessPacket - -#ifdef FN_GetHullBounds -int FN_GetHullBounds(int hullnumber, float *mins, float *maxs); -#endif // FN_GetHullBounds - -#ifdef FN_CreateInstancedBaselines -void FN_CreateInstancedBaselines(void); -#endif // FN_CreateInstancedBaselines - -#ifdef FN_InconsistentFile -int FN_InconsistentFile(const edict_t *player, const char *filename, char *disconnect_message); -#endif // FN_InconsistentFile - -#ifdef FN_AllowLagCompensation -int FN_AllowLagCompensation(void); -#endif // FN_AllowLagCompensation - - - - -#ifdef FN_GameDLLInit_Post -void FN_GameDLLInit_Post(void); -#endif // FN_GameDLLInit_Post - -#ifdef FN_DispatchSpawn_Post -int FN_DispatchSpawn_Post(edict_t *pent); -#endif // FN_DispatchSpawn_Post - -#ifdef FN_DispatchThink_Post -void FN_DispatchThink_Post(edict_t *pent); -#endif // FN_DispatchThink_Post - -#ifdef FN_DispatchUse_Post -void FN_DispatchUse_Post(edict_t *pentUser, edict_t *pentOther); -#endif // FN_DispatchUse_Post - -#ifdef FN_DispatchTouch_Post -void FN_DispatchTouch_Post(edict_t *pentTouched, edict_t *pentOther); -#endif // FN_DispatchTouch_Post - -#ifdef FN_DispatchBlocked_Post -void FN_DispatchBlocked_Post(edict_t *pentBlocked, edict_t *pentOther); -#endif // FN_DispatchBlocked_Post - -#ifdef FN_DispatchKeyValue_Post -void FN_DispatchKeyValue_Post(edict_t *pentKeyvalue, KeyValueData *pkvd); -#endif // FN_DispatchKeyValue_Post - -#ifdef FN_DispatchSave_Post -void FN_DispatchSave_Post(edict_t *pent, SAVERESTOREDATA *pSaveData); -#endif // FN_DispatchSave_Post - -#ifdef FN_DispatchRestore_Post -int FN_DispatchRestore_Post(edict_t *pent, SAVERESTOREDATA *pSaveData, int globalEntity); -#endif // FN_DispatchRestore_Post - -#ifdef FN_DispatchObjectCollsionBox_Post -void FN_DispatchObjectCollsionBox_Post(edict_t *pent); -#endif // FN_DispatchObjectCollsionBox_Post - -#ifdef FN_SaveWriteFields_Post -void FN_SaveWriteFields_Post(SAVERESTOREDATA *pSaveData, const char *pname, void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount); -#endif // FN_SaveWriteFields_Post - -#ifdef FN_SaveReadFields_Post -void FN_SaveReadFields_Post(SAVERESTOREDATA *pSaveData, const char *pname, void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount); -#endif // FN_SaveReadFields_Post - -#ifdef FN_SaveGlobalState_Post -void FN_SaveGlobalState_Post(SAVERESTOREDATA *pSaveData); -#endif // FN_SaveGlobalState_Post - -#ifdef FN_RestoreGlobalState_Post -void FN_RestoreGlobalState_Post(SAVERESTOREDATA *pSaveData); -#endif // FN_RestoreGlobalState_Post - -#ifdef FN_ResetGlobalState_Post -void FN_ResetGlobalState_Post(void); -#endif // FN_ResetGlobalState_Post - -#ifdef FN_ClientConnect_Post -BOOL FN_ClientConnect_Post(edict_t *pEntity, const char *pszName, const char *pszAddress, char szRejectReason[ 128 ]); -#endif // FN_ClientConnect_Post - -#ifdef FN_ClientDisconnect_Post -void FN_ClientDisconnect_Post(edict_t *pEntity); -#endif // FN_ClientDisconnect_Post - -#ifdef FN_ClientKill_Post -void FN_ClientKill_Post(edict_t *pEntity); -#endif // FN_ClientKill_Post - -#ifdef FN_ClientPutInServer_Post -void FN_ClientPutInServer_Post(edict_t *pEntity); -#endif // FN_ClientPutInServer_Post - -#ifdef FN_ClientCommand_Post -void FN_ClientCommand_Post(edict_t *pEntity); -#endif // FN_ClientCommand_Post - -#ifdef FN_ClientUserInfoChanged_Post -void FN_ClientUserInfoChanged_Post(edict_t *pEntity, char *infobuffer); -#endif // FN_ClientUserInfoChanged_Post - -#ifdef FN_ServerActivate_Post -void FN_ServerActivate_Post(edict_t *pEdictList, int edictCount, int clientMax); -#endif // FN_ServerActivate_Post - -#ifdef FN_ServerDeactivate_Post -void FN_ServerDeactivate_Post(void); -#endif // FN_ServerDeactivate_Post - -#ifdef FN_PlayerPreThink_Post -void FN_PlayerPreThink_Post(edict_t *pEntity); -#endif // FN_PlayerPreThink_Post - -#ifdef FN_PlayerPostThink_Post -void FN_PlayerPostThink_Post(edict_t *pEntity); -#endif // FN_PlayerPostThink_Post - -#ifdef FN_StartFrame_Post -void FN_StartFrame_Post(void); -#endif // FN_StartFrame_Post - -#ifdef FN_ParmsNewLevel_Post -void FN_ParmsNewLevel_Post(void); -#endif // FN_ParmsNewLevel_Post - -#ifdef FN_ParmsChangeLevel_Post -void FN_ParmsChangeLevel_Post(void); -#endif // FN_ParmsChangeLevel_Post - -#ifdef FN_GetGameDescription_Post -const char *FN_GetGameDescription_Post(void); -#endif // FN_GetGameDescription_Post - -#ifdef FN_PlayerCustomization_Post -void FN_PlayerCustomization_Post(edict_t *pEntity, customization_t *pCust); -#endif // FN_PlayerCustomization_Post - -#ifdef FN_SpectatorConnect_Post -void FN_SpectatorConnect_Post(edict_t *pEntity); -#endif // FN_SpectatorConnect_Post - -#ifdef FN_SpectatorDisconnect_Post -void FN_SpectatorDisconnect_Post(edict_t *pEntity); -#endif // FN_SpectatorDisconnect_Post - -#ifdef FN_SpectatorThink_Post -void FN_SpectatorThink_Post(edict_t *pEntity); -#endif // FN_SpectatorThink_Post - -#ifdef FN_Sys_Error_Post -void FN_Sys_Error_Post(const char *error_string); -#endif // FN_Sys_Error_Post - -#ifdef FN_PM_Move_Post -void FN_PM_Move_Post(struct playermove_s *ppmove, int server); -#endif // FN_PM_Move_Post - -#ifdef FN_PM_Init_Post -void FN_PM_Init_Post(struct playermove_s *ppmove); -#endif // FN_PM_Init_Post - -#ifdef FN_PM_FindTextureType_Post -char FN_PM_FindTextureType_Post(char *name); -#endif // FN_PM_FindTextureType_Post - -#ifdef FN_SetupVisibility_Post -void FN_SetupVisibility_Post(edict_t *pViewEntity, edict_t *pClient, unsigned char **pvs, unsigned char **pas); -#endif // FN_SetupVisibility_Post - -#ifdef FN_UpdateClientData_Post -void FN_UpdateClientData_Post(const struct edict_s *ent, int sendweapons, struct clientdata_s *cd); -#endif // FN_UpdateClientData_Post - -#ifdef FN_AddToFullPack_Post -int FN_AddToFullPack_Post(struct entity_state_s *state, int e, edict_t *ent, edict_t *host, int hostflags, int player, unsigned char *pSet); -#endif // FN_AddToFullPack_Post - -#ifdef FN_CreateBaseline_Post -void FN_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); -#endif // FN_CreateBaseline_Post - -#ifdef FN_RegisterEncoders_Post -void FN_RegisterEncoders_Post(void); -#endif // FN_RegisterEncoders_Post - -#ifdef FN_GetWeaponData_Post -int FN_GetWeaponData_Post(struct edict_s *player, struct weapon_data_s *info); -#endif // FN_GetWeaponData_Post - -#ifdef FN_CmdStart_Post -void FN_CmdStart_Post(const edict_t *player, const struct usercmd_s *cmd, unsigned int random_seed); -#endif // FN_CmdStart_Post - -#ifdef FN_CmdEnd_Post -void FN_CmdEnd_Post(const edict_t *player); -#endif // FN_CmdEnd_Post - -#ifdef FN_ConnectionlessPacket_Post -int FN_ConnectionlessPacket_Post(const struct netadr_s *net_from, const char *args, char *response_buffer, int *response_buffer_size); -#endif // FN_ConnectionlessPacket_Post - -#ifdef FN_GetHullBounds_Post -int FN_GetHullBounds_Post(int hullnumber, float *mins, float *maxs); -#endif // FN_GetHullBounds_Post - -#ifdef FN_CreateInstancedBaselines_Post -void FN_CreateInstancedBaselines_Post(void); -#endif // FN_CreateInstancedBaselines_Post - -#ifdef FN_InconsistentFile_Post -int FN_InconsistentFile_Post(const edict_t *player, const char *filename, char *disconnect_message); -#endif // FN_InconsistentFile_Post - -#ifdef FN_AllowLagCompensation_Post -int FN_AllowLagCompensation_Post(void); -#endif // FN_AllowLagCompensation_Post - - - -#ifdef FN_PrecacheModel -int FN_PrecacheModel(char *s); -#endif // FN_PrecacheModel - -#ifdef FN_PrecacheSound -int FN_PrecacheSound(char *s); -#endif // FN_PrecacheSound - -#ifdef FN_SetModel -void FN_SetModel(edict_t *e, const char *m); -#endif // FN_SetModel - -#ifdef FN_ModelIndex -int FN_ModelIndex(const char *m); -#endif // FN_ModelIndex - -#ifdef FN_ModelFrames -int FN_ModelFrames(int modelIndex); -#endif // FN_ModelFrames - -#ifdef FN_SetSize -void FN_SetSize(edict_t *e, const float *rgflMin, const float *rgflMax); -#endif // FN_SetSize - -#ifdef FN_ChangeLevel -void FN_ChangeLevel(char *s1, char *s2); -#endif // FN_ChangeLevel - -#ifdef FN_GetSpawnParms -void FN_GetSpawnParms(edict_t *ent); -#endif // FN_GetSpawnParms - -#ifdef FN_SaveSpawnParms -void FN_SaveSpawnParms(edict_t *ent); -#endif // FN_SaveSpawnParms - -#ifdef FN_VecToYaw -float FN_VecToYaw(const float *rgflVector); -#endif // FN_VecToYaw - -#ifdef FN_VecToAngles -void FN_VecToAngles(const float *rgflVectorIn, float *rgflVectorOut); -#endif // FN_VecToAngles - -#ifdef FN_MoveToOrigin -void FN_MoveToOrigin(edict_t *ent, const float *pflGoal, float dist, int iMoveType); -#endif // FN_MoveToOrigin - -#ifdef FN_ChangeYaw -void FN_ChangeYaw(edict_t *ent); -#endif // FN_ChangeYaw - -#ifdef FN_ChangePitch -void FN_ChangePitch(edict_t *ent); -#endif // FN_ChangePitch - -#ifdef FN_FindEntityByString -edict_t *FN_FindEntityByString(edict_t *pEdictStartSearchAfter, const char *pszField, const char *pszValue); -#endif // FN_FindEntityByString - -#ifdef FN_GetEntityIllum -int FN_GetEntityIllum(edict_t *pEnt); -#endif // FN_GetEntityIllum - -#ifdef FN_FindEntityInSphere -edict_t *FN_FindEntityInSphere(edict_t *pEdictStartSearchAfter, const float *org, float rad); -#endif // FN_FindEntityInSphere - -#ifdef FN_FindClientInPVS -edict_t *FN_FindClientInPVS(edict_t *pEdict); -#endif // FN_FindClientInPVS - -#ifdef FN_EntitiesInPVS -edict_t *FN_EntitiesInPVS(edict_t *pplayer); -#endif // FN_EntitiesInPVS - -#ifdef FN_MakeVectors -void FN_MakeVectors(const float *rgflVector); -#endif // FN_MakeVectors - -#ifdef FN_AngleVectors -void FN_AngleVectors(const float *rgflVector, float *forward, float *right, float *up); -#endif // FN_AngleVectors - -#ifdef FN_CreateEntity -edict_t *FN_CreateEntity(void); -#endif // FN_CreateEntity - -#ifdef FN_RemoveEntity -void FN_RemoveEntity(edict_t *e); -#endif // FN_RemoveEntity - -#ifdef FN_CreateNamedEntity -edict_t *FN_CreateNamedEntity(int className); -#endif // FN_CreateNamedEntity - -#ifdef FN_MakeStatic -void FN_MakeStatic(edict_t *ent); -#endif // FN_MakeStatic - -#ifdef FN_EntIsOnFloor -int FN_EntIsOnFloor(edict_t *ent); -#endif // FN_EntIsOnFloor - -#ifdef FN_DropToFloor -int FN_DropToFloor(edict_t *ent); -#endif // FN_DropToFloor - -#ifdef FN_WalkMove -int FN_WalkMove(edict_t *ent, float yaw, float dist, int iMode); -#endif // FN_WalkMove - -#ifdef FN_SetOrigin -void FN_SetOrigin(edict_t *e, const float *rgflOrigin); -#endif // FN_SetOrigin - -#ifdef FN_EmitSound -void FN_EmitSound(edict_t *entity, int channel, const char *sample, /*int*/float volume, float attenuation, int fFlags, int pitch); -#endif // FN_EmitSound - -#ifdef FN_EmitAmbientSound -void FN_EmitAmbientSound(edict_t *entity, float *pos, const char *samp, float vol, float attenuation, int fFlags, int pitch); -#endif // FN_EmitAmbientSound - -#ifdef FN_TraceLine -void FN_TraceLine(const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr); -#endif // FN_TraceLine - -#ifdef FN_TraceToss -void FN_TraceToss(edict_t *pent, edict_t *pentToIgnore, TraceResult *ptr); -#endif // FN_TraceToss - -#ifdef FN_TraceMonsterHull -int FN_TraceMonsterHull(edict_t *pEdict, const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr); -#endif // FN_TraceMonsterHull - -#ifdef FN_TraceHull -void FN_TraceHull(const float *v1, const float *v2, int fNoMonsters, int hullNumber, edict_t *pentToSkip, TraceResult *ptr); -#endif // FN_TraceHull - -#ifdef FN_TraceModel -void FN_TraceModel(const float *v1, const float *v2, int hullNumber, edict_t *pent, TraceResult *ptr); -#endif // FN_TraceModel - -#ifdef FN_TraceTexture -const char *FN_TraceTexture(edict_t *pTextureEntity, const float *v1, const float *v2 ); -#endif // FN_TraceTexture - -#ifdef FN_TraceSphere -void FN_TraceSphere(const float *v1, const float *v2, int fNoMonsters, float radius, edict_t *pentToSkip, TraceResult *ptr); -#endif // FN_TraceSphere - -#ifdef FN_GetAimVector -void FN_GetAimVector(edict_t *ent, float speed, float *rgflReturn); -#endif // FN_GetAimVector - -#ifdef FN_ServerCommand -void FN_ServerCommand(char *str); -#endif // FN_ServerCommand - -#ifdef FN_ServerExecute -void FN_ServerExecute(void); -#endif // FN_ServerExecute - -#ifdef FN_engClientCommand -void FN_engClientCommand(edict_t *pEdict, char *szFmt, ...); -#endif // FN_engClientCommand - -#ifdef FN_ParticleEffect -void FN_ParticleEffect(const float *org, const float *dir, float color, float count); -#endif // FN_ParticleEffect - -#ifdef FN_LightStyle -void FN_LightStyle(int style, char *val); -#endif // FN_LightStyle - -#ifdef FN_DecalIndex -int FN_DecalIndex(const char *name); -#endif // FN_DecalIndex - -#ifdef FN_PointContents -int FN_PointContents(const float *rgflVector); -#endif // FN_PointContents - -#ifdef FN_MessageBegin -void FN_MessageBegin(int msg_dest, int msg_type, const float *pOrigin, edict_t *ed); -#endif // FN_MessageBegin - -#ifdef FN_MessageEnd -void FN_MessageEnd(void); -#endif // FN_MessageEnd - -#ifdef FN_WriteByte -void FN_WriteByte(int iValue); -#endif // FN_WriteByte - -#ifdef FN_WriteChar -void FN_WriteChar(int iValue); -#endif // FN_WriteChar - -#ifdef FN_WriteShort -void FN_WriteShort(int iValue); -#endif // FN_WriteShort - -#ifdef FN_WriteLong -void FN_WriteLong(int iValue); -#endif // FN_WriteLong - -#ifdef FN_WriteAngle -void FN_WriteAngle(float flValue); -#endif // FN_WriteAngle - -#ifdef FN_WriteCoord -void FN_WriteCoord(float flValue); -#endif // FN_WriteCoord - -#ifdef FN_WriteString -void FN_WriteString(const char *sz); -#endif // FN_WriteString - -#ifdef FN_WriteEntity -void FN_WriteEntity(int iValue); -#endif // FN_WriteEntity - -#ifdef FN_CVarRegister -void FN_CVarRegister(cvar_t *pCvar); -#endif // FN_CVarRegister - -#ifdef FN_CVarGetFloat -float FN_CVarGetFloat(const char *szVarName); -#endif // FN_CVarGetFloat - -#ifdef FN_CVarGetString -const char *FN_CVarGetString(const char *szVarName); -#endif // FN_CVarGetString - -#ifdef FN_CVarSetFloat -void FN_CVarSetFloat(const char *szVarName, float flValue); -#endif // FN_CVarSetFloat - -#ifdef FN_CVarSetString -void FN_CVarSetString(const char *szVarName, const char *szValue); -#endif // FN_CVarSetString - -#ifdef FN_AlertMessage -void FN_AlertMessage(ALERT_TYPE atype, char *szFmt, ...); -#endif // FN_AlertMessage - -#ifdef FN_EngineFprintf -void FN_EngineFprintf(FILE *pfile, char *szFmt, ...); -#endif // FN_EngineFprintf - -#ifdef FN_PvAllocEntPrivateData -void *FN_PvAllocEntPrivateData(edict_t *pEdict, int32 cb); -#endif // FN_PvAllocEntPrivateData - -#ifdef FN_PvEntPrivateData -void *FN_PvEntPrivateData(edict_t *pEdict); -#endif // FN_PvEntPrivateData - -#ifdef FN_FreeEntPrivateData -void FN_FreeEntPrivateData(edict_t *pEdict); -#endif // FN_FreeEntPrivateData - -#ifdef FN_SzFromIndex -const char *FN_SzFromIndex(int iString); -#endif // FN_SzFromIndex - -#ifdef FN_AllocString -int FN_AllocString(const char *szValue); -#endif // FN_AllocString - -#ifdef FN_GetVarsOfEnt -struct entvars_s *FN_GetVarsOfEnt(edict_t *pEdict); -#endif // FN_GetVarsOfEnt - -#ifdef FN_PEntityOfEntOffset -edict_t *FN_PEntityOfEntOffset(int iEntOffset); -#endif // FN_PEntityOfEntOffset - -#ifdef FN_EntOffsetOfPEntity -int FN_EntOffsetOfPEntity(const edict_t *pEdict); -#endif // FN_EntOffsetOfPEntity - -#ifdef FN_IndexOfEdict -int FN_IndexOfEdict(const edict_t *pEdict); -#endif // FN_IndexOfEdict - -#ifdef FN_PEntityOfEntIndex -edict_t *FN_PEntityOfEntIndex(int iEntIndex); -#endif // FN_PEntityOfEntIndex - -#ifdef FN_FindEntityByVars -edict_t *FN_FindEntityByVars(struct entvars_s *pvars); -#endif // FN_FindEntityByVars - -#ifdef FN_GetModelPtr -void *FN_GetModelPtr(edict_t *pEdict); -#endif // FN_GetModelPtr - -#ifdef FN_RegUserMsg -int FN_RegUserMsg(const char *pszName, int iSize); -#endif // FN_RegUserMsg - -#ifdef FN_AnimationAutomove -void FN_AnimationAutomove(const edict_t *pEdict, float flTime); -#endif // FN_AnimationAutomove - -#ifdef FN_GetBonePosition -void FN_GetBonePosition(const edict_t *pEdict, int iBone, float *rgflOrigin, float *rgflAngles); -#endif // FN_GetBonePosition - -#ifdef FN_FunctionFromName -unsigned long FN_FunctionFromName(const char *pName); -#endif // FN_FunctionFromName - -#ifdef FN_NameForFunction -const char *FN_NameForFunction(unsigned long function); -#endif // FN_NameForFunction - -#ifdef FN_ClientPrintf -void FN_ClientPrintf(edict_t *pEdict, PRINT_TYPE ptype, const char *szMsg); -#endif // FN_ClientPrintf - -#ifdef FN_ServerPrint -void FN_ServerPrint(const char *szMsg); -#endif // FN_ServerPrint - -#ifdef FN_Cmd_Args -const char *FN_Cmd_Args(void); -#endif // FN_Cmd_Args - -#ifdef FN_Cmd_Argv -const char *FN_Cmd_Argv(int argc); -#endif // FN_Cmd_Argv - -#ifdef FN_Cmd_Argc -int FN_Cmd_Argc(void); -#endif // FN_Cmd_Argc - -#ifdef FN_GetAttachment -void FN_GetAttachment(const edict_t *pEdict, int iAttachment, float *rgflOrigin, float *rgflAngles ); -#endif // FN_GetAttachment - -#ifdef FN_CRC32_Init -void FN_CRC32_Init(CRC32_t *pulCRC); -#endif // FN_CRC32_Init - -#ifdef FN_CRC32_ProcessBuffer -void FN_CRC32_ProcessBuffer(CRC32_t *pulCRC, void *p, int len); -#endif // FN_CRC32_ProcessBuffer - -#ifdef FN_CRC32_ProcessByte -void FN_CRC32_ProcessByte(CRC32_t *pulCRC, unsigned char ch); -#endif // FN_CRC32_ProcessByte - -#ifdef FN_CRC32_Final -CRC32_t FN_CRC32_Final(CRC32_t pulCRC); -#endif // FN_CRC32_Final - -#ifdef FN_RandomLong -long FN_RandomLong(long lLow, long lHigh); -#endif // FN_RandomLong - -#ifdef FN_RandomFloat -float FN_RandomFloat(float flLow, float flHigh); -#endif // FN_RandomFloat - -#ifdef FN_SetView -void FN_SetView(const edict_t *pClient, const edict_t *pViewent); -#endif // FN_SetView - -#ifdef FN_Time -float FN_Time(void); -#endif // FN_Time - -#ifdef FN_CrosshairAngle -void FN_CrosshairAngle(const edict_t *pClient, float pitch, float yaw); -#endif // FN_CrosshairAngle - -#ifdef FN_LoadFileForMe -byte *FN_LoadFileForMe(char *filename, int *pLength); -#endif // FN_LoadFileForMe - -#ifdef FN_FreeFile -void FN_FreeFile(void *buffer); -#endif // FN_FreeFile - -#ifdef FN_EndSection -void FN_EndSection(const char *pszSectionName); -#endif // FN_EndSection - -#ifdef FN_CompareFileTime -int FN_CompareFileTime(char *filename1, char *filename2, int *iCompare); -#endif // FN_CompareFileTime - -#ifdef FN_GetGameDir -void FN_GetGameDir(char *szGetGameDir); -#endif // FN_GetGameDir - -#ifdef FN_Cvar_RegisterVariable -void FN_Cvar_RegisterVariable(cvar_t *variable); -#endif // FN_Cvar_RegisterVariable - -#ifdef FN_FadeClientVolume -void FN_FadeClientVolume(const edict_t *pEdict, int fadePercent, int fadeOutSeconds, int holdTime, int fadeInSeconds); -#endif // FN_FadeClientVolume - -#ifdef FN_SetClientMaxspeed -void FN_SetClientMaxspeed(const edict_t *pEdict, float fNewMaxspeed); -#endif // FN_SetClientMaxspeed - -#ifdef FN_CreateFakeClient -edict_t *FN_CreateFakeClient(const char *netname); -#endif // FN_CreateFakeClient - -#ifdef FN_RunPlayerMove -void FN_RunPlayerMove(edict_t *fakeclient, const float *viewangles, float forwardmove, float sidemove, float upmove, unsigned short buttons, byte impulse, byte msec); -#endif // FN_RunPlayerMove - -#ifdef FN_NumberOfEntities -int FN_NumberOfEntities(void); -#endif // FN_NumberOfEntities - -#ifdef FN_GetInfoKeyBuffer -char *FN_GetInfoKeyBuffer(edict_t *e); -#endif // FN_GetInfoKeyBuffer - -#ifdef FN_InfoKeyValue -char *FN_InfoKeyValue(char *infobuffer, char *key); -#endif // FN_InfoKeyValue - -#ifdef FN_SetKeyValue -void FN_SetKeyValue(char *infobuffer, char *key, char *value); -#endif // FN_SetKeyValue - -#ifdef FN_SetClientKeyValue -void FN_SetClientKeyValue(int clientIndex, char *infobuffer, char *key, char *value); -#endif // FN_SetClientKeyValue - -#ifdef FN_IsMapValid -int FN_IsMapValid(char *filename); -#endif // FN_IsMapValid - -#ifdef FN_StaticDecal -void FN_StaticDecal(const float *origin, int decalIndex, int entityIndex, int modelIndex); -#endif // FN_StaticDecal - -#ifdef FN_PrecacheGeneric -int FN_PrecacheGeneric(char *s); -#endif // FN_PrecacheGeneric - -#ifdef FN_GetPlayerUserId -int FN_GetPlayerUserId(edict_t *e ); -#endif // FN_GetPlayerUserId - -#ifdef FN_BuildSoundMsg -void FN_BuildSoundMsg(edict_t *entity, int channel, const char *sample, /*int*/float volume, float attenuation, int fFlags, int pitch, int msg_dest, int msg_type, const float *pOrigin, edict_t *ed); -#endif // FN_BuildSoundMsg - -#ifdef FN_IsDedicatedServer -int FN_IsDedicatedServer(void); -#endif // FN_IsDedicatedServer - -#ifdef FN_CVarGetPointer -cvar_t *FN_CVarGetPointer(const char *szVarName); -#endif // FN_CVarGetPointer - -#ifdef FN_GetPlayerWONId -unsigned int FN_GetPlayerWONId(edict_t *e); -#endif // FN_GetPlayerWONId - -#ifdef FN_Info_RemoveKey -void FN_Info_RemoveKey( char *s, const char *key); -#endif // FN_Info_RemoveKey - -#ifdef FN_GetPhysicsKeyValue -const char *FN_GetPhysicsKeyValue(const edict_t *pClient, const char *key); -#endif // FN_GetPhysicsKeyValue - -#ifdef FN_SetPhysicsKeyValue -void FN_SetPhysicsKeyValue(const edict_t *pClient, const char *key, const char *value); -#endif // FN_SetPhysicsKeyValue - -#ifdef FN_GetPhysicsInfoString -const char *FN_GetPhysicsInfoString( const edict_t *pClient); -#endif // FN_GetPhysicsInfoString - -#ifdef FN_PrecacheEvent -unsigned short FN_PrecacheEvent(int type, const char *psz); -#endif // FN_PrecacheEvent - -#ifdef FN_PlaybackEvent -void FN_PlaybackEvent(int flags, const edict_t *pInvoker, unsigned short eventindex, float delay, float *origin, float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2); -#endif // FN_PlaybackEvent - -#ifdef FN_SetFatPVS -unsigned char *FN_SetFatPVS(float *org); -#endif // FN_SetFatPVS - -#ifdef FN_SetFatPAS -unsigned char *FN_SetFatPAS(float *org); -#endif // FN_SetFatPAS - -#ifdef FN_CheckVisibility -int FN_CheckVisibility(const edict_t *entity, unsigned char *pset); -#endif // FN_CheckVisibility - -#ifdef FN_DeltaSetField -void FN_DeltaSetField(struct delta_s *pFields, const char *fieldname); -#endif // FN_DeltaSetField - -#ifdef FN_DeltaUnsetField -void FN_DeltaUnsetField(struct delta_s *pFields, const char *fieldname); -#endif // FN_DeltaUnsetField - -#ifdef FN_DeltaAddEncoder -void FN_DeltaAddEncoder(char *name, void (*conditionalencode)( struct delta_s *pFields, const unsigned char *from, const unsigned char *to ) ); -#endif // FN_DeltaAddEncoder - -#ifdef FN_GetCurrentPlayer -int FN_GetCurrentPlayer(void); -#endif // FN_GetCurrentPlayer - -#ifdef FN_CanSkipPlayer -int FN_CanSkipPlayer(const edict_t *player); -#endif // FN_CanSkipPlayer - -#ifdef FN_DeltaFindField -int FN_DeltaFindField(struct delta_s *pFields, const char *fieldname); -#endif // FN_DeltaFindField - -#ifdef FN_DeltaSetFieldByIndex -void FN_DeltaSetFieldByIndex(struct delta_s *pFields, int fieldNumber); -#endif // FN_DeltaSetFieldByIndex - -#ifdef FN_DeltaUnsetFieldByIndex -void FN_DeltaUnsetFieldByIndex(struct delta_s *pFields, int fieldNumber); -#endif // FN_DeltaUnsetFieldByIndex - -#ifdef FN_SetGroupMask -void FN_SetGroupMask(int mask, int op); -#endif // FN_SetGroupMask - -#ifdef FN_engCreateInstancedBaseline -int FN_engCreateInstancedBaseline(int classname, struct entity_state_s *baseline); -#endif // FN_engCreateInstancedBaseline - -#ifdef FN_Cvar_DirectSet -void FN_Cvar_DirectSet(struct cvar_s *var, char *value); -#endif // FN_Cvar_DirectSet - -#ifdef FN_ForceUnmodified -void FN_ForceUnmodified(FORCE_TYPE type, float *mins, float *maxs, const char *filename); -#endif // FN_ForceUnmodified - -#ifdef FN_GetPlayerStats -void FN_GetPlayerStats(const edict_t *pClient, int *ping, int *packet_loss); -#endif // FN_GetPlayerStats - -#ifdef FN_AddServerCommand -void FN_AddServerCommand(char *cmd_name, void (*function) (void)); -#endif // FN_AddServerCommand - -#ifdef FN_Voice_GetClientListening -qboolean FN_Voice_GetClientListening(int iReceiver, int iSender); -#endif // FN_Voice_GetClientListening - -#ifdef FN_Voice_SetClientListening -qboolean FN_Voice_SetClientListening(int iReceiver, int iSender, qboolean bListen); -#endif // FN_Voice_SetClientListening - -#ifdef FN_GetPlayerAuthId -const char *FN_GetPlayerAuthId(edict_t *e); -#endif // FN_GetPlayerAuthId - - - - - - -#ifdef FN_PrecacheModel_Post -int FN_PrecacheModel_Post(char *s); -#endif // FN_PrecacheModel_Post - -#ifdef FN_PrecacheSound_Post -int FN_PrecacheSound_Post(char *s); -#endif // FN_PrecacheSound_Post - -#ifdef FN_SetModel_Post -void FN_SetModel_Post(edict_t *e, const char *m); -#endif // FN_SetModel_Post - -#ifdef FN_ModelIndex_Post -int FN_ModelIndex_Post(const char *m); -#endif // FN_ModelIndex_Post - -#ifdef FN_ModelFrames_Post -int FN_ModelFrames_Post(int modelIndex); -#endif // FN_ModelFrames_Post - -#ifdef FN_SetSize_Post -void FN_SetSize_Post(edict_t *e, const float *rgflMin, const float *rgflMax); -#endif // FN_SetSize_Post - -#ifdef FN_ChangeLevel_Post -void FN_ChangeLevel_Post(char *s1, char *s2); -#endif // FN_ChangeLevel_Post - -#ifdef FN_GetSpawnParms_Post -void FN_GetSpawnParms_Post(edict_t *ent); -#endif // FN_GetSpawnParms_Post - -#ifdef FN_SaveSpawnParms_Post -void FN_SaveSpawnParms_Post(edict_t *ent); -#endif // FN_SaveSpawnParms_Post - -#ifdef FN_VecToYaw_Post -float FN_VecToYaw_Post(const float *rgflVector); -#endif // FN_VecToYaw_Post - -#ifdef FN_VecToAngles_Post -void FN_VecToAngles_Post(const float *rgflVectorIn, float *rgflVectorOut); -#endif // FN_VecToAngles_Post - -#ifdef FN_MoveToOrigin_Post -void FN_MoveToOrigin_Post(edict_t *ent, const float *pflGoal, float dist, int iMoveType); -#endif // FN_MoveToOrigin_Post - -#ifdef FN_ChangeYaw_Post -void FN_ChangeYaw_Post(edict_t *ent); -#endif // FN_ChangeYaw_Post - -#ifdef FN_ChangePitch_Post -void FN_ChangePitch_Post(edict_t *ent); -#endif // FN_ChangePitch_Post - -#ifdef FN_FindEntityByString_Post -edict_t *FN_FindEntityByString_Post(edict_t *pEdictStartSearchAfter, const char *pszField, const char *pszValue); -#endif // FN_FindEntityByString_Post - -#ifdef FN_GetEntityIllum_Post -int FN_GetEntityIllum_Post(edict_t *pEnt); -#endif // FN_GetEntityIllum_Post - -#ifdef FN_FindEntityInSphere_Post -edict_t *FN_FindEntityInSphere_Post(edict_t *pEdictStartSearchAfter, const float *org, float rad); -#endif // FN_FindEntityInSphere_Post - -#ifdef FN_FindClientInPVS_Post -edict_t *FN_FindClientInPVS_Post(edict_t *pEdict); -#endif // FN_FindClientInPVS_Post - -#ifdef FN_EntitiesInPVS_Post -edict_t *FN_EntitiesInPVS_Post(edict_t *pplayer); -#endif // FN_EntitiesInPVS_Post - -#ifdef FN_MakeVectors_Post -void FN_MakeVectors_Post(const float *rgflVector); -#endif // FN_MakeVectors_Post - -#ifdef FN_AngleVectors_Post -void FN_AngleVectors_Post(const float *rgflVector, float *forward, float *right, float *up); -#endif // FN_AngleVectors_Post - -#ifdef FN_CreateEntity_Post -edict_t *FN_CreateEntity_Post(void); -#endif // FN_CreateEntity_Post - -#ifdef FN_RemoveEntity_Post -void FN_RemoveEntity_Post(edict_t *e); -#endif // FN_RemoveEntity_Post - -#ifdef FN_CreateNamedEntity_Post -edict_t *FN_CreateNamedEntity_Post(int className); -#endif // FN_CreateNamedEntity_Post - -#ifdef FN_MakeStatic_Post -void FN_MakeStatic_Post(edict_t *ent); -#endif // FN_MakeStatic_Post - -#ifdef FN_EntIsOnFloor_Post -int FN_EntIsOnFloor_Post(edict_t *ent); -#endif // FN_EntIsOnFloor_Post - -#ifdef FN_DropToFloor_Post -int FN_DropToFloor_Post(edict_t *ent); -#endif // FN_DropToFloor_Post - -#ifdef FN_WalkMove_Post -int FN_WalkMove_Post(edict_t *ent, float yaw, float dist, int iMode); -#endif // FN_WalkMove_Post - -#ifdef FN_SetOrigin_Post -void FN_SetOrigin_Post(edict_t *e, const float *rgflOrigin); -#endif // FN_SetOrigin_Post - -#ifdef FN_EmitSound_Post -void FN_EmitSound_Post(edict_t *entity, int channel, const char *sample, /*int*/float volume, float attenuation, int fFlags, int pitch); -#endif // FN_EmitSound_Post - -#ifdef FN_EmitAmbientSound_Post -void FN_EmitAmbientSound_Post(edict_t *entity, float *pos, const char *samp, float vol, float attenuation, int fFlags, int pitch); -#endif // FN_EmitAmbientSound_Post - -#ifdef FN_TraceLine_Post -void FN_TraceLine_Post(const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr); -#endif // FN_TraceLine_Post - -#ifdef FN_TraceToss_Post -void FN_TraceToss_Post(edict_t *pent, edict_t *pentToIgnore, TraceResult *ptr); -#endif // FN_TraceToss_Post - -#ifdef FN_TraceMonsterHull_Post -int FN_TraceMonsterHull_Post(edict_t *pEdict, const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr); -#endif // FN_TraceMonsterHull_Post - -#ifdef FN_TraceHull_Post -void FN_TraceHull_Post(const float *v1, const float *v2, int fNoMonsters, int hullNumber, edict_t *pentToSkip, TraceResult *ptr); -#endif // FN_TraceHull_Post - -#ifdef FN_TraceModel_Post -void FN_TraceModel_Post(const float *v1, const float *v2, int hullNumber, edict_t *pent, TraceResult *ptr); -#endif // FN_TraceModel_Post - -#ifdef FN_TraceTexture_Post -const char *FN_TraceTexture_Post(edict_t *pTextureEntity, const float *v1, const float *v2 ); -#endif // FN_TraceTexture_Post - -#ifdef FN_TraceSphere_Post -void FN_TraceSphere_Post(const float *v1, const float *v2, int fNoMonsters, float radius, edict_t *pentToSkip, TraceResult *ptr); -#endif // FN_TraceSphere_Post - -#ifdef FN_GetAimVector_Post -void FN_GetAimVector_Post(edict_t *ent, float speed, float *rgflReturn); -#endif // FN_GetAimVector_Post - -#ifdef FN_ServerCommand_Post -void FN_ServerCommand_Post(char *str); -#endif // FN_ServerCommand_Post - -#ifdef FN_ServerExecute_Post -void FN_ServerExecute_Post(void); -#endif // FN_ServerExecute_Post - -#ifdef FN_engClientCommand_Post -void FN_engClientCommand_Post(edict_t *pEdict, char *szFmt, ...); -#endif // FN_engClientCommand_Post - -#ifdef FN_ParticleEffect_Post -void FN_ParticleEffect_Post(const float *org, const float *dir, float color, float count); -#endif // FN_ParticleEffect_Post - -#ifdef FN_LightStyle_Post -void FN_LightStyle_Post(int style, char *val); -#endif // FN_LightStyle_Post - -#ifdef FN_DecalIndex_Post -int FN_DecalIndex_Post(const char *name); -#endif // FN_DecalIndex_Post - -#ifdef FN_PointContents_Post -int FN_PointContents_Post(const float *rgflVector); -#endif // FN_PointContents_Post - -#ifdef FN_MessageBegin_Post -void FN_MessageBegin_Post(int msg_dest, int msg_type, const float *pOrigin, edict_t *ed); -#endif // FN_MessageBegin_Post - -#ifdef FN_MessageEnd_Post -void FN_MessageEnd_Post(void); -#endif // FN_MessageEnd_Post - -#ifdef FN_WriteByte_Post -void FN_WriteByte_Post(int iValue); -#endif // FN_WriteByte_Post - -#ifdef FN_WriteChar_Post -void FN_WriteChar_Post(int iValue); -#endif // FN_WriteChar_Post - -#ifdef FN_WriteShort_Post -void FN_WriteShort_Post(int iValue); -#endif // FN_WriteShort_Post - -#ifdef FN_WriteLong_Post -void FN_WriteLong_Post(int iValue); -#endif // FN_WriteLong_Post - -#ifdef FN_WriteAngle_Post -void FN_WriteAngle_Post(float flValue); -#endif // FN_WriteAngle_Post - -#ifdef FN_WriteCoord_Post -void FN_WriteCoord_Post(float flValue); -#endif // FN_WriteCoord_Post - -#ifdef FN_WriteString_Post -void FN_WriteString_Post(const char *sz); -#endif // FN_WriteString_Post - -#ifdef FN_WriteEntity_Post -void FN_WriteEntity_Post(int iValue); -#endif // FN_WriteEntity_Post - -#ifdef FN_CVarRegister_Post -void FN_CVarRegister_Post(cvar_t *pCvar); -#endif // FN_CVarRegister_Post - -#ifdef FN_CVarGetFloat_Post -float FN_CVarGetFloat_Post(const char *szVarName); -#endif // FN_CVarGetFloat_Post - -#ifdef FN_CVarGetString_Post -const char *FN_CVarGetString_Post(const char *szVarName); -#endif // FN_CVarGetString_Post - -#ifdef FN_CVarSetFloat_Post -void FN_CVarSetFloat_Post(const char *szVarName, float flValue); -#endif // FN_CVarSetFloat_Post - -#ifdef FN_CVarSetString_Post -void FN_CVarSetString_Post(const char *szVarName, const char *szValue); -#endif // FN_CVarSetString_Post - -#ifdef FN_AlertMessage_Post -void FN_AlertMessage_Post(ALERT_TYPE atype, char *szFmt, ...); -#endif // FN_AlertMessage_Post - -#ifdef FN_EngineFprintf_Post -void FN_EngineFprintf_Post(FILE *pfile, char *szFmt, ...); -#endif // FN_EngineFprintf_Post - -#ifdef FN_PvAllocEntPrivateData_Post -void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, long cb); -#endif // FN_PvAllocEntPrivateData_Post - -#ifdef FN_PvEntPrivateData_Post -void *FN_PvEntPrivateData_Post(edict_t *pEdict); -#endif // FN_PvEntPrivateData_Post - -#ifdef FN_FreeEntPrivateData_Post -void FN_FreeEntPrivateData_Post(edict_t *pEdict); -#endif // FN_FreeEntPrivateData_Post - -#ifdef FN_SzFromIndex_Post -const char *FN_SzFromIndex_Post(int iString); -#endif // FN_SzFromIndex_Post - -#ifdef FN_AllocString_Post -int FN_AllocString_Post(const char *szValue); -#endif // FN_AllocString_Post - -#ifdef FN_GetVarsOfEnt_Post -struct entvars_s *FN_GetVarsOfEnt_Post(edict_t *pEdict); -#endif // FN_GetVarsOfEnt_Post - -#ifdef FN_PEntityOfEntOffset_Post -edict_t *FN_PEntityOfEntOffset_Post(int iEntOffset); -#endif // FN_PEntityOfEntOffset_Post - -#ifdef FN_EntOffsetOfPEntity_Post -int FN_EntOffsetOfPEntity_Post(const edict_t *pEdict); -#endif // FN_EntOffsetOfPEntity_Post - -#ifdef FN_IndexOfEdict_Post -int FN_IndexOfEdict_Post(const edict_t *pEdict); -#endif // FN_IndexOfEdict_Post - -#ifdef FN_PEntityOfEntIndex_Post -edict_t *FN_PEntityOfEntIndex_Post(int iEntIndex); -#endif // FN_PEntityOfEntIndex_Post - -#ifdef FN_FindEntityByVars_Post -edict_t *FN_FindEntityByVars_Post(struct entvars_s *pvars); -#endif // FN_FindEntityByVars_Post - -#ifdef FN_GetModelPtr_Post -void *FN_GetModelPtr_Post(edict_t *pEdict); -#endif // FN_GetModelPtr_Post - -#ifdef FN_RegUserMsg_Post -int FN_RegUserMsg_Post(const char *pszName, int iSize); -#endif // FN_RegUserMsg_Post - -#ifdef FN_AnimationAutomove_Post -void FN_AnimationAutomove_Post(const edict_t *pEdict, float flTime); -#endif // FN_AnimationAutomove_Post - -#ifdef FN_GetBonePosition_Post -void FN_GetBonePosition_Post(const edict_t *pEdict, int iBone, float *rgflOrigin, float *rgflAngles); -#endif // FN_GetBonePosition_Post - -#ifdef FN_FunctionFromName_Post -unsigned long FN_FunctionFromName_Post(const char *pName); -#endif // FN_FunctionFromName_Post - -#ifdef FN_NameForFunction_Post -const char *FN_NameForFunction_Post(unsigned long function); -#endif // FN_NameForFunction_Post - -#ifdef FN_ClientPrintf_Post -void FN_ClientPrintf_Post(edict_t *pEdict, PRINT_TYPE ptype, const char *szMsg); -#endif // FN_ClientPrintf_Post - -#ifdef FN_ServerPrint_Post -void FN_ServerPrint_Post(const char *szMsg); -#endif // FN_ServerPrint_Post - -#ifdef FN_Cmd_Args_Post -const char *FN_Cmd_Args_Post(void); -#endif // FN_Cmd_Args_Post - -#ifdef FN_Cmd_Argv_Post -const char *FN_Cmd_Argv_Post(int argc); -#endif // FN_Cmd_Argv_Post - -#ifdef FN_Cmd_Argc_Post -int FN_Cmd_Argc_Post(void); -#endif // FN_Cmd_Argc_Post - -#ifdef FN_GetAttachment_Post -void FN_GetAttachment_Post(const edict_t *pEdict, int iAttachment, float *rgflOrigin, float *rgflAngles ); -#endif // FN_GetAttachment_Post - -#ifdef FN_CRC32_Init_Post -void FN_CRC32_Init_Post(CRC32_t *pulCRC); -#endif // FN_CRC32_Init_Post - -#ifdef FN_CRC32_ProcessBuffer_Post -void FN_CRC32_ProcessBuffer_Post(CRC32_t *pulCRC, void *p, int len); -#endif // FN_CRC32_ProcessBuffer_Post - -#ifdef FN_CRC32_ProcessByte_Post -void FN_CRC32_ProcessByte_Post(CRC32_t *pulCRC, unsigned char ch); -#endif // FN_CRC32_ProcessByte_Post - -#ifdef FN_CRC32_Final_Post -CRC32_t FN_CRC32_Final_Post(CRC32_t pulCRC); -#endif // FN_CRC32_Final_Post - -#ifdef FN_RandomLong_Post -long FN_RandomLong_Post(long lLow, long lHigh); -#endif // FN_RandomLong_Post - -#ifdef FN_RandomFloat_Post -float FN_RandomFloat_Post(float flLow, float flHigh); -#endif // FN_RandomFloat_Post - -#ifdef FN_SetView_Post -void FN_SetView_Post(const edict_t *pClient, const edict_t *pViewent); -#endif // FN_SetView_Post - -#ifdef FN_Time_Post -float FN_Time_Post(void); -#endif // FN_Time_Post - -#ifdef FN_CrosshairAngle_Post -void FN_CrosshairAngle_Post(const edict_t *pClient, float pitch, float yaw); -#endif // FN_CrosshairAngle_Post - -#ifdef FN_LoadFileForMe_Post -byte *FN_LoadFileForMe_Post(char *filename, int *pLength); -#endif // FN_LoadFileForMe_Post - -#ifdef FN_FreeFile_Post -void FN_FreeFile_Post(void *buffer); -#endif // FN_FreeFile_Post - -#ifdef FN_EndSection_Post -void FN_EndSection_Post(const char *pszSectionName); -#endif // FN_EndSection_Post - -#ifdef FN_CompareFileTime_Post -int FN_CompareFileTime_Post(char *filename1, char *filename2, int *iCompare); -#endif // FN_CompareFileTime_Post - -#ifdef FN_GetGameDir_Post -void FN_GetGameDir_Post(char *szGetGameDir); -#endif // FN_GetGameDir_Post - -#ifdef FN_Cvar_RegisterVariable_Post -void FN_Cvar_RegisterVariable_Post(cvar_t *variable); -#endif // FN_Cvar_RegisterVariable_Post - -#ifdef FN_FadeClientVolume_Post -void FN_FadeClientVolume_Post(const edict_t *pEdict, int fadePercent, int fadeOutSeconds, int holdTime, int fadeInSeconds); -#endif // FN_FadeClientVolume_Post - -#ifdef FN_SetClientMaxspeed_Post -void FN_SetClientMaxspeed_Post(const edict_t *pEdict, float fNewMaxspeed); -#endif // FN_SetClientMaxspeed_Post - -#ifdef FN_CreateFakeClient_Post -edict_t *FN_CreateFakeClient_Post(const char *netname); -#endif // FN_CreateFakeClient_Post - -#ifdef FN_RunPlayerMove_Post -void FN_RunPlayerMove_Post(edict_t *fakeclient, const float *viewangles, float forwardmove, float sidemove, float upmove, unsigned short buttons, byte impulse, byte msec); -#endif // FN_RunPlayerMove_Post - -#ifdef FN_NumberOfEntities_Post -int FN_NumberOfEntities_Post(void); -#endif // FN_NumberOfEntities_Post - -#ifdef FN_GetInfoKeyBuffer_Post -char *FN_GetInfoKeyBuffer_Post(edict_t *e); -#endif // FN_GetInfoKeyBuffer_Post - -#ifdef FN_InfoKeyValue_Post -char *FN_InfoKeyValue_Post(char *infobuffer, char *key); -#endif // FN_InfoKeyValue_Post - -#ifdef FN_SetKeyValue_Post -void FN_SetKeyValue_Post(char *infobuffer, char *key, char *value); -#endif // FN_SetKeyValue_Post - -#ifdef FN_SetClientKeyValue_Post -void FN_SetClientKeyValue_Post(int clientIndex, char *infobuffer, char *key, char *value); -#endif // FN_SetClientKeyValue_Post - -#ifdef FN_IsMapValid_Post -int FN_IsMapValid_Post(char *filename); -#endif // FN_IsMapValid_Post - -#ifdef FN_StaticDecal_Post -void FN_StaticDecal_Post(const float *origin, int decalIndex, int entityIndex, int modelIndex); -#endif // FN_StaticDecal_Post - -#ifdef FN_PrecacheGeneric_Post -int FN_PrecacheGeneric_Post(char *s); -#endif // FN_PrecacheGeneric_Post - -#ifdef FN_GetPlayerUserId_Post -int FN_GetPlayerUserId_Post(edict_t *e ); -#endif // FN_GetPlayerUserId_Post - -#ifdef FN_BuildSoundMsg_Post -void FN_BuildSoundMsg_Post(edict_t *entity, int channel, const char *sample, /*int*/float volume, float attenuation, int fFlags, int pitch, int msg_dest, int msg_type, const float *pOrigin, edict_t *ed); -#endif // FN_BuildSoundMsg_Post - -#ifdef FN_IsDedicatedServer_Post -int FN_IsDedicatedServer_Post(void); -#endif // FN_IsDedicatedServer_Post - -#ifdef FN_CVarGetPointer_Post -cvar_t *FN_CVarGetPointer_Post(const char *szVarName); -#endif // FN_CVarGetPointer_Post - -#ifdef FN_GetPlayerWONId_Post -unsigned int FN_GetPlayerWONId_Post(edict_t *e); -#endif // FN_GetPlayerWONId_Post - -#ifdef FN_Info_RemoveKey_Post -void FN_Info_RemoveKey_Post( char *s, const char *key); -#endif // FN_Info_RemoveKey_Post - -#ifdef FN_GetPhysicsKeyValue_Post -const char *FN_GetPhysicsKeyValue_Post(const edict_t *pClient, const char *key); -#endif // FN_GetPhysicsKeyValue_Post - -#ifdef FN_SetPhysicsKeyValue_Post -void FN_SetPhysicsKeyValue_Post(const edict_t *pClient, const char *key, const char *value); -#endif // FN_SetPhysicsKeyValue_Post - -#ifdef FN_GetPhysicsInfoString_Post -const char *FN_GetPhysicsInfoString_Post( const edict_t *pClient); -#endif // FN_GetPhysicsInfoString_Post - -#ifdef FN_PrecacheEvent_Post -unsigned short FN_PrecacheEvent_Post(int type, const char *psz); -#endif // FN_PrecacheEvent_Post - -#ifdef FN_PlaybackEvent_Post -void FN_PlaybackEvent_Post(int flags, const edict_t *pInvoker, unsigned short eventindex, float delay, float *origin, float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2); -#endif // FN_PlaybackEvent_Post - -#ifdef FN_SetFatPVS_Post -unsigned char *FN_SetFatPVS_Post(float *org); -#endif // FN_SetFatPVS_Post - -#ifdef FN_SetFatPAS_Post -unsigned char *FN_SetFatPAS_Post(float *org); -#endif // FN_SetFatPAS_Post - -#ifdef FN_CheckVisibility_Post -int FN_CheckVisibility_Post(const edict_t *entity, unsigned char *pset); -#endif // FN_CheckVisibility_Post - -#ifdef FN_DeltaSetField_Post -void FN_DeltaSetField_Post(struct delta_s *pFields, const char *fieldname); -#endif // FN_DeltaSetField_Post - -#ifdef FN_DeltaUnsetField_Post -void FN_DeltaUnsetField_Post(struct delta_s *pFields, const char *fieldname); -#endif // FN_DeltaUnsetField_Post - -#ifdef FN_DeltaAddEncoder_Post -void FN_DeltaAddEncoder_Post(char *name, void (*conditionalencode)( struct delta_s *pFields, const unsigned char *from, const unsigned char *to ) ); -#endif // FN_DeltaAddEncoder_Post - -#ifdef FN_GetCurrentPlayer_Post -int FN_GetCurrentPlayer_Post(void); -#endif // FN_GetCurrentPlayer_Post - -#ifdef FN_CanSkipPlayer_Post -int FN_CanSkipPlayer_Post(const edict_t *player); -#endif // FN_CanSkipPlayer_Post - -#ifdef FN_DeltaFindField_Post -int FN_DeltaFindField_Post(struct delta_s *pFields, const char *fieldname); -#endif // FN_DeltaFindField_Post - -#ifdef FN_DeltaSetFieldByIndex_Post -void FN_DeltaSetFieldByIndex_Post(struct delta_s *pFields, int fieldNumber); -#endif // FN_DeltaSetFieldByIndex_Post - -#ifdef FN_DeltaUnsetFieldByIndex_Post -void FN_DeltaUnsetFieldByIndex_Post(struct delta_s *pFields, int fieldNumber); -#endif // FN_DeltaUnsetFieldByIndex_Post - -#ifdef FN_SetGroupMask_Post -void FN_SetGroupMask_Post(int mask, int op); -#endif // FN_SetGroupMask_Post - -#ifdef FN_engCreateInstancedBaseline_Post -int FN_engCreateInstancedBaseline_Post(int classname, struct entity_state_s *baseline); -#endif // FN_engCreateInstancedBaseline_Post - -#ifdef FN_Cvar_DirectSet_Post -void FN_Cvar_DirectSet_Post(struct cvar_s *var, char *value); -#endif // FN_Cvar_DirectSet_Post - -#ifdef FN_ForceUnmodified_Post -void FN_ForceUnmodified_Post(FORCE_TYPE type, float *mins, float *maxs, const char *filename); -#endif // FN_ForceUnmodified_Post - -#ifdef FN_GetPlayerStats_Post -void FN_GetPlayerStats_Post(const edict_t *pClient, int *ping, int *packet_loss); -#endif // FN_GetPlayerStats_Post - -#ifdef FN_AddServerCommand_Post -void FN_AddServerCommand_Post(char *cmd_name, void (*function)(void)); -#endif // FN_AddServerCommand_Post - -#ifdef FN_Voice_GetClientListening_Post -qboolean FN_Voice_GetClientListening_Post(int iReceiver, int iSender); -#endif // FN_Voice_GetClientListening_Post - -#ifdef FN_Voice_SetClientListening_Post -qboolean FN_Voice_SetClientListening_Post(int iReceiver, int iSender, qboolean bListen); -#endif // FN_Voice_SetClientListening_Post - -#ifdef FN_GetPlayerAuthId_Post -const char *FN_GetPlayerAuthId_Post(edict_t *e); -#endif // FN_GetPlayerAuthId - - - - -#ifdef FN_OnFreeEntPrivateData -void FN_OnFreeEntPrivateData(edict_t *pEnt); -#endif // FN_OnFreeEntPrivateData - -#ifdef FN_GameShutdown -void FN_GameShutdown(void); -#endif // FN_GameShutdown - -#ifdef FN_ShouldCollide -int FN_ShouldCollide(edict_t *pentTouched, edict_t *pentOther); -#endif // FN_ShouldCollide - - - - - -#ifdef FN_OnFreeEntPrivateData_Post -void FN_OnFreeEntPrivateData_Post(edict_t *pEnt); -#endif // FN_OnFreeEntPrivateData_Post - -#ifdef FN_GameShutdown_Post -void FN_GameShutdown_Post(void); -#endif // FN_GameShutdown_Post - -#ifdef FN_ShouldCollide_Post -int FN_ShouldCollide_Post(edict_t *pentTouched, edict_t *pentOther); -#endif // FN_ShouldCollide_Post - -#endif // USE_METAMOD - - -#ifdef FN_AMXX_QUERY -void FN_AMXX_QUERY(void); -#endif // FN_AMXX_QUERY - -#ifdef FN_AMXX_ATTACH -void FN_AMXX_ATTACH(void); -#endif // FN_AMXX_ATTACH - -#ifdef FN_AMXX_DETACH -void FN_AMXX_DETACH(void); -#endif // FN_AMXX_DETACH - -#ifdef FN_AMXX_PLUGINSLOADED -void FN_AMXX_PLUGINSLOADED(void); -#endif // FN_AMXX_PLUGINSLOADED - -// *** Types *** -typedef void* (*PFN_REQ_FNPTR)(const char * /*name*/); - -// ***** Module funcs stuff ***** -enum ForwardExecType -{ - ET_IGNORE = 0, // Ignore return vaue - ET_STOP, // Stop on PLUGIN_HANDLED - ET_STOP2, // Stop on PLUGIN_HANDLED, continue on other values, return biggest return value - ET_CONTINUE, // Continue; return biggest return value -}; - -enum ForwardParam -{ - FP_DONE = -1, // specify this as the last argument - // only tells the function that there are no more arguments - FP_CELL, // normal cell - FP_FLOAT, // float; used as normal cell though - FP_STRING, // string - FP_STRINGEX, // string; will be updated to the last function's value - FP_ARRAY, // array; use the return value of prepareArray. -}; - - -typedef int (*PFN_ADD_NATIVES) (const AMX_NATIVE_INFO * /*list*/); -typedef char * (*PFN_BUILD_PATHNAME) (const char * /*format*/, ...); -typedef char * (*PFN_BUILD_PATHNAME_R) (char * /*buffer*/, size_t /* maxlen */, const char * /* format */, ...); -typedef cell * (*PFN_GET_AMXADDR) (AMX * /*amx*/, cell /*offset*/); -typedef void (*PFN_PRINT_SRVCONSOLE) (char * /*format*/, ...); -typedef const char * (*PFN_GET_MODNAME) (void); -typedef const char * (*PFN_GET_AMXSCRIPTNAME) (int /*id*/); -typedef AMX * (*PFN_GET_AMXSCRIPT) (int /*id*/); -typedef int (*PFN_FIND_AMXSCRIPT_BYAMX) (const AMX * /*amx*/); -typedef int (*PFN_FIND_AMXSCRIPT_BYNAME) (const char * /*name*/); -typedef int (*PFN_SET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, const char * /* source */, int /* max */); -typedef char * (*PFN_GET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, int /*bufferId*/, int * /*pLen*/); -typedef int (*PFN_GET_AMXSTRINGLEN) (const cell *ptr); -typedef char * (*PFN_FORMAT_AMXSTRING) (AMX * /*amx*/, cell * /*params*/, int /*startParam*/, int * /*pLen*/); -typedef void (*PFN_COPY_AMXMEMORY) (cell * /*dest*/, const cell * /*src*/, int /*len*/); -typedef void (*PFN_LOG) (const char * /*fmt*/, ...); -typedef void (*PFN_LOG_ERROR) (AMX * /*amx*/, int /*err*/, const char * /*fmt*/, ...); -typedef int (*PFN_RAISE_AMXERROR) (AMX * /*amx*/, int /*error*/); -typedef int (*PFN_REGISTER_FORWARD) (const char * /*funcname*/, ForwardExecType /*exectype*/, ... /*paramtypes terminated by PF_DONE*/); -typedef int (*PFN_EXECUTE_FORWARD) (int /*id*/, ... /*params*/); -typedef cell (*PFN_PREPARE_CELLARRAY) (cell * /*ptr*/, unsigned int /*size*/); -typedef cell (*PFN_PREPARE_CHARARRAY) (char * /*ptr*/, unsigned int /*size*/); -typedef cell (*PFN_PREPARE_CELLARRAY_A) (cell * /*ptr*/, unsigned int /*size*/, bool /*copyBack*/); -typedef cell (*PFN_PREPARE_CHARARRAY_A) (char * /*ptr*/, unsigned int /*size*/, bool /*copyBack*/); -typedef int (*PFN_IS_PLAYER_VALID) (int /*id*/); -typedef const char * (*PFN_GET_PLAYER_NAME) (int /*id*/); -typedef const char * (*PFN_GET_PLAYER_IP) (int /*id*/); -typedef int (*PFN_IS_PLAYER_INGAME) (int /*id*/); -typedef int (*PFN_IS_PLAYER_BOT) (int /*id*/); -typedef int (*PFN_IS_PLAYER_AUTHORIZED) (int /*id*/); -typedef float (*PFN_GET_PLAYER_TIME) (int /*id*/); -typedef float (*PFN_GET_PLAYER_PLAYTIME) (int /*id*/); -typedef int (*PFN_GETPLAYERFLAGS) (int /* id*/); -typedef int (*PFN_GET_PLAYER_CURWEAPON) (int /*id*/); -typedef const char * (*PFN_GET_PLAYER_TEAM) (int /*id*/); -typedef int (*PFN_GET_PLAYER_TEAMID) (int /*id*/); -typedef int (*PFN_GET_PLAYER_DEATHS) (int /*id*/); -typedef int (*PFN_GET_PLAYER_MENU) (int /*id*/); -typedef int (*PFN_GET_PLAYER_KEYS) (int /*id*/); -typedef int (*PFN_IS_PLAYER_ALIVE) (int /*id*/); -typedef int (*PFN_GET_PLAYER_FRAGS) (int /*id*/); -typedef int (*PFN_IS_PLAYER_CONNECTING) (int /*id*/); -typedef int (*PFN_IS_PLAYER_HLTV) (int /*id*/); -typedef int (*PFN_GET_PLAYER_ARMOR) (int /*id*/); -typedef int (*PFN_GET_PLAYER_HEALTH) (int /*id*/); -#ifdef USE_METAMOD -typedef edict_t * (*PFN_GET_PLAYER_EDICT) (int /*id*/); -#else -typedef void * (*PFN_GET_PLAYER_EDICT) (int /*id*/); -#endif - -typedef void * (*PFN_ALLOCATOR) (const char* /*filename*/, const unsigned int /*line*/, const char* /*func*/, - const unsigned int /*type*/, const size_t /*size*/); -typedef void * (*PFN_REALLOCATOR) (const char* /*filename*/, const unsigned int /*line*/, const char* /*func*/, - const unsigned int /*type*/, const size_t /*size*/, void* /*addr*/ ); -typedef void (*PFN_DEALLOCATOR) (const char* /*filename*/, const unsigned int /*line*/, const char* /*func*/, - const unsigned int /*type*/, const void* /*addr*/ ); -typedef int (*PFN_AMX_EXEC) (AMX* /*amx*/, cell* /*return val*/, int /*index*/); -typedef int (*PFN_AMX_EXECV) (AMX* /*amx*/, cell* /*return val*/, int /*index*/, int /*numparams*/, cell[] /*params*/); -typedef int (*PFN_AMX_ALLOT) (AMX* /*amx*/, int /*length*/, cell* /*amx_addr*/, cell** /*phys_addr*/); -typedef int (*PFN_AMX_FINDPUBLIC) (AMX* /*amx*/, char* /*func name*/, int* /*index*/); -typedef int (*PFN_AMX_FINDNATIVE) (AMX* /*amx*/, char* /*func name*/, int* /*index*/); -typedef int (*PFN_LOAD_AMXSCRIPT) (AMX* /*amx*/, void** /*code*/, const char* /*path*/, char[64] /*error info*/, int /* debug */); -typedef int (*PFN_UNLOAD_AMXSCRIPT) (AMX* /*amx*/,void** /*code*/); -typedef cell (*PFN_REAL_TO_CELL) (REAL /*x*/); -typedef REAL (*PFN_CELL_TO_REAL) (cell /*x*/); -typedef int (*PFN_REGISTER_SPFORWARD) (AMX * /*amx*/, int /*func*/, ... /*params*/); -typedef int (*PFN_REGISTER_SPFORWARD_BYNAME) (AMX * /*amx*/, const char * /*funcName*/, ... /*params*/); -typedef void (*PFN_UNREGISTER_SPFORWARD) (int /*id*/); -typedef void (*PFN_MERGEDEFINITION_FILE) (const char * /*filename*/); -typedef const char * (*PFN_FORMAT) (const char * /*fmt*/, ... /*params*/); -typedef void (*PFN_REGISTERFUNCTION) (void * /*pfn*/, const char * /*desc*/); -typedef int (*PFN_AMX_PUSH) (AMX * /*amx*/, cell /*value*/); - -extern PFN_ADD_NATIVES g_fn_AddNatives; -extern PFN_BUILD_PATHNAME g_fn_BuildPathname; -extern PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR; -extern PFN_GET_AMXADDR g_fn_GetAmxAddr; -extern PFN_PRINT_SRVCONSOLE g_fn_PrintSrvConsole; -extern PFN_GET_MODNAME g_fn_GetModname; -extern PFN_GET_AMXSCRIPTNAME g_fn_GetAmxScriptName; -extern PFN_GET_AMXSCRIPT g_fn_GetAmxScript; -extern PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; -extern PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; -extern PFN_SET_AMXSTRING g_fn_SetAmxString; -extern PFN_GET_AMXSTRING g_fn_GetAmxString; -extern PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; -extern PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; -extern PFN_COPY_AMXMEMORY g_fn_CopyAmxMemory; -extern PFN_LOG g_fn_Log; -extern PFN_LOG_ERROR g_fn_LogErrorFunc; -extern PFN_RAISE_AMXERROR g_fn_RaiseAmxError; -extern PFN_REGISTER_FORWARD g_fn_RegisterForward; -extern PFN_EXECUTE_FORWARD g_fn_ExecuteForward; -extern PFN_PREPARE_CELLARRAY g_fn_PrepareCellArray; -extern PFN_PREPARE_CHARARRAY g_fn_PrepareCharArray; -extern PFN_PREPARE_CELLARRAY_A g_fn_PrepareCellArrayA; -extern PFN_PREPARE_CHARARRAY_A g_fn_PrepareCharArrayA; -extern PFN_IS_PLAYER_VALID g_fn_IsPlayerValid; -extern PFN_GET_PLAYER_NAME g_fn_GetPlayerName; -extern PFN_GET_PLAYER_IP g_fn_GetPlayerIP; -extern PFN_IS_PLAYER_INGAME g_fn_IsPlayerIngame; -extern PFN_IS_PLAYER_BOT g_fn_IsPlayerBot; -extern PFN_IS_PLAYER_AUTHORIZED g_fn_IsPlayerAuthorized; -extern PFN_GET_PLAYER_TIME g_fn_GetPlayerTime; -extern PFN_GET_PLAYER_PLAYTIME g_fn_GetPlayerPlayTime; -extern PFN_GET_PLAYER_CURWEAPON g_fn_GetPlayerCurweapon; -extern PFN_GET_PLAYER_TEAMID g_fn_GetPlayerTeamID; -extern PFN_GET_PLAYER_DEATHS g_fn_GetPlayerDeaths; -extern PFN_GET_PLAYER_MENU g_fn_GetPlayerMenu; -extern PFN_GET_PLAYER_KEYS g_fn_GetPlayerKeys; -extern PFN_IS_PLAYER_ALIVE g_fn_IsPlayerAlive; -extern PFN_GET_PLAYER_FRAGS g_fn_GetPlayerFrags; -extern PFN_IS_PLAYER_CONNECTING g_fn_IsPlayerConnecting; -extern PFN_IS_PLAYER_HLTV g_fn_IsPlayerHLTV; -extern PFN_GET_PLAYER_ARMOR g_fn_GetPlayerArmor; -extern PFN_GET_PLAYER_HEALTH g_fn_GetPlayerHealth; -extern PFN_AMX_EXEC g_fn_AmxExec; -extern PFN_AMX_EXECV g_fn_AmxExecv; -extern PFN_AMX_ALLOT g_fn_AmxAllot; -extern PFN_AMX_FINDPUBLIC g_fn_AmxFindPublic; -extern PFN_LOAD_AMXSCRIPT g_fn_LoadAmxScript; -extern PFN_UNLOAD_AMXSCRIPT g_fn_UnloadAmxScript; -extern PFN_REAL_TO_CELL g_fn_RealToCell; -extern PFN_CELL_TO_REAL g_fn_CellToReal; -extern PFN_REGISTER_SPFORWARD g_fn_RegisterSPForward; -extern PFN_REGISTER_SPFORWARD_BYNAME g_fn_RegisterSPForwardByName; -extern PFN_UNREGISTER_SPFORWARD g_fn_UnregisterSPForward; -extern PFN_MERGEDEFINITION_FILE g_fn_MergeDefinition_File; -extern PFN_AMX_FINDNATIVE g_fn_AmxFindNative; -extern PFN_GETPLAYERFLAGS g_fn_GetPlayerFlags; -extern PFN_GET_PLAYER_EDICT g_fn_GetPlayerEdict; -extern PFN_FORMAT g_fn_Format; -extern PFN_GET_PLAYER_TEAM g_fn_GetPlayerTeam; -extern PFN_REGISTERFUNCTION g_fn_RegisterFunction; -extern PFN_REQ_FNPTR g_fn_RequestFunction; -extern PFN_AMX_PUSH g_fn_AmxPush; - -#ifdef MAY_NEVER_BE_DEFINED -// Function prototypes for intellisense and similar systems -// They understand #if 0 so we use #ifdef MAY_NEVER_BE_DEFINED -int MF_AddNatives (const AMX_NATIVE_INFO *list) { } -char * MF_BuildPathname (const char * format, ...) { } -char * MF_BuildPathnameR (char *buffer, size_t maxlen, const char *fmt, ...) { } -cell * MF_GetAmxAddr (AMX * amx, cell offset) { } -void MF_PrintSrvConsole (char * format, ...) { } -const char * MF_GetModname (void) { } -const char * MF_GetScriptName (int id) { } -AMX * MF_GetScriptAmx (int id) { } -int MF_FindScriptByAmx (const AMX * amx) { } -int MF_FindScriptByAmx (const char * name) { } -int MF_SetAmxString (AMX * amx, cell amx_addr, const char * source , int max ) { } -char * MF_GetAmxString (AMX * amx, cell amx_addr, int bufferId, int * pLen) { } -int MF_GetAmxStringLen (const cell *ptr) { } -char * MF_FormatAmxString (AMX * amx, cell * params, int startParam, int * pLen) { } -void MF_CopyAmxMemory (cell * dest, const cell * src, int len) { } -void MF_Log (const char * fmt, ...) { } -void MF_LogError (AMX * amx, int err, const char *fmt, ...) { } -int MF_RaiseAmxError (AMX * amx, int error) { } -int MF_RegisterForward (const char * funcname, ForwardExecType exectype, ...) { } -int MF_ExecuteForward (int id, ...) { } -cell MF_PrepareCellArray (cell * ptr, unsigned int size) { } -cell MF_PrepareCharArray (char * ptr, unsigned int size) { } -cell MF_PrepareCellArrayA (cell * ptr, unsigned int size, bool copyBack) { } -cell MF_PrepareCharArrayA (char * ptr, unsigned int size, bool copyBack) { } -int MF_IsPlayerValid (int id) { } -const char * MF_GetPlayerName (int id) { } -const char * MF_GetPlayerIP (int id) { } -int MF_IsPlayerIngame (int id) { } -int MF_IsPlayerBot (int id) { } -int MF_IsPlayerAuthorized (int id) { } -float MF_GetPlayerTime (int id) { } -float MF_GetPlayerPlayTime (int id) { } -int MF_GetPlayerCurweapon (int id) { } -const char * MF_GetPlayerTeam (int id) { } -int MF_GetPlayerTeamID (int id) { } -int MF_GetPlayerDeaths (int id) { } -int MF_GetPlayerMenu (int id) { } -int MF_GetPlayerKeys (int id) { } -int MF_IsPlayerAlive (int id) { } -int MF_GetPlayerFrags (int id) { } -int MF_IsPlayerConnecting (int id) { } -int MF_IsPlayerHLTV (int id) { } -int MF_GetPlayerArmor (int id) { } -int MF_GetPlayerHealth (int id) { } -REAL amx_ctof (cell x) { } -cell amx_ftoc (float x) { } -int MF_RegisterSPForwardByName (AMX * amx, const char *str, ...) { } -int MF_RegisterSPForward (AMX * amx, int func, ...) { } -void MF_UnregisterSPForward (int id) { } -int MF_GetPlayerFlags (int id) { } -edict_t* MF_GetPlayerEdict (int id) { } -const char * MF_Format (const char *fmt, ...) { } -void MF_RegisterFunction (void *pfn, const char *description) { } -void * MF_RequestFunction (const char *description) { } -int MF_AmxPush (AMX *amx, cell *params) { } -int MF_AmxExec (AMX *amx, cell *retval, int idx) { } -#endif // MAY_NEVER_BE_DEFINED - -#define MF_AddNatives g_fn_AddNatives -#define MF_BuildPathname g_fn_BuildPathname -#define MF_BuildPathnameR g_fn_BuildPathnameR -#define MF_FormatAmxString g_fn_FormatAmxString -#define MF_GetAmxAddr g_fn_GetAmxAddr -#define MF_PrintSrvConsole g_fn_PrintSrvConsole -#define MF_GetModname g_fn_GetModname -#define MF_GetScriptName g_fn_GetAmxScriptName -#define MF_GetScriptAmx g_fn_GetAmxScript -#define MF_FindScriptByAmx g_fn_FindAmxScriptByAmx -#define MF_FindScriptByName g_fn_FindAmxScriptByName -#define MF_SetAmxString g_fn_SetAmxString -#define MF_GetAmxString g_fn_GetAmxString -#define MF_GetAmxStringLen g_fn_GetAmxStringLen -#define MF_CopyAmxMemory g_fn_CopyAmxMemory -void MF_Log(const char *fmt, ...); -void MF_LogError(AMX *amx, int err, const char *fmt, ...); -#define MF_RaiseAmxError g_fn_RaiseAmxError -#define MF_RegisterForward g_fn_RegisterForward -#define MF_ExecuteForward g_fn_ExecuteForward -#define MF_PrepareCellArray g_fn_PrepareCellArray -#define MF_PrepareCharArray g_fn_PrepareCharArray -#define MF_PrepareCellArrayA g_fn_PrepareCellArrayA -#define MF_PrepareCharArrayA g_fn_PrepareCharArrayA -#define MF_IsPlayerValid g_fn_IsPlayerValid -#define MF_GetPlayerName g_fn_GetPlayerName -#define MF_GetPlayerIP g_fn_GetPlayerIP -#define MF_IsPlayerIngame g_fn_IsPlayerIngame -#define MF_IsPlayerBot g_fn_IsPlayerBot -#define MF_IsPlayerAuthorized g_fn_IsPlayerAuthorized -#define MF_GetPlayerTime g_fn_GetPlayerTime -#define MF_GetPlayerPlayTime g_fn_GetPlayerPlayTime -#define MF_GetPlayerCurweapon g_fn_GetPlayerCurweapon -#define MF_GetPlayerTeam g_fn_GetPlayerTeam -#define MF_GetPlayerTeamID g_fn_GetPlayerTeamID -#define MF_GetPlayerDeaths g_fn_GetPlayerDeaths -#define MF_GetPlayerMenu g_fn_GetPlayerMenu -#define MF_GetPlayerKeys g_fn_GetPlayerKeys -#define MF_IsPlayerAlive g_fn_IsPlayerAlive -#define MF_GetPlayerFrags g_fn_GetPlayerFrags -#define MF_IsPlayerConnecting g_fn_IsPlayerConnecting -#define MF_IsPlayerHLTV g_fn_IsPlayerHLTV -#define MF_GetPlayerArmor g_fn_GetPlayerArmor -#define MF_GetPlayerHealth g_fn_GetPlayerHealth -#define MF_AmxExec g_fn_AmxExec -#define MF_AmxExecv g_fn_AmxExecv -#define MF_AmxFindPublic g_fn_AmxFindPublic -#define MF_AmxAllot g_fn_AmxAllot -#define MF_AmxFindNative g_fn_AmxFindNative -#define MF_LoadAmxScript g_fn_LoadAmxScript -#define MF_UnloadAmxScript g_fn_UnloadAmxScript -#define MF_MergeDefinitionFile g_fn_MergeDefinition_File -#define amx_ctof g_fn_CellToReal -#define amx_ftoc g_fn_RealToCell -#define MF_RegisterSPForwardByName g_fn_RegisterSPForwardByName -#define MF_RegisterSPForward g_fn_RegisterSPForward -#define MF_UnregisterSPForward g_fn_UnregisterSPForward -#define MF_GetPlayerFlags g_fn_GetPlayerFlags -#define MF_GetPlayerEdict g_fn_GetPlayerEdict -#define MF_Format g_fn_Format -#define MF_RegisterFunction g_fn_RegisterFunction -#define MF_RequestFunction g_fn_RequestFunction; -#define MF_AmxPush g_fn_AmxPush - -/*** Memory ***/ -void *operator new(size_t reportedSize); -void *operator new[](size_t reportedSize); -void *operator new(size_t reportedSize, const char *sourceFile, int sourceLine); -void *operator new[](size_t reportedSize, const char *sourceFile, int sourceLine); -void operator delete(void *reportedAddress); -void operator delete[](void *reportedAddress); - -// Allocation types -extern const unsigned int m_alloc_unknown; -extern const unsigned int m_alloc_new; -extern const unsigned int m_alloc_new_array; -extern const unsigned int m_alloc_malloc; -extern const unsigned int m_alloc_calloc; -extern const unsigned int m_alloc_realloc; -extern const unsigned int m_alloc_delete; -extern const unsigned int m_alloc_delete_array; -extern const unsigned int m_alloc_free; - -// To be called before new / delete -void Mem_SetOwner(const char *filename, int line, const char *function); -// Actual allocator -void * Mem_Allocator(const char *sourceFile, const unsigned int sourceLine, const char *sourceFunc, - const unsigned int allocationType, const size_t reportedSize); -void * Mem_Reallocator(const char *sourceFile, const unsigned int sourceLine, const char *sourceFunc, - const unsigned int reallocationType, const size_t reportedSize, void *reportedAddress); -void Mem_Deallocator(const char *sourceFile, const unsigned int sourceLine, const char *sourceFunc, - const unsigned int deallocationType, void *reportedAddress); - -// memory macros -#ifndef __FUNCTION__ -#define __FUNCTION__ "??" -#endif - -// call Mem_SetOwner, followed by the actual new operator -#define new (Mem_SetOwner(__FILE__,__LINE__,__FUNCTION__),false) ? NULL : new -// call Mem_SetOwner, followed by the actual delete operator -#define delete (Mem_SetOwner(__FILE__,__LINE__,__FUNCTION__),false) ? Mem_SetOwner("",0,"") : delete -#define malloc(sz) Mem_Allocator (__FILE__,__LINE__,__FUNCTION__,m_alloc_malloc,sz) -#define calloc(sz) Mem_Allocator (__FILE__,__LINE__,__FUNCTION__,m_alloc_calloc,sz) -#define realloc(ptr,sz) Mem_Reallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_realloc,sz,ptr) -#define free(ptr) Mem_Deallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_free,ptr) - -#endif // #ifndef __AMXXMODULE_H__ diff --git a/dlls/BB/bb.cpp b/dlls/BB/bb.cpp deleted file mode 100644 index 4b9c5916..00000000 --- a/dlls/BB/bb.cpp +++ /dev/null @@ -1,144 +0,0 @@ -#include "bb.h" - -static cell AMX_NATIVE_CALL get_user_exp(AMX *amx,cell *params) -{ - return amx_ftoc(GetUserExp(params[1])); -} - -static cell AMX_NATIVE_CALL set_user_exp(AMX *amx,cell *params) -{ - float Exp = amx_ctof(params[2]); - SetUserExp(params[1], Exp ); - return 1; -} - -static cell AMX_NATIVE_CALL get_user_points(AMX *amx,cell *params) -{ - return amx_ftoc(GetUserPoints(params[1])); -} - -static cell AMX_NATIVE_CALL set_user_points(AMX *amx,cell *params) -{ - float Exp = amx_ctof(params[2]); - SetUserPoints(params[1], Exp ); - return 1; -} - -static cell AMX_NATIVE_CALL get_user_level(AMX *amx,cell *params) -{ - return GetUserLevel(params[1]); -} - -static cell AMX_NATIVE_CALL set_user_level(AMX *amx,cell *params) -{ - if(GetUserLevel(params[1]) > params[2]) - { - MF_LogError(amx,AMX_ERR_NATIVE,"Must set to a level higher than current one!"); - return 0; - } - SetUserLevel(params[1], params[2] ); - return 1; -} - -static cell AMX_NATIVE_CALL get_user_speed(AMX *amx,cell *params) -{ - return GetUserSpeed(params[1]); -} - -static cell AMX_NATIVE_CALL set_user_speed(AMX *amx,cell *params) -{ - SetUserSpeed(params[1], params[2] ); - return 1; -} - -static cell AMX_NATIVE_CALL get_user_hitpoints(AMX *amx,cell *params) -{ - return GetUserHitPoints(params[1]); -} - -static cell AMX_NATIVE_CALL set_user_hitpoints(AMX *amx,cell *params) -{ - SetUserHitPoints(params[1], params[2] ); - return 1; -} - -static cell AMX_NATIVE_CALL get_user_skill(AMX *amx,cell *params) -{ - return GetUserSkill(params[1]); -} - -static cell AMX_NATIVE_CALL set_user_skill(AMX *amx,cell *params) -{ - SetUserSkill(params[1], params[2] ); - return 1; -} - -static cell AMX_NATIVE_CALL send_progress_bar(AMX *amx,cell *params) -{ - int len = 0; - float time = amx_ctof(params[3]); - SendProgressBar(params[1], MF_GetAmxString( amx, params[2], 0, &len ), time ); - return 1; -} - -static cell AMX_NATIVE_CALL send_show_objective(AMX *amx,cell *params) -{ - int len = 0; - SendShowObjective(params[1], MF_GetAmxString( amx, params[2], 0, &len ) ); - return 1; -} - -static cell AMX_NATIVE_CALL send_show_message(AMX *amx,cell *params) -{ - int len = 0; - float time = amx_ctof(params[2]); - SendShowMessage(params[1], time, MF_GetAmxString( amx, params[2], 0, &len ), MF_GetAmxString( amx, params[3], 0, &len ) ); - return 1; -} - -static cell AMX_NATIVE_CALL reset_user_hud(AMX *amx,cell *params) -{ - UpdateBBHud( params[1] ); - return 1; -} - -static cell AMX_NATIVE_CALL is_user_zombie(AMX *amx,cell *params) -{ - return IsUserZombie(params[1]); -} - - -AMX_NATIVE_INFO bb_Exports[] = -{ - {"bb_is_user_zombie",is_user_zombie}, - {"bb_reset_user_hud", reset_user_hud}, - - {"bb_show_message",send_show_message}, - {"bb_show_objective", send_show_objective}, - {"bb_show_progress_bar", send_progress_bar}, - - {"bb_get_user_skill",get_user_skill}, - {"bb_set_user_skill", set_user_skill}, - - {"bb_get_user_hitpoints",get_user_hitpoints}, - {"bb_set_user_hitpoints", set_user_hitpoints}, - - {"bb_get_user_speed",get_user_speed}, - {"bb_set_user_speed", set_user_speed}, - - {"bb_get_user_exp",get_user_exp}, - {"bb_set_user_exp", set_user_exp}, - - {"bb_get_user_points",get_user_points}, - {"bb_set_user_points", set_user_points}, - - {"bb_get_user_level",get_user_level}, - {"bb_set_user_level", set_user_level}, - - { NULL, NULL } -}; - -void OnAmxxAttach() -{ - MF_AddNatives(bb_Exports); -} \ No newline at end of file diff --git a/dlls/BB/bb.h b/dlls/BB/bb.h deleted file mode 100644 index d433be78..00000000 --- a/dlls/BB/bb.h +++ /dev/null @@ -1,115 +0,0 @@ -// prevent double include -#ifndef __BB_H__ -#define __BB_H__ - -#include "pdata.h" -#include "bb_const.h" - -void UpdateBBHud( long& target); - -inline float GetUserExp( long& target) - { return GetPData(target, BB_PDATA_EXP, 100.0); } - -inline void SetUserExp( long& target, float& exp) - { SetPData(target, BB_PDATA_EXP, exp); } - -inline float GetUserPoints( long& target) - { return GetPData(target, BB_PDATA_POINT, 100.0); } - -inline void SetUserPoints( long& target, float& points) - {SetPData(target, BB_PDATA_POINT, points, true);} - -inline long GetUserLevel(long& target) - { return GetPData(target,BB_PDATA_LEVEL,100); } - -inline void SetUserLevel(long& target, long& level) -{ - long i; - float totalxp = 0.0; - - for(i=1;i<=level;i++) { - totalxp += 150.0 + ((i-1) * 300.0); - } - - SetUserExp( target, totalxp ); - - MESSAGE_BEGIN(MSG_ONE,120, NULL, MF_GetPlayerEdict( target) ); - WRITE_COORD(0); - WRITE_BYTE(level); - WRITE_BYTE( GetUserPoints(target) ); - MESSAGE_END(); - - MESSAGE_BEGIN(MSG_ALL,81, NULL, MF_GetPlayerEdict( target )); - WRITE_BYTE( target ); - WRITE_SHORT( MF_GetPlayerFrags( target ) ); - WRITE_SHORT( MF_GetPlayerDeaths( target ) ); - WRITE_BYTE(level); - MESSAGE_END(); - - SetPData(target,BB_PDATA_LEVEL,level); - SetPData(target,BB_PDATA_LEVEL - 1,level); - -} - -inline long GetUserSpeed(long& target) - { return GetPData(target,BB_PDATA_SPEED,100); } - -inline void SetUserSpeed(long& target, long& speed) - { SetPData(target,BB_PDATA_SPEED,speed, true);} - -inline long GetUserHitPoints(long& target) - { return GetPData(target,BB_PDATA_HITPOINTS,100); } - -inline void SetUserHitPoints(long& target, long& hitpoints) - { SetPData(target,BB_PDATA_HITPOINTS,hitpoints, true); } - -inline long GetUserSkill(long& target) - { return GetPData(target,BB_PDATA_SKILL,100); } - -inline void SetUserSkill(long& target, long& skill ) - { SetPData(target,BB_PDATA_SKILL,skill,true); } - -inline bool IsUserZombie(long& target) -{ - return ( (MF_GetPlayerEdict( target ))->v.team == 2); -} - -inline void SendProgressBar( long& target, char* message, float& time) -{ - MESSAGE_BEGIN(MSG_ONE, 122, NULL, MF_GetPlayerEdict( target)); - WRITE_STRING(message); - WRITE_COORD(time); - MESSAGE_END(); -} - -inline void SendShowObjective( long& target, char* message) -{ - MESSAGE_BEGIN(MSG_ONE, 122, NULL, MF_GetPlayerEdict( target)); - WRITE_COORD(-1); - WRITE_BYTE(144); - WRITE_STRING(message); - MESSAGE_END(); -} - -inline void SendShowMessage( long& target, float& duration, char* message, char* message2) -{ - MESSAGE_BEGIN(MSG_ONE, 122, NULL, MF_GetPlayerEdict( target)); - WRITE_COORD(duration); - WRITE_BYTE(32); - WRITE_STRING(message); - WRITE_STRING(message2); - MESSAGE_END(); -} - -void UpdateBBHud( long& target) -{ - MESSAGE_BEGIN( MSG_ONE, 113, NULL, MF_GetPlayerEdict( target) ); - WRITE_BYTE( GetUserHitPoints(target) ); - WRITE_BYTE( GetUserSpeed(target) ); - WRITE_BYTE( GetUserSkill(target) ); - WRITE_BYTE( GetUserPoints(target) ); - MESSAGE_END(); -} - -#endif - diff --git a/dlls/BB/bb.inc b/dlls/BB/bb.inc deleted file mode 100644 index dd25ddb4..00000000 --- a/dlls/BB/bb.inc +++ /dev/null @@ -1,47 +0,0 @@ -/* BrainBread Fun Module - * - * (c) 2005, XxAvalanchexX (converted to module by Rukia) - * - * This file is provided as is (no warranties). - */ - -#if defined _brainbread_included - #endinput -#endif -#define _brainbread_included - -#pragma library BBFUN - -#include -#include - -native bb_is_user_zombie(id) -native bb_reset_user_hud(id) - -native bb_show_message(id,Float:time = -1,message[],message2[] = "") -native bb_show_objective(id,message[] = "") -native bb_show_progress_bar(id,message[],time = 10) - -native bb_get_user_skill(id) -native bb_set_user_skill(id,skill) -stock bb_add_user_skill(id,skill) bb_set_user_skill(id,bb_get_user_skill(id) + skill) - -native Float:bb_get_user_exp(id) -native bb_set_user_exp(id,Float:exp) -stock bb_add_user_exp(id,Float:exp) bb_set_user_exp(id,bb_get_user_exp(id) + exp) - -native Float:bb_get_user_points(id) -native bb_set_user_points(id,Float:points) -stock bb_add_user_points(id,Float:points) bb_set_user_ponts(id,bb_get_user_points(id) + points) - -native bb_get_user_level(id) -native bb_set_user_level(id,level) -stock bb_add_user_level(id,level) bb_set_user_level(id,bb_get_user_level(id) + level) - -native bb_get_user_speed(id) -native bb_set_user_speed(id,speed) -stock bb_add_user_speed(id,speed) bb_set_user_speed(id,bb_get_user_speed(id) + speed) - -native bb_get_user_hitpoints(id) -native bb_set_user_hitpoints(id,hitpoints) -stock bb_add_user_hitpoints(id,hitpoints) bb_set_user_hitpoints(id,bb_get_user_hitpoints(id) + hitpoints) \ No newline at end of file diff --git a/dlls/BB/bb.ncb b/dlls/BB/bb.ncb deleted file mode 100644 index b1106abd..00000000 Binary files a/dlls/BB/bb.ncb and /dev/null differ diff --git a/dlls/BB/bb.sln b/dlls/BB/bb.sln deleted file mode 100644 index 4fde9650..00000000 --- a/dlls/BB/bb.sln +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bb", "bb.vcproj", "{29798873-02F2-4075-AFE7-58CE8F9B5124}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {29798873-02F2-4075-AFE7-58CE8F9B5124}.Debug.ActiveCfg = Debug|Win32 - {29798873-02F2-4075-AFE7-58CE8F9B5124}.Debug.Build.0 = Debug|Win32 - {29798873-02F2-4075-AFE7-58CE8F9B5124}.Release.ActiveCfg = Release|Win32 - {29798873-02F2-4075-AFE7-58CE8F9B5124}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/dlls/BB/bb.vcproj b/dlls/BB/bb.vcproj deleted file mode 100644 index b3da03e0..00000000 --- a/dlls/BB/bb.vcproj +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dlls/BB/bb_const.h b/dlls/BB/bb_const.h deleted file mode 100644 index af142627..00000000 --- a/dlls/BB/bb_const.h +++ /dev/null @@ -1,12 +0,0 @@ -// prevent double include -#ifndef __BB_CONST__ -#define __BB_CONST__ - -#define BB_PDATA_LEVEL 505 -#define BB_PDATA_EXP 4 -#define BB_PDATA_POINT 432 -#define BB_PDATA_SPEED 501 -#define BB_PDATA_HITPOINTS 502 -#define BB_PDATA_SKILL 503 - -#endif \ No newline at end of file diff --git a/dlls/BB/bb_const.inc b/dlls/BB/bb_const.inc deleted file mode 100644 index 26e289f1..00000000 --- a/dlls/BB/bb_const.inc +++ /dev/null @@ -1,26 +0,0 @@ -/* BrainBread Fun Module Constants - * - * (c) 2005, XxAvalanchexX (converted to module by Rukia) - * - * This file is provided as is (no warranties). - */ - -#if defined _brainbread_const_included - #endinput -#endif -#define _brainbread_const_included - - -#define SPRAY_BSPRITZ 1 -#define SPRAY_BGUSH 2 -#define SPRAY_SMOKEPUFF 4 -#define SPRAY_EXPLOSION 5 - -#define DOT_GREEN 1 -#define DOT_RED 2 -#define DOT_WHITE 3 -#define DOT_LTBLUE 4 -#define DOT_BLUE 5 -#define DOT_ORANGE 6 -#define DOT_FLYELLOW 7 -#define DOT_FLGREEN 8 diff --git a/dlls/BB/bb_stocks.inc b/dlls/BB/bb_stocks.inc deleted file mode 100644 index b94feb17..00000000 --- a/dlls/BB/bb_stocks.inc +++ /dev/null @@ -1,112 +0,0 @@ -/* BrainBread Fun Module Stocks - * - * (c) 2005, XxAvalanchexX (converted to module by Rukia) - * - * This file is provided as is (no warranties). - */ - -#if defined _brainbread_stocks_included - #endinput -#endif -#define _brainbread_stocks_included - -/* Used to create a spray */ -stock bb_spray(type,origin[3]) { - - /* type: type of spray, see below */ - /* origin: origin of where spray comes from */ - - /* TYPES: - SPRAY_BSPRITZ (1) = Blood spritz - SPRAY_BGUSH (2) = Blood gush - SPRAY_SMOKEPUFF (4) = Smoke puffs - SPRAY_EXPLOSION (5) = Firey explosion */ - - message_begin(MSG_PVS,118,origin,0); - write_byte(type); - write_coord(origin[0]); - write_coord(origin[1]); - write_coord(origin[2]); - write_coord(random_num(-1,1)); - write_coord(random_num(-1,1)); - write_coord(random_num(-1,1)); - write_coord(random_num(-1,1)); - write_coord(random_num(-1,1)); - write_coord(random_num(-1,1)); - message_end(); - - return 1; -} - -/* Used to create a spray, with more parameters */ -stock bb_spray_adv(type,origin[3],size[3],dir[3]) { - - /* type: type of spray, see below */ - /* origin: origin of where spray comes from */ - /* size: size of spray, in XYZ format (I think), use a small number like -1 to 1 */ - /* dir: direction of spray, in XYZ format (I think), use a small number like -1 to 1 */ - - /* TYPES: - SPRAY_BSPRITZ (1) = Blood spritz - SPRAY_BGUSH (2) = Blood gush - SPRAY_SMOKEPUFF (4) = Smoke puffs - SPRAY_EXPLOSION (5) = Firey explosion */ - - message_begin(MSG_PVS,118,origin,0); - write_byte(type); - write_coord(origin[0]); - write_coord(origin[1]); - write_coord(origin[2]); - write_coord(size[0]); - write_coord(size[1]); - write_coord(size[2]); - write_coord(dir[0]); - write_coord(dir[1]); - write_coord(dir[2]); - message_end(); - - return 1; -} - -/* Used to set dots on the radar */ -stock bb_radar(id,dot_id,dot_origin[3],dot_status,dot_type) { - - /* dot_id: unique ID for this dot, use same ID to modify the same dot */ - /* dot_origin: the origin of where to place this dot */ - /* dot_status: 0 to remove the dot, 1 to add or modify the dot */ - /* dot_type: the type of dot, see below */ - - /* dot_origin and dot_type need not be set accurately when removing the dot */ - - /* TYPES: - DOT_GREEN (1) = Green Dot, used to mark teammates - DOT_RED (2) = Red Dot, used to mark enemies for zombies - DOT_WHITE (3) = White Dot, used to mark mission zones - DOT_LTBLUE (4) = Light Blue Dot, not used for BrainBread - DOT_BLUE (5) = Blue Dot, used to mark the BlackHawk - DOT_ORANGE (6) = Orange Dot, not used for BrainBread - DOT_FLYELLOW (7) = Flashing Yellow Dot, used to mark the Case or Fred - DOT_FLGREEN (8) = Flashing Green Dot, not used for BrainBread, - it stops flashing and turns to white after 3 seconds */ - - message_begin(MSG_ONE,93,{0,0,0},id); - write_short(dot_id); - write_byte(1); - write_coord(dot_origin[0]); - write_coord(dot_origin[1]); - write_coord(dot_origin[2]); - write_byte(1); - message_end(); - - message_begin(MSG_ONE,93,{0,0,0},id); - write_short(dot_id); - write_byte((dot_status > 0) ? 2 : 0); - - if(dot_status > 0) { - write_byte(dot_type); - } - - message_end(); - - return 1; -} diff --git a/dlls/BB/moduleconfig.h b/dlls/BB/moduleconfig.h deleted file mode 100644 index 3a68f862..00000000 --- a/dlls/BB/moduleconfig.h +++ /dev/null @@ -1,462 +0,0 @@ -// Configuration - -#ifndef __MODULECONFIG_H__ -#define __MODULECONFIG_H__ - -// Module info -#define MODULE_NAME "BBFUN" -#define MODULE_VERSION "1.65" -#define MODULE_AUTHOR "Avalanche" -#define MODULE_URL "www.rcrclansite.com" -#define MODULE_LOGTAG "BB" -// If you want the module not to be reloaded on mapchange, remove / comment out the next line -#define MODULE_RELOAD_ON_MAPCHANGE - -#ifdef __DATE__ -#define MODULE_DATE __DATE__ -#else // __DATE__ -#define MODULE_DATE "Today" -#endif // __DATE__ - -// metamod plugin? -#define USE_METAMOD - -// - AMXX Init functions -// Also consider using FN_META_* -// AMXX query -//#define FN_AMXX_QUERY OnAmxxQuery -// AMXX attach -// Do native functions init here (MF_AddNatives) -#define FN_AMXX_ATTACH OnAmxxAttach -// AMXX detach -// #define FN_AMXX_DETACH OnAmxxDetach -// All plugins loaded -// Do forward functions init here (MF_RegisterForward) -// #define FN_AMXX_PLUGINSLOADED OnPluginsLoaded - -/**** METAMOD ****/ -// If your module doesn't use metamod, you may close the file now :) -#ifdef USE_METAMOD -// ---- -// Hook Functions -// Uncomment these to be called -// You can also change the function name - -// - Metamod init functions -// Also consider using FN_AMXX_* -// Meta query -//#define FN_META_QUERY OnMetaQuery -// Meta attach -//#define FN_META_ATTACH OnMetaAttach -// Meta detach -//#define FN_META_DETACH OnMetaDetach - -// (wd) are Will Day's notes -// - GetEntityAPI2 functions -// #define FN_GameDLLInit GameDLLInit /* pfnGameInit() */ -// #define FN_DispatchSpawn DispatchSpawn /* pfnSpawn() */ -// #define FN_DispatchThink DispatchThink /* pfnThink() */ -// #define FN_DispatchUse DispatchUse /* pfnUse() */ -// #define FN_DispatchTouch DispatchTouch /* pfnTouch() */ -// #define FN_DispatchBlocked DispatchBlocked /* pfnBlocked() */ -// #define FN_DispatchKeyValue DispatchKeyValue /* pfnKeyValue() */ -// #define FN_DispatchSave DispatchSave /* pfnSave() */ -// #define FN_DispatchRestore DispatchRestore /* pfnRestore() */ -// #define FN_DispatchObjectCollsionBox DispatchObjectCollsionBox /* pfnSetAbsBox() */ -// #define FN_SaveWriteFields SaveWriteFields /* pfnSaveWriteFields() */ -// #define FN_SaveReadFields SaveReadFields /* pfnSaveReadFields() */ -// #define FN_SaveGlobalState SaveGlobalState /* pfnSaveGlobalState() */ -// #define FN_RestoreGlobalState RestoreGlobalState /* pfnRestoreGlobalState() */ -// #define FN_ResetGlobalState ResetGlobalState /* pfnResetGlobalState() */ -// #define FN_ClientConnect ClientConnect /* pfnClientConnect() (wd) Client has connected */ -// #define FN_ClientDisconnect ClientDisconnect /* pfnClientDisconnect() (wd) Player has left the game */ -// #define FN_ClientKill ClientKill /* pfnClientKill() (wd) Player has typed "kill" */ -// #define FN_ClientPutInServer ClientPutInServer /* pfnClientPutInServer() (wd) Client is entering the game */ -// #define FN_ClientCommand ClientCommand /* pfnClientCommand() (wd) Player has sent a command (typed or from a bind) */ -// #define FN_ClientUserInfoChanged ClientUserInfoChanged /* pfnClientUserInfoChanged() (wd) Client has updated their setinfo structure */ -// #define FN_ServerActivate ServerActivate /* pfnServerActivate() (wd) Server is starting a new map */ -// #define FN_ServerDeactivate ServerDeactivate /* pfnServerDeactivate() (wd) Server is leaving the map (shutdown or changelevel); SDK2 */ -// #define FN_PlayerPreThink PlayerPreThink /* pfnPlayerPreThink() */ -// #define FN_PlayerPostThink PlayerPostThink /* pfnPlayerPostThink() */ -// #define FN_StartFrame StartFrame /* pfnStartFrame() */ -// #define FN_ParmsNewLevel ParmsNewLevel /* pfnParmsNewLevel() */ -// #define FN_ParmsChangeLevel ParmsChangeLevel /* pfnParmsChangeLevel() */ -// #define FN_GetGameDescription GetGameDescription /* pfnGetGameDescription() Returns string describing current .dll. E.g. "TeamFotrress 2" "Half-Life" */ -// #define FN_PlayerCustomization PlayerCustomization /* pfnPlayerCustomization() Notifies .dll of new customization for player. */ -// #define FN_SpectatorConnect SpectatorConnect /* pfnSpectatorConnect() Called when spectator joins server */ -// #define FN_SpectatorDisconnect SpectatorDisconnect /* pfnSpectatorDisconnect() Called when spectator leaves the server */ -// #define FN_SpectatorThink SpectatorThink /* pfnSpectatorThink() Called when spectator sends a command packet (usercmd_t) */ -// #define FN_Sys_Error Sys_Error /* pfnSys_Error() Notify game .dll that engine is going to shut down. Allows mod authors to set a breakpoint. SDK2 */ -// #define FN_PM_Move PM_Move /* pfnPM_Move() (wd) SDK2 */ -// #define FN_PM_Init PM_Init /* pfnPM_Init() Server version of player movement initialization; (wd) SDK2 */ -// #define FN_PM_FindTextureType PM_FindTextureType /* pfnPM_FindTextureType() (wd) SDK2 */ -// #define FN_SetupVisibility SetupVisibility /* pfnSetupVisibility() Set up PVS and PAS for networking for this client; (wd) SDK2 */ -// #define FN_UpdateClientData UpdateClientData /* pfnUpdateClientData() Set up data sent only to specific client; (wd) SDK2 */ -// #define FN_AddToFullPack AddToFullPack /* pfnAddToFullPack() (wd) SDK2 */ -// #define FN_CreateBaseline CreateBaseline /* pfnCreateBaseline() Tweak entity baseline for network encoding allows setup of player baselines too.; (wd) SDK2 */ -// #define FN_RegisterEncoders RegisterEncoders /* pfnRegisterEncoders() Callbacks for network encoding; (wd) SDK2 */ -// #define FN_GetWeaponData GetWeaponData /* pfnGetWeaponData() (wd) SDK2 */ -// #define FN_CmdStart CmdStart /* pfnCmdStart() (wd) SDK2 */ -// #define FN_CmdEnd CmdEnd /* pfnCmdEnd() (wd) SDK2 */ -// #define FN_ConnectionlessPacket ConnectionlessPacket /* pfnConnectionlessPacket() (wd) SDK2 */ -// #define FN_GetHullBounds GetHullBounds /* pfnGetHullBounds() (wd) SDK2 */ -// #define FN_CreateInstancedBaselines CreateInstancedBaselines /* pfnCreateInstancedBaselines() (wd) SDK2 */ -// #define FN_InconsistentFile InconsistentFile /* pfnInconsistentFile() (wd) SDK2 */ -// #define FN_AllowLagCompensation AllowLagCompensation /* pfnAllowLagCompensation() (wd) SDK2 */ - -// - GetEntityAPI2_Post functions -// #define FN_GameDLLInit_Post GameDLLInit_Post -// #define FN_DispatchSpawn_Post DispatchSpawn_Post -// #define FN_DispatchThink_Post DispatchThink_Post -// #define FN_DispatchUse_Post DispatchUse_Post -// #define FN_DispatchTouch_Post DispatchTouch_Post -// #define FN_DispatchBlocked_Post DispatchBlocked_Post -// #define FN_DispatchKeyValue_Post DispatchKeyValue_Post -// #define FN_DispatchSave_Post DispatchSave_Post -// #define FN_DispatchRestore_Post DispatchRestore_Post -// #define FN_DispatchObjectCollsionBox_Post DispatchObjectCollsionBox_Post -// #define FN_SaveWriteFields_Post SaveWriteFields_Post -// #define FN_SaveReadFields_Post SaveReadFields_Post -// #define FN_SaveGlobalState_Post SaveGlobalState_Post -// #define FN_RestoreGlobalState_Post RestoreGlobalState_Post -// #define FN_ResetGlobalState_Post ResetGlobalState_Post -// #define FN_ClientConnect_Post ClientConnect_Post -// #define FN_ClientDisconnect_Post ClientDisconnect_Post -// #define FN_ClientKill_Post ClientKill_Post -// #define FN_ClientPutInServer_Post ClientPutInServer_Post -// #define FN_ClientCommand_Post ClientCommand_Post -// #define FN_ClientUserInfoChanged_Post ClientUserInfoChanged_Post -// #define FN_ServerActivate_Post ServerActivate_Post -// #define FN_ServerDeactivate_Post ServerDeactivate_Post -// #define FN_PlayerPreThink_Post PlayerPreThink_Post -// #define FN_PlayerPostThink_Post PlayerPostThink_Post -// #define FN_StartFrame_Post StartFrame_Post -// #define FN_ParmsNewLevel_Post ParmsNewLevel_Post -// #define FN_ParmsChangeLevel_Post ParmsChangeLevel_Post -// #define FN_GetGameDescription_Post GetGameDescription_Post -// #define FN_PlayerCustomization_Post PlayerCustomization_Post -// #define FN_SpectatorConnect_Post SpectatorConnect_Post -// #define FN_SpectatorDisconnect_Post SpectatorDisconnect_Post -// #define FN_SpectatorThink_Post SpectatorThink_Post -// #define FN_Sys_Error_Post Sys_Error_Post -// #define FN_PM_Move_Post PM_Move_Post -// #define FN_PM_Init_Post PM_Init_Post -// #define FN_PM_FindTextureType_Post PM_FindTextureType_Post -// #define FN_SetupVisibility_Post SetupVisibility_Post -// #define FN_UpdateClientData_Post UpdateClientData_Post -// #define FN_AddToFullPack_Post AddToFullPack_Post -// #define FN_CreateBaseline_Post CreateBaseline_Post -// #define FN_RegisterEncoders_Post RegisterEncoders_Post -// #define FN_GetWeaponData_Post GetWeaponData_Post -// #define FN_CmdStart_Post CmdStart_Post -// #define FN_CmdEnd_Post CmdEnd_Post -// #define FN_ConnectionlessPacket_Post ConnectionlessPacket_Post -// #define FN_GetHullBounds_Post GetHullBounds_Post -// #define FN_CreateInstancedBaselines_Post CreateInstancedBaselines_Post -// #define FN_InconsistentFile_Post InconsistentFile_Post -// #define FN_AllowLagCompensation_Post AllowLagCompensation_Post - -// - GetEngineAPI functions -// #define FN_PrecacheModel PrecacheModel -// #define FN_PrecacheSound PrecacheSound -// #define FN_SetModel SetModel -// #define FN_ModelIndex ModelIndex -// #define FN_ModelFrames ModelFrames -// #define FN_SetSize SetSize -// #define FN_ChangeLevel ChangeLevel -// #define FN_GetSpawnParms GetSpawnParms -// #define FN_SaveSpawnParms SaveSpawnParms -// #define FN_VecToYaw VecToYaw -// #define FN_VecToAngles VecToAngles -// #define FN_MoveToOrigin MoveToOrigin -// #define FN_ChangeYaw ChangeYaw -// #define FN_ChangePitch ChangePitch -// #define FN_FindEntityByString FindEntityByString -// #define FN_GetEntityIllum GetEntityIllum -// #define FN_FindEntityInSphere FindEntityInSphere -// #define FN_FindClientInPVS FindClientInPVS -// #define FN_EntitiesInPVS EntitiesInPVS -// #define FN_MakeVectors MakeVectors -// #define FN_AngleVectors AngleVectors -// #define FN_CreateEntity CreateEntity -// #define FN_RemoveEntity RemoveEntity -// #define FN_CreateNamedEntity CreateNamedEntity -// #define FN_MakeStatic MakeStatic -// #define FN_EntIsOnFloor EntIsOnFloor -// #define FN_DropToFloor DropToFloor -// #define FN_WalkMove WalkMove -// #define FN_SetOrigin SetOrigin -// #define FN_EmitSound EmitSound -// #define FN_EmitAmbientSound EmitAmbientSound -// #define FN_TraceLine TraceLine -// #define FN_TraceToss TraceToss -// #define FN_TraceMonsterHull TraceMonsterHull -// #define FN_TraceHull TraceHull -// #define FN_TraceModel TraceModel -// #define FN_TraceTexture TraceTexture -// #define FN_TraceSphere TraceSphere -// #define FN_GetAimVector GetAimVector -// #define FN_ServerCommand ServerCommand -// #define FN_ServerExecute ServerExecute -// #define FN_engClientCommand engClientCommand -// #define FN_ParticleEffect ParticleEffect -// #define FN_LightStyle LightStyle -// #define FN_DecalIndex DecalIndex -// #define FN_PointContents PointContents -// #define FN_MessageBegin MessageBegin -// #define FN_MessageEnd MessageEnd -// #define FN_WriteByte WriteByte -// #define FN_WriteChar WriteChar -// #define FN_WriteShort WriteShort -// #define FN_WriteLong WriteLong -// #define FN_WriteAngle WriteAngle -// #define FN_WriteCoord WriteCoord -// #define FN_WriteString WriteString -// #define FN_WriteEntity WriteEntity -// #define FN_CVarRegister CVarRegister -// #define FN_CVarGetFloat CVarGetFloat -// #define FN_CVarGetString CVarGetString -// #define FN_CVarSetFloat CVarSetFloat -// #define FN_CVarSetString CVarSetString -// #define FN_AlertMessage AlertMessage -// #define FN_EngineFprintf EngineFprintf -// #define FN_PvAllocEntPrivateData PvAllocEntPrivateData -// #define FN_PvEntPrivateData PvEntPrivateData -// #define FN_FreeEntPrivateData FreeEntPrivateData -// #define FN_SzFromIndex SzFromIndex -// #define FN_AllocString AllocString -// #define FN_GetVarsOfEnt GetVarsOfEnt -// #define FN_PEntityOfEntOffset PEntityOfEntOffset -// #define FN_EntOffsetOfPEntity EntOffsetOfPEntity -// #define FN_IndexOfEdict IndexOfEdict -// #define FN_PEntityOfEntIndex PEntityOfEntIndex -// #define FN_FindEntityByVars FindEntityByVars -// #define FN_GetModelPtr GetModelPtr -// #define FN_RegUserMsg RegUserMsg -// #define FN_AnimationAutomove AnimationAutomove -// #define FN_GetBonePosition GetBonePosition -// #define FN_FunctionFromName FunctionFromName -// #define FN_NameForFunction NameForFunction -// #define FN_ClientPrintf ClientPrintf -// #define FN_ServerPrint ServerPrint -// #define FN_Cmd_Args Cmd_Args -// #define FN_Cmd_Argv Cmd_Argv -// #define FN_Cmd_Argc Cmd_Argc -// #define FN_GetAttachment GetAttachment -// #define FN_CRC32_Init CRC32_Init -// #define FN_CRC32_ProcessBuffer CRC32_ProcessBuffer -// #define FN_CRC32_ProcessByte CRC32_ProcessByte -// #define FN_CRC32_Final CRC32_Final -// #define FN_RandomLong RandomLong -// #define FN_RandomFloat RandomFloat -// #define FN_SetView SetView -// #define FN_Time Time -// #define FN_CrosshairAngle CrosshairAngle -// #define FN_LoadFileForMe LoadFileForMe -// #define FN_FreeFile FreeFile -// #define FN_EndSection EndSection -// #define FN_CompareFileTime CompareFileTime -// #define FN_GetGameDir GetGameDir -// #define FN_Cvar_RegisterVariable Cvar_RegisterVariable -// #define FN_FadeClientVolume FadeClientVolume -// #define FN_SetClientMaxspeed SetClientMaxspeed -// #define FN_CreateFakeClient CreateFakeClient -// #define FN_RunPlayerMove RunPlayerMove -// #define FN_NumberOfEntities NumberOfEntities -// #define FN_GetInfoKeyBuffer GetInfoKeyBuffer -// #define FN_InfoKeyValue InfoKeyValue -// #define FN_SetKeyValue SetKeyValue -// #define FN_SetClientKeyValue SetClientKeyValue -// #define FN_IsMapValid IsMapValid -// #define FN_StaticDecal StaticDecal -// #define FN_PrecacheGeneric PrecacheGeneric -// #define FN_GetPlayerUserId GetPlayerUserId -// #define FN_BuildSoundMsg BuildSoundMsg -// #define FN_IsDedicatedServer IsDedicatedServer -// #define FN_CVarGetPointer CVarGetPointer -// #define FN_GetPlayerWONId GetPlayerWONId -// #define FN_Info_RemoveKey Info_RemoveKey -// #define FN_GetPhysicsKeyValue GetPhysicsKeyValue -// #define FN_SetPhysicsKeyValue SetPhysicsKeyValue -// #define FN_GetPhysicsInfoString GetPhysicsInfoString -// #define FN_PrecacheEvent PrecacheEvent -// #define FN_PlaybackEvent PlaybackEvent -// #define FN_SetFatPVS SetFatPVS -// #define FN_SetFatPAS SetFatPAS -// #define FN_CheckVisibility CheckVisibility -// #define FN_DeltaSetField DeltaSetField -// #define FN_DeltaUnsetField DeltaUnsetField -// #define FN_DeltaAddEncoder DeltaAddEncoder -// #define FN_GetCurrentPlayer GetCurrentPlayer -// #define FN_CanSkipPlayer CanSkipPlayer -// #define FN_DeltaFindField DeltaFindField -// #define FN_DeltaSetFieldByIndex DeltaSetFieldByIndex -// #define FN_DeltaUnsetFieldByIndex DeltaUnsetFieldByIndex -// #define FN_SetGroupMask SetGroupMask -// #define FN_engCreateInstancedBaseline engCreateInstancedBaseline -// #define FN_Cvar_DirectSet Cvar_DirectSet -// #define FN_ForceUnmodified ForceUnmodified -// #define FN_GetPlayerStats GetPlayerStats -// #define FN_AddServerCommand AddServerCommand -// #define FN_Voice_GetClientListening Voice_GetClientListening -// #define FN_Voice_SetClientListening Voice_SetClientListening -// #define FN_GetPlayerAuthId GetPlayerAuthId - -// - GetEngineAPI_Post functions -// #define FN_PrecacheModel_Post PrecacheModel_Post -// #define FN_PrecacheSound_Post PrecacheSound_Post -// #define FN_SetModel_Post SetModel_Post -// #define FN_ModelIndex_Post ModelIndex_Post -// #define FN_ModelFrames_Post ModelFrames_Post -// #define FN_SetSize_Post SetSize_Post -// #define FN_ChangeLevel_Post ChangeLevel_Post -// #define FN_GetSpawnParms_Post GetSpawnParms_Post -// #define FN_SaveSpawnParms_Post SaveSpawnParms_Post -// #define FN_VecToYaw_Post VecToYaw_Post -// #define FN_VecToAngles_Post VecToAngles_Post -// #define FN_MoveToOrigin_Post MoveToOrigin_Post -// #define FN_ChangeYaw_Post ChangeYaw_Post -// #define FN_ChangePitch_Post ChangePitch_Post -// #define FN_FindEntityByString_Post FindEntityByString_Post -// #define FN_GetEntityIllum_Post GetEntityIllum_Post -// #define FN_FindEntityInSphere_Post FindEntityInSphere_Post -// #define FN_FindClientInPVS_Post FindClientInPVS_Post -// #define FN_EntitiesInPVS_Post EntitiesInPVS_Post -// #define FN_MakeVectors_Post MakeVectors_Post -// #define FN_AngleVectors_Post AngleVectors_Post -// #define FN_CreateEntity_Post CreateEntity_Post -// #define FN_RemoveEntity_Post RemoveEntity_Post -// #define FN_CreateNamedEntity_Post CreateNamedEntity_Post -// #define FN_MakeStatic_Post MakeStatic_Post -// #define FN_EntIsOnFloor_Post EntIsOnFloor_Post -// #define FN_DropToFloor_Post DropToFloor_Post -// #define FN_WalkMove_Post WalkMove_Post -// #define FN_SetOrigin_Post SetOrigin_Post -// #define FN_EmitSound_Post EmitSound_Post -// #define FN_EmitAmbientSound_Post EmitAmbientSound_Post -// #define FN_TraceLine_Post TraceLine_Post -// #define FN_TraceToss_Post TraceToss_Post -// #define FN_TraceMonsterHull_Post TraceMonsterHull_Post -// #define FN_TraceHull_Post TraceHull_Post -// #define FN_TraceModel_Post TraceModel_Post -// #define FN_TraceTexture_Post TraceTexture_Post -// #define FN_TraceSphere_Post TraceSphere_Post -// #define FN_GetAimVector_Post GetAimVector_Post -// #define FN_ServerCommand_Post ServerCommand_Post -// #define FN_ServerExecute_Post ServerExecute_Post -// #define FN_engClientCommand_Post engClientCommand_Post -// #define FN_ParticleEffect_Post ParticleEffect_Post -// #define FN_LightStyle_Post LightStyle_Post -// #define FN_DecalIndex_Post DecalIndex_Post -// #define FN_PointContents_Post PointContents_Post -// #define FN_MessageBegin_Post MessageBegin_Post -// #define FN_MessageEnd_Post MessageEnd_Post -// #define FN_WriteByte_Post WriteByte_Post -// #define FN_WriteChar_Post WriteChar_Post -// #define FN_WriteShort_Post WriteShort_Post -// #define FN_WriteLong_Post WriteLong_Post -// #define FN_WriteAngle_Post WriteAngle_Post -// #define FN_WriteCoord_Post WriteCoord_Post -// #define FN_WriteString_Post WriteString_Post -// #define FN_WriteEntity_Post WriteEntity_Post -// #define FN_CVarRegister_Post CVarRegister_Post -// #define FN_CVarGetFloat_Post CVarGetFloat_Post -// #define FN_CVarGetString_Post CVarGetString_Post -// #define FN_CVarSetFloat_Post CVarSetFloat_Post -// #define FN_CVarSetString_Post CVarSetString_Post -// #define FN_AlertMessage_Post AlertMessage_Post -// #define FN_EngineFprintf_Post EngineFprintf_Post -// #define FN_PvAllocEntPrivateData_Post PvAllocEntPrivateData_Post -// #define FN_PvEntPrivateData_Post PvEntPrivateData_Post -// #define FN_FreeEntPrivateData_Post FreeEntPrivateData_Post -// #define FN_SzFromIndex_Post SzFromIndex_Post -// #define FN_AllocString_Post AllocString_Post -// #define FN_GetVarsOfEnt_Post GetVarsOfEnt_Post -// #define FN_PEntityOfEntOffset_Post PEntityOfEntOffset_Post -// #define FN_EntOffsetOfPEntity_Post EntOffsetOfPEntity_Post -// #define FN_IndexOfEdict_Post IndexOfEdict_Post -// #define FN_PEntityOfEntIndex_Post PEntityOfEntIndex_Post -// #define FN_FindEntityByVars_Post FindEntityByVars_Post -// #define FN_GetModelPtr_Post GetModelPtr_Post -// #define FN_RegUserMsg_Post RegUserMsg_Post -// #define FN_AnimationAutomove_Post AnimationAutomove_Post -// #define FN_GetBonePosition_Post GetBonePosition_Post -// #define FN_FunctionFromName_Post FunctionFromName_Post -// #define FN_NameForFunction_Post NameForFunction_Post -// #define FN_ClientPrintf_Post ClientPrintf_Post -// #define FN_ServerPrint_Post ServerPrint_Post -// #define FN_Cmd_Args_Post Cmd_Args_Post -// #define FN_Cmd_Argv_Post Cmd_Argv_Post -// #define FN_Cmd_Argc_Post Cmd_Argc_Post -// #define FN_GetAttachment_Post GetAttachment_Post -// #define FN_CRC32_Init_Post CRC32_Init_Post -// #define FN_CRC32_ProcessBuffer_Post CRC32_ProcessBuffer_Post -// #define FN_CRC32_ProcessByte_Post CRC32_ProcessByte_Post -// #define FN_CRC32_Final_Post CRC32_Final_Post -// #define FN_RandomLong_Post RandomLong_Post -// #define FN_RandomFloat_Post RandomFloat_Post -// #define FN_SetView_Post SetView_Post -// #define FN_Time_Post Time_Post -// #define FN_CrosshairAngle_Post CrosshairAngle_Post -// #define FN_LoadFileForMe_Post LoadFileForMe_Post -// #define FN_FreeFile_Post FreeFile_Post -// #define FN_EndSection_Post EndSection_Post -// #define FN_CompareFileTime_Post CompareFileTime_Post -// #define FN_GetGameDir_Post GetGameDir_Post -// #define FN_Cvar_RegisterVariable_Post Cvar_RegisterVariable_Post -// #define FN_FadeClientVolume_Post FadeClientVolume_Post -// #define FN_SetClientMaxspeed_Post SetClientMaxspeed_Post -// #define FN_CreateFakeClient_Post CreateFakeClient_Post -// #define FN_RunPlayerMove_Post RunPlayerMove_Post -// #define FN_NumberOfEntities_Post NumberOfEntities_Post -// #define FN_GetInfoKeyBuffer_Post GetInfoKeyBuffer_Post -// #define FN_InfoKeyValue_Post InfoKeyValue_Post -// #define FN_SetKeyValue_Post SetKeyValue_Post -// #define FN_SetClientKeyValue_Post SetClientKeyValue_Post -// #define FN_IsMapValid_Post IsMapValid_Post -// #define FN_StaticDecal_Post StaticDecal_Post -// #define FN_PrecacheGeneric_Post PrecacheGeneric_Post -// #define FN_GetPlayerUserId_Post GetPlayerUserId_Post -// #define FN_BuildSoundMsg_Post BuildSoundMsg_Post -// #define FN_IsDedicatedServer_Post IsDedicatedServer_Post -// #define FN_CVarGetPointer_Post CVarGetPointer_Post -// #define FN_GetPlayerWONId_Post GetPlayerWONId_Post -// #define FN_Info_RemoveKey_Post Info_RemoveKey_Post -// #define FN_GetPhysicsKeyValue_Post GetPhysicsKeyValue_Post -// #define FN_SetPhysicsKeyValue_Post SetPhysicsKeyValue_Post -// #define FN_GetPhysicsInfoString_Post GetPhysicsInfoString_Post -// #define FN_PrecacheEvent_Post PrecacheEvent_Post -// #define FN_PlaybackEvent_Post PlaybackEvent_Post -// #define FN_SetFatPVS_Post SetFatPVS_Post -// #define FN_SetFatPAS_Post SetFatPAS_Post -// #define FN_CheckVisibility_Post CheckVisibility_Post -// #define FN_DeltaSetField_Post DeltaSetField_Post -// #define FN_DeltaUnsetField_Post DeltaUnsetField_Post -// #define FN_DeltaAddEncoder_Post DeltaAddEncoder_Post -// #define FN_GetCurrentPlayer_Post GetCurrentPlayer_Post -// #define FN_CanSkipPlayer_Post CanSkipPlayer_Post -// #define FN_DeltaFindField_Post DeltaFindField_Post -// #define FN_DeltaSetFieldByIndex_Post DeltaSetFieldByIndex_Post -// #define FN_DeltaUnsetFieldByIndex_Post DeltaUnsetFieldByIndex_Post -// #define FN_SetGroupMask_Post SetGroupMask_Post -// #define FN_engCreateInstancedBaseline_Post engCreateInstancedBaseline_Post -// #define FN_Cvar_DirectSet_Post Cvar_DirectSet_Post -// #define FN_ForceUnmodified_Post ForceUnmodified_Post -// #define FN_GetPlayerStats_Post GetPlayerStats_Post -// #define FN_AddServerCommand_Post AddServerCommand_Post -// #define FN_Voice_GetClientListening_Post Voice_GetClientListening_Post -// #define FN_Voice_SetClientListening_Post Voice_SetClientListening_Post -// #define FN_GetPlayerAuthId_Post GetPlayerAuthId_Post - -// #define FN_OnFreeEntPrivateData OnFreeEntPrivateData -// #define FN_GameShutdown GameShutdown -// #define FN_ShouldCollide ShouldCollide - -// #define FN_OnFreeEntPrivateData_Post OnFreeEntPrivateData_Post -// #define FN_GameShutdown_Post GameShutdown_Post -// #define FN_ShouldCollide_Post ShouldCollide_Post - - -#endif // USE_METAMOD - -#endif // __MODULECONFIG_H__ \ No newline at end of file diff --git a/dlls/BB/pdata.h b/dlls/BB/pdata.h deleted file mode 100644 index 54aaa9fc..00000000 --- a/dlls/BB/pdata.h +++ /dev/null @@ -1,40 +0,0 @@ -// prevent double include -#ifndef __PDATA_H__ -#define __PDATA_H__ - -#include -#include "amxxmodule.h" - -#if defined __linux__ - #define EXTRAOFFSET 5 // offsets 5 higher in Linux builds -#else - #define EXTRAOFFSET 0 // no change in Windows builds -#endif // defined __linux__ - -inline edict_t* MF_GetEntityEdict( long& EntID ) -{ - if( (EntID > 0) && (EntID <= (gpGlobals->maxClients) ) ) - return MF_GetPlayerEdict( EntID ); - - return NULL; -} - -template -inline void SetPData( long& targetid, long offset, ValueType value, bool reset = false ) -{ - edict_t* target = MF_GetEntityEdict( targetid ); - if(target == NULL) return; - - *((ValueType *)target->pvPrivateData + offset + EXTRAOFFSET) = value; - if(reset) UpdateBBHud( targetid ); -}; - -template -inline ValueType GetPData( long& targetid, long offset, ValueType value ) -{ - edict_t* target = MF_GetEntityEdict( targetid ); - if(target == NULL) return NULL; - return *((ValueType *)target->pvPrivateData + offset + EXTRAOFFSET); -} - -#endif \ No newline at end of file diff --git a/dlls/MemHack/MemConst.h b/dlls/MemHack/MemConst.h deleted file mode 100644 index d84b642a..00000000 --- a/dlls/MemHack/MemConst.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef __MEMCONST_H__ -#define __MEMCONST_H__ - -#ifdef __linux__ - #include -#endif - -#include "amxxmodule.h" - -// Define memory address type -#ifdef __amd64__ - typedef uint64_t maddress; -#else - typedef uint32_t maddress; -#endif - -// Number of bytes for different data types -#define BYTE_BYTES 1 -#define WORD_BYTES 2 -#define DWORD_BYTES 4 -#define QWORD_BYTES 8 -#define FLOAT_BYTES 4 - -// Return codes for MemoryProtect -#define MP_FAIL -1 -#define MP_OK 0 - -// Memory protection constants -#ifdef __linux__ - #define MPROT_CODE PROT_READ|PROT_EXEC - #define MPROT_DATA PROT_READ|PROT_WRITE - #define MPROT_RODATA PROT_READ - #define MPROT_CODE_EDIT PROT_READ|PROT_WRITE|PROT_EXEC - #define MPROT_RODATA_EDIT PROT_READ|PROT_WRITE -#else - #define MPROT_CODE PAGE_EXECUTE_READ - #define MPROT_DATA PAGE_READWRITE - #define MPROT_RODATA PAGE_READONLY - #define MPROT_CODE_EDIT PAGE_EXECUTE_READWRITE - #define MPROT_RODATA_EDIT PAGE_READWRITE -#endif - -// Memory area types -#define MEMTYPE_CODE 0 // Code (usually .text segment, requires mprotect or VirtualProtect) -#define MEMTYPE_DATA 1 // Data (usually .data segment, writable by default) -#define MEMTYPE_RODATA 2 // Read-Only Data (usually .rodata on Linux, .rdata on Windows) - -#endif // #ifndef __MEMHACK_H__ diff --git a/dlls/MemHack/MemHack.cpp b/dlls/MemHack/MemHack.cpp deleted file mode 100644 index eb3fd05d..00000000 --- a/dlls/MemHack/MemHack.cpp +++ /dev/null @@ -1,16 +0,0 @@ -#include "MemMisc.h" - -extern AMX_NATIVE_INFO read_natives[]; -extern AMX_NATIVE_INFO write_natives[]; -extern AMX_NATIVE_INFO misc_natives[]; - -void OnAmxxAttach() -{ - // Get Base Addresses for dll and engine; exit if unavailable. - if(GetBaseAddresses() == false) return MF_LogError(NULL,AMX_ERR_MEMACCESS,"Unable to get base address of game or mod .dll!"); - - // Add natives if base is found. - MF_AddNatives(read_natives); - MF_AddNatives(write_natives); - MF_AddNatives(misc_natives); -} \ No newline at end of file diff --git a/dlls/MemHack/MemHack.ncb b/dlls/MemHack/MemHack.ncb deleted file mode 100644 index 8ed80be9..00000000 Binary files a/dlls/MemHack/MemHack.ncb and /dev/null differ diff --git a/dlls/MemHack/MemHack.sln b/dlls/MemHack/MemHack.sln deleted file mode 100644 index 44394a52..00000000 --- a/dlls/MemHack/MemHack.sln +++ /dev/null @@ -1,19 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual C++ Express 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "memhack", "MemHack.vcproj", "{B0190B77-FE9B-495F-8D7E-74D458EBE635}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B0190B77-FE9B-495F-8D7E-74D458EBE635}.Debug|Win32.ActiveCfg = Debug|Win32 - {B0190B77-FE9B-495F-8D7E-74D458EBE635}.Debug|Win32.Build.0 = Debug|Win32 - {B0190B77-FE9B-495F-8D7E-74D458EBE635}.Release|Win32.ActiveCfg = Release|Win32 - {B0190B77-FE9B-495F-8D7E-74D458EBE635}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/dlls/MemHack/MemHack.vcproj b/dlls/MemHack/MemHack.vcproj deleted file mode 100644 index f4a1bfd7..00000000 --- a/dlls/MemHack/MemHack.vcproj +++ /dev/null @@ -1,254 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dlls/MemHack/MemMisc.cpp b/dlls/MemHack/MemMisc.cpp deleted file mode 100644 index 62465a19..00000000 --- a/dlls/MemHack/MemMisc.cpp +++ /dev/null @@ -1,111 +0,0 @@ -#include "MemConst.h" - -// Game memory addresses -maddress gameDllAddress = NULL; -maddress gameEngAddress = NULL; - -bool GetBaseAddress(void *pAddr, maddress &pBaseAddr/*, size_t *memLength*/) -{ -#ifdef WIN32 - MEMORY_BASIC_INFORMATION mem; - if (!VirtualQuery(pAddr, &mem, sizeof(mem))) - return false; - - pBaseAddr = (maddress)mem.AllocationBase; - - IMAGE_DOS_HEADER *dos = (IMAGE_DOS_HEADER *)(mem.AllocationBase); - IMAGE_NT_HEADERS *pe = reinterpret_cast( (unsigned long)dos + (unsigned long)dos->e_lfanew ); - if (pe->Signature != IMAGE_NT_SIGNATURE) - return false; - - //if (memLength) - //*memLength = (size_t)(pe->OptionalHeader.SizeOfImage); - return true; -#else - Dl_info info; - struct stat buf; - - if (!dladdr(pAddr, &info)) - return false; - - if (!info.dli_fbase || !info.dli_fname) - return false; - - if (stat(info.dli_fname, &buf) != 0) - return false; - - if (pBaseAddr) - *pBaseAddr = (unsigned char *)info.dli_fbase; - //if (memLength) - //*memLength = buf.st_size; - - return true; -#endif -} - -/* Wrapper for mprotect and VirtualProtect */ -int MemoryProtect(void *addr, size_t len, unsigned long newProt, unsigned long *oldProt, char memType) { - int retVal; - - #ifdef __linux__ - maddress alignAddr = (maddress)addr - ((maddress)addr % pageSize); - retVal = mprotect((void*)alignAddr, pageSize, newProt); - - // Linux's mprotect doesn't get the old protection flags, so we have to fake it - switch (memType) { - case MEMTYPE_CODE: - *oldProt = MPROT_CODE; - break; - case MEMTYPE_RODATA: - *oldProt = MPROT_RODATA; - break; - default: - *oldProt = MPROT_CODE; - break; - } - #else - retVal = VirtualProtect(addr, len, newProt, oldProt); - // This will match the Windows return value with the Linux ones, done for consistency - if (retVal == 0) { - retVal = -1; - } else { - retVal = 0; - } - #endif - - return retVal; -} - -// Linux won't work till I fix it for MEMTYPE_DATA -#ifdef __linux__ - // Data section stuff - maddress dataSectionStart; - maddress dataSectionOffset; - - int pageSize = sysconf(_SC_PAGESIZE); -#endif - -/* Gets real memory address */ -maddress GetRealMemoryAddress(maddress baseaddress, maddress address, char memType) -{ - if(baseaddress == NULL) return address; - - maddress realAddress = address; - - switch (memType) - { - case MEMTYPE_CODE: case MEMTYPE_RODATA: - realAddress = baseaddress + address; - break; - case MEMTYPE_DATA: - // Linux's data segment is in a not so simple place in memory - #ifdef __linux__ - realAddress = dataSectionStart + (address - dataSectionOffset); - #else - realAddress = baseaddress + address; - #endif - break; - } - - return realAddress; -} \ No newline at end of file diff --git a/dlls/MemHack/MemMisc.h b/dlls/MemHack/MemMisc.h deleted file mode 100644 index 73acc070..00000000 --- a/dlls/MemHack/MemMisc.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef __MEMMISC_H__ -#define __MEMMISC_H__ - -#include "MemConst.h" - -#define SAMPLE_DLLFUNC reinterpret_cast(gpGamedllFuncs->dllapi_table->pfnThink) -#define SAMPLE_ENGFUNC reinterpret_cast(g_engfuncs.pfnChangeLevel) - -extern maddress gameDllAddress; -extern maddress gameEngAddress; - -inline maddress PickBaseAddress(long num) -{ - if(num == 0) return gameDllAddress; - else if(num == 1) return gameEngAddress; - - return NULL; -} - -extern int MemoryProtect(void *addr, size_t len, unsigned long newProt, unsigned long *oldProt, char memType = MEMTYPE_CODE); -extern maddress GetRealMemoryAddress(maddress baseaddress,maddress address, char memType); - -extern bool GetBaseAddress(void *pAddr, maddress &pBaseAddr); - -inline bool GetBaseAddresses( void ) -{ - bool success = false; - - success = GetBaseAddress(SAMPLE_DLLFUNC, gameDllAddress); - if(success == false) return false; - - success = GetBaseAddress(SAMPLE_ENGFUNC, gameEngAddress); - if(success == false) return false; - - return true; -} - -#endif \ No newline at end of file diff --git a/dlls/MemHack/MemMiscNatives.cpp b/dlls/MemHack/MemMiscNatives.cpp deleted file mode 100644 index 5cd2d4ed..00000000 --- a/dlls/MemHack/MemMiscNatives.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include "MemMisc.h" - -#define NATIVE_MISC_ADDRESS params[1] -#define NATIVE_MISC_BASEADDRESS PickBaseAddress(params[2]) -#define NATIVE_MISC_FLAGS params[3] - -static cell AMX_NATIVE_CALL memhack_get_base(AMX *amx, cell *params) -{ - cell *success = MF_GetAmxAddr(amx, params[2]); - maddress BaseAddr = NULL; - - bool is_success = GetBaseAddress((void*)(params[1]), BaseAddr); - *success = is_success; - - return cell(BaseAddr); -} - -static cell AMX_NATIVE_CALL memhack_get_realaddr(AMX *amx, cell *params) -{ - return (cell)GetRealMemoryAddress(NATIVE_MISC_ADDRESS,NATIVE_MISC_BASEADDRESS,NATIVE_MISC_FLAGS); -} - -static cell AMX_NATIVE_CALL memhack_return_addr(AMX *amx, cell *params) -{ - return (cell)PickBaseAddress(params[1]); -} - -AMX_NATIVE_INFO misc_natives[] = { - { "memhack_get_base", memhack_get_base }, - { "memhack_get_realaddr", memhack_get_realaddr }, - { "memhack_return_addr", memhack_return_addr }, - { NULL, NULL } -}; diff --git a/dlls/MemHack/MemRead.cpp b/dlls/MemHack/MemRead.cpp deleted file mode 100644 index 5d9e72a5..00000000 --- a/dlls/MemHack/MemRead.cpp +++ /dev/null @@ -1,56 +0,0 @@ -#include "MemMisc.h" - -/* Functions that read different data types in memory */ - -template -Type UTIL_ReadMemory(maddress BaseAddress, maddress StartAddress, char MemType, Type returnType) -{ - maddress EndAddress = GetRealMemoryAddress(BaseAddress, StartAddress, MemType); - - return *(Type*)EndAddress; -} - -char UTIL_ReadMemory_Byte(maddress BaseAddress, maddress address, char memType) -{ - return UTIL_ReadMemory( BaseAddress, address, memType, char(NULL)); -} - -short UTIL_ReadMemory_Word(maddress BaseAddress, maddress address, char memType) -{ - return UTIL_ReadMemory( BaseAddress, address, memType, short(NULL)); -} - -int32_t UTIL_ReadMemory_Dword(maddress BaseAddress, maddress address, char memType) -{ - return UTIL_ReadMemory( BaseAddress, address, memType, int32_t(NULL)); -} - -long long UTIL_ReadMemory_Qword(maddress BaseAddress, maddress address, char memType) -{ - return UTIL_ReadMemory( BaseAddress, address, memType, (long long)(NULL)); -} - -float UTIL_ReadMemory_Float(maddress BaseAddress, maddress address, char memType) -{ - return UTIL_ReadMemory( BaseAddress, address, memType, float(NULL)); -} - - unsigned char UTIL_ReadMemory_UnsignedByte(maddress BaseAddress, maddress address, char memType) -{ - return UTIL_ReadMemory( BaseAddress, address, memType, (unsigned char)(NULL)); -} - - unsigned short UTIL_ReadMemory_UnsignedWord(maddress BaseAddress, maddress address, char memType) -{ - return UTIL_ReadMemory( BaseAddress, address, memType, (unsigned short)(NULL)); -} - - uint32_t UTIL_ReadMemory_UnsignedDword(maddress BaseAddress, maddress address, char memType) -{ - return UTIL_ReadMemory( BaseAddress, address, memType, uint32_t(NULL)); -} - - maddress UTIL_ReadMemory_Pointer(maddress BaseAddress, maddress address, char memType) -{ - return UTIL_ReadMemory( BaseAddress, address, memType, maddress(NULL)); -} diff --git a/dlls/MemHack/MemRead.h b/dlls/MemHack/MemRead.h deleted file mode 100644 index 93656987..00000000 --- a/dlls/MemHack/MemRead.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef __MEMREAD_H__ -#define __MEMREAD_H__ - -#include "MemMisc.h" - -// Functions that read different data types in memory - -// Base function -template -extern Type UTIL_ReadMemory(maddress BaseAddress, maddress StartAddress, char MemType, Type returnType); - -// Inline stocks -inline char UTIL_ReadMemory_Byte (maddress baseaddress, maddress address, char memType = MEMTYPE_DATA); -inline short UTIL_ReadMemory_Word (maddress baseaddress, maddress address, char memType = MEMTYPE_DATA); -inline int32_t UTIL_ReadMemory_Dword (maddress baseaddress, maddress address, char memType = MEMTYPE_DATA); -inline long long UTIL_ReadMemory_Qword (maddress baseaddress, maddress address, char memType = MEMTYPE_DATA); -inline float UTIL_ReadMemory_Float (maddress baseaddress, maddress address, char memType = MEMTYPE_DATA); -inline unsigned char UTIL_ReadMemory_UnsignedByte (maddress baseaddress, maddress address, char memType = MEMTYPE_DATA); -inline unsigned short UTIL_ReadMemory_UnsignedWord (maddress baseaddress, maddress address, char memType = MEMTYPE_DATA); -inline uint32_t UTIL_ReadMemory_UnsignedDword (maddress baseaddress, maddress address, char memType = MEMTYPE_DATA); -inline maddress UTIL_ReadMemory_Pointer (maddress baseaddress, maddress address, char memType = MEMTYPE_DATA); - -#endif \ No newline at end of file diff --git a/dlls/MemHack/MemReadNatives.cpp b/dlls/MemHack/MemReadNatives.cpp deleted file mode 100644 index 92fcdfe1..00000000 --- a/dlls/MemHack/MemReadNatives.cpp +++ /dev/null @@ -1,78 +0,0 @@ -#include "MemRead.h" - -#define NATIVE_HACK_BASEADDRESS PickBaseAddress(params[2]) -#define NATIVE_HACK_ADDRESS params[1] -#define NATIVE_HACK_FLAGS params[3] -#define NATIVE_HACK_SIGNED params[4] -#define NATIVE_HACK_MEMORY NATIVE_HACK_BASEADDRESS, NATIVE_HACK_ADDRESS, NATIVE_HACK_FLAGS - -static cell AMX_NATIVE_CALL memhack_get_char(AMX *amx, cell *params) -{ - if(NATIVE_HACK_SIGNED) - { - char HackedMemory = UTIL_ReadMemory_Byte(NATIVE_HACK_MEMORY); - return (cell)(HackedMemory); - } - else - { - unsigned char HackedMemory = UTIL_ReadMemory_UnsignedByte(NATIVE_HACK_MEMORY); - return (cell)(HackedMemory); - } -} - -static cell AMX_NATIVE_CALL memhack_get_short(AMX *amx, cell *params) -{ - if(NATIVE_HACK_SIGNED) - { - short HackedMemory = UTIL_ReadMemory_Word(NATIVE_HACK_MEMORY); - return (cell)(HackedMemory); - } - else - { - unsigned short HackedMemory = UTIL_ReadMemory_UnsignedWord(NATIVE_HACK_MEMORY); - return (cell)(HackedMemory); - } -} - -static cell AMX_NATIVE_CALL memhack_get_long(AMX *amx, cell *params) -{ - if(NATIVE_HACK_SIGNED) - { - long HackedMemory = UTIL_ReadMemory_Dword(NATIVE_HACK_MEMORY); - return (cell)(HackedMemory); - } - else - { - unsigned long HackedMemory = UTIL_ReadMemory_UnsignedDword(NATIVE_HACK_MEMORY); - return (cell)(HackedMemory); - } -} - -static cell AMX_NATIVE_CALL memhack_get_quad(AMX *amx, cell *params) -{ - long long HackedMemory = UTIL_ReadMemory_Qword(NATIVE_HACK_MEMORY); - return amx_ftoc(float(HackedMemory)); -} - -static cell AMX_NATIVE_CALL memhack_get_float(AMX *amx, cell *params) -{ - float HackedMemory = UTIL_ReadMemory_Float(NATIVE_HACK_MEMORY); - return amx_ftoc(HackedMemory); -} - -static cell AMX_NATIVE_CALL memhack_get_pointer(AMX *amx, cell *params) -{ - maddress HackedMemory = UTIL_ReadMemory_Pointer(NATIVE_HACK_MEMORY); - return (cell)(HackedMemory); -} - -AMX_NATIVE_INFO read_natives[] = { - { "memhack_get_char", memhack_get_char }, - { "memhack_get_short", memhack_get_short }, - { "memhack_get_long", memhack_get_long }, - - { "memhack_get_float", memhack_get_float }, - { "memhack_get_quad", memhack_get_quad }, - { "memhack_get_pointer", memhack_get_pointer }, - { NULL, NULL } -}; \ No newline at end of file diff --git a/dlls/MemHack/MemWrite.cpp b/dlls/MemHack/MemWrite.cpp deleted file mode 100644 index c7ad60d0..00000000 --- a/dlls/MemHack/MemWrite.cpp +++ /dev/null @@ -1,78 +0,0 @@ -#include "MemMisc.h" - -/* Functions that patch different data types in memory */ -template -int UTIL_PatchMemory(maddress baseaddress, maddress address, Type patch, char memType, size_t byteType, bool extraProtect) -{ - unsigned long oldProtect = 0; - maddress realAddress = GetRealMemoryAddress(baseaddress, address, memType); - - switch (memType) - { - case MEMTYPE_CODE: - if (MemoryProtect((void*)realAddress, byteType, MPROT_CODE_EDIT, &oldProtect, memType) == MP_FAIL) return MP_FAIL; - break; - - case MEMTYPE_RODATA: - if (MemoryProtect((void*)realAddress, byteType, MPROT_RODATA_EDIT, &oldProtect, memType) == MP_FAIL) return MP_FAIL; - break; - } - - *(Type*)realAddress = patch; - - if (memType == MEMTYPE_CODE) - { - MemoryProtect((void*)realAddress, byteType, oldProtect, &oldProtect); - } - else if(extraProtect == true) - { - if(memType == MEMTYPE_RODATA) MemoryProtect((void*)realAddress, byteType, oldProtect, &oldProtect); - } - - return MP_OK; -} - - int UTIL_PatchMemory_Byte(maddress baseaddress, maddress address, char patch, char memType) -{ - return UTIL_PatchMemory(baseaddress, address, (char)patch, memType, BYTE_BYTES, true); -} - - int UTIL_PatchMemory_Word(maddress baseaddress, maddress address, short patch, char memType) -{ - return UTIL_PatchMemory(baseaddress, address, (short)patch, memType, WORD_BYTES, true); -} - - int UTIL_PatchMemory_Dword(maddress baseaddress, maddress address, int32_t patch, char memType) -{ - return UTIL_PatchMemory(baseaddress, address, (int32_t)patch, memType, DWORD_BYTES, true); -} - - int UTIL_PatchMemory_Qword(maddress baseaddress, maddress address, long long patch, char memType) -{ - return UTIL_PatchMemory(baseaddress, address, (long long)patch, memType, QWORD_BYTES, false); -} - - int UTIL_PatchMemory_Float(maddress baseaddress, maddress address, float patch, char memType) -{ - return UTIL_PatchMemory(baseaddress, address, (float)patch, memType, FLOAT_BYTES, false); -} - - int UTIL_PatchMemory_UnsignedByte(maddress baseaddress, maddress address, unsigned char patch, char memType) -{ - return UTIL_PatchMemory(baseaddress, address, (unsigned char)patch, memType, BYTE_BYTES, false); -} - - int UTIL_PatchMemory_UnsignedWord(maddress baseaddress, maddress address, unsigned short patch, char memType) -{ - return UTIL_PatchMemory(baseaddress, address, (unsigned short)patch, memType, WORD_BYTES, false); -} - - int UTIL_PatchMemory_UnsignedDword(maddress baseaddress, maddress address, uint32_t patch, char memType) -{ - return UTIL_PatchMemory(baseaddress, address, (uint32_t)patch, memType, DWORD_BYTES, false); -} - - int UTIL_PatchMemory_Pointer(maddress baseaddress, maddress address, maddress patch, char memType) -{ - return UTIL_PatchMemory(baseaddress, address, (maddress)patch, memType, DWORD_BYTES, true); -} diff --git a/dlls/MemHack/MemWrite.h b/dlls/MemHack/MemWrite.h deleted file mode 100644 index 8b0c7159..00000000 --- a/dlls/MemHack/MemWrite.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef __MEMWRITE_H__ -#define __MEMWRITE_H__ - -#include "MemMisc.h" - -// Functions that patch different data types in memory - -// Base function -template -inline int UTIL_PatchMemory(maddress baseaddress, maddress address, Type patch, char memType, size_t byteType, bool extraProtect); - -// Inline stocks -extern inline int UTIL_PatchMemory_Byte (maddress baseaddress, maddress address, char patch, char memType = MEMTYPE_DATA); -extern inline int UTIL_PatchMemory_Word (maddress baseaddress, maddress address, short patch, char memType = MEMTYPE_DATA); -extern inline int UTIL_PatchMemory_Dword (maddress baseaddress, maddress address, int32_t patch, char memType = MEMTYPE_DATA); -extern inline int UTIL_PatchMemory_Qword (maddress baseaddress, maddress address, long long patch, char memType = MEMTYPE_DATA); -extern inline int UTIL_PatchMemory_Float (maddress baseaddress, maddress address, float patch, char memType = MEMTYPE_DATA); -extern inline int UTIL_PatchMemory_UnsignedByte (maddress baseaddress, maddress address, unsigned char patch, char memType = MEMTYPE_DATA); -extern inline int UTIL_PatchMemory_UnsignedWord (maddress baseaddress, maddress address, unsigned short patch, char memType = MEMTYPE_DATA); -extern inline int UTIL_PatchMemory_UnsignedDword (maddress baseaddress, maddress address, uint32_t patch, char memType = MEMTYPE_DATA); -extern inline int UTIL_PatchMemory_Pointer (maddress baseaddress, maddress address, maddress patch, char memType = MEMTYPE_DATA); - -#endif \ No newline at end of file diff --git a/dlls/MemHack/MemWriteNatives.cpp b/dlls/MemHack/MemWriteNatives.cpp deleted file mode 100644 index 431a513c..00000000 --- a/dlls/MemHack/MemWriteNatives.cpp +++ /dev/null @@ -1,72 +0,0 @@ -#include "MemWrite.h" - -#define NATIVE_PATCH_BASEADDRESS PickBaseAddress(params[2]) -#define NATIVE_PATCH_ADDRESS params[1] -#define NATIVE_PATCH_FLAGS params[4] -#define NATIVE_PATCH_SIGNED params[5] -#define NATIVE_PATCH_PARAMETER params[3] - -#define NATIVE_PATCH_MEMORY NATIVE_PATCH_BASEADDRESS, NATIVE_PATCH_ADDRESS - -static cell AMX_NATIVE_CALL memhack_set_char(AMX *amx, cell *params) -{ - if(NATIVE_PATCH_SIGNED) - { - return (cell)UTIL_PatchMemory_Byte(NATIVE_PATCH_MEMORY, (char)(NATIVE_PATCH_PARAMETER), NATIVE_PATCH_FLAGS); - } - else - { - return (cell)UTIL_PatchMemory_UnsignedByte(NATIVE_PATCH_MEMORY, (unsigned char)(NATIVE_PATCH_PARAMETER), NATIVE_PATCH_FLAGS); - } -} - -static cell AMX_NATIVE_CALL memhack_set_short(AMX *amx, cell *params) -{ - if(NATIVE_PATCH_SIGNED) - { - return (cell)UTIL_PatchMemory_Word(NATIVE_PATCH_MEMORY, (short)(NATIVE_PATCH_PARAMETER), NATIVE_PATCH_FLAGS); - } - else - { - return (cell)UTIL_PatchMemory_UnsignedWord(NATIVE_PATCH_MEMORY, (unsigned short)(NATIVE_PATCH_PARAMETER), NATIVE_PATCH_FLAGS); - } -} - -static cell AMX_NATIVE_CALL memhack_set_long(AMX *amx, cell *params) -{ - if(NATIVE_PATCH_SIGNED) - { - return (cell)UTIL_PatchMemory_Dword(NATIVE_PATCH_MEMORY, (long)(NATIVE_PATCH_PARAMETER), NATIVE_PATCH_FLAGS); - } - else - { - return (cell)UTIL_PatchMemory_Dword(NATIVE_PATCH_MEMORY, (unsigned long)(NATIVE_PATCH_PARAMETER), NATIVE_PATCH_FLAGS); - } -} - -static cell AMX_NATIVE_CALL memhack_set_quad(AMX *amx, cell *params) -{ - return (cell)UTIL_PatchMemory_Qword(NATIVE_PATCH_MEMORY, (long long)(NATIVE_PATCH_PARAMETER), NATIVE_PATCH_FLAGS); -} - -static cell AMX_NATIVE_CALL memhack_set_float(AMX *amx, cell *params) -{ - return (cell)UTIL_PatchMemory_Float(NATIVE_PATCH_MEMORY, amx_ctof(NATIVE_PATCH_PARAMETER), NATIVE_PATCH_FLAGS); -} - -static cell AMX_NATIVE_CALL memhack_set_pointer(AMX *amx, cell *params) -{ - return (cell)UTIL_PatchMemory_Pointer(NATIVE_PATCH_MEMORY, (maddress)(NATIVE_PATCH_PARAMETER), NATIVE_PATCH_FLAGS); -} - -AMX_NATIVE_INFO write_natives[] = { - { "memhack_set_char", memhack_set_char }, - { "memhack_set_short", memhack_set_short }, - { "memhack_set_long", memhack_set_long }, - - { "memhack_set_float", memhack_set_float }, - { "memhack_set_quad", memhack_set_quad }, - { "memhack_set_pointer", memhack_set_pointer }, - { NULL, NULL } -}; - diff --git a/dlls/MemHack/amxxmodule.cpp b/dlls/MemHack/amxxmodule.cpp deleted file mode 100644 index e374e441..00000000 --- a/dlls/MemHack/amxxmodule.cpp +++ /dev/null @@ -1,3078 +0,0 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* Parts Copyright (C) 2001-2003 Will Day -* -* This program is free software; you can redistribute it and/or modify it -* under the terms of the GNU General Public License as published by the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -* -* Description: AMX Mod X Module Interface Functions -*/ - -#include -#include -#include -#include -#include -#include "amxxmodule.h" - -/************* METAMOD SUPPORT *************/ -#ifdef USE_METAMOD - -enginefuncs_t g_engfuncs; -globalvars_t *gpGlobals; - -DLL_FUNCTIONS *g_pFunctionTable; -DLL_FUNCTIONS *g_pFunctionTable_Post; -enginefuncs_t *g_pengfuncsTable; -enginefuncs_t *g_pengfuncsTable_Post; -NEW_DLL_FUNCTIONS *g_pNewFunctionsTable; -NEW_DLL_FUNCTIONS *g_pNewFunctionsTable_Post; - -// GetEntityAPI2 functions -static DLL_FUNCTIONS g_EntityAPI_Table = -{ -#ifdef FN_GameDLLInit - FN_GameDLLInit, -#else - NULL, -#endif -#ifdef FN_DispatchSpawn - FN_DispatchSpawn, -#else - NULL, -#endif -#ifdef FN_DispatchThink - FN_DispatchThink, -#else - NULL, -#endif -#ifdef FN_DispatchUse - FN_DispatchUse, -#else - NULL, -#endif -#ifdef FN_DispatchTouch - FN_DispatchTouch, -#else - NULL, -#endif -#ifdef FN_DispatchBlocked - FN_DispatchBlocked, -#else - NULL, -#endif -#ifdef FN_DispatchKeyValue - FN_DispatchKeyValue, -#else - NULL, -#endif -#ifdef FN_DispatchSave - FN_DispatchSave, -#else - NULL, -#endif -#ifdef FN_DispatchRestore - FN_DispatchRestore, -#else - NULL, -#endif -#ifdef FN_DispatchObjectCollsionBox - FN_DispatchObjectCollsionBox, -#else - NULL, -#endif -#ifdef FN_SaveWriteFields - FN_SaveWriteFields, -#else - NULL, -#endif -#ifdef FN_SaveReadFields - FN_SaveReadFields, -#else - NULL, -#endif -#ifdef FN_SaveGlobalState - FN_SaveGlobalState, -#else - NULL, -#endif -#ifdef FN_RestoreGlobalState - FN_RestoreGlobalState, -#else - NULL, -#endif -#ifdef FN_ResetGlobalState - FN_ResetGlobalState, -#else - NULL, -#endif -#ifdef FN_ClientConnect - FN_ClientConnect, -#else - NULL, -#endif -#ifdef FN_ClientDisconnect - FN_ClientDisconnect, -#else - NULL, -#endif -#ifdef FN_ClientKill - FN_ClientKill, -#else - NULL, -#endif -#ifdef FN_ClientPutInServer - FN_ClientPutInServer, -#else - NULL, -#endif -#ifdef FN_ClientCommand - FN_ClientCommand, -#else - NULL, -#endif -#ifdef FN_ClientUserInfoChanged - FN_ClientUserInfoChanged, -#else - NULL, -#endif -#ifdef FN_ServerActivate - FN_ServerActivate, -#else - NULL, -#endif -#ifdef FN_ServerDeactivate - FN_ServerDeactivate, -#else - NULL, -#endif -#ifdef FN_PlayerPreThink - FN_PlayerPreThink, -#else - NULL, -#endif -#ifdef FN_PlayerPostThink - FN_PlayerPostThink, -#else - NULL, -#endif -#ifdef FN_StartFrame - FN_StartFrame, -#else - NULL, -#endif -#ifdef FN_ParmsNewLevel - FN_ParmsNewLevel, -#else - NULL, -#endif -#ifdef FN_ParmsChangeLevel - FN_ParmsChangeLevel, -#else - NULL, -#endif -#ifdef FN_GetGameDescription - FN_GetGameDescription, -#else - NULL, -#endif -#ifdef FN_PlayerCustomization - FN_PlayerCustomization, -#else - NULL, -#endif -#ifdef FN_SpectatorConnect - FN_SpectatorConnect, -#else - NULL, -#endif -#ifdef FN_SpectatorDisconnect - FN_SpectatorDisconnect, -#else - NULL, -#endif -#ifdef FN_SpectatorThink - FN_SpectatorThink, -#else - NULL, -#endif -#ifdef FN_Sys_Error - FN_Sys_Error, -#else - NULL, -#endif -#ifdef FN_PM_Move - FN_PM_Move, -#else - NULL, -#endif -#ifdef FN_PM_Init - FN_PM_Init, -#else - NULL, -#endif -#ifdef FN_PM_FindTextureType - FN_PM_FindTextureType, -#else - NULL, -#endif -#ifdef FN_SetupVisibility - FN_SetupVisibility, -#else - NULL, -#endif -#ifdef FN_UpdateClientData - FN_UpdateClientData, -#else - NULL, -#endif -#ifdef FN_AddToFullPack - FN_AddToFullPack, -#else - NULL, -#endif -#ifdef FN_CreateBaseline - FN_CreateBaseline, -#else - NULL, -#endif -#ifdef FN_RegisterEncoders - FN_RegisterEncoders, -#else - NULL, -#endif -#ifdef FN_GetWeaponData - FN_GetWeaponData, -#else - NULL, -#endif -#ifdef FN_CmdStart - FN_CmdStart, -#else - NULL, -#endif -#ifdef FN_CmdEnd - FN_CmdEnd, -#else - NULL, -#endif -#ifdef FN_ConnectionlessPacket - FN_ConnectionlessPacket, -#else - NULL, -#endif -#ifdef FN_GetHullBounds - FN_GetHullBounds, -#else - NULL, -#endif -#ifdef FN_CreateInstancedBaselines - FN_CreateInstancedBaselines, -#else - NULL, -#endif -#ifdef FN_InconsistentFile - FN_InconsistentFile, -#else - NULL, -#endif -#ifdef FN_AllowLagCompensation - FN_AllowLagCompensation -#else - NULL -#endif -}; // g_EntityAPI2_Table - -// GetEntityAPI2_Post functions -static DLL_FUNCTIONS g_EntityAPI_Post_Table = -{ -#ifdef FN_GameDLLInit_Post - FN_GameDLLInit_Post, -#else - NULL, -#endif -#ifdef FN_DispatchSpawn_Post - FN_DispatchSpawn_Post, -#else - NULL, -#endif -#ifdef FN_DispatchThink_Post - FN_DispatchThink_Post, -#else - NULL, -#endif -#ifdef FN_DispatchUse_Post - FN_DispatchUse_Post, -#else - NULL, -#endif -#ifdef FN_DispatchTouch_Post - FN_DispatchTouch_Post, -#else - NULL, -#endif -#ifdef FN_DispatchBlocked_Post - FN_DispatchBlocked_Post, -#else - NULL, -#endif -#ifdef FN_DispatchKeyValue_Post - FN_DispatchKeyValue_Post, -#else - NULL, -#endif -#ifdef FN_DispatchSave_Post - FN_DispatchSave_Post, -#else - NULL, -#endif -#ifdef FN_DispatchRestore_Post - FN_DispatchRestore_Post, -#else - NULL, -#endif -#ifdef FN_DispatchObjectCollsionBox_Post - FN_DispatchObjectCollsionBox_Post, -#else - NULL, -#endif -#ifdef FN_SaveWriteFields_Post - FN_SaveWriteFields_Post, -#else - NULL, -#endif -#ifdef FN_SaveReadFields_Post - FN_SaveReadFields_Post, -#else - NULL, -#endif -#ifdef FN_SaveGlobalState_Post - FN_SaveGlobalState_Post, -#else - NULL, -#endif -#ifdef FN_RestoreGlobalState_Post - FN_RestoreGlobalState_Post, -#else - NULL, -#endif -#ifdef FN_ResetGlobalState_Post - FN_ResetGlobalState_Post, -#else - NULL, -#endif -#ifdef FN_ClientConnect_Post - FN_ClientConnect_Post, -#else - NULL, -#endif -#ifdef FN_ClientDisconnect_Post - FN_ClientDisconnect_Post, -#else - NULL, -#endif -#ifdef FN_ClientKill_Post - FN_ClientKill_Post, -#else - NULL, -#endif -#ifdef FN_ClientPutInServer_Post - FN_ClientPutInServer_Post, -#else - NULL, -#endif -#ifdef FN_ClientCommand_Post - FN_ClientCommand_Post, -#else - NULL, -#endif -#ifdef FN_ClientUserInfoChanged_Post - FN_ClientUserInfoChanged_Post, -#else - NULL, -#endif -#ifdef FN_ServerActivate_Post - FN_ServerActivate_Post, -#else - NULL, -#endif -#ifdef FN_ServerDeactivate_Post - FN_ServerDeactivate_Post, -#else - NULL, -#endif -#ifdef FN_PlayerPreThink_Post - FN_PlayerPreThink_Post, -#else - NULL, -#endif -#ifdef FN_PlayerPostThink_Post - FN_PlayerPostThink_Post, -#else - NULL, -#endif -#ifdef FN_StartFrame_Post - FN_StartFrame_Post, -#else - NULL, -#endif -#ifdef FN_ParmsNewLevel_Post - FN_ParmsNewLevel_Post, -#else - NULL, -#endif -#ifdef FN_ParmsChangeLevel_Post - FN_ParmsChangeLevel_Post, -#else - NULL, -#endif -#ifdef FN_GetGameDescription_Post - FN_GetGameDescription_Post, -#else - NULL, -#endif -#ifdef FN_PlayerCustomization_Post - FN_PlayerCustomization_Post, -#else - NULL, -#endif -#ifdef FN_SpectatorConnect_Post - FN_SpectatorConnect_Post, -#else - NULL, -#endif -#ifdef FN_SpectatorDisconnect_Post - FN_SpectatorDisconnect_Post, -#else - NULL, -#endif -#ifdef FN_SpectatorThink_Post - FN_SpectatorThink_Post, -#else - NULL, -#endif -#ifdef FN_Sys_Error_Post - FN_Sys_Error_Post, -#else - NULL, -#endif -#ifdef FN_PM_Move_Post - FN_PM_Move_Post, -#else - NULL, -#endif -#ifdef FN_PM_Init_Post - FN_PM_Init_Post, -#else - NULL, -#endif -#ifdef FN_PM_FindTextureType_Post - FN_PM_FindTextureType_Post, -#else - NULL, -#endif -#ifdef FN_SetupVisibility_Post - FN_SetupVisibility_Post, -#else - NULL, -#endif -#ifdef FN_UpdateClientData_Post - FN_UpdateClientData_Post, -#else - NULL, -#endif -#ifdef FN_AddToFullPack_Post - FN_AddToFullPack_Post, -#else - NULL, -#endif -#ifdef FN_CreateBaseline_Post - FN_CreateBaseline_Post, -#else - NULL, -#endif -#ifdef FN_RegisterEncoders_Post - FN_RegisterEncoders_Post, -#else - NULL, -#endif -#ifdef FN_GetWeaponData_Post - FN_GetWeaponData_Post, -#else - NULL, -#endif -#ifdef FN_CmdStart_Post - FN_CmdStart_Post, -#else - NULL, -#endif -#ifdef FN_CmdEnd_Post - FN_CmdEnd_Post, -#else - NULL, -#endif -#ifdef FN_ConnectionlessPacket_Post - FN_ConnectionlessPacket_Post, -#else - NULL, -#endif -#ifdef FN_GetHullBounds_Post - FN_GetHullBounds_Post, -#else - NULL, -#endif -#ifdef FN_CreateInstancedBaselines_Post - FN_CreateInstancedBaselines_Post, -#else - NULL, -#endif -#ifdef FN_InconsistentFile_Post - FN_InconsistentFile_Post, -#else - NULL, -#endif -#ifdef FN_AllowLagCompensation - FN_AllowLagCompensation, -#else - NULL, -#endif -}; // g_EntityAPI2_Table - -static enginefuncs_t g_EngineFuncs_Table = -{ -#ifdef FN_PrecacheModel - FN_PrecacheModel, -#else - NULL, -#endif -#ifdef FN_PrecacheSound - FN_PrecacheSound, -#else - NULL, -#endif -#ifdef FN_SetModel - FN_SetModel, -#else - NULL, -#endif -#ifdef FN_ModelIndex - FN_ModelIndex, -#else - NULL, -#endif -#ifdef FN_ModelFrames - FN_ModelFrames, -#else - NULL, -#endif -#ifdef FN_SetSize - FN_SetSize, -#else - NULL, -#endif -#ifdef FN_ChangeLevel - FN_ChangeLevel, -#else - NULL, -#endif -#ifdef FN_GetSpawnParms - FN_GetSpawnParms, -#else - NULL, -#endif -#ifdef FN_SaveSpawnParms - FN_SaveSpawnParms, -#else - NULL, -#endif -#ifdef FN_VecToYaw - FN_VecToYaw, -#else - NULL, -#endif -#ifdef FN_VecToAngles - FN_VecToAngles, -#else - NULL, -#endif -#ifdef FN_MoveToOrigin - FN_MoveToOrigin, -#else - NULL, -#endif -#ifdef FN_ChangeYaw - FN_ChangeYaw, -#else - NULL, -#endif -#ifdef FN_ChangePitch - FN_ChangePitch, -#else - NULL, -#endif -#ifdef FN_FindEntityByString - FN_FindEntityByString, -#else - NULL, -#endif -#ifdef FN_GetEntityIllum - FN_GetEntityIllum, -#else - NULL, -#endif -#ifdef FN_FindEntityInSphere - FN_FindEntityInSphere, -#else - NULL, -#endif -#ifdef FN_FindClientInPVS - FN_FindClientInPVS, -#else - NULL, -#endif -#ifdef FN_EntitiesInPVS - FN_EntitiesInPVS, -#else - NULL, -#endif -#ifdef FN_MakeVectors - FN_MakeVectors, -#else - NULL, -#endif -#ifdef FN_AngleVectors - FN_AngleVectors, -#else - NULL, -#endif -#ifdef FN_CreateEntity - FN_CreateEntity, -#else - NULL, -#endif -#ifdef FN_RemoveEntity - FN_RemoveEntity, -#else - NULL, -#endif -#ifdef FN_CreateNamedEntity - FN_CreateNamedEntity, -#else - NULL, -#endif -#ifdef FN_MakeStatic - FN_MakeStatic, -#else - NULL, -#endif -#ifdef FN_EntIsOnFloor - FN_EntIsOnFloor, -#else - NULL, -#endif -#ifdef FN_DropToFloor - FN_DropToFloor, -#else - NULL, -#endif -#ifdef FN_WalkMove - FN_WalkMove, -#else - NULL, -#endif -#ifdef FN_SetOrigin - FN_SetOrigin, -#else - NULL, -#endif -#ifdef FN_EmitSound - FN_EmitSound, -#else - NULL, -#endif -#ifdef FN_EmitAmbientSound - FN_EmitAmbientSound, -#else - NULL, -#endif -#ifdef FN_TraceLine - FN_TraceLine, -#else - NULL, -#endif -#ifdef FN_TraceToss - FN_TraceToss, -#else - NULL, -#endif -#ifdef FN_TraceMonsterHull - FN_TraceMonsterHull, -#else - NULL, -#endif -#ifdef FN_TraceHull - FN_TraceHull, -#else - NULL, -#endif -#ifdef FN_TraceModel - FN_TraceModel, -#else - NULL, -#endif -#ifdef FN_TraceTexture - FN_TraceTexture, -#else - NULL, -#endif -#ifdef FN_TraceSphere - FN_TraceSphere, -#else - NULL, -#endif -#ifdef FN_GetAimVector - FN_GetAimVector, -#else - NULL, -#endif -#ifdef FN_ServerCommand - FN_ServerCommand, -#else - NULL, -#endif -#ifdef FN_ServerExecute - FN_ServerExecute, -#else - NULL, -#endif -#ifdef FN_engClientCommand - FN_engClientCommand, -#else - NULL, -#endif -#ifdef FN_ParticleEffect - FN_ParticleEffect, -#else - NULL, -#endif -#ifdef FN_LightStyle - FN_LightStyle, -#else - NULL, -#endif -#ifdef FN_DecalIndex - FN_DecalIndex, -#else - NULL, -#endif -#ifdef FN_PointContents - FN_PointContents, -#else - NULL, -#endif -#ifdef FN_MessageBegin - FN_MessageBegin, -#else - NULL, -#endif -#ifdef FN_MessageEnd - FN_MessageEnd, -#else - NULL, -#endif -#ifdef FN_WriteByte - FN_WriteByte, -#else - NULL, -#endif -#ifdef FN_WriteChar - FN_WriteChar, -#else - NULL, -#endif -#ifdef FN_WriteShort - FN_WriteShort, -#else - NULL, -#endif -#ifdef FN_WriteLong - FN_WriteLong, -#else - NULL, -#endif -#ifdef FN_WriteAngle - FN_WriteAngle, -#else - NULL, -#endif -#ifdef FN_WriteCoord - FN_WriteCoord, -#else - NULL, -#endif -#ifdef FN_WriteString - FN_WriteString, -#else - NULL, -#endif -#ifdef FN_WriteEntity - FN_WriteEntity, -#else - NULL, -#endif -#ifdef FN_CVarRegister - FN_CVarRegister, -#else - NULL, -#endif -#ifdef FN_CVarGetFloat - FN_CVarGetFloat, -#else - NULL, -#endif -#ifdef FN_CVarGetString - FN_CVarGetString, -#else - NULL, -#endif -#ifdef FN_CVarSetFloat - FN_CVarSetFloat, -#else - NULL, -#endif -#ifdef FN_CVarSetString - FN_CVarSetString, -#else - NULL, -#endif -#ifdef FN_AlertMessage - FN_AlertMessage, -#else - NULL, -#endif -#ifdef FN_EngineFprintf - FN_EngineFprintf, -#else - NULL, -#endif -#ifdef FN_PvAllocEntPrivateData - FN_PvAllocEntPrivateData, -#else - NULL, -#endif -#ifdef FN_PvEntPrivateData - FN_PvEntPrivateData, -#else - NULL, -#endif -#ifdef FN_FreeEntPrivateData - FN_FreeEntPrivateData, -#else - NULL, -#endif -#ifdef FN_SzFromIndex - FN_SzFromIndex, -#else - NULL, -#endif -#ifdef FN_AllocString - FN_AllocString, -#else - NULL, -#endif -#ifdef FN_GetVarsOfEnt - FN_GetVarsOfEnt, -#else - NULL, -#endif -#ifdef FN_PEntityOfEntOffset - FN_PEntityOfEntOffset, -#else - NULL, -#endif -#ifdef FN_EntOffsetOfPEntity - FN_EntOffsetOfPEntity, -#else - NULL, -#endif -#ifdef FN_IndexOfEdict - FN_IndexOfEdict, -#else - NULL, -#endif -#ifdef FN_PEntityOfEntIndex - FN_PEntityOfEntIndex, -#else - NULL, -#endif -#ifdef FN_FindEntityByVars - FN_FindEntityByVars, -#else - NULL, -#endif -#ifdef FN_GetModelPtr - FN_GetModelPtr, -#else - NULL, -#endif -#ifdef FN_RegUserMsg - FN_RegUserMsg, -#else - NULL, -#endif -#ifdef FN_AnimationAutomove - FN_AnimationAutomove, -#else - NULL, -#endif -#ifdef FN_GetBonePosition - FN_GetBonePosition, -#else - NULL, -#endif -#ifdef FN_FunctionFromName - FN_FunctionFromName, -#else - NULL, -#endif -#ifdef FN_NameForFunction - FN_NameForFunction, -#else - NULL, -#endif -#ifdef FN_ClientPrintf - FN_ClientPrintf, -#else - NULL, -#endif -#ifdef FN_ServerPrint - FN_ServerPrint, -#else - NULL, -#endif -#ifdef FN_Cmd_Args - FN_Cmd_Args, -#else - NULL, -#endif -#ifdef FN_Cmd_Argv - FN_Cmd_Argv, -#else - NULL, -#endif -#ifdef FN_Cmd_Argc - FN_Cmd_Argc, -#else - NULL, -#endif -#ifdef FN_GetAttachment - FN_GetAttachment, -#else - NULL, -#endif -#ifdef FN_CRC32_Init - FN_CRC32_Init, -#else - NULL, -#endif -#ifdef FN_CRC32_ProcessBuffer - FN_CRC32_ProcessBuffer, -#else - NULL, -#endif -#ifdef FN_CRC32_ProcessByte - FN_CRC32_ProcessByte, -#else - NULL, -#endif -#ifdef FN_CRC32_Final - FN_CRC32_Final, -#else - NULL, -#endif -#ifdef FN_RandomLong - FN_RandomLong, -#else - NULL, -#endif -#ifdef FN_RandomFloat - FN_RandomFloat, -#else - NULL, -#endif -#ifdef FN_SetView - FN_SetView, -#else - NULL, -#endif -#ifdef FN_Time - FN_Time, -#else - NULL, -#endif -#ifdef FN_CrosshairAngle - FN_CrosshairAngle, -#else - NULL, -#endif -#ifdef FN_LoadFileForMe - FN_LoadFileForMe, -#else - NULL, -#endif -#ifdef FN_FreeFile - FN_FreeFile, -#else - NULL, -#endif -#ifdef FN_EndSection - FN_EndSection, -#else - NULL, -#endif -#ifdef FN_CompareFileTime - FN_CompareFileTime, -#else - NULL, -#endif -#ifdef FN_GetGameDir - FN_GetGameDir, -#else - NULL, -#endif -#ifdef FN_Cvar_RegisterVariable - FN_Cvar_RegisterVariable, -#else - NULL, -#endif -#ifdef FN_FadeClientVolume - FN_FadeClientVolume, -#else - NULL, -#endif -#ifdef FN_SetClientMaxspeed - FN_SetClientMaxspeed, -#else - NULL, -#endif -#ifdef FN_CreateFakeClient - FN_CreateFakeClient, -#else - NULL, -#endif -#ifdef FN_RunPlayerMove - FN_RunPlayerMove, -#else - NULL, -#endif -#ifdef FN_NumberOfEntities - FN_NumberOfEntities, -#else - NULL, -#endif -#ifdef FN_GetInfoKeyBuffer - FN_GetInfoKeyBuffer, -#else - NULL, -#endif -#ifdef FN_InfoKeyValue - FN_InfoKeyValue, -#else - NULL, -#endif -#ifdef FN_SetKeyValue - FN_SetKeyValue, -#else - NULL, -#endif -#ifdef FN_SetClientKeyValue - FN_SetClientKeyValue, -#else - NULL, -#endif -#ifdef FN_IsMapValid - FN_IsMapValid, -#else - NULL, -#endif -#ifdef FN_StaticDecal - FN_StaticDecal, -#else - NULL, -#endif -#ifdef FN_PrecacheGeneric - FN_PrecacheGeneric, -#else - NULL, -#endif -#ifdef FN_GetPlayerUserId - FN_GetPlayerUserId, -#else - NULL, -#endif -#ifdef FN_BuildSoundMsg - FN_BuildSoundMsg, -#else - NULL, -#endif -#ifdef FN_IsDedicatedServer - FN_IsDedicatedServer, -#else - NULL, -#endif -#ifdef FN_CVarGetPointer - FN_CVarGetPointer, -#else - NULL, -#endif -#ifdef FN_GetPlayerWONId - FN_GetPlayerWONId, -#else - NULL, -#endif -#ifdef FN_Info_RemoveKey - FN_Info_RemoveKey, -#else - NULL, -#endif -#ifdef FN_GetPhysicsKeyValue - FN_GetPhysicsKeyValue, -#else - NULL, -#endif -#ifdef FN_SetPhysicsKeyValue - FN_SetPhysicsKeyValue, -#else - NULL, -#endif -#ifdef FN_GetPhysicsInfoString - FN_GetPhysicsInfoString, -#else - NULL, -#endif -#ifdef FN_PrecacheEvent - FN_PrecacheEvent, -#else - NULL, -#endif -#ifdef FN_PlaybackEvent - FN_PlaybackEvent, -#else - NULL, -#endif -#ifdef FN_SetFatPVS - FN_SetFatPVS, -#else - NULL, -#endif -#ifdef FN_SetFatPAS - FN_SetFatPAS, -#else - NULL, -#endif -#ifdef FN_CheckVisibility - FN_CheckVisibility, -#else - NULL, -#endif -#ifdef FN_DeltaSetField - FN_DeltaSetField, -#else - NULL, -#endif -#ifdef FN_DeltaUnsetField - FN_DeltaUnsetField, -#else - NULL, -#endif -#ifdef FN_DeltaAddEncoder - FN_DeltaAddEncoder, -#else - NULL, -#endif -#ifdef FN_GetCurrentPlayer - FN_GetCurrentPlayer, -#else - NULL, -#endif -#ifdef FN_CanSkipPlayer - FN_CanSkipPlayer, -#else - NULL, -#endif -#ifdef FN_DeltaFindField - FN_DeltaFindField, -#else - NULL, -#endif -#ifdef FN_DeltaSetFieldByIndex - FN_DeltaSetFieldByIndex, -#else - NULL, -#endif -#ifdef FN_DeltaUnsetFieldByIndex - FN_DeltaUnsetFieldByIndex, -#else - NULL, -#endif -#ifdef FN_SetGroupMask - FN_SetGroupMask, -#else - NULL, -#endif -#ifdef FN_engCreateInstancedBaseline - FN_engCreateInstancedBaseline, -#else - NULL, -#endif -#ifdef FN_Cvar_DirectSet - FN_Cvar_DirectSet, -#else - NULL, -#endif -#ifdef FN_ForceUnmodified - FN_ForceUnmodified, -#else - NULL, -#endif -#ifdef FN_GetPlayerStats - FN_GetPlayerStats, -#else - NULL, -#endif -#ifdef FN_AddServerCommand - FN_AddServerCommand, -#else - NULL, -#endif -#ifdef FN_Voice_GetClientListening - FN_Voice_GetClientListening, -#else - NULL, -#endif -#ifdef FN_Voice_SetClientListening - FN_Voice_SetClientListening, -#else - NULL, -#endif -#ifdef FN_GetPlayerAuthId - FN_GetPlayerAuthId -#else - NULL -#endif -}; // g_EngineFuncs_Table - - -static enginefuncs_t g_EngineFuncs_Post_Table = -{ -#ifdef FN_PrecacheModel_Post - FN_PrecacheModel_Post, -#else - NULL, -#endif -#ifdef FN_PrecacheSound_Post - FN_PrecacheSound_Post, -#else - NULL, -#endif -#ifdef FN_SetModel_Post - FN_SetModel_Post, -#else - NULL, -#endif -#ifdef FN_ModelIndex_Post - FN_ModelIndex_Post, -#else - NULL, -#endif -#ifdef FN_ModelFrames_Post - FN_ModelFrames_Post, -#else - NULL, -#endif -#ifdef FN_SetSize_Post - FN_SetSize_Post, -#else - NULL, -#endif -#ifdef FN_ChangeLevel_Post - FN_ChangeLevel_Post, -#else - NULL, -#endif -#ifdef FN_GetSpawnParms_Post - FN_GetSpawnParms_Post, -#else - NULL, -#endif -#ifdef FN_SaveSpawnParms_Post - FN_SaveSpawnParms_Post, -#else - NULL, -#endif -#ifdef FN_VecToYaw_Post - FN_VecToYaw_Post, -#else - NULL, -#endif -#ifdef FN_VecToAngles_Post - FN_VecToAngles_Post, -#else - NULL, -#endif -#ifdef FN_MoveToOrigin_Post - FN_MoveToOrigin_Post, -#else - NULL, -#endif -#ifdef FN_ChangeYaw_Post - FN_ChangeYaw_Post, -#else - NULL, -#endif -#ifdef FN_ChangePitch_Post - FN_ChangePitch_Post, -#else - NULL, -#endif -#ifdef FN_FindEntityByString_Post - FN_FindEntityByString_Post, -#else - NULL, -#endif -#ifdef FN_GetEntityIllum_Post - FN_GetEntityIllum_Post, -#else - NULL, -#endif -#ifdef FN_FindEntityInSphere_Post - FN_FindEntityInSphere_Post, -#else - NULL, -#endif -#ifdef FN_FindClientInPVS_Post - FN_FindClientInPVS_Post, -#else - NULL, -#endif -#ifdef FN_EntitiesInPVS_Post - FN_EntitiesInPVS_Post, -#else - NULL, -#endif -#ifdef FN_MakeVectors_Post - FN_MakeVectors_Post, -#else - NULL, -#endif -#ifdef FN_AngleVectors_Post - FN_AngleVectors_Post, -#else - NULL, -#endif -#ifdef FN_CreateEntity_Post - FN_CreateEntity_Post, -#else - NULL, -#endif -#ifdef FN_RemoveEntity_Post - FN_RemoveEntity_Post, -#else - NULL, -#endif -#ifdef FN_CreateNamedEntity_Post - FN_CreateNamedEntity_Post, -#else - NULL, -#endif -#ifdef FN_MakeStatic_Post - FN_MakeStatic_Post, -#else - NULL, -#endif -#ifdef FN_EntIsOnFloor_Post - FN_EntIsOnFloor_Post, -#else - NULL, -#endif -#ifdef FN_DropToFloor_Post - FN_DropToFloor_Post, -#else - NULL, -#endif -#ifdef FN_WalkMove_Post - FN_WalkMove_Post, -#else - NULL, -#endif -#ifdef FN_SetOrigin_Post - FN_SetOrigin_Post, -#else - NULL, -#endif -#ifdef FN_EmitSound_Post - FN_EmitSound_Post, -#else - NULL, -#endif -#ifdef FN_EmitAmbientSound_Post - FN_EmitAmbientSound_Post, -#else - NULL, -#endif -#ifdef FN_TraceLine_Post - FN_TraceLine_Post, -#else - NULL, -#endif -#ifdef FN_TraceToss_Post - FN_TraceToss_Post, -#else - NULL, -#endif -#ifdef FN_TraceMonsterHull_Post - FN_TraceMonsterHull_Post, -#else - NULL, -#endif -#ifdef FN_TraceHull_Post - FN_TraceHull_Post, -#else - NULL, -#endif -#ifdef FN_TraceModel_Post - FN_TraceModel_Post, -#else - NULL, -#endif -#ifdef FN_TraceTexture_Post - FN_TraceTexture_Post, -#else - NULL, -#endif -#ifdef FN_TraceSphere_Post - FN_TraceSphere_Post, -#else - NULL, -#endif -#ifdef FN_GetAimVector_Post - FN_GetAimVector_Post, -#else - NULL, -#endif -#ifdef FN_ServerCommand_Post - FN_ServerCommand_Post, -#else - NULL, -#endif -#ifdef FN_ServerExecute_Post - FN_ServerExecute_Post, -#else - NULL, -#endif -#ifdef FN_engClientCommand_Post - FN_engClientCommand_Post, -#else - NULL, -#endif -#ifdef FN_ParticleEffect_Post - FN_ParticleEffect_Post, -#else - NULL, -#endif -#ifdef FN_LightStyle_Post - FN_LightStyle_Post, -#else - NULL, -#endif -#ifdef FN_DecalIndex_Post - FN_DecalIndex_Post, -#else - NULL, -#endif -#ifdef FN_PointContents_Post - FN_PointContents_Post, -#else - NULL, -#endif -#ifdef FN_MessageBegin_Post - FN_MessageBegin_Post, -#else - NULL, -#endif -#ifdef FN_MessageEnd_Post - FN_MessageEnd_Post, -#else - NULL, -#endif -#ifdef FN_WriteByte_Post - FN_WriteByte_Post, -#else - NULL, -#endif -#ifdef FN_WriteChar_Post - FN_WriteChar_Post, -#else - NULL, -#endif -#ifdef FN_WriteShort_Post - FN_WriteShort_Post, -#else - NULL, -#endif -#ifdef FN_WriteLong_Post - FN_WriteLong_Post, -#else - NULL, -#endif -#ifdef FN_WriteAngle_Post - FN_WriteAngle_Post, -#else - NULL, -#endif -#ifdef FN_WriteCoord_Post - FN_WriteCoord_Post, -#else - NULL, -#endif -#ifdef FN_WriteString_Post - FN_WriteString_Post, -#else - NULL, -#endif -#ifdef FN_WriteEntity_Post - FN_WriteEntity_Post, -#else - NULL, -#endif -#ifdef FN_CVarRegister_Post - FN_CVarRegister_Post, -#else - NULL, -#endif -#ifdef FN_CVarGetFloat_Post - FN_CVarGetFloat_Post, -#else - NULL, -#endif -#ifdef FN_CVarGetString_Post - FN_CVarGetString_Post, -#else - NULL, -#endif -#ifdef FN_CVarSetFloat_Post - FN_CVarSetFloat_Post, -#else - NULL, -#endif -#ifdef FN_CVarSetString_Post - FN_CVarSetString_Post, -#else - NULL, -#endif -#ifdef FN_AlertMessage_Post - FN_AlertMessage_Post, -#else - NULL, -#endif -#ifdef FN_EngineFprintf_Post - FN_EngineFprintf_Post, -#else - NULL, -#endif -#ifdef FN_PvAllocEntPrivateData_Post - FN_PvAllocEntPrivateData_Post, -#else - NULL, -#endif -#ifdef FN_PvEntPrivateData_Post - FN_PvEntPrivateData_Post, -#else - NULL, -#endif -#ifdef FN_FreeEntPrivateData_Post - FN_FreeEntPrivateData_Post, -#else - NULL, -#endif -#ifdef FN_SzFromIndex_Post - FN_SzFromIndex_Post, -#else - NULL, -#endif -#ifdef FN_AllocString_Post - FN_AllocString_Post, -#else - NULL, -#endif -#ifdef FN_GetVarsOfEnt_Post - FN_GetVarsOfEnt_Post, -#else - NULL, -#endif -#ifdef FN_PEntityOfEntOffset_Post - FN_PEntityOfEntOffset_Post, -#else - NULL, -#endif -#ifdef FN_EntOffsetOfPEntity_Post - FN_EntOffsetOfPEntity_Post, -#else - NULL, -#endif -#ifdef FN_IndexOfEdict_Post - FN_IndexOfEdict_Post, -#else - NULL, -#endif -#ifdef FN_PEntityOfEntIndex_Post - FN_PEntityOfEntIndex_Post, -#else - NULL, -#endif -#ifdef FN_FindEntityByVars_Post - FN_FindEntityByVars_Post, -#else - NULL, -#endif -#ifdef FN_GetModelPtr_Post - FN_GetModelPtr_Post, -#else - NULL, -#endif -#ifdef FN_RegUserMsg_Post - FN_RegUserMsg_Post, -#else - NULL, -#endif -#ifdef FN_AnimationAutomove_Post - FN_AnimationAutomove_Post, -#else - NULL, -#endif -#ifdef FN_GetBonePosition_Post - FN_GetBonePosition_Post, -#else - NULL, -#endif -#ifdef FN_FunctionFromName_Post - FN_FunctionFromName_Post, -#else - NULL, -#endif -#ifdef FN_NameForFunction_Post - FN_NameForFunction_Post, -#else - NULL, -#endif -#ifdef FN_ClientPrintf_Post - FN_ClientPrintf_Post, -#else - NULL, -#endif -#ifdef FN_ServerPrint_Post - FN_ServerPrint_Post, -#else - NULL, -#endif -#ifdef FN_Cmd_Args_Post - FN_Cmd_Args_Post, -#else - NULL, -#endif -#ifdef FN_Cmd_Argv_Post - FN_Cmd_Argv_Post, -#else - NULL, -#endif -#ifdef FN_Cmd_Argc_Post - FN_Cmd_Argc_Post, -#else - NULL, -#endif -#ifdef FN_GetAttachment_Post - FN_GetAttachment_Post, -#else - NULL, -#endif -#ifdef FN_CRC32_Init_Post - FN_CRC32_Init_Post, -#else - NULL, -#endif -#ifdef FN_CRC32_ProcessBuffer_Post - FN_CRC32_ProcessBuffer_Post, -#else - NULL, -#endif -#ifdef FN_CRC32_ProcessByte_Post - FN_CRC32_ProcessByte_Post, -#else - NULL, -#endif -#ifdef FN_CRC32_Final_Post - FN_CRC32_Final_Post, -#else - NULL, -#endif -#ifdef FN_RandomLong_Post - FN_RandomLong_Post, -#else - NULL, -#endif -#ifdef FN_RandomFloat_Post - FN_RandomFloat_Post, -#else - NULL, -#endif -#ifdef FN_SetView_Post - FN_SetView_Post, -#else - NULL, -#endif -#ifdef FN_Time_Post - FN_Time_Post, -#else - NULL, -#endif -#ifdef FN_CrosshairAngle_Post - FN_CrosshairAngle_Post, -#else - NULL, -#endif -#ifdef FN_LoadFileForMe_Post - FN_LoadFileForMe_Post, -#else - NULL, -#endif -#ifdef FN_FreeFile_Post - FN_FreeFile_Post, -#else - NULL, -#endif -#ifdef FN_EndSection_Post - FN_EndSection_Post, -#else - NULL, -#endif -#ifdef FN_CompareFileTime_Post - FN_CompareFileTime_Post, -#else - NULL, -#endif -#ifdef FN_GetGameDir_Post - FN_GetGameDir_Post, -#else - NULL, -#endif -#ifdef FN_Cvar_RegisterVariable_Post - FN_Cvar_RegisterVariable_Post, -#else - NULL, -#endif -#ifdef FN_FadeClientVolume_Post - FN_FadeClientVolume_Post, -#else - NULL, -#endif -#ifdef FN_SetClientMaxspeed_Post - FN_SetClientMaxspeed_Post, -#else - NULL, -#endif -#ifdef FN_CreateFakeClient_Post - FN_CreateFakeClient_Post, -#else - NULL, -#endif -#ifdef FN_RunPlayerMove_Post - FN_RunPlayerMove_Post, -#else - NULL, -#endif -#ifdef FN_NumberOfEntities_Post - FN_NumberOfEntities_Post, -#else - NULL, -#endif -#ifdef FN_GetInfoKeyBuffer_Post - FN_GetInfoKeyBuffer_Post, -#else - NULL, -#endif -#ifdef FN_InfoKeyValue_Post - FN_InfoKeyValue_Post, -#else - NULL, -#endif -#ifdef FN_SetKeyValue_Post - FN_SetKeyValue_Post, -#else - NULL, -#endif -#ifdef FN_SetClientKeyValue_Post - FN_SetClientKeyValue_Post, -#else - NULL, -#endif -#ifdef FN_IsMapValid_Post - FN_IsMapValid_Post, -#else - NULL, -#endif -#ifdef FN_StaticDecal_Post - FN_StaticDecal_Post, -#else - NULL, -#endif -#ifdef FN_PrecacheGeneric_Post - FN_PrecacheGeneric_Post, -#else - NULL, -#endif -#ifdef FN_GetPlayerUserId_Post - FN_GetPlayerUserId_Post, -#else - NULL, -#endif -#ifdef FN_BuildSoundMsg_Post - FN_BuildSoundMsg_Post, -#else - NULL, -#endif -#ifdef FN_IsDedicatedServer_Post - FN_IsDedicatedServer_Post, -#else - NULL, -#endif -#ifdef FN_CVarGetPointer_Post - FN_CVarGetPointer_Post, -#else - NULL, -#endif -#ifdef FN_GetPlayerWONId_Post - FN_GetPlayerWONId_Post, -#else - NULL, -#endif -#ifdef FN_Info_RemoveKey_Post - FN_Info_RemoveKey_Post, -#else - NULL, -#endif -#ifdef FN_GetPhysicsKeyValue_Post - FN_GetPhysicsKeyValue_Post, -#else - NULL, -#endif -#ifdef FN_SetPhysicsKeyValue_Post - FN_SetPhysicsKeyValue_Post, -#else - NULL, -#endif -#ifdef FN_GetPhysicsInfoString_Post - FN_GetPhysicsInfoString_Post, -#else - NULL, -#endif -#ifdef FN_PrecacheEvent_Post - FN_PrecacheEvent_Post, -#else - NULL, -#endif -#ifdef FN_PlaybackEvent_Post - FN_PlaybackEvent_Post, -#else - NULL, -#endif -#ifdef FN_SetFatPVS_Post - FN_SetFatPVS_Post, -#else - NULL, -#endif -#ifdef FN_SetFatPAS_Post - FN_SetFatPAS_Post, -#else - NULL, -#endif -#ifdef FN_CheckVisibility_Post - FN_CheckVisibility_Post, -#else - NULL, -#endif -#ifdef FN_DeltaSetField_Post - FN_DeltaSetField_Post, -#else - NULL, -#endif -#ifdef FN_DeltaUnsetField_Post - FN_DeltaUnsetField_Post, -#else - NULL, -#endif -#ifdef FN_DeltaAddEncoder_Post - FN_DeltaAddEncoder_Post, -#else - NULL, -#endif -#ifdef FN_GetCurrentPlayer_Post - FN_GetCurrentPlayer_Post, -#else - NULL, -#endif -#ifdef FN_CanSkipPlayer_Post - FN_CanSkipPlayer_Post, -#else - NULL, -#endif -#ifdef FN_DeltaFindField_Post - FN_DeltaFindField_Post, -#else - NULL, -#endif -#ifdef FN_DeltaSetFieldByIndex_Post - FN_DeltaSetFieldByIndex_Post, -#else - NULL, -#endif -#ifdef FN_DeltaUnsetFieldByIndex_Post - FN_DeltaUnsetFieldByIndex_Post, -#else - NULL, -#endif -#ifdef FN_SetGroupMask_Post - FN_SetGroupMask_Post, -#else - NULL, -#endif -#ifdef FN_engCreateInstancedBaseline_Post - FN_engCreateInstancedBaseline_Post, -#else - NULL, -#endif -#ifdef FN_Cvar_DirectSet_Post - FN_Cvar_DirectSet_Post, -#else - NULL, -#endif -#ifdef FN_ForceUnmodified_Post - FN_ForceUnmodified_Post, -#else - NULL, -#endif -#ifdef FN_GetPlayerStats_Post - FN_GetPlayerStats_Post, -#else - NULL, -#endif -#ifdef FN_AddServerCommand_Post - FN_AddServerCommand_Post, -#else - NULL, -#endif -#ifdef FN_Voice_GetClientListening_Post - FN_Voice_GetClientListening_Post, -#else - NULL, -#endif -#ifdef FN_Voice_SetClientListening_Post - FN_Voice_SetClientListening_Post, -#else - NULL, -#endif -#ifdef FN_GetPlayerAuthId_Post - FN_GetPlayerAuthId_Post -#else - NULL -#endif -}; // g_EngineFuncs_Post_Table - - -static NEW_DLL_FUNCTIONS g_NewFuncs_Table = -{ -#ifdef FN_OnFreeEntPrivateData - FN_OnFreeEntPrivateData, -#else - NULL, -#endif -#ifdef FN_GameShutdown - FN_GameShutdown, -#else - NULL, -#endif -#ifdef FN_ShouldCollide - ShouldCollide, -#else - NULL, -#endif -}; - - -static NEW_DLL_FUNCTIONS g_NewFuncs_Post_Table = -{ -#ifdef FN_OnFreeEntPrivateData_Post - FN_OnFreeEntPrivateData_Post, -#else - NULL, -#endif -#ifdef FN_GameShutdown_Post - FN_GameShutdown_Post, -#else - NULL, -#endif -#ifdef FN_ShouldCollide_Post - ShouldCollide_Post, -#else - NULL, -#endif -}; - -// Global variables from metamod. These variable names are referenced by -// various macros. -meta_globals_t *gpMetaGlobals; // metamod globals -gamedll_funcs_t *gpGamedllFuncs; // gameDLL function tables -mutil_funcs_t *gpMetaUtilFuncs; // metamod utility functions - - -plugin_info_t Plugin_info = { - META_INTERFACE_VERSION, - MODULE_NAME, - MODULE_VERSION, - MODULE_DATE, - MODULE_AUTHOR, - MODULE_URL, - MODULE_LOGTAG, - PT_ANYTIME, - PT_ANYTIME -}; - -/* -C_DLLEXPORT int GetEntityAPI(DLL_FUNCTIONS *pFunctionTable, int interfaceVersion) -{ - LOG_DEVELOPER(PLID, "called: GetEntityAPI; version=%d", interfaceVersion); - if(!pFunctionTable) { - LOG_ERROR(PLID, "GetEntityAPI called with null pFunctionTable"); - return(FALSE); - } - else if(interfaceVersion != INTERFACE_VERSION) { - LOG_ERROR(PLID, "GetEntityAPI version mismatch; requested=%d ours=%d", interfaceVersion, INTERFACE_VERSION); - return(FALSE); - } - memcpy(pFunctionTable, &g_EntityAPI_Table, sizeof( DLL_FUNCTIONS ) ); - - return (TRUE); -} - -C_DLLEXPORT int GetEntityAPI_Post(DLL_FUNCTIONS *pFunctionTable, int interfaceVersion) -{ - LOG_DEVELOPER(PLID, "called: GetEntityAPI_Post; version=%d", interfaceVersion); - if(!pFunctionTable) { - LOG_ERROR(PLID, "GetEntityAPI_Post called with null pFunctionTable"); - return(FALSE); - } - else if(interfaceVersion != INTERFACE_VERSION) { - LOG_ERROR(PLID, "GetEntityAPI_Post version mismatch; requested=%d ours=%d", interfaceVersion, INTERFACE_VERSION); - return(FALSE); - } - memcpy(pFunctionTable, &g_EntityAPI_Post_Table, sizeof( DLL_FUNCTIONS ) ); - - return(TRUE); -} -*/ - -C_DLLEXPORT int GetEntityAPI2(DLL_FUNCTIONS *pFunctionTable, int *interfaceVersion) -{ - LOG_DEVELOPER(PLID, "called: GetEntityAPI2; version=%d", *interfaceVersion); - if(!pFunctionTable) { - LOG_ERROR(PLID, "GetEntityAPI2 called with null pFunctionTable"); - return(FALSE); - } - else if(*interfaceVersion != INTERFACE_VERSION) { - LOG_ERROR(PLID, - "GetEntityAPI2 version mismatch; requested=%d ours=%d", - *interfaceVersion, INTERFACE_VERSION); - //! Tell engine what version we had, so it can figure out who is - //! out of date. - *interfaceVersion = INTERFACE_VERSION; - return(FALSE); - } - memcpy(pFunctionTable, &g_EntityAPI_Table, sizeof(DLL_FUNCTIONS)); - g_pFunctionTable=pFunctionTable; - return(TRUE); -} - -C_DLLEXPORT int GetEntityAPI2_Post(DLL_FUNCTIONS *pFunctionTable, int *interfaceVersion) -{ - LOG_DEVELOPER(PLID, "called: GetEntityAPI2_Post; version=%d", *interfaceVersion); - if(!pFunctionTable) { - LOG_ERROR(PLID, "GetEntityAPI2_Post called with null pFunctionTable"); - return(FALSE); - } - else if(*interfaceVersion != INTERFACE_VERSION) { - LOG_ERROR(PLID, "GetEntityAPI2_Post version mismatch; requested=%d ours=%d", *interfaceVersion, INTERFACE_VERSION); - //! Tell engine what version we had, so it can figure out who is out of date. - *interfaceVersion = INTERFACE_VERSION; - return(FALSE); - } - memcpy( pFunctionTable, &g_EntityAPI_Post_Table, sizeof( DLL_FUNCTIONS ) ); - g_pFunctionTable_Post=pFunctionTable; - return(TRUE); -} - -C_DLLEXPORT int GetEngineFunctions(enginefuncs_t *pengfuncsFromEngine, int *interfaceVersion) -{ - LOG_DEVELOPER(PLID, "called: GetEngineFunctions; version=%d", - *interfaceVersion); - if(!pengfuncsFromEngine) { - LOG_ERROR(PLID, - "GetEngineFunctions called with null pengfuncsFromEngine"); - return(FALSE); - } - else if(*interfaceVersion != ENGINE_INTERFACE_VERSION) { - LOG_ERROR(PLID, - "GetEngineFunctions version mismatch; requested=%d ours=%d", - *interfaceVersion, ENGINE_INTERFACE_VERSION); - // Tell metamod what version we had, so it can figure out who is - // out of date. - *interfaceVersion = ENGINE_INTERFACE_VERSION; - return(FALSE); - } - memcpy(pengfuncsFromEngine, &g_EngineFuncs_Table, sizeof(enginefuncs_t)); - g_pengfuncsTable=pengfuncsFromEngine; - return TRUE; -} - -C_DLLEXPORT int GetEngineFunctions_Post(enginefuncs_t *pengfuncsFromEngine, int *interfaceVersion) -{ - LOG_DEVELOPER(PLID, "called: GetEngineFunctions_Post; version=%d", *interfaceVersion); - if(!pengfuncsFromEngine) { - LOG_ERROR(PLID, "GetEngineFunctions_Post called with null pengfuncsFromEngine"); - return(FALSE); - } - else if(*interfaceVersion != ENGINE_INTERFACE_VERSION) { - LOG_ERROR(PLID, "GetEngineFunctions_Post version mismatch; requested=%d ours=%d", *interfaceVersion, ENGINE_INTERFACE_VERSION); - // Tell metamod what version we had, so it can figure out who is out of date. - *interfaceVersion = ENGINE_INTERFACE_VERSION; - return(FALSE); - } - memcpy(pengfuncsFromEngine, &g_EngineFuncs_Post_Table, sizeof(enginefuncs_t)); - g_pengfuncsTable_Post=pengfuncsFromEngine; - return TRUE; - -} - -C_DLLEXPORT int GetNewDLLFunctions(NEW_DLL_FUNCTIONS *pNewFunctionTable, - int *interfaceVersion) -{ - LOG_DEVELOPER(PLID, "called: GetNewDLLFunctions; version=%d", - *interfaceVersion); - if(!pNewFunctionTable) { - LOG_ERROR(PLID, - "GetNewDLLFunctions called with null pNewFunctionTable"); - return(FALSE); - } - else if(*interfaceVersion != NEW_DLL_FUNCTIONS_VERSION) { - LOG_ERROR(PLID, - "GetNewDLLFunctions version mismatch; requested=%d ours=%d", - *interfaceVersion, NEW_DLL_FUNCTIONS_VERSION); - //! Tell engine what version we had, so it can figure out who is - //! out of date. - *interfaceVersion = NEW_DLL_FUNCTIONS_VERSION; - return(FALSE); - } - memcpy(pNewFunctionTable, &g_NewFuncs_Table, sizeof(NEW_DLL_FUNCTIONS)); - g_pNewFunctionsTable=pNewFunctionTable; - return TRUE; -} - -C_DLLEXPORT int GetNewDLLFunctions_Post( NEW_DLL_FUNCTIONS *pNewFunctionTable, int *interfaceVersion ) -{ - LOG_DEVELOPER(PLID, "called: GetNewDLLFunctions_Post; version=%d", *interfaceVersion); - if(!pNewFunctionTable) { - LOG_ERROR(PLID, "GetNewDLLFunctions_Post called with null pNewFunctionTable"); - return(FALSE); - } - else if(*interfaceVersion != NEW_DLL_FUNCTIONS_VERSION) { - LOG_ERROR(PLID, "GetNewDLLFunctions_Post version mismatch; requested=%d ours=%d", *interfaceVersion, NEW_DLL_FUNCTIONS_VERSION); - //! Tell engine what version we had, so it can figure out who is out of date. - *interfaceVersion = NEW_DLL_FUNCTIONS_VERSION; - return(FALSE); - } - memcpy(pNewFunctionTable, &g_NewFuncs_Post_Table, sizeof(NEW_DLL_FUNCTIONS)); - g_pNewFunctionsTable_Post=pNewFunctionTable; - return TRUE; -} - - -static META_FUNCTIONS g_MetaFunctions_Table = -{ - NULL, - NULL, - GetEntityAPI2, - GetEntityAPI2_Post, - GetNewDLLFunctions, - GetNewDLLFunctions_Post, - GetEngineFunctions, - GetEngineFunctions_Post -}; - -C_DLLEXPORT int Meta_Query(char *ifvers, plugin_info_t **pPlugInfo, mutil_funcs_t *pMetaUtilFuncs) -{ - if ((int) CVAR_GET_FLOAT("developer") != 0) - UTIL_LogPrintf("[%s] dev: called: Meta_Query; version=%s, ours=%s\n", - Plugin_info.logtag, ifvers, Plugin_info.ifvers); - - // Check for valid pMetaUtilFuncs before we continue. - if(!pMetaUtilFuncs) { - UTIL_LogPrintf("[%s] ERROR: Meta_Query called with null pMetaUtilFuncs\n", Plugin_info.logtag); - return(FALSE); - } - - gpMetaUtilFuncs = pMetaUtilFuncs; - - *pPlugInfo = &Plugin_info; - - // Check for interface version compatibility. - if(!FStrEq(ifvers, Plugin_info.ifvers)) { - int mmajor=0, mminor=0, pmajor=0, pminor=0; - LOG_MESSAGE(PLID, "WARNING: meta-interface version mismatch; requested=%s ours=%s", - Plugin_info.logtag, ifvers); - // If plugin has later interface version, it's incompatible (update - // metamod). - sscanf(ifvers, "%d:%d", &mmajor, &mminor); - sscanf(META_INTERFACE_VERSION, "%d:%d", &pmajor, &pminor); - if(pmajor > mmajor || (pmajor==mmajor && pminor > mminor)) { - LOG_ERROR(PLID, "metamod version is too old for this module; update metamod"); - return(FALSE); - } - // If plugin has older major interface version, it's incompatible - // (update plugin). - else if(pmajor < mmajor) { - LOG_ERROR(PLID, "metamod version is incompatible with this module; please find a newer version of this module"); - return(FALSE); - } - // Minor interface is older, but this is guaranteed to be backwards - // compatible, so we warn, but we still accept it. - else if(pmajor==mmajor && pminor < mminor) - LOG_MESSAGE(PLID, "WARNING: metamod version is newer than expected; consider finding a newer version of this module"); - else - LOG_ERROR(PLID, "unexpected version comparison; metavers=%s, mmajor=%d, mminor=%d; plugvers=%s, pmajor=%d, pminor=%d", ifvers, mmajor, mminor, META_INTERFACE_VERSION, pmajor, pminor); - } - -#ifdef FN_META_QUERY - return FN_META_QUERY(); -#endif // FN_META_QUERY - - return 1; -} - - -C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME now, META_FUNCTIONS *pFunctionTable, meta_globals_t *pMGlobals, gamedll_funcs_t *pGamedllFuncs) -{ - if(now > Plugin_info.loadable) { - LOG_ERROR(PLID, "Can't load module right now"); - return(FALSE); - } - if(!pMGlobals) { - LOG_ERROR(PLID, "Meta_Attach called with null pMGlobals"); - return(FALSE); - } - gpMetaGlobals=pMGlobals; - if(!pFunctionTable) { - LOG_ERROR(PLID, "Meta_Attach called with null pFunctionTable"); - return(FALSE); - } - - memcpy(pFunctionTable, &g_MetaFunctions_Table, sizeof(META_FUNCTIONS)); - gpGamedllFuncs=pGamedllFuncs; - - // Let's go. - -#ifdef FN_META_ATTACH - FN_META_ATTACH(); -#endif // FN_META_ATTACH - - return TRUE; -} - -C_DLLEXPORT int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason) -{ - if(now > Plugin_info.unloadable && reason != PNL_CMD_FORCED) { - LOG_ERROR(PLID, "Can't unload plugin right now"); - return(FALSE); - } - -#ifdef FN_META_DETACH - return FN_META_DETACH(); -#endif // FN_META_DETACH - return TRUE; -} - - - -#ifdef __linux__ -// linux prototype -C_DLLEXPORT void GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine, globalvars_t *pGlobals ) { - -#else -#ifdef _MSC_VER -// MSVC: Simulate __stdcall calling convention -C_DLLEXPORT __declspec(naked) void GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine, globalvars_t *pGlobals ) -{ - __asm // Prolog - { - // Save ebp - push ebp - // Set stack frame pointer - mov ebp, esp - // Allocate space for local variables - // The MSVC compiler gives us the needed size in __LOCAL_SIZE. - sub esp, __LOCAL_SIZE - // Push registers - push ebx - push esi - push edi - } -#else // _MSC_VER -#ifdef __GNUC__ -// GCC can also work with this -C_DLLEXPORT void __stdcall GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine, globalvars_t *pGlobals ) -{ -#else // __GNUC__ -// compiler not known -#error There is no support (yet) for your compiler. Please use MSVC or GCC compilers or contact the AMX Mod X dev team. -#endif // __GNUC__ -#endif // _MSC_VER -#endif // __linux__ - - // ** Function core <-- - memcpy(&g_engfuncs, pengfuncsFromEngine, sizeof(enginefuncs_t)); - gpGlobals = pGlobals; - // NOTE! Have to call logging function _after_ copying into g_engfuncs, so - // that g_engfuncs.pfnAlertMessage() can be resolved properly, heh. :) - UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag); - // --> ** Function core - -#ifdef _MSC_VER - // Epilog - if (sizeof(int*) == 8) - { // 64 bit - __asm - { - // Pop registers - pop edi - pop esi - pop ebx - // Restore stack frame pointer - mov esp, ebp - // Restore ebp - pop ebp - // 2 * sizeof(int*) = 16 on 64 bit - ret 16 - } - } - else - { // 32 bit - __asm - { - // Pop registers - pop edi - pop esi - pop ebx - // Restore stack frame pointer - mov esp, ebp - // Restore ebp - pop ebp - // 2 * sizeof(int*) = 8 on 32 bit - ret 8 - } - } -#endif // #ifdef _MSC_VER -} - -#endif // #ifdef USE_METAMOD - -/************* AMXX Stuff *************/ - -// *** Globals *** -// Module info -static amxx_module_info_s g_ModuleInfo = -{ - MODULE_NAME, - MODULE_AUTHOR, - MODULE_VERSION, -#ifdef MODULE_RELOAD_ON_MAPCHANGE - 1, -#else // MODULE_RELOAD_ON_MAPCHANGE - 0, -#endif // MODULE_RELOAD_ON_MAPCHANGE - MODULE_LOGTAG -}; - -// Storage for the requested functions -PFN_ADD_NATIVES g_fn_AddNatives; -PFN_BUILD_PATHNAME g_fn_BuildPathname; -PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR; -PFN_GET_AMXADDR g_fn_GetAmxAddr; -PFN_PRINT_SRVCONSOLE g_fn_PrintSrvConsole; -PFN_GET_MODNAME g_fn_GetModname; -PFN_GET_AMXSCRIPTNAME g_fn_GetAmxScriptName; -PFN_GET_AMXSCRIPT g_fn_GetAmxScript; -PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; -PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; -PFN_SET_AMXSTRING g_fn_SetAmxString; -PFN_GET_AMXSTRING g_fn_GetAmxString; -PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; -PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; -PFN_COPY_AMXMEMORY g_fn_CopyAmxMemory; -PFN_LOG g_fn_Log; -PFN_LOG_ERROR g_fn_LogErrorFunc; -PFN_RAISE_AMXERROR g_fn_RaiseAmxError; -PFN_REGISTER_FORWARD g_fn_RegisterForward; -PFN_EXECUTE_FORWARD g_fn_ExecuteForward; -PFN_PREPARE_CELLARRAY g_fn_PrepareCellArray; -PFN_PREPARE_CHARARRAY g_fn_PrepareCharArray; -PFN_PREPARE_CELLARRAY_A g_fn_PrepareCellArrayA; -PFN_PREPARE_CHARARRAY_A g_fn_PrepareCharArrayA; -PFN_IS_PLAYER_VALID g_fn_IsPlayerValid; -PFN_GET_PLAYER_NAME g_fn_GetPlayerName; -PFN_GET_PLAYER_IP g_fn_GetPlayerIP; -PFN_IS_PLAYER_INGAME g_fn_IsPlayerIngame; -PFN_IS_PLAYER_BOT g_fn_IsPlayerBot; -PFN_IS_PLAYER_AUTHORIZED g_fn_IsPlayerAuthorized; -PFN_GET_PLAYER_TIME g_fn_GetPlayerTime; -PFN_GET_PLAYER_PLAYTIME g_fn_GetPlayerPlayTime; -PFN_GET_PLAYER_CURWEAPON g_fn_GetPlayerCurweapon; -PFN_GET_PLAYER_TEAM g_fn_GetPlayerTeam; -PFN_GET_PLAYER_TEAMID g_fn_GetPlayerTeamID; -PFN_GET_PLAYER_DEATHS g_fn_GetPlayerDeaths; -PFN_GET_PLAYER_MENU g_fn_GetPlayerMenu; -PFN_GET_PLAYER_KEYS g_fn_GetPlayerKeys; -PFN_IS_PLAYER_ALIVE g_fn_IsPlayerAlive; -PFN_GET_PLAYER_FRAGS g_fn_GetPlayerFrags; -PFN_IS_PLAYER_CONNECTING g_fn_IsPlayerConnecting; -PFN_IS_PLAYER_HLTV g_fn_IsPlayerHLTV; -PFN_GET_PLAYER_ARMOR g_fn_GetPlayerArmor; -PFN_GET_PLAYER_HEALTH g_fn_GetPlayerHealth; -#ifdef MEMORY_TEST -PFN_ALLOCATOR g_fn_Allocator; -PFN_REALLOCATOR g_fn_Reallocator; -PFN_DEALLOCATOR g_fn_Deallocator; -#endif -PFN_AMX_EXEC g_fn_AmxExec; -PFN_AMX_EXECV g_fn_AmxExecv; -PFN_AMX_ALLOT g_fn_AmxAllot; -PFN_AMX_FINDPUBLIC g_fn_AmxFindPublic; -PFN_LOAD_AMXSCRIPT g_fn_LoadAmxScript; -PFN_UNLOAD_AMXSCRIPT g_fn_UnloadAmxScript; -PFN_REAL_TO_CELL g_fn_RealToCell; -PFN_CELL_TO_REAL g_fn_CellToReal; -PFN_REGISTER_SPFORWARD g_fn_RegisterSPForward; -PFN_REGISTER_SPFORWARD_BYNAME g_fn_RegisterSPForwardByName; -PFN_UNREGISTER_SPFORWARD g_fn_UnregisterSPForward; -PFN_MERGEDEFINITION_FILE g_fn_MergeDefinition_File; -PFN_AMX_FINDNATIVE g_fn_AmxFindNative; -PFN_GETPLAYERFLAGS g_fn_GetPlayerFlags; -PFN_GET_PLAYER_EDICT g_fn_GetPlayerEdict; -PFN_FORMAT g_fn_Format; -PFN_REGISTERFUNCTION g_fn_RegisterFunction; -PFN_REQ_FNPTR g_fn_RequestFunction; -PFN_AMX_PUSH g_fn_AmxPush; - -// *** Exports *** -C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo) -{ - // check parameters - if (!interfaceVersion || !moduleInfo) - return AMXX_PARAM; - - // check interface version - if (*interfaceVersion != AMXX_INTERFACE_VERSION) - { - // Tell amxx core our interface version - *interfaceVersion = AMXX_INTERFACE_VERSION; - return AMXX_IFVERS; - } - - // copy module info - memcpy(moduleInfo, &g_ModuleInfo, sizeof(amxx_module_info_s)); - -#ifdef FN_AMXX_QUERY - FN_AMXX_QUERY(); -#endif // FN_AMXX_QUERY - // Everything ok :) - return AMXX_OK; -} - -// request function -#define REQFUNC(name, fptr, type) if ((fptr = (type)reqFnptrFunc(name)) == 0) return AMXX_FUNC_NOT_PRESENT -// request optional function -#define REQFUNC_OPT(name, fptr, type) fptr = (type)reqFnptrFunc(name) - -C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) -{ - // Check pointer - if (!reqFnptrFunc) - return AMXX_PARAM; - - g_fn_RequestFunction = reqFnptrFunc; - - // Req all known functions - // Misc - REQFUNC("BuildPathname", g_fn_BuildPathname, PFN_BUILD_PATHNAME); - REQFUNC("BuildPathnameR", g_fn_BuildPathnameR, PFN_BUILD_PATHNAME_R); - REQFUNC("PrintSrvConsole", g_fn_PrintSrvConsole, PFN_PRINT_SRVCONSOLE); - REQFUNC("GetModname", g_fn_GetModname, PFN_GET_MODNAME); - REQFUNC("Log", g_fn_Log, PFN_LOG); - REQFUNC("LogError", g_fn_LogErrorFunc, PFN_LOG_ERROR); - REQFUNC("MergeDefinitionFile", g_fn_MergeDefinition_File, PFN_MERGEDEFINITION_FILE); - REQFUNC("Format", g_fn_Format, PFN_FORMAT); - REQFUNC("RegisterFunction", g_fn_RegisterFunction, PFN_REGISTERFUNCTION); - - // Amx scripts - REQFUNC("GetAmxScript", g_fn_GetAmxScript, PFN_GET_AMXSCRIPT); - REQFUNC("FindAmxScriptByAmx", g_fn_FindAmxScriptByAmx, PFN_FIND_AMXSCRIPT_BYAMX); - REQFUNC("FindAmxScriptByName", g_fn_FindAmxScriptByName, PFN_FIND_AMXSCRIPT_BYNAME); - REQFUNC("LoadAmxScript", g_fn_LoadAmxScript, PFN_LOAD_AMXSCRIPT); - REQFUNC("UnloadAmxScript", g_fn_UnloadAmxScript, PFN_UNLOAD_AMXSCRIPT); - REQFUNC("GetAmxScriptName", g_fn_GetAmxScriptName, PFN_GET_AMXSCRIPTNAME); - - // String / mem in amx scripts support - REQFUNC("SetAmxString", g_fn_SetAmxString, PFN_SET_AMXSTRING); - REQFUNC("GetAmxString", g_fn_GetAmxString, PFN_GET_AMXSTRING); - REQFUNC("GetAmxStringLen", g_fn_GetAmxStringLen, PFN_GET_AMXSTRINGLEN); - REQFUNC("FormatAmxString", g_fn_FormatAmxString, PFN_FORMAT_AMXSTRING); - REQFUNC("CopyAmxMemory", g_fn_CopyAmxMemory, PFN_COPY_AMXMEMORY); - REQFUNC("GetAmxAddr", g_fn_GetAmxAddr, PFN_GET_AMXADDR); - - REQFUNC("amx_Exec", g_fn_AmxExec, PFN_AMX_EXEC); - REQFUNC("amx_Execv", g_fn_AmxExecv, PFN_AMX_EXECV); - REQFUNC("amx_FindPublic", g_fn_AmxFindPublic, PFN_AMX_FINDPUBLIC); - REQFUNC("amx_Allot", g_fn_AmxAllot, PFN_AMX_ALLOT); - REQFUNC("amx_FindNative", g_fn_AmxFindNative, PFN_AMX_FINDNATIVE); - - // Natives / Forwards - REQFUNC("AddNatives", g_fn_AddNatives, PFN_ADD_NATIVES); - REQFUNC("RaiseAmxError", g_fn_RaiseAmxError, PFN_RAISE_AMXERROR); - REQFUNC("RegisterForward", g_fn_RegisterForward, PFN_REGISTER_FORWARD); - REQFUNC("RegisterSPForward", g_fn_RegisterSPForward, PFN_REGISTER_SPFORWARD); - REQFUNC("RegisterSPForwardByName", g_fn_RegisterSPForwardByName, PFN_REGISTER_SPFORWARD_BYNAME); - REQFUNC("UnregisterSPForward", g_fn_UnregisterSPForward, PFN_UNREGISTER_SPFORWARD); - REQFUNC("ExecuteForward", g_fn_ExecuteForward, PFN_EXECUTE_FORWARD); - REQFUNC("PrepareCellArray", g_fn_PrepareCellArray, PFN_PREPARE_CELLARRAY); - REQFUNC("PrepareCharArray", g_fn_PrepareCharArray, PFN_PREPARE_CHARARRAY); - REQFUNC("PrepareCellArrayA", g_fn_PrepareCellArrayA, PFN_PREPARE_CELLARRAY_A); - REQFUNC("PrepareCharArrayA", g_fn_PrepareCharArrayA, PFN_PREPARE_CHARARRAY_A); - // Player - REQFUNC("IsPlayerValid", g_fn_IsPlayerValid, PFN_IS_PLAYER_VALID); - REQFUNC("GetPlayerName", g_fn_GetPlayerName, PFN_GET_PLAYER_NAME); - REQFUNC("GetPlayerIP", g_fn_GetPlayerIP, PFN_GET_PLAYER_IP); - REQFUNC("IsPlayerInGame", g_fn_IsPlayerIngame, PFN_IS_PLAYER_INGAME); - REQFUNC("IsPlayerBot", g_fn_IsPlayerBot, PFN_IS_PLAYER_BOT); - REQFUNC("IsPlayerAuthorized", g_fn_IsPlayerAuthorized, PFN_IS_PLAYER_AUTHORIZED); - REQFUNC("GetPlayerTime", g_fn_GetPlayerTime, PFN_GET_PLAYER_TIME); - REQFUNC("GetPlayerPlayTime", g_fn_GetPlayerPlayTime, PFN_GET_PLAYER_PLAYTIME); - REQFUNC("GetPlayerCurweapon", g_fn_GetPlayerCurweapon, PFN_GET_PLAYER_CURWEAPON); - REQFUNC("GetPlayerTeamID", g_fn_GetPlayerTeamID, PFN_GET_PLAYER_TEAMID); - REQFUNC("GetPlayerTeam",g_fn_GetPlayerTeam, PFN_GET_PLAYER_TEAM); - REQFUNC("GetPlayerDeaths", g_fn_GetPlayerDeaths, PFN_GET_PLAYER_DEATHS); - REQFUNC("GetPlayerMenu", g_fn_GetPlayerMenu, PFN_GET_PLAYER_MENU); - REQFUNC("GetPlayerKeys", g_fn_GetPlayerKeys, PFN_GET_PLAYER_KEYS); - REQFUNC("IsPlayerAlive", g_fn_IsPlayerAlive, PFN_IS_PLAYER_ALIVE); - REQFUNC("GetPlayerFrags", g_fn_GetPlayerFrags, PFN_GET_PLAYER_FRAGS); - REQFUNC("IsPlayerConnecting", g_fn_IsPlayerConnecting, PFN_IS_PLAYER_CONNECTING); - REQFUNC("IsPlayerHLTV", g_fn_IsPlayerHLTV, PFN_IS_PLAYER_HLTV); - REQFUNC("GetPlayerArmor", g_fn_GetPlayerArmor, PFN_GET_PLAYER_ARMOR); - REQFUNC("GetPlayerHealth", g_fn_GetPlayerHealth, PFN_GET_PLAYER_HEALTH); - REQFUNC("GetPlayerFlags", g_fn_GetPlayerFlags, PFN_GETPLAYERFLAGS); - REQFUNC("GetPlayerEdict", g_fn_GetPlayerEdict, PFN_GET_PLAYER_EDICT); - REQFUNC("amx_Push", g_fn_AmxPush, PFN_AMX_PUSH); - -#ifdef MEMORY_TEST - // Memory - REQFUNC_OPT("Allocator", g_fn_Allocator, PFN_ALLOCATOR); - REQFUNC_OPT("Reallocator", g_fn_Reallocator, PFN_REALLOCATOR); - REQFUNC_OPT("Deallocator", g_fn_Deallocator, PFN_DEALLOCATOR); -#endif - - REQFUNC("CellToReal", g_fn_CellToReal, PFN_CELL_TO_REAL); - REQFUNC("RealToCell", g_fn_RealToCell, PFN_REAL_TO_CELL); - -#ifdef FN_AMXX_ATTACH - FN_AMXX_ATTACH(); -#endif // FN_AMXX_ATACH - - return AMXX_OK; -} - -C_DLLEXPORT int AMXX_Detach() -{ -#ifdef FN_AMXX_DETACH - FN_AMXX_DETACH(); -#endif // FN_AMXX_DETACH - - return AMXX_OK; -} - -C_DLLEXPORT int AMXX_PluginsLoaded() -{ -#ifdef FN_AMXX_PLUGINSLOADED - FN_AMXX_PLUGINSLOADED(); -#endif // FN_AMXX_PLUGINSLOADED - return AMXX_OK; -} - -// Advanced MF functions -void MF_Log(const char *fmt, ...) -{ - // :TODO: Overflow possible here - char msg[3072]; - va_list arglst; - va_start(arglst, fmt); - vsprintf(msg, fmt, arglst); - va_end(arglst); - - g_fn_Log("[%s] %s", MODULE_LOGTAG, msg); -} - -void MF_LogError(AMX *amx, int err, const char *fmt, ...) -{ - // :TODO: Overflow possible here - char msg[3072]; - va_list arglst; - va_start(arglst, fmt); - vsprintf(msg, fmt, arglst); - va_end(arglst); - - g_fn_LogErrorFunc(amx, err, "[%s] %s", MODULE_LOGTAG, msg); -} - - -#ifdef _DEBUG -// validate macros -// Makes sure compiler reports errors when macros are invalid -void ValidateMacros_DontCallThis_Smiley() -{ - MF_BuildPathname("str", "str", 0); - MF_BuildPathnameR(NULL, 0, "%d", 0); - MF_FormatAmxString(NULL, 0, 0, NULL); - MF_GetAmxAddr(NULL, 0); - MF_PrintSrvConsole("str", "str", 0); - MF_GetModname(); - MF_GetScriptName(0); - MF_GetScriptAmx(0); - MF_FindScriptByAmx(NULL); - MF_FindScriptByName("str"); - MF_SetAmxString(NULL, 0, "str", 0); - MF_GetAmxString(NULL, 0, 0, 0); - MF_GetAmxStringLen(NULL); - MF_CopyAmxMemory(NULL, NULL, 0); - MF_Log("str", "str", 0); - MF_LogError(NULL, 0, NULL); - MF_RaiseAmxError(NULL, 0); - MF_RegisterForward("str", (ForwardExecType)0, 0, 0, 0); - MF_ExecuteForward(0, 0, 0); - MF_PrepareCellArray(NULL, 0); - MF_PrepareCharArray(NULL, 0); - MF_PrepareCellArrayA(NULL, 0, true); - MF_PrepareCharArrayA(NULL, 0, true); - MF_IsPlayerValid(0); - MF_GetPlayerName(0); - MF_GetPlayerIP(0); - MF_IsPlayerIngame(0); - MF_IsPlayerBot(0); - MF_IsPlayerAuthorized(0); - MF_GetPlayerTime(0); - MF_GetPlayerPlayTime(0); - MF_GetPlayerCurweapon(0); - MF_GetPlayerTeamID(0); - MF_GetPlayerTeam(0); - MF_GetPlayerDeaths(0); - MF_GetPlayerMenu(0); - MF_GetPlayerKeys(0); - MF_IsPlayerAlive(0); - MF_GetPlayerFrags(0); - MF_IsPlayerConnecting(0); - MF_IsPlayerHLTV(0); - MF_GetPlayerArmor(0); - MF_GetPlayerHealth(0); - MF_AmxExec(0, 0, 0); - MF_AmxExecv(0, 0, 0, 0, 0); - MF_AmxFindPublic(0, 0, 0); - MF_AmxAllot(0, 0, 0, 0); - MF_LoadAmxScript(0, 0, 0, 0, 0); - MF_UnloadAmxScript(0, 0); - MF_RegisterSPForward(0, 0, 0, 0, 0, 0); - MF_RegisterSPForwardByName(0, 0, 0, 0, 0, 0); - MF_UnregisterSPForward(0); - MF_GetPlayerFrags(0); - MF_GetPlayerEdict(0); - MF_Format("", 4, "str"); - MF_RegisterFunction(NULL, ""); -} -#endif - -#ifdef MEMORY_TEST - -/************* MEMORY *************/ -// undef all defined macros -#undef new -#undef delete -#undef malloc -#undef calloc -#undef realloc -#undef free - -const unsigned int m_alloc_unknown = 0; -const unsigned int m_alloc_new = 1; -const unsigned int m_alloc_new_array = 2; -const unsigned int m_alloc_malloc = 3; -const unsigned int m_alloc_calloc = 4; -const unsigned int m_alloc_realloc = 5; -const unsigned int m_alloc_delete = 6; -const unsigned int m_alloc_delete_array = 7; -const unsigned int m_alloc_free = 8; - -const char *g_Mem_CurrentFilename = "??"; -int g_Mem_CurrentLine = 0; -const char *g_Mem_CurrentFunc = "??"; - -const char *Mem_MakeSourceFile(const char *sourceFile) -{ - static char buffer[512]; - static size_t pos = 0; - if (!pos) - { - // init - buffer[0] = '['; - strcpy(buffer + 1, MODULE_NAME); - pos = strlen(MODULE_NAME) + 1; - buffer[pos++] = ']'; - } - - // convert from absolute path to [modulename]filename - const char *ptr = strrchr(sourceFile, '\\'); - if (ptr) - ptr++; - else - { - ptr = strrchr(sourceFile, '/'); - if (ptr) - ptr++; - else - ptr = sourceFile; - } - strcpy(buffer + pos, ptr); - return buffer; -} - -void Mem_SetOwner(const char *filename, int line, const char *function) -{ - g_Mem_CurrentFilename = filename; - g_Mem_CurrentLine = line; - g_Mem_CurrentFunc = function; -} - -void Mem_ResetGlobals() -{ - Mem_SetOwner("??", 0, "??"); -} - -// raw (re/de)allocators -void * Mem_Allocator(const char *sourceFile, const unsigned int sourceLine, const char *sourceFunc, - const unsigned int allocationType, const size_t reportedSize) -{ - if (g_fn_Allocator) - return g_fn_Allocator(Mem_MakeSourceFile(sourceFile), sourceLine, sourceFunc, allocationType, reportedSize); - else - return malloc(reportedSize); -} - -void * Mem_Reallocator(const char *sourceFile, const unsigned int sourceLine, const char *sourceFunc, - const unsigned int reallocationType, const size_t reportedSize, void *reportedAddress) -{ - if (g_fn_Reallocator) - return g_fn_Reallocator(Mem_MakeSourceFile(sourceFile), sourceLine, sourceFunc, reallocationType, reportedSize, reportedAddress); - else - return realloc(reportedAddress, reportedSize); -} - -void Mem_Deallocator(const char *sourceFile, const unsigned int sourceLine, const char *sourceFunc, - const unsigned int deallocationType, void *reportedAddress) -{ - // If you you get user breakpoint here, something failed :) - // - invalid pointer - // - alloc type mismatch ( for example - // char *a = new char[5]; delete char; - // ) - // - The allocation unit is damaged (for example - // char *a = new char[5]; a[6] = 8; - // ) - // - break on dealloc flag set (somehow) - - if (g_fn_Deallocator) - g_fn_Deallocator(Mem_MakeSourceFile(sourceFile), sourceLine, sourceFunc, deallocationType, reportedAddress); - else - free(reportedAddress); -} - -// new and delete operators -void *operator new(size_t reportedSize) -{ - if (reportedSize == 0) - reportedSize = 1; - void *ptr = Mem_Allocator(g_Mem_CurrentFilename, g_Mem_CurrentLine, g_Mem_CurrentFunc, m_alloc_new, reportedSize); - // :TODO: Handler support ? - if (ptr) - return ptr; - - // allocation failed - return NULL; -} - -void *operator new[](size_t reportedSize) -{ - if (reportedSize == 0) - reportedSize = 1; - void *ptr = Mem_Allocator(g_Mem_CurrentFilename, g_Mem_CurrentLine, g_Mem_CurrentFunc, m_alloc_new_array, reportedSize); - // :TODO: Handler support ? - if (ptr) - return ptr; - - // allocation failed - return NULL; -} - -// Microsoft memory tracking operators -void *operator new(size_t reportedSize, const char *sourceFile, int sourceLine) -{ - if (reportedSize == 0) - reportedSize = 1; - void *ptr = Mem_Allocator(g_Mem_CurrentFilename, g_Mem_CurrentLine, g_Mem_CurrentFunc, m_alloc_new, reportedSize); - // :TODO: Handler support ? - if (ptr) - return ptr; - - // allocation failed - return NULL; -} -void *operator new[](size_t reportedSize, const char *sourceFile, int sourceLine) -{ - if (reportedSize == 0) - reportedSize = 1; - void *ptr = Mem_Allocator(g_Mem_CurrentFilename, g_Mem_CurrentLine, g_Mem_CurrentFunc, m_alloc_new_array, reportedSize); - // :TODO: Handler support ? - if (ptr) - return ptr; - - // allocation failed - return NULL; -} - -void operator delete(void *reportedAddress) -{ - if (!reportedAddress) - return; - - Mem_Deallocator(g_Mem_CurrentFilename, g_Mem_CurrentLine, g_Mem_CurrentFunc, m_alloc_delete, reportedAddress); -} - -void operator delete[](void *reportedAddress) -{ - if (!reportedAddress) - return; - - Mem_Deallocator(g_Mem_CurrentFilename, g_Mem_CurrentLine, g_Mem_CurrentFunc, m_alloc_delete_array, reportedAddress); -} - -#else - -#if !defined NO_ALLOC_OVERRIDES && !defined MEMORY_TEST && !defined WIN32 -void * ::operator new(size_t size) { - return(calloc(1, size)); -} - -void * ::operator new[](size_t size) { - return(calloc(1, size)); -} - -void ::operator delete(void * ptr) { - if(ptr) - free(ptr); -} - -void ::operator delete[](void * ptr) { - if(ptr) - free(ptr); -} -#endif - -#endif //MEMORY_TEST - -/************* stuff from dlls/util.cpp *************/ -// must come here because cbase.h declares it's own operator new - -#ifdef USE_METAMOD - -// Selected portions of dlls/util.cpp from SDK 2.1. -// Functions copied from there as needed... -// And modified to avoid buffer overflows (argh). - -/*** -* -* Copyright (c) 1999, 2000 Valve LLC. All rights reserved. -* -* This product contains software technology licensed from Id -* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. -* All Rights Reserved. -* -* Use, distribution, and modification of this source code and/or resulting -* object code is restricted to non-commercial enhancements to products from -* Valve LLC. All other use, distribution, or modification is prohibited -* without written permission from Valve LLC. -* -****/ -/* - -===== util.cpp ======================================================== - - Utility code. Really not optional after all. - -*/ - -#include -#include "sdk_util.h" -#include - -#include // for strncpy(), etc - -#include "osdep.h" // win32 vsnprintf, etc - -char* UTIL_VarArgs( char *format, ... ) -{ - va_list argptr; - static char string[1024]; - - va_start (argptr, format); - vsnprintf (string, sizeof(string), format, argptr); - va_end (argptr); - - return string; -} - - -//========================================================= -// UTIL_LogPrintf - Prints a logged message to console. -// Preceded by LOG: ( timestamp ) < message > -//========================================================= -void UTIL_LogPrintf( char *fmt, ... ) -{ - va_list argptr; - static char string[1024]; - - va_start ( argptr, fmt ); - vsnprintf ( string, sizeof(string), fmt, argptr ); - va_end ( argptr ); - - // Print to server console - ALERT( at_logged, "%s", string ); -} - - -void UTIL_HudMessage(CBaseEntity *pEntity, const hudtextparms_t &textparms, - const char *pMessage) -{ - if ( !pEntity ) - return; - - MESSAGE_BEGIN( MSG_ONE, SVC_TEMPENTITY, NULL, ENT(pEntity->pev) ); - WRITE_BYTE( TE_TEXTMESSAGE ); - WRITE_BYTE( textparms.channel & 0xFF ); - - WRITE_SHORT( FixedSigned16( textparms.x, 1<<13 ) ); - WRITE_SHORT( FixedSigned16( textparms.y, 1<<13 ) ); - WRITE_BYTE( textparms.effect ); - - WRITE_BYTE( textparms.r1 ); - WRITE_BYTE( textparms.g1 ); - WRITE_BYTE( textparms.b1 ); - WRITE_BYTE( textparms.a1 ); - - WRITE_BYTE( textparms.r2 ); - WRITE_BYTE( textparms.g2 ); - WRITE_BYTE( textparms.b2 ); - WRITE_BYTE( textparms.a2 ); - - WRITE_SHORT( FixedUnsigned16( textparms.fadeinTime, 1<<8 ) ); - WRITE_SHORT( FixedUnsigned16( textparms.fadeoutTime, 1<<8 ) ); - WRITE_SHORT( FixedUnsigned16( textparms.holdTime, 1<<8 ) ); - - if ( textparms.effect == 2 ) - WRITE_SHORT( FixedUnsigned16( textparms.fxTime, 1<<8 ) ); - - if ( strlen( pMessage ) < 512 ) - { - WRITE_STRING( pMessage ); - } - else - { - char tmp[512]; - strncpy( tmp, pMessage, 511 ); - tmp[511] = 0; - WRITE_STRING( tmp ); - } - MESSAGE_END(); -} - -short FixedSigned16( float value, float scale ) -{ - int output; - - output = (int) (value * scale); - - if ( output > 32767 ) - output = 32767; - - if ( output < -32768 ) - output = -32768; - - return (short)output; -} - -unsigned short FixedUnsigned16( float value, float scale ) -{ - int output; - - output = (int) (value * scale); - if ( output < 0 ) - output = 0; - if ( output > 0xFFFF ) - output = 0xFFFF; - - return (unsigned short)output; -} -#endif // USE_METAMOD diff --git a/dlls/MemHack/amxxmodule.h b/dlls/MemHack/amxxmodule.h deleted file mode 100644 index 0a000d20..00000000 --- a/dlls/MemHack/amxxmodule.h +++ /dev/null @@ -1,2241 +0,0 @@ -/* - * AMX Mod X Module Interface Functions - * This file may be freely used -*/ - -// prevent double include -#ifndef __AMXXMODULE_H__ -#define __AMXXMODULE_H__ - -// config -#include "moduleconfig.h" - -// metamod include files -#ifdef USE_METAMOD -#include -#include -#include "osdep.h" -#endif // #ifdef USE_METAMOD - -// DLL Export -#undef DLLEXPORT -#ifndef __linux__ -#define DLLEXPORT __declspec(dllexport) -#else -#define DLLEXPORT -#define LINUX -#endif - -#undef C_DLLEXPORT -#define C_DLLEXPORT extern "C" DLLEXPORT - -// ***** AMXX stuff ***** - -// module interface version was 1 -// 2 - added logtag to struct (amxx1.1-rc1) -// 3 - added new tagAMX structure (amxx1.5) -#define AMXX_INTERFACE_VERSION 3 - -// amxx module info -struct amxx_module_info_s -{ - const char *name; - const char *author; - const char *version; - int reload; // reload on mapchange when nonzero - const char *logtag; // added in version 2 -}; - -// return values from functions called by amxx -#define AMXX_OK 0 /* no error */ -#define AMXX_IFVERS 1 /* interface version */ -#define AMXX_PARAM 2 /* Invalid parameter */ -#define AMXX_FUNC_NOT_PRESENT 3 /* Function not present */ - -// *** Small stuff *** -// The next section is copied from the amx.h file -// Copyright (c) ITB CompuPhase, 1997-2005 - -#if defined HAVE_STDINT_H - #include -#else - #if defined __LCC__ || defined __DMC__ || defined LINUX - #if defined HAVE_INTTYPES_H - #include - #else - #include - #endif - #elif !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L - /* The ISO C99 defines the int16_t and int_32t types. If the compiler got - * here, these types are probably undefined. - */ - #if defined __MACH__ - #include - typedef unsigned short int uint16_t; - typedef unsigned long int uint32_t; - #elif defined __FreeBSD__ - #include - #else - typedef short int int16_t; - typedef unsigned short int uint16_t; - #if defined SN_TARGET_PS2 - typedef int int32_t; - typedef unsigned int uint32_t; - #else - typedef long int int32_t; - typedef unsigned long int uint32_t; - #endif - #if defined __WIN32__ || defined _WIN32 || defined WIN32 - typedef __int64 int64_t; - typedef unsigned __int64 uint64_t; - #define HAVE_I64 - #elif defined __GNUC__ - typedef long long int64_t; - typedef unsigned long long uint64_t; - #define HAVE_I64 - #endif - #endif - #endif - #define HAVE_STDINT_H -#endif -#if defined _LP64 || defined WIN64 || defined _WIN64 - #if !defined __64BIT__ - #define __64BIT__ - #endif -#endif - -/* calling convention for native functions */ -#if !defined AMX_NATIVE_CALL - #define AMX_NATIVE_CALL -#endif -/* calling convention for all interface functions and callback functions */ -#if !defined AMXAPI - #if defined STDECL - #define AMXAPI __stdcall - #elif defined CDECL - #define AMXAPI __cdecl - #else - #define AMXAPI - #endif -#endif -#if !defined AMXEXPORT - #define AMXEXPORT -#endif - -#if !defined PAWN_CELL_SIZE - #define PAWN_CELL_SIZE 32 /* by default, use 32-bit cells */ -#endif -#if PAWN_CELL_SIZE==16 - typedef uint16_t ucell; - typedef int16_t cell; -#elif PAWN_CELL_SIZE==32 - typedef uint32_t ucell; - typedef int32_t cell; -#define REAL float -#elif PAWN_CELL_SIZE==64 - typedef uint64_t ucell; - typedef int64_t cell; -#define REAL double -#else - #error Unsupported cell size (PAWN_CELL_SIZE) -#endif - -#define UNPACKEDMAX ((1 << (sizeof(cell)-1)*8) - 1) -#define UNLIMITED (~1u >> 1) - -struct tagAMX; -typedef cell (AMX_NATIVE_CALL *AMX_NATIVE)(struct tagAMX *amx, cell *params); -typedef int (AMXAPI *AMX_CALLBACK)(struct tagAMX *amx, cell index, - cell *result, cell *params); -typedef int (AMXAPI *AMX_DEBUG)(struct tagAMX *amx); -#if !defined _FAR - #define _FAR -#endif - -#if defined _MSC_VER - #pragma warning(disable:4103) /* disable warning message 4103 that complains - * about pragma pack in a header file */ - #pragma warning(disable:4100) /* "'%$S' : unreferenced formal parameter" */ -#endif - - -/* Some compilers do not support the #pragma align, which should be fine. Some - * compilers give a warning on unknown #pragmas, which is not so fine... - */ -#if (defined SN_TARGET_PS2 || defined __GNUC__) && !defined AMX_NO_ALIGN - #define AMX_NO_ALIGN -#endif - -#if defined __GNUC__ - #define PACKED __attribute__((packed)) -#else - #define PACKED -#endif - -#if !defined AMX_NO_ALIGN - #if defined LINUX || defined __FreeBSD__ - #pragma pack(1) /* structures must be packed (byte-aligned) */ - #elif defined MACOS && defined __MWERKS__ - #pragma options align=mac68k - #else - #pragma pack(push) - #pragma pack(1) /* structures must be packed (byte-aligned) */ - #if defined __TURBOC__ - #pragma option -a- /* "pack" pragma for older Borland compilers */ - #endif - #endif -#endif - -typedef struct { - const char _FAR *name PACKED; - AMX_NATIVE func PACKED; -} AMX_NATIVE_INFO; - -#define AMX_USERNUM 4 - -/* The AMX structure is the internal structure for many functions. Not all - * fields are valid at all times; many fields are cached in local variables. - */ -typedef struct tagAMX { - unsigned char _FAR *base PACKED; /* points to the AMX header plus the code, optionally also the data */ - unsigned char _FAR *data PACKED; /* points to separate data+stack+heap, may be NULL */ - AMX_CALLBACK callback PACKED; - AMX_DEBUG debug PACKED; /* debug callback */ - /* for external functions a few registers must be accessible from the outside */ - cell cip PACKED; /* instruction pointer: relative to base + amxhdr->cod */ - cell frm PACKED; /* stack frame base: relative to base + amxhdr->dat */ - cell hea PACKED; /* top of the heap: relative to base + amxhdr->dat */ - cell hlw PACKED; /* bottom of the heap: relative to base + amxhdr->dat */ - cell stk PACKED; /* stack pointer: relative to base + amxhdr->dat */ - cell stp PACKED; /* top of the stack: relative to base + amxhdr->dat */ - int flags PACKED; /* current status, see amx_Flags() */ - /* user data */ - long usertags[AMX_USERNUM] PACKED; - //okay userdata[3] in AMX Mod X is for the CPlugin * pointer - //we're also gonna set userdata[2] to a special debug structure - void _FAR *userdata[AMX_USERNUM] PACKED; - /* native functions can raise an error */ - int error PACKED; - /* passing parameters requires a "count" field */ - int paramcount; - /* the sleep opcode needs to store the full AMX status */ - cell pri PACKED; - cell alt PACKED; - cell reset_stk PACKED; - cell reset_hea PACKED; - cell sysreq_d PACKED; /* relocated address/value for the SYSREQ.D opcode */ - /* support variables for the JIT */ - int reloc_size PACKED; /* required temporary buffer for relocations */ - long code_size PACKED; /* estimated memory footprint of the native code */ -} PACKED AMX; - -enum { - AMX_ERR_NONE, - /* reserve the first 15 error codes for exit codes of the abstract machine */ - AMX_ERR_EXIT, /* forced exit */ - AMX_ERR_ASSERT, /* assertion failed */ - AMX_ERR_STACKERR, /* stack/heap collision */ - AMX_ERR_BOUNDS, /* index out of bounds */ - AMX_ERR_MEMACCESS, /* invalid memory access */ - AMX_ERR_INVINSTR, /* invalid instruction */ - AMX_ERR_STACKLOW, /* stack underflow */ - AMX_ERR_HEAPLOW, /* heap underflow */ - AMX_ERR_CALLBACK, /* no callback, or invalid callback */ - AMX_ERR_NATIVE, /* native function failed */ - AMX_ERR_DIVIDE, /* divide by zero */ - AMX_ERR_SLEEP, /* go into sleepmode - code can be restarted */ - AMX_ERR_INVSTATE, /* invalid state for this access */ - - AMX_ERR_MEMORY = 16, /* out of memory */ - AMX_ERR_FORMAT, /* invalid file format */ - AMX_ERR_VERSION, /* file is for a newer version of the AMX */ - AMX_ERR_NOTFOUND, /* function not found */ - AMX_ERR_INDEX, /* invalid index parameter (bad entry point) */ - AMX_ERR_DEBUG, /* debugger cannot run */ - AMX_ERR_INIT, /* AMX not initialized (or doubly initialized) */ - AMX_ERR_USERDATA, /* unable to set user data field (table full) */ - AMX_ERR_INIT_JIT, /* cannot initialize the JIT */ - AMX_ERR_PARAMS, /* parameter error */ - AMX_ERR_DOMAIN, /* domain error, expression result does not fit in range */ -}; - -#if !defined AMX_NO_ALIGN - #if defined __linux__ - #pragma pack() /* reset default packing */ - #else - #pragma pack(pop) /* reset previous packing */ - #endif -#endif - - -// ***** declare functions ***** - -#ifdef USE_METAMOD -void UTIL_LogPrintf( char *fmt, ... ); -void UTIL_HudMessage(CBaseEntity *pEntity, const hudtextparms_t &textparms, const char *pMessage); -short FixedSigned16( float value, float scale ); -unsigned short FixedUnsigned16( float value, float scale ); - -#ifdef FN_META_QUERY -void FN_META_QUERY(void); -#endif // FN_META_QUERY - -#ifdef FN_META_ATTACH -void FN_META_ATTACH(void); -#endif // FN_META_ATTACH - -#ifdef FN_META_DETACH -void FN_META_DETACH(void); -#endif // FN_META_DETACH - - - - - -#ifdef FN_GameDLLInit -void FN_GameDLLInit(void); -#endif // FN_GameDLLInit - -#ifdef FN_DispatchSpawn -int FN_DispatchSpawn(edict_t *pent); -#endif // FN_DispatchSpawn - -#ifdef FN_DispatchThink -void FN_DispatchThink(edict_t *pent); -#endif // FN_DispatchThink - -#ifdef FN_DispatchUse -void FN_DispatchUse(edict_t *pentUser, edict_t *pentOther); -#endif // FN_DispatchUse - -#ifdef FN_DispatchTouch -void FN_DispatchTouch(edict_t *pentTouched, edict_t *pentOther); -#endif // FN_DispatchTouch - -#ifdef FN_DispatchBlocked -void FN_DispatchBlocked(edict_t *pentBlocked, edict_t *pentOther); -#endif // FN_DispatchBlocked - -#ifdef FN_DispatchKeyValue -void FN_DispatchKeyValue(edict_t *pentKeyvalue, KeyValueData *pkvd); -#endif // FN_DispatchKeyValue - -#ifdef FN_DispatchSave -void FN_DispatchSave(edict_t *pent, SAVERESTOREDATA *pSaveData); -#endif // FN_DispatchSave - -#ifdef FN_DispatchRestore -int FN_DispatchRestore(edict_t *pent, SAVERESTOREDATA *pSaveData, int globalEntity); -#endif // FN_DispatchRestore - -#ifdef FN_DispatchObjectCollsionBox -void FN_DispatchObjectCollsionBox(edict_t *pent); -#endif // FN_DispatchObjectCollsionBox - -#ifdef FN_SaveWriteFields -void FN_SaveWriteFields(SAVERESTOREDATA *pSaveData, const char *pname, void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount); -#endif // FN_SaveWriteFields - -#ifdef FN_SaveReadFields -void FN_SaveReadFields(SAVERESTOREDATA *pSaveData, const char *pname, void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount); -#endif // FN_SaveReadFields - -#ifdef FN_SaveGlobalState -void FN_SaveGlobalState(SAVERESTOREDATA *pSaveData); -#endif // FN_SaveGlobalState - -#ifdef FN_RestoreGlobalState -void FN_RestoreGlobalState(SAVERESTOREDATA *pSaveData); -#endif // FN_RestoreGlobalState - -#ifdef FN_ResetGlobalState -void FN_ResetGlobalState(void); -#endif // FN_ResetGlobalState - -#ifdef FN_ClientConnect -BOOL FN_ClientConnect(edict_t *pEntity, const char *pszName, const char *pszAddress, char szRejectReason[ 128 ]); -#endif // FN_ClientConnect - -#ifdef FN_ClientDisconnect -void FN_ClientDisconnect(edict_t *pEntity); -#endif // FN_ClientDisconnect - -#ifdef FN_ClientKill -void FN_ClientKill(edict_t *pEntity); -#endif // FN_ClientKill - -#ifdef FN_ClientPutInServer -void FN_ClientPutInServer(edict_t *pEntity); -#endif // FN_ClientPutInServer - -#ifdef FN_ClientCommand -void FN_ClientCommand(edict_t *pEntity); -#endif // FN_ClientCommand - -#ifdef FN_ClientUserInfoChanged -void FN_ClientUserInfoChanged(edict_t *pEntity, char *infobuffer); -#endif // FN_ClientUserInfoChanged - -#ifdef FN_ServerActivate -void FN_ServerActivate(edict_t *pEdictList, int edictCount, int clientMax); -#endif // FN_ServerActivate - -#ifdef FN_ServerDeactivate -void FN_ServerDeactivate(void); -#endif // FN_ServerDeactivate - -#ifdef FN_PlayerPreThink -void FN_PlayerPreThink(edict_t *pEntity); -#endif // FN_PlayerPreThink - -#ifdef FN_PlayerPostThink -void FN_PlayerPostThink(edict_t *pEntity); -#endif // FN_PlayerPostThink - -#ifdef FN_StartFrame -void FN_StartFrame(void); -#endif // FN_StartFrame - -#ifdef FN_ParmsNewLevel -void FN_ParmsNewLevel(void); -#endif // FN_ParmsNewLevel - -#ifdef FN_ParmsChangeLevel -void FN_ParmsChangeLevel(void); -#endif // FN_ParmsChangeLevel - -#ifdef FN_GetGameDescription -const char *FN_GetGameDescription(void); -#endif // FN_GetGameDescription - -#ifdef FN_PlayerCustomization -void FN_PlayerCustomization(edict_t *pEntity, customization_t *pCust); -#endif // FN_PlayerCustomization - -#ifdef FN_SpectatorConnect -void FN_SpectatorConnect(edict_t *pEntity); -#endif // FN_SpectatorConnect - -#ifdef FN_SpectatorDisconnect -void FN_SpectatorDisconnect(edict_t *pEntity); -#endif // FN_SpectatorDisconnect - -#ifdef FN_SpectatorThink -void FN_SpectatorThink(edict_t *pEntity); -#endif // FN_SpectatorThink - -#ifdef FN_Sys_Error -void FN_Sys_Error(const char *error_string); -#endif // FN_Sys_Error - -#ifdef FN_PM_Move -void FN_PM_Move(struct playermove_s *ppmove, int server); -#endif // FN_PM_Move - -#ifdef FN_PM_Init -void FN_PM_Init(struct playermove_s *ppmove); -#endif // FN_PM_Init - -#ifdef FN_PM_FindTextureType -char FN_PM_FindTextureType(char *name); -#endif // FN_PM_FindTextureType - -#ifdef FN_SetupVisibility -void FN_SetupVisibility(edict_t *pViewEntity, edict_t *pClient, unsigned char **pvs, unsigned char **pas); -#endif // FN_SetupVisibility - -#ifdef FN_UpdateClientData -void FN_UpdateClientData(const struct edict_s *ent, int sendweapons, struct clientdata_s *cd); -#endif // FN_UpdateClientData - -#ifdef FN_AddToFullPack -int FN_AddToFullPack(struct entity_state_s *state, int e, edict_t *ent, edict_t *host, int hostflags, int player, unsigned char *pSet); -#endif // FN_AddToFullPack - -#ifdef FN_CreateBaseline -void FN_CreateBaseline(int player, int eindex, struct entity_state_s *baseline, struct edict_s *entity, int playermodelindex, vec3_t player_mins, vec3_t player_maxs); -#endif // FN_CreateBaseline - -#ifdef FN_RegisterEncoders -void FN_RegisterEncoders(void); -#endif // FN_RegisterEncoders - -#ifdef FN_GetWeaponData -int FN_GetWeaponData(struct edict_s *player, struct weapon_data_s *info); -#endif // FN_GetWeaponData - -#ifdef FN_CmdStart -void FN_CmdStart(const edict_t *player, const struct usercmd_s *cmd, unsigned int random_seed); -#endif // FN_CmdStart - -#ifdef FN_CmdEnd -void FN_CmdEnd(const edict_t *player); -#endif // FN_CmdEnd - -#ifdef FN_ConnectionlessPacket -int FN_ConnectionlessPacket(const struct netadr_s *net_from, const char *args, char *response_buffer, int *response_buffer_size); -#endif // FN_ConnectionlessPacket - -#ifdef FN_GetHullBounds -int FN_GetHullBounds(int hullnumber, float *mins, float *maxs); -#endif // FN_GetHullBounds - -#ifdef FN_CreateInstancedBaselines -void FN_CreateInstancedBaselines(void); -#endif // FN_CreateInstancedBaselines - -#ifdef FN_InconsistentFile -int FN_InconsistentFile(const edict_t *player, const char *filename, char *disconnect_message); -#endif // FN_InconsistentFile - -#ifdef FN_AllowLagCompensation -int FN_AllowLagCompensation(void); -#endif // FN_AllowLagCompensation - - - - -#ifdef FN_GameDLLInit_Post -void FN_GameDLLInit_Post(void); -#endif // FN_GameDLLInit_Post - -#ifdef FN_DispatchSpawn_Post -int FN_DispatchSpawn_Post(edict_t *pent); -#endif // FN_DispatchSpawn_Post - -#ifdef FN_DispatchThink_Post -void FN_DispatchThink_Post(edict_t *pent); -#endif // FN_DispatchThink_Post - -#ifdef FN_DispatchUse_Post -void FN_DispatchUse_Post(edict_t *pentUser, edict_t *pentOther); -#endif // FN_DispatchUse_Post - -#ifdef FN_DispatchTouch_Post -void FN_DispatchTouch_Post(edict_t *pentTouched, edict_t *pentOther); -#endif // FN_DispatchTouch_Post - -#ifdef FN_DispatchBlocked_Post -void FN_DispatchBlocked_Post(edict_t *pentBlocked, edict_t *pentOther); -#endif // FN_DispatchBlocked_Post - -#ifdef FN_DispatchKeyValue_Post -void FN_DispatchKeyValue_Post(edict_t *pentKeyvalue, KeyValueData *pkvd); -#endif // FN_DispatchKeyValue_Post - -#ifdef FN_DispatchSave_Post -void FN_DispatchSave_Post(edict_t *pent, SAVERESTOREDATA *pSaveData); -#endif // FN_DispatchSave_Post - -#ifdef FN_DispatchRestore_Post -int FN_DispatchRestore_Post(edict_t *pent, SAVERESTOREDATA *pSaveData, int globalEntity); -#endif // FN_DispatchRestore_Post - -#ifdef FN_DispatchObjectCollsionBox_Post -void FN_DispatchObjectCollsionBox_Post(edict_t *pent); -#endif // FN_DispatchObjectCollsionBox_Post - -#ifdef FN_SaveWriteFields_Post -void FN_SaveWriteFields_Post(SAVERESTOREDATA *pSaveData, const char *pname, void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount); -#endif // FN_SaveWriteFields_Post - -#ifdef FN_SaveReadFields_Post -void FN_SaveReadFields_Post(SAVERESTOREDATA *pSaveData, const char *pname, void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount); -#endif // FN_SaveReadFields_Post - -#ifdef FN_SaveGlobalState_Post -void FN_SaveGlobalState_Post(SAVERESTOREDATA *pSaveData); -#endif // FN_SaveGlobalState_Post - -#ifdef FN_RestoreGlobalState_Post -void FN_RestoreGlobalState_Post(SAVERESTOREDATA *pSaveData); -#endif // FN_RestoreGlobalState_Post - -#ifdef FN_ResetGlobalState_Post -void FN_ResetGlobalState_Post(void); -#endif // FN_ResetGlobalState_Post - -#ifdef FN_ClientConnect_Post -BOOL FN_ClientConnect_Post(edict_t *pEntity, const char *pszName, const char *pszAddress, char szRejectReason[ 128 ]); -#endif // FN_ClientConnect_Post - -#ifdef FN_ClientDisconnect_Post -void FN_ClientDisconnect_Post(edict_t *pEntity); -#endif // FN_ClientDisconnect_Post - -#ifdef FN_ClientKill_Post -void FN_ClientKill_Post(edict_t *pEntity); -#endif // FN_ClientKill_Post - -#ifdef FN_ClientPutInServer_Post -void FN_ClientPutInServer_Post(edict_t *pEntity); -#endif // FN_ClientPutInServer_Post - -#ifdef FN_ClientCommand_Post -void FN_ClientCommand_Post(edict_t *pEntity); -#endif // FN_ClientCommand_Post - -#ifdef FN_ClientUserInfoChanged_Post -void FN_ClientUserInfoChanged_Post(edict_t *pEntity, char *infobuffer); -#endif // FN_ClientUserInfoChanged_Post - -#ifdef FN_ServerActivate_Post -void FN_ServerActivate_Post(edict_t *pEdictList, int edictCount, int clientMax); -#endif // FN_ServerActivate_Post - -#ifdef FN_ServerDeactivate_Post -void FN_ServerDeactivate_Post(void); -#endif // FN_ServerDeactivate_Post - -#ifdef FN_PlayerPreThink_Post -void FN_PlayerPreThink_Post(edict_t *pEntity); -#endif // FN_PlayerPreThink_Post - -#ifdef FN_PlayerPostThink_Post -void FN_PlayerPostThink_Post(edict_t *pEntity); -#endif // FN_PlayerPostThink_Post - -#ifdef FN_StartFrame_Post -void FN_StartFrame_Post(void); -#endif // FN_StartFrame_Post - -#ifdef FN_ParmsNewLevel_Post -void FN_ParmsNewLevel_Post(void); -#endif // FN_ParmsNewLevel_Post - -#ifdef FN_ParmsChangeLevel_Post -void FN_ParmsChangeLevel_Post(void); -#endif // FN_ParmsChangeLevel_Post - -#ifdef FN_GetGameDescription_Post -const char *FN_GetGameDescription_Post(void); -#endif // FN_GetGameDescription_Post - -#ifdef FN_PlayerCustomization_Post -void FN_PlayerCustomization_Post(edict_t *pEntity, customization_t *pCust); -#endif // FN_PlayerCustomization_Post - -#ifdef FN_SpectatorConnect_Post -void FN_SpectatorConnect_Post(edict_t *pEntity); -#endif // FN_SpectatorConnect_Post - -#ifdef FN_SpectatorDisconnect_Post -void FN_SpectatorDisconnect_Post(edict_t *pEntity); -#endif // FN_SpectatorDisconnect_Post - -#ifdef FN_SpectatorThink_Post -void FN_SpectatorThink_Post(edict_t *pEntity); -#endif // FN_SpectatorThink_Post - -#ifdef FN_Sys_Error_Post -void FN_Sys_Error_Post(const char *error_string); -#endif // FN_Sys_Error_Post - -#ifdef FN_PM_Move_Post -void FN_PM_Move_Post(struct playermove_s *ppmove, int server); -#endif // FN_PM_Move_Post - -#ifdef FN_PM_Init_Post -void FN_PM_Init_Post(struct playermove_s *ppmove); -#endif // FN_PM_Init_Post - -#ifdef FN_PM_FindTextureType_Post -char FN_PM_FindTextureType_Post(char *name); -#endif // FN_PM_FindTextureType_Post - -#ifdef FN_SetupVisibility_Post -void FN_SetupVisibility_Post(edict_t *pViewEntity, edict_t *pClient, unsigned char **pvs, unsigned char **pas); -#endif // FN_SetupVisibility_Post - -#ifdef FN_UpdateClientData_Post -void FN_UpdateClientData_Post(const struct edict_s *ent, int sendweapons, struct clientdata_s *cd); -#endif // FN_UpdateClientData_Post - -#ifdef FN_AddToFullPack_Post -int FN_AddToFullPack_Post(struct entity_state_s *state, int e, edict_t *ent, edict_t *host, int hostflags, int player, unsigned char *pSet); -#endif // FN_AddToFullPack_Post - -#ifdef FN_CreateBaseline_Post -void FN_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); -#endif // FN_CreateBaseline_Post - -#ifdef FN_RegisterEncoders_Post -void FN_RegisterEncoders_Post(void); -#endif // FN_RegisterEncoders_Post - -#ifdef FN_GetWeaponData_Post -int FN_GetWeaponData_Post(struct edict_s *player, struct weapon_data_s *info); -#endif // FN_GetWeaponData_Post - -#ifdef FN_CmdStart_Post -void FN_CmdStart_Post(const edict_t *player, const struct usercmd_s *cmd, unsigned int random_seed); -#endif // FN_CmdStart_Post - -#ifdef FN_CmdEnd_Post -void FN_CmdEnd_Post(const edict_t *player); -#endif // FN_CmdEnd_Post - -#ifdef FN_ConnectionlessPacket_Post -int FN_ConnectionlessPacket_Post(const struct netadr_s *net_from, const char *args, char *response_buffer, int *response_buffer_size); -#endif // FN_ConnectionlessPacket_Post - -#ifdef FN_GetHullBounds_Post -int FN_GetHullBounds_Post(int hullnumber, float *mins, float *maxs); -#endif // FN_GetHullBounds_Post - -#ifdef FN_CreateInstancedBaselines_Post -void FN_CreateInstancedBaselines_Post(void); -#endif // FN_CreateInstancedBaselines_Post - -#ifdef FN_InconsistentFile_Post -int FN_InconsistentFile_Post(const edict_t *player, const char *filename, char *disconnect_message); -#endif // FN_InconsistentFile_Post - -#ifdef FN_AllowLagCompensation_Post -int FN_AllowLagCompensation_Post(void); -#endif // FN_AllowLagCompensation_Post - - - -#ifdef FN_PrecacheModel -int FN_PrecacheModel(char *s); -#endif // FN_PrecacheModel - -#ifdef FN_PrecacheSound -int FN_PrecacheSound(char *s); -#endif // FN_PrecacheSound - -#ifdef FN_SetModel -void FN_SetModel(edict_t *e, const char *m); -#endif // FN_SetModel - -#ifdef FN_ModelIndex -int FN_ModelIndex(const char *m); -#endif // FN_ModelIndex - -#ifdef FN_ModelFrames -int FN_ModelFrames(int modelIndex); -#endif // FN_ModelFrames - -#ifdef FN_SetSize -void FN_SetSize(edict_t *e, const float *rgflMin, const float *rgflMax); -#endif // FN_SetSize - -#ifdef FN_ChangeLevel -void FN_ChangeLevel(char *s1, char *s2); -#endif // FN_ChangeLevel - -#ifdef FN_GetSpawnParms -void FN_GetSpawnParms(edict_t *ent); -#endif // FN_GetSpawnParms - -#ifdef FN_SaveSpawnParms -void FN_SaveSpawnParms(edict_t *ent); -#endif // FN_SaveSpawnParms - -#ifdef FN_VecToYaw -float FN_VecToYaw(const float *rgflVector); -#endif // FN_VecToYaw - -#ifdef FN_VecToAngles -void FN_VecToAngles(const float *rgflVectorIn, float *rgflVectorOut); -#endif // FN_VecToAngles - -#ifdef FN_MoveToOrigin -void FN_MoveToOrigin(edict_t *ent, const float *pflGoal, float dist, int iMoveType); -#endif // FN_MoveToOrigin - -#ifdef FN_ChangeYaw -void FN_ChangeYaw(edict_t *ent); -#endif // FN_ChangeYaw - -#ifdef FN_ChangePitch -void FN_ChangePitch(edict_t *ent); -#endif // FN_ChangePitch - -#ifdef FN_FindEntityByString -edict_t *FN_FindEntityByString(edict_t *pEdictStartSearchAfter, const char *pszField, const char *pszValue); -#endif // FN_FindEntityByString - -#ifdef FN_GetEntityIllum -int FN_GetEntityIllum(edict_t *pEnt); -#endif // FN_GetEntityIllum - -#ifdef FN_FindEntityInSphere -edict_t *FN_FindEntityInSphere(edict_t *pEdictStartSearchAfter, const float *org, float rad); -#endif // FN_FindEntityInSphere - -#ifdef FN_FindClientInPVS -edict_t *FN_FindClientInPVS(edict_t *pEdict); -#endif // FN_FindClientInPVS - -#ifdef FN_EntitiesInPVS -edict_t *FN_EntitiesInPVS(edict_t *pplayer); -#endif // FN_EntitiesInPVS - -#ifdef FN_MakeVectors -void FN_MakeVectors(const float *rgflVector); -#endif // FN_MakeVectors - -#ifdef FN_AngleVectors -void FN_AngleVectors(const float *rgflVector, float *forward, float *right, float *up); -#endif // FN_AngleVectors - -#ifdef FN_CreateEntity -edict_t *FN_CreateEntity(void); -#endif // FN_CreateEntity - -#ifdef FN_RemoveEntity -void FN_RemoveEntity(edict_t *e); -#endif // FN_RemoveEntity - -#ifdef FN_CreateNamedEntity -edict_t *FN_CreateNamedEntity(int className); -#endif // FN_CreateNamedEntity - -#ifdef FN_MakeStatic -void FN_MakeStatic(edict_t *ent); -#endif // FN_MakeStatic - -#ifdef FN_EntIsOnFloor -int FN_EntIsOnFloor(edict_t *ent); -#endif // FN_EntIsOnFloor - -#ifdef FN_DropToFloor -int FN_DropToFloor(edict_t *ent); -#endif // FN_DropToFloor - -#ifdef FN_WalkMove -int FN_WalkMove(edict_t *ent, float yaw, float dist, int iMode); -#endif // FN_WalkMove - -#ifdef FN_SetOrigin -void FN_SetOrigin(edict_t *e, const float *rgflOrigin); -#endif // FN_SetOrigin - -#ifdef FN_EmitSound -void FN_EmitSound(edict_t *entity, int channel, const char *sample, /*int*/float volume, float attenuation, int fFlags, int pitch); -#endif // FN_EmitSound - -#ifdef FN_EmitAmbientSound -void FN_EmitAmbientSound(edict_t *entity, float *pos, const char *samp, float vol, float attenuation, int fFlags, int pitch); -#endif // FN_EmitAmbientSound - -#ifdef FN_TraceLine -void FN_TraceLine(const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr); -#endif // FN_TraceLine - -#ifdef FN_TraceToss -void FN_TraceToss(edict_t *pent, edict_t *pentToIgnore, TraceResult *ptr); -#endif // FN_TraceToss - -#ifdef FN_TraceMonsterHull -int FN_TraceMonsterHull(edict_t *pEdict, const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr); -#endif // FN_TraceMonsterHull - -#ifdef FN_TraceHull -void FN_TraceHull(const float *v1, const float *v2, int fNoMonsters, int hullNumber, edict_t *pentToSkip, TraceResult *ptr); -#endif // FN_TraceHull - -#ifdef FN_TraceModel -void FN_TraceModel(const float *v1, const float *v2, int hullNumber, edict_t *pent, TraceResult *ptr); -#endif // FN_TraceModel - -#ifdef FN_TraceTexture -const char *FN_TraceTexture(edict_t *pTextureEntity, const float *v1, const float *v2 ); -#endif // FN_TraceTexture - -#ifdef FN_TraceSphere -void FN_TraceSphere(const float *v1, const float *v2, int fNoMonsters, float radius, edict_t *pentToSkip, TraceResult *ptr); -#endif // FN_TraceSphere - -#ifdef FN_GetAimVector -void FN_GetAimVector(edict_t *ent, float speed, float *rgflReturn); -#endif // FN_GetAimVector - -#ifdef FN_ServerCommand -void FN_ServerCommand(char *str); -#endif // FN_ServerCommand - -#ifdef FN_ServerExecute -void FN_ServerExecute(void); -#endif // FN_ServerExecute - -#ifdef FN_engClientCommand -void FN_engClientCommand(edict_t *pEdict, char *szFmt, ...); -#endif // FN_engClientCommand - -#ifdef FN_ParticleEffect -void FN_ParticleEffect(const float *org, const float *dir, float color, float count); -#endif // FN_ParticleEffect - -#ifdef FN_LightStyle -void FN_LightStyle(int style, char *val); -#endif // FN_LightStyle - -#ifdef FN_DecalIndex -int FN_DecalIndex(const char *name); -#endif // FN_DecalIndex - -#ifdef FN_PointContents -int FN_PointContents(const float *rgflVector); -#endif // FN_PointContents - -#ifdef FN_MessageBegin -void FN_MessageBegin(int msg_dest, int msg_type, const float *pOrigin, edict_t *ed); -#endif // FN_MessageBegin - -#ifdef FN_MessageEnd -void FN_MessageEnd(void); -#endif // FN_MessageEnd - -#ifdef FN_WriteByte -void FN_WriteByte(int iValue); -#endif // FN_WriteByte - -#ifdef FN_WriteChar -void FN_WriteChar(int iValue); -#endif // FN_WriteChar - -#ifdef FN_WriteShort -void FN_WriteShort(int iValue); -#endif // FN_WriteShort - -#ifdef FN_WriteLong -void FN_WriteLong(int iValue); -#endif // FN_WriteLong - -#ifdef FN_WriteAngle -void FN_WriteAngle(float flValue); -#endif // FN_WriteAngle - -#ifdef FN_WriteCoord -void FN_WriteCoord(float flValue); -#endif // FN_WriteCoord - -#ifdef FN_WriteString -void FN_WriteString(const char *sz); -#endif // FN_WriteString - -#ifdef FN_WriteEntity -void FN_WriteEntity(int iValue); -#endif // FN_WriteEntity - -#ifdef FN_CVarRegister -void FN_CVarRegister(cvar_t *pCvar); -#endif // FN_CVarRegister - -#ifdef FN_CVarGetFloat -float FN_CVarGetFloat(const char *szVarName); -#endif // FN_CVarGetFloat - -#ifdef FN_CVarGetString -const char *FN_CVarGetString(const char *szVarName); -#endif // FN_CVarGetString - -#ifdef FN_CVarSetFloat -void FN_CVarSetFloat(const char *szVarName, float flValue); -#endif // FN_CVarSetFloat - -#ifdef FN_CVarSetString -void FN_CVarSetString(const char *szVarName, const char *szValue); -#endif // FN_CVarSetString - -#ifdef FN_AlertMessage -void FN_AlertMessage(ALERT_TYPE atype, char *szFmt, ...); -#endif // FN_AlertMessage - -#ifdef FN_EngineFprintf -void FN_EngineFprintf(FILE *pfile, char *szFmt, ...); -#endif // FN_EngineFprintf - -#ifdef FN_PvAllocEntPrivateData -void *FN_PvAllocEntPrivateData(edict_t *pEdict, int32 cb); -#endif // FN_PvAllocEntPrivateData - -#ifdef FN_PvEntPrivateData -void *FN_PvEntPrivateData(edict_t *pEdict); -#endif // FN_PvEntPrivateData - -#ifdef FN_FreeEntPrivateData -void FN_FreeEntPrivateData(edict_t *pEdict); -#endif // FN_FreeEntPrivateData - -#ifdef FN_SzFromIndex -const char *FN_SzFromIndex(int iString); -#endif // FN_SzFromIndex - -#ifdef FN_AllocString -int FN_AllocString(const char *szValue); -#endif // FN_AllocString - -#ifdef FN_GetVarsOfEnt -struct entvars_s *FN_GetVarsOfEnt(edict_t *pEdict); -#endif // FN_GetVarsOfEnt - -#ifdef FN_PEntityOfEntOffset -edict_t *FN_PEntityOfEntOffset(int iEntOffset); -#endif // FN_PEntityOfEntOffset - -#ifdef FN_EntOffsetOfPEntity -int FN_EntOffsetOfPEntity(const edict_t *pEdict); -#endif // FN_EntOffsetOfPEntity - -#ifdef FN_IndexOfEdict -int FN_IndexOfEdict(const edict_t *pEdict); -#endif // FN_IndexOfEdict - -#ifdef FN_PEntityOfEntIndex -edict_t *FN_PEntityOfEntIndex(int iEntIndex); -#endif // FN_PEntityOfEntIndex - -#ifdef FN_FindEntityByVars -edict_t *FN_FindEntityByVars(struct entvars_s *pvars); -#endif // FN_FindEntityByVars - -#ifdef FN_GetModelPtr -void *FN_GetModelPtr(edict_t *pEdict); -#endif // FN_GetModelPtr - -#ifdef FN_RegUserMsg -int FN_RegUserMsg(const char *pszName, int iSize); -#endif // FN_RegUserMsg - -#ifdef FN_AnimationAutomove -void FN_AnimationAutomove(const edict_t *pEdict, float flTime); -#endif // FN_AnimationAutomove - -#ifdef FN_GetBonePosition -void FN_GetBonePosition(const edict_t *pEdict, int iBone, float *rgflOrigin, float *rgflAngles); -#endif // FN_GetBonePosition - -#ifdef FN_FunctionFromName -unsigned long FN_FunctionFromName(const char *pName); -#endif // FN_FunctionFromName - -#ifdef FN_NameForFunction -const char *FN_NameForFunction(unsigned long function); -#endif // FN_NameForFunction - -#ifdef FN_ClientPrintf -void FN_ClientPrintf(edict_t *pEdict, PRINT_TYPE ptype, const char *szMsg); -#endif // FN_ClientPrintf - -#ifdef FN_ServerPrint -void FN_ServerPrint(const char *szMsg); -#endif // FN_ServerPrint - -#ifdef FN_Cmd_Args -const char *FN_Cmd_Args(void); -#endif // FN_Cmd_Args - -#ifdef FN_Cmd_Argv -const char *FN_Cmd_Argv(int argc); -#endif // FN_Cmd_Argv - -#ifdef FN_Cmd_Argc -int FN_Cmd_Argc(void); -#endif // FN_Cmd_Argc - -#ifdef FN_GetAttachment -void FN_GetAttachment(const edict_t *pEdict, int iAttachment, float *rgflOrigin, float *rgflAngles ); -#endif // FN_GetAttachment - -#ifdef FN_CRC32_Init -void FN_CRC32_Init(CRC32_t *pulCRC); -#endif // FN_CRC32_Init - -#ifdef FN_CRC32_ProcessBuffer -void FN_CRC32_ProcessBuffer(CRC32_t *pulCRC, void *p, int len); -#endif // FN_CRC32_ProcessBuffer - -#ifdef FN_CRC32_ProcessByte -void FN_CRC32_ProcessByte(CRC32_t *pulCRC, unsigned char ch); -#endif // FN_CRC32_ProcessByte - -#ifdef FN_CRC32_Final -CRC32_t FN_CRC32_Final(CRC32_t pulCRC); -#endif // FN_CRC32_Final - -#ifdef FN_RandomLong -long FN_RandomLong(long lLow, long lHigh); -#endif // FN_RandomLong - -#ifdef FN_RandomFloat -float FN_RandomFloat(float flLow, float flHigh); -#endif // FN_RandomFloat - -#ifdef FN_SetView -void FN_SetView(const edict_t *pClient, const edict_t *pViewent); -#endif // FN_SetView - -#ifdef FN_Time -float FN_Time(void); -#endif // FN_Time - -#ifdef FN_CrosshairAngle -void FN_CrosshairAngle(const edict_t *pClient, float pitch, float yaw); -#endif // FN_CrosshairAngle - -#ifdef FN_LoadFileForMe -byte *FN_LoadFileForMe(char *filename, int *pLength); -#endif // FN_LoadFileForMe - -#ifdef FN_FreeFile -void FN_FreeFile(void *buffer); -#endif // FN_FreeFile - -#ifdef FN_EndSection -void FN_EndSection(const char *pszSectionName); -#endif // FN_EndSection - -#ifdef FN_CompareFileTime -int FN_CompareFileTime(char *filename1, char *filename2, int *iCompare); -#endif // FN_CompareFileTime - -#ifdef FN_GetGameDir -void FN_GetGameDir(char *szGetGameDir); -#endif // FN_GetGameDir - -#ifdef FN_Cvar_RegisterVariable -void FN_Cvar_RegisterVariable(cvar_t *variable); -#endif // FN_Cvar_RegisterVariable - -#ifdef FN_FadeClientVolume -void FN_FadeClientVolume(const edict_t *pEdict, int fadePercent, int fadeOutSeconds, int holdTime, int fadeInSeconds); -#endif // FN_FadeClientVolume - -#ifdef FN_SetClientMaxspeed -void FN_SetClientMaxspeed(const edict_t *pEdict, float fNewMaxspeed); -#endif // FN_SetClientMaxspeed - -#ifdef FN_CreateFakeClient -edict_t *FN_CreateFakeClient(const char *netname); -#endif // FN_CreateFakeClient - -#ifdef FN_RunPlayerMove -void FN_RunPlayerMove(edict_t *fakeclient, const float *viewangles, float forwardmove, float sidemove, float upmove, unsigned short buttons, byte impulse, byte msec); -#endif // FN_RunPlayerMove - -#ifdef FN_NumberOfEntities -int FN_NumberOfEntities(void); -#endif // FN_NumberOfEntities - -#ifdef FN_GetInfoKeyBuffer -char *FN_GetInfoKeyBuffer(edict_t *e); -#endif // FN_GetInfoKeyBuffer - -#ifdef FN_InfoKeyValue -char *FN_InfoKeyValue(char *infobuffer, char *key); -#endif // FN_InfoKeyValue - -#ifdef FN_SetKeyValue -void FN_SetKeyValue(char *infobuffer, char *key, char *value); -#endif // FN_SetKeyValue - -#ifdef FN_SetClientKeyValue -void FN_SetClientKeyValue(int clientIndex, char *infobuffer, char *key, char *value); -#endif // FN_SetClientKeyValue - -#ifdef FN_IsMapValid -int FN_IsMapValid(char *filename); -#endif // FN_IsMapValid - -#ifdef FN_StaticDecal -void FN_StaticDecal(const float *origin, int decalIndex, int entityIndex, int modelIndex); -#endif // FN_StaticDecal - -#ifdef FN_PrecacheGeneric -int FN_PrecacheGeneric(char *s); -#endif // FN_PrecacheGeneric - -#ifdef FN_GetPlayerUserId -int FN_GetPlayerUserId(edict_t *e ); -#endif // FN_GetPlayerUserId - -#ifdef FN_BuildSoundMsg -void FN_BuildSoundMsg(edict_t *entity, int channel, const char *sample, /*int*/float volume, float attenuation, int fFlags, int pitch, int msg_dest, int msg_type, const float *pOrigin, edict_t *ed); -#endif // FN_BuildSoundMsg - -#ifdef FN_IsDedicatedServer -int FN_IsDedicatedServer(void); -#endif // FN_IsDedicatedServer - -#ifdef FN_CVarGetPointer -cvar_t *FN_CVarGetPointer(const char *szVarName); -#endif // FN_CVarGetPointer - -#ifdef FN_GetPlayerWONId -unsigned int FN_GetPlayerWONId(edict_t *e); -#endif // FN_GetPlayerWONId - -#ifdef FN_Info_RemoveKey -void FN_Info_RemoveKey( char *s, const char *key); -#endif // FN_Info_RemoveKey - -#ifdef FN_GetPhysicsKeyValue -const char *FN_GetPhysicsKeyValue(const edict_t *pClient, const char *key); -#endif // FN_GetPhysicsKeyValue - -#ifdef FN_SetPhysicsKeyValue -void FN_SetPhysicsKeyValue(const edict_t *pClient, const char *key, const char *value); -#endif // FN_SetPhysicsKeyValue - -#ifdef FN_GetPhysicsInfoString -const char *FN_GetPhysicsInfoString( const edict_t *pClient); -#endif // FN_GetPhysicsInfoString - -#ifdef FN_PrecacheEvent -unsigned short FN_PrecacheEvent(int type, const char *psz); -#endif // FN_PrecacheEvent - -#ifdef FN_PlaybackEvent -void FN_PlaybackEvent(int flags, const edict_t *pInvoker, unsigned short eventindex, float delay, float *origin, float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2); -#endif // FN_PlaybackEvent - -#ifdef FN_SetFatPVS -unsigned char *FN_SetFatPVS(float *org); -#endif // FN_SetFatPVS - -#ifdef FN_SetFatPAS -unsigned char *FN_SetFatPAS(float *org); -#endif // FN_SetFatPAS - -#ifdef FN_CheckVisibility -int FN_CheckVisibility(const edict_t *entity, unsigned char *pset); -#endif // FN_CheckVisibility - -#ifdef FN_DeltaSetField -void FN_DeltaSetField(struct delta_s *pFields, const char *fieldname); -#endif // FN_DeltaSetField - -#ifdef FN_DeltaUnsetField -void FN_DeltaUnsetField(struct delta_s *pFields, const char *fieldname); -#endif // FN_DeltaUnsetField - -#ifdef FN_DeltaAddEncoder -void FN_DeltaAddEncoder(char *name, void (*conditionalencode)( struct delta_s *pFields, const unsigned char *from, const unsigned char *to ) ); -#endif // FN_DeltaAddEncoder - -#ifdef FN_GetCurrentPlayer -int FN_GetCurrentPlayer(void); -#endif // FN_GetCurrentPlayer - -#ifdef FN_CanSkipPlayer -int FN_CanSkipPlayer(const edict_t *player); -#endif // FN_CanSkipPlayer - -#ifdef FN_DeltaFindField -int FN_DeltaFindField(struct delta_s *pFields, const char *fieldname); -#endif // FN_DeltaFindField - -#ifdef FN_DeltaSetFieldByIndex -void FN_DeltaSetFieldByIndex(struct delta_s *pFields, int fieldNumber); -#endif // FN_DeltaSetFieldByIndex - -#ifdef FN_DeltaUnsetFieldByIndex -void FN_DeltaUnsetFieldByIndex(struct delta_s *pFields, int fieldNumber); -#endif // FN_DeltaUnsetFieldByIndex - -#ifdef FN_SetGroupMask -void FN_SetGroupMask(int mask, int op); -#endif // FN_SetGroupMask - -#ifdef FN_engCreateInstancedBaseline -int FN_engCreateInstancedBaseline(int classname, struct entity_state_s *baseline); -#endif // FN_engCreateInstancedBaseline - -#ifdef FN_Cvar_DirectSet -void FN_Cvar_DirectSet(struct cvar_s *var, char *value); -#endif // FN_Cvar_DirectSet - -#ifdef FN_ForceUnmodified -void FN_ForceUnmodified(FORCE_TYPE type, float *mins, float *maxs, const char *filename); -#endif // FN_ForceUnmodified - -#ifdef FN_GetPlayerStats -void FN_GetPlayerStats(const edict_t *pClient, int *ping, int *packet_loss); -#endif // FN_GetPlayerStats - -#ifdef FN_AddServerCommand -void FN_AddServerCommand(char *cmd_name, void (*function) (void)); -#endif // FN_AddServerCommand - -#ifdef FN_Voice_GetClientListening -qboolean FN_Voice_GetClientListening(int iReceiver, int iSender); -#endif // FN_Voice_GetClientListening - -#ifdef FN_Voice_SetClientListening -qboolean FN_Voice_SetClientListening(int iReceiver, int iSender, qboolean bListen); -#endif // FN_Voice_SetClientListening - -#ifdef FN_GetPlayerAuthId -const char *FN_GetPlayerAuthId(edict_t *e); -#endif // FN_GetPlayerAuthId - - - - - - -#ifdef FN_PrecacheModel_Post -int FN_PrecacheModel_Post(char *s); -#endif // FN_PrecacheModel_Post - -#ifdef FN_PrecacheSound_Post -int FN_PrecacheSound_Post(char *s); -#endif // FN_PrecacheSound_Post - -#ifdef FN_SetModel_Post -void FN_SetModel_Post(edict_t *e, const char *m); -#endif // FN_SetModel_Post - -#ifdef FN_ModelIndex_Post -int FN_ModelIndex_Post(const char *m); -#endif // FN_ModelIndex_Post - -#ifdef FN_ModelFrames_Post -int FN_ModelFrames_Post(int modelIndex); -#endif // FN_ModelFrames_Post - -#ifdef FN_SetSize_Post -void FN_SetSize_Post(edict_t *e, const float *rgflMin, const float *rgflMax); -#endif // FN_SetSize_Post - -#ifdef FN_ChangeLevel_Post -void FN_ChangeLevel_Post(char *s1, char *s2); -#endif // FN_ChangeLevel_Post - -#ifdef FN_GetSpawnParms_Post -void FN_GetSpawnParms_Post(edict_t *ent); -#endif // FN_GetSpawnParms_Post - -#ifdef FN_SaveSpawnParms_Post -void FN_SaveSpawnParms_Post(edict_t *ent); -#endif // FN_SaveSpawnParms_Post - -#ifdef FN_VecToYaw_Post -float FN_VecToYaw_Post(const float *rgflVector); -#endif // FN_VecToYaw_Post - -#ifdef FN_VecToAngles_Post -void FN_VecToAngles_Post(const float *rgflVectorIn, float *rgflVectorOut); -#endif // FN_VecToAngles_Post - -#ifdef FN_MoveToOrigin_Post -void FN_MoveToOrigin_Post(edict_t *ent, const float *pflGoal, float dist, int iMoveType); -#endif // FN_MoveToOrigin_Post - -#ifdef FN_ChangeYaw_Post -void FN_ChangeYaw_Post(edict_t *ent); -#endif // FN_ChangeYaw_Post - -#ifdef FN_ChangePitch_Post -void FN_ChangePitch_Post(edict_t *ent); -#endif // FN_ChangePitch_Post - -#ifdef FN_FindEntityByString_Post -edict_t *FN_FindEntityByString_Post(edict_t *pEdictStartSearchAfter, const char *pszField, const char *pszValue); -#endif // FN_FindEntityByString_Post - -#ifdef FN_GetEntityIllum_Post -int FN_GetEntityIllum_Post(edict_t *pEnt); -#endif // FN_GetEntityIllum_Post - -#ifdef FN_FindEntityInSphere_Post -edict_t *FN_FindEntityInSphere_Post(edict_t *pEdictStartSearchAfter, const float *org, float rad); -#endif // FN_FindEntityInSphere_Post - -#ifdef FN_FindClientInPVS_Post -edict_t *FN_FindClientInPVS_Post(edict_t *pEdict); -#endif // FN_FindClientInPVS_Post - -#ifdef FN_EntitiesInPVS_Post -edict_t *FN_EntitiesInPVS_Post(edict_t *pplayer); -#endif // FN_EntitiesInPVS_Post - -#ifdef FN_MakeVectors_Post -void FN_MakeVectors_Post(const float *rgflVector); -#endif // FN_MakeVectors_Post - -#ifdef FN_AngleVectors_Post -void FN_AngleVectors_Post(const float *rgflVector, float *forward, float *right, float *up); -#endif // FN_AngleVectors_Post - -#ifdef FN_CreateEntity_Post -edict_t *FN_CreateEntity_Post(void); -#endif // FN_CreateEntity_Post - -#ifdef FN_RemoveEntity_Post -void FN_RemoveEntity_Post(edict_t *e); -#endif // FN_RemoveEntity_Post - -#ifdef FN_CreateNamedEntity_Post -edict_t *FN_CreateNamedEntity_Post(int className); -#endif // FN_CreateNamedEntity_Post - -#ifdef FN_MakeStatic_Post -void FN_MakeStatic_Post(edict_t *ent); -#endif // FN_MakeStatic_Post - -#ifdef FN_EntIsOnFloor_Post -int FN_EntIsOnFloor_Post(edict_t *ent); -#endif // FN_EntIsOnFloor_Post - -#ifdef FN_DropToFloor_Post -int FN_DropToFloor_Post(edict_t *ent); -#endif // FN_DropToFloor_Post - -#ifdef FN_WalkMove_Post -int FN_WalkMove_Post(edict_t *ent, float yaw, float dist, int iMode); -#endif // FN_WalkMove_Post - -#ifdef FN_SetOrigin_Post -void FN_SetOrigin_Post(edict_t *e, const float *rgflOrigin); -#endif // FN_SetOrigin_Post - -#ifdef FN_EmitSound_Post -void FN_EmitSound_Post(edict_t *entity, int channel, const char *sample, /*int*/float volume, float attenuation, int fFlags, int pitch); -#endif // FN_EmitSound_Post - -#ifdef FN_EmitAmbientSound_Post -void FN_EmitAmbientSound_Post(edict_t *entity, float *pos, const char *samp, float vol, float attenuation, int fFlags, int pitch); -#endif // FN_EmitAmbientSound_Post - -#ifdef FN_TraceLine_Post -void FN_TraceLine_Post(const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr); -#endif // FN_TraceLine_Post - -#ifdef FN_TraceToss_Post -void FN_TraceToss_Post(edict_t *pent, edict_t *pentToIgnore, TraceResult *ptr); -#endif // FN_TraceToss_Post - -#ifdef FN_TraceMonsterHull_Post -int FN_TraceMonsterHull_Post(edict_t *pEdict, const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr); -#endif // FN_TraceMonsterHull_Post - -#ifdef FN_TraceHull_Post -void FN_TraceHull_Post(const float *v1, const float *v2, int fNoMonsters, int hullNumber, edict_t *pentToSkip, TraceResult *ptr); -#endif // FN_TraceHull_Post - -#ifdef FN_TraceModel_Post -void FN_TraceModel_Post(const float *v1, const float *v2, int hullNumber, edict_t *pent, TraceResult *ptr); -#endif // FN_TraceModel_Post - -#ifdef FN_TraceTexture_Post -const char *FN_TraceTexture_Post(edict_t *pTextureEntity, const float *v1, const float *v2 ); -#endif // FN_TraceTexture_Post - -#ifdef FN_TraceSphere_Post -void FN_TraceSphere_Post(const float *v1, const float *v2, int fNoMonsters, float radius, edict_t *pentToSkip, TraceResult *ptr); -#endif // FN_TraceSphere_Post - -#ifdef FN_GetAimVector_Post -void FN_GetAimVector_Post(edict_t *ent, float speed, float *rgflReturn); -#endif // FN_GetAimVector_Post - -#ifdef FN_ServerCommand_Post -void FN_ServerCommand_Post(char *str); -#endif // FN_ServerCommand_Post - -#ifdef FN_ServerExecute_Post -void FN_ServerExecute_Post(void); -#endif // FN_ServerExecute_Post - -#ifdef FN_engClientCommand_Post -void FN_engClientCommand_Post(edict_t *pEdict, char *szFmt, ...); -#endif // FN_engClientCommand_Post - -#ifdef FN_ParticleEffect_Post -void FN_ParticleEffect_Post(const float *org, const float *dir, float color, float count); -#endif // FN_ParticleEffect_Post - -#ifdef FN_LightStyle_Post -void FN_LightStyle_Post(int style, char *val); -#endif // FN_LightStyle_Post - -#ifdef FN_DecalIndex_Post -int FN_DecalIndex_Post(const char *name); -#endif // FN_DecalIndex_Post - -#ifdef FN_PointContents_Post -int FN_PointContents_Post(const float *rgflVector); -#endif // FN_PointContents_Post - -#ifdef FN_MessageBegin_Post -void FN_MessageBegin_Post(int msg_dest, int msg_type, const float *pOrigin, edict_t *ed); -#endif // FN_MessageBegin_Post - -#ifdef FN_MessageEnd_Post -void FN_MessageEnd_Post(void); -#endif // FN_MessageEnd_Post - -#ifdef FN_WriteByte_Post -void FN_WriteByte_Post(int iValue); -#endif // FN_WriteByte_Post - -#ifdef FN_WriteChar_Post -void FN_WriteChar_Post(int iValue); -#endif // FN_WriteChar_Post - -#ifdef FN_WriteShort_Post -void FN_WriteShort_Post(int iValue); -#endif // FN_WriteShort_Post - -#ifdef FN_WriteLong_Post -void FN_WriteLong_Post(int iValue); -#endif // FN_WriteLong_Post - -#ifdef FN_WriteAngle_Post -void FN_WriteAngle_Post(float flValue); -#endif // FN_WriteAngle_Post - -#ifdef FN_WriteCoord_Post -void FN_WriteCoord_Post(float flValue); -#endif // FN_WriteCoord_Post - -#ifdef FN_WriteString_Post -void FN_WriteString_Post(const char *sz); -#endif // FN_WriteString_Post - -#ifdef FN_WriteEntity_Post -void FN_WriteEntity_Post(int iValue); -#endif // FN_WriteEntity_Post - -#ifdef FN_CVarRegister_Post -void FN_CVarRegister_Post(cvar_t *pCvar); -#endif // FN_CVarRegister_Post - -#ifdef FN_CVarGetFloat_Post -float FN_CVarGetFloat_Post(const char *szVarName); -#endif // FN_CVarGetFloat_Post - -#ifdef FN_CVarGetString_Post -const char *FN_CVarGetString_Post(const char *szVarName); -#endif // FN_CVarGetString_Post - -#ifdef FN_CVarSetFloat_Post -void FN_CVarSetFloat_Post(const char *szVarName, float flValue); -#endif // FN_CVarSetFloat_Post - -#ifdef FN_CVarSetString_Post -void FN_CVarSetString_Post(const char *szVarName, const char *szValue); -#endif // FN_CVarSetString_Post - -#ifdef FN_AlertMessage_Post -void FN_AlertMessage_Post(ALERT_TYPE atype, char *szFmt, ...); -#endif // FN_AlertMessage_Post - -#ifdef FN_EngineFprintf_Post -void FN_EngineFprintf_Post(FILE *pfile, char *szFmt, ...); -#endif // FN_EngineFprintf_Post - -#ifdef FN_PvAllocEntPrivateData_Post -void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, long cb); -#endif // FN_PvAllocEntPrivateData_Post - -#ifdef FN_PvEntPrivateData_Post -void *FN_PvEntPrivateData_Post(edict_t *pEdict); -#endif // FN_PvEntPrivateData_Post - -#ifdef FN_FreeEntPrivateData_Post -void FN_FreeEntPrivateData_Post(edict_t *pEdict); -#endif // FN_FreeEntPrivateData_Post - -#ifdef FN_SzFromIndex_Post -const char *FN_SzFromIndex_Post(int iString); -#endif // FN_SzFromIndex_Post - -#ifdef FN_AllocString_Post -int FN_AllocString_Post(const char *szValue); -#endif // FN_AllocString_Post - -#ifdef FN_GetVarsOfEnt_Post -struct entvars_s *FN_GetVarsOfEnt_Post(edict_t *pEdict); -#endif // FN_GetVarsOfEnt_Post - -#ifdef FN_PEntityOfEntOffset_Post -edict_t *FN_PEntityOfEntOffset_Post(int iEntOffset); -#endif // FN_PEntityOfEntOffset_Post - -#ifdef FN_EntOffsetOfPEntity_Post -int FN_EntOffsetOfPEntity_Post(const edict_t *pEdict); -#endif // FN_EntOffsetOfPEntity_Post - -#ifdef FN_IndexOfEdict_Post -int FN_IndexOfEdict_Post(const edict_t *pEdict); -#endif // FN_IndexOfEdict_Post - -#ifdef FN_PEntityOfEntIndex_Post -edict_t *FN_PEntityOfEntIndex_Post(int iEntIndex); -#endif // FN_PEntityOfEntIndex_Post - -#ifdef FN_FindEntityByVars_Post -edict_t *FN_FindEntityByVars_Post(struct entvars_s *pvars); -#endif // FN_FindEntityByVars_Post - -#ifdef FN_GetModelPtr_Post -void *FN_GetModelPtr_Post(edict_t *pEdict); -#endif // FN_GetModelPtr_Post - -#ifdef FN_RegUserMsg_Post -int FN_RegUserMsg_Post(const char *pszName, int iSize); -#endif // FN_RegUserMsg_Post - -#ifdef FN_AnimationAutomove_Post -void FN_AnimationAutomove_Post(const edict_t *pEdict, float flTime); -#endif // FN_AnimationAutomove_Post - -#ifdef FN_GetBonePosition_Post -void FN_GetBonePosition_Post(const edict_t *pEdict, int iBone, float *rgflOrigin, float *rgflAngles); -#endif // FN_GetBonePosition_Post - -#ifdef FN_FunctionFromName_Post -unsigned long FN_FunctionFromName_Post(const char *pName); -#endif // FN_FunctionFromName_Post - -#ifdef FN_NameForFunction_Post -const char *FN_NameForFunction_Post(unsigned long function); -#endif // FN_NameForFunction_Post - -#ifdef FN_ClientPrintf_Post -void FN_ClientPrintf_Post(edict_t *pEdict, PRINT_TYPE ptype, const char *szMsg); -#endif // FN_ClientPrintf_Post - -#ifdef FN_ServerPrint_Post -void FN_ServerPrint_Post(const char *szMsg); -#endif // FN_ServerPrint_Post - -#ifdef FN_Cmd_Args_Post -const char *FN_Cmd_Args_Post(void); -#endif // FN_Cmd_Args_Post - -#ifdef FN_Cmd_Argv_Post -const char *FN_Cmd_Argv_Post(int argc); -#endif // FN_Cmd_Argv_Post - -#ifdef FN_Cmd_Argc_Post -int FN_Cmd_Argc_Post(void); -#endif // FN_Cmd_Argc_Post - -#ifdef FN_GetAttachment_Post -void FN_GetAttachment_Post(const edict_t *pEdict, int iAttachment, float *rgflOrigin, float *rgflAngles ); -#endif // FN_GetAttachment_Post - -#ifdef FN_CRC32_Init_Post -void FN_CRC32_Init_Post(CRC32_t *pulCRC); -#endif // FN_CRC32_Init_Post - -#ifdef FN_CRC32_ProcessBuffer_Post -void FN_CRC32_ProcessBuffer_Post(CRC32_t *pulCRC, void *p, int len); -#endif // FN_CRC32_ProcessBuffer_Post - -#ifdef FN_CRC32_ProcessByte_Post -void FN_CRC32_ProcessByte_Post(CRC32_t *pulCRC, unsigned char ch); -#endif // FN_CRC32_ProcessByte_Post - -#ifdef FN_CRC32_Final_Post -CRC32_t FN_CRC32_Final_Post(CRC32_t pulCRC); -#endif // FN_CRC32_Final_Post - -#ifdef FN_RandomLong_Post -long FN_RandomLong_Post(long lLow, long lHigh); -#endif // FN_RandomLong_Post - -#ifdef FN_RandomFloat_Post -float FN_RandomFloat_Post(float flLow, float flHigh); -#endif // FN_RandomFloat_Post - -#ifdef FN_SetView_Post -void FN_SetView_Post(const edict_t *pClient, const edict_t *pViewent); -#endif // FN_SetView_Post - -#ifdef FN_Time_Post -float FN_Time_Post(void); -#endif // FN_Time_Post - -#ifdef FN_CrosshairAngle_Post -void FN_CrosshairAngle_Post(const edict_t *pClient, float pitch, float yaw); -#endif // FN_CrosshairAngle_Post - -#ifdef FN_LoadFileForMe_Post -byte *FN_LoadFileForMe_Post(char *filename, int *pLength); -#endif // FN_LoadFileForMe_Post - -#ifdef FN_FreeFile_Post -void FN_FreeFile_Post(void *buffer); -#endif // FN_FreeFile_Post - -#ifdef FN_EndSection_Post -void FN_EndSection_Post(const char *pszSectionName); -#endif // FN_EndSection_Post - -#ifdef FN_CompareFileTime_Post -int FN_CompareFileTime_Post(char *filename1, char *filename2, int *iCompare); -#endif // FN_CompareFileTime_Post - -#ifdef FN_GetGameDir_Post -void FN_GetGameDir_Post(char *szGetGameDir); -#endif // FN_GetGameDir_Post - -#ifdef FN_Cvar_RegisterVariable_Post -void FN_Cvar_RegisterVariable_Post(cvar_t *variable); -#endif // FN_Cvar_RegisterVariable_Post - -#ifdef FN_FadeClientVolume_Post -void FN_FadeClientVolume_Post(const edict_t *pEdict, int fadePercent, int fadeOutSeconds, int holdTime, int fadeInSeconds); -#endif // FN_FadeClientVolume_Post - -#ifdef FN_SetClientMaxspeed_Post -void FN_SetClientMaxspeed_Post(const edict_t *pEdict, float fNewMaxspeed); -#endif // FN_SetClientMaxspeed_Post - -#ifdef FN_CreateFakeClient_Post -edict_t *FN_CreateFakeClient_Post(const char *netname); -#endif // FN_CreateFakeClient_Post - -#ifdef FN_RunPlayerMove_Post -void FN_RunPlayerMove_Post(edict_t *fakeclient, const float *viewangles, float forwardmove, float sidemove, float upmove, unsigned short buttons, byte impulse, byte msec); -#endif // FN_RunPlayerMove_Post - -#ifdef FN_NumberOfEntities_Post -int FN_NumberOfEntities_Post(void); -#endif // FN_NumberOfEntities_Post - -#ifdef FN_GetInfoKeyBuffer_Post -char *FN_GetInfoKeyBuffer_Post(edict_t *e); -#endif // FN_GetInfoKeyBuffer_Post - -#ifdef FN_InfoKeyValue_Post -char *FN_InfoKeyValue_Post(char *infobuffer, char *key); -#endif // FN_InfoKeyValue_Post - -#ifdef FN_SetKeyValue_Post -void FN_SetKeyValue_Post(char *infobuffer, char *key, char *value); -#endif // FN_SetKeyValue_Post - -#ifdef FN_SetClientKeyValue_Post -void FN_SetClientKeyValue_Post(int clientIndex, char *infobuffer, char *key, char *value); -#endif // FN_SetClientKeyValue_Post - -#ifdef FN_IsMapValid_Post -int FN_IsMapValid_Post(char *filename); -#endif // FN_IsMapValid_Post - -#ifdef FN_StaticDecal_Post -void FN_StaticDecal_Post(const float *origin, int decalIndex, int entityIndex, int modelIndex); -#endif // FN_StaticDecal_Post - -#ifdef FN_PrecacheGeneric_Post -int FN_PrecacheGeneric_Post(char *s); -#endif // FN_PrecacheGeneric_Post - -#ifdef FN_GetPlayerUserId_Post -int FN_GetPlayerUserId_Post(edict_t *e ); -#endif // FN_GetPlayerUserId_Post - -#ifdef FN_BuildSoundMsg_Post -void FN_BuildSoundMsg_Post(edict_t *entity, int channel, const char *sample, /*int*/float volume, float attenuation, int fFlags, int pitch, int msg_dest, int msg_type, const float *pOrigin, edict_t *ed); -#endif // FN_BuildSoundMsg_Post - -#ifdef FN_IsDedicatedServer_Post -int FN_IsDedicatedServer_Post(void); -#endif // FN_IsDedicatedServer_Post - -#ifdef FN_CVarGetPointer_Post -cvar_t *FN_CVarGetPointer_Post(const char *szVarName); -#endif // FN_CVarGetPointer_Post - -#ifdef FN_GetPlayerWONId_Post -unsigned int FN_GetPlayerWONId_Post(edict_t *e); -#endif // FN_GetPlayerWONId_Post - -#ifdef FN_Info_RemoveKey_Post -void FN_Info_RemoveKey_Post( char *s, const char *key); -#endif // FN_Info_RemoveKey_Post - -#ifdef FN_GetPhysicsKeyValue_Post -const char *FN_GetPhysicsKeyValue_Post(const edict_t *pClient, const char *key); -#endif // FN_GetPhysicsKeyValue_Post - -#ifdef FN_SetPhysicsKeyValue_Post -void FN_SetPhysicsKeyValue_Post(const edict_t *pClient, const char *key, const char *value); -#endif // FN_SetPhysicsKeyValue_Post - -#ifdef FN_GetPhysicsInfoString_Post -const char *FN_GetPhysicsInfoString_Post( const edict_t *pClient); -#endif // FN_GetPhysicsInfoString_Post - -#ifdef FN_PrecacheEvent_Post -unsigned short FN_PrecacheEvent_Post(int type, const char *psz); -#endif // FN_PrecacheEvent_Post - -#ifdef FN_PlaybackEvent_Post -void FN_PlaybackEvent_Post(int flags, const edict_t *pInvoker, unsigned short eventindex, float delay, float *origin, float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2); -#endif // FN_PlaybackEvent_Post - -#ifdef FN_SetFatPVS_Post -unsigned char *FN_SetFatPVS_Post(float *org); -#endif // FN_SetFatPVS_Post - -#ifdef FN_SetFatPAS_Post -unsigned char *FN_SetFatPAS_Post(float *org); -#endif // FN_SetFatPAS_Post - -#ifdef FN_CheckVisibility_Post -int FN_CheckVisibility_Post(const edict_t *entity, unsigned char *pset); -#endif // FN_CheckVisibility_Post - -#ifdef FN_DeltaSetField_Post -void FN_DeltaSetField_Post(struct delta_s *pFields, const char *fieldname); -#endif // FN_DeltaSetField_Post - -#ifdef FN_DeltaUnsetField_Post -void FN_DeltaUnsetField_Post(struct delta_s *pFields, const char *fieldname); -#endif // FN_DeltaUnsetField_Post - -#ifdef FN_DeltaAddEncoder_Post -void FN_DeltaAddEncoder_Post(char *name, void (*conditionalencode)( struct delta_s *pFields, const unsigned char *from, const unsigned char *to ) ); -#endif // FN_DeltaAddEncoder_Post - -#ifdef FN_GetCurrentPlayer_Post -int FN_GetCurrentPlayer_Post(void); -#endif // FN_GetCurrentPlayer_Post - -#ifdef FN_CanSkipPlayer_Post -int FN_CanSkipPlayer_Post(const edict_t *player); -#endif // FN_CanSkipPlayer_Post - -#ifdef FN_DeltaFindField_Post -int FN_DeltaFindField_Post(struct delta_s *pFields, const char *fieldname); -#endif // FN_DeltaFindField_Post - -#ifdef FN_DeltaSetFieldByIndex_Post -void FN_DeltaSetFieldByIndex_Post(struct delta_s *pFields, int fieldNumber); -#endif // FN_DeltaSetFieldByIndex_Post - -#ifdef FN_DeltaUnsetFieldByIndex_Post -void FN_DeltaUnsetFieldByIndex_Post(struct delta_s *pFields, int fieldNumber); -#endif // FN_DeltaUnsetFieldByIndex_Post - -#ifdef FN_SetGroupMask_Post -void FN_SetGroupMask_Post(int mask, int op); -#endif // FN_SetGroupMask_Post - -#ifdef FN_engCreateInstancedBaseline_Post -int FN_engCreateInstancedBaseline_Post(int classname, struct entity_state_s *baseline); -#endif // FN_engCreateInstancedBaseline_Post - -#ifdef FN_Cvar_DirectSet_Post -void FN_Cvar_DirectSet_Post(struct cvar_s *var, char *value); -#endif // FN_Cvar_DirectSet_Post - -#ifdef FN_ForceUnmodified_Post -void FN_ForceUnmodified_Post(FORCE_TYPE type, float *mins, float *maxs, const char *filename); -#endif // FN_ForceUnmodified_Post - -#ifdef FN_GetPlayerStats_Post -void FN_GetPlayerStats_Post(const edict_t *pClient, int *ping, int *packet_loss); -#endif // FN_GetPlayerStats_Post - -#ifdef FN_AddServerCommand_Post -void FN_AddServerCommand_Post(char *cmd_name, void (*function)(void)); -#endif // FN_AddServerCommand_Post - -#ifdef FN_Voice_GetClientListening_Post -qboolean FN_Voice_GetClientListening_Post(int iReceiver, int iSender); -#endif // FN_Voice_GetClientListening_Post - -#ifdef FN_Voice_SetClientListening_Post -qboolean FN_Voice_SetClientListening_Post(int iReceiver, int iSender, qboolean bListen); -#endif // FN_Voice_SetClientListening_Post - -#ifdef FN_GetPlayerAuthId_Post -const char *FN_GetPlayerAuthId_Post(edict_t *e); -#endif // FN_GetPlayerAuthId - - - - -#ifdef FN_OnFreeEntPrivateData -void FN_OnFreeEntPrivateData(edict_t *pEnt); -#endif // FN_OnFreeEntPrivateData - -#ifdef FN_GameShutdown -void FN_GameShutdown(void); -#endif // FN_GameShutdown - -#ifdef FN_ShouldCollide -int FN_ShouldCollide(edict_t *pentTouched, edict_t *pentOther); -#endif // FN_ShouldCollide - - - - - -#ifdef FN_OnFreeEntPrivateData_Post -void FN_OnFreeEntPrivateData_Post(edict_t *pEnt); -#endif // FN_OnFreeEntPrivateData_Post - -#ifdef FN_GameShutdown_Post -void FN_GameShutdown_Post(void); -#endif // FN_GameShutdown_Post - -#ifdef FN_ShouldCollide_Post -int FN_ShouldCollide_Post(edict_t *pentTouched, edict_t *pentOther); -#endif // FN_ShouldCollide_Post - -#endif // USE_METAMOD - - -#ifdef FN_AMXX_QUERY -void FN_AMXX_QUERY(void); -#endif // FN_AMXX_QUERY - -#ifdef FN_AMXX_ATTACH -void FN_AMXX_ATTACH(void); -#endif // FN_AMXX_ATTACH - -#ifdef FN_AMXX_DETACH -void FN_AMXX_DETACH(void); -#endif // FN_AMXX_DETACH - -#ifdef FN_AMXX_PLUGINSLOADED -void FN_AMXX_PLUGINSLOADED(void); -#endif // FN_AMXX_PLUGINSLOADED - -// *** Types *** -typedef void* (*PFN_REQ_FNPTR)(const char * /*name*/); - -// ***** Module funcs stuff ***** -enum ForwardExecType -{ - ET_IGNORE = 0, // Ignore return vaue - ET_STOP, // Stop on PLUGIN_HANDLED - ET_STOP2, // Stop on PLUGIN_HANDLED, continue on other values, return biggest return value - ET_CONTINUE, // Continue; return biggest return value -}; - -enum ForwardParam -{ - FP_DONE = -1, // specify this as the last argument - // only tells the function that there are no more arguments - FP_CELL, // normal cell - FP_FLOAT, // float; used as normal cell though - FP_STRING, // string - FP_STRINGEX, // string; will be updated to the last function's value - FP_ARRAY, // array; use the return value of prepareArray. -}; - - -typedef int (*PFN_ADD_NATIVES) (const AMX_NATIVE_INFO * /*list*/); -typedef char * (*PFN_BUILD_PATHNAME) (const char * /*format*/, ...); -typedef char * (*PFN_BUILD_PATHNAME_R) (char * /*buffer*/, size_t /* maxlen */, const char * /* format */, ...); -typedef cell * (*PFN_GET_AMXADDR) (AMX * /*amx*/, cell /*offset*/); -typedef void (*PFN_PRINT_SRVCONSOLE) (char * /*format*/, ...); -typedef const char * (*PFN_GET_MODNAME) (void); -typedef const char * (*PFN_GET_AMXSCRIPTNAME) (int /*id*/); -typedef AMX * (*PFN_GET_AMXSCRIPT) (int /*id*/); -typedef int (*PFN_FIND_AMXSCRIPT_BYAMX) (const AMX * /*amx*/); -typedef int (*PFN_FIND_AMXSCRIPT_BYNAME) (const char * /*name*/); -typedef int (*PFN_SET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, const char * /* source */, int /* max */); -typedef char * (*PFN_GET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, int /*bufferId*/, int * /*pLen*/); -typedef int (*PFN_GET_AMXSTRINGLEN) (const cell *ptr); -typedef char * (*PFN_FORMAT_AMXSTRING) (AMX * /*amx*/, cell * /*params*/, int /*startParam*/, int * /*pLen*/); -typedef void (*PFN_COPY_AMXMEMORY) (cell * /*dest*/, const cell * /*src*/, int /*len*/); -typedef void (*PFN_LOG) (const char * /*fmt*/, ...); -typedef void (*PFN_LOG_ERROR) (AMX * /*amx*/, int /*err*/, const char * /*fmt*/, ...); -typedef int (*PFN_RAISE_AMXERROR) (AMX * /*amx*/, int /*error*/); -typedef int (*PFN_REGISTER_FORWARD) (const char * /*funcname*/, ForwardExecType /*exectype*/, ... /*paramtypes terminated by PF_DONE*/); -typedef int (*PFN_EXECUTE_FORWARD) (int /*id*/, ... /*params*/); -typedef cell (*PFN_PREPARE_CELLARRAY) (cell * /*ptr*/, unsigned int /*size*/); -typedef cell (*PFN_PREPARE_CHARARRAY) (char * /*ptr*/, unsigned int /*size*/); -typedef cell (*PFN_PREPARE_CELLARRAY_A) (cell * /*ptr*/, unsigned int /*size*/, bool /*copyBack*/); -typedef cell (*PFN_PREPARE_CHARARRAY_A) (char * /*ptr*/, unsigned int /*size*/, bool /*copyBack*/); -typedef int (*PFN_IS_PLAYER_VALID) (int /*id*/); -typedef const char * (*PFN_GET_PLAYER_NAME) (int /*id*/); -typedef const char * (*PFN_GET_PLAYER_IP) (int /*id*/); -typedef int (*PFN_IS_PLAYER_INGAME) (int /*id*/); -typedef int (*PFN_IS_PLAYER_BOT) (int /*id*/); -typedef int (*PFN_IS_PLAYER_AUTHORIZED) (int /*id*/); -typedef float (*PFN_GET_PLAYER_TIME) (int /*id*/); -typedef float (*PFN_GET_PLAYER_PLAYTIME) (int /*id*/); -typedef int (*PFN_GETPLAYERFLAGS) (int /* id*/); -typedef int (*PFN_GET_PLAYER_CURWEAPON) (int /*id*/); -typedef const char * (*PFN_GET_PLAYER_TEAM) (int /*id*/); -typedef int (*PFN_GET_PLAYER_TEAMID) (int /*id*/); -typedef int (*PFN_GET_PLAYER_DEATHS) (int /*id*/); -typedef int (*PFN_GET_PLAYER_MENU) (int /*id*/); -typedef int (*PFN_GET_PLAYER_KEYS) (int /*id*/); -typedef int (*PFN_IS_PLAYER_ALIVE) (int /*id*/); -typedef int (*PFN_GET_PLAYER_FRAGS) (int /*id*/); -typedef int (*PFN_IS_PLAYER_CONNECTING) (int /*id*/); -typedef int (*PFN_IS_PLAYER_HLTV) (int /*id*/); -typedef int (*PFN_GET_PLAYER_ARMOR) (int /*id*/); -typedef int (*PFN_GET_PLAYER_HEALTH) (int /*id*/); -#ifdef USE_METAMOD -typedef edict_t * (*PFN_GET_PLAYER_EDICT) (int /*id*/); -#else -typedef void * (*PFN_GET_PLAYER_EDICT) (int /*id*/); -#endif - -#ifdef MEMORY_TEST -typedef void * (*PFN_ALLOCATOR) (const char* /*filename*/, const unsigned int /*line*/, const char* /*func*/, - const unsigned int /*type*/, const size_t /*size*/); -typedef void * (*PFN_REALLOCATOR) (const char* /*filename*/, const unsigned int /*line*/, const char* /*func*/, - const unsigned int /*type*/, const size_t /*size*/, void* /*addr*/ ); -typedef void (*PFN_DEALLOCATOR) (const char* /*filename*/, const unsigned int /*line*/, const char* /*func*/, - const unsigned int /*type*/, const void* /*addr*/ ); -#endif -typedef int (*PFN_AMX_EXEC) (AMX* /*amx*/, cell* /*return val*/, int /*index*/); -typedef int (*PFN_AMX_EXECV) (AMX* /*amx*/, cell* /*return val*/, int /*index*/, int /*numparams*/, cell[] /*params*/); -typedef int (*PFN_AMX_ALLOT) (AMX* /*amx*/, int /*length*/, cell* /*amx_addr*/, cell** /*phys_addr*/); -typedef int (*PFN_AMX_FINDPUBLIC) (AMX* /*amx*/, char* /*func name*/, int* /*index*/); -typedef int (*PFN_AMX_FINDNATIVE) (AMX* /*amx*/, char* /*func name*/, int* /*index*/); -typedef int (*PFN_LOAD_AMXSCRIPT) (AMX* /*amx*/, void** /*code*/, const char* /*path*/, char[64] /*error info*/, int /* debug */); -typedef int (*PFN_UNLOAD_AMXSCRIPT) (AMX* /*amx*/,void** /*code*/); -typedef cell (*PFN_REAL_TO_CELL) (REAL /*x*/); -typedef REAL (*PFN_CELL_TO_REAL) (cell /*x*/); -typedef int (*PFN_REGISTER_SPFORWARD) (AMX * /*amx*/, int /*func*/, ... /*params*/); -typedef int (*PFN_REGISTER_SPFORWARD_BYNAME) (AMX * /*amx*/, const char * /*funcName*/, ... /*params*/); -typedef void (*PFN_UNREGISTER_SPFORWARD) (int /*id*/); -typedef void (*PFN_MERGEDEFINITION_FILE) (const char * /*filename*/); -typedef const char * (*PFN_FORMAT) (const char * /*fmt*/, ... /*params*/); -typedef void (*PFN_REGISTERFUNCTION) (void * /*pfn*/, const char * /*desc*/); -typedef int (*PFN_AMX_PUSH) (AMX * /*amx*/, cell /*value*/); - -extern PFN_ADD_NATIVES g_fn_AddNatives; -extern PFN_BUILD_PATHNAME g_fn_BuildPathname; -extern PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR; -extern PFN_GET_AMXADDR g_fn_GetAmxAddr; -extern PFN_PRINT_SRVCONSOLE g_fn_PrintSrvConsole; -extern PFN_GET_MODNAME g_fn_GetModname; -extern PFN_GET_AMXSCRIPTNAME g_fn_GetAmxScriptName; -extern PFN_GET_AMXSCRIPT g_fn_GetAmxScript; -extern PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; -extern PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; -extern PFN_SET_AMXSTRING g_fn_SetAmxString; -extern PFN_GET_AMXSTRING g_fn_GetAmxString; -extern PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; -extern PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; -extern PFN_COPY_AMXMEMORY g_fn_CopyAmxMemory; -extern PFN_LOG g_fn_Log; -extern PFN_LOG_ERROR g_fn_LogErrorFunc; -extern PFN_RAISE_AMXERROR g_fn_RaiseAmxError; -extern PFN_REGISTER_FORWARD g_fn_RegisterForward; -extern PFN_EXECUTE_FORWARD g_fn_ExecuteForward; -extern PFN_PREPARE_CELLARRAY g_fn_PrepareCellArray; -extern PFN_PREPARE_CHARARRAY g_fn_PrepareCharArray; -extern PFN_PREPARE_CELLARRAY_A g_fn_PrepareCellArrayA; -extern PFN_PREPARE_CHARARRAY_A g_fn_PrepareCharArrayA; -extern PFN_IS_PLAYER_VALID g_fn_IsPlayerValid; -extern PFN_GET_PLAYER_NAME g_fn_GetPlayerName; -extern PFN_GET_PLAYER_IP g_fn_GetPlayerIP; -extern PFN_IS_PLAYER_INGAME g_fn_IsPlayerIngame; -extern PFN_IS_PLAYER_BOT g_fn_IsPlayerBot; -extern PFN_IS_PLAYER_AUTHORIZED g_fn_IsPlayerAuthorized; -extern PFN_GET_PLAYER_TIME g_fn_GetPlayerTime; -extern PFN_GET_PLAYER_PLAYTIME g_fn_GetPlayerPlayTime; -extern PFN_GET_PLAYER_CURWEAPON g_fn_GetPlayerCurweapon; -extern PFN_GET_PLAYER_TEAMID g_fn_GetPlayerTeamID; -extern PFN_GET_PLAYER_DEATHS g_fn_GetPlayerDeaths; -extern PFN_GET_PLAYER_MENU g_fn_GetPlayerMenu; -extern PFN_GET_PLAYER_KEYS g_fn_GetPlayerKeys; -extern PFN_IS_PLAYER_ALIVE g_fn_IsPlayerAlive; -extern PFN_GET_PLAYER_FRAGS g_fn_GetPlayerFrags; -extern PFN_IS_PLAYER_CONNECTING g_fn_IsPlayerConnecting; -extern PFN_IS_PLAYER_HLTV g_fn_IsPlayerHLTV; -extern PFN_GET_PLAYER_ARMOR g_fn_GetPlayerArmor; -extern PFN_GET_PLAYER_HEALTH g_fn_GetPlayerHealth; -extern PFN_AMX_EXEC g_fn_AmxExec; -extern PFN_AMX_ALLOT g_fn_AmxAllot; -extern PFN_AMX_FINDPUBLIC g_fn_AmxFindPublic; -extern PFN_LOAD_AMXSCRIPT g_fn_LoadAmxScript; -extern PFN_UNLOAD_AMXSCRIPT g_fn_UnloadAmxScript; -extern PFN_REAL_TO_CELL g_fn_RealToCell; -extern PFN_CELL_TO_REAL g_fn_CellToReal; -extern PFN_REGISTER_SPFORWARD g_fn_RegisterSPForward; -extern PFN_REGISTER_SPFORWARD_BYNAME g_fn_RegisterSPForwardByName; -extern PFN_UNREGISTER_SPFORWARD g_fn_UnregisterSPForward; -extern PFN_MERGEDEFINITION_FILE g_fn_MergeDefinition_File; -extern PFN_AMX_FINDNATIVE g_fn_AmxFindNative; -extern PFN_GETPLAYERFLAGS g_fn_GetPlayerFlags; -extern PFN_GET_PLAYER_EDICT g_fn_GetPlayerEdict; -extern PFN_FORMAT g_fn_Format; -extern PFN_GET_PLAYER_TEAM g_fn_GetPlayerTeam; -extern PFN_REGISTERFUNCTION g_fn_RegisterFunction; -extern PFN_REQ_FNPTR g_fn_RequestFunction; -extern PFN_AMX_PUSH g_fn_AmxPush; - -#ifdef MAY_NEVER_BE_DEFINED -// Function prototypes for intellisense and similar systems -// They understand #if 0 so we use #ifdef MAY_NEVER_BE_DEFINED -int MF_AddNatives (const AMX_NATIVE_INFO *list) { } -char * MF_BuildPathname (const char * format, ...) { } -char * MF_BuildPathnameR (char *buffer, size_t maxlen, const char *fmt, ...) { } -cell * MF_GetAmxAddr (AMX * amx, cell offset) { } -void MF_PrintSrvConsole (char * format, ...) { } -const char * MF_GetModname (void) { } -const char * MF_GetScriptName (int id) { } -AMX * MF_GetScriptAmx (int id) { } -int MF_FindScriptByAmx (const AMX * amx) { } -int MF_FindScriptByAmx (const char * name) { } -int MF_SetAmxString (AMX * amx, cell amx_addr, const char * source , int max ) { } -char * MF_GetAmxString (AMX * amx, cell amx_addr, int bufferId, int * pLen) { } -int MF_GetAmxStringLen (const cell *ptr) { } -char * MF_FormatAmxString (AMX * amx, cell * params, int startParam, int * pLen) { } -void MF_CopyAmxMemory (cell * dest, const cell * src, int len) { } -void MF_Log (const char * fmt, ...) { } -void MF_LogError (AMX * amx, int err, const char *fmt, ...) { } -int MF_RaiseAmxError (AMX * amx, int error) { } -int MF_RegisterForward (const char * funcname, ForwardExecType exectype, ...) { } -int MF_ExecuteForward (int id, ...) { } -cell MF_PrepareCellArray (cell * ptr, unsigned int size) { } -cell MF_PrepareCharArray (char * ptr, unsigned int size) { } -cell MF_PrepareCellArrayA (cell * ptr, unsigned int size, bool copyBack) { } -cell MF_PrepareCharArrayA (char * ptr, unsigned int size, bool copyBack) { } -int MF_IsPlayerValid (int id) { } -const char * MF_GetPlayerName (int id) { } -const char * MF_GetPlayerIP (int id) { } -int MF_IsPlayerIngame (int id) { } -int MF_IsPlayerBot (int id) { } -int MF_IsPlayerAuthorized (int id) { } -float MF_GetPlayerTime (int id) { } -float MF_GetPlayerPlayTime (int id) { } -int MF_GetPlayerCurweapon (int id) { } -const char * MF_GetPlayerTeam (int id) { } -int MF_GetPlayerTeamID (int id) { } -int MF_GetPlayerDeaths (int id) { } -int MF_GetPlayerMenu (int id) { } -int MF_GetPlayerKeys (int id) { } -int MF_IsPlayerAlive (int id) { } -int MF_GetPlayerFrags (int id) { } -int MF_IsPlayerConnecting (int id) { } -int MF_IsPlayerHLTV (int id) { } -int MF_GetPlayerArmor (int id) { } -int MF_GetPlayerHealth (int id) { } -REAL amx_ctof (cell x) { } -cell amx_ftoc (float x) { } -int MF_RegisterSPForwardByName (AMX * amx, const char *str, ...) { } -int MF_RegisterSPForward (AMX * amx, int func, ...) { } -void MF_UnregisterSPForward (int id) { } -int MF_GetPlayerFlags (int id) { } -edict_t* MF_GetPlayerEdict (int id) { } -const char * MF_Format (const char *fmt, ...) { } -void MF_RegisterFunction (void *pfn, const char *description) { } -void * MF_RequestFunction (const char *description) { } -int MF_AmxPush (AMX *amx, cell *params) { } -int MF_AmxExec (AMX *amx, cell *retval, int idx) { } -#endif // MAY_NEVER_BE_DEFINED - -#define MF_AddNatives g_fn_AddNatives -#define MF_BuildPathname g_fn_BuildPathname -#define MF_BuildPathnameR g_fn_BuildPathnameR -#define MF_FormatAmxString g_fn_FormatAmxString -#define MF_GetAmxAddr g_fn_GetAmxAddr -#define MF_PrintSrvConsole g_fn_PrintSrvConsole -#define MF_GetModname g_fn_GetModname -#define MF_GetScriptName g_fn_GetAmxScriptName -#define MF_GetScriptAmx g_fn_GetAmxScript -#define MF_FindScriptByAmx g_fn_FindAmxScriptByAmx -#define MF_FindScriptByName g_fn_FindAmxScriptByName -#define MF_SetAmxString g_fn_SetAmxString -#define MF_GetAmxString g_fn_GetAmxString -#define MF_GetAmxStringLen g_fn_GetAmxStringLen -#define MF_CopyAmxMemory g_fn_CopyAmxMemory -void MF_Log(const char *fmt, ...); -void MF_LogError(AMX *amx, int err, const char *fmt, ...); -#define MF_RaiseAmxError g_fn_RaiseAmxError -#define MF_RegisterForward g_fn_RegisterForward -#define MF_ExecuteForward g_fn_ExecuteForward -#define MF_PrepareCellArray g_fn_PrepareCellArray -#define MF_PrepareCharArray g_fn_PrepareCharArray -#define MF_PrepareCellArrayA g_fn_PrepareCellArrayA -#define MF_PrepareCharArrayA g_fn_PrepareCharArrayA -#define MF_IsPlayerValid g_fn_IsPlayerValid -#define MF_GetPlayerName g_fn_GetPlayerName -#define MF_GetPlayerIP g_fn_GetPlayerIP -#define MF_IsPlayerIngame g_fn_IsPlayerIngame -#define MF_IsPlayerBot g_fn_IsPlayerBot -#define MF_IsPlayerAuthorized g_fn_IsPlayerAuthorized -#define MF_GetPlayerTime g_fn_GetPlayerTime -#define MF_GetPlayerPlayTime g_fn_GetPlayerPlayTime -#define MF_GetPlayerCurweapon g_fn_GetPlayerCurweapon -#define MF_GetPlayerTeam g_fn_GetPlayerTeam -#define MF_GetPlayerTeamID g_fn_GetPlayerTeamID -#define MF_GetPlayerDeaths g_fn_GetPlayerDeaths -#define MF_GetPlayerMenu g_fn_GetPlayerMenu -#define MF_GetPlayerKeys g_fn_GetPlayerKeys -#define MF_IsPlayerAlive g_fn_IsPlayerAlive -#define MF_GetPlayerFrags g_fn_GetPlayerFrags -#define MF_IsPlayerConnecting g_fn_IsPlayerConnecting -#define MF_IsPlayerHLTV g_fn_IsPlayerHLTV -#define MF_GetPlayerArmor g_fn_GetPlayerArmor -#define MF_GetPlayerHealth g_fn_GetPlayerHealth -#define MF_AmxExec g_fn_AmxExec -#define MF_AmxExecv g_fn_AmxExecv -#define MF_AmxFindPublic g_fn_AmxFindPublic -#define MF_AmxAllot g_fn_AmxAllot -#define MF_AmxFindNative g_fn_AmxFindNative -#define MF_LoadAmxScript g_fn_LoadAmxScript -#define MF_UnloadAmxScript g_fn_UnloadAmxScript -#define MF_MergeDefinitionFile g_fn_MergeDefinition_File -#define amx_ctof g_fn_CellToReal -#define amx_ftoc g_fn_RealToCell -#define MF_RegisterSPForwardByName g_fn_RegisterSPForwardByName -#define MF_RegisterSPForward g_fn_RegisterSPForward -#define MF_UnregisterSPForward g_fn_UnregisterSPForward -#define MF_GetPlayerFlags g_fn_GetPlayerFlags -#define MF_GetPlayerEdict g_fn_GetPlayerEdict -#define MF_Format g_fn_Format -#define MF_RegisterFunction g_fn_RegisterFunction -#define MF_RequestFunction g_fn_RequestFunction; -#define MF_AmxPush g_fn_AmxPush - -#ifdef MEMORY_TEST -/*** Memory ***/ -void *operator new(size_t reportedSize); -void *operator new[](size_t reportedSize); -void *operator new(size_t reportedSize, const char *sourceFile, int sourceLine); -void *operator new[](size_t reportedSize, const char *sourceFile, int sourceLine); -void operator delete(void *reportedAddress); -void operator delete[](void *reportedAddress); - -// Allocation types -extern const unsigned int m_alloc_unknown; -extern const unsigned int m_alloc_new; -extern const unsigned int m_alloc_new_array; -extern const unsigned int m_alloc_malloc; -extern const unsigned int m_alloc_calloc; -extern const unsigned int m_alloc_realloc; -extern const unsigned int m_alloc_delete; -extern const unsigned int m_alloc_delete_array; -extern const unsigned int m_alloc_free; - -// To be called before new / delete -void Mem_SetOwner(const char *filename, int line, const char *function); -// Actual allocator -void * Mem_Allocator(const char *sourceFile, const unsigned int sourceLine, const char *sourceFunc, - const unsigned int allocationType, const size_t reportedSize); -void * Mem_Reallocator(const char *sourceFile, const unsigned int sourceLine, const char *sourceFunc, - const unsigned int reallocationType, const size_t reportedSize, void *reportedAddress); -void Mem_Deallocator(const char *sourceFile, const unsigned int sourceLine, const char *sourceFunc, - const unsigned int deallocationType, void *reportedAddress); - -// memory macros -#ifndef __FUNCTION__ -#define __FUNCTION__ "??" -#endif - -// call Mem_SetOwner, followed by the actual new operator -#define new (Mem_SetOwner(__FILE__,__LINE__,__FUNCTION__),false) ? NULL : new -// call Mem_SetOwner, followed by the actual delete operator -#define delete (Mem_SetOwner(__FILE__,__LINE__,__FUNCTION__),false) ? Mem_SetOwner("",0,"") : delete -#define malloc(sz) Mem_Allocator (__FILE__,__LINE__,__FUNCTION__,m_alloc_malloc,sz) -#define calloc(sz) Mem_Allocator (__FILE__,__LINE__,__FUNCTION__,m_alloc_calloc,sz) -#define realloc(ptr,sz) Mem_Reallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_realloc,sz,ptr) -#define free(ptr) Mem_Deallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_free,ptr) - -#endif //MEMORY_TEST - -#endif // #ifndef __AMXXMODULE_H__ diff --git a/dlls/MemHack/memhack.inc b/dlls/MemHack/memhack.inc deleted file mode 100644 index 97762de6..00000000 --- a/dlls/MemHack/memhack.inc +++ /dev/null @@ -1,20 +0,0 @@ -#include - -native memhack_get_char(address,baseaddress = DLLBASE, memtype = MEMTYPE_DATA, signtype = MEM_SIGNED); -native memhack_get_short(address,baseaddress = DLLBASE, memtype = MEMTYPE_DATA, signtype = MEM_SIGNED); -native memhack_get_long(address,baseaddress = DLLBASE, memtype = MEMTYPE_DATA, signtype = MEM_SIGNED); - -native Float:memhack_get_float(address,baseaddress = DLLBASE, memtype = MEMTYPE_DATA); -native Float:memhack_get_quad(address,baseaddress = DLLBASE, memtype = MEMTYPE_DATA); -native memhack_get_pointer(address,baseaddress = DLLBASE, memtype = MEMTYPE_DATA); - -native memhack_set_char(address,baseaddress = DLLBASE, new_val, memtype = MEMTYPE_DATA, signtype = MEM_SIGNED); -native memhack_set_short(address,baseaddress = DLLBASE, new_val, memtype = MEMTYPE_DATA, signtype = MEM_SIGNED); -native memhack_set_long(address,baseaddress = DLLBASE, new_val, memtype = MEMTYPE_DATA, signtype = MEM_SIGNED); - -native memhack_set_float(address,baseaddress = DLLBASE, Float:new_val, memtype = MEMTYPE_DATA); -native memhack_set_quad(address,baseaddress = DLLBASE,Float:new_val, memtype = MEMTYPE_DATA); -native memhack_set_pointer(address,baseaddress = DLLBASE, new_val, memtype = MEMTYPE_DATA); - -native memhack_get_base(func_addr,&success); -native memhack_get_realaddr(address,baseaddress,memtype = MEMTYPE_DATA); \ No newline at end of file diff --git a/dlls/MemHack/memhack_const.inc b/dlls/MemHack/memhack_const.inc deleted file mode 100644 index bd30a7d9..00000000 --- a/dlls/MemHack/memhack_const.inc +++ /dev/null @@ -1,23 +0,0 @@ -#if defined _memhack_const_included - #endinput -#endif -#define _memhack_const_included - -// Different Address Bases -#define MEM_DLLBASE 0 -#define MEM_ENGBASE 1 -#define MEM_NULLBASE 2 - -// Signed or unsigned -#define MEM_SIGNED 0 -#define MEM_UNSIGNED 1 - -// Memory area types -#define MEMTYPE_CODE 0 // Code (usually .text segment, requires mprotect or VirtualProtect) -#define MEMTYPE_DATA 1 // Data (usually .data segment, writable by default) -#define MEMTYPE_RODATA 2 // Read-Only Data (usually .rodata on Linux, .rdata on Windows) - -// Return codes for patching (set natives) -#define MP_FAIL -1 -#define MP_OK 0 - diff --git a/dlls/MemHack/moduleconfig.h b/dlls/MemHack/moduleconfig.h deleted file mode 100644 index 73d774a6..00000000 --- a/dlls/MemHack/moduleconfig.h +++ /dev/null @@ -1,463 +0,0 @@ -// Configuration - -#ifndef __MODULECONFIG_H__ -#define __MODULECONFIG_H__ - -// Module info -#define MODULE_NAME "MemHack" -#define MODULE_VERSION "1.65" -#define MODULE_AUTHOR "SD and Rukia" -#define MODULE_URL "www.amxmodx.org" -#define MODULE_LOGTAG "MEMHACK" -// If you want the module not to be reloaded on mapchange, remove / comment out the next line -#define MODULE_RELOAD_ON_MAPCHANGE - -#ifdef __DATE__ -#define MODULE_DATE __DATE__ -#else // __DATE__ -#define MODULE_DATE "Unknown" -#endif // __DATE__ - -// metamod plugin? -#define USE_METAMOD - -// - AMXX Init functions -// Also consider using FN_META_* -// AMXX query -//#define FN_AMXX_QUERY OnAmxxQuery -// AMXX attach -// Do native functions init here (MF_AddNatives) -#define FN_AMXX_ATTACH OnAmxxAttach -// AMXX dettach -//#define FN_AMXX_DETTACH OnAmxxDettach -// All plugins loaded -// Do forward functions init here (MF_RegisterForward) -// #define FN_AMXX_PLUGINSLOADED OnPluginsLoaded - -/**** METAMOD ****/ -// If your module doesn't use metamod, you may close the file now :) -#ifdef USE_METAMOD -// ---- -// Hook Functions -// Uncomment these to be called -// You can also change the function name - -// - Metamod init functions -// Also consider using FN_AMXX_* -// Meta query -//#define FN_META_QUERY OnMetaQuery -// Meta attach -//#define FN_META_ATTACH OnMetaAttach -// Meta dettach -//#define FN_META_DETTACH OnMetaDettach - -// (wd) are Will Day's notes -// - GetEntityAPI2 functions -// #define FN_GameDLLInit GameDLLInit /* pfnGameInit() */ -// #define FN_DispatchSpawn DispatchSpawn /* pfnSpawn() */ -// #define FN_DispatchThink DispatchThink /* pfnThink() */ -// #define FN_DispatchUse DispatchUse /* pfnUse() */ -// #define FN_DispatchTouch DispatchTouch /* pfnTouch() */ -// #define FN_DispatchBlocked DispatchBlocked /* pfnBlocked() */ -// #define FN_DispatchKeyValue DispatchKeyValue /* pfnKeyValue() */ -// #define FN_DispatchSave DispatchSave /* pfnSave() */ -// #define FN_DispatchRestore DispatchRestore /* pfnRestore() */ -// #define FN_DispatchObjectCollsionBox DispatchObjectCollsionBox /* pfnSetAbsBox() */ -// #define FN_SaveWriteFields SaveWriteFields /* pfnSaveWriteFields() */ -// #define FN_SaveReadFields SaveReadFields /* pfnSaveReadFields() */ -// #define FN_SaveGlobalState SaveGlobalState /* pfnSaveGlobalState() */ -// #define FN_RestoreGlobalState RestoreGlobalState /* pfnRestoreGlobalState() */ -// #define FN_ResetGlobalState ResetGlobalState /* pfnResetGlobalState() */ -// #define FN_ClientConnect ClientConnect /* pfnClientConnect() (wd) Client has connected */ -// #define FN_ClientDisconnect ClientDisconnect /* pfnClientDisconnect() (wd) Player has left the game */ -// #define FN_ClientKill ClientKill /* pfnClientKill() (wd) Player has typed "kill" */ -// #define FN_ClientPutInServer ClientPutInServer /* pfnClientPutInServer() (wd) Client is entering the game */ -// #define FN_ClientCommand ClientCommand /* pfnClientCommand() (wd) Player has sent a command (typed or from a bind) */ -// #define FN_ClientUserInfoChanged ClientUserInfoChanged /* pfnClientUserInfoChanged() (wd) Client has updated their setinfo structure */ -// #define FN_ServerActivate ServerActivate /* pfnServerActivate() (wd) Server is starting a new map */ -// #define FN_ServerDeactivate ServerDeactivate /* pfnServerDeactivate() (wd) Server is leaving the map (shutdown or changelevel); SDK2 */ -// #define FN_PlayerPreThink PlayerPreThink /* pfnPlayerPreThink() */ -// #define FN_PlayerPostThink PlayerPostThink /* pfnPlayerPostThink() */ -// #define FN_StartFrame StartFrame /* pfnStartFrame() */ -// #define FN_ParmsNewLevel ParmsNewLevel /* pfnParmsNewLevel() */ -// #define FN_ParmsChangeLevel ParmsChangeLevel /* pfnParmsChangeLevel() */ -// #define FN_GetGameDescription GetGameDescription /* pfnGetGameDescription() Returns string describing current .dll. E.g. "TeamFotrress 2" "Half-Life" */ -// #define FN_PlayerCustomization PlayerCustomization /* pfnPlayerCustomization() Notifies .dll of new customization for player. */ -// #define FN_SpectatorConnect SpectatorConnect /* pfnSpectatorConnect() Called when spectator joins server */ -// #define FN_SpectatorDisconnect SpectatorDisconnect /* pfnSpectatorDisconnect() Called when spectator leaves the server */ -// #define FN_SpectatorThink SpectatorThink /* pfnSpectatorThink() Called when spectator sends a command packet (usercmd_t) */ -// #define FN_Sys_Error Sys_Error /* pfnSys_Error() Notify game .dll that engine is going to shut down. Allows mod authors to set a breakpoint. SDK2 */ -// #define FN_PM_Move PM_Move /* pfnPM_Move() (wd) SDK2 */ -// #define FN_PM_Init PM_Init /* pfnPM_Init() Server version of player movement initialization; (wd) SDK2 */ -// #define FN_PM_FindTextureType PM_FindTextureType /* pfnPM_FindTextureType() (wd) SDK2 */ -// #define FN_SetupVisibility SetupVisibility /* pfnSetupVisibility() Set up PVS and PAS for networking for this client; (wd) SDK2 */ -// #define FN_UpdateClientData UpdateClientData /* pfnUpdateClientData() Set up data sent only to specific client; (wd) SDK2 */ -// #define FN_AddToFullPack AddToFullPack /* pfnAddToFullPack() (wd) SDK2 */ -// #define FN_CreateBaseline CreateBaseline /* pfnCreateBaseline() Tweak entity baseline for network encoding allows setup of player baselines too.; (wd) SDK2 */ -// #define FN_RegisterEncoders RegisterEncoders /* pfnRegisterEncoders() Callbacks for network encoding; (wd) SDK2 */ -// #define FN_GetWeaponData GetWeaponData /* pfnGetWeaponData() (wd) SDK2 */ -// #define FN_CmdStart CmdStart /* pfnCmdStart() (wd) SDK2 */ -// #define FN_CmdEnd CmdEnd /* pfnCmdEnd() (wd) SDK2 */ -// #define FN_ConnectionlessPacket ConnectionlessPacket /* pfnConnectionlessPacket() (wd) SDK2 */ -// #define FN_GetHullBounds GetHullBounds /* pfnGetHullBounds() (wd) SDK2 */ -// #define FN_CreateInstancedBaselines CreateInstancedBaselines /* pfnCreateInstancedBaselines() (wd) SDK2 */ -// #define FN_InconsistentFile InconsistentFile /* pfnInconsistentFile() (wd) SDK2 */ -// #define FN_AllowLagCompensation AllowLagCompensation /* pfnAllowLagCompensation() (wd) SDK2 */ - -// - GetEntityAPI2_Post functions -// #define FN_GameDLLInit_Post GameDLLInit_Post -// #define FN_DispatchSpawn_Post DispatchSpawn_Post -// #define FN_DispatchThink_Post DispatchThink_Post -// #define FN_DispatchUse_Post DispatchUse_Post -// #define FN_DispatchTouch_Post DispatchTouch_Post -// #define FN_DispatchBlocked_Post DispatchBlocked_Post -// #define FN_DispatchKeyValue_Post DispatchKeyValue_Post -// #define FN_DispatchSave_Post DispatchSave_Post -// #define FN_DispatchRestore_Post DispatchRestore_Post -// #define FN_DispatchObjectCollsionBox_Post DispatchObjectCollsionBox_Post -// #define FN_SaveWriteFields_Post SaveWriteFields_Post -// #define FN_SaveReadFields_Post SaveReadFields_Post -// #define FN_SaveGlobalState_Post SaveGlobalState_Post -// #define FN_RestoreGlobalState_Post RestoreGlobalState_Post -// #define FN_ResetGlobalState_Post ResetGlobalState_Post -// #define FN_ClientConnect_Post ClientConnect_Post -// #define FN_ClientDisconnect_Post ClientDisconnect_Post -// #define FN_ClientKill_Post ClientKill_Post -// #define FN_ClientPutInServer_Post ClientPutInServer_Post -// #define FN_ClientCommand_Post ClientCommand_Post -// #define FN_ClientUserInfoChanged_Post ClientUserInfoChanged_Post -// #define FN_ServerActivate_Post ServerActivate_Post -// #define FN_ServerDeactivate_Post ServerDeactivate_Post -// #define FN_PlayerPreThink_Post PlayerPreThink_Post -// #define FN_PlayerPostThink_Post PlayerPostThink_Post -// #define FN_StartFrame_Post StartFrame_Post -// #define FN_ParmsNewLevel_Post ParmsNewLevel_Post -// #define FN_ParmsChangeLevel_Post ParmsChangeLevel_Post -// #define FN_GetGameDescription_Post GetGameDescription_Post -// #define FN_PlayerCustomization_Post PlayerCustomization_Post -// #define FN_SpectatorConnect_Post SpectatorConnect_Post -// #define FN_SpectatorDisconnect_Post SpectatorDisconnect_Post -// #define FN_SpectatorThink_Post SpectatorThink_Post -// #define FN_Sys_Error_Post Sys_Error_Post -// #define FN_PM_Move_Post PM_Move_Post -// #define FN_PM_Init_Post PM_Init_Post -// #define FN_PM_FindTextureType_Post PM_FindTextureType_Post -// #define FN_SetupVisibility_Post SetupVisibility_Post -// #define FN_UpdateClientData_Post UpdateClientData_Post -// #define FN_AddToFullPack_Post AddToFullPack_Post -// #define FN_CreateBaseline_Post CreateBaseline_Post -// #define FN_RegisterEncoders_Post RegisterEncoders_Post -// #define FN_GetWeaponData_Post GetWeaponData_Post -// #define FN_CmdStart_Post CmdStart_Post -// #define FN_CmdEnd_Post CmdEnd_Post -// #define FN_ConnectionlessPacket_Post ConnectionlessPacket_Post -// #define FN_GetHullBounds_Post GetHullBounds_Post -// #define FN_CreateInstancedBaselines_Post CreateInstancedBaselines_Post -// #define FN_InconsistentFile_Post InconsistentFile_Post -// #define FN_AllowLagCompensation_Post AllowLagCompensation_Post - -// - GetEngineAPI functions -// #define FN_PrecacheModel PrecacheModel -// #define FN_PrecacheSound PrecacheSound -// #define FN_SetModel SetModel -// #define FN_ModelIndex ModelIndex -// #define FN_ModelFrames ModelFrames -// #define FN_SetSize SetSize -// #define FN_ChangeLevel ChangeLevel -// #define FN_GetSpawnParms GetSpawnParms -// #define FN_SaveSpawnParms SaveSpawnParms -// #define FN_VecToYaw VecToYaw -// #define FN_VecToAngles VecToAngles -// #define FN_MoveToOrigin MoveToOrigin -// #define FN_ChangeYaw ChangeYaw -// #define FN_ChangePitch ChangePitch -// #define FN_FindEntityByString FindEntityByString -// #define FN_GetEntityIllum GetEntityIllum -// #define FN_FindEntityInSphere FindEntityInSphere -// #define FN_FindClientInPVS FindClientInPVS -// #define FN_EntitiesInPVS EntitiesInPVS -// #define FN_MakeVectors MakeVectors -// #define FN_AngleVectors AngleVectors -// #define FN_CreateEntity CreateEntity -// #define FN_RemoveEntity RemoveEntity -// #define FN_CreateNamedEntity CreateNamedEntity -// #define FN_MakeStatic MakeStatic -// #define FN_EntIsOnFloor EntIsOnFloor -// #define FN_DropToFloor DropToFloor -// #define FN_WalkMove WalkMove -// #define FN_SetOrigin SetOrigin -// #define FN_EmitSound EmitSound -// #define FN_EmitAmbientSound EmitAmbientSound -// #define FN_TraceLine TraceLine -// #define FN_TraceToss TraceToss -// #define FN_TraceMonsterHull TraceMonsterHull -// #define FN_TraceHull TraceHull -// #define FN_TraceModel TraceModel -// #define FN_TraceTexture TraceTexture -// #define FN_TraceSphere TraceSphere -// #define FN_GetAimVector GetAimVector -// #define FN_ServerCommand ServerCommand -// #define FN_ServerExecute ServerExecute -// #define FN_engClientCommand engClientCommand -// #define FN_ParticleEffect ParticleEffect -// #define FN_LightStyle LightStyle -// #define FN_DecalIndex DecalIndex -// #define FN_PointContents PointContents -// #define FN_MessageBegin MessageBegin -// #define FN_MessageEnd MessageEnd -// #define FN_WriteByte WriteByte -// #define FN_WriteChar WriteChar -// #define FN_WriteShort WriteShort -// #define FN_WriteLong WriteLong -// #define FN_WriteAngle WriteAngle -// #define FN_WriteCoord WriteCoord -// #define FN_WriteString WriteString -// #define FN_WriteEntity WriteEntity -// #define FN_CVarRegister CVarRegister -// #define FN_CVarGetFloat CVarGetFloat -// #define FN_CVarGetString CVarGetString -// #define FN_CVarSetFloat CVarSetFloat -// #define FN_CVarSetString CVarSetString -// #define FN_AlertMessage AlertMessage -// #define FN_EngineFprintf EngineFprintf -// #define FN_PvAllocEntPrivateData PvAllocEntPrivateData -// #define FN_PvEntPrivateData PvEntPrivateData -// #define FN_FreeEntPrivateData FreeEntPrivateData -// #define FN_SzFromIndex SzFromIndex -// #define FN_AllocString AllocString -// #define FN_GetVarsOfEnt GetVarsOfEnt -// #define FN_PEntityOfEntOffset PEntityOfEntOffset -// #define FN_EntOffsetOfPEntity EntOffsetOfPEntity -// #define FN_IndexOfEdict IndexOfEdict -// #define FN_PEntityOfEntIndex PEntityOfEntIndex -// #define FN_FindEntityByVars FindEntityByVars -// #define FN_GetModelPtr GetModelPtr -// #define FN_RegUserMsg RegUserMsg -// #define FN_AnimationAutomove AnimationAutomove -// #define FN_GetBonePosition GetBonePosition -// #define FN_FunctionFromName FunctionFromName -// #define FN_NameForFunction NameForFunction -// #define FN_ClientPrintf ClientPrintf -// #define FN_ServerPrint ServerPrint -// #define FN_Cmd_Args Cmd_Args -// #define FN_Cmd_Argv Cmd_Argv -// #define FN_Cmd_Argc Cmd_Argc -// #define FN_GetAttachment GetAttachment -// #define FN_CRC32_Init CRC32_Init -// #define FN_CRC32_ProcessBuffer CRC32_ProcessBuffer -// #define FN_CRC32_ProcessByte CRC32_ProcessByte -// #define FN_CRC32_Final CRC32_Final -// #define FN_RandomLong RandomLong -// #define FN_RandomFloat RandomFloat -// #define FN_SetView SetView -// #define FN_Time Time -// #define FN_CrosshairAngle CrosshairAngle -// #define FN_LoadFileForMe LoadFileForMe -// #define FN_FreeFile FreeFile -// #define FN_EndSection EndSection -// #define FN_CompareFileTime CompareFileTime -// #define FN_GetGameDir GetGameDir -// #define FN_Cvar_RegisterVariable Cvar_RegisterVariable -// #define FN_FadeClientVolume FadeClientVolume -// #define FN_SetClientMaxspeed SetClientMaxspeed -// #define FN_CreateFakeClient CreateFakeClient -// #define FN_RunPlayerMove RunPlayerMove -// #define FN_NumberOfEntities NumberOfEntities -// #define FN_GetInfoKeyBuffer GetInfoKeyBuffer -// #define FN_InfoKeyValue InfoKeyValue -// #define FN_SetKeyValue SetKeyValue -// #define FN_SetClientKeyValue SetClientKeyValue -// #define FN_IsMapValid IsMapValid -// #define FN_StaticDecal StaticDecal -// #define FN_PrecacheGeneric PrecacheGeneric -// #define FN_GetPlayerUserId GetPlayerUserId -// #define FN_BuildSoundMsg BuildSoundMsg -// #define FN_IsDedicatedServer IsDedicatedServer -// #define FN_CVarGetPointer CVarGetPointer -// #define FN_GetPlayerWONId GetPlayerWONId -// #define FN_Info_RemoveKey Info_RemoveKey -// #define FN_GetPhysicsKeyValue GetPhysicsKeyValue -// #define FN_SetPhysicsKeyValue SetPhysicsKeyValue -// #define FN_GetPhysicsInfoString GetPhysicsInfoString -// #define FN_PrecacheEvent PrecacheEvent -// #define FN_PlaybackEvent PlaybackEvent -// #define FN_SetFatPVS SetFatPVS -// #define FN_SetFatPAS SetFatPAS -// #define FN_CheckVisibility CheckVisibility -// #define FN_DeltaSetField DeltaSetField -// #define FN_DeltaUnsetField DeltaUnsetField -// #define FN_DeltaAddEncoder DeltaAddEncoder -// #define FN_GetCurrentPlayer GetCurrentPlayer -// #define FN_CanSkipPlayer CanSkipPlayer -// #define FN_DeltaFindField DeltaFindField -// #define FN_DeltaSetFieldByIndex DeltaSetFieldByIndex -// #define FN_DeltaUnsetFieldByIndex DeltaUnsetFieldByIndex -// #define FN_SetGroupMask SetGroupMask -// #define FN_engCreateInstancedBaseline engCreateInstancedBaseline -// #define FN_Cvar_DirectSet Cvar_DirectSet -// #define FN_ForceUnmodified ForceUnmodified -// #define FN_GetPlayerStats GetPlayerStats -// #define FN_AddServerCommand AddServerCommand -// #define FN_Voice_GetClientListening Voice_GetClientListening -// #define FN_Voice_SetClientListening Voice_SetClientListening -// #define FN_GetPlayerAuthId GetPlayerAuthId - -// - GetEngineAPI_Post functions -// #define FN_PrecacheModel_Post PrecacheModel_Post -// #define FN_PrecacheSound_Post PrecacheSound_Post -// #define FN_SetModel_Post SetModel_Post -// #define FN_ModelIndex_Post ModelIndex_Post -// #define FN_ModelFrames_Post ModelFrames_Post -// #define FN_SetSize_Post SetSize_Post -// #define FN_ChangeLevel_Post ChangeLevel_Post -// #define FN_GetSpawnParms_Post GetSpawnParms_Post -// #define FN_SaveSpawnParms_Post SaveSpawnParms_Post -// #define FN_VecToYaw_Post VecToYaw_Post -// #define FN_VecToAngles_Post VecToAngles_Post -// #define FN_MoveToOrigin_Post MoveToOrigin_Post -// #define FN_ChangeYaw_Post ChangeYaw_Post -// #define FN_ChangePitch_Post ChangePitch_Post -// #define FN_FindEntityByString_Post FindEntityByString_Post -// #define FN_GetEntityIllum_Post GetEntityIllum_Post -// #define FN_FindEntityInSphere_Post FindEntityInSphere_Post -// #define FN_FindClientInPVS_Post FindClientInPVS_Post -// #define FN_EntitiesInPVS_Post EntitiesInPVS_Post -// #define FN_MakeVectors_Post MakeVectors_Post -// #define FN_AngleVectors_Post AngleVectors_Post -// #define FN_CreateEntity_Post CreateEntity_Post -// #define FN_RemoveEntity_Post RemoveEntity_Post -// #define FN_CreateNamedEntity_Post CreateNamedEntity_Post -// #define FN_MakeStatic_Post MakeStatic_Post -// #define FN_EntIsOnFloor_Post EntIsOnFloor_Post -// #define FN_DropToFloor_Post DropToFloor_Post -// #define FN_WalkMove_Post WalkMove_Post -// #define FN_SetOrigin_Post SetOrigin_Post -// #define FN_EmitSound_Post EmitSound_Post -// #define FN_EmitAmbientSound_Post EmitAmbientSound_Post -// #define FN_TraceLine_Post TraceLine_Post -// #define FN_TraceToss_Post TraceToss_Post -// #define FN_TraceMonsterHull_Post TraceMonsterHull_Post -// #define FN_TraceHull_Post TraceHull_Post -// #define FN_TraceModel_Post TraceModel_Post -// #define FN_TraceTexture_Post TraceTexture_Post -// #define FN_TraceSphere_Post TraceSphere_Post -// #define FN_GetAimVector_Post GetAimVector_Post -// #define FN_ServerCommand_Post ServerCommand_Post -// #define FN_ServerExecute_Post ServerExecute_Post -// #define FN_engClientCommand_Post engClientCommand_Post -// #define FN_ParticleEffect_Post ParticleEffect_Post -// #define FN_LightStyle_Post LightStyle_Post -// #define FN_DecalIndex_Post DecalIndex_Post -// #define FN_PointContents_Post PointContents_Post -// #define FN_MessageBegin_Post MessageBegin_Post -// #define FN_MessageEnd_Post MessageEnd_Post -// #define FN_WriteByte_Post WriteByte_Post -// #define FN_WriteChar_Post WriteChar_Post -// #define FN_WriteShort_Post WriteShort_Post -// #define FN_WriteLong_Post WriteLong_Post -// #define FN_WriteAngle_Post WriteAngle_Post -// #define FN_WriteCoord_Post WriteCoord_Post -// #define FN_WriteString_Post WriteString_Post -// #define FN_WriteEntity_Post WriteEntity_Post -// #define FN_CVarRegister_Post CVarRegister_Post -// #define FN_CVarGetFloat_Post CVarGetFloat_Post -// #define FN_CVarGetString_Post CVarGetString_Post -// #define FN_CVarSetFloat_Post CVarSetFloat_Post -// #define FN_CVarSetString_Post CVarSetString_Post -// #define FN_AlertMessage_Post AlertMessage_Post -// #define FN_EngineFprintf_Post EngineFprintf_Post -// #define FN_PvAllocEntPrivateData_Post PvAllocEntPrivateData_Post -// #define FN_PvEntPrivateData_Post PvEntPrivateData_Post -// #define FN_FreeEntPrivateData_Post FreeEntPrivateData_Post -// #define FN_SzFromIndex_Post SzFromIndex_Post -// #define FN_AllocString_Post AllocString_Post -// #define FN_GetVarsOfEnt_Post GetVarsOfEnt_Post -// #define FN_PEntityOfEntOffset_Post PEntityOfEntOffset_Post -// #define FN_EntOffsetOfPEntity_Post EntOffsetOfPEntity_Post -// #define FN_IndexOfEdict_Post IndexOfEdict_Post -// #define FN_PEntityOfEntIndex_Post PEntityOfEntIndex_Post -// #define FN_FindEntityByVars_Post FindEntityByVars_Post -// #define FN_GetModelPtr_Post GetModelPtr_Post -// #define FN_RegUserMsg_Post RegUserMsg_Post -// #define FN_AnimationAutomove_Post AnimationAutomove_Post -// #define FN_GetBonePosition_Post GetBonePosition_Post -// #define FN_FunctionFromName_Post FunctionFromName_Post -// #define FN_NameForFunction_Post NameForFunction_Post -// #define FN_ClientPrintf_Post ClientPrintf_Post -// #define FN_ServerPrint_Post ServerPrint_Post -// #define FN_Cmd_Args_Post Cmd_Args_Post -// #define FN_Cmd_Argv_Post Cmd_Argv_Post -// #define FN_Cmd_Argc_Post Cmd_Argc_Post -// #define FN_GetAttachment_Post GetAttachment_Post -// #define FN_CRC32_Init_Post CRC32_Init_Post -// #define FN_CRC32_ProcessBuffer_Post CRC32_ProcessBuffer_Post -// #define FN_CRC32_ProcessByte_Post CRC32_ProcessByte_Post -// #define FN_CRC32_Final_Post CRC32_Final_Post -// #define FN_RandomLong_Post RandomLong_Post -// #define FN_RandomFloat_Post RandomFloat_Post -// #define FN_SetView_Post SetView_Post -// #define FN_Time_Post Time_Post -// #define FN_CrosshairAngle_Post CrosshairAngle_Post -// #define FN_LoadFileForMe_Post LoadFileForMe_Post -// #define FN_FreeFile_Post FreeFile_Post -// #define FN_EndSection_Post EndSection_Post -// #define FN_CompareFileTime_Post CompareFileTime_Post -// #define FN_GetGameDir_Post GetGameDir_Post -// #define FN_Cvar_RegisterVariable_Post Cvar_RegisterVariable_Post -// #define FN_FadeClientVolume_Post FadeClientVolume_Post -// #define FN_SetClientMaxspeed_Post SetClientMaxspeed_Post -// #define FN_CreateFakeClient_Post CreateFakeClient_Post -// #define FN_RunPlayerMove_Post RunPlayerMove_Post -// #define FN_NumberOfEntities_Post NumberOfEntities_Post -// #define FN_GetInfoKeyBuffer_Post GetInfoKeyBuffer_Post -// #define FN_InfoKeyValue_Post InfoKeyValue_Post -// #define FN_SetKeyValue_Post SetKeyValue_Post -// #define FN_SetClientKeyValue_Post SetClientKeyValue_Post -// #define FN_IsMapValid_Post IsMapValid_Post -// #define FN_StaticDecal_Post StaticDecal_Post -// #define FN_PrecacheGeneric_Post PrecacheGeneric_Post -// #define FN_GetPlayerUserId_Post GetPlayerUserId_Post -// #define FN_BuildSoundMsg_Post BuildSoundMsg_Post -// #define FN_IsDedicatedServer_Post IsDedicatedServer_Post -// #define FN_CVarGetPointer_Post CVarGetPointer_Post -// #define FN_GetPlayerWONId_Post GetPlayerWONId_Post -// #define FN_Info_RemoveKey_Post Info_RemoveKey_Post -// #define FN_GetPhysicsKeyValue_Post GetPhysicsKeyValue_Post -// #define FN_SetPhysicsKeyValue_Post SetPhysicsKeyValue_Post -// #define FN_GetPhysicsInfoString_Post GetPhysicsInfoString_Post -// #define FN_PrecacheEvent_Post PrecacheEvent_Post -// #define FN_PlaybackEvent_Post PlaybackEvent_Post -// #define FN_SetFatPVS_Post SetFatPVS_Post -// #define FN_SetFatPAS_Post SetFatPAS_Post -// #define FN_CheckVisibility_Post CheckVisibility_Post -// #define FN_DeltaSetField_Post DeltaSetField_Post -// #define FN_DeltaUnsetField_Post DeltaUnsetField_Post -// #define FN_DeltaAddEncoder_Post DeltaAddEncoder_Post -// #define FN_GetCurrentPlayer_Post GetCurrentPlayer_Post -// #define FN_CanSkipPlayer_Post CanSkipPlayer_Post -// #define FN_DeltaFindField_Post DeltaFindField_Post -// #define FN_DeltaSetFieldByIndex_Post DeltaSetFieldByIndex_Post -// #define FN_DeltaUnsetFieldByIndex_Post DeltaUnsetFieldByIndex_Post -// #define FN_SetGroupMask_Post SetGroupMask_Post -// #define FN_engCreateInstancedBaseline_Post engCreateInstancedBaseline_Post -// #define FN_Cvar_DirectSet_Post Cvar_DirectSet_Post -// #define FN_ForceUnmodified_Post ForceUnmodified_Post -// #define FN_GetPlayerStats_Post GetPlayerStats_Post -// #define FN_AddServerCommand_Post AddServerCommand_Post -// #define FN_Voice_GetClientListening_Post Voice_GetClientListening_Post -// #define FN_Voice_SetClientListening_Post Voice_SetClientListening_Post -// #define FN_GetPlayerAuthId_Post GetPlayerAuthId_Post - -// #define FN_OnFreeEntPrivateData OnFreeEntPrivateData -// #define FN_GameShutdown GameShutdown -// #define FN_ShouldCollide ShouldCollide - -// #define FN_OnFreeEntPrivateData_Post OnFreeEntPrivateData_Post -// #define FN_GameShutdown_Post GameShutdown_Post -// #define FN_ShouldCollide_Post ShouldCollide_Post - - -#endif // USE_METAMOD - -#endif // __MODULECONFIG_H__ - diff --git a/dlls/arrayx/Array.cpp b/dlls/arrayx/Array.cpp deleted file mode 100644 index 293a4f69..00000000 --- a/dlls/arrayx/Array.cpp +++ /dev/null @@ -1,34 +0,0 @@ -#include "amxxmodule.h" -#include "ComboArray.h" - -extern AMX_NATIVE_INFO bintrie_exports[]; -extern AMX_NATIVE_INFO bintrie_usage_exports[]; -extern ComboArray MasterTrie; - -extern AMX_NATIVE_INFO list_exports[]; -extern AMX_NATIVE_INFO list_creation_exports[]; -extern ComboArray MasterList; - -extern AMX_NATIVE_INFO map_exports[]; -extern AMX_NATIVE_INFO map_creation_exports[]; -extern ComboArray MasterMap; - - -void OnAmxxAttach( void ) -{ - MF_AddNatives(bintrie_exports); - MF_AddNatives(bintrie_usage_exports); - - MF_AddNatives(list_exports); - MF_AddNatives(list_creation_exports); - - MF_AddNatives(map_exports); - MF_AddNatives(map_creation_exports); -} - -void OnAmxxDetach( void ) -{ - JudyClearMasterTrie(&MasterTrie); - JudyClearMasterList(&MasterList); - JudyClearMasterMap(&MasterMap); -} \ No newline at end of file diff --git a/dlls/arrayx/Array.dep b/dlls/arrayx/Array.dep deleted file mode 100644 index ccb224a6..00000000 --- a/dlls/arrayx/Array.dep +++ /dev/null @@ -1,175 +0,0 @@ -# Microsoft Developer Studio Generated Dependency File, included by Array.mak - -.\Array.cpp : \ - "..\..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ - ".\amxxmodule.h"\ - ".\Capsule.h"\ - ".\CArray.h"\ - ".\CBaseList.h"\ - ".\CBaseMap.h"\ - ".\CBinTrie.h"\ - ".\ComboArray.h"\ - ".\Judy.h"\ - ".\JudyEx.h"\ - ".\JudyExtra.h"\ - ".\JudyIncludes.h"\ - ".\JudyVar.h"\ - ".\JudyVec.h"\ - ".\moduleconfig.h"\ - ".\osdefs.h"\ - - -.\BinTrieNatives.cpp : \ - "..\..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ - ".\amxxmodule.h"\ - ".\BinTrieNativeFunctions.h"\ - ".\Capsule.h"\ - ".\CArray.h"\ - ".\CBaseList.h"\ - ".\CBaseMap.h"\ - ".\CBinTrie.h"\ - ".\ComboArray.h"\ - ".\GenericNatives.h"\ - ".\Judy.h"\ - ".\JudyEx.h"\ - ".\JudyExtra.h"\ - ".\JudyIncludes.h"\ - ".\JudyVar.h"\ - ".\JudyVec.h"\ - ".\moduleconfig.h"\ - ".\NativeIncludes.h"\ - ".\osdefs.h"\ - - -.\Capsule.cpp : \ - "..\..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ - ".\amxxmodule.h"\ - ".\Capsule.h"\ - ".\Judy.h"\ - ".\JudyEx.h"\ - ".\JudyIncludes.h"\ - ".\JudyVar.h"\ - ".\JudyVec.h"\ - ".\moduleconfig.h"\ - ".\osdefs.h"\ - - -.\CArray.cpp : \ - "..\..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ - ".\amxxmodule.h"\ - ".\Capsule.h"\ - ".\CArray.h"\ - ".\CBaseList.h"\ - ".\CBaseMap.h"\ - ".\Judy.h"\ - ".\JudyEx.h"\ - ".\JudyExtra.h"\ - ".\JudyIncludes.h"\ - ".\JudyVar.h"\ - ".\JudyVec.h"\ - ".\moduleconfig.h"\ - ".\osdefs.h"\ - - -.\CBinTrie.cpp : \ - "..\..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ - ".\amxxmodule.h"\ - ".\Capsule.h"\ - ".\CBaseList.h"\ - ".\CBaseMap.h"\ - ".\CBinTrie.h"\ - ".\Judy.h"\ - ".\JudyEx.h"\ - ".\JudyExtra.h"\ - ".\JudyIncludes.h"\ - ".\JudyVar.h"\ - ".\JudyVec.h"\ - ".\moduleconfig.h"\ - ".\osdefs.h"\ - - -.\CKeytable.cpp : \ - "..\..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ - ".\amxxmodule.h"\ - ".\Capsule.h"\ - ".\CBaseList.h"\ - ".\CBaseMap.h"\ - ".\CKeytable.h"\ - ".\Judy.h"\ - ".\JudyEx.h"\ - ".\JudyExtra.h"\ - ".\JudyIncludes.h"\ - ".\JudyVar.h"\ - ".\JudyVec.h"\ - ".\moduleconfig.h"\ - ".\osdefs.h"\ - - -.\JudyExtra.cpp : \ - "..\..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ - ".\amxxmodule.h"\ - ".\Capsule.h"\ - ".\CBaseList.h"\ - ".\CBaseMap.h"\ - ".\CBinTrie.h"\ - ".\Judy.h"\ - ".\JudyEx.h"\ - ".\JudyExtra.h"\ - ".\JudyIncludes.h"\ - ".\JudyVar.h"\ - ".\JudyVec.h"\ - ".\moduleconfig.h"\ - ".\osdefs.h"\ - - -.\ListNatives.cpp : \ - "..\..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ - ".\amxxmodule.h"\ - ".\Capsule.h"\ - ".\CArray.h"\ - ".\CBaseList.h"\ - ".\CBaseMap.h"\ - ".\CBinTrie.h"\ - ".\ComboArray.h"\ - ".\GenericNatives.h"\ - ".\Judy.h"\ - ".\JudyEx.h"\ - ".\JudyExtra.h"\ - ".\JudyIncludes.h"\ - ".\JudyVar.h"\ - ".\JudyVec.h"\ - ".\ListNativeFunctions.h"\ - ".\moduleconfig.h"\ - ".\NativeIncludes.h"\ - ".\osdefs.h"\ - - -.\MapNatives.cpp : \ - "..\..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ - ".\amxxmodule.h"\ - ".\Capsule.h"\ - ".\CArray.h"\ - ".\CBaseList.h"\ - ".\CBaseMap.h"\ - ".\CBinTrie.h"\ - ".\CHashtable.h"\ - ".\CKeytable.h"\ - ".\ComboArray.h"\ - ".\ComboTable.h"\ - ".\GenericNatives.h"\ - ".\Judy.h"\ - ".\JudyEx.h"\ - ".\JudyExtra.h"\ - ".\JudyIncludes.h"\ - ".\JudyVar.h"\ - ".\JudyVec.h"\ - ".\MapNativeFunctions.h"\ - ".\moduleconfig.h"\ - ".\NativeIncludes.h"\ - ".\osdefs.h"\ - - -.\amxxmodule.cpp : \ - ".\amxxmodule.h"\ - ".\moduleconfig.h"\ - diff --git a/dlls/arrayx/Array.dsp b/dlls/arrayx/Array.dsp deleted file mode 100644 index 5fdfc06e..00000000 --- a/dlls/arrayx/Array.dsp +++ /dev/null @@ -1,237 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Array" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=Array - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "Array.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "Array.mak" CFG="Array - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Array - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "Array - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "Array - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ARRAY_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ARRAY_EXPORTS" /FR /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 - -!ELSEIF "$(CFG)" == "Array - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ARRAY_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ARRAY_EXPORTS" /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "Array - Win32 Release" -# Name "Array - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\Array.cpp -# End Source File -# Begin Source File - -SOURCE=.\BinTrieNatives.cpp -# End Source File -# Begin Source File - -SOURCE=.\Capsule.cpp -# End Source File -# Begin Source File - -SOURCE=.\CArray.cpp -# End Source File -# Begin Source File - -SOURCE=.\CBinTrie.cpp -# End Source File -# Begin Source File - -SOURCE=.\CKeytable.cpp -# End Source File -# Begin Source File - -SOURCE=.\JudyExtra.cpp -# End Source File -# Begin Source File - -SOURCE=.\ListNatives.cpp -# End Source File -# Begin Source File - -SOURCE=.\MapNatives.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\Capsule.h -# End Source File -# Begin Source File - -SOURCE=.\CArray.h -# End Source File -# Begin Source File - -SOURCE=.\CBaseList.h -# End Source File -# Begin Source File - -SOURCE=.\CBaseMap.h -# End Source File -# Begin Source File - -SOURCE=.\CBinTrie.h -# End Source File -# Begin Source File - -SOURCE=.\CHashtable.h -# End Source File -# Begin Source File - -SOURCE=.\CKeytable.h -# End Source File -# Begin Source File - -SOURCE=.\ComboArray.h -# End Source File -# Begin Source File - -SOURCE=.\ComboTable.h -# End Source File -# Begin Source File - -SOURCE=.\JudyIncludes.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# Begin Source File - -SOURCE=.\amxxmodule.cpp -# End Source File -# Begin Source File - -SOURCE=.\amxxmodule.h -# End Source File -# Begin Source File - -SOURCE=.\BinTrieNativeFunctions.h -# End Source File -# Begin Source File - -SOURCE=.\GenericNatives.h -# End Source File -# Begin Source File - -SOURCE=.\Judy.h -# End Source File -# Begin Source File - -SOURCE=.\JudyEx.h -# End Source File -# Begin Source File - -SOURCE=.\JudyExtra.h -# End Source File -# Begin Source File - -SOURCE=.\JudyVar.h -# End Source File -# Begin Source File - -SOURCE=.\JudyVec.h -# End Source File -# Begin Source File - -SOURCE=.\ListNativeFunctions.h -# End Source File -# Begin Source File - -SOURCE=.\MapNativeFunctions.h -# End Source File -# Begin Source File - -SOURCE=.\moduleconfig.h -# End Source File -# Begin Source File - -SOURCE=.\NativeIncludes.h -# End Source File -# Begin Source File - -SOURCE=.\osdefs.h -# End Source File -# Begin Source File - -SOURCE=.\Judy.lib -# End Source File -# End Group -# End Target -# End Project diff --git a/dlls/arrayx/Array.dsw b/dlls/arrayx/Array.dsw deleted file mode 100644 index b670e501..00000000 --- a/dlls/arrayx/Array.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "Array"=".\Array.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/dlls/arrayx/Array.ncb b/dlls/arrayx/Array.ncb deleted file mode 100644 index efeb85a1..00000000 Binary files a/dlls/arrayx/Array.ncb and /dev/null differ diff --git a/dlls/arrayx/Array.opt b/dlls/arrayx/Array.opt deleted file mode 100644 index 131a92f1..00000000 Binary files a/dlls/arrayx/Array.opt and /dev/null differ diff --git a/dlls/arrayx/Array.plg b/dlls/arrayx/Array.plg deleted file mode 100644 index a1fdb334..00000000 --- a/dlls/arrayx/Array.plg +++ /dev/null @@ -1,110 +0,0 @@ - - -
-

Build Log

-

---------------------Configuration: Array - Win32 Release-------------------- -

-

Command Lines

-Creating temporary file "C:\DOCUME~1\Edward\LOCALS~1\Temp\RSPED.tmp" with contents -[ -/nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ARRAY_EXPORTS" /FR"Release/" /Fp"Release/Array.pch" /YX /Fo"Release/" /Fd"Release/" /FD /c -"C:\Array\Array.cpp" -"C:\Array\BinTrieNatives.cpp" -"C:\Array\Capsule.cpp" -"C:\Array\CArray.cpp" -"C:\Array\CBinTrie.cpp" -"C:\Array\CKeytable.cpp" -"C:\Array\JudyExtra.cpp" -"C:\Array\ListNatives.cpp" -"C:\Array\MapNatives.cpp" -"C:\Array\amxxmodule.cpp" -] -Creating command line "cl.exe @C:\DOCUME~1\Edward\LOCALS~1\Temp\RSPED.tmp" -Creating temporary file "C:\DOCUME~1\Edward\LOCALS~1\Temp\RSPEE.tmp" with contents -[ -kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:no /pdb:"Release/Array.pdb" /machine:I386 /out:"Release/Array.dll" /implib:"Release/Array.lib" -.\Release\Array.obj -.\Release\BinTrieNatives.obj -.\Release\Capsule.obj -.\Release\CArray.obj -.\Release\CBinTrie.obj -.\Release\CKeytable.obj -.\Release\JudyExtra.obj -.\Release\ListNatives.obj -.\Release\MapNatives.obj -.\Release\amxxmodule.obj -.\Judy.lib -] -Creating command line "link.exe @C:\DOCUME~1\Edward\LOCALS~1\Temp\RSPEE.tmp" -

Output Window

-Compiling... -Array.cpp -BinTrieNatives.cpp -Capsule.cpp -CArray.cpp -CBinTrie.cpp -CKeytable.cpp -JudyExtra.cpp -C:\Array\JudyExtra.cpp(10) : warning C4101: 'e' : unreferenced local variable -C:\Array\JudyExtra.cpp(15) : warning C4101: 'e' : unreferenced local variable -C:\Array\JudyExtra.cpp(20) : warning C4101: 'e' : unreferenced local variable -C:\Array\JudyExtra.cpp(23) : warning C4101: 'e' : unreferenced local variable -C:\Array\JudyExtra.cpp(34) : warning C4101: 'e' : unreferenced local variable -C:\Array\JudyExtra.cpp(41) : warning C4101: 'e' : unreferenced local variable -C:\Array\JudyExtra.cpp(66) : warning C4101: 'e' : unreferenced local variable -C:\Array\JudyExtra.cpp(102) : warning C4101: 'e' : unreferenced local variable -C:\Array\JudyExtra.cpp(107) : warning C4101: 'e' : unreferenced local variable -C:\Array\JudyExtra.cpp(112) : warning C4101: 'e' : unreferenced local variable -C:\Array\JudyExtra.cpp(115) : warning C4101: 'e' : unreferenced local variable -C:\Array\JudyExtra.cpp(127) : warning C4101: 'e' : unreferenced local variable -C:\Array\JudyExtra.cpp(132) : warning C4101: 'e' : unreferenced local variable -C:\Array\JudyExtra.cpp(137) : warning C4101: 'e' : unreferenced local variable -C:\Array\JudyExtra.cpp(140) : warning C4101: 'e' : unreferenced local variable -C:\Array\JudyExtra.cpp(160) : warning C4101: 'e' : unreferenced local variable -C:\Array\JudyExtra.cpp(164) : warning C4101: 'e' : unreferenced local variable -C:\Array\JudyExtra.cpp(167) : warning C4101: 'e' : unreferenced local variable -C:\Array\JudyExtra.cpp(190) : warning C4101: 'e' : unreferenced local variable -C:\Array\JudyExtra.cpp(205) : warning C4101: 'e' : unreferenced local variable -C:\Array\JudyExtra.cpp(210) : warning C4101: 'e' : unreferenced local variable -C:\Array\JudyExtra.cpp(215) : warning C4101: 'e' : unreferenced local variable -C:\Array\JudyExtra.cpp(218) : warning C4101: 'e' : unreferenced local variable -C:\Array\JudyExtra.cpp(230) : warning C4101: 'e' : unreferenced local variable -C:\Array\JudyExtra.cpp(235) : warning C4101: 'e' : unreferenced local variable -C:\Array\JudyExtra.cpp(240) : warning C4101: 'e' : unreferenced local variable -C:\Array\JudyExtra.cpp(243) : warning C4101: 'e' : unreferenced local variable -C:\Array\JudyExtra.cpp(258) : warning C4101: 'e' : unreferenced local variable -C:\Array\JudyExtra.cpp(266) : warning C4101: 'e' : unreferenced local variable -C:\Array\JudyExtra.cpp(274) : warning C4101: 'e' : unreferenced local variable -C:\Array\JudyExtra.cpp(277) : warning C4101: 'e' : unreferenced local variable -C:\Array\JudyExtra.cpp(305) : warning C4101: 'e' : unreferenced local variable -ListNatives.cpp -MapNatives.cpp -amxxmodule.cpp -Linking... - Creating library Release/Array.lib and object Release/Array.exp -LINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:library -Creating temporary file "C:\DOCUME~1\Edward\LOCALS~1\Temp\RSPF2.tmp" with contents -[ -/nologo /o"Release/Array.bsc" -.\Release\Array.sbr -.\Release\BinTrieNatives.sbr -.\Release\Capsule.sbr -.\Release\CArray.sbr -.\Release\CBinTrie.sbr -.\Release\CKeytable.sbr -.\Release\JudyExtra.sbr -.\Release\ListNatives.sbr -.\Release\MapNatives.sbr -.\Release\amxxmodule.sbr] -Creating command line "bscmake.exe @C:\DOCUME~1\Edward\LOCALS~1\Temp\RSPF2.tmp" -Creating browse info file... -

Output Window

- - - -

Results

-Array.dll - 0 error(s), 33 warning(s) -
- - diff --git a/dlls/arrayx/BinTrieNativeFunctions.h b/dlls/arrayx/BinTrieNativeFunctions.h deleted file mode 100644 index 0b258f4a..00000000 --- a/dlls/arrayx/BinTrieNativeFunctions.h +++ /dev/null @@ -1,78 +0,0 @@ -#ifndef _bintrie_NATIVE_FUNC_INC_H -#define _bintrie_NATIVE_FUNC_INC_H - -#define JUDY_GLUE_FUNC( x , y ) x ## y - -#define JUDY_GLUE_STR( x, y ) #x#y - -#define JUDY_MASTER_EDIT_FUNCTIONS -#define JUDY_MASTER_CLEAR_FUNC JUDY_GLUE_FUNC( bintrie , _clear ) -#define JUDY_MASTER_CLEAR_STR JUDY_GLUE_STR ( bintrie , _clear ) - -#define JUDY_MASTER_DELETE_FUNC JUDY_GLUE_FUNC( bintrie , _delete ) -#define JUDY_MASTER_DELETE_STR JUDY_GLUE_STR ( bintrie , _delete ) - -#define JUDY_MASTER_IO_FUNCTIONS - -#define JUDY_MASTER_SAVE_FUNC JUDY_GLUE_FUNC( bintrie , _save ) -#define JUDY_MASTER_SAVE_STR JUDY_GLUE_STR ( bintrie , _save ) -#define JUDY_SAVE_FUNC(bin,file) JudySaveBinTrie(bin , file ) - -#define JUDY_MASTER_LOAD_FUNC JUDY_GLUE_FUNC( bintrie , _load ) -#define JUDY_MASTER_LOAD_STR JUDY_GLUE_STR ( bintrie , _load ) -#define JUDY_LOAD_FUNC(bin, file) JudyLoadBinTrie(bin , file ) - -#define JUDY_MASTER_AMOUNT_FUNCTIONS -#define JUDY_MASTER_COUNT_FUNC JUDY_GLUE_FUNC( bintrie , _count ) -#define JUDY_MASTER_COUNT_STR JUDY_GLUE_STR ( bintrie , _count ) - -#define JUDY_MASTER_BYCOUNT_FUNC JUDY_GLUE_FUNC( bintrie , _bycount ) -#define JUDY_MASTER_BYCOUNT_STR JUDY_GLUE_STR ( bintrie , _bycount ) - -#define JUDY_SLAVE_AMOUNT_FUNCTIONS - -#define JUDY_SLAVE_COUNT_FUNC JUDY_GLUE_FUNC( bintrie , _size ) -#define JUDY_SLAVE_COUNT_STR JUDY_GLUE_STR ( bintrie , _size ) - -#define JUDY_SLAVE_BYCOUNT_FUNC JUDY_GLUE_FUNC( bintrie , _get_nth ) -#define JUDY_SLAVE_BYCOUNT_STR JUDY_GLUE_STR ( bintrie , _get_nth ) - -#define JUDY_SLAVE_EDIT_FUNCTIONS - -#define JUDY_SLAVE_MEMORY_FUNC JUDY_GLUE_FUNC( bintrie , _memory ) -#define JUDY_SLAVE_MEMORY_STR JUDY_GLUE_STR ( bintrie , _memory ) - -#define JUDY_SLAVE_ISFILLED_FUNC JUDY_GLUE_FUNC( bintrie , _isfilled ) -#define JUDY_SLAVE_ISFILLED_STR JUDY_GLUE_STR ( bintrie , _isfilled ) - -#define JUDY_SLAVE_ISEMPTY_FUNC JUDY_GLUE_FUNC( bintrie , _isempty ) -#define JUDY_SLAVE_ISEMPTY_STR JUDY_GLUE_STR ( bintrie , _isempty ) - -#define NO_JUDY_SLAVE_REMOVE_FUNC - -#define JUDY_SLAVE_SEARCH_FUNCTIONS -#define JUDY_SLAVE_FIRST_FUNC JUDY_GLUE_FUNC( bintrie , _first ) -#define JUDY_SLAVE_LAST_FUNC JUDY_GLUE_FUNC( bintrie , _last ) - -#define JUDY_SLAVE_FIRST_STR JUDY_GLUE_STR ( bintrie , _first ) -#define JUDY_SLAVE_LAST_STR JUDY_GLUE_STR ( bintrie , _last ) - -#define JUDY_SLAVE_NEXT_FUNC JUDY_GLUE_FUNC( bintrie , _next ) -#define JUDY_SLAVE_PREV_FUNC JUDY_GLUE_FUNC( bintrie , _prev ) - -#define JUDY_SLAVE_NEXT_STR JUDY_GLUE_STR ( bintrie , _next ) -#define JUDY_SLAVE_PREV_STR JUDY_GLUE_STR ( bintrie , _prev ) - -#define JUDY_SLAVE_SEARCH_EMPTY_FUNCTIONS -#define JUDY_SLAVE_FIRSTEMPTY_FUNC JUDY_GLUE_FUNC( bintrie , _firstempty ) -#define JUDY_SLAVE_LASTEMPTY_FUNC JUDY_GLUE_FUNC( bintrie , _lastempty ) - -#define JUDY_SLAVE_FIRSTEMPTY_STR JUDY_GLUE_STR ( bintrie , _firstempty ) -#define JUDY_SLAVE_LASTEMPTY_STR JUDY_GLUE_STR ( bintrie , _lastempty ) - -#define JUDY_SLAVE_NEXTEMPTY_FUNC JUDY_GLUE_FUNC( bintrie , _nextempty ) -#define JUDY_SLAVE_PREVEMPTY_FUNC JUDY_GLUE_FUNC( bintrie , _prevempty ) - -#define JUDY_SLAVE_NEXTEMPTY_STR JUDY_GLUE_STR ( bintrie , _nextempty ) -#define JUDY_SLAVE_PREVEMPTY_STR JUDY_GLUE_STR ( bintrie , _prevempty ) -#endif \ No newline at end of file diff --git a/dlls/arrayx/BinTrieNatives.cpp b/dlls/arrayx/BinTrieNatives.cpp deleted file mode 100644 index 9de5504b..00000000 --- a/dlls/arrayx/BinTrieNatives.cpp +++ /dev/null @@ -1,69 +0,0 @@ -#include "CBinTrie.h" - -#define KEY_TYPE cell -#define DYNAMIC_UNIT_TYPE BinTrie -#define STORAGE_TYPE cell -#define MASTER_NAME MasterTrie -#define EXPORT_NAME bintrie_exports - -#define SEARCH_ERROR_OFFSET 0 - -#define GET_KEY(params, num) params[num] -#define SET_KEY(stuff, parameter) stuff - -#include "BinTrieNativeFunctions.h" -#include "NativeIncludes.h" - -static cell AMX_NATIVE_CALL bintrie_create(AMX *amx,cell *params) -{ - DTYPE* Unit; - M_ITYPE Index = params[1]; - - JUDY_CREATE_INDEX(MNAME,Unit,BinTrie,Index); - return Index; -} - -static cell AMX_NATIVE_CALL bintrie_set(AMX *amx,cell *params) -{ - DTYPE* Unit = NULL; - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - bool Value = (params[3] != NULL); - - try { return Unit->Set(Indice, Value ); } - JUDY_ERROR_CATCH("Judy Error: (No error possible) - Slave Set Function "); -} - -static cell AMX_NATIVE_CALL bintrie_get(AMX *amx,cell *params) -{ - DTYPE* Unit = NULL; - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - - try { return Unit->Get(Indice ); } - JUDY_ERROR_CATCH("Judy Error: (No error possible) - Slave Get Function "); -} - -static cell AMX_NATIVE_CALL bintrie_remove(AMX *amx,cell *params) -{ - DTYPE* Unit = NULL; - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - - try { return Unit->Delete(Indice ); } - JUDY_ERROR_CATCH("Judy Error: (No error possible) - Slave Delete Function "); -} - - -AMX_NATIVE_INFO bintrie_usage_exports[] = -{ - { "bintrie_create", bintrie_create }, - { "bintrie_set", bintrie_set }, - { "bintrie_get", bintrie_get }, - { "bintrie_remove", bintrie_remove }, - - { NULL, NULL } -}; \ No newline at end of file diff --git a/dlls/arrayx/CArray.cpp b/dlls/arrayx/CArray.cpp deleted file mode 100644 index 2285e4d3..00000000 --- a/dlls/arrayx/CArray.cpp +++ /dev/null @@ -1,87 +0,0 @@ -#include "CArray.h" - -void Array::ThrowSearchError(char* type) -{ - char value[50]; - sprintf(value,"Function attempted to search %s: Judy returned NULL value", type); - - throw JudyEx(value,false); -} - -void Array::ThrowIndexError( cell index, bool disable_check ) -{ - if(disable_check == true) return; - - char error[50]; - sprintf(error,"Index %i is not set.",index); - - throw JudyEx(error,true); -} - -cell Array::First( cell Start) -{ - PPvoid_t success = JudyLFirst(Table, reinterpret_cast(&Start), PJE0); - if (success == NULL) ThrowSearchError("Type:First"); - - return Start; -} - -cell Array::FirstEmpty( cell Start) -{ - cell success = JudyLFirstEmpty(Table, reinterpret_cast(&Start), PJE0); - if (success == NULL) ThrowSearchError("Type:FirstEmpty"); - return Start; -} - -cell Array::Next( cell Start) -{ - PPvoid_t success = JudyLNext(Table, reinterpret_cast(&Start), PJE0); - if (success == NULL) ThrowSearchError("Type:Next"); - - return Start; -} - -cell Array::NextEmpty( cell Start) -{ - cell success = JudyLNextEmpty(Table, reinterpret_cast(&Start), PJE0); - if (success == NULL) ThrowSearchError("Type:NextEmpty"); - return Start; -} - -cell Array::Prev( cell Start) -{ - PPvoid_t success = JudyLPrev(Table, reinterpret_cast(&Start), PJE0); - if (success == NULL) ThrowSearchError("Type:Prev"); - - return Start; -} - -cell Array::PrevEmpty( cell Start) -{ - cell success = JudyLPrevEmpty(Table, reinterpret_cast(&Start), PJE0); - if (success == NULL) ThrowSearchError("Type:PrevEmpty"); - return Start; -} - -cell Array::Last( cell Start) -{ - PPvoid_t success = JudyLLast(Table, reinterpret_cast(&Start), PJE0); - if (success == NULL) ThrowSearchError("Type:Last"); - - return Start; -} - -cell Array::LastEmpty( cell Start) -{ - cell success = JudyLLastEmpty(Table, reinterpret_cast(&Start), PJE0); - if (success == NULL) ThrowSearchError("Type:LastEmpty"); - return Start; -} - -cell Array::ByCount(cell n, cell Start) -{ - PPvoid_t success = JudyLByCount(Table, n, reinterpret_cast(&Start), PJE0); - if (success == NULL) ThrowSearchError("Type:Nth"); - - return Start; -} \ No newline at end of file diff --git a/dlls/arrayx/CArray.h b/dlls/arrayx/CArray.h deleted file mode 100644 index 7dcaa9b8..00000000 --- a/dlls/arrayx/CArray.h +++ /dev/null @@ -1,74 +0,0 @@ -#ifndef _ARRAYCLASS_H -#define _ARRAYCLASS_H - -#include "JudyIncludes.h" -#include "CBaseList.h" -#include "JudyExtra.h" -//#include - -class Array: public CBaseList -{ -private: - Pvoid_t Table; - - void ThrowIndexError( cell index, bool disable_check = false ); - void ThrowSearchError(char* msg); - -public: - Array() { Table = NULL; } - ~Array() { Clear(); } - void Remove() { delete this; } - - Word_t Clear() { JudyClearList(this); return JudyLFreeArray(&Table, PJE0); } - Word_t MemoryUsed() { return JudyLMemUsed(Table); } - - int Delete(cell Key) { return JudyLDel(&Table, Key, PJE0 ); } - - void Set(cell Index, Pvoid_t value, bool disable_check) - { - PPvoid_t PValue = JudyLIns(&Table, Index,PJE0); - *PValue = value; - } - - Pvoid_t Get(cell Index, bool disable_check = false) - { - PPvoid_t PValue = JudyLGet(Table, Index, PJE0); - if(PValue == NULL) { ThrowIndexError(Index, disable_check); return NULL; } - - return *PValue; - } - - template - void Set(cell Index, Type value) - { - PPvoid_t PValue = JudyLIns(&Table, Index,PJE0); - *PValue = reinterpret_cast(value); - } - - template - Type Get(cell Index, Type example, bool disable_check = false) - { - PPvoid_t PValue = JudyLGet(Table, Index, PJE0); - if(PValue == NULL) { ThrowIndexError(Index, disable_check); return (Type)NULL; } - - return (Type)(*PValue); - } - - cell First(cell Start = 0); - cell Next(cell Start = 0); - cell Prev(cell Start = -1); - cell Last(cell Start = -1); - - cell FirstEmpty(cell Start = 0); - cell NextEmpty(cell Start = 0); - cell PrevEmpty(cell Start = -1); - cell LastEmpty(cell Start = -1); - - cell ByCount(cell n, cell Start = 0); - cell Count(cell Start = 0, cell Stop = -1) { return JudyLCount(Table, Start, Stop, PJE0); } - - bool IsFilled(cell Index) { return ( (Get(Index, true ) != NULL) ? true : false); } - bool IsEmpty(cell Index) { return ( (Get(Index, true ) == NULL) ? true : false); } -}; - -#endif \ No newline at end of file diff --git a/dlls/arrayx/CBaseList.h b/dlls/arrayx/CBaseList.h deleted file mode 100644 index d0aedb5f..00000000 --- a/dlls/arrayx/CBaseList.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef _BASE_ARRAYCLASS_H -#define _BASE_ARRAYCLASS_H - -#include "JudyIncludes.h" - -class CBaseList -{ -public: - virtual Word_t Clear() =0; - virtual Word_t MemoryUsed() =0; - - virtual int Delete(cell Key) =0; - virtual void Remove() =0; - - virtual void Set(cell Index, Pvoid_t value, bool disable_check = false) =0; - - virtual Pvoid_t Get(cell Index, bool disable_check = false) =0; - - virtual cell First(cell Start = 0) =0; - virtual cell Next(cell Start = 0) =0; - virtual cell Prev(cell Start = -1) =0; - virtual cell Last(cell Start = -1) =0; - - virtual cell FirstEmpty(cell Start = 0) =0; - virtual cell NextEmpty(cell Start = 0) =0; - virtual cell PrevEmpty(cell Start = -1) =0; - virtual cell LastEmpty(cell Start = -1) =0; - - virtual cell ByCount(cell n, cell Start = 0) =0; - virtual cell Count(cell Start = 0, cell Stop = -1) =0; - - virtual bool IsFilled(cell Index) =0; - virtual bool IsEmpty(cell Index) =0; -}; - -#endif diff --git a/dlls/arrayx/CBaseMap.h b/dlls/arrayx/CBaseMap.h deleted file mode 100644 index 73f75815..00000000 --- a/dlls/arrayx/CBaseMap.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef _BASE_MAPCLASS_H -#define _BASE_MAPCLASS_H - -#include "JudyIncludes.h" - -class CBaseMap -{ -public: - virtual Word_t Clear() =0; - virtual Word_t MemoryUsed() =0; - - virtual int Delete(char* Key) =0; - virtual void Remove() =0; - - virtual void Set(char* Index, Pvoid_t value, bool disable_check = false) =0; - - virtual Pvoid_t Get(char* Index, bool disable_check = false) =0; - - virtual char* First(char* Start = "") =0; - virtual char* Next(char* Start) =0; - virtual char* Prev(char* Start) =0; - virtual char* Last(char* Start) =0; - - virtual bool IsFilled(char* Index) =0; - virtual bool IsEmpty(char* Index) =0; -}; - -#endif - diff --git a/dlls/arrayx/CBinTrie.cpp b/dlls/arrayx/CBinTrie.cpp deleted file mode 100644 index 33e712c8..00000000 --- a/dlls/arrayx/CBinTrie.cpp +++ /dev/null @@ -1,76 +0,0 @@ -#include "CBinTrie.h" - -void BinTrie::ThrowSearchError(char* type) -{ - char value[50]; - sprintf(value,"Function attempted to search %s: Judy returned NULL value", type); - - throw JudyEx (value,false); -} - -cell BinTrie::First( cell Start) -{ - cell success = Judy1First(Table, reinterpret_cast(&Start), PJE0); - if (success == NULL) ThrowSearchError("Type:First"); - return Start; -} - -cell BinTrie::FirstEmpty( cell Start) -{ - cell success = Judy1FirstEmpty(Table, reinterpret_cast(&Start), PJE0); - if (success == NULL) ThrowSearchError("Type:FirstEmpty"); - return Start; -} - -cell BinTrie::Next( cell Start) -{ - cell success = Judy1Next(Table, reinterpret_cast(&Start), PJE0); - if (success == NULL) ThrowSearchError("Type:Next"); - - return Start; -} - -cell BinTrie::NextEmpty( cell Start) -{ - cell success = Judy1NextEmpty(Table, reinterpret_cast(&Start), PJE0); - if (success == NULL) ThrowSearchError("Type:NextEmpty"); - return Start; -} - -cell BinTrie::Prev( cell Start) -{ - cell success = Judy1Prev(Table, reinterpret_cast(&Start), PJE0); - if (success == NULL) ThrowSearchError("Type:Prev"); - - return Start; -} - -cell BinTrie::PrevEmpty( cell Start) -{ - cell success = Judy1PrevEmpty(Table, reinterpret_cast(&Start), PJE0); - if (success == NULL) ThrowSearchError("Type:PrevEmpty"); - return Start; -} - -cell BinTrie::Last( cell Start) -{ - cell success = Judy1Last(Table, reinterpret_cast(&Start), PJE0); - if (success == NULL) ThrowSearchError("Type:Last"); - - return Start; -} - -cell BinTrie::LastEmpty( cell Start) -{ - cell success = Judy1LastEmpty(Table, reinterpret_cast(&Start), PJE0); - if (success == NULL) ThrowSearchError("Type:LastEmpty"); - return Start; -} - -cell BinTrie::ByCount(cell n, cell Start) -{ - cell success = Judy1ByCount(Table, n, reinterpret_cast(&Start), PJE0); - if (success == NULL) ThrowSearchError("Type:Nth"); - - return Start; -} \ No newline at end of file diff --git a/dlls/arrayx/CBinTrie.h b/dlls/arrayx/CBinTrie.h deleted file mode 100644 index 98853976..00000000 --- a/dlls/arrayx/CBinTrie.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef _BINTRIECLASS_H -#define _BINTRIECLASS_H - -#include "JudyIncludes.h" -#include "JudyExtra.h" -//#include - -class BinTrie -{ -private: - Pvoid_t Table; - - void ThrowSearchError(char* msg); - -public: - BinTrie() { Table = NULL; } - ~BinTrie() { Clear(); } - void Remove() { delete this; } - - Word_t Clear() { JudyClearBinTrie(this); return Judy1FreeArray(&Table, PJE0); } - Word_t MemoryUsed() { return Judy1MemUsed(Table); } - - cell Delete(cell Key) { return Judy1Unset(&Table, Key, PJE0 ); } - - cell Set(cell Index, bool val) - { - if(val == false) return Delete(Index); - else return Judy1Set(&Table, Index,PJE0); - } - - cell Get(cell Index) - { - cell PValue = Judy1Test(Table, Index, PJE0); - return PValue; - } - - cell First(cell Start = 0); - cell Next(cell Start = 0); - cell Prev(cell Start = -1); - cell Last(cell Start = -1); - - cell FirstEmpty(cell Start = 0); - cell NextEmpty(cell Start = 0); - cell PrevEmpty(cell Start = -1); - cell LastEmpty(cell Start = -1); - - cell ByCount(cell n, cell Start); - cell Count(cell Start = 0, cell Stop = -1) { return Judy1Count(Table, Start, Stop, PJE0); } - - bool IsFilled(cell Index) { return ( (Get(Index )) ? true : false); } - bool IsEmpty(cell Index) { return ( (Get(Index )) ? true : false); } -}; - -#endif \ No newline at end of file diff --git a/dlls/arrayx/CHashtable.h b/dlls/arrayx/CHashtable.h deleted file mode 100644 index 4a13e6fd..00000000 --- a/dlls/arrayx/CHashtable.h +++ /dev/null @@ -1,82 +0,0 @@ -#ifndef _HASHCLASS_INCLUDED -#define _HASHCLASS_INCLUDED - -#include "JudyIncludes.h" -#include "CBaseMap.h" -//#include - -class Hashtable: public CBaseMap -{ -private: - Pvoid_t Table; - -public: - Hashtable() { Table = NULL; } - ~Hashtable() { Clear(); } - void Remove() { delete this; } - - Word_t Clear() { return JudyHSFreeArray(&Table, PJE0); } - Word_t MemoryUsed() { return JudyLMemUsed(Table); } - - int Delete(char* Key) { return JudyHSDel(&Table, Key, strlen(Key), PJE0 ); } - - void Set(char* Index, Pvoid_t value, bool disable_check) - { - int Len = strlen(Index) + 1; - PPvoid_t PValue = JudyHSIns(&Table, Index, Len, PJE0); - *PValue = value; - } - - Pvoid_t Get(char* Index, bool disable_check = false) - { - PPvoid_t PValue = JudyHSGet(Table, Index, strlen(Index)+1); - if(PValue == NULL) { ThrowIndexError(Index, disable_check); return NULL; } - - return *PValue; - } - - template - void Set(char* Index, Type value) - { - int Len = strlen(Index) + 1; - PPvoid_t PValue = JudyHSIns(&Table, Index, Len, PJE0); - *PValue = reinterpret_cast(value); - } - - template - Type Get(char* Index, Type example, bool disable_check = false) - { - PPvoid_t PValue = JudyHSGet(Table, Index, strlen(Index)+1); - if(PValue == NULL) { ThrowIndexError(Index, disable_check); return (Type)NULL; } - - return (Type)(*PValue); - } - - char* First( char* Start = "") { ThrowSearchError(); return (char*)NULL; } - char* Next( char* Start = "") { ThrowSearchError(); return (char*)NULL; } - char* Prev( char* Start) { ThrowSearchError(); return (char*)NULL; } - char* Last( char* Start) { ThrowSearchError(); return (char*)NULL; } - - bool IsFilled(char* Index) { return ( (Get(Index,(PPvoid_t)(NULL), true ) != NULL) ? true : false);} - bool IsEmpty(char* Index) { return ( (Get(Index,(PPvoid_t)(NULL), true ) == NULL) ? true : false);} - -protected: - void ThrowIndexError( char* index, bool disable_check = false ) - { - if(disable_check == true) return; - - char value[100]; - sprintf(value,"Function attempted to read non existant index %s", index ); - - throw JudyEx(value, true); - } - void ThrowSearchError( void ) - { - char value[50]; - sprintf(value,"Function attempted to search HashTable!: Invalid action!"); - - throw JudyEx(value,true); - } -}; - -#endif \ No newline at end of file diff --git a/dlls/arrayx/CKeytable.cpp b/dlls/arrayx/CKeytable.cpp deleted file mode 100644 index 43f70c17..00000000 --- a/dlls/arrayx/CKeytable.cpp +++ /dev/null @@ -1,66 +0,0 @@ -#include "CKeytable.h" - -void Keytable::ThrowIndexError( char* index, bool disable_check = false ) -{ - if(disable_check == true) return; - - char error[50]; - sprintf(error,"Index %s is not set.",index); - - throw JudyEx(error,true); -} - -void Keytable::ThrowSearchError(char* type) -{ - char value[50]; - sprintf(value,"Function attempted to search %s: Judy returned NULL value", type); - - throw JudyEx(value,false); -} - -char* Keytable::First( char* Start) -{ - PPvoid_t index = JudySLFirst(Table, Start, PJE0); - if (index == NULL) - { - sprintf(Start,"dne"); - ThrowSearchError("Type:First"); - } - - return Start; -} - -char* Keytable::Next( char* Start) -{ - PPvoid_t index = JudySLNext(Table, Start, PJE0); - if (index == NULL) - { - sprintf(Start,"dne"); - ThrowSearchError("Type:Next"); - } - return Start; -} - -char* Keytable::Prev( char* Start) -{ - PPvoid_t index = JudySLPrev(Table, Start, PJE0); - if (index == NULL) - { - sprintf(Start,"dne"); - ThrowSearchError("Type:Prev"); - } - - return Start; -} - -char* Keytable::Last( char* Start) -{ - PPvoid_t index = JudySLLast(Table, Start, PJE0); - if (index == NULL) - { - sprintf(Start,"dne"); - ThrowSearchError("Type:Last"); - } - - return Start; -} \ No newline at end of file diff --git a/dlls/arrayx/CKeytable.h b/dlls/arrayx/CKeytable.h deleted file mode 100644 index 390b4ae1..00000000 --- a/dlls/arrayx/CKeytable.h +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef _KEYCLASS_INCLUDED -#define _KEYCLASS_INCLUDED - -#include "JudyIncludes.h" -#include "CBaseMap.h" -#include "JudyExtra.h" -//#include - -class Keytable: public CBaseMap -{ -private: - Pvoid_t Table; - - void ThrowSearchError(char* type); - void ThrowIndexError( char* index, bool disable_check); - -public: - Keytable() { Table = NULL; } - ~Keytable() { Clear(); } - void Remove() { delete this; } - - Word_t Clear() { JudyClearMap(this); return JudySLFreeArray(&Table, PJE0); } - Word_t MemoryUsed() { return JudyLMemUsed(Table); } - - int Delete(char* Key) { return JudySLDel(&Table, Key, PJE0 ); } - - void Set(char* Index, Pvoid_t value, bool disable_check) - { - PPvoid_t PValue = JudySLIns(&Table, Index,PJE0); - *PValue = value; - } - - Pvoid_t Get(char* Index, bool disable_check = false) - { - PPvoid_t PValue = JudySLGet(Table, Index, PJE0); - if(PValue == NULL) { ThrowIndexError(Index, disable_check); return NULL; } - - return *PValue; - } - - template - void Set(char* Index, Type value) - { - PPvoid_t PValue = JudySLIns(&Table, Index,PJE0); - *PValue = reinterpret_cast(value); - } - - template - Type Get(char* Index, Type example, bool disable_check = false) - { - PPvoid_t PValue = JudySLGet(Table, Index, PJE0); - if(PValue == NULL) { ThrowIndexError(Index, disable_check); return (Type)NULL; } - - return (Type)*PValue; - } - - char* First(char* Start = ""); - char* Next(char* Start = ""); - char* Prev(char* Start = ""); - char* Last(char* Start = ""); - - bool IsFilled(char* Index) { return ( (Get(Index,(PPvoid_t)(NULL), true ) != NULL) ? true : false); } - bool IsEmpty(char* Index) { return ( (Get(Index,(PPvoid_t)(NULL), true ) == NULL) ? true : false); } -}; - -#endif \ No newline at end of file diff --git a/dlls/arrayx/Capsule.cpp b/dlls/arrayx/Capsule.cpp deleted file mode 100644 index 4137201f..00000000 --- a/dlls/arrayx/Capsule.cpp +++ /dev/null @@ -1,261 +0,0 @@ -#include "Capsule.h" - -const char* capsule_types[] = -{ - "-NO VALUE-", - "BOOLEAN", - "INTEGER", - "FLOAT", - "VECTOR", - "STRING" -}; - -void Capsule::ThrowTypeError(cell get_type) -{ - char ValStr[15]; - GetAsStr(ValStr); - - char value[100]; - sprintf(value,"Function attempted to read NON-%s value, actual type is: %s, actual value is: %s", capsule_types[get_type], capsule_types[type], ValStr ); - - throw JudyEx(value, true); -} - -bool Capsule::CheckEmpty(bool clear) -{ - bool empty = ( data == NULL ); - - if(empty != true && clear == true) Clear(); - return empty; -} - -void Capsule::Clear() -{ - //This function intelligently creates a pointer x, - //which will be of correct type and then deletes it. - - switch (type) - { - case capsule_type_flo: - { - REAL *real_val = reinterpret_cast(data); - delete real_val; - - break; - } - case capsule_type_vec: - { - JudyVec *vector_val = reinterpret_cast(data); - delete vector_val; - - break; - } - case capsule_type_str: - { - char *char_val = reinterpret_cast(data); - delete char_val; - - break; - } - } - - data = NULL; //Null the address as well. (Used for ints too.) -} - -bool Capsule::GetBool( void ) -{ - if (type != capsule_type_bool) ThrowTypeError(capsule_type_bool); - - return (data != NULL); -} - -void Capsule::SetBool(bool Value) -{ - CheckEmpty(true); - type = capsule_type_bool; - if(Value == true) data = reinterpret_cast(1); -}; - -cell Capsule::GetInt( void ) -{ - if (type != capsule_type_int) ThrowTypeError(capsule_type_int); - - return reinterpret_cast(data); -} - -void Capsule::SetInt(cell Value) -{ - CheckEmpty(true); - type = capsule_type_int; - data = reinterpret_cast(Value); -}; - -REAL Capsule::GetFlo( void ) -{ - if (type != capsule_type_flo) ThrowTypeError(capsule_type_flo); - - return *reinterpret_cast(data); -} - -void Capsule::SetFlo(REAL Value) -{ - CheckEmpty(true); - type = capsule_type_flo; - data = new REAL(Value); -}; - -const JudyVec* Capsule::GetVec( void ) -{ - if (type != capsule_type_vec) ThrowTypeError(capsule_type_vec); - - return reinterpret_cast(data); -} - -void Capsule::SetVec(JudyVec* Value) -{ - CheckEmpty(true); - type = capsule_type_vec; - data = reinterpret_cast(Value); -} - -const char* Capsule::GetStr( void ) -{ - if (type != capsule_type_str) ThrowTypeError(capsule_type_str); - - return reinterpret_cast(data); -} - -void Capsule::SetStr(char* Value) -{ - CheckEmpty(true); - type = capsule_type_str; - - char *string_val = new char[strlen(Value)+1]; - strcpy(string_val,Value); - - data = reinterpret_cast(string_val); -} - -void Capsule::GetAsStr(char* value) -{ - switch (type) - { - case capsule_type_bool: - sprintf(value, "%i",(cell)GetBool()); - break; - case capsule_type_int: - sprintf(value, "%d", GetInt() ); - break; - case capsule_type_flo: - sprintf(value, "%f", GetFlo() ); - break; - case capsule_type_vec: - sprintf(value, "{%f,%f,%f}", GetVec()->first, GetVec()->second, GetVec()->third); - break; - case capsule_type_str: - sprintf(value, "\"%s\"", GetStr() ); - break; - default: - sprintf(value, "-NO VALUE-"); - } -} - -void Capsule::Save(FILE* capsuleDB) -{ - fwrite(&type,sizeof(char),1,capsuleDB); - - switch(type) - { - case capsule_type_none: { break; } - case capsule_type_bool: { bool var = GetBool(); fwrite(&var, sizeof(bool), 1, capsuleDB); break; } - case capsule_type_int: { cell var = GetInt(); fwrite(&var, sizeof(cell), 1, capsuleDB); break; } - case capsule_type_flo: { fwrite(reinterpret_cast(GetData()), sizeof(REAL), 1, capsuleDB); break; } - case capsule_type_str: - { - const char* str = GetStr(); - size_t len = strlen(str); - fwrite(&len,sizeof(size_t), 1, capsuleDB); - fwrite(&str, sizeof(char), len, capsuleDB); - - break; - } - case capsule_type_vec: - { - const JudyVec* buffer = GetVec(); - fwrite(buffer, sizeof(JudyVec), 1, capsuleDB); - - break; - } - default: - { - char value[20]; - sprintf(value,"Invalid type found!"); - - throw JudyEx(value, true); - break; - } - }; -} - -void Capsule::Load(FILE* capsuleDB) -{ - fread(&type, sizeof(char), 1, capsuleDB); - - switch(type) - { - case capsule_type_none: { CheckEmpty(true); break; } - case capsule_type_bool: - { - bool value = false; - fread(&value, sizeof(bool), 1, capsuleDB); - SetBool(value); - - break; - } - case capsule_type_int: - { - cell value = NULL; - fread(&value, sizeof(cell), 1, capsuleDB); - SetInt(value); - - break; - } - case capsule_type_flo: - { - REAL value = NULL; - fread(&value, sizeof(REAL), 1, capsuleDB); - SetFlo(value); - - break; - } - case capsule_type_str: - { - size_t length; - fread(&length, sizeof(size_t), 1, capsuleDB); - - char* value = new char[length+1]; - fgets(value, length+1, capsuleDB); - - SetStr(value); - delete(value); - - break; - } - case capsule_type_vec: - { - JudyVec* value = new JudyVec(NULL,NULL,NULL); - fread(value, sizeof(JudyVec), 1, capsuleDB); - - SetVec(value); - - break; - } - default: - { - char value[20]; - sprintf(value,"Invalid type found: %i",(int)type); - - throw JudyEx(value, true); - } - }; -} \ No newline at end of file diff --git a/dlls/arrayx/Capsule.h b/dlls/arrayx/Capsule.h deleted file mode 100644 index 69d0fc14..00000000 --- a/dlls/arrayx/Capsule.h +++ /dev/null @@ -1,65 +0,0 @@ -#ifndef _JUDYCAP_INCLUDED -#define _JUDYCAP_INCLUDED - -#include "JudyIncludes.h" - -enum -{ - capsule_type_none, - capsule_type_bool, - capsule_type_int, - capsule_type_flo, - capsule_type_vec, - capsule_type_str -}; - -extern const char* capsule_types[]; - -class Capsule -{ -private: - Pvoid_t data; - char type; - -protected: - void Clear( void ); - void ThrowTypeError(cell get_type); - -public: - Capsule() { data = NULL; type = capsule_type_none;} - ~Capsule() { Clear(); } - void Remove() { delete this; } - - Capsule(bool set) { SetBool(set); } - Capsule(cell set) { SetInt(set); } - Capsule(REAL set) { SetFlo(set); } - Capsule(JudyVec* set) { SetVec(set); } - Capsule(char* set) { SetStr(set); } - - bool GetBool( void ); - void SetBool(bool set); - - cell GetInt( void ); - void SetInt(cell set); - - REAL GetFlo( void ); - void SetFlo(REAL set); - - const JudyVec* GetVec( void ); - void SetVec(JudyVec* set); - - const char* GetStr( void ); - void SetStr(char* set); - - void GetAsStr(char* value); - - void Load(FILE* db); - void Save(FILE* db); - - bool CheckEmpty(bool clear); - - Pvoid_t GetData( void ) { return data; } - char GetType( void ) { return type; } -}; - -#endif \ No newline at end of file diff --git a/dlls/arrayx/ComboArray.h b/dlls/arrayx/ComboArray.h deleted file mode 100644 index 6dc70032..00000000 --- a/dlls/arrayx/ComboArray.h +++ /dev/null @@ -1,80 +0,0 @@ -#ifndef _COMBOARRAY_INCLUDED -#define _COMBOARRAY_INCLUDED - -#include "CBinTrie.h" -#include "CArray.h" -#include "CBaseList.h" - -class ComboArray: public CBaseList -{ -private: - BinTrie MasterBin; - Array MasterArray; - -public: - ComboArray() { } - ~ComboArray() { Clear(); } - void Remove() { delete this; } - - Word_t Clear() { return (MasterBin.Clear() + MasterArray.Clear() ); } - Word_t MemoryUsed() { return (MasterBin.MemoryUsed() + MasterArray.MemoryUsed() ); } - - int Delete(cell Key) { return (MasterBin.Delete(Key) + MasterArray.Delete(Key) ); } - - void Set(cell Index, Pvoid_t value, bool disable_check) - { - MasterBin.Set(Index, true); - MasterArray.Set(Index, value, disable_check); - } - - Pvoid_t Get(cell Index, bool disable_check = false) - { - if(MasterBin.Get(Index) == NULL) { ThrowIndexError(Index, disable_check); return NULL; } - - return MasterArray.Get(Index); - } - - template - void Set(cell Index, Type value) - { - MasterBin.Set(Index, true); - MasterArray.Set(Index, value); - } - - template - Type Get(cell Index, Type example, bool disable_check = false) - { - if(MasterBin.Get(Index) == NULL) { ThrowIndexError(Index, disable_check); return (Type)NULL; } - - return MasterArray.Get(Index,example); - } - - cell First(cell Start = 0) { return MasterBin.First(Start); } - cell Next(cell Start = 0) { return MasterBin.Next(Start); } - cell Prev(cell Start = -1) { return MasterBin.Prev(Start); } - cell Last(cell Start = -1) { return MasterBin.Last(Start); } - - cell FirstEmpty(cell Start = 0) { return MasterBin.FirstEmpty(Start); } - cell NextEmpty(cell Start = 0) { return MasterBin.NextEmpty(Start); } - cell PrevEmpty(cell Start = -1) { return MasterBin.PrevEmpty(Start); } - cell LastEmpty(cell Start = -1) { return MasterBin.LastEmpty(Start); } - - cell ByCount(cell n, cell Start = 0) { return MasterBin.ByCount(n, Start); } - cell Count(cell Start = 0, cell Stop = -1) { return MasterBin.Count(Start, Stop); } - - bool IsFilled(cell Index) { return ( (MasterBin.Get(Index) != NULL) ? true : false); } - bool IsEmpty(cell Index) { return ( (MasterBin.Get(Index) == NULL) ? true : false); } - -protected: - void ThrowIndexError(cell Index, bool disable_check = false) - { - if(disable_check == true) return; - - char error[50]; - sprintf(error,"Index %i is not set.",Index); - - throw JudyEx(error,true); - } -}; - -#endif \ No newline at end of file diff --git a/dlls/arrayx/ComboTable.h b/dlls/arrayx/ComboTable.h deleted file mode 100644 index 48883c43..00000000 --- a/dlls/arrayx/ComboTable.h +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef _COMBOTABLE_INCLUDED -#define _COMBOTABLE_INCLUDED - -#include "CKeytable.h" -#include "CHashtable.h" -#include "CBaseMap.h" - -class ComboTable: public CBaseMap -{ -private: - Keytable MasterKey; - Hashtable MasterHash; - -public: - ComboTable() { } - ~ComboTable() { Clear(); } - void Remove() { delete this; } - - Word_t Clear() { return (MasterHash.Clear() + MasterKey.Clear() ); } - Word_t MemoryUsed() { return (MasterKey.MemoryUsed() + MasterHash.MemoryUsed() ); } - - int Delete(char* Key) { return (MasterKey.Delete(Key) + MasterHash.Delete(Key) ); } - - bool IsFilled(char* Index) { return ( (MasterHash.Get(Index,(PPvoid_t)(NULL), true ) != NULL) ? true : false);} - bool IsEmpty(char* Index) { return ( (MasterHash.Get(Index,(PPvoid_t)(NULL), true ) == NULL) ? true : false);} - - void Set(char* Index, Pvoid_t value, bool disable_check) - { - MasterKey.Set(Index, value); - MasterHash.Set(Index, value); - } - - Pvoid_t Get(char* Index, bool disable_check = false) - { - return MasterHash.Get(Index, disable_check); - } - - template - void Set(char* Index, Type value) - { - MasterKey.Set(Index, value); - MasterHash.Set(Index, value); - } - - template - Type Get(char* Index, Type example, bool disable_check = false) - { - return MasterHash.Get(Index, example, disable_check); - } - - char* First( char* Start = "") { return MasterKey.First(Start);} - char* Next( char* Start = "") { return MasterKey.Next(Start);} - char* Prev( char* Start = "") { return MasterKey.Prev(Start); } - char* Last( char* Start = "") { return MasterKey.Last(Start);} - -protected: - void ThrowIndexError( char* index, bool disable_check = false ) - { - if(disable_check == true) return; - - char value[100]; - sprintf(value,"Function attempted to read non existant index %s", index ); - - throw JudyEx(value, true); - } -}; - -#endif diff --git a/dlls/arrayx/GenericNatives.h b/dlls/arrayx/GenericNatives.h deleted file mode 100644 index 60f7f4f9..00000000 --- a/dlls/arrayx/GenericNatives.h +++ /dev/null @@ -1,862 +0,0 @@ -#ifndef _GENERIC_INC_H -#define _GENERIC_INC_H - -// Master table -ComboArray MNAME; - -///* MASTER FUNCTIONS */// - -///* Start Master Edit Funcs */// -#ifdef JUDY_MASTER_EDIT_FUNCTIONS - - #ifdef JUDY_MASTER_DELETE_FUNC - - // generic_delete(id) - static cell AMX_NATIVE_CALL JUDY_MASTER_DELETE_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - JUDY_GET_INDEX(MNAME,Unit, params[1] ); - - Unit->Remove(); - - try { return MNAME.Delete( params[1] ); } - JUDY_ERROR_CATCH("Judy Error: (No error possible) - Delete function "); - } - - #else - - #error Must Have Delete func: JUDY_MASTER_DELETE_FUNC not defined! - - #endif - - #ifdef JUDY_MASTER_CLEAR_FUNC - - // generic_clear(id) - static cell AMX_NATIVE_CALL JUDY_MASTER_CLEAR_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - JUDY_GET_INDEX(MNAME,Unit, params[1] ); - - try { return Unit->Clear(); } - JUDY_ERROR_CATCH("Judy Error: (Search error likely) - Clear function "); - } - - #else - - #error Must Have Clear func: JUDY_MASTER_CLEAR_FUNC not defined! - - #endif - -///* End Master Edit Funcs */// -#endif - -///* Start Master IO Funcs */// -#ifdef JUDY_MASTER_IO_FUNCTIONS - - #ifdef JUDY_MASTER_SAVE_FUNC - - // generic_save(id,file[]) - static cell AMX_NATIVE_CALL JUDY_MASTER_SAVE_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - JUDY_GET_INDEX(MNAME,Unit, params[1]); - - return JUDY_SAVE_FUNC(Unit, JUDY_BUILD_PATH(amx,params[2]) ); - } - - #else - - #error Must Have Save func: JUDY_MASTER_SAVE_FUNC not defined properly! - - #endif - - #ifdef JUDY_MASTER_LOAD_FUNC - - // generic_load(file[],id) - static cell AMX_NATIVE_CALL JUDY_MASTER_LOAD_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - JUDY_GET_INDEX(MNAME,Unit, params[2]); - - return JUDY_LOAD_FUNC(Unit, JUDY_BUILD_PATH(amx,params[1]) ); - } - - #else - - #error Must Have Load func: JUDY_MASTER_LOAD_FUNC not defined! - - #endif - -///* End Master IO Funcs */// -#endif - -///* Start Master Amount Funcs */// -#ifdef JUDY_MASTER_AMOUNT_FUNCTIONS - - #ifdef JUDY_MASTER_COUNT_FUNC - - // generic_count(start = 0, stop = -1) - static cell AMX_NATIVE_CALL JUDY_MASTER_COUNT_FUNC(AMX *amx,cell *params) - { - try { return MNAME.Count(params[1],params[2] ); } - JUDY_ERROR_CATCH("Judy Error: (Search error likely) - Count Function "); - } - - #else - - #error Must Have Count func: JUDY_MASTER_COUNT_FUNC not defined! - - #endif - - #ifdef JUDY_MASTER_BYCOUNT_FUNC - - // generic_bycount(nth, start = -1) - static cell AMX_NATIVE_CALL JUDY_MASTER_BYCOUNT_FUNC(AMX *amx,cell *params) - { - try { return MNAME.ByCount(params[1],params[2] ); } - JUDY_ERROR_CATCH("Judy Error: (Search error likely) - ByCount Function "); - } - - #else - - #error Must Have ByCount func: JUDY_MASTER_BYCOUNT_FUNC not defined! - - #endif - -///* End Master Amount Funcs */// -#endif - -///* SLAVE FUNCTIONS */// - -///* Start Slave Amount Funcs */// -#ifdef JUDY_SLAVE_AMOUNT_FUNCTIONS - - #ifdef JUDY_SLAVE_COUNT_FUNC - - // generic_size(id, start = 0, stop = -1) - static cell AMX_NATIVE_CALL JUDY_SLAVE_COUNT_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - JUDY_GET_INDEX(MNAME,Unit, params[1]); - - try { return Unit->Count(JUDY_GET_KEY(params,2),JUDY_GET_KEY(params, 3) ); } - JUDY_ERROR_CATCH("Judy Error: (Search error likely) - Slave Count Function "); - } - - #else - - #error Must Have Count func: JUDY_SLAVE_COUNT_FUNC not defined! - - #endif - - #ifdef JUDY_SLAVE_BYCOUNT_FUNC - - // generic_get_nth(id, nth, start = -1) - static cell AMX_NATIVE_CALL JUDY_SLAVE_BYCOUNT_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - JUDY_GET_INDEX(MNAME,Unit, params[1]); - - try { return Unit->ByCount(JUDY_GET_KEY(params,2),JUDY_GET_KEY(params, 3) ); } - JUDY_ERROR_CATCH("Judy Error: (Search error likely) - Slave ByCount Function "); - } - - #else - - #error Must Have ByCount func: JUDY_SLAVE_BYCOUNT_FUNC not defined! - - #endif - -///* End Slave Amount Funcs */// -#endif - -///* Start Slave Edit Funcs */// -#ifdef JUDY_SLAVE_EDIT_FUNCTIONS - - #ifdef JUDY_SLAVE_MEMORY_FUNC - - // generic_memory(id) - static cell AMX_NATIVE_CALL JUDY_SLAVE_MEMORY_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - JUDY_GET_INDEX(MNAME,Unit, params[1]); - - try { return Unit->MemoryUsed(); } - JUDY_ERROR_CATCH("Judy Error: (Search error likely) - Slave ByCount Function "); - } - - #else - - #error Must Have Memory func: JUDY_SLAVE_MEMORY_FUNC not defined! - - #endif - - #ifdef JUDY_SLAVE_ISFILLED_FUNC - - // generic_isfilled(id, index) - static cell AMX_NATIVE_CALL JUDY_SLAVE_ISFILLED_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - JUDY_GET_INDEX(MNAME,Unit, params[1]); - - try { return Unit->IsFilled(JUDY_GET_KEY(params,2) ); } - JUDY_ERROR_CATCH("Judy Error: (No error possible) - Slave IsFilled Function "); - } - - #else - - #error Must Have IsFilled func: JUDY_SLAVE_ISFILLED_FUNC not defined! - - #endif - - #ifdef JUDY_SLAVE_ISEMPTY_FUNC - - // generic_isempty(id, index) - static cell AMX_NATIVE_CALL JUDY_SLAVE_ISEMPTY_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - JUDY_GET_INDEX(MNAME,Unit, params[1]); - - try { return Unit->IsEmpty(JUDY_GET_KEY(params,2) ); } - JUDY_ERROR_CATCH("Judy Error: (No error possible) - Slave IsEmpty Function "); - } - - #else - - #error Must Have IsEmpty func: JUDY_SLAVE_ISEMPTY_FUNC not defined! - - #endif - - #ifdef JUDY_SLAVE_REMOVE_FUNC - - // generic_remove(id, index) - static cell AMX_NATIVE_CALL JUDY_SLAVE_REMOVE_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - STYPE* Storage; - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - - Storage = reinterpret_cast( Unit->Get(Indice, true ) ); - Storage->Remove(); - - try { return Unit->Delete(Indice); } - JUDY_ERROR_CATCH("Judy Error: (No Error Possible) - Delete function "); - } - #else - - #ifdef NO_JUDY_SLAVE_REMOVE_FUNC - #else - - #error Must Have Delete func: JUDY_SLAVE_REMOVE_FUNC not defined! - - #endif - - #endif -///* End Required Slave Edit Funcs */// - -///* Start Slave Bool Funcs */// -#ifdef JUDY_SLAVE_EDIT_BOOL - - #ifdef JUDY_SLAVE_SET_BOOL_FUNC - // generic_set_bool(id, index, Bool:val) - static cell AMX_NATIVE_CALL JUDY_SLAVE_SET_BOOL_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - STYPE* Storage; - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - bool Value = (params[3] != NULL); - - Storage = reinterpret_cast( Unit->Get(Indice, true ) ); - - if(Storage == NULL) Storage = new STYPE(Value); - else Storage->SetBool(Value); - - JUDY_SET_INDEX_P(Unit,Storage,Indice); - } - - #else - - #error Must Have Set func: JUDY_SLAVE_SET_BOOL_FUNC not defined! - - #endif - - #ifdef JUDY_SLAVE_GET_BOOL_FUNC - - // Bool:generic_get_bool(id, index, disable_check = 0) - static cell AMX_NATIVE_CALL JUDY_SLAVE_GET_BOOL_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - STYPE* Storage; - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - bool disable_check = (params[3] != NULL); - - try { Storage = reinterpret_cast( Unit->Get(Indice, disable_check ) ); } - JUDY_ERROR_CATCH("Judy Error: (Retrieve unset value) - Slave Get Function "); - - if(Storage == NULL) return 0; - - return Storage->GetBool(); - } - - #else - - #error Must Have Get func: JUDY_SLAVE_GET_BOOL_FUNC not defined! - - #endif - -///* End Slave Bool Funcs */// -#endif - -///* Start Slave Int Funcs */// -#ifdef JUDY_SLAVE_EDIT_INT - - #ifdef JUDY_SLAVE_SET_INT_FUNC - - // generic_set_bool(id, index, val) - static cell AMX_NATIVE_CALL JUDY_SLAVE_SET_INT_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - STYPE* Storage; - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - cell Value = params[3]; - - Storage = reinterpret_cast( Unit->Get(Indice, true ) ); - - if(Storage == NULL) Storage = new STYPE(Value); - else Storage->SetInt(Value); - - JUDY_SET_INDEX_P(Unit,Storage,Indice); - } - - #else - - #error Must Have Set func: JUDY_SLAVE_SET_INT_FUNC not defined! - - #endif - - #ifdef JUDY_SLAVE_GET_INT_FUNC - - // generic_get_int(id, index, disable_check = 0) - static cell AMX_NATIVE_CALL JUDY_SLAVE_GET_INT_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - STYPE* Storage; - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - bool disable_check = (params[3] != NULL); - - try { Storage = reinterpret_cast( Unit->Get(Indice, disable_check ) ); } - JUDY_ERROR_CATCH("Judy Error: (Retrieve unset value) - Slave Get Function "); - - if(Storage == NULL) return 0; - - return Storage->GetInt(); - } - - #else - - #error Must Have Get func: JUDY_SLAVE_GET_INT_FUNC not defined! - - #endif - -///* End Slave Int Funcs */// -#endif - -///* Start Slave Float Funcs */// -#ifdef JUDY_SLAVE_EDIT_FLO - - #ifdef JUDY_SLAVE_SET_FLO_FUNC - - // generic_set_float(id, index, Float:val) - static cell AMX_NATIVE_CALL JUDY_SLAVE_SET_FLO_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - STYPE* Storage; - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - REAL Value = amx_ctof(params[3]); - - Storage = reinterpret_cast( Unit->Get(Indice, true ) ); - - if(Storage == NULL) Storage = new STYPE(Value); - else Storage->SetFlo(Value); - - JUDY_SET_INDEX_P(Unit,Storage,Indice); - } - - #else - - #error Must Have Set func: JUDY_SLAVE_SET_FLO_FUNC not defined! - - #endif - - #ifdef JUDY_SLAVE_GET_FLO_FUNC - - // Float:generic_get_float(id, index, disable_check = 0) - static cell AMX_NATIVE_CALL JUDY_SLAVE_GET_FLO_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - STYPE* Storage; - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - bool disable_check = (params[3] != NULL); - - try { Storage = reinterpret_cast( Unit->Get(Indice, disable_check ) ); } - JUDY_ERROR_CATCH("Judy Error: (Retrieve unset value) - Slave Get Function "); - - if(Storage == NULL) return 0; - - return amx_ftoc(Storage->GetFlo() ); - } - - #else - - #error Must Have Get func: JUDY_SLAVE_GET_FLO_FUNC not defined! - - #endif - -///* End Slave Float Funcs */// -#endif - -///* Start Slave String Funcs */// -#ifdef JUDY_SLAVE_EDIT_STR - - #ifdef JUDY_SLAVE_SET_STR_FUNC - - // generic_set_string(id, index, val[]) - static cell AMX_NATIVE_CALL JUDY_SLAVE_SET_STR_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - STYPE* Storage; - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - char* Value = MF_GetAmxString(amx,params[3],3,NULL); - - Storage = reinterpret_cast( Unit->Get(Indice, true ) ); - - if(Storage == NULL) Storage = new STYPE(Value); - else Storage->SetStr(Value); - - JUDY_SET_INDEX_P(Unit,Storage,Indice); - } - - #else - - #error Must Have Set func: JUDY_SLAVE_SET_STR_FUNC not defined! - - #endif - - #ifdef JUDY_SLAVE_GET_STR_FUNC - - // generic_get_string(id, index, val[], len, disable_check = 0) - static cell AMX_NATIVE_CALL JUDY_SLAVE_GET_STR_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - STYPE* Storage; - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - bool disable_check = (params[5] != NULL); - - try { Storage = reinterpret_cast( Unit->Get(Indice, disable_check ) ); } - JUDY_ERROR_CATCH("Judy Error: (Retrieve unset value) - Slave Get Function "); - - if(Storage == NULL) return 0; - - return MF_SetAmxString(amx,params[3], Storage->GetStr(), params[4] ); - } - - #else - - #error Must Have Get func: JUDY_SLAVE_GET_STR_FUNC not defined! - - #endif - -///* End Slave String Funcs */// -#endif - -///* Start Slave Vector Funcs */// -#ifdef JUDY_SLAVE_EDIT_VEC - - #ifdef JUDY_SLAVE_SET_VEC_FUNC - - // generic_set_vec(id, index, Float:val[3]) - static cell AMX_NATIVE_CALL JUDY_SLAVE_SET_VEC_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - STYPE* Storage; - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - - cell *input_vec = MF_GetAmxAddr(amx, params[3]); - JudyVec *Value = new JudyVec( - amx_ctof(input_vec[0]), - amx_ctof(input_vec[1]), - amx_ctof(input_vec[2]) - ); - - Storage = reinterpret_cast( Unit->Get(Indice, true ) ); - - if(Storage == NULL) Storage = new STYPE(Value); - else Storage->SetVec(Value); - - JUDY_SET_INDEX_P(Unit,Storage,Indice); - } - - #else - - #error Must Have Set func: JUDY_SLAVE_SET_VEC_FUNC not defined! - - #endif - - #ifdef JUDY_SLAVE_GET_FLO_FUNC - - // generic_get_vec(id,index,Float:vec[3], disable_check = 0) - static cell AMX_NATIVE_CALL JUDY_SLAVE_GET_VEC_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - STYPE* Storage; - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - cell *vAmx = MF_GetAmxAddr(amx, params[3]); - bool disable_check = (params[4] != NULL); - - try { Storage = reinterpret_cast( Unit->Get(Indice, disable_check ) ); } - JUDY_ERROR_CATCH("Judy Error: (Retrieve unset value) - Slave Get Function "); - - if(Storage == NULL) - { - vAmx[0] = amx_ftoc(0); - vAmx[1] = amx_ftoc(0); - vAmx[2] = amx_ftoc(0); - return 0; - } - - JudyVec* Vec = const_cast( Storage->GetVec() ); - - REAL One, Two, Three; - Vec->Get(One, Two, Three); - - vAmx[0] = amx_ftoc(One); - vAmx[1] = amx_ftoc(Two); - vAmx[2] = amx_ftoc(Three); - - return 1; - } - - #else - - #error Must Have Get func: JUDY_SLAVE_GET_VEC_FUNC not defined! - - #endif - -///* End Slave VEC Funcs */// -#endif - -///* End Slave Edit Funcs */// -#endif - -///* Start Slave Search Funcs -#ifdef JUDY_SLAVE_SEARCH_FUNCTIONS - - #ifdef JUDY_SLAVE_FIRST_FUNC - // generic_first(id, index,...) - static cell AMX_NATIVE_CALL JUDY_SLAVE_FIRST_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - JUDY_GET_INDEX(MNAME,Unit, params[1]); - - ITYPE Indice = JUDY_GET_KEY(params,2); - cell* success = MF_GetAmxAddr(amx, params[3 + SE_OFFSET]); - - *success = 1; - try { return JUDY_SET_KEY(Unit->First(Indice),3); } - JUDY_SEARCH_ERROR_CATCH("Judy Error (Search failed) - Slave Search Function", *success); - } - - #else - - #error Must Have Search func: JUDY_SLAVE_FIRST_FUNC not defined! - - #endif - - #ifdef JUDY_SLAVE_NEXT_FUNC - // generic_next(id, index,...) - static cell AMX_NATIVE_CALL JUDY_SLAVE_NEXT_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - JUDY_GET_INDEX(MNAME,Unit, params[1]); - - ITYPE Indice = JUDY_GET_KEY(params,2); - cell* success = MF_GetAmxAddr(amx, params[3 + SE_OFFSET]); - - *success = 1; - try { return JUDY_SET_KEY(Unit->Next(Indice),3); } - JUDY_SEARCH_ERROR_CATCH("Judy Error (Search failed) - Slave Search Function", *success); - } - - #else - - #error Must Have Search func: JUDY_SLAVE_NEXT_FUNC not defined! - - #endif - - #ifdef JUDY_SLAVE_PREV_FUNC - // generic_prev(id, index,...) - static cell AMX_NATIVE_CALL JUDY_SLAVE_PREV_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - cell* success = MF_GetAmxAddr(amx, params[3 + SE_OFFSET]); - - *success = 1; - try { return JUDY_SET_KEY(Unit->Prev(Indice),3); } - JUDY_SEARCH_ERROR_CATCH("Judy Error (Search failed) - Slave Search Function", *success); - } - - #else - - #error Must Have Search func: JUDY_SLAVE_PREV_FUNC not defined! - - #endif - - #ifdef JUDY_SLAVE_LAST_FUNC - // generic_first(id, index,...) - static cell AMX_NATIVE_CALL JUDY_SLAVE_LAST_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - cell* success = MF_GetAmxAddr(amx, params[3 + SE_OFFSET]); - - *success = 1; - try { return JUDY_SET_KEY(Unit->Last(Indice),3); } - JUDY_SEARCH_ERROR_CATCH("Judy Error (Search failed) - Slave Search Function", *success); - } - - #else - - #error Must Have Search func: JUDY_SLAVE_LAST_FUNC not defined! - - #endif - -///* End Slave Search Funcs */// -#endif - - -///* Start Slave Empty Search Funcs -#ifdef JUDY_SLAVE_SEARCH_EMPTY_FUNCTIONS - - #ifdef JUDY_SLAVE_FIRSTEMPTY_FUNC - // generic_firstempty(id, index,...) - static cell AMX_NATIVE_CALL JUDY_SLAVE_FIRSTEMPTY_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - cell* success = MF_GetAmxAddr(amx, params[3 + SE_OFFSET]); - - *success = 1; - try { return JUDY_SET_KEY(Unit->FirstEmpty(Indice),3); } - JUDY_SEARCH_ERROR_CATCH("Judy Error (Search failed) - Slave Search Function", *success); - } - - #else - - #error Must Have Search func: JUDY_SLAVE_FIRSTEMPTY_FUNC not defined! - - #endif - - #ifdef JUDY_SLAVE_NEXTEMPTY_FUNC - // generic_next(id, index,...) - static cell AMX_NATIVE_CALL JUDY_SLAVE_NEXTEMPTY_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - cell* success = MF_GetAmxAddr(amx, params[3 + SE_OFFSET]); - - *success = 1; - try { return JUDY_SET_KEY(Unit->NextEmpty(Indice),3); } - JUDY_SEARCH_ERROR_CATCH("Judy Error (Search failed) - Slave Search Function", *success); - } - - #else - - #error Must Have Search func: JUDY_SLAVE_NEXTEMPTY_FUNC not defined! - - #endif - - #ifdef JUDY_SLAVE_PREVEMPTY_FUNC - // generic_prev(id, index,...) - static cell AMX_NATIVE_CALL JUDY_SLAVE_PREVEMPTY_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - cell* success = MF_GetAmxAddr(amx, params[3 + SE_OFFSET]); - - *success = 1; - try { return JUDY_SET_KEY(Unit->PrevEmpty(Indice),3); } - JUDY_SEARCH_ERROR_CATCH("Judy Error (Search failed) - Slave Search Function", *success); - } - - #else - - #error Must Have Search func: JUDY_SLAVE_PREVEMPTY_FUNC not defined! - - #endif - - #ifdef JUDY_SLAVE_LASTEMPTY_FUNC - // generic_first(id, index,...) - static cell AMX_NATIVE_CALL JUDY_SLAVE_LASTEMPTY_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - cell* success = MF_GetAmxAddr(amx, params[3 + SE_OFFSET]); - - *success = 1; - try { return JUDY_SET_KEY(Unit->LastEmpty(Indice),3); } - JUDY_SEARCH_ERROR_CATCH("Judy Error (Search failed) - Slave Search Function",*success); - } - - #else - - #error Must Have Search func: JUDY_SLAVE_LASTEMPTY_FUNC not defined! - - #endif - -///* End Slave Search Empty Funcs */// -#endif - -AMX_NATIVE_INFO EXPORT_NAME[] = -{ - -#ifdef JUDY_MASTER_EDIT_FUNCTIONS - - { JUDY_MASTER_CLEAR_STR , JUDY_MASTER_CLEAR_FUNC }, - { JUDY_MASTER_DELETE_STR , JUDY_MASTER_DELETE_FUNC }, - -#endif - -#ifdef JUDY_MASTER_IO_FUNCTIONS - - { JUDY_MASTER_SAVE_STR , JUDY_MASTER_SAVE_FUNC }, - { JUDY_MASTER_LOAD_STR , JUDY_MASTER_LOAD_FUNC }, - -#endif - -#ifdef JUDY_MASTER_AMOUNT_FUNCTIONS - - { JUDY_MASTER_COUNT_STR , JUDY_MASTER_COUNT_FUNC }, - { JUDY_MASTER_BYCOUNT_STR , JUDY_MASTER_BYCOUNT_FUNC }, - -#endif - -#ifdef JUDY_SLAVE_AMOUNT_FUNCTIONS - - { JUDY_SLAVE_COUNT_STR , JUDY_SLAVE_COUNT_FUNC }, - { JUDY_SLAVE_BYCOUNT_STR , JUDY_SLAVE_BYCOUNT_FUNC }, - -#endif - -#ifdef JUDY_SLAVE_EDIT_FUNCTIONS - - { JUDY_SLAVE_MEMORY_STR , JUDY_SLAVE_MEMORY_FUNC }, - { JUDY_SLAVE_ISFILLED_STR , JUDY_SLAVE_ISFILLED_FUNC }, - { JUDY_SLAVE_ISEMPTY_STR , JUDY_SLAVE_ISEMPTY_FUNC }, - -#ifndef NO_JUDY_SLAVE_REMOVE_FUNC - { JUDY_SLAVE_REMOVE_STR , JUDY_SLAVE_REMOVE_FUNC }, -#endif - -#ifdef JUDY_SLAVE_EDIT_BOOL - - { JUDY_SLAVE_GET_BOOL_STR , JUDY_SLAVE_GET_BOOL_FUNC }, - { JUDY_SLAVE_SET_BOOL_STR , JUDY_SLAVE_SET_BOOL_FUNC }, - -#endif - -#ifdef JUDY_SLAVE_EDIT_INT - - { JUDY_SLAVE_GET_INT_STR , JUDY_SLAVE_GET_INT_FUNC }, - { JUDY_SLAVE_SET_INT_STR , JUDY_SLAVE_SET_INT_FUNC }, - -#endif - -#ifdef JUDY_SLAVE_EDIT_FLO - - { JUDY_SLAVE_GET_FLO_STR , JUDY_SLAVE_GET_FLO_FUNC }, - { JUDY_SLAVE_SET_FLO_STR , JUDY_SLAVE_SET_FLO_FUNC }, - -#endif - -#ifdef JUDY_SLAVE_EDIT_STR - - { JUDY_SLAVE_GET_STR_STR , JUDY_SLAVE_GET_STR_FUNC }, - { JUDY_SLAVE_SET_STR_STR , JUDY_SLAVE_SET_STR_FUNC }, - -#endif - -#ifdef JUDY_SLAVE_EDIT_VEC - - { JUDY_SLAVE_GET_VEC_STR , JUDY_SLAVE_GET_VEC_FUNC }, - { JUDY_SLAVE_SET_VEC_STR , JUDY_SLAVE_SET_VEC_FUNC }, - -#endif - -// End all edit functions -#endif - -#ifdef JUDY_SLAVE_SEARCH_FUNCTIONS - - { JUDY_SLAVE_FIRST_STR , JUDY_SLAVE_FIRST_FUNC }, - { JUDY_SLAVE_LAST_STR , JUDY_SLAVE_LAST_FUNC }, - - { JUDY_SLAVE_NEXT_STR , JUDY_SLAVE_NEXT_FUNC }, - { JUDY_SLAVE_PREV_STR , JUDY_SLAVE_PREV_FUNC }, - -#endif - -#ifdef JUDY_SLAVE_SEARCH_EMPTY_FUNCTIONS - - { JUDY_SLAVE_FIRSTEMPTY_STR , JUDY_SLAVE_FIRSTEMPTY_FUNC }, - { JUDY_SLAVE_LASTEMPTY_STR , JUDY_SLAVE_LASTEMPTY_FUNC }, - - { JUDY_SLAVE_NEXTEMPTY_STR , JUDY_SLAVE_NEXTEMPTY_FUNC }, - { JUDY_SLAVE_PREVEMPTY_STR , JUDY_SLAVE_PREVEMPTY_FUNC }, - -#endif - - { NULL, NULL } -}; - -#endif \ No newline at end of file diff --git a/dlls/arrayx/Judy.a b/dlls/arrayx/Judy.a deleted file mode 100644 index f828b9db..00000000 Binary files a/dlls/arrayx/Judy.a and /dev/null differ diff --git a/dlls/arrayx/Judy.h b/dlls/arrayx/Judy.h deleted file mode 100644 index 7f495a72..00000000 --- a/dlls/arrayx/Judy.h +++ /dev/null @@ -1,742 +0,0 @@ -#ifndef _JUDY_INCLUDED -#define _JUDY_INCLUDED -// _________________ -// -// Copyright (C) 2000 - 2002 Hewlett-Packard Company -// -// This program is free software; you can redistribute it and/or modify it -// under the term of the GNU Lesser General Public License as published by the -// Free Software Foundation; either version 2 of the License, or (at your -// option) any later version. -// -// This program is distributed in the hope that it will be useful, but WITHOUT -// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -// FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License -// for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with this program; if not, write to the Free Software Foundation, -// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// _________________ - -// @(#) $Revision$ $Source$ -// -// HEADER FILE FOR EXPORTED FEATURES IN JUDY LIBRARY, libJudy.* -// -// See the manual entries for details. -// -// Note: This header file uses old-style comments on #-directive lines and -// avoids "()" on macro names in comments for compatibility with older cc -Aa -// and some tools on some platforms. - - -// PLATFORM-SPECIFIC - -#ifdef JU_WIN /* =============================================== */ - -typedef __int8 int8_t; -//typedef __int16 int16_t; -//typedef __int32 int32_t; -typedef __int64 int64_t; - -typedef char uint8_t; -//typedef unsigned __int16 uint16_t; -//typedef unsigned __int32 uint32_t; -typedef unsigned __int64 uint64_t; - -#else /* ================ ! JU_WIN ============================= */ - -// ISO C99: 7.8 Format conversion of integer types -#include /* if this FAILS, try #include */ - -// ISO C99: 7.18 Integer types uint*_t -#include - -#endif /* ================ ! JU_WIN ============================= */ - -// ISO C99 Standard: 7.20 General utilities -#include - -// ISO C99 Standard: 7.10/5.2.4.2.1 Sizes of integer types -#include - -#ifdef __cplusplus /* support use by C++ code */ -extern "C" { -#endif - - -// **************************************************************************** -// DECLARE SOME BASE TYPES IN CASE THEY ARE MISSING: -// -// These base types include "const" where appropriate, but only where of -// interest to the caller. For example, a caller cares that a variable passed -// by reference will not be modified, such as, "const void * Pindex", but not -// that the called function internally does not modify the pointer itself, such -// as, "void * const Pindex". -// -// Note that its OK to pass a Pvoid_t to a Pcvoid_t; the latter is the same, -// only constant. Callers need to do this so they can also pass & Pvoid_t to -// PPvoid_t (non-constant). - -#ifndef _PCVOID_T -#define _PCVOID_T -typedef const void * Pcvoid_t; -#endif - -#ifndef _PVOID_T -#define _PVOID_T -typedef void * Pvoid_t; -typedef void ** PPvoid_t; -#endif - -#ifndef _WORD_T -#define _WORD_T -typedef unsigned int Word_t, * PWord_t; // expect 32-bit or 64-bit words. -#endif - -#ifndef NULL -#define NULL 0 -#endif - - -// **************************************************************************** -// SUPPORT FOR ERROR HANDLING: -// -// Judy error numbers: -// -// Note: These are an enum so theres a related typedef, but the numbers are -// spelled out so you can map a number back to its name. - -typedef enum // uint8_t -- but C does not support this type of enum. -{ - -// Note: JU_ERRNO_NONE and JU_ERRNO_FULL are not real errors. They specify -// conditions which are otherwise impossible return values from 32-bit -// Judy1Count, which has 2^32 + 1 valid returns (0..2^32) plus one error -// return. These pseudo-errors support the return values that cannot otherwise -// be unambiguously represented in a 32-bit word, and will never occur on a -// 64-bit system. - - JU_ERRNO_NONE = 0, - JU_ERRNO_FULL = 1, - JU_ERRNO_NFMAX = JU_ERRNO_FULL, - -// JU_ERRNO_NOMEM comes from malloc(3C) when Judy cannot obtain needed memory. -// The system errno value is also set to ENOMEM. This error can be recoverable -// if the calling application frees other memory. -// -// TBD: Currently there is no guarantee the Judy array has no memory leaks -// upon JU_ERRNO_NOMEM. - - JU_ERRNO_NOMEM = 2, - -// Problems with parameters from the calling program: -// -// JU_ERRNO_NULLPPARRAY means PPArray was null; perhaps PArray was passed where -// &PArray was intended. Similarly, JU_ERRNO_NULLPINDEX means PIndex was null; -// perhaps &Index was intended. Also, JU_ERRNO_NONNULLPARRAY, -// JU_ERRNO_NULLPVALUE, and JU_ERRNO_UNSORTED, all added later (hence with -// higher numbers), mean: A non-null array was passed in where a null pointer -// was required; PValue was null; and unsorted indexes were detected. - - JU_ERRNO_NULLPPARRAY = 3, // see above. - JU_ERRNO_NONNULLPARRAY = 10, // see above. - JU_ERRNO_NULLPINDEX = 4, // see above. - JU_ERRNO_NULLPVALUE = 11, // see above. - JU_ERRNO_NOTJUDY1 = 5, // PArray is not to a Judy1 array. - JU_ERRNO_NOTJUDYL = 6, // PArray is not to a JudyL array. - JU_ERRNO_NOTJUDYSL = 7, // PArray is not to a JudySL array. - JU_ERRNO_UNSORTED = 12, // see above. - -// Errors below this point are not recoverable; further tries to access the -// Judy array might result in EFAULT and a core dump: -// -// JU_ERRNO_OVERRUN occurs when Judy detects, upon reallocation, that a block -// of memory in its own freelist was modified since being freed. - - JU_ERRNO_OVERRUN = 8, - -// JU_ERRNO_CORRUPT occurs when Judy detects an impossible value in a Judy data -// structure: -// -// Note: The Judy data structure contains some redundant elements that support -// this type of checking. - - JU_ERRNO_CORRUPT = 9 - -// Warning: At least some C or C++ compilers do not tolerate a trailing comma -// above here. At least we know of one case, in aCC; see JAGad58928. - -} JU_Errno_t; - - -// Judy errno structure: -// -// WARNING: For compatibility with possible future changes, the fields of this -// struct should not be referenced directly. Instead use the macros supplied -// below. - -// This structure should be declared on the stack in a threaded process. - -typedef struct J_UDY_ERROR_STRUCT -{ - JU_Errno_t je_Errno; // one of the enums above. - int je_ErrID; // often an internal source line number. - Word_t je_reserved[4]; // for future backward compatibility. - -} JError_t, * PJError_t; - - -// Related macros: -// -// Fields from error struct: - -#define JU_ERRNO(PJError) ((PJError)->je_Errno) -#define JU_ERRID(PJError) ((PJError)->je_ErrID) - -// For checking return values from various Judy functions: -// -// Note: Define JERR as -1, not as the seemingly more portable (Word_t) -// (~0UL), to avoid a compiler "overflow in implicit constant conversion" -// warning. - -#define JERR (-1) /* functions returning int or Word_t */ -#define PJERR ((Pvoid_t) (~0UL)) /* mainly for use here, see below */ -#define PPJERR ((PPvoid_t) (~0UL)) /* functions that return PPvoid_t */ - -// Convenience macro for when detailed error information (PJError_t) is not -// desired by the caller; a purposely short name: - -#define PJE0 ((PJError_t) NULL) - - -// **************************************************************************** -// JUDY FUNCTIONS: -// -// P_JE is a shorthand for use below: - -#define P_JE PJError_t PJError - -// **************************************************************************** -// JUDY1 FUNCTIONS: - -extern int j__udy1Test( Pvoid_t Pjpm, Word_t Index); -extern int Judy1Test( Pcvoid_t PArray, Word_t Index, P_JE); -extern int Judy1Set( PPvoid_t PPArray, Word_t Index, P_JE); -extern int Judy1SetArray( PPvoid_t PPArray, Word_t Count, - const Word_t * const PIndex, - P_JE); -extern int Judy1Unset( PPvoid_t PPArray, Word_t Index, P_JE); -extern Word_t Judy1Count( Pcvoid_t PArray, Word_t Index1, - Word_t Index2, P_JE); -extern int Judy1ByCount( Pcvoid_t PArray, Word_t Count, - Word_t * PIndex, P_JE); -extern Word_t Judy1FreeArray( PPvoid_t PPArray, P_JE); -extern Word_t Judy1MemUsed( Pcvoid_t PArray); -extern Word_t Judy1MemActive( Pcvoid_t PArray); -extern int Judy1First( Pcvoid_t PArray, Word_t * PIndex, P_JE); -extern int Judy1Next( Pcvoid_t PArray, Word_t * PIndex, P_JE); -extern int j__udy1Next( Pvoid_t Pjpm, Word_t * PIndex); -extern int Judy1Last( Pcvoid_t PArray, Word_t * PIndex, P_JE); -extern int Judy1Prev( Pcvoid_t PArray, Word_t * PIndex, P_JE); -extern int Judy1FirstEmpty( Pcvoid_t PArray, Word_t * PIndex, P_JE); -extern int Judy1NextEmpty( Pcvoid_t PArray, Word_t * PIndex, P_JE); -extern int Judy1LastEmpty( Pcvoid_t PArray, Word_t * PIndex, P_JE); -extern int Judy1PrevEmpty( Pcvoid_t PArray, Word_t * PIndex, P_JE); - -extern PPvoid_t j__udyLGet( Pvoid_t Pjpm, Word_t Index); -extern PPvoid_t JudyLGet( Pcvoid_t PArray, Word_t Index, P_JE); -extern PPvoid_t JudyLIns( PPvoid_t PPArray, Word_t Index, P_JE); -extern int JudyLInsArray( PPvoid_t PPArray, Word_t Count, - const Word_t * const PIndex, - const Word_t * const PValue, - -// **************************************************************************** -// JUDYL FUNCTIONS: - P_JE); -extern int JudyLDel( PPvoid_t PPArray, Word_t Index, P_JE); -extern Word_t JudyLCount( Pcvoid_t PArray, Word_t Index1, - Word_t Index2, P_JE); -extern PPvoid_t JudyLByCount( Pcvoid_t PArray, Word_t Count, - Word_t * PIndex, P_JE); -extern Word_t JudyLFreeArray( PPvoid_t PPArray, P_JE); -extern Word_t JudyLMemUsed( Pcvoid_t PArray); -extern Word_t JudyLMemActive( Pcvoid_t PArray); -extern PPvoid_t JudyLFirst( Pcvoid_t PArray, Word_t * PIndex, P_JE); -extern PPvoid_t JudyLNext( Pcvoid_t PArray, Word_t * PIndex, P_JE); -extern PPvoid_t j__udyLNext( Pvoid_t Pjpm, Word_t * PIndex); -extern PPvoid_t JudyLLast( Pcvoid_t PArray, Word_t * PIndex, P_JE); -extern PPvoid_t JudyLPrev( Pcvoid_t PArray, Word_t * PIndex, P_JE); -extern int JudyLFirstEmpty( Pcvoid_t PArray, Word_t * PIndex, P_JE); -extern int JudyLNextEmpty( Pcvoid_t PArray, Word_t * PIndex, P_JE); -extern int JudyLLastEmpty( Pcvoid_t PArray, Word_t * PIndex, P_JE); -extern int JudyLPrevEmpty( Pcvoid_t PArray, Word_t * PIndex, P_JE); - -// **************************************************************************** -// JUDYSL FUNCTIONS: - -extern PPvoid_t JudySLGet( Pcvoid_t, const uint8_t * Index, P_JE); -extern PPvoid_t JudySLIns( PPvoid_t, const uint8_t * Index, P_JE); -extern int JudySLDel( PPvoid_t, const uint8_t * Index, P_JE); -extern Word_t JudySLFreeArray( PPvoid_t, P_JE); -extern PPvoid_t JudySLFirst( Pcvoid_t, uint8_t * Index, P_JE); -extern PPvoid_t JudySLNext( Pcvoid_t, uint8_t * Index, P_JE); -extern PPvoid_t JudySLLast( Pcvoid_t, uint8_t * Index, P_JE); -extern PPvoid_t JudySLPrev( Pcvoid_t, uint8_t * Index, P_JE); - -// **************************************************************************** -// JUDYHSL FUNCTIONS: - -extern PPvoid_t JudyHSGet( Pcvoid_t, void *, Word_t); -extern PPvoid_t JudyHSIns( PPvoid_t, void *, Word_t, P_JE); -extern int JudyHSDel( PPvoid_t, void *, Word_t, P_JE); -extern Word_t JudyHSFreeArray( PPvoid_t, P_JE); - -extern const char *Judy1MallocSizes; -extern const char *JudyLMallocSizes; - -// **************************************************************************** -// JUDY memory interface to malloc() FUNCTIONS: - -extern Word_t JudyMalloc(Word_t); // words reqd => words allocd. -extern Word_t JudyMallocVirtual(Word_t); // words reqd => words allocd. -extern void JudyFree(Pvoid_t, Word_t); // free, size in words. -extern void JudyFreeVirtual(Pvoid_t, Word_t); // free, size in words. - -#define JLAP_INVALID 0x1 /* flag to mark pointer "not a Judy array" */ - -// **************************************************************************** -// MACRO EQUIVALENTS FOR JUDY FUNCTIONS: -// -// The following macros, such as J1T, are shorthands for calling Judy functions -// with parameter address-of and detailed error checking included. Since they -// are macros, the error checking code is replicated each time the macro is -// used, but it runs fast in the normal case of no error. -// -// If the caller does not like the way the default JUDYERROR macro handles -// errors (such as an exit(1) call when out of memory), they may define their -// own before the "#include ". A routine such as HandleJudyError -// could do checking on specific error numbers and print a different message -// dependent on the error. The following is one example: -// -// Note: the back-slashes are removed because some compilers will not accept -// them in comments. -// -// void HandleJudyError(uint8_t *, int, uint8_t *, int, int); -// #define JUDYERROR(CallerFile, CallerLine, JudyFunc, JudyErrno, JudyErrID) -// { -// HandleJudyError(CallerFile, CallerLine, JudyFunc, JudyErrno, JudyErrID); -// } -// -// The routine HandleJudyError could do checking on specific error numbers and -// print a different message dependent on the error. -// -// The macro receives five parameters that are: -// -// 1. CallerFile: Source filename where a Judy call returned a serious error. -// 2. CallerLine: Line number in that source file. -// 3. JudyFunc: Name of Judy function reporting the error. -// 4. JudyErrno: One of the JU_ERRNO* values enumerated above. -// 5. JudyErrID: The je_ErrID field described above. - -#ifndef JUDYERROR_NOTEST -#ifndef JUDYERROR /* supply a default error macro */ -#include - -#define JUDYERROR(CallerFile, CallerLine, JudyFunc, JudyErrno, JudyErrID) \ - { \ - (void) fprintf(stderr, "File '%s', line %d: %s(), " \ - "JU_ERRNO_* == %d, ID == %d\n", \ - CallerFile, CallerLine, \ - JudyFunc, JudyErrno, JudyErrID); \ - exit(1); \ - } - -#endif /* JUDYERROR */ -#endif /* JUDYERROR_NOTEST */ - -// If the JUDYERROR macro is not desired at all, then the following eliminates -// it. However, the return code from each Judy function (that is, the first -// parameter of each macro) must be checked by the caller to assure that an -// error did not occur. -// -// Example: -// -// #define JUDYERROR_NOTEST 1 -// #include -// -// or use this cc option at compile time: -// -// cc -DJUDYERROR_NOTEST ... -// -// Example code: -// -// J1S(Rc, PArray, Index); -// if (Rc == JERR) goto ...error -// -// or: -// -// JLI(PValue, PArray, Index); -// if (PValue == PJERR) goto ...error - - -// Internal shorthand macros for writing the J1S, etc. macros: - -#ifdef JUDYERROR_NOTEST /* ============================================ */ - -// "Judy Set Error": - -#define J_SE(FuncName,Errno) ((void) 0) - -// Note: In each J_*() case below, the digit is the number of key parameters -// to the Judy*() call. Just assign the Func result to the callers Rc value -// without a cast because none is required, and this keeps the API simpler. -// However, a family of different J_*() macros is needed to support the -// different numbers of key parameters (0,1,2) and the Func return type. -// -// In the names below, "I" = integer result; "P" = pointer result. Note, the -// Funcs for J_*P() return PPvoid_t, but cast this to a Pvoid_t for flexible, -// error-free assignment, and then compare to PJERR. - -#define J_0I(Rc,PArray,Func,FuncName) \ - { (Rc) = Func(PArray, PJE0); } - -#define J_1I(Rc,PArray,Index,Func,FuncName) \ - { (Rc) = Func(PArray, Index, PJE0); } - -#define J_1P(PV,PArray,Index,Func,FuncName) \ - { (PV) = (Pvoid_t) Func(PArray, Index, PJE0); } - -#define J_2I(Rc,PArray,Index,Arg2,Func,FuncName) \ - { (Rc) = Func(PArray, Index, Arg2, PJE0); } - -#define J_2C(Rc,PArray,Index1,Index2,Func,FuncName) \ - { (Rc) = Func(PArray, Index1, Index2, PJE0); } - -#define J_2P(PV,PArray,Index,Arg2,Func,FuncName) \ - { (PV) = (Pvoid_t) Func(PArray, Index, Arg2, PJE0); } - -// Variations for Judy*Set/InsArray functions: - -#define J_2AI(Rc,PArray,Count,PIndex,Func,FuncName) \ - { (Rc) = Func(PArray, Count, PIndex, PJE0); } -#define J_3AI(Rc,PArray,Count,PIndex,PValue,Func,FuncName) \ - { (Rc) = Func(PArray, Count, PIndex, PValue, PJE0); } - -#else /* ================ ! JUDYERROR_NOTEST ============================= */ - -#define J_E(FuncName,PJE) \ - JUDYERROR(__FILE__, __LINE__, FuncName, JU_ERRNO(PJE), JU_ERRID(PJE)) - -#define J_SE(FuncName,Errno) \ - { \ - JError_t J_Error; \ - JU_ERRNO(&J_Error) = (Errno); \ - JU_ERRID(&J_Error) = __LINE__; \ - J_E(FuncName, &J_Error); \ - } - -// Note: In each J_*() case below, the digit is the number of key parameters -// to the Judy*() call. Just assign the Func result to the callers Rc value -// without a cast because none is required, and this keeps the API simpler. -// However, a family of different J_*() macros is needed to support the -// different numbers of key parameters (0,1,2) and the Func return type. -// -// In the names below, "I" = integer result; "P" = pointer result. Note, the -// Funcs for J_*P() return PPvoid_t, but cast this to a Pvoid_t for flexible, -// error-free assignment, and then compare to PJERR. - -#define J_0I(Rc,PArray,Func,FuncName) \ - { \ - JError_t J_Error; \ - if (((Rc) = Func(PArray, &J_Error)) == JERR) \ - J_E(FuncName, &J_Error); \ - } - -#define J_1I(Rc,PArray,Index,Func,FuncName) \ - { \ - JError_t J_Error; \ - if (((Rc) = Func(PArray, Index, &J_Error)) == JERR) \ - J_E(FuncName, &J_Error); \ - } - -#define J_1P(Rc,PArray,Index,Func,FuncName) \ - { \ - JError_t J_Error; \ - if (((Rc) = (Pvoid_t) Func(PArray, Index, &J_Error)) == PJERR) \ - J_E(FuncName, &J_Error); \ - } - -#define J_2I(Rc,PArray,Index,Arg2,Func,FuncName) \ - { \ - JError_t J_Error; \ - if (((Rc) = Func(PArray, Index, Arg2, &J_Error)) == JERR) \ - J_E(FuncName, &J_Error); \ - } - -// Variation for Judy*Count functions, which return 0, not JERR, for error (and -// also for other non-error cases): -// -// Note: JU_ERRNO_NFMAX should only apply to 32-bit Judy1, but this header -// file lacks the necessary ifdefs to make it go away otherwise, so always -// check against it. - -#define J_2C(Rc,PArray,Index1,Index2,Func,FuncName) \ - { \ - JError_t J_Error; \ - if ((((Rc) = Func(PArray, Index1, Index2, &J_Error)) == 0) \ - && (JU_ERRNO(&J_Error) > JU_ERRNO_NFMAX)) \ - { \ - J_E(FuncName, &J_Error); \ - } \ - } - -#define J_2P(PV,PArray,Index,Arg2,Func,FuncName) \ - { \ - JError_t J_Error; \ - if (((PV) = (Pvoid_t) Func(PArray, Index, Arg2, &J_Error)) \ - == PJERR) J_E(FuncName, &J_Error); \ - } - -// Variations for Judy*Set/InsArray functions: - -#define J_2AI(Rc,PArray,Count,PIndex,Func,FuncName) \ - { \ - JError_t J_Error; \ - if (((Rc) = Func(PArray, Count, PIndex, &J_Error)) == JERR) \ - J_E(FuncName, &J_Error); \ - } - -#define J_3AI(Rc,PArray,Count,PIndex,PValue,Func,FuncName) \ - { \ - JError_t J_Error; \ - if (((Rc) = Func(PArray, Count, PIndex, PValue, &J_Error)) \ - == JERR) J_E(FuncName, &J_Error); \ - } - -#endif /* ================ ! JUDYERROR_NOTEST ============================= */ - -// Some of the macros are special cases that use inlined shortcuts for speed -// with root-level leaves: - -// This is a slower version with current processors, but in the future... -#ifdef notdef -#define J1T(Rc,PArray,Index) \ -{ \ - PWord_t P_L = (PWord_t)(PArray); \ - (Rc) = 0; \ - if (P_L) /* cannot be a NULL pointer */ \ - { \ - if (P_L[0] < 31) /* is a LeafL */ \ - { \ - Word_t _pop1 = P_L[0] + 1; \ - PWord_t P_LE = P_L + _pop1; \ - Word_t _index = 0; \ - int ii = 0; \ - P_L++; \ - while (_pop1 > 4) \ - { \ - _pop1 /=2; \ - _index = P_L[_pop1]; \ - if ((Index) > _index) P_L += _pop1 + 1; \ - } \ - while (P_L <= P_LE) \ - { \ - ii++; \ - _index = P_L[0]; \ - if (_index >= (Index)) break; \ - P_L++; \ - } \ - if (_index == (Index)) (Rc) = 1; \ - } \ - else \ - { \ - (Rc) = j__udy1Test((Pvoid_t)P_L, (Index)); \ - } \ - } \ -} -#endif // notdef - -#define J1T(Rc,PArray,Index) \ -{ \ - PWord_t P_L = (PWord_t)(PArray); \ - (Rc) = 0; \ - if (P_L) /* cannot be a NULL pointer */ \ - { \ - if (P_L[0] < 31) /* is a LeafL */ \ - { \ - Word_t _pop1 = P_L[0] + 1; \ - Word_t _EIndex = P_L[_pop1]; \ - if (_pop1 >= 16) \ - { \ - if ((Index) > P_L[_pop1/2]) P_L += _pop1/2; \ - } \ - if ((Index) <= _EIndex) \ - { \ - while((Index) > *(++P_L)); \ - if (*P_L == (Index)) (Rc) = 1; \ - } \ - } \ - else \ - { \ - (Rc) = j__udy1Test((Pvoid_t)P_L, Index); \ - } \ - } \ -} - -#define J1S( Rc, PArray, Index) \ - J_1I(Rc, (&(PArray)), Index, Judy1Set, "Judy1Set") -#define J1SA(Rc, PArray, Count, PIndex) \ - J_2AI(Rc,(&(PArray)), Count, PIndex, Judy1SetArray, "Judy1SetArray") -#define J1U( Rc, PArray, Index) \ - J_1I(Rc, (&(PArray)), Index, Judy1Unset, "Judy1Unset") -#define J1F( Rc, PArray, Index) \ - J_1I(Rc, PArray, &(Index), Judy1First, "Judy1First") -#define J1N( Rc, PArray, Index) \ - J_1I(Rc, PArray, &(Index), Judy1Next, "Judy1Next") -#define J1L( Rc, PArray, Index) \ - J_1I(Rc, PArray, &(Index), Judy1Last, "Judy1Last") -#define J1P( Rc, PArray, Index) \ - J_1I(Rc, PArray, &(Index), Judy1Prev, "Judy1Prev") -#define J1FE(Rc, PArray, Index) \ - J_1I(Rc, PArray, &(Index), Judy1FirstEmpty, "Judy1FirstEmpty") -#define J1NE(Rc, PArray, Index) \ - J_1I(Rc, PArray, &(Index), Judy1NextEmpty, "Judy1NextEmpty") -#define J1LE(Rc, PArray, Index) \ - J_1I(Rc, PArray, &(Index), Judy1LastEmpty, "Judy1LastEmpty") -#define J1PE(Rc, PArray, Index) \ - J_1I(Rc, PArray, &(Index), Judy1PrevEmpty, "Judy1PrevEmpty") -#define J1C( Rc, PArray, Index1, Index2) \ - J_2C(Rc, PArray, Index1, Index2, Judy1Count, "Judy1Count") -#define J1BC(Rc, PArray, Count, Index) \ - J_2I(Rc, PArray, Count, &(Index), Judy1ByCount, "Judy1ByCount") -#define J1FA(Rc, PArray) \ - J_0I(Rc, (&(PArray)), Judy1FreeArray, "Judy1FreeArray") -#define J1MU(Rc, PArray) \ - (Rc) = Judy1MemUsed(PArray) - -#define JLG(PV,PArray,Index) \ -{ \ - extern const uint8_t j__L_LeafWOffset[]; \ - PWord_t P_L = (PWord_t)(PArray); \ - (PV) = (Pvoid_t) NULL; \ - if (P_L) /* cannot be a NULL pointer */ \ - { \ - if (P_L[0] < 31) /* is a LeafL */ \ - { \ - Word_t _pop1 = P_L[0] + 1; \ - Word_t _EIndex = P_L[_pop1]; \ - Word_t _off = j__L_LeafWOffset[_pop1] - 1; \ - if (_pop1 >= 16) \ - { \ - if ((Index) > P_L[_pop1/2]) P_L += _pop1/2; \ - } \ - if ((Index) <= _EIndex) \ - { \ - while((Index) > *(++P_L)); \ - if (*P_L == (Index)) (PV) = (Pvoid_t)(P_L+_off);\ - } \ - } \ - else \ - { \ - (PV) = (Pvoid_t)j__udyLGet((Pvoid_t)P_L, Index); \ - } \ - } \ -} - -#define JLI( PV, PArray, Index) \ - J_1P(PV, (&(PArray)), Index, JudyLIns, "JudyLIns") - -#define JLIA(Rc, PArray, Count, PIndex, PValue) \ - J_3AI(Rc,(&(PArray)), Count, PIndex, PValue, JudyLInsArray, \ - "JudyLInsArray") -#define JLD( Rc, PArray, Index) \ - J_1I(Rc, (&(PArray)), Index, JudyLDel, "JudyLDel") - -#define JLF( PV, PArray, Index) \ - J_1P(PV, PArray, &(Index), JudyLFirst, "JudyLFirst") - -#define JLN(PV,PArray,Index) \ -{ \ - extern const uint8_t j__L_LeafWOffset[]; \ - PWord_t P_L = (PWord_t) (PArray); \ - \ - (PV) = (Pvoid_t) NULL; \ - \ - if (P_L) /* cannot be a NULL pointer */ \ - { \ - if (P_L[0] < 31) /* is a LeafL */ \ - { \ - Word_t _pop1 = P_L[0] + 1; \ - Word_t _off = j__L_LeafWOffset[_pop1] -1; \ - if ((Index) < P_L[_pop1]) \ - { \ - while(1) \ - { \ - if ((Index) < *(++P_L)) \ - { \ - (Index) = *P_L; \ - (PV) = (Pvoid_t) (P_L + _off); \ - break; \ - } \ - } \ - } \ - } \ - else \ - { \ - (PV) = (Pvoid_t)JudyLNext((Pvoid_t) PArray, &(Index), PJE0); \ - } \ - } \ -} - -#define JLL( PV, PArray, Index) \ - J_1P(PV, PArray, &(Index), JudyLLast, "JudyLLast") -#define JLP( PV, PArray, Index) \ - J_1P(PV, PArray, &(Index), JudyLPrev, "JudyLPrev") -#define JLFE(Rc, PArray, Index) \ - J_1I(Rc, PArray, &(Index), JudyLFirstEmpty, "JudyLFirstEmpty") -#define JLNE(Rc, PArray, Index) \ - J_1I(Rc, PArray, &(Index), JudyLNextEmpty, "JudyLNextEmpty") -#define JLLE(Rc, PArray, Index) \ - J_1I(Rc, PArray, &(Index), JudyLLastEmpty, "JudyLLastEmpty") -#define JLPE(Rc, PArray, Index) \ - J_1I(Rc, PArray, &(Index), JudyLPrevEmpty, "JudyLPrevEmpty") -#define JLC( Rc, PArray, Index1, Index2) \ - J_2C(Rc, PArray, Index1, Index2, JudyLCount, "JudyLCount") -#define JLBC(PV, PArray, Count, Index) \ - J_2P(PV, PArray, Count, &(Index), JudyLByCount, "JudyLByCount") -#define JLFA(Rc, PArray) \ - J_0I(Rc, (&(PArray)), JudyLFreeArray, "JudyLFreeArray") -#define JLMU(Rc, PArray) \ - (Rc) = JudyLMemUsed(PArray) - -#define JHSI(PV, PArray, PIndex, Count) \ - J_2P(PV, (&(PArray)), PIndex, Count, JudyHSIns, "JudyHSIns") -#define JHSG(PV, PArray, PIndex, Count) \ - (PV) = (Pvoid_t) JudyHSGet(PArray, PIndex, Count) -#define JHSD(Rc, PArray, PIndex, Count) \ - J_2I(Rc, (&(PArray)), PIndex, Count, JudyHSDel, "JudyHSDel") -#define JHSFA(Rc, PArray) \ - J_0I(Rc, (&(PArray)), JudyHSFreeArray, "JudyHSFreeArray") - -#define JSLG( PV, PArray, Index) \ - J_1P( PV, PArray, Index, JudySLGet, "JudySLGet") -#define JSLI( PV, PArray, Index) \ - J_1P( PV, (&(PArray)), Index, JudySLIns, "JudySLIns") -#define JSLD( Rc, PArray, Index) \ - J_1I( Rc, (&(PArray)), Index, JudySLDel, "JudySLDel") -#define JSLF( PV, PArray, Index) \ - J_1P( PV, PArray, Index, JudySLFirst, "JudySLFirst") -#define JSLN( PV, PArray, Index) \ - J_1P( PV, PArray, Index, JudySLNext, "JudySLNext") -#define JSLL( PV, PArray, Index) \ - J_1P( PV, PArray, Index, JudySLLast, "JudySLLast") -#define JSLP( PV, PArray, Index) \ - J_1P( PV, PArray, Index, JudySLPrev, "JudySLPrev") -#define JSLFA(Rc, PArray) \ - J_0I( Rc, (&(PArray)), JudySLFreeArray, "JudySLFreeArray") - -#ifdef __cplusplus -} -#endif -#endif /* ! _JUDY_INCLUDED */ diff --git a/dlls/arrayx/Judy.lib b/dlls/arrayx/Judy.lib deleted file mode 100644 index 77a8964d..00000000 Binary files a/dlls/arrayx/Judy.lib and /dev/null differ diff --git a/dlls/arrayx/JudyEx.h b/dlls/arrayx/JudyEx.h deleted file mode 100644 index 1c8ecba5..00000000 --- a/dlls/arrayx/JudyEx.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef _JUDYEX_INCLUDED -#define _JUDYEX_INCLUDED - -#include - -class JudyEx -{ -private: - char* ex_message; - bool fatal; - -public: - - JudyEx() { ex_message = NULL; fatal = true; } - JudyEx(char* set, bool isfatal) - { - ex_message = new char[strlen(set) + 1]; - strcpy(ex_message, set); - - fatal = isfatal; - } - - JudyEx(const JudyEx ©) - { - ex_message = new char[strlen(copy.ex_message) + 1]; - strcpy(ex_message, copy.ex_message); - - fatal = copy.fatal; - } - - ~JudyEx() { delete ex_message; } - - void Destroy() { delete ex_message; } - - void SetIsFatal(bool isfatal) { fatal = isfatal; } - bool IsFatal( void ) { return fatal; } - - char* SetErrorMessage(char* set) - { - ex_message = new char[strlen(set) + 1]; - strcpy(ex_message, set); - } - - char* ErrorMessage( void ) - { - return ex_message; - } -}; - -#endif \ No newline at end of file diff --git a/dlls/arrayx/JudyExtra.cpp b/dlls/arrayx/JudyExtra.cpp deleted file mode 100644 index caf4df23..00000000 --- a/dlls/arrayx/JudyExtra.cpp +++ /dev/null @@ -1,313 +0,0 @@ -#include "JudyExtra.h" -#include "CBinTrie.h" - -bool JudyClearMasterTrie(CBaseList* master) -{ - cell master_iten = NULL; - BinTrie* Storage = NULL; - - try { master_iten = master->First(); } - catch(JudyEx& e) { return false; } - - while( true ) - { - try { Storage = reinterpret_cast(master->Get(master_iten) ); } - catch(JudyEx& e) { break; } - - Storage->Remove(); - - try { master->Delete(master_iten); } - catch(JudyEx& e) { return false; } - - try { master_iten = master->Next(master_iten); } - catch(JudyEx& e) { break; } - } - - return true; -}; - -bool JudyClearBinTrie(BinTrie* trie) -{ - Word_t trie_iten = NULL; - - try { trie_iten = trie->First(); } - catch(JudyEx& e) { return false; } - - while( true ) - { - trie->Delete(trie_iten); - - try { trie_iten = trie->Next(trie_iten); } - catch(JudyEx& e) { break; } - } - return true; -}; - -bool JudySaveBinTrie(BinTrie* trie, char* file) -{ - Word_t trie_iten = NULL; - - try { trie_iten = trie->First(); } - catch(JudyEx e) { return false; } - - FILE *trieDB = fopen(file,"wb"); - if (!trieDB) return false; - - bool value = false; - - while( true ) - { - fwrite(&trie_iten, sizeof(Word_t), 1, trieDB); - - value = (trie->Get(trie_iten) != NULL); - fwrite(&value, sizeof(bool), 1, trieDB); - - try { trie_iten = trie->Next(trie_iten); } - catch(JudyEx& e) { break; } - } - - fclose(trieDB); - return true; -}; - -bool JudyLoadBinTrie(BinTrie* trie, char* file) -{ - FILE *trieDB = fopen(file, "ab+"); - if (!trieDB) return false; - - Word_t trie_iten = NULL; - - bool value = false; - - while(!feof(trieDB)) - { - fread(&trie_iten, sizeof(Word_t), 1, trieDB); - if (feof(trieDB) || ferror(trieDB)) break; - - fread(&value, sizeof(bool), 1, trieDB); - - trie->Set(trie_iten,value); - } - - fclose(trieDB); - return true; -} - -bool JudyClearMasterList(CBaseList* master) -{ - cell master_iten = NULL; - CBaseList* Storage = NULL; - - try { master_iten = master->First(); } - catch(JudyEx& e) { return false; } - - while( true ) - { - try { Storage = reinterpret_cast(master->Get(master_iten) ); } - catch(JudyEx& e) { break; } - - Storage->Remove(); - - try { master->Delete(master_iten); } - catch(JudyEx& e) { return false; } - - try { master_iten = master->Next(master_iten); } - catch(JudyEx& e) { break; } - } - - return true; -}; - -bool JudyClearList(CBaseList* list) -{ - Word_t list_iten = NULL; - Capsule* Storage = NULL; - - try { list_iten = list->First(); } - catch(JudyEx& e) { return false; } - - while( true ) - { - try { Storage = reinterpret_cast(list->Get(list_iten) ); } - catch(JudyEx& e) { break; } - - Storage->Remove(); - - try { list->Delete(list_iten); } - catch(JudyEx& e) { break; } - - try { list_iten = list->Next(list_iten); } - catch(JudyEx& e) { break; } - } - return true; -}; - -bool JudySaveList(CBaseList* list, char* file) -{ - Capsule* Storage = NULL; - Word_t list_iten = NULL; - bool no_error = true; - - try { list_iten = list->First(); } - catch(JudyEx e) { return false; } - - FILE* listDB = fopen(file,"wb"); - if (!listDB) return false; - - while( true ) - { - try { Storage = reinterpret_cast(list->Get(list_iten) ); } - catch(JudyEx& e) { no_error = false; break; } - - fwrite(&list_iten, sizeof(Word_t), 1, listDB); - try { Storage->Save(listDB); } - catch(JudyEx& e) { no_error = false; break; } - - try { list_iten = list->Next(list_iten); } - catch(JudyEx& e) { break; } - } - - fclose(listDB); - return no_error; -}; - -bool JudyLoadList(CBaseList* list, char* file) -{ - FILE *listDB = fopen(file, "ab+"); - if (!listDB) return false; - - Capsule* Storage = NULL; - Word_t list_iten = NULL; - bool no_error = true; - - while(!feof(listDB)) - { - fread(&list_iten, sizeof(Word_t), 1, listDB); - if (feof(listDB) || ferror(listDB)) break; - - Storage = new Capsule; - try { Storage->Load(listDB); } - catch(JudyEx& e) { no_error = false; break; } - - list->Set(list_iten,Storage); - } - - fclose(listDB); - return no_error; -} - -bool JudyClearMasterMap(CBaseList* master) -{ - cell master_iten = NULL; - CBaseMap* Storage = NULL; - - try { master_iten = master->First(); } - catch(JudyEx& e) { return false; } - - while( true ) - { - try { Storage = reinterpret_cast(master->Get(master_iten) ); } - catch(JudyEx& e) { break; } - - Storage->Remove(); - - try { master->Delete(master_iten); } - catch(JudyEx& e) { return false; } - - try { master_iten = master->Next(master_iten); } - catch(JudyEx& e) { break; } - } - - return true; -}; - -bool JudyClearMap(CBaseMap* map) -{ - char* map_iten = NULL; - Capsule* Storage = NULL; - - try { map_iten = map->First(); } - catch(JudyEx& e) { return false; } - - while( true ) - { - try { Storage = reinterpret_cast(map->Get(map_iten) ); } - catch(JudyEx& e) { break; } - - Storage->Remove(); - - try { map->Delete(map_iten); } - catch(JudyEx& e) { return false; } - - try { map_iten = map->Next(map_iten); } - catch(JudyEx& e) { break; } - } - - return true; -}; - - -bool JudySaveMap(CBaseMap* map, char* file) -{ - Capsule* Storage = NULL; - char* map_iten = NULL; - size_t key_len = NULL; - bool no_error = true; - - try { map_iten = map->First(); } - catch(JudyEx& e) { return false; } - - FILE *mapDB = fopen(file,"wb"); - if (!mapDB) return false; - - while( true ) - { - try { Storage = reinterpret_cast(map->Get(map_iten) ); } - catch(JudyEx& e) { return false; } - - key_len = strlen(map_iten); - - fwrite(&key_len, sizeof(size_t), 1, mapDB); - fwrite(&map_iten, sizeof(char), strlen(map_iten), mapDB); - - try { Storage->Save(mapDB); } - catch(JudyEx& e) { no_error = false; break; } - - try { map_iten = map->Next(map_iten); } - catch(JudyEx& e) { break; } - } - - fclose(mapDB); - return no_error; -}; - -bool JudyLoadMap(CBaseMap* map, char* file) -{ - FILE *mapDB = fopen(file, "ab+"); - if (!mapDB) return false; - - Capsule* Storage = NULL; - char* map_iten = NULL; - size_t key_len = NULL; - bool no_error = true; - - while(!feof(mapDB)) - { - fread(&key_len,sizeof(size_t),1,mapDB); - - map_iten = new char[key_len+1]; - fgets(map_iten, key_len+1, mapDB); - - if (feof(mapDB) || ferror(mapDB)) break; - - Storage = new Capsule; - try { Storage->Load(mapDB); } - catch(JudyEx& e) { no_error = false; break; } - - map->Set(map_iten,Storage); - delete map_iten; - } - - fclose(mapDB); - return no_error; -} \ No newline at end of file diff --git a/dlls/arrayx/JudyExtra.h b/dlls/arrayx/JudyExtra.h deleted file mode 100644 index 6b8541b6..00000000 --- a/dlls/arrayx/JudyExtra.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef _JUDYARRAY_SHARED_INCLUDED -#define _JUDYARRAY_SHARED_INCLUDED - -#include "CBaseList.h" -#include "CBaseMap.h" - -class BinTrie; - -extern bool JudyClearMasterTrie(CBaseList* master); -extern bool JudyClearBinTrie(BinTrie* trie); -extern bool JudySaveBinTrie(BinTrie* trie, char* file); -extern bool JudyLoadBinTrie(BinTrie* trie, char* file); - -extern bool JudyClearMasterList(CBaseList* master); -extern bool JudyClearList(CBaseList* list); -extern bool JudySaveList(CBaseList* list, char* file); -extern bool JudyLoadList(CBaseList* list, char* file); - -extern bool JudyClearMasterMap(CBaseList* master); -extern bool JudyClearMap(CBaseMap* map); -extern bool JudySaveMap(CBaseMap* array, char* file); -extern bool JudyLoadMap(CBaseMap* array, char* file); - -#endif \ No newline at end of file diff --git a/dlls/arrayx/JudyIncludes.h b/dlls/arrayx/JudyIncludes.h deleted file mode 100644 index 5d4b009e..00000000 --- a/dlls/arrayx/JudyIncludes.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _JUDYINC_INCLUDED -#define _JUDYINC_INCLUDED - -#include "osdefs.h" -//#include - -#ifndef __linux__ -#define JU_WIN -#endif - -#ifdef __WIN32__ -#define JU_WIN -#endif - -#define JUDYERROR_NOTEST 1 -#include "Judy.h" - -#ifdef __GNUC__ -#include -#include -#include -#endif - -#ifdef __linux__ -#include -#else -#define WINDOWS_LEAN_AND_MEAN -#include -#include -#endif - -#include -#include - -#include "amxxmodule.h" - -#include "JudyVar.h" -#include "JudyVec.h" -#include "JudyEx.h" - -#include "Capsule.h" - -#endif diff --git a/dlls/arrayx/JudyVar.h b/dlls/arrayx/JudyVar.h deleted file mode 100644 index a05a2113..00000000 --- a/dlls/arrayx/JudyVar.h +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef _JUDYVAR_H -#define _JUDYVAR_H - -#if defined HAVE_STDINT_H - //#include -#else - #if defined __LCC__ || defined __DMC__ || defined LINUX - #if defined HAVE_INTTYPES_H - #include - #else - #include - #endif - #elif !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L - /* The ISO C99 defines the int16_t and int_32t types. If the compiler got - * here, these types are probably undefined. - */ - #if defined __MACH__ - #include - typedef unsigned short int uint16_t; - typedef unsigned long int uint32_t; - #elif defined __FreeBSD__ - #include - #else - typedef short int int16_t; - typedef unsigned short int uint16_t; - #if defined SN_TARGET_PS2 - typedef int int32_t; - typedef unsigned int uint32_t; - #else - typedef long int int32_t; - typedef unsigned long int uint32_t; - #endif - #if defined __WIN32__ || defined _WIN32 || defined WIN32 - typedef __int64 int64_t; - typedef unsigned __int64 uint64_t; - #define HAVE_I64 - #elif defined __GNUC__ - typedef long long int64_t; - typedef unsigned long long uint64_t; - #define HAVE_I64 - #endif - #endif - #endif -#endif - -#if defined _LP64 || defined WIN64 || defined _WIN64 - #if !defined __64BIT__ - #define __64BIT__ - #endif -#endif - -#if !defined PAWN_CELL_SIZE - #define PAWN_CELL_SIZE 32 /* by default, use 32-bit cells */ -#endif -#if PAWN_CELL_SIZE==16 - typedef uint16_t ucell; - typedef int16_t cell; -#elif PAWN_CELL_SIZE==32 - typedef uint32_t ucell; - typedef int32_t cell; -#define REAL float -#elif PAWN_CELL_SIZE==64 - typedef uint64_t ucell; - typedef int64_t cell; -#define REAL double -#else - #error Unsupported cell size (PAWN_CELL_SIZE) -#endif - -#endif \ No newline at end of file diff --git a/dlls/arrayx/JudyVec.h b/dlls/arrayx/JudyVec.h deleted file mode 100644 index 07511682..00000000 --- a/dlls/arrayx/JudyVec.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef _JUDYVEC_INCLUDED -#define _JUDYVEC_INCLUDED - -#include "JudyIncludes.h" - -class JudyVec -{ -public: - REAL first; - REAL second; - REAL third; - - JudyVec(REAL one, REAL two, REAL three) { Set(one, two, three); } - ~JudyVec() {} - - void Get(REAL& one, REAL& two, REAL& three) { one = first; two = second; three = third; } - void Set(REAL one, REAL two, REAL three) { first = one; second = two; third = three; } -}; - -#endif \ No newline at end of file diff --git a/dlls/arrayx/ListNativeFunctions.h b/dlls/arrayx/ListNativeFunctions.h deleted file mode 100644 index 90289463..00000000 --- a/dlls/arrayx/ListNativeFunctions.h +++ /dev/null @@ -1,114 +0,0 @@ -#ifndef _LIST_NATIVE_FUNC_INC_H -#define _LIST_NATIVE_FUNC_INC_H - -#define JUDY_GLUE_FUNC( x , y ) x ## y - -#define JUDY_GLUE_STR( x, y ) #x#y - -#define JUDY_MASTER_EDIT_FUNCTIONS -#define JUDY_MASTER_CLEAR_FUNC JUDY_GLUE_FUNC( list , _clear ) -#define JUDY_MASTER_CLEAR_STR JUDY_GLUE_STR ( list , _clear ) - -#define JUDY_MASTER_DELETE_FUNC JUDY_GLUE_FUNC( list , _delete ) -#define JUDY_MASTER_DELETE_STR JUDY_GLUE_STR ( list , _delete ) - -#define JUDY_MASTER_IO_FUNCTIONS - -#define JUDY_MASTER_SAVE_FUNC JUDY_GLUE_FUNC( list , _save ) -#define JUDY_MASTER_SAVE_STR JUDY_GLUE_STR ( list , _save ) -#define JUDY_SAVE_FUNC(list, file) JudySaveList ( list , file ) - -#define JUDY_MASTER_LOAD_FUNC JUDY_GLUE_FUNC( list , _load ) -#define JUDY_MASTER_LOAD_STR JUDY_GLUE_STR ( list , _load ) -#define JUDY_LOAD_FUNC(list, file) JudyLoadList ( list , file ) - -#define JUDY_MASTER_AMOUNT_FUNCTIONS -#define JUDY_MASTER_COUNT_FUNC JUDY_GLUE_FUNC( list , _count ) -#define JUDY_MASTER_COUNT_STR JUDY_GLUE_STR ( list , _count ) - -#define JUDY_MASTER_BYCOUNT_FUNC JUDY_GLUE_FUNC( list , _bycount ) -#define JUDY_MASTER_BYCOUNT_STR JUDY_GLUE_STR ( list , _bycount ) - -#define JUDY_SLAVE_AMOUNT_FUNCTIONS - -#define JUDY_SLAVE_COUNT_FUNC JUDY_GLUE_FUNC( list , _size ) -#define JUDY_SLAVE_COUNT_STR JUDY_GLUE_STR ( list , _size ) - -#define JUDY_SLAVE_BYCOUNT_FUNC JUDY_GLUE_FUNC( list , _get_nth ) -#define JUDY_SLAVE_BYCOUNT_STR JUDY_GLUE_STR ( list , _get_nth ) - -#define JUDY_SLAVE_EDIT_FUNCTIONS - -#define JUDY_SLAVE_MEMORY_FUNC JUDY_GLUE_FUNC( list , _memory ) -#define JUDY_SLAVE_MEMORY_STR JUDY_GLUE_STR ( list , _memory ) - -#define JUDY_SLAVE_ISFILLED_FUNC JUDY_GLUE_FUNC( list , _isfilled ) -#define JUDY_SLAVE_ISFILLED_STR JUDY_GLUE_STR ( list , _isfilled ) - -#define JUDY_SLAVE_ISEMPTY_FUNC JUDY_GLUE_FUNC( list , _isempty ) -#define JUDY_SLAVE_ISEMPTY_STR JUDY_GLUE_STR ( list , _isempty ) - -#define JUDY_SLAVE_REMOVE_FUNC JUDY_GLUE_FUNC( list , _remove ) -#define JUDY_SLAVE_REMOVE_STR JUDY_GLUE_STR ( list , _remove ) - -#define JUDY_SLAVE_EDIT_BOOL -#define JUDY_SLAVE_GET_BOOL_FUNC JUDY_GLUE_FUNC( list , _get_bool ) -#define JUDY_SLAVE_SET_BOOL_FUNC JUDY_GLUE_FUNC( list , _set_bool ) - -#define JUDY_SLAVE_GET_BOOL_STR JUDY_GLUE_STR ( list , _get_bool ) -#define JUDY_SLAVE_SET_BOOL_STR JUDY_GLUE_STR ( list , _set_bool ) - -#define JUDY_SLAVE_EDIT_INT -#define JUDY_SLAVE_GET_INT_FUNC JUDY_GLUE_FUNC( list , _get_int ) -#define JUDY_SLAVE_SET_INT_FUNC JUDY_GLUE_FUNC( list , _set_int ) - -#define JUDY_SLAVE_GET_INT_STR JUDY_GLUE_STR ( list , _get_int ) -#define JUDY_SLAVE_SET_INT_STR JUDY_GLUE_STR ( list , _set_int ) - -#define JUDY_SLAVE_EDIT_FLO -#define JUDY_SLAVE_GET_FLO_FUNC JUDY_GLUE_FUNC( list , _get_float ) -#define JUDY_SLAVE_SET_FLO_FUNC JUDY_GLUE_FUNC( list , _set_float ) - -#define JUDY_SLAVE_GET_FLO_STR JUDY_GLUE_STR ( list , _get_float ) -#define JUDY_SLAVE_SET_FLO_STR JUDY_GLUE_STR ( list , _set_float ) - -#define JUDY_SLAVE_EDIT_STR -#define JUDY_SLAVE_GET_STR_FUNC JUDY_GLUE_FUNC( list , _get_string ) -#define JUDY_SLAVE_SET_STR_FUNC JUDY_GLUE_FUNC( list , _set_string ) - -#define JUDY_SLAVE_GET_STR_STR JUDY_GLUE_STR ( list , _get_string ) -#define JUDY_SLAVE_SET_STR_STR JUDY_GLUE_STR ( list , _set_string ) - -#define JUDY_SLAVE_EDIT_VEC -#define JUDY_SLAVE_GET_VEC_FUNC JUDY_GLUE_FUNC( list , _get_vector ) -#define JUDY_SLAVE_SET_VEC_FUNC JUDY_GLUE_FUNC( list , _set_vector ) - -#define JUDY_SLAVE_GET_VEC_STR JUDY_GLUE_STR ( list , _get_vector ) -#define JUDY_SLAVE_SET_VEC_STR JUDY_GLUE_STR ( list , _set_vector ) - -#define JUDY_SLAVE_SEARCH_FUNCTIONS -#define JUDY_SLAVE_FIRST_FUNC JUDY_GLUE_FUNC( list , _first ) -#define JUDY_SLAVE_LAST_FUNC JUDY_GLUE_FUNC( list , _last ) - -#define JUDY_SLAVE_FIRST_STR JUDY_GLUE_STR ( list , _first ) -#define JUDY_SLAVE_LAST_STR JUDY_GLUE_STR ( list , _last ) - -#define JUDY_SLAVE_NEXT_FUNC JUDY_GLUE_FUNC( list , _next ) -#define JUDY_SLAVE_PREV_FUNC JUDY_GLUE_FUNC( list , _prev ) - -#define JUDY_SLAVE_NEXT_STR JUDY_GLUE_STR ( list , _next ) -#define JUDY_SLAVE_PREV_STR JUDY_GLUE_STR ( list , _prev ) - -#define JUDY_SLAVE_SEARCH_EMPTY_FUNCTIONS -#define JUDY_SLAVE_FIRSTEMPTY_FUNC JUDY_GLUE_FUNC( list , _firstempty ) -#define JUDY_SLAVE_LASTEMPTY_FUNC JUDY_GLUE_FUNC( list , _lastempty ) - -#define JUDY_SLAVE_FIRSTEMPTY_STR JUDY_GLUE_STR ( list , _firstempty ) -#define JUDY_SLAVE_LASTEMPTY_STR JUDY_GLUE_STR ( list , _lastempty ) - -#define JUDY_SLAVE_NEXTEMPTY_FUNC JUDY_GLUE_FUNC( list , _nextempty ) -#define JUDY_SLAVE_PREVEMPTY_FUNC JUDY_GLUE_FUNC( list , _prevempty ) - -#define JUDY_SLAVE_NEXTEMPTY_STR JUDY_GLUE_STR ( list , _nextempty ) -#define JUDY_SLAVE_PREVEMPTY_STR JUDY_GLUE_STR ( list , _prevempty ) -#endif \ No newline at end of file diff --git a/dlls/arrayx/ListNatives.cpp b/dlls/arrayx/ListNatives.cpp deleted file mode 100644 index 8e50be6d..00000000 --- a/dlls/arrayx/ListNatives.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include "CBaseList.h" -#include "CArray.h" -#include "ComboArray.h" - -#define KEY_TYPE cell -#define DYNAMIC_UNIT_TYPE CBaseList -#define STORAGE_TYPE Capsule -#define MASTER_NAME MasterList -#define EXPORT_NAME list_exports - -#define SEARCH_ERROR_OFFSET 0 - -#define GET_KEY(params, num) params[num] -#define SET_KEY(stuff, parameter) stuff - -#include "ListNativeFunctions.h" -#include "NativeIncludes.h" - -static cell AMX_NATIVE_CALL array_create(AMX *amx,cell *params) -{ - DTYPE* Unit; - M_ITYPE Index = params[1]; - - JUDY_CREATE_INDEX(MNAME,Unit,Array,Index); - return Index; -} - -static cell AMX_NATIVE_CALL comboarray_create(AMX *amx,cell *params) -{ - DTYPE* Unit; - M_ITYPE Index = params[1]; - - JUDY_CREATE_INDEX(MNAME,Unit,ComboArray,Index); - return Index; -} - -AMX_NATIVE_INFO list_creation_exports[] = -{ - { "array_create", array_create }, - { "comboarray_create", comboarray_create }, - - { NULL, NULL } -}; \ No newline at end of file diff --git a/dlls/arrayx/MapNativeFunctions.h b/dlls/arrayx/MapNativeFunctions.h deleted file mode 100644 index fdd28bdd..00000000 --- a/dlls/arrayx/MapNativeFunctions.h +++ /dev/null @@ -1,94 +0,0 @@ -#ifndef _MAP_NATIVE_FUNC_INC_H -#define _MAP_NATIVE_FUNC_INC_H - -#define JUDY_GLUE_FUNC( x , y ) x ## y - -#define JUDY_GLUE_STR( x, y ) #x#y - -#define JUDY_MASTER_EDIT_FUNCTIONS -#define JUDY_MASTER_CLEAR_FUNC JUDY_GLUE_FUNC( map , _clear ) -#define JUDY_MASTER_CLEAR_STR JUDY_GLUE_STR ( map , _clear ) - -#define JUDY_MASTER_DELETE_FUNC JUDY_GLUE_FUNC( map , _delete ) -#define JUDY_MASTER_DELETE_STR JUDY_GLUE_STR ( map , _delete ) - -#define JUDY_MASTER_IO_FUNCTIONS - -#define JUDY_MASTER_SAVE_FUNC JUDY_GLUE_FUNC( map , _save ) -#define JUDY_MASTER_SAVE_STR JUDY_GLUE_STR ( map , _save ) -#define JUDY_SAVE_FUNC(map, file) JudySaveMap ( map , file ) - -#define JUDY_MASTER_LOAD_FUNC JUDY_GLUE_FUNC( map , _load ) -#define JUDY_MASTER_LOAD_STR JUDY_GLUE_STR ( map , _load ) -#define JUDY_LOAD_FUNC(map, file) JudyLoadMap ( map , file ) - -#define JUDY_MASTER_AMOUNT_FUNCTIONS -#define JUDY_MASTER_COUNT_FUNC JUDY_GLUE_FUNC( map , _count ) -#define JUDY_MASTER_COUNT_STR JUDY_GLUE_STR ( map , _count ) - -#define JUDY_MASTER_BYCOUNT_FUNC JUDY_GLUE_FUNC( map , _bycount ) -#define JUDY_MASTER_BYCOUNT_STR JUDY_GLUE_STR ( map , _bycount ) - -#define JUDY_SLAVE_EDIT_FUNCTIONS - -#define JUDY_SLAVE_MEMORY_FUNC JUDY_GLUE_FUNC( map , _memory ) -#define JUDY_SLAVE_MEMORY_STR JUDY_GLUE_STR ( map , _memory ) - -#define JUDY_SLAVE_ISFILLED_FUNC JUDY_GLUE_FUNC( map , _isfilled ) -#define JUDY_SLAVE_ISFILLED_STR JUDY_GLUE_STR ( map , _isfilled ) - -#define JUDY_SLAVE_ISEMPTY_FUNC JUDY_GLUE_FUNC( map , _isempty ) -#define JUDY_SLAVE_ISEMPTY_STR JUDY_GLUE_STR ( map , _isempty ) - -#define JUDY_SLAVE_REMOVE_FUNC JUDY_GLUE_FUNC( map , _remove ) -#define JUDY_SLAVE_REMOVE_STR JUDY_GLUE_STR ( map , _remove ) - -#define JUDY_SLAVE_EDIT_BOOL -#define JUDY_SLAVE_GET_BOOL_FUNC JUDY_GLUE_FUNC( map , _get_bool ) -#define JUDY_SLAVE_SET_BOOL_FUNC JUDY_GLUE_FUNC( map , _set_bool ) - -#define JUDY_SLAVE_GET_BOOL_STR JUDY_GLUE_STR ( map , _get_bool ) -#define JUDY_SLAVE_SET_BOOL_STR JUDY_GLUE_STR ( map , _set_bool ) - -#define JUDY_SLAVE_EDIT_INT -#define JUDY_SLAVE_GET_INT_FUNC JUDY_GLUE_FUNC( map , _get_int ) -#define JUDY_SLAVE_SET_INT_FUNC JUDY_GLUE_FUNC( map , _set_int ) - -#define JUDY_SLAVE_GET_INT_STR JUDY_GLUE_STR ( map , _get_int ) -#define JUDY_SLAVE_SET_INT_STR JUDY_GLUE_STR ( map , _set_int ) - -#define JUDY_SLAVE_EDIT_FLO -#define JUDY_SLAVE_GET_FLO_FUNC JUDY_GLUE_FUNC( map , _get_float ) -#define JUDY_SLAVE_SET_FLO_FUNC JUDY_GLUE_FUNC( map , _set_float ) - -#define JUDY_SLAVE_GET_FLO_STR JUDY_GLUE_STR ( map , _get_float ) -#define JUDY_SLAVE_SET_FLO_STR JUDY_GLUE_STR ( map , _set_float ) - -#define JUDY_SLAVE_EDIT_STR -#define JUDY_SLAVE_GET_STR_FUNC JUDY_GLUE_FUNC( map , _get_string ) -#define JUDY_SLAVE_SET_STR_FUNC JUDY_GLUE_FUNC( map , _set_string ) - -#define JUDY_SLAVE_GET_STR_STR JUDY_GLUE_STR ( map , _get_string ) -#define JUDY_SLAVE_SET_STR_STR JUDY_GLUE_STR ( map , _set_string ) - -#define JUDY_SLAVE_EDIT_VEC -#define JUDY_SLAVE_GET_VEC_FUNC JUDY_GLUE_FUNC( map , _get_vector ) -#define JUDY_SLAVE_SET_VEC_FUNC JUDY_GLUE_FUNC( map , _set_vector ) - -#define JUDY_SLAVE_GET_VEC_STR JUDY_GLUE_STR ( map , _get_vector ) -#define JUDY_SLAVE_SET_VEC_STR JUDY_GLUE_STR ( map , _set_vector ) - -#define JUDY_SLAVE_SEARCH_FUNCTIONS -#define JUDY_SLAVE_FIRST_FUNC JUDY_GLUE_FUNC( map , _first ) -#define JUDY_SLAVE_LAST_FUNC JUDY_GLUE_FUNC( map , _last ) - -#define JUDY_SLAVE_FIRST_STR JUDY_GLUE_STR ( map , _first ) -#define JUDY_SLAVE_LAST_STR JUDY_GLUE_STR ( map , _last ) - -#define JUDY_SLAVE_NEXT_FUNC JUDY_GLUE_FUNC( map , _next ) -#define JUDY_SLAVE_PREV_FUNC JUDY_GLUE_FUNC( map , _prev ) - -#define JUDY_SLAVE_NEXT_STR JUDY_GLUE_STR ( map , _next ) -#define JUDY_SLAVE_PREV_STR JUDY_GLUE_STR ( map , _prev ) - -#endif \ No newline at end of file diff --git a/dlls/arrayx/MapNatives.cpp b/dlls/arrayx/MapNatives.cpp deleted file mode 100644 index 38de80e6..00000000 --- a/dlls/arrayx/MapNatives.cpp +++ /dev/null @@ -1,54 +0,0 @@ -#include "CBaseMap.h" -#include "CKeytable.h" -#include "ComboTable.h" -#include "CHashtable.h" - -#define KEY_TYPE char* -#define DYNAMIC_UNIT_TYPE CBaseMap -#define STORAGE_TYPE Capsule -#define MASTER_NAME MasterMap -#define EXPORT_NAME map_exports - -#define SEARCH_ERROR_OFFSET 2 - -#define GET_KEY(params, num) MF_GetAmxString(amx,params[num],num,NULL) -#define SET_KEY(str, num) MF_SetAmxString(amx,params[num],str,params[num + 1]) - -#include "MapNativeFunctions.h" -#include "NativeIncludes.h" - -static cell AMX_NATIVE_CALL keytable_create(AMX *amx,cell *params) -{ - DTYPE* Unit = NULL; - M_ITYPE Index = NULL; - - JUDY_CREATE_INDEX(MNAME,Unit,Keytable,Index); - return Index; -} - -static cell AMX_NATIVE_CALL combotable_create(AMX *amx,cell *params) -{ - DTYPE* Unit = NULL; - M_ITYPE Index = NULL; - - JUDY_CREATE_INDEX(MNAME,Unit,ComboTable,Index); - return Index; -} - -static cell AMX_NATIVE_CALL hashtable_create(AMX *amx,cell *params) -{ - DTYPE* Unit; - M_ITYPE Index = params[1]; - - JUDY_CREATE_INDEX(MNAME,Unit,Hashtable,Index); - return Index; -} - -AMX_NATIVE_INFO map_creation_exports[] = -{ - { "keytable_create", keytable_create }, - { "combotable_create", combotable_create }, - { "hashtable_create", hashtable_create }, - - { NULL, NULL } -}; \ No newline at end of file diff --git a/dlls/arrayx/NativeIncludes.h b/dlls/arrayx/NativeIncludes.h deleted file mode 100644 index dc5def17..00000000 --- a/dlls/arrayx/NativeIncludes.h +++ /dev/null @@ -1,130 +0,0 @@ -#ifndef _NATIVE_INC_H -#define _NATIVE_INC_H - -#include "ComboArray.h" - -#ifndef SEARCH_ERROR_OFFSET -#define SEARCH_ERROR_OFFSET 0 -#endif - -#define SE_OFFSET SEARCH_ERROR_OFFSET - -#ifndef STORAGE_TYPE -#error No storage type declared -#endif - -#define STYPE STORAGE_TYPE - -#ifndef KEY_TYPE -#error No key type declared -#endif - -#define ITYPE KEY_TYPE - -#ifndef DYNAMIC_UNIT_TYPE -#error No Dynamic type declared -#endif - -#define DTYPE DYNAMIC_UNIT_TYPE - -#ifndef MASTER_NAME -#error No master name declared -#endif - -#define MNAME MASTER_NAME -#define M_ITYPE cell - -#ifndef GET_KEY -#error No method of getting keys has been declared -#endif - -#ifndef EXPORT_NAME -#define EXPORT_NAME MNAME_exports -#endif - -#define SE_OFFSET SEARCH_ERROR_OFFSET - -#define JUDY_GET_KEY GET_KEY - -#ifndef SET_KEY -#error No method of setting keys has been declared -#endif - -#define JUDY_SET_KEY SET_KEY - -#ifndef JUDY_ERROR_CATCH -#define JUDY_ERROR_CATCH(x_str) \ - catch(JudyEx& e) \ - { \ - if(e.IsFatal() )\ - {\ - MF_LogError(amx,AMX_ERR_NATIVE, "%s || Judy Error: %s", x_str, e.ErrorMessage());\ - return NULL;\ - };\ - return NULL;\ - }\ - catch(...) { MF_LogError(amx,AMX_ERR_NATIVE,"Unknown error occured, please post a bug report at www.amxmodx.org/forums"); return NULL; } -#endif - -#ifndef JUDY_SEARCH_ERROR_CATCH -#define JUDY_SEARCH_ERROR_CATCH(x_str, success) \ - catch(JudyEx& e) \ - { \ - if(e.IsFatal() )\ - {\ - MF_LogError(amx,AMX_ERR_NATIVE, "%s || Judy Error: %s", x_str, e.ErrorMessage());\ - return NULL;\ - };\ - return (success = 0);\ - }\ - catch(...) { MF_LogError(amx,AMX_ERR_NATIVE,"Unknown error occured, please post a bug report at www.amxmodx.org/forums"); return NULL; } -#endif - -#ifndef JUDY_CREATE_INDEX -#define JUDY_CREATE_INDEX(master, slave, slave_type, index)\ -\ - if( index == NULL )\ - {\ - try { index = master.FirstEmpty(); }\ - JUDY_ERROR_CATCH("Unable to create new unit (out of memory)");\ -\ - slave = new slave_type;\ - master.Set(index,slave);\ - } \ - else if(master.IsEmpty(index) )\ - {\ - slave = new slave_type;\ - master.Set(index,slave);\ - }\ - else slave = master.Get(index, slave ); - -#endif - -#ifndef JUDY_GET_INDEX -#define JUDY_GET_INDEX(master,slave, where) \ - try { slave = master.Get(where,slave); } \ - JUDY_ERROR_CATCH("Unable to access old unit (invalid index)"); -#endif - -#ifndef JUDY_SET_INDEX -#define JUDY_SET_INDEX(master,slave, where) \ - try { master.Set(where,slave); } \ - JUDY_ERROR_CATCH("Unknown Error occured (No error possible) - Set Function");\ - return 1; -#endif - -#ifndef JUDY_SET_INDEX_P -#define JUDY_SET_INDEX_P(master,slave, where) \ - try { master->Set(where,slave); } \ - JUDY_ERROR_CATCH("Unknown Error occured (No error possible) - Set Function");\ - return 1; -#endif - -inline char* JUDY_BUILD_PATH(AMX *amx, cell param, int buffer = 0) -{ - char *file = MF_GetAmxString(amx, param, 0, NULL); - return MF_BuildPathname("%s", file); -} - -#include "GenericNatives.h" -#endif \ No newline at end of file diff --git a/dlls/arrayx/SDK/CBaseList.h b/dlls/arrayx/SDK/CBaseList.h deleted file mode 100644 index a9ce4646..00000000 --- a/dlls/arrayx/SDK/CBaseList.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef _BASE_ARRAYCLASS_H -#define _BASE_ARRAYCLASS_H - -#include "JudyIncludes.h" - -class CBaseList -{ -public: - virtual Word_t Clear() =0; - virtual Word_t MemoryUsed() =0; - - virtual int Delete(cell Key) =0; - - virtual void Set(cell Index, Pvoid_t value, bool disable_check = false) =0; - - virtual Pvoid_t Get(cell Index, bool disable_check = false) =0; - - virtual cell First(cell Start = 0) =0; - virtual cell Next(cell Start = 0) =0; - virtual cell Prev(cell Start = -1) =0; - virtual cell Last(cell Start = -1) =0; - - virtual cell FirstEmpty(cell Start = 0) =0; - virtual cell NextEmpty(cell Start = 0) =0; - virtual cell PrevEmpty(cell Start = -1) =0; - virtual cell LastEmpty(cell Start = -1) =0; - - virtual cell ByCount(cell n, cell Start = 0) =0; - virtual cell Count(cell Start = 0, cell Stop = -1) =0; - - virtual bool IsFilled(cell Index) =0; - virtual bool IsEmpty(cell Index) =0; -}; - -#endif diff --git a/dlls/arrayx/SDK/CBaseMap.h b/dlls/arrayx/SDK/CBaseMap.h deleted file mode 100644 index ef0b6a5c..00000000 --- a/dlls/arrayx/SDK/CBaseMap.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef _BASE_MAPCLASS_H -#define _BASE_MAPCLASS_H - -#include "JudyIncludes.h" - -class CBaseMap -{ -public: - virtual Word_t Clear() =0; - virtual Word_t MemoryUsed() =0; - - virtual int Delete(char* Key) =0; - - virtual void Set(char* Index, Pvoid_t value, bool disable_check = false) =0; - - virtual Pvoid_t Get(char* Index, bool disable_check = false) =0; - - virtual char* First(char* Start = "") =0; - virtual char* Next(char* Start) =0; - virtual char* Prev(char* Start) =0; - virtual char* Last(char* Start) =0; - - virtual bool IsFilled(char* Index) =0; - virtual bool IsEmpty(char* Index) =0; -}; - -#endif - diff --git a/dlls/arrayx/SDK/CBinTrie.h b/dlls/arrayx/SDK/CBinTrie.h deleted file mode 100644 index a1d9e3fc..00000000 --- a/dlls/arrayx/SDK/CBinTrie.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef _BINTRIECLASS_H -#define _BINTRIECLASS_H - -#include "JudyIncludes.h" -//#include - -class BinTrie -{ -private: - Pvoid_t Table; - - void ThrowSearchError(char* msg); - -public: - BinTrie() { Table = NULL; } - ~BinTrie() { Judy1FreeArray(&Table, PJE0); } - - Word_t Clear() { return Judy1FreeArray(&Table, PJE0); } - Word_t MemoryUsed() { return Judy1MemUsed(Table); } - - cell Delete(cell Key) { return Judy1Unset(&Table, Key, PJE0 ); } - - cell Set(cell Index, bool val) - { - if(val == false) return Delete(Index); - else return Judy1Set(&Table, Index,PJE0); - } - - cell Get(cell Index) - { - cell PValue = Judy1Test(Table, Index, PJE0); - return PValue; - } - - cell First(cell Start = 0); - cell Next(cell Start = 0); - cell Prev(cell Start = -1); - cell Last(cell Start = -1); - - cell FirstEmpty(cell Start = 0); - cell NextEmpty(cell Start = 0); - cell PrevEmpty(cell Start = -1); - cell LastEmpty(cell Start = -1); - - cell ByCount(cell n, cell Start); - cell Count(cell Start = 0, cell Stop = -1) { return Judy1Count(Table, Start, Stop, PJE0); } - - bool IsFilled(cell Index) { return ( (Get(Index )) ? true : false); } - bool IsEmpty(cell Index) { return ( (Get(Index )) ? true : false); } -}; - -#endif \ No newline at end of file diff --git a/dlls/arrayx/SDK/Capsule.cpp b/dlls/arrayx/SDK/Capsule.cpp deleted file mode 100644 index c58eff52..00000000 --- a/dlls/arrayx/SDK/Capsule.cpp +++ /dev/null @@ -1,261 +0,0 @@ -#include "Capsule.h" - -const char* capsule_types[] = -{ - "-NO VALUE-", - "BOOLEAN", - "INTEGER", - "FLOAT", - "VECTOR", - "STRING" -}; - -void Capsule::ThrowTypeError(cell get_type) -{ - char ValStr[15]; - GetAsStr(ValStr); - - char value[100]; - sprintf(value,"Function attempted to read NON-%s value, actual type is: %s, actual value is: %s", capsule_types[get_type], capsule_types[type], ValStr ); - - throw JudyEx(value, true); -} - -bool Capsule::CheckEmpty(bool clear) -{ - bool empty = ( data == NULL ); - - if(empty != true && clear == true) Clear(); - return empty; -} - -void Capsule::Clear() -{ - //This function intelligently creates a pointer x, - //which will be of correct type and then deletes it. - - switch (type) - { - case capsule_type_flo: - { - REAL *real_val = reinterpret_cast(data); - delete real_val; - - break; - } - case capsule_type_vec: - { - JudyVec *vector_val = reinterpret_cast(data); - delete vector_val; - - break; - } - case capsule_type_str: - { - char *char_val = reinterpret_cast(data); - delete char_val; - - break; - } - } - - data = NULL; //Null the address as well. (Used for ints too.) -} - -bool Capsule::GetBool( void ) -{ - if (type != capsule_type_bool) ThrowTypeError(capsule_type_bool); - - return reinterpret_cast(data); -} - -void Capsule::SetBool(bool Value) -{ - CheckEmpty(true); - type = capsule_type_bool; - data = reinterpret_cast(Value); -}; - -cell Capsule::GetInt( void ) -{ - if (type != capsule_type_int) ThrowTypeError(capsule_type_int); - - return reinterpret_cast(data); -} - -void Capsule::SetInt(cell Value) -{ - CheckEmpty(true); - type = capsule_type_int; - data = reinterpret_cast(Value); -}; - -REAL Capsule::GetFlo( void ) -{ - if (type != capsule_type_flo) ThrowTypeError(capsule_type_flo); - - return *reinterpret_cast(data); -} - -void Capsule::SetFlo(REAL Value) -{ - CheckEmpty(true); - type = capsule_type_flo; - data = new REAL(Value); -}; - -const JudyVec* Capsule::GetVec( void ) -{ - if (type != capsule_type_vec) ThrowTypeError(capsule_type_vec); - - return reinterpret_cast(data); -} - -void Capsule::SetVec(JudyVec* Value) -{ - CheckEmpty(true); - type = capsule_type_vec; - data = reinterpret_cast(Value); -} - -const char* Capsule::GetStr( void ) -{ - if (type != capsule_type_str) ThrowTypeError(capsule_type_str); - - return reinterpret_cast(data); -} - -void Capsule::SetStr(char* Value) -{ - CheckEmpty(true); - type = capsule_type_str; - - char *string_val = new char[strlen(Value)+1]; - strcpy(string_val,Value); - - data = reinterpret_cast(string_val); -} - -void Capsule::GetAsStr(char* value) -{ - switch (type) - { - case capsule_type_bool: - sprintf(value, "%i",(cell)GetBool()); - break; - case capsule_type_int: - sprintf(value, "%d", GetInt() ); - break; - case capsule_type_flo: - sprintf(value, "%f", GetFlo() ); - break; - case capsule_type_vec: - sprintf(value, "{%f,%f,%f}", GetVec()->first, GetVec()->second, GetVec()->third); - break; - case capsule_type_str: - sprintf(value, "\"%s\"", GetStr() ); - break; - default: - sprintf(value, "-NO VALUE-"); - } -} - -void Capsule::Save(FILE* capsuleDB) -{ - fwrite(&type,sizeof(char),1,capsuleDB); - - switch(type) - { - case capsule_type_none: { break; } - case capsule_type_bool: { bool var = GetBool(); fwrite(&var, sizeof(bool), 1, capsuleDB); break; } - case capsule_type_int: { cell var = GetInt(); fwrite(&var, sizeof(cell), 1, capsuleDB); break; } - case capsule_type_flo: { fwrite(reinterpret_cast(GetData()), sizeof(REAL), 1, capsuleDB); break; } - case capsule_type_str: - { - const char* str = GetStr(); - size_t len = strlen(str); - fwrite(&len,sizeof(size_t), 1, capsuleDB); - fwrite(&str, sizeof(char), len, capsuleDB); - - break; - } - case capsule_type_vec: - { - const JudyVec* buffer = GetVec(); - fwrite(buffer, sizeof(JudyVec), 1, capsuleDB); - - break; - } - default: - { - char value[20]; - sprintf(value,"Invalid type found!"); - - throw JudyEx(value, true); - break; - } - }; -} - -void Capsule::Load(FILE* capsuleDB) -{ - fread(&type, sizeof(char), 1, capsuleDB); - - switch(type) - { - case capsule_type_none: { CheckEmpty(true); break; } - case capsule_type_bool: - { - bool value = false; - fread(&value, sizeof(bool), 1, capsuleDB); - SetBool(value); - - break; - } - case capsule_type_int: - { - cell value = NULL; - fread(&value, sizeof(cell), 1, capsuleDB); - SetInt(value); - - break; - } - case capsule_type_flo: - { - REAL value = NULL; - fread(&value, sizeof(REAL), 1, capsuleDB); - SetFlo(value); - - break; - } - case capsule_type_str: - { - size_t length; - fread(&length, sizeof(size_t), 1, capsuleDB); - - char* value = new char[length+1]; - fgets(value, length+1, capsuleDB); - - SetStr(value); - delete(value); - - break; - } - case capsule_type_vec: - { - JudyVec* value = new JudyVec(NULL,NULL,NULL); - fread(value, sizeof(JudyVec), 1, capsuleDB); - - SetVec(value); - - break; - } - default: - { - char value[20]; - sprintf(value,"Invalid type found: %i",(int)type); - - throw JudyEx(value, true); - } - }; -} \ No newline at end of file diff --git a/dlls/arrayx/SDK/Capsule.h b/dlls/arrayx/SDK/Capsule.h deleted file mode 100644 index 9241ab9b..00000000 --- a/dlls/arrayx/SDK/Capsule.h +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef _JUDYCAP_INCLUDED -#define _JUDYCAP_INCLUDED - -#include "JudyIncludes.h" - -enum -{ - capsule_type_none, - capsule_type_bool, - capsule_type_int, - capsule_type_flo, - capsule_type_vec, - capsule_type_str -}; - -extern const char* capsule_types[]; - -class Capsule -{ -private: - Pvoid_t data; - char type; - -protected: - void Clear( void ); - void ThrowTypeError(cell get_type); - -public: - Capsule() { data = NULL; type = capsule_type_none;} - ~Capsule() { Clear(); } - - Capsule(bool set) { SetBool(set); } - Capsule(cell set) { SetInt(set); } - Capsule(REAL set) { SetFlo(set); } - Capsule(JudyVec* set) { SetVec(set); } - Capsule(char* set) { SetStr(set); } - - bool GetBool( void ); - void SetBool(bool set); - - cell GetInt( void ); - void SetInt(cell set); - - REAL GetFlo( void ); - void SetFlo(REAL set); - - const JudyVec* GetVec( void ); - void SetVec(JudyVec* set); - - const char* GetStr( void ); - void SetStr(char* set); - - void GetAsStr(char* value); - - void Load(FILE* db); - void Save(FILE* db); - - bool CheckEmpty(bool clear); - - Pvoid_t GetData( void ) { return data; } - char GetType( void ) { return type; } -}; - -#endif \ No newline at end of file diff --git a/dlls/arrayx/SDK/GenericNatives.h b/dlls/arrayx/SDK/GenericNatives.h deleted file mode 100644 index afc1685b..00000000 --- a/dlls/arrayx/SDK/GenericNatives.h +++ /dev/null @@ -1,845 +0,0 @@ -#ifndef _GENERIC_INC_H -#define _GENERIC_INC_H - -// Master table -ComboArray MNAME; - -///* MASTER FUNCTIONS */// - -///* Start Master Edit Funcs */// -#ifdef JUDY_MASTER_EDIT_FUNCTIONS - - #ifdef JUDY_MASTER_DELETE_FUNC - - // generic_delete(id) - static cell AMX_NATIVE_CALL JUDY_MASTER_DELETE_FUNC(AMX *amx,cell *params) - { - try { return MNAME.Delete( params[1] ); } - JUDY_ERROR_CATCH("Judy Error: (No error possible) - Delete function "); - } - - #else - - #error Must Have Delete func: JUDY_MASTER_DELETE_FUNC not defined! - - #endif - - #ifdef JUDY_MASTER_CLEAR_FUNC - - // generic_clear(id) - static cell AMX_NATIVE_CALL JUDY_MASTER_CLEAR_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - JUDY_GET_INDEX(MNAME,Unit, params[1] ); - - try { return Unit->Clear(); } - JUDY_ERROR_CATCH("Judy Error: (Search error likely) - Clear function "); - } - - #else - - #error Must Have Clear func: JUDY_MASTER_CLEAR_FUNC not defined! - - #endif - -///* End Master Edit Funcs */// -#endif - -///* Start Master IO Funcs */// -#ifdef JUDY_MASTER_IO_FUNCTIONS - - #ifdef JUDY_MASTER_SAVE_FUNC - - // generic_save(id,file[]) - static cell AMX_NATIVE_CALL JUDY_MASTER_SAVE_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - JUDY_GET_INDEX(MNAME,Unit, params[1]); - - return JUDY_SAVE_FUNC(Unit, JUDY_BUILD_PATH(amx,params[2]) ); - } - - #else - - #error Must Have Save func: JUDY_MASTER_SAVE_FUNC not defined properly! - - #endif - - #ifdef JUDY_MASTER_LOAD_FUNC - - // generic_load(file[],id) - static cell AMX_NATIVE_CALL JUDY_MASTER_LOAD_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - JUDY_GET_INDEX(MNAME,Unit, params[2]); - - return JUDY_LOAD_FUNC(Unit, JUDY_BUILD_PATH(amx,params[1]) ); - } - - #else - - #error Must Have Load func: JUDY_MASTER_LOAD_FUNC not defined! - - #endif - -///* End Master IO Funcs */// -#endif - -///* Start Master Amount Funcs */// -#ifdef JUDY_MASTER_AMOUNT_FUNCTIONS - - #ifdef JUDY_MASTER_COUNT_FUNC - - // generic_count(start = 0, stop = -1) - static cell AMX_NATIVE_CALL JUDY_MASTER_COUNT_FUNC(AMX *amx,cell *params) - { - try { return MNAME.Count(params[1],params[2] ); } - JUDY_ERROR_CATCH("Judy Error: (Search error likely) - Count Function "); - } - - #else - - #error Must Have Count func: JUDY_MASTER_COUNT_FUNC not defined! - - #endif - - #ifdef JUDY_MASTER_BYCOUNT_FUNC - - // generic_bycount(nth, start = -1) - static cell AMX_NATIVE_CALL JUDY_MASTER_BYCOUNT_FUNC(AMX *amx,cell *params) - { - try { return MNAME.ByCount(params[1],params[2] ); } - JUDY_ERROR_CATCH("Judy Error: (Search error likely) - ByCount Function "); - } - - #else - - #error Must Have ByCount func: JUDY_MASTER_BYCOUNT_FUNC not defined! - - #endif - -///* End Master Amount Funcs */// -#endif - -///* SLAVE FUNCTIONS */// - -///* Start Slave Amount Funcs */// -#ifdef JUDY_SLAVE_AMOUNT_FUNCTIONS - - #ifdef JUDY_SLAVE_COUNT_FUNC - - // generic_size(id, start = 0, stop = -1) - static cell AMX_NATIVE_CALL JUDY_SLAVE_COUNT_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - JUDY_GET_INDEX(MNAME,Unit, params[1]); - - try { return Unit->Count(JUDY_GET_KEY(params,2),JUDY_GET_KEY(params, 3) ); } - JUDY_ERROR_CATCH("Judy Error: (Search error likely) - Slave Count Function "); - } - - #else - - #error Must Have Count func: JUDY_SLAVE_COUNT_FUNC not defined! - - #endif - - #ifdef JUDY_SLAVE_BYCOUNT_FUNC - - // generic_get_nth(id, nth, start = -1) - static cell AMX_NATIVE_CALL JUDY_SLAVE_BYCOUNT_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - JUDY_GET_INDEX(MNAME,Unit, params[1]); - - try { return Unit->ByCount(JUDY_GET_KEY(params,2),JUDY_GET_KEY(params, 3) ); } - JUDY_ERROR_CATCH("Judy Error: (Search error likely) - Slave ByCount Function "); - } - - #else - - #error Must Have ByCount func: JUDY_SLAVE_BYCOUNT_FUNC not defined! - - #endif - -///* End Slave Amount Funcs */// -#endif - -///* Start Slave Edit Funcs */// -#ifdef JUDY_SLAVE_EDIT_FUNCTIONS - - #ifdef JUDY_SLAVE_MEMORY_FUNC - - // generic_memory(id) - static cell AMX_NATIVE_CALL JUDY_SLAVE_MEMORY_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - JUDY_GET_INDEX(MNAME,Unit, params[1]); - - try { return Unit->MemoryUsed(); } - JUDY_ERROR_CATCH("Judy Error: (Search error likely) - Slave ByCount Function "); - } - - #else - - #error Must Have Memory func: JUDY_SLAVE_MEMORY_FUNC not defined! - - #endif - - #ifdef JUDY_SLAVE_ISFILLED_FUNC - - // generic_isfilled(id, index) - static cell AMX_NATIVE_CALL JUDY_SLAVE_ISFILLED_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - JUDY_GET_INDEX(MNAME,Unit, params[1]); - - try { return Unit->IsFilled(JUDY_GET_KEY(params,2) ); } - JUDY_ERROR_CATCH("Judy Error: (No error possible) - Slave IsFilled Function "); - } - - #else - - #error Must Have IsFilled func: JUDY_SLAVE_ISFILLED_FUNC not defined! - - #endif - - #ifdef JUDY_SLAVE_ISEMPTY_FUNC - - // generic_isempty(id, index) - static cell AMX_NATIVE_CALL JUDY_SLAVE_ISEMPTY_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - JUDY_GET_INDEX(MNAME,Unit, params[1]); - - try { return Unit->IsEmpty(JUDY_GET_KEY(params,2) ); } - JUDY_ERROR_CATCH("Judy Error: (No error possible) - Slave IsEmpty Function "); - } - - #else - - #error Must Have IsEmpty func: JUDY_SLAVE_ISEMPTY_FUNC not defined! - - #endif - - #ifdef JUDY_SLAVE_REMOVE_FUNC - - // generic_remove(id, index) - static cell AMX_NATIVE_CALL JUDY_SLAVE_REMOVE_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - JUDY_GET_INDEX(MNAME,Unit, params[1]); - - try { return Unit->Delete(JUDY_GET_KEY(params,2) ); } - JUDY_ERROR_CATCH("Judy Error: (No error possible) - Slave Delete Function "); - } - - #else - - #error Must Have Delete func: JUDY_SLAVE_DELETE_FUNC not defined! - - #endif -///* End Required Slave Edit Funcs */// - -///* Start Slave Bool Funcs */// -#ifdef JUDY_SLAVE_EDIT_BOOL - - #ifdef JUDY_SLAVE_SET_BOOL_FUNC - // generic_set_bool(id, index, Bool:val) - static cell AMX_NATIVE_CALL JUDY_SLAVE_SET_BOOL_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - STYPE* Storage; - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - bool Value = (params[3] != NULL); - - Storage = reinterpret_cast( Unit->Get(Indice, true ) ); - - if(Storage == NULL) Storage = new STYPE(Value); - else Storage->SetBool(Value); - - JUDY_SET_INDEX_P(Unit,Storage,Indice); - } - - #else - - #error Must Have Set func: JUDY_SLAVE_SET_BOOL_FUNC not defined! - - #endif - - #ifdef JUDY_SLAVE_GET_BOOL_FUNC - - // Bool:generic_get_bool(id, index, disable_check = 0) - static cell AMX_NATIVE_CALL JUDY_SLAVE_GET_BOOL_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - STYPE* Storage; - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - bool disable_check = (params[3] != NULL); - - try { Storage = reinterpret_cast( Unit->Get(Indice, disable_check ) ); } - JUDY_ERROR_CATCH("Judy Error: (Retrieve unset value) - Slave Get Function "); - - if(Storage == NULL) return 0; - - return Storage->GetBool(); - } - - #else - - #error Must Have Get func: JUDY_SLAVE_GET_BOOL_FUNC not defined! - - #endif - -///* End Slave Bool Funcs */// -#endif - -///* Start Slave Int Funcs */// -#ifdef JUDY_SLAVE_EDIT_INT - - #ifdef JUDY_SLAVE_SET_INT_FUNC - - // generic_set_bool(id, index, val) - static cell AMX_NATIVE_CALL JUDY_SLAVE_SET_INT_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - STYPE* Storage; - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - cell Value = params[3]; - - Storage = reinterpret_cast( Unit->Get(Indice, true ) ); - - if(Storage == NULL) Storage = new STYPE(Value); - else Storage->SetInt(Value); - - JUDY_SET_INDEX_P(Unit,Storage,Indice); - } - - #else - - #error Must Have Set func: JUDY_SLAVE_SET_INT_FUNC not defined! - - #endif - - #ifdef JUDY_SLAVE_GET_INT_FUNC - - // generic_get_int(id, index, disable_check = 0) - static cell AMX_NATIVE_CALL JUDY_SLAVE_GET_INT_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - STYPE* Storage; - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - bool disable_check = (params[3] != NULL); - - try { Storage = reinterpret_cast( Unit->Get(Indice, disable_check ) ); } - JUDY_ERROR_CATCH("Judy Error: (Retrieve unset value) - Slave Get Function "); - - if(Storage == NULL) return 0; - - return Storage->GetInt(); - } - - #else - - #error Must Have Get func: JUDY_SLAVE_GET_INT_FUNC not defined! - - #endif - -///* End Slave Int Funcs */// -#endif - -///* Start Slave Float Funcs */// -#ifdef JUDY_SLAVE_EDIT_FLO - - #ifdef JUDY_SLAVE_SET_FLO_FUNC - - // generic_set_float(id, index, Float:val) - static cell AMX_NATIVE_CALL JUDY_SLAVE_SET_FLO_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - STYPE* Storage; - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - REAL Value = amx_ctof(params[3]); - - Storage = reinterpret_cast( Unit->Get(Indice, true ) ); - - if(Storage == NULL) Storage = new STYPE(Value); - else Storage->SetFlo(Value); - - JUDY_SET_INDEX_P(Unit,Storage,Indice); - } - - #else - - #error Must Have Set func: JUDY_SLAVE_SET_FLO_FUNC not defined! - - #endif - - #ifdef JUDY_SLAVE_GET_FLO_FUNC - - // Float:generic_get_float(id, index, disable_check = 0) - static cell AMX_NATIVE_CALL JUDY_SLAVE_GET_FLO_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - STYPE* Storage; - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - bool disable_check = (params[3] != NULL); - - try { Storage = reinterpret_cast( Unit->Get(Indice, disable_check ) ); } - JUDY_ERROR_CATCH("Judy Error: (Retrieve unset value) - Slave Get Function "); - - if(Storage == NULL) return 0; - - return amx_ftoc(Storage->GetFlo() ); - } - - #else - - #error Must Have Get func: JUDY_SLAVE_GET_FLO_FUNC not defined! - - #endif - -///* End Slave Float Funcs */// -#endif - -///* Start Slave String Funcs */// -#ifdef JUDY_SLAVE_EDIT_STR - - #ifdef JUDY_SLAVE_SET_STR_FUNC - - // generic_set_string(id, index, val[]) - static cell AMX_NATIVE_CALL JUDY_SLAVE_SET_STR_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - STYPE* Storage; - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - char* Value = MF_GetAmxString(amx,params[3],3,NULL); - - Storage = reinterpret_cast( Unit->Get(Indice, true ) ); - - if(Storage == NULL) Storage = new STYPE(Value); - else Storage->SetStr(Value); - - JUDY_SET_INDEX_P(Unit,Storage,Indice); - } - - #else - - #error Must Have Set func: JUDY_SLAVE_SET_STR_FUNC not defined! - - #endif - - #ifdef JUDY_SLAVE_GET_STR_FUNC - - // generic_get_string(id, index, val[], len, disable_check = 0) - static cell AMX_NATIVE_CALL JUDY_SLAVE_GET_STR_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - STYPE* Storage; - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - bool disable_check = (params[5] != NULL); - - try { Storage = reinterpret_cast( Unit->Get(Indice, disable_check ) ); } - JUDY_ERROR_CATCH("Judy Error: (Retrieve unset value) - Slave Get Function "); - - if(Storage == NULL) return 0; - - return MF_SetAmxString(amx,params[3], Storage->GetStr(), params[4] ); - } - - #else - - #error Must Have Get func: JUDY_SLAVE_GET_STR_FUNC not defined! - - #endif - -///* End Slave String Funcs */// -#endif - -///* Start Slave Vector Funcs */// -#ifdef JUDY_SLAVE_EDIT_VEC - - #ifdef JUDY_SLAVE_SET_VEC_FUNC - - // generic_set_vec(id, index, Float:val[3]) - static cell AMX_NATIVE_CALL JUDY_SLAVE_SET_VEC_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - STYPE* Storage; - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - - cell *input_vec = MF_GetAmxAddr(amx, params[3]); - JudyVec *Value = new JudyVec( - amx_ctof(input_vec[0]), - amx_ctof(input_vec[1]), - amx_ctof(input_vec[2]) - ); - - Storage = reinterpret_cast( Unit->Get(Indice, true ) ); - - if(Storage == NULL) Storage = new STYPE(Value); - else Storage->SetVec(Value); - - JUDY_SET_INDEX_P(Unit,Storage,Indice); - } - - #else - - #error Must Have Set func: JUDY_SLAVE_SET_VEC_FUNC not defined! - - #endif - - #ifdef JUDY_SLAVE_GET_FLO_FUNC - - // generic_get_vec(id,index,Float:vec[3], disable_check = 0) - static cell AMX_NATIVE_CALL JUDY_SLAVE_GET_VEC_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - STYPE* Storage; - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - cell *vAmx = MF_GetAmxAddr(amx, params[3]); - bool disable_check = (params[4] != NULL); - - try { Storage = reinterpret_cast( Unit->Get(Indice, disable_check ) ); } - JUDY_ERROR_CATCH("Judy Error: (Retrieve unset value) - Slave Get Function "); - - if(Storage == NULL) - { - vAmx[0] = amx_ftoc(0); - vAmx[1] = amx_ftoc(0); - vAmx[2] = amx_ftoc(0); - return 0; - } - - JudyVec* Vec = const_cast( Storage->GetVec() ); - - REAL One, Two, Three; - Vec->Get(One, Two, Three); - - vAmx[0] = amx_ftoc(One); - vAmx[1] = amx_ftoc(Two); - vAmx[2] = amx_ftoc(Three); - - return 1; - } - - #else - - #error Must Have Get func: JUDY_SLAVE_GET_VEC_FUNC not defined! - - #endif - -///* End Slave VEC Funcs */// -#endif - -///* End Slave Edit Funcs */// -#endif - -///* Start Slave Search Funcs -#ifdef JUDY_SLAVE_SEARCH_FUNCTIONS - - #ifdef JUDY_SLAVE_FIRST_FUNC - // generic_first(id, index,...) - static cell AMX_NATIVE_CALL JUDY_SLAVE_FIRST_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - cell* success = MF_GetAmxAddr(amx, params[3 + SE_OFFSET]); - - *success = 1; - try { return JUDY_SET_KEY(Unit->First(Indice),3); } - JUDY_SEARCH_ERROR_CATCH("Judy Error (Search failed) - Slave Search Function", *success); - } - - #else - - #error Must Have Search func: JUDY_SLAVE_FIRST_FUNC not defined! - - #endif - - #ifdef JUDY_SLAVE_NEXT_FUNC - // generic_next(id, index,...) - static cell AMX_NATIVE_CALL JUDY_SLAVE_NEXT_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - cell* success = MF_GetAmxAddr(amx, params[3 + SE_OFFSET]); - - *success = 1; - try { return JUDY_SET_KEY(Unit->Next(Indice),3); } - JUDY_SEARCH_ERROR_CATCH("Judy Error (Search failed) - Slave Search Function", *success); - } - - #else - - #error Must Have Search func: JUDY_SLAVE_NEXT_FUNC not defined! - - #endif - - #ifdef JUDY_SLAVE_PREV_FUNC - // generic_prev(id, index,...) - static cell AMX_NATIVE_CALL JUDY_SLAVE_PREV_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - cell* success = MF_GetAmxAddr(amx, params[3 + SE_OFFSET]); - - *success = 1; - try { return JUDY_SET_KEY(Unit->Prev(Indice),3); } - JUDY_SEARCH_ERROR_CATCH("Judy Error (Search failed) - Slave Search Function", *success); - } - - #else - - #error Must Have Search func: JUDY_SLAVE_PREV_FUNC not defined! - - #endif - - #ifdef JUDY_SLAVE_LAST_FUNC - // generic_first(id, index,...) - static cell AMX_NATIVE_CALL JUDY_SLAVE_LAST_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - cell* success = MF_GetAmxAddr(amx, params[3 + SE_OFFSET]); - - *success = 1; - try { return JUDY_SET_KEY(Unit->Last(Indice),3); } - JUDY_SEARCH_ERROR_CATCH("Judy Error (Search failed) - Slave Search Function", *success); - } - - #else - - #error Must Have Search func: JUDY_SLAVE_LAST_FUNC not defined! - - #endif - -///* End Slave Search Funcs */// -#endif - - -///* Start Slave Empty Search Funcs -#ifdef JUDY_SLAVE_SEARCH_EMPTY_FUNCTIONS - - #ifdef JUDY_SLAVE_FIRSTEMPTY_FUNC - // generic_firstempty(id, index,...) - static cell AMX_NATIVE_CALL JUDY_SLAVE_FIRSTEMPTY_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - cell* success = MF_GetAmxAddr(amx, params[3 + SE_OFFSET]); - - *success = 1; - try { return JUDY_SET_KEY(Unit->FirstEmpty(Indice),3); } - JUDY_SEARCH_ERROR_CATCH("Judy Error (Search failed) - Slave Search Function", *success); - } - - #else - - #error Must Have Search func: JUDY_SLAVE_FIRSTEMPTY_FUNC not defined! - - #endif - - #ifdef JUDY_SLAVE_NEXTEMPTY_FUNC - // generic_next(id, index,...) - static cell AMX_NATIVE_CALL JUDY_SLAVE_NEXTEMPTY_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - cell* success = MF_GetAmxAddr(amx, params[3 + SE_OFFSET]); - - *success = 1; - try { return JUDY_SET_KEY(Unit->NextEmpty(Indice),3); } - JUDY_SEARCH_ERROR_CATCH("Judy Error (Search failed) - Slave Search Function", *success); - } - - #else - - #error Must Have Search func: JUDY_SLAVE_NEXTEMPTY_FUNC not defined! - - #endif - - #ifdef JUDY_SLAVE_PREVEMPTY_FUNC - // generic_prev(id, index,...) - static cell AMX_NATIVE_CALL JUDY_SLAVE_PREVEMPTY_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - cell* success = MF_GetAmxAddr(amx, params[3 + SE_OFFSET]); - - *success = 1; - try { return JUDY_SET_KEY(Unit->PrevEmpty(Indice),3); } - JUDY_SEARCH_ERROR_CATCH("Judy Error (Search failed) - Slave Search Function", *success); - } - - #else - - #error Must Have Search func: JUDY_SLAVE_PREVEMPTY_FUNC not defined! - - #endif - - #ifdef JUDY_SLAVE_LASTEMPTY_FUNC - // generic_first(id, index,...) - static cell AMX_NATIVE_CALL JUDY_SLAVE_LASTEMPTY_FUNC(AMX *amx,cell *params) - { - DTYPE* Unit = NULL; - - - JUDY_GET_INDEX(MNAME,Unit, params[1]); - ITYPE Indice = JUDY_GET_KEY(params,2); - cell* success = MF_GetAmxAddr(amx, params[3 + SE_OFFSET]); - - *success = 1; - try { return JUDY_SET_KEY(Unit->LastEmpty(Indice),3); } - JUDY_SEARCH_ERROR_CATCH("Judy Error (Search failed) - Slave Search Function",*success); - } - - #else - - #error Must Have Search func: JUDY_SLAVE_LASTEMPTY_FUNC not defined! - - #endif - -///* End Slave Search Empty Funcs */// -#endif - -AMX_NATIVE_INFO EXPORT_NAME[] = -{ - -#ifdef JUDY_MASTER_EDIT_FUNCTIONS - - { JUDY_MASTER_CLEAR_STR , JUDY_MASTER_CLEAR_FUNC }, - { JUDY_MASTER_DELETE_STR , JUDY_MASTER_DELETE_FUNC }, - -#endif - -#ifdef JUDY_MASTER_IO_FUNCTIONS - - { JUDY_MASTER_SAVE_STR , JUDY_MASTER_SAVE_FUNC }, - { JUDY_MASTER_LOAD_STR , JUDY_MASTER_LOAD_FUNC }, - -#endif - -#ifdef JUDY_MASTER_AMOUNT_FUNCTIONS - - { JUDY_MASTER_COUNT_STR , JUDY_MASTER_COUNT_FUNC }, - { JUDY_MASTER_BYCOUNT_STR , JUDY_MASTER_BYCOUNT_FUNC }, - -#endif - -#ifdef JUDY_SLAVE_AMOUNT_FUNCTIONS - - { JUDY_SLAVE_COUNT_STR , JUDY_SLAVE_COUNT_FUNC }, - { JUDY_SLAVE_BYCOUNT_STR , JUDY_SLAVE_BYCOUNT_FUNC }, - -#endif - -#ifdef JUDY_SLAVE_EDIT_FUNCTIONS - - { JUDY_SLAVE_MEMORY_STR , JUDY_SLAVE_MEMORY_FUNC }, - { JUDY_SLAVE_ISFILLED_STR , JUDY_SLAVE_ISFILLED_FUNC }, - { JUDY_SLAVE_ISEMPTY_STR , JUDY_SLAVE_ISEMPTY_FUNC }, - { JUDY_SLAVE_REMOVE_STR , JUDY_SLAVE_REMOVE_FUNC }, - -#ifdef JUDY_SLAVE_EDIT_BOOL - - { JUDY_SLAVE_GET_BOOL_STR , JUDY_SLAVE_GET_BOOL_FUNC }, - { JUDY_SLAVE_SET_BOOL_STR , JUDY_SLAVE_SET_BOOL_FUNC }, - -#endif - -#ifdef JUDY_SLAVE_EDIT_INT - - { JUDY_SLAVE_GET_INT_STR , JUDY_SLAVE_GET_INT_FUNC }, - { JUDY_SLAVE_SET_INT_STR , JUDY_SLAVE_SET_INT_FUNC }, - -#endif - -#ifdef JUDY_SLAVE_EDIT_FLO - - { JUDY_SLAVE_GET_FLO_STR , JUDY_SLAVE_GET_FLO_FUNC }, - { JUDY_SLAVE_SET_FLO_STR , JUDY_SLAVE_SET_FLO_FUNC }, - -#endif - -#ifdef JUDY_SLAVE_EDIT_STR - - { JUDY_SLAVE_GET_STR_STR , JUDY_SLAVE_GET_STR_FUNC }, - { JUDY_SLAVE_SET_STR_STR , JUDY_SLAVE_SET_STR_FUNC }, - -#endif - -#ifdef JUDY_SLAVE_EDIT_VEC - - { JUDY_SLAVE_GET_VEC_STR , JUDY_SLAVE_GET_VEC_FUNC }, - { JUDY_SLAVE_SET_VEC_STR , JUDY_SLAVE_SET_VEC_FUNC }, - -#endif - -// End all edit functions -#endif - -#ifdef JUDY_SLAVE_SEARCH_FUNCTIONS - - { JUDY_SLAVE_FIRST_STR , JUDY_SLAVE_FIRST_FUNC }, - { JUDY_SLAVE_LAST_STR , JUDY_SLAVE_LAST_FUNC }, - - { JUDY_SLAVE_NEXT_STR , JUDY_SLAVE_NEXT_FUNC }, - { JUDY_SLAVE_PREV_STR , JUDY_SLAVE_PREV_FUNC }, - -#endif - -#ifdef JUDY_SLAVE_SEARCH_EMPTY_FUNCTIONS - - { JUDY_SLAVE_FIRSTEMPTY_STR , JUDY_SLAVE_FIRSTEMPTY_FUNC }, - { JUDY_SLAVE_LASTEMPTY_STR , JUDY_SLAVE_LASTEMPTY_FUNC }, - - { JUDY_SLAVE_NEXTEMPTY_STR , JUDY_SLAVE_NEXTEMPTY_FUNC }, - { JUDY_SLAVE_PREVEMPTY_STR , JUDY_SLAVE_PREVEMPTY_FUNC }, - -#endif - - { NULL, NULL } -}; - -#endif \ No newline at end of file diff --git a/dlls/arrayx/SDK/NativeFunctions.h b/dlls/arrayx/SDK/NativeFunctions.h deleted file mode 100644 index 9dcce6dc..00000000 --- a/dlls/arrayx/SDK/NativeFunctions.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef _NATIVE_FUNC_INC_H -#define _NATIVE_FUNC_INC_H - -#define JUDY_GLUE_FUNC( x , y ) x ## y - -#define JUDY_MASTER_FUNCTIONS -#define JUDY_MASTER_CREATE_FUNC JUDY_GLUE_FUNC( array , _create ) -#define JUDY_MASTER_CLEAR_FUNC JUDY_GLUE_FUNC( array , _clear ) -#define JUDY_MASTER_DELETE_FUNC JUDY_GLUE_FUNC( array , _delete ) - -#define JUDY_MASTER_IO_FUNCTIONS -#define JUDY_MASTER_SAVE_FUNC JUDY_GLUE_FUNC( array , _save ) -#define JUDY_MASTER_LOAD_FUNC JUDY_GLUE_FUNC( array , _load ) - -#define JUDY_MASTER_AMOUNT_FUNCTIONS -#define JUDY_MASTER_COUNT_FUNC JUDY_GLUE_FUNC( array , _count ) -#define JUDY_MASTER_BYCOUNT_FUNC JUDY_GLUE_FUNC( array , _bycount ) -#define JUDY_MASTER_MEMORY_FUNC JUDY_GLUE_FUNC( array , _memory ) - -#define JUDY_SLAVE_AMOUNT_FUNCTIONS -#define JUDY_SLAVE_COUNT_FUNC JUDY_GLUE_FUNC( array , _size ) -#define JUDY_SLAVE_BYCOUNT_FUNC JUDY_GLUE_FUNC( array , _get_nth ) - -#define JUDY_SLAVE_EDIT_FUNCTIONS -#define JUDY_SLAVE_GET_BOOL_FUNC JUDY_GLUE_FUNC( array , _get_bool ) -#define JUDY_SLAVE_SET_BOOL_FUNC JUDY_GLUE_FUNC( array , _set_bool ) - -#define JUDY_SLAVE_GET_INT_FUNC JUDY_GLUE_FUNC( array , _get_int ) -#define JUDY_SLAVE_SET_INT_FUNC JUDY_GLUE_FUNC( array , _set_int ) - -#define JUDY_SLAVE_GET_FLO_FUNC JUDY_GLUE_FUNC( array , _get_float ) -#define JUDY_SLAVE_SET_FLO_FUNC JUDY_GLUE_FUNC( array , _set_float ) - -#define JUDY_SLAVE_GET_STR_FUNC JUDY_GLUE_FUNC( array , _get_string ) -#define JUDY_SLAVE_SET_STR_FUNC JUDY_GLUE_FUNC( array , _set_string ) - -#define JUDY_SLAVE_GET_VEC_FUNC JUDY_GLUE_FUNC( array , _get_vector ) -#define JUDY_SLAVE_SET_VEC_FUNC JUDY_GLUE_FUNC( array , _set_vector ) - -#define JUDY_SLAVE_ISFILLED_FUNC JUDY_GLUE_FUNC( array , _isfilled ) -#define JUDY_SLAVE_ISEMPTY_FUNC JUDY_GLUE_FUNC( array , _isempty ) - -#define JUDY_SLAVE_REMOVE_FUNC JUDY_GLUE_FUNC( array , _remove ) - -#define JUDY_SLAVE_SEARCH_FUNCTIONS -#define JUDY_SLAVE_GET_FIRST_FUNC JUDY_GLUE_FUNC( array , _first ) -#define JUDY_SLAVE_SET_LAST_FUNC JUDY_GLUE_FUNC( array , _last ) - -#define JUDY_SLAVE_GET_NEXT_FUNC JUDY_GLUE_FUNC( array , _next ) -#define JUDY_SLAVE_SET_PREV_FUNC JUDY_GLUE_FUNC( array , _prev ) - -#define JUDY_SLAVE_SEARCH_EMPTY_FUNCTIONS -#define JUDY_SLAVE_GET_FIRSTEMPTY_FUNC JUDY_GLUE_FUNC( array , _firstempty ) -#define JUDY_SLAVE_SET_LASTEMPTY_FUNC JUDY_GLUE_FUNC( array , _lastempty ) - -#define JUDY_SLAVE_GET_NEXTEMPTY_FUNC JUDY_GLUE_FUNC( array , _nextempty ) -#define JUDY_SLAVE_SET_PREVEMPTY_FUNC JUDY_GLUE_FUNC( array , _prevempty ) -#endif \ No newline at end of file diff --git a/dlls/arrayx/amxxmodule.cpp b/dlls/arrayx/amxxmodule.cpp deleted file mode 100644 index 1441e450..00000000 --- a/dlls/arrayx/amxxmodule.cpp +++ /dev/null @@ -1,3090 +0,0 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* Parts Copyright (C) 2001-2003 Will Day -* -* This program is free software; you can redistribute it and/or modify it -* under the terms of the GNU General Public License as published by the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -* -* Description: AMX Mod X Module Interface Functions -*/ - -#include -#include -#include -#include -#include -#include "amxxmodule.h" - -/************* METAMOD SUPPORT *************/ -#ifdef USE_METAMOD - -enginefuncs_t g_engfuncs; -globalvars_t *gpGlobals; - -DLL_FUNCTIONS *g_pFunctionTable; -DLL_FUNCTIONS *g_pFunctionTable_Post; -enginefuncs_t *g_pengfuncsTable; -enginefuncs_t *g_pengfuncsTable_Post; -NEW_DLL_FUNCTIONS *g_pNewFunctionsTable; -NEW_DLL_FUNCTIONS *g_pNewFunctionsTable_Post; - -// GetEntityAPI2 functions -static DLL_FUNCTIONS g_EntityAPI_Table = -{ -#ifdef FN_GameDLLInit - FN_GameDLLInit, -#else - NULL, -#endif -#ifdef FN_DispatchSpawn - FN_DispatchSpawn, -#else - NULL, -#endif -#ifdef FN_DispatchThink - FN_DispatchThink, -#else - NULL, -#endif -#ifdef FN_DispatchUse - FN_DispatchUse, -#else - NULL, -#endif -#ifdef FN_DispatchTouch - FN_DispatchTouch, -#else - NULL, -#endif -#ifdef FN_DispatchBlocked - FN_DispatchBlocked, -#else - NULL, -#endif -#ifdef FN_DispatchKeyValue - FN_DispatchKeyValue, -#else - NULL, -#endif -#ifdef FN_DispatchSave - FN_DispatchSave, -#else - NULL, -#endif -#ifdef FN_DispatchRestore - FN_DispatchRestore, -#else - NULL, -#endif -#ifdef FN_DispatchObjectCollsionBox - FN_DispatchObjectCollsionBox, -#else - NULL, -#endif -#ifdef FN_SaveWriteFields - FN_SaveWriteFields, -#else - NULL, -#endif -#ifdef FN_SaveReadFields - FN_SaveReadFields, -#else - NULL, -#endif -#ifdef FN_SaveGlobalState - FN_SaveGlobalState, -#else - NULL, -#endif -#ifdef FN_RestoreGlobalState - FN_RestoreGlobalState, -#else - NULL, -#endif -#ifdef FN_ResetGlobalState - FN_ResetGlobalState, -#else - NULL, -#endif -#ifdef FN_ClientConnect - FN_ClientConnect, -#else - NULL, -#endif -#ifdef FN_ClientDisconnect - FN_ClientDisconnect, -#else - NULL, -#endif -#ifdef FN_ClientKill - FN_ClientKill, -#else - NULL, -#endif -#ifdef FN_ClientPutInServer - FN_ClientPutInServer, -#else - NULL, -#endif -#ifdef FN_ClientCommand - FN_ClientCommand, -#else - NULL, -#endif -#ifdef FN_ClientUserInfoChanged - FN_ClientUserInfoChanged, -#else - NULL, -#endif -#ifdef FN_ServerActivate - FN_ServerActivate, -#else - NULL, -#endif -#ifdef FN_ServerDeactivate - FN_ServerDeactivate, -#else - NULL, -#endif -#ifdef FN_PlayerPreThink - FN_PlayerPreThink, -#else - NULL, -#endif -#ifdef FN_PlayerPostThink - FN_PlayerPostThink, -#else - NULL, -#endif -#ifdef FN_StartFrame - FN_StartFrame, -#else - NULL, -#endif -#ifdef FN_ParmsNewLevel - FN_ParmsNewLevel, -#else - NULL, -#endif -#ifdef FN_ParmsChangeLevel - FN_ParmsChangeLevel, -#else - NULL, -#endif -#ifdef FN_GetGameDescription - FN_GetGameDescription, -#else - NULL, -#endif -#ifdef FN_PlayerCustomization - FN_PlayerCustomization, -#else - NULL, -#endif -#ifdef FN_SpectatorConnect - FN_SpectatorConnect, -#else - NULL, -#endif -#ifdef FN_SpectatorDisconnect - FN_SpectatorDisconnect, -#else - NULL, -#endif -#ifdef FN_SpectatorThink - FN_SpectatorThink, -#else - NULL, -#endif -#ifdef FN_Sys_Error - FN_Sys_Error, -#else - NULL, -#endif -#ifdef FN_PM_Move - FN_PM_Move, -#else - NULL, -#endif -#ifdef FN_PM_Init - FN_PM_Init, -#else - NULL, -#endif -#ifdef FN_PM_FindTextureType - FN_PM_FindTextureType, -#else - NULL, -#endif -#ifdef FN_SetupVisibility - FN_SetupVisibility, -#else - NULL, -#endif -#ifdef FN_UpdateClientData - FN_UpdateClientData, -#else - NULL, -#endif -#ifdef FN_AddToFullPack - FN_AddToFullPack, -#else - NULL, -#endif -#ifdef FN_CreateBaseline - FN_CreateBaseline, -#else - NULL, -#endif -#ifdef FN_RegisterEncoders - FN_RegisterEncoders, -#else - NULL, -#endif -#ifdef FN_GetWeaponData - FN_GetWeaponData, -#else - NULL, -#endif -#ifdef FN_CmdStart - FN_CmdStart, -#else - NULL, -#endif -#ifdef FN_CmdEnd - FN_CmdEnd, -#else - NULL, -#endif -#ifdef FN_ConnectionlessPacket - FN_ConnectionlessPacket, -#else - NULL, -#endif -#ifdef FN_GetHullBounds - FN_GetHullBounds, -#else - NULL, -#endif -#ifdef FN_CreateInstancedBaselines - FN_CreateInstancedBaselines, -#else - NULL, -#endif -#ifdef FN_InconsistentFile - FN_InconsistentFile, -#else - NULL, -#endif -#ifdef FN_AllowLagCompensation - FN_AllowLagCompensation -#else - NULL -#endif -}; // g_EntityAPI2_Table - -// GetEntityAPI2_Post functions -static DLL_FUNCTIONS g_EntityAPI_Post_Table = -{ -#ifdef FN_GameDLLInit_Post - FN_GameDLLInit_Post, -#else - NULL, -#endif -#ifdef FN_DispatchSpawn_Post - FN_DispatchSpawn_Post, -#else - NULL, -#endif -#ifdef FN_DispatchThink_Post - FN_DispatchThink_Post, -#else - NULL, -#endif -#ifdef FN_DispatchUse_Post - FN_DispatchUse_Post, -#else - NULL, -#endif -#ifdef FN_DispatchTouch_Post - FN_DispatchTouch_Post, -#else - NULL, -#endif -#ifdef FN_DispatchBlocked_Post - FN_DispatchBlocked_Post, -#else - NULL, -#endif -#ifdef FN_DispatchKeyValue_Post - FN_DispatchKeyValue_Post, -#else - NULL, -#endif -#ifdef FN_DispatchSave_Post - FN_DispatchSave_Post, -#else - NULL, -#endif -#ifdef FN_DispatchRestore_Post - FN_DispatchRestore_Post, -#else - NULL, -#endif -#ifdef FN_DispatchObjectCollsionBox_Post - FN_DispatchObjectCollsionBox_Post, -#else - NULL, -#endif -#ifdef FN_SaveWriteFields_Post - FN_SaveWriteFields_Post, -#else - NULL, -#endif -#ifdef FN_SaveReadFields_Post - FN_SaveReadFields_Post, -#else - NULL, -#endif -#ifdef FN_SaveGlobalState_Post - FN_SaveGlobalState_Post, -#else - NULL, -#endif -#ifdef FN_RestoreGlobalState_Post - FN_RestoreGlobalState_Post, -#else - NULL, -#endif -#ifdef FN_ResetGlobalState_Post - FN_ResetGlobalState_Post, -#else - NULL, -#endif -#ifdef FN_ClientConnect_Post - FN_ClientConnect_Post, -#else - NULL, -#endif -#ifdef FN_ClientDisconnect_Post - FN_ClientDisconnect_Post, -#else - NULL, -#endif -#ifdef FN_ClientKill_Post - FN_ClientKill_Post, -#else - NULL, -#endif -#ifdef FN_ClientPutInServer_Post - FN_ClientPutInServer_Post, -#else - NULL, -#endif -#ifdef FN_ClientCommand_Post - FN_ClientCommand_Post, -#else - NULL, -#endif -#ifdef FN_ClientUserInfoChanged_Post - FN_ClientUserInfoChanged_Post, -#else - NULL, -#endif -#ifdef FN_ServerActivate_Post - FN_ServerActivate_Post, -#else - NULL, -#endif -#ifdef FN_ServerDeactivate_Post - FN_ServerDeactivate_Post, -#else - NULL, -#endif -#ifdef FN_PlayerPreThink_Post - FN_PlayerPreThink_Post, -#else - NULL, -#endif -#ifdef FN_PlayerPostThink_Post - FN_PlayerPostThink_Post, -#else - NULL, -#endif -#ifdef FN_StartFrame_Post - FN_StartFrame_Post, -#else - NULL, -#endif -#ifdef FN_ParmsNewLevel_Post - FN_ParmsNewLevel_Post, -#else - NULL, -#endif -#ifdef FN_ParmsChangeLevel_Post - FN_ParmsChangeLevel_Post, -#else - NULL, -#endif -#ifdef FN_GetGameDescription_Post - FN_GetGameDescription_Post, -#else - NULL, -#endif -#ifdef FN_PlayerCustomization_Post - FN_PlayerCustomization_Post, -#else - NULL, -#endif -#ifdef FN_SpectatorConnect_Post - FN_SpectatorConnect_Post, -#else - NULL, -#endif -#ifdef FN_SpectatorDisconnect_Post - FN_SpectatorDisconnect_Post, -#else - NULL, -#endif -#ifdef FN_SpectatorThink_Post - FN_SpectatorThink_Post, -#else - NULL, -#endif -#ifdef FN_Sys_Error_Post - FN_Sys_Error_Post, -#else - NULL, -#endif -#ifdef FN_PM_Move_Post - FN_PM_Move_Post, -#else - NULL, -#endif -#ifdef FN_PM_Init_Post - FN_PM_Init_Post, -#else - NULL, -#endif -#ifdef FN_PM_FindTextureType_Post - FN_PM_FindTextureType_Post, -#else - NULL, -#endif -#ifdef FN_SetupVisibility_Post - FN_SetupVisibility_Post, -#else - NULL, -#endif -#ifdef FN_UpdateClientData_Post - FN_UpdateClientData_Post, -#else - NULL, -#endif -#ifdef FN_AddToFullPack_Post - FN_AddToFullPack_Post, -#else - NULL, -#endif -#ifdef FN_CreateBaseline_Post - FN_CreateBaseline_Post, -#else - NULL, -#endif -#ifdef FN_RegisterEncoders_Post - FN_RegisterEncoders_Post, -#else - NULL, -#endif -#ifdef FN_GetWeaponData_Post - FN_GetWeaponData_Post, -#else - NULL, -#endif -#ifdef FN_CmdStart_Post - FN_CmdStart_Post, -#else - NULL, -#endif -#ifdef FN_CmdEnd_Post - FN_CmdEnd_Post, -#else - NULL, -#endif -#ifdef FN_ConnectionlessPacket_Post - FN_ConnectionlessPacket_Post, -#else - NULL, -#endif -#ifdef FN_GetHullBounds_Post - FN_GetHullBounds_Post, -#else - NULL, -#endif -#ifdef FN_CreateInstancedBaselines_Post - FN_CreateInstancedBaselines_Post, -#else - NULL, -#endif -#ifdef FN_InconsistentFile_Post - FN_InconsistentFile_Post, -#else - NULL, -#endif -#ifdef FN_AllowLagCompensation - FN_AllowLagCompensation, -#else - NULL, -#endif -}; // g_EntityAPI2_Table - -static enginefuncs_t g_EngineFuncs_Table = -{ -#ifdef FN_PrecacheModel - FN_PrecacheModel, -#else - NULL, -#endif -#ifdef FN_PrecacheSound - FN_PrecacheSound, -#else - NULL, -#endif -#ifdef FN_SetModel - FN_SetModel, -#else - NULL, -#endif -#ifdef FN_ModelIndex - FN_ModelIndex, -#else - NULL, -#endif -#ifdef FN_ModelFrames - FN_ModelFrames, -#else - NULL, -#endif -#ifdef FN_SetSize - FN_SetSize, -#else - NULL, -#endif -#ifdef FN_ChangeLevel - FN_ChangeLevel, -#else - NULL, -#endif -#ifdef FN_GetSpawnParms - FN_GetSpawnParms, -#else - NULL, -#endif -#ifdef FN_SaveSpawnParms - FN_SaveSpawnParms, -#else - NULL, -#endif -#ifdef FN_VecToYaw - FN_VecToYaw, -#else - NULL, -#endif -#ifdef FN_VecToAngles - FN_VecToAngles, -#else - NULL, -#endif -#ifdef FN_MoveToOrigin - FN_MoveToOrigin, -#else - NULL, -#endif -#ifdef FN_ChangeYaw - FN_ChangeYaw, -#else - NULL, -#endif -#ifdef FN_ChangePitch - FN_ChangePitch, -#else - NULL, -#endif -#ifdef FN_FindEntityByString - FN_FindEntityByString, -#else - NULL, -#endif -#ifdef FN_GetEntityIllum - FN_GetEntityIllum, -#else - NULL, -#endif -#ifdef FN_FindEntityInSphere - FN_FindEntityInSphere, -#else - NULL, -#endif -#ifdef FN_FindClientInPVS - FN_FindClientInPVS, -#else - NULL, -#endif -#ifdef FN_EntitiesInPVS - FN_EntitiesInPVS, -#else - NULL, -#endif -#ifdef FN_MakeVectors - FN_MakeVectors, -#else - NULL, -#endif -#ifdef FN_AngleVectors - FN_AngleVectors, -#else - NULL, -#endif -#ifdef FN_CreateEntity - FN_CreateEntity, -#else - NULL, -#endif -#ifdef FN_RemoveEntity - FN_RemoveEntity, -#else - NULL, -#endif -#ifdef FN_CreateNamedEntity - FN_CreateNamedEntity, -#else - NULL, -#endif -#ifdef FN_MakeStatic - FN_MakeStatic, -#else - NULL, -#endif -#ifdef FN_EntIsOnFloor - FN_EntIsOnFloor, -#else - NULL, -#endif -#ifdef FN_DropToFloor - FN_DropToFloor, -#else - NULL, -#endif -#ifdef FN_WalkMove - FN_WalkMove, -#else - NULL, -#endif -#ifdef FN_SetOrigin - FN_SetOrigin, -#else - NULL, -#endif -#ifdef FN_EmitSound - FN_EmitSound, -#else - NULL, -#endif -#ifdef FN_EmitAmbientSound - FN_EmitAmbientSound, -#else - NULL, -#endif -#ifdef FN_TraceLine - FN_TraceLine, -#else - NULL, -#endif -#ifdef FN_TraceToss - FN_TraceToss, -#else - NULL, -#endif -#ifdef FN_TraceMonsterHull - FN_TraceMonsterHull, -#else - NULL, -#endif -#ifdef FN_TraceHull - FN_TraceHull, -#else - NULL, -#endif -#ifdef FN_TraceModel - FN_TraceModel, -#else - NULL, -#endif -#ifdef FN_TraceTexture - FN_TraceTexture, -#else - NULL, -#endif -#ifdef FN_TraceSphere - FN_TraceSphere, -#else - NULL, -#endif -#ifdef FN_GetAimVector - FN_GetAimVector, -#else - NULL, -#endif -#ifdef FN_ServerCommand - FN_ServerCommand, -#else - NULL, -#endif -#ifdef FN_ServerExecute - FN_ServerExecute, -#else - NULL, -#endif -#ifdef FN_engClientCommand - FN_engClientCommand, -#else - NULL, -#endif -#ifdef FN_ParticleEffect - FN_ParticleEffect, -#else - NULL, -#endif -#ifdef FN_LightStyle - FN_LightStyle, -#else - NULL, -#endif -#ifdef FN_DecalIndex - FN_DecalIndex, -#else - NULL, -#endif -#ifdef FN_PointContents - FN_PointContents, -#else - NULL, -#endif -#ifdef FN_MessageBegin - FN_MessageBegin, -#else - NULL, -#endif -#ifdef FN_MessageEnd - FN_MessageEnd, -#else - NULL, -#endif -#ifdef FN_WriteByte - FN_WriteByte, -#else - NULL, -#endif -#ifdef FN_WriteChar - FN_WriteChar, -#else - NULL, -#endif -#ifdef FN_WriteShort - FN_WriteShort, -#else - NULL, -#endif -#ifdef FN_WriteLong - FN_WriteLong, -#else - NULL, -#endif -#ifdef FN_WriteAngle - FN_WriteAngle, -#else - NULL, -#endif -#ifdef FN_WriteCoord - FN_WriteCoord, -#else - NULL, -#endif -#ifdef FN_WriteString - FN_WriteString, -#else - NULL, -#endif -#ifdef FN_WriteEntity - FN_WriteEntity, -#else - NULL, -#endif -#ifdef FN_CVarRegister - FN_CVarRegister, -#else - NULL, -#endif -#ifdef FN_CVarGetFloat - FN_CVarGetFloat, -#else - NULL, -#endif -#ifdef FN_CVarGetString - FN_CVarGetString, -#else - NULL, -#endif -#ifdef FN_CVarSetFloat - FN_CVarSetFloat, -#else - NULL, -#endif -#ifdef FN_CVarSetString - FN_CVarSetString, -#else - NULL, -#endif -#ifdef FN_AlertMessage - FN_AlertMessage, -#else - NULL, -#endif -#ifdef FN_EngineFprintf - FN_EngineFprintf, -#else - NULL, -#endif -#ifdef FN_PvAllocEntPrivateData - FN_PvAllocEntPrivateData, -#else - NULL, -#endif -#ifdef FN_PvEntPrivateData - FN_PvEntPrivateData, -#else - NULL, -#endif -#ifdef FN_FreeEntPrivateData - FN_FreeEntPrivateData, -#else - NULL, -#endif -#ifdef FN_SzFromIndex - FN_SzFromIndex, -#else - NULL, -#endif -#ifdef FN_AllocString - FN_AllocString, -#else - NULL, -#endif -#ifdef FN_GetVarsOfEnt - FN_GetVarsOfEnt, -#else - NULL, -#endif -#ifdef FN_PEntityOfEntOffset - FN_PEntityOfEntOffset, -#else - NULL, -#endif -#ifdef FN_EntOffsetOfPEntity - FN_EntOffsetOfPEntity, -#else - NULL, -#endif -#ifdef FN_IndexOfEdict - FN_IndexOfEdict, -#else - NULL, -#endif -#ifdef FN_PEntityOfEntIndex - FN_PEntityOfEntIndex, -#else - NULL, -#endif -#ifdef FN_FindEntityByVars - FN_FindEntityByVars, -#else - NULL, -#endif -#ifdef FN_GetModelPtr - FN_GetModelPtr, -#else - NULL, -#endif -#ifdef FN_RegUserMsg - FN_RegUserMsg, -#else - NULL, -#endif -#ifdef FN_AnimationAutomove - FN_AnimationAutomove, -#else - NULL, -#endif -#ifdef FN_GetBonePosition - FN_GetBonePosition, -#else - NULL, -#endif -#ifdef FN_FunctionFromName - FN_FunctionFromName, -#else - NULL, -#endif -#ifdef FN_NameForFunction - FN_NameForFunction, -#else - NULL, -#endif -#ifdef FN_ClientPrintf - FN_ClientPrintf, -#else - NULL, -#endif -#ifdef FN_ServerPrint - FN_ServerPrint, -#else - NULL, -#endif -#ifdef FN_Cmd_Args - FN_Cmd_Args, -#else - NULL, -#endif -#ifdef FN_Cmd_Argv - FN_Cmd_Argv, -#else - NULL, -#endif -#ifdef FN_Cmd_Argc - FN_Cmd_Argc, -#else - NULL, -#endif -#ifdef FN_GetAttachment - FN_GetAttachment, -#else - NULL, -#endif -#ifdef FN_CRC32_Init - FN_CRC32_Init, -#else - NULL, -#endif -#ifdef FN_CRC32_ProcessBuffer - FN_CRC32_ProcessBuffer, -#else - NULL, -#endif -#ifdef FN_CRC32_ProcessByte - FN_CRC32_ProcessByte, -#else - NULL, -#endif -#ifdef FN_CRC32_Final - FN_CRC32_Final, -#else - NULL, -#endif -#ifdef FN_RandomLong - FN_RandomLong, -#else - NULL, -#endif -#ifdef FN_RandomFloat - FN_RandomFloat, -#else - NULL, -#endif -#ifdef FN_SetView - FN_SetView, -#else - NULL, -#endif -#ifdef FN_Time - FN_Time, -#else - NULL, -#endif -#ifdef FN_CrosshairAngle - FN_CrosshairAngle, -#else - NULL, -#endif -#ifdef FN_LoadFileForMe - FN_LoadFileForMe, -#else - NULL, -#endif -#ifdef FN_FreeFile - FN_FreeFile, -#else - NULL, -#endif -#ifdef FN_EndSection - FN_EndSection, -#else - NULL, -#endif -#ifdef FN_CompareFileTime - FN_CompareFileTime, -#else - NULL, -#endif -#ifdef FN_GetGameDir - FN_GetGameDir, -#else - NULL, -#endif -#ifdef FN_Cvar_RegisterVariable - FN_Cvar_RegisterVariable, -#else - NULL, -#endif -#ifdef FN_FadeClientVolume - FN_FadeClientVolume, -#else - NULL, -#endif -#ifdef FN_SetClientMaxspeed - FN_SetClientMaxspeed, -#else - NULL, -#endif -#ifdef FN_CreateFakeClient - FN_CreateFakeClient, -#else - NULL, -#endif -#ifdef FN_RunPlayerMove - FN_RunPlayerMove, -#else - NULL, -#endif -#ifdef FN_NumberOfEntities - FN_NumberOfEntities, -#else - NULL, -#endif -#ifdef FN_GetInfoKeyBuffer - FN_GetInfoKeyBuffer, -#else - NULL, -#endif -#ifdef FN_InfoKeyValue - FN_InfoKeyValue, -#else - NULL, -#endif -#ifdef FN_SetKeyValue - FN_SetKeyValue, -#else - NULL, -#endif -#ifdef FN_SetClientKeyValue - FN_SetClientKeyValue, -#else - NULL, -#endif -#ifdef FN_IsMapValid - FN_IsMapValid, -#else - NULL, -#endif -#ifdef FN_StaticDecal - FN_StaticDecal, -#else - NULL, -#endif -#ifdef FN_PrecacheGeneric - FN_PrecacheGeneric, -#else - NULL, -#endif -#ifdef FN_GetPlayerUserId - FN_GetPlayerUserId, -#else - NULL, -#endif -#ifdef FN_BuildSoundMsg - FN_BuildSoundMsg, -#else - NULL, -#endif -#ifdef FN_IsDedicatedServer - FN_IsDedicatedServer, -#else - NULL, -#endif -#ifdef FN_CVarGetPointer - FN_CVarGetPointer, -#else - NULL, -#endif -#ifdef FN_GetPlayerWONId - FN_GetPlayerWONId, -#else - NULL, -#endif -#ifdef FN_Info_RemoveKey - FN_Info_RemoveKey, -#else - NULL, -#endif -#ifdef FN_GetPhysicsKeyValue - FN_GetPhysicsKeyValue, -#else - NULL, -#endif -#ifdef FN_SetPhysicsKeyValue - FN_SetPhysicsKeyValue, -#else - NULL, -#endif -#ifdef FN_GetPhysicsInfoString - FN_GetPhysicsInfoString, -#else - NULL, -#endif -#ifdef FN_PrecacheEvent - FN_PrecacheEvent, -#else - NULL, -#endif -#ifdef FN_PlaybackEvent - FN_PlaybackEvent, -#else - NULL, -#endif -#ifdef FN_SetFatPVS - FN_SetFatPVS, -#else - NULL, -#endif -#ifdef FN_SetFatPAS - FN_SetFatPAS, -#else - NULL, -#endif -#ifdef FN_CheckVisibility - FN_CheckVisibility, -#else - NULL, -#endif -#ifdef FN_DeltaSetField - FN_DeltaSetField, -#else - NULL, -#endif -#ifdef FN_DeltaUnsetField - FN_DeltaUnsetField, -#else - NULL, -#endif -#ifdef FN_DeltaAddEncoder - FN_DeltaAddEncoder, -#else - NULL, -#endif -#ifdef FN_GetCurrentPlayer - FN_GetCurrentPlayer, -#else - NULL, -#endif -#ifdef FN_CanSkipPlayer - FN_CanSkipPlayer, -#else - NULL, -#endif -#ifdef FN_DeltaFindField - FN_DeltaFindField, -#else - NULL, -#endif -#ifdef FN_DeltaSetFieldByIndex - FN_DeltaSetFieldByIndex, -#else - NULL, -#endif -#ifdef FN_DeltaUnsetFieldByIndex - FN_DeltaUnsetFieldByIndex, -#else - NULL, -#endif -#ifdef FN_SetGroupMask - FN_SetGroupMask, -#else - NULL, -#endif -#ifdef FN_engCreateInstancedBaseline - FN_engCreateInstancedBaseline, -#else - NULL, -#endif -#ifdef FN_Cvar_DirectSet - FN_Cvar_DirectSet, -#else - NULL, -#endif -#ifdef FN_ForceUnmodified - FN_ForceUnmodified, -#else - NULL, -#endif -#ifdef FN_GetPlayerStats - FN_GetPlayerStats, -#else - NULL, -#endif -#ifdef FN_AddServerCommand - FN_AddServerCommand, -#else - NULL, -#endif -#ifdef FN_Voice_GetClientListening - FN_Voice_GetClientListening, -#else - NULL, -#endif -#ifdef FN_Voice_SetClientListening - FN_Voice_SetClientListening, -#else - NULL, -#endif -#ifdef FN_GetPlayerAuthId - FN_GetPlayerAuthId -#else - NULL -#endif -}; // g_EngineFuncs_Table - - -static enginefuncs_t g_EngineFuncs_Post_Table = -{ -#ifdef FN_PrecacheModel_Post - FN_PrecacheModel_Post, -#else - NULL, -#endif -#ifdef FN_PrecacheSound_Post - FN_PrecacheSound_Post, -#else - NULL, -#endif -#ifdef FN_SetModel_Post - FN_SetModel_Post, -#else - NULL, -#endif -#ifdef FN_ModelIndex_Post - FN_ModelIndex_Post, -#else - NULL, -#endif -#ifdef FN_ModelFrames_Post - FN_ModelFrames_Post, -#else - NULL, -#endif -#ifdef FN_SetSize_Post - FN_SetSize_Post, -#else - NULL, -#endif -#ifdef FN_ChangeLevel_Post - FN_ChangeLevel_Post, -#else - NULL, -#endif -#ifdef FN_GetSpawnParms_Post - FN_GetSpawnParms_Post, -#else - NULL, -#endif -#ifdef FN_SaveSpawnParms_Post - FN_SaveSpawnParms_Post, -#else - NULL, -#endif -#ifdef FN_VecToYaw_Post - FN_VecToYaw_Post, -#else - NULL, -#endif -#ifdef FN_VecToAngles_Post - FN_VecToAngles_Post, -#else - NULL, -#endif -#ifdef FN_MoveToOrigin_Post - FN_MoveToOrigin_Post, -#else - NULL, -#endif -#ifdef FN_ChangeYaw_Post - FN_ChangeYaw_Post, -#else - NULL, -#endif -#ifdef FN_ChangePitch_Post - FN_ChangePitch_Post, -#else - NULL, -#endif -#ifdef FN_FindEntityByString_Post - FN_FindEntityByString_Post, -#else - NULL, -#endif -#ifdef FN_GetEntityIllum_Post - FN_GetEntityIllum_Post, -#else - NULL, -#endif -#ifdef FN_FindEntityInSphere_Post - FN_FindEntityInSphere_Post, -#else - NULL, -#endif -#ifdef FN_FindClientInPVS_Post - FN_FindClientInPVS_Post, -#else - NULL, -#endif -#ifdef FN_EntitiesInPVS_Post - FN_EntitiesInPVS_Post, -#else - NULL, -#endif -#ifdef FN_MakeVectors_Post - FN_MakeVectors_Post, -#else - NULL, -#endif -#ifdef FN_AngleVectors_Post - FN_AngleVectors_Post, -#else - NULL, -#endif -#ifdef FN_CreateEntity_Post - FN_CreateEntity_Post, -#else - NULL, -#endif -#ifdef FN_RemoveEntity_Post - FN_RemoveEntity_Post, -#else - NULL, -#endif -#ifdef FN_CreateNamedEntity_Post - FN_CreateNamedEntity_Post, -#else - NULL, -#endif -#ifdef FN_MakeStatic_Post - FN_MakeStatic_Post, -#else - NULL, -#endif -#ifdef FN_EntIsOnFloor_Post - FN_EntIsOnFloor_Post, -#else - NULL, -#endif -#ifdef FN_DropToFloor_Post - FN_DropToFloor_Post, -#else - NULL, -#endif -#ifdef FN_WalkMove_Post - FN_WalkMove_Post, -#else - NULL, -#endif -#ifdef FN_SetOrigin_Post - FN_SetOrigin_Post, -#else - NULL, -#endif -#ifdef FN_EmitSound_Post - FN_EmitSound_Post, -#else - NULL, -#endif -#ifdef FN_EmitAmbientSound_Post - FN_EmitAmbientSound_Post, -#else - NULL, -#endif -#ifdef FN_TraceLine_Post - FN_TraceLine_Post, -#else - NULL, -#endif -#ifdef FN_TraceToss_Post - FN_TraceToss_Post, -#else - NULL, -#endif -#ifdef FN_TraceMonsterHull_Post - FN_TraceMonsterHull_Post, -#else - NULL, -#endif -#ifdef FN_TraceHull_Post - FN_TraceHull_Post, -#else - NULL, -#endif -#ifdef FN_TraceModel_Post - FN_TraceModel_Post, -#else - NULL, -#endif -#ifdef FN_TraceTexture_Post - FN_TraceTexture_Post, -#else - NULL, -#endif -#ifdef FN_TraceSphere_Post - FN_TraceSphere_Post, -#else - NULL, -#endif -#ifdef FN_GetAimVector_Post - FN_GetAimVector_Post, -#else - NULL, -#endif -#ifdef FN_ServerCommand_Post - FN_ServerCommand_Post, -#else - NULL, -#endif -#ifdef FN_ServerExecute_Post - FN_ServerExecute_Post, -#else - NULL, -#endif -#ifdef FN_engClientCommand_Post - FN_engClientCommand_Post, -#else - NULL, -#endif -#ifdef FN_ParticleEffect_Post - FN_ParticleEffect_Post, -#else - NULL, -#endif -#ifdef FN_LightStyle_Post - FN_LightStyle_Post, -#else - NULL, -#endif -#ifdef FN_DecalIndex_Post - FN_DecalIndex_Post, -#else - NULL, -#endif -#ifdef FN_PointContents_Post - FN_PointContents_Post, -#else - NULL, -#endif -#ifdef FN_MessageBegin_Post - FN_MessageBegin_Post, -#else - NULL, -#endif -#ifdef FN_MessageEnd_Post - FN_MessageEnd_Post, -#else - NULL, -#endif -#ifdef FN_WriteByte_Post - FN_WriteByte_Post, -#else - NULL, -#endif -#ifdef FN_WriteChar_Post - FN_WriteChar_Post, -#else - NULL, -#endif -#ifdef FN_WriteShort_Post - FN_WriteShort_Post, -#else - NULL, -#endif -#ifdef FN_WriteLong_Post - FN_WriteLong_Post, -#else - NULL, -#endif -#ifdef FN_WriteAngle_Post - FN_WriteAngle_Post, -#else - NULL, -#endif -#ifdef FN_WriteCoord_Post - FN_WriteCoord_Post, -#else - NULL, -#endif -#ifdef FN_WriteString_Post - FN_WriteString_Post, -#else - NULL, -#endif -#ifdef FN_WriteEntity_Post - FN_WriteEntity_Post, -#else - NULL, -#endif -#ifdef FN_CVarRegister_Post - FN_CVarRegister_Post, -#else - NULL, -#endif -#ifdef FN_CVarGetFloat_Post - FN_CVarGetFloat_Post, -#else - NULL, -#endif -#ifdef FN_CVarGetString_Post - FN_CVarGetString_Post, -#else - NULL, -#endif -#ifdef FN_CVarSetFloat_Post - FN_CVarSetFloat_Post, -#else - NULL, -#endif -#ifdef FN_CVarSetString_Post - FN_CVarSetString_Post, -#else - NULL, -#endif -#ifdef FN_AlertMessage_Post - FN_AlertMessage_Post, -#else - NULL, -#endif -#ifdef FN_EngineFprintf_Post - FN_EngineFprintf_Post, -#else - NULL, -#endif -#ifdef FN_PvAllocEntPrivateData_Post - FN_PvAllocEntPrivateData_Post, -#else - NULL, -#endif -#ifdef FN_PvEntPrivateData_Post - FN_PvEntPrivateData_Post, -#else - NULL, -#endif -#ifdef FN_FreeEntPrivateData_Post - FN_FreeEntPrivateData_Post, -#else - NULL, -#endif -#ifdef FN_SzFromIndex_Post - FN_SzFromIndex_Post, -#else - NULL, -#endif -#ifdef FN_AllocString_Post - FN_AllocString_Post, -#else - NULL, -#endif -#ifdef FN_GetVarsOfEnt_Post - FN_GetVarsOfEnt_Post, -#else - NULL, -#endif -#ifdef FN_PEntityOfEntOffset_Post - FN_PEntityOfEntOffset_Post, -#else - NULL, -#endif -#ifdef FN_EntOffsetOfPEntity_Post - FN_EntOffsetOfPEntity_Post, -#else - NULL, -#endif -#ifdef FN_IndexOfEdict_Post - FN_IndexOfEdict_Post, -#else - NULL, -#endif -#ifdef FN_PEntityOfEntIndex_Post - FN_PEntityOfEntIndex_Post, -#else - NULL, -#endif -#ifdef FN_FindEntityByVars_Post - FN_FindEntityByVars_Post, -#else - NULL, -#endif -#ifdef FN_GetModelPtr_Post - FN_GetModelPtr_Post, -#else - NULL, -#endif -#ifdef FN_RegUserMsg_Post - FN_RegUserMsg_Post, -#else - NULL, -#endif -#ifdef FN_AnimationAutomove_Post - FN_AnimationAutomove_Post, -#else - NULL, -#endif -#ifdef FN_GetBonePosition_Post - FN_GetBonePosition_Post, -#else - NULL, -#endif -#ifdef FN_FunctionFromName_Post - FN_FunctionFromName_Post, -#else - NULL, -#endif -#ifdef FN_NameForFunction_Post - FN_NameForFunction_Post, -#else - NULL, -#endif -#ifdef FN_ClientPrintf_Post - FN_ClientPrintf_Post, -#else - NULL, -#endif -#ifdef FN_ServerPrint_Post - FN_ServerPrint_Post, -#else - NULL, -#endif -#ifdef FN_Cmd_Args_Post - FN_Cmd_Args_Post, -#else - NULL, -#endif -#ifdef FN_Cmd_Argv_Post - FN_Cmd_Argv_Post, -#else - NULL, -#endif -#ifdef FN_Cmd_Argc_Post - FN_Cmd_Argc_Post, -#else - NULL, -#endif -#ifdef FN_GetAttachment_Post - FN_GetAttachment_Post, -#else - NULL, -#endif -#ifdef FN_CRC32_Init_Post - FN_CRC32_Init_Post, -#else - NULL, -#endif -#ifdef FN_CRC32_ProcessBuffer_Post - FN_CRC32_ProcessBuffer_Post, -#else - NULL, -#endif -#ifdef FN_CRC32_ProcessByte_Post - FN_CRC32_ProcessByte_Post, -#else - NULL, -#endif -#ifdef FN_CRC32_Final_Post - FN_CRC32_Final_Post, -#else - NULL, -#endif -#ifdef FN_RandomLong_Post - FN_RandomLong_Post, -#else - NULL, -#endif -#ifdef FN_RandomFloat_Post - FN_RandomFloat_Post, -#else - NULL, -#endif -#ifdef FN_SetView_Post - FN_SetView_Post, -#else - NULL, -#endif -#ifdef FN_Time_Post - FN_Time_Post, -#else - NULL, -#endif -#ifdef FN_CrosshairAngle_Post - FN_CrosshairAngle_Post, -#else - NULL, -#endif -#ifdef FN_LoadFileForMe_Post - FN_LoadFileForMe_Post, -#else - NULL, -#endif -#ifdef FN_FreeFile_Post - FN_FreeFile_Post, -#else - NULL, -#endif -#ifdef FN_EndSection_Post - FN_EndSection_Post, -#else - NULL, -#endif -#ifdef FN_CompareFileTime_Post - FN_CompareFileTime_Post, -#else - NULL, -#endif -#ifdef FN_GetGameDir_Post - FN_GetGameDir_Post, -#else - NULL, -#endif -#ifdef FN_Cvar_RegisterVariable_Post - FN_Cvar_RegisterVariable_Post, -#else - NULL, -#endif -#ifdef FN_FadeClientVolume_Post - FN_FadeClientVolume_Post, -#else - NULL, -#endif -#ifdef FN_SetClientMaxspeed_Post - FN_SetClientMaxspeed_Post, -#else - NULL, -#endif -#ifdef FN_CreateFakeClient_Post - FN_CreateFakeClient_Post, -#else - NULL, -#endif -#ifdef FN_RunPlayerMove_Post - FN_RunPlayerMove_Post, -#else - NULL, -#endif -#ifdef FN_NumberOfEntities_Post - FN_NumberOfEntities_Post, -#else - NULL, -#endif -#ifdef FN_GetInfoKeyBuffer_Post - FN_GetInfoKeyBuffer_Post, -#else - NULL, -#endif -#ifdef FN_InfoKeyValue_Post - FN_InfoKeyValue_Post, -#else - NULL, -#endif -#ifdef FN_SetKeyValue_Post - FN_SetKeyValue_Post, -#else - NULL, -#endif -#ifdef FN_SetClientKeyValue_Post - FN_SetClientKeyValue_Post, -#else - NULL, -#endif -#ifdef FN_IsMapValid_Post - FN_IsMapValid_Post, -#else - NULL, -#endif -#ifdef FN_StaticDecal_Post - FN_StaticDecal_Post, -#else - NULL, -#endif -#ifdef FN_PrecacheGeneric_Post - FN_PrecacheGeneric_Post, -#else - NULL, -#endif -#ifdef FN_GetPlayerUserId_Post - FN_GetPlayerUserId_Post, -#else - NULL, -#endif -#ifdef FN_BuildSoundMsg_Post - FN_BuildSoundMsg_Post, -#else - NULL, -#endif -#ifdef FN_IsDedicatedServer_Post - FN_IsDedicatedServer_Post, -#else - NULL, -#endif -#ifdef FN_CVarGetPointer_Post - FN_CVarGetPointer_Post, -#else - NULL, -#endif -#ifdef FN_GetPlayerWONId_Post - FN_GetPlayerWONId_Post, -#else - NULL, -#endif -#ifdef FN_Info_RemoveKey_Post - FN_Info_RemoveKey_Post, -#else - NULL, -#endif -#ifdef FN_GetPhysicsKeyValue_Post - FN_GetPhysicsKeyValue_Post, -#else - NULL, -#endif -#ifdef FN_SetPhysicsKeyValue_Post - FN_SetPhysicsKeyValue_Post, -#else - NULL, -#endif -#ifdef FN_GetPhysicsInfoString_Post - FN_GetPhysicsInfoString_Post, -#else - NULL, -#endif -#ifdef FN_PrecacheEvent_Post - FN_PrecacheEvent_Post, -#else - NULL, -#endif -#ifdef FN_PlaybackEvent_Post - FN_PlaybackEvent_Post, -#else - NULL, -#endif -#ifdef FN_SetFatPVS_Post - FN_SetFatPVS_Post, -#else - NULL, -#endif -#ifdef FN_SetFatPAS_Post - FN_SetFatPAS_Post, -#else - NULL, -#endif -#ifdef FN_CheckVisibility_Post - FN_CheckVisibility_Post, -#else - NULL, -#endif -#ifdef FN_DeltaSetField_Post - FN_DeltaSetField_Post, -#else - NULL, -#endif -#ifdef FN_DeltaUnsetField_Post - FN_DeltaUnsetField_Post, -#else - NULL, -#endif -#ifdef FN_DeltaAddEncoder_Post - FN_DeltaAddEncoder_Post, -#else - NULL, -#endif -#ifdef FN_GetCurrentPlayer_Post - FN_GetCurrentPlayer_Post, -#else - NULL, -#endif -#ifdef FN_CanSkipPlayer_Post - FN_CanSkipPlayer_Post, -#else - NULL, -#endif -#ifdef FN_DeltaFindField_Post - FN_DeltaFindField_Post, -#else - NULL, -#endif -#ifdef FN_DeltaSetFieldByIndex_Post - FN_DeltaSetFieldByIndex_Post, -#else - NULL, -#endif -#ifdef FN_DeltaUnsetFieldByIndex_Post - FN_DeltaUnsetFieldByIndex_Post, -#else - NULL, -#endif -#ifdef FN_SetGroupMask_Post - FN_SetGroupMask_Post, -#else - NULL, -#endif -#ifdef FN_engCreateInstancedBaseline_Post - FN_engCreateInstancedBaseline_Post, -#else - NULL, -#endif -#ifdef FN_Cvar_DirectSet_Post - FN_Cvar_DirectSet_Post, -#else - NULL, -#endif -#ifdef FN_ForceUnmodified_Post - FN_ForceUnmodified_Post, -#else - NULL, -#endif -#ifdef FN_GetPlayerStats_Post - FN_GetPlayerStats_Post, -#else - NULL, -#endif -#ifdef FN_AddServerCommand_Post - FN_AddServerCommand_Post, -#else - NULL, -#endif -#ifdef FN_Voice_GetClientListening_Post - FN_Voice_GetClientListening_Post, -#else - NULL, -#endif -#ifdef FN_Voice_SetClientListening_Post - FN_Voice_SetClientListening_Post, -#else - NULL, -#endif -#ifdef FN_GetPlayerAuthId_Post - FN_GetPlayerAuthId_Post -#else - NULL -#endif -}; // g_EngineFuncs_Post_Table - - -static NEW_DLL_FUNCTIONS g_NewFuncs_Table = -{ -#ifdef FN_OnFreeEntPrivateData - FN_OnFreeEntPrivateData, -#else - NULL, -#endif -#ifdef FN_GameShutdown - FN_GameShutdown, -#else - NULL, -#endif -#ifdef FN_ShouldCollide - ShouldCollide, -#else - NULL, -#endif -}; - - -static NEW_DLL_FUNCTIONS g_NewFuncs_Post_Table = -{ -#ifdef FN_OnFreeEntPrivateData_Post - FN_OnFreeEntPrivateData_Post, -#else - NULL, -#endif -#ifdef FN_GameShutdown_Post - FN_GameShutdown_Post, -#else - NULL, -#endif -#ifdef FN_ShouldCollide_Post - ShouldCollide_Post, -#else - NULL, -#endif -}; - -// Global variables from metamod. These variable names are referenced by -// various macros. -meta_globals_t *gpMetaGlobals; // metamod globals -gamedll_funcs_t *gpGamedllFuncs; // gameDLL function tables -mutil_funcs_t *gpMetaUtilFuncs; // metamod utility functions - - -plugin_info_t Plugin_info = { - META_INTERFACE_VERSION, - MODULE_NAME, - MODULE_VERSION, - MODULE_DATE, - MODULE_AUTHOR, - MODULE_URL, - MODULE_LOGTAG, - PT_ANYTIME, - PT_ANYTIME -}; - -/* -C_DLLEXPORT int GetEntityAPI(DLL_FUNCTIONS *pFunctionTable, int interfaceVersion) -{ - LOG_DEVELOPER(PLID, "called: GetEntityAPI; version=%d", interfaceVersion); - if(!pFunctionTable) { - LOG_ERROR(PLID, "GetEntityAPI called with null pFunctionTable"); - return(FALSE); - } - else if(interfaceVersion != INTERFACE_VERSION) { - LOG_ERROR(PLID, "GetEntityAPI version mismatch; requested=%d ours=%d", interfaceVersion, INTERFACE_VERSION); - return(FALSE); - } - memcpy(pFunctionTable, &g_EntityAPI_Table, sizeof( DLL_FUNCTIONS ) ); - - return (TRUE); -} - -C_DLLEXPORT int GetEntityAPI_Post(DLL_FUNCTIONS *pFunctionTable, int interfaceVersion) -{ - LOG_DEVELOPER(PLID, "called: GetEntityAPI_Post; version=%d", interfaceVersion); - if(!pFunctionTable) { - LOG_ERROR(PLID, "GetEntityAPI_Post called with null pFunctionTable"); - return(FALSE); - } - else if(interfaceVersion != INTERFACE_VERSION) { - LOG_ERROR(PLID, "GetEntityAPI_Post version mismatch; requested=%d ours=%d", interfaceVersion, INTERFACE_VERSION); - return(FALSE); - } - memcpy(pFunctionTable, &g_EntityAPI_Post_Table, sizeof( DLL_FUNCTIONS ) ); - - return(TRUE); -} -*/ - -C_DLLEXPORT int GetEntityAPI2(DLL_FUNCTIONS *pFunctionTable, int *interfaceVersion) -{ - LOG_DEVELOPER(PLID, "called: GetEntityAPI2; version=%d", *interfaceVersion); - if(!pFunctionTable) { - LOG_ERROR(PLID, "GetEntityAPI2 called with null pFunctionTable"); - return(FALSE); - } - else if(*interfaceVersion != INTERFACE_VERSION) { - LOG_ERROR(PLID, - "GetEntityAPI2 version mismatch; requested=%d ours=%d", - *interfaceVersion, INTERFACE_VERSION); - //! Tell engine what version we had, so it can figure out who is - //! out of date. - *interfaceVersion = INTERFACE_VERSION; - return(FALSE); - } - memcpy(pFunctionTable, &g_EntityAPI_Table, sizeof(DLL_FUNCTIONS)); - g_pFunctionTable=pFunctionTable; - return(TRUE); -} - -C_DLLEXPORT int GetEntityAPI2_Post(DLL_FUNCTIONS *pFunctionTable, int *interfaceVersion) -{ - LOG_DEVELOPER(PLID, "called: GetEntityAPI2_Post; version=%d", *interfaceVersion); - if(!pFunctionTable) { - LOG_ERROR(PLID, "GetEntityAPI2_Post called with null pFunctionTable"); - return(FALSE); - } - else if(*interfaceVersion != INTERFACE_VERSION) { - LOG_ERROR(PLID, "GetEntityAPI2_Post version mismatch; requested=%d ours=%d", *interfaceVersion, INTERFACE_VERSION); - //! Tell engine what version we had, so it can figure out who is out of date. - *interfaceVersion = INTERFACE_VERSION; - return(FALSE); - } - memcpy( pFunctionTable, &g_EntityAPI_Post_Table, sizeof( DLL_FUNCTIONS ) ); - g_pFunctionTable_Post=pFunctionTable; - return(TRUE); -} - -C_DLLEXPORT int GetEngineFunctions(enginefuncs_t *pengfuncsFromEngine, int *interfaceVersion) -{ - LOG_DEVELOPER(PLID, "called: GetEngineFunctions; version=%d", - *interfaceVersion); - if(!pengfuncsFromEngine) { - LOG_ERROR(PLID, - "GetEngineFunctions called with null pengfuncsFromEngine"); - return(FALSE); - } - else if(*interfaceVersion != ENGINE_INTERFACE_VERSION) { - LOG_ERROR(PLID, - "GetEngineFunctions version mismatch; requested=%d ours=%d", - *interfaceVersion, ENGINE_INTERFACE_VERSION); - // Tell metamod what version we had, so it can figure out who is - // out of date. - *interfaceVersion = ENGINE_INTERFACE_VERSION; - return(FALSE); - } - memcpy(pengfuncsFromEngine, &g_EngineFuncs_Table, sizeof(enginefuncs_t)); - g_pengfuncsTable=pengfuncsFromEngine; - return TRUE; -} - -C_DLLEXPORT int GetEngineFunctions_Post(enginefuncs_t *pengfuncsFromEngine, int *interfaceVersion) -{ - LOG_DEVELOPER(PLID, "called: GetEngineFunctions_Post; version=%d", *interfaceVersion); - if(!pengfuncsFromEngine) { - LOG_ERROR(PLID, "GetEngineFunctions_Post called with null pengfuncsFromEngine"); - return(FALSE); - } - else if(*interfaceVersion != ENGINE_INTERFACE_VERSION) { - LOG_ERROR(PLID, "GetEngineFunctions_Post version mismatch; requested=%d ours=%d", *interfaceVersion, ENGINE_INTERFACE_VERSION); - // Tell metamod what version we had, so it can figure out who is out of date. - *interfaceVersion = ENGINE_INTERFACE_VERSION; - return(FALSE); - } - memcpy(pengfuncsFromEngine, &g_EngineFuncs_Post_Table, sizeof(enginefuncs_t)); - g_pengfuncsTable_Post=pengfuncsFromEngine; - return TRUE; - -} - -C_DLLEXPORT int GetNewDLLFunctions(NEW_DLL_FUNCTIONS *pNewFunctionTable, - int *interfaceVersion) -{ - LOG_DEVELOPER(PLID, "called: GetNewDLLFunctions; version=%d", - *interfaceVersion); - if(!pNewFunctionTable) { - LOG_ERROR(PLID, - "GetNewDLLFunctions called with null pNewFunctionTable"); - return(FALSE); - } - else if(*interfaceVersion != NEW_DLL_FUNCTIONS_VERSION) { - LOG_ERROR(PLID, - "GetNewDLLFunctions version mismatch; requested=%d ours=%d", - *interfaceVersion, NEW_DLL_FUNCTIONS_VERSION); - //! Tell engine what version we had, so it can figure out who is - //! out of date. - *interfaceVersion = NEW_DLL_FUNCTIONS_VERSION; - return(FALSE); - } - memcpy(pNewFunctionTable, &g_NewFuncs_Table, sizeof(NEW_DLL_FUNCTIONS)); - g_pNewFunctionsTable=pNewFunctionTable; - return TRUE; -} - -C_DLLEXPORT int GetNewDLLFunctions_Post( NEW_DLL_FUNCTIONS *pNewFunctionTable, int *interfaceVersion ) -{ - LOG_DEVELOPER(PLID, "called: GetNewDLLFunctions_Post; version=%d", *interfaceVersion); - if(!pNewFunctionTable) { - LOG_ERROR(PLID, "GetNewDLLFunctions_Post called with null pNewFunctionTable"); - return(FALSE); - } - else if(*interfaceVersion != NEW_DLL_FUNCTIONS_VERSION) { - LOG_ERROR(PLID, "GetNewDLLFunctions_Post version mismatch; requested=%d ours=%d", *interfaceVersion, NEW_DLL_FUNCTIONS_VERSION); - //! Tell engine what version we had, so it can figure out who is out of date. - *interfaceVersion = NEW_DLL_FUNCTIONS_VERSION; - return(FALSE); - } - memcpy(pNewFunctionTable, &g_NewFuncs_Post_Table, sizeof(NEW_DLL_FUNCTIONS)); - g_pNewFunctionsTable_Post=pNewFunctionTable; - return TRUE; -} - - -static META_FUNCTIONS g_MetaFunctions_Table = -{ - NULL, - NULL, - GetEntityAPI2, - GetEntityAPI2_Post, - GetNewDLLFunctions, - GetNewDLLFunctions_Post, - GetEngineFunctions, - GetEngineFunctions_Post -}; - -C_DLLEXPORT int Meta_Query(char *ifvers, plugin_info_t **pPlugInfo, mutil_funcs_t *pMetaUtilFuncs) -{ - if ((int) CVAR_GET_FLOAT("developer") != 0) - UTIL_LogPrintf("[%s] dev: called: Meta_Query; version=%s, ours=%s\n", - Plugin_info.logtag, ifvers, Plugin_info.ifvers); - - // Check for valid pMetaUtilFuncs before we continue. - if(!pMetaUtilFuncs) { - UTIL_LogPrintf("[%s] ERROR: Meta_Query called with null pMetaUtilFuncs\n", Plugin_info.logtag); - return(FALSE); - } - - gpMetaUtilFuncs = pMetaUtilFuncs; - - *pPlugInfo = &Plugin_info; - - // Check for interface version compatibility. - if(!FStrEq(ifvers, Plugin_info.ifvers)) { - int mmajor=0, mminor=0, pmajor=0, pminor=0; - LOG_MESSAGE(PLID, "WARNING: meta-interface version mismatch; requested=%s ours=%s", - Plugin_info.logtag, ifvers); - // If plugin has later interface version, it's incompatible (update - // metamod). - sscanf(ifvers, "%d:%d", &mmajor, &mminor); - sscanf(META_INTERFACE_VERSION, "%d:%d", &pmajor, &pminor); - if(pmajor > mmajor || (pmajor==mmajor && pminor > mminor)) { - LOG_ERROR(PLID, "metamod version is too old for this module; update metamod"); - return(FALSE); - } - // If plugin has older major interface version, it's incompatible - // (update plugin). - else if(pmajor < mmajor) { - LOG_ERROR(PLID, "metamod version is incompatible with this module; please find a newer version of this module"); - return(FALSE); - } - // Minor interface is older, but this is guaranteed to be backwards - // compatible, so we warn, but we still accept it. - else if(pmajor==mmajor && pminor < mminor) - LOG_MESSAGE(PLID, "WARNING: metamod version is newer than expected; consider finding a newer version of this module"); - else - LOG_ERROR(PLID, "unexpected version comparison; metavers=%s, mmajor=%d, mminor=%d; plugvers=%s, pmajor=%d, pminor=%d", ifvers, mmajor, mminor, META_INTERFACE_VERSION, pmajor, pminor); - } - -#ifdef FN_META_QUERY - return FN_META_QUERY(); -#endif // FN_META_QUERY - - return 1; -} - - -C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME now, META_FUNCTIONS *pFunctionTable, meta_globals_t *pMGlobals, gamedll_funcs_t *pGamedllFuncs) -{ - if(now > Plugin_info.loadable) { - LOG_ERROR(PLID, "Can't load module right now"); - return(FALSE); - } - if(!pMGlobals) { - LOG_ERROR(PLID, "Meta_Attach called with null pMGlobals"); - return(FALSE); - } - gpMetaGlobals=pMGlobals; - if(!pFunctionTable) { - LOG_ERROR(PLID, "Meta_Attach called with null pFunctionTable"); - return(FALSE); - } - - memcpy(pFunctionTable, &g_MetaFunctions_Table, sizeof(META_FUNCTIONS)); - gpGamedllFuncs=pGamedllFuncs; - - // Let's go. - -#ifdef FN_META_ATTACH - FN_META_ATTACH(); -#endif // FN_META_ATTACH - - return TRUE; -} - -C_DLLEXPORT int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason) -{ - if(now > Plugin_info.unloadable && reason != PNL_CMD_FORCED) { - LOG_ERROR(PLID, "Can't unload plugin right now"); - return(FALSE); - } - -#ifdef FN_META_DETACH - return FN_META_DETACH(); -#endif // FN_META_DETACH - return TRUE; -} - - - -#ifdef __linux__ -// linux prototype -C_DLLEXPORT void GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine, globalvars_t *pGlobals ) { - -#else -#ifdef _MSC_VER -// MSVC: Simulate __stdcall calling convention -C_DLLEXPORT __declspec(naked) void GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine, globalvars_t *pGlobals ) -{ - __asm // Prolog - { - // Save ebp - push ebp - // Set stack frame pointer - mov ebp, esp - // Allocate space for local variables - // The MSVC compiler gives us the needed size in __LOCAL_SIZE. - sub esp, __LOCAL_SIZE - // Push registers - push ebx - push esi - push edi - } -#else // _MSC_VER -#ifdef __GNUC__ -// GCC can also work with this -C_DLLEXPORT void __stdcall GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine, globalvars_t *pGlobals ) -{ -#else // __GNUC__ -// compiler not known -#error There is no support (yet) for your compiler. Please use MSVC or GCC compilers or contact the AMX Mod X dev team. -#endif // __GNUC__ -#endif // _MSC_VER -#endif // __linux__ - - // ** Function core <-- - memcpy(&g_engfuncs, pengfuncsFromEngine, sizeof(enginefuncs_t)); - gpGlobals = pGlobals; - // NOTE! Have to call logging function _after_ copying into g_engfuncs, so - // that g_engfuncs.pfnAlertMessage() can be resolved properly, heh. :) - UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag); - // --> ** Function core - -#ifdef _MSC_VER - // Epilog - if (sizeof(int*) == 8) - { // 64 bit - __asm - { - // Pop registers - pop edi - pop esi - pop ebx - // Restore stack frame pointer - mov esp, ebp - // Restore ebp - pop ebp - // 2 * sizeof(int*) = 16 on 64 bit - ret 16 - } - } - else - { // 32 bit - __asm - { - // Pop registers - pop edi - pop esi - pop ebx - // Restore stack frame pointer - mov esp, ebp - // Restore ebp - pop ebp - // 2 * sizeof(int*) = 8 on 32 bit - ret 8 - } - } -#endif // #ifdef _MSC_VER -} - -#endif // #ifdef USE_METAMOD - -/************* AMXX Stuff *************/ - -// *** Globals *** -// Module info -static amxx_module_info_s g_ModuleInfo = -{ - MODULE_NAME, - MODULE_AUTHOR, - MODULE_VERSION, -#ifdef MODULE_RELOAD_ON_MAPCHANGE - 1, -#else // MODULE_RELOAD_ON_MAPCHANGE - 0, -#endif // MODULE_RELOAD_ON_MAPCHANGE - MODULE_LOGTAG -}; - -// Storage for the requested functions -PFN_ADD_NATIVES g_fn_AddNatives; -PFN_BUILD_PATHNAME g_fn_BuildPathname; -PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR; -PFN_GET_AMXADDR g_fn_GetAmxAddr; -PFN_PRINT_SRVCONSOLE g_fn_PrintSrvConsole; -PFN_GET_MODNAME g_fn_GetModname; -PFN_GET_AMXSCRIPTNAME g_fn_GetAmxScriptName; -PFN_GET_AMXSCRIPT g_fn_GetAmxScript; -PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; -PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; -PFN_SET_AMXSTRING g_fn_SetAmxString; -PFN_GET_AMXSTRING g_fn_GetAmxString; -PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; -PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; -PFN_COPY_AMXMEMORY g_fn_CopyAmxMemory; -PFN_LOG g_fn_Log; -PFN_LOG_ERROR g_fn_LogErrorFunc; -PFN_RAISE_AMXERROR g_fn_RaiseAmxError; -PFN_REGISTER_FORWARD g_fn_RegisterForward; -PFN_EXECUTE_FORWARD g_fn_ExecuteForward; -PFN_PREPARE_CELLARRAY g_fn_PrepareCellArray; -PFN_PREPARE_CHARARRAY g_fn_PrepareCharArray; -PFN_PREPARE_CELLARRAY_A g_fn_PrepareCellArrayA; -PFN_PREPARE_CHARARRAY_A g_fn_PrepareCharArrayA; -PFN_IS_PLAYER_VALID g_fn_IsPlayerValid; -PFN_GET_PLAYER_NAME g_fn_GetPlayerName; -PFN_GET_PLAYER_IP g_fn_GetPlayerIP; -PFN_IS_PLAYER_INGAME g_fn_IsPlayerIngame; -PFN_IS_PLAYER_BOT g_fn_IsPlayerBot; -PFN_IS_PLAYER_AUTHORIZED g_fn_IsPlayerAuthorized; -PFN_GET_PLAYER_TIME g_fn_GetPlayerTime; -PFN_GET_PLAYER_PLAYTIME g_fn_GetPlayerPlayTime; -PFN_GET_PLAYER_CURWEAPON g_fn_GetPlayerCurweapon; -PFN_GET_PLAYER_TEAM g_fn_GetPlayerTeam; -PFN_GET_PLAYER_TEAMID g_fn_GetPlayerTeamID; -PFN_GET_PLAYER_DEATHS g_fn_GetPlayerDeaths; -PFN_GET_PLAYER_MENU g_fn_GetPlayerMenu; -PFN_GET_PLAYER_KEYS g_fn_GetPlayerKeys; -PFN_IS_PLAYER_ALIVE g_fn_IsPlayerAlive; -PFN_GET_PLAYER_FRAGS g_fn_GetPlayerFrags; -PFN_IS_PLAYER_CONNECTING g_fn_IsPlayerConnecting; -PFN_IS_PLAYER_HLTV g_fn_IsPlayerHLTV; -PFN_GET_PLAYER_ARMOR g_fn_GetPlayerArmor; -PFN_GET_PLAYER_HEALTH g_fn_GetPlayerHealth; -#ifdef MEMORY_TEST -PFN_ALLOCATOR g_fn_Allocator; -PFN_REALLOCATOR g_fn_Reallocator; -PFN_DEALLOCATOR g_fn_Deallocator; -#endif -PFN_AMX_EXEC g_fn_AmxExec; -PFN_AMX_EXECV g_fn_AmxExecv; -PFN_AMX_ALLOT g_fn_AmxAllot; -PFN_AMX_FINDPUBLIC g_fn_AmxFindPublic; -PFN_LOAD_AMXSCRIPT g_fn_LoadAmxScript; -PFN_UNLOAD_AMXSCRIPT g_fn_UnloadAmxScript; -PFN_REAL_TO_CELL g_fn_RealToCell; -PFN_CELL_TO_REAL g_fn_CellToReal; -PFN_REGISTER_SPFORWARD g_fn_RegisterSPForward; -PFN_REGISTER_SPFORWARD_BYNAME g_fn_RegisterSPForwardByName; -PFN_UNREGISTER_SPFORWARD g_fn_UnregisterSPForward; -PFN_MERGEDEFINITION_FILE g_fn_MergeDefinition_File; -PFN_AMX_FINDNATIVE g_fn_AmxFindNative; -PFN_GETPLAYERFLAGS g_fn_GetPlayerFlags; -PFN_GET_PLAYER_EDICT g_fn_GetPlayerEdict; -PFN_FORMAT g_fn_Format; -PFN_REGISTERFUNCTION g_fn_RegisterFunction; -PFN_REQ_FNPTR g_fn_RequestFunction; -PFN_AMX_PUSH g_fn_AmxPush; -PFN_SET_TEAM_INFO g_fn_SetTeamInfo; -PFN_PLAYER_PROP_ADDR g_fn_PlayerPropAddr; -PFN_REG_AUTH_FUNC g_fn_RegAuthFunc; -PFN_UNREG_AUTH_FUNC g_fn_UnregAuthFunc; - -// *** Exports *** -C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo) -{ - // check parameters - if (!interfaceVersion || !moduleInfo) - return AMXX_PARAM; - - // check interface version - if (*interfaceVersion != AMXX_INTERFACE_VERSION) - { - // Tell amxx core our interface version - *interfaceVersion = AMXX_INTERFACE_VERSION; - return AMXX_IFVERS; - } - - // copy module info - memcpy(moduleInfo, &g_ModuleInfo, sizeof(amxx_module_info_s)); - -#ifdef FN_AMXX_QUERY - FN_AMXX_QUERY(); -#endif // FN_AMXX_QUERY - // Everything ok :) - return AMXX_OK; -} - -// request function -#define REQFUNC(name, fptr, type) if ((fptr = (type)reqFnptrFunc(name)) == 0) return AMXX_FUNC_NOT_PRESENT -// request optional function -#define REQFUNC_OPT(name, fptr, type) fptr = (type)reqFnptrFunc(name) - -C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) -{ - // Check pointer - if (!reqFnptrFunc) - return AMXX_PARAM; - - g_fn_RequestFunction = reqFnptrFunc; - - // Req all known functions - // Misc - REQFUNC("BuildPathname", g_fn_BuildPathname, PFN_BUILD_PATHNAME); - REQFUNC("BuildPathnameR", g_fn_BuildPathnameR, PFN_BUILD_PATHNAME_R); - REQFUNC("PrintSrvConsole", g_fn_PrintSrvConsole, PFN_PRINT_SRVCONSOLE); - REQFUNC("GetModname", g_fn_GetModname, PFN_GET_MODNAME); - REQFUNC("Log", g_fn_Log, PFN_LOG); - REQFUNC("LogError", g_fn_LogErrorFunc, PFN_LOG_ERROR); - REQFUNC("MergeDefinitionFile", g_fn_MergeDefinition_File, PFN_MERGEDEFINITION_FILE); - REQFUNC("Format", g_fn_Format, PFN_FORMAT); - REQFUNC("RegisterFunction", g_fn_RegisterFunction, PFN_REGISTERFUNCTION); - - // Amx scripts - REQFUNC("GetAmxScript", g_fn_GetAmxScript, PFN_GET_AMXSCRIPT); - REQFUNC("FindAmxScriptByAmx", g_fn_FindAmxScriptByAmx, PFN_FIND_AMXSCRIPT_BYAMX); - REQFUNC("FindAmxScriptByName", g_fn_FindAmxScriptByName, PFN_FIND_AMXSCRIPT_BYNAME); - REQFUNC("LoadAmxScript", g_fn_LoadAmxScript, PFN_LOAD_AMXSCRIPT); - REQFUNC("UnloadAmxScript", g_fn_UnloadAmxScript, PFN_UNLOAD_AMXSCRIPT); - REQFUNC("GetAmxScriptName", g_fn_GetAmxScriptName, PFN_GET_AMXSCRIPTNAME); - - // String / mem in amx scripts support - REQFUNC("SetAmxString", g_fn_SetAmxString, PFN_SET_AMXSTRING); - REQFUNC("GetAmxString", g_fn_GetAmxString, PFN_GET_AMXSTRING); - REQFUNC("GetAmxStringLen", g_fn_GetAmxStringLen, PFN_GET_AMXSTRINGLEN); - REQFUNC("FormatAmxString", g_fn_FormatAmxString, PFN_FORMAT_AMXSTRING); - REQFUNC("CopyAmxMemory", g_fn_CopyAmxMemory, PFN_COPY_AMXMEMORY); - REQFUNC("GetAmxAddr", g_fn_GetAmxAddr, PFN_GET_AMXADDR); - - REQFUNC("amx_Exec", g_fn_AmxExec, PFN_AMX_EXEC); - REQFUNC("amx_Execv", g_fn_AmxExecv, PFN_AMX_EXECV); - REQFUNC("amx_FindPublic", g_fn_AmxFindPublic, PFN_AMX_FINDPUBLIC); - REQFUNC("amx_Allot", g_fn_AmxAllot, PFN_AMX_ALLOT); - REQFUNC("amx_FindNative", g_fn_AmxFindNative, PFN_AMX_FINDNATIVE); - - // Natives / Forwards - REQFUNC("AddNatives", g_fn_AddNatives, PFN_ADD_NATIVES); - REQFUNC("RaiseAmxError", g_fn_RaiseAmxError, PFN_RAISE_AMXERROR); - REQFUNC("RegisterForward", g_fn_RegisterForward, PFN_REGISTER_FORWARD); - REQFUNC("RegisterSPForward", g_fn_RegisterSPForward, PFN_REGISTER_SPFORWARD); - REQFUNC("RegisterSPForwardByName", g_fn_RegisterSPForwardByName, PFN_REGISTER_SPFORWARD_BYNAME); - REQFUNC("UnregisterSPForward", g_fn_UnregisterSPForward, PFN_UNREGISTER_SPFORWARD); - REQFUNC("ExecuteForward", g_fn_ExecuteForward, PFN_EXECUTE_FORWARD); - REQFUNC("PrepareCellArray", g_fn_PrepareCellArray, PFN_PREPARE_CELLARRAY); - REQFUNC("PrepareCharArray", g_fn_PrepareCharArray, PFN_PREPARE_CHARARRAY); - REQFUNC("PrepareCellArrayA", g_fn_PrepareCellArrayA, PFN_PREPARE_CELLARRAY_A); - REQFUNC("PrepareCharArrayA", g_fn_PrepareCharArrayA, PFN_PREPARE_CHARARRAY_A); - // Player - REQFUNC("IsPlayerValid", g_fn_IsPlayerValid, PFN_IS_PLAYER_VALID); - REQFUNC("GetPlayerName", g_fn_GetPlayerName, PFN_GET_PLAYER_NAME); - REQFUNC("GetPlayerIP", g_fn_GetPlayerIP, PFN_GET_PLAYER_IP); - REQFUNC("IsPlayerInGame", g_fn_IsPlayerIngame, PFN_IS_PLAYER_INGAME); - REQFUNC("IsPlayerBot", g_fn_IsPlayerBot, PFN_IS_PLAYER_BOT); - REQFUNC("IsPlayerAuthorized", g_fn_IsPlayerAuthorized, PFN_IS_PLAYER_AUTHORIZED); - REQFUNC("GetPlayerTime", g_fn_GetPlayerTime, PFN_GET_PLAYER_TIME); - REQFUNC("GetPlayerPlayTime", g_fn_GetPlayerPlayTime, PFN_GET_PLAYER_PLAYTIME); - REQFUNC("GetPlayerCurweapon", g_fn_GetPlayerCurweapon, PFN_GET_PLAYER_CURWEAPON); - REQFUNC("GetPlayerTeamID", g_fn_GetPlayerTeamID, PFN_GET_PLAYER_TEAMID); - REQFUNC("GetPlayerTeam",g_fn_GetPlayerTeam, PFN_GET_PLAYER_TEAM); - REQFUNC("GetPlayerDeaths", g_fn_GetPlayerDeaths, PFN_GET_PLAYER_DEATHS); - REQFUNC("GetPlayerMenu", g_fn_GetPlayerMenu, PFN_GET_PLAYER_MENU); - REQFUNC("GetPlayerKeys", g_fn_GetPlayerKeys, PFN_GET_PLAYER_KEYS); - REQFUNC("IsPlayerAlive", g_fn_IsPlayerAlive, PFN_IS_PLAYER_ALIVE); - REQFUNC("GetPlayerFrags", g_fn_GetPlayerFrags, PFN_GET_PLAYER_FRAGS); - REQFUNC("IsPlayerConnecting", g_fn_IsPlayerConnecting, PFN_IS_PLAYER_CONNECTING); - REQFUNC("IsPlayerHLTV", g_fn_IsPlayerHLTV, PFN_IS_PLAYER_HLTV); - REQFUNC("GetPlayerArmor", g_fn_GetPlayerArmor, PFN_GET_PLAYER_ARMOR); - REQFUNC("GetPlayerHealth", g_fn_GetPlayerHealth, PFN_GET_PLAYER_HEALTH); - REQFUNC("GetPlayerFlags", g_fn_GetPlayerFlags, PFN_GETPLAYERFLAGS); - REQFUNC("GetPlayerEdict", g_fn_GetPlayerEdict, PFN_GET_PLAYER_EDICT); - REQFUNC("amx_Push", g_fn_AmxPush, PFN_AMX_PUSH); - REQFUNC("SetPlayerTeamInfo", g_fn_SetTeamInfo, PFN_SET_TEAM_INFO); - REQFUNC("PlayerPropAddr", g_fn_PlayerPropAddr, PFN_PLAYER_PROP_ADDR); - REQFUNC("RegAuthFunc", g_fn_RegAuthFunc, PFN_REG_AUTH_FUNC); - REQFUNC("UnregAuthFunc", g_fn_UnregAuthFunc, PFN_UNREG_AUTH_FUNC); - -#ifdef MEMORY_TEST - // Memory - REQFUNC_OPT("Allocator", g_fn_Allocator, PFN_ALLOCATOR); - REQFUNC_OPT("Reallocator", g_fn_Reallocator, PFN_REALLOCATOR); - REQFUNC_OPT("Deallocator", g_fn_Deallocator, PFN_DEALLOCATOR); -#endif - - REQFUNC("CellToReal", g_fn_CellToReal, PFN_CELL_TO_REAL); - REQFUNC("RealToCell", g_fn_RealToCell, PFN_REAL_TO_CELL); - -#ifdef FN_AMXX_ATTACH - FN_AMXX_ATTACH(); -#endif // FN_AMXX_ATACH - - return AMXX_OK; -} - -C_DLLEXPORT int AMXX_Detach() -{ -#ifdef FN_AMXX_DETACH - FN_AMXX_DETACH(); -#endif // FN_AMXX_DETACH - - return AMXX_OK; -} - -C_DLLEXPORT int AMXX_PluginsLoaded() -{ -#ifdef FN_AMXX_PLUGINSLOADED - FN_AMXX_PLUGINSLOADED(); -#endif // FN_AMXX_PLUGINSLOADED - return AMXX_OK; -} - -// Advanced MF functions -void MF_Log(const char *fmt, ...) -{ - // :TODO: Overflow possible here - char msg[3072]; - va_list arglst; - va_start(arglst, fmt); - vsprintf(msg, fmt, arglst); - va_end(arglst); - - g_fn_Log("[%s] %s", MODULE_LOGTAG, msg); -} - -void MF_LogError(AMX *amx, int err, const char *fmt, ...) -{ - // :TODO: Overflow possible here - char msg[3072]; - va_list arglst; - va_start(arglst, fmt); - vsprintf(msg, fmt, arglst); - va_end(arglst); - - g_fn_LogErrorFunc(amx, err, "[%s] %s", MODULE_LOGTAG, msg); -} - - -#ifdef _DEBUG -// validate macros -// Makes sure compiler reports errors when macros are invalid -void ValidateMacros_DontCallThis_Smiley() -{ - MF_BuildPathname("str", "str", 0); - MF_BuildPathnameR(NULL, 0, "%d", 0); - MF_FormatAmxString(NULL, 0, 0, NULL); - MF_GetAmxAddr(NULL, 0); - MF_PrintSrvConsole("str", "str", 0); - MF_GetModname(); - MF_GetScriptName(0); - MF_GetScriptAmx(0); - MF_FindScriptByAmx(NULL); - MF_FindScriptByName("str"); - MF_SetAmxString(NULL, 0, "str", 0); - MF_GetAmxString(NULL, 0, 0, 0); - MF_GetAmxStringLen(NULL); - MF_CopyAmxMemory(NULL, NULL, 0); - MF_Log("str", "str", 0); - MF_LogError(NULL, 0, NULL); - MF_RaiseAmxError(NULL, 0); - MF_RegisterForward("str", (ForwardExecType)0, 0, 0, 0); - MF_ExecuteForward(0, 0, 0); - MF_PrepareCellArray(NULL, 0); - MF_PrepareCharArray(NULL, 0); - MF_PrepareCellArrayA(NULL, 0, true); - MF_PrepareCharArrayA(NULL, 0, true); - MF_IsPlayerValid(0); - MF_GetPlayerName(0); - MF_GetPlayerIP(0); - MF_IsPlayerIngame(0); - MF_IsPlayerBot(0); - MF_IsPlayerAuthorized(0); - MF_GetPlayerTime(0); - MF_GetPlayerPlayTime(0); - MF_GetPlayerCurweapon(0); - MF_GetPlayerTeamID(0); - MF_GetPlayerTeam(0); - MF_GetPlayerDeaths(0); - MF_GetPlayerMenu(0); - MF_GetPlayerKeys(0); - MF_IsPlayerAlive(0); - MF_GetPlayerFrags(0); - MF_IsPlayerConnecting(0); - MF_IsPlayerHLTV(0); - MF_GetPlayerArmor(0); - MF_GetPlayerHealth(0); - MF_AmxExec(0, 0, 0); - MF_AmxExecv(0, 0, 0, 0, 0); - MF_AmxFindPublic(0, 0, 0); - MF_AmxAllot(0, 0, 0, 0); - MF_LoadAmxScript(0, 0, 0, 0, 0); - MF_UnloadAmxScript(0, 0); - MF_RegisterSPForward(0, 0, 0, 0, 0, 0); - MF_RegisterSPForwardByName(0, 0, 0, 0, 0, 0); - MF_UnregisterSPForward(0); - MF_GetPlayerFrags(0); - MF_GetPlayerEdict(0); - MF_Format("", 4, "str"); - MF_RegisterFunction(NULL, ""); - MF_SetPlayerTeamInfo(0, 0, ""); - MF_PlayerPropAddr(0, 0); - MF_RegAuthFunc(NULL); - MF_UnregAuthFunc(NULL); -} -#endif - -#ifdef MEMORY_TEST - -/************* MEMORY *************/ -// undef all defined macros -#undef new -#undef delete -#undef malloc -#undef calloc -#undef realloc -#undef free - -const unsigned int m_alloc_unknown = 0; -const unsigned int m_alloc_new = 1; -const unsigned int m_alloc_new_array = 2; -const unsigned int m_alloc_malloc = 3; -const unsigned int m_alloc_calloc = 4; -const unsigned int m_alloc_realloc = 5; -const unsigned int m_alloc_delete = 6; -const unsigned int m_alloc_delete_array = 7; -const unsigned int m_alloc_free = 8; - -const char *g_Mem_CurrentFilename = "??"; -int g_Mem_CurrentLine = 0; -const char *g_Mem_CurrentFunc = "??"; - -const char *Mem_MakeSourceFile(const char *sourceFile) -{ - static char buffer[512]; - static size_t pos = 0; - if (!pos) - { - // init - buffer[0] = '['; - strcpy(buffer + 1, MODULE_NAME); - pos = strlen(MODULE_NAME) + 1; - buffer[pos++] = ']'; - } - - // convert from absolute path to [modulename]filename - const char *ptr = strrchr(sourceFile, '\\'); - if (ptr) - ptr++; - else - { - ptr = strrchr(sourceFile, '/'); - if (ptr) - ptr++; - else - ptr = sourceFile; - } - strcpy(buffer + pos, ptr); - return buffer; -} - -void Mem_SetOwner(const char *filename, int line, const char *function) -{ - g_Mem_CurrentFilename = filename; - g_Mem_CurrentLine = line; - g_Mem_CurrentFunc = function; -} - -void Mem_ResetGlobals() -{ - Mem_SetOwner("??", 0, "??"); -} - -// raw (re/de)allocators -void * Mem_Allocator(const char *sourceFile, const unsigned int sourceLine, const char *sourceFunc, - const unsigned int allocationType, const size_t reportedSize) -{ - if (g_fn_Allocator) - return g_fn_Allocator(Mem_MakeSourceFile(sourceFile), sourceLine, sourceFunc, allocationType, reportedSize); - else - return malloc(reportedSize); -} - -void * Mem_Reallocator(const char *sourceFile, const unsigned int sourceLine, const char *sourceFunc, - const unsigned int reallocationType, const size_t reportedSize, void *reportedAddress) -{ - if (g_fn_Reallocator) - return g_fn_Reallocator(Mem_MakeSourceFile(sourceFile), sourceLine, sourceFunc, reallocationType, reportedSize, reportedAddress); - else - return realloc(reportedAddress, reportedSize); -} - -void Mem_Deallocator(const char *sourceFile, const unsigned int sourceLine, const char *sourceFunc, - const unsigned int deallocationType, void *reportedAddress) -{ - // If you you get user breakpoint here, something failed :) - // - invalid pointer - // - alloc type mismatch ( for example - // char *a = new char[5]; delete char; - // ) - // - The allocation unit is damaged (for example - // char *a = new char[5]; a[6] = 8; - // ) - // - break on dealloc flag set (somehow) - - if (g_fn_Deallocator) - g_fn_Deallocator(Mem_MakeSourceFile(sourceFile), sourceLine, sourceFunc, deallocationType, reportedAddress); - else - free(reportedAddress); -} - -// new and delete operators -void *operator new(size_t reportedSize) -{ - if (reportedSize == 0) - reportedSize = 1; - void *ptr = Mem_Allocator(g_Mem_CurrentFilename, g_Mem_CurrentLine, g_Mem_CurrentFunc, m_alloc_new, reportedSize); - // :TODO: Handler support ? - if (ptr) - return ptr; - - // allocation failed - return NULL; -} - -void *operator new[](size_t reportedSize) -{ - if (reportedSize == 0) - reportedSize = 1; - void *ptr = Mem_Allocator(g_Mem_CurrentFilename, g_Mem_CurrentLine, g_Mem_CurrentFunc, m_alloc_new_array, reportedSize); - // :TODO: Handler support ? - if (ptr) - return ptr; - - // allocation failed - return NULL; -} - -// Microsoft memory tracking operators -void *operator new(size_t reportedSize, const char *sourceFile, int sourceLine) -{ - if (reportedSize == 0) - reportedSize = 1; - void *ptr = Mem_Allocator(g_Mem_CurrentFilename, g_Mem_CurrentLine, g_Mem_CurrentFunc, m_alloc_new, reportedSize); - // :TODO: Handler support ? - if (ptr) - return ptr; - - // allocation failed - return NULL; -} -void *operator new[](size_t reportedSize, const char *sourceFile, int sourceLine) -{ - if (reportedSize == 0) - reportedSize = 1; - void *ptr = Mem_Allocator(g_Mem_CurrentFilename, g_Mem_CurrentLine, g_Mem_CurrentFunc, m_alloc_new_array, reportedSize); - // :TODO: Handler support ? - if (ptr) - return ptr; - - // allocation failed - return NULL; -} - -void operator delete(void *reportedAddress) -{ - if (!reportedAddress) - return; - - Mem_Deallocator(g_Mem_CurrentFilename, g_Mem_CurrentLine, g_Mem_CurrentFunc, m_alloc_delete, reportedAddress); -} - -void operator delete[](void *reportedAddress) -{ - if (!reportedAddress) - return; - - Mem_Deallocator(g_Mem_CurrentFilename, g_Mem_CurrentLine, g_Mem_CurrentFunc, m_alloc_delete_array, reportedAddress); -} - -#else - -#if !defined NO_ALLOC_OVERRIDES && !defined MEMORY_TEST && !defined WIN32 -void * operator new(size_t size) { - return(calloc(1, size)); -} - -void * operator new[](size_t size) { - return(calloc(1, size)); -} - -void operator delete(void * ptr) { - if(ptr) - free(ptr); -} - -void operator delete[](void * ptr) { - if(ptr) - free(ptr); -} -#endif - -#endif //MEMORY_TEST - -/************* stuff from dlls/util.cpp *************/ -// must come here because cbase.h declares it's own operator new - -#ifdef USE_METAMOD - -// Selected portions of dlls/util.cpp from SDK 2.1. -// Functions copied from there as needed... -// And modified to avoid buffer overflows (argh). - -/*** -* -* Copyright (c) 1999, 2000 Valve LLC. All rights reserved. -* -* This product contains software technology licensed from Id -* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. -* All Rights Reserved. -* -* Use, distribution, and modification of this source code and/or resulting -* object code is restricted to non-commercial enhancements to products from -* Valve LLC. All other use, distribution, or modification is prohibited -* without written permission from Valve LLC. -* -****/ -/* - -===== util.cpp ======================================================== - - Utility code. Really not optional after all. - -*/ - -#include -#include "sdk_util.h" -#include - -#include // for strncpy(), etc - -#include "osdep.h" // win32 vsnprintf, etc - -char* UTIL_VarArgs( char *format, ... ) -{ - va_list argptr; - static char string[1024]; - - va_start (argptr, format); - vsnprintf (string, sizeof(string), format, argptr); - va_end (argptr); - - return string; -} - - -//========================================================= -// UTIL_LogPrintf - Prints a logged message to console. -// Preceded by LOG: ( timestamp ) < message > -//========================================================= -void UTIL_LogPrintf( char *fmt, ... ) -{ - va_list argptr; - static char string[1024]; - - va_start ( argptr, fmt ); - vsnprintf ( string, sizeof(string), fmt, argptr ); - va_end ( argptr ); - - // Print to server console - ALERT( at_logged, "%s", string ); -} - - -void UTIL_HudMessage(CBaseEntity *pEntity, const hudtextparms_t &textparms, - const char *pMessage) -{ - if ( !pEntity ) - return; - - MESSAGE_BEGIN( MSG_ONE, SVC_TEMPENTITY, NULL, ENT(pEntity->pev) ); - WRITE_BYTE( TE_TEXTMESSAGE ); - WRITE_BYTE( textparms.channel & 0xFF ); - - WRITE_SHORT( FixedSigned16( textparms.x, 1<<13 ) ); - WRITE_SHORT( FixedSigned16( textparms.y, 1<<13 ) ); - WRITE_BYTE( textparms.effect ); - - WRITE_BYTE( textparms.r1 ); - WRITE_BYTE( textparms.g1 ); - WRITE_BYTE( textparms.b1 ); - WRITE_BYTE( textparms.a1 ); - - WRITE_BYTE( textparms.r2 ); - WRITE_BYTE( textparms.g2 ); - WRITE_BYTE( textparms.b2 ); - WRITE_BYTE( textparms.a2 ); - - WRITE_SHORT( FixedUnsigned16( textparms.fadeinTime, 1<<8 ) ); - WRITE_SHORT( FixedUnsigned16( textparms.fadeoutTime, 1<<8 ) ); - WRITE_SHORT( FixedUnsigned16( textparms.holdTime, 1<<8 ) ); - - if ( textparms.effect == 2 ) - WRITE_SHORT( FixedUnsigned16( textparms.fxTime, 1<<8 ) ); - - if ( strlen( pMessage ) < 512 ) - { - WRITE_STRING( pMessage ); - } - else - { - char tmp[512]; - strncpy( tmp, pMessage, 511 ); - tmp[511] = 0; - WRITE_STRING( tmp ); - } - MESSAGE_END(); -} - -short FixedSigned16( float value, float scale ) -{ - int output; - - output = (int) (value * scale); - - if ( output > 32767 ) - output = 32767; - - if ( output < -32768 ) - output = -32768; - - return (short)output; -} - -unsigned short FixedUnsigned16( float value, float scale ) -{ - int output; - - output = (int) (value * scale); - if ( output < 0 ) - output = 0; - if ( output > 0xFFFF ) - output = 0xFFFF; - - return (unsigned short)output; -} -#endif // USE_METAMOD diff --git a/dlls/arrayx/amxxmodule.h b/dlls/arrayx/amxxmodule.h deleted file mode 100644 index 63f0b2ac..00000000 --- a/dlls/arrayx/amxxmodule.h +++ /dev/null @@ -1,2286 +0,0 @@ -/* - * AMX Mod X Module Interface Functions - * This file may be freely used -*/ - -// prevent double include -#ifndef __AMXXMODULE_H__ -#define __AMXXMODULE_H__ - -// config -#include "moduleconfig.h" - -// metamod include files -#ifdef USE_METAMOD -#include -#include -#include "osdep.h" -#endif // #ifdef USE_METAMOD - -// DLL Export -#undef DLLEXPORT -#ifndef __linux__ -#define DLLEXPORT __declspec(dllexport) -#else -#define DLLEXPORT -#define LINUX -#endif - -#ifndef _SIZE_T_DEFINED -typedef unsigned int size_t; -#define _SIZE_T_DEFINED -#endif - -#undef C_DLLEXPORT -#define C_DLLEXPORT extern "C" DLLEXPORT - -// ***** AMXX stuff ***** - -// module interface version was 1 -// 2 - added logtag to struct (amxx1.1-rc1) -// 3 - added new tagAMX structure (amxx1.5) -#define AMXX_INTERFACE_VERSION 3 - -// amxx module info -struct amxx_module_info_s -{ - const char *name; - const char *author; - const char *version; - int reload; // reload on mapchange when nonzero - const char *logtag; // added in version 2 -}; - -// return values from functions called by amxx -#define AMXX_OK 0 /* no error */ -#define AMXX_IFVERS 1 /* interface version */ -#define AMXX_PARAM 2 /* Invalid parameter */ -#define AMXX_FUNC_NOT_PRESENT 3 /* Function not present */ - -// *** Small stuff *** -// The next section is copied from the amx.h file -// Copyright (c) ITB CompuPhase, 1997-2005 - -#if defined HAVE_STDINT_H - #include -#else - #if defined __LCC__ || defined __DMC__ || defined LINUX - #if defined HAVE_INTTYPES_H - #include - #else - #include - #endif - #elif !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L - /* The ISO C99 defines the int16_t and int_32t types. If the compiler got - * here, these types are probably undefined. - */ - #if defined __MACH__ - #include - typedef unsigned short int uint16_t; - typedef unsigned long int uint32_t; - #elif defined __FreeBSD__ - #include - #else - typedef short int int16_t; - typedef unsigned short int uint16_t; - #if defined SN_TARGET_PS2 - typedef int int32_t; - typedef unsigned int uint32_t; - #else - typedef long int int32_t; - typedef unsigned long int uint32_t; - #endif - #if defined __WIN32__ || defined _WIN32 || defined WIN32 - typedef __int64 int64_t; - typedef unsigned __int64 uint64_t; - #define HAVE_I64 - #elif defined __GNUC__ - typedef long long int64_t; - typedef unsigned long long uint64_t; - #define HAVE_I64 - #endif - #endif - #endif - #define HAVE_STDINT_H -#endif -#if defined _LP64 || defined WIN64 || defined _WIN64 - #if !defined __64BIT__ - #define __64BIT__ - #endif -#endif - -/* calling convention for native functions */ -#if !defined AMX_NATIVE_CALL - #define AMX_NATIVE_CALL -#endif -/* calling convention for all interface functions and callback functions */ -#if !defined AMXAPI - #if defined STDECL - #define AMXAPI __stdcall - #elif defined CDECL - #define AMXAPI __cdecl - #else - #define AMXAPI - #endif -#endif -#if !defined AMXEXPORT - #define AMXEXPORT -#endif - -#if !defined PAWN_CELL_SIZE - #define PAWN_CELL_SIZE 32 /* by default, use 32-bit cells */ -#endif -#if PAWN_CELL_SIZE==16 - typedef uint16_t ucell; - typedef int16_t cell; -#elif PAWN_CELL_SIZE==32 - typedef uint32_t ucell; - typedef int32_t cell; -#define REAL float -#elif PAWN_CELL_SIZE==64 - typedef uint64_t ucell; - typedef int64_t cell; -#define REAL double -#else - #error Unsupported cell size (PAWN_CELL_SIZE) -#endif - -#define UNPACKEDMAX ((1 << (sizeof(cell)-1)*8) - 1) -#define UNLIMITED (~1u >> 1) - -struct tagAMX; -typedef cell (AMX_NATIVE_CALL *AMX_NATIVE)(struct tagAMX *amx, cell *params); -typedef int (AMXAPI *AMX_CALLBACK)(struct tagAMX *amx, cell index, - cell *result, cell *params); -typedef int (AMXAPI *AMX_DEBUG)(struct tagAMX *amx); -#if !defined _FAR - #define _FAR -#endif - -#if defined _MSC_VER - #pragma warning(disable:4103) /* disable warning message 4103 that complains - * about pragma pack in a header file */ - #pragma warning(disable:4100) /* "'%$S' : unreferenced formal parameter" */ -#endif - - -/* Some compilers do not support the #pragma align, which should be fine. Some - * compilers give a warning on unknown #pragmas, which is not so fine... - */ -#if (defined SN_TARGET_PS2 || defined __GNUC__) && !defined AMX_NO_ALIGN - #define AMX_NO_ALIGN -#endif - -#if defined __GNUC__ - #define PACKED __attribute__((packed)) -#else - #define PACKED -#endif - -#if !defined AMX_NO_ALIGN - #if defined LINUX || defined __FreeBSD__ - #pragma pack(1) /* structures must be packed (byte-aligned) */ - #elif defined MACOS && defined __MWERKS__ - #pragma options align=mac68k - #else - #pragma pack(push) - #pragma pack(1) /* structures must be packed (byte-aligned) */ - #if defined __TURBOC__ - #pragma option -a- /* "pack" pragma for older Borland compilers */ - #endif - #endif -#endif - -typedef struct { - const char _FAR *name PACKED; - AMX_NATIVE func PACKED; -} AMX_NATIVE_INFO; - -#define AMX_USERNUM 4 - -/* The AMX structure is the internal structure for many functions. Not all - * fields are valid at all times; many fields are cached in local variables. - */ -typedef struct tagAMX { - unsigned char _FAR *base PACKED; /* points to the AMX header plus the code, optionally also the data */ - unsigned char _FAR *data PACKED; /* points to separate data+stack+heap, may be NULL */ - AMX_CALLBACK callback PACKED; - AMX_DEBUG debug PACKED; /* debug callback */ - /* for external functions a few registers must be accessible from the outside */ - cell cip PACKED; /* instruction pointer: relative to base + amxhdr->cod */ - cell frm PACKED; /* stack frame base: relative to base + amxhdr->dat */ - cell hea PACKED; /* top of the heap: relative to base + amxhdr->dat */ - cell hlw PACKED; /* bottom of the heap: relative to base + amxhdr->dat */ - cell stk PACKED; /* stack pointer: relative to base + amxhdr->dat */ - cell stp PACKED; /* top of the stack: relative to base + amxhdr->dat */ - int flags PACKED; /* current status, see amx_Flags() */ - /* user data */ - long usertags[AMX_USERNUM] PACKED; - //okay userdata[3] in AMX Mod X is for the CPlugin * pointer - //we're also gonna set userdata[2] to a special debug structure - void _FAR *userdata[AMX_USERNUM] PACKED; - /* native functions can raise an error */ - int error PACKED; - /* passing parameters requires a "count" field */ - int paramcount; - /* the sleep opcode needs to store the full AMX status */ - cell pri PACKED; - cell alt PACKED; - cell reset_stk PACKED; - cell reset_hea PACKED; - cell sysreq_d PACKED; /* relocated address/value for the SYSREQ.D opcode */ - /* support variables for the JIT */ - int reloc_size PACKED; /* required temporary buffer for relocations */ - long code_size PACKED; /* estimated memory footprint of the native code */ -} PACKED AMX; - -enum { - AMX_ERR_NONE, - /* reserve the first 15 error codes for exit codes of the abstract machine */ - AMX_ERR_EXIT, /* forced exit */ - AMX_ERR_ASSERT, /* assertion failed */ - AMX_ERR_STACKERR, /* stack/heap collision */ - AMX_ERR_BOUNDS, /* index out of bounds */ - AMX_ERR_MEMACCESS, /* invalid memory access */ - AMX_ERR_INVINSTR, /* invalid instruction */ - AMX_ERR_STACKLOW, /* stack underflow */ - AMX_ERR_HEAPLOW, /* heap underflow */ - AMX_ERR_CALLBACK, /* no callback, or invalid callback */ - AMX_ERR_NATIVE, /* native function failed */ - AMX_ERR_DIVIDE, /* divide by zero */ - AMX_ERR_SLEEP, /* go into sleepmode - code can be restarted */ - AMX_ERR_INVSTATE, /* invalid state for this access */ - - AMX_ERR_MEMORY = 16, /* out of memory */ - AMX_ERR_FORMAT, /* invalid file format */ - AMX_ERR_VERSION, /* file is for a newer version of the AMX */ - AMX_ERR_NOTFOUND, /* function not found */ - AMX_ERR_INDEX, /* invalid index parameter (bad entry point) */ - AMX_ERR_DEBUG, /* debugger cannot run */ - AMX_ERR_INIT, /* AMX not initialized (or doubly initialized) */ - AMX_ERR_USERDATA, /* unable to set user data field (table full) */ - AMX_ERR_INIT_JIT, /* cannot initialize the JIT */ - AMX_ERR_PARAMS, /* parameter error */ - AMX_ERR_DOMAIN, /* domain error, expression result does not fit in range */ -}; - -#if !defined AMX_NO_ALIGN - #if defined __linux__ - #pragma pack() /* reset default packing */ - #else - #pragma pack(pop) /* reset previous packing */ - #endif -#endif - - -// ***** declare functions ***** - -#ifdef USE_METAMOD -void UTIL_LogPrintf( char *fmt, ... ); -void UTIL_HudMessage(CBaseEntity *pEntity, const hudtextparms_t &textparms, const char *pMessage); -short FixedSigned16( float value, float scale ); -unsigned short FixedUnsigned16( float value, float scale ); - -#ifdef FN_META_QUERY -void FN_META_QUERY(void); -#endif // FN_META_QUERY - -#ifdef FN_META_ATTACH -void FN_META_ATTACH(void); -#endif // FN_META_ATTACH - -#ifdef FN_META_DETACH -void FN_META_DETACH(void); -#endif // FN_META_DETACH - - - - - -#ifdef FN_GameDLLInit -void FN_GameDLLInit(void); -#endif // FN_GameDLLInit - -#ifdef FN_DispatchSpawn -int FN_DispatchSpawn(edict_t *pent); -#endif // FN_DispatchSpawn - -#ifdef FN_DispatchThink -void FN_DispatchThink(edict_t *pent); -#endif // FN_DispatchThink - -#ifdef FN_DispatchUse -void FN_DispatchUse(edict_t *pentUser, edict_t *pentOther); -#endif // FN_DispatchUse - -#ifdef FN_DispatchTouch -void FN_DispatchTouch(edict_t *pentTouched, edict_t *pentOther); -#endif // FN_DispatchTouch - -#ifdef FN_DispatchBlocked -void FN_DispatchBlocked(edict_t *pentBlocked, edict_t *pentOther); -#endif // FN_DispatchBlocked - -#ifdef FN_DispatchKeyValue -void FN_DispatchKeyValue(edict_t *pentKeyvalue, KeyValueData *pkvd); -#endif // FN_DispatchKeyValue - -#ifdef FN_DispatchSave -void FN_DispatchSave(edict_t *pent, SAVERESTOREDATA *pSaveData); -#endif // FN_DispatchSave - -#ifdef FN_DispatchRestore -int FN_DispatchRestore(edict_t *pent, SAVERESTOREDATA *pSaveData, int globalEntity); -#endif // FN_DispatchRestore - -#ifdef FN_DispatchObjectCollsionBox -void FN_DispatchObjectCollsionBox(edict_t *pent); -#endif // FN_DispatchObjectCollsionBox - -#ifdef FN_SaveWriteFields -void FN_SaveWriteFields(SAVERESTOREDATA *pSaveData, const char *pname, void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount); -#endif // FN_SaveWriteFields - -#ifdef FN_SaveReadFields -void FN_SaveReadFields(SAVERESTOREDATA *pSaveData, const char *pname, void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount); -#endif // FN_SaveReadFields - -#ifdef FN_SaveGlobalState -void FN_SaveGlobalState(SAVERESTOREDATA *pSaveData); -#endif // FN_SaveGlobalState - -#ifdef FN_RestoreGlobalState -void FN_RestoreGlobalState(SAVERESTOREDATA *pSaveData); -#endif // FN_RestoreGlobalState - -#ifdef FN_ResetGlobalState -void FN_ResetGlobalState(void); -#endif // FN_ResetGlobalState - -#ifdef FN_ClientConnect -BOOL FN_ClientConnect(edict_t *pEntity, const char *pszName, const char *pszAddress, char szRejectReason[ 128 ]); -#endif // FN_ClientConnect - -#ifdef FN_ClientDisconnect -void FN_ClientDisconnect(edict_t *pEntity); -#endif // FN_ClientDisconnect - -#ifdef FN_ClientKill -void FN_ClientKill(edict_t *pEntity); -#endif // FN_ClientKill - -#ifdef FN_ClientPutInServer -void FN_ClientPutInServer(edict_t *pEntity); -#endif // FN_ClientPutInServer - -#ifdef FN_ClientCommand -void FN_ClientCommand(edict_t *pEntity); -#endif // FN_ClientCommand - -#ifdef FN_ClientUserInfoChanged -void FN_ClientUserInfoChanged(edict_t *pEntity, char *infobuffer); -#endif // FN_ClientUserInfoChanged - -#ifdef FN_ServerActivate -void FN_ServerActivate(edict_t *pEdictList, int edictCount, int clientMax); -#endif // FN_ServerActivate - -#ifdef FN_ServerDeactivate -void FN_ServerDeactivate(void); -#endif // FN_ServerDeactivate - -#ifdef FN_PlayerPreThink -void FN_PlayerPreThink(edict_t *pEntity); -#endif // FN_PlayerPreThink - -#ifdef FN_PlayerPostThink -void FN_PlayerPostThink(edict_t *pEntity); -#endif // FN_PlayerPostThink - -#ifdef FN_StartFrame -void FN_StartFrame(void); -#endif // FN_StartFrame - -#ifdef FN_ParmsNewLevel -void FN_ParmsNewLevel(void); -#endif // FN_ParmsNewLevel - -#ifdef FN_ParmsChangeLevel -void FN_ParmsChangeLevel(void); -#endif // FN_ParmsChangeLevel - -#ifdef FN_GetGameDescription -const char *FN_GetGameDescription(void); -#endif // FN_GetGameDescription - -#ifdef FN_PlayerCustomization -void FN_PlayerCustomization(edict_t *pEntity, customization_t *pCust); -#endif // FN_PlayerCustomization - -#ifdef FN_SpectatorConnect -void FN_SpectatorConnect(edict_t *pEntity); -#endif // FN_SpectatorConnect - -#ifdef FN_SpectatorDisconnect -void FN_SpectatorDisconnect(edict_t *pEntity); -#endif // FN_SpectatorDisconnect - -#ifdef FN_SpectatorThink -void FN_SpectatorThink(edict_t *pEntity); -#endif // FN_SpectatorThink - -#ifdef FN_Sys_Error -void FN_Sys_Error(const char *error_string); -#endif // FN_Sys_Error - -#ifdef FN_PM_Move -void FN_PM_Move(struct playermove_s *ppmove, int server); -#endif // FN_PM_Move - -#ifdef FN_PM_Init -void FN_PM_Init(struct playermove_s *ppmove); -#endif // FN_PM_Init - -#ifdef FN_PM_FindTextureType -char FN_PM_FindTextureType(char *name); -#endif // FN_PM_FindTextureType - -#ifdef FN_SetupVisibility -void FN_SetupVisibility(edict_t *pViewEntity, edict_t *pClient, unsigned char **pvs, unsigned char **pas); -#endif // FN_SetupVisibility - -#ifdef FN_UpdateClientData -void FN_UpdateClientData(const struct edict_s *ent, int sendweapons, struct clientdata_s *cd); -#endif // FN_UpdateClientData - -#ifdef FN_AddToFullPack -int FN_AddToFullPack(struct entity_state_s *state, int e, edict_t *ent, edict_t *host, int hostflags, int player, unsigned char *pSet); -#endif // FN_AddToFullPack - -#ifdef FN_CreateBaseline -void FN_CreateBaseline(int player, int eindex, struct entity_state_s *baseline, struct edict_s *entity, int playermodelindex, vec3_t player_mins, vec3_t player_maxs); -#endif // FN_CreateBaseline - -#ifdef FN_RegisterEncoders -void FN_RegisterEncoders(void); -#endif // FN_RegisterEncoders - -#ifdef FN_GetWeaponData -int FN_GetWeaponData(struct edict_s *player, struct weapon_data_s *info); -#endif // FN_GetWeaponData - -#ifdef FN_CmdStart -void FN_CmdStart(const edict_t *player, const struct usercmd_s *cmd, unsigned int random_seed); -#endif // FN_CmdStart - -#ifdef FN_CmdEnd -void FN_CmdEnd(const edict_t *player); -#endif // FN_CmdEnd - -#ifdef FN_ConnectionlessPacket -int FN_ConnectionlessPacket(const struct netadr_s *net_from, const char *args, char *response_buffer, int *response_buffer_size); -#endif // FN_ConnectionlessPacket - -#ifdef FN_GetHullBounds -int FN_GetHullBounds(int hullnumber, float *mins, float *maxs); -#endif // FN_GetHullBounds - -#ifdef FN_CreateInstancedBaselines -void FN_CreateInstancedBaselines(void); -#endif // FN_CreateInstancedBaselines - -#ifdef FN_InconsistentFile -int FN_InconsistentFile(const edict_t *player, const char *filename, char *disconnect_message); -#endif // FN_InconsistentFile - -#ifdef FN_AllowLagCompensation -int FN_AllowLagCompensation(void); -#endif // FN_AllowLagCompensation - - - - -#ifdef FN_GameDLLInit_Post -void FN_GameDLLInit_Post(void); -#endif // FN_GameDLLInit_Post - -#ifdef FN_DispatchSpawn_Post -int FN_DispatchSpawn_Post(edict_t *pent); -#endif // FN_DispatchSpawn_Post - -#ifdef FN_DispatchThink_Post -void FN_DispatchThink_Post(edict_t *pent); -#endif // FN_DispatchThink_Post - -#ifdef FN_DispatchUse_Post -void FN_DispatchUse_Post(edict_t *pentUser, edict_t *pentOther); -#endif // FN_DispatchUse_Post - -#ifdef FN_DispatchTouch_Post -void FN_DispatchTouch_Post(edict_t *pentTouched, edict_t *pentOther); -#endif // FN_DispatchTouch_Post - -#ifdef FN_DispatchBlocked_Post -void FN_DispatchBlocked_Post(edict_t *pentBlocked, edict_t *pentOther); -#endif // FN_DispatchBlocked_Post - -#ifdef FN_DispatchKeyValue_Post -void FN_DispatchKeyValue_Post(edict_t *pentKeyvalue, KeyValueData *pkvd); -#endif // FN_DispatchKeyValue_Post - -#ifdef FN_DispatchSave_Post -void FN_DispatchSave_Post(edict_t *pent, SAVERESTOREDATA *pSaveData); -#endif // FN_DispatchSave_Post - -#ifdef FN_DispatchRestore_Post -int FN_DispatchRestore_Post(edict_t *pent, SAVERESTOREDATA *pSaveData, int globalEntity); -#endif // FN_DispatchRestore_Post - -#ifdef FN_DispatchObjectCollsionBox_Post -void FN_DispatchObjectCollsionBox_Post(edict_t *pent); -#endif // FN_DispatchObjectCollsionBox_Post - -#ifdef FN_SaveWriteFields_Post -void FN_SaveWriteFields_Post(SAVERESTOREDATA *pSaveData, const char *pname, void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount); -#endif // FN_SaveWriteFields_Post - -#ifdef FN_SaveReadFields_Post -void FN_SaveReadFields_Post(SAVERESTOREDATA *pSaveData, const char *pname, void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount); -#endif // FN_SaveReadFields_Post - -#ifdef FN_SaveGlobalState_Post -void FN_SaveGlobalState_Post(SAVERESTOREDATA *pSaveData); -#endif // FN_SaveGlobalState_Post - -#ifdef FN_RestoreGlobalState_Post -void FN_RestoreGlobalState_Post(SAVERESTOREDATA *pSaveData); -#endif // FN_RestoreGlobalState_Post - -#ifdef FN_ResetGlobalState_Post -void FN_ResetGlobalState_Post(void); -#endif // FN_ResetGlobalState_Post - -#ifdef FN_ClientConnect_Post -BOOL FN_ClientConnect_Post(edict_t *pEntity, const char *pszName, const char *pszAddress, char szRejectReason[ 128 ]); -#endif // FN_ClientConnect_Post - -#ifdef FN_ClientDisconnect_Post -void FN_ClientDisconnect_Post(edict_t *pEntity); -#endif // FN_ClientDisconnect_Post - -#ifdef FN_ClientKill_Post -void FN_ClientKill_Post(edict_t *pEntity); -#endif // FN_ClientKill_Post - -#ifdef FN_ClientPutInServer_Post -void FN_ClientPutInServer_Post(edict_t *pEntity); -#endif // FN_ClientPutInServer_Post - -#ifdef FN_ClientCommand_Post -void FN_ClientCommand_Post(edict_t *pEntity); -#endif // FN_ClientCommand_Post - -#ifdef FN_ClientUserInfoChanged_Post -void FN_ClientUserInfoChanged_Post(edict_t *pEntity, char *infobuffer); -#endif // FN_ClientUserInfoChanged_Post - -#ifdef FN_ServerActivate_Post -void FN_ServerActivate_Post(edict_t *pEdictList, int edictCount, int clientMax); -#endif // FN_ServerActivate_Post - -#ifdef FN_ServerDeactivate_Post -void FN_ServerDeactivate_Post(void); -#endif // FN_ServerDeactivate_Post - -#ifdef FN_PlayerPreThink_Post -void FN_PlayerPreThink_Post(edict_t *pEntity); -#endif // FN_PlayerPreThink_Post - -#ifdef FN_PlayerPostThink_Post -void FN_PlayerPostThink_Post(edict_t *pEntity); -#endif // FN_PlayerPostThink_Post - -#ifdef FN_StartFrame_Post -void FN_StartFrame_Post(void); -#endif // FN_StartFrame_Post - -#ifdef FN_ParmsNewLevel_Post -void FN_ParmsNewLevel_Post(void); -#endif // FN_ParmsNewLevel_Post - -#ifdef FN_ParmsChangeLevel_Post -void FN_ParmsChangeLevel_Post(void); -#endif // FN_ParmsChangeLevel_Post - -#ifdef FN_GetGameDescription_Post -const char *FN_GetGameDescription_Post(void); -#endif // FN_GetGameDescription_Post - -#ifdef FN_PlayerCustomization_Post -void FN_PlayerCustomization_Post(edict_t *pEntity, customization_t *pCust); -#endif // FN_PlayerCustomization_Post - -#ifdef FN_SpectatorConnect_Post -void FN_SpectatorConnect_Post(edict_t *pEntity); -#endif // FN_SpectatorConnect_Post - -#ifdef FN_SpectatorDisconnect_Post -void FN_SpectatorDisconnect_Post(edict_t *pEntity); -#endif // FN_SpectatorDisconnect_Post - -#ifdef FN_SpectatorThink_Post -void FN_SpectatorThink_Post(edict_t *pEntity); -#endif // FN_SpectatorThink_Post - -#ifdef FN_Sys_Error_Post -void FN_Sys_Error_Post(const char *error_string); -#endif // FN_Sys_Error_Post - -#ifdef FN_PM_Move_Post -void FN_PM_Move_Post(struct playermove_s *ppmove, int server); -#endif // FN_PM_Move_Post - -#ifdef FN_PM_Init_Post -void FN_PM_Init_Post(struct playermove_s *ppmove); -#endif // FN_PM_Init_Post - -#ifdef FN_PM_FindTextureType_Post -char FN_PM_FindTextureType_Post(char *name); -#endif // FN_PM_FindTextureType_Post - -#ifdef FN_SetupVisibility_Post -void FN_SetupVisibility_Post(edict_t *pViewEntity, edict_t *pClient, unsigned char **pvs, unsigned char **pas); -#endif // FN_SetupVisibility_Post - -#ifdef FN_UpdateClientData_Post -void FN_UpdateClientData_Post(const struct edict_s *ent, int sendweapons, struct clientdata_s *cd); -#endif // FN_UpdateClientData_Post - -#ifdef FN_AddToFullPack_Post -int FN_AddToFullPack_Post(struct entity_state_s *state, int e, edict_t *ent, edict_t *host, int hostflags, int player, unsigned char *pSet); -#endif // FN_AddToFullPack_Post - -#ifdef FN_CreateBaseline_Post -void FN_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); -#endif // FN_CreateBaseline_Post - -#ifdef FN_RegisterEncoders_Post -void FN_RegisterEncoders_Post(void); -#endif // FN_RegisterEncoders_Post - -#ifdef FN_GetWeaponData_Post -int FN_GetWeaponData_Post(struct edict_s *player, struct weapon_data_s *info); -#endif // FN_GetWeaponData_Post - -#ifdef FN_CmdStart_Post -void FN_CmdStart_Post(const edict_t *player, const struct usercmd_s *cmd, unsigned int random_seed); -#endif // FN_CmdStart_Post - -#ifdef FN_CmdEnd_Post -void FN_CmdEnd_Post(const edict_t *player); -#endif // FN_CmdEnd_Post - -#ifdef FN_ConnectionlessPacket_Post -int FN_ConnectionlessPacket_Post(const struct netadr_s *net_from, const char *args, char *response_buffer, int *response_buffer_size); -#endif // FN_ConnectionlessPacket_Post - -#ifdef FN_GetHullBounds_Post -int FN_GetHullBounds_Post(int hullnumber, float *mins, float *maxs); -#endif // FN_GetHullBounds_Post - -#ifdef FN_CreateInstancedBaselines_Post -void FN_CreateInstancedBaselines_Post(void); -#endif // FN_CreateInstancedBaselines_Post - -#ifdef FN_InconsistentFile_Post -int FN_InconsistentFile_Post(const edict_t *player, const char *filename, char *disconnect_message); -#endif // FN_InconsistentFile_Post - -#ifdef FN_AllowLagCompensation_Post -int FN_AllowLagCompensation_Post(void); -#endif // FN_AllowLagCompensation_Post - - - -#ifdef FN_PrecacheModel -int FN_PrecacheModel(char *s); -#endif // FN_PrecacheModel - -#ifdef FN_PrecacheSound -int FN_PrecacheSound(char *s); -#endif // FN_PrecacheSound - -#ifdef FN_SetModel -void FN_SetModel(edict_t *e, const char *m); -#endif // FN_SetModel - -#ifdef FN_ModelIndex -int FN_ModelIndex(const char *m); -#endif // FN_ModelIndex - -#ifdef FN_ModelFrames -int FN_ModelFrames(int modelIndex); -#endif // FN_ModelFrames - -#ifdef FN_SetSize -void FN_SetSize(edict_t *e, const float *rgflMin, const float *rgflMax); -#endif // FN_SetSize - -#ifdef FN_ChangeLevel -void FN_ChangeLevel(char *s1, char *s2); -#endif // FN_ChangeLevel - -#ifdef FN_GetSpawnParms -void FN_GetSpawnParms(edict_t *ent); -#endif // FN_GetSpawnParms - -#ifdef FN_SaveSpawnParms -void FN_SaveSpawnParms(edict_t *ent); -#endif // FN_SaveSpawnParms - -#ifdef FN_VecToYaw -float FN_VecToYaw(const float *rgflVector); -#endif // FN_VecToYaw - -#ifdef FN_VecToAngles -void FN_VecToAngles(const float *rgflVectorIn, float *rgflVectorOut); -#endif // FN_VecToAngles - -#ifdef FN_MoveToOrigin -void FN_MoveToOrigin(edict_t *ent, const float *pflGoal, float dist, int iMoveType); -#endif // FN_MoveToOrigin - -#ifdef FN_ChangeYaw -void FN_ChangeYaw(edict_t *ent); -#endif // FN_ChangeYaw - -#ifdef FN_ChangePitch -void FN_ChangePitch(edict_t *ent); -#endif // FN_ChangePitch - -#ifdef FN_FindEntityByString -edict_t *FN_FindEntityByString(edict_t *pEdictStartSearchAfter, const char *pszField, const char *pszValue); -#endif // FN_FindEntityByString - -#ifdef FN_GetEntityIllum -int FN_GetEntityIllum(edict_t *pEnt); -#endif // FN_GetEntityIllum - -#ifdef FN_FindEntityInSphere -edict_t *FN_FindEntityInSphere(edict_t *pEdictStartSearchAfter, const float *org, float rad); -#endif // FN_FindEntityInSphere - -#ifdef FN_FindClientInPVS -edict_t *FN_FindClientInPVS(edict_t *pEdict); -#endif // FN_FindClientInPVS - -#ifdef FN_EntitiesInPVS -edict_t *FN_EntitiesInPVS(edict_t *pplayer); -#endif // FN_EntitiesInPVS - -#ifdef FN_MakeVectors -void FN_MakeVectors(const float *rgflVector); -#endif // FN_MakeVectors - -#ifdef FN_AngleVectors -void FN_AngleVectors(const float *rgflVector, float *forward, float *right, float *up); -#endif // FN_AngleVectors - -#ifdef FN_CreateEntity -edict_t *FN_CreateEntity(void); -#endif // FN_CreateEntity - -#ifdef FN_RemoveEntity -void FN_RemoveEntity(edict_t *e); -#endif // FN_RemoveEntity - -#ifdef FN_CreateNamedEntity -edict_t *FN_CreateNamedEntity(int className); -#endif // FN_CreateNamedEntity - -#ifdef FN_MakeStatic -void FN_MakeStatic(edict_t *ent); -#endif // FN_MakeStatic - -#ifdef FN_EntIsOnFloor -int FN_EntIsOnFloor(edict_t *ent); -#endif // FN_EntIsOnFloor - -#ifdef FN_DropToFloor -int FN_DropToFloor(edict_t *ent); -#endif // FN_DropToFloor - -#ifdef FN_WalkMove -int FN_WalkMove(edict_t *ent, float yaw, float dist, int iMode); -#endif // FN_WalkMove - -#ifdef FN_SetOrigin -void FN_SetOrigin(edict_t *e, const float *rgflOrigin); -#endif // FN_SetOrigin - -#ifdef FN_EmitSound -void FN_EmitSound(edict_t *entity, int channel, const char *sample, /*int*/float volume, float attenuation, int fFlags, int pitch); -#endif // FN_EmitSound - -#ifdef FN_EmitAmbientSound -void FN_EmitAmbientSound(edict_t *entity, float *pos, const char *samp, float vol, float attenuation, int fFlags, int pitch); -#endif // FN_EmitAmbientSound - -#ifdef FN_TraceLine -void FN_TraceLine(const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr); -#endif // FN_TraceLine - -#ifdef FN_TraceToss -void FN_TraceToss(edict_t *pent, edict_t *pentToIgnore, TraceResult *ptr); -#endif // FN_TraceToss - -#ifdef FN_TraceMonsterHull -int FN_TraceMonsterHull(edict_t *pEdict, const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr); -#endif // FN_TraceMonsterHull - -#ifdef FN_TraceHull -void FN_TraceHull(const float *v1, const float *v2, int fNoMonsters, int hullNumber, edict_t *pentToSkip, TraceResult *ptr); -#endif // FN_TraceHull - -#ifdef FN_TraceModel -void FN_TraceModel(const float *v1, const float *v2, int hullNumber, edict_t *pent, TraceResult *ptr); -#endif // FN_TraceModel - -#ifdef FN_TraceTexture -const char *FN_TraceTexture(edict_t *pTextureEntity, const float *v1, const float *v2 ); -#endif // FN_TraceTexture - -#ifdef FN_TraceSphere -void FN_TraceSphere(const float *v1, const float *v2, int fNoMonsters, float radius, edict_t *pentToSkip, TraceResult *ptr); -#endif // FN_TraceSphere - -#ifdef FN_GetAimVector -void FN_GetAimVector(edict_t *ent, float speed, float *rgflReturn); -#endif // FN_GetAimVector - -#ifdef FN_ServerCommand -void FN_ServerCommand(char *str); -#endif // FN_ServerCommand - -#ifdef FN_ServerExecute -void FN_ServerExecute(void); -#endif // FN_ServerExecute - -#ifdef FN_engClientCommand -void FN_engClientCommand(edict_t *pEdict, char *szFmt, ...); -#endif // FN_engClientCommand - -#ifdef FN_ParticleEffect -void FN_ParticleEffect(const float *org, const float *dir, float color, float count); -#endif // FN_ParticleEffect - -#ifdef FN_LightStyle -void FN_LightStyle(int style, char *val); -#endif // FN_LightStyle - -#ifdef FN_DecalIndex -int FN_DecalIndex(const char *name); -#endif // FN_DecalIndex - -#ifdef FN_PointContents -int FN_PointContents(const float *rgflVector); -#endif // FN_PointContents - -#ifdef FN_MessageBegin -void FN_MessageBegin(int msg_dest, int msg_type, const float *pOrigin, edict_t *ed); -#endif // FN_MessageBegin - -#ifdef FN_MessageEnd -void FN_MessageEnd(void); -#endif // FN_MessageEnd - -#ifdef FN_WriteByte -void FN_WriteByte(int iValue); -#endif // FN_WriteByte - -#ifdef FN_WriteChar -void FN_WriteChar(int iValue); -#endif // FN_WriteChar - -#ifdef FN_WriteShort -void FN_WriteShort(int iValue); -#endif // FN_WriteShort - -#ifdef FN_WriteLong -void FN_WriteLong(int iValue); -#endif // FN_WriteLong - -#ifdef FN_WriteAngle -void FN_WriteAngle(float flValue); -#endif // FN_WriteAngle - -#ifdef FN_WriteCoord -void FN_WriteCoord(float flValue); -#endif // FN_WriteCoord - -#ifdef FN_WriteString -void FN_WriteString(const char *sz); -#endif // FN_WriteString - -#ifdef FN_WriteEntity -void FN_WriteEntity(int iValue); -#endif // FN_WriteEntity - -#ifdef FN_CVarRegister -void FN_CVarRegister(cvar_t *pCvar); -#endif // FN_CVarRegister - -#ifdef FN_CVarGetFloat -float FN_CVarGetFloat(const char *szVarName); -#endif // FN_CVarGetFloat - -#ifdef FN_CVarGetString -const char *FN_CVarGetString(const char *szVarName); -#endif // FN_CVarGetString - -#ifdef FN_CVarSetFloat -void FN_CVarSetFloat(const char *szVarName, float flValue); -#endif // FN_CVarSetFloat - -#ifdef FN_CVarSetString -void FN_CVarSetString(const char *szVarName, const char *szValue); -#endif // FN_CVarSetString - -#ifdef FN_AlertMessage -void FN_AlertMessage(ALERT_TYPE atype, char *szFmt, ...); -#endif // FN_AlertMessage - -#ifdef FN_EngineFprintf -void FN_EngineFprintf(FILE *pfile, char *szFmt, ...); -#endif // FN_EngineFprintf - -#ifdef FN_PvAllocEntPrivateData -void *FN_PvAllocEntPrivateData(edict_t *pEdict, int32 cb); -#endif // FN_PvAllocEntPrivateData - -#ifdef FN_PvEntPrivateData -void *FN_PvEntPrivateData(edict_t *pEdict); -#endif // FN_PvEntPrivateData - -#ifdef FN_FreeEntPrivateData -void FN_FreeEntPrivateData(edict_t *pEdict); -#endif // FN_FreeEntPrivateData - -#ifdef FN_SzFromIndex -const char *FN_SzFromIndex(int iString); -#endif // FN_SzFromIndex - -#ifdef FN_AllocString -int FN_AllocString(const char *szValue); -#endif // FN_AllocString - -#ifdef FN_GetVarsOfEnt -struct entvars_s *FN_GetVarsOfEnt(edict_t *pEdict); -#endif // FN_GetVarsOfEnt - -#ifdef FN_PEntityOfEntOffset -edict_t *FN_PEntityOfEntOffset(int iEntOffset); -#endif // FN_PEntityOfEntOffset - -#ifdef FN_EntOffsetOfPEntity -int FN_EntOffsetOfPEntity(const edict_t *pEdict); -#endif // FN_EntOffsetOfPEntity - -#ifdef FN_IndexOfEdict -int FN_IndexOfEdict(const edict_t *pEdict); -#endif // FN_IndexOfEdict - -#ifdef FN_PEntityOfEntIndex -edict_t *FN_PEntityOfEntIndex(int iEntIndex); -#endif // FN_PEntityOfEntIndex - -#ifdef FN_FindEntityByVars -edict_t *FN_FindEntityByVars(struct entvars_s *pvars); -#endif // FN_FindEntityByVars - -#ifdef FN_GetModelPtr -void *FN_GetModelPtr(edict_t *pEdict); -#endif // FN_GetModelPtr - -#ifdef FN_RegUserMsg -int FN_RegUserMsg(const char *pszName, int iSize); -#endif // FN_RegUserMsg - -#ifdef FN_AnimationAutomove -void FN_AnimationAutomove(const edict_t *pEdict, float flTime); -#endif // FN_AnimationAutomove - -#ifdef FN_GetBonePosition -void FN_GetBonePosition(const edict_t *pEdict, int iBone, float *rgflOrigin, float *rgflAngles); -#endif // FN_GetBonePosition - -#ifdef FN_FunctionFromName -unsigned long FN_FunctionFromName(const char *pName); -#endif // FN_FunctionFromName - -#ifdef FN_NameForFunction -const char *FN_NameForFunction(unsigned long function); -#endif // FN_NameForFunction - -#ifdef FN_ClientPrintf -void FN_ClientPrintf(edict_t *pEdict, PRINT_TYPE ptype, const char *szMsg); -#endif // FN_ClientPrintf - -#ifdef FN_ServerPrint -void FN_ServerPrint(const char *szMsg); -#endif // FN_ServerPrint - -#ifdef FN_Cmd_Args -const char *FN_Cmd_Args(void); -#endif // FN_Cmd_Args - -#ifdef FN_Cmd_Argv -const char *FN_Cmd_Argv(int argc); -#endif // FN_Cmd_Argv - -#ifdef FN_Cmd_Argc -int FN_Cmd_Argc(void); -#endif // FN_Cmd_Argc - -#ifdef FN_GetAttachment -void FN_GetAttachment(const edict_t *pEdict, int iAttachment, float *rgflOrigin, float *rgflAngles ); -#endif // FN_GetAttachment - -#ifdef FN_CRC32_Init -void FN_CRC32_Init(CRC32_t *pulCRC); -#endif // FN_CRC32_Init - -#ifdef FN_CRC32_ProcessBuffer -void FN_CRC32_ProcessBuffer(CRC32_t *pulCRC, void *p, int len); -#endif // FN_CRC32_ProcessBuffer - -#ifdef FN_CRC32_ProcessByte -void FN_CRC32_ProcessByte(CRC32_t *pulCRC, unsigned char ch); -#endif // FN_CRC32_ProcessByte - -#ifdef FN_CRC32_Final -CRC32_t FN_CRC32_Final(CRC32_t pulCRC); -#endif // FN_CRC32_Final - -#ifdef FN_RandomLong -long FN_RandomLong(long lLow, long lHigh); -#endif // FN_RandomLong - -#ifdef FN_RandomFloat -float FN_RandomFloat(float flLow, float flHigh); -#endif // FN_RandomFloat - -#ifdef FN_SetView -void FN_SetView(const edict_t *pClient, const edict_t *pViewent); -#endif // FN_SetView - -#ifdef FN_Time -float FN_Time(void); -#endif // FN_Time - -#ifdef FN_CrosshairAngle -void FN_CrosshairAngle(const edict_t *pClient, float pitch, float yaw); -#endif // FN_CrosshairAngle - -#ifdef FN_LoadFileForMe -byte *FN_LoadFileForMe(char *filename, int *pLength); -#endif // FN_LoadFileForMe - -#ifdef FN_FreeFile -void FN_FreeFile(void *buffer); -#endif // FN_FreeFile - -#ifdef FN_EndSection -void FN_EndSection(const char *pszSectionName); -#endif // FN_EndSection - -#ifdef FN_CompareFileTime -int FN_CompareFileTime(char *filename1, char *filename2, int *iCompare); -#endif // FN_CompareFileTime - -#ifdef FN_GetGameDir -void FN_GetGameDir(char *szGetGameDir); -#endif // FN_GetGameDir - -#ifdef FN_Cvar_RegisterVariable -void FN_Cvar_RegisterVariable(cvar_t *variable); -#endif // FN_Cvar_RegisterVariable - -#ifdef FN_FadeClientVolume -void FN_FadeClientVolume(const edict_t *pEdict, int fadePercent, int fadeOutSeconds, int holdTime, int fadeInSeconds); -#endif // FN_FadeClientVolume - -#ifdef FN_SetClientMaxspeed -void FN_SetClientMaxspeed(const edict_t *pEdict, float fNewMaxspeed); -#endif // FN_SetClientMaxspeed - -#ifdef FN_CreateFakeClient -edict_t *FN_CreateFakeClient(const char *netname); -#endif // FN_CreateFakeClient - -#ifdef FN_RunPlayerMove -void FN_RunPlayerMove(edict_t *fakeclient, const float *viewangles, float forwardmove, float sidemove, float upmove, unsigned short buttons, byte impulse, byte msec); -#endif // FN_RunPlayerMove - -#ifdef FN_NumberOfEntities -int FN_NumberOfEntities(void); -#endif // FN_NumberOfEntities - -#ifdef FN_GetInfoKeyBuffer -char *FN_GetInfoKeyBuffer(edict_t *e); -#endif // FN_GetInfoKeyBuffer - -#ifdef FN_InfoKeyValue -char *FN_InfoKeyValue(char *infobuffer, char *key); -#endif // FN_InfoKeyValue - -#ifdef FN_SetKeyValue -void FN_SetKeyValue(char *infobuffer, char *key, char *value); -#endif // FN_SetKeyValue - -#ifdef FN_SetClientKeyValue -void FN_SetClientKeyValue(int clientIndex, char *infobuffer, char *key, char *value); -#endif // FN_SetClientKeyValue - -#ifdef FN_IsMapValid -int FN_IsMapValid(char *filename); -#endif // FN_IsMapValid - -#ifdef FN_StaticDecal -void FN_StaticDecal(const float *origin, int decalIndex, int entityIndex, int modelIndex); -#endif // FN_StaticDecal - -#ifdef FN_PrecacheGeneric -int FN_PrecacheGeneric(char *s); -#endif // FN_PrecacheGeneric - -#ifdef FN_GetPlayerUserId -int FN_GetPlayerUserId(edict_t *e ); -#endif // FN_GetPlayerUserId - -#ifdef FN_BuildSoundMsg -void FN_BuildSoundMsg(edict_t *entity, int channel, const char *sample, /*int*/float volume, float attenuation, int fFlags, int pitch, int msg_dest, int msg_type, const float *pOrigin, edict_t *ed); -#endif // FN_BuildSoundMsg - -#ifdef FN_IsDedicatedServer -int FN_IsDedicatedServer(void); -#endif // FN_IsDedicatedServer - -#ifdef FN_CVarGetPointer -cvar_t *FN_CVarGetPointer(const char *szVarName); -#endif // FN_CVarGetPointer - -#ifdef FN_GetPlayerWONId -unsigned int FN_GetPlayerWONId(edict_t *e); -#endif // FN_GetPlayerWONId - -#ifdef FN_Info_RemoveKey -void FN_Info_RemoveKey( char *s, const char *key); -#endif // FN_Info_RemoveKey - -#ifdef FN_GetPhysicsKeyValue -const char *FN_GetPhysicsKeyValue(const edict_t *pClient, const char *key); -#endif // FN_GetPhysicsKeyValue - -#ifdef FN_SetPhysicsKeyValue -void FN_SetPhysicsKeyValue(const edict_t *pClient, const char *key, const char *value); -#endif // FN_SetPhysicsKeyValue - -#ifdef FN_GetPhysicsInfoString -const char *FN_GetPhysicsInfoString( const edict_t *pClient); -#endif // FN_GetPhysicsInfoString - -#ifdef FN_PrecacheEvent -unsigned short FN_PrecacheEvent(int type, const char *psz); -#endif // FN_PrecacheEvent - -#ifdef FN_PlaybackEvent -void FN_PlaybackEvent(int flags, const edict_t *pInvoker, unsigned short eventindex, float delay, float *origin, float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2); -#endif // FN_PlaybackEvent - -#ifdef FN_SetFatPVS -unsigned char *FN_SetFatPVS(float *org); -#endif // FN_SetFatPVS - -#ifdef FN_SetFatPAS -unsigned char *FN_SetFatPAS(float *org); -#endif // FN_SetFatPAS - -#ifdef FN_CheckVisibility -int FN_CheckVisibility(const edict_t *entity, unsigned char *pset); -#endif // FN_CheckVisibility - -#ifdef FN_DeltaSetField -void FN_DeltaSetField(struct delta_s *pFields, const char *fieldname); -#endif // FN_DeltaSetField - -#ifdef FN_DeltaUnsetField -void FN_DeltaUnsetField(struct delta_s *pFields, const char *fieldname); -#endif // FN_DeltaUnsetField - -#ifdef FN_DeltaAddEncoder -void FN_DeltaAddEncoder(char *name, void (*conditionalencode)( struct delta_s *pFields, const unsigned char *from, const unsigned char *to ) ); -#endif // FN_DeltaAddEncoder - -#ifdef FN_GetCurrentPlayer -int FN_GetCurrentPlayer(void); -#endif // FN_GetCurrentPlayer - -#ifdef FN_CanSkipPlayer -int FN_CanSkipPlayer(const edict_t *player); -#endif // FN_CanSkipPlayer - -#ifdef FN_DeltaFindField -int FN_DeltaFindField(struct delta_s *pFields, const char *fieldname); -#endif // FN_DeltaFindField - -#ifdef FN_DeltaSetFieldByIndex -void FN_DeltaSetFieldByIndex(struct delta_s *pFields, int fieldNumber); -#endif // FN_DeltaSetFieldByIndex - -#ifdef FN_DeltaUnsetFieldByIndex -void FN_DeltaUnsetFieldByIndex(struct delta_s *pFields, int fieldNumber); -#endif // FN_DeltaUnsetFieldByIndex - -#ifdef FN_SetGroupMask -void FN_SetGroupMask(int mask, int op); -#endif // FN_SetGroupMask - -#ifdef FN_engCreateInstancedBaseline -int FN_engCreateInstancedBaseline(int classname, struct entity_state_s *baseline); -#endif // FN_engCreateInstancedBaseline - -#ifdef FN_Cvar_DirectSet -void FN_Cvar_DirectSet(struct cvar_s *var, char *value); -#endif // FN_Cvar_DirectSet - -#ifdef FN_ForceUnmodified -void FN_ForceUnmodified(FORCE_TYPE type, float *mins, float *maxs, const char *filename); -#endif // FN_ForceUnmodified - -#ifdef FN_GetPlayerStats -void FN_GetPlayerStats(const edict_t *pClient, int *ping, int *packet_loss); -#endif // FN_GetPlayerStats - -#ifdef FN_AddServerCommand -void FN_AddServerCommand(char *cmd_name, void (*function) (void)); -#endif // FN_AddServerCommand - -#ifdef FN_Voice_GetClientListening -qboolean FN_Voice_GetClientListening(int iReceiver, int iSender); -#endif // FN_Voice_GetClientListening - -#ifdef FN_Voice_SetClientListening -qboolean FN_Voice_SetClientListening(int iReceiver, int iSender, qboolean bListen); -#endif // FN_Voice_SetClientListening - -#ifdef FN_GetPlayerAuthId -const char *FN_GetPlayerAuthId(edict_t *e); -#endif // FN_GetPlayerAuthId - - - - - - -#ifdef FN_PrecacheModel_Post -int FN_PrecacheModel_Post(char *s); -#endif // FN_PrecacheModel_Post - -#ifdef FN_PrecacheSound_Post -int FN_PrecacheSound_Post(char *s); -#endif // FN_PrecacheSound_Post - -#ifdef FN_SetModel_Post -void FN_SetModel_Post(edict_t *e, const char *m); -#endif // FN_SetModel_Post - -#ifdef FN_ModelIndex_Post -int FN_ModelIndex_Post(const char *m); -#endif // FN_ModelIndex_Post - -#ifdef FN_ModelFrames_Post -int FN_ModelFrames_Post(int modelIndex); -#endif // FN_ModelFrames_Post - -#ifdef FN_SetSize_Post -void FN_SetSize_Post(edict_t *e, const float *rgflMin, const float *rgflMax); -#endif // FN_SetSize_Post - -#ifdef FN_ChangeLevel_Post -void FN_ChangeLevel_Post(char *s1, char *s2); -#endif // FN_ChangeLevel_Post - -#ifdef FN_GetSpawnParms_Post -void FN_GetSpawnParms_Post(edict_t *ent); -#endif // FN_GetSpawnParms_Post - -#ifdef FN_SaveSpawnParms_Post -void FN_SaveSpawnParms_Post(edict_t *ent); -#endif // FN_SaveSpawnParms_Post - -#ifdef FN_VecToYaw_Post -float FN_VecToYaw_Post(const float *rgflVector); -#endif // FN_VecToYaw_Post - -#ifdef FN_VecToAngles_Post -void FN_VecToAngles_Post(const float *rgflVectorIn, float *rgflVectorOut); -#endif // FN_VecToAngles_Post - -#ifdef FN_MoveToOrigin_Post -void FN_MoveToOrigin_Post(edict_t *ent, const float *pflGoal, float dist, int iMoveType); -#endif // FN_MoveToOrigin_Post - -#ifdef FN_ChangeYaw_Post -void FN_ChangeYaw_Post(edict_t *ent); -#endif // FN_ChangeYaw_Post - -#ifdef FN_ChangePitch_Post -void FN_ChangePitch_Post(edict_t *ent); -#endif // FN_ChangePitch_Post - -#ifdef FN_FindEntityByString_Post -edict_t *FN_FindEntityByString_Post(edict_t *pEdictStartSearchAfter, const char *pszField, const char *pszValue); -#endif // FN_FindEntityByString_Post - -#ifdef FN_GetEntityIllum_Post -int FN_GetEntityIllum_Post(edict_t *pEnt); -#endif // FN_GetEntityIllum_Post - -#ifdef FN_FindEntityInSphere_Post -edict_t *FN_FindEntityInSphere_Post(edict_t *pEdictStartSearchAfter, const float *org, float rad); -#endif // FN_FindEntityInSphere_Post - -#ifdef FN_FindClientInPVS_Post -edict_t *FN_FindClientInPVS_Post(edict_t *pEdict); -#endif // FN_FindClientInPVS_Post - -#ifdef FN_EntitiesInPVS_Post -edict_t *FN_EntitiesInPVS_Post(edict_t *pplayer); -#endif // FN_EntitiesInPVS_Post - -#ifdef FN_MakeVectors_Post -void FN_MakeVectors_Post(const float *rgflVector); -#endif // FN_MakeVectors_Post - -#ifdef FN_AngleVectors_Post -void FN_AngleVectors_Post(const float *rgflVector, float *forward, float *right, float *up); -#endif // FN_AngleVectors_Post - -#ifdef FN_CreateEntity_Post -edict_t *FN_CreateEntity_Post(void); -#endif // FN_CreateEntity_Post - -#ifdef FN_RemoveEntity_Post -void FN_RemoveEntity_Post(edict_t *e); -#endif // FN_RemoveEntity_Post - -#ifdef FN_CreateNamedEntity_Post -edict_t *FN_CreateNamedEntity_Post(int className); -#endif // FN_CreateNamedEntity_Post - -#ifdef FN_MakeStatic_Post -void FN_MakeStatic_Post(edict_t *ent); -#endif // FN_MakeStatic_Post - -#ifdef FN_EntIsOnFloor_Post -int FN_EntIsOnFloor_Post(edict_t *ent); -#endif // FN_EntIsOnFloor_Post - -#ifdef FN_DropToFloor_Post -int FN_DropToFloor_Post(edict_t *ent); -#endif // FN_DropToFloor_Post - -#ifdef FN_WalkMove_Post -int FN_WalkMove_Post(edict_t *ent, float yaw, float dist, int iMode); -#endif // FN_WalkMove_Post - -#ifdef FN_SetOrigin_Post -void FN_SetOrigin_Post(edict_t *e, const float *rgflOrigin); -#endif // FN_SetOrigin_Post - -#ifdef FN_EmitSound_Post -void FN_EmitSound_Post(edict_t *entity, int channel, const char *sample, /*int*/float volume, float attenuation, int fFlags, int pitch); -#endif // FN_EmitSound_Post - -#ifdef FN_EmitAmbientSound_Post -void FN_EmitAmbientSound_Post(edict_t *entity, float *pos, const char *samp, float vol, float attenuation, int fFlags, int pitch); -#endif // FN_EmitAmbientSound_Post - -#ifdef FN_TraceLine_Post -void FN_TraceLine_Post(const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr); -#endif // FN_TraceLine_Post - -#ifdef FN_TraceToss_Post -void FN_TraceToss_Post(edict_t *pent, edict_t *pentToIgnore, TraceResult *ptr); -#endif // FN_TraceToss_Post - -#ifdef FN_TraceMonsterHull_Post -int FN_TraceMonsterHull_Post(edict_t *pEdict, const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr); -#endif // FN_TraceMonsterHull_Post - -#ifdef FN_TraceHull_Post -void FN_TraceHull_Post(const float *v1, const float *v2, int fNoMonsters, int hullNumber, edict_t *pentToSkip, TraceResult *ptr); -#endif // FN_TraceHull_Post - -#ifdef FN_TraceModel_Post -void FN_TraceModel_Post(const float *v1, const float *v2, int hullNumber, edict_t *pent, TraceResult *ptr); -#endif // FN_TraceModel_Post - -#ifdef FN_TraceTexture_Post -const char *FN_TraceTexture_Post(edict_t *pTextureEntity, const float *v1, const float *v2 ); -#endif // FN_TraceTexture_Post - -#ifdef FN_TraceSphere_Post -void FN_TraceSphere_Post(const float *v1, const float *v2, int fNoMonsters, float radius, edict_t *pentToSkip, TraceResult *ptr); -#endif // FN_TraceSphere_Post - -#ifdef FN_GetAimVector_Post -void FN_GetAimVector_Post(edict_t *ent, float speed, float *rgflReturn); -#endif // FN_GetAimVector_Post - -#ifdef FN_ServerCommand_Post -void FN_ServerCommand_Post(char *str); -#endif // FN_ServerCommand_Post - -#ifdef FN_ServerExecute_Post -void FN_ServerExecute_Post(void); -#endif // FN_ServerExecute_Post - -#ifdef FN_engClientCommand_Post -void FN_engClientCommand_Post(edict_t *pEdict, char *szFmt, ...); -#endif // FN_engClientCommand_Post - -#ifdef FN_ParticleEffect_Post -void FN_ParticleEffect_Post(const float *org, const float *dir, float color, float count); -#endif // FN_ParticleEffect_Post - -#ifdef FN_LightStyle_Post -void FN_LightStyle_Post(int style, char *val); -#endif // FN_LightStyle_Post - -#ifdef FN_DecalIndex_Post -int FN_DecalIndex_Post(const char *name); -#endif // FN_DecalIndex_Post - -#ifdef FN_PointContents_Post -int FN_PointContents_Post(const float *rgflVector); -#endif // FN_PointContents_Post - -#ifdef FN_MessageBegin_Post -void FN_MessageBegin_Post(int msg_dest, int msg_type, const float *pOrigin, edict_t *ed); -#endif // FN_MessageBegin_Post - -#ifdef FN_MessageEnd_Post -void FN_MessageEnd_Post(void); -#endif // FN_MessageEnd_Post - -#ifdef FN_WriteByte_Post -void FN_WriteByte_Post(int iValue); -#endif // FN_WriteByte_Post - -#ifdef FN_WriteChar_Post -void FN_WriteChar_Post(int iValue); -#endif // FN_WriteChar_Post - -#ifdef FN_WriteShort_Post -void FN_WriteShort_Post(int iValue); -#endif // FN_WriteShort_Post - -#ifdef FN_WriteLong_Post -void FN_WriteLong_Post(int iValue); -#endif // FN_WriteLong_Post - -#ifdef FN_WriteAngle_Post -void FN_WriteAngle_Post(float flValue); -#endif // FN_WriteAngle_Post - -#ifdef FN_WriteCoord_Post -void FN_WriteCoord_Post(float flValue); -#endif // FN_WriteCoord_Post - -#ifdef FN_WriteString_Post -void FN_WriteString_Post(const char *sz); -#endif // FN_WriteString_Post - -#ifdef FN_WriteEntity_Post -void FN_WriteEntity_Post(int iValue); -#endif // FN_WriteEntity_Post - -#ifdef FN_CVarRegister_Post -void FN_CVarRegister_Post(cvar_t *pCvar); -#endif // FN_CVarRegister_Post - -#ifdef FN_CVarGetFloat_Post -float FN_CVarGetFloat_Post(const char *szVarName); -#endif // FN_CVarGetFloat_Post - -#ifdef FN_CVarGetString_Post -const char *FN_CVarGetString_Post(const char *szVarName); -#endif // FN_CVarGetString_Post - -#ifdef FN_CVarSetFloat_Post -void FN_CVarSetFloat_Post(const char *szVarName, float flValue); -#endif // FN_CVarSetFloat_Post - -#ifdef FN_CVarSetString_Post -void FN_CVarSetString_Post(const char *szVarName, const char *szValue); -#endif // FN_CVarSetString_Post - -#ifdef FN_AlertMessage_Post -void FN_AlertMessage_Post(ALERT_TYPE atype, char *szFmt, ...); -#endif // FN_AlertMessage_Post - -#ifdef FN_EngineFprintf_Post -void FN_EngineFprintf_Post(FILE *pfile, char *szFmt, ...); -#endif // FN_EngineFprintf_Post - -#ifdef FN_PvAllocEntPrivateData_Post -void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, long cb); -#endif // FN_PvAllocEntPrivateData_Post - -#ifdef FN_PvEntPrivateData_Post -void *FN_PvEntPrivateData_Post(edict_t *pEdict); -#endif // FN_PvEntPrivateData_Post - -#ifdef FN_FreeEntPrivateData_Post -void FN_FreeEntPrivateData_Post(edict_t *pEdict); -#endif // FN_FreeEntPrivateData_Post - -#ifdef FN_SzFromIndex_Post -const char *FN_SzFromIndex_Post(int iString); -#endif // FN_SzFromIndex_Post - -#ifdef FN_AllocString_Post -int FN_AllocString_Post(const char *szValue); -#endif // FN_AllocString_Post - -#ifdef FN_GetVarsOfEnt_Post -struct entvars_s *FN_GetVarsOfEnt_Post(edict_t *pEdict); -#endif // FN_GetVarsOfEnt_Post - -#ifdef FN_PEntityOfEntOffset_Post -edict_t *FN_PEntityOfEntOffset_Post(int iEntOffset); -#endif // FN_PEntityOfEntOffset_Post - -#ifdef FN_EntOffsetOfPEntity_Post -int FN_EntOffsetOfPEntity_Post(const edict_t *pEdict); -#endif // FN_EntOffsetOfPEntity_Post - -#ifdef FN_IndexOfEdict_Post -int FN_IndexOfEdict_Post(const edict_t *pEdict); -#endif // FN_IndexOfEdict_Post - -#ifdef FN_PEntityOfEntIndex_Post -edict_t *FN_PEntityOfEntIndex_Post(int iEntIndex); -#endif // FN_PEntityOfEntIndex_Post - -#ifdef FN_FindEntityByVars_Post -edict_t *FN_FindEntityByVars_Post(struct entvars_s *pvars); -#endif // FN_FindEntityByVars_Post - -#ifdef FN_GetModelPtr_Post -void *FN_GetModelPtr_Post(edict_t *pEdict); -#endif // FN_GetModelPtr_Post - -#ifdef FN_RegUserMsg_Post -int FN_RegUserMsg_Post(const char *pszName, int iSize); -#endif // FN_RegUserMsg_Post - -#ifdef FN_AnimationAutomove_Post -void FN_AnimationAutomove_Post(const edict_t *pEdict, float flTime); -#endif // FN_AnimationAutomove_Post - -#ifdef FN_GetBonePosition_Post -void FN_GetBonePosition_Post(const edict_t *pEdict, int iBone, float *rgflOrigin, float *rgflAngles); -#endif // FN_GetBonePosition_Post - -#ifdef FN_FunctionFromName_Post -unsigned long FN_FunctionFromName_Post(const char *pName); -#endif // FN_FunctionFromName_Post - -#ifdef FN_NameForFunction_Post -const char *FN_NameForFunction_Post(unsigned long function); -#endif // FN_NameForFunction_Post - -#ifdef FN_ClientPrintf_Post -void FN_ClientPrintf_Post(edict_t *pEdict, PRINT_TYPE ptype, const char *szMsg); -#endif // FN_ClientPrintf_Post - -#ifdef FN_ServerPrint_Post -void FN_ServerPrint_Post(const char *szMsg); -#endif // FN_ServerPrint_Post - -#ifdef FN_Cmd_Args_Post -const char *FN_Cmd_Args_Post(void); -#endif // FN_Cmd_Args_Post - -#ifdef FN_Cmd_Argv_Post -const char *FN_Cmd_Argv_Post(int argc); -#endif // FN_Cmd_Argv_Post - -#ifdef FN_Cmd_Argc_Post -int FN_Cmd_Argc_Post(void); -#endif // FN_Cmd_Argc_Post - -#ifdef FN_GetAttachment_Post -void FN_GetAttachment_Post(const edict_t *pEdict, int iAttachment, float *rgflOrigin, float *rgflAngles ); -#endif // FN_GetAttachment_Post - -#ifdef FN_CRC32_Init_Post -void FN_CRC32_Init_Post(CRC32_t *pulCRC); -#endif // FN_CRC32_Init_Post - -#ifdef FN_CRC32_ProcessBuffer_Post -void FN_CRC32_ProcessBuffer_Post(CRC32_t *pulCRC, void *p, int len); -#endif // FN_CRC32_ProcessBuffer_Post - -#ifdef FN_CRC32_ProcessByte_Post -void FN_CRC32_ProcessByte_Post(CRC32_t *pulCRC, unsigned char ch); -#endif // FN_CRC32_ProcessByte_Post - -#ifdef FN_CRC32_Final_Post -CRC32_t FN_CRC32_Final_Post(CRC32_t pulCRC); -#endif // FN_CRC32_Final_Post - -#ifdef FN_RandomLong_Post -long FN_RandomLong_Post(long lLow, long lHigh); -#endif // FN_RandomLong_Post - -#ifdef FN_RandomFloat_Post -float FN_RandomFloat_Post(float flLow, float flHigh); -#endif // FN_RandomFloat_Post - -#ifdef FN_SetView_Post -void FN_SetView_Post(const edict_t *pClient, const edict_t *pViewent); -#endif // FN_SetView_Post - -#ifdef FN_Time_Post -float FN_Time_Post(void); -#endif // FN_Time_Post - -#ifdef FN_CrosshairAngle_Post -void FN_CrosshairAngle_Post(const edict_t *pClient, float pitch, float yaw); -#endif // FN_CrosshairAngle_Post - -#ifdef FN_LoadFileForMe_Post -byte *FN_LoadFileForMe_Post(char *filename, int *pLength); -#endif // FN_LoadFileForMe_Post - -#ifdef FN_FreeFile_Post -void FN_FreeFile_Post(void *buffer); -#endif // FN_FreeFile_Post - -#ifdef FN_EndSection_Post -void FN_EndSection_Post(const char *pszSectionName); -#endif // FN_EndSection_Post - -#ifdef FN_CompareFileTime_Post -int FN_CompareFileTime_Post(char *filename1, char *filename2, int *iCompare); -#endif // FN_CompareFileTime_Post - -#ifdef FN_GetGameDir_Post -void FN_GetGameDir_Post(char *szGetGameDir); -#endif // FN_GetGameDir_Post - -#ifdef FN_Cvar_RegisterVariable_Post -void FN_Cvar_RegisterVariable_Post(cvar_t *variable); -#endif // FN_Cvar_RegisterVariable_Post - -#ifdef FN_FadeClientVolume_Post -void FN_FadeClientVolume_Post(const edict_t *pEdict, int fadePercent, int fadeOutSeconds, int holdTime, int fadeInSeconds); -#endif // FN_FadeClientVolume_Post - -#ifdef FN_SetClientMaxspeed_Post -void FN_SetClientMaxspeed_Post(const edict_t *pEdict, float fNewMaxspeed); -#endif // FN_SetClientMaxspeed_Post - -#ifdef FN_CreateFakeClient_Post -edict_t *FN_CreateFakeClient_Post(const char *netname); -#endif // FN_CreateFakeClient_Post - -#ifdef FN_RunPlayerMove_Post -void FN_RunPlayerMove_Post(edict_t *fakeclient, const float *viewangles, float forwardmove, float sidemove, float upmove, unsigned short buttons, byte impulse, byte msec); -#endif // FN_RunPlayerMove_Post - -#ifdef FN_NumberOfEntities_Post -int FN_NumberOfEntities_Post(void); -#endif // FN_NumberOfEntities_Post - -#ifdef FN_GetInfoKeyBuffer_Post -char *FN_GetInfoKeyBuffer_Post(edict_t *e); -#endif // FN_GetInfoKeyBuffer_Post - -#ifdef FN_InfoKeyValue_Post -char *FN_InfoKeyValue_Post(char *infobuffer, char *key); -#endif // FN_InfoKeyValue_Post - -#ifdef FN_SetKeyValue_Post -void FN_SetKeyValue_Post(char *infobuffer, char *key, char *value); -#endif // FN_SetKeyValue_Post - -#ifdef FN_SetClientKeyValue_Post -void FN_SetClientKeyValue_Post(int clientIndex, char *infobuffer, char *key, char *value); -#endif // FN_SetClientKeyValue_Post - -#ifdef FN_IsMapValid_Post -int FN_IsMapValid_Post(char *filename); -#endif // FN_IsMapValid_Post - -#ifdef FN_StaticDecal_Post -void FN_StaticDecal_Post(const float *origin, int decalIndex, int entityIndex, int modelIndex); -#endif // FN_StaticDecal_Post - -#ifdef FN_PrecacheGeneric_Post -int FN_PrecacheGeneric_Post(char *s); -#endif // FN_PrecacheGeneric_Post - -#ifdef FN_GetPlayerUserId_Post -int FN_GetPlayerUserId_Post(edict_t *e ); -#endif // FN_GetPlayerUserId_Post - -#ifdef FN_BuildSoundMsg_Post -void FN_BuildSoundMsg_Post(edict_t *entity, int channel, const char *sample, /*int*/float volume, float attenuation, int fFlags, int pitch, int msg_dest, int msg_type, const float *pOrigin, edict_t *ed); -#endif // FN_BuildSoundMsg_Post - -#ifdef FN_IsDedicatedServer_Post -int FN_IsDedicatedServer_Post(void); -#endif // FN_IsDedicatedServer_Post - -#ifdef FN_CVarGetPointer_Post -cvar_t *FN_CVarGetPointer_Post(const char *szVarName); -#endif // FN_CVarGetPointer_Post - -#ifdef FN_GetPlayerWONId_Post -unsigned int FN_GetPlayerWONId_Post(edict_t *e); -#endif // FN_GetPlayerWONId_Post - -#ifdef FN_Info_RemoveKey_Post -void FN_Info_RemoveKey_Post( char *s, const char *key); -#endif // FN_Info_RemoveKey_Post - -#ifdef FN_GetPhysicsKeyValue_Post -const char *FN_GetPhysicsKeyValue_Post(const edict_t *pClient, const char *key); -#endif // FN_GetPhysicsKeyValue_Post - -#ifdef FN_SetPhysicsKeyValue_Post -void FN_SetPhysicsKeyValue_Post(const edict_t *pClient, const char *key, const char *value); -#endif // FN_SetPhysicsKeyValue_Post - -#ifdef FN_GetPhysicsInfoString_Post -const char *FN_GetPhysicsInfoString_Post( const edict_t *pClient); -#endif // FN_GetPhysicsInfoString_Post - -#ifdef FN_PrecacheEvent_Post -unsigned short FN_PrecacheEvent_Post(int type, const char *psz); -#endif // FN_PrecacheEvent_Post - -#ifdef FN_PlaybackEvent_Post -void FN_PlaybackEvent_Post(int flags, const edict_t *pInvoker, unsigned short eventindex, float delay, float *origin, float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2); -#endif // FN_PlaybackEvent_Post - -#ifdef FN_SetFatPVS_Post -unsigned char *FN_SetFatPVS_Post(float *org); -#endif // FN_SetFatPVS_Post - -#ifdef FN_SetFatPAS_Post -unsigned char *FN_SetFatPAS_Post(float *org); -#endif // FN_SetFatPAS_Post - -#ifdef FN_CheckVisibility_Post -int FN_CheckVisibility_Post(const edict_t *entity, unsigned char *pset); -#endif // FN_CheckVisibility_Post - -#ifdef FN_DeltaSetField_Post -void FN_DeltaSetField_Post(struct delta_s *pFields, const char *fieldname); -#endif // FN_DeltaSetField_Post - -#ifdef FN_DeltaUnsetField_Post -void FN_DeltaUnsetField_Post(struct delta_s *pFields, const char *fieldname); -#endif // FN_DeltaUnsetField_Post - -#ifdef FN_DeltaAddEncoder_Post -void FN_DeltaAddEncoder_Post(char *name, void (*conditionalencode)( struct delta_s *pFields, const unsigned char *from, const unsigned char *to ) ); -#endif // FN_DeltaAddEncoder_Post - -#ifdef FN_GetCurrentPlayer_Post -int FN_GetCurrentPlayer_Post(void); -#endif // FN_GetCurrentPlayer_Post - -#ifdef FN_CanSkipPlayer_Post -int FN_CanSkipPlayer_Post(const edict_t *player); -#endif // FN_CanSkipPlayer_Post - -#ifdef FN_DeltaFindField_Post -int FN_DeltaFindField_Post(struct delta_s *pFields, const char *fieldname); -#endif // FN_DeltaFindField_Post - -#ifdef FN_DeltaSetFieldByIndex_Post -void FN_DeltaSetFieldByIndex_Post(struct delta_s *pFields, int fieldNumber); -#endif // FN_DeltaSetFieldByIndex_Post - -#ifdef FN_DeltaUnsetFieldByIndex_Post -void FN_DeltaUnsetFieldByIndex_Post(struct delta_s *pFields, int fieldNumber); -#endif // FN_DeltaUnsetFieldByIndex_Post - -#ifdef FN_SetGroupMask_Post -void FN_SetGroupMask_Post(int mask, int op); -#endif // FN_SetGroupMask_Post - -#ifdef FN_engCreateInstancedBaseline_Post -int FN_engCreateInstancedBaseline_Post(int classname, struct entity_state_s *baseline); -#endif // FN_engCreateInstancedBaseline_Post - -#ifdef FN_Cvar_DirectSet_Post -void FN_Cvar_DirectSet_Post(struct cvar_s *var, char *value); -#endif // FN_Cvar_DirectSet_Post - -#ifdef FN_ForceUnmodified_Post -void FN_ForceUnmodified_Post(FORCE_TYPE type, float *mins, float *maxs, const char *filename); -#endif // FN_ForceUnmodified_Post - -#ifdef FN_GetPlayerStats_Post -void FN_GetPlayerStats_Post(const edict_t *pClient, int *ping, int *packet_loss); -#endif // FN_GetPlayerStats_Post - -#ifdef FN_AddServerCommand_Post -void FN_AddServerCommand_Post(char *cmd_name, void (*function)(void)); -#endif // FN_AddServerCommand_Post - -#ifdef FN_Voice_GetClientListening_Post -qboolean FN_Voice_GetClientListening_Post(int iReceiver, int iSender); -#endif // FN_Voice_GetClientListening_Post - -#ifdef FN_Voice_SetClientListening_Post -qboolean FN_Voice_SetClientListening_Post(int iReceiver, int iSender, qboolean bListen); -#endif // FN_Voice_SetClientListening_Post - -#ifdef FN_GetPlayerAuthId_Post -const char *FN_GetPlayerAuthId_Post(edict_t *e); -#endif // FN_GetPlayerAuthId - - - - -#ifdef FN_OnFreeEntPrivateData -void FN_OnFreeEntPrivateData(edict_t *pEnt); -#endif // FN_OnFreeEntPrivateData - -#ifdef FN_GameShutdown -void FN_GameShutdown(void); -#endif // FN_GameShutdown - -#ifdef FN_ShouldCollide -int FN_ShouldCollide(edict_t *pentTouched, edict_t *pentOther); -#endif // FN_ShouldCollide - - - - - -#ifdef FN_OnFreeEntPrivateData_Post -void FN_OnFreeEntPrivateData_Post(edict_t *pEnt); -#endif // FN_OnFreeEntPrivateData_Post - -#ifdef FN_GameShutdown_Post -void FN_GameShutdown_Post(void); -#endif // FN_GameShutdown_Post - -#ifdef FN_ShouldCollide_Post -int FN_ShouldCollide_Post(edict_t *pentTouched, edict_t *pentOther); -#endif // FN_ShouldCollide_Post - -#endif // USE_METAMOD - - -#ifdef FN_AMXX_QUERY -void FN_AMXX_QUERY(void); -#endif // FN_AMXX_QUERY - -#ifdef FN_AMXX_ATTACH -void FN_AMXX_ATTACH(void); -#endif // FN_AMXX_ATTACH - -#ifdef FN_AMXX_DETACH -void FN_AMXX_DETACH(void); -#endif // FN_AMXX_DETACH - -#ifdef FN_AMXX_PLUGINSLOADED -void FN_AMXX_PLUGINSLOADED(void); -#endif // FN_AMXX_PLUGINSLOADED - -// *** Types *** -typedef void* (*PFN_REQ_FNPTR)(const char * /*name*/); - -// ***** Module funcs stuff ***** -enum ForwardExecType -{ - ET_IGNORE = 0, // Ignore return vaue - ET_STOP, // Stop on PLUGIN_HANDLED - ET_STOP2, // Stop on PLUGIN_HANDLED, continue on other values, return biggest return value - ET_CONTINUE, // Continue; return biggest return value -}; - -enum ForwardParam -{ - FP_DONE = -1, // specify this as the last argument - // only tells the function that there are no more arguments - FP_CELL, // normal cell - FP_FLOAT, // float; used as normal cell though - FP_STRING, // string - FP_STRINGEX, // string; will be updated to the last function's value - FP_ARRAY, // array; use the return value of prepareArray. -}; - -enum PlayerProp -{ - Player_Name, //String - Player_Ip, //String - Player_Team, //String - Player_Ingame, //bool - Player_Authorized, //bool - Player_Vgui, //bool - Player_Time, //float - Player_Playtime, //float - Player_MenuExpire, //float - Player_Weapons, //struct{int,int}[32] - Player_CurrentWeapon, //int - Player_TeamID, //int - Player_Deaths, //int - Player_Aiming, //int - Player_Menu, //int - Player_Keys, //int - Player_Flags, //int[32] - Player_Newmenu, //int - Player_NewmenuPage, //int -}; - -typedef void (*AUTHORIZEFUNC)(int player, const char *authstring); - -typedef int (*PFN_ADD_NATIVES) (const AMX_NATIVE_INFO * /*list*/); -typedef char * (*PFN_BUILD_PATHNAME) (const char * /*format*/, ...); -typedef char * (*PFN_BUILD_PATHNAME_R) (char * /*buffer*/, size_t /* maxlen */, const char * /* format */, ...); -typedef cell * (*PFN_GET_AMXADDR) (AMX * /*amx*/, cell /*offset*/); -typedef void (*PFN_PRINT_SRVCONSOLE) (char * /*format*/, ...); -typedef const char * (*PFN_GET_MODNAME) (void); -typedef const char * (*PFN_GET_AMXSCRIPTNAME) (int /*id*/); -typedef AMX * (*PFN_GET_AMXSCRIPT) (int /*id*/); -typedef int (*PFN_FIND_AMXSCRIPT_BYAMX) (const AMX * /*amx*/); -typedef int (*PFN_FIND_AMXSCRIPT_BYNAME) (const char * /*name*/); -typedef int (*PFN_SET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, const char * /* source */, int /* max */); -typedef char * (*PFN_GET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, int /*bufferId*/, int * /*pLen*/); -typedef int (*PFN_GET_AMXSTRINGLEN) (const cell *ptr); -typedef char * (*PFN_FORMAT_AMXSTRING) (AMX * /*amx*/, cell * /*params*/, int /*startParam*/, int * /*pLen*/); -typedef void (*PFN_COPY_AMXMEMORY) (cell * /*dest*/, const cell * /*src*/, int /*len*/); -typedef void (*PFN_LOG) (const char * /*fmt*/, ...); -typedef void (*PFN_LOG_ERROR) (AMX * /*amx*/, int /*err*/, const char * /*fmt*/, ...); -typedef int (*PFN_RAISE_AMXERROR) (AMX * /*amx*/, int /*error*/); -typedef int (*PFN_REGISTER_FORWARD) (const char * /*funcname*/, ForwardExecType /*exectype*/, ... /*paramtypes terminated by PF_DONE*/); -typedef int (*PFN_EXECUTE_FORWARD) (int /*id*/, ... /*params*/); -typedef cell (*PFN_PREPARE_CELLARRAY) (cell * /*ptr*/, unsigned int /*size*/); -typedef cell (*PFN_PREPARE_CHARARRAY) (char * /*ptr*/, unsigned int /*size*/); -typedef cell (*PFN_PREPARE_CELLARRAY_A) (cell * /*ptr*/, unsigned int /*size*/, bool /*copyBack*/); -typedef cell (*PFN_PREPARE_CHARARRAY_A) (char * /*ptr*/, unsigned int /*size*/, bool /*copyBack*/); -typedef int (*PFN_IS_PLAYER_VALID) (int /*id*/); -typedef const char * (*PFN_GET_PLAYER_NAME) (int /*id*/); -typedef const char * (*PFN_GET_PLAYER_IP) (int /*id*/); -typedef int (*PFN_IS_PLAYER_INGAME) (int /*id*/); -typedef int (*PFN_IS_PLAYER_BOT) (int /*id*/); -typedef int (*PFN_IS_PLAYER_AUTHORIZED) (int /*id*/); -typedef float (*PFN_GET_PLAYER_TIME) (int /*id*/); -typedef float (*PFN_GET_PLAYER_PLAYTIME) (int /*id*/); -typedef int (*PFN_GETPLAYERFLAGS) (int /* id*/); -typedef int (*PFN_GET_PLAYER_CURWEAPON) (int /*id*/); -typedef const char * (*PFN_GET_PLAYER_TEAM) (int /*id*/); -typedef int (*PFN_GET_PLAYER_TEAMID) (int /*id*/); -typedef int (*PFN_GET_PLAYER_DEATHS) (int /*id*/); -typedef int (*PFN_GET_PLAYER_MENU) (int /*id*/); -typedef int (*PFN_GET_PLAYER_KEYS) (int /*id*/); -typedef int (*PFN_IS_PLAYER_ALIVE) (int /*id*/); -typedef int (*PFN_GET_PLAYER_FRAGS) (int /*id*/); -typedef int (*PFN_IS_PLAYER_CONNECTING) (int /*id*/); -typedef int (*PFN_IS_PLAYER_HLTV) (int /*id*/); -typedef int (*PFN_GET_PLAYER_ARMOR) (int /*id*/); -typedef int (*PFN_GET_PLAYER_HEALTH) (int /*id*/); -#ifdef USE_METAMOD -typedef edict_t * (*PFN_GET_PLAYER_EDICT) (int /*id*/); -#else -typedef void * (*PFN_GET_PLAYER_EDICT) (int /*id*/); -#endif -typedef void * (*PFN_PLAYER_PROP_ADDR) (int /*id*/, int /*prop*/); - -#ifdef MEMORY_TEST -typedef void * (*PFN_ALLOCATOR) (const char* /*filename*/, const unsigned int /*line*/, const char* /*func*/, - const unsigned int /*type*/, const size_t /*size*/); -typedef void * (*PFN_REALLOCATOR) (const char* /*filename*/, const unsigned int /*line*/, const char* /*func*/, - const unsigned int /*type*/, const size_t /*size*/, void* /*addr*/ ); -typedef void (*PFN_DEALLOCATOR) (const char* /*filename*/, const unsigned int /*line*/, const char* /*func*/, - const unsigned int /*type*/, const void* /*addr*/ ); -#endif -typedef int (*PFN_AMX_EXEC) (AMX* /*amx*/, cell* /*return val*/, int /*index*/); -typedef int (*PFN_AMX_EXECV) (AMX* /*amx*/, cell* /*return val*/, int /*index*/, int /*numparams*/, cell[] /*params*/); -typedef int (*PFN_AMX_ALLOT) (AMX* /*amx*/, int /*length*/, cell* /*amx_addr*/, cell** /*phys_addr*/); -typedef int (*PFN_AMX_FINDPUBLIC) (AMX* /*amx*/, char* /*func name*/, int* /*index*/); -typedef int (*PFN_AMX_FINDNATIVE) (AMX* /*amx*/, char* /*func name*/, int* /*index*/); -typedef int (*PFN_LOAD_AMXSCRIPT) (AMX* /*amx*/, void** /*code*/, const char* /*path*/, char[64] /*error info*/, int /* debug */); -typedef int (*PFN_UNLOAD_AMXSCRIPT) (AMX* /*amx*/,void** /*code*/); -typedef cell (*PFN_REAL_TO_CELL) (REAL /*x*/); -typedef REAL (*PFN_CELL_TO_REAL) (cell /*x*/); -typedef int (*PFN_REGISTER_SPFORWARD) (AMX * /*amx*/, int /*func*/, ... /*params*/); -typedef int (*PFN_REGISTER_SPFORWARD_BYNAME) (AMX * /*amx*/, const char * /*funcName*/, ... /*params*/); -typedef void (*PFN_UNREGISTER_SPFORWARD) (int /*id*/); -typedef void (*PFN_MERGEDEFINITION_FILE) (const char * /*filename*/); -typedef const char * (*PFN_FORMAT) (const char * /*fmt*/, ... /*params*/); -typedef void (*PFN_REGISTERFUNCTION) (void * /*pfn*/, const char * /*desc*/); -typedef int (*PFN_AMX_PUSH) (AMX * /*amx*/, cell /*value*/); -typedef int (*PFN_SET_TEAM_INFO) (int /*player */, int /*teamid */, const char * /*name */); -typedef void (*PFN_REG_AUTH_FUNC) (AUTHORIZEFUNC); -typedef void (*PFN_UNREG_AUTH_FUNC) (AUTHORIZEFUNC); - -extern PFN_ADD_NATIVES g_fn_AddNatives; -extern PFN_BUILD_PATHNAME g_fn_BuildPathname; -extern PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR; -extern PFN_GET_AMXADDR g_fn_GetAmxAddr; -extern PFN_PRINT_SRVCONSOLE g_fn_PrintSrvConsole; -extern PFN_GET_MODNAME g_fn_GetModname; -extern PFN_GET_AMXSCRIPTNAME g_fn_GetAmxScriptName; -extern PFN_GET_AMXSCRIPT g_fn_GetAmxScript; -extern PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; -extern PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; -extern PFN_SET_AMXSTRING g_fn_SetAmxString; -extern PFN_GET_AMXSTRING g_fn_GetAmxString; -extern PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; -extern PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; -extern PFN_COPY_AMXMEMORY g_fn_CopyAmxMemory; -extern PFN_LOG g_fn_Log; -extern PFN_LOG_ERROR g_fn_LogErrorFunc; -extern PFN_RAISE_AMXERROR g_fn_RaiseAmxError; -extern PFN_REGISTER_FORWARD g_fn_RegisterForward; -extern PFN_EXECUTE_FORWARD g_fn_ExecuteForward; -extern PFN_PREPARE_CELLARRAY g_fn_PrepareCellArray; -extern PFN_PREPARE_CHARARRAY g_fn_PrepareCharArray; -extern PFN_PREPARE_CELLARRAY_A g_fn_PrepareCellArrayA; -extern PFN_PREPARE_CHARARRAY_A g_fn_PrepareCharArrayA; -extern PFN_IS_PLAYER_VALID g_fn_IsPlayerValid; -extern PFN_GET_PLAYER_NAME g_fn_GetPlayerName; -extern PFN_GET_PLAYER_IP g_fn_GetPlayerIP; -extern PFN_IS_PLAYER_INGAME g_fn_IsPlayerIngame; -extern PFN_IS_PLAYER_BOT g_fn_IsPlayerBot; -extern PFN_IS_PLAYER_AUTHORIZED g_fn_IsPlayerAuthorized; -extern PFN_GET_PLAYER_TIME g_fn_GetPlayerTime; -extern PFN_GET_PLAYER_PLAYTIME g_fn_GetPlayerPlayTime; -extern PFN_GET_PLAYER_CURWEAPON g_fn_GetPlayerCurweapon; -extern PFN_GET_PLAYER_TEAMID g_fn_GetPlayerTeamID; -extern PFN_GET_PLAYER_DEATHS g_fn_GetPlayerDeaths; -extern PFN_GET_PLAYER_MENU g_fn_GetPlayerMenu; -extern PFN_GET_PLAYER_KEYS g_fn_GetPlayerKeys; -extern PFN_IS_PLAYER_ALIVE g_fn_IsPlayerAlive; -extern PFN_GET_PLAYER_FRAGS g_fn_GetPlayerFrags; -extern PFN_IS_PLAYER_CONNECTING g_fn_IsPlayerConnecting; -extern PFN_IS_PLAYER_HLTV g_fn_IsPlayerHLTV; -extern PFN_GET_PLAYER_ARMOR g_fn_GetPlayerArmor; -extern PFN_GET_PLAYER_HEALTH g_fn_GetPlayerHealth; -extern PFN_AMX_EXEC g_fn_AmxExec; -extern PFN_AMX_ALLOT g_fn_AmxAllot; -extern PFN_AMX_FINDPUBLIC g_fn_AmxFindPublic; -extern PFN_LOAD_AMXSCRIPT g_fn_LoadAmxScript; -extern PFN_UNLOAD_AMXSCRIPT g_fn_UnloadAmxScript; -extern PFN_REAL_TO_CELL g_fn_RealToCell; -extern PFN_CELL_TO_REAL g_fn_CellToReal; -extern PFN_REGISTER_SPFORWARD g_fn_RegisterSPForward; -extern PFN_REGISTER_SPFORWARD_BYNAME g_fn_RegisterSPForwardByName; -extern PFN_UNREGISTER_SPFORWARD g_fn_UnregisterSPForward; -extern PFN_MERGEDEFINITION_FILE g_fn_MergeDefinition_File; -extern PFN_AMX_FINDNATIVE g_fn_AmxFindNative; -extern PFN_GETPLAYERFLAGS g_fn_GetPlayerFlags; -extern PFN_GET_PLAYER_EDICT g_fn_GetPlayerEdict; -extern PFN_FORMAT g_fn_Format; -extern PFN_GET_PLAYER_TEAM g_fn_GetPlayerTeam; -extern PFN_REGISTERFUNCTION g_fn_RegisterFunction; -extern PFN_REQ_FNPTR g_fn_RequestFunction; -extern PFN_AMX_PUSH g_fn_AmxPush; -extern PFN_SET_TEAM_INFO g_fn_SetTeamInfo; -extern PFN_PLAYER_PROP_ADDR g_fn_PlayerPropAddr; -extern PFN_REG_AUTH_FUNC g_fn_RegAuthFunc; -extern PFN_UNREG_AUTH_FUNC g_fn_UnregAuthFunc; - -#ifdef MAY_NEVER_BE_DEFINED -// Function prototypes for intellisense and similar systems -// They understand #if 0 so we use #ifdef MAY_NEVER_BE_DEFINED -int MF_AddNatives (const AMX_NATIVE_INFO *list) { } -char * MF_BuildPathname (const char * format, ...) { } -char * MF_BuildPathnameR (char *buffer, size_t maxlen, const char *fmt, ...) { } -cell * MF_GetAmxAddr (AMX * amx, cell offset) { } -void MF_PrintSrvConsole (char * format, ...) { } -const char * MF_GetModname (void) { } -const char * MF_GetScriptName (int id) { } -AMX * MF_GetScriptAmx (int id) { } -int MF_FindScriptByAmx (const AMX * amx) { } -int MF_FindScriptByAmx (const char * name) { } -int MF_SetAmxString (AMX * amx, cell amx_addr, const char * source , int max ) { } -char * MF_GetAmxString (AMX * amx, cell amx_addr, int bufferId, int * pLen) { } -int MF_GetAmxStringLen (const cell *ptr) { } -char * MF_FormatAmxString (AMX * amx, cell * params, int startParam, int * pLen) { } -void MF_CopyAmxMemory (cell * dest, const cell * src, int len) { } -void MF_Log (const char * fmt, ...) { } -void MF_LogError (AMX * amx, int err, const char *fmt, ...) { } -int MF_RaiseAmxError (AMX * amx, int error) { } -int MF_RegisterForward (const char * funcname, ForwardExecType exectype, ...) { } -int MF_ExecuteForward (int id, ...) { } -cell MF_PrepareCellArray (cell * ptr, unsigned int size) { } -cell MF_PrepareCharArray (char * ptr, unsigned int size) { } -cell MF_PrepareCellArrayA (cell * ptr, unsigned int size, bool copyBack) { } -cell MF_PrepareCharArrayA (char * ptr, unsigned int size, bool copyBack) { } -int MF_IsPlayerValid (int id) { } -const char * MF_GetPlayerName (int id) { } -const char * MF_GetPlayerIP (int id) { } -int MF_IsPlayerIngame (int id) { } -int MF_IsPlayerBot (int id) { } -int MF_IsPlayerAuthorized (int id) { } -float MF_GetPlayerTime (int id) { } -float MF_GetPlayerPlayTime (int id) { } -int MF_GetPlayerCurweapon (int id) { } -const char * MF_GetPlayerTeam (int id) { } -int MF_GetPlayerTeamID (int id) { } -int MF_GetPlayerDeaths (int id) { } -int MF_GetPlayerMenu (int id) { } -int MF_GetPlayerKeys (int id) { } -int MF_IsPlayerAlive (int id) { } -int MF_GetPlayerFrags (int id) { } -int MF_IsPlayerConnecting (int id) { } -int MF_IsPlayerHLTV (int id) { } -int MF_GetPlayerArmor (int id) { } -int MF_GetPlayerHealth (int id) { } -REAL amx_ctof (cell x) { } -cell amx_ftoc (float x) { } -int MF_RegisterSPForwardByName (AMX * amx, const char *str, ...) { } -int MF_RegisterSPForward (AMX * amx, int func, ...) { } -void MF_UnregisterSPForward (int id) { } -int MF_GetPlayerFlags (int id) { } -edict_t* MF_GetPlayerEdict (int id) { } -const char * MF_Format (const char *fmt, ...) { } -void MF_RegisterFunction (void *pfn, const char *description) { } -void * MF_RequestFunction (const char *description) { } -int MF_AmxPush (AMX *amx, cell *params) { } -int MF_AmxExec (AMX *amx, cell *retval, int idx) { } -int MF_SetPlayerTeamInfo (int id, int teamid, const char *teamname) { } -void * MF_PlayerPropAddr (int id, int prop) { } -void MF_RegAuthFunc (AUTHORIZEFUNC fn) { } -void MF_UnregAuthFunc (AUTHORIZEFUNC fn) { } -#endif // MAY_NEVER_BE_DEFINED - -#define MF_AddNatives g_fn_AddNatives -#define MF_BuildPathname g_fn_BuildPathname -#define MF_BuildPathnameR g_fn_BuildPathnameR -#define MF_FormatAmxString g_fn_FormatAmxString -#define MF_GetAmxAddr g_fn_GetAmxAddr -#define MF_PrintSrvConsole g_fn_PrintSrvConsole -#define MF_GetModname g_fn_GetModname -#define MF_GetScriptName g_fn_GetAmxScriptName -#define MF_GetScriptAmx g_fn_GetAmxScript -#define MF_FindScriptByAmx g_fn_FindAmxScriptByAmx -#define MF_FindScriptByName g_fn_FindAmxScriptByName -#define MF_SetAmxString g_fn_SetAmxString -#define MF_GetAmxString g_fn_GetAmxString -#define MF_GetAmxStringLen g_fn_GetAmxStringLen -#define MF_CopyAmxMemory g_fn_CopyAmxMemory -void MF_Log(const char *fmt, ...); -void MF_LogError(AMX *amx, int err, const char *fmt, ...); -#define MF_RaiseAmxError g_fn_RaiseAmxError -#define MF_RegisterForward g_fn_RegisterForward -#define MF_ExecuteForward g_fn_ExecuteForward -#define MF_PrepareCellArray g_fn_PrepareCellArray -#define MF_PrepareCharArray g_fn_PrepareCharArray -#define MF_PrepareCellArrayA g_fn_PrepareCellArrayA -#define MF_PrepareCharArrayA g_fn_PrepareCharArrayA -#define MF_IsPlayerValid g_fn_IsPlayerValid -#define MF_GetPlayerName g_fn_GetPlayerName -#define MF_GetPlayerIP g_fn_GetPlayerIP -#define MF_IsPlayerIngame g_fn_IsPlayerIngame -#define MF_IsPlayerBot g_fn_IsPlayerBot -#define MF_IsPlayerAuthorized g_fn_IsPlayerAuthorized -#define MF_GetPlayerTime g_fn_GetPlayerTime -#define MF_GetPlayerPlayTime g_fn_GetPlayerPlayTime -#define MF_GetPlayerCurweapon g_fn_GetPlayerCurweapon -#define MF_GetPlayerTeam g_fn_GetPlayerTeam -#define MF_GetPlayerTeamID g_fn_GetPlayerTeamID -#define MF_GetPlayerDeaths g_fn_GetPlayerDeaths -#define MF_GetPlayerMenu g_fn_GetPlayerMenu -#define MF_GetPlayerKeys g_fn_GetPlayerKeys -#define MF_IsPlayerAlive g_fn_IsPlayerAlive -#define MF_GetPlayerFrags g_fn_GetPlayerFrags -#define MF_IsPlayerConnecting g_fn_IsPlayerConnecting -#define MF_IsPlayerHLTV g_fn_IsPlayerHLTV -#define MF_GetPlayerArmor g_fn_GetPlayerArmor -#define MF_GetPlayerHealth g_fn_GetPlayerHealth -#define MF_AmxExec g_fn_AmxExec -#define MF_AmxExecv g_fn_AmxExecv -#define MF_AmxFindPublic g_fn_AmxFindPublic -#define MF_AmxAllot g_fn_AmxAllot -#define MF_AmxFindNative g_fn_AmxFindNative -#define MF_LoadAmxScript g_fn_LoadAmxScript -#define MF_UnloadAmxScript g_fn_UnloadAmxScript -#define MF_MergeDefinitionFile g_fn_MergeDefinition_File -#define amx_ctof g_fn_CellToReal -#define amx_ftoc g_fn_RealToCell -#define MF_RegisterSPForwardByName g_fn_RegisterSPForwardByName -#define MF_RegisterSPForward g_fn_RegisterSPForward -#define MF_UnregisterSPForward g_fn_UnregisterSPForward -#define MF_GetPlayerFlags g_fn_GetPlayerFlags -#define MF_GetPlayerEdict g_fn_GetPlayerEdict -#define MF_Format g_fn_Format -#define MF_RegisterFunction g_fn_RegisterFunction -#define MF_RequestFunction g_fn_RequestFunction -#define MF_AmxPush g_fn_AmxPush -#define MF_SetPlayerTeamInfo g_fn_SetTeamInfo -#define MF_PlayerPropAddr g_fn_PlayerPropAddr -#define MF_RegAuthFunc g_fn_RegAuthFunc -#define MF_UnregAuthFunc g_fn_UnregAuthFunc - -#ifdef MEMORY_TEST -/*** Memory ***/ -void *operator new(size_t reportedSize); -void *operator new[](size_t reportedSize); -void *operator new(size_t reportedSize, const char *sourceFile, int sourceLine); -void *operator new[](size_t reportedSize, const char *sourceFile, int sourceLine); -void operator delete(void *reportedAddress); -void operator delete[](void *reportedAddress); - -// Allocation types -extern const unsigned int m_alloc_unknown; -extern const unsigned int m_alloc_new; -extern const unsigned int m_alloc_new_array; -extern const unsigned int m_alloc_malloc; -extern const unsigned int m_alloc_calloc; -extern const unsigned int m_alloc_realloc; -extern const unsigned int m_alloc_delete; -extern const unsigned int m_alloc_delete_array; -extern const unsigned int m_alloc_free; - -// To be called before new / delete -void Mem_SetOwner(const char *filename, int line, const char *function); -// Actual allocator -void * Mem_Allocator(const char *sourceFile, const unsigned int sourceLine, const char *sourceFunc, - const unsigned int allocationType, const size_t reportedSize); -void * Mem_Reallocator(const char *sourceFile, const unsigned int sourceLine, const char *sourceFunc, - const unsigned int reallocationType, const size_t reportedSize, void *reportedAddress); -void Mem_Deallocator(const char *sourceFile, const unsigned int sourceLine, const char *sourceFunc, - const unsigned int deallocationType, void *reportedAddress); - -// memory macros -#ifndef __FUNCTION__ -#define __FUNCTION__ "??" -#endif - -// call Mem_SetOwner, followed by the actual new operator -#define new (Mem_SetOwner(__FILE__,__LINE__,__FUNCTION__),false) ? NULL : new -// call Mem_SetOwner, followed by the actual delete operator -#define delete (Mem_SetOwner(__FILE__,__LINE__,__FUNCTION__),false) ? Mem_SetOwner("",0,"") : delete -#define malloc(sz) Mem_Allocator (__FILE__,__LINE__,__FUNCTION__,m_alloc_malloc,sz) -#define calloc(sz) Mem_Allocator (__FILE__,__LINE__,__FUNCTION__,m_alloc_calloc,sz) -#define realloc(ptr,sz) Mem_Reallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_realloc,sz,ptr) -#define free(ptr) Mem_Deallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_free,ptr) - -#endif //MEMORY_TEST - -#endif // #ifndef __AMXXMODULE_H__ diff --git a/dlls/arrayx/libstdc++.a b/dlls/arrayx/libstdc++.a deleted file mode 100644 index 168dd72d..00000000 Binary files a/dlls/arrayx/libstdc++.a and /dev/null differ diff --git a/dlls/arrayx/makefile b/dlls/arrayx/makefile deleted file mode 100644 index a65a8d9e..00000000 --- a/dlls/arrayx/makefile +++ /dev/null @@ -1,58 +0,0 @@ -#(C)2004-2005 AMX Mod X Development Team -# Makefile written by David "BAILOPAN" Anderson - -### EDIT BELOW FOR OTHER PROJECTS ### - -OPT_FLAGS = -funroll-loops -s -pipe -fomit-frame-pointer-fexceptions -DEBUG_FLAGS = -g -ggdb3 -CPP = gcc -NAME = array_amxx - -OBJECTS = amxxmodule.cpp Array.cpp BinTrieNatives.cpp Capsule.cpp CArray.cpp CBinTrie.cpp CKeytable.cpp JudyExtra.cpp ListNatives.cpp MapNatives.cpp - -LINK = Judy.a libstdc++.a - -ifeq "$(DEBUG)" "true" - BIN_DIR = Debug - CFLAGS = $(DEBUG_FLAGS) -else - BIN_DIR = Release - CFLAGS = $(OPT_FLAGS) -endif - -CFLAGS += -DNDEBUG -fPIC -Wno-deprecated -DHAVE_STDINT_H -fexceptions -fno-rtti - -ifeq "$(AMD64)" "true" - BINARY = $(NAME)_amd64.so - CFLAGS += -DPAWN_CELL_SIZE=64 -DHAVE_I64 -m64 -else - BINARY = $(NAME)_i386.so - CFLAGS += -DPAWN_CELL_SIZE=32 -DJIT -DASM32 - OPT_FLAGS += -march=i586 -endif - -OBJ_LINUX := $(OBJECTS:%.cpp=$(BIN_DIR)/%.o) - -$(BIN_DIR)/%.o: %.cpp - $(CPP) $(INCLUDE) $(CFLAGS) -o $@ -c $< - -all: - mkdir -p $(BIN_DIR) - $(MAKE) engine - -amd64: - $(MAKE) all AMD64=true - -engine: $(OBJ_LINUX) - $(CPP) $(INCLUDE) $(CFLAGS) $(OBJ_LINUX) $(LINK) -shared -lm -o$(BIN_DIR)/$(BINARY) - -debug: - $(MAKE) all DEBUG=true - -default: all - -clean: - rm -rf Release/*.o - rm -rf Release/$(BINARY) - rm -rf Debug/*.o - rm -rf Debug/$(BINARY) \ No newline at end of file diff --git a/dlls/arrayx/moduleconfig.h b/dlls/arrayx/moduleconfig.h deleted file mode 100644 index cc25d269..00000000 --- a/dlls/arrayx/moduleconfig.h +++ /dev/null @@ -1,463 +0,0 @@ -// Configuration - -#ifndef __MODULECONFIG_H__ -#define __MODULECONFIG_H__ - -// Module info -#define MODULE_NAME "Array" -#define MODULE_VERSION "1.7" -#define MODULE_AUTHOR "Twilight Suzuka" -#define MODULE_URL "www.amxmodx.org" -#define MODULE_LOGTAG "ARRAY" -// If you want the module not to be reloaded on mapchange, remove / comment out the next line -#define MODULE_RELOAD_ON_MAPCHANGE - -#ifdef __DATE__ -#define MODULE_DATE __DATE__ -#else // __DATE__ -#define MODULE_DATE "Unknown" -#endif // __DATE__ - -// metamod plugin? -//#define USE_METAMOD - -// - AMXX Init functions -// Also consider using FN_META_* -// AMXX query -//#define FN_AMXX_QUERY OnAmxxQuery -// AMXX attach -// Do native functions init here (MF_AddNatives) -#define FN_AMXX_ATTACH OnAmxxAttach -// AMXX dettach -#define FN_AMXX_DETTACH OnAmxxDettach -// All plugins loaded -// Do forward functions init here (MF_RegisterForward) -// #define FN_AMXX_PLUGINSLOADED OnPluginsLoaded - -/**** METAMOD ****/ -// If your module doesn't use metamod, you may close the file now :) -#ifdef USE_METAMOD -// ---- -// Hook Functions -// Uncomment these to be called -// You can also change the function name - -// - Metamod init functions -// Also consider using FN_AMXX_* -// Meta query -//#define FN_META_QUERY OnMetaQuery -// Meta attach -//#define FN_META_ATTACH OnMetaAttach -// Meta dettach -//#define FN_META_DETTACH OnMetaDettach - -// (wd) are Will Day's notes -// - GetEntityAPI2 functions -// #define FN_GameDLLInit GameDLLInit /* pfnGameInit() */ -// #define FN_DispatchSpawn DispatchSpawn /* pfnSpawn() */ -// #define FN_DispatchThink DispatchThink /* pfnThink() */ -// #define FN_DispatchUse DispatchUse /* pfnUse() */ -// #define FN_DispatchTouch DispatchTouch /* pfnTouch() */ -// #define FN_DispatchBlocked DispatchBlocked /* pfnBlocked() */ -// #define FN_DispatchKeyValue DispatchKeyValue /* pfnKeyValue() */ -// #define FN_DispatchSave DispatchSave /* pfnSave() */ -// #define FN_DispatchRestore DispatchRestore /* pfnRestore() */ -// #define FN_DispatchObjectCollsionBox DispatchObjectCollsionBox /* pfnSetAbsBox() */ -// #define FN_SaveWriteFields SaveWriteFields /* pfnSaveWriteFields() */ -// #define FN_SaveReadFields SaveReadFields /* pfnSaveReadFields() */ -// #define FN_SaveGlobalState SaveGlobalState /* pfnSaveGlobalState() */ -// #define FN_RestoreGlobalState RestoreGlobalState /* pfnRestoreGlobalState() */ -// #define FN_ResetGlobalState ResetGlobalState /* pfnResetGlobalState() */ -// #define FN_ClientConnect ClientConnect /* pfnClientConnect() (wd) Client has connected */ -// #define FN_ClientDisconnect ClientDisconnect /* pfnClientDisconnect() (wd) Player has left the game */ -// #define FN_ClientKill ClientKill /* pfnClientKill() (wd) Player has typed "kill" */ -// #define FN_ClientPutInServer ClientPutInServer /* pfnClientPutInServer() (wd) Client is entering the game */ -// #define FN_ClientCommand ClientCommand /* pfnClientCommand() (wd) Player has sent a command (typed or from a bind) */ -// #define FN_ClientUserInfoChanged ClientUserInfoChanged /* pfnClientUserInfoChanged() (wd) Client has updated their setinfo structure */ -// #define FN_ServerActivate ServerActivate /* pfnServerActivate() (wd) Server is starting a new map */ -// #define FN_ServerDeactivate ServerDeactivate /* pfnServerDeactivate() (wd) Server is leaving the map (shutdown or changelevel); SDK2 */ -// #define FN_PlayerPreThink PlayerPreThink /* pfnPlayerPreThink() */ -// #define FN_PlayerPostThink PlayerPostThink /* pfnPlayerPostThink() */ -// #define FN_StartFrame StartFrame /* pfnStartFrame() */ -// #define FN_ParmsNewLevel ParmsNewLevel /* pfnParmsNewLevel() */ -// #define FN_ParmsChangeLevel ParmsChangeLevel /* pfnParmsChangeLevel() */ -// #define FN_GetGameDescription GetGameDescription /* pfnGetGameDescription() Returns string describing current .dll. E.g. "TeamFotrress 2" "Half-Life" */ -// #define FN_PlayerCustomization PlayerCustomization /* pfnPlayerCustomization() Notifies .dll of new customization for player. */ -// #define FN_SpectatorConnect SpectatorConnect /* pfnSpectatorConnect() Called when spectator joins server */ -// #define FN_SpectatorDisconnect SpectatorDisconnect /* pfnSpectatorDisconnect() Called when spectator leaves the server */ -// #define FN_SpectatorThink SpectatorThink /* pfnSpectatorThink() Called when spectator sends a command packet (usercmd_t) */ -// #define FN_Sys_Error Sys_Error /* pfnSys_Error() Notify game .dll that engine is going to shut down. Allows mod authors to set a breakpoint. SDK2 */ -// #define FN_PM_Move PM_Move /* pfnPM_Move() (wd) SDK2 */ -// #define FN_PM_Init PM_Init /* pfnPM_Init() Server version of player movement initialization; (wd) SDK2 */ -// #define FN_PM_FindTextureType PM_FindTextureType /* pfnPM_FindTextureType() (wd) SDK2 */ -// #define FN_SetupVisibility SetupVisibility /* pfnSetupVisibility() Set up PVS and PAS for networking for this client; (wd) SDK2 */ -// #define FN_UpdateClientData UpdateClientData /* pfnUpdateClientData() Set up data sent only to specific client; (wd) SDK2 */ -// #define FN_AddToFullPack AddToFullPack /* pfnAddToFullPack() (wd) SDK2 */ -// #define FN_CreateBaseline CreateBaseline /* pfnCreateBaseline() Tweak entity baseline for network encoding allows setup of player baselines too.; (wd) SDK2 */ -// #define FN_RegisterEncoders RegisterEncoders /* pfnRegisterEncoders() Callbacks for network encoding; (wd) SDK2 */ -// #define FN_GetWeaponData GetWeaponData /* pfnGetWeaponData() (wd) SDK2 */ -// #define FN_CmdStart CmdStart /* pfnCmdStart() (wd) SDK2 */ -// #define FN_CmdEnd CmdEnd /* pfnCmdEnd() (wd) SDK2 */ -// #define FN_ConnectionlessPacket ConnectionlessPacket /* pfnConnectionlessPacket() (wd) SDK2 */ -// #define FN_GetHullBounds GetHullBounds /* pfnGetHullBounds() (wd) SDK2 */ -// #define FN_CreateInstancedBaselines CreateInstancedBaselines /* pfnCreateInstancedBaselines() (wd) SDK2 */ -// #define FN_InconsistentFile InconsistentFile /* pfnInconsistentFile() (wd) SDK2 */ -// #define FN_AllowLagCompensation AllowLagCompensation /* pfnAllowLagCompensation() (wd) SDK2 */ - -// - GetEntityAPI2_Post functions -// #define FN_GameDLLInit_Post GameDLLInit_Post -// #define FN_DispatchSpawn_Post DispatchSpawn_Post -// #define FN_DispatchThink_Post DispatchThink_Post -// #define FN_DispatchUse_Post DispatchUse_Post -// #define FN_DispatchTouch_Post DispatchTouch_Post -// #define FN_DispatchBlocked_Post DispatchBlocked_Post -// #define FN_DispatchKeyValue_Post DispatchKeyValue_Post -// #define FN_DispatchSave_Post DispatchSave_Post -// #define FN_DispatchRestore_Post DispatchRestore_Post -// #define FN_DispatchObjectCollsionBox_Post DispatchObjectCollsionBox_Post -// #define FN_SaveWriteFields_Post SaveWriteFields_Post -// #define FN_SaveReadFields_Post SaveReadFields_Post -// #define FN_SaveGlobalState_Post SaveGlobalState_Post -// #define FN_RestoreGlobalState_Post RestoreGlobalState_Post -// #define FN_ResetGlobalState_Post ResetGlobalState_Post -// #define FN_ClientConnect_Post ClientConnect_Post -// #define FN_ClientDisconnect_Post ClientDisconnect_Post -// #define FN_ClientKill_Post ClientKill_Post -// #define FN_ClientPutInServer_Post ClientPutInServer_Post -// #define FN_ClientCommand_Post ClientCommand_Post -// #define FN_ClientUserInfoChanged_Post ClientUserInfoChanged_Post -// #define FN_ServerActivate_Post ServerActivate_Post -// #define FN_ServerDeactivate_Post ServerDeactivate_Post -// #define FN_PlayerPreThink_Post PlayerPreThink_Post -// #define FN_PlayerPostThink_Post PlayerPostThink_Post -// #define FN_StartFrame_Post StartFrame_Post -// #define FN_ParmsNewLevel_Post ParmsNewLevel_Post -// #define FN_ParmsChangeLevel_Post ParmsChangeLevel_Post -// #define FN_GetGameDescription_Post GetGameDescription_Post -// #define FN_PlayerCustomization_Post PlayerCustomization_Post -// #define FN_SpectatorConnect_Post SpectatorConnect_Post -// #define FN_SpectatorDisconnect_Post SpectatorDisconnect_Post -// #define FN_SpectatorThink_Post SpectatorThink_Post -// #define FN_Sys_Error_Post Sys_Error_Post -// #define FN_PM_Move_Post PM_Move_Post -// #define FN_PM_Init_Post PM_Init_Post -// #define FN_PM_FindTextureType_Post PM_FindTextureType_Post -// #define FN_SetupVisibility_Post SetupVisibility_Post -// #define FN_UpdateClientData_Post UpdateClientData_Post -// #define FN_AddToFullPack_Post AddToFullPack_Post -// #define FN_CreateBaseline_Post CreateBaseline_Post -// #define FN_RegisterEncoders_Post RegisterEncoders_Post -// #define FN_GetWeaponData_Post GetWeaponData_Post -// #define FN_CmdStart_Post CmdStart_Post -// #define FN_CmdEnd_Post CmdEnd_Post -// #define FN_ConnectionlessPacket_Post ConnectionlessPacket_Post -// #define FN_GetHullBounds_Post GetHullBounds_Post -// #define FN_CreateInstancedBaselines_Post CreateInstancedBaselines_Post -// #define FN_InconsistentFile_Post InconsistentFile_Post -// #define FN_AllowLagCompensation_Post AllowLagCompensation_Post - -// - GetEngineAPI functions -// #define FN_PrecacheModel PrecacheModel -// #define FN_PrecacheSound PrecacheSound -// #define FN_SetModel SetModel -// #define FN_ModelIndex ModelIndex -// #define FN_ModelFrames ModelFrames -// #define FN_SetSize SetSize -// #define FN_ChangeLevel ChangeLevel -// #define FN_GetSpawnParms GetSpawnParms -// #define FN_SaveSpawnParms SaveSpawnParms -// #define FN_VecToYaw VecToYaw -// #define FN_VecToAngles VecToAngles -// #define FN_MoveToOrigin MoveToOrigin -// #define FN_ChangeYaw ChangeYaw -// #define FN_ChangePitch ChangePitch -// #define FN_FindEntityByString FindEntityByString -// #define FN_GetEntityIllum GetEntityIllum -// #define FN_FindEntityInSphere FindEntityInSphere -// #define FN_FindClientInPVS FindClientInPVS -// #define FN_EntitiesInPVS EntitiesInPVS -// #define FN_MakeVectors MakeVectors -// #define FN_AngleVectors AngleVectors -// #define FN_CreateEntity CreateEntity -// #define FN_RemoveEntity RemoveEntity -// #define FN_CreateNamedEntity CreateNamedEntity -// #define FN_MakeStatic MakeStatic -// #define FN_EntIsOnFloor EntIsOnFloor -// #define FN_DropToFloor DropToFloor -// #define FN_WalkMove WalkMove -// #define FN_SetOrigin SetOrigin -// #define FN_EmitSound EmitSound -// #define FN_EmitAmbientSound EmitAmbientSound -// #define FN_TraceLine TraceLine -// #define FN_TraceToss TraceToss -// #define FN_TraceMonsterHull TraceMonsterHull -// #define FN_TraceHull TraceHull -// #define FN_TraceModel TraceModel -// #define FN_TraceTexture TraceTexture -// #define FN_TraceSphere TraceSphere -// #define FN_GetAimVector GetAimVector -// #define FN_ServerCommand ServerCommand -// #define FN_ServerExecute ServerExecute -// #define FN_engClientCommand engClientCommand -// #define FN_ParticleEffect ParticleEffect -// #define FN_LightStyle LightStyle -// #define FN_DecalIndex DecalIndex -// #define FN_PointContents PointContents -// #define FN_MessageBegin MessageBegin -// #define FN_MessageEnd MessageEnd -// #define FN_WriteByte WriteByte -// #define FN_WriteChar WriteChar -// #define FN_WriteShort WriteShort -// #define FN_WriteLong WriteLong -// #define FN_WriteAngle WriteAngle -// #define FN_WriteCoord WriteCoord -// #define FN_WriteString WriteString -// #define FN_WriteEntity WriteEntity -// #define FN_CVarRegister CVarRegister -// #define FN_CVarGetFloat CVarGetFloat -// #define FN_CVarGetString CVarGetString -// #define FN_CVarSetFloat CVarSetFloat -// #define FN_CVarSetString CVarSetString -// #define FN_AlertMessage AlertMessage -// #define FN_EngineFprintf EngineFprintf -// #define FN_PvAllocEntPrivateData PvAllocEntPrivateData -// #define FN_PvEntPrivateData PvEntPrivateData -// #define FN_FreeEntPrivateData FreeEntPrivateData -// #define FN_SzFromIndex SzFromIndex -// #define FN_AllocString AllocString -// #define FN_GetVarsOfEnt GetVarsOfEnt -// #define FN_PEntityOfEntOffset PEntityOfEntOffset -// #define FN_EntOffsetOfPEntity EntOffsetOfPEntity -// #define FN_IndexOfEdict IndexOfEdict -// #define FN_PEntityOfEntIndex PEntityOfEntIndex -// #define FN_FindEntityByVars FindEntityByVars -// #define FN_GetModelPtr GetModelPtr -// #define FN_RegUserMsg RegUserMsg -// #define FN_AnimationAutomove AnimationAutomove -// #define FN_GetBonePosition GetBonePosition -// #define FN_FunctionFromName FunctionFromName -// #define FN_NameForFunction NameForFunction -// #define FN_ClientPrintf ClientPrintf -// #define FN_ServerPrint ServerPrint -// #define FN_Cmd_Args Cmd_Args -// #define FN_Cmd_Argv Cmd_Argv -// #define FN_Cmd_Argc Cmd_Argc -// #define FN_GetAttachment GetAttachment -// #define FN_CRC32_Init CRC32_Init -// #define FN_CRC32_ProcessBuffer CRC32_ProcessBuffer -// #define FN_CRC32_ProcessByte CRC32_ProcessByte -// #define FN_CRC32_Final CRC32_Final -// #define FN_RandomLong RandomLong -// #define FN_RandomFloat RandomFloat -// #define FN_SetView SetView -// #define FN_Time Time -// #define FN_CrosshairAngle CrosshairAngle -// #define FN_LoadFileForMe LoadFileForMe -// #define FN_FreeFile FreeFile -// #define FN_EndSection EndSection -// #define FN_CompareFileTime CompareFileTime -// #define FN_GetGameDir GetGameDir -// #define FN_Cvar_RegisterVariable Cvar_RegisterVariable -// #define FN_FadeClientVolume FadeClientVolume -// #define FN_SetClientMaxspeed SetClientMaxspeed -// #define FN_CreateFakeClient CreateFakeClient -// #define FN_RunPlayerMove RunPlayerMove -// #define FN_NumberOfEntities NumberOfEntities -// #define FN_GetInfoKeyBuffer GetInfoKeyBuffer -// #define FN_InfoKeyValue InfoKeyValue -// #define FN_SetKeyValue SetKeyValue -// #define FN_SetClientKeyValue SetClientKeyValue -// #define FN_IsMapValid IsMapValid -// #define FN_StaticDecal StaticDecal -// #define FN_PrecacheGeneric PrecacheGeneric -// #define FN_GetPlayerUserId GetPlayerUserId -// #define FN_BuildSoundMsg BuildSoundMsg -// #define FN_IsDedicatedServer IsDedicatedServer -// #define FN_CVarGetPointer CVarGetPointer -// #define FN_GetPlayerWONId GetPlayerWONId -// #define FN_Info_RemoveKey Info_RemoveKey -// #define FN_GetPhysicsKeyValue GetPhysicsKeyValue -// #define FN_SetPhysicsKeyValue SetPhysicsKeyValue -// #define FN_GetPhysicsInfoString GetPhysicsInfoString -// #define FN_PrecacheEvent PrecacheEvent -// #define FN_PlaybackEvent PlaybackEvent -// #define FN_SetFatPVS SetFatPVS -// #define FN_SetFatPAS SetFatPAS -// #define FN_CheckVisibility CheckVisibility -// #define FN_DeltaSetField DeltaSetField -// #define FN_DeltaUnsetField DeltaUnsetField -// #define FN_DeltaAddEncoder DeltaAddEncoder -// #define FN_GetCurrentPlayer GetCurrentPlayer -// #define FN_CanSkipPlayer CanSkipPlayer -// #define FN_DeltaFindField DeltaFindField -// #define FN_DeltaSetFieldByIndex DeltaSetFieldByIndex -// #define FN_DeltaUnsetFieldByIndex DeltaUnsetFieldByIndex -// #define FN_SetGroupMask SetGroupMask -// #define FN_engCreateInstancedBaseline engCreateInstancedBaseline -// #define FN_Cvar_DirectSet Cvar_DirectSet -// #define FN_ForceUnmodified ForceUnmodified -// #define FN_GetPlayerStats GetPlayerStats -// #define FN_AddServerCommand AddServerCommand -// #define FN_Voice_GetClientListening Voice_GetClientListening -// #define FN_Voice_SetClientListening Voice_SetClientListening -// #define FN_GetPlayerAuthId GetPlayerAuthId - -// - GetEngineAPI_Post functions -// #define FN_PrecacheModel_Post PrecacheModel_Post -// #define FN_PrecacheSound_Post PrecacheSound_Post -// #define FN_SetModel_Post SetModel_Post -// #define FN_ModelIndex_Post ModelIndex_Post -// #define FN_ModelFrames_Post ModelFrames_Post -// #define FN_SetSize_Post SetSize_Post -// #define FN_ChangeLevel_Post ChangeLevel_Post -// #define FN_GetSpawnParms_Post GetSpawnParms_Post -// #define FN_SaveSpawnParms_Post SaveSpawnParms_Post -// #define FN_VecToYaw_Post VecToYaw_Post -// #define FN_VecToAngles_Post VecToAngles_Post -// #define FN_MoveToOrigin_Post MoveToOrigin_Post -// #define FN_ChangeYaw_Post ChangeYaw_Post -// #define FN_ChangePitch_Post ChangePitch_Post -// #define FN_FindEntityByString_Post FindEntityByString_Post -// #define FN_GetEntityIllum_Post GetEntityIllum_Post -// #define FN_FindEntityInSphere_Post FindEntityInSphere_Post -// #define FN_FindClientInPVS_Post FindClientInPVS_Post -// #define FN_EntitiesInPVS_Post EntitiesInPVS_Post -// #define FN_MakeVectors_Post MakeVectors_Post -// #define FN_AngleVectors_Post AngleVectors_Post -// #define FN_CreateEntity_Post CreateEntity_Post -// #define FN_RemoveEntity_Post RemoveEntity_Post -// #define FN_CreateNamedEntity_Post CreateNamedEntity_Post -// #define FN_MakeStatic_Post MakeStatic_Post -// #define FN_EntIsOnFloor_Post EntIsOnFloor_Post -// #define FN_DropToFloor_Post DropToFloor_Post -// #define FN_WalkMove_Post WalkMove_Post -// #define FN_SetOrigin_Post SetOrigin_Post -// #define FN_EmitSound_Post EmitSound_Post -// #define FN_EmitAmbientSound_Post EmitAmbientSound_Post -// #define FN_TraceLine_Post TraceLine_Post -// #define FN_TraceToss_Post TraceToss_Post -// #define FN_TraceMonsterHull_Post TraceMonsterHull_Post -// #define FN_TraceHull_Post TraceHull_Post -// #define FN_TraceModel_Post TraceModel_Post -// #define FN_TraceTexture_Post TraceTexture_Post -// #define FN_TraceSphere_Post TraceSphere_Post -// #define FN_GetAimVector_Post GetAimVector_Post -// #define FN_ServerCommand_Post ServerCommand_Post -// #define FN_ServerExecute_Post ServerExecute_Post -// #define FN_engClientCommand_Post engClientCommand_Post -// #define FN_ParticleEffect_Post ParticleEffect_Post -// #define FN_LightStyle_Post LightStyle_Post -// #define FN_DecalIndex_Post DecalIndex_Post -// #define FN_PointContents_Post PointContents_Post -// #define FN_MessageBegin_Post MessageBegin_Post -// #define FN_MessageEnd_Post MessageEnd_Post -// #define FN_WriteByte_Post WriteByte_Post -// #define FN_WriteChar_Post WriteChar_Post -// #define FN_WriteShort_Post WriteShort_Post -// #define FN_WriteLong_Post WriteLong_Post -// #define FN_WriteAngle_Post WriteAngle_Post -// #define FN_WriteCoord_Post WriteCoord_Post -// #define FN_WriteString_Post WriteString_Post -// #define FN_WriteEntity_Post WriteEntity_Post -// #define FN_CVarRegister_Post CVarRegister_Post -// #define FN_CVarGetFloat_Post CVarGetFloat_Post -// #define FN_CVarGetString_Post CVarGetString_Post -// #define FN_CVarSetFloat_Post CVarSetFloat_Post -// #define FN_CVarSetString_Post CVarSetString_Post -// #define FN_AlertMessage_Post AlertMessage_Post -// #define FN_EngineFprintf_Post EngineFprintf_Post -// #define FN_PvAllocEntPrivateData_Post PvAllocEntPrivateData_Post -// #define FN_PvEntPrivateData_Post PvEntPrivateData_Post -// #define FN_FreeEntPrivateData_Post FreeEntPrivateData_Post -// #define FN_SzFromIndex_Post SzFromIndex_Post -// #define FN_AllocString_Post AllocString_Post -// #define FN_GetVarsOfEnt_Post GetVarsOfEnt_Post -// #define FN_PEntityOfEntOffset_Post PEntityOfEntOffset_Post -// #define FN_EntOffsetOfPEntity_Post EntOffsetOfPEntity_Post -// #define FN_IndexOfEdict_Post IndexOfEdict_Post -// #define FN_PEntityOfEntIndex_Post PEntityOfEntIndex_Post -// #define FN_FindEntityByVars_Post FindEntityByVars_Post -// #define FN_GetModelPtr_Post GetModelPtr_Post -// #define FN_RegUserMsg_Post RegUserMsg_Post -// #define FN_AnimationAutomove_Post AnimationAutomove_Post -// #define FN_GetBonePosition_Post GetBonePosition_Post -// #define FN_FunctionFromName_Post FunctionFromName_Post -// #define FN_NameForFunction_Post NameForFunction_Post -// #define FN_ClientPrintf_Post ClientPrintf_Post -// #define FN_ServerPrint_Post ServerPrint_Post -// #define FN_Cmd_Args_Post Cmd_Args_Post -// #define FN_Cmd_Argv_Post Cmd_Argv_Post -// #define FN_Cmd_Argc_Post Cmd_Argc_Post -// #define FN_GetAttachment_Post GetAttachment_Post -// #define FN_CRC32_Init_Post CRC32_Init_Post -// #define FN_CRC32_ProcessBuffer_Post CRC32_ProcessBuffer_Post -// #define FN_CRC32_ProcessByte_Post CRC32_ProcessByte_Post -// #define FN_CRC32_Final_Post CRC32_Final_Post -// #define FN_RandomLong_Post RandomLong_Post -// #define FN_RandomFloat_Post RandomFloat_Post -// #define FN_SetView_Post SetView_Post -// #define FN_Time_Post Time_Post -// #define FN_CrosshairAngle_Post CrosshairAngle_Post -// #define FN_LoadFileForMe_Post LoadFileForMe_Post -// #define FN_FreeFile_Post FreeFile_Post -// #define FN_EndSection_Post EndSection_Post -// #define FN_CompareFileTime_Post CompareFileTime_Post -// #define FN_GetGameDir_Post GetGameDir_Post -// #define FN_Cvar_RegisterVariable_Post Cvar_RegisterVariable_Post -// #define FN_FadeClientVolume_Post FadeClientVolume_Post -// #define FN_SetClientMaxspeed_Post SetClientMaxspeed_Post -// #define FN_CreateFakeClient_Post CreateFakeClient_Post -// #define FN_RunPlayerMove_Post RunPlayerMove_Post -// #define FN_NumberOfEntities_Post NumberOfEntities_Post -// #define FN_GetInfoKeyBuffer_Post GetInfoKeyBuffer_Post -// #define FN_InfoKeyValue_Post InfoKeyValue_Post -// #define FN_SetKeyValue_Post SetKeyValue_Post -// #define FN_SetClientKeyValue_Post SetClientKeyValue_Post -// #define FN_IsMapValid_Post IsMapValid_Post -// #define FN_StaticDecal_Post StaticDecal_Post -// #define FN_PrecacheGeneric_Post PrecacheGeneric_Post -// #define FN_GetPlayerUserId_Post GetPlayerUserId_Post -// #define FN_BuildSoundMsg_Post BuildSoundMsg_Post -// #define FN_IsDedicatedServer_Post IsDedicatedServer_Post -// #define FN_CVarGetPointer_Post CVarGetPointer_Post -// #define FN_GetPlayerWONId_Post GetPlayerWONId_Post -// #define FN_Info_RemoveKey_Post Info_RemoveKey_Post -// #define FN_GetPhysicsKeyValue_Post GetPhysicsKeyValue_Post -// #define FN_SetPhysicsKeyValue_Post SetPhysicsKeyValue_Post -// #define FN_GetPhysicsInfoString_Post GetPhysicsInfoString_Post -// #define FN_PrecacheEvent_Post PrecacheEvent_Post -// #define FN_PlaybackEvent_Post PlaybackEvent_Post -// #define FN_SetFatPVS_Post SetFatPVS_Post -// #define FN_SetFatPAS_Post SetFatPAS_Post -// #define FN_CheckVisibility_Post CheckVisibility_Post -// #define FN_DeltaSetField_Post DeltaSetField_Post -// #define FN_DeltaUnsetField_Post DeltaUnsetField_Post -// #define FN_DeltaAddEncoder_Post DeltaAddEncoder_Post -// #define FN_GetCurrentPlayer_Post GetCurrentPlayer_Post -// #define FN_CanSkipPlayer_Post CanSkipPlayer_Post -// #define FN_DeltaFindField_Post DeltaFindField_Post -// #define FN_DeltaSetFieldByIndex_Post DeltaSetFieldByIndex_Post -// #define FN_DeltaUnsetFieldByIndex_Post DeltaUnsetFieldByIndex_Post -// #define FN_SetGroupMask_Post SetGroupMask_Post -// #define FN_engCreateInstancedBaseline_Post engCreateInstancedBaseline_Post -// #define FN_Cvar_DirectSet_Post Cvar_DirectSet_Post -// #define FN_ForceUnmodified_Post ForceUnmodified_Post -// #define FN_GetPlayerStats_Post GetPlayerStats_Post -// #define FN_AddServerCommand_Post AddServerCommand_Post -// #define FN_Voice_GetClientListening_Post Voice_GetClientListening_Post -// #define FN_Voice_SetClientListening_Post Voice_SetClientListening_Post -// #define FN_GetPlayerAuthId_Post GetPlayerAuthId_Post - -// #define FN_OnFreeEntPrivateData OnFreeEntPrivateData -// #define FN_GameShutdown GameShutdown -// #define FN_ShouldCollide ShouldCollide - -// #define FN_OnFreeEntPrivateData_Post OnFreeEntPrivateData_Post -// #define FN_GameShutdown_Post GameShutdown_Post -// #define FN_ShouldCollide_Post ShouldCollide_Post - - -#endif // USE_METAMOD - -#endif // __MODULECONFIG_H__ - diff --git a/dlls/arrayx/osdefs.h b/dlls/arrayx/osdefs.h deleted file mode 100644 index 60d61e68..00000000 --- a/dlls/arrayx/osdefs.h +++ /dev/null @@ -1,60 +0,0 @@ -/* __MSDOS__ set when compiling for DOS (not Windows) - * _Windows set when compiling for any version of Microsoft Windows - * __WIN32__ set when compiling for Windows95 or WindowsNT (32 bit mode) - * __32BIT__ set when compiling in 32-bit "flat" mode (DOS or Windows) - * - * Copyright 1998-2002, ITB CompuPhase, The Netherlands. - * info@compuphase.com. - */ - -#ifndef _OSDEFS_H -#define _OSDEFS_H - -/* Every compiler uses different "default" macros to indicate the mode - * it is in. Throughout the source, we use the Borland C++ macros, so - * the macros of Watcom C/C++ and Microsoft Visual C/C++ are mapped to - * those of Borland C++. - */ -#if defined(__WATCOMC__) -# if defined(__WINDOWS__) || defined(__NT__) -# define _Windows 1 -# endif -# ifdef __386__ -# define __32BIT__ 1 -# endif -# if defined(_Windows) && defined(__32BIT__) -# define __WIN32__ 1 -# endif -#elif defined(_MSC_VER) -# if defined(_WINDOWS) || defined(_WIN32) -# define _Windows 1 -# endif -# ifdef _WIN32 -# define __WIN32__ 1 -# define __32BIT__ 1 -# endif -#endif - -#if defined __linux__ - #include -#endif - -/* Linux NOW has these */ -#if !defined BIG_ENDIAN - #define BIG_ENDIAN 4321 -#endif -#if !defined LITTLE_ENDIAN - #define LITTLE_ENDIAN 1234 -#endif - -/* educated guess, BYTE_ORDER is undefined, i386 is common => little endian */ -#if !defined BYTE_ORDER - #if defined UCLINUX - #define BYTE_ORDER BIG_ENDIAN - #else - #define BYTE_ORDER LITTLE_ENDIAN - #endif -#endif - -#endif /* _OSDEFS_H */ - diff --git a/dlls/metamapx/JBRandom.h b/dlls/metamapx/JBRandom.h deleted file mode 100755 index a36c42d7..00000000 --- a/dlls/metamapx/JBRandom.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef INCLUDED_JBRANDOM -#define INCLUDED_JBRANDOM - -#include -#include - -class JBRandom -{ -public: - JBRandom(); - ~JBRandom(); - - static int JBRandomize(int lowestNumber,int highestNumber) - { - if (!init) - { - init = true; - srand(time(0)); - } - - int answer = (rand() % ((highestNumber + 1) - lowestNumber)) + lowestNumber; - - return answer; - }; - - static bool JBProbabilityPercent(short probability) // probability should be 1(%) to 100 (ie, percent) - { - if (!init) - { - init = true; - srand(time(0)); - } - - if (rand() % 100 + 1 <= probability) - return true; - else - return false; - }; - -private: - static bool init; - -}; - -bool JBRandom::init = false; - -#endif diff --git a/dlls/metamapx/amxxmodule.cpp b/dlls/metamapx/amxxmodule.cpp deleted file mode 100755 index b021ab49..00000000 --- a/dlls/metamapx/amxxmodule.cpp +++ /dev/null @@ -1,2990 +0,0 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* Parts Copyright (C) 2001-2003 Will Day -* -* This program is free software; you can redistribute it and/or modify it -* under the terms of the GNU General Public License as published by the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -* -* Description: AMX Mod X Module Interface Functions -*/ - -#include -#include -#include -#include -#include -#include "amxxmodule.h" - -/************* METAMOD SUPPORT *************/ -#ifdef USE_METAMOD - -enginefuncs_t g_engfuncs; -globalvars_t *gpGlobals; - -// GetEntityAPI2 functions -static DLL_FUNCTIONS g_EntityAPI_Table = -{ -#ifdef FN_GameDLLInit - FN_GameDLLInit, -#else - NULL, -#endif -#ifdef FN_DispatchSpawn - FN_DispatchSpawn, -#else - NULL, -#endif -#ifdef FN_DispatchThink - FN_DispatchThink, -#else - NULL, -#endif -#ifdef FN_DispatchUse - FN_DispatchUse, -#else - NULL, -#endif -#ifdef FN_DispatchTouch - FN_DispatchTouch, -#else - NULL, -#endif -#ifdef FN_DispatchBlocked - FN_DispatchBlocked, -#else - NULL, -#endif -#ifdef FN_DispatchKeyValue - FN_DispatchKeyValue, -#else - NULL, -#endif -#ifdef FN_DispatchSave - FN_DispatchSave, -#else - NULL, -#endif -#ifdef FN_DispatchRestore - FN_DispatchRestore, -#else - NULL, -#endif -#ifdef FN_DispatchObjectCollsionBox - FN_DispatchObjectCollsionBox, -#else - NULL, -#endif -#ifdef FN_SaveWriteFields - FN_SaveWriteFields, -#else - NULL, -#endif -#ifdef FN_SaveReadFields - FN_SaveReadFields, -#else - NULL, -#endif -#ifdef FN_SaveGlobalState - FN_SaveGlobalState, -#else - NULL, -#endif -#ifdef FN_RestoreGlobalState - FN_RestoreGlobalState, -#else - NULL, -#endif -#ifdef FN_ResetGlobalState - FN_ResetGlobalState, -#else - NULL, -#endif -#ifdef FN_ClientConnect - FN_ClientConnect, -#else - NULL, -#endif -#ifdef FN_ClientDisconnect - FN_ClientDisconnect, -#else - NULL, -#endif -#ifdef FN_ClientKill - FN_ClientKill, -#else - NULL, -#endif -#ifdef FN_ClientPutInServer - FN_ClientPutInServer, -#else - NULL, -#endif -#ifdef FN_ClientCommand - FN_ClientCommand, -#else - NULL, -#endif -#ifdef FN_ClientUserInfoChanged - FN_ClientUserInfoChanged, -#else - NULL, -#endif -#ifdef FN_ServerActivate - FN_ServerActivate, -#else - NULL, -#endif -#ifdef FN_ServerDeactivate - FN_ServerDeactivate, -#else - NULL, -#endif -#ifdef FN_PlayerPreThink - FN_PlayerPreThink, -#else - NULL, -#endif -#ifdef FN_PlayerPostThink - FN_PlayerPostThink, -#else - NULL, -#endif -#ifdef FN_StartFrame - FN_StartFrame, -#else - NULL, -#endif -#ifdef FN_ParmsNewLevel - FN_ParmsNewLevel, -#else - NULL, -#endif -#ifdef FN_ParmsChangeLevel - FN_ParmsChangeLevel, -#else - NULL, -#endif -#ifdef FN_GetGameDescription - FN_GetGameDescription, -#else - NULL, -#endif -#ifdef FN_PlayerCustomization - FN_PlayerCustomization, -#else - NULL, -#endif -#ifdef FN_SpectatorConnect - FN_SpectatorConnect, -#else - NULL, -#endif -#ifdef FN_SpectatorDisconnect - FN_SpectatorDisconnect, -#else - NULL, -#endif -#ifdef FN_SpectatorThink - FN_SpectatorThink, -#else - NULL, -#endif -#ifdef FN_Sys_Error - FN_Sys_Error, -#else - NULL, -#endif -#ifdef FN_PM_Move - FN_PM_Move, -#else - NULL, -#endif -#ifdef FN_PM_Init - FN_PM_Init, -#else - NULL, -#endif -#ifdef FN_PM_FindTextureType - FN_PM_FindTextureType, -#else - NULL, -#endif -#ifdef FN_SetupVisibility - FN_SetupVisibility, -#else - NULL, -#endif -#ifdef FN_UpdateClientData - FN_UpdateClientData, -#else - NULL, -#endif -#ifdef FN_AddToFullPack - FN_AddToFullPack, -#else - NULL, -#endif -#ifdef FN_CreateBaseline - FN_CreateBaseline, -#else - NULL, -#endif -#ifdef FN_RegisterEncoders - FN_RegisterEncoders, -#else - NULL, -#endif -#ifdef FN_GetWeaponData - FN_GetWeaponData, -#else - NULL, -#endif -#ifdef FN_CmdStart - FN_CmdStart, -#else - NULL, -#endif -#ifdef FN_CmdEnd - FN_CmdEnd, -#else - NULL, -#endif -#ifdef FN_ConnectionlessPacket - FN_ConnectionlessPacket, -#else - NULL, -#endif -#ifdef FN_GetHullBounds - FN_GetHullBounds, -#else - NULL, -#endif -#ifdef FN_CreateInstancedBaselines - FN_CreateInstancedBaselines, -#else - NULL, -#endif -#ifdef FN_InconsistentFile - FN_InconsistentFile, -#else - NULL, -#endif -#ifdef FN_AllowLagCompensation - FN_AllowLagCompensation -#else - NULL -#endif -}; // g_EntityAPI2_Table - -// GetEntityAPI2_Post functions -static DLL_FUNCTIONS g_EntityAPI_Post_Table = -{ -#ifdef FN_GameDLLInit_Post - FN_GameDLLInit_Post, -#else - NULL, -#endif -#ifdef FN_DispatchSpawn_Post - FN_DispatchSpawn_Post, -#else - NULL, -#endif -#ifdef FN_DispatchThink_Post - FN_DispatchThink_Post, -#else - NULL, -#endif -#ifdef FN_DispatchUse_Post - FN_DispatchUse_Post, -#else - NULL, -#endif -#ifdef FN_DispatchTouch_Post - FN_DispatchTouch_Post, -#else - NULL, -#endif -#ifdef FN_DispatchBlocked_Post - FN_DispatchBlocked_Post, -#else - NULL, -#endif -#ifdef FN_DispatchKeyValue_Post - FN_DispatchKeyValue_Post, -#else - NULL, -#endif -#ifdef FN_DispatchSave_Post - FN_DispatchSave_Post, -#else - NULL, -#endif -#ifdef FN_DispatchRestore_Post - FN_DispatchRestore_Post, -#else - NULL, -#endif -#ifdef FN_DispatchObjectCollsionBox_Post - FN_DispatchObjectCollsionBox_Post, -#else - NULL, -#endif -#ifdef FN_SaveWriteFields_Post - FN_SaveWriteFields_Post, -#else - NULL, -#endif -#ifdef FN_SaveReadFields_Post - FN_SaveReadFields_Post, -#else - NULL, -#endif -#ifdef FN_SaveGlobalState_Post - FN_SaveGlobalState_Post, -#else - NULL, -#endif -#ifdef FN_RestoreGlobalState_Post - FN_RestoreGlobalState_Post, -#else - NULL, -#endif -#ifdef FN_ResetGlobalState_Post - FN_ResetGlobalState_Post, -#else - NULL, -#endif -#ifdef FN_ClientConnect_Post - FN_ClientConnect_Post, -#else - NULL, -#endif -#ifdef FN_ClientDisconnect_Post - FN_ClientDisconnect_Post, -#else - NULL, -#endif -#ifdef FN_ClientKill_Post - FN_ClientKill_Post, -#else - NULL, -#endif -#ifdef FN_ClientPutInServer_Post - FN_ClientPutInServer_Post, -#else - NULL, -#endif -#ifdef FN_ClientCommand_Post - FN_ClientCommand_Post, -#else - NULL, -#endif -#ifdef FN_ClientUserInfoChanged_Post - FN_ClientUserInfoChanged_Post, -#else - NULL, -#endif -#ifdef FN_ServerActivate_Post - FN_ServerActivate_Post, -#else - NULL, -#endif -#ifdef FN_ServerDeactivate_Post - FN_ServerDeactivate_Post, -#else - NULL, -#endif -#ifdef FN_PlayerPreThink_Post - FN_PlayerPreThink_Post, -#else - NULL, -#endif -#ifdef FN_PlayerPostThink_Post - FN_PlayerPostThink_Post, -#else - NULL, -#endif -#ifdef FN_StartFrame_Post - FN_StartFrame_Post, -#else - NULL, -#endif -#ifdef FN_ParmsNewLevel_Post - FN_ParmsNewLevel_Post, -#else - NULL, -#endif -#ifdef FN_ParmsChangeLevel_Post - FN_ParmsChangeLevel_Post, -#else - NULL, -#endif -#ifdef FN_GetGameDescription_Post - FN_GetGameDescription_Post, -#else - NULL, -#endif -#ifdef FN_PlayerCustomization_Post - FN_PlayerCustomization_Post, -#else - NULL, -#endif -#ifdef FN_SpectatorConnect_Post - FN_SpectatorConnect_Post, -#else - NULL, -#endif -#ifdef FN_SpectatorDisconnect_Post - FN_SpectatorDisconnect_Post, -#else - NULL, -#endif -#ifdef FN_SpectatorThink_Post - FN_SpectatorThink_Post, -#else - NULL, -#endif -#ifdef FN_Sys_Error_Post - FN_Sys_Error_Post, -#else - NULL, -#endif -#ifdef FN_PM_Move_Post - FN_PM_Move_Post, -#else - NULL, -#endif -#ifdef FN_PM_Init_Post - FN_PM_Init_Post, -#else - NULL, -#endif -#ifdef FN_PM_FindTextureType_Post - FN_PM_FindTextureType_Post, -#else - NULL, -#endif -#ifdef FN_SetupVisibility_Post - FN_SetupVisibility_Post, -#else - NULL, -#endif -#ifdef FN_UpdateClientData_Post - FN_UpdateClientData_Post, -#else - NULL, -#endif -#ifdef FN_AddToFullPack_Post - FN_AddToFullPack_Post, -#else - NULL, -#endif -#ifdef FN_CreateBaseline_Post - FN_CreateBaseline_Post, -#else - NULL, -#endif -#ifdef FN_RegisterEncoders_Post - FN_RegisterEncoders_Post, -#else - NULL, -#endif -#ifdef FN_GetWeaponData_Post - FN_GetWeaponData_Post, -#else - NULL, -#endif -#ifdef FN_CmdStart_Post - FN_CmdStart_Post, -#else - NULL, -#endif -#ifdef FN_CmdEnd_Post - FN_CmdEnd_Post, -#else - NULL, -#endif -#ifdef FN_ConnectionlessPacket_Post - FN_ConnectionlessPacket_Post, -#else - NULL, -#endif -#ifdef FN_GetHullBounds_Post - FN_GetHullBounds_Post, -#else - NULL, -#endif -#ifdef FN_CreateInstancedBaselines_Post - FN_CreateInstancedBaselines_Post, -#else - NULL, -#endif -#ifdef FN_InconsistentFile_Post - FN_InconsistentFile_Post, -#else - NULL, -#endif -#ifdef FN_AllowLagCompensation - FN_AllowLagCompensation, -#else - NULL, -#endif -}; // g_EntityAPI2_Table - -static enginefuncs_t g_EngineFuncs_Table = -{ -#ifdef FN_PrecacheModel - FN_PrecacheModel, -#else - NULL, -#endif -#ifdef FN_PrecacheSound - FN_PrecacheSound, -#else - NULL, -#endif -#ifdef FN_SetModel - FN_SetModel, -#else - NULL, -#endif -#ifdef FN_ModelIndex - FN_ModelIndex, -#else - NULL, -#endif -#ifdef FN_ModelFrames - FN_ModelFrames, -#else - NULL, -#endif -#ifdef FN_SetSize - FN_SetSize, -#else - NULL, -#endif -#ifdef FN_ChangeLevel - FN_ChangeLevel, -#else - NULL, -#endif -#ifdef FN_GetSpawnParms - FN_GetSpawnParms, -#else - NULL, -#endif -#ifdef FN_SaveSpawnParms - FN_SaveSpawnParms, -#else - NULL, -#endif -#ifdef FN_VecToYaw - FN_VecToYaw, -#else - NULL, -#endif -#ifdef FN_VecToAngles - FN_VecToAngles, -#else - NULL, -#endif -#ifdef FN_MoveToOrigin - FN_MoveToOrigin, -#else - NULL, -#endif -#ifdef FN_ChangeYaw - FN_ChangeYaw, -#else - NULL, -#endif -#ifdef FN_ChangePitch - FN_ChangePitch, -#else - NULL, -#endif -#ifdef FN_FindEntityByString - FN_FindEntityByString, -#else - NULL, -#endif -#ifdef FN_GetEntityIllum - FN_GetEntityIllum, -#else - NULL, -#endif -#ifdef FN_FindEntityInSphere - FN_FindEntityInSphere, -#else - NULL, -#endif -#ifdef FN_FindClientInPVS - FN_FindClientInPVS, -#else - NULL, -#endif -#ifdef FN_EntitiesInPVS - FN_EntitiesInPVS, -#else - NULL, -#endif -#ifdef FN_MakeVectors - FN_MakeVectors, -#else - NULL, -#endif -#ifdef FN_AngleVectors - FN_AngleVectors, -#else - NULL, -#endif -#ifdef FN_CreateEntity - FN_CreateEntity, -#else - NULL, -#endif -#ifdef FN_RemoveEntity - FN_RemoveEntity, -#else - NULL, -#endif -#ifdef FN_CreateNamedEntity - FN_CreateNamedEntity, -#else - NULL, -#endif -#ifdef FN_MakeStatic - FN_MakeStatic, -#else - NULL, -#endif -#ifdef FN_EntIsOnFloor - FN_EntIsOnFloor, -#else - NULL, -#endif -#ifdef FN_DropToFloor - FN_DropToFloor, -#else - NULL, -#endif -#ifdef FN_WalkMove - FN_WalkMove, -#else - NULL, -#endif -#ifdef FN_SetOrigin - FN_SetOrigin, -#else - NULL, -#endif -#ifdef FN_EmitSound - FN_EmitSound, -#else - NULL, -#endif -#ifdef FN_EmitAmbientSound - FN_EmitAmbientSound, -#else - NULL, -#endif -#ifdef FN_TraceLine - FN_TraceLine, -#else - NULL, -#endif -#ifdef FN_TraceToss - FN_TraceToss, -#else - NULL, -#endif -#ifdef FN_TraceMonsterHull - FN_TraceMonsterHull, -#else - NULL, -#endif -#ifdef FN_TraceHull - FN_TraceHull, -#else - NULL, -#endif -#ifdef FN_TraceModel - FN_TraceModel, -#else - NULL, -#endif -#ifdef FN_TraceTexture - FN_TraceTexture, -#else - NULL, -#endif -#ifdef FN_TraceSphere - FN_TraceSphere, -#else - NULL, -#endif -#ifdef FN_GetAimVector - FN_GetAimVector, -#else - NULL, -#endif -#ifdef FN_ServerCommand - FN_ServerCommand, -#else - NULL, -#endif -#ifdef FN_ServerExecute - FN_ServerExecute, -#else - NULL, -#endif -#ifdef FN_engClientCommand - FN_engClientCommand, -#else - NULL, -#endif -#ifdef FN_ParticleEffect - FN_ParticleEffect, -#else - NULL, -#endif -#ifdef FN_LightStyle - FN_LightStyle, -#else - NULL, -#endif -#ifdef FN_DecalIndex - FN_DecalIndex, -#else - NULL, -#endif -#ifdef FN_PointContents - FN_PointContents, -#else - NULL, -#endif -#ifdef FN_MessageBegin - FN_MessageBegin, -#else - NULL, -#endif -#ifdef FN_MessageEnd - FN_MessageEnd, -#else - NULL, -#endif -#ifdef FN_WriteByte - FN_WriteByte, -#else - NULL, -#endif -#ifdef FN_WriteChar - FN_WriteChar, -#else - NULL, -#endif -#ifdef FN_WriteShort - FN_WriteShort, -#else - NULL, -#endif -#ifdef FN_WriteLong - FN_WriteLong, -#else - NULL, -#endif -#ifdef FN_WriteAngle - FN_WriteAngle, -#else - NULL, -#endif -#ifdef FN_WriteCoord - FN_WriteCoord, -#else - NULL, -#endif -#ifdef FN_WriteString - FN_WriteString, -#else - NULL, -#endif -#ifdef FN_WriteEntity - FN_WriteEntity, -#else - NULL, -#endif -#ifdef FN_CVarRegister - FN_CVarRegister, -#else - NULL, -#endif -#ifdef FN_CVarGetFloat - FN_CVarGetFloat, -#else - NULL, -#endif -#ifdef FN_CVarGetString - FN_CVarGetString, -#else - NULL, -#endif -#ifdef FN_CVarSetFloat - FN_CVarSetFloat, -#else - NULL, -#endif -#ifdef FN_CVarSetString - FN_CVarSetString, -#else - NULL, -#endif -#ifdef FN_AlertMessage - FN_AlertMessage, -#else - NULL, -#endif -#ifdef FN_EngineFprintf - FN_EngineFprintf, -#else - NULL, -#endif -#ifdef FN_PvAllocEntPrivateData - FN_PvAllocEntPrivateData, -#else - NULL, -#endif -#ifdef FN_PvEntPrivateData - FN_PvEntPrivateData, -#else - NULL, -#endif -#ifdef FN_FreeEntPrivateData - FN_FreeEntPrivateData, -#else - NULL, -#endif -#ifdef FN_SzFromIndex - FN_SzFromIndex, -#else - NULL, -#endif -#ifdef FN_AllocString - FN_AllocString, -#else - NULL, -#endif -#ifdef FN_GetVarsOfEnt - FN_GetVarsOfEnt, -#else - NULL, -#endif -#ifdef FN_PEntityOfEntOffset - FN_PEntityOfEntOffset, -#else - NULL, -#endif -#ifdef FN_EntOffsetOfPEntity - FN_EntOffsetOfPEntity, -#else - NULL, -#endif -#ifdef FN_IndexOfEdict - FN_IndexOfEdict, -#else - NULL, -#endif -#ifdef FN_PEntityOfEntIndex - FN_PEntityOfEntIndex, -#else - NULL, -#endif -#ifdef FN_FindEntityByVars - FN_FindEntityByVars, -#else - NULL, -#endif -#ifdef FN_GetModelPtr - FN_GetModelPtr, -#else - NULL, -#endif -#ifdef FN_RegUserMsg - FN_RegUserMsg, -#else - NULL, -#endif -#ifdef FN_AnimationAutomove - FN_AnimationAutomove, -#else - NULL, -#endif -#ifdef FN_GetBonePosition - FN_GetBonePosition, -#else - NULL, -#endif -#ifdef FN_FunctionFromName - FN_FunctionFromName, -#else - NULL, -#endif -#ifdef FN_NameForFunction - FN_NameForFunction, -#else - NULL, -#endif -#ifdef FN_ClientPrintf - FN_ClientPrintf, -#else - NULL, -#endif -#ifdef FN_ServerPrint - FN_ServerPrint, -#else - NULL, -#endif -#ifdef FN_Cmd_Args - FN_Cmd_Args, -#else - NULL, -#endif -#ifdef FN_Cmd_Argv - FN_Cmd_Argv, -#else - NULL, -#endif -#ifdef FN_Cmd_Argc - FN_Cmd_Argc, -#else - NULL, -#endif -#ifdef FN_GetAttachment - FN_GetAttachment, -#else - NULL, -#endif -#ifdef FN_CRC32_Init - FN_CRC32_Init, -#else - NULL, -#endif -#ifdef FN_CRC32_ProcessBuffer - FN_CRC32_ProcessBuffer, -#else - NULL, -#endif -#ifdef FN_CRC32_ProcessByte - FN_CRC32_ProcessByte, -#else - NULL, -#endif -#ifdef FN_CRC32_Final - FN_CRC32_Final, -#else - NULL, -#endif -#ifdef FN_RandomLong - FN_RandomLong, -#else - NULL, -#endif -#ifdef FN_RandomFloat - FN_RandomFloat, -#else - NULL, -#endif -#ifdef FN_SetView - FN_SetView, -#else - NULL, -#endif -#ifdef FN_Time - FN_Time, -#else - NULL, -#endif -#ifdef FN_CrosshairAngle - FN_CrosshairAngle, -#else - NULL, -#endif -#ifdef FN_LoadFileForMe - FN_LoadFileForMe, -#else - NULL, -#endif -#ifdef FN_FreeFile - FN_FreeFile, -#else - NULL, -#endif -#ifdef FN_EndSection - FN_EndSection, -#else - NULL, -#endif -#ifdef FN_CompareFileTime - FN_CompareFileTime, -#else - NULL, -#endif -#ifdef FN_GetGameDir - FN_GetGameDir, -#else - NULL, -#endif -#ifdef FN_Cvar_RegisterVariable - FN_Cvar_RegisterVariable, -#else - NULL, -#endif -#ifdef FN_FadeClientVolume - FN_FadeClientVolume, -#else - NULL, -#endif -#ifdef FN_SetClientMaxspeed - FN_SetClientMaxspeed, -#else - NULL, -#endif -#ifdef FN_CreateFakeClient - FN_CreateFakeClient, -#else - NULL, -#endif -#ifdef FN_RunPlayerMove - FN_RunPlayerMove, -#else - NULL, -#endif -#ifdef FN_NumberOfEntities - FN_NumberOfEntities, -#else - NULL, -#endif -#ifdef FN_GetInfoKeyBuffer - FN_GetInfoKeyBuffer, -#else - NULL, -#endif -#ifdef FN_InfoKeyValue - FN_InfoKeyValue, -#else - NULL, -#endif -#ifdef FN_SetKeyValue - FN_SetKeyValue, -#else - NULL, -#endif -#ifdef FN_SetClientKeyValue - FN_SetClientKeyValue, -#else - NULL, -#endif -#ifdef FN_IsMapValid - FN_IsMapValid, -#else - NULL, -#endif -#ifdef FN_StaticDecal - FN_StaticDecal, -#else - NULL, -#endif -#ifdef FN_PrecacheGeneric - FN_PrecacheGeneric, -#else - NULL, -#endif -#ifdef FN_GetPlayerUserId - FN_GetPlayerUserId, -#else - NULL, -#endif -#ifdef FN_BuildSoundMsg - FN_BuildSoundMsg, -#else - NULL, -#endif -#ifdef FN_IsDedicatedServer - FN_IsDedicatedServer, -#else - NULL, -#endif -#ifdef FN_CVarGetPointer - FN_CVarGetPointer, -#else - NULL, -#endif -#ifdef FN_GetPlayerWONId - FN_GetPlayerWONId, -#else - NULL, -#endif -#ifdef FN_Info_RemoveKey - FN_Info_RemoveKey, -#else - NULL, -#endif -#ifdef FN_GetPhysicsKeyValue - FN_GetPhysicsKeyValue, -#else - NULL, -#endif -#ifdef FN_SetPhysicsKeyValue - FN_SetPhysicsKeyValue, -#else - NULL, -#endif -#ifdef FN_GetPhysicsInfoString - FN_GetPhysicsInfoString, -#else - NULL, -#endif -#ifdef FN_PrecacheEvent - FN_PrecacheEvent, -#else - NULL, -#endif -#ifdef FN_PlaybackEvent - FN_PlaybackEvent, -#else - NULL, -#endif -#ifdef FN_SetFatPVS - FN_SetFatPVS, -#else - NULL, -#endif -#ifdef FN_SetFatPAS - FN_SetFatPAS, -#else - NULL, -#endif -#ifdef FN_CheckVisibility - FN_CheckVisibility, -#else - NULL, -#endif -#ifdef FN_DeltaSetField - FN_DeltaSetField, -#else - NULL, -#endif -#ifdef FN_DeltaUnsetField - FN_DeltaUnsetField, -#else - NULL, -#endif -#ifdef FN_DeltaAddEncoder - FN_DeltaAddEncoder, -#else - NULL, -#endif -#ifdef FN_GetCurrentPlayer - FN_GetCurrentPlayer, -#else - NULL, -#endif -#ifdef FN_CanSkipPlayer - FN_CanSkipPlayer, -#else - NULL, -#endif -#ifdef FN_DeltaFindField - FN_DeltaFindField, -#else - NULL, -#endif -#ifdef FN_DeltaSetFieldByIndex - FN_DeltaSetFieldByIndex, -#else - NULL, -#endif -#ifdef FN_DeltaUnsetFieldByIndex - FN_DeltaUnsetFieldByIndex, -#else - NULL, -#endif -#ifdef FN_SetGroupMask - FN_SetGroupMask, -#else - NULL, -#endif -#ifdef FN_engCreateInstancedBaseline - FN_engCreateInstancedBaseline, -#else - NULL, -#endif -#ifdef FN_Cvar_DirectSet - FN_Cvar_DirectSet, -#else - NULL, -#endif -#ifdef FN_ForceUnmodified - FN_ForceUnmodified, -#else - NULL, -#endif -#ifdef FN_GetPlayerStats - FN_GetPlayerStats, -#else - NULL, -#endif -#ifdef FN_AddServerCommand - FN_AddServerCommand, -#else - NULL, -#endif -#ifdef FN_Voice_GetClientListening - FN_Voice_GetClientListening, -#else - NULL, -#endif -#ifdef FN_Voice_SetClientListening - FN_Voice_SetClientListening, -#else - NULL, -#endif -#ifdef FN_GetPlayerAuthId - FN_GetPlayerAuthId -#else - NULL -#endif -}; // g_EngineFuncs_Table - - -static enginefuncs_t g_EngineFuncs_Post_Table = -{ -#ifdef FN_PrecacheModel_Post - FN_PrecacheModel_Post, -#else - NULL, -#endif -#ifdef FN_PrecacheSound_Post - FN_PrecacheSound_Post, -#else - NULL, -#endif -#ifdef FN_SetModel_Post - FN_SetModel_Post, -#else - NULL, -#endif -#ifdef FN_ModelIndex_Post - FN_ModelIndex_Post, -#else - NULL, -#endif -#ifdef FN_ModelFrames_Post - FN_ModelFrames_Post, -#else - NULL, -#endif -#ifdef FN_SetSize_Post - FN_SetSize_Post, -#else - NULL, -#endif -#ifdef FN_ChangeLevel_Post - FN_ChangeLevel_Post, -#else - NULL, -#endif -#ifdef FN_GetSpawnParms_Post - FN_GetSpawnParms_Post, -#else - NULL, -#endif -#ifdef FN_SaveSpawnParms_Post - FN_SaveSpawnParms_Post, -#else - NULL, -#endif -#ifdef FN_VecToYaw_Post - FN_VecToYaw_Post, -#else - NULL, -#endif -#ifdef FN_VecToAngles_Post - FN_VecToAngles_Post, -#else - NULL, -#endif -#ifdef FN_MoveToOrigin_Post - FN_MoveToOrigin_Post, -#else - NULL, -#endif -#ifdef FN_ChangeYaw_Post - FN_ChangeYaw_Post, -#else - NULL, -#endif -#ifdef FN_ChangePitch_Post - FN_ChangePitch_Post, -#else - NULL, -#endif -#ifdef FN_FindEntityByString_Post - FN_FindEntityByString_Post, -#else - NULL, -#endif -#ifdef FN_GetEntityIllum_Post - FN_GetEntityIllum_Post, -#else - NULL, -#endif -#ifdef FN_FindEntityInSphere_Post - FN_FindEntityInSphere_Post, -#else - NULL, -#endif -#ifdef FN_FindClientInPVS_Post - FN_FindClientInPVS_Post, -#else - NULL, -#endif -#ifdef FN_EntitiesInPVS_Post - FN_EntitiesInPVS_Post, -#else - NULL, -#endif -#ifdef FN_MakeVectors_Post - FN_MakeVectors_Post, -#else - NULL, -#endif -#ifdef FN_AngleVectors_Post - FN_AngleVectors_Post, -#else - NULL, -#endif -#ifdef FN_CreateEntity_Post - FN_CreateEntity_Post, -#else - NULL, -#endif -#ifdef FN_RemoveEntity_Post - FN_RemoveEntity_Post, -#else - NULL, -#endif -#ifdef FN_CreateNamedEntity_Post - FN_CreateNamedEntity_Post, -#else - NULL, -#endif -#ifdef FN_MakeStatic_Post - FN_MakeStatic_Post, -#else - NULL, -#endif -#ifdef FN_EntIsOnFloor_Post - FN_EntIsOnFloor_Post, -#else - NULL, -#endif -#ifdef FN_DropToFloor_Post - FN_DropToFloor_Post, -#else - NULL, -#endif -#ifdef FN_WalkMove_Post - FN_WalkMove_Post, -#else - NULL, -#endif -#ifdef FN_SetOrigin_Post - FN_SetOrigin_Post, -#else - NULL, -#endif -#ifdef FN_EmitSound_Post - FN_EmitSound_Post, -#else - NULL, -#endif -#ifdef FN_EmitAmbientSound_Post - FN_EmitAmbientSound_Post, -#else - NULL, -#endif -#ifdef FN_TraceLine_Post - FN_TraceLine_Post, -#else - NULL, -#endif -#ifdef FN_TraceToss_Post - FN_TraceToss_Post, -#else - NULL, -#endif -#ifdef FN_TraceMonsterHull_Post - FN_TraceMonsterHull_Post, -#else - NULL, -#endif -#ifdef FN_TraceHull_Post - FN_TraceHull_Post, -#else - NULL, -#endif -#ifdef FN_TraceModel_Post - FN_TraceModel_Post, -#else - NULL, -#endif -#ifdef FN_TraceTexture_Post - FN_TraceTexture_Post, -#else - NULL, -#endif -#ifdef FN_TraceSphere_Post - FN_TraceSphere_Post, -#else - NULL, -#endif -#ifdef FN_GetAimVector_Post - FN_GetAimVector_Post, -#else - NULL, -#endif -#ifdef FN_ServerCommand_Post - FN_ServerCommand_Post, -#else - NULL, -#endif -#ifdef FN_ServerExecute_Post - FN_ServerExecute_Post, -#else - NULL, -#endif -#ifdef FN_engClientCommand_Post - FN_engClientCommand_Post, -#else - NULL, -#endif -#ifdef FN_ParticleEffect_Post - FN_ParticleEffect_Post, -#else - NULL, -#endif -#ifdef FN_LightStyle_Post - FN_LightStyle_Post, -#else - NULL, -#endif -#ifdef FN_DecalIndex_Post - FN_DecalIndex_Post, -#else - NULL, -#endif -#ifdef FN_PointContents_Post - FN_PointContents_Post, -#else - NULL, -#endif -#ifdef FN_MessageBegin_Post - FN_MessageBegin_Post, -#else - NULL, -#endif -#ifdef FN_MessageEnd_Post - FN_MessageEnd_Post, -#else - NULL, -#endif -#ifdef FN_WriteByte_Post - FN_WriteByte_Post, -#else - NULL, -#endif -#ifdef FN_WriteChar_Post - FN_WriteChar_Post, -#else - NULL, -#endif -#ifdef FN_WriteShort_Post - FN_WriteShort_Post, -#else - NULL, -#endif -#ifdef FN_WriteLong_Post - FN_WriteLong_Post, -#else - NULL, -#endif -#ifdef FN_WriteAngle_Post - FN_WriteAngle_Post, -#else - NULL, -#endif -#ifdef FN_WriteCoord_Post - FN_WriteCoord_Post, -#else - NULL, -#endif -#ifdef FN_WriteString_Post - FN_WriteString_Post, -#else - NULL, -#endif -#ifdef FN_WriteEntity_Post - FN_WriteEntity_Post, -#else - NULL, -#endif -#ifdef FN_CVarRegister_Post - FN_CVarRegister_Post, -#else - NULL, -#endif -#ifdef FN_CVarGetFloat_Post - FN_CVarGetFloat_Post, -#else - NULL, -#endif -#ifdef FN_CVarGetString_Post - FN_CVarGetString_Post, -#else - NULL, -#endif -#ifdef FN_CVarSetFloat_Post - FN_CVarSetFloat_Post, -#else - NULL, -#endif -#ifdef FN_CVarSetString_Post - FN_CVarSetString_Post, -#else - NULL, -#endif -#ifdef FN_AlertMessage_Post - FN_AlertMessage_Post, -#else - NULL, -#endif -#ifdef FN_EngineFprintf_Post - FN_EngineFprintf_Post, -#else - NULL, -#endif -#ifdef FN_PvAllocEntPrivateData_Post - FN_PvAllocEntPrivateData_Post, -#else - NULL, -#endif -#ifdef FN_PvEntPrivateData_Post - FN_PvEntPrivateData_Post, -#else - NULL, -#endif -#ifdef FN_FreeEntPrivateData_Post - FN_FreeEntPrivateData_Post, -#else - NULL, -#endif -#ifdef FN_SzFromIndex_Post - FN_SzFromIndex_Post, -#else - NULL, -#endif -#ifdef FN_AllocString_Post - FN_AllocString_Post, -#else - NULL, -#endif -#ifdef FN_GetVarsOfEnt_Post - FN_GetVarsOfEnt_Post, -#else - NULL, -#endif -#ifdef FN_PEntityOfEntOffset_Post - FN_PEntityOfEntOffset_Post, -#else - NULL, -#endif -#ifdef FN_EntOffsetOfPEntity_Post - FN_EntOffsetOfPEntity_Post, -#else - NULL, -#endif -#ifdef FN_IndexOfEdict_Post - FN_IndexOfEdict_Post, -#else - NULL, -#endif -#ifdef FN_PEntityOfEntIndex_Post - FN_PEntityOfEntIndex_Post, -#else - NULL, -#endif -#ifdef FN_FindEntityByVars_Post - FN_FindEntityByVars_Post, -#else - NULL, -#endif -#ifdef FN_GetModelPtr_Post - FN_GetModelPtr_Post, -#else - NULL, -#endif -#ifdef FN_RegUserMsg_Post - FN_RegUserMsg_Post, -#else - NULL, -#endif -#ifdef FN_AnimationAutomove_Post - FN_AnimationAutomove_Post, -#else - NULL, -#endif -#ifdef FN_GetBonePosition_Post - FN_GetBonePosition_Post, -#else - NULL, -#endif -#ifdef FN_FunctionFromName_Post - FN_FunctionFromName_Post, -#else - NULL, -#endif -#ifdef FN_NameForFunction_Post - FN_NameForFunction_Post, -#else - NULL, -#endif -#ifdef FN_ClientPrintf_Post - FN_ClientPrintf_Post, -#else - NULL, -#endif -#ifdef FN_ServerPrint_Post - FN_ServerPrint_Post, -#else - NULL, -#endif -#ifdef FN_Cmd_Args_Post - FN_Cmd_Args_Post, -#else - NULL, -#endif -#ifdef FN_Cmd_Argv_Post - FN_Cmd_Argv_Post, -#else - NULL, -#endif -#ifdef FN_Cmd_Argc_Post - FN_Cmd_Argc_Post, -#else - NULL, -#endif -#ifdef FN_GetAttachment_Post - FN_GetAttachment_Post, -#else - NULL, -#endif -#ifdef FN_CRC32_Init_Post - FN_CRC32_Init_Post, -#else - NULL, -#endif -#ifdef FN_CRC32_ProcessBuffer_Post - FN_CRC32_ProcessBuffer_Post, -#else - NULL, -#endif -#ifdef FN_CRC32_ProcessByte_Post - FN_CRC32_ProcessByte_Post, -#else - NULL, -#endif -#ifdef FN_CRC32_Final_Post - FN_CRC32_Final_Post, -#else - NULL, -#endif -#ifdef FN_RandomLong_Post - FN_RandomLong_Post, -#else - NULL, -#endif -#ifdef FN_RandomFloat_Post - FN_RandomFloat_Post, -#else - NULL, -#endif -#ifdef FN_SetView_Post - FN_SetView_Post, -#else - NULL, -#endif -#ifdef FN_Time_Post - FN_Time_Post, -#else - NULL, -#endif -#ifdef FN_CrosshairAngle_Post - FN_CrosshairAngle_Post, -#else - NULL, -#endif -#ifdef FN_LoadFileForMe_Post - FN_LoadFileForMe_Post, -#else - NULL, -#endif -#ifdef FN_FreeFile_Post - FN_FreeFile_Post, -#else - NULL, -#endif -#ifdef FN_EndSection_Post - FN_EndSection_Post, -#else - NULL, -#endif -#ifdef FN_CompareFileTime_Post - FN_CompareFileTime_Post, -#else - NULL, -#endif -#ifdef FN_GetGameDir_Post - FN_GetGameDir_Post, -#else - NULL, -#endif -#ifdef FN_Cvar_RegisterVariable_Post - FN_Cvar_RegisterVariable_Post, -#else - NULL, -#endif -#ifdef FN_FadeClientVolume_Post - FN_FadeClientVolume_Post, -#else - NULL, -#endif -#ifdef FN_SetClientMaxspeed_Post - FN_SetClientMaxspeed_Post, -#else - NULL, -#endif -#ifdef FN_CreateFakeClient_Post - FN_CreateFakeClient_Post, -#else - NULL, -#endif -#ifdef FN_RunPlayerMove_Post - FN_RunPlayerMove_Post, -#else - NULL, -#endif -#ifdef FN_NumberOfEntities_Post - FN_NumberOfEntities_Post, -#else - NULL, -#endif -#ifdef FN_GetInfoKeyBuffer_Post - FN_GetInfoKeyBuffer_Post, -#else - NULL, -#endif -#ifdef FN_InfoKeyValue_Post - FN_InfoKeyValue_Post, -#else - NULL, -#endif -#ifdef FN_SetKeyValue_Post - FN_SetKeyValue_Post, -#else - NULL, -#endif -#ifdef FN_SetClientKeyValue_Post - FN_SetClientKeyValue_Post, -#else - NULL, -#endif -#ifdef FN_IsMapValid_Post - FN_IsMapValid_Post, -#else - NULL, -#endif -#ifdef FN_StaticDecal_Post - FN_StaticDecal_Post, -#else - NULL, -#endif -#ifdef FN_PrecacheGeneric_Post - FN_PrecacheGeneric_Post, -#else - NULL, -#endif -#ifdef FN_GetPlayerUserId_Post - FN_GetPlayerUserId_Post, -#else - NULL, -#endif -#ifdef FN_BuildSoundMsg_Post - FN_BuildSoundMsg_Post, -#else - NULL, -#endif -#ifdef FN_IsDedicatedServer_Post - FN_IsDedicatedServer_Post, -#else - NULL, -#endif -#ifdef FN_CVarGetPointer_Post - FN_CVarGetPointer_Post, -#else - NULL, -#endif -#ifdef FN_GetPlayerWONId_Post - FN_GetPlayerWONId_Post, -#else - NULL, -#endif -#ifdef FN_Info_RemoveKey_Post - FN_Info_RemoveKey_Post, -#else - NULL, -#endif -#ifdef FN_GetPhysicsKeyValue_Post - FN_GetPhysicsKeyValue_Post, -#else - NULL, -#endif -#ifdef FN_SetPhysicsKeyValue_Post - FN_SetPhysicsKeyValue_Post, -#else - NULL, -#endif -#ifdef FN_GetPhysicsInfoString_Post - FN_GetPhysicsInfoString_Post, -#else - NULL, -#endif -#ifdef FN_PrecacheEvent_Post - FN_PrecacheEvent_Post, -#else - NULL, -#endif -#ifdef FN_PlaybackEvent_Post - FN_PlaybackEvent_Post, -#else - NULL, -#endif -#ifdef FN_SetFatPVS_Post - FN_SetFatPVS_Post, -#else - NULL, -#endif -#ifdef FN_SetFatPAS_Post - FN_SetFatPAS_Post, -#else - NULL, -#endif -#ifdef FN_CheckVisibility_Post - FN_CheckVisibility_Post, -#else - NULL, -#endif -#ifdef FN_DeltaSetField_Post - FN_DeltaSetField_Post, -#else - NULL, -#endif -#ifdef FN_DeltaUnsetField_Post - FN_DeltaUnsetField_Post, -#else - NULL, -#endif -#ifdef FN_DeltaAddEncoder_Post - FN_DeltaAddEncoder_Post, -#else - NULL, -#endif -#ifdef FN_GetCurrentPlayer_Post - FN_GetCurrentPlayer_Post, -#else - NULL, -#endif -#ifdef FN_CanSkipPlayer_Post - FN_CanSkipPlayer_Post, -#else - NULL, -#endif -#ifdef FN_DeltaFindField_Post - FN_DeltaFindField_Post, -#else - NULL, -#endif -#ifdef FN_DeltaSetFieldByIndex_Post - FN_DeltaSetFieldByIndex_Post, -#else - NULL, -#endif -#ifdef FN_DeltaUnsetFieldByIndex_Post - FN_DeltaUnsetFieldByIndex_Post, -#else - NULL, -#endif -#ifdef FN_SetGroupMask_Post - FN_SetGroupMask_Post, -#else - NULL, -#endif -#ifdef FN_engCreateInstancedBaseline_Post - FN_engCreateInstancedBaseline_Post, -#else - NULL, -#endif -#ifdef FN_Cvar_DirectSet_Post - FN_Cvar_DirectSet_Post, -#else - NULL, -#endif -#ifdef FN_ForceUnmodified_Post - FN_ForceUnmodified_Post, -#else - NULL, -#endif -#ifdef FN_GetPlayerStats_Post - FN_GetPlayerStats_Post, -#else - NULL, -#endif -#ifdef FN_AddServerCommand_Post - FN_AddServerCommand_Post, -#else - NULL, -#endif -#ifdef FN_Voice_GetClientListening_Post - FN_Voice_GetClientListening_Post, -#else - NULL, -#endif -#ifdef FN_Voice_SetClientListening_Post - FN_Voice_SetClientListening_Post, -#else - NULL, -#endif -#ifdef FN_GetPlayerAuthId_Post - FN_GetPlayerAuthId_Post -#else - NULL -#endif -}; // g_EngineFuncs_Post_Table - - -static NEW_DLL_FUNCTIONS g_NewFuncs_Table = -{ -#ifdef FN_OnFreeEntPrivateData - FN_OnFreeEntPrivateData, -#else - NULL, -#endif -#ifdef FN_GameShutdown - FN_GameShutdown, -#else - NULL, -#endif -#ifdef FN_ShouldCollide - ShouldCollide, -#else - NULL, -#endif -}; - - -static NEW_DLL_FUNCTIONS g_NewFuncs_Post_Table = -{ -#ifdef FN_OnFreeEntPrivateData_Post - FN_OnFreeEntPrivateData_Post, -#else - NULL, -#endif -#ifdef FN_GameShutdown_Post - FN_GameShutdown_Post, -#else - NULL, -#endif -#ifdef FN_ShouldCollide_Post - ShouldCollide_Post, -#else - NULL, -#endif -}; - -// Global variables from metamod. These variable names are referenced by -// various macros. -meta_globals_t *gpMetaGlobals; // metamod globals -gamedll_funcs_t *gpGamedllFuncs; // gameDLL function tables -mutil_funcs_t *gpMetaUtilFuncs; // metamod utility functions - - -plugin_info_t Plugin_info = { - META_INTERFACE_VERSION, - MODULE_NAME, - MODULE_VERSION, - MODULE_DATE, - MODULE_AUTHOR, - MODULE_URL, - MODULE_LOGTAG, - PT_ANYTIME, - PT_ANYTIME -}; - -/* -C_DLLEXPORT int GetEntityAPI(DLL_FUNCTIONS *pFunctionTable, int interfaceVersion) -{ - LOG_DEVELOPER(PLID, "called: GetEntityAPI; version=%d", interfaceVersion); - if(!pFunctionTable) { - LOG_ERROR(PLID, "GetEntityAPI called with null pFunctionTable"); - return(FALSE); - } - else if(interfaceVersion != INTERFACE_VERSION) { - LOG_ERROR(PLID, "GetEntityAPI version mismatch; requested=%d ours=%d", interfaceVersion, INTERFACE_VERSION); - return(FALSE); - } - memcpy(pFunctionTable, &g_EntityAPI_Table, sizeof( DLL_FUNCTIONS ) ); - - return (TRUE); -} - -C_DLLEXPORT int GetEntityAPI_Post(DLL_FUNCTIONS *pFunctionTable, int interfaceVersion) -{ - LOG_DEVELOPER(PLID, "called: GetEntityAPI_Post; version=%d", interfaceVersion); - if(!pFunctionTable) { - LOG_ERROR(PLID, "GetEntityAPI_Post called with null pFunctionTable"); - return(FALSE); - } - else if(interfaceVersion != INTERFACE_VERSION) { - LOG_ERROR(PLID, "GetEntityAPI_Post version mismatch; requested=%d ours=%d", interfaceVersion, INTERFACE_VERSION); - return(FALSE); - } - memcpy(pFunctionTable, &g_EntityAPI_Post_Table, sizeof( DLL_FUNCTIONS ) ); - - return(TRUE); -} -*/ - -C_DLLEXPORT int GetEntityAPI2(DLL_FUNCTIONS *pFunctionTable, int *interfaceVersion) -{ - LOG_DEVELOPER(PLID, "called: GetEntityAPI2; version=%d", *interfaceVersion); - if(!pFunctionTable) { - LOG_ERROR(PLID, "GetEntityAPI2 called with null pFunctionTable"); - return(FALSE); - } - else if(*interfaceVersion != INTERFACE_VERSION) { - LOG_ERROR(PLID, - "GetEntityAPI2 version mismatch; requested=%d ours=%d", - *interfaceVersion, INTERFACE_VERSION); - //! Tell engine what version we had, so it can figure out who is - //! out of date. - *interfaceVersion = INTERFACE_VERSION; - return(FALSE); - } - memcpy(pFunctionTable, &g_EntityAPI_Table, sizeof(DLL_FUNCTIONS)); - return(TRUE); -} - -C_DLLEXPORT int GetEntityAPI2_Post(DLL_FUNCTIONS *pFunctionTable, int *interfaceVersion) -{ - LOG_DEVELOPER(PLID, "called: GetEntityAPI2_Post; version=%d", *interfaceVersion); - if(!pFunctionTable) { - LOG_ERROR(PLID, "GetEntityAPI2_Post called with null pFunctionTable"); - return(FALSE); - } - else if(*interfaceVersion != INTERFACE_VERSION) { - LOG_ERROR(PLID, "GetEntityAPI2_Post version mismatch; requested=%d ours=%d", *interfaceVersion, INTERFACE_VERSION); - //! Tell engine what version we had, so it can figure out who is out of date. - *interfaceVersion = INTERFACE_VERSION; - return(FALSE); - } - memcpy( pFunctionTable, &g_EntityAPI_Post_Table, sizeof( DLL_FUNCTIONS ) ); - - return(TRUE); -} - -C_DLLEXPORT int GetEngineFunctions(enginefuncs_t *pengfuncsFromEngine, int *interfaceVersion) -{ - LOG_DEVELOPER(PLID, "called: GetEngineFunctions; version=%d", - *interfaceVersion); - if(!pengfuncsFromEngine) { - LOG_ERROR(PLID, - "GetEngineFunctions called with null pengfuncsFromEngine"); - return(FALSE); - } - else if(*interfaceVersion != ENGINE_INTERFACE_VERSION) { - LOG_ERROR(PLID, - "GetEngineFunctions version mismatch; requested=%d ours=%d", - *interfaceVersion, ENGINE_INTERFACE_VERSION); - // Tell metamod what version we had, so it can figure out who is - // out of date. - *interfaceVersion = ENGINE_INTERFACE_VERSION; - return(FALSE); - } - memcpy(pengfuncsFromEngine, &g_EngineFuncs_Table, sizeof(enginefuncs_t)); - return TRUE; -} - -C_DLLEXPORT int GetEngineFunctions_Post(enginefuncs_t *pengfuncsFromEngine, int *interfaceVersion) -{ - LOG_DEVELOPER(PLID, "called: GetEngineFunctions_Post; version=%d", *interfaceVersion); - if(!pengfuncsFromEngine) { - LOG_ERROR(PLID, "GetEngineFunctions_Post called with null pengfuncsFromEngine"); - return(FALSE); - } - else if(*interfaceVersion != ENGINE_INTERFACE_VERSION) { - LOG_ERROR(PLID, "GetEngineFunctions_Post version mismatch; requested=%d ours=%d", *interfaceVersion, ENGINE_INTERFACE_VERSION); - // Tell metamod what version we had, so it can figure out who is out of date. - *interfaceVersion = ENGINE_INTERFACE_VERSION; - return(FALSE); - } - memcpy(pengfuncsFromEngine, &g_EngineFuncs_Post_Table, sizeof(enginefuncs_t)); - return TRUE; - -} - -C_DLLEXPORT int GetNewDLLFunctions(NEW_DLL_FUNCTIONS *pNewFunctionTable, - int *interfaceVersion) -{ - LOG_DEVELOPER(PLID, "called: GetNewDLLFunctions; version=%d", - *interfaceVersion); - if(!pNewFunctionTable) { - LOG_ERROR(PLID, - "GetNewDLLFunctions called with null pNewFunctionTable"); - return(FALSE); - } - else if(*interfaceVersion != NEW_DLL_FUNCTIONS_VERSION) { - LOG_ERROR(PLID, - "GetNewDLLFunctions version mismatch; requested=%d ours=%d", - *interfaceVersion, NEW_DLL_FUNCTIONS_VERSION); - //! Tell engine what version we had, so it can figure out who is - //! out of date. - *interfaceVersion = NEW_DLL_FUNCTIONS_VERSION; - return(FALSE); - } - memcpy(pNewFunctionTable, &g_NewFuncs_Table, sizeof(NEW_DLL_FUNCTIONS)); - return TRUE; -} - -C_DLLEXPORT int GetNewDLLFunctions_Post( NEW_DLL_FUNCTIONS *pNewFunctionTable, int *interfaceVersion ) -{ - LOG_DEVELOPER(PLID, "called: GetNewDLLFunctions_Post; version=%d", *interfaceVersion); - if(!pNewFunctionTable) { - LOG_ERROR(PLID, "GetNewDLLFunctions_Post called with null pNewFunctionTable"); - return(FALSE); - } - else if(*interfaceVersion != NEW_DLL_FUNCTIONS_VERSION) { - LOG_ERROR(PLID, "GetNewDLLFunctions_Post version mismatch; requested=%d ours=%d", *interfaceVersion, NEW_DLL_FUNCTIONS_VERSION); - //! Tell engine what version we had, so it can figure out who is out of date. - *interfaceVersion = NEW_DLL_FUNCTIONS_VERSION; - return(FALSE); - } - memcpy(pNewFunctionTable, &g_NewFuncs_Post_Table, sizeof(NEW_DLL_FUNCTIONS)); - return TRUE; -} - - -static META_FUNCTIONS g_MetaFunctions_Table = -{ - NULL, - NULL, - GetEntityAPI2, - GetEntityAPI2_Post, - GetNewDLLFunctions, - GetNewDLLFunctions_Post, - GetEngineFunctions, - GetEngineFunctions_Post -}; - -C_DLLEXPORT int Meta_Query(char *ifvers, plugin_info_t **pPlugInfo, mutil_funcs_t *pMetaUtilFuncs) -{ - if ((int) CVAR_GET_FLOAT("developer") != 0) - UTIL_LogPrintf("[%s] dev: called: Meta_Query; version=%s, ours=%s\n", - Plugin_info.logtag, ifvers, Plugin_info.ifvers); - - // Check for valid pMetaUtilFuncs before we continue. - if(!pMetaUtilFuncs) { - UTIL_LogPrintf("[%s] ERROR: Meta_Query called with null pMetaUtilFuncs\n", Plugin_info.logtag); - return(FALSE); - } - - gpMetaUtilFuncs = pMetaUtilFuncs; - - *pPlugInfo = &Plugin_info; - - // Check for interface version compatibility. - if(!FStrEq(ifvers, Plugin_info.ifvers)) { - int mmajor=0, mminor=0, pmajor=0, pminor=0; - LOG_MESSAGE(PLID, "WARNING: meta-interface version mismatch; requested=%s ours=%s", - Plugin_info.logtag, ifvers); - // If plugin has later interface version, it's incompatible (update - // metamod). - sscanf(ifvers, "%d:%d", &mmajor, &mminor); - sscanf(META_INTERFACE_VERSION, "%d:%d", &pmajor, &pminor); - if(pmajor > mmajor || (pmajor==mmajor && pminor > mminor)) { - LOG_ERROR(PLID, "metamod version is too old for this module; update metamod"); - return(FALSE); - } - // If plugin has older major interface version, it's incompatible - // (update plugin). - else if(pmajor < mmajor) { - LOG_ERROR(PLID, "metamod version is incompatible with this module; please find a newer version of this module"); - return(FALSE); - } - // Minor interface is older, but this is guaranteed to be backwards - // compatible, so we warn, but we still accept it. - else if(pmajor==mmajor && pminor < mminor) - LOG_MESSAGE(PLID, "WARNING: metamod version is newer than expected; consider finding a newer version of this module"); - else - LOG_ERROR(PLID, "unexpected version comparison; metavers=%s, mmajor=%d, mminor=%d; plugvers=%s, pmajor=%d, pminor=%d", ifvers, mmajor, mminor, META_INTERFACE_VERSION, pmajor, pminor); - } - -#ifdef FN_META_QUERY - return FN_META_QUERY(); -#endif // FN_META_QUERY - - return 1; -} - - -C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME now, META_FUNCTIONS *pFunctionTable, meta_globals_t *pMGlobals, gamedll_funcs_t *pGamedllFuncs) -{ - if(now > Plugin_info.loadable) { - LOG_ERROR(PLID, "Can't load module right now"); - return(FALSE); - } - if(!pMGlobals) { - LOG_ERROR(PLID, "Meta_Attach called with null pMGlobals"); - return(FALSE); - } - gpMetaGlobals=pMGlobals; - if(!pFunctionTable) { - LOG_ERROR(PLID, "Meta_Attach called with null pFunctionTable"); - return(FALSE); - } - - memcpy(pFunctionTable, &g_MetaFunctions_Table, sizeof(META_FUNCTIONS)); - gpGamedllFuncs=pGamedllFuncs; - - // Let's go. - -#ifdef FN_META_ATTACH - FN_META_ATTACH(); -#endif // FN_META_ATTACH - - return TRUE; -} - -C_DLLEXPORT int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason) -{ - if(now > Plugin_info.unloadable && reason != PNL_CMD_FORCED) { - LOG_ERROR(PLID, "Can't unload plugin right now"); - return(FALSE); - } - -#ifdef FN_META_DETACH - return FN_META_DETACH(); -#endif // FN_META_DETACH - return TRUE; -} - - - -#ifdef __linux__ -// linux prototype -C_DLLEXPORT void GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine, globalvars_t *pGlobals ) { - -#else -#ifdef _MSC_VER -// MSVC: Simulate __stdcall calling convention -C_DLLEXPORT __declspec(naked) void GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine, globalvars_t *pGlobals ) -{ - __asm // Prolog - { - // Save ebp - push ebp - // Set stack frame pointer - mov ebp, esp - // Allocate space for local variables - // The MSVC compiler gives us the needed size in __LOCAL_SIZE. - sub esp, __LOCAL_SIZE - // Push registers - push ebx - push esi - push edi - } -#else // _MSC_VER -#ifdef __GNUC__ -// GCC can also work with this -C_DLLEXPORT void __stdcall GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine, globalvars_t *pGlobals ) -{ -#else // __GNUC__ -// compiler not known -#error There is no support (yet) for your compiler. Please use MSVC or GCC compilers or contact the AMX Mod X dev team. -#endif // __GNUC__ -#endif // _MSC_VER -#endif // __linux__ - - // ** Function core <-- - memcpy(&g_engfuncs, pengfuncsFromEngine, sizeof(enginefuncs_t)); - gpGlobals = pGlobals; - // NOTE! Have to call logging function _after_ copying into g_engfuncs, so - // that g_engfuncs.pfnAlertMessage() can be resolved properly, heh. :) - UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag); - // --> ** Function core - -#ifdef _MSC_VER - // Epilog - if (sizeof(int*) == 8) - { // 64 bit - __asm - { - // Pop registers - pop edi - pop esi - pop ebx - // Restore stack frame pointer - mov esp, ebp - // Restore ebp - pop ebp - // 2 * sizeof(int*) = 16 on 64 bit - ret 16 - } - } - else - { // 32 bit - __asm - { - // Pop registers - pop edi - pop esi - pop ebx - // Restore stack frame pointer - mov esp, ebp - // Restore ebp - pop ebp - // 2 * sizeof(int*) = 8 on 32 bit - ret 8 - } - } -#endif // #ifdef _MSC_VER -} - -#endif // #ifdef USE_METAMOD - -/************* AMXX Stuff *************/ - -// *** Types *** -typedef void* (*PFN_REQ_FNPTR)(const char * /*name*/); - -// *** Globals *** -// Module info -static amxx_module_info_s g_ModuleInfo = -{ - MODULE_NAME, - MODULE_AUTHOR, - MODULE_VERSION, -#ifdef MODULE_RELOAD_ON_MAPCHANGE - 1 -#else // MODULE_RELOAD_ON_MAPCHANGE - 0 -#endif // MODULE_RELOAD_ON_MAPCHANGE -}; - -// Storage for the requested functions -PFN_ADD_NATIVES g_fn_AddNatives; -PFN_BUILD_PATHNAME g_fn_BuildPathname; -PFN_GET_AMXADDR g_fn_GetAmxAddr; -PFN_PRINT_SRVCONSOLE g_fn_PrintSrvConsole; -PFN_GET_MODNAME g_fn_GetModname; -PFN_GET_AMXSCRIPTNAME g_fn_GetAmxScriptName; -PFN_GET_AMXSCRIPT g_fn_GetAmxScript; -PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; -PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; -PFN_SET_AMXSTRING g_fn_SetAmxString; -PFN_GET_AMXSTRING g_fn_GetAmxString; -PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; -PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; -PFN_COPY_AMXMEMORY g_fn_CopyAmxMemory; -PFN_LOG g_fn_Log; -PFN_RAISE_AMXERROR g_fn_RaiseAmxError; -PFN_REGISTER_FORWARD g_fn_RegisterForward; -PFN_EXECUTE_FORWARD g_fn_ExecuteForward; -PFN_PREPARE_CELLARRAY g_fn_PrepareCellArray; -PFN_PREPARE_CHARARRAY g_fn_PrepareCharArray; -PFN_IS_PLAYER_VALID g_fn_IsPlayerValid; -PFN_GET_PLAYER_NAME g_fn_GetPlayerName; -PFN_GET_PLAYER_IP g_fn_GetPlayerIP; -PFN_IS_PLAYER_INGAME g_fn_IsPlayerIngame; -PFN_IS_PLAYER_BOT g_fn_IsPlayerBot; -PFN_IS_PLAYER_AUTHORIZED g_fn_IsPlayerAuthorized; -PFN_GET_PLAYER_TIME g_fn_GetPlayerTime; -PFN_GET_PLAYER_PLAYTIME g_fn_GetPlayerPlayTime; -PFN_GET_PLAYER_CURWEAPON g_fn_GetPlayerCurweapon; -PFN_GET_PLAYER_TEAMID g_fn_GetPlayerTeamID; -PFN_GET_PLAYER_DEATHS g_fn_GetPlayerDeaths; -PFN_GET_PLAYER_MENU g_fn_GetPlayerMenu; -PFN_GET_PLAYER_KEYS g_fn_GetPlayerKeys; -PFN_IS_PLAYER_ALIVE g_fn_IsPlayerAlive; -PFN_GET_PLAYER_FRAGS g_fn_GetPlayerFrags; -PFN_IS_PLAYER_CONNECTING g_fn_IsPlayerConnecting; -PFN_IS_PLAYER_HLTV g_fn_IsPlayerHLTV; -PFN_GET_PLAYER_ARMOR g_fn_GetPlayerArmor; -PFN_GET_PLAYER_HEALTH g_fn_GetPlayerHealth; -PFN_ALLOCATOR g_fn_Allocator; -PFN_REALLOCATOR g_fn_Reallocator; -PFN_DEALLOCATOR g_fn_Deallocator; -PFN_AMX_EXEC g_fn_AmxExec; -PFN_AMX_EXECV g_fn_AmxExecv; -PFN_AMX_ALLOT g_fn_AmxAllot; -PFN_AMX_FINDPUBLIC g_fn_AmxFindPublic; -PFN_LOAD_AMXSCRIPT g_fn_LoadAmxScript; -PFN_UNLOAD_AMXSCRIPT g_fn_UnloadAmxScript; -PFN_REAL_TO_CELL g_fn_RealToCell; -PFN_CELL_TO_REAL g_fn_CellToReal; -PFN_REGISTER_SPFORWARD g_fn_RegisterSPForward; -PFN_REGISTER_SPFORWARD_BYNAME g_fn_RegisterSPForwardByName; -PFN_UNREGISTER_SPFORWARD g_fn_UnregisterSPForward; - -// *** Exports *** -C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo) -{ - // check parameters - if (!interfaceVersion || !moduleInfo) - return AMXX_PARAM; - - // check interface version - if (*interfaceVersion != AMXX_INTERFACE_VERSION) - { - // Tell amxx core our interface version - *interfaceVersion = AMXX_INTERFACE_VERSION; - return AMXX_IFVERS; - } - - // copy module info - memcpy(moduleInfo, &g_ModuleInfo, sizeof(amxx_module_info_s)); - -#ifdef FN_AMXX_QUERY - FN_AMXX_QUERY(); -#endif // FN_AMXX_QUERY - // Everything ok :) - return AMXX_OK; -} - -// request function -#define REQFUNC(name, fptr, type) if ((fptr = (type)reqFnptrFunc(name)) == 0) return AMXX_FUNC_NOT_PRESENT -// request optional function -#define REQFUNC_OPT(name, fptr, type) fptr = (type)reqFnptrFunc(name) - -C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) -{ - // Check pointer - if (!reqFnptrFunc) - return AMXX_PARAM; - - // Req all known functions - // Misc - REQFUNC("BuildPathname", g_fn_BuildPathname, PFN_BUILD_PATHNAME); - REQFUNC("PrintSrvConsole", g_fn_PrintSrvConsole, PFN_PRINT_SRVCONSOLE); - REQFUNC("GetModname", g_fn_GetModname, PFN_GET_MODNAME); - REQFUNC("Log", g_fn_Log, PFN_LOG); - - // Amx scripts - REQFUNC("GetAmxScript", g_fn_GetAmxScript, PFN_GET_AMXSCRIPT); - REQFUNC("FindAmxScriptByAmx", g_fn_FindAmxScriptByAmx, PFN_FIND_AMXSCRIPT_BYAMX); - REQFUNC("FindAmxScriptByName", g_fn_FindAmxScriptByName, PFN_FIND_AMXSCRIPT_BYNAME); - REQFUNC("LoadAmxScript", g_fn_LoadAmxScript, PFN_LOAD_AMXSCRIPT); - REQFUNC("UnloadAmxScript", g_fn_UnloadAmxScript, PFN_UNLOAD_AMXSCRIPT); - - // String / mem in amx scripts support - REQFUNC("SetAmxString", g_fn_SetAmxString, PFN_SET_AMXSTRING); - REQFUNC("GetAmxString", g_fn_GetAmxString, PFN_GET_AMXSTRING); - REQFUNC("GetAmxStringLen", g_fn_GetAmxStringLen, PFN_GET_AMXSTRINGLEN); - REQFUNC("FormatAmxString", g_fn_FormatAmxString, PFN_FORMAT_AMXSTRING); - REQFUNC("CopyAmxMemory", g_fn_CopyAmxMemory, PFN_COPY_AMXMEMORY); - REQFUNC("GetAmxAddr", g_fn_GetAmxAddr, PFN_GET_AMXADDR); - - REQFUNC("amx_Exec", g_fn_AmxExec, PFN_AMX_EXEC); - REQFUNC("amx_Execv", g_fn_AmxExecv, PFN_AMX_EXECV); - REQFUNC("amx_FindPublic", g_fn_AmxFindPublic, PFN_AMX_FINDPUBLIC); - REQFUNC("amx_Allot", g_fn_AmxAllot, PFN_AMX_ALLOT); - - // Natives / Forwards - REQFUNC("AddNatives", g_fn_AddNatives, PFN_ADD_NATIVES); - REQFUNC("RaiseAmxError", g_fn_RaiseAmxError, PFN_RAISE_AMXERROR); - REQFUNC("RegisterForward", g_fn_RegisterForward, PFN_REGISTER_FORWARD); - REQFUNC("RegisterSPForward", g_fn_RegisterSPForward, PFN_REGISTER_SPFORWARD); - REQFUNC("RegisterSPForwardByName", g_fn_RegisterSPForwardByName, PFN_REGISTER_SPFORWARD_BYNAME); - REQFUNC("UnregisterSPForward", g_fn_UnregisterSPForward, PFN_UNREGISTER_SPFORWARD); - REQFUNC("ExecuteForward", g_fn_ExecuteForward, PFN_EXECUTE_FORWARD); - REQFUNC("PrepareCellArray", g_fn_PrepareCellArray, PFN_PREPARE_CELLARRAY); - REQFUNC("PrepareCharArray", g_fn_PrepareCharArray, PFN_PREPARE_CHARARRAY); - - // Player - REQFUNC("IsPlayerValid", g_fn_IsPlayerValid, PFN_IS_PLAYER_VALID); - REQFUNC("GetPlayerName", g_fn_GetPlayerName, PFN_GET_PLAYER_NAME); - REQFUNC("GetPlayerIP", g_fn_GetPlayerIP, PFN_GET_PLAYER_IP); - REQFUNC("IsPlayerInGame", g_fn_IsPlayerIngame, PFN_IS_PLAYER_INGAME); - REQFUNC("IsPlayerBot", g_fn_IsPlayerBot, PFN_IS_PLAYER_BOT); - REQFUNC("IsPlayerAuthorized", g_fn_IsPlayerAuthorized, PFN_IS_PLAYER_AUTHORIZED); - REQFUNC("GetPlayerTime", g_fn_GetPlayerTime, PFN_GET_PLAYER_TIME); - REQFUNC("GetPlayerPlayTime", g_fn_GetPlayerPlayTime, PFN_GET_PLAYER_PLAYTIME); - REQFUNC("GetPlayerCurweapon", g_fn_GetPlayerCurweapon, PFN_GET_PLAYER_CURWEAPON); - REQFUNC("GetPlayerTeamID", g_fn_GetPlayerTeamID, PFN_GET_PLAYER_TEAMID); - REQFUNC("GetPlayerDeaths", g_fn_GetPlayerDeaths, PFN_GET_PLAYER_DEATHS); - REQFUNC("GetPlayerMenu", g_fn_GetPlayerMenu, PFN_GET_PLAYER_MENU); - REQFUNC("GetPlayerKeys", g_fn_GetPlayerKeys, PFN_GET_PLAYER_KEYS); - REQFUNC("IsPlayerAlive", g_fn_IsPlayerAlive, PFN_IS_PLAYER_ALIVE); - REQFUNC("GetPlayerFrags", g_fn_GetPlayerFrags, PFN_GET_PLAYER_FRAGS); - REQFUNC("IsPlayerConnecting", g_fn_IsPlayerConnecting, PFN_IS_PLAYER_CONNECTING); - REQFUNC("IsPlayerHLTV", g_fn_IsPlayerHLTV, PFN_IS_PLAYER_HLTV); - REQFUNC("GetPlayerArmor", g_fn_GetPlayerArmor, PFN_GET_PLAYER_ARMOR); - REQFUNC("GetPlayerHealth", g_fn_GetPlayerHealth, PFN_GET_PLAYER_HEALTH); - - // Memory - REQFUNC_OPT("Allocator", g_fn_Allocator, PFN_ALLOCATOR); - REQFUNC_OPT("Reallocator", g_fn_Reallocator, PFN_REALLOCATOR); - REQFUNC_OPT("Deallocator", g_fn_Deallocator, PFN_DEALLOCATOR); - - REQFUNC("CellToReal", g_fn_CellToReal, PFN_CELL_TO_REAL); - REQFUNC("RealToCell", g_fn_RealToCell, PFN_REAL_TO_CELL); - -#ifdef FN_AMXX_ATTACH - FN_AMXX_ATTACH(); -#endif // FN_AMXX_ATACH - - return AMXX_OK; -} - -C_DLLEXPORT int AMXX_Detach() -{ -#ifdef FN_AMXX_DETACH - FN_AMXX_DETACH(); -#endif // FN_AMXX_DETACH - - return AMXX_OK; -} - -C_DLLEXPORT int AMXX_PluginsLoaded() -{ -#ifdef FN_AMXX_PLUGINSLOADED - FN_AMXX_PLUGINSLOADED(); -#endif // FN_AMXX_PLUGINSLOADED - return AMXX_OK; -} - -// Advanced MF functions -void MF_Log(const char *fmt, ...) -{ - // :TODO: Overflow possible here - char msg[3072]; - va_list arglst; - va_start(arglst, fmt); - vsprintf(msg, fmt, arglst); - va_end(arglst); - - g_fn_Log("[%s] %s", MODULE_NAME, msg); -} - - -#ifdef _DEBUG -// validate macros -// Makes sure compiler reports errors when macros are invalid -void ValidateMacros_DontCallThis_Smiley() -{ - MF_BuildPathname("str", "str", 0); - MF_FormatAmxString(NULL, 0, 0, NULL); - MF_GetAmxAddr(NULL, 0); - MF_PrintSrvConsole("str", "str", 0); - MF_GetModname(); - MF_GetScriptName(0); - MF_GetScriptAmx(0); - MF_FindScriptByAmx(NULL); - MF_FindScriptByName("str"); - MF_SetAmxString(NULL, 0, "str", 0); - MF_GetAmxString(NULL, 0, 0, 0); - MF_GetAmxStringLen(NULL); - MF_CopyAmxMemory(NULL, NULL, 0); - MF_Log("str", "str", 0); - MF_RaiseAmxError(NULL, 0); - MF_RegisterForward("str", (ForwardExecType)0, 0, 0, 0); - MF_ExecuteForward(0, 0, 0); - MF_PrepareCellArray(NULL, 0); - MF_PrepareCharArray(NULL, 0); - MF_IsPlayerValid(0); - MF_GetPlayerName(0); - MF_GetPlayerIP(0); - MF_IsPlayerIngame(0); - MF_IsPlayerBot(0); - MF_IsPlayerAuthorized(0); - MF_GetPlayerTime(0); - MF_GetPlayerPlayTime(0); - MF_GetPlayerCurweapon(0); - MF_GetPlayerTeamID(0); - MF_GetPlayerDeaths(0); - MF_GetPlayerMenu(0); - MF_GetPlayerKeys(0); - MF_IsPlayerAlive(0); - MF_GetPlayerFrags(0); - MF_IsPlayerConnecting(0); - MF_IsPlayerHLTV(0); - MF_GetPlayerArmor(0); - MF_GetPlayerHealth(0); - MF_AmxExec(0, 0, 0, 0); - MF_AmxExecv(0, 0, 0, 0, 0); - MF_AmxFindPublic(0, 0, 0); - MF_AmxAllot(0, 0, 0, 0); - MF_LoadAmxScript(0, 0, 0, 0); - MF_UnloadAmxScript(0, 0); - MF_RegisterSPForward(0, 0, 0, 0, 0, 0); - MF_RegisterSPForwardByName(0, 0, 0, 0, 0, 0); - MF_UnregisterSPForward(0); -} -#endif - -/************* MEMORY *************/ -// undef all defined macros -#undef new -#undef delete -#undef malloc -#undef calloc -#undef realloc -#undef free - -const unsigned int m_alloc_unknown = 0; -const unsigned int m_alloc_new = 1; -const unsigned int m_alloc_new_array = 2; -const unsigned int m_alloc_malloc = 3; -const unsigned int m_alloc_calloc = 4; -const unsigned int m_alloc_realloc = 5; -const unsigned int m_alloc_delete = 6; -const unsigned int m_alloc_delete_array = 7; -const unsigned int m_alloc_free = 8; - -const char *g_Mem_CurrentFilename = "??"; -int g_Mem_CurrentLine = 0; -const char *g_Mem_CurrentFunc = "??"; - -const char *Mem_MakeSourceFile(const char *sourceFile) -{ - static char buffer[512]; - static size_t pos = 0; - if (!pos) - { - // init - buffer[0] = '['; - strcpy(buffer + 1, MODULE_NAME); - pos = strlen(MODULE_NAME) + 1; - buffer[pos++] = ']'; - } - - // convert from absolute path to [modulename]filename - const char *ptr = strrchr(sourceFile, '\\'); - if (ptr) - ptr++; - else - { - ptr = strrchr(sourceFile, '/'); - if (ptr) - ptr++; - else - ptr = sourceFile; - } - strcpy(buffer + pos, ptr); - return buffer; -} - -void Mem_SetOwner(const char *filename, int line, const char *function) -{ - g_Mem_CurrentFilename = filename; - g_Mem_CurrentLine = line; - g_Mem_CurrentFunc = function; -} - -void Mem_ResetGlobals() -{ - Mem_SetOwner("??", 0, "??"); -} - -// raw (re/de)allocators -void * Mem_Allocator(const char *sourceFile, const unsigned int sourceLine, const char *sourceFunc, - const unsigned int allocationType, const size_t reportedSize) -{ - if (g_fn_Allocator) - return g_fn_Allocator(Mem_MakeSourceFile(sourceFile), sourceLine, sourceFunc, allocationType, reportedSize); - else - return malloc(reportedSize); -} - -void * Mem_Reallocator(const char *sourceFile, const unsigned int sourceLine, const char *sourceFunc, - const unsigned int reallocationType, const size_t reportedSize, void *reportedAddress) -{ - if (g_fn_Reallocator) - return g_fn_Reallocator(Mem_MakeSourceFile(sourceFile), sourceLine, sourceFunc, reallocationType, reportedSize, reportedAddress); - else - return realloc(reportedAddress, reportedSize); -} - -void Mem_Deallocator(const char *sourceFile, const unsigned int sourceLine, const char *sourceFunc, - const unsigned int deallocationType, void *reportedAddress) -{ - // If you you get user breakpoint here, something failed :) - // - invalid pointer - // - alloc type mismatch ( for example - // char *a = new char[5]; delete char; - // ) - // - The allocation unit is damaged (for example - // char *a = new char[5]; a[6] = 8; - // ) - // - break on dealloc flag set (somehow) - - if (g_fn_Deallocator) - g_fn_Deallocator(Mem_MakeSourceFile(sourceFile), sourceLine, sourceFunc, deallocationType, reportedAddress); - else - free(reportedAddress); -} - -// new and delete operators -void *operator new(size_t reportedSize) -{ - if (reportedSize == 0) - reportedSize = 1; - void *ptr = Mem_Allocator(g_Mem_CurrentFilename, g_Mem_CurrentLine, g_Mem_CurrentFunc, m_alloc_new, reportedSize); - // :TODO: Handler support ? - if (ptr) - return ptr; - - // allocation failed - throw std::bad_alloc(); -} - -void *operator new[](size_t reportedSize) -{ - if (reportedSize == 0) - reportedSize = 1; - void *ptr = Mem_Allocator(g_Mem_CurrentFilename, g_Mem_CurrentLine, g_Mem_CurrentFunc, m_alloc_new_array, reportedSize); - // :TODO: Handler support ? - if (ptr) - return ptr; - - // allocation failed - throw std::bad_alloc(); -} - -// Microsoft memory tracking operators -void *operator new(size_t reportedSize, const char *sourceFile, int sourceLine) -{ - if (reportedSize == 0) - reportedSize = 1; - void *ptr = Mem_Allocator(g_Mem_CurrentFilename, g_Mem_CurrentLine, g_Mem_CurrentFunc, m_alloc_new, reportedSize); - // :TODO: Handler support ? - if (ptr) - return ptr; - - // allocation failed - throw std::bad_alloc(); -} -void *operator new[](size_t reportedSize, const char *sourceFile, int sourceLine) -{ - if (reportedSize == 0) - reportedSize = 1; - void *ptr = Mem_Allocator(g_Mem_CurrentFilename, g_Mem_CurrentLine, g_Mem_CurrentFunc, m_alloc_new_array, reportedSize); - // :TODO: Handler support ? - if (ptr) - return ptr; - - // allocation failed - throw std::bad_alloc(); -} - -void operator delete(void *reportedAddress) -{ - if (!reportedAddress) - return; - - Mem_Deallocator(g_Mem_CurrentFilename, g_Mem_CurrentLine, g_Mem_CurrentFunc, m_alloc_delete, reportedAddress); -} - -void operator delete[](void *reportedAddress) -{ - if (!reportedAddress) - return; - - Mem_Deallocator(g_Mem_CurrentFilename, g_Mem_CurrentLine, g_Mem_CurrentFunc, m_alloc_delete_array, reportedAddress); -} - -/************* stuff from dlls/util.cpp *************/ -// must come here because cbase.h declares it's own operator new - -#ifdef USE_METAMOD - -// Selected portions of dlls/util.cpp from SDK 2.1. -// Functions copied from there as needed... -// And modified to avoid buffer overflows (argh). - -/*** -* -* Copyright (c) 1999, 2000 Valve LLC. All rights reserved. -* -* This product contains software technology licensed from Id -* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. -* All Rights Reserved. -* -* Use, distribution, and modification of this source code and/or resulting -* object code is restricted to non-commercial enhancements to products from -* Valve LLC. All other use, distribution, or modification is prohibited -* without written permission from Valve LLC. -* -****/ -/* - -===== util.cpp ======================================================== - - Utility code. Really not optional after all. - -*/ - -#include -#include "sdk_util.h" -#include - -#include // for strncpy(), etc - -#include "osdep.h" // win32 vsnprintf, etc - -char* UTIL_VarArgs( char *format, ... ) -{ - va_list argptr; - static char string[1024]; - - va_start (argptr, format); - vsnprintf (string, sizeof(string), format, argptr); - va_end (argptr); - - return string; -} - - -//========================================================= -// UTIL_LogPrintf - Prints a logged message to console. -// Preceded by LOG: ( timestamp ) < message > -//========================================================= -void UTIL_LogPrintf( char *fmt, ... ) -{ - va_list argptr; - static char string[1024]; - - va_start ( argptr, fmt ); - vsnprintf ( string, sizeof(string), fmt, argptr ); - va_end ( argptr ); - - // Print to server console - ALERT( at_logged, "%s", string ); -} - - -void UTIL_HudMessage(CBaseEntity *pEntity, const hudtextparms_t &textparms, - const char *pMessage) -{ - if ( !pEntity ) - return; - - MESSAGE_BEGIN( MSG_ONE, SVC_TEMPENTITY, NULL, ENT(pEntity->pev) ); - WRITE_BYTE( TE_TEXTMESSAGE ); - WRITE_BYTE( textparms.channel & 0xFF ); - - WRITE_SHORT( FixedSigned16( textparms.x, 1<<13 ) ); - WRITE_SHORT( FixedSigned16( textparms.y, 1<<13 ) ); - WRITE_BYTE( textparms.effect ); - - WRITE_BYTE( textparms.r1 ); - WRITE_BYTE( textparms.g1 ); - WRITE_BYTE( textparms.b1 ); - WRITE_BYTE( textparms.a1 ); - - WRITE_BYTE( textparms.r2 ); - WRITE_BYTE( textparms.g2 ); - WRITE_BYTE( textparms.b2 ); - WRITE_BYTE( textparms.a2 ); - - WRITE_SHORT( FixedUnsigned16( textparms.fadeinTime, 1<<8 ) ); - WRITE_SHORT( FixedUnsigned16( textparms.fadeoutTime, 1<<8 ) ); - WRITE_SHORT( FixedUnsigned16( textparms.holdTime, 1<<8 ) ); - - if ( textparms.effect == 2 ) - WRITE_SHORT( FixedUnsigned16( textparms.fxTime, 1<<8 ) ); - - if ( strlen( pMessage ) < 512 ) - { - WRITE_STRING( pMessage ); - } - else - { - char tmp[512]; - strncpy( tmp, pMessage, 511 ); - tmp[511] = 0; - WRITE_STRING( tmp ); - } - MESSAGE_END(); -} - -short FixedSigned16( float value, float scale ) -{ - int output; - - output = (int) (value * scale); - - if ( output > 32767 ) - output = 32767; - - if ( output < -32768 ) - output = -32768; - - return (short)output; -} - -unsigned short FixedUnsigned16( float value, float scale ) -{ - int output; - - output = (int) (value * scale); - if ( output < 0 ) - output = 0; - if ( output > 0xFFFF ) - output = 0xFFFF; - - return (unsigned short)output; -} -#endif // USE_METAMOD diff --git a/dlls/metamapx/amxxmodule.h b/dlls/metamapx/amxxmodule.h deleted file mode 100755 index 0d41cab2..00000000 --- a/dlls/metamapx/amxxmodule.h +++ /dev/null @@ -1,2152 +0,0 @@ -/* - * AMX Mod X Module Interface Functions - * This file may be freely used -*/ - -// prevent double include -#ifndef __AMXXMODULE_H__ -#define __AMXXMODULE_H__ - -// config -#include "moduleconfig.h" - -// metamod include files -#ifdef USE_METAMOD -#include -#include -#include "osdep.h" -#endif // #ifdef USE_METAMOD - -// DLL Export -#undef DLLEXPORT -#ifndef __linux__ -#define DLLEXPORT __declspec(dllexport) -#else -#define DLLEXPORT -#define LINUX -#endif - -#undef C_DLLEXPORT -#define C_DLLEXPORT extern "C" DLLEXPORT - -// ***** AMXX stuff ***** - -// module interface version is 1 -#define AMXX_INTERFACE_VERSION 1 - -// amxx module info -struct amxx_module_info_s -{ - const char *name; - const char *author; - const char *version; - int reload; // reload on mapchange when nonzero -}; - - - -// return values from functions called by amxx -#define AMXX_OK 0 /* no error */ -#define AMXX_IFVERS 1 /* interface version */ -#define AMXX_PARAM 2 /* Invalid parameter */ -#define AMXX_FUNC_NOT_PRESENT 3 /* Function not present */ - -// *** Small stuff *** -// The next section is copied from the amx.h file -// Copyright (c) ITB CompuPhase, 1997-2004 - -#if defined __LCC__ || defined __DMC__ || defined __linux__ - #include -#elif !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L - /* The ISO C99 defines the int16_t and int_32t types. If the compiler got - * here, these types are probably undefined. - */ - #if defined __FreeBSD__ - #include - #else - typedef short int int16_t; - typedef unsigned short int uint16_t; - #if defined SN_TARGET_PS2 - typedef int int32_t; - typedef unsigned int uint32_t; - #else - typedef long int int32_t; - typedef unsigned long int uint32_t; - #endif - #if defined __WIN32__ || defined _WIN32 || defined WIN32 - typedef __int64 int64_t; - typedef unsigned __int64 uint64_t; - #define HAVE_I64 - #elif defined __GNUC__ - typedef long long int64_t; - typedef unsigned long long uint64_t; - #define HAVE_I64 - #endif - #endif -#endif - - -/* calling convention for native functions */ -#if !defined AMX_NATIVE_CALL - #define AMX_NATIVE_CALL -#endif -/* calling convention for all interface functions and callback functions */ -#if !defined AMXAPI - #if defined STDECL - #define AMXAPI __stdcall - #elif defined CDECL - #define AMXAPI __cdecl - #else - #define AMXAPI - #endif -#endif -#if !defined AMXEXPORT - #define AMXEXPORT -#endif - - - -#if !defined SMALL_CELL_SIZE - #define SMALL_CELL_SIZE 32 /* by default, use 32-bit cells */ -#endif -#if SMALL_CELL_SIZE==32 - typedef uint32_t ucell; - typedef int32_t cell; - typedef float REAL; -#elif SMALL_CELL_SIZE==64 - typedef uint64_t ucell; - typedef int64_t cell; - typedef double REAL; -#else - #error Unsupported cell size (SMALL_CELL_SIZE) -#endif - -#define UNPACKEDMAX ((1 << (sizeof(cell)-1)*8) - 1) - -struct tagAMX; -typedef cell (AMX_NATIVE_CALL *AMX_NATIVE)(struct tagAMX *amx, cell *params); -typedef int (AMXAPI *AMX_CALLBACK)(struct tagAMX *amx, cell index, - cell *result, cell *params); -typedef int (AMXAPI *AMX_DEBUG)(struct tagAMX *amx); -#if !defined _FAR - #define _FAR -#endif - -#if defined _MSC_VER - #pragma warning(disable:4103) /* disable warning message 4103 that complains - * about pragma pack in a header file */ - #pragma warning(disable:4100) /* "'%$S' : unreferenced formal parameter" */ -#endif - - -#if defined SN_TARGET_PS2 || defined __GNUC__ - #define AMX_NO_ALIGN -#endif - - -#if defined __GNUC__ - #define PACKED __attribute__((packed)) -#else - #define PACKED -#endif - - -#if !defined AMX_NO_ALIGN - #if defined __linux__ - #pragma pack(1) /* structures must be packed (byte-aligned) */ - #else - #pragma pack(push) - #pragma pack(1) /* structures must be packed (byte-aligned) */ - #if defined __TURBOC__ - #pragma option -a- /* "pack" pragma for older Borland compilers */ - #endif - #endif -#endif - -typedef struct { - const char _FAR *name PACKED; - AMX_NATIVE func PACKED; -} AMX_NATIVE_INFO; - -#define AMX_USERNUM 4 - -/* The AMX structure is the internal structure for many functions. Not all - * fields are valid at all times; many fields are cached in local variables. - */ -typedef struct tagAMX { - unsigned char _FAR *base PACKED; /* points to the AMX header ("amxhdr") plus the code, optionally also the data */ - unsigned char _FAR *data PACKED; /* points to separate data+stack+heap, may be NULL */ - AMX_CALLBACK callback PACKED; - AMX_DEBUG debug PACKED; /* debug callback */ - /* for external functions a few registers must be accessible from the outside */ - cell cip PACKED; /* instruction pointer: relative to base + amxhdr->cod */ - cell frm PACKED; /* stack frame base: relative to base + amxhdr->dat */ - cell hea PACKED; /* top of the heap: relative to base + amxhdr->dat */ - cell hlw PACKED; /* bottom of the heap: relative to base + amxhdr->dat */ - cell stk PACKED; /* stack pointer: relative to base + amxhdr->dat */ - cell stp PACKED; /* top of the stack: relative to base + amxhdr->dat */ - int flags PACKED; /* current status, see amx_Flags() */ - /* for assertions and debug hook */ - cell curline PACKED; - cell curfile PACKED; - int dbgcode PACKED; - cell dbgaddr PACKED; - cell dbgparam PACKED; - char _FAR *dbgname PACKED; - /* user data */ - long usertags[AMX_USERNUM] PACKED; - void _FAR *userdata[AMX_USERNUM] PACKED; - /* native functions can raise an error */ - int error PACKED; - /* the sleep opcode needs to store the full AMX status */ - cell pri PACKED; - cell alt PACKED; - cell reset_stk PACKED; - cell reset_hea PACKED; - cell sysreq_d PACKED; /* relocated address/value for the SYSREQ.D opcode */ - #if defined JIT - /* support variables for the JIT */ - int reloc_size PACKED; /* required temporary buffer for relocations */ - long code_size PACKED; /* estimated memory footprint of the native code */ - #endif -} AMX; - -enum { - AMX_ERR_NONE, - /* reserve the first 15 error codes for exit codes of the abstract machine */ - AMX_ERR_EXIT, /* forced exit */ - AMX_ERR_ASSERT, /* assertion failed */ - AMX_ERR_STACKERR, /* stack/heap collision */ - AMX_ERR_BOUNDS, /* index out of bounds */ - AMX_ERR_MEMACCESS, /* invalid memory access */ - AMX_ERR_INVINSTR, /* invalid instruction */ - AMX_ERR_STACKLOW, /* stack underflow */ - AMX_ERR_HEAPLOW, /* heap underflow */ - AMX_ERR_CALLBACK, /* no callback, or invalid callback */ - AMX_ERR_NATIVE, /* native function failed */ - AMX_ERR_DIVIDE, /* divide by zero */ - AMX_ERR_SLEEP, /* go into sleepmode - code can be restarted */ - - AMX_ERR_MEMORY = 16, /* out of memory */ - AMX_ERR_FORMAT, /* invalid file format */ - AMX_ERR_VERSION, /* file is for a newer version of the AMX */ - AMX_ERR_NOTFOUND, /* function not found */ - AMX_ERR_INDEX, /* invalid index parameter (bad entry point) */ - AMX_ERR_DEBUG, /* debugger cannot run */ - AMX_ERR_INIT, /* AMX not initialized (or doubly initialized) */ - AMX_ERR_USERDATA, /* unable to set user data field (table full) */ - AMX_ERR_INIT_JIT, /* cannot initialize the JIT */ - AMX_ERR_PARAMS, /* parameter error */ - AMX_ERR_DOMAIN, /* domain error, expression result does not fit in range */ -}; - - -// ***** declare functions ***** - -#ifdef USE_METAMOD -void UTIL_LogPrintf( char *fmt, ... ); -void UTIL_HudMessage(CBaseEntity *pEntity, const hudtextparms_t &textparms, const char *pMessage); -short FixedSigned16( float value, float scale ); -unsigned short FixedUnsigned16( float value, float scale ); - -#ifdef FN_META_QUERY -void FN_META_QUERY(void); -#endif // FN_META_QUERY - -#ifdef FN_META_ATTACH -void FN_META_ATTACH(void); -#endif // FN_META_ATTACH - -#ifdef FN_META_DETACH -void FN_META_DETACH(void); -#endif // FN_META_DETACH - - - - - -#ifdef FN_GameDLLInit -void FN_GameDLLInit(void); -#endif // FN_GameDLLInit - -#ifdef FN_DispatchSpawn -int FN_DispatchSpawn(edict_t *pent); -#endif // FN_DispatchSpawn - -#ifdef FN_DispatchThink -void FN_DispatchThink(edict_t *pent); -#endif // FN_DispatchThink - -#ifdef FN_DispatchUse -void FN_DispatchUse(edict_t *pentUser, edict_t *pentOther); -#endif // FN_DispatchUse - -#ifdef FN_DispatchTouch -void FN_DispatchTouch(edict_t *pentTouched, edict_t *pentOther); -#endif // FN_DispatchTouch - -#ifdef FN_DispatchBlocked -void FN_DispatchBlocked(edict_t *pentBlocked, edict_t *pentOther); -#endif // FN_DispatchBlocked - -#ifdef FN_DispatchKeyValue -void FN_DispatchKeyValue(edict_t *pentKeyvalue, KeyValueData *pkvd); -#endif // FN_DispatchKeyValue - -#ifdef FN_DispatchSave -void FN_DispatchSave(edict_t *pent, SAVERESTOREDATA *pSaveData); -#endif // FN_DispatchSave - -#ifdef FN_DispatchRestore -int FN_DispatchRestore(edict_t *pent, SAVERESTOREDATA *pSaveData, int globalEntity); -#endif // FN_DispatchRestore - -#ifdef FN_DispatchObjectCollsionBox -void FN_DispatchObjectCollsionBox(edict_t *pent); -#endif // FN_DispatchObjectCollsionBox - -#ifdef FN_SaveWriteFields -void FN_SaveWriteFields(SAVERESTOREDATA *pSaveData, const char *pname, void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount); -#endif // FN_SaveWriteFields - -#ifdef FN_SaveReadFields -void FN_SaveReadFields(SAVERESTOREDATA *pSaveData, const char *pname, void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount); -#endif // FN_SaveReadFields - -#ifdef FN_SaveGlobalState -void FN_SaveGlobalState(SAVERESTOREDATA *pSaveData); -#endif // FN_SaveGlobalState - -#ifdef FN_RestoreGlobalState -void FN_RestoreGlobalState(SAVERESTOREDATA *pSaveData); -#endif // FN_RestoreGlobalState - -#ifdef FN_ResetGlobalState -void FN_ResetGlobalState(void); -#endif // FN_ResetGlobalState - -#ifdef FN_ClientConnect -BOOL FN_ClientConnect(edict_t *pEntity, const char *pszName, const char *pszAddress, char szRejectReason[ 128 ]); -#endif // FN_ClientConnect - -#ifdef FN_ClientDisconnect -void FN_ClientDisconnect(edict_t *pEntity); -#endif // FN_ClientDisconnect - -#ifdef FN_ClientKill -void FN_ClientKill(edict_t *pEntity); -#endif // FN_ClientKill - -#ifdef FN_ClientPutInServer -void FN_ClientPutInServer(edict_t *pEntity); -#endif // FN_ClientPutInServer - -#ifdef FN_ClientCommand -void FN_ClientCommand(edict_t *pEntity); -#endif // FN_ClientCommand - -#ifdef FN_ClientUserInfoChanged -void FN_ClientUserInfoChanged(edict_t *pEntity, char *infobuffer); -#endif // FN_ClientUserInfoChanged - -#ifdef FN_ServerActivate -void FN_ServerActivate(edict_t *pEdictList, int edictCount, int clientMax); -#endif // FN_ServerActivate - -#ifdef FN_ServerDeactivate -void FN_ServerDeactivate(void); -#endif // FN_ServerDeactivate - -#ifdef FN_PlayerPreThink -void FN_PlayerPreThink(edict_t *pEntity); -#endif // FN_PlayerPreThink - -#ifdef FN_PlayerPostThink -void FN_PlayerPostThink(edict_t *pEntity); -#endif // FN_PlayerPostThink - -#ifdef FN_StartFrame -void FN_StartFrame(void); -#endif // FN_StartFrame - -#ifdef FN_ParmsNewLevel -void FN_ParmsNewLevel(void); -#endif // FN_ParmsNewLevel - -#ifdef FN_ParmsChangeLevel -void FN_ParmsChangeLevel(void); -#endif // FN_ParmsChangeLevel - -#ifdef FN_GetGameDescription -const char *FN_GetGameDescription(void); -#endif // FN_GetGameDescription - -#ifdef FN_PlayerCustomization -void FN_PlayerCustomization(edict_t *pEntity, customization_t *pCust); -#endif // FN_PlayerCustomization - -#ifdef FN_SpectatorConnect -void FN_SpectatorConnect(edict_t *pEntity); -#endif // FN_SpectatorConnect - -#ifdef FN_SpectatorDisconnect -void FN_SpectatorDisconnect(edict_t *pEntity); -#endif // FN_SpectatorDisconnect - -#ifdef FN_SpectatorThink -void FN_SpectatorThink(edict_t *pEntity); -#endif // FN_SpectatorThink - -#ifdef FN_Sys_Error -void FN_Sys_Error(const char *error_string); -#endif // FN_Sys_Error - -#ifdef FN_PM_Move -void FN_PM_Move(struct playermove_s *ppmove, int server); -#endif // FN_PM_Move - -#ifdef FN_PM_Init -void FN_PM_Init(struct playermove_s *ppmove); -#endif // FN_PM_Init - -#ifdef FN_PM_FindTextureType -char FN_PM_FindTextureType(char *name); -#endif // FN_PM_FindTextureType - -#ifdef FN_SetupVisibility -void FN_SetupVisibility(edict_t *pViewEntity, edict_t *pClient, unsigned char **pvs, unsigned char **pas); -#endif // FN_SetupVisibility - -#ifdef FN_UpdateClientData -void FN_UpdateClientData(const struct edict_s *ent, int sendweapons, struct clientdata_s *cd); -#endif // FN_UpdateClientData - -#ifdef FN_AddToFullPack -int FN_AddToFullPack(struct entity_state_s *state, int e, edict_t *ent, edict_t *host, int hostflags, int player, unsigned char *pSet); -#endif // FN_AddToFullPack - -#ifdef FN_CreateBaseline -void FN_CreateBaseline(int player, int eindex, struct entity_state_s *baseline, struct edict_s *entity, int playermodelindex, vec3_t player_mins, vec3_t player_maxs); -#endif // FN_CreateBaseline - -#ifdef FN_RegisterEncoders -void FN_RegisterEncoders(void); -#endif // FN_RegisterEncoders - -#ifdef FN_GetWeaponData -int FN_GetWeaponData(struct edict_s *player, struct weapon_data_s *info); -#endif // FN_GetWeaponData - -#ifdef FN_CmdStart -void FN_CmdStart(const edict_t *player, const struct usercmd_s *cmd, unsigned int random_seed); -#endif // FN_CmdStart - -#ifdef FN_CmdEnd -void FN_CmdEnd(const edict_t *player); -#endif // FN_CmdEnd - -#ifdef FN_ConnectionlessPacket -int FN_ConnectionlessPacket(const struct netadr_s *net_from, const char *args, char *response_buffer, int *response_buffer_size); -#endif // FN_ConnectionlessPacket - -#ifdef FN_GetHullBounds -int FN_GetHullBounds(int hullnumber, float *mins, float *maxs); -#endif // FN_GetHullBounds - -#ifdef FN_CreateInstancedBaselines -void FN_CreateInstancedBaselines(void); -#endif // FN_CreateInstancedBaselines - -#ifdef FN_InconsistentFile -int FN_InconsistentFile(const edict_t *player, const char *filename, char *disconnect_message); -#endif // FN_InconsistentFile - -#ifdef FN_AllowLagCompensation -int FN_AllowLagCompensation(void); -#endif // FN_AllowLagCompensation - - - - -#ifdef FN_GameDLLInit_Post -void FN_GameDLLInit_Post(void); -#endif // FN_GameDLLInit_Post - -#ifdef FN_DispatchSpawn_Post -int FN_DispatchSpawn_Post(edict_t *pent); -#endif // FN_DispatchSpawn_Post - -#ifdef FN_DispatchThink_Post -void FN_DispatchThink_Post(edict_t *pent); -#endif // FN_DispatchThink_Post - -#ifdef FN_DispatchUse_Post -void FN_DispatchUse_Post(edict_t *pentUser, edict_t *pentOther); -#endif // FN_DispatchUse_Post - -#ifdef FN_DispatchTouch_Post -void FN_DispatchTouch_Post(edict_t *pentTouched, edict_t *pentOther); -#endif // FN_DispatchTouch_Post - -#ifdef FN_DispatchBlocked_Post -void FN_DispatchBlocked_Post(edict_t *pentBlocked, edict_t *pentOther); -#endif // FN_DispatchBlocked_Post - -#ifdef FN_DispatchKeyValue_Post -void FN_DispatchKeyValue_Post(edict_t *pentKeyvalue, KeyValueData *pkvd); -#endif // FN_DispatchKeyValue_Post - -#ifdef FN_DispatchSave_Post -void FN_DispatchSave_Post(edict_t *pent, SAVERESTOREDATA *pSaveData); -#endif // FN_DispatchSave_Post - -#ifdef FN_DispatchRestore_Post -int FN_DispatchRestore_Post(edict_t *pent, SAVERESTOREDATA *pSaveData, int globalEntity); -#endif // FN_DispatchRestore_Post - -#ifdef FN_DispatchObjectCollsionBox_Post -void FN_DispatchObjectCollsionBox_Post(edict_t *pent); -#endif // FN_DispatchObjectCollsionBox_Post - -#ifdef FN_SaveWriteFields_Post -void FN_SaveWriteFields_Post(SAVERESTOREDATA *pSaveData, const char *pname, void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount); -#endif // FN_SaveWriteFields_Post - -#ifdef FN_SaveReadFields_Post -void FN_SaveReadFields_Post(SAVERESTOREDATA *pSaveData, const char *pname, void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount); -#endif // FN_SaveReadFields_Post - -#ifdef FN_SaveGlobalState_Post -void FN_SaveGlobalState_Post(SAVERESTOREDATA *pSaveData); -#endif // FN_SaveGlobalState_Post - -#ifdef FN_RestoreGlobalState_Post -void FN_RestoreGlobalState_Post(SAVERESTOREDATA *pSaveData); -#endif // FN_RestoreGlobalState_Post - -#ifdef FN_ResetGlobalState_Post -void FN_ResetGlobalState_Post(void); -#endif // FN_ResetGlobalState_Post - -#ifdef FN_ClientConnect_Post -BOOL FN_ClientConnect_Post(edict_t *pEntity, const char *pszName, const char *pszAddress, char szRejectReason[ 128 ]); -#endif // FN_ClientConnect_Post - -#ifdef FN_ClientDisconnect_Post -void FN_ClientDisconnect_Post(edict_t *pEntity); -#endif // FN_ClientDisconnect_Post - -#ifdef FN_ClientKill_Post -void FN_ClientKill_Post(edict_t *pEntity); -#endif // FN_ClientKill_Post - -#ifdef FN_ClientPutInServer_Post -void FN_ClientPutInServer_Post(edict_t *pEntity); -#endif // FN_ClientPutInServer_Post - -#ifdef FN_ClientCommand_Post -void FN_ClientCommand_Post(edict_t *pEntity); -#endif // FN_ClientCommand_Post - -#ifdef FN_ClientUserInfoChanged_Post -void FN_ClientUserInfoChanged_Post(edict_t *pEntity, char *infobuffer); -#endif // FN_ClientUserInfoChanged_Post - -#ifdef FN_ServerActivate_Post -void FN_ServerActivate_Post(edict_t *pEdictList, int edictCount, int clientMax); -#endif // FN_ServerActivate_Post - -#ifdef FN_ServerDeactivate_Post -void FN_ServerDeactivate_Post(void); -#endif // FN_ServerDeactivate_Post - -#ifdef FN_PlayerPreThink_Post -void FN_PlayerPreThink_Post(edict_t *pEntity); -#endif // FN_PlayerPreThink_Post - -#ifdef FN_PlayerPostThink_Post -void FN_PlayerPostThink_Post(edict_t *pEntity); -#endif // FN_PlayerPostThink_Post - -#ifdef FN_StartFrame_Post -void FN_StartFrame_Post(void); -#endif // FN_StartFrame_Post - -#ifdef FN_ParmsNewLevel_Post -void FN_ParmsNewLevel_Post(void); -#endif // FN_ParmsNewLevel_Post - -#ifdef FN_ParmsChangeLevel_Post -void FN_ParmsChangeLevel_Post(void); -#endif // FN_ParmsChangeLevel_Post - -#ifdef FN_GetGameDescription_Post -const char *FN_GetGameDescription_Post(void); -#endif // FN_GetGameDescription_Post - -#ifdef FN_PlayerCustomization_Post -void FN_PlayerCustomization_Post(edict_t *pEntity, customization_t *pCust); -#endif // FN_PlayerCustomization_Post - -#ifdef FN_SpectatorConnect_Post -void FN_SpectatorConnect_Post(edict_t *pEntity); -#endif // FN_SpectatorConnect_Post - -#ifdef FN_SpectatorDisconnect_Post -void FN_SpectatorDisconnect_Post(edict_t *pEntity); -#endif // FN_SpectatorDisconnect_Post - -#ifdef FN_SpectatorThink_Post -void FN_SpectatorThink_Post(edict_t *pEntity); -#endif // FN_SpectatorThink_Post - -#ifdef FN_Sys_Error_Post -void FN_Sys_Error_Post(const char *error_string); -#endif // FN_Sys_Error_Post - -#ifdef FN_PM_Move_Post -void FN_PM_Move_Post(struct playermove_s *ppmove, int server); -#endif // FN_PM_Move_Post - -#ifdef FN_PM_Init_Post -void FN_PM_Init_Post(struct playermove_s *ppmove); -#endif // FN_PM_Init_Post - -#ifdef FN_PM_FindTextureType_Post -char FN_PM_FindTextureType_Post(char *name); -#endif // FN_PM_FindTextureType_Post - -#ifdef FN_SetupVisibility_Post -void FN_SetupVisibility_Post(edict_t *pViewEntity, edict_t *pClient, unsigned char **pvs, unsigned char **pas); -#endif // FN_SetupVisibility_Post - -#ifdef FN_UpdateClientData_Post -void FN_UpdateClientData_Post(const struct edict_s *ent, int sendweapons, struct clientdata_s *cd); -#endif // FN_UpdateClientData_Post - -#ifdef FN_AddToFullPack_Post -int FN_AddToFullPack_Post(struct entity_state_s *state, int e, edict_t *ent, edict_t *host, int hostflags, int player, unsigned char *pSet); -#endif // FN_AddToFullPack_Post - -#ifdef FN_CreateBaseline_Post -void FN_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); -#endif // FN_CreateBaseline_Post - -#ifdef FN_RegisterEncoders_Post -void FN_RegisterEncoders_Post(void); -#endif // FN_RegisterEncoders_Post - -#ifdef FN_GetWeaponData_Post -int FN_GetWeaponData_Post(struct edict_s *player, struct weapon_data_s *info); -#endif // FN_GetWeaponData_Post - -#ifdef FN_CmdStart_Post -void FN_CmdStart_Post(const edict_t *player, const struct usercmd_s *cmd, unsigned int random_seed); -#endif // FN_CmdStart_Post - -#ifdef FN_CmdEnd_Post -void FN_CmdEnd_Post(const edict_t *player); -#endif // FN_CmdEnd_Post - -#ifdef FN_ConnectionlessPacket_Post -int FN_ConnectionlessPacket_Post(const struct netadr_s *net_from, const char *args, char *response_buffer, int *response_buffer_size); -#endif // FN_ConnectionlessPacket_Post - -#ifdef FN_GetHullBounds_Post -int FN_GetHullBounds_Post(int hullnumber, float *mins, float *maxs); -#endif // FN_GetHullBounds_Post - -#ifdef FN_CreateInstancedBaselines_Post -void FN_CreateInstancedBaselines_Post(void); -#endif // FN_CreateInstancedBaselines_Post - -#ifdef FN_InconsistentFile_Post -int FN_InconsistentFile_Post(const edict_t *player, const char *filename, char *disconnect_message); -#endif // FN_InconsistentFile_Post - -#ifdef FN_AllowLagCompensation_Post -int FN_AllowLagCompensation_Post(void); -#endif // FN_AllowLagCompensation_Post - - - -#ifdef FN_PrecacheModel -int FN_PrecacheModel(char *s); -#endif // FN_PrecacheModel - -#ifdef FN_PrecacheSound -int FN_PrecacheSound(char *s); -#endif // FN_PrecacheSound - -#ifdef FN_SetModel -void FN_SetModel(edict_t *e, const char *m); -#endif // FN_SetModel - -#ifdef FN_ModelIndex -int FN_ModelIndex(const char *m); -#endif // FN_ModelIndex - -#ifdef FN_ModelFrames -int FN_ModelFrames(int modelIndex); -#endif // FN_ModelFrames - -#ifdef FN_SetSize -void FN_SetSize(edict_t *e, const float *rgflMin, const float *rgflMax); -#endif // FN_SetSize - -#ifdef FN_ChangeLevel -void FN_ChangeLevel(char *s1, char *s2); -#endif // FN_ChangeLevel - -#ifdef FN_GetSpawnParms -void FN_GetSpawnParms(edict_t *ent); -#endif // FN_GetSpawnParms - -#ifdef FN_SaveSpawnParms -void FN_SaveSpawnParms(edict_t *ent); -#endif // FN_SaveSpawnParms - -#ifdef FN_VecToYaw -float FN_VecToYaw(const float *rgflVector); -#endif // FN_VecToYaw - -#ifdef FN_VecToAngles -void FN_VecToAngles(const float *rgflVectorIn, float *rgflVectorOut); -#endif // FN_VecToAngles - -#ifdef FN_MoveToOrigin -void FN_MoveToOrigin(edict_t *ent, const float *pflGoal, float dist, int iMoveType); -#endif // FN_MoveToOrigin - -#ifdef FN_ChangeYaw -void FN_ChangeYaw(edict_t *ent); -#endif // FN_ChangeYaw - -#ifdef FN_ChangePitch -void FN_ChangePitch(edict_t *ent); -#endif // FN_ChangePitch - -#ifdef FN_FindEntityByString -edict_t *FN_FindEntityByString(edict_t *pEdictStartSearchAfter, const char *pszField, const char *pszValue); -#endif // FN_FindEntityByString - -#ifdef FN_GetEntityIllum -int FN_GetEntityIllum(edict_t *pEnt); -#endif // FN_GetEntityIllum - -#ifdef FN_FindEntityInSphere -edict_t *FN_FindEntityInSphere(edict_t *pEdictStartSearchAfter, const float *org, float rad); -#endif // FN_FindEntityInSphere - -#ifdef FN_FindClientInPVS -edict_t *FN_FindClientInPVS(edict_t *pEdict); -#endif // FN_FindClientInPVS - -#ifdef FN_EntitiesInPVS -edict_t *FN_EntitiesInPVS(edict_t *pplayer); -#endif // FN_EntitiesInPVS - -#ifdef FN_MakeVectors -void FN_MakeVectors(const float *rgflVector); -#endif // FN_MakeVectors - -#ifdef FN_AngleVectors -void FN_AngleVectors(const float *rgflVector, float *forward, float *right, float *up); -#endif // FN_AngleVectors - -#ifdef FN_CreateEntity -edict_t *FN_CreateEntity(void); -#endif // FN_CreateEntity - -#ifdef FN_RemoveEntity -void FN_RemoveEntity(edict_t *e); -#endif // FN_RemoveEntity - -#ifdef FN_CreateNamedEntity -edict_t *FN_CreateNamedEntity(int className); -#endif // FN_CreateNamedEntity - -#ifdef FN_MakeStatic -void FN_MakeStatic(edict_t *ent); -#endif // FN_MakeStatic - -#ifdef FN_EntIsOnFloor -int FN_EntIsOnFloor(edict_t *ent); -#endif // FN_EntIsOnFloor - -#ifdef FN_DropToFloor -int FN_DropToFloor(edict_t *ent); -#endif // FN_DropToFloor - -#ifdef FN_WalkMove -int FN_WalkMove(edict_t *ent, float yaw, float dist, int iMode); -#endif // FN_WalkMove - -#ifdef FN_SetOrigin -void FN_SetOrigin(edict_t *e, const float *rgflOrigin); -#endif // FN_SetOrigin - -#ifdef FN_EmitSound -void FN_EmitSound(edict_t *entity, int channel, const char *sample, /*int*/float volume, float attenuation, int fFlags, int pitch); -#endif // FN_EmitSound - -#ifdef FN_EmitAmbientSound -void FN_EmitAmbientSound(edict_t *entity, float *pos, const char *samp, float vol, float attenuation, int fFlags, int pitch); -#endif // FN_EmitAmbientSound - -#ifdef FN_TraceLine -void FN_TraceLine(const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr); -#endif // FN_TraceLine - -#ifdef FN_TraceToss -void FN_TraceToss(edict_t *pent, edict_t *pentToIgnore, TraceResult *ptr); -#endif // FN_TraceToss - -#ifdef FN_TraceMonsterHull -int FN_TraceMonsterHull(edict_t *pEdict, const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr); -#endif // FN_TraceMonsterHull - -#ifdef FN_TraceHull -void FN_TraceHull(const float *v1, const float *v2, int fNoMonsters, int hullNumber, edict_t *pentToSkip, TraceResult *ptr); -#endif // FN_TraceHull - -#ifdef FN_TraceModel -void FN_TraceModel(const float *v1, const float *v2, int hullNumber, edict_t *pent, TraceResult *ptr); -#endif // FN_TraceModel - -#ifdef FN_TraceTexture -const char *FN_TraceTexture(edict_t *pTextureEntity, const float *v1, const float *v2 ); -#endif // FN_TraceTexture - -#ifdef FN_TraceSphere -void FN_TraceSphere(const float *v1, const float *v2, int fNoMonsters, float radius, edict_t *pentToSkip, TraceResult *ptr); -#endif // FN_TraceSphere - -#ifdef FN_GetAimVector -void FN_GetAimVector(edict_t *ent, float speed, float *rgflReturn); -#endif // FN_GetAimVector - -#ifdef FN_ServerCommand -void FN_ServerCommand(char *str); -#endif // FN_ServerCommand - -#ifdef FN_ServerExecute -void FN_ServerExecute(void); -#endif // FN_ServerExecute - -#ifdef FN_engClientCommand -void FN_engClientCommand(edict_t *pEdict, char *szFmt, ...); -#endif // FN_engClientCommand - -#ifdef FN_ParticleEffect -void FN_ParticleEffect(const float *org, const float *dir, float color, float count); -#endif // FN_ParticleEffect - -#ifdef FN_LightStyle -void FN_LightStyle(int style, char *val); -#endif // FN_LightStyle - -#ifdef FN_DecalIndex -int FN_DecalIndex(const char *name); -#endif // FN_DecalIndex - -#ifdef FN_PointContents -int FN_PointContents(const float *rgflVector); -#endif // FN_PointContents - -#ifdef FN_MessageBegin -void FN_MessageBegin(int msg_dest, int msg_type, const float *pOrigin, edict_t *ed); -#endif // FN_MessageBegin - -#ifdef FN_MessageEnd -void FN_MessageEnd(void); -#endif // FN_MessageEnd - -#ifdef FN_WriteByte -void FN_WriteByte(int iValue); -#endif // FN_WriteByte - -#ifdef FN_WriteChar -void FN_WriteChar(int iValue); -#endif // FN_WriteChar - -#ifdef FN_WriteShort -void FN_WriteShort(int iValue); -#endif // FN_WriteShort - -#ifdef FN_WriteLong -void FN_WriteLong(int iValue); -#endif // FN_WriteLong - -#ifdef FN_WriteAngle -void FN_WriteAngle(float flValue); -#endif // FN_WriteAngle - -#ifdef FN_WriteCoord -void FN_WriteCoord(float flValue); -#endif // FN_WriteCoord - -#ifdef FN_WriteString -void FN_WriteString(const char *sz); -#endif // FN_WriteString - -#ifdef FN_WriteEntity -void FN_WriteEntity(int iValue); -#endif // FN_WriteEntity - -#ifdef FN_CVarRegister -void FN_CVarRegister(cvar_t *pCvar); -#endif // FN_CVarRegister - -#ifdef FN_CVarGetFloat -float FN_CVarGetFloat(const char *szVarName); -#endif // FN_CVarGetFloat - -#ifdef FN_CVarGetString -const char *FN_CVarGetString(const char *szVarName); -#endif // FN_CVarGetString - -#ifdef FN_CVarSetFloat -void FN_CVarSetFloat(const char *szVarName, float flValue); -#endif // FN_CVarSetFloat - -#ifdef FN_CVarSetString -void FN_CVarSetString(const char *szVarName, const char *szValue); -#endif // FN_CVarSetString - -#ifdef FN_AlertMessage -void FN_AlertMessage(ALERT_TYPE atype, char *szFmt, ...); -#endif // FN_AlertMessage - -#ifdef FN_EngineFprintf -void FN_EngineFprintf(FILE *pfile, char *szFmt, ...); -#endif // FN_EngineFprintf - -#ifdef FN_PvAllocEntPrivateData -void *FN_PvAllocEntPrivateData(edict_t *pEdict, long cb); -#endif // FN_PvAllocEntPrivateData - -#ifdef FN_PvEntPrivateData -void *FN_PvEntPrivateData(edict_t *pEdict); -#endif // FN_PvEntPrivateData - -#ifdef FN_FreeEntPrivateData -void FN_FreeEntPrivateData(edict_t *pEdict); -#endif // FN_FreeEntPrivateData - -#ifdef FN_SzFromIndex -const char *FN_SzFromIndex(int iString); -#endif // FN_SzFromIndex - -#ifdef FN_AllocString -int FN_AllocString(const char *szValue); -#endif // FN_AllocString - -#ifdef FN_GetVarsOfEnt -struct entvars_s *FN_GetVarsOfEnt(edict_t *pEdict); -#endif // FN_GetVarsOfEnt - -#ifdef FN_PEntityOfEntOffset -edict_t *FN_PEntityOfEntOffset(int iEntOffset); -#endif // FN_PEntityOfEntOffset - -#ifdef FN_EntOffsetOfPEntity -int FN_EntOffsetOfPEntity(const edict_t *pEdict); -#endif // FN_EntOffsetOfPEntity - -#ifdef FN_IndexOfEdict -int FN_IndexOfEdict(const edict_t *pEdict); -#endif // FN_IndexOfEdict - -#ifdef FN_PEntityOfEntIndex -edict_t *FN_PEntityOfEntIndex(int iEntIndex); -#endif // FN_PEntityOfEntIndex - -#ifdef FN_FindEntityByVars -edict_t *FN_FindEntityByVars(struct entvars_s *pvars); -#endif // FN_FindEntityByVars - -#ifdef FN_GetModelPtr -void *FN_GetModelPtr(edict_t *pEdict); -#endif // FN_GetModelPtr - -#ifdef FN_RegUserMsg -int FN_RegUserMsg(const char *pszName, int iSize); -#endif // FN_RegUserMsg - -#ifdef FN_AnimationAutomove -void FN_AnimationAutomove(const edict_t *pEdict, float flTime); -#endif // FN_AnimationAutomove - -#ifdef FN_GetBonePosition -void FN_GetBonePosition(const edict_t *pEdict, int iBone, float *rgflOrigin, float *rgflAngles); -#endif // FN_GetBonePosition - -#ifdef FN_FunctionFromName -unsigned long FN_FunctionFromName(const char *pName); -#endif // FN_FunctionFromName - -#ifdef FN_NameForFunction -const char *FN_NameForFunction(unsigned long function); -#endif // FN_NameForFunction - -#ifdef FN_ClientPrintf -void FN_ClientPrintf(edict_t *pEdict, PRINT_TYPE ptype, const char *szMsg); -#endif // FN_ClientPrintf - -#ifdef FN_ServerPrint -void FN_ServerPrint(const char *szMsg); -#endif // FN_ServerPrint - -#ifdef FN_Cmd_Args -const char *FN_Cmd_Args(void); -#endif // FN_Cmd_Args - -#ifdef FN_Cmd_Argv -const char *FN_Cmd_Argv(int argc); -#endif // FN_Cmd_Argv - -#ifdef FN_Cmd_Argc -int FN_Cmd_Argc(void); -#endif // FN_Cmd_Argc - -#ifdef FN_GetAttachment -void FN_GetAttachment(const edict_t *pEdict, int iAttachment, float *rgflOrigin, float *rgflAngles ); -#endif // FN_GetAttachment - -#ifdef FN_CRC32_Init -void FN_CRC32_Init(CRC32_t *pulCRC); -#endif // FN_CRC32_Init - -#ifdef FN_CRC32_ProcessBuffer -void FN_CRC32_ProcessBuffer(CRC32_t *pulCRC, void *p, int len); -#endif // FN_CRC32_ProcessBuffer - -#ifdef FN_CRC32_ProcessByte -void FN_CRC32_ProcessByte(CRC32_t *pulCRC, unsigned char ch); -#endif // FN_CRC32_ProcessByte - -#ifdef FN_CRC32_Final -CRC32_t FN_CRC32_Final(CRC32_t pulCRC); -#endif // FN_CRC32_Final - -#ifdef FN_RandomLong -long FN_RandomLong(long lLow, long lHigh); -#endif // FN_RandomLong - -#ifdef FN_RandomFloat -float FN_RandomFloat(float flLow, float flHigh); -#endif // FN_RandomFloat - -#ifdef FN_SetView -void FN_SetView(const edict_t *pClient, const edict_t *pViewent); -#endif // FN_SetView - -#ifdef FN_Time -float FN_Time(void); -#endif // FN_Time - -#ifdef FN_CrosshairAngle -void FN_CrosshairAngle(const edict_t *pClient, float pitch, float yaw); -#endif // FN_CrosshairAngle - -#ifdef FN_LoadFileForMe -byte *FN_LoadFileForMe(char *filename, int *pLength); -#endif // FN_LoadFileForMe - -#ifdef FN_FreeFile -void FN_FreeFile(void *buffer); -#endif // FN_FreeFile - -#ifdef FN_EndSection -void FN_EndSection(const char *pszSectionName); -#endif // FN_EndSection - -#ifdef FN_CompareFileTime -int FN_CompareFileTime(char *filename1, char *filename2, int *iCompare); -#endif // FN_CompareFileTime - -#ifdef FN_GetGameDir -void FN_GetGameDir(char *szGetGameDir); -#endif // FN_GetGameDir - -#ifdef FN_Cvar_RegisterVariable -void FN_Cvar_RegisterVariable(cvar_t *variable); -#endif // FN_Cvar_RegisterVariable - -#ifdef FN_FadeClientVolume -void FN_FadeClientVolume(const edict_t *pEdict, int fadePercent, int fadeOutSeconds, int holdTime, int fadeInSeconds); -#endif // FN_FadeClientVolume - -#ifdef FN_SetClientMaxspeed -void FN_SetClientMaxspeed(const edict_t *pEdict, float fNewMaxspeed); -#endif // FN_SetClientMaxspeed - -#ifdef FN_CreateFakeClient -edict_t *FN_CreateFakeClient(const char *netname); -#endif // FN_CreateFakeClient - -#ifdef FN_RunPlayerMove -void FN_RunPlayerMove(edict_t *fakeclient, const float *viewangles, float forwardmove, float sidemove, float upmove, unsigned short buttons, byte impulse, byte msec); -#endif // FN_RunPlayerMove - -#ifdef FN_NumberOfEntities -int FN_NumberOfEntities(void); -#endif // FN_NumberOfEntities - -#ifdef FN_GetInfoKeyBuffer -char *FN_GetInfoKeyBuffer(edict_t *e); -#endif // FN_GetInfoKeyBuffer - -#ifdef FN_InfoKeyValue -char *FN_InfoKeyValue(char *infobuffer, char *key); -#endif // FN_InfoKeyValue - -#ifdef FN_SetKeyValue -void FN_SetKeyValue(char *infobuffer, char *key, char *value); -#endif // FN_SetKeyValue - -#ifdef FN_SetClientKeyValue -void FN_SetClientKeyValue(int clientIndex, char *infobuffer, char *key, char *value); -#endif // FN_SetClientKeyValue - -#ifdef FN_IsMapValid -int FN_IsMapValid(char *filename); -#endif // FN_IsMapValid - -#ifdef FN_StaticDecal -void FN_StaticDecal(const float *origin, int decalIndex, int entityIndex, int modelIndex); -#endif // FN_StaticDecal - -#ifdef FN_PrecacheGeneric -int FN_PrecacheGeneric(char *s); -#endif // FN_PrecacheGeneric - -#ifdef FN_GetPlayerUserId -int FN_GetPlayerUserId(edict_t *e ); -#endif // FN_GetPlayerUserId - -#ifdef FN_BuildSoundMsg -void FN_BuildSoundMsg(edict_t *entity, int channel, const char *sample, /*int*/float volume, float attenuation, int fFlags, int pitch, int msg_dest, int msg_type, const float *pOrigin, edict_t *ed); -#endif // FN_BuildSoundMsg - -#ifdef FN_IsDedicatedServer -int FN_IsDedicatedServer(void); -#endif // FN_IsDedicatedServer - -#ifdef FN_CVarGetPointer -cvar_t *FN_CVarGetPointer(const char *szVarName); -#endif // FN_CVarGetPointer - -#ifdef FN_GetPlayerWONId -unsigned int FN_GetPlayerWONId(edict_t *e); -#endif // FN_GetPlayerWONId - -#ifdef FN_Info_RemoveKey -void FN_Info_RemoveKey( char *s, const char *key); -#endif // FN_Info_RemoveKey - -#ifdef FN_GetPhysicsKeyValue -const char *FN_GetPhysicsKeyValue(const edict_t *pClient, const char *key); -#endif // FN_GetPhysicsKeyValue - -#ifdef FN_SetPhysicsKeyValue -void FN_SetPhysicsKeyValue(const edict_t *pClient, const char *key, const char *value); -#endif // FN_SetPhysicsKeyValue - -#ifdef FN_GetPhysicsInfoString -const char *FN_GetPhysicsInfoString( const edict_t *pClient); -#endif // FN_GetPhysicsInfoString - -#ifdef FN_PrecacheEvent -unsigned short FN_PrecacheEvent(int type, const char *psz); -#endif // FN_PrecacheEvent - -#ifdef FN_PlaybackEvent -void FN_PlaybackEvent(int flags, const edict_t *pInvoker, unsigned short eventindex, float delay, float *origin, float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2); -#endif // FN_PlaybackEvent - -#ifdef FN_SetFatPVS -unsigned char *FN_SetFatPVS(float *org); -#endif // FN_SetFatPVS - -#ifdef FN_SetFatPAS -unsigned char *FN_SetFatPAS(float *org); -#endif // FN_SetFatPAS - -#ifdef FN_CheckVisibility -int FN_CheckVisibility(const edict_t *entity, unsigned char *pset); -#endif // FN_CheckVisibility - -#ifdef FN_DeltaSetField -void FN_DeltaSetField(struct delta_s *pFields, const char *fieldname); -#endif // FN_DeltaSetField - -#ifdef FN_DeltaUnsetField -void FN_DeltaUnsetField(struct delta_s *pFields, const char *fieldname); -#endif // FN_DeltaUnsetField - -#ifdef FN_DeltaAddEncoder -void FN_DeltaAddEncoder(char *name, void (*conditionalencode)( struct delta_s *pFields, const unsigned char *from, const unsigned char *to ) ); -#endif // FN_DeltaAddEncoder - -#ifdef FN_GetCurrentPlayer -int FN_GetCurrentPlayer(void); -#endif // FN_GetCurrentPlayer - -#ifdef FN_CanSkipPlayer -int FN_CanSkipPlayer(const edict_t *player); -#endif // FN_CanSkipPlayer - -#ifdef FN_DeltaFindField -int FN_DeltaFindField(struct delta_s *pFields, const char *fieldname); -#endif // FN_DeltaFindField - -#ifdef FN_DeltaSetFieldByIndex -void FN_DeltaSetFieldByIndex(struct delta_s *pFields, int fieldNumber); -#endif // FN_DeltaSetFieldByIndex - -#ifdef FN_DeltaUnsetFieldByIndex -void FN_DeltaUnsetFieldByIndex(struct delta_s *pFields, int fieldNumber); -#endif // FN_DeltaUnsetFieldByIndex - -#ifdef FN_SetGroupMask -void FN_SetGroupMask(int mask, int op); -#endif // FN_SetGroupMask - -#ifdef FN_engCreateInstancedBaseline -int FN_engCreateInstancedBaseline(int classname, struct entity_state_s *baseline); -#endif // FN_engCreateInstancedBaseline - -#ifdef FN_Cvar_DirectSet -void FN_Cvar_DirectSet(struct cvar_s *var, char *value); -#endif // FN_Cvar_DirectSet - -#ifdef FN_ForceUnmodified -void FN_ForceUnmodified(FORCE_TYPE type, float *mins, float *maxs, const char *filename); -#endif // FN_ForceUnmodified - -#ifdef FN_GetPlayerStats -void FN_GetPlayerStats(const edict_t *pClient, int *ping, int *packet_loss); -#endif // FN_GetPlayerStats - -#ifdef FN_AddServerCommand -void FN_AddServerCommand(char *cmd_name, void (*function) (void)); -#endif // FN_AddServerCommand - -#ifdef FN_Voice_GetClientListening -qboolean FN_Voice_GetClientListening(int iReceiver, int iSender); -#endif // FN_Voice_GetClientListening - -#ifdef FN_Voice_SetClientListening -qboolean FN_Voice_SetClientListening(int iReceiver, int iSender, qboolean bListen); -#endif // FN_Voice_SetClientListening - -#ifdef FN_GetPlayerAuthId -const char *FN_GetPlayerAuthId(edict_t *e); -#endif // FN_GetPlayerAuthId - - - - - - -#ifdef FN_PrecacheModel_Post -int FN_PrecacheModel_Post(char *s); -#endif // FN_PrecacheModel_Post - -#ifdef FN_PrecacheSound_Post -int FN_PrecacheSound_Post(char *s); -#endif // FN_PrecacheSound_Post - -#ifdef FN_SetModel_Post -void FN_SetModel_Post(edict_t *e, const char *m); -#endif // FN_SetModel_Post - -#ifdef FN_ModelIndex_Post -int FN_ModelIndex_Post(const char *m); -#endif // FN_ModelIndex_Post - -#ifdef FN_ModelFrames_Post -int FN_ModelFrames_Post(int modelIndex); -#endif // FN_ModelFrames_Post - -#ifdef FN_SetSize_Post -void FN_SetSize_Post(edict_t *e, const float *rgflMin, const float *rgflMax); -#endif // FN_SetSize_Post - -#ifdef FN_ChangeLevel_Post -void FN_ChangeLevel_Post(char *s1, char *s2); -#endif // FN_ChangeLevel_Post - -#ifdef FN_GetSpawnParms_Post -void FN_GetSpawnParms_Post(edict_t *ent); -#endif // FN_GetSpawnParms_Post - -#ifdef FN_SaveSpawnParms_Post -void FN_SaveSpawnParms_Post(edict_t *ent); -#endif // FN_SaveSpawnParms_Post - -#ifdef FN_VecToYaw_Post -float FN_VecToYaw_Post(const float *rgflVector); -#endif // FN_VecToYaw_Post - -#ifdef FN_VecToAngles_Post -void FN_VecToAngles_Post(const float *rgflVectorIn, float *rgflVectorOut); -#endif // FN_VecToAngles_Post - -#ifdef FN_MoveToOrigin_Post -void FN_MoveToOrigin_Post(edict_t *ent, const float *pflGoal, float dist, int iMoveType); -#endif // FN_MoveToOrigin_Post - -#ifdef FN_ChangeYaw_Post -void FN_ChangeYaw_Post(edict_t *ent); -#endif // FN_ChangeYaw_Post - -#ifdef FN_ChangePitch_Post -void FN_ChangePitch_Post(edict_t *ent); -#endif // FN_ChangePitch_Post - -#ifdef FN_FindEntityByString_Post -edict_t *FN_FindEntityByString_Post(edict_t *pEdictStartSearchAfter, const char *pszField, const char *pszValue); -#endif // FN_FindEntityByString_Post - -#ifdef FN_GetEntityIllum_Post -int FN_GetEntityIllum_Post(edict_t *pEnt); -#endif // FN_GetEntityIllum_Post - -#ifdef FN_FindEntityInSphere_Post -edict_t *FN_FindEntityInSphere_Post(edict_t *pEdictStartSearchAfter, const float *org, float rad); -#endif // FN_FindEntityInSphere_Post - -#ifdef FN_FindClientInPVS_Post -edict_t *FN_FindClientInPVS_Post(edict_t *pEdict); -#endif // FN_FindClientInPVS_Post - -#ifdef FN_EntitiesInPVS_Post -edict_t *FN_EntitiesInPVS_Post(edict_t *pplayer); -#endif // FN_EntitiesInPVS_Post - -#ifdef FN_MakeVectors_Post -void FN_MakeVectors_Post(const float *rgflVector); -#endif // FN_MakeVectors_Post - -#ifdef FN_AngleVectors_Post -void FN_AngleVectors_Post(const float *rgflVector, float *forward, float *right, float *up); -#endif // FN_AngleVectors_Post - -#ifdef FN_CreateEntity_Post -edict_t *FN_CreateEntity_Post(void); -#endif // FN_CreateEntity_Post - -#ifdef FN_RemoveEntity_Post -void FN_RemoveEntity_Post(edict_t *e); -#endif // FN_RemoveEntity_Post - -#ifdef FN_CreateNamedEntity_Post -edict_t *FN_CreateNamedEntity_Post(int className); -#endif // FN_CreateNamedEntity_Post - -#ifdef FN_MakeStatic_Post -void FN_MakeStatic_Post(edict_t *ent); -#endif // FN_MakeStatic_Post - -#ifdef FN_EntIsOnFloor_Post -int FN_EntIsOnFloor_Post(edict_t *ent); -#endif // FN_EntIsOnFloor_Post - -#ifdef FN_DropToFloor_Post -int FN_DropToFloor_Post(edict_t *ent); -#endif // FN_DropToFloor_Post - -#ifdef FN_WalkMove_Post -int FN_WalkMove_Post(edict_t *ent, float yaw, float dist, int iMode); -#endif // FN_WalkMove_Post - -#ifdef FN_SetOrigin_Post -void FN_SetOrigin_Post(edict_t *e, const float *rgflOrigin); -#endif // FN_SetOrigin_Post - -#ifdef FN_EmitSound_Post -void FN_EmitSound_Post(edict_t *entity, int channel, const char *sample, /*int*/float volume, float attenuation, int fFlags, int pitch); -#endif // FN_EmitSound_Post - -#ifdef FN_EmitAmbientSound_Post -void FN_EmitAmbientSound_Post(edict_t *entity, float *pos, const char *samp, float vol, float attenuation, int fFlags, int pitch); -#endif // FN_EmitAmbientSound_Post - -#ifdef FN_TraceLine_Post -void FN_TraceLine_Post(const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr); -#endif // FN_TraceLine_Post - -#ifdef FN_TraceToss_Post -void FN_TraceToss_Post(edict_t *pent, edict_t *pentToIgnore, TraceResult *ptr); -#endif // FN_TraceToss_Post - -#ifdef FN_TraceMonsterHull_Post -int FN_TraceMonsterHull_Post(edict_t *pEdict, const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr); -#endif // FN_TraceMonsterHull_Post - -#ifdef FN_TraceHull_Post -void FN_TraceHull_Post(const float *v1, const float *v2, int fNoMonsters, int hullNumber, edict_t *pentToSkip, TraceResult *ptr); -#endif // FN_TraceHull_Post - -#ifdef FN_TraceModel_Post -void FN_TraceModel_Post(const float *v1, const float *v2, int hullNumber, edict_t *pent, TraceResult *ptr); -#endif // FN_TraceModel_Post - -#ifdef FN_TraceTexture_Post -const char *FN_TraceTexture_Post(edict_t *pTextureEntity, const float *v1, const float *v2 ); -#endif // FN_TraceTexture_Post - -#ifdef FN_TraceSphere_Post -void FN_TraceSphere_Post(const float *v1, const float *v2, int fNoMonsters, float radius, edict_t *pentToSkip, TraceResult *ptr); -#endif // FN_TraceSphere_Post - -#ifdef FN_GetAimVector_Post -void FN_GetAimVector_Post(edict_t *ent, float speed, float *rgflReturn); -#endif // FN_GetAimVector_Post - -#ifdef FN_ServerCommand_Post -void FN_ServerCommand_Post(char *str); -#endif // FN_ServerCommand_Post - -#ifdef FN_ServerExecute_Post -void FN_ServerExecute_Post(void); -#endif // FN_ServerExecute_Post - -#ifdef FN_engClientCommand_Post -void FN_engClientCommand_Post(edict_t *pEdict, char *szFmt, ...); -#endif // FN_engClientCommand_Post - -#ifdef FN_ParticleEffect_Post -void FN_ParticleEffect_Post(const float *org, const float *dir, float color, float count); -#endif // FN_ParticleEffect_Post - -#ifdef FN_LightStyle_Post -void FN_LightStyle_Post(int style, char *val); -#endif // FN_LightStyle_Post - -#ifdef FN_DecalIndex_Post -int FN_DecalIndex_Post(const char *name); -#endif // FN_DecalIndex_Post - -#ifdef FN_PointContents_Post -int FN_PointContents_Post(const float *rgflVector); -#endif // FN_PointContents_Post - -#ifdef FN_MessageBegin_Post -void FN_MessageBegin_Post(int msg_dest, int msg_type, const float *pOrigin, edict_t *ed); -#endif // FN_MessageBegin_Post - -#ifdef FN_MessageEnd_Post -void FN_MessageEnd_Post(void); -#endif // FN_MessageEnd_Post - -#ifdef FN_WriteByte_Post -void FN_WriteByte_Post(int iValue); -#endif // FN_WriteByte_Post - -#ifdef FN_WriteChar_Post -void FN_WriteChar_Post(int iValue); -#endif // FN_WriteChar_Post - -#ifdef FN_WriteShort_Post -void FN_WriteShort_Post(int iValue); -#endif // FN_WriteShort_Post - -#ifdef FN_WriteLong_Post -void FN_WriteLong_Post(int iValue); -#endif // FN_WriteLong_Post - -#ifdef FN_WriteAngle_Post -void FN_WriteAngle_Post(float flValue); -#endif // FN_WriteAngle_Post - -#ifdef FN_WriteCoord_Post -void FN_WriteCoord_Post(float flValue); -#endif // FN_WriteCoord_Post - -#ifdef FN_WriteString_Post -void FN_WriteString_Post(const char *sz); -#endif // FN_WriteString_Post - -#ifdef FN_WriteEntity_Post -void FN_WriteEntity_Post(int iValue); -#endif // FN_WriteEntity_Post - -#ifdef FN_CVarRegister_Post -void FN_CVarRegister_Post(cvar_t *pCvar); -#endif // FN_CVarRegister_Post - -#ifdef FN_CVarGetFloat_Post -float FN_CVarGetFloat_Post(const char *szVarName); -#endif // FN_CVarGetFloat_Post - -#ifdef FN_CVarGetString_Post -const char *FN_CVarGetString_Post(const char *szVarName); -#endif // FN_CVarGetString_Post - -#ifdef FN_CVarSetFloat_Post -void FN_CVarSetFloat_Post(const char *szVarName, float flValue); -#endif // FN_CVarSetFloat_Post - -#ifdef FN_CVarSetString_Post -void FN_CVarSetString_Post(const char *szVarName, const char *szValue); -#endif // FN_CVarSetString_Post - -#ifdef FN_AlertMessage_Post -void FN_AlertMessage_Post(ALERT_TYPE atype, char *szFmt, ...); -#endif // FN_AlertMessage_Post - -#ifdef FN_EngineFprintf_Post -void FN_EngineFprintf_Post(FILE *pfile, char *szFmt, ...); -#endif // FN_EngineFprintf_Post - -#ifdef FN_PvAllocEntPrivateData_Post -void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, long cb); -#endif // FN_PvAllocEntPrivateData_Post - -#ifdef FN_PvEntPrivateData_Post -void *FN_PvEntPrivateData_Post(edict_t *pEdict); -#endif // FN_PvEntPrivateData_Post - -#ifdef FN_FreeEntPrivateData_Post -void FN_FreeEntPrivateData_Post(edict_t *pEdict); -#endif // FN_FreeEntPrivateData_Post - -#ifdef FN_SzFromIndex_Post -const char *FN_SzFromIndex_Post(int iString); -#endif // FN_SzFromIndex_Post - -#ifdef FN_AllocString_Post -int FN_AllocString_Post(const char *szValue); -#endif // FN_AllocString_Post - -#ifdef FN_GetVarsOfEnt_Post -struct entvars_s *FN_GetVarsOfEnt_Post(edict_t *pEdict); -#endif // FN_GetVarsOfEnt_Post - -#ifdef FN_PEntityOfEntOffset_Post -edict_t *FN_PEntityOfEntOffset_Post(int iEntOffset); -#endif // FN_PEntityOfEntOffset_Post - -#ifdef FN_EntOffsetOfPEntity_Post -int FN_EntOffsetOfPEntity_Post(const edict_t *pEdict); -#endif // FN_EntOffsetOfPEntity_Post - -#ifdef FN_IndexOfEdict_Post -int FN_IndexOfEdict_Post(const edict_t *pEdict); -#endif // FN_IndexOfEdict_Post - -#ifdef FN_PEntityOfEntIndex_Post -edict_t *FN_PEntityOfEntIndex_Post(int iEntIndex); -#endif // FN_PEntityOfEntIndex_Post - -#ifdef FN_FindEntityByVars_Post -edict_t *FN_FindEntityByVars_Post(struct entvars_s *pvars); -#endif // FN_FindEntityByVars_Post - -#ifdef FN_GetModelPtr_Post -void *FN_GetModelPtr_Post(edict_t *pEdict); -#endif // FN_GetModelPtr_Post - -#ifdef FN_RegUserMsg_Post -int FN_RegUserMsg_Post(const char *pszName, int iSize); -#endif // FN_RegUserMsg_Post - -#ifdef FN_AnimationAutomove_Post -void FN_AnimationAutomove_Post(const edict_t *pEdict, float flTime); -#endif // FN_AnimationAutomove_Post - -#ifdef FN_GetBonePosition_Post -void FN_GetBonePosition_Post(const edict_t *pEdict, int iBone, float *rgflOrigin, float *rgflAngles); -#endif // FN_GetBonePosition_Post - -#ifdef FN_FunctionFromName_Post -unsigned long FN_FunctionFromName_Post(const char *pName); -#endif // FN_FunctionFromName_Post - -#ifdef FN_NameForFunction_Post -const char *FN_NameForFunction_Post(unsigned long function); -#endif // FN_NameForFunction_Post - -#ifdef FN_ClientPrintf_Post -void FN_ClientPrintf_Post(edict_t *pEdict, PRINT_TYPE ptype, const char *szMsg); -#endif // FN_ClientPrintf_Post - -#ifdef FN_ServerPrint_Post -void FN_ServerPrint_Post(const char *szMsg); -#endif // FN_ServerPrint_Post - -#ifdef FN_Cmd_Args_Post -const char *FN_Cmd_Args_Post(void); -#endif // FN_Cmd_Args_Post - -#ifdef FN_Cmd_Argv_Post -const char *FN_Cmd_Argv_Post(int argc); -#endif // FN_Cmd_Argv_Post - -#ifdef FN_Cmd_Argc_Post -int FN_Cmd_Argc_Post(void); -#endif // FN_Cmd_Argc_Post - -#ifdef FN_GetAttachment_Post -void FN_GetAttachment_Post(const edict_t *pEdict, int iAttachment, float *rgflOrigin, float *rgflAngles ); -#endif // FN_GetAttachment_Post - -#ifdef FN_CRC32_Init_Post -void FN_CRC32_Init_Post(CRC32_t *pulCRC); -#endif // FN_CRC32_Init_Post - -#ifdef FN_CRC32_ProcessBuffer_Post -void FN_CRC32_ProcessBuffer_Post(CRC32_t *pulCRC, void *p, int len); -#endif // FN_CRC32_ProcessBuffer_Post - -#ifdef FN_CRC32_ProcessByte_Post -void FN_CRC32_ProcessByte_Post(CRC32_t *pulCRC, unsigned char ch); -#endif // FN_CRC32_ProcessByte_Post - -#ifdef FN_CRC32_Final_Post -CRC32_t FN_CRC32_Final_Post(CRC32_t pulCRC); -#endif // FN_CRC32_Final_Post - -#ifdef FN_RandomLong_Post -long FN_RandomLong_Post(long lLow, long lHigh); -#endif // FN_RandomLong_Post - -#ifdef FN_RandomFloat_Post -float FN_RandomFloat_Post(float flLow, float flHigh); -#endif // FN_RandomFloat_Post - -#ifdef FN_SetView_Post -void FN_SetView_Post(const edict_t *pClient, const edict_t *pViewent); -#endif // FN_SetView_Post - -#ifdef FN_Time_Post -float FN_Time_Post(void); -#endif // FN_Time_Post - -#ifdef FN_CrosshairAngle_Post -void FN_CrosshairAngle_Post(const edict_t *pClient, float pitch, float yaw); -#endif // FN_CrosshairAngle_Post - -#ifdef FN_LoadFileForMe_Post -byte *FN_LoadFileForMe_Post(char *filename, int *pLength); -#endif // FN_LoadFileForMe_Post - -#ifdef FN_FreeFile_Post -void FN_FreeFile_Post(void *buffer); -#endif // FN_FreeFile_Post - -#ifdef FN_EndSection_Post -void FN_EndSection_Post(const char *pszSectionName); -#endif // FN_EndSection_Post - -#ifdef FN_CompareFileTime_Post -int FN_CompareFileTime_Post(char *filename1, char *filename2, int *iCompare); -#endif // FN_CompareFileTime_Post - -#ifdef FN_GetGameDir_Post -void FN_GetGameDir_Post(char *szGetGameDir); -#endif // FN_GetGameDir_Post - -#ifdef FN_Cvar_RegisterVariable_Post -void FN_Cvar_RegisterVariable_Post(cvar_t *variable); -#endif // FN_Cvar_RegisterVariable_Post - -#ifdef FN_FadeClientVolume_Post -void FN_FadeClientVolume_Post(const edict_t *pEdict, int fadePercent, int fadeOutSeconds, int holdTime, int fadeInSeconds); -#endif // FN_FadeClientVolume_Post - -#ifdef FN_SetClientMaxspeed_Post -void FN_SetClientMaxspeed_Post(const edict_t *pEdict, float fNewMaxspeed); -#endif // FN_SetClientMaxspeed_Post - -#ifdef FN_CreateFakeClient_Post -edict_t *FN_CreateFakeClient_Post(const char *netname); -#endif // FN_CreateFakeClient_Post - -#ifdef FN_RunPlayerMove_Post -void FN_RunPlayerMove_Post(edict_t *fakeclient, const float *viewangles, float forwardmove, float sidemove, float upmove, unsigned short buttons, byte impulse, byte msec); -#endif // FN_RunPlayerMove_Post - -#ifdef FN_NumberOfEntities_Post -int FN_NumberOfEntities_Post(void); -#endif // FN_NumberOfEntities_Post - -#ifdef FN_GetInfoKeyBuffer_Post -char *FN_GetInfoKeyBuffer_Post(edict_t *e); -#endif // FN_GetInfoKeyBuffer_Post - -#ifdef FN_InfoKeyValue_Post -char *FN_InfoKeyValue_Post(char *infobuffer, char *key); -#endif // FN_InfoKeyValue_Post - -#ifdef FN_SetKeyValue_Post -void FN_SetKeyValue_Post(char *infobuffer, char *key, char *value); -#endif // FN_SetKeyValue_Post - -#ifdef FN_SetClientKeyValue_Post -void FN_SetClientKeyValue_Post(int clientIndex, char *infobuffer, char *key, char *value); -#endif // FN_SetClientKeyValue_Post - -#ifdef FN_IsMapValid_Post -int FN_IsMapValid_Post(char *filename); -#endif // FN_IsMapValid_Post - -#ifdef FN_StaticDecal_Post -void FN_StaticDecal_Post(const float *origin, int decalIndex, int entityIndex, int modelIndex); -#endif // FN_StaticDecal_Post - -#ifdef FN_PrecacheGeneric_Post -int FN_PrecacheGeneric_Post(char *s); -#endif // FN_PrecacheGeneric_Post - -#ifdef FN_GetPlayerUserId_Post -int FN_GetPlayerUserId_Post(edict_t *e ); -#endif // FN_GetPlayerUserId_Post - -#ifdef FN_BuildSoundMsg_Post -void FN_BuildSoundMsg_Post(edict_t *entity, int channel, const char *sample, /*int*/float volume, float attenuation, int fFlags, int pitch, int msg_dest, int msg_type, const float *pOrigin, edict_t *ed); -#endif // FN_BuildSoundMsg_Post - -#ifdef FN_IsDedicatedServer_Post -int FN_IsDedicatedServer_Post(void); -#endif // FN_IsDedicatedServer_Post - -#ifdef FN_CVarGetPointer_Post -cvar_t *FN_CVarGetPointer_Post(const char *szVarName); -#endif // FN_CVarGetPointer_Post - -#ifdef FN_GetPlayerWONId_Post -unsigned int FN_GetPlayerWONId_Post(edict_t *e); -#endif // FN_GetPlayerWONId_Post - -#ifdef FN_Info_RemoveKey_Post -void FN_Info_RemoveKey_Post( char *s, const char *key); -#endif // FN_Info_RemoveKey_Post - -#ifdef FN_GetPhysicsKeyValue_Post -const char *FN_GetPhysicsKeyValue_Post(const edict_t *pClient, const char *key); -#endif // FN_GetPhysicsKeyValue_Post - -#ifdef FN_SetPhysicsKeyValue_Post -void FN_SetPhysicsKeyValue_Post(const edict_t *pClient, const char *key, const char *value); -#endif // FN_SetPhysicsKeyValue_Post - -#ifdef FN_GetPhysicsInfoString_Post -const char *FN_GetPhysicsInfoString_Post( const edict_t *pClient); -#endif // FN_GetPhysicsInfoString_Post - -#ifdef FN_PrecacheEvent_Post -unsigned short FN_PrecacheEvent_Post(int type, const char *psz); -#endif // FN_PrecacheEvent_Post - -#ifdef FN_PlaybackEvent_Post -void FN_PlaybackEvent_Post(int flags, const edict_t *pInvoker, unsigned short eventindex, float delay, float *origin, float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2); -#endif // FN_PlaybackEvent_Post - -#ifdef FN_SetFatPVS_Post -unsigned char *FN_SetFatPVS_Post(float *org); -#endif // FN_SetFatPVS_Post - -#ifdef FN_SetFatPAS_Post -unsigned char *FN_SetFatPAS_Post(float *org); -#endif // FN_SetFatPAS_Post - -#ifdef FN_CheckVisibility_Post -int FN_CheckVisibility_Post(const edict_t *entity, unsigned char *pset); -#endif // FN_CheckVisibility_Post - -#ifdef FN_DeltaSetField_Post -void FN_DeltaSetField_Post(struct delta_s *pFields, const char *fieldname); -#endif // FN_DeltaSetField_Post - -#ifdef FN_DeltaUnsetField_Post -void FN_DeltaUnsetField_Post(struct delta_s *pFields, const char *fieldname); -#endif // FN_DeltaUnsetField_Post - -#ifdef FN_DeltaAddEncoder_Post -void FN_DeltaAddEncoder_Post(char *name, void (*conditionalencode)( struct delta_s *pFields, const unsigned char *from, const unsigned char *to ) ); -#endif // FN_DeltaAddEncoder_Post - -#ifdef FN_GetCurrentPlayer_Post -int FN_GetCurrentPlayer_Post(void); -#endif // FN_GetCurrentPlayer_Post - -#ifdef FN_CanSkipPlayer_Post -int FN_CanSkipPlayer_Post(const edict_t *player); -#endif // FN_CanSkipPlayer_Post - -#ifdef FN_DeltaFindField_Post -int FN_DeltaFindField_Post(struct delta_s *pFields, const char *fieldname); -#endif // FN_DeltaFindField_Post - -#ifdef FN_DeltaSetFieldByIndex_Post -void FN_DeltaSetFieldByIndex_Post(struct delta_s *pFields, int fieldNumber); -#endif // FN_DeltaSetFieldByIndex_Post - -#ifdef FN_DeltaUnsetFieldByIndex_Post -void FN_DeltaUnsetFieldByIndex_Post(struct delta_s *pFields, int fieldNumber); -#endif // FN_DeltaUnsetFieldByIndex_Post - -#ifdef FN_SetGroupMask_Post -void FN_SetGroupMask_Post(int mask, int op); -#endif // FN_SetGroupMask_Post - -#ifdef FN_engCreateInstancedBaseline_Post -int FN_engCreateInstancedBaseline_Post(int classname, struct entity_state_s *baseline); -#endif // FN_engCreateInstancedBaseline_Post - -#ifdef FN_Cvar_DirectSet_Post -void FN_Cvar_DirectSet_Post(struct cvar_s *var, char *value); -#endif // FN_Cvar_DirectSet_Post - -#ifdef FN_ForceUnmodified_Post -void FN_ForceUnmodified_Post(FORCE_TYPE type, float *mins, float *maxs, const char *filename); -#endif // FN_ForceUnmodified_Post - -#ifdef FN_GetPlayerStats_Post -void FN_GetPlayerStats_Post(const edict_t *pClient, int *ping, int *packet_loss); -#endif // FN_GetPlayerStats_Post - -#ifdef FN_AddServerCommand_Post -void FN_AddServerCommand_Post(char *cmd_name, void (*function)(void)); -#endif // FN_AddServerCommand_Post - -#ifdef FN_Voice_GetClientListening_Post -qboolean FN_Voice_GetClientListening_Post(int iReceiver, int iSender); -#endif // FN_Voice_GetClientListening_Post - -#ifdef FN_Voice_SetClientListening_Post -qboolean FN_Voice_SetClientListening_Post(int iReceiver, int iSender, qboolean bListen); -#endif // FN_Voice_SetClientListening_Post - -#ifdef FN_GetPlayerAuthId_Post -const char *FN_GetPlayerAuthId_Post(edict_t *e); -#endif // FN_GetPlayerAuthId - - - - -#ifdef FN_OnFreeEntPrivateData -void FN_OnFreeEntPrivateData(edict_t *pEnt); -#endif // FN_OnFreeEntPrivateData - -#ifdef FN_GameShutdown -void FN_GameShutdown(void); -#endif // FN_GameShutdown - -#ifdef FN_ShouldCollide -int FN_ShouldCollide(edict_t *pentTouched, edict_t *pentOther); -#endif // FN_ShouldCollide - - - - - -#ifdef FN_OnFreeEntPrivateData_Post -void FN_OnFreeEntPrivateData_Post(edict_t *pEnt); -#endif // FN_OnFreeEntPrivateData_Post - -#ifdef FN_GameShutdown_Post -void FN_GameShutdown_Post(void); -#endif // FN_GameShutdown_Post - -#ifdef FN_ShouldCollide_Post -int FN_ShouldCollide_Post(edict_t *pentTouched, edict_t *pentOther); -#endif // FN_ShouldCollide_Post - -#endif // USE_METAMOD - - -#ifdef FN_AMXX_QUERY -void FN_AMXX_QUERY(void); -#endif // FN_AMXX_QUERY - -#ifdef FN_AMXX_ATTACH -void FN_AMXX_ATTACH(void); -#endif // FN_AMXX_ATTACH - -#ifdef FN_AMXX_DETACH -void FN_AMXX_DETACH(void); -#endif // FN_AMXX_DETACH - -#ifdef FN_AMXX_PLUGINSLOADED -void FN_AMXX_PLUGINSLOADED(void); -#endif // FN_AMXX_PLUGINSLOADED - -// ***** Module funcs stuff ***** -enum ForwardExecType -{ - ET_IGNORE = 0, // Ignore return vaue - ET_STOP, // Stop on PLUGIN_HANDLED - ET_STOP2, // Stop on PLUGIN_HANDLED, continue on other values, return biggest return value - ET_CONTINUE, // Continue; return biggest return value -}; - -enum ForwardParam -{ - FP_DONE = -1, // specify this as the last argument - // only tells the function that there are no more arguments - FP_CELL, // normal cell - FP_FLOAT, // float; used as normal cell though - FP_STRING, // string - FP_STRINGEX, // string; will be updated to the last function's value - FP_ARRAY, // array; use the return value of prepareArray. -}; - - -typedef int (*PFN_ADD_NATIVES) (const AMX_NATIVE_INFO * /*list*/); -typedef char * (*PFN_BUILD_PATHNAME) (const char * /*format*/, ...); -typedef cell * (*PFN_GET_AMXADDR) (AMX * /*amx*/, cell /*offset*/); -typedef void (*PFN_PRINT_SRVCONSOLE) (char * /*format*/, ...); -typedef const char * (*PFN_GET_MODNAME) (void); -typedef const char * (*PFN_GET_AMXSCRIPTNAME) (int /*id*/); -typedef AMX * (*PFN_GET_AMXSCRIPT) (int /*id*/); -typedef int (*PFN_FIND_AMXSCRIPT_BYAMX) (const AMX * /*amx*/); -typedef int (*PFN_FIND_AMXSCRIPT_BYNAME) (const char * /*name*/); -typedef int (*PFN_SET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, const char * /* source */, int /* max */); -typedef char * (*PFN_GET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, int /*bufferId*/, int * /*pLen*/); -typedef int (*PFN_GET_AMXSTRINGLEN) (const cell *ptr); -typedef char * (*PFN_FORMAT_AMXSTRING) (AMX * /*amx*/, cell * /*params*/, int /*startParam*/, int * /*pLen*/); -typedef void (*PFN_COPY_AMXMEMORY) (cell * /*dest*/, const cell * /*src*/, int /*len*/); -typedef void (*PFN_LOG) (const char * /*fmt*/, ...); -typedef int (*PFN_RAISE_AMXERROR) (AMX * /*amx*/, int /*error*/); -typedef int (*PFN_REGISTER_FORWARD) (const char * /*funcname*/, ForwardExecType /*exectype*/, ... /*paramtypes terminated by PF_DONE*/); -typedef int (*PFN_EXECUTE_FORWARD) (int /*id*/, ... /*params*/); -typedef cell (*PFN_PREPARE_CELLARRAY) (cell * /*ptr*/, unsigned int /*size*/); -typedef cell (*PFN_PREPARE_CHARARRAY) (char * /*ptr*/, unsigned int /*size*/); -typedef int (*PFN_IS_PLAYER_VALID) (int /*id*/); -typedef const char * (*PFN_GET_PLAYER_NAME) (int /*id*/); -typedef const char * (*PFN_GET_PLAYER_IP) (int /*id*/); -typedef int (*PFN_IS_PLAYER_INGAME) (int /*id*/); -typedef int (*PFN_IS_PLAYER_BOT) (int /*id*/); -typedef int (*PFN_IS_PLAYER_AUTHORIZED) (int /*id*/); -typedef float (*PFN_GET_PLAYER_TIME) (int /*id*/); -typedef float (*PFN_GET_PLAYER_PLAYTIME) (int /*id*/); -typedef int (*PFN_GET_PLAYER_CURWEAPON) (int /*id*/); -typedef int (*PFN_GET_PLAYER_TEAMID) (int /*id*/); -typedef int (*PFN_GET_PLAYER_DEATHS) (int /*id*/); -typedef int (*PFN_GET_PLAYER_MENU) (int /*id*/); -typedef int (*PFN_GET_PLAYER_KEYS) (int /*id*/); -typedef int (*PFN_IS_PLAYER_ALIVE) (int /*id*/); -typedef int (*PFN_GET_PLAYER_FRAGS) (int /*id*/); -typedef int (*PFN_IS_PLAYER_CONNECTING) (int /*id*/); -typedef int (*PFN_IS_PLAYER_HLTV) (int /*id*/); -typedef int (*PFN_GET_PLAYER_ARMOR) (int /*id*/); -typedef int (*PFN_GET_PLAYER_HEALTH) (int /*id*/); -typedef void * (*PFN_ALLOCATOR) (const char* /*filename*/, const unsigned int /*line*/, const char* /*func*/, - const unsigned int /*type*/, const size_t /*size*/); -typedef void * (*PFN_REALLOCATOR) (const char* /*filename*/, const unsigned int /*line*/, const char* /*func*/, - const unsigned int /*type*/, const size_t /*size*/, void* /*addr*/ ); -typedef void (*PFN_DEALLOCATOR) (const char* /*filename*/, const unsigned int /*line*/, const char* /*func*/, - const unsigned int /*type*/, const void* /*addr*/ ); -typedef int (*PFN_AMX_EXEC) (AMX* /*amx*/, cell* /*return val*/, int /*index*/, int /*numparams*/, ... /*params*/); -typedef int (*PFN_AMX_EXECV) (AMX* /*amx*/, cell* /*return val*/, int /*index*/, int /*numparams*/, cell[] /*params*/); -typedef int (*PFN_AMX_ALLOT) (AMX* /*amx*/, int /*length*/, cell* /*amx_addr*/, cell** /*phys_addr*/); -typedef int (*PFN_AMX_FINDPUBLIC) (AMX* /*amx*/, char* /*func name*/, int* /*index*/); -typedef int (*PFN_LOAD_AMXSCRIPT) (AMX* /*amx*/, void** /*code*/, const char* /*path*/, char[64] /*error info*/); -typedef int (*PFN_UNLOAD_AMXSCRIPT) (AMX* /*amx*/,void** /*code*/); -typedef cell (*PFN_REAL_TO_CELL) (REAL /*x*/); -typedef REAL (*PFN_CELL_TO_REAL) (cell /*x*/); -typedef int (*PFN_REGISTER_SPFORWARD) (AMX * /*amx*/, int /*func*/, ... /*params*/); -typedef int (*PFN_REGISTER_SPFORWARD_BYNAME) (AMX * /*amx*/, const char * /*funcName*/, ... /*params*/); -typedef void (*PFN_UNREGISTER_SPFORWARD) (int /*id*/); - -extern PFN_ADD_NATIVES g_fn_AddNatives; -extern PFN_BUILD_PATHNAME g_fn_BuildPathname; -extern PFN_GET_AMXADDR g_fn_GetAmxAddr; -extern PFN_PRINT_SRVCONSOLE g_fn_PrintSrvConsole; -extern PFN_GET_MODNAME g_fn_GetModname; -extern PFN_GET_AMXSCRIPTNAME g_fn_GetAmxScriptName; -extern PFN_GET_AMXSCRIPT g_fn_GetAmxScript; -extern PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; -extern PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; -extern PFN_SET_AMXSTRING g_fn_SetAmxString; -extern PFN_GET_AMXSTRING g_fn_GetAmxString; -extern PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; -extern PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; -extern PFN_COPY_AMXMEMORY g_fn_CopyAmxMemory; -extern PFN_LOG g_fn_Log; -extern PFN_RAISE_AMXERROR g_fn_RaiseAmxError; -extern PFN_REGISTER_FORWARD g_fn_RegisterForward; -extern PFN_EXECUTE_FORWARD g_fn_ExecuteForward; -extern PFN_PREPARE_CELLARRAY g_fn_PrepareCellArray; -extern PFN_PREPARE_CHARARRAY g_fn_PrepareCharArray; -extern PFN_IS_PLAYER_VALID g_fn_IsPlayerValid; -extern PFN_GET_PLAYER_NAME g_fn_GetPlayerName; -extern PFN_GET_PLAYER_IP g_fn_GetPlayerIP; -extern PFN_IS_PLAYER_INGAME g_fn_IsPlayerIngame; -extern PFN_IS_PLAYER_BOT g_fn_IsPlayerBot; -extern PFN_IS_PLAYER_AUTHORIZED g_fn_IsPlayerAuthorized; -extern PFN_GET_PLAYER_TIME g_fn_GetPlayerTime; -extern PFN_GET_PLAYER_PLAYTIME g_fn_GetPlayerPlayTime; -extern PFN_GET_PLAYER_CURWEAPON g_fn_GetPlayerCurweapon; -extern PFN_GET_PLAYER_TEAMID g_fn_GetPlayerTeamID; -extern PFN_GET_PLAYER_DEATHS g_fn_GetPlayerDeaths; -extern PFN_GET_PLAYER_MENU g_fn_GetPlayerMenu; -extern PFN_GET_PLAYER_KEYS g_fn_GetPlayerKeys; -extern PFN_IS_PLAYER_ALIVE g_fn_IsPlayerAlive; -extern PFN_GET_PLAYER_FRAGS g_fn_GetPlayerFrags; -extern PFN_IS_PLAYER_CONNECTING g_fn_IsPlayerConnecting; -extern PFN_IS_PLAYER_HLTV g_fn_IsPlayerHLTV; -extern PFN_GET_PLAYER_ARMOR g_fn_GetPlayerArmor; -extern PFN_GET_PLAYER_HEALTH g_fn_GetPlayerHealth; -extern PFN_AMX_EXEC g_fn_AmxExec; -extern PFN_AMX_EXECV g_fn_AmxExecv; -extern PFN_AMX_ALLOT g_fn_AmxAllot; -extern PFN_AMX_FINDPUBLIC g_fn_AmxFindPublic; -extern PFN_LOAD_AMXSCRIPT g_fn_LoadAmxScript; -extern PFN_UNLOAD_AMXSCRIPT g_fn_UnloadAmxScript; -extern PFN_REAL_TO_CELL g_fn_RealToCell; -extern PFN_CELL_TO_REAL g_fn_CellToReal; -extern PFN_REGISTER_SPFORWARD g_fn_RegisterSPForward; -extern PFN_REGISTER_SPFORWARD_BYNAME g_fn_RegisterSPForwardByName; -extern PFN_UNREGISTER_SPFORWARD g_fn_UnregisterSPForward; - -#ifdef MAY_NEVER_BE_DEFINED -// Function prototypes for intellisense and similar systems -// They understand #if 0 so we use #ifdef MAY_NEVER_BE_DEFINED -int MF_AddNatives (const AMX_NATIVE_INFO *list) { } -char * MF_BuildPathname (const char * format, ...) { } -cell * MF_GetAmxAddr (AMX * amx, cell offset) { } -void MF_PrintSrvConsole (char * format, ...) { } -const char * MF_GetModname (void) { } -const char * MF_GetScriptName (int id) { } -AMX * MF_GetScriptAmx (int id) { } -int MF_FindScriptByAmx (const AMX * amx) { } -int MF_FindScriptByAmx (const char * name) { } -int MF_SetAmxString (AMX * amx, cell amx_addr, const char * source , int max ) { } -char * MF_GetAmxString (AMX * amx, cell amx_addr, int bufferId, int * pLen) { } -int MF_GetAmxStringLen (const cell *ptr) { } -char * MF_FormatAmxString (AMX * amx, cell * params, int startParam, int * pLen) { } -void MF_CopyAmxMemory (cell * dest, const cell * src, int len) { } -void MF_Log (const char * fmt, ...) { } -int MF_RaiseAmxError (AMX * amx, int error) { } -int MF_RegisterForward (const char * funcname, ForwardExecType exectype, ...) { } -int MF_ExecuteForward (int id, ...) { } -cell MF_PrepareCellArray (cell * ptr, unsigned int size) { } -cell MF_PrepareCharArray (char * ptr, unsigned int size) { } -int MF_IsPlayerValid (int id) { } -const char * MF_GetPlayerName (int id) { } -const char * MF_GetPlayerIP (int id) { } -int MF_IsPlayerIngame (int id) { } -int MF_IsPlayerBot (int id) { } -int MF_IsPlayerAuthorized (int id) { } -float MF_GetPlayerTime (int id) { } -float MF_GetPlayerPlayTime (int id) { } -int MF_GetPlayerCurweapon (int id) { } -int MF_GetPlayerTeamID (int id) { } -int MF_GetPlayerDeaths (int id) { } -int MF_GetPlayerMenu (int id) { } -int MF_GetPlayerKeys (int id) { } -int MF_IsPlayerAlive (int id) { } -int MF_GetPlayerFrags (int id) { } -int MF_IsPlayerConnecting (int id) { } -int MF_IsPlayerHLTV (int id) { } -int MF_GetPlayerArmor (int id) { } -int MF_GetPlayerHealth (int id) { } -REAL amx_ctof (cell x) { } -cell amx_ftoc (float x) { } -int MF_RegisterSPForwardByName (AMX * amx, const char *str, ...) { } -int MF_RegisterSPForward (AMX * amx, int func, ...) { } -void MF_UnregisterSPForward (int id) { } -#endif // MAY_NEVER_BE_DEFINED - -#define MF_AddNatives g_fn_AddNatives -#define MF_BuildPathname g_fn_BuildPathname -#define MF_FormatAmxString g_fn_FormatAmxString -#define MF_GetAmxAddr g_fn_GetAmxAddr -#define MF_PrintSrvConsole g_fn_PrintSrvConsole -#define MF_GetModname g_fn_GetModname -#define MF_GetScriptName g_fn_GetAmxScriptName -#define MF_GetScriptAmx g_fn_GetAmxScript -#define MF_FindScriptByAmx g_fn_FindAmxScriptByAmx -#define MF_FindScriptByName g_fn_FindAmxScriptByName -#define MF_SetAmxString g_fn_SetAmxString -#define MF_GetAmxString g_fn_GetAmxString -#define MF_GetAmxStringLen g_fn_GetAmxStringLen -#define MF_CopyAmxMemory g_fn_CopyAmxMemory -void MF_Log(const char *fmt, ...); -#define MF_RaiseAmxError g_fn_RaiseAmxError -#define MF_RegisterForward g_fn_RegisterForward -#define MF_ExecuteForward g_fn_ExecuteForward -#define MF_PrepareCellArray g_fn_PrepareCellArray -#define MF_PrepareCharArray g_fn_PrepareCharArray -#define MF_IsPlayerValid g_fn_IsPlayerValid -#define MF_GetPlayerName g_fn_GetPlayerName -#define MF_GetPlayerIP g_fn_GetPlayerIP -#define MF_IsPlayerIngame g_fn_IsPlayerIngame -#define MF_IsPlayerBot g_fn_IsPlayerBot -#define MF_IsPlayerAuthorized g_fn_IsPlayerAuthorized -#define MF_GetPlayerTime g_fn_GetPlayerTime -#define MF_GetPlayerPlayTime g_fn_GetPlayerPlayTime -#define MF_GetPlayerCurweapon g_fn_GetPlayerCurweapon -#define MF_GetPlayerTeamID g_fn_GetPlayerTeamID -#define MF_GetPlayerDeaths g_fn_GetPlayerDeaths -#define MF_GetPlayerMenu g_fn_GetPlayerMenu -#define MF_GetPlayerKeys g_fn_GetPlayerKeys -#define MF_IsPlayerAlive g_fn_IsPlayerAlive -#define MF_GetPlayerFrags g_fn_GetPlayerFrags -#define MF_IsPlayerConnecting g_fn_IsPlayerConnecting -#define MF_IsPlayerHLTV g_fn_IsPlayerHLTV -#define MF_GetPlayerArmor g_fn_GetPlayerArmor -#define MF_GetPlayerHealth g_fn_GetPlayerHealth -#define MF_AmxExec g_fn_AmxExec -#define MF_AmxExecv g_fn_AmxExecv -#define MF_AmxFindPublic g_fn_AmxFindPublic -#define MF_AmxAllot g_fn_AmxAllot -#define MF_LoadAmxScript g_fn_LoadAmxScript -#define MF_UnloadAmxScript g_fn_UnloadAmxScript -#define amx_ctof g_fn_CellToReal -#define amx_ftoc g_fn_RealToCell -#define MF_RegisterSPForwardByName g_fn_RegisterSPForwardByName -#define MF_RegisterSPForward g_fn_RegisterSPForward -#define MF_UnregisterSPForward g_fn_UnregisterSPForward - -/*** Memory ***/ -void *operator new(size_t reportedSize); -void *operator new[](size_t reportedSize); -void *operator new(size_t reportedSize, const char *sourceFile, int sourceLine); -void *operator new[](size_t reportedSize, const char *sourceFile, int sourceLine); -void operator delete(void *reportedAddress); -void operator delete[](void *reportedAddress); - -// Allocation types -extern const unsigned int m_alloc_unknown; -extern const unsigned int m_alloc_new; -extern const unsigned int m_alloc_new_array; -extern const unsigned int m_alloc_malloc; -extern const unsigned int m_alloc_calloc; -extern const unsigned int m_alloc_realloc; -extern const unsigned int m_alloc_delete; -extern const unsigned int m_alloc_delete_array; -extern const unsigned int m_alloc_free; - -// To be called before new / delete -void Mem_SetOwner(const char *filename, int line, const char *function); -// Actual allocator -void * Mem_Allocator(const char *sourceFile, const unsigned int sourceLine, const char *sourceFunc, - const unsigned int allocationType, const size_t reportedSize); -void * Mem_Reallocator(const char *sourceFile, const unsigned int sourceLine, const char *sourceFunc, - const unsigned int reallocationType, const size_t reportedSize, void *reportedAddress); -void Mem_Deallocator(const char *sourceFile, const unsigned int sourceLine, const char *sourceFunc, - const unsigned int deallocationType, void *reportedAddress); - -// memory macros -#ifndef __FUNCTION__ -#define __FUNCTION__ "??" -#endif - -// call Mem_SetOwner, followed by the actual new operator -#define new (Mem_SetOwner(__FILE__,__LINE__,__FUNCTION__),false) ? NULL : new -// call Mem_SetOwner, followed by the actual delete operator -#define delete (Mem_SetOwner(__FILE__,__LINE__,__FUNCTION__),false) ? Mem_SetOwner("",0,"") : delete -#define malloc(sz) Mem_Allocator (__FILE__,__LINE__,__FUNCTION__,m_alloc_malloc,sz) -#define calloc(sz) Mem_Allocator (__FILE__,__LINE__,__FUNCTION__,m_alloc_calloc,sz) -#define realloc(ptr,sz) Mem_Reallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_realloc,sz,ptr) -#define free(ptr) Mem_Deallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_free,ptr) - -#endif // #ifndef __AMXXMODULE_H__ diff --git a/dlls/metamapx/metamap.cpp b/dlls/metamapx/metamap.cpp deleted file mode 100755 index 058bd498..00000000 --- a/dlls/metamapx/metamap.cpp +++ /dev/null @@ -1,460 +0,0 @@ -#include "metamap.h" - - -bool& VisitedAccess(unsigned int col, unsigned int lin, bool* visited) -{ - return visited[lin * COLUMNS + col]; -} - -cell* MatrixWrite(UINT col, UINT lin, cell* theMatrix) -{ - return &(theMatrix[lin * COLUMNS + col]); - //return &(crossword.at()); -} - -const cell* MatrixRead(UINT col, UINT lin, cell* theMatrix) -{ - return &(theMatrix[lin * COLUMNS + col]); - //return &(crossword.at()); -} - -void AddSpace(int column, int line, vector& spaces) -{ - spaces.push_back(CSpace(column, line)); -} - -void EmptyMatrix(cell* theMatrix) { - for (UINT i = 0; i < COLUMNS; i++) { - for (UINT j = 0; j < LINES; j++) { - *(MatrixWrite(i, j, theMatrix)) = SPACE_EMPTY; - } - } -} - -bool BoundaryAndWallCheck(const UINT column, const UINT line, bool* CRvisited, cell* theMatrix) -{ - if (column >= 0 && column < COLUMNS && line >= 0 && line < LINES) { - // That's boundaries, now walls, and visited! - if (*MatrixRead(column, line, theMatrix) == SPACE_EMPTY) //if (theMatrix[column][line] == SPACE_EMPTY) { - if (!(VisitedAccess(column, line, CRvisited)))//if (!CRvisited[column][line]) - return true; - /*else { - cout << "Visited" << column << ',' << line << '!'; - }*/ - } - - return false; -} - -int Difference(int i, int j) { - if (i > j) - return i - j; - else - return j - i; -} - -bool CheckReach(const UINT currentColumn, const UINT currentLine, const UINT targetColumn, const UINT targetLine, bool* CRvisited, cell* theMatrix) -{ - //cout << '>' << currentColumn << ',' << currentLine; - if (currentColumn < 0 || currentColumn >= COLUMNS || currentLine < 0 || currentLine >= LINES - || targetColumn < 0 || targetColumn >= COLUMNS || targetLine < 0 || targetLine >= LINES) { - MF_Log("Metamap: Out of range in CheckReach! currentColumn %d currentLine %d targetColumn %d targetLine %d"); - throw; - } - // This should happen when the spaces are directly next to each other. - if (currentColumn == targetColumn && Difference(currentLine, targetLine) == 1 - || currentLine == targetLine && Difference(currentColumn, targetColumn) == 1) { - //cout << "Returns yes here because " << currentColumn << "," << currentLine << " and " << targetColumn << "," << targetLine << " are next to each other."; - //cout << "=nextTo"; - return true; - } - else if (*MatrixRead(currentColumn, currentLine, theMatrix) == SPACE_WALL) //else if (theMatrix[currentColumn][currentLine] == SPACE_WALL) - return false; - - (VisitedAccess(currentColumn, currentLine, CRvisited)) = true; //CRvisited[currentColumn][currentLine] = true; - - // Spaces are now at least two manhattan units from each other. - // Try to go in the general direction of target (should be one or two possibilites here, depending on if we are on the same line/column or not) - bool goLeft = false, goUp = false, goRight = false, goDown = false; - - if (targetColumn < currentColumn) - goLeft = true; - else if (targetColumn > currentColumn) - goRight = true; - if (targetLine < currentLine) - goUp = true; - else if (targetLine > currentLine) - goDown = true; - - // Left - int leftColumn = currentColumn - 1; - int leftLine = currentLine; - - // Up - int upColumn = currentColumn; - int upLine = currentLine - 1; - - // Right - int rightColumn = currentColumn + 1; - int rightLine = currentLine; - - // Down - int downColumn = currentColumn; - int downLine = currentLine + 1; - - int nextColumn[4], nextLine[4]; - bool nextCheck[4]; - - if (goLeft) { - nextColumn[0] = leftColumn; - nextLine[0] = leftLine; - nextCheck[0] = BoundaryAndWallCheck(nextColumn[0], nextLine[0], CRvisited, theMatrix); - if (goUp) { - nextColumn[1] = upColumn; - nextLine[1] = upLine; - nextCheck[1] = BoundaryAndWallCheck(nextColumn[1], nextLine[1], CRvisited, theMatrix); - - nextColumn[2] = downColumn; - nextLine[2] = downLine; - nextCheck[2] = BoundaryAndWallCheck(nextColumn[2], nextLine[2], CRvisited, theMatrix); - - nextColumn[3] = rightColumn; - nextLine[3] = rightLine; - nextCheck[3] = BoundaryAndWallCheck(nextColumn[3], nextLine[3], CRvisited, theMatrix); - } - else { - nextColumn[1] = downColumn; - nextLine[1] = downLine; - nextCheck[1] = BoundaryAndWallCheck(nextColumn[1], nextLine[1], CRvisited, theMatrix); - - nextColumn[2] = upColumn; - nextLine[2] = upLine; - nextCheck[2] = BoundaryAndWallCheck(nextColumn[2], nextLine[2], CRvisited, theMatrix); - - nextColumn[3] = rightColumn; - nextLine[3] = rightLine; - nextCheck[3] = BoundaryAndWallCheck(nextColumn[3], nextLine[3], CRvisited, theMatrix); - } - } - else if (goRight) { - nextColumn[0] = rightColumn; - nextLine[0] = rightLine; - nextCheck[0] = BoundaryAndWallCheck(nextColumn[0], nextLine[0], CRvisited, theMatrix); - if (goUp) { - nextColumn[1] = upColumn; - nextLine[1] = upLine; - nextCheck[1] = BoundaryAndWallCheck(nextColumn[1], nextLine[1], CRvisited, theMatrix); - - nextColumn[2] = downColumn; - nextLine[2] = downLine; - nextCheck[2] = BoundaryAndWallCheck(nextColumn[2], nextLine[2], CRvisited, theMatrix); - - nextColumn[3] = leftColumn; - nextLine[3] = leftLine; - nextCheck[3] = BoundaryAndWallCheck(nextColumn[3], nextLine[3], CRvisited, theMatrix); - } - else { - nextColumn[1] = downColumn; - nextLine[1] = downLine; - nextCheck[1] = BoundaryAndWallCheck(nextColumn[1], nextLine[1], CRvisited, theMatrix); - - nextColumn[2] = upColumn; - nextLine[2] = upLine; - nextCheck[2] = BoundaryAndWallCheck(nextColumn[2], nextLine[2], CRvisited, theMatrix); - - nextColumn[3] = leftColumn; - nextLine[3] = leftLine; - nextCheck[3] = BoundaryAndWallCheck(nextColumn[3], nextLine[3], CRvisited, theMatrix); - } - } - else { - if (goUp) { - nextColumn[0] = upColumn; - nextLine[0] = upLine; - nextCheck[0] = BoundaryAndWallCheck(nextColumn[0], nextLine[0], CRvisited, theMatrix); - - nextColumn[1] = leftColumn; - nextLine[1] = leftLine; - nextCheck[1] = BoundaryAndWallCheck(nextColumn[1], nextLine[1], CRvisited, theMatrix); - - nextColumn[2] = rightColumn; - nextLine[2] = rightLine; - nextCheck[2] = BoundaryAndWallCheck(nextColumn[2], nextLine[2], CRvisited, theMatrix); - - nextColumn[3] = downColumn; - nextLine[3] = downLine; - nextCheck[3] = BoundaryAndWallCheck(nextColumn[3], nextLine[3], CRvisited, theMatrix); - } - else { - nextColumn[0] = downColumn; - nextLine[0] = downLine; - nextCheck[0] = BoundaryAndWallCheck(nextColumn[0], nextLine[0], CRvisited, theMatrix); - - nextColumn[1] = leftColumn; - nextLine[1] = leftLine; - nextCheck[1] = BoundaryAndWallCheck(nextColumn[1], nextLine[1], CRvisited, theMatrix); - - nextColumn[2] = rightColumn; - nextLine[2] = rightLine; - nextCheck[2] = BoundaryAndWallCheck(nextColumn[2], nextLine[2], CRvisited, theMatrix); - - nextColumn[3] = upColumn; - nextLine[3] = upLine; - nextCheck[3] = BoundaryAndWallCheck(nextColumn[3], nextLine[3], CRvisited, theMatrix); - } - } - - for (int i = 0; i < 4; i++) { - if (nextCheck[i] && CheckReach(nextColumn[i], nextLine[i], targetColumn, targetLine, CRvisited, theMatrix)) { - return true; - } - } - - return false; -} - -bool CheckReaches(const UINT column, const UINT line, cell* theMatrix) { - // can left, up, right and down still reach each other? if so, this move can be done. - // Can left reach up, can up reach right, and can right reach down = good move. - - bool checkSpaces[4]; - int columns[4]; // These CANNOT be UINT! Evaluted >0 with expected possibility of going below 0! - int lines[4]; // These CANNOT be UINT! Evaluted >0 with expected possibility of going below 0! - // Left - columns[0] = column - 1; - lines[0] = line; - // Boundary + wall check //checkSpaces[0] = columns[0] >= 0 ? (theMatrix[columns[0]][lines[0]] == SPACE_EMPTY ? true : false) : false; // Boundary + wall check - checkSpaces[0] = columns[0] >= 0 ? (*MatrixRead(columns[0], lines[0], theMatrix) == SPACE_EMPTY ? true : false) : false; - // Up - columns[1] = column; - lines[1] = line - 1; - //checkSpaces[1] = lines[1] >= 0 ? (theMatrix[columns[1]][lines[1]] == SPACE_EMPTY ? true : false) : false; // Boundary + wall check - checkSpaces[1] = lines[1] >= 0 ? (*MatrixRead(columns[1], lines[1], theMatrix) == SPACE_EMPTY ? true : false) : false; - // Right - columns[2] = column + 1; - lines[2] = line; - //checkSpaces[2] = columns[2] < COLUMNS ? (theMatrix[columns[2]][lines[2]] == SPACE_EMPTY ? true : false) : false; // Boundary + wall check - checkSpaces[2] = columns[2] < (int)COLUMNS ? (*MatrixRead(columns[2], lines[2], theMatrix) == SPACE_EMPTY ? true : false) : false; - // Down - columns[3] = column; - lines[3] = line + 1; - //checkSpaces[3] = lines[3] < LINES ? (theMatrix[columns[3]][lines[3]] == SPACE_EMPTY ? true : false) : false; // Boundary + wall check - checkSpaces[3] = lines[3] < (int)LINES ? (*MatrixRead(columns[3], lines[3], theMatrix) == SPACE_EMPTY ? true : false) : false; - - for (int j = 0, spacesToCheck = 0; j < 4; j++) { - if (checkSpaces[j]) - spacesToCheck++; - } - - if (spacesToCheck == 1) { - // If only one space to check, the other are already used by walls or out of bounds, so don't bother checking anything more, just return true! - return true; - } - else if (spacesToCheck == 0) { - // If this is ever 0, we probably made an error earlier? - //PrintMatrix(column, line); - //cout << "Should check around: " << column << ',' << line << " is " << ((theMatrix[column][line] == SPACE_EMPTY) ? "empty" : "a wall") << endl; - MF_Log("Metamap: Error - unreachable area may have been created earlier, quitting..."); - throw; - } - - //cout << "Should find " << spacesToCheck << " connections." << endl; - //int connectionsToFind - bool reaches; - int tested = 0; - int connections = 0; - //vector CRvisited; <-- burn in hell, STL! :-D - //CRvisited.resize(COLUMNS * LINES); - - bool* visited = new bool[COLUMNS * LINES]; - //EmptyMatrix(theMatrix, visited); - - //bool CRvisited[COLUMNS][LINES]; - for (UINT i = 0; i < 4; i++) { - if (!checkSpaces[i]) - continue; - - // We should be able to return true here, because if A can reach B, B can also reach A. :-) - //if (connections == 1 && spacesToCheck == 2) - //return true; - reaches = false; - tested = 0; - for (UINT j = i + 1; tested < 4; j++) { - if (j == 4) - j = 0; - tested++; // we have tested this direction - if (i == j || !checkSpaces[j]) - continue; - - //cout << "Can " << columns[i] << ',' << lines[i] << " reach " << columns[j] << ',' << lines[j] << '?'; - for (UINT l = 0; l < LINES; l++) { - for (UINT k = 0; k < COLUMNS; k++) { - (VisitedAccess(k, l, visited)) = false;//CRvisited[l][k] = false; - } - } - //MF_Log("i: %d, calls CheckReach(%d, %d, %d, %d, CRvisited, theMatrix)", i, columns[i], lines[i], columns[j], lines[j]); - if (CheckReach(columns[i], lines[i], columns[j], lines[j], visited, theMatrix)) { - //cout << " Yes, " << columns[i] << ',' << lines[i] << " reaches " << columns[j] << ',' << lines[j] << ", indexes " << i << " and " << j << '.' << endl; - reaches = true; - connections++; - break; // break, don't check this space anymore, go on check with the rest. - } - else { - // Really, if A cannot ever reach B, it does not matter if A can reach C! :-) - delete [] visited; - return false; - } - //cout << " No!" << endl; - } - - // If we can't reach any of the other spaces, return false here. - if (!reaches) { - //cout << columns[i] << ',' << lines[i] << " can't reach any other space! Returning false here..." << endl; - delete [] visited; - return false; - } - } - - delete [] visited; - return true; -} - -bool PlaceWalls2(const UINT WALLSTOPLACE, cell* theMatrix) -{ - if (WALLSTOPLACE > COLUMNS * LINES) { - MF_Log("Metamap: Too many walls!"); - return false; - } - - UINT wallsPlaced = 0; - // Find all empty spaces, add them to vector. - vector emptySpaces; - //int round = 0; - while (wallsPlaced < WALLSTOPLACE) { - //round++; - //cout << "Starting new round, we should place " << wallsToPlace << " but have so far only placed " << wallsPlaced << " walls." << endl; - //system("PAUSE"); - for (UINT i = 0, empties = 0; i < COLUMNS; i++) { - for (UINT j = 0; j < LINES; j++) { - if (*(MatrixRead(i, j, theMatrix)) == SPACE_EMPTY) { // if (theMatrix[i][j] == SPACE_EMPTY) { - AddSpace(i, j, emptySpaces); - empties++; - } - } - } - -#if defined _debug - MF_Log("Added %d empty spaces... %d elements in emptySpaces", empties, emptySpaces.size()); -#endif - - for (UINT column, line, element; wallsPlaced < WALLSTOPLACE && !emptySpaces.empty(); wallsPlaced++) { - element = JBRandom::JBRandomize(0, emptySpaces.size() - 1); - column = emptySpaces[element].column; - line = emptySpaces[element].line; - //MF_Log("element %d in column %d, line %d", element, column, line); - - *(MatrixWrite(column, line, theMatrix)) = SPACE_WALL;// theMatrix[column][line] = SPACE_WALL; - //PrintMatrix(column, line); - - // Is it possible to place a wall here without blocking anything? - - if (!CheckReaches(column, line, theMatrix)) { - //cout << "No!" << endl; - *(MatrixWrite(column, line, theMatrix)) = SPACE_EMPTY; //theMatrix[column][line] = SPACE_EMPTY; - wallsPlaced--; - //system("PAUSE"); - } - - emptySpaces.erase(&emptySpaces[element]); - //cout << emptySpaces.size() << endl; - //system("PAUSE"); - } - //cout << "One round ready..." << endl; - //PrintMatrix(); - //system("PAUSE"); - } - - return true; -} - -void CountWalls(cell* theMatrix) { - int walls = 0, empties = 0, others = 0; - for (UINT i = 0; i < LINES * COLUMNS; i++) { - if (theMatrix[i] == SPACE_EMPTY) - empties++; - else if (theMatrix[i] == SPACE_WALL) - walls++; - else - others++; - - } - MF_Log("Walls: %d empties: %d others: %d", walls, empties, others); -} - -static cell AMX_NATIVE_CALL metamap_getmap(AMX *amx, cell *params) // native metamap_getmap(matrix[], columns, lines, walls); = 4 params -{ -#if defined _DEBUG - MF_Log("metamap_getmap start"); -#endif - g_amx = amx; - // Get matrix - cell* theMatrix = MF_GetAmxAddr(amx, params[1]); - - // Get rest of the parameters - COLUMNS = params[2]; - LINES = params[3]; - const int WALLS = params[4]; - - if (COLUMNS <= 0) { - MF_Log("Too few columns! (%d)", COLUMNS); - MF_RaiseAmxError(g_amx, AMX_ERR_NATIVE); - return 0; - } - else if (LINES <= 0) { - MF_Log("Too few lines! (%d)", LINES); - MF_RaiseAmxError(g_amx, AMX_ERR_NATIVE); - return 0; - } - else if (WALLS <= 0) { - MF_Log("Too few walls! (%d)", WALLS); - MF_RaiseAmxError(g_amx, AMX_ERR_NATIVE); - return 0; - } - - try { - EmptyMatrix(theMatrix); - -#if defined _DEBUG - CountWalls(theMatrix); -#endif - if (!PlaceWalls2(WALLS, theMatrix)) { - MF_RaiseAmxError(g_amx, AMX_ERR_NATIVE); - return 0; - } -#if defined _DEBUG - MF_Log("After placing walls:"); - CountWalls(theMatrix); -#endif - } - catch (...) { - MF_Log("Metamap, main: Unhandled exception."); - MF_RaiseAmxError(g_amx, AMX_ERR_NATIVE); - return 0; - } - -#if defined _DEBUG - MF_Log("metamap_getmap end"); -#endif - return 1; -} -/******************************************************************************************/ -AMX_NATIVE_INFO metamap_Exports[] = { - {"metamap_getmap", metamap_getmap}, - /////////////////// <--- 19 chars max - {NULL, NULL} -}; - -void OnAmxxAttach() -{ - MF_AddNatives(metamap_Exports); -} diff --git a/dlls/metamapx/metamap.h b/dlls/metamapx/metamap.h deleted file mode 100755 index fd834d98..00000000 --- a/dlls/metamapx/metamap.h +++ /dev/null @@ -1,19 +0,0 @@ -#include -#include "JBRandom.h" -#include "amxxmodule.h" -using namespace std; - -enum SpaceContent {SPACE_EMPTY = 0, SPACE_WALL = 1}; -typedef unsigned int UINT; - -class CSpace -{ - public: - CSpace(UINT columnIn, UINT lineIn) {column = columnIn; line = lineIn;} - UINT column, line; -}; - - -// Globals -UINT COLUMNS, LINES; -AMX *g_amx; diff --git a/dlls/metamapx/metamap.inc b/dlls/metamapx/metamap.inc deleted file mode 100755 index 4e57d703..00000000 --- a/dlls/metamapx/metamap.inc +++ /dev/null @@ -1,9 +0,0 @@ -// METAMAP module - -#if !defined INCLUDED_METAMAP -#define INCLUDED_METAMAP - -// Matrix must be of size columns * lines! -native metamap_getmap(matrix[], columns, lines, walls); - -#endif // INCLUDED_METAMAP diff --git a/dlls/metamapx/metamap.vcproj b/dlls/metamapx/metamap.vcproj deleted file mode 100755 index 2955b690..00000000 --- a/dlls/metamapx/metamap.vcproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dlls/metamapx/moduleconfig.h b/dlls/metamapx/moduleconfig.h deleted file mode 100755 index 6a09498e..00000000 --- a/dlls/metamapx/moduleconfig.h +++ /dev/null @@ -1,462 +0,0 @@ -// Configuration - -#ifndef __MODULECONFIG_H__ -#define __MODULECONFIG_H__ - -// Module info -#define MODULE_NAME "Metamap X" -#define MODULE_VERSION "0.1" -#define MODULE_AUTHOR "JGHG" -#define MODULE_URL "http://www.tcwonline.org/johnnygothisgun/" -#define MODULE_LOGTAG "METAMAPX" -// If you don't want the module to be reloaded on mapchange, comment out the next line -//#define MODULE_RELOAD_ON_MAPCHANGE - -#ifdef __DATE__ -#define MODULE_DATE __DATE__ -#else // __DATE__ -#define MODULE_DATE "Unknown" -#endif // __DATE__ - -// metamod plugin? -// #define USE_METAMOD - -// - AMXX Init functions -// Also consider using FN_META_* -// AMXX query -//#define FN_AMXX_QUERY OnAmxxQuery -// AMXX attach -// Do native functions init here (MF_AddNatives) -#define FN_AMXX_ATTACH OnAmxxAttach -// AMXX detach -//#define FN_AMXX_DETACH OnAmxxDetach -// All plugins loaded -// Do forward functions init here (MF_RegisterForward) -// #define FN_AMXX_PLUGINSLOADED OnPluginsLoaded - -/**** METAMOD ****/ -// If your module doesn't use metamod, you may close the file now :) -#ifdef USE_METAMOD -// ---- -// Hook Functions -// Uncomment these to be called -// You can also change the function name - -// - Metamod init functions -// Also consider using FN_AMXX_* -// Meta query -//#define FN_META_QUERY OnMetaQuery -// Meta attach -//#define FN_META_ATTACH OnMetaAttach -// Meta detach -//#define FN_META_DETACH OnMetaDetach - -// (wd) are Will Day's notes -// - GetEntityAPI2 functions -// #define FN_GameDLLInit GameDLLInit /* pfnGameInit() */ -// #define FN_DispatchSpawn DispatchSpawn /* pfnSpawn() */ -// #define FN_DispatchThink DispatchThink /* pfnThink() */ -// #define FN_DispatchUse DispatchUse /* pfnUse() */ -// #define FN_DispatchTouch DispatchTouch /* pfnTouch() */ -// #define FN_DispatchBlocked DispatchBlocked /* pfnBlocked() */ -// #define FN_DispatchKeyValue DispatchKeyValue /* pfnKeyValue() */ -// #define FN_DispatchSave DispatchSave /* pfnSave() */ -// #define FN_DispatchRestore DispatchRestore /* pfnRestore() */ -// #define FN_DispatchObjectCollsionBox DispatchObjectCollsionBox /* pfnSetAbsBox() */ -// #define FN_SaveWriteFields SaveWriteFields /* pfnSaveWriteFields() */ -// #define FN_SaveReadFields SaveReadFields /* pfnSaveReadFields() */ -// #define FN_SaveGlobalState SaveGlobalState /* pfnSaveGlobalState() */ -// #define FN_RestoreGlobalState RestoreGlobalState /* pfnRestoreGlobalState() */ -// #define FN_ResetGlobalState ResetGlobalState /* pfnResetGlobalState() */ -// #define FN_ClientConnect ClientConnect /* pfnClientConnect() (wd) Client has connected */ -// #define FN_ClientDisconnect ClientDisconnect /* pfnClientDisconnect() (wd) Player has left the game */ -// #define FN_ClientKill ClientKill /* pfnClientKill() (wd) Player has typed "kill" */ -// #define FN_ClientPutInServer ClientPutInServer /* pfnClientPutInServer() (wd) Client is entering the game */ -// #define FN_ClientCommand ClientCommand /* pfnClientCommand() (wd) Player has sent a command (typed or from a bind) */ -// #define FN_ClientUserInfoChanged ClientUserInfoChanged /* pfnClientUserInfoChanged() (wd) Client has updated their setinfo structure */ -// #define FN_ServerActivate ServerActivate /* pfnServerActivate() (wd) Server is starting a new map */ -// #define FN_ServerDeactivate ServerDeactivate /* pfnServerDeactivate() (wd) Server is leaving the map (shutdown or changelevel); SDK2 */ -// #define FN_PlayerPreThink PlayerPreThink /* pfnPlayerPreThink() */ -// #define FN_PlayerPostThink PlayerPostThink /* pfnPlayerPostThink() */ -// #define FN_StartFrame StartFrame /* pfnStartFrame() */ -// #define FN_ParmsNewLevel ParmsNewLevel /* pfnParmsNewLevel() */ -// #define FN_ParmsChangeLevel ParmsChangeLevel /* pfnParmsChangeLevel() */ -// #define FN_GetGameDescription GetGameDescription /* pfnGetGameDescription() Returns string describing current .dll. E.g. "TeamFotrress 2" "Half-Life" */ -// #define FN_PlayerCustomization PlayerCustomization /* pfnPlayerCustomization() Notifies .dll of new customization for player. */ -// #define FN_SpectatorConnect SpectatorConnect /* pfnSpectatorConnect() Called when spectator joins server */ -// #define FN_SpectatorDisconnect SpectatorDisconnect /* pfnSpectatorDisconnect() Called when spectator leaves the server */ -// #define FN_SpectatorThink SpectatorThink /* pfnSpectatorThink() Called when spectator sends a command packet (usercmd_t) */ -// #define FN_Sys_Error Sys_Error /* pfnSys_Error() Notify game .dll that engine is going to shut down. Allows mod authors to set a breakpoint. SDK2 */ -// #define FN_PM_Move PM_Move /* pfnPM_Move() (wd) SDK2 */ -// #define FN_PM_Init PM_Init /* pfnPM_Init() Server version of player movement initialization; (wd) SDK2 */ -// #define FN_PM_FindTextureType PM_FindTextureType /* pfnPM_FindTextureType() (wd) SDK2 */ -// #define FN_SetupVisibility SetupVisibility /* pfnSetupVisibility() Set up PVS and PAS for networking for this client; (wd) SDK2 */ -// #define FN_UpdateClientData UpdateClientData /* pfnUpdateClientData() Set up data sent only to specific client; (wd) SDK2 */ -// #define FN_AddToFullPack AddToFullPack /* pfnAddToFullPack() (wd) SDK2 */ -// #define FN_CreateBaseline CreateBaseline /* pfnCreateBaseline() Tweak entity baseline for network encoding allows setup of player baselines too.; (wd) SDK2 */ -// #define FN_RegisterEncoders RegisterEncoders /* pfnRegisterEncoders() Callbacks for network encoding; (wd) SDK2 */ -// #define FN_GetWeaponData GetWeaponData /* pfnGetWeaponData() (wd) SDK2 */ -// #define FN_CmdStart CmdStart /* pfnCmdStart() (wd) SDK2 */ -// #define FN_CmdEnd CmdEnd /* pfnCmdEnd() (wd) SDK2 */ -// #define FN_ConnectionlessPacket ConnectionlessPacket /* pfnConnectionlessPacket() (wd) SDK2 */ -// #define FN_GetHullBounds GetHullBounds /* pfnGetHullBounds() (wd) SDK2 */ -// #define FN_CreateInstancedBaselines CreateInstancedBaselines /* pfnCreateInstancedBaselines() (wd) SDK2 */ -// #define FN_InconsistentFile InconsistentFile /* pfnInconsistentFile() (wd) SDK2 */ -// #define FN_AllowLagCompensation AllowLagCompensation /* pfnAllowLagCompensation() (wd) SDK2 */ - -// - GetEntityAPI2_Post functions -// #define FN_GameDLLInit_Post GameDLLInit_Post -// #define FN_DispatchSpawn_Post DispatchSpawn_Post -// #define FN_DispatchThink_Post DispatchThink_Post -// #define FN_DispatchUse_Post DispatchUse_Post -// #define FN_DispatchTouch_Post DispatchTouch_Post -// #define FN_DispatchBlocked_Post DispatchBlocked_Post -// #define FN_DispatchKeyValue_Post DispatchKeyValue_Post -// #define FN_DispatchSave_Post DispatchSave_Post -// #define FN_DispatchRestore_Post DispatchRestore_Post -// #define FN_DispatchObjectCollsionBox_Post DispatchObjectCollsionBox_Post -// #define FN_SaveWriteFields_Post SaveWriteFields_Post -// #define FN_SaveReadFields_Post SaveReadFields_Post -// #define FN_SaveGlobalState_Post SaveGlobalState_Post -// #define FN_RestoreGlobalState_Post RestoreGlobalState_Post -// #define FN_ResetGlobalState_Post ResetGlobalState_Post -// #define FN_ClientConnect_Post ClientConnect_Post -// #define FN_ClientDisconnect_Post ClientDisconnect_Post -// #define FN_ClientKill_Post ClientKill_Post -// #define FN_ClientPutInServer_Post ClientPutInServer_Post -// #define FN_ClientCommand_Post ClientCommand_Post -// #define FN_ClientUserInfoChanged_Post ClientUserInfoChanged_Post -// #define FN_ServerActivate_Post ServerActivate_Post -// #define FN_ServerDeactivate_Post ServerDeactivate_Post -// #define FN_PlayerPreThink_Post PlayerPreThink_Post -// #define FN_PlayerPostThink_Post PlayerPostThink_Post -// #define FN_StartFrame_Post StartFrame_Post -// #define FN_ParmsNewLevel_Post ParmsNewLevel_Post -// #define FN_ParmsChangeLevel_Post ParmsChangeLevel_Post -// #define FN_GetGameDescription_Post GetGameDescription_Post -// #define FN_PlayerCustomization_Post PlayerCustomization_Post -// #define FN_SpectatorConnect_Post SpectatorConnect_Post -// #define FN_SpectatorDisconnect_Post SpectatorDisconnect_Post -// #define FN_SpectatorThink_Post SpectatorThink_Post -// #define FN_Sys_Error_Post Sys_Error_Post -// #define FN_PM_Move_Post PM_Move_Post -// #define FN_PM_Init_Post PM_Init_Post -// #define FN_PM_FindTextureType_Post PM_FindTextureType_Post -// #define FN_SetupVisibility_Post SetupVisibility_Post -// #define FN_UpdateClientData_Post UpdateClientData_Post -// #define FN_AddToFullPack_Post AddToFullPack_Post -// #define FN_CreateBaseline_Post CreateBaseline_Post -// #define FN_RegisterEncoders_Post RegisterEncoders_Post -// #define FN_GetWeaponData_Post GetWeaponData_Post -// #define FN_CmdStart_Post CmdStart_Post -// #define FN_CmdEnd_Post CmdEnd_Post -// #define FN_ConnectionlessPacket_Post ConnectionlessPacket_Post -// #define FN_GetHullBounds_Post GetHullBounds_Post -// #define FN_CreateInstancedBaselines_Post CreateInstancedBaselines_Post -// #define FN_InconsistentFile_Post InconsistentFile_Post -// #define FN_AllowLagCompensation_Post AllowLagCompensation_Post - -// - GetEngineAPI functions -// #define FN_PrecacheModel PrecacheModel -// #define FN_PrecacheSound PrecacheSound -// #define FN_SetModel SetModel -// #define FN_ModelIndex ModelIndex -// #define FN_ModelFrames ModelFrames -// #define FN_SetSize SetSize -// #define FN_ChangeLevel ChangeLevel -// #define FN_GetSpawnParms GetSpawnParms -// #define FN_SaveSpawnParms SaveSpawnParms -// #define FN_VecToYaw VecToYaw -// #define FN_VecToAngles VecToAngles -// #define FN_MoveToOrigin MoveToOrigin -// #define FN_ChangeYaw ChangeYaw -// #define FN_ChangePitch ChangePitch -// #define FN_FindEntityByString FindEntityByString -// #define FN_GetEntityIllum GetEntityIllum -// #define FN_FindEntityInSphere FindEntityInSphere -// #define FN_FindClientInPVS FindClientInPVS -// #define FN_EntitiesInPVS EntitiesInPVS -// #define FN_MakeVectors MakeVectors -// #define FN_AngleVectors AngleVectors -// #define FN_CreateEntity CreateEntity -// #define FN_RemoveEntity RemoveEntity -// #define FN_CreateNamedEntity CreateNamedEntity -// #define FN_MakeStatic MakeStatic -// #define FN_EntIsOnFloor EntIsOnFloor -// #define FN_DropToFloor DropToFloor -// #define FN_WalkMove WalkMove -// #define FN_SetOrigin SetOrigin -// #define FN_EmitSound EmitSound -// #define FN_EmitAmbientSound EmitAmbientSound -// #define FN_TraceLine TraceLine -// #define FN_TraceToss TraceToss -// #define FN_TraceMonsterHull TraceMonsterHull -// #define FN_TraceHull TraceHull -// #define FN_TraceModel TraceModel -// #define FN_TraceTexture TraceTexture -// #define FN_TraceSphere TraceSphere -// #define FN_GetAimVector GetAimVector -// #define FN_ServerCommand ServerCommand -// #define FN_ServerExecute ServerExecute -// #define FN_engClientCommand engClientCommand -// #define FN_ParticleEffect ParticleEffect -// #define FN_LightStyle LightStyle -// #define FN_DecalIndex DecalIndex -// #define FN_PointContents PointContents -// #define FN_MessageBegin MessageBegin -// #define FN_MessageEnd MessageEnd -// #define FN_WriteByte WriteByte -// #define FN_WriteChar WriteChar -// #define FN_WriteShort WriteShort -// #define FN_WriteLong WriteLong -// #define FN_WriteAngle WriteAngle -// #define FN_WriteCoord WriteCoord -// #define FN_WriteString WriteString -// #define FN_WriteEntity WriteEntity -// #define FN_CVarRegister CVarRegister -// #define FN_CVarGetFloat CVarGetFloat -// #define FN_CVarGetString CVarGetString -// #define FN_CVarSetFloat CVarSetFloat -// #define FN_CVarSetString CVarSetString -// #define FN_AlertMessage AlertMessage -// #define FN_EngineFprintf EngineFprintf -// #define FN_PvAllocEntPrivateData PvAllocEntPrivateData -// #define FN_PvEntPrivateData PvEntPrivateData -// #define FN_FreeEntPrivateData FreeEntPrivateData -// #define FN_SzFromIndex SzFromIndex -// #define FN_AllocString AllocString -// #define FN_GetVarsOfEnt GetVarsOfEnt -// #define FN_PEntityOfEntOffset PEntityOfEntOffset -// #define FN_EntOffsetOfPEntity EntOffsetOfPEntity -// #define FN_IndexOfEdict IndexOfEdict -// #define FN_PEntityOfEntIndex PEntityOfEntIndex -// #define FN_FindEntityByVars FindEntityByVars -// #define FN_GetModelPtr GetModelPtr -// #define FN_RegUserMsg RegUserMsg -// #define FN_AnimationAutomove AnimationAutomove -// #define FN_GetBonePosition GetBonePosition -// #define FN_FunctionFromName FunctionFromName -// #define FN_NameForFunction NameForFunction -// #define FN_ClientPrintf ClientPrintf -// #define FN_ServerPrint ServerPrint -// #define FN_Cmd_Args Cmd_Args -// #define FN_Cmd_Argv Cmd_Argv -// #define FN_Cmd_Argc Cmd_Argc -// #define FN_GetAttachment GetAttachment -// #define FN_CRC32_Init CRC32_Init -// #define FN_CRC32_ProcessBuffer CRC32_ProcessBuffer -// #define FN_CRC32_ProcessByte CRC32_ProcessByte -// #define FN_CRC32_Final CRC32_Final -// #define FN_RandomLong RandomLong -// #define FN_RandomFloat RandomFloat -// #define FN_SetView SetView -// #define FN_Time Time -// #define FN_CrosshairAngle CrosshairAngle -// #define FN_LoadFileForMe LoadFileForMe -// #define FN_FreeFile FreeFile -// #define FN_EndSection EndSection -// #define FN_CompareFileTime CompareFileTime -// #define FN_GetGameDir GetGameDir -// #define FN_Cvar_RegisterVariable Cvar_RegisterVariable -// #define FN_FadeClientVolume FadeClientVolume -// #define FN_SetClientMaxspeed SetClientMaxspeed -// #define FN_CreateFakeClient CreateFakeClient -// #define FN_RunPlayerMove RunPlayerMove -// #define FN_NumberOfEntities NumberOfEntities -// #define FN_GetInfoKeyBuffer GetInfoKeyBuffer -// #define FN_InfoKeyValue InfoKeyValue -// #define FN_SetKeyValue SetKeyValue -// #define FN_SetClientKeyValue SetClientKeyValue -// #define FN_IsMapValid IsMapValid -// #define FN_StaticDecal StaticDecal -// #define FN_PrecacheGeneric PrecacheGeneric -// #define FN_GetPlayerUserId GetPlayerUserId -// #define FN_BuildSoundMsg BuildSoundMsg -// #define FN_IsDedicatedServer IsDedicatedServer -// #define FN_CVarGetPointer CVarGetPointer -// #define FN_GetPlayerWONId GetPlayerWONId -// #define FN_Info_RemoveKey Info_RemoveKey -// #define FN_GetPhysicsKeyValue GetPhysicsKeyValue -// #define FN_SetPhysicsKeyValue SetPhysicsKeyValue -// #define FN_GetPhysicsInfoString GetPhysicsInfoString -// #define FN_PrecacheEvent PrecacheEvent -// #define FN_PlaybackEvent PlaybackEvent -// #define FN_SetFatPVS SetFatPVS -// #define FN_SetFatPAS SetFatPAS -// #define FN_CheckVisibility CheckVisibility -// #define FN_DeltaSetField DeltaSetField -// #define FN_DeltaUnsetField DeltaUnsetField -// #define FN_DeltaAddEncoder DeltaAddEncoder -// #define FN_GetCurrentPlayer GetCurrentPlayer -// #define FN_CanSkipPlayer CanSkipPlayer -// #define FN_DeltaFindField DeltaFindField -// #define FN_DeltaSetFieldByIndex DeltaSetFieldByIndex -// #define FN_DeltaUnsetFieldByIndex DeltaUnsetFieldByIndex -// #define FN_SetGroupMask SetGroupMask -// #define FN_engCreateInstancedBaseline engCreateInstancedBaseline -// #define FN_Cvar_DirectSet Cvar_DirectSet -// #define FN_ForceUnmodified ForceUnmodified -// #define FN_GetPlayerStats GetPlayerStats -// #define FN_AddServerCommand AddServerCommand -// #define FN_Voice_GetClientListening Voice_GetClientListening -// #define FN_Voice_SetClientListening Voice_SetClientListening -// #define FN_GetPlayerAuthId GetPlayerAuthId - -// - GetEngineAPI_Post functions -// #define FN_PrecacheModel_Post PrecacheModel_Post -// #define FN_PrecacheSound_Post PrecacheSound_Post -// #define FN_SetModel_Post SetModel_Post -// #define FN_ModelIndex_Post ModelIndex_Post -// #define FN_ModelFrames_Post ModelFrames_Post -// #define FN_SetSize_Post SetSize_Post -// #define FN_ChangeLevel_Post ChangeLevel_Post -// #define FN_GetSpawnParms_Post GetSpawnParms_Post -// #define FN_SaveSpawnParms_Post SaveSpawnParms_Post -// #define FN_VecToYaw_Post VecToYaw_Post -// #define FN_VecToAngles_Post VecToAngles_Post -// #define FN_MoveToOrigin_Post MoveToOrigin_Post -// #define FN_ChangeYaw_Post ChangeYaw_Post -// #define FN_ChangePitch_Post ChangePitch_Post -// #define FN_FindEntityByString_Post FindEntityByString_Post -// #define FN_GetEntityIllum_Post GetEntityIllum_Post -// #define FN_FindEntityInSphere_Post FindEntityInSphere_Post -// #define FN_FindClientInPVS_Post FindClientInPVS_Post -// #define FN_EntitiesInPVS_Post EntitiesInPVS_Post -// #define FN_MakeVectors_Post MakeVectors_Post -// #define FN_AngleVectors_Post AngleVectors_Post -// #define FN_CreateEntity_Post CreateEntity_Post -// #define FN_RemoveEntity_Post RemoveEntity_Post -// #define FN_CreateNamedEntity_Post CreateNamedEntity_Post -// #define FN_MakeStatic_Post MakeStatic_Post -// #define FN_EntIsOnFloor_Post EntIsOnFloor_Post -// #define FN_DropToFloor_Post DropToFloor_Post -// #define FN_WalkMove_Post WalkMove_Post -// #define FN_SetOrigin_Post SetOrigin_Post -// #define FN_EmitSound_Post EmitSound_Post -// #define FN_EmitAmbientSound_Post EmitAmbientSound_Post -// #define FN_TraceLine_Post TraceLine_Post -// #define FN_TraceToss_Post TraceToss_Post -// #define FN_TraceMonsterHull_Post TraceMonsterHull_Post -// #define FN_TraceHull_Post TraceHull_Post -// #define FN_TraceModel_Post TraceModel_Post -// #define FN_TraceTexture_Post TraceTexture_Post -// #define FN_TraceSphere_Post TraceSphere_Post -// #define FN_GetAimVector_Post GetAimVector_Post -// #define FN_ServerCommand_Post ServerCommand_Post -// #define FN_ServerExecute_Post ServerExecute_Post -// #define FN_engClientCommand_Post engClientCommand_Post -// #define FN_ParticleEffect_Post ParticleEffect_Post -// #define FN_LightStyle_Post LightStyle_Post -// #define FN_DecalIndex_Post DecalIndex_Post -// #define FN_PointContents_Post PointContents_Post -// #define FN_MessageBegin_Post MessageBegin_Post -// #define FN_MessageEnd_Post MessageEnd_Post -// #define FN_WriteByte_Post WriteByte_Post -// #define FN_WriteChar_Post WriteChar_Post -// #define FN_WriteShort_Post WriteShort_Post -// #define FN_WriteLong_Post WriteLong_Post -// #define FN_WriteAngle_Post WriteAngle_Post -// #define FN_WriteCoord_Post WriteCoord_Post -// #define FN_WriteString_Post WriteString_Post -// #define FN_WriteEntity_Post WriteEntity_Post -// #define FN_CVarRegister_Post CVarRegister_Post -// #define FN_CVarGetFloat_Post CVarGetFloat_Post -// #define FN_CVarGetString_Post CVarGetString_Post -// #define FN_CVarSetFloat_Post CVarSetFloat_Post -// #define FN_CVarSetString_Post CVarSetString_Post -// #define FN_AlertMessage_Post AlertMessage_Post -// #define FN_EngineFprintf_Post EngineFprintf_Post -// #define FN_PvAllocEntPrivateData_Post PvAllocEntPrivateData_Post -// #define FN_PvEntPrivateData_Post PvEntPrivateData_Post -// #define FN_FreeEntPrivateData_Post FreeEntPrivateData_Post -// #define FN_SzFromIndex_Post SzFromIndex_Post -// #define FN_AllocString_Post AllocString_Post -// #define FN_GetVarsOfEnt_Post GetVarsOfEnt_Post -// #define FN_PEntityOfEntOffset_Post PEntityOfEntOffset_Post -// #define FN_EntOffsetOfPEntity_Post EntOffsetOfPEntity_Post -// #define FN_IndexOfEdict_Post IndexOfEdict_Post -// #define FN_PEntityOfEntIndex_Post PEntityOfEntIndex_Post -// #define FN_FindEntityByVars_Post FindEntityByVars_Post -// #define FN_GetModelPtr_Post GetModelPtr_Post -// #define FN_RegUserMsg_Post RegUserMsg_Post -// #define FN_AnimationAutomove_Post AnimationAutomove_Post -// #define FN_GetBonePosition_Post GetBonePosition_Post -// #define FN_FunctionFromName_Post FunctionFromName_Post -// #define FN_NameForFunction_Post NameForFunction_Post -// #define FN_ClientPrintf_Post ClientPrintf_Post -// #define FN_ServerPrint_Post ServerPrint_Post -// #define FN_Cmd_Args_Post Cmd_Args_Post -// #define FN_Cmd_Argv_Post Cmd_Argv_Post -// #define FN_Cmd_Argc_Post Cmd_Argc_Post -// #define FN_GetAttachment_Post GetAttachment_Post -// #define FN_CRC32_Init_Post CRC32_Init_Post -// #define FN_CRC32_ProcessBuffer_Post CRC32_ProcessBuffer_Post -// #define FN_CRC32_ProcessByte_Post CRC32_ProcessByte_Post -// #define FN_CRC32_Final_Post CRC32_Final_Post -// #define FN_RandomLong_Post RandomLong_Post -// #define FN_RandomFloat_Post RandomFloat_Post -// #define FN_SetView_Post SetView_Post -// #define FN_Time_Post Time_Post -// #define FN_CrosshairAngle_Post CrosshairAngle_Post -// #define FN_LoadFileForMe_Post LoadFileForMe_Post -// #define FN_FreeFile_Post FreeFile_Post -// #define FN_EndSection_Post EndSection_Post -// #define FN_CompareFileTime_Post CompareFileTime_Post -// #define FN_GetGameDir_Post GetGameDir_Post -// #define FN_Cvar_RegisterVariable_Post Cvar_RegisterVariable_Post -// #define FN_FadeClientVolume_Post FadeClientVolume_Post -// #define FN_SetClientMaxspeed_Post SetClientMaxspeed_Post -// #define FN_CreateFakeClient_Post CreateFakeClient_Post -// #define FN_RunPlayerMove_Post RunPlayerMove_Post -// #define FN_NumberOfEntities_Post NumberOfEntities_Post -// #define FN_GetInfoKeyBuffer_Post GetInfoKeyBuffer_Post -// #define FN_InfoKeyValue_Post InfoKeyValue_Post -// #define FN_SetKeyValue_Post SetKeyValue_Post -// #define FN_SetClientKeyValue_Post SetClientKeyValue_Post -// #define FN_IsMapValid_Post IsMapValid_Post -// #define FN_StaticDecal_Post StaticDecal_Post -// #define FN_PrecacheGeneric_Post PrecacheGeneric_Post -// #define FN_GetPlayerUserId_Post GetPlayerUserId_Post -// #define FN_BuildSoundMsg_Post BuildSoundMsg_Post -// #define FN_IsDedicatedServer_Post IsDedicatedServer_Post -// #define FN_CVarGetPointer_Post CVarGetPointer_Post -// #define FN_GetPlayerWONId_Post GetPlayerWONId_Post -// #define FN_Info_RemoveKey_Post Info_RemoveKey_Post -// #define FN_GetPhysicsKeyValue_Post GetPhysicsKeyValue_Post -// #define FN_SetPhysicsKeyValue_Post SetPhysicsKeyValue_Post -// #define FN_GetPhysicsInfoString_Post GetPhysicsInfoString_Post -// #define FN_PrecacheEvent_Post PrecacheEvent_Post -// #define FN_PlaybackEvent_Post PlaybackEvent_Post -// #define FN_SetFatPVS_Post SetFatPVS_Post -// #define FN_SetFatPAS_Post SetFatPAS_Post -// #define FN_CheckVisibility_Post CheckVisibility_Post -// #define FN_DeltaSetField_Post DeltaSetField_Post -// #define FN_DeltaUnsetField_Post DeltaUnsetField_Post -// #define FN_DeltaAddEncoder_Post DeltaAddEncoder_Post -// #define FN_GetCurrentPlayer_Post GetCurrentPlayer_Post -// #define FN_CanSkipPlayer_Post CanSkipPlayer_Post -// #define FN_DeltaFindField_Post DeltaFindField_Post -// #define FN_DeltaSetFieldByIndex_Post DeltaSetFieldByIndex_Post -// #define FN_DeltaUnsetFieldByIndex_Post DeltaUnsetFieldByIndex_Post -// #define FN_SetGroupMask_Post SetGroupMask_Post -// #define FN_engCreateInstancedBaseline_Post engCreateInstancedBaseline_Post -// #define FN_Cvar_DirectSet_Post Cvar_DirectSet_Post -// #define FN_ForceUnmodified_Post ForceUnmodified_Post -// #define FN_GetPlayerStats_Post GetPlayerStats_Post -// #define FN_AddServerCommand_Post AddServerCommand_Post -// #define FN_Voice_GetClientListening_Post Voice_GetClientListening_Post -// #define FN_Voice_SetClientListening_Post Voice_SetClientListening_Post -// #define FN_GetPlayerAuthId_Post GetPlayerAuthId_Post - -// #define FN_OnFreeEntPrivateData OnFreeEntPrivateData -// #define FN_GameShutdown GameShutdown -// #define FN_ShouldCollide ShouldCollide - -// #define FN_OnFreeEntPrivateData_Post OnFreeEntPrivateData_Post -// #define FN_GameShutdown_Post GameShutdown_Post -// #define FN_ShouldCollide_Post ShouldCollide_Post - - -#endif // USE_METAMOD - -#endif // __MODULECONFIG_H__ \ No newline at end of file diff --git a/editor/editor2/AMX.ico b/editor/editor2/AMX.ico deleted file mode 100755 index a530d9e1..00000000 Binary files a/editor/editor2/AMX.ico and /dev/null differ diff --git a/editor/editor2/AMXX_Edit_v2.cfg b/editor/editor2/AMXX_Edit_v2.cfg deleted file mode 100755 index 662b86fe..00000000 --- a/editor/editor2/AMXX_Edit_v2.cfg +++ /dev/null @@ -1,38 +0,0 @@ --$A8 --$B- --$C+ --$D+ --$E- --$F- --$G+ --$H+ --$I+ --$J- --$K- --$L+ --$M- --$N+ --$O+ --$P+ --$Q- --$R- --$S- --$T- --$U- --$V+ --$W- --$X+ --$YD --$Z1 --cg --AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; --H+ --W+ --M --$M16384,1048576 --K$00400000 --LE"c:\programme\borland\delphi7\Projects\Bpl" --LN"c:\programme\borland\delphi7\Projects\Bpl" --w-UNSAFE_TYPE --w-UNSAFE_CODE --w-UNSAFE_CAST diff --git a/editor/editor2/AMXX_Edit_v2.dof b/editor/editor2/AMXX_Edit_v2.dof deleted file mode 100755 index b626f751..00000000 --- a/editor/editor2/AMXX_Edit_v2.dof +++ /dev/null @@ -1,136 +0,0 @@ -[FileVersion] -Version=7.0 -[Compiler] -A=8 -B=0 -C=1 -D=1 -E=0 -F=0 -G=1 -H=1 -I=1 -J=0 -K=0 -L=1 -M=0 -N=1 -O=1 -P=1 -Q=0 -R=0 -S=0 -T=0 -U=0 -V=1 -W=0 -X=1 -Y=1 -Z=1 -ShowHints=1 -ShowWarnings=1 -UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; -NamespacePrefix= -SymbolDeprecated=1 -SymbolLibrary=1 -SymbolPlatform=1 -UnitLibrary=1 -UnitPlatform=1 -UnitDeprecated=1 -HResultCompat=1 -HidingMember=1 -HiddenVirtual=1 -Garbage=1 -BoundsError=1 -ZeroNilCompat=1 -StringConstTruncated=1 -ForLoopVarVarPar=1 -TypedConstVarPar=1 -AsgToTypedConst=1 -CaseLabelRange=1 -ForVariable=1 -ConstructingAbstract=1 -ComparisonFalse=1 -ComparisonTrue=1 -ComparingSignedUnsigned=1 -CombiningSignedUnsigned=1 -UnsupportedConstruct=1 -FileOpen=1 -FileOpenUnitSrc=1 -BadGlobalSymbol=1 -DuplicateConstructorDestructor=1 -InvalidDirective=1 -PackageNoLink=1 -PackageThreadVar=1 -ImplicitImport=1 -HPPEMITIgnored=1 -NoRetVal=1 -UseBeforeDef=1 -ForLoopVarUndef=1 -UnitNameMismatch=1 -NoCFGFileFound=1 -MessageDirective=1 -ImplicitVariants=1 -UnicodeToLocale=1 -LocaleToUnicode=1 -ImagebaseMultiple=1 -SuspiciousTypecast=1 -PrivatePropAccessor=1 -UnsafeType=0 -UnsafeCode=0 -UnsafeCast=0 -[Linker] -MapFile=0 -OutputObjs=0 -ConsoleApp=1 -DebugInfo=0 -RemoteSymbols=0 -MinStackSize=16384 -MaxStackSize=1048576 -ImageBase=4194304 -ExeDescription= -[Directories] -OutputDir= -UnitOutputDir= -PackageDLLOutputDir= -PackageDCPOutputDir= -SearchPath= -Packages=vcl;rtl;vclx;vclie;xmlrtl;inetdbbde;inet;inetdbxpress;VclSmp;dbrtl;dbexpress;vcldb;dsnap;dbxcds;inetdb;bdertl;vcldbx;adortl;teeui;teedb;tee;ibxpress;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;Rave50CLX;Rave50VCL;dclOffice2k;JvStdCtrlsD7R;JvAppFrmD7R;JvCoreD7R;JvBandsD7R;JvBDED7R;JvDBD7R;JvDlgsD7R;JvCmpD7R;JvCryptD7R;JvCtrlsD7R;JvCustomD7R;JvDockingD7R;JvDotNetCtrlsD7R;JvEDID7R;qrpt;JvGlobusD7R;JvHMID7R;JvInspectorD7R;JvInterpreterD7R;JvJansD7R;JvManagedThreadsD7R;JvMMD7R;JvNetD7R;JvPageCompsD7R;JvPluginD7R;JvPrintPreviewD7R;JvSystemD7R;JvTimeFrameworkD7R;JvUIBD7R;JvValidatorsD7R;JvWizardD7R;JvXPCtrlsD7R;Indy70;FlatStyle_D5;CrossKylix;DJcl;DelphiX_for7 -Conditionals= -DebugSourceDirs= -UsePackages=0 -[Parameters] -RunParams= -HostApplication= -Launcher= -UseLauncher=0 -DebugCWD= -[Language] -ActiveLang= -ProjectLang= -RootDir= -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=1 -MajorVer=2 -MinorVer=1 -Release=0 -Build=6 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1031 -CodePage=1252 -[Version Info Keys] -CompanyName=AMX Mod X -FileDescription=Final -FileVersion=2.1.0.6 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName=AMXX-Edit v2 -ProductVersion=2.1.0.0 -Comments= diff --git a/editor/editor2/AMXX_Edit_v2.dpr b/editor/editor2/AMXX_Edit_v2.dpr deleted file mode 100755 index 7129cba4..00000000 --- a/editor/editor2/AMXX_Edit_v2.dpr +++ /dev/null @@ -1,76 +0,0 @@ -program AMXX_Edit_v2; - -{ - AMXX-Edit v2 - - Editor for AMX Mod X scripts, coded by Basic-Master - © by AMX Mod X Development Team - - This application uses the following components: - - DelphiSci: delphisci.sourceforge.net (based on Scintilla library: scintilla.sourceforge.net) - FlatStyle by Maik Porkert (found on www.torry.net) - GlyFX Icons: www.glyfx.com (using GlyFX Icon Pack of Delphi 2005 PE) - Modified CorelButton (see CorelButton.pas, original by ConquerWare) - Indy 9 Socket Components: www.indyproject.org - [JEDI component library, only necersarry for Exception Dialog (jvcl.sourceforge.net)] - - AMXX-Edit v2 is published under GNU General Public License and comes - with ABSOLUTELY NO WARRANTY (see GPL.txt for more information) -} - - -//{$DEFINE EXCEPTION_DEBUG} // Remove comments only when you want to trace exceptions - -uses - Forms, - Windows, - Classes, - SysUtils, - UnitfrmMain in 'UnitfrmMain.pas' {frmMain}, - UnitfrmOptions in 'UnitfrmOptions.pas' {frmSettings}, - UnitfrmDebug in 'UnitfrmDebug.pas' {frmDebug}, - UnitFunc in 'UnitFunc.pas', - UnitfrmAbout in 'UnitfrmAbout.pas' {frmAbout}, - UnitfrmGoToLine in 'UnitfrmGoToLine.pas' {frmGoToLine}, - UnitfrmSaveDialog in 'UnitfrmSaveDialog.pas' {frmSaveDialog}, - UnitTextAnalyze in 'UnitTextAnalyze.pas', - UnitfrmMenuMaker in 'UnitfrmMenuMaker.pas' {frmMenuMaker}, - UnitAddMenu in 'UnitAddMenu.pas', - UnitfrmSelectMenu in 'UnitfrmSelectMenu.pas' {frmSelectMenu}, - UnitHowToMakePlayerMenu in 'UnitHowToMakePlayerMenu.pas' {frmHowToMakePlayerMenu}, - UnitfrmSockets in 'UnitfrmSockets.pas' {frmSocketTerminal}, - UnitReadThread in 'UnitReadThread.pas', - UnitfrmLoopGenerator in 'UnitfrmLoopGenerator.pas' {frmLoopGenerator}, - UnitfrmExceptionHandler in 'UnitfrmExceptionHandler.pas' {ExceptionDialog}; - -{$R *.res} - -var i: integer; -begin - if (FindWindow('TfrmMain', 'AMXX-Edit v2') <> 0) then begin // Don't allow 2 starts... - for i := 1 to ParamCount do begin - if FileExists(ParamStr(i)) then - SendOpen(ParamStr(i)); // ... and send open message to the other app - end; - ShowWindow(FindWindow('TfrmMain', 'AMXX-Edit v2'), SW_SHOW); - SetForegroundWindow(FindWindow('TfrmMain', 'AMXX-Edit v2')); - exit; - end; - Application.Initialize; - Application.Title := 'AMXX-Edit v2'; - Application.CreateForm(TfrmMain, frmMain); - Application.CreateForm(TfrmSettings, frmSettings); - Application.CreateForm(TfrmDebug, frmDebug); - Application.CreateForm(TfrmAbout, frmAbout); - Application.CreateForm(TfrmGoToLine, frmGoToLine); - Application.CreateForm(TfrmSaveDialog, frmSaveDialog); - Application.CreateForm(TfrmMenuMaker, frmMenuMaker); - Application.CreateForm(TfrmSelectMenu, frmSelectMenu); - Application.CreateForm(TfrmHowToMakePlayerMenu, frmHowToMakePlayerMenu); - Application.CreateForm(TfrmSocketTerminal, frmSocketTerminal); - Application.CreateForm(TfrmLoopGenerator, frmLoopGenerator); - Load; - Apply; - Application.Run; -end. diff --git a/editor/editor2/AMXX_Edit_v2.exe b/editor/editor2/AMXX_Edit_v2.exe deleted file mode 100755 index 6382cf16..00000000 Binary files a/editor/editor2/AMXX_Edit_v2.exe and /dev/null differ diff --git a/editor/editor2/AMXX_Edit_v2.res b/editor/editor2/AMXX_Edit_v2.res deleted file mode 100755 index 88ca287c..00000000 Binary files a/editor/editor2/AMXX_Edit_v2.res and /dev/null differ diff --git a/editor/editor2/CorelButton.dcr b/editor/editor2/CorelButton.dcr deleted file mode 100755 index ef31d5d3..00000000 Binary files a/editor/editor2/CorelButton.dcr and /dev/null differ diff --git a/editor/editor2/CorelButton.pas b/editor/editor2/CorelButton.pas deleted file mode 100755 index ba1ff51d..00000000 --- a/editor/editor2/CorelButton.pas +++ /dev/null @@ -1,300 +0,0 @@ -(** - * TCorelButton v1.0 - * --------------------------------------------------------------------------- - * A standard TButton which mimic the buttons used in the new Corel products - * (e.g. WordPerfect Suite and Corel Photopaint). - * - * Copyright 1998, Peter Theill. All Rights Reserved. - * - * This component can be freely used and distributed in commercial and private - * environments, provied this notice is not modified in any way and there is - * no charge for it other than nomial handling fees. Contact me directly for - * modifications to this agreement. - * ---------------------------------------------------------------------------- - * Feel free to contact me if you have any questions, comments or suggestions - * at peter@conquerware.dk - * - * The latest version will always be available on the web at: - * http://www.conquerware.dk/delphi/ - * - * See CorelButton.txt for notes, known issues and revision history. - * ---------------------------------------------------------------------------- - * Last modified: September 6, 1998 - * ---------------------------------------------------------------------------- - *) -unit CorelButton; - -interface - -uses - Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, - StdCtrls; - -type - TCorelButton = class(TButton) - private - FCanvas: TCanvas; - IsFocused: Boolean; - - FIsMouseOver: Boolean; - FCanSelect: Boolean; - - procedure CNMeasureItem(var Msg: TWMMeasureItem); message CN_MEASUREITEM; - procedure CNDrawItem(var Msg: TWMDrawItem); message CN_DRAWITEM; - procedure CMFontChanged(var Message: TMessage); message CM_FONTCHANGED; - procedure CMEnabledChanged(var Message: TMessage); message CM_ENABLEDCHANGED; - procedure WMLButtonDblClk(var Message: TWMLButtonDblClk); message WM_LBUTTONDBLCLK; - - procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER; - procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE; - - procedure DrawItem(const DrawItemStruct: TDrawItemStruct); - procedure SetCanSelect(const Value: Boolean); - - protected - procedure CreateParams(var Params: TCreateParams); override; - - procedure SetButtonStyle(ADefault: Boolean); override; - - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - published - property CanSelect: Boolean read FCanSelect write SetCanSelect default True; - - end; - -procedure Register; - -implementation - -constructor TCorelButton.Create(AOwner: TComponent); -begin - - { Do standard stuff } - inherited Create(AOwner); - - FCanvas := TCanvas.Create; - - FIsMouseOver := False; - - { Set width and height of button } - Width := 75; - Height := 23; - -end; - -destructor TCorelButton.Destroy; -begin - FCanvas.Free; - - inherited Destroy; -end; - -procedure TCorelButton.CMMouseEnter(var Message: TMessage); -begin - - if (not FIsMouseOver) then - Invalidate; - -end; - -procedure TCorelButton.CMMouseLeave(var Message: TMessage); -begin - - if (FIsMouseOver) then - Invalidate; - -end; - -procedure TCorelButton.CNMeasureItem(var Msg: TWMMeasureItem); -begin - with Msg.MeasureItemStruct^ do begin - itemWidth := Width; - itemHeight := Height; - end; - Msg.Result := 1; -end; - -procedure TCorelButton.CNDrawItem(var Msg: TWMDrawItem); -begin - DrawItem(Msg.DrawItemStruct^); - Msg.Result := 1; -end; - -procedure TCorelButton.DrawItem(const DrawItemStruct: TDrawItemStruct); -var - IsDown, IsDefault: Boolean; - R: TRect; -// Flags: Longint; - CursorPos: TPoint; - BtnRect: TRect; - -begin - - FCanvas.Handle := DrawItemStruct.hDC; - try - R := ClientRect; - - with DrawItemStruct do begin - IsDown := (itemState and ODS_SELECTED) <> 0; - IsDefault := (itemState and ODS_FOCUS) <> 0; - end; - - GetCursorPos(CursorPos); - BtnRect.TopLeft := Parent.ClientToScreen(Point(Left, Top)); - BtnRect.BottomRight := Parent.ClientToScreen(Point(Left + Width, - Top + Height)); - FIsMouseOver := PtInRect(BtnRect, CursorPos); - -// Flags := DFCS_BUTTONPUSH or DFCS_ADJUSTRECT; -// if IsDown then Flags := Flags or DFCS_PUSHED; -// if DrawItemStruct.itemState and ODS_DISABLED <> 0 then -// Flags := Flags or DFCS_INACTIVE; - - FCanvas.Brush.Color := clBtnFace; - - if {(csDesigning in ComponentState) OR} (IsDefault) or (FCanSelect) and (IsFocused) then begin - - FCanvas.Pen.Color := clWindowText; - FCanvas.Pen.Width := 1; - FCanvas.Brush.Style := bsSolid; - FCanvas.Rectangle(R.Left, R.Top, R.Right, R.Bottom); - - InflateRect(R, -1, -1); - - end; - - FCanvas.FillRect(R); - - if (csDesigning in ComponentState) OR (FIsMouseOver) then begin - - FCanvas.Pen.Color := clWindowText; - FCanvas.MoveTo(R.Right-1, R.Top); - FCanvas.LineTo(R.Right-1, R.Bottom-1); - FCanvas.LineTo(R.Left-1, R.Bottom-1); - - FCanvas.Pen.Color := clBtnHighlight; - FCanvas.MoveTo(R.Left, R.Bottom-2); - FCanvas.LineTo(R.Left, R.Top); - FCanvas.LineTo(R.Right-1, R.Top); - - FCanvas.Pen.Color := clBtnShadow; - FCanvas.MoveTo(R.Right-2, R.Top+1); - FCanvas.LineTo(R.Right-2, R.Bottom-2); - FCanvas.LineTo(R.Left, R.Bottom-2); - - end else begin - - FCanvas.Pen.Color := clBtnHighlight; - FCanvas.Pen.Width := 1; - FCanvas.MoveTo(R.Left, R.Bottom-2); - FCanvas.LineTo(R.Left, R.Top); - FCanvas.LineTo(R.Right-1, R.Top); - - FCanvas.Pen.Color := clBtnShadow; - FCanvas.LineTo(R.Right-1, R.Bottom-1); - FCanvas.LineTo(R.Left-1, R.Bottom-1); - - end; - - if {(csDesigning in ComponentState) OR} (IsDown) then begin - - FCanvas.Brush.Color := clBtnFace; - FCanvas.FillRect(R); - - FCanvas.Pen.Color := clBtnShadow; - FCanvas.Pen.Width := 1; - FCanvas.MoveTo(R.Left, R.Bottom-2); - FCanvas.LineTo(R.Left, R.Top); - FCanvas.LineTo(R.Right-1, R.Top); - - FCanvas.Pen.Color := clBtnHighlight; - FCanvas.LineTo(R.Right-1, R.Bottom-1); - FCanvas.LineTo(R.Left-1, R.Bottom-1); - - end; - - if {(csDesigning in ComponentState) OR} (IsFocused) and (IsDefault) and (FCanSelect) then begin - - InflateRect(R, -3, -3); - FCanvas.Pen.Color := clWindowFrame; - FCanvas.Brush.Color := clBtnFace; - DrawFocusRect(FCanvas.Handle, R); - - end; - - if (IsDown) then - OffsetRect(R, 1, 1); - - { Draw caption of button } - with FCanvas do begin - FCanvas.Font := Self.Font; - Brush.Style := bsClear; - Font.Color := clBtnText; - if Enabled or ((DrawItemStruct.itemState and ODS_DISABLED) = 0) then begin - DrawText(Handle, PChar(Caption), Length(Caption), R, DT_CENTER or - DT_VCENTER or DT_SINGLELINE); - end else begin - OffsetRect(R, 1, 1); - Font.Color := clBtnHighlight; - DrawText(Handle, PChar(Caption), Length(Caption), R, DT_CENTER or - DT_VCENTER or DT_SINGLELINE); - OffsetRect(R, -1, -1); - Font.Color := clBtnShadow; - DrawText(Handle, PChar(Caption), Length(Caption), R, DT_CENTER or - DT_VCENTER or DT_SINGLELINE); - end; - end; - - finally - FCanvas.Handle := 0; - end; -end; - -procedure TCorelButton.CMFontChanged(var Message: TMessage); -begin - inherited; - Invalidate; -end; - -procedure TCorelButton.CMEnabledChanged(var Message: TMessage); -begin - inherited; - Invalidate; -end; - -procedure TCorelButton.WMLButtonDblClk(var Message: TWMLButtonDblClk); -begin - Perform(WM_LBUTTONDOWN, Message.Keys, Longint(Message.Pos)); -end; - -procedure TCorelButton.SetButtonStyle(ADefault: Boolean); -begin - - if ADefault <> IsFocused then begin - IsFocused := ADefault; - Refresh; - end; -end; - -procedure TCorelButton.CreateParams(var Params: TCreateParams); -begin - inherited CreateParams(Params); - Params.Style := Params.Style OR BS_OWNERDRAW; -end; - - -procedure Register; -begin - RegisterComponents('Standard', [TCorelButton]); -end; - -procedure TCorelButton.SetCanSelect(const Value: Boolean); -begin - FCanSelect := Value; - Repaint; -end; - -end. diff --git a/editor/editor2/Grey.ico b/editor/editor2/Grey.ico deleted file mode 100755 index 5305fa71..00000000 Binary files a/editor/editor2/Grey.ico and /dev/null differ diff --git a/editor/editor2/Logo.jpg b/editor/editor2/Logo.jpg deleted file mode 100755 index dd5f935e..00000000 Binary files a/editor/editor2/Logo.jpg and /dev/null differ diff --git a/editor/editor2/Red.ico b/editor/editor2/Red.ico deleted file mode 100755 index eab9062d..00000000 Binary files a/editor/editor2/Red.ico and /dev/null differ diff --git a/editor/editor2/SciLexer.dll b/editor/editor2/SciLexer.dll deleted file mode 100755 index dfa9e1dc..00000000 Binary files a/editor/editor2/SciLexer.dll and /dev/null differ diff --git a/editor/editor2/UnitAddMenu.pas b/editor/editor2/UnitAddMenu.pas deleted file mode 100755 index 8dc4e60c..00000000 --- a/editor/editor2/UnitAddMenu.pas +++ /dev/null @@ -1,436 +0,0 @@ -unit UnitAddMenu; - -interface - -uses SysUtils, Classes, Graphics, Dialogs, Windows; - -function AddMenu: Boolean; -function AddPlayerMenu: Boolean; -function GetFirst(eStart: String; eSearchMain: Boolean): Integer; -function GetLast(eStart: String; eSearchMain: Boolean): Integer; -function AddIfDoesntExist(eInclude: String): Boolean; - -implementation - -uses UnitfrmMenuMaker, UnitfrmMain, UnitTextAnalyze, UnitFunc; - -{ Normal Menu } - -function AddMenu: Boolean; -var eColoredMenu, DefinedKeys: String; - i: integer; - eStr: TStringList; -begin - Result := GetFirst('public Show' + frmMenuMaker.txtMenuName.Text, True) = -1; - if not Result then - exit; - - eStr := TStringList.Create; - { Transform text } - eColoredMenu := frmMenuMaker.GetColoredMenu; - if frmMenuMaker.chkAppendOnlyMenuText.Checked then begin - frmMain.sciEditor.Lines.Add('// Created menu: ' + eColoredMenu); - exit; - end; - { Add functions } - eStr.Add(Format('public Show%s(id) {', [frmMenuMaker.txtMenuName.Text])); - eStr.Add(' show_menu(id, Keys' + frmMenuMaker.txtMenuName.Text + ', "' + eColoredMenu + '", -1, "' + frmMenuMaker.txtMenuName.Text + '")'); - if frmMenuMaker.chkAddComment.Checked then - eStr[eStr.Count -1] := eStr[eStr.Count -1] + ' // Display menu'; - eStr.Add('}'); - eStr.Add(''); - eStr.Add('public Pressed' + frmMenuMaker.txtMenuName.Text + '(id, key) {'); - if frmMenuMaker.chkAddComment.Checked then begin - eStr.Add(' /* Menu:'); - for i := 0 to frmMenuMaker.rtfEditor.Lines.Count -1 do - eStr.Add(' * ' + frmMenuMaker.rtfEditor.Lines[i]); - eStr.Add(' */'); - eStr.Add(''); - end; - eStr.Add(' switch (key) {'); - DefinedKeys := ''; - for i := 1 to Length(frmMenuMaker.txtKeys.Text) do begin - if frmMenuMaker.txtKeys.Text[i] = '0' then begin - DefinedKeys := DefinedKeys + '|(1<<9)'; - if frmMenuMaker.chkAddComment.Checked then - eStr.Add(' case 9: { // 0') - else - eStr.Add(' case 9: {'); - eStr.Add(' '); - eStr.Add(' }'); - end - else begin - DefinedKeys := DefinedKeys + '|(1<<' + IntToStr(StrToInt(frmMenuMaker.txtKeys.Text[i]) -1) + ')'; - if frmMenuMaker.chkAddComment.Checked then - eStr.Add(' case ' + IntToStr(StrToInt(frmMenuMaker.txtKeys.Text[i]) -1) + ': { // ' + frmMenuMaker.txtKeys.Text[i]) - else - eStr.Add(' case ' + IntToStr(StrToInt(frmMenuMaker.txtKeys.Text[i]) -1) + ': {'); - eStr.Add(' '); - eStr.Add(' }'); - end; - end; - Delete(DefinedKeys, 1, 1); - if frmMenuMaker.chkAddComment.Checked then - DefinedKeys := DefinedKeys + ' // Keys: ' + frmMenuMaker.txtKeys.Text; - eStr.Add(' }'); - eStr.Add('}'); - // Insert - AddIfDoesntExist('amxmodx'); - i := GetFirst('#define', True) +2; - if i = 1 then - i := GetFirst('#include', True) +2; - if i = 1 then - i := 0; - - frmMain.sciEditor.Lines.Insert(i, Format('#define Keys%s %s', [frmMenuMaker.txtMenuName.Text, DefinedKeys])); - frmMain.sciEditor.Lines.Text := frmMain.sciEditor.Lines.Text + #13 + eStr.Text; - if frmMenuMaker.chkRegisterMenuCommand.Checked then begin - i := GetFirst('register_plugin', True) +2; - if i = 1 then - i := GetFirst('public plugin_init()', True) +2; - if i = 1 then begin - eStr.Clear; - eStr.Add('public plugin_init() {'); - eStr.Add(' register_menucmd(register_menuid("' + frmMenuMaker.txtMenuName.Text + '"), Keys' + frmMenuMaker.txtMenuName.Text + ', "Pressed' + frmMenuMaker.txtMenuName.Text + '")'); - eStr.Add('}'); - frmMain.sciEditor.Lines.Insert(GetFirst('#define', True) +2, ''); - frmMain.sciEditor.Lines.Insert(GetFirst('#define', True) +3, eStr.Text); - end - else - frmMain.sciEditor.Lines.Insert(i, ' register_menucmd(register_menuid("' + frmMenuMaker.txtMenuName.Text + '"), Keys' + frmMenuMaker.txtMenuName.Text + ', "Pressed' + frmMenuMaker.txtMenuName.Text + '")'); - end; - frmMain.SetModified; - eStr.Free; - UpdateList(frmMain.sciEditor.Lines.Text); -end; - -{ Player Menu } - -function AddPlayerMenu: Boolean; -function PrepareItem(eItem: String; eDisabled: Boolean): String; // Remove colors etc. -begin - eItem := StringReplace(eItem, '\w', '', [rfReplaceAll, rfIgnoreCase]); - eItem := StringReplace(eItem, '\y', '', [rfReplaceAll, rfIgnoreCase]); - eItem := StringReplace(eItem, '\r', '', [rfReplaceAll, rfIgnoreCase]); - eItem := StringReplace(eItem, '\d', '', [rfReplaceAll, rfIgnoreCase]); - eItem := StringReplace(eItem, '%n', '%i', [rfIgnoreCase]); - eItem := StringReplace(eItem, '%v', '%s', [rfIgnoreCase]); - if eDisabled then - eItem := '\d' + eItem - else - eItem := '\w' + eItem; - Result := eItem + '^n'; -end; - -var i: integer; - eStr: TStringList; - ePlayersFrom, ePlayersTo: Integer; // Players - ePlayerFormat: String; - eNext, eExit: Integer; // Next and Back/Exit - eNextText, eBackText, eExitText: String; - eCurLineIndex: Integer; // Current .. - eCurLine: String; // .. line - DefinedKeys: String; // Action Keys -begin - Result := GetFirst('public Show' + frmMenuMaker.txtMenu.Text, True) = -1; - if not Result then begin - MessageBox(frmMenuMaker.Handle, 'Menu already exists. Please choose another name.', 'Warning', MB_ICONWARNING); - exit; - end; - - { - Kick player - - $players(1,8,%n. %v) - $next(9,9. Next) - - $exitorback(0, 0. Exit, 0. Back) - } - - eCurLine := frmMenuMaker.rtfEditor.Lines[0]; - eCurLineIndex := 0; - eNext := -1; - eExit := -1; - eStr := TStringList.Create; - // Prepare Values - try - { Players } - eCurLineIndex := GetFirst('$players', False); - eCurLine := frmMenuMaker.rtfEditor.Lines[eCurLineIndex]; - ePlayersFrom := StrToInt(Between(LowerCase(Trim(eCurLine)), '$players(', ',')); - ePlayersTo := StrToInt(Between(Trim(LowerCase(eCurLine)), ',', ',')); - while CountChars(eCurLine, ',') > 1 do - Delete(eCurLine, 1, 1); - ePlayerFormat := Between(LowerCase(eCurLine), ',', ')'); - { Next } - if GetFirst('$next', False) <> -1 then begin - eCurLineIndex := GetFirst('$next', False); - eCurLine := frmMenuMaker.rtfEditor.Lines[eCurLineIndex]; - eNext := StrToInt(Trim(Between(eCurLine, '(', ','))); - eNextText := Between(eCurLine, ',', ')'); - end; - { Exit or Back } - if GetFirst('$exitorback', False) <> -1 then begin - eCurLineIndex := GetFirst('$exitorback', False); - eCurLine := frmMenuMaker.rtfEditor.Lines[eCurLineIndex]; - eExit := StrToInt(Trim(Between(eCurLine, '(', ','))); - eExitText := Between(eCurLine, ',', ','); - while CountChars(eCurLine, ',') > 1 do - Delete(eCurLine, 1, 1); - eBackText := Between(eCurLine, ',', ')'); - end; - except - MessageBox(frmMenuMaker.Handle, PChar(Format('Syntax error at line %s: ' + #13 + '%s', [IntToStr(eCurLineIndex +1), frmMenuMaker.rtfEditor.Lines[eCurLineIndex]])), 'Error', MB_ICONERROR); - Result := False; - exit; - end; - // Check Keys - { Players } - if (ePlayersFrom < 0) or (ePlayersFrom > ePlayersTo) then begin - MessageBox(frmMenuMaker.Handle, 'Invalid start key (players)', 'Warning', MB_ICONWARNING); - Result := False; - exit; - end; - if (ePlayersTo < 0) or (ePlayersTo > 9) then begin - MessageBox(frmMenuMaker.Handle, 'Invalid stop key (players)', 'Warning', MB_ICONWARNING); - Result := False; - exit; - end; - { Next, Exit and Custom keys} - eCurLine := ''; - for i := ePlayersFrom to ePlayersTo do - eCurLine := eCurLine + IntToStr(i); - - if Pos(IntToStr(eNext), eCurLine) > 0 then begin - MessageBox(frmMenuMaker.Handle, PChar(Format('"Next" key already in use (%s). Delete it or choose another one and try again.', [IntToStr(eNext)])), 'Warning', MB_ICONWARNING); - Result := False; - exit; - end; - if Pos(IntToStr(eExit), eCurLine) > 0 then begin - MessageBox(frmMenuMaker.Handle, PChar(Format('"Exit" key already in use (%s). Delete it or choose another one and try again.', [IntToStr(eExit)])), 'Warning', MB_ICONWARNING); - Result := False; - exit; - end; - eCurLine := eCurLine + IntToStr(eNext); - eCurLine := eCurLine + IntToStr(eExit); - // Insert Code - try - { Includes } - AddIfDoesntExist('amxmodx'); - AddIfDoesntExist('amxmisc'); - { Define Keys } - DefinedKeys := ''; - if Length(eCurLine) <> 0 then begin - for i := 1 to Length(eCurLine) do begin - if eCurLine[i] = '0' then - DefinedKeys := DefinedKeys + '|(1<<9)' - else begin - eCurLine[i] := IntToStr(StrToInt(eCurLine[i]) -1)[1]; - DefinedKeys := DefinedKeys + '|(1<<' + eCurLine[i] + ')'; - end; - end; - Delete(DefinedKeys, 1, 1); - end; - i := GetLast('#define', True) +2; - if i = 1 then - i := GetLast('#include', True) +2; - if i = 1 then - i := 0; - frmMain.sciEditor.Lines.Insert(i, Format('#define Keys%s %s', [frmMenuMaker.txtMenu.Text, DefinedKeys])); - frmMain.sciEditor.Lines.Insert(i +1, 'new MenuPos' + frmMenuMaker.txtMenu.Text); - frmMain.sciEditor.Lines.Insert(i +2, 'new MenuPlayers' + frmMenuMAker.txtMenu.Text + '[32]'); - { Register } - i := GetFirst('register_plugin', True) +2; - if i = 1 then - i := GetFirst('public plugin_init()', True) +2; - if i = 1 then begin - eStr.Clear; - eStr.Add('public plugin_init() {'); - eStr.Add(' register_menucmd(register_menuid("' + frmMenuMaker.txtMenu.Text + '"), Keys' + frmMenuMaker.txtMenu.Text + ', "Pressed' + frmMenuMaker.txtMenu.Text + '")'); - eStr.Add('}'); - frmMain.sciEditor.Lines.Insert(GetFirst('#define', True) +2, ''); - frmMain.sciEditor.Lines.Insert(GetFirst('#define', True) +3, eStr.Text); - end - else - frmMain.sciEditor.Lines.Insert(i, ' register_menucmd(register_menuid("' + frmMenuMaker.txtMenu.Text + '"), Keys' + frmMenuMaker.txtMenu.Text + ', "Pressed' + frmMenuMaker.txtMenu.Text + '")'); - { Show Menu Functions (thx to xeroblood for code example) } - eStr.Clear; - eStr.Add('public Show' + frmMenuMaker.txtMenu.Text + '(id) {'); - eStr.Add(' ShowMenu' + frmMenuMaker.txtMenu.Text + '(id, MenuPos' + frmMenuMaker.txtMenu.Text + ' = 0)'); - eStr.Add(' return PLUGIN_HANDLED'); - eStr.Add('}'); - eStr.Add(''); - eStr.Add('public ShowMenu' + frmMenuMaker.txtMenu.Text + '(id, position) {'); - if frmMenuMaker.chkComments.Checked then - eStr.Add(' // Menu stuff //'); - eStr.Add(' if (position < 0) { return 0; }'); - eStr.Add(' '); - eStr.Add(' new i, k'); - eStr.Add(' new MenuBody[255]'); - eStr.Add(' new CurrentKey = ' + IntToStr(ePlayersFrom -1)); - eStr.Add(' new Start = position * ' + IntToStr(ePlayersTo - ePlayersFrom)); - eStr.Add(' new Num'); - eStr.Add(' new UserName[32]'); - eStr.Add(' '); - eStr.Add(' get_players(MenuPlayers' + frmMenuMaker.txtMenu.Text + ', Num)'); - eStr.Add(' if (Start >= Num) { Start = position = MenuPos' + frmMenuMaker.txtMenu.Text + ' = 0; }'); - eCurLine := frmMenuMaker.GetColoredMenu; - eCurLine := Copy(eCurLine, 1, Pos('$players', eCurLine) -3); - Insert('\R%d/%d^n\w', eCurLine, Pos('^n', eCurLine)); - eStr.Add(' new Len = format(MenuBody, 255, "' + eCurLine + '", position+1, (Num / ' + IntToStr(ePlayersTo - ePlayersFrom) + ' + ((Num % ' + IntToStr(ePlayersTo - ePlayersFrom) + ') ? 1 : 0 )) )'); - eStr.Add(' new End = Start + ' + IntToStr(ePlayersTo - ePlayersFrom)); - if eExit = 0 then - eStr.Add(' new Keys = (1<<9)') - else - eStr.Add(' new Keys = (1<<' + IntToStr(eExit -1) + ')'); - eStr.Add(' if (End > Num) { End = Num; }'); - eStr.Add(' '); - eStr.Add(' for(i=Start;i 0 then - eStr.Add(' case ' + IntToStr(eNext -1) + ': ShowMenu' + frmMenuMaker.txtMenu.Text + '(id, ++MenuPos' + frmMenuMaker.txtMenu.Text + ') // More Option') - else - eStr.Add(' case 9: ShowMenu' + frmMenuMaker.txtMenu.Text + '(id, ++MenuPos' + frmMenuMaker.txtMenu.Text + ') // More Option'); - - if eExit <> 0 then - eStr.Add(' case ' + IntToStr(eExit -1) + ': ShowMenu' + frmMenuMaker.txtMenu.Text + '(id, --MenuPos' + frmMenuMaker.txtMenu.Text + ') // Back Option') - else - eStr.Add(' case 9: ShowMenu' + frmMenuMaker.txtMenu.Text + '(id, --MenuPos' + frmMenuMaker.txtMenu.Text + ') // Back Option'); - end - else begin - if eNext <> 0 then - eStr.Add(' case ' + IntToStr(eNext -1) + ': ShowMenu' + frmMenuMaker.txtMenu.Text + '(id, ++MenuPos' + frmMenuMaker.txtMenu.Text + ')') - else - eStr.Add(' case 9: ShowMenu' + frmMenuMaker.txtMenu.Text + '(id, ++MenuPos' + frmMenuMaker.txtMenu.Text + ')'); - if eExit <> 0 then - eStr.Add(' case ' + IntToStr(eExit -1) + ': ShowMenu' + frmMenuMaker.txtMenu.Text + '(id, --MenuPos' + frmMenuMaker.txtMenu.Text + ')') - else - eStr.Add(' case 9: ShowMenu' + frmMenuMaker.txtMenu.Text + '(id, --MenuPos' + frmMenuMaker.txtMenu.Text + ')'); - end; - eStr.Add(' default: {'); - if frmMenuMaker.chkComments.Checked then - eStr.Add(' // Get User ID and Username'); - eStr.Add(' new PlayerID = MenuPlayers' + frmMenuMaker.txtMenu.Text + '[MenuPos' + frmMenuMaker.txtMenu.Text + ' * ' + IntToStr(ePlayersTo - ePlayersFrom) + ' + key]'); - eStr.Add(' new UserName[32]'); - eStr.Add(' get_user_name(PlayerID, UserName, 31)'); - if frmMenuMaker.chkComments.Checked then - eStr.Add(' // Do actions here') - else - eStr.Add(' '); - eStr.Add(' }'); - eStr.Add(' }'); - eStr.Add(' return PLUGIN_HANDLED'); - eStr.Add('}'); - frmMain.sciEditor.Lines.Text := frmMain.sciEditor.Lines.Text + #13 + eStr.Text; - except - MessageBox(frmMenuMaker.Handle, PChar('An error occured while inserting code!'), 'Warning', MB_ICONWARNING); - end; - frmMain.SetModified; - eStr.Free; -end; - -{ Functions } - -function GetFirst(eStart: String; eSearchMain: Boolean): Integer; -var i: integer; -begin - eStart := LowerCase(Trim(eStart)); - Result := -1; - if eSearchMain then begin - for i := 0 to frmMain.sciEditor.Lines.Count -1 do begin - if Pos(eStart, LowerCase(Trim(frmMain.sciEditor.Lines[i]))) = 1 then begin - Result := i; - exit; - end; - end; - end - else begin - for i := 0 to frmMenuMaker.rtfEditor.Lines.Count -1 do begin - if Pos(eStart, LowerCase(Trim(frmMenuMaker.rtfEditor.Lines[i]))) = 1 then begin - Result := i; - exit; - end; - end; - end; -end; - -function GetLast(eStart: String; eSearchMain: Boolean): Integer; -var i: integer; -begin - eStart := LowerCase(Trim(eStart)); - Result := -1; - if eSearchMain then begin - for i := 0 to frmMain.sciEditor.Lines.Count -1 do begin - if Pos(eStart, LowerCase(Trim(frmMain.sciEditor.Lines[i]))) = 1 then - Result := i; - end; - end - else begin - for i := 0 to frmMenuMaker.rtfEditor.Lines.Count -1 do begin - if Pos(eStart, LowerCase(Trim(frmMenuMaker.rtfEditor.Lines[i]))) = 1 then - Result := i; - end; - end; -end; - -function AddIfDoesntExist(eInclude: String): Boolean; -var i: integer; - eLine: String; -begin - Result := True; - eInclude := RemoveSpaces(LowerCase(eInclude)); - for i := 0 to frmMain.sciEditor.Lines.Count -1 do begin - eLine := LowerCase(RemoveSpaces(frmMain.sciEditor.Lines[i])); - eLine := StringReplace(eLine, '<', '', [rfReplaceAll]); - eLine := StringReplace(eLine, '>', '', [rfReplaceAll]); - eLine := StringReplace(eLine, '"', '', [rfReplaceAll]); - if eLine = '#include' + eInclude then begin - Result := False; - exit; - end; - end; - - i := GetLast('#include', True); - if i = -1 then - i := 0; - - frmMain.sciEditor.Lines.Insert(i, '#include <' + eInclude + '>'); -end; - -end. diff --git a/editor/editor2/UnitFunc.pas b/editor/editor2/UnitFunc.pas deleted file mode 100755 index d9b8c98e..00000000 --- a/editor/editor2/UnitFunc.pas +++ /dev/null @@ -1,656 +0,0 @@ -unit UnitFunc; - -interface - -uses SysUtils, Classes, IniFiles, Graphics, ScintillaLanguageManager, - Windows, Messages, SciLexerMod, tlhelp32, Controls, Forms, SciDocuments; - -procedure Delay(eTime: Integer); -function CountChars(eIn: String; eChar: Char): Integer; -function Between(eText, eFirst, eSecond: String): String; -procedure SendOpen(eFile: String); -procedure Load; -procedure Save; -procedure Apply; -function GetConsoleOutput(const Command: String): Boolean; -procedure KillIt(dwProcID: DWORD); -function GetProcID(sProcName: String): Integer; -procedure DoCompile; -function ShowSaveDialog(Caption, SaveCaption, CloseCaption: String): Boolean; -procedure AppendFileExt; -function RemoveSpaces(eInput: String): String; - -var eErrorLine: Integer; - eHints, eWarnings, eErrors: Integer; - -implementation - -uses UnitfrmMain, UnitfrmOptions, UnitfrmAbout, - UnitfrmDebug, UnitfrmSaveDialog; - -procedure Delay(eTime: Integer); -var i: integer; -begin - for i := 1 to eTime do begin - Sleep(1); - Application.ProcessMessages; - end; -end; - -function CountChars(eIn: String; eChar: Char): Integer; -var i: integer; -begin - Result := 0; - if Length(eIn) <> 0 then begin - for i := 1 to Length(eIn) do begin - if eIn[i] = eChar then - Inc(Result, 1); - end; - end; -end; - -function Between(eText, eFirst, eSecond: String): String; -var eTemp: String; -begin -if (Pos(eFirst, eText) = 0) or (Pos(eSecond, eText) = 0) then - Result := '' -else begin - eTemp := eText; - Delete(eTemp, 1, Pos(eFirst, eText) + Length(eFirst) - 1); - Delete(eTemp, Pos(eSecond, eTemp), Length(eTemp)); - Result := eTemp; -end; -end; - -procedure SendOpen(eFile: String); -var HTargetWnd: HWND; - ACopyDataStruct: TCopyDataStruct; -begin - with ACopyDataStruct do - begin - dwData := 0; - cbData := Length(eFile) + 1; - lpData := PChar(eFile); - end; - - HTargetWnd := FindWindow('TfrmMain', 'AMXX-Edit v2'); - - if HTargetWnd <> 0 then - SendMessage(HTargetWnd, WM_COPYDATA, 0, LongInt(@ACopyDataStruct)); -end; - -procedure Load; -var eFile: TIniFile; -begin - if not FileExists(ExtractFilePath(ParamStr(0)) + 'Config.ini') then - exit; - - eFile := TIniFile.Create(ExtractFilePath(ParamStr(0)) + 'Config.ini'); - with frmSettings do begin - { Editor } - cboFoldingStyle.ItemIndex := eFile.ReadInteger('Editor', 'FoldingStyle', 0); - chkAutoComplete.Checked := eFile.ReadBool('Editor', 'Auto-Complete', True); - chkHints.Checked := eFile.ReadBool('Editor', 'Hints', True); - chkHighlighting.Checked := eFile.ReadBool('Editor', 'Highlighting', True); - chkAutoIndent.Checked := eFile.ReadBool('Editor', 'AutoIndent', True); - chkBrackets.Checked := eFile.ReadBool('Editor', 'HighlightBrackets', True); - { Directories } - txtAMXXPath.Text := eFile.ReadString('Directories', 'AMXX', ''); - txtHalfLife.Text := eFile.ReadString('Directories', 'Half-Life', ''); - txtSave.Text := eFile.ReadString('Directories', 'SaveTarget', ''); - { Colors } - cboComments.Selected := eFile.ReadInteger('Colors', 'Comments', clGreen); - cboDirectives.Selected := eFile.ReadInteger('Colors', 'Directives', clTeal); - cboOperators.Selected := eFile.ReadInteger('Colors', 'Operators', clNavy); - cboStrings.Selected := eFile.ReadInteger('Colors', 'Strings', clBlue); - cboKeywords.Selected := eFile.ReadInteger('Colors', 'Keywords', clRed); - cboActiveLine.Selected := eFile.ReadInteger('Colors', 'ActiveLine', $00FFE6E6); - { FTP } - txtHost.Text := eFile.ReadString('FTP', 'Host', ''); - txtPort.Text := IntToStr(eFile.ReadInteger('FTP', 'Port', 21)); - txtUser.Text := eFile.ReadString('FTP', 'Username', ''); - txtPassword.Text := eFile.ReadString('FTP', 'Password', ''); - txtStandardDir.Text := eFile.ReadString('FTP', 'DefaultDir', '\'); - { View } - cboCodeExplorer.ItemIndex := eFile.ReadInteger('View', 'ShowCodeExplorer', 0); - chkStatusbar.Checked := eFile.ReadBool('View', 'Statusbar', True); - { Char completer } - frmSettings.chkAutoCloseBrackets.Checked := eFile.ReadBool('CharCompleter', 'AutoCloseBrackets', False); - frmSettings.chkAutoCloseQuotes.Checked := eFile.ReadBool('CharCompleter', 'AutoCloseQuotes', False); - { Compiler Output } - if eFile.ReadBool('View', 'CompileOutputInWindow', True) then - frmSettings.optWindow.Checked := True - else - frmSettings.optList.Checked := True; - { Misc } - chkReload.Checked := eFile.ReadBool('Misc', 'AutoReload', True); - chkAutoAddPlugins.Checked := eFile.ReadBool('Misc', 'AutoAdd', True); - end; - eFile.Free; -end; - -procedure Save; -var eFile: TIniFile; -begin - eFile := TIniFile.Create(ExtractFilePath(ParamStr(0)) + 'Config.ini'); - with frmSettings do begin - { Editor } - eFile.WriteInteger('Editor', 'FoldingStyle', cboFoldingStyle.ItemIndex); - eFile.WriteBool('Editor', 'Auto-Complete', chkAutoComplete.Checked); - eFile.WriteBool('Editor', 'Hints', chkHints.Checked); - eFile.WriteBool('Editor', 'Highlighting', chkHighlighting.Checked); - eFile.WriteBool('Editor', 'AutoIndent', chkAutoIndent.Checked); - eFile.WriteBool('Editor', 'HighlightBrackets', chkBrackets.Checked); - { Directories } - eFile.WriteString('Directories', 'AMXX', txtAMXXPath.Text); - eFile.WriteString('Directories', 'Half-Life', txtHalfLife.Text); - eFile.WriteString('Directories', 'SaveTarget', txtSave.Text); - { Colors } - eFile.WriteInteger('Colors', 'Comments', cboComments.Selected); - eFile.WriteInteger('Colors', 'Directives', cboDirectives.Selected); - eFile.WriteInteger('Colors', 'Operators', cboOperators.Selected); - eFile.WriteInteger('Colors', 'Strings', cboStrings.Selected); - eFile.WriteInteger('Colors', 'Keywords', cboKeywords.Selected); - eFile.WriteInteger('Colors', 'ActiveLine', cboActiveLine.Selected); - { FTP } - eFile.WriteString('FTP', 'Host', txtHost.Text); - eFile.WriteString('FTP', 'Port', txtPort.Text); - eFile.WriteString('FTP', 'Username', txtUser.Text); - eFile.WriteString('FTP', 'Password', txtPassword.Text); - eFile.WriteString('FTP', 'DefaultDir', txtStandardDir.Text); - { View } - eFile.WriteInteger('View', 'ShowCodeExplorer', cboCodeExplorer.ItemIndex); - eFile.WriteBool('View', 'Statusbar', chkStatusbar.Checked); - { Char completer } - eFile.WriteBool('CharCompleter', 'AutoCloseBrackets', frmSettings.chkAutoCloseBrackets.Checked); - eFile.WriteBool('CharCompleter', 'AutoCloseQuotes', frmSettings.chkAutoCloseQuotes.Checked); - { Compiler Output } - eFile.WriteBool('View', 'CompileOutputInWindow', frmSettings.optWindow.Checked); - { Misc } - eFile.WriteBool('Misc', 'AutoReload', chkReload.Checked); - eFile.WriteBool('Misc', 'AutoAdd', chkAutoAddPlugins.Checked); - end; - eFile.Free; -end; - -procedure Apply; -function PathComplete(eInput: String): String; -var eBackup: String; -begin - if Trim(eInput) = '' then - exit; - - eBackup := eInput; - while Length(eInput) > 1 do - Delete(eInput, 1, 1); - if eInput <> '\' then - Result := eBackup + '\' - else - Result := eBackup; -end; - -begin - with frmMain do begin - { Folding } - case frmSettings.cboFoldingStyle.ItemIndex of - 0: sciEditor.FoldMarkerType := sciMarkArrows; - 1: sciEditor.FoldMarkerType := sciMarkBox; - 2: sciEditor.FoldMarkerType := sciMarkCircle; - 3: sciEditor.FoldMarkerType := sciMarkPlusMinus; - end; - if frmSettings.cboFoldingStyle.ItemIndex = 4 then - sciEditor.Folding := sciEditor.Folding - [foldFold] - else - sciEditor.Folding := sciEditor.Folding + [foldFold]; - { Auto Complete } - sacComplete.Disabled := not frmSettings.chkAutoComplete.Checked; - { Hints } - cltEditor.Disabled := not frmSettings.chkHints.Checked; - { Colors } - with sciEditor.LanguageManager.LanguageList.Find('SMALL').Styles do begin - TSciStyle(Items[0]).ForeColor := frmSettings.cboComments.Selected; - TSciStyle(Items[1]).ForeColor := frmSettings.cboDirectives.Selected; - TSciStyle(Items[2]).ForeColor := frmSettings.cboOperators.Selected; - TSciStyle(Items[3]).ForeColor := frmSettings.cboStrings.Selected; - TSciStyle(Items[4]).ForeColor := frmSettings.cboKeywords.Selected; - TSciStyle(Items[5]).ForeColor := frmSettings.cboComments.Selected; - TSciStyle(Items[6]).ForeColor := TSciStyle(Items[2]).ForeColor; - TSciStyle(Items[7]).ForeColor := frmSettings.cboComments.Selected; - TSciStyle(Items[8]).ForeColor := frmSettings.cboComments.Selected; - end; - frmMain.sciEditor.Caret.LineBackColor := frmSettings.cboActiveLine.Selected; - - if frmSettings.chkHighlighting.Checked then - frmMain.sciEditor.LanguageManager.SelectedLanguage := 'SMALL' - else - frmMain.sciEditor.LanguageManager.SelectedLanguage := 'null'; - { Check directories } - frmSettings.txtAMXXPath.Text := PathComplete(frmSettings.txtAMXXPath.Text); - frmSettings.txtSave.Text := PathComplete(frmSettings.txtSave.Text); - { View } - case frmSettings.cboCodeExplorer.ItemIndex of - 0: begin - frmMain.splFunctions.Visible := True; - frmMain.pnlFunctions.Visible := True; - frmMain.pnlFunctions.Width := 150; - frmMain.pnlSpacerLeft.Cursor := crDefault; - end; - 1: begin - frmMain.splFunctions.Visible := False; - frmMain.pnlFunctions.Visible := True; - frmMain.pnlFunctions.Width := 5; - frmMain.pnlSpacerLeft.Cursor := crHSplit; - end; - 2: begin - frmMain.pnlFunctions.Visible := False; - frmMain.splFunctions.Visible := False; - frmMain.pnlSpacerLeft.Cursor := crDefault; - end; - end; - frmMain.sbInfo.Visible := frmSettings.chkStatusbar.Checked; - frmMain.sciEditor.BraceHilite := frmSettings.chkBrackets.Checked; - { Char completer } - frmMain.sciEditor.AutoCloseBraces := frmSettings.chkAutoCloseBrackets.Checked; - frmMain.sciEditor.AutoCloseQuotes := frmSettings.chkAutoCloseQuotes.Checked; - end; -end; - -procedure DoAdd(eStream: TMemoryStream); -var eStr: TStringList; - i: integer; - eErrLine: Integer; - eType, eBackup, eTemp: String; -begin - eStr := TStringList.Create; - eStr.LoadFromStream(eStream); - - eHints := 0; - eWarnings := 0; - eErrors := 0; - eType := ''; - eErrorLine := -1; - - for i := 2 to eStr.Count -1 do begin - try - if eStr[i] <> '' then begin - if (Pos(': fatal error', eStr[i]) <> 0) or (Pos(': error', eStr[i]) <> 0) or (Pos(': warning', eStr[i]) <> 0) or (Pos(': hint', eStr[i]) <> 0) then begin - eBackup := eStr[i]; - if (Pos(': fatal error', eStr[i]) <> 0) or (Pos(': error', eStr[i]) <> 0) then begin - Inc(eErrors, 1); - eType := 'Error'; - end - else if Pos(': warning', eStr[i]) <> 0 then begin - Inc(eWarnings, 1); - eType := 'Warning'; - end - else if Pos(': hint', eStr[i]) <> 0 then begin - Inc(eHints, 1); - eType := 'Hint'; - end; - - eErrLine := -1; - while (Pos('(', eStr[i]) <> 1) and (Length(eStr[i]) > 0) do - eStr[i] := Copy(eStr[i], 2, Length(eStr[i])); - try - eTemp := Copy(eStr[i], 2, Pos(')', eStr[i]) -2); - if Pos(#32, eTemp) <> 0 then - eTemp := Copy(eTemp, 1, Pos(#32, eTemp) -1); - eErrLine := StrToInt(eTemp); - if (eErrorLine = -1) and (eType = 'Error') then - eErrorLine := eErrLine; - except - if (eErrorLine = -1) and (eType = 'Error') then - eErrorLine := frmMain.sciEditor.Lines.Count -1; - end; - eStr[i] := Copy(eStr[i], 3, Length(eStr[i])); - while (Pos(':', eStr[i]) > 3) and (Length(eStr[i]) > 0) do - eStr[i] := Copy(eStr[i], 2, Length(eStr[i])); - eStr[i] := Copy(eStr[i], 4, Length(eStr[i])); - eStr[i] := Copy(eStr[i], Pos(':', eStr[i]) +2, Length(eStr[i])); - if Pos(': fatal error', eBackup) <> 0 then - eStr[i] := 'Fatal error: ' + eStr[i] - else if eStr[i] = '' then - eStr[i] := eBackup - else - eStr[i] := eType + ': ' + eStr[i] + ' on line ' + IntToStr(eErrLine); - if frmSettings.optWindow.Checked then begin - frmDebug.lblErrors.Caption := ' Errors: ' + IntToStr(eErrors); - frmDebug.lblWarnings.Caption := ' Warnings: ' + IntToStr(eWarnings); - frmDebug.lblHints.Caption := ' Hints: ' + IntToStr(eHints); - end; - end - else if (eStr[i] = 'Done.') or (Pos(' Error', eStr[i]) <> 0) or (Pos(' Warning', eStr[i]) <> 0) or (Pos(' Hint', eStr[i]) <> 0) then begin - if frmSettings.optWindow.Checked then begin - if eErrors <> 0 then - frmDebug.lblStatus.Caption := ' Done. There are errors.' - else if eWarnings <> 0 then - frmDebug.lblStatus.Caption := ' Done. There are warnings.' - else if eHints <> 0 then - frmDebug.lblStatus.Caption := ' Done. There are hints.' - else - frmDebug.lblStatus.Caption := ' Done.'; - frmDebug.lblStatus.Font.Style := [fsBold]; - end - else begin - if eErrors <> 0 then - frmMain.lvDebug.Items.Add.Caption := 'Done. There are errors.' - else if eWarnings <> 0 then - frmMain.lvDebug.Items.Add.Caption := 'Done. There are warnings.' - else if eHints <> 0 then - frmMain.lvDebug.Items.Add.Caption := 'Done. There are hints.' - else - frmMain.lvDebug.Items.Add.Caption := 'Done.'; - - if eErrorLine <> -1 then - frmMain.ShowErrorLine; - eStr.Free; - exit; - end; - end; - - if frmSettings.optWindow.Checked then begin - frmDebug.lstOutput.Items.Add(eStr[i]); - frmDebug.lstOutput.ItemIndex := frmDebug.lstOutput.Items.Count -1; - frmDebug.Repaint; - end - else begin - frmMain.lvDebug.Items.Add.Caption := eStr[i]; - frmMain.lvDebug.ItemIndex := frmDebug.lstOutput.Items.Count -1; - frmMain.Repaint; - end; - end; - except - // nothing - end; - end; - eStr.Free; -end; - -function GetConsoleOutput(const Command: String): Boolean; -var - StartupInfo: TStartupInfo; - ProcessInfo: TProcessInformation; - SecurityAttr: TSecurityAttributes; - PipeOutputRead: THandle; - PipeOutputWrite: THandle; - PipeErrorsRead: THandle; - PipeErrorsWrite: THandle; - Succeed: Boolean; - Buffer: array [0..255] of Char; - NumberOfBytesRead: DWORD; - Stream: TMemoryStream; -begin - frmDebug.Compiling := True; - FillChar(ProcessInfo, SizeOf(TProcessInformation), 0); - - FillChar(SecurityAttr, SizeOf(TSecurityAttributes), 0); - SecurityAttr.nLength := SizeOf(SecurityAttr); - SecurityAttr.bInheritHandle := True; - SecurityAttr.lpSecurityDescriptor := nil; - - CreatePipe(PipeOutputRead, PipeOutputWrite, @SecurityAttr, 0); - CreatePipe(PipeErrorsRead, PipeErrorsWrite, @SecurityAttr, 0); - - FillChar(StartupInfo, SizeOf(TStartupInfo), 0); - StartupInfo.cb:=SizeOf(StartupInfo); - StartupInfo.hStdInput := 0; - StartupInfo.hStdOutput := PipeOutputWrite; - StartupInfo.hStdError := PipeErrorsWrite; - StartupInfo.wShowWindow := SW_HIDE; - StartupInfo.dwFlags := STARTF_USESHOWWINDOW or STARTF_USESTDHANDLES; - - if CreateProcess(nil, PChar(command), nil, nil, true, - CREATE_DEFAULT_ERROR_MODE or CREATE_NEW_CONSOLE or NORMAL_PRIORITY_CLASS, nil, nil, - StartupInfo, ProcessInfo) then begin - Result := True; - CloseHandle(PipeOutputWrite); - CloseHandle(PipeErrorsWrite); - - Stream := TMemoryStream.Create; - try - while True do begin - Succeed := ReadFile(PipeOutputRead, Buffer, 255, NumberOfBytesRead, nil); - if not Succeed then Break; - Stream.Write(Buffer, NumberOfBytesRead); - end; - Stream.Position := 0; - DoAdd(Stream); - finally - Stream.Free; - end; - CloseHandle(PipeOutputRead); - - try - while True do - begin - Succeed := ReadFile(PipeErrorsRead, Buffer, 255, NumberOfBytesRead, nil); - if not Succeed then Break; - end; - finally - end; - CloseHandle(PipeErrorsRead); - - WaitForSingleObject(ProcessInfo.hProcess, INFINITE); - CloseHandle(ProcessInfo.hProcess); - end - else - begin - Result := False; - CloseHandle(PipeOutputRead); - CloseHandle(PipeOutputWrite); - CloseHandle(PipeErrorsRead); - CloseHandle(PipeErrorsWrite); - end; - frmDebug.Compiling := False; -end; - - -procedure KillIt(dwProcID: DWORD); -var - hProcess : Cardinal; -begin - hProcess := OpenProcess(SYNCHRONIZE or PROCESS_TERMINATE, False, dwProcID); - TerminateProcess(hProcess, 0); -end; - -function GetProcID(sProcName: String): Integer; -var - hProcSnap: THandle; - pe32: TProcessEntry32; -begin - result := -1; - hProcSnap := CreateToolHelp32SnapShot(TH32CS_SNAPPROCESS, 0); - if hProcSnap = INVALID_HANDLE_VALUE then exit; - - pe32.dwSize := SizeOf(ProcessEntry32); - - if Process32First(hProcSnap, pe32) = true then - while Process32Next(hProcSnap, pe32) = true do - begin - if pos(sProcName, pe32.szExeFile) <> 0 then - result := pe32.th32ProcessID; - end; -end; - -procedure DoCompile; -var eStr: TStringList; - i: integer; - eFound: Boolean; -begin - if (FileExists(frmSettings.txtAMXXPath.Text + 'scripting\amxxsc.exe')) and (FileExists(frmSettings.txtAMXXPath.Text + 'configs\plugins.ini')) then begin - if frmMain.dtcEditor.ActiveDocument.IsUntitled then begin - if DirectoryExists(frmSettings.txtSave.Text) then - frmMain.sdSave.InitialDir := frmSettings.txtSave.Text; - - if frmMain.sdSave.Execute then begin - try - AppendFileExt; - frmMain.dtcEditor.ActiveDocument.Modified := False; - frmMain.dtcEditor.ActiveDocument.FileName := frmMain.sdSave.FileName; - frmMain.sciEditor.SaveToFile(frmMain.dtcEditor.ActiveDocument.FileName); - except - // :F - end; - end - else - exit; - end - else - frmMain.acSave.Execute; - Screen.Cursor := crHourGlass; - if frmSettings.chkAutoAddPlugins.Checked then begin - eStr := TStringList.Create; - eStr.LoadFromFile(frmSettings.txtAMXXPath.Text + 'configs\plugins.ini'); - eFound := False; - for i := 0 to eStr.Count -1 do begin - if Pos(ChangeFileExt(ExtractFileName(frmMain.dtcEditor.ActiveDocument.FileName), '.amxx'), TrimLeft(eStr[i])) = 1 then - eFound := True; - end; - if not eFound then begin - eStr.Add(ChangeFileExt(ExtractFileName(frmMain.dtcEditor.ActiveDocument.FileName), '.amxx')); - eStr.SaveToFile(frmSettings.txtAMXXPath.Text + 'configs\plugins.ini'); - end; - eStr.Free; - end; - try - frmMain.atbToolBar.RecreateControls; - except - // :F - end; - - if frmSettings.optWindow.Checked then begin - frmDebug.lblFile.Caption := ' File: ' + ExtractFileName(frmMain.dtcEditor.ActiveDocument.FileName); - frmDebug.lblStatus.Font.Style := []; - frmDebug.lblStatus.Caption := ' Status: Compiling...'; - frmDebug.lblHints.Caption := ' Hints: 0'; - frmDebug.lblWarnings.Caption := ' Warnings: 0'; - frmDebug.lblErrors.Caption := ' Errors: 0'; - frmDebug.lstOutput.Items.Text := 'Compiler Output:'; - frmDebug.Show; - frmDebug.Repaint; - end - else begin - frmMain.lvDebug.Clear; - frmMain.lvDebug.Items.Add.Caption := 'Compiling ' + ExtractFileName(frmMain.dtcEditor.ActiveDocument.FileName) + '...'; - frmMain.lvDebug.Visible := True; - frmMain.Repaint; - end; - GetConsoleOutput(frmSettings.txtAMXXPath.Text + 'scripting\amxxsc.exe ' + - '"' + frmMain.dtcEditor.ActiveDocument.FileName + '" ' + - '"-o' + frmSettings.txtAMXXPath.Text + 'plugins\' + ChangeFileExt(ExtractFileName(frmMain.dtcEditor.ActiveDocument.FileName), '.amxx') + '"'); - Screen.Cursor := crDefault; - end - else - MessageBox(frmMain.Handle, 'Couldn''t find amxxsc.exe or plugins.ini. Check your settings and try again.', 'Error', MB_ICONERROR); -end; - -function ShowSaveDialog(Caption, SaveCaption, CloseCaption: String): Boolean; -function TabByName(eName: String): TSciDoc; -var i: integer; -begin - Result := nil; - for i := 0 to frmMain.dtcEditor.Count -1 do begin - if frmMain.dtcEditor.Tabs[i] = eName then - Result := frmMain.dtcEditor.Document[i]; - end; -end; - -var i: integer; - eStr: TStringList; -begin - eStr := TStringList.Create; - frmSaveDialog.Caption := Caption; - frmSaveDialog.SaveCaption := SaveCaption; - frmSaveDialog.CloseCaption := CloseCaption; - frmSaveDialog.cmdSave.Caption := CloseCaption; - frmSaveDialog.lstFiles.Clear; - for i := 0 to frmMain.dtcEditor.Tabs.Count -1 do begin - if (frmMain.dtcEditor.Document[i].Modified) then - frmSaveDialog.lstFiles.Items.Add(frmMain.dtcEditor.Tabs[i]) - else if (frmMain.dtcEditor.Document[i].IsUntitled) then - frmSaveDialog.lstFiles.Items.Add(frmMain.dtcEditor.Tabs[i]); - end; - - if (frmMain.dtcEditor.Tabs.Count = 1) and (frmMain.sciEditor.Lines.Text = '') then - frmSaveDialog.lstFiles.Clear; - - if frmSaveDialog.lstFiles.Items.Count = 0 then begin - Result := True; - if frmSettings.chkReload.Checked then begin - for i := 0 to frmMain.dtcEditor.Tabs.Count -1 do begin - if not frmMain.dtcEditor.Document[i].IsUntitled then - eStr.Add(frmMain.dtcEditor.Document[i].FileName); - end; - eStr.SaveToFile(ExtractFilePath(ParamStr(0)) + 'Files.ini'); - end; - eStr.Free; - exit; - end; - - for i := 0 to frmSaveDialog.lstFiles.Items.Count -1 do begin - if Pos('&', frmSaveDialog.lstFiles.Items[i]) = 1 then - frmSaveDialog.lstFiles.Items[i] := Copy(frmSaveDialog.lstFiles.Items[i], 2, Length(frmSaveDialog.lstFiles.Items[i])); - end; - - if frmSaveDialog.ShowModal = mrOk then begin - for i := 0 to frmSaveDialog.lstFiles.Items.Count -1 do begin - if frmSaveDialog.lstFiles.Checked[i] then begin - if (TabByName(frmSaveDialog.lstFiles.Items[i]).IsUntitled) then begin - frmMain.sdSave.Title := Format('Save %s (Tab %s)', [TabByName(frmSaveDialog.lstFiles.Items[i]).FileName, IntToStr(TabByName(frmSaveDialog.lstFiles.Items[i]).Index +1)]); - if frmMain.sdSave.Execute then begin - AppendFileExt; - frmMain.dtcEditor.Activate(TabByName(frmSaveDialog.lstFiles.Items[i]).Index); - frmMain.sciEditor.SaveToFile(frmMain.sdSave.FileName); - frmMain.dtcEditor.ActiveDocument.FileName := frmMain.sdSave.FileName; - frmMain.SetSaved; - frmMain.sbInfo.Panels[1].Text := ''; - end - else begin - frmMain.sdSave.Title := 'Save...'; - eStr.Free; - Result := False; - exit; - end; - frmMain.sdSave.Title := 'Save...'; - end - else begin - frmMain.dtcEditor.Activate(TabByName(frmSaveDialog.lstFiles.Items[i]).Index); - frmMain.sciEditor.SaveToFile(TabByName(frmSaveDialog.lstFiles.Items[i]).FileName); - frmMain.dtcEditor.ActiveDocument.Modified := False; - frmMain.SetSaved; - frmMain.sbInfo.Panels[1].Text := ''; - end; - end; - end; - for i := 0 to frmMain.dtcEditor.Tabs.Count -1 do begin - if (not frmMain.dtcEditor.Document[i].IsUntitled) and (not frmMain.dtcEditor.Document[i].Modified) then - eStr.Add(frmMain.dtcEditor.Document[i].FileName); - end; - - if frmSettings.chkReload.Checked then - eStr.SaveToFile(ExtractFilePath(ParamStr(0)) + 'Files.ini'); - Result := True; - end - else - Result := False; - eStr.Free; -end; - -procedure AppendFileExt; -var eExt: String; -begin - eExt := LowerCase(ExtractFileExt(frmMain.sdSave.FileName)); - if (frmMain.sdSave.FilterIndex = 1) and (eExt <> '.sma') then - frmMain.sdSave.FileName := frmMain.sdSave.FileName + '.sma' - else if (frmMain.sdSave.FilterIndex = 2) and (eExt <> '.inc') then - frmMain.sdSave.FileName := frmMain.sdSave.FileName + '.inc'; -end; - -function RemoveSpaces(eInput: String): String; -begin - eInput := StringReplace(eInput, ' ', '', [rfReplaceAll]); - eInput := StringReplace(eInput, ' ', '', [rfReplaceAll]); - Result := eInput; -end; - -end. diff --git a/editor/editor2/UnitHowToMakePlayerMenu.dfm b/editor/editor2/UnitHowToMakePlayerMenu.dfm deleted file mode 100755 index f3b48a98..00000000 Binary files a/editor/editor2/UnitHowToMakePlayerMenu.dfm and /dev/null differ diff --git a/editor/editor2/UnitHowToMakePlayerMenu.pas b/editor/editor2/UnitHowToMakePlayerMenu.pas deleted file mode 100755 index 7a5ad600..00000000 --- a/editor/editor2/UnitHowToMakePlayerMenu.pas +++ /dev/null @@ -1,24 +0,0 @@ -unit UnitHowToMakePlayerMenu; - -interface - -uses - SysUtils, Windows, Messages, Classes, Graphics, Controls, - StdCtrls, ExtCtrls, Forms, CorelButton; - -type - TfrmHowToMakePlayerMenu = class(TForm) - lblHowTo: TLabel; - txtTutorial: TMemo; - cmdOK: TCorelButton; - cmdExample: TCorelButton; - end; - -var - frmHowToMakePlayerMenu: TfrmHowToMakePlayerMenu; - -implementation - -{$R *.DFM} - -end. diff --git a/editor/editor2/UnitReadThread.pas b/editor/editor2/UnitReadThread.pas deleted file mode 100755 index d3170b12..00000000 --- a/editor/editor2/UnitReadThread.pas +++ /dev/null @@ -1,60 +0,0 @@ -unit UnitReadThread; - -interface - -uses - Classes, SysUtils, Graphics; - -type - TReadThread = class(TThread) - public - ReadTCP: Boolean; - protected - Read: String; - procedure Execute; override; - procedure AddRead; - end; - -implementation - -uses UnitfrmSockets; - -{ TReadThread } - -procedure TReadThread.AddRead; -begin - frmSocketTerminal.OnRead(Read); -end; - -procedure TReadThread.Execute; -begin - if ReadTCP then begin - frmSocketTerminal.IdTCPClient.ReadTimeout := 50; - repeat - try - Read := frmSocketTerminal.IdTCPClient.ReadLn; - Synchronize(AddRead); - except - // nothing - end; - until (Terminated) or (not frmSocketTerminal.IdTCPClient.Connected); - end - else begin - frmSocketTerminal.IdUDPClient.ReceiveTimeout := 50; - repeat - try - Read := frmSocketTerminal.IdUDPClient.ReceiveString; - if Read <> '' then - Synchronize(AddRead); - except - // nothing - end; - until (Terminated) or (not frmSocketTerminal.IdUDPClient.Active); - end; - Free; - Read := 'fu@u'; - Synchronize(AddRead); -end; - -end. - \ No newline at end of file diff --git a/editor/editor2/UnitTextAnalyze.pas b/editor/editor2/UnitTextAnalyze.pas deleted file mode 100755 index e69e884f..00000000 --- a/editor/editor2/UnitTextAnalyze.pas +++ /dev/null @@ -1,205 +0,0 @@ -unit UnitTextAnalyze; // Unit for analyzing code for code explorer, auto - // complete and call tips - -interface - -uses SysUtils, Classes, ComCtrls, Windows, Forms, Messages, ScintillaLanguageManager; - -procedure UpdateList(Code: String); -procedure AddAutoComplete(eAdd: String; AddCallTip: Boolean); - -var eExpand1, eExpand2, eExpand3, eExpand4, eExpand5: Boolean; - -implementation - -uses UnitfrmMain, UnitFunc; - -procedure UpdateList(Code: String); -var i, k: integer; - eStr, eStr2: TStringList; - eEndVariables: Boolean; - eParent1, eParent2, eParent3, eParent4, eParent5: TTreeNode; - eBracketsOpen, eStartLine: Integer; - eTemp: String; -begin - eStr := TStringList.Create; - eStr2 := TStringList.Create; - eStr.Text := Code; - - frmMain.sacComplete.AStrings.Text := frmMain.StdAutoComplete; - frmMain.cltEditor.ApiStrings.Text := frmMain.StdCallTips; - frmMain.trvFunctions.Items.BeginUpdate; - for i := 0 to 4 do - frmMain.trvFunctions.Items[i].DeleteChildren; - - for i := eStr.Count -1 downto 0 do begin - eStr[i] := TrimLeft(eStr[i]); - if (Pos('//', eStr[i]) > 0) then - eStr[i] := Copy(eStr[i], 1, Pos('//', eStr[i]) -2); - if (Pos('/*', eStr[i]) > 0) then - eStr[i] := Copy(eStr[i], 1, Pos('/*', eStr[i]) -2); - if (Pos('*', eStr[i]) = 1) then - eStr.Delete(i); - if (Pos('*/', eStr[i]) > 0) then - eStr[i] := Copy(eStr[i], 1, Pos('*/', eStr[i]) -2); - end; - - eEndVariables := False; - eBracketsOpen := -1; - eStartLine := -1; - eParent1 := frmMain.trvFunctions.Items[3]; - eParent2 := frmMain.trvFunctions.Items[1]; - eParent3 := frmMain.trvFunctions.Items[4]; - eParent4 := frmMain.trvFunctions.Items[0]; - eParent5 := frmMain.trvFunctions.Items[2]; - for i := 0 to eStr.Count -1 do begin - // Included: - if Pos('#include', LowerCase(eStr[i])) = 1 then begin - if (ExtractFileExt(Between(eStr[i], '<', '>')) = '') and (ExtractFileExt(Between(eStr[i], '"', '"')) = '') then begin - if Pos('<', eStr[i]) > 0 then - frmMain.trvFunctions.Items.AddChild(eParent1, Between(eStr[i], '<', '>') + '.inc') - else - frmMain.trvFunctions.Items.AddChild(eParent1, Between(eStr[i], '"', '"') + '.inc'); - end - else begin - if Pos('<', eStr[i]) > 0 then - frmMain.trvFunctions.Items.AddChild(eParent1, Between(eStr[i], '<', '>')) - else - frmMain.trvFunctions.Items.AddChild(eParent1, Between(eStr[i], '"', '"')); - end; - end; - // Defined - if Pos('#define', LowerCase(eStr[i])) = 1 then begin - eStr[i] := Copy(eStr[i], 8, Length(eStr[i])); - if Pos(#32, eStr[i]) <> 0 then begin - frmMain.trvFunctions.Items.AddChild(eParent2, Copy(TrimLeft(eStr[i]), 1, Pos(#32, TrimLeft(eStr[i])) -1)); - AddAutoComplete(Copy(TrimLeft(eStr[i]), 1, Pos(#32, TrimLeft(eStr[i])) -1), False); - end - else begin - frmMain.trvFunctions.Items.AddChild(eParent2, TrimLeft(eStr[i])); - AddAutoComplete(TrimLeft(eStr[i]), False); - end; - end; - // Variables and constants - if not eEndVariables then begin - if Pos('new', LowerCase(eStr[i])) = 1 then begin - if Pos(',', eStr[i]) > 0 then begin - eStr2.Text := StringReplace(Trim(Copy(eStr[i], 4, Length(eStr[i]))), ',', #13, [rfReplaceAll]); - for k := 0 to eStr2.Count -1 do begin - if Pos('=', eStr[i]) = 0 then - frmMain.trvFunctions.Items.AddChild(eParent3, Trim(eStr2[k])) - else - frmMain.trvFunctions.Items.AddChild(eParent4, Trim(eStr2[k])); - AddAutoComplete(Trim(eStr2[k]), False); - end; - end - else if Pos('{', Trim(eStr[i])) = Length(Trim(eStr[i])) then begin - if Pos('=', eStr[i]) = 0 then - frmMain.trvFunctions.Items.AddChild(eParent3, TrimLeft(Copy(eStr[i], 4, Length(eStr[i]))) + ' Array }') - else - frmMain.trvFunctions.Items.AddChild(eParent4, TrimLeft(Copy(eStr[i], 4, Length(eStr[i]))) + ' Array }'); - AddAutoComplete(Trim(Copy(eStr[i], 1, Pos('{', eStr[i]) -1)), False); - end - else begin - if Pos('=', eStr[i]) = 0 then - frmMain.trvFunctions.Items.AddChild(eParent3, TrimLeft(Copy(eStr[i], 4, Length(eStr[i])))) - else - frmMain.trvFunctions.Items.AddChild(eParent4, TrimLeft(Copy(eStr[i], 4, Length(eStr[i])))); - AddAutoComplete(TrimLeft(Copy(eStr[i], 4, Length(eStr[i]))), False); - end; - end; - end; - // Functions - if (Pos('forward', LowerCase(eStr[i])) = 1) or (Pos('public', LowerCase(eStr[i])) = 1) or (Pos('native', LowerCase(eStr[i])) = 1) or (Pos('stock', LowerCase(eStr[i])) = 1) then begin - eBracketsOpen := 0; - eEndVariables := True; - if ((Pos('{', eStr[i]) = 0)) or (Pos('{', eStr[i]) <> 0) and (Pos('}', eStr[i]) <> 0) then begin - eTemp := Copy(eStr[i], 1, Pos(#32, eStr[i])); - frmMain.FunctionType.Add(eTemp); - frmMain.trvFunctions.Items.AddChild(eParent5, Copy(eStr[i], Pos(#32, eStr[i]) +1, Length(eStr[i]))); - AddAutoComplete(Copy(eStr[i], Pos(#32, eStr[i]) +1, Length(eStr[i])), True); - end; - end; - if Pos('{', eStr[i]) <> 0 then begin - if eStartLine = -1 then - eStartLine := i; - Inc(eBracketsOpen, 1); - end; - if Pos('}', eStr[i]) <> 0 then begin - Inc(eBracketsOpen, -1); - if (eBracketsOpen = 0) then begin - eStr[eStartLine] := StringReplace(eStr[eStartLine], '{', '', [rfReplaceAll]); - eStr[eStartLine] := TrimRight(eStr[eStartLine]); - if (Pos(#32, eStr[eStartLine]) <> 0) and (Pos(#32, eStr[eStartLine]) < Pos('(', eStr[eStartLine])) then - eTemp := Copy(eStr[eStartLine], 1, Pos(#32, eStr[eStartLine])) - else - eTemp := ''; - frmMain.FunctionType.Add(eTemp); - frmMain.trvFunctions.Items.AddChild(eParent5, Copy(eStr[eStartLine], Pos(#32, eStr[eStartLine]) +1, Length(eStr[eStartLine]))); - AddAutoComplete(Copy(eStr[eStartLine], Pos(#32, eStr[eStartLine]) +1, Length(eStr[eStartLine])), True); - eStartLine := -1; - eBracketsOpen := -2; - end; - end; - end; - - for i := frmMain.trvFunctions.Items.Count -1 downto 0 do begin - if Assigned(frmMain.trvFunctions.Items[i].Parent) then begin - frmMain.trvFunctions.Items[i].ImageIndex := 20; - frmMain.trvFunctions.Items[i].SelectedIndex := 20; - end - else begin - frmMain.trvFunctions.Items[i].ImageIndex := 18; - frmMain.trvFunctions.Items[i].SelectedIndex := 18; - end; - - if frmMain.trvFunctions.Items[i].Text = '' then // Remove empty items - frmMain.trvFunctions.Items.Delete(frmMain.trvFunctions.Items[i]); - end; - eStr.Free; - eStr2.Free; - frmMain.trvFunctions.Items.AlphaSort(True); - frmMain.trvFunctions.FullExpand; - if not eExpand1 then - eParent1.Collapse(False); - if not eExpand2 then - eParent2.Collapse(False); - if not eExpand3 then - eParent3.Collapse(False); - if not eExpand4 then - eParent4.Collapse(False); - if not eExpand5 then - eParent5.Collapse(False); - frmMain.trvFunctions.Perform(WM_VSCROLL, SB_TOP, 0); - frmMain.trvFunctions.Items.EndUpdate; - Application.ProcessMessages; -end; - -procedure AddAutoComplete(eAdd: String; AddCallTip: Boolean); -function AlreadyAdded: Boolean; -var i: integer; - eTemp: String; -begin - Result := False; - eTemp := Trim(eAdd); - for i := 0 to frmMain.sacComplete.AStrings.Count -1 do begin - if Trim(frmMain.sacComplete.AStrings[i]) = eAdd then - Result := True; - if Trim(frmMain.sacComplete.AStrings[i] + '()') = eAdd then - Result := True; - end; -end; - -begin - if not AlreadyAdded then begin - if Pos('(', eAdd) <> 0 then - frmMain.sacComplete.AStrings.Add(Copy(eAdd, 1, Pos('(', eAdd) -1)) - else - frmMain.sacComplete.AStrings.Add(eAdd); - - if AddCallTip then - frmMain.cltEditor.ApiStrings.Add(eAdd); - end; -end; - -end. diff --git a/editor/editor2/UnitfrmAbout.dfm b/editor/editor2/UnitfrmAbout.dfm deleted file mode 100755 index 6aacc7f3..00000000 Binary files a/editor/editor2/UnitfrmAbout.dfm and /dev/null differ diff --git a/editor/editor2/UnitfrmAbout.pas b/editor/editor2/UnitfrmAbout.pas deleted file mode 100755 index 7ed1859a..00000000 --- a/editor/editor2/UnitfrmAbout.pas +++ /dev/null @@ -1,32 +0,0 @@ -unit UnitfrmAbout; - -interface - -uses - SysUtils, Windows, Messages, Classes, Graphics, Controls, - StdCtrls, ExtCtrls, Forms, ShellAPI, TFlatSpeedButtonUnit; - -type - TfrmAbout = class(TForm) - pnlInfo: TPanel; - imgAMXX: TImage; - lblCopyright: TLabel; - lblComments: TLabel; - lblCoder: TLabel; - FlatSpeedButton1: TFlatSpeedButton; - procedure imgAMXXClick(Sender: TObject); - end; - -var - frmAbout: TfrmAbout; - -implementation - -{$R *.DFM} - -procedure TfrmAbout.imgAMXXClick(Sender: TObject); -begin - ShellExecute(Handle, 'open', 'http://www.amxmodx.org/', nil, nil, SW_SHOW); -end; - -end. diff --git a/editor/editor2/UnitfrmDebug.dfm b/editor/editor2/UnitfrmDebug.dfm deleted file mode 100755 index a2274a45..00000000 Binary files a/editor/editor2/UnitfrmDebug.dfm and /dev/null differ diff --git a/editor/editor2/UnitfrmDebug.pas b/editor/editor2/UnitfrmDebug.pas deleted file mode 100755 index dfbf5b91..00000000 --- a/editor/editor2/UnitfrmDebug.pas +++ /dev/null @@ -1,91 +0,0 @@ -unit UnitfrmDebug; - -interface - -uses - SysUtils, Windows, Messages, Classes, Graphics, Controls, - StdCtrls, ExtCtrls, Forms; - -type - TfrmDebug = class(TForm) - cmdMore: TButton; - pnlCompile: TPanel; - lblFile: TStaticText; - lblStatus: TStaticText; - lblHints: TStaticText; - lblWarnings: TStaticText; - lblErrors: TStaticText; - cmdCancelOkay: TButton; - bvlDelimeter: TBevel; - lstOutput: TListBox; - procedure cmdMoreClick(Sender: TObject); - procedure cmdCancelOkayClick(Sender: TObject); - procedure lstOutputDblClick(Sender: TObject); - private - FCompiling: Boolean; - procedure SetCompiling(const Value: Boolean); - public - property Compiling: Boolean read FCompiling write SetCompiling; - end; - -var - frmDebug: TfrmDebug; - -const DEFAULT_HEIGHT = 165; - MAX_HEIGHT = 277; - -implementation - -uses UnitfrmMain, UnitFunc, UnitfrmOptions; - -{$R *.DFM} - -procedure TfrmDebug.cmdMoreClick(Sender: TObject); -begin - if Height = DEFAULT_HEIGHT then begin - Height := MAX_HEIGHT; - cmdMore.Caption := '<< Compiler Output'; - end - else begin - Height := DEFAULT_HEIGHT; - cmdMore.Caption := 'Compiler Output >>'; - end; -end; - -procedure TfrmDebug.SetCompiling(const Value: Boolean); -begin - FCompiling := Value; - if Value then - cmdCancelOkay.Caption := 'Cancel' - else - cmdCancelOkay.Caption := 'Close'; -end; - -procedure TfrmDebug.cmdCancelOkayClick(Sender: TObject); -var i: integer; -begin - if Compiling then begin - i := GetProcId('amxxsc.exe'); - if i <> -1 then - KillIt(i); - Compiling := False; - end - else begin - Hide; - frmMain.Show; - end; -end; - -procedure TfrmDebug.lstOutputDblClick(Sender: TObject); -begin - if lstOutput.ItemIndex <> -1 then begin - if Pos('Warning', lstOutput.Items[lstOutput.ItemIndex]) = 1 then - MessageBox(Handle, PChar(lstOutput.Items[lstOutput.ItemIndex]), 'Warning', MB_ICONWARNING) - else if Pos('Error', lstOutput.Items[lstOutput.ItemIndex]) = 1 then - MessageBox(Handle, PChar(lstOutput.Items[lstOutput.ItemIndex]), 'Error', MB_ICONERROR) - else - MessageBox(Handle, PChar(lstOutput.Items[lstOutput.ItemIndex]), 'Information', MB_ICONINFORMATION) - end; -end; - -end. diff --git a/editor/editor2/UnitfrmExceptionHandler.dfm b/editor/editor2/UnitfrmExceptionHandler.dfm deleted file mode 100755 index 663db55d..00000000 --- a/editor/editor2/UnitfrmExceptionHandler.dfm +++ /dev/null @@ -1,99 +0,0 @@ -object ExceptionDialog: TExceptionDialog - Left = 363 - Top = 284 - ActiveControl = OkBtn - AutoScroll = False - BorderIcons = [biSystemMenu] - Caption = 'Exception-Handler ONLY FOR DESIGN' - ClientHeight = 255 - ClientWidth = 432 - Color = clBtnFace - Constraints.MinWidth = 200 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - KeyPreview = True - OldCreateOrder = False - Position = poScreenCenter - ShowHint = True - OnCreate = FormCreate - OnDestroy = FormDestroy - OnKeyDown = FormKeyDown - OnPaint = FormPaint - OnResize = FormResize - OnShow = FormShow - DesignSize = ( - 432 - 255) - PixelsPerInch = 96 - TextHeight = 13 - object Bevel1: TBevel - Left = 3 - Top = 91 - Width = 428 - Height = 9 - Anchors = [akLeft, akTop, akRight] - Shape = bsTopLine - end - object OkBtn: TButton - Left = 352 - Top = 4 - Width = 75 - Height = 25 - Anchors = [akTop, akRight] - Caption = '&OK' - Default = True - ModalResult = 1 - TabOrder = 1 - end - object DetailsMemo: TMemo - Left = 4 - Top = 101 - Width = 424 - Height = 150 - Anchors = [akLeft, akTop, akRight, akBottom] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Courier New' - Font.Style = [] - ParentColor = True - ParentFont = False - ReadOnly = True - ScrollBars = ssBoth - TabOrder = 3 - WantReturns = False - WordWrap = False - end - object DetailsBtn: TButton - Left = 352 - Top = 60 - Width = 75 - Height = 25 - Hint = 'Show or hide additional information|' - Anchors = [akTop, akRight] - Caption = '&Details' - Enabled = False - TabOrder = 2 - OnClick = DetailsBtnClick - end - object TextLabel: TMemo - Left = 56 - Top = 8 - Width = 281 - Height = 75 - Hint = 'Use Ctrl+C to copy the report to the clipboard' - Anchors = [akLeft, akTop, akRight] - BorderStyle = bsNone - Ctl3D = True - Lines.Strings = ( - 'TextLabel') - ParentColor = True - ParentCtl3D = False - ReadOnly = True - TabOrder = 0 - WantReturns = False - end -end diff --git a/editor/editor2/UnitfrmExceptionHandler.pas b/editor/editor2/UnitfrmExceptionHandler.pas deleted file mode 100755 index 150b294b..00000000 --- a/editor/editor2/UnitfrmExceptionHandler.pas +++ /dev/null @@ -1,742 +0,0 @@ -{**************************************************************************************************} -{ } -{ Project JEDI Code Library (JCL) } -{ } -{ The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); } -{ you may not use this file except in compliance with the License. You may obtain a copy of the } -{ License at http://www.mozilla.org/MPL/ } -{ } -{ Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF } -{ ANY KIND, either express or implied. See the License for the specific language governing rights } -{ and limitations under the License. } -{ } -{ The Original Code is ExceptDlg.pas. } -{ } -{ The Initial Developer of the Original Code is documented in the accompanying } -{ help file JCL.chm. Portions created by these individuals are Copyright (C) of these individuals. } -{ } -{**************************************************************************************************} -{ } -{ Sample Application exception dialog replacement } -{ } -{ Last modified: April 1, 2003 } -{ } -{**************************************************************************************************} - -unit UnitfrmExceptionHandler; - -{$I jcl.inc} - -interface - -uses - Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, - StdCtrls, ExtCtrls, JclDebug; - -const - UM_CREATEDETAILS = WM_USER + $100; - - ReportToLogEnabled = $00000001; // TExceptionDialog.Tag property - DisableTextScrollbar = $00000002; // TExceptionDialog.Tag property - -type - TSimpleExceptionLog = class (TObject) - private - FLogFileHandle: THandle; - FLogFileName: string; - FLogWasEmpty: Boolean; - function GetLogOpen: Boolean; - protected - function CreateDefaultFileName: string; - public - constructor Create(const ALogFileName: string = ''); - destructor Destroy; override; - procedure CloseLog; - procedure OpenLog; - procedure Write(const Text: string; Indent: Integer = 0); overload; - procedure Write(Strings: TStrings; Indent: Integer = 0); overload; - procedure WriteStamp(SeparatorLen: Integer = 0); - property LogFileName: string read FLogFileName; - property LogOpen: Boolean read GetLogOpen; - end; - - TExcDialogSystemInfo = (siStackList, siOsInfo, siModuleList, siActiveControls); - TExcDialogSystemInfos = set of TExcDialogSystemInfo; - - TExceptionDialog = class(TForm) - OkBtn: TButton; - DetailsMemo: TMemo; - DetailsBtn: TButton; - Bevel1: TBevel; - TextLabel: TMemo; - procedure FormPaint(Sender: TObject); - procedure FormCreate(Sender: TObject); - procedure FormShow(Sender: TObject); - procedure DetailsBtnClick(Sender: TObject); - procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); - procedure FormDestroy(Sender: TObject); - procedure FormResize(Sender: TObject); - private - FDetailsVisible: Boolean; - FIsMainThead: Boolean; - FLastActiveControl: TWinControl; - FNonDetailsHeight: Integer; - FFullHeight: Integer; - FSimpleLog: TSimpleExceptionLog; - procedure CreateDetails; - function GetReportAsText: string; - procedure ReportToLog; - procedure SetDetailsVisible(const Value: Boolean); - procedure UMCreateDetails(var Message: TMessage); message UM_CREATEDETAILS; - protected - procedure AfterCreateDetails; dynamic; - procedure BeforeCreateDetails; dynamic; - procedure CreateDetailInfo; dynamic; - procedure CreateReport(const SystemInfo: TExcDialogSystemInfos); - function ReportMaxColumns: Integer; virtual; - function ReportNewBlockDelimiterChar: Char; virtual; - procedure NextDetailBlock; - procedure UpdateTextLabelScrollbars; - public - procedure CopyReportToClipboard; - class procedure ExceptionHandler(Sender: TObject; E: Exception); - class procedure ExceptionThreadHandler(Thread: TJclDebugThread); - class procedure ShowException(E: Exception; Thread: TJclDebugThread); - property DetailsVisible: Boolean read FDetailsVisible write SetDetailsVisible; - property ReportAsText: string read GetReportAsText; - property SimpleLog: TSimpleExceptionLog read FSimpleLog; - end; - - TExceptionDialogClass = class of TExceptionDialog; - -var - ExceptionDialogClass: TExceptionDialogClass = TExceptionDialog; - -implementation - -{$R *.DFM} - -uses - ClipBrd, Math, - JclBase, JclFileUtils, JclHookExcept, JclPeImage, JclStrings, JclSysInfo, JclSysUtils; - -resourcestring - RsAppError = '%s - application error'; - RsExceptionClass = 'Exception class: %s'; - RsExceptionAddr = 'Exception address: %p'; - RsStackList = 'Stack list, generated %s'; - RsModulesList = 'List of loaded modules:'; - RsOSVersion = 'System : %s %s, Version: %d.%d, Build: %x, "%s"'; - RsProcessor = 'Processor: %s, %s, %d MHz %s%s'; - RsScreenRes = 'Display : %dx%d pixels, %d bpp'; - RsActiveControl = 'Active Controls hierarchy:'; - RsThread = 'Thread: %s'; - RsMissingVersionInfo = '(no version info)'; - -var - ExceptionDialog: TExceptionDialog; - -//================================================================================================== -// Helper routines -//================================================================================================== - -function GetBPP: Integer; -var - DC: HDC; -begin - DC := GetDC(0); - Result := GetDeviceCaps(DC, BITSPIXEL) * GetDeviceCaps(DC, PLANES); - ReleaseDC(0, DC); -end; - -//-------------------------------------------------------------------------------------------------- - -function SortModulesListByAddressCompare(List: TStringList; Index1, Index2: Integer): Integer; -begin - Result := Integer(List.Objects[Index1]) - Integer(List.Objects[Index2]); -end; - -//================================================================================================== -// TApplication.HandleException method code hooking for exceptions from DLLs -//================================================================================================== - -// We need to catch the last line of TApplication.HandleException method: -// [...] -// end else -// SysUtils.ShowException(ExceptObject, ExceptAddr); -// end; - -procedure HookShowException(ExceptObject: TObject; ExceptAddr: Pointer); -begin - if JclValidateModuleAddress(ExceptAddr) and (ExceptObject.InstanceSize >= Exception.InstanceSize) then - TExceptionDialog.ExceptionHandler(nil, Exception(ExceptObject)) - else - SysUtils.ShowException(ExceptObject, ExceptAddr); -end; - -//-------------------------------------------------------------------------------------------------- - -function HookTApplicationHandleException: Boolean; -const - CallOffset = $86; - CallOffsetDebug = $94; -type - PCALLInstruction = ^TCALLInstruction; - TCALLInstruction = packed record - Call: Byte; - Address: Integer; - end; -var - TApplicationHandleExceptionAddr, SysUtilsShowExceptionAddr: Pointer; - CALLInstruction: TCALLInstruction; - CallAddress: Pointer; - NW: DWORD; - - function CheckAddressForOffset(Offset: Cardinal): Boolean; - begin - try - CallAddress := Pointer(Cardinal(TApplicationHandleExceptionAddr) + Offset); - CALLInstruction.Call := $E8; - Result := PCALLInstruction(CallAddress)^.Call = CALLInstruction.Call; - if Result then - begin - if IsCompiledWithPackages then - Result := PeMapImgResolvePackageThunk(Pointer(Integer(CallAddress) + Integer(PCALLInstruction(CallAddress)^.Address) + SizeOf(CALLInstruction))) = SysUtilsShowExceptionAddr - else - Result := PCALLInstruction(CallAddress)^.Address = Integer(SysUtilsShowExceptionAddr) - Integer(CallAddress) - SizeOf(CALLInstruction); - end; - except - Result := False; - end; - end; - -begin - TApplicationHandleExceptionAddr := PeMapImgResolvePackageThunk(@TApplication.HandleException); - SysUtilsShowExceptionAddr := PeMapImgResolvePackageThunk(@SysUtils.ShowException); - Result := CheckAddressForOffset(CallOffset) or CheckAddressForOffset(CallOffsetDebug); - if Result then - begin - CALLInstruction.Address := Integer(@HookShowException) - Integer(CallAddress) - SizeOf(CALLInstruction); - Result := WriteProcessMemory(GetCurrentProcess, CallAddress, @CALLInstruction, SizeOf(CALLInstruction), NW); - if Result then - FlushInstructionCache(GetCurrentProcess, CallAddress, SizeOf(CALLInstruction)); - end; -end; - -//================================================================================================== -// TSimpleExceptionLog -//================================================================================================== - -procedure TSimpleExceptionLog.CloseLog; -begin - if LogOpen then - begin - CloseHandle(FLogFileHandle); - FLogFileHandle := INVALID_HANDLE_VALUE; - FLogWasEmpty := False; - end; -end; - -//-------------------------------------------------------------------------------------------------- - -constructor TSimpleExceptionLog.Create(const ALogFileName: string); -begin - if ALogFileName = '' then - FLogFileName := CreateDefaultFileName - else - FLogFileName := ALogFileName; - FLogFileHandle := INVALID_HANDLE_VALUE; -end; - -//-------------------------------------------------------------------------------------------------- - -function TSimpleExceptionLog.CreateDefaultFileName: string; -begin - Result := PathExtractFileDirFixed(ParamStr(0)) + PathExtractFileNameNoExt(ParamStr(0)) + '_Err.log'; -end; - -//-------------------------------------------------------------------------------------------------- - -destructor TSimpleExceptionLog.Destroy; -begin - CloseLog; - inherited; -end; - -//-------------------------------------------------------------------------------------------------- - -function TSimpleExceptionLog.GetLogOpen: Boolean; -begin - Result := FLogFileHandle <> INVALID_HANDLE_VALUE; -end; - -//-------------------------------------------------------------------------------------------------- - -procedure TSimpleExceptionLog.OpenLog; -begin - if not LogOpen then - begin - FLogFileHandle := CreateFile(PChar(FLogFileName), GENERIC_WRITE, FILE_SHARE_READ, nil, - OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); - if LogOpen then - FLogWasEmpty := SetFilePointer(FLogFileHandle, 0, nil, FILE_END) = 0; - end - else - FLogWasEmpty := False; -end; - -//-------------------------------------------------------------------------------------------------- - -procedure TSimpleExceptionLog.Write(const Text: string; Indent: Integer); -var - S: string; - SL: TStringList; - I: Integer; -begin - if LogOpen then - begin - SL := TStringList.Create; - try - SL.Text := Text; - for I := 0 to SL.Count - 1 do - begin - S := StringOfChar(' ', Indent) + StrEnsureSuffix(AnsiCrLf, TrimRight(SL[I])); - FileWrite(Integer(FLogFileHandle), Pointer(S)^, Length(S)); - end; - finally - SL.Free; - end; - end; -end; - -//-------------------------------------------------------------------------------------------------- - -procedure TSimpleExceptionLog.Write(Strings: TStrings; Indent: Integer); -var - I: Integer; -begin - for I := 0 to Strings.Count - 1 do - Write(Strings[I], Indent); -end; - -//-------------------------------------------------------------------------------------------------- - -procedure TSimpleExceptionLog.WriteStamp(SeparatorLen: Integer); -begin - if SeparatorLen = 0 then - SeparatorLen := 100; - SeparatorLen := Max(SeparatorLen, 20); - OpenLog; - if not FLogWasEmpty then - Write(AnsiCrLf); - Write(StrRepeat('=', SeparatorLen)); - Write(Format('= %-*s =', [SeparatorLen - 4, DateTimeToStr(Now)])); - Write(StrRepeat('=', SeparatorLen)); -end; - -//================================================================================================== -// Exception dialog -//================================================================================================== - -var - ExceptionShowing: Boolean; - -{ TExceptionDialog } - -procedure TExceptionDialog.AfterCreateDetails; -begin -end; - -//-------------------------------------------------------------------------------------------------- - -procedure TExceptionDialog.BeforeCreateDetails; -begin -end; - -//-------------------------------------------------------------------------------------------------- - -procedure TExceptionDialog.CopyReportToClipboard; -begin - ClipBoard.AsText := ReportAsText; -end; - -//-------------------------------------------------------------------------------------------------- - -procedure TExceptionDialog.CreateDetailInfo; -begin - CreateReport([siStackList, siOsInfo, siModuleList, siActiveControls]); -end; - -//-------------------------------------------------------------------------------------------------- - -procedure TExceptionDialog.CreateDetails; -begin - Screen.Cursor := crHourGlass; - DetailsMemo.Lines.BeginUpdate; - try - CreateDetailInfo; - ReportToLog; - DetailsMemo.SelStart := 0; - SendMessage(DetailsMemo.Handle, EM_SCROLLCARET, 0, 0); - AfterCreateDetails; - finally - DetailsMemo.Lines.EndUpdate; - OkBtn.Enabled := True; - DetailsBtn.Enabled := True; - OkBtn.SetFocus; - Screen.Cursor := crDefault; - end; -end; - -//-------------------------------------------------------------------------------------------------- - -procedure TExceptionDialog.CreateReport(const SystemInfo: TExcDialogSystemInfos); -const - MMXText: array[Boolean] of PChar = ('', 'MMX'); - FDIVText: array[Boolean] of PChar = (' [FDIV Bug]', ''); -var - SL: TStringList; - I: Integer; - ModuleName: TFileName; - CpuInfo: TCpuInfo; - C: TWinControl; - NtHeaders: PImageNtHeaders; - ModuleBase: Cardinal; - ImageBaseStr: string; - StackList: TJclStackInfoList; -begin - SL := TStringList.Create; - try - // Stack list - if siStackList in SystemInfo then - begin - StackList := JclLastExceptStackList; - if Assigned(StackList) then - begin - DetailsMemo.Lines.Add(Format(RsStackList, [DateTimeToStr(StackList.TimeStamp)])); - StackList.AddToStrings(DetailsMemo.Lines, False, True, True); - NextDetailBlock; - end; - end; - // System and OS information - if siOsInfo in SystemInfo then - begin - DetailsMemo.Lines.Add(Format(RsOSVersion, [GetWindowsVersionString, NtProductTypeString, - Win32MajorVersion, Win32MinorVersion, Win32BuildNumber, Win32CSDVersion])); - GetCpuInfo(CpuInfo); - with CpuInfo do - DetailsMemo.Lines.Add(Format(RsProcessor, [Manufacturer, CpuName, - RoundFrequency(FrequencyInfo.NormFreq), - MMXText[MMX], FDIVText[IsFDIVOK]])); - DetailsMemo.Lines.Add(Format(RsScreenRes, [Screen.Width, Screen.Height, GetBPP])); - NextDetailBlock; - end; - // Modules list - if (siModuleList in SystemInfo) and LoadedModulesList(SL, GetCurrentProcessId) then - begin - DetailsMemo.Lines.Add(RsModulesList); - SL.CustomSort(SortModulesListByAddressCompare); - for I := 0 to SL.Count - 1 do - begin - ModuleName := SL[I]; - ModuleBase := Cardinal(SL.Objects[I]); - DetailsMemo.Lines.Add(Format('[%.8x] %s', [ModuleBase, ModuleName])); - NtHeaders := PeMapImgNtHeaders(Pointer(ModuleBase)); - if (NtHeaders <> nil) and (NtHeaders^.OptionalHeader.ImageBase <> ModuleBase) then - ImageBaseStr := Format('<%.8x> ', [NtHeaders^.OptionalHeader.ImageBase]) - else - ImageBaseStr := StrRepeat(' ', 11); - if VersionResourceAvailable(ModuleName) then - with TJclFileVersionInfo.Create(ModuleName) do - try - DetailsMemo.Lines.Add(ImageBaseStr + BinFileVersion + ' - ' + FileVersion); - if FileDescription <> '' then - DetailsMemo.Lines.Add(StrRepeat(' ', 11) + FileDescription); - finally - Free; - end - else - DetailsMemo.Lines.Add(ImageBaseStr + RsMissingVersionInfo); - end; - NextDetailBlock; - end; - // Active controls - if (siActiveControls in SystemInfo) and (FLastActiveControl <> nil) then - begin - DetailsMemo.Lines.Add(RsActiveControl); - C := FLastActiveControl; - while C <> nil do - begin - DetailsMemo.Lines.Add(Format('%s "%s"', [C.ClassName, C.Name])); - C := C.Parent; - end; - NextDetailBlock; - end; - finally - SL.Free; - end; -end; - -//-------------------------------------------------------------------------------------------------- - -procedure TExceptionDialog.DetailsBtnClick(Sender: TObject); -begin - DetailsVisible := not DetailsVisible; -end; - -//-------------------------------------------------------------------------------------------------- - -class procedure TExceptionDialog.ExceptionHandler(Sender: TObject; E: Exception); -begin - if ExceptionShowing then - Application.ShowException(E) - else - begin - ExceptionShowing := True; - try - ShowException(E, nil); - finally - ExceptionShowing := False; - end; - end; -end; - -//-------------------------------------------------------------------------------------------------- - -class procedure TExceptionDialog.ExceptionThreadHandler(Thread: TJclDebugThread); -begin - if ExceptionShowing then - Application.ShowException(Thread.SyncException) - else - begin - ExceptionShowing := True; - try - ShowException(Thread.SyncException, Thread); - finally - ExceptionShowing := False; - end; - end; -end; - -//-------------------------------------------------------------------------------------------------- - -procedure TExceptionDialog.FormCreate(Sender: TObject); -begin - FSimpleLog := TSimpleExceptionLog.Create; - FFullHeight := ClientHeight; - DetailsVisible := False; - Caption := Format(RsAppError, [Application.Title]); -end; - -//-------------------------------------------------------------------------------------------------- - -procedure TExceptionDialog.FormDestroy(Sender: TObject); -begin - FreeAndNil(FSimpleLog); -end; - -//-------------------------------------------------------------------------------------------------- - -procedure TExceptionDialog.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); -begin - if (Key = Ord('C')) and (ssCtrl in Shift) then - begin - CopyReportToClipboard; - MessageBeep(MB_OK); - end; -end; - -//-------------------------------------------------------------------------------------------------- - -procedure TExceptionDialog.FormPaint(Sender: TObject); -begin - DrawIcon(Canvas.Handle, TextLabel.Left - GetSystemMetrics(SM_CXICON) - 15, - TextLabel.Top, LoadIcon(0, IDI_ERROR)); -end; - -//-------------------------------------------------------------------------------------------------- - -procedure TExceptionDialog.FormResize(Sender: TObject); -begin - UpdateTextLabelScrollbars; -end; - -//-------------------------------------------------------------------------------------------------- - -procedure TExceptionDialog.FormShow(Sender: TObject); -begin - BeforeCreateDetails; - MessageBeep(MB_ICONERROR); - if FIsMainThead and (GetWindowThreadProcessId(Handle, nil) = MainThreadID) then - PostMessage(Handle, UM_CREATEDETAILS, 0, 0) - else - CreateDetails; -end; - -//-------------------------------------------------------------------------------------------------- - -function TExceptionDialog.GetReportAsText: string; -begin - Result := StrEnsureSuffix(AnsiCrLf, TextLabel.Text) + AnsiCrLf + DetailsMemo.Text; -end; - -//-------------------------------------------------------------------------------------------------- - -procedure TExceptionDialog.NextDetailBlock; -begin - DetailsMemo.Lines.Add(StrRepeat(ReportNewBlockDelimiterChar, ReportMaxColumns)); -end; - -//-------------------------------------------------------------------------------------------------- - -function TExceptionDialog.ReportMaxColumns: Integer; -begin - Result := 100; -end; - -//-------------------------------------------------------------------------------------------------- - -function TExceptionDialog.ReportNewBlockDelimiterChar: Char; -begin - Result := '-'; -end; - -//-------------------------------------------------------------------------------------------------- - -procedure TExceptionDialog.ReportToLog; -begin - if Tag and ReportToLogEnabled <> 0 then - begin - FSimpleLog.WriteStamp(ReportMaxColumns); - try - FSimpleLog.Write(ReportAsText); - finally - FSimpleLog.CloseLog; - end; - end; -end; - -//-------------------------------------------------------------------------------------------------- - -procedure TExceptionDialog.SetDetailsVisible(const Value: Boolean); -var - DetailsCaption: string; -begin - FDetailsVisible := Value; - DetailsCaption := Trim(StrRemoveChars(DetailsBtn.Caption, ['<', '>'])); - if Value then - begin - Constraints.MinHeight := FNonDetailsHeight + 100; - Constraints.MaxHeight := Screen.Height; - DetailsCaption := '<< ' + DetailsCaption; - ClientHeight := FFullHeight; - DetailsMemo.Height := FFullHeight - DetailsMemo.Top - 3; - end - else - begin - FFullHeight := ClientHeight; - DetailsCaption := DetailsCaption + ' >>'; - if FNonDetailsHeight = 0 then - begin - ClientHeight := Bevel1.Top; - FNonDetailsHeight := Height; - end - else - Height := FNonDetailsHeight; - Constraints.MinHeight := FNonDetailsHeight; - Constraints.MaxHeight := FNonDetailsHeight - end; - DetailsBtn.Caption := DetailsCaption; - DetailsMemo.Enabled := Value; -end; - -//-------------------------------------------------------------------------------------------------- - -class procedure TExceptionDialog.ShowException(E: Exception; Thread: TJclDebugThread); -begin - if ExceptionDialog = nil then - ExceptionDialog := ExceptionDialogClass.Create(Application); - try - with ExceptionDialog do - begin - FIsMainThead := (GetCurrentThreadId = MainThreadID); - FLastActiveControl := Screen.ActiveControl; - TextLabel.Text := AdjustLineBreaks(StrEnsureSuffix('.', E.Message)); - UpdateTextLabelScrollbars; - DetailsMemo.Lines.Add(Format(RsExceptionClass, [E.ClassName])); - if Thread = nil then - DetailsMemo.Lines.Add(Format(RsExceptionAddr, [ExceptAddr])) - else - DetailsMemo.Lines.Add(Format(RsThread, [Thread.ThreadInfo])); - NextDetailBlock; - ShowModal; - end; - finally - FreeAndNil(ExceptionDialog); - end; -end; - -//-------------------------------------------------------------------------------------------------- - -procedure TExceptionDialog.UMCreateDetails(var Message: TMessage); -begin - Update; - CreateDetails; -end; - -//-------------------------------------------------------------------------------------------------- - -procedure TExceptionDialog.UpdateTextLabelScrollbars; -begin - if Tag and DisableTextScrollbar = 0 then - begin - Canvas.Font := TextLabel.Font; - if TextLabel.Lines.Count * Canvas.TextHeight('Wg') > TextLabel.ClientHeight then - TextLabel.ScrollBars := ssVertical - else - TextLabel.ScrollBars := ssNone; - end; -end; - -//================================================================================================== -// Exception handler initialization code -//================================================================================================== - -procedure InitializeHandler; -begin - JclStackTrackingOptions := JclStackTrackingOptions + [stRawMode]; - {$IFNDEF HOOK_DLL_EXCEPTIONS} - JclStackTrackingOptions := JclStackTrackingOptions + [stStaticModuleList]; - {$ENDIF HOOK_DLL_EXCEPTIONS} - JclDebugThreadList.OnSyncException := TExceptionDialog.ExceptionThreadHandler; - JclStartExceptionTracking; - {$IFDEF HOOK_DLL_EXCEPTIONS} - if HookTApplicationHandleException then - JclTrackExceptionsFromLibraries; - {$ENDIF HOOK_DLL_EXCEPTIONS} - Application.OnException := TExceptionDialog.ExceptionHandler; -end; - -//-------------------------------------------------------------------------------------------------- - -procedure UnInitializeHandler; -begin - Application.OnException := nil; - JclDebugThreadList.OnSyncException := nil; - JclUnhookExceptions; - JclStopExceptionTracking; -end; - -//-------------------------------------------------------------------------------------------------- - -initialization - {$IFDEF EXCEPTION_DEBUG} - InitializeHandler; - {$ENDIF} - -finalization - {$IFDEF EXCEPTION_DEBUG} - UnInitializeHandler; - {$ENDIF} - -end. diff --git a/editor/editor2/UnitfrmGoToLine.dfm b/editor/editor2/UnitfrmGoToLine.dfm deleted file mode 100755 index 376a6314..00000000 Binary files a/editor/editor2/UnitfrmGoToLine.dfm and /dev/null differ diff --git a/editor/editor2/UnitfrmGoToLine.pas b/editor/editor2/UnitfrmGoToLine.pas deleted file mode 100755 index 8e5dddd7..00000000 --- a/editor/editor2/UnitfrmGoToLine.pas +++ /dev/null @@ -1,48 +0,0 @@ -unit UnitfrmGoToLine; - -interface - -uses - SysUtils, Windows, Messages, Classes, Graphics, Controls, - StdCtrls, ExtCtrls, Forms, TFlatSpeedButtonUnit, TFlatEditUnit; - -type - TfrmGoToLine = class(TForm) - lblInfo: TLabel; - txtLine: TFlatEdit; - cmdOK: TFlatSpeedButton; - cmdCancel: TFlatSpeedButton; - procedure cmdOKClick(Sender: TObject); - procedure txtLineKeyPress(Sender: TObject; var Key: Char); - end; - -var - frmGoToLine: TfrmGoToLine; - -implementation - -uses UnitfrmMain; - -{$R *.DFM} - -procedure TfrmGoToLine.cmdOKClick(Sender: TObject); -begin - try - if (StrToInt(txtLine.Text) < 0) or (StrToInt(txtLine.Text) > frmMain.sciEditor.Lines.Count) then - raise Exception.Create('Invalid Line') - else - ModalResult := mrOK; - except - MessageBox(Handle, 'Invalid value. Check the entered line and press OK again.', 'Error', MB_ICONERROR); - end; -end; - -procedure TfrmGoToLine.txtLineKeyPress(Sender: TObject; var Key: Char); -begin - if Key = #13 then begin - cmdOk.Click; - Key := #0; - end; -end; - -end. diff --git a/editor/editor2/UnitfrmLoopGenerator.dfm b/editor/editor2/UnitfrmLoopGenerator.dfm deleted file mode 100755 index 2b083391..00000000 Binary files a/editor/editor2/UnitfrmLoopGenerator.dfm and /dev/null differ diff --git a/editor/editor2/UnitfrmLoopGenerator.pas b/editor/editor2/UnitfrmLoopGenerator.pas deleted file mode 100755 index e824cc9a..00000000 --- a/editor/editor2/UnitfrmLoopGenerator.pas +++ /dev/null @@ -1,66 +0,0 @@ -unit UnitfrmLoopGenerator; - -interface - -uses - SysUtils, Windows, Messages, Classes, Graphics, Controls, - StdCtrls, ExtCtrls, Forms, TFlatRadioButtonUnit, TFlatEditUnit, - TFlatButtonUnit; - -type - TfrmLoopGenerator = class(TForm) - optWhile: TFlatRadioButton; - pnlWhileCondition: TPanel; - lblWhileCondition: TLabel; - txtWhileCondition: TFlatEdit; - optFor: TFlatRadioButton; - pnlForLoop: TPanel; - lblForVariable: TLabel; - txtVariable: TFlatEdit; - lblForCondition: TLabel; - txtForCondition: TFlatEdit; - Label1: TLabel; - txtForAction: TFlatEdit; - cmdGenerate: TFlatButton; - procedure txtVariableKeyPress(Sender: TObject; var Key: Char); - procedure txtWhileConditionKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); - procedure cmdGenerateClick(Sender: TObject); - end; - -var - frmLoopGenerator: TfrmLoopGenerator; - -implementation - -{$R *.DFM} - -procedure TfrmLoopGenerator.txtVariableKeyPress(Sender: TObject; - var Key: Char); -begin - if Key = #32 then - Key := #0; -end; - -procedure TfrmLoopGenerator.txtWhileConditionKeyDown(Sender: TObject; - var Key: Word; Shift: TShiftState); -begin - if Key = 13 then - cmdGenerate.Click; -end; - -procedure TfrmLoopGenerator.cmdGenerateClick(Sender: TObject); -begin - if (txtWhileCondition.Text = '') and (optWhile.Checked) then - MessageBox(Handle, 'You forgot to enter the while condition', 'Warning', MB_ICONWARNING) - else if (optFor.Checked) then begin - if (txtVariable.Text = '') or (txtForCondition.Text = '') or (txtForAction.Text = '') then - MessageBox(Handle, 'You must fill out each field to generate a FOR-loop.', 'Warning', MB_ICONWARNING) - else - ModalResult := mrOk; - end - else - ModalResult := mrOk; -end; - -end. diff --git a/editor/editor2/UnitfrmMain.dfm b/editor/editor2/UnitfrmMain.dfm deleted file mode 100755 index 063e6db9..00000000 --- a/editor/editor2/UnitfrmMain.dfm +++ /dev/null @@ -1,5827 +0,0 @@ -object frmMain: TfrmMain - Left = 224 - Top = 333 - Width = 870 - Height = 640 - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - Icon.Data = { - 0000010001002020040000000000E80200001600000028000000200000004000 - 0000010004000000000000020000000000000000000000000000000000000000 - 000000008000008000000080800080000000800080008080000080808000C0C0 - C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF004444 - 4444444444444444444444444444444444444444444444444444444444444444 - 4444444444444444444444444444444444444444444444444444444444444444 - 44446664444444444666644444444444444CCCC644444444CCCC644444444444 - 444C88CC6444444CC88C644444444444444C888CC64444CC888C644444444444 - 444CC888CC644CC888CC4444444444444444CC888CC6CC888CC4444444444444 - 444444C888CCC888CC44444444444444444444CC888C888CC444444444444444 - 4444444CC88888CC4444444444444444444444444C888C644444444444444444 - 44444444CC888CC644444444444444444444444CC88888CC6444444444444444 - 444444CC888C888CC64444444444444444444CC888CCC888CC64444444444444 - 4444CC888CC4CC888CC6444444444444444CC888CC444CC888CC644444444444 - 444C888CC44444CC888C644444444444444C88CC4444444CC88C644444444444 - 444CCCC444444444CCCC44444444444444444444444444444444444444444444 - 4444444444444444444444444444444444446664444444446664444444444444 - 44444663BB000BB3664444444444444444444466333333366444444444444444 - 4444444466666664444444444444444444444444444444444444444444444444 - 4444444444444444444444444444444444444444444444444444444444440000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000380000000000000000000000000000000000000000000} - OldCreateOrder = False - Position = poScreenCenter - OnActivate = FormActivate - OnClose = FormClose - OnConstrainedResize = FormConstrainedResize - OnCreate = FormCreate - OnDestroy = FormDestroy - OnShow = FormShow - PixelsPerInch = 96 - TextHeight = 13 - object splFunctions: TSplitter - Left = 709 - Top = 50 - Height = 446 - Align = alRight - end - object atbToolBar: TActionToolBar - Left = 0 - Top = 24 - Width = 862 - Height = 26 - ActionManager = amMenu - AllowHiding = False - Caption = 'Toolbar' - ColorMap.HighlightColor = 14410210 - ColorMap.BtnSelectedColor = clBtnFace - ColorMap.UnusedColor = 14410210 - Spacing = 0 - end - object mmbMenu: TActionMainMenuBar - Left = 0 - Top = 0 - Width = 862 - Height = 24 - UseSystemFont = False - ActionManager = amMenu - Caption = 'Menu' - ColorMap.HighlightColor = 14410210 - ColorMap.BtnSelectedColor = clBtnFace - ColorMap.UnusedColor = 14410210 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - Spacing = 0 - end - object dtcEditor: TSciDocumentTabControl - Left = 0 - Top = 50 - Width = 709 - Height = 446 - Editor = sciEditor - Align = alClient - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - HotTrack = False - ShowHint = False - TabOrder = 2 - OnChange = dtcEditorChange - OnChanging = dtcEditorChanging - OnMouseUp = dtcEditorMouseUp - DefaultExt = '.sma' - object sciEditor: TScintilla - Left = 4 - Top = 24 - Width = 701 - Height = 418 - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -13 - Font.Name = 'Courier New' - Font.Style = [] - Align = alClient - OnModified = sciEditorModified - OnKeyUp = sciEditorKeyUp - OnKeyDown = sciEditorKeyDown - OnKeyPress = sciEditorKeyPress - OnMouseDown = sciEditorMouseDown - OnMouseUp = sciEditorMouseUp - OnMouseMove = sciEditorMouseMove - EOLStyle = eolCRLF - Indentation = [KeepIndent] - IndentWidth = 4 - MarginLeft = 1 - MarginRight = 1 - Caret.ForeColor = clWhite - Caret.LineBackColor = 16770790 - Caret.LineVisible = True - Caret.Width = 1 - Caret.Period = 500 - DivOptions.ViewWSpace = sciWsInvisible - DivOptions.UsePalette = False - DivOptions.OverType = False - DivOptions.ViewEOL = False - DivOptions.EndAtLastLine = True - DivOptions.ScrollBarH = True - DivOptions.ScrollBarV = True - ActiveHotSpot.BackColor = clDefault - ActiveHotSpot.ForeColor = clDefault - ActiveHotSpot.Underlined = False - ActiveHotSpot.SingleLine = False - Colors.SelFore = clHighlightText - Colors.SelBack = clHighlight - Colors.MarkerFore = clWhite - Colors.MarkerBack = clBtnShadow - Colors.FoldHi = clBtnFace - Colors.FoldLo = clWhite - Colors.BookMarkBack = clGray - Colors.BookMarkFore = clWhite - Gutter0.Width = 0 - Gutter0.MarginType = gutLineNumber - Gutter1.Width = 45 - Gutter1.MarginType = gutLineNumber - Gutter2.Width = 14 - Gutter2.MarginType = gutSymbol - WordWrapVisualFlags = [] - WordWrapVisualFlagsLocation = [] - LayoutCache = sciCacheCaret - HideSelect = False - WordWrap = sciNoWrap - EdgeMode = sciEdgeLine - EdgeColumn = 90 - EdgeColor = clSilver - WordChars = '_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' - ControlCharSymbol = #1 - BraceHilite = False - Folding = [foldFold, foldCompact, foldComment, foldAtElse] - FoldMarkerType = sciMarkArrows - LanguageManager.LanguageList = < - item - Name = 'null' - Lexer = 'null' - Styles = <> - Keywords = <> - AssignmentOperator = '=' - EndOfStatementOperator = ';' - CommentBoxStart = '/*' - CommentBoxEnd = '*/' - CommentBoxMiddle = '*' - CommentBlock = '//' - CommentAtLineStart = True - CommentStreamStart = '/*' - CommentStreamEnd = '*/' - NumStyleBits = 5 - end - item - Name = 'SMALL' - Lexer = 'cppnocase' - Styles = < - item - FontSize = 0 - FontStyles = [] - ForeColor = clGreen - CharCase = CASE_MIXED - Name = 'Comment' - StyleNumber = 1 - end - item - FontSize = 0 - FontStyles = [] - ForeColor = clTeal - CharCase = CASE_MIXED - Name = 'Directives' - StyleNumber = 9 - end - item - FontSize = 0 - FontStyles = [] - ForeColor = clNavy - CharCase = CASE_MIXED - Name = 'Operators' - StyleNumber = 10 - end - item - FontSize = 0 - FontStyles = [] - ForeColor = clBlue - CharCase = CASE_MIXED - Name = 'Strings' - StyleNumber = 6 - end - item - FontSize = 0 - FontStyles = [] - ForeColor = clRed - CharCase = CASE_MIXED - Name = 'General' - StyleNumber = 16 - end - item - FontSize = 0 - FontStyles = [] - ForeColor = clGreen - CharCase = CASE_MIXED - Name = 'Comment 1' - StyleNumber = 2 - end - item - FontSize = 0 - FontStyles = [fsBold, fsUnderline] - ForeColor = clNavy - CharCase = CASE_MIXED - Name = 'Brackets' - StyleNumber = 34 - end - item - FontSize = 0 - FontStyles = [] - CharCase = CASE_MIXED - Name = 'Comment 2' - StyleNumber = 1 - end - item - FontSize = 0 - FontStyles = [] - CharCase = CASE_MIXED - Name = 'Comment 3' - StyleNumber = 3 - end> - Keywords = < - item - KeywordListNumber = 1 - Name = 'Keywords' - Keywords.Strings = ( - '_jghg_enums' - 'tfc_clearmodel' - 'tfc_getbammo' - 'tfc_setbammo' - 'tfc_setmodel' - 'AddMenuItem' - 'AttachView' - 'CreateEntity' - 'DF_Blocked' - 'DF_ClientCommand' - 'DF_ClientConnect' - 'DF_ClientDisconnect' - 'DF_ClientKill' - 'DF_ClientPutInServer' - 'DF_ClientUserInfoChanged' - 'DF_CreateInstancedBaseline' - 'DF_GameInit' - 'DF_GetGameDescription' - 'DF_GetHullBounds' - 'DF_MetaFunc_CallGameEntity' - 'DF_PM_FindTextureType' - 'DF_ParmsChangeLevel' - 'DF_ParmsNewLevel' - 'DF_PlayerPostThink' - 'DF_PlayerPreThink' - 'DF_RegisterEncoders' - 'DF_ServerDeactivate' - 'DF_SetAbsBox' - 'DF_Spawn' - 'DF_SpectatorConnect' - 'DF_SpectatorDisconnect' - 'DF_SpectatorThink' - 'DF_StartFrame' - 'DF_Sys_Error' - 'DF_Think' - 'DF_Touch' - 'DF_Use' - 'DF_pfnAllowLagCompensation' - 'DispatchKeyValue' - 'DispatchSpawn' - 'EF_AllocString' - 'EF_AngleVectors' - 'EF_AnimationAutomove' - 'EF_BuildSoundMSG' - 'EF_CanSkipPlayer' - 'EF_ChangeLevel' - 'EF_ChangePitch' - 'EF_ChangeYaw' - 'EF_CheckVisibility' - 'EF_CreateEntity' - 'EF_CreateFakeClient' - 'EF_CreateNamedEntity' - 'EF_CrosshairAngle' - 'EF_DecalIndex' - 'EF_DropToFloor' - 'EF_EmitAmbientSound' - 'EF_EmitSound' - 'EF_EntIsOnFloor' - 'EF_EntitiesInPVS' - 'EF_FadeClientVolume' - 'EF_FindClientInPVS' - 'EF_FindEntityByString' - 'EF_FindEntityInSphere' - 'EF_FreeEntPrivateData' - 'EF_GetAimVector' - 'EF_GetAttachment' - 'EF_GetBonePosition' - 'EF_GetClientListening' - 'EF_GetCurrentPlayer' - 'EF_GetEntityIllum' - 'EF_GetPhysicsInfoString' - 'EF_GetPhysicsKeyValue' - 'EF_InfoKeyValue' - 'EF_LightStyle' - 'EF_MakeStatic' - 'EF_MakeVectors' - 'EF_MessageBegin' - 'EF_ModelFrames' - 'EF_ModelIndex' - 'EF_MoveToOrigin' - 'EF_NumberOfEntities' - 'EF_ParticleEffect' - 'EF_PlaybackEvent' - 'EF_PointContents' - 'EF_PrecacheEvent' - 'EF_PrecacheGeneric' - 'EF_PrecacheModel' - 'EF_PrecacheSound' - 'EF_RegUserMsg' - 'EF_RemoveEntity' - 'EF_RunPlayerMove' - 'EF_SetClientKeyValue' - 'EF_SetClientListening' - 'EF_SetClientMaxspeed' - 'EF_SetGroupMask' - 'EF_SetKeyValue' - 'EF_SetModel' - 'EF_SetOrigin' - 'EF_SetPhysicsKeyValue' - 'EF_SetSize' - 'EF_SetView' - 'EF_StaticDecal' - 'EF_SzFromIndex' - 'EF_Time' - 'EF_TraceHull' - 'EF_TraceLine' - 'EF_TraceModel' - 'EF_TraceMonsterHull' - 'EF_TraceSphere' - 'EF_TraceTexture' - 'EF_TraceToss' - 'EF_VecToAngles' - 'EF_VecToYaw' - 'EF_WalkMove' - 'EF_WriteAngle' - 'EF_WriteCoord' - 'ENT_SetModel' - 'ENT_SetOrigin' - 'Entvars_Get_Byte' - 'Entvars_Get_Edict' - 'Entvars_Get_Float' - 'Entvars_Get_Int' - 'Entvars_Get_String' - 'Entvars_Get_Vector' - 'Entvars_Set_Byte' - 'Entvars_Set_Edict' - 'Entvars_Set_Float' - 'Entvars_Set_Int' - 'Entvars_Set_String' - 'Entvars_Set_Vector' - 'FVecIVec' - 'FakeTouch' - 'FindEntity' - 'GetMessageBlock' - 'HLTime' - 'IVecFVec' - 'MessageBlock' - 'PointContents' - 'RadiusDamage' - 'RemoveEntity' - 'ServerFrame' - 'SetSpeak' - 'SetView' - 'TraceLn' - 'TraceNormal' - 'VecDist' - 'VecLength' - 'VecToAngles' - 'VelocityByAim' - 'ViewContents' - 'access' - 'add' - 'angle_vector' - 'attach_view' - 'bomb_defused' - 'bomb_defusing' - 'bomb_explode' - 'bomb_planted' - 'bomb_planting' - 'build_path' - 'call_think' - 'callfunc_begin' - 'callfunc_end' - 'callfunc_push_float' - 'callfunc_push_floatrf' - 'callfunc_push_int' - 'callfunc_push_intrf' - 'callfunc_push_str' - 'change_task' - 'clamp' - 'client_PostThink' - 'client_PreThink' - 'client_authorized' - 'client_built' - 'client_changeclass' - 'client_changeteam' - 'client_cmd' - 'client_command' - 'client_connect' - 'client_damage' - 'client_damage' - 'client_damage' - 'client_damage' - 'client_death' - 'client_death' - 'client_death' - 'client_death' - 'client_disconnect' - 'client_impulse' - 'client_infochanged' - 'client_kill' - 'client_print' - 'client_putinserver' - 'client_score' - 'client_spawn' - 'cmd_access' - 'cmd_target' - 'colored_menus' - 'console_cmd' - 'console_print' - 'const' - 'AMXX_VERSION_STR[]="1' - 'contain' - 'containi' - 'copy' - 'copy_keyvalue' - 'copyc' - 'create_entity' - 'cs_get_hostage_foll' - 'cs_get_hostage_id' - 'cs_get_no_knives' - 'cs_get_user_bpammo' - 'cs_get_user_buyzone' - 'cs_get_user_deaths' - 'cs_get_user_defuse' - 'cs_get_user_driving' - 'cs_get_user_hasprim' - 'cs_get_user_model' - 'cs_get_user_money' - 'cs_get_user_nvg' - 'cs_get_user_plant' - 'cs_get_user_stationary' - 'cs_get_user_team' - 'cs_get_user_tked' - 'cs_get_user_vip' - 'cs_get_weapon_ammo' - 'cs_get_weapon_burst' - 'cs_get_weapon_id' - 'cs_get_weapon_silen' - 'cs_reset_user_model' - 'cs_set_hostage_foll' - 'cs_set_no_knives' - 'cs_set_user_bpammo' - 'cs_set_user_deaths' - 'cs_set_user_defuse' - 'cs_set_user_model' - 'cs_set_user_money' - 'cs_set_user_nvg' - 'cs_set_user_plant' - 'cs_set_user_team' - 'cs_set_user_tked' - 'cs_set_user_vip' - 'cs_set_weapon_ammo' - 'cs_set_weapon_burst' - 'cs_set_weapon_silen' - 'cstrike_running' - 'current_num_ents' - 'custom_weapon_add' - 'custom_weapon_add' - 'custom_weapon_add' - 'custom_weapon_add' - 'custom_weapon_dmg' - 'custom_weapon_dmg' - 'custom_weapon_dmg' - 'custom_weapon_dmg' - 'custom_weapon_shot' - 'custom_weapon_shot' - 'custom_weapon_shot' - 'custom_weapon_shot' - 'cvar_exists' - 'date' - 'dbi_close' - 'dbi_connect' - 'dbi_error' - 'dbi_field' - 'dbi_free_result' - 'dbi_nextrow' - 'dbi_num_rows' - 'dbi_query' - 'dbi_result' - 'dbi_type' - 'delete_file' - 'dllfunc' - 'dod_get_map_info' - 'dod_get_next_class' - 'dod_get_pl_deaths' - 'dod_get_pl_teamname' - 'dod_get_pronestate' - 'dod_get_team_score' - 'dod_get_user_ammo' - 'dod_get_user_class' - 'dod_get_user_kills' - 'dod_get_user_score' - 'dod_get_user_weapon' - 'dod_is_deployed' - 'dod_is_randomclass' - 'dod_make_deathmsg' - 'dod_set_fuse' - 'dod_set_pl_deaths' - 'dod_set_pl_teamname' - 'dod_set_stamina' - 'dod_set_user_ammo' - 'dod_set_user_class' - 'dod_set_user_kills' - 'dod_set_user_score' - 'dod_set_user_team' - 'dod_user_kill' - 'dod_wpnlog_to_id' - 'dod_wpnlog_to_name' - 'drop_to_floor' - 'emit_sound' - 'engclient_cmd' - 'engclient_print' - 'engfunc' - 'entity_count' - 'entity_get_byte' - 'entity_get_edict' - 'entity_get_float' - 'entity_get_int' - 'entity_get_string' - 'entity_get_vector' - 'entity_range' - 'entity_set_byte' - 'entity_set_edict' - 'entity_set_float' - 'entity_set_int' - 'entity_set_model' - 'entity_set_origin' - 'entity_set_size' - 'entity_set_string' - 'entity_set_vector' - 'equal' - 'equali' - 'fake_touch' - 'fakedamage' - 'fclose' - 'feof' - 'fflush' - 'fgetc' - 'fgetf' - 'fgeti' - 'fgetl' - 'fgets' - 'file_exists' - 'file_size' - 'filesize' - 'find_ent' - 'find_ent_by_class' - 'find_ent_by_model' - 'find_ent_by_owner' - 'find_ent_by_target' - 'find_ent_by_tname' - 'find_ent_in_sphere' - 'find_ent_sphere' - 'find_entity' - 'find_player' - 'find_plugin_bydesc' - 'find_plugin_byfile' - 'find_sphere_class' - 'float' - 'floatabs' - 'floatacos' - 'floatadd' - 'floatasin' - 'floatatan' - 'floatatan2' - 'floatcmp' - 'floatcos' - 'floatdiv' - 'floatfract' - 'floatlog' - 'floatmul' - 'floatpower' - 'floatround' - 'floatsin' - 'floatsqroot' - 'floatstr' - 'floatsub' - 'floattan' - 'fopen' - 'force_unmodified' - 'force_use' - 'format' - 'format_args' - 'format_time' - 'forward_return' - 'fputc' - 'fputf' - 'fputi' - 'fputl' - 'fputs' - 'fread' - 'fscanf' - 'fseek' - 'ftell' - 'funcidx' - 'fwrite' - 'geoip_code2' - 'geoip_code3' - 'geoip_country' - 'get_basedir' - 'get_brush_entity_origin' - 'get_build' - 'get_class' - 'get_clcmd' - 'get_clcmdsnum' - 'get_client_listen' - 'get_concmd' - 'get_concmdsnum' - 'get_configsdir' - 'get_customdir' - 'get_cvar_flags' - 'get_cvar_float' - 'get_cvar_num' - 'get_cvar_string' - 'get_datadir' - 'get_decal_index' - 'get_distance' - 'get_entity_distance' - 'get_entity_flags' - 'get_entity_origin' - 'get_entity_velocity' - 'get_entity_visibility' - 'get_filename' - 'get_flags' - 'get_gametime' - 'get_global_edict' - 'get_global_float' - 'get_global_int' - 'get_global_string' - 'get_global_vector' - 'get_grenade' - 'get_grenade_id' - 'get_grenade_index' - 'get_hostage_id' - 'get_info_keybuffer' - 'get_keyvalue' - 'get_lang' - 'get_langsnum' - 'get_localinfo' - 'get_logfile' - 'get_mapname' - 'get_mask' - 'get_max_entities' - 'get_maxplayers' - 'get_maxspeed' - 'get_modname' - 'get_module' - 'get_modulesnum' - 'get_msg_arg_float' - 'get_msg_arg_int' - 'get_msg_arg_string' - 'get_msg_args' - 'get_msg_argtype' - 'get_msg_block' - 'get_msg_origin' - 'get_owner' - 'get_pdata' - 'get_pdata_char' - 'get_pdata_float' - 'get_pdata_int' - 'get_pdata_short' - 'get_players' - 'get_playersnum' - 'get_plugin' - 'get_pluginsnum' - 'get_private_f' - 'get_private_i' - 'get_range' - 'get_res' - 'get_spawn' - 'get_speak' - 'get_special' - 'get_speed' - 'get_speedchange' - 'get_srvcmd' - 'get_srvcmdsnum' - 'get_stats' - 'get_stats' - 'get_stats' - 'get_stats' - 'get_stats2' - 'get_statsnum' - 'get_statsnum' - 'get_statsnum' - 'get_statsnum' - 'get_string' - 'get_systime' - 'get_time' - 'get_timeleft' - 'get_tr' - 'get_user_aiming' - 'get_user_ammo' - 'get_user_armor' - 'get_user_astats' - 'get_user_astats' - 'get_user_astats' - 'get_user_astats' - 'get_user_attacker' - 'get_user_authid' - 'get_user_button' - 'get_user_deaths' - 'get_user_flags' - 'get_user_frags' - 'get_user_godmode' - 'get_user_gravity' - 'get_user_health' - 'get_user_hitzones' - 'get_user_index' - 'get_user_info' - 'get_user_ip' - 'get_user_lstats' - 'get_user_maxspeed' - 'get_user_menu' - 'get_user_money' - 'get_user_msgid' - 'get_user_msgname' - 'get_user_name' - 'get_user_noclip' - 'get_user_oldbutton' - 'get_user_origin' - 'get_user_ping' - 'get_user_rstats' - 'get_user_rstats' - 'get_user_rstats' - 'get_user_rstats' - 'get_user_stats' - 'get_user_stats' - 'get_user_stats' - 'get_user_stats' - 'get_user_stats2' - 'get_user_team' - 'get_user_time' - 'get_user_userid' - 'get_user_velocity' - 'get_user_vstats' - 'get_user_vstats' - 'get_user_vstats' - 'get_user_vstats' - 'get_user_weapon' - 'get_user_weapons' - 'get_user_wlstats' - 'get_user_wlstats' - 'get_user_wrstats' - 'get_user_wrstats' - 'get_user_wrstats' - 'get_user_wrstats' - 'get_user_wstats' - 'get_user_wstats' - 'get_user_wstats' - 'get_user_wstats' - 'get_usercmd' - 'get_vaultdata' - 'get_weaponname' - 'get_xvar_float' - 'get_xvar_id' - 'get_xvar_num' - 'getarg' - 'getkey_float' - 'getkey_int' - 'getkey_string' - 'give_item' - 'globals_get_edict' - 'globals_get_float' - 'globals_get_int' - 'globals_get_string' - 'globals_get_vector' - 'gpglobals_v' - 'gpgobals_time' - 'grenade_throw' - 'grenade_throw' - 'halflife_time' - 'has_weapon' - 'heapspace' - 'in_list_float' - 'in_list_int' - 'in_list_string' - 'inconsistent_file' - 'is_combat' - 'is_dedicated_server' - 'is_ent_valid' - 'is_entity' - 'is_jit_enabled' - 'is_linux_server' - 'is_map_valid' - 'is_module_loaded' - 'is_plugin_loaded' - 'is_running' - 'is_user_admin' - 'is_user_alive' - 'is_user_bot' - 'is_user_connected' - 'is_user_connecting' - 'is_user_hltv' - 'is_valid_ent' - 'isalnum' - 'isalpha' - 'isdigit' - 'isspace' - 'jghg2_set_size' - 'jghg2_think' - 'jghg_find_ent_owner' - 'keytable_clear' - 'keytable_count' - 'keytable_delete' - 'keytable_getkey' - 'keytable_getval' - 'keytable_next' - 'keytable_reset' - 'lang_exists' - 'list_clear' - 'list_clear_float' - 'list_clear_int' - 'list_clear_string' - 'list_delete' - 'list_delete_float' - 'list_delete_int' - 'list_delete_string' - 'list_get' - 'list_get_float' - 'list_get_int' - 'list_get_string' - 'list_getf' - 'list_next' - 'list_next_float' - 'list_next_int' - 'list_next_string' - 'list_pop' - 'list_pop_float' - 'list_pop_int' - 'list_pop_string' - 'list_push_float' - 'list_push_int' - 'list_push_string' - 'list_reset' - 'list_reset_float' - 'list_reset_int' - 'list_reset_string' - 'list_size' - 'list_size_float' - 'list_size_int' - 'list_size_string' - 'list_store_float' - 'list_store_int' - 'list_store_string' - 'log_amx' - 'log_message' - 'log_to_file' - 'make_deathmsg' - 'make_string' - 'max' - 'md5' - 'md5_file' - 'message_begin' - 'message_end' - 'min' - 'msg_args' - 'msg_data' - 'msg_data_type' - 'msg_dest' - 'msg_loc' - 'msg_name' - 'msg_set_f' - 'msg_set_i' - 'msg_set_s' - 'msg_strdata' - 'msg_type' - 'mysql_close' - 'mysql_connect' - 'mysql_error' - 'mysql_getfield' - 'mysql_nextrow' - 'mysql_query' - 'new_float_list' - 'new_int_list' - 'new_keytable' - 'new_list' - 'new_string_list' - 'ns2amx_getammo' - 'ns2amx_getenergy' - 'ns2amx_gethives' - 'ns2amx_getjpfuel' - 'ns2amx_giveitem' - 'ns2amx_inrange' - 'ns2amx_isdigesting' - 'ns2amx_moveto' - 'ns2amx_nspopup' - 'ns2amx_setammo' - 'ns2amx_setenergy' - 'ns2amx_setjpfuel' - 'ns2amx_setres' - 'ns2amx_version' - 'ns_get_build' - 'ns_get_class' - 'ns_get_deaths' - 'ns_get_energy' - 'ns_get_exp' - 'ns_get_hive_trait' - 'ns_get_jpfuel' - 'ns_get_mask' - 'ns_get_maxspeed' - 'ns_get_points' - 'ns_get_res' - 'ns_get_score' - 'ns_get_spawn' - 'ns_get_speedchange' - 'ns_get_struct_owner' - 'ns_get_weap_clip' - 'ns_get_weap_dmg' - 'ns_get_weap_range' - 'ns_get_weap_reserve' - 'ns_give_item' - 'ns_has_weapon' - 'ns_is_combat' - 'ns_popup' - 'ns_set_deaths' - 'ns_set_energy' - 'ns_set_exp' - 'ns_set_fov' - 'ns_set_hive_trait' - 'ns_set_jpfuel' - 'ns_set_mask' - 'ns_set_player_body' - 'ns_set_player_model' - 'ns_set_player_skin' - 'ns_set_points' - 'ns_set_res' - 'ns_set_score' - 'ns_set_speedchange' - 'ns_set_struct_owner' - 'ns_set_weap_clip' - 'ns_set_weap_dmg' - 'ns_set_weap_range' - 'ns_set_weap_reserve' - 'num_to_str' - 'num_to_word' - 'numargs' - 'number_of_entities' - 'numtostr' - 'parse' - 'parse_loguser' - 'parse_time' - 'pause' - 'pev' - 'pev_f' - 'pev_i' - 'pfn_keyvalue' - 'pfn_playbackevent' - 'pfn_spawn' - 'pfn_think' - 'pfn_touch' - 'playback_event' - 'plugin_cfg' - 'plugin_end' - 'plugin_flags' - 'plugin_init' - 'plugin_log' - 'plugin_modules' - 'plugin_pause' - 'plugin_precache' - 'plugin_unpause' - 'point_contents' - 'power' - 'precache_event' - 'precache_generic' - 'precache_model' - 'precache_sound' - 'radius_damage' - 'random' - 'random_float' - 'random_num' - 'read_argc' - 'read_args' - 'read_argv' - 'read_data' - 'read_datanum' - 'read_dir' - 'read_file' - 'read_flags' - 'read_logargc' - 'read_logargv' - 'read_logdata' - 'regex_free' - 'regex_match' - 'regex_substr' - 'register_changelvl' - 'register_clcmd' - 'register_clientkill' - 'register_concmd' - 'register_cvar' - 'register_dictionary' - 'register_event' - 'register_forward' - 'register_impulse' - 'register_logevent' - 'register_menu' - 'register_menucmd' - 'register_menuid' - 'register_message' - 'register_msgblock' - 'register_msgedit' - 'register_playback' - 'register_plugin' - 'register_srvcmd' - 'register_statsfwd' - 'register_statsfwd' - 'register_statsfwd' - 'register_think' - 'register_touch' - 'remove_cvar_flags' - 'remove_entity' - 'remove_entity_name' - 'remove_quotes' - 'remove_task' - 'remove_user_flags' - 'remove_vaultdata' - 'replace' - 'require_module' - 'reset_user_wstats' - 'reset_user_wstats' - 'reset_user_wstats' - 'reset_user_wstats' - 'rewind' - 'server_changelevel' - 'server_cmd' - 'server_exec' - 'server_frame' - 'server_print' - 'set_client_listen' - 'set_cvar_flags' - 'set_cvar_float' - 'set_cvar_num' - 'set_cvar_string' - 'set_entity_flags' - 'set_entity_origin' - 'set_entity_velocity' - 'set_entity_visibility' - 'set_hudmessage' - 'set_kvhandled' - 'set_lights' - 'set_localinfo' - 'set_mask' - 'set_msg_arg_float' - 'set_msg_arg_int' - 'set_msg_arg_string' - 'set_msg_block' - 'set_pdata' - 'set_pdata_char' - 'set_pdata_float' - 'set_pdata_int' - 'set_pdata_short' - 'set_pev' - 'set_pev_f' - 'set_pev_i' - 'set_player_body' - 'set_player_model' - 'set_player_skin' - 'set_private_f' - 'set_private_i' - 'set_rendering' - 'set_size' - 'set_speak' - 'set_speedchange' - 'set_task' - 'set_tr' - 'set_user_armor' - 'set_user_deaths' - 'set_user_flags' - 'set_user_footsteps' - 'set_user_frags' - 'set_user_godmode' - 'set_user_gravity' - 'set_user_health' - 'set_user_hitzones' - 'set_user_info' - 'set_user_maxspeed' - 'set_user_money' - 'set_user_noclip' - 'set_user_origin' - 'set_user_rendering' - 'set_user_velocity' - 'set_usercmd' - 'set_vaultdata' - 'set_view' - 'set_xvar_float' - 'set_xvar_num' - 'setarg' - 'setc' - 'show_activity' - 'show_hudmessage' - 'show_menu' - 'show_motd' - 'socket_change' - 'socket_close' - 'socket_open' - 'socket_recv' - 'socket_send' - 'spawn' - 'sqroot' - 'store_float' - 'store_int' - 'store_string' - 'str_to_num' - 'strbreak' - 'string' - 'strip_user_weapons' - 'strlen' - 'strpack' - 'strtok' - 'strtolower' - 'strtonum' - 'strtoupper' - 'strunpack' - 'supercede' - 'swapchars' - 'take_damage' - 'task_exists' - 'tfc_getweaponbammo' - 'tfc_isgrenade' - 'tfc_setpddata' - 'tfc_setweaponbammo' - 'tfc_userkill' - 'tickcount' - 'time' - 'tolower' - 'toupper' - 'trace_hull' - 'trace_line' - 'trace_normal' - 'traceresult' - 'trim' - 'ts_createpwup' - 'ts_getkillingstreak' - 'ts_getusercash' - 'ts_getuseritems' - 'ts_getuserkillflags' - 'ts_getuserlastfrag' - 'ts_getuserpwup' - 'ts_getuserspace' - 'ts_getuserwpn' - 'ts_givepwup' - 'ts_giveweapon' - 'ts_setpddata' - 'ts_wpnlogtoid' - 'ts_wpnlogtoname' - 'ucfirst' - 'unlink' - 'unpause' - 'use' - 'user_has_weapon' - 'user_kill' - 'user_silentkill' - 'user_slap' - 'user_spawn' - 'vaultdata_exists' - 'vector_distance' - 'vector_length' - 'vector_to_angle' - 'velocity_by_aim' - 'vexd_pfntouch' - 'write_angle' - 'write_byte' - 'write_char' - 'write_coord' - 'write_entity' - 'write_file' - 'write_long' - 'write_short' - 'write_string' - 'xmod_get_maxweapons' - 'xmod_get_maxweapons' - 'xmod_get_maxweapons' - 'xmod_get_maxweapons' - 'xmod_get_stats_size' - 'xmod_get_stats_size' - 'xmod_get_stats_size' - 'xmod_get_stats_size' - 'xmod_get_wpnlogname' - 'xmod_get_wpnlogname' - 'xmod_get_wpnlogname' - 'xmod_get_wpnlogname' - 'xmod_get_wpnname' - 'xmod_get_wpnname' - 'xmod_get_wpnname' - 'xmod_get_wpnname' - 'xmod_is_custom_wpn' - 'xmod_is_custom_wpn' - 'xmod_is_custom_wpn' - 'xmod_is_melee_wpn' - 'xmod_is_melee_wpn' - 'xmod_is_melee_wpn' - 'xmod_is_melee_wpn' - 'xvar_exists' - 'ADMIN_ADMIN' - 'ADMIN_ALL' - 'ADMIN_BAN' - 'ADMIN_CFG' - 'ADMIN_CHAT' - 'ADMIN_CVAR' - 'ADMIN_IMMUNITY' - 'ADMIN_KICK' - 'ADMIN_LEVEL_A' - 'ADMIN_LEVEL_B' - 'ADMIN_LEVEL_C' - 'ADMIN_LEVEL_D' - 'ADMIN_LEVEL_E' - 'ADMIN_LEVEL_F' - 'ADMIN_LEVEL_G' - 'ADMIN_LEVEL_H' - 'ADMIN_MAP' - 'ADMIN_MENU' - 'ADMIN_PASSWORD' - 'ADMIN_RCON' - 'ADMIN_RESERVATION' - 'ADMIN_SLAY' - 'ADMIN_USER' - 'ADMIN_VOTE' - 'ALLIES' - 'AMXX_VERSION' - 'AMX_FLAG_BIGENDIAN' - 'AMX_FLAG_BROWSE' - 'AMX_FLAG_COMPACT' - 'AMX_FLAG_DEBUG' - 'AMX_FLAG_LINEOPS' - 'AMX_FLAG_NOCHECKS' - 'AMX_FLAG_RELOC' - 'ATTN_IDLE' - 'ATTN_NONE' - 'ATTN_STATIC' - 'AXIS' - 'BLOCK_NOT' - 'BLOCK_ONCE' - 'BLOCK_SET' - 'CAMERA_3RDPERSON' - 'CAMERA_NONE' - 'CAMERA_TOPDOWN' - 'CAMERA_UPLEFT' - 'CHAN_AUTO' - 'CHAN_ITEM' - 'CHAN_NETWORKVOICE_BASE' - 'CHAN_NETWORKVOICE_END' - 'CHAN_STATIC' - 'CHAN_STREAM' - 'CHAN_WEAPON' - 'CONTENTS_TRANSLUCENT' - 'CSW_AK47' - 'CSW_AUG' - 'CSW_AWP' - 'CSW_C4' - 'CSW_DEAGLE' - 'CSW_ELITE' - 'CSW_FAMAS' - 'CSW_FIVESEVEN' - 'CSW_FLASHBANG' - 'CSW_G3SG1' - 'CSW_GALI' - 'CSW_GALIL' - 'CSW_GLOCK18' - 'CSW_HEGRENADE' - 'CSW_KNIFE' - 'CSW_M249' - 'CSW_M3' - 'CSW_M4A1' - 'CSW_MAC10' - 'CSW_MP5NAVY' - 'CSW_P228' - 'CSW_P90' - 'CSW_SCOUT' - 'CSW_SG550' - 'CSW_SG552' - 'CSW_SMOKEGRENADE' - 'CSW_TMP' - 'CSW_UMP45' - 'CSW_USP' - 'CSW_XM1014' - 'DMG_ACID' - 'DMG_ALWAYSGIB' - 'DMG_BLAST' - 'DMG_BULLET' - 'DMG_BURN' - 'DMG_CLUB' - 'DMG_CRUSH' - 'DMG_DROWN' - 'DMG_DROWNRECOVER' - 'DMG_ENERGYBEAM' - 'DMG_FALL' - 'DMG_FREEZE' - 'DMG_GENERIC' - 'DMG_MORTAR' - 'DMG_NERVEGAS' - 'DMG_NEVERGIB' - 'DMG_PARALYZE' - 'DMG_POISON' - 'DMG_RADIATION' - 'DMG_SHOCK' - 'DMG_SLASH' - 'DMG_SLOWBURN' - 'DMG_SLOWFREEZE' - 'DMG_SONIC' - 'DMG_TIMEBASED' - 'DODMAX_WEAPONS' - 'EF_INVLIGHT' - 'EF_LIGHT' - 'EF_NODRAW' - 'EF_NOINTERP' - 'FCVAR_CLIENTDLL' - 'FCVAR_EXTDLL' - 'FCVAR_PRINTABLEONLY' - 'FCVAR_PROTECTED' - 'FCVAR_SPONLY' - 'FCVAR_UNLOGGED' - 'FLAG_AUTHID' - 'FLAG_IP' - 'FLAG_KICK' - 'FLAG_NOPASS' - 'FLAG_TAG' - 'FL_ALWAYSTHINK' - 'FL_BASEVELOCITY' - 'FL_CUSTOMENTITY' - 'FL_DORMANT' - 'FL_DUCKING' - 'FL_FAKECLIENT' - 'FL_FLOAT' - 'FL_FROZEN' - 'FL_GRAPHED' - 'FL_IMMUNE_LAVA' - 'FL_IMMUNE_WATER' - 'FL_KILLME' - 'FL_MONSTERCLIP' - 'FL_ONTRAIN' - 'FL_PROXY' - 'FL_SPECTATOR' - 'FL_WORLDBRUSH' - 'FMRES_HANDLED' - 'FMRES_IGNORED' - 'FMRES_OVERRIDE' - 'FMRES_SUPERCEDE' - 'FMV_CELL' - 'FMV_FLOAT' - 'FT_NEW' - 'FT_OLD' - 'FUSE_RESET' - 'FUSE_SET' - 'HIT_CHEST' - 'HIT_GENERIC' - 'HIT_HEAD' - 'HIT_LEFTARM' - 'HIT_LEFTLEG' - 'HIT_RIGHTARM' - 'HIT_RIGHTLEG' - 'HIT_STOMACH' - 'HIW_AK47' - 'HIW_AKS74U' - 'HIW_BERETTA' - 'HIW_FLASHBANG' - 'HIW_GLOCK' - 'HIW_M11' - 'HIW_M11SD' - 'HIW_M16A2' - 'HIW_M4A1' - 'HIW_MP5A4' - 'HIW_MP5SD5' - 'HIW_NATOGREN' - 'HIW_PSG1' - 'HIW_REMINGTON' - 'HIW_SPAS12' - 'HIW_TANGOGREN' - 'HIW_ZASTAVA' - 'HULL_HEAD' - 'HULL_HUMAN' - 'HULL_LARGE' - 'HULL_POINT' - 'IN_ALT1' - 'IN_ATTACK' - 'IN_ATTACK2' - 'IN_BACK' - 'IN_CANCEL' - 'IN_DUCK' - 'IN_FORWARD' - 'IN_JUMP' - 'IN_LEFT' - 'IN_MOVELEFT' - 'IN_MOVERIGHT' - 'IN_RELOAD' - 'IN_RIGHT' - 'IN_RUN' - 'IN_SCORE' - 'IN_USE' - 'LANG_PLAYER' - 'LANG_SERVER' - 'MENU_KEY_0' - 'MENU_KEY_1' - 'MENU_KEY_2' - 'MENU_KEY_3' - 'MENU_KEY_4' - 'MENU_KEY_5' - 'MENU_KEY_6' - 'MENU_KEY_7' - 'MENU_KEY_8' - 'MENU_KEY_9' - 'MOVETYPE_ANGLECLIP' - 'MOVETYPE_ANGLENOCLIP' - 'MOVETYPE_BOUNCEMISSILE' - 'MOVETYPE_FOLLOW' - 'MSG_ONE_UNRELIABLE' - 'MSG_PAS' - 'MSG_PAS_R' - 'MSG_PVS' - 'MSG_PVS_R' - 'NS_CONST_INC' - 'NS_INC' - 'PITCH_HIGH' - 'PITCH_LOW' - 'PLUGIN_CONTINUE' - 'PLUGIN_HANDLED' - 'PLUGIN_HANDLED_MAIN' - 'SEEK_CUR' - 'SEEK_END' - 'SEEK_SET' - 'SOCKET_TCP' - 'SOCKET_UDP' - 'SPEAK_ALL' - 'SPEAK_LISTENALL' - 'SPEAK_MUTED' - 'SPEAK_NORMAL' - 'STAMINA_RESET' - 'STAMINA_SET' - 'SVC_ADDANGLE' - 'SVC_CDTRACK' - 'SVC_INTERMISSION' - 'SVC_NEWUSERMSG' - 'SVC_ROOMTYPE' - 'SVC_TEMPENTITY' - 'SVC_WEAPONANIM' - 'TFCMAX_WEAPONS' - 'TSA_FLASHLIGHT' - 'TSA_LASERSIGHT' - 'TSA_SCOPE' - 'TSA_SILENCER' - 'TSITEM_KUNGFU' - 'TSITEM_SUPERJUMP' - 'TSKF_DOUBLEKILL' - 'TSKF_ISSPEC' - 'TSKF_KILLEDSPEC' - 'TSKF_SLIDINGKILL' - 'TSKF_STUNTKILL' - 'TSMAX_WEAPONS' - 'TSPWUP_ARMOR' - 'TSPWUP_DFIRERATE' - 'TSPWUP_GRENADE' - 'TSPWUP_HEALTH' - 'TSPWUP_INFAMMO' - 'TSPWUP_KUNGFU' - 'TSPWUP_RANDOM' - 'TSPWUP_SLOWMO' - 'TSPWUP_SLOWPAUSE' - 'TSPWUP_SUPERJUMP' - 'VOL_NORM' - 'XS_AMX' - 'XS_AMXX' - 'XS__LIBRELEASE' - 'assert' - 'break' - 'case' - 'char' - 'const' - 'continue' - 'default' - 'defined' - 'do' - 'else' - 'enum' - 'exit' - 'for' - 'forward' - 'goto' - 'if' - 'native' - 'new' - 'operator' - 'public' - 'return' - 'sizeof' - 'sleep' - 'static' - 'stock' - 'switch' - 'while') - end> - AssignmentOperator = '=' - EndOfStatementOperator = ';' - CommentBoxStart = '/*' - CommentBoxEnd = '*/' - CommentBoxMiddle = '*' - CommentBlock = '//' - CommentAtLineStart = True - CommentStreamStart = '/*' - CommentStreamEnd = '*/' - NumStyleBits = 5 - end - item - Name = 'container' - Lexer = 'container' - Styles = <> - Keywords = <> - AssignmentOperator = '=' - EndOfStatementOperator = ';' - CommentBoxStart = '/*' - CommentBoxEnd = '*/' - CommentBoxMiddle = '*' - CommentBlock = '//' - CommentAtLineStart = True - CommentStreamStart = '/*' - CommentStreamEnd = '*/' - NumStyleBits = 5 - end> - LanguageManager.SelectedLanguage = 'null' - FoldDrawFlags = [sciBelowIfNotExpanded] - KeyCommands = < - item - Command = 2300 - ShortCut = 40 - end - item - Command = 2301 - ShortCut = 8232 - end - item - Command = 2342 - ShortCut = 16424 - end - item - Command = 2426 - ShortCut = 41000 - end - item - Command = 2302 - ShortCut = 38 - end - item - Command = 2303 - ShortCut = 8230 - end - item - Command = 2343 - ShortCut = 16422 - end - item - Command = 2427 - ShortCut = 40998 - end - item - Command = 2415 - ShortCut = 49190 - end - item - Command = 2416 - ShortCut = 57382 - end - item - Command = 2413 - ShortCut = 49192 - end - item - Command = 2414 - ShortCut = 57384 - end - item - Command = 2304 - ShortCut = 37 - end - item - Command = 2305 - ShortCut = 8229 - end - item - Command = 2308 - ShortCut = 16421 - end - item - Command = 2309 - ShortCut = 24613 - end - item - Command = 2428 - ShortCut = 40997 - end - item - Command = 2306 - ShortCut = 39 - end - item - Command = 2307 - ShortCut = 8231 - end - item - Command = 2310 - ShortCut = 16423 - end - item - Command = 2311 - ShortCut = 24615 - end - item - Command = 2429 - ShortCut = 40999 - end - item - Command = 2390 - ShortCut = 49189 - end - item - Command = 2391 - ShortCut = 57381 - end - item - Command = 2392 - ShortCut = 49191 - end - item - Command = 2393 - ShortCut = 57383 - end - item - Command = 2331 - ShortCut = 36 - end - item - Command = 2332 - ShortCut = 8228 - end - item - Command = 2316 - ShortCut = 16420 - end - item - Command = 2317 - ShortCut = 24612 - end - item - Command = 2345 - ShortCut = 32804 - end - item - Command = 2431 - ShortCut = 40996 - end - item - Command = 2314 - ShortCut = 35 - end - item - Command = 2315 - ShortCut = 8227 - end - item - Command = 2318 - ShortCut = 16419 - end - item - Command = 2319 - ShortCut = 24611 - end - item - Command = 2347 - ShortCut = 32803 - end - item - Command = 2432 - ShortCut = 40995 - end - item - Command = 2320 - ShortCut = 33 - end - item - Command = 2321 - ShortCut = 8225 - end - item - Command = 2433 - ShortCut = 40993 - end - item - Command = 2322 - ShortCut = 34 - end - item - Command = 2323 - ShortCut = 8226 - end - item - Command = 2434 - ShortCut = 40994 - end - item - Command = 2180 - ShortCut = 46 - end - item - Command = 2177 - ShortCut = 8238 - end - item - Command = 2336 - ShortCut = 16430 - end - item - Command = 2396 - ShortCut = 24622 - end - item - Command = 2324 - ShortCut = 45 - end - item - Command = 2179 - ShortCut = 8237 - end - item - Command = 2178 - ShortCut = 16429 - end - item - Command = 2325 - ShortCut = 27 - end - item - Command = 2326 - ShortCut = 8 - end - item - Command = 2326 - ShortCut = 8200 - end - item - Command = 2335 - ShortCut = 16392 - end - item - Command = 2176 - ShortCut = 32776 - end - item - Command = 2395 - ShortCut = 24584 - end - item - Command = 2176 - ShortCut = 16474 - end - item - Command = 2011 - ShortCut = 16473 - end - item - Command = 2177 - ShortCut = 16472 - end - item - Command = 2178 - ShortCut = 16451 - end - item - Command = 2179 - ShortCut = 16470 - end - item - Command = 2013 - ShortCut = 16449 - end - item - Command = 2327 - ShortCut = 9 - end - item - Command = 2328 - ShortCut = 8201 - end - item - Command = 2329 - ShortCut = 13 - end - item - Command = 2329 - ShortCut = 8205 - end - item - Command = 2333 - ShortCut = 16491 - end - item - Command = 2334 - ShortCut = 16493 - end - item - Command = 2373 - ShortCut = 16495 - end - item - Command = 2337 - ShortCut = 16460 - end - item - Command = 2338 - ShortCut = 24652 - end - item - Command = 2455 - ShortCut = 24660 - end - item - Command = 2339 - ShortCut = 16468 - end - item - Command = 2404 - ShortCut = 16452 - end - item - Command = 2340 - ShortCut = 16469 - end - item - Command = 2341 - ShortCut = 24661 - end> - end - end - object sbInfo: TStatusBar - Left = 0 - Top = 594 - Width = 862 - Height = 19 - AutoHint = True - Panels = < - item - Text = 'Unitled.sma' - Width = 700 - end - item - Alignment = taCenter - Width = 50 - end - item - Alignment = taCenter - Text = 'Ln 1 Ch 1' - Width = 50 - end> - end - object pnlFunctions: TPanel - Left = 712 - Top = 50 - Width = 150 - Height = 446 - Align = alRight - BevelOuter = bvNone - TabOrder = 4 - object pnlSpacerTop: TPanel - Left = 0 - Top = 0 - Width = 150 - Height = 21 - Align = alTop - BevelOuter = bvNone - TabOrder = 0 - end - object trvFunctions: TTreeView - Left = 0 - Top = 21 - Width = 143 - Height = 423 - Align = alClient - Images = ilMenu - Indent = 19 - ParentShowHint = False - ShowHint = True - SortType = stText - TabOrder = 1 - OnClick = trvFunctionsClick - OnCollapsed = trvFunctionsCollapsed - OnDblClick = trvFunctionsDblClick - OnEdited = trvFunctionsEdited - OnEditing = trvFunctionsEditing - OnEnter = lvDebugEnter - OnExpanded = trvFunctionsExpanded - OnKeyDown = trvFunctionsKeyDown - Items.Data = { - 05000000220000001200000012000000FFFFFFFFFFFFFFFF0000000000000000 - 09436F6E7374616E7473200000001200000012000000FFFFFFFFFFFFFFFF0000 - 00000000000007446566696E6564220000001200000012000000FFFFFFFFFFFF - FFFF00000000000000000946756E6374696F6E73210000001200000012000000 - FFFFFFFFFFFFFFFF000000000000000008496E636C7564656422000000120000 - 0012000000FFFFFFFFFFFFFFFF0000000000000000095661726961626C6573} - end - object pnlSpacerLeft: TPanel - Left = 143 - Top = 21 - Width = 7 - Height = 423 - Align = alRight - BevelOuter = bvNone - TabOrder = 2 - OnClick = pnlSpacerLeftClick - end - object pnlSpacerBottom: TPanel - Left = 0 - Top = 444 - Width = 150 - Height = 2 - Align = alBottom - BevelOuter = bvNone - TabOrder = 3 - end - end - object lvDebug: TListView - Left = 0 - Top = 496 - Width = 862 - Height = 98 - Align = alBottom - Columns = < - item - Width = 858 - end> - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - FlatScrollBars = True - ReadOnly = True - RowSelect = True - ParentFont = False - ShowColumnHeaders = False - TabOrder = 5 - ViewStyle = vsReport - Visible = False - OnDblClick = lvDebugDblClick - OnEnter = lvDebugEnter - OnMouseDown = lvDebugMouseDown - end - object ilMenu: TImageList - Left = 826 - Top = 4 - Bitmap = { - 494C01011C001D00040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000008000000001002000000000000080 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000CD6C0B00D27010009835000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000006529130067291300672913006729130067291300672913000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000CC6802000000000000000000000000009C3B0C009C3B0C009C3B0C009C3B - 0C009C3B0C000000000000000000000000000000000000000000000000000000 - 00000000000000000000CD6C0B00E7D7A5009835000000000000000000000000 - 0000000000000000000000000000000000001583200015832000158320001583 - 2000158320001583200015832000158320001583200015832000158320001583 - 2000000000000000000000000000000000000000000000000000000000006829 - 130067291300BB4B0000BB4B0000BB4B0000BB4B0000BB4B0000BB4B00006729 - 1300672913000000000000000000000000000000000000000000000000000000 - 0000CC680200CC680200CC680200CD6904009C3B0C00F89A9400EBA15E00DA84 - 2C009C3B0C000000000000000000000000000000000000000000000000000000 - 00000000000000000000CD6C0B00E7D7A5009835000000000000000000000000 - 0000000000000000000000000000000000001583200015832000158320001583 - 2000158320001583200015832000158320001583200015832000158320001583 - 200000000000000000000000000000000000000000000000000083350B00B547 - 0100BB4A0000BB4A0000BB4A0000BB4A0000BB4A0000BB4B0000BB4B0000BB4B - 0000B54701006729130000000000000000000000000000000000000000000000 - 0000CC6802000000000000000000000000009B3A0C009C3B0C009C3A0C009B3A - 0C009C3B0C000000000000000000000000000000000000000000000000000000 - 00000000000000000000CD6C0B00E7D7A5009835000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080340C00B5470000B848 - 0000B6470000B6470000B6470000B6470000B8480000BA490000BB4B0000BB4B - 0000BB4B0000B547010067291300000000000000000000000000000000000000 - 0000CC6802000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000CD6C0B00E7D7A5009835000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000001B63 - AA00000000000000000000000000006600000066000000660000006600000066 - 00000066000000000000000000000000000000000000A7430400B6470000B346 - 0100B0450100BC550A00BF6F2C00D3844D00D3844D00C26D2700BA490000BB4B - 0000BB4B0000BB4B000068291300000000000000000000000000000000000000 - 0000CC6802000000000000000000000000009C3B0C009C3B0C009C3B0C009C3B - 0C009C3B0C000000000000000000000000000000000000000000000000000000 - 00000000000000000000CD6C0B00E7D7A5009835000000000000000000000000 - 00000000000000000000000000000000000000000000000000001B63AA001B63 - AA000000000000000000000000000066000036B0650026A144001A942C00158B - 210000660000000000000000000000000000913A0800BB4C0100BB4D0200BB4D - 0200D3844D00FBFBFB00FBFBFB00FBFBFB00FBFBFB00E3B48700B6470000BA49 - 0000BB4B0000BB4B0000BB4B0000652913000000000000000000000000000000 - 0000CC680200CC680200CC680200CC6802009C3B0C00F89A9400EBA15E00DA84 - 2C009C3B0C000000000000000000000000000000000000000000000000000000 - 00000000000000000000CD6C0B00E7D7A5009835000000000000000000000000 - 000000000000000000000000000000000000000000001B63AA005FBBBF005FBB - BF001B63AA001B63AA0000000000006600000066000000660000006600000066 - 000000660000000000000000000000000000973E0800BC550A00BC550A00BC58 - 0D00FBFBFB00E2AE7D00BE611700BC580D00BC500500AF450200B2460100B848 - 0000BB4A0000BB4B0000BB4B0000682913000000000000000000000000000000 - 0000CC6802000000000000000000000000009B3A0C009C3B0C009C3A0C009B3A - 0C009C3B0C000000000000000000000000000000000000000000000000000000 - 00000000000000000000CD6C0B00E7D7A5009835000000000000000000000000 - 0000000000000000000000000000000000001B63AA00B6D8EA007FCAC4005FBB - BF005FBBBF001B63AA0000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000973E0800C26A2100BF651C00BF63 - 1900FBFBFB00C26D2700BD5E1400BC550A00B2460100E3B48700B0450100B647 - 0000BB4A0000BB4B0000BB4B0000682913000000000000000000000000000000 - 0000CC6802000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000CD6C0B00E7D7A5009835000000000000000000000000 - 000000000000000000000000000000000000000000001B63AA00C0D6E3005FBB - BF001B63AA001B63AA0000000000006600000066000000660000006600000066 - 000000660000006600000066000000660000973E0800D48A4C00BF6F2C00C06E - 2900FBFBFB00DEA16900C26A2100BE611700BC550A00FBFBFB00E2AE7D00B547 - 0000BB4A0000BB4B0000BB4B0000682913000000000000000000000000000000 - 0000CC6802000000000000000000000000009C3B0C009C3B0C009C3B0C009C3B - 0C009C3B0C000000000000000000000000000000000000000000000000000000 - 00000000000000000000CD6C0B00E7D7A5009835000000000000000000000000 - 00000000000000000000000000000000000000000000000000001B63AA001B63 - AA000000000000000000000000000066000036B0650036B0650032AE5C0032AE - 5C0026A14400209A3700168E2400056E0800953C0700DEA16900DB9B6100D384 - 4D00EBC5A000FBFBFB00F3DEC900F2DBC400F5E7D900FBFBFB00FBFBFB00E9C0 - 9900BB4A0000BB4B0000BB4B0000682913000000000000000000000000000000 - 0000CC680200CC680200CC680200CC6802009C3B0C00F89A9400EBA15E00DA84 - 2C009C3B0C000000000000000000000000000000000000000000000000000000 - 00000000000000000000993F0800A28D75006C29070000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000001B63 - AA00000000000000000000000000006600000066000000660000006600000066 - 000000660000006600000066000000660000953C0700DD9E6500EBC5A000DB9B - 6100D8935600E3B18200EDCAA800EBC5A000F1D6BC00FBFBFB00FBFBFB00E6BB - 9100BB4A0000BB4B0000BB4B0000652913000000000000000000000000000000 - 0000CC6802000000000000000000000000009B3A0C009C3B0C009C3A0C009B3A - 0C009C3B0C000000000000000000000000000000000000000000000000000000 - 0000000000000166990001669900016699000166990001669900000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000009A3F0800EECDAD00EECD - AD00E0A87300D8935600D3844D00BF6F2C00C1671F00FBFBFB00E1AC7900BB4B - 0000BB4A0000BB4B0000682913000000000000000000000000009C3B0C009C3B - 0C009C3B0C009C3B0C009C3B0C00000000000000000000000000000000000000 - 0000000000000000000000000000000000009835000098350000983500009835 - 00009835000001669900CBE0F9001798C6001798C600016699006C2907009835 - 0000983500009835000098350000983500001583200015832000158320001583 - 2000158320001583200015832000158320001583200015832000158320001583 - 20000000000000000000000000000000000000000000953C0700DFA46D00F3DE - C900F0D4B900E0A87300D3884C00BF6F2C00C26A2100E1AA7600BC580D00BC4E - 0300BB4B0000B5470100622814000000000000000000000000009C3B0C00F89A - 9400EBA15E00DA842C009C3B0C00000000000000000000000000000000000000 - 000000000000000000000000000000000000D2701000E7D7A500E7D7A500E7D7 - A500E7D7A50001669900CFF0F800CBE0F9001798C60001669900A28D7500E7D7 - A500E7D7A500E7D7A500E7D7A500D27010001583200015832000158320001583 - 2000158320001583200015832000158320001583200015832000158320001583 - 2000000000000000000000000000000000000000000000000000953C0700DFA4 - 6D00F1D6BC00F3DEC900EBC5A000DFA67000D8935600D48A4C00BF6F2C00BC54 - 0800B5470100742F0F00000000000000000000000000000000009B3A0C009C3B - 0C009C3A0C009B3A0C009C3B0C00000000000000000000000000000000000000 - 000000000000000000000000000000000000CD6C0B00CD6C0B00CD6C0B00CD6C - 0B00CD6C0B0001669900E7F0F300CFF0F800CBE0F90001669900993F0800CD6C - 0B00CD6C0B00CD6C0B00CD6C0B00CD6C0B000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000973E - 0800A0410600E1AA7600E6BB9100E6BB9100E1AA7600D48A4C00BF6319009D40 - 07006E2C11000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000166990001669900016699000166990001669900000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000009A3F08009D4007009D4007009D4007009D40070084350B000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000A70D800000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000064707A00BCA2A3000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000A367 - 6900A3676900A3676900A3676900A3676900A3676900A3676900A3676900A367 - 6900A3676900A367690000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000076DD400197EE400076DD400076DD4001583200015832000158320001583 - 2000158320001583200015832000158320001583200015832000158320001583 - 2000000000000000000000000000000000006D8EC9001D55F30060758800C6A4 - 9F00000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000B18C - 8400F1D7B900EECFAD00EECBA100EEC99600ECC58E00EAC18B00EAC18B00EAC1 - 8B00EDC79100A36769000000000000000000000000000000000018CEF60019CB - F70000000000000000000000000000000000000000000000000000000000076D - D4002A94F3002BACF900076DD400000000001583200015832000158320001583 - 2000158320001583200015832000158320001583200015832000158320001583 - 2000000000000000000000000000000000006FB6F3006FB6F3001D55F3006075 - 8800C6A49F000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000B190 - 8900F2D8BC00F0D4B600EDCDA800EECBA100EDC79100EBC38C00E9BF8800E9BF - 8800EBC38C00A3676900000000000000000000000000000000000000000018CE - F60019CBF7000000000000000000076DD400076DD400076DD400076DD4002790 - F0002CA4F900076DD40000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000006FB6F3006FB6F3001D55 - F30060758800CBA69D0000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000B292 - 8B00F4DEC600F2D8BC00F0D4B600EECFAD00EECBA100EEC99600EBC38C00E9BF - 8800EBC38C00A367690000000000000000000000000000000000000000000000 - 000000000000000000000A70D8000E73DB002790F0004FCBF3004FCBF300238B - EE00076DD40000000000000000000000000000000000000000002066AB000000 - 0000000000000000000000000000006600000066000000660000006600000066 - 00000066000000000000000000000000000000000000000000006FB6F3006FB6 - F3001D55F30060758800BCA2A300000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000B19D - 9700F9EDDF00F7E5D000F4DEC600F2D8BC00F0D4B600EECFAD00EECBA100EBC3 - 8C00ECC58E00A367690000000000000000000000000000000000000000000000 - 00000000000010635D001176DE002CA4F9001F86E9002E9EF8002BACF9002E9E - F800076DD40000000000000000000000000000000000000000002066AB002066 - AB000000000000000000000000000066000044B65D0030AB47001E9E2F001593 - 2300006600000000000000000000000000000000000000000000000000006FB6 - F3006FB6F3006A93D500656F77000000000089878900C6A49F00D3B4A800CDA6 - 9D0000000000000000000000000000000000000000000000000000000000AFA1 - 9C00FAF2E800F8E8D600F7E5D000F4DEC600F2D8BC00F0D4B600EDCDA800EDC7 - 9100EDC79100A367690000000000000000000000000000000000000000000000 - 00000B8813001A9A2A0010635D002790F0004FCBF300197EE4001F86E9002D98 - F600076DD4000000000000000000000000002066AB002066AB004393D8004393 - D8002066AB000000000000000000006600000066000000660000006600000066 - 0000006600000000000000000000000000000000000000000000000000000000 - 00006FB6F3009EBBE10089878900BCA2A300EDE7D300FAF4D400FAF4D400FAF4 - D400E2DACC00D2AEA2000000000000000000000000000000000000000000E2AC - 9A00FCF8F300FAF2E800F8E8D600F7E5D000F4DEC600F2D8BC00F0D4B600EECB - A100EEC99600A367690000000000000000000000000000000000000000000674 - 080012911E004EB47A002EBB520010635D001F86E9002E9EF8001176DE001C82 - E700076DD4000000000000000000000000002066AB00A9C8B40092C79F004393 - D8004393D8002066AB0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000D5B9AD00D5B9AD00FCEFC500FAF4D4009EBBE10066A3E700EDE7 - D300F9F5DB00F6F2D9008987890000000000000000000000000000000000E2AC - 9A00FDFCFB00FBF5EF00FAF2E800F8E8D600F7E5D000F4DEC600F2D8BC00EDCD - A800EECBA100A367690000000000000000000000000000000000000000000A79 - 0D0033C25D001FA3340037C2660012911E0011635C00197EE4002D98F6000E73 - DB00076DD4000000000000000000000000002066AB002066AB004393D80074C1 - 86002066AB000000000000000000006600000066000000660000006600000066 - 0000006600000066000000660000006600000000000000000000000000000000 - 000000000000C6A49F00FCE6C200FCE6C200FCF4CB0088B9EC000734FB00DDD5 - CC00F9F5DB00F9F5DB00D8CCC50000000000000000000000000000000000E2AC - 9A00FDFCFB00FDFCFB00FCF8F300FAF2E800F8E8D600F7E5D000F4DEC600F1D7 - B900EDCCA500A367690000000000000000000000000000000000000000000A79 - 0D0033C25D001C9D2E000B881300057F08000279030011635C001176DE00076D - D4000000000000000000000000000000000000000000000000002066AB002066 - AB000000000000000000000000000066000050B9670044B65D0044B65D0039B0 - 510029A63F001E9E2F001797260007700B000000000000000000000000000000 - 000000000000D5B9AD00FCECC100B6A9B3006998D8003849F5000734FB0066A3 - E7007FB9F000E8DFCE00F3EED600C6A49F00000000000000000000000000E3B2 - 9600FDFCFB00FDFCFB00FDFCFB00FCF8F300FAF2E800F8E8D600F7E5D000EED0 - B200B29B9300A367690000000000000000000000000000000000000000000A79 - 0D002AB749001C9D2E0006810B00037B0500027903000279030011635C000000 - 00000000000000000000000000000000000000000000000000002066AB000000 - 0000000000000000000000000000006600000066000000660000006600000066 - 0000006600000066000000660000006600000000000000000000000000000000 - 000000000000D7BFB200FCECC1006C91D0000734FB000734FB000734FB000734 - FB000734FB009EBBE100FAF4D400C6A49F00000000000000000000000000E3B2 - 9600FDFCFB00FDFCFB00FDFCFB00FDFCFB00FBF5EF00FAF2E800F4DEC600A370 - 6F00A3706F00A367690000000000000000000000000000000000000000001291 - 1E000E8B170009851000037B0500037B0500016E0100016C01000000000018CE - F60019CBF7000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000D7BFB200FCECC100CEA79D00B6A9B30064A1E2000734FB0096BB - E600DAD1CB00F6F2D900F6F2D900C6A49F00000000000000000000000000EDCC - A500FDFCFB00FDFCFB00FDFCFB00FDFCFB00FDFCFB00FDFCFB00C4BDBC00E9BF - 8800BF774F0000000000000000000000000000000000000000001C9D2E0033C2 - 5D00067408000169020001690200016902000169020000000000000000000000 - 000018CEF60019CBF70000000000000000001583200015832000158320001583 - 2000158320001583200015832000158320001583200015832000158320001583 - 2000000000000000000000000000000000000000000000000000000000000000 - 000000000000CBA69D00FCEFC500FCECC100FCE6C2006F88C1000734FB00DAD1 - CB00FAF4D400F9F5DB00E2DACC0000000000000000000000000000000000E5BB - 8E00FBF5EF00FBF5EF00FBF5EF00FBF5EF00FBF5EF00FBF5EF00C4BDBC00B585 - 74000000000000000000000000000000000000000000137C160033C25D000985 - 1000016902000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000001583200015832000158320001583 - 2000158320001583200015832000158320001583200015832000158320001583 - 2000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000D7BFB200F9F5DB00F9F5DB00D3B4A800BCA2A300D7BF - B200FCE6C200FCF4CB00BCA2A30000000000000000000000000000000000EECF - AD00EED0B200EED0B200EED0B200EED0B200EED0B200EED0B200EED0B2000000 - 000000000000000000000000000000000000026B0300036F0500027702000169 - 0200000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000D7BFB200F6F2D900FCECC100FCECC100FCEC - C100FCDBC700D0ABA00000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000015952200026B0300000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000CBA69D00D0ABA000D7BFB200D5B9 - AD00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000078DBE00078DBE00078D - BE00078DBE00078DBE00078DBE00078DBE00078DBE00078DBE00078DBE00078D - BE00078DBE00078DBE00000000000000000000000000078DBE00078DBE00078D - BE00078DBE00078DBE00078DBE00078DBE00078DBE00078DBE00078DBE00078D - BE00078DBE00000000000000000000000000000000000000000000000000189D - C60048BDDE0060C6E10051C1E0003CB9DC004DBFDF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000095636300505C5200505C5200000000000000 - 000000000000000000000000000000000000078DBE0062CBF200078DBE00A4F6 - FD0066CEF50066CEF50066CEF50066CEF50066CEF50066CEF50066CEF50066CE - F5003AAFDA00ABF2FC00078DBE0000000000078DBE0025A0CD005FC8EE0083E1 - FB0066CDF40066CDF40066CDF40066CDF40066CDF40066CDF40066CDF40066CD - F4003AAED8001495C400000000000000000000000000000000001EA2CA0022A5 - CE007ED2EC00A2E1F90098DCF80091DBF7007BD1EB0075CFE80048BDDE000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000009863630098636300505C5200A9A2A600505C5200505C - 520000000000000000000000000000000000078DBE006BD2F700078DBE00A9F3 - FC006FD4F8006FD4F8006FD4F8006FD4F8006FD4F8006FD4F8006FD4F8006FD4 - F8003AAFDA00BEECF400078DBE0000000000078DBE004CBBE30031A8D30095EC - FB006ED4F9006ED4F9006ED4F9006ED4F9006ED4F9006ED4F9006ED4F9006ED4 - F9003FB1DB00C8F6FB00078DBE0000000000000000000000000022A5CE002DAD - D40086D6F000A2E1F90091DBF70082D3ED0059C5E10091DBF70098DCF80075CF - E800000000000000000000000000000000000000000000000000000000000000 - 00000000000098636300A8737400CF747500505C5200DDC8C900D5C8CA00A89F - A100505C5200505C52000000000000000000078DBE0072D6FA00078DBE00ABF2 - FC0079DCFA0079DCFA0079DCFA0079DCFA0079DCFA007ADDFB0079DCFA0079DC - FA0045B6DF00BEECF400078DBE0000000000078DBE0072D6F900078DBE00ACF8 - FD007ADBFA007ADBFA007ADBFA007ADBFA007ADBFA007ADBFA007ADBFA007ADB - FA0043B5DD00C8F6FB00078DBE000000000000000000000000002DADD40037B7 - DB0094DCF700B3E9FB00A2E1F90060C6E100169AC4006ECBE50094DCF70098DC - F80034B1D7000000000000000000000000000000000000000000000000000000 - 000098636300A8737400D0949500CD7D7E00505C5200C4C1C500D5C8CA00DDC8 - C900D5C8CA00BBBDC200505C5200505C5200078DBE007ADDFB00078DBE00B4F3 - FC0084E4FB0084E4FB0084E4FB0084E4FB0084E4FB0084E4FB0084E4FB0084E4 - FB0045B6DF00C3F0F700078DBE0000000000078DBE007CDDFA001495C40095EC - FB0092EAFB0086E3FB0083E1FB0083E1FB0086E3FB0083E1FB0083E1FB0086E3 - FB0049B8E000C8F6FB001495C40000000000000000000000000036B5DA0041BA - DD00B1E5F900B8EBFB00B6EBFB0082D3ED001496C00065C8E20094DCF70094DC - F70034B1D7000000000000000000000000000000000000000000000000009863 - 6300B47C7D00E5A6A600C98E9000B8878C009F696A00505C5200505C5200BBBD - C200D5C8CA00D5C8CA00ADB3BC006E676700078DBE0081E2FB00078DBE00BEF4 - FC008EECFC008EECFC008EECFC008EECFC008EECFC008EECFC008EECFC008EEC - FC004CBCE400BEF4FC00078DBE0000000000078DBE0083E1FB0043B5DD0059C4 - EA00ACF8FD008FE9FB008FE9FB008FE9FB008FE9FB008FE9FB008FE9FB008FE9 - FB004CBBE300C8F6FB00C8F6FB00078DBE0000000000000000003CB9DC0048BD - DE00B8EBFA00B8EBFB00B8EBFB00B3E9FB0060C6E10082D3ED009CDEF80094DC - F70034B1D700000000000000000000000000000000000000000098636300B47C - 7D00F6B9B900DA9D9E00BC848800C2888900C2888900D0797B0099636300505C - 5200505C5200BBBDC200A8A7AD006E676700078DBE008BEAFC00078DBE00D2F7 - FC00C8F6FC00C8F6FC00C8F6FC00C8F6FC00C8F6FC00C8F6FC00C8F6FC00C8F6 - FC00BADADF00D2F7FC00078DBE0000000000078DBE008CE7FB0078DAFA0025A0 - CD00E5F8FA00C8F6FB00C8F6FB00C8F6FB00C8F6FB00C8F6FB00C8F6FB00C8F6 - FB0095ECFB00E5F8FA00CFF6FA00078DBE00000000000000000034B3D80048BD - DE0060C6E10065C8E20065C8E20060C6E1006ECBE50086D6F000A2E1F900A2E1 - F90034B1D7000000000000000000000000000000000098636300BC848800F1C5 - C500E5A6A600A8737400C2888900D69A9B00D69A9B00C8808300D1787900CD6D - 6E0099636300505C5200505C52006E676700078DBE0094F1FD00078DBE00078D - BE00078DBE00078DBE00078DBE00078DBE00078DBE00078DBE00078DBE00078D - BE00078DBE00078DBE00078DBE0000000000078DBE0096F0FC0096F0FC001495 - C400078DBE00078DBE00078DBE00078DBE00078DBE00078DBE00078DBE00078D - BE00078DBE00078DBE00078DBE00078DBE00000000000000000034B1D70059C5 - E10041BADD0048BDDE0048BDDE0037B7DB004DBFDF0075CFE8009CDEF80086D6 - F00028A8CF000000000000000000000000000000000098636300F1C5C500F0AF - AE00A8737400C98E9000E5A6A600AAAFB70017C5F20087A1B300D1787900CD6F - 7000CD6D6E00CE6676009963630098636300078DBE009BF4FD009BF4FD009BF4 - FD009BF4FD009BF4FD009BF4FD009BF4FD009BF4FD009BF4FD009BF4FD009BF4 - FD00078CBD00000000000000000000000000078DBE009CF5FD009AF4FD009AF4 - FD009CF5FD009DF6FD009AF4FD009CF5FD009AF4FD009CF5FD009AF4FD009AF4 - FD00088DBE00000000000000000000000000000000000000000034B1D70060C6 - E100169AC4003CB9DC008FDCF60059C5E10036B5DA00189DC6002CABD10051C1 - E00022A5CE000000000000000000000000000000000098636300F3B2B200A873 - 7400C98E9000F5B7B700B0B6BE0017C5F20017C5F200A9A2A600CF7C7D00CF74 - 7500CD6D6E00CE6676009863630000000000078DBE00D2F7FC00A0F6FD00A0F6 - FD00A0F6FD00A2F7FD00A2F7FD00A0F6FD00A2F7FD00A2F7FD00A0F6FD00A2F7 - FD00078CBD00000000000000000000000000078DBE00E5F8FA00A1F9FE00A1F9 - FE00A1F9FE00A1F9FE00A1F9FE00A1F9FE00A1F9FE00A1F9FE00A1F9FE00A1F9 - FE00088DBE000000000000000000000000000000000000000000000000001196 - C0001196C0002DADD4008FDCF6008FDCF60048BDDE001196C000169AC40022A5 - CE00000000000000000000000000000000000000000098636300B8878C00DA9D - 9E00F1C5C500F4BFC00017C5F20017C5F20078A7BD0017C5F200C98E9000D178 - 7900CD6D6E0098636300000000000000000000000000078DBE00D2F7FC00A4F6 - FD00A4F6FD00A4F6FD00078DBE00078DBE00078DBE00078DBE00078DBE00078D - BE000000000000000000000000000000000000000000078DBE00E5F8FA00A4F9 - FE00A4F9FE00A4F9FE00078DBE00078DBE00078DBE00078DBE00078DBE00078D - BE00000000000000000000000000000000000000000000000000000000000000 - 0000169AC400169AC400000000003CB9DC0022A5CE001196C0001196C0000000 - 000000000000000000000000000000000000000000009F696A0098636300F6B9 - B900F1C5C500F3C2C200F5B6B500B0B6BE0017C5F200A8A7AD00C2888900D079 - 7B00986363000000000000000000000000000000000000000000078DBE00078D - BE00078DBE00078DBE0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000078DBE00078D - BE00078DBE00078DBE0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000051C1E000189DC6000000000000000000000000001196C0001196C0000000 - 00000000000000000000000000000000000000000000248531003CAD59009863 - 630098636300F6B9B900F6BDBD00F3B2B200E8A9A900DA9D9E00C88083009863 - 6300000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000028A8CF007BD1EB002CABD100000000001496C000189DC600000000000000 - 000000000000000000000000000000000000248531003FBF62003FBF620034A8 - 4D002D9B42007B61610098636300DD9FA000E8A9A900C98E9000986363000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000048BDDE007BD1EB006ECBE50048BDDE00169AC400000000000000 - 00000000000000000000000000000000000024853100248531003FBF62003AB6 - 5800248531000000000000000000986363009863630098636300000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000248531002485 - 3100000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000066676900BE988E000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000159F - C90046B9DA0062C1DE0055C1DE003DB5DA004BBEDC0000000000000000000000 - 000000000000000000000000000000000000509AD3004596E7006C757E00C49C - 9100000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000854302008340 - 0000733900006B35000068340000683400006834000068340000683400006834 - 0000683400005D2F030000000000000000000000000000000000854100008541 - 0000763A00006B350000673301006B3500006B3500006B3500006B3500006B35 - 00006B3500005B2E03000000000000000000000000000000000016A4CD0016A4 - CD007DD4EE009EE1F90097E0F80092E0F7007DD4EE0072CDE80046B9DA000000 - 0000000000000000000000000000000000004FA7EA004FA7EA004596E7006C75 - 7E00C49C91000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000AB540000D0670000BC5D - 0000BC5D0000B5590000B0570000AE550000AE550000AE550000AE550000AE55 - 0000B5590000964A00005D2F03000000000000000000AA540000CF660000CF66 - 0000B6590000B5590000AF560000AD550000AF560000AF560000AF560000AF56 - 0000B4590000964A00005B2E03000000000000000000000000001BA8D10027AF - D70081D7F000A1E3F90092E0F70081D7F00059C1DE008FE0F6009BE0F80076CF - E90000000000000000000000000000000000000000004FA7EA004FA7EA004596 - E7006C757E00C49C910000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000D0670000E7730100DA6E - 0300D46A0100D0670000D0670000BC5D0000BC5D0000BC5D0000BC5D0000BC5D - 0000BC5D0000B5590000683400000000000000000000CF660000E7740300DC6D - 0100D66A0000D0670000CF660000B6590000B6590000B6590000B6590000B659 - 0000CF660000B45900006B35000000000000000000000000000027AFD70030B2 - D90095E0F700AFE8F900A6E5FA0062C1DE00179BC3006FCBE60095E0F7009BE0 - F80033B3DA0000000000000000000000000000000000000000004FA7EA004FA7 - EA004596E7006C757E00B8948A00000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000D1680100EB760400E372 - 0300DA6E0300EC862100E9974600F0A35800E9974600E8934000BA5C0000BA5C - 0000BC5D0000AE550000683400000000000000000000D1670100EA760500E271 - 0200DC6D0100D4690000E6934100E69A4F00E69A4F00E6974900D7611900B659 - 0000B6590000AF5600006B35000000000000000000000000000030B2D9004BBE - DC00ACE4F800AFE8F900AFE8F9006CC9E4001895BC0062C1DE0095E0F70095E0 - F70033B3DA000000000000000000000000000000000000000000000000004FA7 - EA004FA7EA004596E700676A6C0000000000B08D8700C6A09300C6A09300BD98 - 8E000000000000000000000000000000000000000000D46A0100EE7F1300ED7A - 0A00F0A35800FCF8F500FCF8F500FCF8F500FCF8F500F8CA9E00BC5D0000BA5C - 0000BC5D0000AE550000683400000000000000000000D66A0000EA7E1400ED7A - 0800E7740300DF6F0100F8C99C00FCFAF800FCFAF800FCFAF800FCFAF800E69A - 4F00B6590000AF5600006B35000000000000000000000000000037B4DA004BBE - DC00AFE8F900AFE8F900AFE8F900AFE8F90062C1DE0076CFE90097E0F80095E0 - F70033B3DA000000000000000000000000000000000000000000000000000000 - 00004FA7EA00F1DBEA00C49C9100BB968C00F5E1B900FEFDE500FEFDE500FDF9 - D900DEBE9E00B38D8600000000000000000000000000D46A0100EC8D3100EE82 - 1800FCF8F500F7C08B00ED841D00EE821800DA641600D5690400BC5D0000BC5D - 0000BC5D0000AE550000683400000000000000000000D66A0000E98C3100EB81 - 1900ED7A0800E7740300E5730300EA7E1400D7611900D7611900F4BF8C00FCFA - F800B6590000AF5600006B35000000000000000000000000000030B2D9004BBE - DC0062C1DE006CC9E40066C6E20066C6E2006FCBE60084DAF2009EE1F900A1E3 - F90033B3DA000000000000000000000000000000000000000000000000000000 - 00000000000000000000CDA89600F7E7C000FDF9D900FDFBDC00FDFBDC00FEFD - E500FDFDEA00F1DBEA00B08D87000000000000000000D46A0100F2A55B00ED8A - 2900FCF8F500ED841D00E9750300E3720300DF700300F8CA9E00D0670000D067 - 0000BC5D0000B0570000683400000000000000000000D66A0000EDA45C00EA8A - 2C00EA7E1400ED7A0800F8C99C00E2710200DF6F0100D66A0000D4670A00FCFA - F800CF660000B15700006B3500000000000000000000000000002BB1D80076CF - E9001895BC001897BE0081D7F0004BBEDC0027AFD7001BA8D1002BB1D80079D2 - EC0037B4DA000000000000000000000000000000000000000000000000000000 - 00000000000000000000C6A09300F5DBAE00FBF4D300FDFBDC00FEFDE500FDFD - EA00FDFDEA00FDFDEA00CDA896000000000000000000D46A0100F6B37200EB90 - 3700FCF8F500F5AA6200EC780600EB760400E7730100FCF8F500F8C59400D168 - 0100D0670000B85B0000733900000000000000000000D66A0000F4B27200E890 - 3900EB811900F8C89900FCFAF800EA760500E5730300DF6F0100E89E5500FCFA - F800CF660000B6590000723800000000000000000000000000000000000030B2 - D9004BBEDC0076CFE90097E0F80089DDF40051C0DE00159FC9001597BF0016A4 - CD0016A4CD000000000000000000000000000000000000000000000000000000 - 000000000000C6A09300F5DDB000E6C59E00F9EECB00FEFDE000FEFDE500FDFD - EA00FDFDEA00FDFDEA00F9EECB00B8948A0000000000D46A0100F6B97E00E893 - 4000F8CA9E00FCF8F500FBE3CB00FBE3CB00FBEBDA00FCF8F500FCF8F500F9D5 - B100D66B0200BC5D0000834000000000000000000000D66A0000F5B97D00E693 - 4100FADCBE00FCFAF800FCFAF800FBE8D500FAE1C700FAE1C700FCFAF800F4BF - 8C00D96C0000CF66000085410000000000000000000000000000000000000000 - 0000000000000000000055C1DE004BBEDC004BBEDC00179BC3001597BF0016A4 - CD0016A4CD000000000000000000000000000000000000000000000000000000 - 000000000000C6A09300F5DDB000D9B89B00F5DBAE00FDF9D900FEFDE000FEFD - E500FEFDE500FEFDE000F9EECB00BB968C0000000000D46A0100F7BE8700ED9C - 4C00EB903700F6B37200F8CA9E00F8CA9E00FADEC300FCF8F500FCF8F500F9D0 - A800E3720300D0670000914800000000000000000000D66A0000F4BC8500E89E - 5500F9D8B700FCFAF800FCFAF800FAE1C700F8C99C00F8C99C00EDA45C00E271 - 0200E2710200CF66000090470000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000179BC3001597BF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000BB968C00F7E7C000E6C59E00E9CAA200F5E1B900FDF9D900FEFD - E000FDFBDC00FEFDE000F5E1B900B48E870000000000D46A0100F8C59400F5AA - 6200E9923C00EB903700ED882500ED841D00EE821800FCF8F500F7C08B00EB76 - 0400E9750300D46A01009D4D00000000000000000000D66A0000F8C79600EEA7 - 6100E8903900F8CCA100FCFAF800EA831D00EB811900ED7A0800EC780600EA76 - 0500EA760500D66A00009E4E0000000000000000000000000000000000000000 - 00001895BC001895BC00000000000000000000000000179BC3001895BC000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000DEBE9E00FEFDE500F5E1B900E9CAA200F3D5A600F7E7 - C000FBF4D300FDF9D900B69087000000000000000000D46A0100F8C79800F8C3 - 8E00F7B67800F6B06C00F2A55B00ED9C4C00EB903700F7C08B00ED7A0A00EC78 - 0600EC780600DF700300AB5400000000000000000000D66A0000F8C89900F5C2 - 9000F5B97D00F1AC6800F9D3AE00E6974900E98C3100EB811900ED7A0800EC78 - 0600EC780600E2710200AA540000000000000000000000000000000000000000 - 000030B2D900159FC900000000000000000000000000159FC9001895BC000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000B38D8600F1DBEA00FDFDEA00F3D5A600E6C59E00F2D2 - A300F7E7C000D5B39900B69087000000000000000000D46A0100F7B67800F8CA - 9E00F8CA9E00F8C59400F7BC8300F6B06C00ED9C4C00ED882500EE7D0E00EC78 - 0600EC780600E9750300B55900000000000000000000D66A0000F5B97D00F8C9 - 9C00F8CCA100F8C79600F4BC8500F4B27200E6974900EA882800ED7A0800ED7A - 0800ED7A0800E7740300B5590000000000000000000000000000000000000000 - 000046B9DA0072CDE800000000000000000000000000179BC3001597BF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000B08D8700CDA89600F5E1B900F5DEB300ECCD - A300B6908700B690870000000000000000000000000000000000DA641600EC8D - 3100EC8D3100EC8D3100ED8A2900EC862100DA641600D8670C00D66B0200D66B - 0200D66B0200D067000000000000000000000000000000000000EA7E1400E98C - 3100E98C3100E98C3100EA8A2C00EA852200EA7E1400D4670A00D96C0000D66A - 0000D66A0000CF66000000000000000000000000000000000000000000000000 - 00000000000059C1DE0079D2EC0046B9DA003DB5DA001BA8D100000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000BA958B00BB968C00B691 - 8800000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000055C1DE0055C1DE0046B9DA0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000006E3931006E382F0082422500824225006E382F006E3931000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000001079F000313AA000319B0000319B0000313AA000108A1000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000868483008684830000000000000000008684830086848300000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000001EA1CD002CAAD3001585B000000000000000 - 000000000000000000000000000000000000000000000000000000000000723A - 2D007F402600AF591100C2610600CB660100CB660100C4620400B15A10008242 - 25006E3931000000000000000000000000000000000000000000000000000106 - 9F000319B0000530C2000733C6000733C6000733C6000733C6000531C2000420 - B60001069F000000000000000000000000000000000000000000000000008684 - 8300C0BAB800B8B3B300868483008684830086848300EDEBE900868483008684 - 83008684830000000000000000000000000000000000000000000000000027A5 - CF0023A4CE001585B0001E98C2002CABD3002CABD300178AB5001587B1002CAB - D30029A7D10000000000000000000000000000000000000000007C3F2800A855 - 1400D0690300D0690300CE680200CA650100CD670100CD670100D0690300D069 - 0300A85514006E393100000000000000000000000000000000000108A100042C - C0000733C6000733C6000531C2000531C2000531C2000531C2000733C6000733 - C600042CC000020CA5000000000000000000000000000000000086848300E3E2 - E100B8B3B300B8B3B300B8B3B300505050004F4F4F0086848300CECCCC00E9E7 - E600C8C7C70086848300868483008684830000000000000000000000000027A5 - CF002CABD3002CABD3001DA0CC0020D0F8004AD7F70027A5CF005EC1DC0064C1 - DA0027A5CF000000000000000000000000000000000082422500AF591100D069 - 0300CA650100CF711500E7BF9500DD8C3A00C7620300CA650100CB660100CB66 - 0100D0690300A85514006E393100000000000000000001069F000225CC000C38 - D3000531C3000223C900042EC1000531C2000531C2000530C200042ABE00042E - C1000733C600042EC10001069F00000000000000000086848300E0DEDE00D8D5 - D500A9A4A300A9A4A300A9A4A300595858001616160012121200181818001212 - 120093888500CBCAC900868483000000000000000000178CB6001E98C2004FC2 - E1007FDFF5004FC2E1003ACBEF001DD1FA003CD5F8005DD9F60074C1D600AEE2 - ED0091E3F500178AB500000000000000000000000000974D1C00D0690300CE68 - 0200CA650100CF6E0F00F8E5D200FCF2E900DE924500C7620300CA650100CB66 - 0100CB660100D06903008242250000000000000000000219B9000836ED00022C - DE00133BD8005070F1001C3FC800042CC000042CC0000A34C7005070F1001C3F - C800042EC1000733C6000420B6000000000086848300D8D5D500D8D5D500A9A4 - A300E0DEDE00DAD8D800CDCBCB00C5BDB900B8B3B300A9A3A100777676001212 - 120014141400131313008684830093888500000000005EC1DC002CABD3004FC2 - E10096E4F5008BE2F5005DD9F60027D0F7001DD1FA0056D9F70076DEF5007FDF - F5003ACBEF002CABD30027A5CF0000000000A8551400BF600800D06D0B00D072 - 1700CF701300D2751900F6E0C900FEFDFD00FDF6F000E3A56700CA650100C964 - 0200CB660100D0690300B35B0E006E39310001069F00022EE6000635F200022D - E3005070F100FBFBFE00B8C6FB000B35CA00042EC100A1B3F700FBFBFE005070 - F100042ABE000733C6000531C2000108A10086848300D8D5D500A9A4A300F4F1 - ED00F6F3EF00F6F3EF00E9E7E600E9E7E600E5E4E300DAD8D800CCCBCB00C0BA - B800A9A3A10072717100938885008E868300000000001B91BC0023A4CE004FC2 - E1007FDFF50091E3F50070DCF5005EC1DC004FC2E1002DCFF4001DD1FA001DD1 - FA001DD1FA0020D0F8002CABD30000000000AF591100D2751900D67E2600D984 - 2D00D9842D00D9842D00F7E2CC00FEFDFD00FEFDFD00FEFDFD00E7BF9500CF6E - 0F00C9640200CE680200C46204006E393100020FAB000333F6000333F6000230 - EE000836ED0096A2FA00FBFBFE00B2C1FA00A7B9F700FBFBFE00A7B9F7001C3F - C800042EC1000531C2000733C6000313AA0086848300A9A4A300F6F3EF00F6F3 - EF00F6F3EF00E0DEDE00ADA9A900B1ACAC00C5BDB900D1CFCE00E0DEDE00E3E2 - E100D4D2D100C8C7C700AAA5A50085838300000000001A8FBA002CABD30045C7 - E9006BDBF60089BECD00979696009796960097969600979696004FC2E1001DD1 - FA001DD1FA001DD1FA001D9EC90000000000B55D0E00DD8A3700DE924500DD8F - 4000DD8F4000DE924500F8E5D200FEFDFD00FEFDFD00FEFDFD00FEFDFD00F5D8 - BC00D0721700CA650100CD6701006E382F000219B9001A44E7000635F2000434 - F5000230F000022EE60096A5FA00FBFBFE00FBFBFE00A7B9F7000632C500042C - C0000531C2000531C2000733C6000319B000000000008684830086848300F2EF - EC00C0BAB80093888500A9A3A100ADA9A900ACA7A700B1ACAC00ADA9A900B1AC - AC00CAC9C900DDDBDB00D1CFCE0086848300000000001B91BC002CABD3002CAB - D3005DD9F60097969600E2DFE300B0B4B700ACA3A200BEB2B2009796960056D9 - F7009DE3F200AEE2ED001E98C20000000000B85E0C00E4A25F00E3A56700E49F - 5900E49F5900E49F5900F9E9D900FEFDFD00FEFDFD00FEFDFD00FEFDFD00F1CD - A900CF711500CA650100CD670100723A2D00031DBE004467F7001F49EB000333 - F6000231F3000231F200A4B6F700FBFBFE00FBFBFE00B8C6FB000C36CE00042C - C0000531C2000531C2000733C6000319B0000000000000000000000000008684 - 8300C99B9700BF9B8B009F8D8500908684008280800093888500A9A4A300BBB6 - B500D8D5D500D1CFCE00868483000000000000000000178CB6001EA1CD002CAB - D30045C7E90097969600E2DFE300B0B4B700ACA3A200BEB2B200979696007FDF - F500AEE2ED0089BECD0027A5CF0000000000B15A1000E3A56700F0CBA500E3A5 - 6700E3A56700E3A56700FAECDD00FEFDFD00FEFDFD00FEFDFD00EDBE8D00C762 - 0300C9640200CE680200C46204006E3931000215B3005070F1004A6CF6000333 - F6000635F200A1B3F700FBFBFE00A4B6F70096A5FA00FBFBFE00B8C6FB001C3F - C800042EC1000632C5000733C6000313AA000000000000000000000000000000 - 0000C99B9800FBE4C900F9DAB700F0D4B600C69C9100C69C9100C99B98009A8B - 85008684830086848300000000000000000000000000000000001585B00021A3 - CE003ACBEF0097969600E2DFE300B0B4B700ACA3A200BEB2B2009796960067DA - F60064C1DA001585B0000000000000000000B55D0E00E0974D00F6DCC300F1CD - A900EEBE8D00EEBE8D00FBEEE100FEFDFD00FCF2E900E3A56700CF6A0400CA65 - 0100CB660100D0690300B15A10006E39310001069F004A6AEE0096A5FA001F49 - EB004C6EF500FBFBFE00A7B9F7000333F6000230EC0096A2FA00FBFBFE005070 - F1000226D0000B35CA000530C20001069F000000000000000000000000000000 - 0000C99B9800FBE4C900F9DBB900F9DAB700F9DAB700F6D8B600C99B98000000 - 0000000000000000000000000000000000000000000000000000000000001589 - B4001A8FBA0097969600E2DFE300B0B4B700ACA3A200BEB2B200979696001E98 - C2001B91BC0000000000000000000000000000000000CF711500F1CDA900FBEE - E100F3D4B300EEBF8E00FCF2E900FBEFE300E4A25F00D57A2000D2751900CB66 - 0100CA650100D06903007F40260000000000000000001C3FC8009EAFF90096A2 - FA002850EF004C6EF5000635F2000231F3000231F3000635F2004C6DF1000C38 - E500032CDB000C38D3000420B60000000000000000000000000000000000C99B - 9800FCECD900FCE7CF00F9E0C300F9DBB900F9DAB700C99B9800000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000097969600E2DFE300BAAFAE00AAA1A100BEB2B200979696000000 - 00000000000000000000000000000000000000000000B85E0C00DE924500F7E2 - CC00FBF1E600F4D6B700F5D8BC00E3A56700DC893500D9842D00D2751900D06B - 0700D0690300A252160070392E00000000000000000001069F004462E100B8C6 - FB009EAFF9003B60F8000635F2000333F6000333F6000333F6000231F2000836 - ED000836ED000225CC0001069F0000000000000000000000000000000000C99B - 9800FAEFE200FCECD900FBE5CC00F9E0C300F9DAB700C99B9800000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000097969600B0B4B700A6A0A00098969600A8A0A000979696000000 - 0000000000000000000000000000000000000000000000000000B35B0E00DE92 - 4500F4D6B700FBEEE100F7E2CC00F0CBA500EDBE8D00E3A56700E29C5400D57A - 2000A45315007C3F280000000000000000000000000000000000010AA4004462 - E100A7B9F700C0CCFB0096A5FA005070F1005070F1004A6CF6003B60F8001A44 - E700032AD8000108A10000000000000000000000000000000000C99B9800F6F3 - EF00F6F3EF00FAEFE200FCEAD600FCE7CF00F3D6B700C99B9800000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000097969600E0E0E300BEB2B200A6A0A000B0A5A400979696000000 - 000000000000000000000000000000000000000000000000000000000000B35B - 0E00CF711500DAA16700EABE9200F0CBA500EEC29400E0A46700D67E2600974D - 1C007C3F28000000000000000000000000000000000000000000000000000106 - 9F001C3FC8005070F100999FFA0096A2FA00A096FB005070F1001F49EB00041F - C10001069F000000000000000000000000000000000000000000C99B9800C99B - 9800C99B9800F8F2EA00FCECD900FCE7CF00C99B980000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000097969600E2DFE300E2DFE300B9B3B400A39E9E00979696000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000AF591100B55D0E00B15A1000A8551400AC581200A45315000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000001069F000219B9000321C600041FC1000215B30001069F000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000C99B9800C99B9800C99B98000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000097969600979696009796960097969600000000000000 - 0000000000000000000000000000000000000000000000000000B7818200B781 - 8200B7818200B7818200B7818200B7818200B7818200B7818200B7818200B781 - 8200B7818200B7818200B78182000000000000000000078DBE00078DBE00078D - BE00078DBE00078DBE00078DBE00078DBE00078DBE00078DBE00078DBE00078D - BE00078DBE00078DBE0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000C8A79D00F8EA - D900F4E0C800F2DABD00F2D8B300F2D4AA00F1D3A600EFCFA200EFCFA200EFCF - A200EFCFA200F0D1A100B781820000000000078DBE001A9DAA005EC7EB0084E1 - FA0066CDF20066CDF20066CDF20066CDF20066CDF20066CDF20066CDF20066CD - F20046B8D400078DBE0000000000000000000000000000000000006600000066 - 0000AAAC9C00AAAC9C00AAAC9C00AAAC9C00AAAC9C00AAAC9C00AAAC9C000066 - 000000660000000000000000000000000000000000000000000097433F009743 - 3F00C2999900C2999900C2999900C2999900C2999900C2999900C29999009230 - 2F0097433F000000000000000000000000000000000000000000C8A79D00F8EA - D900F5E4CF00F3DEC500F2D9B900F2D8B300F2D4AA00F0D1A100EECEA200EECE - A200EECEA200F0D1A100B781820000000000078DBE004BBBDD0046B8D4009BF1 - FC0072D6F80072D6F8006DD2F60072D6F80072D6F80072D6F80072D6F8006DD2 - F60048B9D90080DEF900078DBE00000000000000000000660000009800000098 - 0000E5E1E5000066000000660000E7E6E700E5E4E600E5E1E500CCCCCC000066 - 0000007D00000066000000000000000000000000000097433F00CD666600C663 - 6300E4E0E400922B2B00922B2B00E6E5E700E5E3E500E4E0E400CECACC00922B - 2B009E43410097433F0000000000000000000000000000000000C9A99E00FAF1 - E800F7E7D500F5E4CF00F3DEC500F2DABD00F2D8B300F2D4AA00F0D1A100EECE - A200EECEA200F0D1A100B781820000000000078DBE0072D6F800078DBE00ACF7 - FC007BDCFA007BDCFA007BDCFA007BDCFA007BDCFA007BDCFA007BDCFA007BDC - FA0048B9D900ACF7FC00078DBE00000000000000000000660000009800000098 - 0000E5E1E5000066000000660000E5E1E500E7E6E700E5E1E500CDCCCD000066 - 0000007D00000066000000000000000000000000000097433F00CD656600C162 - 6200E5E3E500922B2B00922B2B00E4E0E400E6E5E700E4E0E400CECBCC00922B - 2B009E43410097433F0000000000000000000000000000000000CAAEA300FBF5 - EF00F8EAD900F7E7D500F5E4CF00F3DEC500F2D9B900F2D8B300F2D4AA00F0D1 - A100EECEA200F0D1A100B781820000000000078DBE007BDCFA001396B60099F0 - FC0092EBFB0086E3FB0086E3FB0086E3FB0086E3FB0086E3FB0086E3FB0086E3 - FB0048B9D900B1F7FC00078DBE00000000000000000000660000009800000098 - 0000E5E4E6000066000000660000E4DCE500E7E6E700E5E4E600CDCCCD000066 - 0000007D00000066000000000000000000000000000097433F00CD656600C162 - 6200E5E3E500922B2B00922B2B00E4E0E400E6E5E700E6E5E700CECBCC00922B - 2B009E43410097433F0000000000000000000000000000000000CEACA800FDFA - F600FAF1E800F8EAD900F7E7D500F3E1CC00F3DEC500F2DABD00F2D8B300F2D4 - AA00F0D1A100F0D1A100B781820000000000078DBE0086E3FB0048B9D90058C3 - E700ACF7FC008FE9FB008FE9FB008FE9FB008FE9FB008FE9FB008FE9FB000C84 - 18004BBBDD00B6F7FD0066CDF200078DBE000000000000660000009800000098 - 0000E7E6E700E7E6E700E5E1E500E4DCE500E5E1E500E5E1E500CDCCCD000066 - 0000007D00000066000000000000000000000000000097433F00CD656600C162 - 6200E6E5E700E6E5E700E4E0E400E4E0E400E4E0E400E4E0E400CECBCC00922B - 2B009E43410097433F0000000000000000000000000000000000D0A9AB00FEFC - FB00FBF5EF00FAF1E800F8EAD900F7E7D500F4E0C800F3DEC500F2D9B900F2D8 - B300F2D4AA00F1D3A600B781820000000000078DBE008CE7FB0077DAF9001A9D - AA00D8F7FB00CAF6FD00CAF6FD00CAF6FD00CAF6FD00CAF6FD000C84180035BC - 73000C841800D8F7FB00D6F6FB00078DBE000000000000660000009800000098 - 0000009800000098000000980000009800000098000000980000009800000098 - 0000009800000066000000000000000000000000000097433F00CD656600C663 - 6300C8676700C6717000C6717000C86A6A00C4636300C86C6C00CA666600C463 - 6300CD65660097433F0000000000000000000000000000000000E6BDAF00FEFC - FB00FDFAF600FBF5EF00F9EDDE00F8EAD900F7E7D500F5E4CF00F3DEC500F2D9 - B900F2D8B300F2D6AF00B781820000000000078DBE0095EEFC0095EEFC001396 - B600078DBE00078DBE00078DBE00078DBE00078DBE000C84180046CC80004BCC - 98003DC374000C841800078DBE00078DBE00000000000066000000980000B4C6 - B000B4C6B000B4C6B000B4C6B000B4C6B000B4C6B000B4C6B000B4C6B000B4C6 - B000009800000066000000000000000000000000000097433F00B8646400C47C - 7B00C89E9E00CAA8A800CAA8A800CAA8A800C9A0A000C9A0A000CAA8A800CAA8 - A800CC66660097433F0000000000000000000000000000000000E6BDAF00FEFC - FB00FEFCFB00FCF8F400FBF5EF00F9EDDE00F8EAD900F7E7D500F3E1CC00F2DC - C100F2D9B900F2D8B300B781820000000000078DBE009EF4FD009FF6FD009FF6 - FD009EF4FD009FF6FD009FF6FD009EF4FD000C84180046CC800049CD890049CD - 89004BCC98003DC374000C84180000000000000000000066000000980000F8F8 - F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8 - F800009800000066000000000000000000000000000097433F00CC666600F8F8 - F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8 - F800CC66660097433F0000000000000000000000000000000000E6BDAF00FEFC - FB00FEFCFB00FEFCFB00FCF8F400FBF5EF00F9EDDE00F8EAD900F7E7D500F4E0 - C800F4E0C800F2D9B900B781820000000000078DBE00D8F7FB00A2F7FD00A2F7 - FD00A2F7FD00A2F7FD00A2F7FD000C8418000C8418000C8418000C84180049CD - 890046CC80000C8418000C8418000C841800000000000066000000980000F8F8 - F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8 - F800009800000066000000000000000000000000000097433F00CC666600F8F8 - F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8 - F800CC66660097433F0000000000000000000000000000000000E7C4AD00FEFC - FB00FEFCFB00FEFCFB00FEFCFB00FCF8F400FBF5EF00F9EDDE00F9EDDE00F8EA - D900F2DCC100CCAFA600B78182000000000000000000078DBE00D8F7FB00A5F7 - FC00A5F7FC00A5F7FC00078DBB0048B9D90048B9D90048B9D9000C84180046CC - 800035BC73000C8418000000000000000000000000000066000000980000F8F8 - F800CDCCCD00CDCCCD00CDCCCD00CDCCCD00CDCCCD00CDCCCD00CDCCCD00F8F8 - F800009800000066000000000000000000000000000097433F00CC666600F8F8 - F800CDCBCC00CDCBCC00CDCBCC00CDCBCC00CDCBCC00CDCBCC00CDCBCC00F8F8 - F800CC66660097433F0000000000000000000000000000000000E7C4AD00FEFC - FB00FEFCFB00FEFCFB00FEFCFB00FEFCFB00FCF8F400FBF5EF00F3E1CC00C6A1 - 9600C0958800BA8F8600B7818200000000000000000000000000078DBE00078D - BE00078DBE00078DBE00000000000000000000000000000000000C8418003FC6 - 79000C841800000000000000000000000000000000000066000000980000F8F8 - F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8 - F800009800000066000000000000000000000000000097433F00CC666600F8F8 - F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8 - F800CC66660097433F0000000000000000000000000000000000EACAAC00FEFC - FB00FEFCFB00FEFCFB00FEFCFB00FEFCFB00FEFCFB00FEFBF900F3DEC500C188 - 7500DF9D5600DF9D5600C58B7200000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000C84180030B8720030B8 - 72000C841800000000000000000000000000000000000066000000980000F8F8 - F800CDCCCD00CDCCCD00CDCCCD00CDCCCD00CDCCCD00CDCCCD00CDCCCD00F8F8 - F800009800000066000000000000000000000000000097433F00CC666600F8F8 - F800CDCBCC00CDCBCC00CDCBCC00CDCBCC00CDCBCC00CDCBCC00CDCBCC00F8F8 - F800CC66660097433F0000000000000000000000000000000000EACAAC00FEFC - FB00FEFCFB00FEFCFB00FEFCFB00FEFCFB00FEFCFB00FEFCFB00F3E1CC00C39A - 8D00EECEA200CD906A0000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000C84180030B872000C84 - 180000000000000000000000000000000000000000000066000000980000F8F8 - F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8 - F800009800000066000000000000000000000000000097433F00CC666600F8F8 - F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8 - F800CC66660097433F0000000000000000000000000000000000EACAAC00FCF8 - F400FCF8F400FCF8F400FCF8F400FBF5EF00FBF5EF00FBF5EF00F3E1CC00C197 - 8900C39A8D000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000C8418000C8418000C8418000C8418000000 - 000000000000000000000000000000000000000000000000000000660000F8F8 - F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8 - F80000660000000000000000000000000000000000000000000097433F00F8F8 - F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8F800F8F8 - F80097433F000000000000000000000000000000000000000000E9C8AB00EACA - AC00EACAAC00EACAAC00EACAAC00EACAAC00EACAAC00EACAAC00E6BDAF00BD85 - 7900000000000000000000000000000000000000000000000000000000000000 - 0000000000000C8418000C8418000C8418000C84180000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000A5787300A5787300A5787300A5787300A5787300A5787300A578 - 7300A5787300A57873008C5D5C00000000000000000000000000000000000000 - 00000000000000000000A4410800A4410700A23F080000000000000000000000 - 000000000000000000000000000000000000000000000000000000669A000066 - 9A0000669A00A37F7700A37F7700A37F7700A37F7700A37F7700A37F7700A37F - 7700A37F7700A37F77008F626100000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000632DE000632DE000000000000000000000000000000 - 000000000000A97B7500FCE3CA00FDE1C500FDDFC100FCDAB900FCDAB900F9D4 - B000F9D4B000F5CCA6008C5D5C00000000000000000000000000000000000000 - 000000000000A23F0800A4410800A23F0800A441080000000000000000000000 - 0000000000000000000000000000000000000000000000669A004BC3E4004BC3 - E4004BC3E400B3847600F7ECDE00FAF1E700F8EEE100F7ECDE00F7ECDE00F7EC - DE00F7ECDE00F7ECDE008F62610000000000000000000632DE000632DE000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000632DE000632DE00000000000000000000000000000000000000 - 000000000000AD7E7500FAE6D400E5A55600E5A55600E5A55600E5A55600E5A5 - 5600E5A55600F9D4B0008C5D5C00000000000000000000000000000000000000 - 000000000000A44107000000000000000000A23F0800A23F080000000000A23F - 0800A44107000000000000000000000000000000000000669A004AC5E6004BC3 - E4004BC3E400B3847600F5E7D800E3A55B00E4A55900E4A55900E4A55900E4A5 - 5900E4A55900F5E3D1008F62610000000000000000000632DE000632DE000632 - DE00000000000000000000000000000000000000000000000000000000000000 - 00000632DE000632DE0000000000000000000000000000000000000000000000 - 000000000000B5867A00FBEEE200F9E9D900FBE4CF00FCE3CA00FDE1C500FCDD - BD00FCDAB900F9D4B0008C5D5C00000000000000000000000000000000000000 - 000000000000A44107000000000000000000A23F080000000000A23F0800A23F - 0800A23F0800A441080000000000000000000000000000669A004CC7E9004AC5 - E6004BC3E400B9877500F7ECDE00F5E4D200EFDCC900EFDCC900EFDCC900EBD8 - C600EFDCC900F5E4D2008F62610000000000000000000632DE000632DD000632 - DE000632DE000000000000000000000000000000000000000000000000000632 - DE000632DE00000000000000000000000000A5787300A5787300A5787300A578 - 7300A5787300BA8C7D00FBF1E700E5A55600E5A55600E5A55600E5A55600E5A5 - 5600E5A55600FCDAB9008C5D5C00000000000000000000000000000000000000 - 000000000000A4410800A23F0800A23F0800A23F080000000000A23F08000000 - 000000000000A441070000000000000000000000000000669A0057CDED0050C9 - EA004AC5E600B9877500F9EFE400E3A55B00E4A55900E4A55900E4A55900E4A5 - 5900E4A55900F5E5D5008F6261000000000000000000000000000433ED000632 - DE000632DE000632DE00000000000000000000000000000000000632DE000632 - DE0000000000000000000000000000000000A97B7500FCE3CA00FDE1C500FDDF - C100FCDAB900BD918400FDF5ED00FBF1E700FBEEE200F9E9D900FAE6D400FCE3 - CA00FDE1C500FDDFC1008C5D5C00000000000000000000000000000000000000 - 00000000000000000000A23F0800A4410700A4410800A23F0800A44108000000 - 000000000000A23F080000000000000000000000000000669A005DD1EF0057CD - ED0053CBEB00C18C7200FAF2E900F7ECDE00F5E4D200F5E4D200F5E3D100F3E1 - CD00F5E4D200F5E9DB008F626100000000000000000000000000000000000000 - 00000632DE000632DE000632DD00000000000632DD000632DE000632DE000000 - 000000000000000000000000000000000000AD7E7500FAE6D400E5A55600E5A5 - 5600E5A55600BD918400FEF9F300E5A55600E5A55600E5A55600E5A55600E5A5 - 5600E5A55600FCE3CA008C5D5C00000000000000000000000000000000000000 - 00000000000000000000000000009E420E0091471E00A23F0800A4410700A441 - 0800A4410800A23F080000000000000000000000000000669A0065D6F20061D4 - F1005BD0EE00C6906F00FAF4EE00E3A55B00E4A55900E4A55900E4A55900E4A5 - 5900E4A55900F9EEE2008F626100000000000000000000000000000000000000 - 0000000000000632DD000533E7000533E7000533E9000632DD00000000000000 - 000000000000000000000000000000000000B5867A00FBEEE200F9E9D900FBE4 - CF00FCE3CA00DEAB8400FEFBF900FEF9F500FDF7F000FCF4EA00FBF1E700FBEE - E200F9E9D900FAE5D1008C5D5C00000000000000000000000000000000000000 - 0000000000000000000000000000917E75008E7B71007C4E3500A23F0800A23F - 0800A23F08000000000000000000000000000000000000669A006DDBF50069D9 - F40061D4F100C6906F00FBF8F400FBF6F200F9F0E600F9EFE400F8EEE100F9EE - E200F9F0E600F5E9DB008F626100000000000000000000000000000000000000 - 000000000000000000000632E4000632E4000433EF0000000000000000000000 - 000000000000000000000000000000000000BA8C7D00FBF1E700E5A55600E5A5 - 5600E5A55600DEAB8400FEFBF900FEFBF900FEF9F500FEF9F300FDF5ED00F9E9 - D900ECC5A200BD9184008C5D5C00000000000000000000000000000000000000 - 000000000000000000008E7C72009C918D008E7C72008E7C7200000000000000 - 0000000000000000000000000000000000000000000000669A0075DFF80071DD - F60069D9F400D5A58900FBF8F400FCFAF900FCFAF900FCFAF900FCFAF900B384 - 7600B3847600B3847600B3847600000000000000000000000000000000000000 - 0000000000000632DD000433ED000533E9000433EF000434F400000000000000 - 000000000000000000000000000000000000BD918400FDF5ED00FBF1E700FBEE - E200F9E9D900E2B18A00FEFBF900FEFBF900FEFBF900FEFBF800FEF9F300B281 - 7600B2817600B2817600B07F7500000000000000000000000000000000000000 - 0000000000008E7C7200C8BEBD008E7C72009D9591008E7C7200000000000000 - 0000000000000000000000000000000000000000000000669A007CE2F90078E1 - F90071DDF600D5A58900FCFAF800FCFAF900FCFAF900FCFAF900FCFAF900B384 - 7600DDA57200E2A45B0000000000000000000000000000000000000000000000 - 00000434F4000433EF000533EB0000000000000000000434F4000335F8000000 - 000000000000000000000000000000000000BD918400FEF9F300E5A55600E5A5 - 5600E5A55600E5B68E00FEFBF900FEFBF900FEFBF900FEFBF900FEFBF800B281 - 7600E5AE7000E4A3530000000000000000000000000000000000000000000000 - 00008E7C7200D3CBCB008E7C72009D959100C6BBB9008E7C7200000000000000 - 0000000000000000000000000000000000000000000000669A007EE3F9007CE2 - F90078E1F900D5A58900D9A68200D9A68200D9A68200D9A68200D9A68200B384 - 7600C6AE9A0000669A0000000000000000000000000000000000000000000335 - F8000433EF000334F800000000000000000000000000000000000335F8000335 - F80000000000000000000000000000000000DEAB8400FEFBF900FEF9F500FDF7 - F000FCF4EA00E5B68E00DEAB8400DEAB8400DEAB8400DEAB8400DEAB8400B281 - 7600E8AB5E000000000000000000000000000000000000000000000000008E7C - 7200D3CBCB008E7C7200000000008E7C7200D3CBCB008E7C7200000000000000 - 0000000000000000000000000000000000000000000000669A0088E5F9007EE3 - F9007EE3F9007EE3F90078E1F90075DFF8006DDBF50065D6F2005DD1EF0057CD - ED0053CBEB0000669A00000000000000000000000000000000000335F8000335 - F8000335F8000000000000000000000000000000000000000000000000000335 - F8000335F800000000000000000000000000DEAB8400FEFBF900FEFBF900FEF9 - F500FEF9F300FDF5ED00F9E9D900ECC5A200BD9184008C5D5C00000000000000 - 0000000000000000000000000000000000000000000000000000000000008E7C - 72008E7C720000000000000000008E7C7200D3CBCB008E7C7200000000000000 - 0000000000000000000000000000000000000000000000669A0088E5F90088E5 - F9007372720073727200737272007372720073727200737272007372720061D4 - F1005BD0EE0000669A000000000000000000000000000335F8000335F8000335 - F800000000000000000000000000000000000000000000000000000000000000 - 0000000000000335F8000000000000000000E2B18A00FEFBF900FEFBF900FEFB - F900FEFBF800FEF9F300B2817600B2817600B2817600B07F7500000000000000 - 0000000000000000000000000000000000000000000000000000000000008E7C - 72000000000000000000000000008E7C7200D3CBCB008E7C7200000000000000 - 0000000000000000000000000000000000000000000000669A0088E5F90088E5 - F90073727200D1C5BA00D1C5BA00D1C5BA00D1C5BA00C9BFB6007372720069D9 - F40061D4F10000669A0000000000000000000335F8000335F8000335F8000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000E5B68E00FEFBF900FEFBF900FEFB - F900FEFBF900FEFBF800B2817600E5AE7000E4A3530000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000008E7C72008E7C720000000000000000000000 - 000000000000000000000000000000000000000000000000000000669A000066 - 9A0073727200EBD8C600FAFAF900FCF9F700FCF9F700D1C5BA00737272000066 - 9A0000669A000000000000000000000000000335F8000335F800000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000E5B68E00DEAB8400DEAB8400DEAB - 8400DEAB8400DEAB8400B2817600E8AB5E000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000008E7C72000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000007372720073727200737272007372720073727200000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000800000000100010000000000000400000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFC7FFFFFF81FF707FC7F000FE007 - F007FC7F000FC003F707FC7FFFFF8001F7FFFC7FEE078001F707FC7FCE070000 - F007FC7F82070000F707FC7F03FF0000F7FFFC7F82000000F707FC7FCE000000 - F007FC7FEE000000F707F83FFFFF8001C1FF0000000F8001C1FF0000000FC003 - C1FF0000FFFFE007FFFFF83FFFFFF81FFFFFFFFDFFFF9FFFE003FFF0000F0FFF - E003CFE1000F07FFE003E603FFFF83FFE003FC07DE07C1FFE003F807CE07E10F - E003F0070607F003E003E00703FFF801E003E0070600F801E003E00FCE00F800 - E003E01FDE00F800E003E027FFFFF800E007C073000FF801E00F87FF000FFC01 - E01F0FFFFFFFFE03FFFF3FFFFFFFFF0FFFFFFFFF80038007E07FFE3F00010003 - C01FFC0F00010001C00FF80300010001C007F00000010001C007E00000010000 - C007C00000010000C007800000010000C007800000070007C007800100070007 - E00F8003800F800FF21F8007C3FFC3FFF39F800FFFFFFFFFF13F001FFFFFFFFF - F83F063FFFFFFFFFFFFFCFFFFFFFFFFF9FFFFFFFFFFFE07F0FFFC003C003C01F - 07FF80018001C00F83FF80018001C007C1FF80018001C007E10F80018001C007 - F00380018001C007FC0180018001C007FC0180018001E007F80080018001FC07 - F80080018001FF9FF80080018001F39FFC0180018001F39FFC0180018001F39F - FE03C003C003F83FFF8FFFFFFFFFFC7FF81FF81FF33FFE3FE007E007E007E007 - C003C003C000E007800180018001800380018001000080010000000000008001 - 0000000000008001000000008000800100000000E001800100000000F003C003 - 00000000F01FE00780018001E03FF81F80018001E03FF81FC003C003C03FF81F - E007E007C07FF81FF81FF81FF8FFFC3FC0018003FFFFFFFFC0010003C007C007 - C001000180038003C001000180038003C001000180038003C001000080038003 - C001000080038003C001000080038003C001000180038003C001000080038003 - C001800380038003C001C3C780038003C001FF8780038003C003FF8F80038003 - C007FE1FC007C007C00FF87FFFFFFFFFF801FC7FC001FFFCF801F87F80019FF9 - F801FB2780018FF3F801FB43800187E70001F85B8001C3CF0001FC1B8001F11F - 0001FE038001F83F0001FE078001FC7F0001FC3F8001F83F0001F83F8003F19F - 0003F03F8003E3CF0007E23F8003C7E7003FE63F80038FFB003FEE3F80031FFF - 007FFE7FC0073FFF00FFFEFFF83FFFFF00000000000000000000000000000000 - 000000000000} - end - object amMenu: TActionManager - ActionBars = < - item - Items = < - item - Items = < - item - Action = acNew - Caption = '&New' - ImageIndex = 30 - ShortCut = 16462 - end - item - Caption = '-' - end - item - Action = acSave - Caption = '&Save' - ImageIndex = 21 - ShortCut = 16467 - end - item - Action = acSaveAs - Caption = 'S&ave As...' - ImageIndex = 22 - end - item - Caption = '-' - end - item - Action = acOpen - Caption = '&Open' - ImageIndex = 16 - ShortCut = 16463 - end - item - Caption = '-' - end - item - Action = acClose - Caption = '&Close' - ImageIndex = 3 - ShortCut = 16430 - end - item - Action = acCloseAllFiles - Caption = 'C&lose all files' - ImageIndex = 4 - ShortCut = 24622 - end - item - Caption = '-' - end - item - Caption = '-' - end - item - Action = acExit - Caption = '&Exit' - ImageIndex = 9 - ShortCut = 16465 - end> - Caption = '&File' - end - item - Items = < - item - Action = acUndo - Caption = '&Undo' - ImageIndex = 2 - ShortCut = 16474 - end - item - Action = acRedo - Caption = '&Redo' - ImageIndex = 13 - ShortCut = 24666 - end - item - Caption = '-' - end - item - Action = acCut - Caption = '&Cut' - ImageIndex = 6 - ShortCut = 16472 - end - item - Action = acCopy - Caption = 'C&opy' - ImageIndex = 5 - ShortCut = 16451 - end - item - Action = acPaste - Caption = '&Paste' - ImageIndex = 18 - ShortCut = 16470 - end> - Caption = '&Edit' - end - item - Items = < - item - Action = acSearch - Caption = '&Search' - ImageIndex = 25 - ShortCut = 16454 - end - item - Action = acFindNext - Caption = '&Find Next...' - ImageIndex = 26 - ShortCut = 114 - end - item - Caption = '-' - end - item - Action = acReplace - Caption = '&Replace' - ImageIndex = 28 - ShortCut = 16466 - end> - Caption = '&Search' - end - item - Items = < - item - Action = acCompile - Caption = '&Compile' - ImageIndex = 19 - ShortCut = 120 - end - item - Action = acCompileAndUpload - Caption = 'C&ompile and upload' - ShortCut = 8312 - end - item - Caption = '-' - end> - Caption = '&Compile' - end - item - Items = < - item - Action = acDoc - Caption = '&AMX Mod X Documentation' - ImageIndex = 12 - ShortCut = 112 - end - item - Action = acForum - ImageIndex = 12 - ShortCut = 8304 - end - item - Caption = '-' - end - item - Action = acAbout - Caption = 'A&bout...' - ImageIndex = 14 - end> - Caption = '&Help' - end> - end - item - Items = < - item - Action = acNew - Caption = '&New' - ImageIndex = 4 - ShowCaption = False - ShortCut = 16462 - end - item - Action = acOpen - Caption = '&Open' - ImageIndex = 5 - ShowCaption = False - ShortCut = 16463 - end - item - Action = acSave - Caption = '&Save' - ImageIndex = 6 - ShowCaption = False - ShortCut = 16467 - end - item - Caption = '-' - end - item - Action = acSearch - Caption = 'S&earch' - ImageIndex = 12 - ShowCaption = False - ShortCut = 16454 - end - item - Caption = '-' - end - item - Action = acCompile - Caption = '&Compile' - ImageIndex = 8 - ShowCaption = False - ShortCut = 120 - end> - ActionBar = atbToolBar - end - item - Items = < - item - Items = < - item - Action = acNew - Caption = '&New' - ImageIndex = 4 - ShortCut = 16462 - end - item - Caption = '-' - end - item - Action = acSave - Caption = '&Save' - ImageIndex = 6 - ShortCut = 16467 - end - item - Action = acSaveAs - Caption = 'S&ave As...' - ImageIndex = 7 - end - item - Action = acSaveAll - Caption = 'Sa&ve All Files' - ShortCut = 24659 - end - item - Caption = '-' - end - item - Action = acOpen - Caption = '&Open' - ImageIndex = 5 - ShortCut = 16463 - end - item - Caption = '-' - end - item - Action = acClose - Caption = '&Close' - ShortCut = 16430 - end - item - Action = acCloseAllFiles - Caption = 'C&lose all files' - ShortCut = 24622 - end - item - Caption = '-' - end - item - Action = acExit - Caption = '&Exit' - ImageIndex = 3 - ShortCut = 16465 - end> - Caption = '&File' - end - item - Items = < - item - Caption = '-' - end - item - Action = acUndo - Caption = '&Undo' - ImageIndex = 14 - ShortCut = 16474 - end - item - Action = acRedo - Caption = '&Redo' - ImageIndex = 13 - ShortCut = 24666 - end - item - Caption = '-' - end - item - Action = acCut - Caption = '&Cut' - ImageIndex = 1 - ShortCut = 16472 - end - item - Action = acCopy - Caption = 'C&opy' - ImageIndex = 0 - ShortCut = 16451 - end - item - Action = acPaste - Caption = '&Paste' - ImageIndex = 2 - ShortCut = 16470 - end - item - Caption = '-' - end - item - Action = acSelectAll - Caption = '&Select all' - ShortCut = 16449 - end> - Caption = '&Edit' - end - item - Items = < - item - Action = acSearch - Caption = '&Search' - ImageIndex = 12 - ShortCut = 16454 - end - item - Action = acFindNext - Caption = '&Find Next...' - ImageIndex = 23 - ShortCut = 114 - end - item - Caption = '-' - end - item - Action = acReplace - Caption = '&Replace' - ImageIndex = 28 - ShortCut = 16466 - end - item - Caption = '-' - end - item - Action = acGoTo - Caption = '&Go to line...' - ShortCut = 16455 - end> - Caption = '&Search' - end - item - Items = < - item - Action = acCompile - Caption = '&Compile' - ImageIndex = 8 - ShortCut = 120 - end - item - Caption = '-' - end - item - Action = acCompileAndStart - Caption = 'C&ompile and start Half-Life' - end - item - Action = acCompileAndUpload - Caption = 'Co&mpile and upload' - ImageIndex = 21 - ShortCut = 8312 - end> - Caption = '&Compile' - end - item - Items = < - item - Action = acOptions - Caption = '&Options' - ImageIndex = 11 - end> - Caption = 'Se&ttings' - end - item - Items = < - item - Action = acIdenter - Caption = '&Identer' - ImageIndex = 22 - ShortCut = 16457 - end - item - Action = acUnidenter - Caption = '&Unidenter' - ImageIndex = 26 - ShortCut = 24649 - end - item - Caption = '-' - end - item - Action = acLoopGenerator - Caption = '&Loop Generator' - ImageIndex = 27 - end - item - Caption = '-' - end - item - Action = acMenuMaker - Caption = '&Menu Maker' - ImageIndex = 24 - ShortCut = 16461 - end - item - Action = acPMM - Caption = '&Player Menu Maker' - ImageIndex = 24 - ShortCut = 16464 - end - item - Caption = '-' - end - item - Action = acSocketTerminal - Caption = '&Socket Terminal' - ImageIndex = 25 - end - item - Caption = '-' - end - item - Action = acRemoveMissingPlugins - Caption = '&Remove missing plugins from plugins.ini' - end> - Caption = 'T&ools' - end - item - Items = < - item - Action = acDoc - Caption = '&AMX Mod X Documentation' - ShortCut = 112 - end - item - Action = acForum - Caption = 'A&MX Mod X Scripting Forum' - ShortCut = 8304 - end - item - Caption = '-' - end - item - Action = acAbout - Caption = 'A&bout...' - end> - Caption = '&Help' - end> - ActionBar = mmbMenu - end> - Images = ilMenu - OnExecute = amMenuExecute - Left = 826 - Top = 34 - StyleName = 'XP Style' - object acNew: TAction - Category = 'File' - Caption = 'New' - ImageIndex = 4 - ShortCut = 16462 - OnExecute = acNewExecute - end - object acSave: TAction - Category = 'File' - Caption = 'Save' - ImageIndex = 6 - ShortCut = 16467 - OnExecute = acSaveExecute - end - object acSaveAs: TAction - Category = 'File' - Caption = 'Save As...' - ImageIndex = 7 - OnExecute = acSaveAsExecute - end - object acSaveAll: TAction - Category = 'File' - Caption = 'Save All Files' - ShortCut = 24659 - OnExecute = acSaveAllExecute - end - object acOpen: TAction - Category = 'File' - Caption = 'Open' - ImageIndex = 5 - ShortCut = 16463 - OnExecute = acOpenExecute - end - object acClose: TAction - Category = 'File' - Caption = 'Close' - Enabled = False - ShortCut = 16430 - OnExecute = acCloseExecute - end - object acCloseAllFiles: TAction - Category = 'File' - Caption = 'Close all files' - Enabled = False - ShortCut = 24622 - OnExecute = acCloseAllFilesExecute - end - object acExit: TAction - Category = 'File' - Caption = 'Exit' - ImageIndex = 3 - ShortCut = 16465 - OnExecute = acExitExecute - end - object acUndo: TAction - Category = 'Edit' - Caption = 'Undo' - ImageIndex = 14 - ShortCut = 16474 - OnExecute = acUndoExecute - end - object acRedo: TAction - Category = 'Edit' - Caption = 'Redo' - ImageIndex = 13 - ShortCut = 24666 - OnExecute = acRedoExecute - end - object acCut: TAction - Category = 'Edit' - Caption = 'Cut' - ImageIndex = 1 - ShortCut = 16472 - OnExecute = acCutExecute - end - object acCopy: TAction - Category = 'Edit' - Caption = 'Copy' - ImageIndex = 0 - ShortCut = 16451 - OnExecute = acCopyExecute - end - object acPaste: TAction - Category = 'Edit' - Caption = 'Paste' - ImageIndex = 2 - ShortCut = 16470 - OnExecute = acPasteExecute - end - object acSelectAll: TAction - Category = 'Edit' - Caption = 'Select all' - ShortCut = 16449 - OnExecute = acSelectAllExecute - end - object acSearch: TAction - Category = 'Search' - Caption = 'Search' - ImageIndex = 12 - ShortCut = 16454 - OnExecute = acSearchExecute - end - object acFindNext: TAction - Category = 'Search' - Caption = 'Find Next...' - ImageIndex = 23 - ShortCut = 114 - OnExecute = acFindNextExecute - end - object acReplace: TAction - Category = 'Search' - Caption = 'Replace' - ImageIndex = 28 - ShortCut = 16466 - OnExecute = acReplaceExecute - end - object acCompile: TAction - Category = 'Compile' - Caption = 'Compile' - ImageIndex = 8 - ShortCut = 120 - OnExecute = acCompileExecute - end - object acCompileAndStart: TAction - Category = 'Compile' - Caption = 'Compile and start CS' - OnExecute = acCompileAndStartExecute - end - object acCompileAndUpload: TAction - Category = 'Compile' - Caption = 'Compile and upload' - ImageIndex = 21 - ShortCut = 8312 - OnExecute = acCompileAndUploadExecute - end - object acDoc: TAction - Category = 'Help' - Caption = 'AMX Mod X Documentation' - ShortCut = 112 - OnExecute = acDocExecute - end - object acForum: TAction - Category = 'Help' - Caption = 'AMX Mod X Scripting Forum' - ShortCut = 8304 - OnExecute = acForumExecute - end - object acAbout: TAction - Category = 'Help' - Caption = 'About...' - OnExecute = acAboutExecute - end - object acOptions: TAction - Category = 'Settings' - Caption = 'Options' - ImageIndex = 11 - OnExecute = acOptionsExecute - end - object acGoTo: TAction - Category = 'Search' - Caption = 'Go to line...' - ShortCut = 16455 - OnExecute = acGoToExecute - end - object acEdit: TAction - Caption = 'Edit' - ShortCut = 113 - OnExecute = acEditExecute - end - object acIdenter: TAction - Category = 'Tools' - Caption = 'Identer' - ImageIndex = 22 - ShortCut = 16457 - OnExecute = acIdenterExecute - end - object acUnidenter: TAction - Category = 'Tools' - Caption = 'Unidenter' - ImageIndex = 26 - ShortCut = 24649 - OnExecute = acUnidenterExecute - end - object acLoopGenerator: TAction - Category = 'Tools' - Caption = 'Loop Generator' - ImageIndex = 27 - OnExecute = acLoopGeneratorExecute - end - object acMenuMaker: TAction - Category = 'Tools' - Caption = 'Menu Maker' - ImageIndex = 24 - ShortCut = 16461 - OnExecute = acMenuMakerExecute - end - object acPMM: TAction - Category = 'Tools' - Caption = 'Player Menu Maker' - ImageIndex = 24 - ShortCut = 16464 - OnExecute = acPMMExecute - end - object acSocketTerminal: TAction - Category = 'Tools' - Caption = 'Socket Terminal' - ImageIndex = 25 - OnExecute = acSocketTerminalExecute - end - object acRemoveMissingPlugins: TAction - Category = 'Tools' - Caption = 'Remove missing plugins from plugins.ini' - OnExecute = acRemoveMissingPluginsExecute - end - end - object sacComplete: TSciAutoComplete - NumStartChars = 1 - AStrings.Strings = ( - '' - 'access' - 'add' - 'ADMIN_ADMIN' - 'ADMIN_ALL' - 'ADMIN_BAN' - 'ADMIN_CFG' - 'ADMIN_CHAT' - 'ADMIN_CVAR' - 'ADMIN_IMMUNITY' - 'ADMIN_KICK' - 'ADMIN_LEVEL_A' - 'ADMIN_LEVEL_B' - 'ADMIN_LEVEL_C' - 'ADMIN_LEVEL_D' - 'ADMIN_LEVEL_E' - 'ADMIN_LEVEL_F' - 'ADMIN_LEVEL_G' - 'ADMIN_LEVEL_H' - 'ADMIN_MAP' - 'ADMIN_MENU' - 'ADMIN_PASSWORD' - 'ADMIN_RCON' - 'ADMIN_RESERVATION' - 'ADMIN_SLAY' - 'ADMIN_USER' - 'ADMIN_VOTE' - 'ALLIES' - 'AMX_FLAG_BIGENDIAN' - 'AMX_FLAG_BROWSE' - 'AMX_FLAG_COMPACT' - 'AMX_FLAG_DEBUG' - 'AMX_FLAG_LINEOPS' - 'AMX_FLAG_NOCHECKS' - 'AMX_FLAG_RELOC' - 'AMXX_VERSION' - 'AMXX_VERSION_STR[]="1' - 'anglevector' - 'assert' - 'attach_view' - 'ATTN_IDLE' - 'ATTN_NONE' - 'ATTN_STATIC' - 'AXIS' - 'BLOCK_NOT' - 'BLOCK_ONCE' - 'BLOCK_SET' - 'bomb_defused' - 'bomb_defusing' - 'bomb_explode' - 'bomb_planted' - 'bomb_planting' - 'break' - 'build_path' - 'call_think' - 'callfunc_begin' - 'callfunc_end' - 'callfunc_push_float' - 'callfunc_push_floatrf' - 'callfunc_push_int' - 'callfunc_push_intrf' - 'callfunc_push_str' - 'CAMERA_3RDPERSON' - 'CAMERA_NONE' - 'CAMERA_TOPDOWN' - 'CAMERA_UPLEFT' - 'case' - 'CHAN_AUTO' - 'CHAN_ITEM' - 'CHAN_NETWORKVOICE_BASE' - 'CHAN_NETWORKVOICE_END' - 'CHAN_STATIC' - 'CHAN_STREAM' - 'CHAN_WEAPON' - 'change_task' - 'char' - 'clamp' - 'client_authorized' - 'client_built' - 'client_changeclass' - 'client_changeteam' - 'client_cmd' - 'client_command' - 'client_connect' - 'client_damage' - 'client_death' - 'client_disconnect' - 'client_impulse' - 'client_infochanged' - 'client_kill' - 'client_PostThink' - 'client_PreThink' - 'client_print' - 'client_putinserver' - 'client_score' - 'client_spawn' - 'cmd_access' - 'cmd_target' - 'colored_menus' - 'console_cmd' - 'console_print' - 'const' - 'contain' - 'containi' - 'CONTENTS_TRANSLUCENT' - 'continue' - 'copy' - 'copy_keyvalue' - 'copyc' - 'create_entity' - 'CreateEntity' - 'cs_get_hostage_foll' - 'cs_get_hostage_id' - 'cs_get_no_knives' - 'cs_get_user_bpammo' - 'cs_get_user_buyzone' - 'cs_get_user_deaths' - 'cs_get_user_defuse' - 'cs_get_user_driving' - 'cs_get_user_hasprim' - 'cs_get_user_model' - 'cs_get_user_money' - 'cs_get_user_nvg' - 'cs_get_user_plant' - 'cs_get_user_stationary' - 'cs_get_user_team' - 'cs_get_user_tked' - 'cs_get_user_vip' - 'cs_get_weapon_ammo' - 'cs_get_weapon_burst' - 'cs_get_weapon_id' - 'cs_get_weapon_silen' - 'cs_reset_user_model' - 'cs_set_hostage_foll' - 'cs_set_no_knives' - 'cs_set_user_bpammo' - 'cs_set_user_deaths' - 'cs_set_user_defuse' - 'cs_set_user_model' - 'cs_set_user_money' - 'cs_set_user_nvg' - 'cs_set_user_plant' - 'cs_set_user_team' - 'cs_set_user_tked' - 'cs_set_user_vip' - 'cs_set_weapon_ammo' - 'cs_set_weapon_burst' - 'cs_set_weapon_silen' - 'cstrike_running' - 'CSW_AK47' - 'CSW_AUG' - 'CSW_AWP' - 'CSW_C4' - 'CSW_DEAGLE' - 'CSW_ELITE' - 'CSW_FAMAS' - 'CSW_FIVESEVEN' - 'CSW_FLASHBANG' - 'CSW_G3SG1' - 'CSW_GALI' - 'CSW_GALIL' - 'CSW_GLOCK18' - 'CSW_HEGRENADE' - 'CSW_KNIFE' - 'CSW_M249' - 'CSW_M3' - 'CSW_M4A1' - 'CSW_MAC10' - 'CSW_MP5NAVY' - 'CSW_P228' - 'CSW_P90' - 'CSW_SCOUT' - 'CSW_SG550' - 'CSW_SG552' - 'CSW_SMOKEGRENADE' - 'CSW_TMP' - 'CSW_UMP45' - 'CSW_USP' - 'CSW_XM1014' - 'current_num_ents' - 'custom_weapon_add' - 'custom_weapon_dmg' - 'custom_weapon_shot' - 'cvar_exists' - 'date' - 'dbi_close' - 'dbi_connect' - 'dbi_error' - 'dbi_field' - 'dbi_free_result' - 'dbi_nextrow' - 'dbi_num_rows' - 'dbi_query' - 'dbi_result' - 'dbi_type' - 'default' - 'define' - 'defined' - 'delete_file' - 'DF_Blocked' - 'DF_ClientCommand' - 'DF_ClientConnect' - 'DF_ClientDisconnect' - 'DF_ClientKill' - 'DF_ClientPutInServer' - 'DF_ClientUserInfoChanged' - 'DF_CreateInstancedBaseline' - 'DF_GameInit' - 'DF_GetGameDescription' - 'DF_GetHullBounds' - 'DF_MetaFunc_CallGameEntity' - 'DF_ParmsChangeLevel' - 'DF_ParmsNewLevel' - 'DF_pfnAllowLagCompensation' - 'DF_PlayerPostThink' - 'DF_PlayerPreThink' - 'DF_PM_FindTextureType' - 'DF_RegisterEncoders' - 'DF_ServerDeactivate' - 'DF_SetAbsBox' - 'DF_Spawn' - 'DF_SpectatorConnect' - 'DF_SpectatorDisconnect' - 'DF_SpectatorThink' - 'DF_StartFrame' - 'DF_Sys_Error' - 'DF_Think' - 'DF_Touch' - 'DF_Use' - 'DispatchKeyValue' - 'DispatchSpawn' - 'dllfunc' - 'DMG_ACID' - 'DMG_ALWAYSGIB' - 'DMG_BLAST' - 'DMG_BULLET' - 'DMG_BURN' - 'DMG_CLUB' - 'DMG_CRUSH' - 'DMG_DROWN' - 'DMG_DROWNRECOVER' - 'DMG_ENERGYBEAM' - 'DMG_FALL' - 'DMG_FREEZE' - 'DMG_GENERIC' - 'DMG_MORTAR' - 'DMG_NERVEGAS' - 'DMG_NEVERGIB' - 'DMG_PARALYZE' - 'DMG_POISON' - 'DMG_RADIATION' - 'DMG_SHOCK' - 'DMG_SLASH' - 'DMG_SLOWBURN' - 'DMG_SLOWFREEZE' - 'DMG_SONIC' - 'DMG_TIMEBASED' - 'do' - 'dod_get_map_info' - 'dod_get_next_class' - 'dod_get_pl_deaths' - 'dod_get_pl_teamname' - 'dod_get_pronestate' - 'dod_get_team_score' - 'dod_get_user_ammo' - 'dod_get_user_class' - 'dod_get_user_kills' - 'dod_get_user_score' - 'dod_get_user_weapon' - 'dod_is_deployed' - 'dod_is_randomclass' - 'dod_make_deathmsg' - 'dod_set_fuse' - 'dod_set_pl_deaths' - 'dod_set_pl_teamname' - 'dod_set_stamina' - 'dod_set_user_ammo' - 'dod_set_user_class' - 'dod_set_user_kills' - 'dod_set_user_score' - 'dod_set_user_team' - 'dod_user_kill' - 'dod_wpnlog_to_id' - 'dod_wpnlog_to_name' - 'DODMAX_WEAPONS' - 'drop_to_floor' - 'EF_AllocString' - 'EF_AngleVectors' - 'EF_AnimationAutomove' - 'EF_BuildSoundMSG' - 'EF_CanSkipPlayer' - 'EF_ChangeLevel' - 'EF_ChangePitch' - 'EF_ChangeYaw' - 'EF_CheckVisibility' - 'EF_CreateEntity' - 'EF_CreateFakeClient' - 'EF_CreateNamedEntity' - 'EF_CrosshairAngle' - 'EF_DecalIndex' - 'EF_DropToFloor' - 'EF_EmitAmbientSound' - 'EF_EmitSound' - 'EF_EntIsOnFloor' - 'EF_EntitiesInPVS' - 'EF_FadeClientVolume' - 'EF_FindClientInPVS' - 'EF_FindEntityByString' - 'EF_FindEntityInSphere' - 'EF_FreeEntPrivateData' - 'EF_GetAimVector' - 'EF_GetAttachment' - 'EF_GetBonePosition' - 'EF_GetClientListening' - 'EF_GetCurrentPlayer' - 'EF_GetEntityIllum' - 'EF_GetPhysicsInfoString' - 'EF_GetPhysicsKeyValue' - 'EF_InfoKeyValue' - 'EF_INVLIGHT' - 'EF_LIGHT' - 'EF_LightStyle' - 'EF_MakeStatic' - 'EF_MakeVectors' - 'EF_MessageBegin' - 'EF_ModelFrames' - 'EF_ModelIndex' - 'EF_MoveToOrigin' - 'EF_NODRAW' - 'EF_NOINTERP' - 'EF_NumberOfEntities' - 'EF_ParticleEffect' - 'EF_PlaybackEvent' - 'EF_PointContents' - 'EF_PrecacheEvent' - 'EF_PrecacheGeneric' - 'EF_PrecacheModel' - 'EF_PrecacheSound' - 'EF_RegUserMsg' - 'EF_RemoveEntity' - 'EF_RunPlayerMove' - 'EF_SetClientKeyValue' - 'EF_SetClientListening' - 'EF_SetClientMaxspeed' - 'EF_SetGroupMask' - 'EF_SetKeyValue' - 'EF_SetModel' - 'EF_SetOrigin' - 'EF_SetPhysicsKeyValue' - 'EF_SetSize' - 'EF_SetView' - 'EF_StaticDecal' - 'EF_SzFromIndex' - 'EF_Time' - 'EF_TraceHull' - 'EF_TraceLine' - 'EF_TraceModel' - 'EF_TraceMonsterHull' - 'EF_TraceSphere' - 'EF_TraceTexture' - 'EF_TraceToss' - 'EF_VecToAngles' - 'EF_VecToYaw' - 'EF_WalkMove' - 'EF_WriteAngle' - 'EF_WriteCoord' - 'else' - 'emit_sound' - 'endif' - 'engclient_cmd' - 'engclient_print' - 'engfunc' - 'ENT_SetModel' - 'ENT_SetOrigin' - 'entity_count' - 'entity_get_byte' - 'entity_get_edict' - 'entity_get_float' - 'entity_get_int' - 'entity_get_string' - 'entity_get_vector' - 'entity_range' - 'entity_set_byte' - 'entity_set_edict' - 'entity_set_float' - 'entity_set_int' - 'entity_set_model' - 'entity_set_origin' - 'entity_set_size' - 'entity_set_string' - 'entity_set_vector' - 'Entvars_Get_Byte' - 'Entvars_Get_Edict' - 'Entvars_Get_Float' - 'Entvars_Get_Int' - 'Entvars_Get_String' - 'Entvars_Get_Vector' - 'Entvars_Set_Byte' - 'Entvars_Set_Edict' - 'Entvars_Set_Float' - 'Entvars_Set_Int' - 'Entvars_Set_String' - 'Entvars_Set_Vector' - 'enum' - 'equal' - 'equali' - 'exit' - 'fake_touch' - 'fakedamage' - 'FakeTouch' - 'fclose' - 'FCVAR_CLIENTDLL' - 'FCVAR_EXTDLL' - 'FCVAR_PRINTABLEONLY' - 'FCVAR_PROTECTED' - 'FCVAR_SPONLY' - 'FCVAR_UNLOGGED' - 'feof' - 'fflush' - 'fgetc' - 'fgetf' - 'fgeti' - 'fgetl' - 'fgets' - 'file_exists' - 'file_size' - 'filesize' - 'find_ent' - 'find_ent_by_class' - 'find_ent_by_model' - 'find_ent_by_owner' - 'find_ent_by_target' - 'find_ent_by_tname' - 'find_ent_in_sphere' - 'find_ent_sphere' - 'find_entity' - 'find_player' - 'find_plugin_bydesc' - 'find_plugin_byfile' - 'find_sphere_class' - 'FindEntity' - 'FL_ALWAYSTHINK' - 'FL_BASEVELOCITY' - 'FL_CUSTOMENTITY' - 'FL_DORMANT' - 'FL_DUCKING' - 'FL_FAKECLIENT' - 'FL_FLOAT' - 'FL_FROZEN' - 'FL_GRAPHED' - 'FL_IMMUNE_LAVA' - 'FL_IMMUNE_WATER' - 'FL_KILLME' - 'FL_MONSTERCLIP' - 'FL_ONTRAIN' - 'FL_PROXY' - 'FL_SPECTATOR' - 'FL_WORLDBRUSH' - 'FLAG_AUTHID' - 'FLAG_IP' - 'FLAG_KICK' - 'FLAG_NOPASS' - 'FLAG_TAG' - 'float' - 'floatabs' - 'floatacos' - 'floatadd' - 'floatasin' - 'floatatan' - 'floatatan2' - 'floatcmp' - 'floatcos' - 'floatdiv' - 'floatfract' - 'floatlog' - 'floatmul' - 'floatpower' - 'floatround' - 'floatsin' - 'floatsqroot' - 'floatstr' - 'floatsub' - 'floattan' - 'FMRES_HANDLED' - 'FMRES_IGNORED' - 'FMRES_OVERRIDE' - 'FMRES_SUPERCEDE' - 'FMV_CELL' - 'FMV_FLOAT' - 'fopen' - 'for' - 'force_unmodified' - 'force_use' - 'format' - 'format_args' - 'format_time' - 'forward' - 'forward_return' - 'fputc' - 'fputf' - 'fputi' - 'fputl' - 'fputs' - 'fread' - 'fscanf' - 'fseek' - 'FT_NEW' - 'FT_OLD' - 'ftell' - 'funcidx' - 'FUSE_RESET' - 'FUSE_SET' - 'FVecIVec' - 'fwrite' - 'geoip_code2' - 'geoip_code3' - 'geoip_country' - 'get_basedir' - 'get_brush_entity_origin' - 'get_build' - 'get_class' - 'get_clcmd' - 'get_clcmdsnum' - 'get_client_listen' - 'get_concmd' - 'get_concmdsnum' - 'get_configsdir' - 'get_customdir' - 'get_cvar_flags' - 'get_cvar_float' - 'get_cvar_num' - 'get_cvar_string' - 'get_datadir' - 'get_decal_index' - 'get_distance' - 'get_entity_distance' - 'get_entity_flags' - 'get_entity_origin' - 'get_entity_velocity' - 'get_entity_visibility' - 'get_filename' - 'get_flags' - 'get_gametime' - 'get_global_edict' - 'get_global_float' - 'get_global_int' - 'get_global_string' - 'get_global_vector' - 'get_grenade' - 'get_grenade_id' - 'get_grenade_index' - 'get_hostage_id' - 'get_info_keybuffer' - 'get_keyvalue' - 'get_lang' - 'get_langsnum' - 'get_localinfo' - 'get_logfile' - 'get_mapname' - 'get_mask' - 'get_max_entities' - 'get_maxplayers' - 'get_maxspeed' - 'get_modname' - 'get_module' - 'get_modulesnum' - 'get_msg_arg_float' - 'get_msg_arg_int' - 'get_msg_arg_string' - 'get_msg_args' - 'get_msg_argtype' - 'get_msg_block' - 'get_msg_origin' - 'get_owner' - 'get_pdata' - 'get_pdata_char' - 'get_pdata_float' - 'get_pdata_int' - 'get_pdata_short' - 'get_players' - 'get_playersnum' - 'get_plugin' - 'get_pluginsnum' - 'get_private_f' - 'get_private_i' - 'get_range' - 'get_res' - 'get_spawn' - 'get_speak' - 'get_special' - 'get_speed' - 'get_speedchange' - 'get_srvcmd' - 'get_srvcmdsnum' - 'get_stats' - 'get_stats2' - 'get_statsnum' - 'get_string' - 'get_systime' - 'get_time' - 'get_timeleft' - 'get_tr' - 'get_user_aiming' - 'get_user_ammo' - 'get_user_armor' - 'get_user_astats' - 'get_user_attacker' - 'get_user_authid' - 'get_user_button' - 'get_user_deaths' - 'get_user_flags' - 'get_user_frags' - 'get_user_godmode' - 'get_user_gravity' - 'get_user_health' - 'get_user_hitzones' - 'get_user_index' - 'get_user_info' - 'get_user_ip' - 'get_user_lstats' - 'get_user_maxspeed' - 'get_user_menu' - 'get_user_money' - 'get_user_msgid' - 'get_user_msgname' - 'get_user_name' - 'get_user_noclip' - 'get_user_oldbutton' - 'get_user_origin' - 'get_user_ping' - 'get_user_rstats' - 'get_user_stats' - 'get_user_stats2' - 'get_user_team' - 'get_user_time' - 'get_user_userid' - 'get_user_velocity' - 'get_user_vstats' - 'get_user_weapon' - 'get_user_weapons' - 'get_user_wlstats' - 'get_user_wrstats' - 'get_user_wstats' - 'get_usercmd' - 'get_vaultdata' - 'get_weaponname' - 'get_xvar_float' - 'get_xvar_id' - 'get_xvar_num' - 'getarg' - 'getkey_float' - 'getkey_int' - 'getkey_string' - 'GetMessageBlock' - 'give_item' - 'globals_get_edict' - 'globals_get_float' - 'globals_get_int' - 'globals_get_string' - 'globals_get_vector' - 'goto' - 'gpglobals_v' - 'gpgobals_time' - 'grenade_throw' - 'halflife_time' - 'has_weapon' - 'heapspace' - 'HIT_CHEST' - 'HIT_GENERIC' - 'HIT_HEAD' - 'HIT_LEFTARM' - 'HIT_LEFTLEG' - 'HIT_RIGHTARM' - 'HIT_RIGHTLEG' - 'HIT_STOMACH' - 'HIW_AK47' - 'HIW_AKS74U' - 'HIW_BERETTA' - 'HIW_FLASHBANG' - 'HIW_GLOCK' - 'HIW_M11' - 'HIW_M11SD' - 'HIW_M16A2' - 'HIW_M4A1' - 'HIW_MP5A4' - 'HIW_MP5SD5' - 'HIW_NATOGREN' - 'HIW_PSG1' - 'HIW_REMINGTON' - 'HIW_SPAS12' - 'HIW_TANGOGREN' - 'HIW_ZASTAVA' - 'HLTime' - 'HULL_HEAD' - 'HULL_HUMAN' - 'HULL_LARGE' - 'HULL_POINT' - 'if' - 'IN_ALT1' - 'IN_ATTACK' - 'IN_ATTACK2' - 'IN_BACK' - 'IN_CANCEL' - 'IN_DUCK' - 'IN_FORWARD' - 'IN_JUMP' - 'IN_LEFT' - 'in_list_float' - 'in_list_int' - 'in_list_string' - 'IN_MOVELEFT' - 'IN_MOVERIGHT' - 'IN_RELOAD' - 'IN_RIGHT' - 'IN_RUN' - 'IN_SCORE' - 'IN_USE' - 'include' - 'inconsistent_file' - 'is_combat' - 'is_dedicated_server' - 'is_ent_valid' - 'is_entity' - 'is_jit_enabled' - 'is_linux_server' - 'is_map_valid' - 'is_module_loaded' - 'is_plugin_loaded' - 'is_running' - 'is_user_admin' - 'is_user_alive' - 'is_user_bot' - 'is_user_connected' - 'is_user_connecting' - 'is_user_hltv' - 'is_valid_ent' - 'isalnum' - 'isalpha' - 'isdigit' - 'isspace' - 'IVecFVec' - 'jghg_find_ent_owner' - 'jghg2_set_size' - 'jghg2_think' - 'keytable_clear' - 'keytable_count' - 'keytable_delete' - 'keytable_getkey' - 'keytable_getval' - 'keytable_next' - 'keytable_reset' - 'lang_exists' - 'LANG_PLAYER' - 'LANG_SERVER' - 'list_clear' - 'list_clear_float' - 'list_clear_int' - 'list_clear_string' - 'list_delete' - 'list_delete_float' - 'list_delete_int' - 'list_delete_string' - 'list_get' - 'list_get_float' - 'list_get_int' - 'list_get_string' - 'list_getf' - 'list_next' - 'list_next_float' - 'list_next_int' - 'list_next_string' - 'list_pop' - 'list_pop_float' - 'list_pop_int' - 'list_pop_string' - 'list_push_float' - 'list_push_int' - 'list_push_string' - 'list_reset' - 'list_reset_float' - 'list_reset_int' - 'list_reset_string' - 'list_size' - 'list_size_float' - 'list_size_int' - 'list_size_string' - 'list_store_float' - 'list_store_int' - 'list_store_string' - 'log_amx' - 'log_message' - 'log_to_file' - 'make_deathmsg' - 'make_string' - 'max' - 'md5' - 'md5_file' - 'MENU_KEY_0' - 'MENU_KEY_1' - 'MENU_KEY_2' - 'MENU_KEY_3' - 'MENU_KEY_4' - 'MENU_KEY_5' - 'MENU_KEY_6' - 'MENU_KEY_7' - 'MENU_KEY_8' - 'MENU_KEY_9' - 'message_begin' - 'message_end' - 'MessageBlock' - 'min' - 'MOVETYPE_ANGLECLIP' - 'MOVETYPE_ANGLENOCLIP' - 'MOVETYPE_BOUNCEMISSILE' - 'MOVETYPE_FOLLOW' - 'msg_args' - 'msg_data' - 'msg_data_type' - 'msg_dest' - 'msg_loc' - 'msg_name' - 'MSG_ONE_UNRELIABLE' - 'MSG_PAS' - 'MSG_PAS_R' - 'MSG_PVS' - 'MSG_PVS_R' - 'msg_set_f' - 'msg_set_i' - 'msg_set_s' - 'msg_strdata' - 'msg_type' - 'mysql_close' - 'mysql_connect' - 'mysql_error' - 'mysql_getfield' - 'mysql_nextrow' - 'mysql_query' - 'native' - 'new' - 'new_float_list' - 'new_int_list' - 'new_keytable' - 'new_list' - 'new_string_list' - 'NS_CONST_INC' - 'ns_get_build' - 'ns_get_class' - 'ns_get_deaths' - 'ns_get_energy' - 'ns_get_exp' - 'ns_get_hive_trait' - 'ns_get_jpfuel' - 'ns_get_mask' - 'ns_get_maxspeed' - 'ns_get_points' - 'ns_get_res' - 'ns_get_score' - 'ns_get_spawn' - 'ns_get_speedchange' - 'ns_get_struct_owner' - 'ns_get_weap_clip' - 'ns_get_weap_dmg' - 'ns_get_weap_range' - 'ns_get_weap_reserve' - 'ns_give_item' - 'ns_has_weapon' - 'NS_INC' - 'ns_is_combat' - 'ns_popup' - 'ns_set_deaths' - 'ns_set_energy' - 'ns_set_exp' - 'ns_set_fov' - 'ns_set_hive_trait' - 'ns_set_jpfuel' - 'ns_set_mask' - 'ns_set_player_body' - 'ns_set_player_model' - 'ns_set_player_skin' - 'ns_set_points' - 'ns_set_res' - 'ns_set_score' - 'ns_set_speedchange' - 'ns_set_struct_owner' - 'ns_set_weap_clip' - 'ns_set_weap_dmg' - 'ns_set_weap_range' - 'ns_set_weap_reserve' - 'ns2amx_getammo' - 'ns2amx_getenergy' - 'ns2amx_gethives' - 'ns2amx_getjpfuel' - 'ns2amx_giveitem' - 'ns2amx_inrange' - 'ns2amx_isdigesting' - 'ns2amx_moveto' - 'ns2amx_nspopup' - 'ns2amx_setammo' - 'ns2amx_setenergy' - 'ns2amx_setjpfuel' - 'ns2amx_setres' - 'ns2amx_version' - 'num_to_str' - 'num_to_word' - 'numargs' - 'number_of_entities' - 'numtostr' - 'operator' - 'parse' - 'parse_loguser' - 'parse_time' - 'pause' - 'pev' - 'pev_f' - 'pev_i' - 'pfn_keyvalue' - 'pfn_playbackevent' - 'pfn_spawn' - 'pfn_think' - 'pfn_touch' - 'PITCH_HIGH' - 'PITCH_LOW' - 'playback_event' - 'plugin_cfg' - 'PLUGIN_CONTINUE' - 'plugin_end' - 'plugin_flags' - 'PLUGIN_HANDLED' - 'PLUGIN_HANDLED_MAIN' - 'plugin_init' - 'plugin_log' - 'plugin_modules' - 'plugin_pause' - 'plugin_precache' - 'plugin_unpause' - 'point_contents' - 'PointContents' - 'power' - 'precache_event' - 'precache_generic' - 'precache_model' - 'precache_sound' - 'public' - 'radius_damage' - 'RadiusDamage' - 'random' - 'random_float' - 'random_num' - 'read_argc' - 'read_args' - 'read_argv' - 'read_data' - 'read_datanum' - 'read_dir' - 'read_file' - 'read_flags' - 'read_logargc' - 'read_logargv' - 'read_logdata' - 'regex_free' - 'regex_match' - 'regex_substr' - 'register_changelvl' - 'register_clcmd' - 'register_clientkill' - 'register_concmd' - 'register_cvar' - 'register_dictionary' - 'register_event' - 'register_forward' - 'register_impulse' - 'register_logevent' - 'register_menu' - 'register_menucmd' - 'register_menuid' - 'register_message' - 'register_msgblock' - 'register_msgedit' - 'register_playback' - 'register_plugin' - 'register_srvcmd' - 'register_statsfwd' - 'register_think' - 'register_touch' - 'remove_cvar_flags' - 'remove_entity' - 'remove_entity_name' - 'remove_quotes' - 'remove_task' - 'remove_user_flags' - 'remove_vaultdata' - 'RemoveEntity' - 'replace' - 'require_module' - 'reset_user_wstats' - 'return' - 'rewind' - 'SEEK_CUR' - 'SEEK_END' - 'SEEK_SET' - 'server_changelevel' - 'server_cmd' - 'server_exec' - 'server_frame' - 'server_print' - 'ServerFrame' - 'set_client_listen' - 'set_cvar_flags' - 'set_cvar_float' - 'set_cvar_num' - 'set_cvar_string' - 'set_entity_flags' - 'set_entity_origin' - 'set_entity_velocity' - 'set_entity_visibility' - 'set_hudmessage' - 'set_kvhandled' - 'set_lights' - 'set_localinfo' - 'set_mask' - 'set_msg_arg_float' - 'set_msg_arg_int' - 'set_msg_arg_string' - 'set_msg_block' - 'set_pdata' - 'set_pdata_char' - 'set_pdata_float' - 'set_pdata_int' - 'set_pdata_short' - 'set_pev' - 'set_pev_f' - 'set_pev_i' - 'set_player_body' - 'set_player_model' - 'set_player_skin' - 'set_private_f' - 'set_private_i' - 'set_rendering' - 'set_size' - 'set_speak' - 'set_speedchange' - 'set_task' - 'set_tr' - 'set_user_armor' - 'set_user_deaths' - 'set_user_flags' - 'set_user_footsteps' - 'set_user_frags' - 'set_user_godmode' - 'set_user_gravity' - 'set_user_health' - 'set_user_hitzones' - 'set_user_info' - 'set_user_maxspeed' - 'set_user_money' - 'set_user_noclip' - 'set_user_origin' - 'set_user_rendering' - 'set_user_velocity' - 'set_usercmd' - 'set_vaultdata' - 'set_view' - 'set_xvar_float' - 'set_xvar_num' - 'setarg' - 'setc' - 'SetSpeak' - 'SetView' - 'show_activity' - 'show_hudmessage' - 'show_menu' - 'show_motd' - 'sizeof' - 'sleep' - 'socket_change' - 'socket_close' - 'socket_open' - 'socket_recv' - 'socket_send' - 'SOCKET_TCP' - 'SOCKET_UDP' - 'spawn' - 'SPEAK_ALL' - 'SPEAK_LISTENALL' - 'SPEAK_MUTED' - 'SPEAK_NORMAL' - 'sqroot' - 'STAMINA_RESET' - 'STAMINA_SET' - 'static' - 'stock' - 'store_float' - 'store_int' - 'store_string' - 'str_to_num' - 'strbreak' - 'string' - 'strip_user_weapons' - 'strlen' - 'strpack' - 'strtok' - 'strtolower' - 'strtonum' - 'strtoupper' - 'strunpack' - 'supercede' - 'SVC_ADDANGLE' - 'SVC_CDTRACK' - 'SVC_INTERMISSION' - 'SVC_NEWUSERMSG' - 'SVC_ROOMTYPE' - 'SVC_TEMPENTITY' - 'SVC_WEAPONANIM' - 'swapchars' - 'switch' - 'take_damage' - 'task_exists' - 'tfc_clearmodel' - 'tfc_getbammo' - 'tfc_getweaponbammo' - 'tfc_isgrenade' - 'tfc_setbammo' - 'tfc_setmodel' - 'tfc_setpddata' - 'tfc_setweaponbammo' - 'tfc_userkill' - 'TFCMAX_WEAPONS' - 'tickcount' - 'time' - 'tolower' - 'toupper' - 'trace_hull' - 'trace_line' - 'trace_normal' - 'TraceLn' - 'TraceNormal' - 'traceresult' - 'trim' - 'ts_createpwup' - 'ts_getkillingstreak' - 'ts_getusercash' - 'ts_getuseritems' - 'ts_getuserkillflags' - 'ts_getuserlastfrag' - 'ts_getuserpwup' - 'ts_getuserspace' - 'ts_getuserwpn' - 'ts_givepwup' - 'ts_giveweapon' - 'ts_setpddata' - 'ts_wpnlogtoid' - 'ts_wpnlogtoname' - 'TSA_FLASHLIGHT' - 'TSA_LASERSIGHT' - 'TSA_SCOPE' - 'TSA_SILENCER' - 'TSITEM_KUNGFU' - 'TSITEM_SUPERJUMP' - 'TSKF_DOUBLEKILL' - 'TSKF_ISSPEC' - 'TSKF_KILLEDSPEC' - 'TSKF_SLIDINGKILL' - 'TSKF_STUNTKILL' - 'TSMAX_WEAPONS' - 'TSPWUP_ARMOR' - 'TSPWUP_DFIRERATE' - 'TSPWUP_GRENADE' - 'TSPWUP_HEALTH' - 'TSPWUP_INFAMMO' - 'TSPWUP_KUNGFU' - 'TSPWUP_RANDOM' - 'TSPWUP_SLOWMO' - 'TSPWUP_SLOWPAUSE' - 'TSPWUP_SUPERJUMP' - 'ucfirst' - 'unlink' - 'unpause' - 'use' - 'user_has_weapon' - 'user_kill' - 'user_silentkill' - 'user_slap' - 'user_spawn' - 'vaultdata_exists' - 'VecDist' - 'VecLength' - 'VecToAngles' - 'vector_distance' - 'vector_length' - 'vector_to_angle' - 'velocity_by_aim' - 'VelocityByAim' - 'vexd_pfntouch' - 'ViewContents' - 'VOL_NORM' - 'write_angle' - 'write_byte' - 'write_char' - 'write_coord' - 'write_entity' - 'write_file' - 'write_long' - 'write_shortwrite_string' - 'xmod_get_maxweapons' - 'xmod_get_stats_size' - 'xmod_get_wpnlogname' - 'xmod_get_wpnname' - 'xmod_is_custom_wpn' - 'xmod_is_melee_wpn' - 'XS__LIBRELEASE' - 'XS_AMX' - 'XS_AMXX' - 'xvar_exists - BLA blubb XD') - IgnoreCase = True - ChooseSingle = False - AutoHide = True - DropRestOfWord = False - CancelAtStart = False - CompleteWord = False - CompleteWordOnlyOne = True - Editor = sciEditor - WordCharacters = '_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' - MaxWidth = 0 - MaxHeight = 5 - Left = 794 - Top = 4 - end - object cltEditor: TSciCallTips - ApiStrings.Strings = ( - 'access(id, level)' - 'add(dest[], len, const src[], [ max ]) ' - 'anglevector(Float:vector[3], FRU, Float:vReturn[3]) ' - 'attach_view(player, target) ' - 'call_think(entity) ' - 'callfunc_begin(const function[], [ const plugin[] ]) ' - 'callfunc_begin_i(func, [ plugin ]) ' - 'callfunc_end()' - 'callfunc_push_float(Float: value) ' - 'callfunc_push_floatrf(Float: value)' - 'callfunc_push_int(value)' - 'callfunc_push_intrf(&value) ' - 'callfunc_push_str (value[]) ' - 'change_task(id = 0, Float:newTime=1.0, outside = 0)' - 'clamp(value, min=cellmin, max=cellmax)' - 'client_authorized(id)' - 'client_built(index, structure, type, impulse) ' - 'client_changeclass(id, newclass, oldclass)' - 'client_changeteam(index, newteam, oldteam)' - 'client_cmd(index, const command[], {Float,...})' - 'client_command(id)' - 'client_connect(id)' - 'client_damage(attacker, victim, damage, wpnindex, hitplace, TA)' - 'client_death(killer, victim, wpnindex, hitplace, TK)' - 'client_disconnect(id) ' - 'client_impulse(id, impulse) ' - 'client_infochanged(id)' - 'client_kill(id)' - 'client_PostThink(id) ' - 'client_PreThink(id) ' - 'client_print(index, type, const message[], ...)' - 'client_putinserver(id) ' - 'client_spawn(index)' - 'cmd_access(id, level, cid, num) ' - 'cmd_target(id, const arg[], flags = 1) ' - 'colored_menus()' - 'console_cmd(id, const cmd[], ...)' - 'console_print(id, const message[], ...)' - 'contain(const source[], const string[])' - 'containi(const source[], const string[])' - 'copy(dest[], len, const src[])' - - 'copy_keyvalue(Classname[], sizeA, Keyname[], sizeB, Value[], siz' + - 'ec)' - 'copyc(dest[], len, const src[], ch)' - 'create_entity(Classname[])' - 'cs_get_hostage_foll(index)' - 'cs_get_hostage_id(index) ' - 'cs_get_no_knives()' - 'cs_get_user_bpammo(index, weapon)' - 'cs_get_user_buyzone(index)' - 'cs_get_user_deaths(index)' - 'cs_get_user_defuse(index)' - 'cs_get_user_driving(index)' - 'cs_get_user_hasprim(index)' - 'cs_get_user_model(index, model[], len)' - 'cs_get_user_money(index)' - 'cs_get_user_nvg(index)' - 'cs_get_user_plant(index)' - 'cs_get_user_stationary(index)' - 'cs_get_user_team(index)' - 'cs_get_user_tked(index)' - 'cs_get_user_vip(index)' - 'cs_get_weapon_ammo(index)' - 'cs_get_weapon_burst(index)' - 'cs_get_weapon_id(index)' - 'cs_get_weapon_silen(index)' - 'cs_reset_user_model(index)' - 'cs_set_hostage_foll(index, [ entity ])' - 'cs_set_no_knives([ noknives = 0 ])' - 'cs_set_user_bpammo(index, weapon, amount)' - 'cs_set_user_deaths(index, deaths)' - - 'cs_set_user_defuse(index, [ defusekit = 1, r = 0, g = 160, b = 0' + - ', icon[] = "defuser", flash = 0 ])' - 'cs_set_user_model(index, const model[])' - 'cs_set_user_money(index , money, [ flash = 1])' - 'cs_set_user_nvg(index, [ nvgoggles = 1])' - 'cs_set_user_plant(index, [ plant = 1, showbombicon = 1 ])' - - 'cs_set_user_team(index, CsTeams:team, [ CsInternalModel: model =' + - ' CS_DONTCHANGE ])' - 'cs_set_user_tked(index, [ tk = 1, subtract = 1 ])' - 'cs_set_user_vip(index, [ vip = 1])' - 'cs_set_weapon_ammo(index, newammo)' - 'cs_set_weapon_burst(index, [ burstmode = 1 ])' - 'cs_set_weapon_silen(index, [ silence = 1 ])' - 'cstrike_running()' - 'custom_weapon_add(name[], melee=0,logname[])' - 'custom_weapon_dmg(weapon, attacker, victim, damage, hitplace=0)' - 'custom_weapon_shot(weapon,player)' - 'cvar_exists(const cvar[])' - 'date([ &year, &month, &day ])' - 'dbi_close(&Sql:sql)' - - 'dbi_connect(host[], user[], pass[], dbname[], [ error[] = "", ma' + - 'xLength = 0 ])' - 'dbi_error(Sql:sql, error[], maxLength)' - 'dbi_field(Result:result, fieldnum, [ ... ])' - 'dbi_free_result(&Result:result)' - 'dbi_nextrow(Result:result)' - 'dbi_num_rows(result)' - 'dbi_query(Sql:sql, query[], [ ... ])' - 'dbi_result(Result:result, field[], [ ... ])' - 'dbi_type(type[], maxLength)' - 'delete_file(const file[]) ' - 'DispatchKeyValue(entity, key[], value[])' - 'DispatchSpawn(entity)' - 'dllfunc(type, [ ... ])' - 'dod_get_map_info(info)' - 'dod_get_next_class(index)' - 'dod_get_pl_deaths(index)' - 'dod_get_pl_teamname(index, szName[], len)' - 'dod_get_pronestate(player)' - 'dod_get_team_score(teamId)' - 'dod_get_user_ammo(index, wid)' - 'dod_get_user_class(index)' - 'dod_get_user_kills(index)' - 'dod_get_user_score(index)' - 'dod_get_user_team(player)' - 'dod_get_user_weapon(index, &clip, &ammo)' - 'dod_is_deployed(index)' - 'dod_is_randomclass(index)' - - 'dod_set_fuse(index, set = FUSE_SET, Float:newFuse = 5.0, Type = ' + - 'FT_NEW)' - 'dod_set_pl_deaths(index, value, [ refresh = 1 ])' - 'dod_set_pl_teamname(index, szName[])' - - 'dod_set_stamina(player, set = STAMINA_SET, minvalue = 0, maxvalu' + - 'e = 100)' - 'dod_set_user_ammo(index, wid, value)' - 'dod_set_user_class(index, classId)' - 'dod_set_user_kills(index, value, [ refresh = 1 ])' - 'dod_set_user_score(index, value, [ refresh = 1 ])' - 'dod_set_user_team(index, teamId, [ refresh = 1 ])' - 'dod_user_kill(player)' - 'dod_wpnlog_to_id(logname[])' - 'dod_wpnlog_to_name(logname[], name[], len)' - 'drop_to_floor(entity)' - - 'emit_sound(index, channel, sample[], Float:vol, Float:att,flags,' + - ' pitch)' - 'engclient_cmd(index,const command[],arg1[]=)' - 'engclient_print(index, type, const message[], ...)' - 'engfunc(function or type, [ ... ])' - 'entity_count()' - 'entity_get_byte(entity, key)' - 'entity_get_edict(entity, key)' - 'entity_get_float(entity, key)' - 'entity_get_int(entity, key)' - 'entity_get_string(entity, key, Result[], maxLength)' - 'entity_get_vector(entity, key, Float:Vector[3])' - 'entity_range(ida, idb)' - 'entity_set_byte(entity, key, value)' - 'entity_set_edict(entity, key, edict)' - 'entity_set_float(entity, key, Float:value)' - 'entity_set_int(entity, key, value)' - 'entity_set_model(entity, Model[])' - 'entity_set_origin(entity, Float:NewOrigin[3])' - 'entity_set_size(index, Float:mins[3], Float:maxs[3])' - 'entity_set_string(entity, key, const String[])' - 'entity_set_vector(entity, key, Float:NewVector[3])' - 'equal(const a[], const b[], [ c ])' - 'equali(const a[], const b[], [ c ])' - 'fake_touch(Toucher, Touched)' - 'fakedamage(victim, Classname[], Float:damage, damagetype)' - 'fclose(file)' - 'feof(file)' - 'fflush(file)' - 'fgetc(file)' - 'fgetf(file)' - 'fgeti(file)' - 'fgetl(file)' - 'fgets(file)' - 'file_exists(const file[])' - 'file_size(const file[], [ flag ])' - 'find_ent_by_class(StartEntity, Classname[])' - 'find_ent_by_model(StartEntity, Classname[], Model[])' - - 'find_ent_by_owner(StartIndex, Classname[], OwnerEntity, [ type ]' + - ')' - 'find_ent_by_target(StartEntity, Classname[])' - 'find_ent_by_tname(StartEntity, Classname[])' - 'find_ent_in_sphere(StartEntity, Float:origin[3], Float:radius)' - 'find_player(const flags[], ...)' - 'find_plugin_bydesc(pdesc[], [ bool:ignorecase=true ])' - 'find_plugin_byfile( pname[], [ bool:ignorecase=true ])' - - 'find_sphere_class( aroundent, _lookforclassname[], Float:radius,' + - ' entlist[], maxents, Float:origin[3] = {0.0, 0.0, 0.0})' - 'float(value)' - 'floatabs(Float:value)' - 'floatacos(Float:angle, radix)' - 'floatadd(Float:oper1, Float:oper2)' - 'floatasin(Float:angle, radix)' - 'floatatan(Float:angle, radix)' - 'floatatan2(Float:x, Float:y, radix)' - 'floatcmp(Float:fOne, Float:fTwo)' - 'floatcos(Float:value, [ mode ])' - 'floatdiv(Float:dividend, Float:divisor)' - 'floatfract(Float:value)' - 'floatlog(Float:value, [ Float:base ])' - 'floatmul(Float:oper1, Float:oper2)' - 'floatpower(Float:value, Float:exponent)' - 'floatround(Float:value, [ method ])' - 'floatsin(Float:value, [ mode ])' - 'floatsqroot(Float:value)' - 'floatstr(const string[])' - 'floatsub(Float:oper1, Float:oper2)' - 'floattan(Float:value, [ mode ])' - 'fopen(filename[], mode[])' - - 'force_unmodified(force_type, mins[3] , maxs[3], const filename[]' + - ')' - 'force_use(user, used)' - 'format(output[], len, const format[], ...)' - 'format_args(output[], len, [ pos ])' - 'format_time(output[],len, const format[],time = -1)' - 'forward_return(type, [ ... ])' - 'fputc(file, num)' - 'fputf(file, Float:num)' - 'fputi(file, num)' - 'fputl(file, num)' - 'fputs(file, num)' - 'fread(file, ret[], len)' - 'fseek(file, pos, type)' - 'ftell(file)' - 'funcidx(const name[])' - 'FVecIVec(Float:FVec[3], IVec[3])' - 'fwrite(file, const str[], ...)' - 'geoip_code2( ip[], ccode[3])' - 'geoip_code3(ip[], ccode[4])' - 'geoip_country( ip[], result[], [ len = 45 ])' - 'get_basedir(name[], len)' - 'get_brush_entity_origin(entity, Float:Origin[3])' - 'get_class(index)' - 'get_clcmd(index, command[], len1, &flags, info[], len2, flag)' - 'get_clcmdsnum(flag)' - 'get_client_listen(receiver, sender)' - 'get_concmd(index,cmd[],len1,&flags, info[],len2, flag, id = -1)' - 'get_concmdsnum(flag,id = -1)' - 'get_configsdir(name[], len)' - 'get_cvar_flags(const cvar[])' - 'get_cvar_float(const cvarname[])' - 'get_cvar_num(const cvarname[])' - 'get_cvar_string(const cvarname[],output[],iLen)' - 'get_datadir(name[], len)' - 'get_decal_index(const szDecalName[])' - 'get_distance(origin1[3],origin2[3])' - 'get_entity_distance(ent1, ent2)' - 'get_entity_flags(entity)' - 'get_entity_visibility(entity)' - 'get_flags(flags, output[], len)' - 'get_func_id(const funcName[], [ pluginId ])' - 'get_gametime()' - 'get_global_edict(variable)' - 'get_global_float(variable)' - 'get_global_int(variable)' - 'get_global_string(variable, szString[], maxLength)' - 'get_global_vector(variable, Float:vector[3])' - 'get_grenade(player)' - 'get_grenade_id(player, model[], len, grandeid=0)' - 'get_info_keybuffer(entity, buffer[], length)' - 'get_keyvalue(entity, szKey[], value[], maxLength)' - 'get_localinfo(const info[], output[], len)' - 'get_mapname(name[],len)' - 'get_mask(index, mask)' - 'get_maxplayers()' - 'get_maxspeed(index)' - 'get_modname(name[], len)' - - 'get_module(id, name[], nameLen, author[], authorLen, version[], ' + - 'versionLen, &status)' - 'get_modulesnum()' - 'get_msg_arg_float(argn)' - 'get_msg_arg_int(argn)' - 'get_msg_arg_string(argn, szReturn[], length)' - 'get_msg_args()' - 'get_msg_argtype(argn)' - 'get_msg_block(msgId)' - 'get_msg_origin(Float:Origin[3])' - 'get_offset_char(id, offset, [ linux = 5])' - 'get_offset_float(id, offset, [ linux = 5])' - 'get_offset_int(id, offset, [ linux = 5])' - 'get_offset_short(id, offset, [ linux = 5])' - 'get_pdata_float(index, offset, [ linuxdiff = 5 ])' - 'get_pdata_int(index, offset, [ linuxdiff = 5 ])' - - 'get_players(players[32], &num, const flags = "", const team = ""' + - ')' - 'get_playersnum([ flag ])' - - 'get_plugin(index,filename[],len1,name[],len2,version[],len3,auth' + - 'or[],len4,status[],len5)' - 'get_pluginsnum()' - 'get_res(index)' - 'get_spawn(type, number = 0, Float:ret[3])' - 'get_speak(player)' - 'get_special(index, mask)' - 'get_speed(entity)' - 'get_speedchange(index)' - 'get_srvcmd(index,server_cmd[],len1,&flags, info[],len2, flag)' - 'get_srvcmdsnum(flag)' - 'get_stats(index, stats[8], bodyhits[8], name[], len)' - 'get_stats(player, stats[8], bodyhits[8], name[], len)' - 'get_stats(player, stats[9], bodyhits[8], name[], len)' - 'get_statsnum()' - 'get_systime(offset = 0)' - 'get_time(const format[],output[],len)' - 'get_timeleft()' - 'get_tr(TraceResult:tr_member, [ ... ])' - 'get_user_aiming(index, &id, &body, [ distance ])' - 'get_user_ammo(index, weapon, &clip, &ammo)' - 'get_user_armor(index)' - - 'get_user_astats(index, wpnindex, stats[8], bodyhits[8], [ wpnnam' + - 'e = "", len = 0])' - - 'get_user_astats(index, wpnindex, stats[8], bodyhits[8], [ wpnnam' + - 'e[] = "", len = 0 ])' - - 'get_user_astats(player, wpnindex, stats[9], bodyhits[8], [ wpnna' + - 'me, maxLength ])' - 'get_user_attacker(index, [ &weapon, &hitzone ])' - 'get_user_authid(index, authid[], len)' - 'get_user_button(player)' - 'get_user_deaths(index)' - 'get_user_flags(index,id=0)' - 'get_user_frags(id)' - 'get_user_godmode(index)' - 'get_user_gravity(index)' - 'get_user_health(id)' - 'get_user_hitzones(index, target)' - 'get_user_index(const name[])' - 'get_user_info(index, const info[], output[], len)' - 'get_user_ip(index, ip[], len, [ without_port ])' - 'get_user_lstats(player, stats[9], bodyhits[8])' - 'get_user_maxspeed(index)' - 'get_user_menu(index,&id,&keys)' - 'get_user_msgid(const name[])' - 'get_user_name(index, name[], len)' - 'get_user_noclip(index)' - 'get_user_oldbutton(player)' - 'get_user_origin(index, origin[3], [ mode ])' - 'get_user_ping(index, &ping, &loss)' - 'get_user_rstats(index, stats[8], bodyhits[8])' - 'get_user_rstats(player, stats[9], bodyhits[8])' - 'get_user_stats(index, stats[8], bodyhits[8])' - 'get_user_stats(index, stats[9], bodyhits[8])' - 'get_user_team(index, [ team[], len ])' - 'get_user_time(index, [ flag ])' - 'get_user_userid(index)' - 'get_user_velocity(entity, Float:Vector[3])' - - 'get_user_vstats(index, victim, stats[8], bodyhits[8], [ wpnname[' + - '] = "", len = 0 ])' - - 'get_user_vstats(player, victim, stats[9], bodyhits[8], [ wpnname' + - '[], maxLen ])' - 'get_user_weapon(index, &clip, &ammo)' - 'get_user_weapons(index, weapons[32], &num)' - 'get_user_wlstats(index, wpnindex, stats[8], bodyhits[8])' - 'get_user_wlstats(player, wpnindex, stats[9], bodyhits[8])' - 'get_user_wrstats(index, wpnindex, stats[8], bodyhits[8])' - 'get_user_wrstats(player, wpnindex, stats[9], bodyhits[8])' - 'get_user_wstats(index, wpnindex, stats[8], bodyhits[8])' - 'get_user_wstats(player, wpnindex, stats[9], bodyhits[8])' - 'get_usercmd(type, [ ... ])' - 'get_vaultdata(const key[], [ data[], len ])' - 'get_weaponname(id, weapon[], len)' - 'get_xvar_float(id)' - 'get_xvar_id(const name[])' - 'get_xvar_num(id)' - 'getarg(arg, [ index ])' - 'getkey_float(keytable, key[])' - 'getkey_int(keytable, key[])' - 'getkey_string(keytable, const key[], value[], maxLength)' - 'give_item(index, const item[])' - 'grenade_throw(index, greindex, wId)' - 'grenade_throw(index,greindex,wId)' - 'halflife_time()' - 'has_weapon(index, weapon, [ setweapon = -1])' - 'heapspace()' - 'in_list_float(list, Float:num)' - 'in_list_int(list, num)' - 'in_list_string(list, const str[])' - 'inconsistent_file(id,const filename[], reason[64] )' - 'is_combat()' - 'is_dedicated_server()' - 'is_linux_server()' - 'is_map_valid(const mapname[])' - 'is_module_loaded(const name[])' - 'is_plugin_loaded(const name[])' - 'is_running(const mod[])' - 'is_user_admin(id)' - 'is_user_alive(index)' - 'is_user_bot(index)' - 'is_user_connected(index)' - 'is_user_connecting(index)' - 'is_user_hltv(index)' - 'is_valid_ent(entity)' - 'isalnum(ch)' - 'isalpha(ch)' - 'isdigit(ch)' - 'isspace(ch)' - 'IVecFVec(IVec[3], Float:FVec[3])' - 'jit_enabled()' - 'keytable_clear(keytable)' - 'keytable_count(keytable)' - 'keytable_delete(keytable)' - 'keytable_getkey(keytable, key[], maxLength)' - 'keytable_getval(keytable, val[], maxLength)' - 'keytable_next(keytable)' - 'keytable_reset(keytable)' - 'list_clear_float(list)' - 'list_clear_int(list)' - 'list_clear_string(list)' - 'list_delete_float(list)' - 'list_delete_int(list)' - 'list_delete_string(list)' - 'list_get_float(list, [ position = -1 ])' - 'list_get_int(list, [ position = -1 ])' - 'list_get_string(list, position, value[], maxLength)' - 'list_next_float(list)' - 'list_next_int(list)' - 'list_next_string(list)' - 'list_pop_float(list)' - 'list_pop_int(list)' - 'list_pop_string(list)' - 'list_push_float(list, Float:value)' - 'list_push_int(list, value)' - 'list_push_string(list, position, value[])' - 'list_reset_float(list)' - 'list_reset_int(list)' - 'list_reset_string(list)' - 'list_size_float(list)' - 'list_size_int(list)' - 'list_size_string(list)' - 'list_store_float(list, position, Float:value)' - 'list_store_int(list, position, value)' - 'list_store_string(list, position, value[])' - 'log_amx(const string[], [ ... ])' - 'log_message(const message[], [ ... ])' - 'log_to_file(const file[], const message[], [ ... ])' - 'main(val1, val2)' - 'max(val1, val2)' - 'md5(const szString[], md5buffer[34])' - 'md5_file(const file[], md5buffer[34])' - 'message_begin(dest, msg_type, origin[3]={0,0,0},player=0)' - 'message_end()' - 'new_float_list()' - 'new_int_list()' - 'new_keytable()' - 'new_list_float()' - 'new_list_int()' - 'new_list_string()' - 'new_string_list()' - 'ns_get_build(classname[], [ builtOnly = 1 ], [ Number = 0 ])' - 'ns_get_class(index)' - 'ns_get_deaths(index)' - 'ns_get_energy(index)' - 'ns_get_ent(classname[], value)' - 'ns_get_exp(index)' - 'ns_get_hive_trait(idHive)' - 'ns_get_jpfuel(index)' - 'ns_get_mask(index, mask)' - 'ns_get_maxspeed(index)' - 'ns_get_points(index)' - 'ns_get_res(index)' - 'ns_get_score(index)' - 'ns_get_spawn(team, [ number = 0 ], Float:ret[3])' - 'ns_get_speedchange(index)' - 'ns_get_struct_owner(idStructure)' - 'ns_get_weap_clip(weapon)' - 'ns_get_weap_dmg(weapon)' - 'ns_get_weap_range(weapon)' - 'ns_get_weap_reserve(index, weapon)' - 'ns_give_item(index, const className[])' - 'ns_has_weapon(index, NSWeapon:weapon, [ setweapon = -1 ])' - 'ns_is_combat()' - 'ns_popup(index, szMsg[180], ah)' - 'ns_set_deaths(index, numdeaths)' - 'ns_set_energy(index, Float:energy)' - 'ns_set_exp(index, Float:exp)' - 'ns_set_fov(index, [ Float:fov = 0.0 ])' - 'ns_set_hive_trait(idHive, trait)' - 'ns_set_jpfuel(index, Float:fuel)' - 'ns_set_mask(index, mask, value)' - - 'ns_set_menu(player, r, g, b, x, y, effects, Float:fadeintime, Fl' + - 'oat:fadeouttime, channel1, channel2)' - 'ns_set_player_body(index, [ body = -1 ])' - 'ns_set_player_model(index, [ model[] = "" ])' - 'ns_set_player_skin(index, [ skin = -1 ])' - 'ns_set_points(index, points)' - 'ns_set_res(index, Float:res)' - 'ns_set_score(index, score)' - 'ns_set_speedchange(index, [ speedchange = 0 ])' - 'ns_set_struct_owner(idStructure, indexOwner)' - 'ns_set_weap_clip(weapon, clipsize)' - 'ns_set_weap_dmg(weapon, Float:damage)' - 'ns_set_weap_range(weapon, Float:range)' - 'ns_set_weap_reserve(index, weapon, ammo)' - 'ns_show_menu(player, command[], text[], keys, time)' - 'ns_spawn_player(player, [ class=1, health=100, armor=25 ])' - 'ns2amx_getammo(index, weapon)' - 'ns2amx_getenergy(index)' - 'ns2amx_gethives()' - 'ns2amx_getjpfuel(index)' - 'ns2amx_giveitem(index, classname[])' - 'ns2amx_isdigesting(index)' - 'ns2amx_nspopup(index, message[190])' - 'ns2amx_setammo(index, weapon, value)' - 'ns2amx_setjpfuel(index, value)' - 'ns2amx_setres(index, value)' - 'num_to_str(num, string[], len)' - 'num_to_word(num, output[], len)' - 'numargs()' - 'parse(const text[], ...)' - - 'parse_loguser(const text[], name[], nameLen, [ &userid, authid[]' + - ', authidLen, team[], teamLen ])' - 'parse_time(const input[],const format[], time = -1)' - 'pause(flag[], const param1[]="",const param2[]="")' - 'pev(index, value, [ ... ])' - 'pfn_spawn(entid)' - 'pfn_think(entid)' - 'pfn_touch(ptr, ptd)' - 'pfn_use(user, used)' - - 'playback_event(flags, invoker, eventindex, Float:delat, Float:or' + - 'igin[3], Float:angles[3], Float:fparam1, Float:fparam2, iparam1,' + - ' iparam2, bparam1, bparam2)' - - 'PlaybackEvent(flags, entid, eventid, Float:delay, Float:Origin[3' + - '], Float:Angles[3], Float:fparam1, Float:fparam2, iparam1, ipara' + - 'm2, bparam2)' - 'plugin_cfg()' - 'plugin_end()' - 'plugin_init()' - 'plugin_log()' - 'plugin_modules()' - 'plugin_pause()' - 'plugin_precache()' - 'plugin_unpause()' - 'PointContents(Float:Origin[3])' - 'precache_event(type, name[], [ ... ])' - 'precache_generic(szFile[])' - 'precache_model(const name[])' - 'precache_sound(const name[])' - - 'RadiusDamage(Float:ExplodeAt[3], DamageMultiplier, RadiusMultipl' + - 'ier)' - 'random(max)' - 'random_float(Float:a,Float:b)' - 'random_num(a,b)' - 'read_argc()' - 'read_args(output[], len)' - 'read_argv(id, output[], len)' - 'read_data(value, [ ... ])' - 'read_datanum()' - 'read_dir(const dirname[], pos, output[], len, &outLen)' - 'read_file(const file[], line, text[], len, &txtLen)' - 'read_flags(const flags[])' - 'read_logargc(Returns the number of log arguments.)' - 'read_logargv(id, output[], len)' - 'read_logdata(output[], len)' - 'regex_free(&Regex:id)' - - 'regex_match(const string[], const pattern[], &ret, error[], maxL' + - 'en)' - 'regex_substr(Regex:id, str_id, buffer[], maxLen)' - - 'register_clcmd(const client_cmd[],const function[],flags=-1, inf' + - 'o[]="")' - - 'register_concmd(const cmd[],const function[],flags=-1, info[]=""' + - ')' - - 'register_cvar(const name[],const string[],flags = 0,Float:fvalue' + - ' = 0.0)' - 'register_dictionary(const file[])' - - 'register_event(const event[], const function[], const flags[], [' + - ' cond=[], ... ])' - 'register_forward(forwardType, callback[], [ post = 0 ])' - 'register_impulse(impulse, function[])' - 'register_logevent(const function[], argsnum, ...)' - 'register_menu(title[], keys, function[], outside=0)' - 'register_menucmd(menuid,keys, const function[])' - 'register_menuid(const menu[], outside=0)' - 'register_message(msgId, function[])' - - 'register_plugin(const plugin_name[], const version[], const auth' + - 'or[])' - - 'register_srvcmd(const server_cmd[],const function[],flags=-1, in' + - 'fo[]="")' - 'register_statsfwd(forward_index)' - 'register_think(Classname[], function[])' - 'register_touch(Toucher[], Touched[], function[])' - 'remove_cvar_flags(const cvar[],flags = -1)' - 'remove_entity(entity)' - 'remove_entity_name(Name[])' - 'remove_quotes(text[])' - 'remove_task(id = 0, outside = 0)' - 'remove_user_flags(index,flags=-1,id=0)' - 'remove_vaultdata(const key[])' - 'replace(text[], len, const what[], const with[])' - 'require_module(const name[])' - 'reset_user_wstats(index)' - 'reset_user_wstats(player)' - 'rewind(file)' - 'server_changelevel(map[])' - 'server_cmd(const command[],{Float,_}:...)' - 'server_exec()' - 'server_frame()' - 'server_print(const message[], [ ... ])' - 'set_client_listen(receiver, sender, listen)' - 'set_cvar_flags(const cvar[],flags)' - 'set_cvar_float(const cvar[],Float:value)' - 'set_cvar_num(const cvarname[],value)' - 'set_cvar_string(const cvar[],const value[]))' - 'set_entity_flags(entity, flag, onoff)' - 'set_entity_visibility(entity, [ visible = 1 ])' - - 'set_hudmessage(red=200, green=100, blue=0, Float:x=-1.0, Float:y' + - '=0.35, effects=0, Float:fxtime=6.0, Float:holdtime=12.0, Float:f' + - 'adeintime=0.1, Float:fadeouttime=0.2, channel=4)' - 'set_lights(const Lighting[])' - 'set_localinfo(const info[], const value[])' - 'set_mask(index, mask, value)' - 'set_msg_arg_float(argn, argtype, Float:fValue)' - 'set_msg_arg_int(argn, argtype, iValue)' - 'set_msg_arg_string(argn, szString[])' - 'set_msg_block(msgId, flag)' - 'set_offset_char(id, offset, value, [ linux = 5 ])' - 'set_offset_float(id, offset, Float:value, [ linux = 5 ])' - 'set_offset_int(id, offset, value, [ linux = 5 ])' - 'set_offset_short(id, offset, value, [ linux = 5 ])' - 'set_pdata_float(index, offset, Float:value, [ linuxdiff = -5 ])' - 'set_pdata_int(index, offset, value, [ linuxdiff = -5 ])' - 'set_pev(index, value, [ ... ])' - 'set_player_body(index, [ body = -1 ])' - 'set_player_model(index, [ model = "" ])' - 'set_player_skin(index, [ skin = -1 ])' - - 'set_rendering(index, fx=kRenderFxNone, r=255,g=255,b=255, render' + - '=kRenderNormal,amount=16)' - 'set_speak(player, speakFlags)' - 'set_speedchange(index, speed)' - - 'set_task(Float:time,const function[],id = 0,parameter[]="",len =' + - ' 0,flags[]="", repeat = 0)' - 'set_tr(TraceResult:tr_member, [ ... ])' - 'set_user_armor(index, armor)' - 'set_user_deaths(index, newDeaths)' - 'set_user_flags(index,flags=-1,id=0)' - 'set_user_footsteps(id, [ set = 1 ])' - 'set_user_frags(index, newFrags)' - 'set_user_godmode(index, [ godmode = 0 ])' - 'set_user_gravity(index, [ Float:gravity = 1.0 ])' - 'set_user_health(index, health)' - 'set_user_hitzones([ index = 0, target = 0, body = 255 [)' - 'set_user_info(index, const info[], const value[])' - 'set_user_maxspeed(index, [ Float:speed = - 1.0 ])' - 'set_user_noclip(index, [ noclip = 0 ])' - 'set_user_origin(index, origin[3])' - - 'set_user_rendering(index, [ fx = kRenderFxNone, r = 255, g = 255' + - ', b = 255, render = kRenderNormal, amount = 16 ])' - 'set_user_velocity(entity, Float:Vector[3])' - 'set_usercmd(type, [ ... ])' - 'set_vaultdata(const key[], [ const data[] ])' - 'set_view(player, viewtype)' - 'set_xvar_float(id, Float:value = 0.0)' - 'set_xvar_num(id, value = 0 )' - 'setarg(arg, index=0, value)' - 'setc(src[], len, ch)' - 'show_hudmessage(index, message[], ...)' - 'show_menu(index, keys, const menu[], time = -1, title[] = "")' - 'show_motd(player, const message[], [ const header[] ])' - 'socket_change(socket, [ timeout = 100000 ])' - 'socket_close(socket)' - 'socket_open(hostname[], port, protocol, &error)' - 'socket_recv(socket, data[], maxLength)' - 'socket_send(socket, data[], length)' - 'spawn(index)' - 'str_to_num(const string[])' - 'strbreak(const text[], left[], leftLen, right[], rightLen)' - 'strip_user_weapons(index)' - 'strlen(const string[])' - 'strpack(dest[], const source[])' - 'strtolower(string[])' - 'strtoupper(string[])' - 'strunpack(dest[], const source[])' - 'swapchars(c)' - 'takedamage(victim, inflictor, attacker, Float:damage, type)' - 'task_exists(id = 0, outside = 0)' - 'tfc_clearmodel(index)' - 'tfc_getbammo(index, ammo)' - 'tfc_getgrenadename(weapon, name[], len)' - 'tfc_getweaponbammo(player, weapon)' - 'tfc_getwpnlogname(weapon, name[], len)' - 'tfc_getwpnname(weapon, name[], len)' - 'tfc_isgrenade(weapon)' - 'tfc_ismelee(weapon)' - 'tfc_setbammo(index, ammo, value)' - 'tfc_setmodel(index, const Model[], const Skin[])' - - 'tfc_setpddata(timer, sentrygun, shells, bullets, cells, rockets,' + - ' nade1, nade2)' - 'tfc_setweaponbammo(player, weapon, value)' - 'tfc_userkill(index)' - 'tickcount([ &granularity ])' - 'time([ &hour, &minute, &second ])' - 'tolower(c)' - 'toupper(c)' - - 'trace_hull(Float:origin[3], hull, [ ignoredent=0, ignoremonsters' + - '=0 ])' - - 'trace_line(IgnoreEnt, Float:Start[3], Float:End[3], Float:vRetur' + - 'n[3])' - 'traceresult(type, [ ... ])' - 'trim(text[])' - 'ts_createpwup(pwup)' - 'ts_getkillingstreak(index)' - 'ts_getusercash(index)' - 'ts_getuseritems(index)' - 'ts_getuserkillflags(killer)' - 'ts_getuserlastfrag(index)' - 'ts_getuserpwup(index, &Value)' - 'ts_getuserspace(index)' - 'ts_getuserwpn(index, &ammo, &clip, &mode, &extra)' - 'ts_givepwup(index, pwupent)' - 'ts_giveweapon(index, weapon, clips, extra)' - 'ts_setpdata(knifeoffset)' - 'ts_wpnlogtoid(logname[])' - 'ts_wpnlogtoname(logname[], name[], len)' - 'ucfirst(string[])' - 'unlink(const filename[], ...)' - 'unpause(flag[], const param1[]="",const param2[]="")' - 'user_has_weapon(index, weapon, [ setweapon ])' - 'user_kill(index, [ flag ])' - 'user_silentkill(player)' - 'user_slap(index, power, [ rnddir ])' - 'vaultdata_exists(const key[])' - 'vector_distance(Float:Vector1[3], Float:Vector2[3])' - 'vector_length(Float:Vector[3])' - 'vector_to_angle(Float:vector[3], Float:vReturn[3])' - 'VelocityByAim(entity, velocity, Float:RetValue[3])' - 'ViewContents(player)' - 'write_angle(x)' - 'write_byte(x)' - 'write_char(x)' - 'write_coord(x)' - 'write_entity(x)' - 'write_file(const file[], const text[], [ line ])' - 'write_long(x)' - 'write_short(x)' - 'write_string(x)' - 'xmod_get_maxweapons()' - 'xmod_get_stats_size()' - 'xmod_get_wpnlogname(wpnindex, name[], len)' - 'xmod_get_wpnname(wpnindex, name[], len)' - 'xmod_is_custom_wpn(wpnindex)' - 'xmod_is_melee_wpn(wpnindex)' - 'xvar_exists(const name[])' - 'zdod_get_next_class(player)' - 'zdod_get_pl_deaths(player)' - 'zdod_is_randomclass(player)' - - 'zdod_set_fuse(player, [ set=FUSE_SET, float:newFuse=5.0, type=FT' + - '_NEW ])' - 'zdod_set_pl_deaths(player, value, [ refresh=1 ])' - 'zdod_set_pl_teamname(player, szName[])' - - 'zdod_set_stamina(player, [ set=STAMINA_SET, minvalue=0, maxvalue' + - '=100 ])' - 'zdod_set_user_class(player, classId)' - 'zdod_set_user_score(player, value, [ refresh=1 ])' - 'zdod_set_user_team(player, teamId, [ refresh=1 ])') - EndDefinition = ')' - Editor = sciEditor - ParametersEnd = ')' - ParametersSeparators = ',' - ParametersStart = '(' - WordCharacters = '_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' - IgnoreCase = True - Left = 794 - Top = 34 - end - object srpSearch: TSciSearchReplace - SearchForSelWord = False - Editor = sciEditor - Left = 762 - Top = 34 - end - object odOpen: TOpenDialog - Filter = - 'SMA-Files (*.sma)|*.sma|INC-Files (*.inc)|*.inc|All files (*.*)|' + - '*.*' - Options = [ofHideReadOnly, ofPathMustExist, ofFileMustExist, ofEnableSizing] - Title = 'Open...' - Left = 730 - Top = 4 - end - object sdSave: TSaveDialog - Filter = - 'SMA-Files (*.sma)|*.sma|INC-Files (*.inc)|*.inc|All files (*.*)|' + - '*.*' - Title = 'Save...' - Left = 730 - Top = 34 - end - object ppmEditor: TPopupMenu - Left = 762 - Top = 4 - object mnuClose: TMenuItem - Caption = 'Close' - Enabled = False - OnClick = mnuCloseClick - end - end - object IdFTP: TIdFTP - MaxLineAction = maException - ProxySettings.ProxyType = fpcmNone - ProxySettings.Port = 0 - Left = 698 - Top = 4 - end - object ppmCopy: TPopupMenu - Left = 698 - Top = 34 - object mnuCopyItem: TMenuItem - Caption = 'Copy Item' - OnClick = mnuCopyItemClick - end - object mnuCopyAll: TMenuItem - Caption = 'Copy all' - OnClick = mnuCopyAllClick - end - end -end diff --git a/editor/editor2/UnitfrmMain.pas b/editor/editor2/UnitfrmMain.pas deleted file mode 100755 index 206dcab6..00000000 --- a/editor/editor2/UnitfrmMain.pas +++ /dev/null @@ -1,1251 +0,0 @@ -unit UnitfrmMain; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - ToolWin, ActnMan, ActnCtrls, ActnMenus, ActnList, - ImgList, ComCtrls, SciDocuments, SciLexer, ClipBrd, - SciLexerMod, SciAutoComplete, SciCallTips, SciLexerOptionsDlg, - SciSearchReplace, StdCtrls, Tabs, Menus, ShellAPI, ScintillaLanguageManager, - SciLexerMemo, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, - IdFTP, ExtCtrls, TFlatHintUnit, Dialogs, XPStyleActnCtrls, CorelButton; - -type - TfrmMain = class(TForm) - atbToolBar: TActionToolBar; - ilMenu: TImageList; - amMenu: TActionManager; - acNew: TAction; - acSave: TAction; - acSaveAs: TAction; - acOpen: TAction; - acClose: TAction; - acCloseAllFiles: TAction; - acExit: TAction; - acUndo: TAction; - acRedo: TAction; - acCut: TAction; - acCopy: TAction; - acPaste: TAction; - acSearch: TAction; - acFindNext: TAction; - acReplace: TAction; - acCompile: TAction; - acCompileAndUpload: TAction; - acDoc: TAction; - acForum: TAction; - acAbout: TAction; - mmbMenu: TActionMainMenuBar; - acCompileAndStart: TAction; - acOptions: TAction; - sciEditor: TScintilla; - dtcEditor: TSciDocumentTabControl; - sacComplete: TSciAutoComplete; - cltEditor: TSciCallTips; - srpSearch: TSciSearchReplace; - odOpen: TOpenDialog; - sdSave: TSaveDialog; - ppmEditor: TPopupMenu; - mnuClose: TMenuItem; - acGoTo: TAction; - IdFTP: TIdFTP; - sbInfo: TStatusBar; - acSaveAll: TAction; - pnlFunctions: TPanel; - pnlSpacerTop: TPanel; - trvFunctions: TTreeView; - pnlSpacerLeft: TPanel; - splFunctions: TSplitter; - pnlSpacerBottom: TPanel; - acEdit: TAction; - lvDebug: TListView; - acIdenter: TAction; - acMenuMaker: TAction; - acPMM: TAction; - acRemoveMissingPlugins: TAction; - acSocketTerminal: TAction; - acSelectAll: TAction; - acUnidenter: TAction; - acLoopGenerator: TAction; - ppmCopy: TPopupMenu; - mnuCopyItem: TMenuItem; - mnuCopyAll: TMenuItem; - procedure FormCreate(Sender: TObject); - procedure acNewExecute(Sender: TObject); - procedure acOpenExecute(Sender: TObject); - procedure acSaveExecute(Sender: TObject); - procedure acSaveAsExecute(Sender: TObject); - procedure acCloseExecute(Sender: TObject); - procedure dtcEditorChange(Sender: TObject); - procedure acOptionsExecute(Sender: TObject); - procedure acExitExecute(Sender: TObject); - procedure acUndoExecute(Sender: TObject); - procedure acRedoExecute(Sender: TObject); - procedure acCutExecute(Sender: TObject); - procedure acCopyExecute(Sender: TObject); - procedure acPasteExecute(Sender: TObject); - procedure acSearchExecute(Sender: TObject); - procedure acFindNextExecute(Sender: TObject); - procedure acReplaceExecute(Sender: TObject); - procedure acCloseAllFilesExecute(Sender: TObject); - procedure dtcEditorMouseUp(Sender: TObject; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); - procedure mnuCloseClick(Sender: TObject); - procedure acDocExecute(Sender: TObject); - procedure acForumExecute(Sender: TObject); - procedure acAboutExecute(Sender: TObject); - procedure acCompileExecute(Sender: TObject); - procedure sciEditorMouseDown(Sender: TObject; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); - procedure sciEditorKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); - procedure sciEditorKeyPress(Sender: TObject; var Key: Char); - procedure FormActivate(Sender: TObject); - procedure acGoToExecute(Sender: TObject); - procedure acCompileAndUploadExecute(Sender: TObject); - procedure acCompileAndStartExecute(Sender: TObject); - procedure FormClose(Sender: TObject; var Action: TCloseAction); - procedure amMenuExecute(Action: TBasicAction; var Handled: Boolean); - procedure FormShow(Sender: TObject); - procedure sciEditorMouseUp(Sender: TObject; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); - procedure sciEditorMouseMove(Sender: TObject; Shift: TShiftState; X, - Y: Integer); - procedure FormConstrainedResize(Sender: TObject; var MinWidth, - MinHeight, MaxWidth, MaxHeight: Integer); - procedure acSaveAllExecute(Sender: TObject); - procedure sciEditorKeyUp(Sender: TObject; var Key: Word; - Shift: TShiftState); - procedure dtcEditorChanging(Sender: TObject; var AllowChange: Boolean); - procedure trvFunctionsEditing(Sender: TObject; Node: TTreeNode; - var AllowEdit: Boolean); - procedure trvFunctionsDblClick(Sender: TObject); - procedure trvFunctionsCollapsed(Sender: TObject; Node: TTreeNode); - procedure trvFunctionsExpanded(Sender: TObject; Node: TTreeNode); - procedure trvFunctionsEdited(Sender: TObject; Node: TTreeNode; - var S: String); - procedure trvFunctionsKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); - procedure trvFunctionsClick(Sender: TObject); - procedure acEditExecute(Sender: TObject); - procedure pnlSpacerLeftClick(Sender: TObject); - procedure lvDebugEnter(Sender: TObject); - procedure lvDebugDblClick(Sender: TObject); - procedure acIdenterExecute(Sender: TObject); - procedure acMenuMakerExecute(Sender: TObject); - procedure acPMMExecute(Sender: TObject); - procedure acRemoveMissingPluginsExecute(Sender: TObject); - procedure acSocketTerminalExecute(Sender: TObject); - procedure FormDestroy(Sender: TObject); - procedure acSelectAllExecute(Sender: TObject); - procedure acUnidenterExecute(Sender: TObject); - procedure acLoopGeneratorExecute(Sender: TObject); - procedure sciEditorModified(Sender: TObject; const position, - modificationType: Integer; text: PAnsiChar; const length, linesAdded, - line, foldLevelNow, foldLevelPrev: Integer); - procedure lvDebugMouseDown(Sender: TObject; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); - procedure mnuCopyItemClick(Sender: TObject); - procedure mnuCopyAllClick(Sender: TObject); - private - eSelectedTab: Integer; - eCurrentLine: Integer; - procedure WMCopyData(var Msg: TWMCopyData); message WM_COPYDATA; - public - StdAutoComplete: String; // Save this because we add special functions - StdCallTips: String; // etc. dynamically for each file - FunctionType: TStringList; - CurrItem: TListItem; - function StrLength(eStr: String): Integer; - procedure OnExceptionHandler(Sender: TObject; E: Exception); - procedure DeleteNode(Node: TTreeNode); - procedure RenameNode(Node: TTreeNode; New: String); - procedure SetModified; - procedure SetSaved; - procedure ShowErrorLine; - end; - -var - frmMain: TfrmMain; - -implementation - -uses UnitfrmOptions, UnitfrmDebug, UnitFunc, - UnitfrmAbout, UnitfrmGoToLine, UnitTextAnalyze, UnitfrmMenuMaker, - UnitfrmSockets, UnitfrmLoopGenerator; - -{$R *.dfm} - -procedure TfrmMain.FormCreate(Sender: TObject); -begin - eErrorLine := -1; - Caption := 'AMXX-Edit v2'; - StdAutoComplete := sacComplete.AStrings.Text; - StdCallTips := cltEditor.ApiStrings.Text; - Application.OnException := OnExceptionHandler; - FunctionType := TStringList.Create; - DoubleBuffered := True; -end; - -procedure TfrmMain.acNewExecute(Sender: TObject); -begin - dtcEditor.NewDocument; - acClose.Enabled := True; - mnuClose.Enabled := True; - acCloseAllFiles.Enabled := True; -end; - -procedure TfrmMain.acOpenExecute(Sender: TObject); -begin - if DirectoryExists(frmSettings.txtSave.Text) then - odOpen.InitialDir := frmSettings.txtSave.Text; - - try - if odOpen.Execute then begin - dtcEditor.Open(odOpen.FileName); - SetSaved; - UpdateList(sciEditor.Lines.Text); - end; - atbToolbar.RecreateControls; - except - // :F - end; -end; - -procedure TfrmMain.acSaveExecute(Sender: TObject); -begin - try - if dtcEditor.ActiveDocument.IsUntitled then - acSaveAs.Execute - else begin - dtcEditor.Editor.SaveToFile(dtcEditor.ActiveDocument.FileName); - Delay(100); - SetSaved; - end; - atbToolbar.RecreateControls; - except - // :F - end; -end; - -procedure TfrmMain.acSaveAsExecute(Sender: TObject); -begin - if DirectoryExists(frmSettings.txtSave.Text) then - sdSave.InitialDir := frmSettings.txtSave.Text; - - if sdSave.Execute then begin - AppendFileExt; - dtcEditor.ActiveDocument.FileName := sdSave.FileName; - sciEditor.SaveToFile(dtcEditor.ActiveDocument.FileName); - SetSaved; - end; -end; - -procedure TfrmMain.acCloseExecute(Sender: TObject); -begin - if dtcEditor.ActiveDocument.Modified then begin - case MessageBox(Handle, PChar('Do you want to save "' + ExtractFileName(dtcEditor.ActiveDocument.FileName) + '" before closing?'), 'Question', MB_ICONQUESTION + MB_YESNOCANCEL) of - mrYes: acSave.Execute; - mrCancel: exit; - end; - end; - dtcEditor.Close(dtcEditor.ActiveDocument.Index, False); - acClose.Enabled := (dtcEditor.Tabs.Count <> 1) or (not dtcEditor.ActiveDocument.IsUntitled); - mnuClose.Enabled := acClose.Enabled; - acCloseAllFiles.Enabled := (dtcEditor.Tabs.Count <> 1) or (dtcEditor.Tabs.Count <> 1) or (not dtcEditor.ActiveDocument.IsUntitled); -end; - -procedure TfrmMain.dtcEditorChange(Sender: TObject); -begin - if frmSettings.chkHighlighting.Checked then - sciEditor.LanguageManager.SelectedLanguage := 'SMALL' - else - sciEditor.LanguageManager.SelectedLanguage := 'null'; - - if sbInfo.Panels[0].Width > Canvas.TextWidth(dtcEditor.ActiveDocument.FileName) then - sbInfo.Panels[0].Text := dtcEditor.ActiveDocument.FileName - else - sbInfo.Panels[0].Text := ExtractFileName(dtcEditor.ActiveDocument.FileName); - - if dtcEditor.ActiveDocument.Modified then - sbInfo.Panels[1].Text := 'Modified' - else - sbInfo.Panels[1].Text := ''; - UpdateList(sciEditor.Lines.Text); - eCurrentLine := sciEditor.GetCurrentLineNumber; -end; - -procedure TfrmMain.acOptionsExecute(Sender: TObject); -begin - Load; - if frmSettings.ShowModal = mrOk then begin - Apply; - Save; - end; -end; - -procedure TfrmMain.acExitExecute(Sender: TObject); -begin - Close; -end; - -procedure TfrmMain.acUndoExecute(Sender: TObject); -begin - sciEditor.Undo; -end; - -procedure TfrmMain.acRedoExecute(Sender: TObject); -begin - sciEditor.Redo; -end; - -procedure TfrmMain.acCutExecute(Sender: TObject); -begin - sciEditor.Cut; -end; - -procedure TfrmMain.acCopyExecute(Sender: TObject); -begin - sciEditor.Copy; -end; - -procedure TfrmMain.acPasteExecute(Sender: TObject); -begin - sciEditor.Paste; -end; - -procedure TfrmMain.acSearchExecute(Sender: TObject); -begin - try - srpSearch.ShowSearchReplaceDialog(False); - atbToolBar.RecreateControls; - except - // :F - end; -end; - -procedure TfrmMain.acFindNextExecute(Sender: TObject); -begin - srpSearch.DoSearchReplaceText(False, False); -end; - -procedure TfrmMain.acReplaceExecute(Sender: TObject); -begin - srpSearch.ShowSearchReplaceDialog(True); -end; - -procedure TfrmMain.acCloseAllFilesExecute(Sender: TObject); -var i: integer; -begin - if ShowSaveDialog('Close all files', 'Save files', 'Close') then begin - for i := dtcEditor.Tabs.Count -1 downto 0 do - dtcEditor.Close(i, False); - acClose.Enabled := False; - mnuClose.Enabled := False; - acCloseAllFiles.Enabled := False; - DeleteFile(ExtractFilePath(ParamStr(0)) + 'Files.ini'); - end; -end; - -procedure TfrmMain.dtcEditorMouseUp(Sender: TObject; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -begin - eSelectedTab := dtcEditor.IndexOfTabAt(X, Y); - if (eSelectedTab <> -1) and (Y < 20) and (Y > 0) and (Button = mbRight) then - ppmEditor.Popup(Mouse.CursorPos.X, Mouse.CursorPos.Y); -end; - -procedure TfrmMain.mnuCloseClick(Sender: TObject); -begin - if dtcEditor.ActiveDocument.Modified then begin - case MessageBox(Handle, PChar('Do you want to save "' + ExtractFileName(dtcEditor.Document[eSelectedTab].FileName) + '" before closing?'), 'Question', MB_ICONQUESTION + MB_YESNOCANCEL) of - mrYes: begin - if dtcEditor.ActiveDocument.IsUntitled then begin - if DirectoryExists(frmSettings.txtSave.Text) then - sdSave.InitialDir := frmSettings.txtSave.Text; - - if sdSave.Execute then begin - AppendFileExt; - dtcEditor.Document[eSelectedTab].FileName := sdSave.FileName; - dtcEditor.Document[eSelectedTab].Modified := False; - sciEditor.SaveToFile(dtcEditor.Document[eSelectedTab].FileName); - if eSelectedTab = dtcEditor.ActiveDocument.Index then - sbInfo.Panels[1].Text := '' - end; - end - else begin - dtcEditor.Editor.SaveToFile(dtcEditor.ActiveDocument.FileName); - dtcEditor.ActiveDocument.Modified := False; - if eSelectedTab = dtcEditor.ActiveDocument.Index then - sbInfo.Panels[1].Text := ''; - end; - end; - mrCancel: exit; - end; - end; - - dtcEditor.Close(eSelectedTab, False); - acClose.Enabled := (dtcEditor.Tabs.Count <> 1) or (not dtcEditor.ActiveDocument.IsUntitled); - mnuClose.Enabled := acClose.Enabled; - acCloseAllFiles.Enabled := (dtcEditor.Tabs.Count <> 1) or (not dtcEditor.ActiveDocument.IsUntitled); -end; - -procedure TfrmMain.acDocExecute(Sender: TObject); -begin - ShellExecute(Handle, 'open', 'http://www.amxmodx.org/doc/', nil, nil, SW_SHOW); -end; - -procedure TfrmMain.acForumExecute(Sender: TObject); -begin - ShellExecute(Handle, 'open', 'http://www.amxmodx.org/forums/viewforum.php?f=8', nil, nil, SW_SHOW); -end; - -procedure TfrmMain.acAboutExecute(Sender: TObject); -begin - frmAbout.ShowModal; -end; - -procedure TfrmMain.acCompileExecute(Sender: TObject); -begin - DoCompile; -end; - -procedure TfrmMain.sciEditorMouseDown(Sender: TObject; - Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -begin - sbInfo.Panels.Items[2].Text := Format('Ln %s Ch %s', [IntToStr(sciEditor.GetCurrentLineNumber +1), IntToStr(sciEditor.GetCaretInLine +1)]); - sciEditor.ReadOnly := False; - eCurrentLine := sciEditor.GetCurrentLineNumber; - if sciEditor.LineFromPosition(sciEditor.SelStart) <> eErrorLine then begin - sciEditor.Caret.LineBackColor := frmSettings.cboActiveLine.Selected; - sciEditor.Caret.ForeColor := clDefault; - sciEditor.Colors.SelBack := clHighlight; - end; -end; - -procedure TfrmMain.sciEditorKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); -begin - sbInfo.Panels.Items[2].Text := Format('Ln %s Ch %s', [IntToStr(sciEditor.GetCurrentLineNumber +1), IntToStr(sciEditor.GetCaretInLine +1)]); -end; - -procedure TfrmMain.sciEditorKeyPress(Sender: TObject; var Key: Char); -var eStr: String; -begin - if (Key = #13) and (Trim(sciEditor.Lines[sciEditor.GetCurrentLineNumber]) = '') and (frmSettings.chkAutoIndent.Checked) then begin - if sciEditor.GetCurrentLineNumber <> 0 then begin - eStr := Trim(sciEditor.Lines[sciEditor.GetCurrentLineNumber -1]); - Delete(eStr, 1, Length(eStr) -1); - if eStr = '{' then - sciEditor.SelText := ' '; - end; - end; - if (Key = '}') and (Trim(sciEditor.Lines[sciEditor.GetCurrentLineNumber]) = '') then begin // YES thats only for bail ;) - sciEditor.Lines[sciEditor.GetCurrentLineNumber] := Copy(sciEditor.Lines[sciEditor.GetCurrentLineNumber], 1, Length(sciEditor.Lines[sciEditor.GetCurrentLineNumber]) -1); // remove last indent.. - sciEditor.SelStart := sciEditor.SelStart + Length(sciEditor.Lines[sciEditor.GetCurrentLineNumber]); // and jump to last position - end; -end; - -procedure TfrmMain.FormActivate(Sender: TObject); -begin - sciEditor.Font.Name := 'Courier New'; // otherwise the font MAY reset (don't know why) - if eErrorLine <> -1 then - ShowErrorLine; -end; - -procedure TfrmMain.acGoToExecute(Sender: TObject); -begin - frmGoToLine.txtLine.SelectAll; - if frmGoToLine.ShowModal = mrOk then - sciEditor.GotoLineEnsureVisible(StrToInt(frmGoToLine.txtLine.Text) -1); -end; - -procedure TfrmMain.acCompileAndUploadExecute(Sender: TObject); -begin - DoCompile; - - if eErrors = 0 then begin - if frmSettings.optWindow.Checked then begin - frmDebug.lblStatus.Font.Style := []; - frmDebug.lblStatus.Caption := ' Uploading file...'; - frmDebug.lstOutput.Items.Add(''); - frmDebug.lstOutput.Items.Add('Connecting to FTP server...'); - frmDebug.lstOutput.ItemIndex := frmDebug.lstOutput.Items.Count -1; - end - else begin - lvDebug.Items.Add.Caption := 'Connecting to FTP server...'; - lvDebug.ItemIndex := lvDebug.Items.Count -1; - end; - IdFTP.Host := frmSettings.txtHost.Text; - IdFTP.Port := StrToInt(frmSettings.txtPort.Text); - IdFTP.Username := frmSettings.txtUser.Text; - IdFTP.Password := frmSettings.txtPassword.Text; - try - try - IdFTP.Connect; - finally - if frmSettings.optWindow.Checked then begin - frmDebug.lstOutput.Items.Add('Connected, uploading file...'); - frmDebug.lstOutput.ItemIndex := frmDebug.lstOutput.Items.Count -1; - end - else begin - lvDebug.Items.Add.Caption := 'Connected, uploading file...'; - lvDebug.ItemIndex := lvDebug.Items.Count -1; - end; - IdFTP.ChangeDir(frmSettings.txtStandardDir.Text); - IdFTP.Put(frmSettings.txtAMXXPath.Text + 'plugins\' + ChangeFileExt(ExtractFileName(frmMain.dtcEditor.ActiveDocument.FileName), '.amxx'), ChangeFileExt(ExtractFileName(frmMain.dtcEditor.ActiveDocument.FileName), '.amxx')); - if frmSettings.optWindow.Checked then begin - frmDebug.lstOutput.Items.Add('Done.'); - frmDebug.lstOutput.ItemIndex := frmDebug.lstOutput.Items.Count -1; - frmDebug.lblStatus.Font.Style := [fsBold]; - frmDebug.lblStatus.Caption := ' Done.'; - end - else begin - lvDebug.Items.Add.Caption := 'Done.'; - lvDebug.ItemIndex := lvDebug.Items.Count -1; - end; - IdFTP.Disconnect; - end; - except - if frmSettings.optWindow.Checked then begin - frmDebug.lblStatus.Caption := ' Error: Couldn''t connect to server.'; - frmDebug.lstOutput.Items.Add('Error: Couldn''t connect to server.'); - frmDebug.lstOutput.Items.Add('Check your settings and try again.'); - frmDebug.lstOutput.ItemIndex := frmDebug.lstOutput.Items.Count -1; - end - else begin - lvDebug.Items.Add.Caption := 'Error: Coudln''t connect to server.'; - lvDebug.Items.Add.Caption := 'Check your settings and try again.'; - lvDebug.ItemIndex := lvDebug.Items.Count -1; - end; - end; - end; -end; - -procedure TfrmMain.acCompileAndStartExecute(Sender: TObject); -begin - if FileExists(frmSettings.txtHalfLife.Text) then begin - if FileExists(frmSettings.txtAMXXPath.Text + 'plugins\' + ChangeFileExt(ExtractFileName(frmMain.dtcEditor.ActiveDocument.FileName), '.amxx')) then - DeleteFile(frmSettings.txtAMXXPath.Text + 'plugins\' + ChangeFileExt(ExtractFileName(frmMain.dtcEditor.ActiveDocument.FileName), '.amxx')); - DoCompile; - if FileExists(frmSettings.txtAMXXPath.Text + 'plugins\' + ChangeFileExt(ExtractFileName(frmMain.dtcEditor.ActiveDocument.FileName), '.amxx')) then begin - if frmSettings.optWindow.Checked then - frmDebug.lblStatus.Caption := ' Done: Starting Half-Life' - else - lvDebug.Items.Add.Caption := 'Starting Half-Life...'; - ShellExecute(Handle, 'open', PChar(frmSettings.txtHalfLife.Text), '', PChar(ExtractFilePath(frmSettings.txtHalfLife.Text)), SW_SHOW); - end; - end - else - MessageBox(Handle, 'Couldn''t find Half-Life exe. Check your settings and try again.', 'Error', MB_ICONERROR); -end; - -procedure TfrmMain.WMCopyData(var Msg: TWMCopyData); -var - sText: array[0..1500] of Char; -begin - try - StrLCopy(sText, Msg.CopyDataStruct.lpData, Msg.CopyDataStruct.cbData); - dtcEditor.Open(sText); - SetSaved; - UpdateList(sciEditor.Lines.Text); - except - // :F - end; -end; - -procedure TfrmMain.FormClose(Sender: TObject; var Action: TCloseAction); -begin - if not ShowSaveDialog('Save files before close', 'Save and close', 'Close') then - Action := caNone; -end; - -procedure TfrmMain.amMenuExecute(Action: TBasicAction; - var Handled: Boolean); -begin - sciEditor.Caret.LineBackColor := frmSettings.cboActiveLine.Selected; - sciEditor.Caret.ForeColor := clDefault; - sciEditor.Colors.SelBack := clHighlight; - if lvDebug.Visible then - lvDebug.Visible := False; -end; - -procedure TfrmMain.FormShow(Sender: TObject); -var eStr: TStringList; - i: integer; -begin - if Tag = 0 then begin - Tag := 1; - if frmSettings.chkReload.Checked then begin - eStr := TStringList.Create; - if FileExists(ExtractFilePath(ParamStr(0)) + 'Files.ini') then begin - eStr.LoadFromFile(ExtractFilePath(ParamStr(0)) + 'Files.ini'); - with frmMain do begin - for i := 0 to eStr.Count -1 do begin - if FileExists(eStr[i]) then begin - dtcEditor.Open(eStr[i]); - SetSaved; - end; - end; - acClose.Enabled := True; - mnuClose.Enabled := True; - acCloseAllFiles.Enabled := True; - end; - end; - eStr.Free; - UpdateList(sciEditor.Lines.Text); - end; - - for i := 1 to ParamCount do begin - if FileExists(ParamStr(i)) then begin - dtcEditor.Open(ParamStr(i)); - SetSaved; - end; - end; - UpdateList(sciEditor.Lines.Text); - acClose.Enabled := True; - mnuClose.Enabled := True; - acCloseAllFiles.Enabled := True; - end; -end; - -procedure TfrmMain.sciEditorMouseUp(Sender: TObject; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -begin - sbInfo.Panels.Items[2].Text := Format('Ln %s Ch %s', [IntToStr(sciEditor.GetCurrentLineNumber +1), IntToStr(sciEditor.GetCaretInLine +1)]); -end; - -procedure TfrmMain.sciEditorMouseMove(Sender: TObject; Shift: TShiftState; - X, Y: Integer); -begin - sbInfo.Panels.Items[2].Text := Format('Ln %s Ch %s', [IntToStr(sciEditor.GetCurrentLineNumber +1), IntToStr(sciEditor.GetCaretInLine +1)]); -end; - -procedure TfrmMain.FormConstrainedResize(Sender: TObject; var MinWidth, - MinHeight, MaxWidth, MaxHeight: Integer); -begin - sbInfo.Panels[0].Width := sbInfo.Width - 162; - if sbInfo.Panels[0].Width > Canvas.TextWidth(dtcEditor.ActiveDocument.FileName) then - sbInfo.Panels[0].Text := dtcEditor.ActiveDocument.FileName - else - sbInfo.Panels[0].Text := ExtractFileName(dtcEditor.ActiveDocument.FileName); - lvDebug.Column[0].Width := lvDebug.Width - 20; -end; - -procedure TfrmMain.acSaveAllExecute(Sender: TObject); -begin - if ShowSaveDialog('Save all files', 'Save files', 'Close') then - DeleteFile(ExtractFilePath(ParamStr(0)) + 'Files.ini'); -end; - -procedure TfrmMain.sciEditorKeyUp(Sender: TObject; var Key: Word; - Shift: TShiftState); -begin - if sciEditor.Caret.LineBackColor = clMaroon then begin - sciEditor.SelLength := Length(sciEditor.Lines[eErrorLine -1]); - sciEditor.Caret.LineBackColor := frmSettings.cboActiveLine.Selected; - sciEditor.Caret.ForeColor := clDefault; - sciEditor.Colors.SelBack := clHighlight; - end; - sciEditor.ReadOnly := False; - if (Key = 13) then begin // Return - if lvDebug.Visible then - lvDebug.Hide; - SetModified; - end - else if (Key = 9) and (not (ssCtrl in Shift)) then // Tab - SetModified - else if (Key >= 65) and (Key <= 90) and (not (ssCtrl in Shift)) then // a..z - SetModified - else if Chr(Key) = '}' then begin - if sciEditor.GetCurrentLineNumber <> 0 then begin // if we are on line 0 we would access line -1 otherwise - if (Trim(sciEditor.Lines[sciEditor.GetCurrentLineNumber]) = '') and (frmSettings.chkAutoIndent.Checked) then // if the prevorious line isn't empty, the line contains only spaces and the auto-identer is enabled then... - sciEditor.Lines[sciEditor.GetCurrentLineNumber] := Copy(sciEditor.Lines[sciEditor.GetCurrentLineNumber], 1, Length(sciEditor.Lines[sciEditor.GetCurrentLineNumber]) -1); // remove the last char - end; - end; - - - if (sciEditor.GetCurrentLineNumber <> eCurrentLine) or (RemoveSpaces(sciEditor.Lines[sciEditor.GetCurrentLineNumber]) = '') then begin - UpdateList(sciEditor.Lines.Text); - eCurrentLine := sciEditor.GetCurrentLineNumber; - end; -end; - -procedure TfrmMain.dtcEditorChanging(Sender: TObject; - var AllowChange: Boolean); -begin - if sciEditor.Caret.LineBackColor = clMaroon then begin - sciEditor.SelLength := Length(sciEditor.Lines[eErrorLine -1]); - sciEditor.Caret.LineBackColor := frmSettings.cboActiveLine.Selected; - sciEditor.Caret.ForeColor := clDefault; - sciEditor.Colors.SelBack := clHighlight; - end; - sciEditor.ReadOnly := False; - lvDebug.Hide; -end; - -procedure TfrmMain.trvFunctionsEditing(Sender: TObject; Node: TTreeNode; - var AllowEdit: Boolean); -begin - AllowEdit := Assigned(Node.Parent); -end; - -procedure TfrmMain.trvFunctionsDblClick(Sender: TObject); -function CheckAndSelect(ePath: String): Boolean; -var i: integer; -begin - Result := False; - ePath := LowerCase(ePath); - for i := 0 to dtcEditor.Tabs.Count -1 do begin - if LowerCase(dtcEditor.Document[i].FileName) = ePath then begin - dtcEditor.Activate(i); - Result := True; - exit; - end; - end; -end; - -var Node: TTreeNode; - i: integer; -begin - Node := trvFunctions.Selected; - if not Assigned(Node) then - exit; - if not Assigned(Node.Parent) then - exit; - - if Node.Parent.Text = 'Included' then begin - if FileExists(frmSettings.txtAMXXPath.Text + 'scripting\include\' + Node.Text) then begin - if CheckAndSelect(frmSettings.txtAMXXPath.Text + 'scripting\include\' + Node.Text) then - exit; - dtcEditor.Open(frmSettings.txtAMXXPath.Text + 'scripting\include\' + Node.Text); - SetSaved; - UpdateList(sciEditor.Lines.Text); - end - else if FileExists(frmSettings.txtAMXXPath.Text + 'scripting\' + Node.Text) then begin - if CheckAndSelect(frmSettings.txtAMXXPath.Text + 'scripting\' + Node.Text) then - exit; - dtcEditor.Open(frmSettings.txtAMXXPath.Text + 'scripting\' + Node.Text); - SetSaved; - UpdateList(sciEditor.Lines.Text); - end - else if (FileExists(ExtractFilePath(dtcEditor.ActiveDocument.FileName) + Node.Text)) and (not dtcEditor.ActiveDocument.IsUntitled) then begin - if CheckAndSelect(ExtractFilePath(dtcEditor.ActiveDocument.FileName) + Node.Text) then - exit; - dtcEditor.Open(ExtractFilePath(dtcEditor.ActiveDocument.FileName) + Node.Text); - SetSaved; - UpdateList(sciEditor.Lines.Text); - end - else - MessageBox(Handle, PChar('Couldn''t find "' + Node.Text + '". Maybe you''re still working on it on another (not saved) document or you entered an invalid value.'), 'Information', MB_ICONINFORMATION); - end; - if Node.Parent.Text = 'Defined' then begin - for i := 0 to sciEditor.Lines.Count -1 do begin - if Pos('#define ' + Node.Text, TrimLeft(sciEditor.Lines[i])) = 1 then begin - sciEditor.SetFocus; - sciEditor.GotoLine(i); - exit; - end; - end; - end; - if (Node.Parent.Text = 'Variables') or (Node.Parent.Text = 'Constants') then begin - for i := 0 to sciEditor.Lines.Count -1 do begin - if Pos('new ' + Node.Text, TrimLeft(sciEditor.Lines[i])) = 1 then begin - sciEditor.SetFocus; - sciEditor.GotoLine(i); - exit; - end; - end; - end; - if (Node.Parent.Text = 'Functions') then begin - for i := 0 to sciEditor.Lines.Count -1 do begin - if Pos(FunctionType[Node.Index] + Node.Text, TrimLeft(sciEditor.Lines[i])) = 1 then begin - sciEditor.SetFocus; - sciEditor.GotoLine(i); - exit; - end; - end; - end; -end; - -procedure TfrmMain.OnExceptionHandler(Sender: TObject; E: Exception); -begin - // nothing :F -end; - -procedure TfrmMain.trvFunctionsCollapsed(Sender: TObject; Node: TTreeNode); -begin - Node.ImageIndex := 18; - Node.SelectedIndex := 18; -end; - -procedure TfrmMain.trvFunctionsExpanded(Sender: TObject; Node: TTreeNode); -begin - Node.ImageIndex := 19; - Node.SelectedIndex := 19; -end; - -procedure TfrmMain.trvFunctionsEdited(Sender: TObject; Node: TTreeNode; - var S: String); -begin - if S = '' then begin - DeleteNode(Node); - trvFunctions.Items.Delete(Node); - SetModified; - end - else - RenameNode(Node, S); -end; - -procedure TfrmMain.DeleteNode(Node: TTreeNode); -procedure DeleteLine(eFormat: String); -var i: Integer; -begin - eFormat := Trim(Format(eFormat, [Node.Text])); - for i := 0 to sciEditor.Lines.Count -1 do begin - if Pos(eFormat, Trim(sciEditor.Lines[i])) = 1 then begin - sciEditor.Lines.Delete(i); - exit; - end; - end; -end; - -var i, a, b, c: integer; - eStr: TStringList; -begin - if Node.Parent.Text = 'Included' then - DeleteLine('#include <%s>'); - if Node.Parent.Text = 'Defined' then - DeleteLine('#define %s'); - if Node.Parent.Text = 'Variables' then - DeleteLine('new %s'); - if Node.Parent.Text = 'Constants' then - DeleteLine('new %s'); - if Node.Parent.Text = 'Functions' then begin - eStr := TStringList.Create; - eStr.Text := sciEditor.Lines.Text; - for i := 0 to eStr.Count -1 do begin - if Pos(Node.Text, TrimLeft(eStr[i])) = 1 then begin - if CountChars(eStr[i], '{') <> CountChars(eStr[i], '}') then begin - b := 0; // open brackets - for a := i to eStr.Count -1 do begin - // Remove strings because they could include brackets - while CountChars(eStr[a], '"') > 1 do - eStr[a] := StringReplace(eStr[a], '"' + Between(eStr[i], '"', '"') + '"', '', [rfReplaceAll]); - if (Pos('/*', eStr[a]) = 1) or (Pos('*', eStr[a]) = 1) or (Pos('*/', eStr[a]) = 1) then - eStr[a] := ''; - if Pos('//', eStr[a]) <> 0 then - eStr[a] := Copy(eStr[a], 1, Pos('//', eStr[a]) -2); - // Find end of the function - b := b + CountChars(eStr[a], '{'); - b := b - CountChars(eStr[a], '}'); - if b = 0 then begin - // Delete function - for c := i + a + 1 downto i do - sciEditor.Lines.Delete(c); - SetModified; - exit; - end; - end; - end - else begin - sciEditor.Lines.Delete(i); - SetModified; - end; - end; - end; - eStr.Free; - end; -end; - -procedure TfrmMain.SetModified; -begin - sciEditor.Caret.LineBackColor := frmSettings.cboActiveLine.Selected; - sciEditor.Caret.ForeColor := clDefault; - sciEditor.Colors.SelBack := clHighlight; - sbInfo.Panels[1].Text := 'Modified'; - dtcEditor.ActiveDocument.Modified := True; - acClose.Enabled := True; - mnuClose.Enabled := True; - acCloseAllFiles.Enabled := True; -end; - -procedure TfrmMain.trvFunctionsKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); -begin - if (Key = 46) and (Assigned(trvFunctions.Selected)) and (not trvFunctions.IsEditing) then begin - DeleteNode(trvFunctions.Selected); - trvFunctions.Items.Delete(trvFunctions.Selected); - end; -end; - -procedure TfrmMain.trvFunctionsClick(Sender: TObject); -var i: integer; -begin - for i := 0 to trvFunctions.Items.Count -1 do begin - if not Assigned(trvFunctions.Items[i].Parent) then begin - if trvFunctions.Items[i].Text = 'Included' then - eExpand1 := trvFunctions.Items[i].Expanded; - if trvFunctions.Items[i].Text = 'Defined' then - eExpand2 := trvFunctions.Items[i].Expanded; - if trvFunctions.Items[i].Text = 'Variables' then - eExpand3 := trvFunctions.Items[i].Expanded; - if trvFunctions.Items[i].Text = 'Constants' then - eExpand4 := trvFunctions.Items[i].Expanded; - if trvFunctions.Items[i].Text = 'Functions' then - eExpand5 := trvFunctions.Items[i].Expanded; - end; - end; -end; - -procedure TfrmMain.RenameNode(Node: TTreeNode; New: String); -procedure ChangeLineTo(eOldFormat, eNewFormat: String); -var i: integer; -begin - eOldFormat := Format(eOldFormat, [Node.Text]); - eNewFormat := Format(eNewFormat, [New]); - for i := 0 to sciEditor.Lines.Count -1 do begin - if Pos(Trim(eOldFormat), Trim(sciEditor.Lines[i])) = 1 then begin - sciEditor.Lines[i] := eNewFormat; - exit; - end; - end; -end; -begin - if Node.Parent.Text = 'Included' then - ChangeLineTo('#include <%s>', '#include <%s>'); - if Node.Parent.Text = 'Defined' then - ChangeLineTo('#define %s', '#define %s'); - if Node.Parent.Text = 'Variables' then - ChangeLineTo('new %s', 'new %s'); - if Node.Parent.Text = 'Constants' then - ChangeLineTo('new %s', 'new %s'); - if Node.Parent.Text = 'Functions' then - ChangeLineTo('%s', '%s'); - SetModified; -end; - -procedure TfrmMain.acEditExecute(Sender: TObject); -begin - if (trvFunctions.Focused) and (Assigned(trvFunctions.Selected)) then begin - if Assigned(trvFunctions.Selected.Parent) then - trvFunctions.Selected.EditText; - end; -end; - -procedure TfrmMain.pnlSpacerLeftClick(Sender: TObject); -var i: integer; -begin - if frmSettings.cboCodeExplorer.ItemIndex = 1 then begin - if pnlFunctions.Width <> 150 then begin - for i := 1 to 30 do begin - Delay(5); - pnlFunctions.Width := i * 5; - end; - end - else begin - for i := 30 downto 1 do begin - Delay(5); - pnlFunctions.Width := i * 5; - end; - end; - end; -end; - -procedure TfrmMain.ShowErrorLine; -begin - BringToFront; - SetFocus; - sciEditor.SetFocus; - sciEditor.GotoLineEnsureVisible(eErrorLine -1); - sciEditor.SelLength := Length(sciEditor.Lines[eErrorLine -1]); - sciEditor.ReadOnly := True; - sciEditor.Colors.SelBack := clMaroon; - sciEditor.Caret.LineBackColor := clMaroon; - sciEditor.Caret.ForeColor := clWhite; - eErrorLine := -1; -end; - -procedure TfrmMain.lvDebugEnter(Sender: TObject); -begin - if sciEditor.Caret.LineBackColor = clMaroon then begin - sciEditor.SelLength := Length(sciEditor.Lines[eErrorLine -1]); - sciEditor.Caret.LineBackColor := frmSettings.cboActiveLine.Selected; - sciEditor.Caret.ForeColor := clDefault; - sciEditor.Colors.SelBack := clHighlight; - end; - sciEditor.ReadOnly := False; -end; - -procedure TfrmMain.lvDebugDblClick(Sender: TObject); -var eStr: String; -begin - if Assigned(lvDebug.Selected) then begin - eStr := lvDebug.Selected.Caption; - while Pos(#32, eStr) <> 0 do - Delete(eStr, 1, 1); - try - StrToInt(eStr); - finally - eErrorLine := StrToInt(eStr); - ShowErrorLine; - end; - end; -end; - -procedure TfrmMain.acIdenterExecute(Sender: TObject); -function GetMatchingBrace(eString: String): Integer; -var a, b,c : integer; -begin - Result := 0; - if Length(eString) < 1 then exit; - - b := 0; - c := 0; - - for a := 1 to Length(eString) do begin - if eString[a] = '(' then begin - b := b +1; - c := 1; - end - else if eString[a] = ')' then begin - b := b -1; - c := 1; - end; - - if (b = 0) and (c = 1) then begin - Result := a; - exit; - end; - end; -end; - -var eStr: TStringList; - i, k: integer; - eIdent, eTempIdent: Integer; - eString: String; -begin - Screen.Cursor := crHourGlass; - sciEditor.Enabled := False; - eStr := TStringList.Create; - eIdent := 0; - eTempIdent := 0; - for i := 0 to sciEditor.Lines.Count -1 do begin - eStr.Add(TrimLeft(sciEditor.Lines[i])); - // Remove strings and comments virtually because they could include brackets - Caption := Format('AMXX-Edit v2 - Preparing (%s of %s lines)', [IntToStr(i+1), IntToStr(sciEditor.Lines.Count)]); - while CountChars(eStr[i], '"') > 1 do - eStr[i] := StringReplace(eStr[i], '"' + Between(eStr[i], '"', '"') + '"', '', [rfReplaceAll]); - if (Pos('/*', eStr[i]) = 1) or (Pos('*', eStr[i]) = 1) or (Pos('*/', eStr[i]) = 1) then - eStr[i] := ''; - if Pos('//', eStr[i]) <> 0 then - eStr[i] := Copy(eStr[i], 1, Pos('//', eStr[i]) -2); - end; - - for i := 0 to eStr.Count -1 do begin - if CountChars(eStr[i], '{') <> CountChars(eStr[i], '}') then - eIdent := eIdent - CountChars(eStr[i], '}'); - - sciEditor.Lines[i] := TrimLeft(sciEditor.Lines[i]); - - for k := 1 to eIdent + eTempIdent do - sciEditor.Lines[i] := ' ' + sciEditor.Lines[i]; - if eTempIdent <> 0 then - eTempIdent := eTempIdent -1; - - if (Pos('if', eStr[i]) = 1) and (Pos('{', eStr[i]) = 0) and (Length(eStr[i]) > 3) then begin - eString := eStr[i]; - Delete(eString, 1, 2); - if eString[1] <> Trim(eString)[1] then begin - eString := Trim(eString); - if GetMatchingBrace(eString) = Length(eString) then - eTempIdent := eTempIdent +1; - end; - end - else if (Pos('else', eStr[i]) = 1) and (Pos('{', eStr[i]) = 0) and (Length(eStr[i]) > 3) then begin - eString := eStr[i]; - Delete(eString, 1, 2); - if eString[1] <> Trim(eString)[1] then begin - eString := Trim(eString); - if GetMatchingBrace(eString) = Length(eString) then - eTempIdent := eTempIdent +1; - end; - end; - - if CountChars(eStr[i], '{') <> CountChars(eStr[i], '}') then - eIdent := eIdent + CountChars(eStr[i], '{'); - - Caption := Format('AMXX-Edit v2 - Setting indents (%s of %s lines)', [IntToStr(i+1), IntToStr(sciEditor.Lines.Count)]); - end; - Sleep(350); - SetModified; - Caption := 'AMXX-Edit v2'; - - sciEditor.Enabled := True; - Screen.Cursor := crDefault; -end; - -procedure TfrmMain.SetSaved; -begin - dtcEditor.ActiveDocument.Modified := False; - sbInfo.Panels[1].Text := ''; - acClose.Enabled := True; - mnuClose.Enabled := True; - acCloseAllFiles.Enabled := True; -end; - -procedure TfrmMain.acMenuMakerExecute(Sender: TObject); -begin - with frmMenuMaker do begin - DefaultMenu := True; - nbkPages.PageIndex := 0; - cmdCancel.Caption := 'Cancel'; - cmdNext.Caption := '&Next >'; - Reset; - ShowModal; - end; - if sbInfo.Panels[0].Width > Canvas.TextWidth(dtcEditor.ActiveDocument.FileName) then - sbInfo.Panels[0].Text := dtcEditor.ActiveDocument.FileName - else - sbInfo.Panels[0].Text := ExtractFileName(dtcEditor.ActiveDocument.FileName); -end; - -procedure TfrmMain.acPMMExecute(Sender: TObject); -begin - with frmMenuMaker do begin - DefaultMenu := False; - nbkPages.PageIndex := 0; - cmdCancel.Caption := 'Cancel'; - cmdNext.Caption := '&Next >'; - Reset; - ShowModal; - end; - if sbInfo.Panels[0].Width > Canvas.TextWidth(dtcEditor.ActiveDocument.FileName) then - sbInfo.Panels[0].Text := dtcEditor.ActiveDocument.FileName - else - sbInfo.Panels[0].Text := ExtractFileName(dtcEditor.ActiveDocument.FileName); -end; - -procedure TfrmMain.acRemoveMissingPluginsExecute(Sender: TObject); -var eStr: TStringList; - i, eRemoved: Integer; - ePlugin: String; -begin - eStr := TStringList.Create; - if FileExists(frmSettings.txtAMXXPath.Text + 'configs\plugins.ini') then begin - eStr.LoadFromFile(frmSettings.txtAMXXPath.Text + 'configs\plugins.ini'); - eRemoved := 0; - for i := eStr.Count -1 downto 0 do begin // 0 to eStr.Count -1 won't work - if (Copy(eStr[i], 1, 1) <> ';') and (Copy(eStr[i], 1, 2) <> '//') then begin - ePlugin := frmSettings.txtAMXXPath.Text + 'plugins\' + eStr[i]; - if Pos(';', ePlugin) > 0 then - ePlugin := Copy(ePlugin, 1, Pos(';', ePlugin) -1); - if Pos('//', ePlugin) > 0 then - ePlugin := Copy(ePlugin, 1, Pos('//', ePlugin) -1); - ePlugin := Trim(ePlugin); - if not FileExists(ePlugin) then begin - eStr.Delete(i); - Inc(eRemoved, 1); - end; - end; - end; - eStr.SaveToFile(frmSettings.txtAMXXPath.Text + 'configs\plugins.ini'); - if eRemoved = 0 then - MessageBox(Handle, 'Done! No plugin has been removed.', 'Information', MB_ICONINFORMATION) - else - MessageBox(Handle, PChar('Done! Removed ' + IntToStr(eRemoved) + ' missing plugins.'), 'Information', MB_ICONINFORMATION); - end - else - MessageBox(Handle, 'Couldn''t find plugins.ini. Check your settings and try again.', 'Warning', MB_ICONWARNING); - eStr.Free; -end; - -procedure TfrmMain.acSocketTerminalExecute(Sender: TObject); -begin - frmSocketTerminal.Show; -end; - -procedure TfrmMain.FormDestroy(Sender: TObject); -begin - FunctionType.Free; -end; - -procedure TfrmMain.acSelectAllExecute(Sender: TObject); -begin - sciEditor.SelectAll; -end; - -procedure TfrmMain.acUnidenterExecute(Sender: TObject); -var i: integer; -begin - Screen.Cursor := crHourGlass; - for i := 0 to sciEditor.Lines.Count -1 do begin - Caption := Format('AMXX-Edit v2 - Removing indents (%s of %s lines)', [IntToStr(i +1), IntToStr(sciEditor.Lines.Count)]); - sciEditor.Lines[i] := TrimLeft(sciEditor.Lines[i]); - end; - SetModified; - Screen.Cursor := crDefault; -end; - -procedure TfrmMain.acLoopGeneratorExecute(Sender: TObject); -begin - frmLoopGenerator.optWhile.Checked := True; - frmLoopGenerator.txtWhileCondition.Clear; - frmLoopGenerator.txtVariable.Text := 'i=0'; - frmLoopGenerator.txtForCondition.Text := 'i<10'; - frmLoopGenerator.txtForAction.Text := 'i++'; - if frmLoopGenerator.ShowModal = mrOk then begin - if frmLoopGenerator.optWhile.Checked then - sciEditor.SelText := 'while (' + frmLoopGenerator.txtWhileCondition.Text + ') { /* Add code here */ }' - else - sciEditor.SelText := 'for (' + frmLoopGenerator.txtVariable.Text + ', ' + frmLoopGenerator.txtForCondition.Text + ', ' + frmLoopGenerator.txtForAction.Text + ') { /* Add code here */ }'; - end; -end; - -procedure TfrmMain.sciEditorModified(Sender: TObject; const position, - modificationType: Integer; text: PAnsiChar; const length, linesAdded, - line, foldLevelNow, foldLevelPrev: Integer); -var i: integer; - eStr: String; -begin - eStr := sciEditor.Lines.Text; - if StrLength(eStr) <> 0 then begin - for i := StrLength(eStr) -1 downto 1 do begin - if Ord(eStr[i]) < 9 then - Delete(eStr, i, 1); - end; - end; - sciEditor.Lines.Text := eStr; -end; - -function TfrmMain.StrLength(eStr: String): Integer; -begin - Result := Length(eStr); -end; - -procedure TfrmMain.lvDebugMouseDown(Sender: TObject; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -begin - if (Button = mbRight) and (Assigned(lvDebug.GetItemAt(X, Y))) then begin - CurrItem := lvDebug.GetItemAt(X, Y); - ppmCopy.Popup(Mouse.CursorPos.X, Mouse.CursorPos.Y); - end; -end; - -procedure TfrmMain.mnuCopyItemClick(Sender: TObject); -begin - Clipboard.SetTextBuf(PChar(CurrItem.Caption)); -end; - -procedure TfrmMain.mnuCopyAllClick(Sender: TObject); -var i: Integer; - eStr: String; -begin - eStr := ''; - for i := lvDebug.Items.Count -1 downto 0 do - eStr := lvDebug.Items[i].Caption + #13#10 + eStr; - Clipboard.SetTextBuf(PChar(eStr)); -end; - -end. diff --git a/editor/editor2/UnitfrmMenuMaker.dfm b/editor/editor2/UnitfrmMenuMaker.dfm deleted file mode 100755 index 7e68ae2c..00000000 Binary files a/editor/editor2/UnitfrmMenuMaker.dfm and /dev/null differ diff --git a/editor/editor2/UnitfrmMenuMaker.pas b/editor/editor2/UnitfrmMenuMaker.pas deleted file mode 100755 index 609c4b6e..00000000 --- a/editor/editor2/UnitfrmMenuMaker.pas +++ /dev/null @@ -1,461 +0,0 @@ -unit UnitfrmMenuMaker; - -interface - -uses - SysUtils, Windows, Messages, Classes, Graphics, Controls, - StdCtrls, ExtCtrls, Forms, TFlatMemoUnit, XPStyleActnCtrls, ActnList, - ActnMan, ToolWin, ActnCtrls, ComCtrls, CorelButton, ImgList, - TFlatEditUnit, TFlatCheckBoxUnit; - -type - TfrmMenuMaker = class(TForm) - pnlButtons: TPanel; - cmdCancel: TCorelButton; - ilButtons: TImageList; - amButtons: TActionManager; - acPaste: TAction; - acCopy: TAction; - acCut: TAction; - acClear: TAction; - acMenu: TAction; - acGrey: TAction; - acRed: TAction; - acWhite: TAction; - acYellow: TAction; - cmdNext: TCorelButton; - nbkPages: TNotebook; - atbButtons: TActionToolBar; - rtfEditor: TRichEdit; - pnlSettings: TPanel; - chkRegisterMenuCommand: TFlatCheckBox; - chkAddComment: TFlatCheckBox; - txtKeys: TFlatEdit; - lblKeys: TLabel; - bvlSpace: TBevel; - lblSettings: TLabel; - lblName: TLabel; - txtMenuName: TFlatEdit; - txtTime: TFlatEdit; - chkUseTime: TFlatCheckBox; - chkAppendOnlyMenuText: TFlatCheckBox; - lblNote: TLabel; - lblSettingsPlayers: TLabel; - pnlSettingsPlayers: TPanel; - lblMenu: TLabel; - txtMenu: TFlatEdit; - lblHelp: TLabel; - chkAlive: TFlatCheckBox; - bvlSpace2: TBevel; - chkRegister: TFlatCheckBox; - chkComments: TFlatCheckBox; - chkImmunity: TFlatCheckBox; - procedure acCopyExecute(Sender: TObject); - procedure acCutExecute(Sender: TObject); - procedure acPasteExecute(Sender: TObject); - procedure acClearExecute(Sender: TObject); - procedure acYellowExecute(Sender: TObject); - procedure acWhiteExecute(Sender: TObject); - procedure acRedExecute(Sender: TObject); - procedure acGreyExecute(Sender: TObject); - procedure txtKeysChange(Sender: TObject); - procedure cmdCancelClick(Sender: TObject); - procedure cmdNextClick(Sender: TObject); - procedure rtfEditorKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); - procedure rtfEditorKeyUp(Sender: TObject; var Key: Word; - Shift: TShiftState); - procedure rtfEditorMouseDown(Sender: TObject; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); - procedure rtfEditorMouseUp(Sender: TObject; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); - procedure chkUseTimeClick(Sender: TObject); - procedure txtMenuNameKeyPress(Sender: TObject; var Key: Char); - procedure chkAppendOnlyMenuTextClick(Sender: TObject); - procedure txtTimeChange(Sender: TObject); - procedure rtfEditorChange(Sender: TObject); - procedure acMenuExecute(Sender: TObject); - procedure lblHelpMouseEnter(Sender: TObject); - procedure lblHelpMouseLeave(Sender: TObject); - procedure lblHelpClick(Sender: TObject); - private - Editing: Boolean; - FDefaultMenu: Boolean; - procedure SetDefaultMenu(const Value: Boolean); - public - property DefaultMenu: Boolean read FDefaultMenu write SetDefaultMenu; - function GetColoredMenu: String; - procedure SetButton(Action: TAction); - procedure UpdateCurColor; - procedure Reset; - end; - -var - frmMenuMaker: TfrmMenuMaker; - -implementation - -uses UnitAddMenu, UnitfrmSelectMenu, UnitfrmMain, UnitHowToMakePlayerMenu; - -{$R *.DFM} - -procedure TfrmMenuMaker.acCopyExecute(Sender: TObject); -begin - rtfEditor.CopyToClipboard; -end; - -procedure TfrmMenuMaker.acCutExecute(Sender: TObject); -begin - rtfEditor.CutToClipboard; -end; - -procedure TfrmMenuMaker.acPasteExecute(Sender: TObject); -begin - rtfEditor.PasteFromClipboard; -end; - -procedure TfrmMenuMaker.acClearExecute(Sender: TObject); -begin - rtfEditor.Clear; - rtfEditor.SelAttributes.Color := clWhite; - UpdateCurColor; -end; - -procedure TfrmMenuMaker.acYellowExecute(Sender: TObject); -begin - rtfEditor.SelAttributes.Color := clYellow; - SetButton(acYellow); -end; - -procedure TfrmMenuMaker.acWhiteExecute(Sender: TObject); -begin - rtfEditor.SelAttributes.Color := clWhite; - SetButton(acWhite); -end; - -procedure TfrmMenuMaker.acRedExecute(Sender: TObject); -begin - rtfEditor.SelAttributes.Color := clRed; - SetButton(acRed); -end; - -procedure TfrmMenuMaker.acGreyExecute(Sender: TObject); -begin - rtfEditor.SelAttributes.Color := clGray; - SetButton(acGrey); -end; - -procedure TfrmMenuMaker.SetButton(Action: TAction); -begin - if Action <> acYellow then - acYellow.Checked := False; - if Action <> acWhite then - acWhite.Checked := False; - if Action <> acRed then - acRed.Checked := False; - if Action <> acGrey then - acGrey.Checked := False; - Action.Checked := True; -end; - -procedure TfrmMenuMaker.txtKeysChange(Sender: TObject); -begin - try - StrToInt(Trim((Sender As TFlatEdit).Text)); - except - if Sender = txtKeys then begin - (Sender As TFlatEdit).Text := '1'; - SysUtils.Beep; - end - else - (Sender As TFlatEdit).Text := ''; - end; -end; - -procedure TfrmMenuMaker.cmdCancelClick(Sender: TObject); -begin - if nbkPages.PageIndex = 0 then - ModalResult := mrCancel - else begin - nbkPages.PageIndex := 0; - if not DefaultMenu then begin - lblNote.Visible := True; - lblHelp.Visible := True; - end; - cmdCancel.Caption := 'Cancel'; - cmdNext.Caption := '&Next >'; - end; -end; - -procedure TfrmMenuMaker.cmdNextClick(Sender: TObject); -function IsNumeric(eChar: Char): Boolean; -begin - Result := Pos(eChar, '0123456789') <> 0; -end; -var i: integer; - eColoredMenu: String; -begin - if Editing then begin - eColoredMenu := GetColoredMenu; - frmMain.sciEditor.Lines[frmSelectMenu.eLines[frmSelectMenu.GetItemIndex]] := StringReplace(frmMain.sciEditor.Lines[frmSelectMenu.eLines[frmSelectMenu.GetItemIndex]], '"' + frmSelectMenu.eMenuStr[frmSelectMenu.GetItemIndex] + '"', '"' + eColoredMenu + '"', []); - Editing := False; - ModalResult := mrOk; - end - else if nbkPages.PageIndex = 0 then begin // Editor - if DefaultMenu then begin - txtKeys.Text := '0'; - for i := 0 to rtfEditor.Lines.Count -1 do begin - if Length(rtfEditor.Lines[i]) <> 0 then begin - if IsNumeric(rtfEditor.Lines[i][1]) then - txtKeys.Text := txtKeys.Text + rtfEditor.Lines[i][1]; - end; - end; - if Length(txtKeys.Text) <> 1 then - txtKeys.Text := Copy(txtKeys.Text, 2, Length(txtKeys.Text)); - nbkPages.PageIndex := 1; - end - else begin - if Pos('$players', LowerCase(rtfEditor.Lines.Text)) = 0 then begin - MessageBox(Handle, 'You forgot to set the players.', 'Warning', MB_ICONWARNING); - exit; - end; - - if (Pos('$next', LowerCase(rtfEditor.Lines.Text)) = 0) and (Pos('$back', LowerCase(rtfEditor.Lines.Text)) = 0) then - MessageBox(Handle, 'You should set a "Next" and a "Back" key.', 'Warning', MB_ICONWARNING) - else if Pos('$next', LowerCase(rtfEditor.Lines.Text)) = 0 then - MessageBox(Handle, 'You should set a "Next"-key.', 'Warning', MB_ICONWARNING) - else if Pos('$exitorback', LowerCase(rtfEditor.Lines.Text)) = 0 then - MessageBox(Handle, 'You should set a "Back"-key.', 'Warning', MB_ICONWARNING); - - nbkPages.PageIndex := 2; - end; - cmdCancel.Caption := '< &Back'; - cmdNext.Caption := 'Finish'; - end - else if nbkPages.PageIndex = 1 then begin // Default finish - if (txtMenuName.Text = '') and (not chkAppendOnlyMenuText.Checked) then - MessageBox(Handle, 'Invalid menu name.', 'Warning', MB_ICONWARNING) - else begin - Screen.Cursor := crHourGlass; - if AddMenu then - ModalResult := mrOk - else - MessageBox(Handle, 'Menu already exists. Please choose another name.', 'Warning', MB_ICONWARNING); - Screen.Cursor := crDefault; - end; - end - else begin // Player finish - if (txtMenu.Text = '') then - MessageBox(Handle, 'Invalid menu name.', 'Warning', MB_ICONWARNING) - else begin - if AddPlayerMenu then - ModalResult := mrOk; - Screen.Cursor := crDefault; - end; - end; - lblNote.Visible := False; - lblHelp.Visible := False; -end; - -procedure TfrmMenuMaker.UpdateCurColor; -begin - case rtfEditor.SelAttributes.Color of - clYellow: SetButton(acYellow); - clWhite: SetButton(acWhite); - clRed: SetButton(acRed); - clGray: SetButton(acGrey); - end; - atbButtons.RecreateControls; -end; - -procedure TfrmMenuMaker.rtfEditorKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); -begin - UpdateCurColor; -end; - -procedure TfrmMenuMaker.rtfEditorKeyUp(Sender: TObject; var Key: Word; - Shift: TShiftState); -begin - UpdateCurColor; -end; - -procedure TfrmMenuMaker.rtfEditorMouseDown(Sender: TObject; - Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -begin - UpdateCurColor; -end; - -procedure TfrmMenuMaker.rtfEditorMouseUp(Sender: TObject; - Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -begin - UpdateCurColor; -end; - -procedure TfrmMenuMaker.chkUseTimeClick(Sender: TObject); -begin - txtTime.Enabled := chkUseTime.Checked; - if not chkUseTime.Checked then - txtTime.Text := '-1'; -end; - -procedure TfrmMenuMaker.txtMenuNameKeyPress(Sender: TObject; - var Key: Char); -begin - if Key = #32 then - Key := #0; -end; - -procedure TfrmMenuMaker.chkAppendOnlyMenuTextClick(Sender: TObject); -begin - lblKeys.Enabled := not chkAppendOnlyMenuText.Checked; - txtKeys.Enabled := not chkAppendOnlyMenuText.Checked; - chkAddComment.Enabled := not chkAppendOnlyMenuText.Checked; - chkRegisterMenuCommand.Enabled := not chkAppendOnlyMenuText.Checked; - chkUseTime.Enabled := not chkAppendOnlyMenuText.Checked; - txtTime.Enabled := not chkAppendOnlyMenuText.Checked; - lblName.Enabled := not chkAppendOnlyMenuText.Checked; - txtMenuName.Enabled := not chkAppendOnlyMenuText.Checked; -end; - -procedure TfrmMenuMaker.txtTimeChange(Sender: TObject); -begin - try - if StrToInt(txtTime.Text) < -1 then begin - txtTime.Text := '-1'; - SysUtils.Beep; - end; - except - txtTime.Text := '1000'; - SysUtils.Beep; - end; -end; - -procedure TfrmMenuMaker.rtfEditorChange(Sender: TObject); -begin - cmdNext.Enabled := rtfEditor.Text <> ''; -end; - -procedure TfrmMenuMaker.SetDefaultMenu(const Value: Boolean); -begin - FDefaultMenu := Value; - lblNote.Visible := not Value; - lblHelp.Visible := not Value; - acMenu.Enabled := Value; - Editing := False; - if Value then - Caption := 'Menu Maker' - else - Caption := 'Player Menu Maker'; -end; - -procedure TfrmMenuMaker.acMenuExecute(Sender: TObject); -var eTemp: String; -begin - if frmSelectMenu.ShowModal = mrOk then begin - atbButtons.RecreateControls; - if frmSelectMenu.GetItemIndex = -1 then - frmSelectMenu.lstMenu.Selected[0] := True; - - DefaultMenu := True; - Editing := True; - rtfEditor.Clear; - rtfEditor.SelAttributes.Color := clWhite; - eTemp := frmSelectMenu.eMenuStr[frmSelectMenu.GetItemIndex]; - if eTemp <> '' then begin - while Length(eTemp) <> 0 do begin - if eTemp[1] = '\' then begin - if Length(eTemp) <> 1 then begin - case LowerCase(eTemp[2])[1] of - 'w': rtfEditor.SelAttributes.Color := clWhite; - 'r': rtfEditor.SelAttributes.Color := clRed; - 'd': rtfEditor.SelAttributes.Color := clGray; - 'y': rtfEditor.SelAttributes.Color := clYellow; - end; - end; - Delete(eTemp, 1, 2); - end - else if Copy(eTemp, 1, 2) = '^n' then begin - rtfEditor.SelText := #13#10; - Delete(eTemp, 1, 2); - end - else begin - rtfEditor.SelText := eTemp[1]; - Delete(eTemp, 1, 1); - end; - end; - end; - cmdNext.Caption := 'Finish edit'; - end - else - atbButtons.RecreateControls; -end; - -function TfrmMenuMaker.GetColoredMenu: String; -var i: integer; - eCurColor: TColor; -begin - eCurColor := clWhite; - Result := ''; - for i := 0 to Length(rtfEditor.Lines.Text) -1 do begin - rtfEditor.SelStart := i; - if rtfEditor.SelAttributes.Color <> eCurColor then begin - eCurColor := rtfEditor.SelAttributes.Color; - case eCurColor of - clWhite : Result := Result + '\w'; - clYellow: Result := Result + '\y'; - clRed : Result := Result + '\r'; - clGray : Result := Result + '\d'; - end; - end; - Result := Result + rtfEditor.Lines.Text[i+1]; - end; - rtfEditor.SelStart := 0; - Result := StringReplace(Result, #13, '^n', [rfReplaceAll]); - Result := StringReplace(Result, #10, '', [rfReplaceAll]); -end; - -procedure TfrmMenuMaker.Reset; -begin - rtfEditor.Clear; - rtfEditor.SelAttributes.Color := clWhite; - txtKeys.Text := '1'; - txtMenu.Clear; - txtMenuName.Clear; - UpdateCurColor; -end; - -procedure TfrmMenuMaker.lblHelpMouseEnter(Sender: TObject); -begin - lblHelp.Font.Color := clBlue; - lblHelp.Font.Style := [fsUnderline]; -end; - -procedure TfrmMenuMaker.lblHelpMouseLeave(Sender: TObject); -begin - lblHelp.Font.Color := clWindowText; - lblHelp.Font.Style := []; -end; - -procedure TfrmMenuMaker.lblHelpClick(Sender: TObject); -procedure Append(eText: String); -begin - rtfEditor.SelText := eText + #13#10; - rtfEditor.SelStart := Length(rtfEditor.Lines.Text); -end; - -begin - if frmHowToMakePlayerMenu.ShowModal = mrYes then begin - rtfEditor.Clear; - rtfEditor.SelAttributes.Color := clYellow; - Append('Kick player'); - Append(''); - rtfEditor.SelAttributes.Color := clWhite; - Append('$players(1,8,%n. %v)'); - Append('$next(9,9. Next)'); - Append(''); - Append('$exitorback(0,0. Exit,0. Back)'); - end; -end; - -end. diff --git a/editor/editor2/UnitfrmOptions.dfm b/editor/editor2/UnitfrmOptions.dfm deleted file mode 100755 index d6bf99ae..00000000 Binary files a/editor/editor2/UnitfrmOptions.dfm and /dev/null differ diff --git a/editor/editor2/UnitfrmOptions.pas b/editor/editor2/UnitfrmOptions.pas deleted file mode 100755 index 06226c00..00000000 --- a/editor/editor2/UnitfrmOptions.pas +++ /dev/null @@ -1,156 +0,0 @@ -unit UnitfrmOptions; - -interface - -uses - SysUtils, Windows, Messages, Classes, Graphics, Controls, - StdCtrls, ExtCtrls, Forms, ComCtrls, TFlatEditUnit, - TFlatSpeedButtonUnit, TFlatCheckBoxUnit, TFlatComboBoxUnit, FileCtrl, - TFlatTabControlUnit, TFlatRadioButtonUnit, Dialogs; - -type - TfrmSettings = class(TForm) - lblSettings: TLabel; - cmdClose: TFlatSpeedButton; - odHalfLife: TOpenDialog; - ftcPages: TFlatTabControl; - nbkPages: TNotebook; - pnlHighlighter: TPanel; - lblComments: TLabel; - lblDirectives: TLabel; - lblOperators: TLabel; - lblStrings: TLabel; - lblKeywords: TLabel; - lblActiveLine: TLabel; - cboComments: TColorBox; - cboDirectives: TColorBox; - cboOperators: TColorBox; - cboStrings: TColorBox; - cboKeywords: TColorBox; - cboActiveLine: TColorBox; - pnlGeneralSettings: TPanel; - lblAMXX: TLabel; - cmdBrowseAMXX: TFlatSpeedButton; - cmdBrowseHalfLife: TFlatSpeedButton; - lblHalfLife: TLabel; - cmdBrowseSave: TFlatSpeedButton; - lblSave: TLabel; - txtAMXXPath: TFlatEdit; - txtHalfLife: TFlatEdit; - txtSave: TFlatEdit; - pnlGeneral: TPanel; - lblFoldingStyle: TLabel; - chkAutoComplete: TFlatCheckBox; - chkHighlighting: TFlatCheckBox; - cboFoldingStyle: TFlatComboBox; - chkHints: TFlatCheckBox; - chkAutoIndent: TFlatCheckBox; - chkBrackets: TFlatCheckBox; - lblHighlighter: TLabel; - lblEditor: TLabel; - lblDirectories: TLabel; - lblCompilerSettings: TLabel; - lblFTP: TLabel; - lblMisc: TLabel; - lblView: TLabel; - pnlCharCompleter: TPanel; - chkAutoCloseBrackets: TFlatCheckBox; - chkAutoCloseQuotes: TFlatCheckBox; - pnlCompilerSettings: TPanel; - optWindow: TFlatRadioButton; - optList: TFlatRadioButton; - pnlFTP: TPanel; - lblHost: TLabel; - lblPort: TLabel; - lblUser: TLabel; - lblPassword: TLabel; - lblStandardDir: TLabel; - cmdCheckFTP: TFlatSpeedButton; - txtHost: TFlatEdit; - txtPort: TFlatEdit; - txtUser: TFlatEdit; - txtPassword: TFlatEdit; - txtStandardDir: TFlatEdit; - pnlMisc: TPanel; - chkReload: TFlatCheckBox; - chkAutoAddPlugins: TFlatCheckBox; - pnlView: TPanel; - lblCodeExplorer: TLabel; - cboCodeExplorer: TFlatComboBox; - chkStatusbar: TFlatCheckBox; - lblCharCompleter: TLabel; - procedure cmdBrowseAMXXClick(Sender: TObject); - procedure cmdBrowseHalfLifeClick(Sender: TObject); - procedure cmdBrowseSaveClick(Sender: TObject); - procedure chkAutoAddPluginsMouseUp(Sender: TObject; - Button: TMouseButton; Shift: TShiftState; X, Y: Integer); - procedure ftcPagesTabChanged(Sender: TObject); - procedure cmdCheckFTPClick(Sender: TObject); - end; - -var - frmSettings: TfrmSettings; - -implementation - -uses UnitfrmMain; - -{$R *.DFM} - -procedure TfrmSettings.cmdBrowseAMXXClick(Sender: TObject); -var eDir: String; -begin - if SelectDirectory('Please select your AMXX directory:', 'C:', eDir) then - txtAMXXPath.Text := eDir; -end; - -procedure TfrmSettings.cmdBrowseHalfLifeClick(Sender: TObject); -begin - if odHalfLife.Execute then - txtHalfLife.Text := odHalfLife.FileName; -end; - -procedure TfrmSettings.cmdBrowseSaveClick(Sender: TObject); -var eDir: String; -begin - if SelectDirectory('Please select the directory where your files shall be saved:', 'C:', eDir) then - txtSave.Text := eDir; -end; - -procedure TfrmSettings.chkAutoAddPluginsMouseUp(Sender: TObject; - Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -begin - if (chkAutoAddPlugins.Checked) and (Button = mbLeft) then - MessageBox(Handle, 'Notice: This function works only with plugins which are saved in $AMXXDIR$\scripting.', 'Information', MB_ICONINFORMATION); -end; - -procedure TfrmSettings.ftcPagesTabChanged(Sender: TObject); -begin - nbkPages.PageIndex := ftcPages.ActiveTab; -end; - -procedure TfrmSettings.cmdCheckFTPClick(Sender: TObject); -begin - try - with frmMain.IdFTP do begin - Host := txtHost.Text; - Port := StrToInt(txtPort.Text); - Username := txtUser.Text; - Password := txtPassword.Text; - try - Connect; - ChangeDir(txtStandardDir.Text); - MessageBox(Handle, 'Test successfully done!', 'Information', MB_ICONINFORMATION) - except - on E: Exception do - MessageBox(Handle, PChar(E.Message), 'Error', MB_ICONWARNING); - end; - if Connected then - Disconnect; - end; - except - MessageBox(Handle, 'Invalid FTP port.', 'Warning', MB_ICONWARNING); - end; -end; - -end. diff --git a/editor/editor2/UnitfrmSaveDialog.dfm b/editor/editor2/UnitfrmSaveDialog.dfm deleted file mode 100755 index 21895fd3..00000000 Binary files a/editor/editor2/UnitfrmSaveDialog.dfm and /dev/null differ diff --git a/editor/editor2/UnitfrmSaveDialog.pas b/editor/editor2/UnitfrmSaveDialog.pas deleted file mode 100755 index 375597da..00000000 --- a/editor/editor2/UnitfrmSaveDialog.pas +++ /dev/null @@ -1,41 +0,0 @@ -unit UnitfrmSaveDialog; - -interface - -uses - SysUtils, Windows, Messages, Classes, Graphics, Controls, - StdCtrls, ExtCtrls, Forms, CheckLst, TFlatSpeedButtonUnit; - -type - TfrmSaveDialog = class(TForm) - lstFiles: TCheckListBox; - shpFiles: TShape; - cmdSave: TFlatSpeedButton; - cmdCancel: TFlatSpeedButton; - lblInfo: TLabel; - procedure lstFilesClickCheck(Sender: TObject); - public - SaveCaption: String; - CloseCaption: String; - end; - -var - frmSaveDialog: TfrmSaveDialog; - -implementation - -{$R *.DFM} - -procedure TfrmSaveDialog.lstFilesClickCheck(Sender: TObject); -var i: integer; -begin - for i := 0 to lstFiles.Items.Count -1 do begin - if lstFiles.Checked[i] then begin - cmdSave.Caption := SaveCaption; - exit; - end; - end; - cmdSave.Caption := CloseCaption; -end; - -end. diff --git a/editor/editor2/UnitfrmSelectMenu.dfm b/editor/editor2/UnitfrmSelectMenu.dfm deleted file mode 100755 index e8895e4b..00000000 Binary files a/editor/editor2/UnitfrmSelectMenu.dfm and /dev/null differ diff --git a/editor/editor2/UnitfrmSelectMenu.pas b/editor/editor2/UnitfrmSelectMenu.pas deleted file mode 100755 index 2dd0af6b..00000000 --- a/editor/editor2/UnitfrmSelectMenu.pas +++ /dev/null @@ -1,80 +0,0 @@ -unit UnitfrmSelectMenu; - -interface - -uses - SysUtils, Windows, Messages, Classes, Graphics, Controls, - StdCtrls, ExtCtrls, Forms, CorelButton, TFlatListBoxUnit; - -type - TfrmSelectMenu = class(TForm) - cmdOK: TCorelButton; - cmdCancel: TCorelButton; - lblSelect: TLabel; - lstMenu: TFlatListBox; - procedure FormCreate(Sender: TObject); - procedure FormDestroy(Sender: TObject); - procedure FormShow(Sender: TObject); - public - eMenuStr: TStringList; - eLines: array of Integer; - function GetItemIndex: Integer; - end; - -var - frmSelectMenu: TfrmSelectMenu; - -implementation - -uses UnitfrmMenuMaker, UnitfrmMain, UnitAddMenu, UnitFunc, UnitTextAnalyze; - -{$R *.DFM} - -procedure TfrmSelectMenu.FormCreate(Sender: TObject); -begin - eMenuStr := TStringList.Create; -end; - -procedure TfrmSelectMenu.FormDestroy(Sender: TObject); -begin - eMenuStr.Free; -end; - -procedure TfrmSelectMenu.FormShow(Sender: TObject); -var i: integer; - eTemp: String; -begin - eMenuStr.Clear; - lstMenu.Items.Clear; - SetLength(eLines, 0); - for i := 0 to frmMain.sciEditor.Lines.Count -1 do begin - if Pos('show_menu', Trim(LowerCase(frmMain.sciEditor.Lines[i]))) = 1 then begin - SetLength(eLines, eMenuStr.Count +1); - eLines[eMenuStr.Count] := i; - eTemp := frmMain.sciEditor.Lines[i]; - if CountChars(frmMain.sciEditor.Lines[i], '"') >= 4 then begin - eMenuStr.Add(Between(eTemp, '"', '"')); - while CountChars(eTemp, '"') > 2 do - Delete(eTemp, 1, 1); - lstMenu.Items.Add(Between(eTemp, '"', '"')); - end - else begin - eMenuStr.Add(Between(eTemp, '"', '"')); - lstMenu.Items.Add(Format('Unknown Menu on line %s', [IntToStr(i)])); - end; - end; - end; - cmdOK.Enabled := lstMenu.Items.Count <> 0; -end; - -function TfrmSelectMenu.GetItemIndex: Integer; -var i: integer; -begin - Result := -1; - for i := 0 to lstMenu.Items.Count -1 do begin - if lstMenu.Selected[i] then - Result := i; - end; -end; - -end. diff --git a/editor/editor2/UnitfrmSockets.dfm b/editor/editor2/UnitfrmSockets.dfm deleted file mode 100755 index dcf0ee77..00000000 --- a/editor/editor2/UnitfrmSockets.dfm +++ /dev/null @@ -1,191 +0,0 @@ -object frmSocketTerminal: TfrmSocketTerminal - Left = 192 - Top = 110 - ActiveControl = rtfEnter - BorderStyle = bsDialog - Caption = 'Socket Terminal' - ClientHeight = 230 - ClientWidth = 324 - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - FormStyle = fsStayOnTop - OldCreateOrder = False - Position = poMainFormCenter - OnClose = FormClose - PixelsPerInch = 96 - TextHeight = 13 - object pnlSettings: TPanel - Left = 0 - Top = 141 - Width = 324 - Height = 89 - Align = alBottom - BevelOuter = bvNone - TabOrder = 2 - object lblStatusCaption: TLabel - Left = 2 - Top = 72 - Width = 35 - Height = 13 - Caption = 'Status:' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - ParentFont = False - end - object lblStatus: TLabel - Left = 40 - Top = 72 - Width = 69 - Height = 13 - Caption = 'not connected' - Font.Charset = DEFAULT_CHARSET - Font.Color = clRed - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - ParentFont = False - end - object lblSettings: TLabel - Left = 4 - Top = 6 - Width = 43 - Height = 13 - Caption = 'Settings:' - end - object pnlSettings2: TPanel - Left = 4 - Top = 24 - Width = 311 - Height = 41 - BevelOuter = bvLowered - TabOrder = 0 - object lblHost: TLabel - Left = 4 - Top = 3 - Width = 26 - Height = 13 - Caption = 'Host:' - end - object lblPort: TLabel - Left = 130 - Top = 3 - Width = 24 - Height = 13 - Caption = 'Port:' - end - object txtHost: TFlatEdit - Left = 4 - Top = 17 - Width = 121 - Height = 19 - ColorFlat = clBtnFace - ParentColor = True - TabOrder = 0 - end - object txtPort: TFlatEdit - Left = 130 - Top = 17 - Width = 39 - Height = 19 - ColorFlat = clBtnFace - ParentColor = True - TabOrder = 1 - Text = '1' - OnChange = txtPortChange - end - object optUDP: TFlatRadioButton - Left = 176 - Top = 20 - Width = 39 - Height = 17 - Caption = 'UDP' - TabOrder = 3 - OnClick = optTCPClick - end - object optTCP: TFlatRadioButton - Left = 176 - Top = 4 - Width = 35 - Height = 15 - Caption = 'TCP' - Checked = True - TabOrder = 2 - TabStop = True - OnClick = optTCPClick - end - object cmdConnect: TFlatButton - Left = 224 - Top = 10 - Width = 77 - Height = 21 - ColorHighLight = 8623776 - ColorShadow = 8623776 - Caption = 'Connect' - TabOrder = 4 - OnClick = cmdConnectClick - end - end - end - object rtfEnter: TRichEdit - Left = 0 - Top = 121 - Width = 324 - Height = 20 - Align = alBottom - TabOrder = 1 - WantReturns = False - OnKeyPress = rtfEnterKeyPress - end - object rtfReceived: TRichEdit - Left = 0 - Top = 0 - Width = 324 - Height = 121 - Align = alClient - ScrollBars = ssVertical - TabOrder = 0 - end - object IdTCPClient: TIdTCPClient - MaxLineAction = maSplit - OnDisconnected = IdTCPClientDisconnected - OnConnected = IdTCPClientConnected - Port = 0 - Left = 4 - Top = 4 - end - object IdUDPClient: TIdUDPClient - OnStatus = IdUDPClientStatus - Port = 0 - Left = 4 - Top = 34 - end - object alCopyPaste: TActionList - Left = 4 - Top = 64 - object acCopy: TAction - Caption = 'Copy' - ShortCut = 16451 - OnExecute = acCopyExecute - end - object acPaste: TAction - Caption = 'Paste' - ShortCut = 16470 - OnExecute = acPasteExecute - end - object acUndo: TAction - Caption = 'Undo' - OnExecute = acUndoExecute - end - object acSelectAll: TAction - Caption = 'Select all' - OnExecute = acSelectAllExecute - end - end -end diff --git a/editor/editor2/UnitfrmSockets.pas b/editor/editor2/UnitfrmSockets.pas deleted file mode 100755 index 29f137e6..00000000 --- a/editor/editor2/UnitfrmSockets.pas +++ /dev/null @@ -1,259 +0,0 @@ -unit UnitfrmSockets; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, ExtCtrls, StdCtrls, ComCtrls, TFlatEditUnit, - TFlatRadioButtonUnit, TFlatButtonUnit, IdUDPBase, IdUDPClient, - IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, UnitReadThread, - ActnList; - -type - TfrmSocketTerminal = class(TForm) - pnlSettings: TPanel; - rtfEnter: TRichEdit; - rtfReceived: TRichEdit; - lblStatusCaption: TLabel; - lblStatus: TLabel; - lblSettings: TLabel; - pnlSettings2: TPanel; - lblHost: TLabel; - txtHost: TFlatEdit; - txtPort: TFlatEdit; - lblPort: TLabel; - optUDP: TFlatRadioButton; - optTCP: TFlatRadioButton; - cmdConnect: TFlatButton; - IdTCPClient: TIdTCPClient; - IdUDPClient: TIdUDPClient; - alCopyPaste: TActionList; - acCopy: TAction; - acPaste: TAction; - acUndo: TAction; - acSelectAll: TAction; - procedure txtPortChange(Sender: TObject); - procedure cmdConnectClick(Sender: TObject); - procedure optTCPClick(Sender: TObject); - procedure IdTCPClientConnected(Sender: TObject); - procedure IdTCPClientDisconnected(Sender: TObject); - procedure FormClose(Sender: TObject; var Action: TCloseAction); - procedure rtfEnterKeyPress(Sender: TObject; var Key: Char); - procedure IdUDPClientStatus(ASender: TObject; const AStatus: TIdStatus; - const AStatusText: String); - procedure acCopyExecute(Sender: TObject); - procedure acPasteExecute(Sender: TObject); - procedure acUndoExecute(Sender: TObject); - procedure acSelectAllExecute(Sender: TObject); - private - ReadThread: TReadThread; - public - procedure Append(eText: String; eColor: TColor = clBlack); - procedure SetStatus(eStatus: String; eColor: TColor); - procedure OnRead(eRead: String); - procedure EnableControls(eValue: Boolean); - end; - -var - frmSocketTerminal: TfrmSocketTerminal; - -implementation - -{$R *.dfm} - -procedure TfrmSocketTerminal.Append(eText: String; eColor: TColor); -begin - eText := Format('[%s] %s', [TimeToStr(Time), eText]); - rtfReceived.SelStart := Length(rtfReceived.Lines.Text); - rtfReceived.SelAttributes.Color := eColor; - rtfReceived.SelText := eText + #13#10; - rtfReceived.Perform(WM_VSCROLL, SB_BOTTOM, 0); -end; - -procedure TfrmSocketTerminal.OnRead(eRead: String); -begin - Append(eRead, clWindowText); -end; - -procedure TfrmSocketTerminal.SetStatus(eStatus: String; eColor: TColor); -begin - lblStatus.Caption := eStatus; - lblStatus.Font.Color := eColor; -end; - -procedure TfrmSocketTerminal.txtPortChange(Sender: TObject); -begin - try - StrToInt(txtPort.Text); - except - txtPort.Text := '1'; - end; -end; - -procedure TfrmSocketTerminal.cmdConnectClick(Sender: TObject); -begin - if Tag = 0 then begin - if optTCP.Checked then begin - IdTCPClient.Host := txtHost.Text; - IdTCPClient.Port := StrToInt(txtPort.Text); - EnableControls(False); - Append('Connecting to ' + txtHost.Text + ':' + txtPort.Text + '...', clHighlight); - try - IdTCPClient.Connect; - ReadThread := TReadThread.Create(True); - ReadThread.ReadTCP := True; - ReadThread.Resume; - except - on E: Exception do begin - MessageBox(Handle, PChar('Couldn''t connect to server:' + #13 + E.Message), 'Warning', MB_ICONWARNING); - EnableControls(True); - end; - end; - end - else begin - IdUDPClient.Host := txtHost.Text; - IdUDPClient.Port := StrToInt(txtPort.Text); - EnableControls(False); - try - IdUDPClient.Active := True; - ReadThread := TReadThread.Create(True); - ReadThread.ReadTCP := False; - ReadThread.Resume; - SetStatus('socket active', clGreen); - Append('Opened socket to ' + txtHost.Text + ':' + txtPort.Text + '!', clGreen); - except - on E: Exception do begin - MessageBox(Handle, PChar('Couldn''t activate socket:' + #13 + E.Message), 'Warning', MB_ICONWARNING); - EnableControls(True); - end; - end; - end; - end - else begin - if optTCP.Checked then begin - Screen.Cursor := crHourGlass; - IdTCPClient.Disconnect; - ReadThread.Terminate; - while Tag <> 0 do begin - Sleep(5); - Application.ProcessMessages; - end; - Screen.Cursor := crDefault; - end - else begin - Screen.Cursor := crHourGlass; - IdUDPClient.Active := False; - ReadThread.Terminate; - EnableControls(True); - SetStatus('socket inactive', clRed); - Append('Closed socket to ' + txtHost.Text + ':' + txtPort.Text + '!', clRed); - Screen.Cursor := crDefault; - end; - end; -end; - -procedure TfrmSocketTerminal.optTCPClick(Sender: TObject); -begin - if optTCP.Checked then begin - if not IdTCPClient.Connected then - SetStatus('not connected', clRed); - end - else begin - if not IdUDPClient.Active then - SetStatus('socket inactive', clRed); - end; -end; - -procedure TfrmSocketTerminal.EnableControls(eValue: Boolean); -begin - txtHost.Enabled := eValue; - txtPort.Enabled := eValue; - lblHost.Enabled := eValue; - lblPort.Enabled := eValue; - optTCP.Enabled := eValue; - optUDP.Enabled := eValue; - if eValue then begin - cmdConnect.Caption := 'Connect'; - Tag := 0; - end - else begin - cmdConnect.Caption := 'Disconnect'; - Tag := 1; - end; -end; - -procedure TfrmSocketTerminal.IdTCPClientConnected(Sender: TObject); -begin - Append('Established connection to ' + txtHost.Text + ':' + txtPort.Text, clGreen); - SetStatus('connected', clGreen); -end; - -procedure TfrmSocketTerminal.IdTCPClientDisconnected(Sender: TObject); -begin - Append('Disconnected from ' + txtHost.Text + ':' + txtPort.Text, clMaroon); - EnableControls(True); - SetStatus('not connected', clRed); -end; - -procedure TfrmSocketTerminal.FormClose(Sender: TObject; - var Action: TCloseAction); -begin - if Tag = 1 then - cmdConnect.Click; -end; - -procedure TfrmSocketTerminal.rtfEnterKeyPress(Sender: TObject; - var Key: Char); -begin - if Tag = 1 then begin - if (Key = #13) and (rtfEnter.Text <> '') then begin - if IdTCPClient.Connected then - IdTCPClient.WriteLn(rtfEnter.Text) - else - IdUDPClient.Send(rtfEnter.Text); - Append(rtfEnter.Text, clNavy); - rtfEnter.Clear; - Key := #0; - end; - end; -end; - -procedure TfrmSocketTerminal.IdUDPClientStatus(ASender: TObject; - const AStatus: TIdStatus; const AStatusText: String); -begin - Append(AStatusText, clGray); -end; - -procedure TfrmSocketTerminal.acCopyExecute(Sender: TObject); -begin - if (ActiveControl is TRichEdit) then - TRichEdit(ActiveControl).CopyToClipboard; - if (ActiveControl is TFlatEdit) then - TFlatEdit(ActiveControl).CopyToClipboard; -end; - -procedure TfrmSocketTerminal.acPasteExecute(Sender: TObject); -begin - if (ActiveControl is TRichEdit) then - TRichEdit(ActiveControl).PasteFromClipboard; - if (ActiveControl is TFlatEdit) then - TFlatEdit(ActiveControl).PasteFromClipboard; -end; - -procedure TfrmSocketTerminal.acUndoExecute(Sender: TObject); -begin - if (ActiveControl is TRichEdit) then - TRichEdit(ActiveControl).Undo; - if (ActiveControl is TFlatEdit) then - TFlatEdit(ActiveControl).Undo; -end; - -procedure TfrmSocketTerminal.acSelectAllExecute(Sender: TObject); -begin - if (ActiveControl is TRichEdit) then - TRichEdit(ActiveControl).SelectAll; - if (ActiveControl is TFlatEdit) then - TFlatEdit(ActiveControl).SelectAll; -end; - -end. diff --git a/editor/editor2/White.ico b/editor/editor2/White.ico deleted file mode 100755 index 286ba24e..00000000 Binary files a/editor/editor2/White.ico and /dev/null differ diff --git a/editor/editor2/Yellow.ico b/editor/editor2/Yellow.ico deleted file mode 100755 index f81cb4a5..00000000 Binary files a/editor/editor2/Yellow.ico and /dev/null differ diff --git a/editor/editor2/del.bat b/editor/editor2/del.bat deleted file mode 100755 index 9e93b247..00000000 --- a/editor/editor2/del.bat +++ /dev/null @@ -1,11 +0,0 @@ -del .\*.~pas -del .\*.dcu -del .\*.~ddp -del .\*.ddp -del .\*.~dpr -del .\*.~dfm -del .\*.~dpr -del .\*.map -del .\*.drc -del .\*.~xfm -upx AMXX_Edit_v2.exe \ No newline at end of file diff --git a/editor/editor2/gpl.txt b/editor/editor2/gpl.txt deleted file mode 100755 index 8036046a..00000000 --- a/editor/editor2/gpl.txt +++ /dev/null @@ -1,281 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - Preamble - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - The precise terms and conditions for copying, distribution and -modification follow. - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - NO WARRANTY - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - END OF TERMS AND CONDITIONS - How to Apply These Terms to Your New Programs - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - Copyright (C) - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -Also add information on how to contact you by electronic and paper mail. -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - , 1 April 1989 - Ty Coon, President of Vice -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License.