diff --git a/dlls/arrayx/Array.dsp b/dlls/arrayx/Array.dsp index 177627f0..5fdfc06e 100644 --- a/dlls/arrayx/Array.dsp +++ b/dlls/arrayx/Array.dsp @@ -130,10 +130,6 @@ SOURCE=.\MapNatives.cpp # PROP Default_Filter "h;hpp;hxx;hm;inl" # Begin Source File -SOURCE=.\BinTrieNativeFunctions.h -# End Source File -# Begin Source File - SOURCE=.\Capsule.h # End Source File # Begin Source File @@ -170,16 +166,8 @@ SOURCE=.\ComboTable.h # End Source File # Begin Source File -SOURCE=.\GenericNatives.h -# End Source File -# Begin Source File - SOURCE=.\JudyIncludes.h # End Source File -# Begin Source File - -SOURCE=.\MapNativeFunctions.h -# End Source File # End Group # Begin Group "Resource Files" @@ -194,6 +182,14 @@ 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 @@ -218,6 +214,10 @@ 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 diff --git a/dlls/arrayx/Array.ncb b/dlls/arrayx/Array.ncb index 5a8834e0..efeb85a1 100644 Binary files a/dlls/arrayx/Array.ncb and b/dlls/arrayx/Array.ncb differ diff --git a/dlls/arrayx/Array.opt b/dlls/arrayx/Array.opt index 2408bab6..131a92f1 100644 Binary files a/dlls/arrayx/Array.opt and b/dlls/arrayx/Array.opt differ diff --git a/dlls/arrayx/Array.plg b/dlls/arrayx/Array.plg index 07d02e25..a1fdb334 100644 --- a/dlls/arrayx/Array.plg +++ b/dlls/arrayx/Array.plg @@ -6,31 +6,105 @@ --------------------Configuration: Array - Win32 Release--------------------

Command Lines

-Creating temporary file "C:\DOCUME~1\Edward\LOCALS~1\Temp\RSP36D.tmp" with contents +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" +.\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\RSP36D.tmp" +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), 1 warning(s) +Array.dll - 0 error(s), 33 warning(s) diff --git a/dlls/arrayx/Capsule.cpp b/dlls/arrayx/Capsule.cpp index c58eff52..4137201f 100644 --- a/dlls/arrayx/Capsule.cpp +++ b/dlls/arrayx/Capsule.cpp @@ -66,14 +66,14 @@ bool Capsule::GetBool( void ) { if (type != capsule_type_bool) ThrowTypeError(capsule_type_bool); - return reinterpret_cast(data); + return (data != NULL); } void Capsule::SetBool(bool Value) { CheckEmpty(true); type = capsule_type_bool; - data = reinterpret_cast(Value); + if(Value == true) data = reinterpret_cast(1); }; cell Capsule::GetInt( void ) diff --git a/dlls/arrayx/amxxmodule.cpp b/dlls/arrayx/amxxmodule.cpp index e374e441..1441e450 100644 --- a/dlls/arrayx/amxxmodule.cpp +++ b/dlls/arrayx/amxxmodule.cpp @@ -2502,6 +2502,10 @@ 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) @@ -2611,6 +2615,10 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) 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 @@ -2733,6 +2741,10 @@ void ValidateMacros_DontCallThis_Smiley() 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 @@ -2912,20 +2924,20 @@ void operator delete[](void *reportedAddress) #else #if !defined NO_ALLOC_OVERRIDES && !defined MEMORY_TEST && !defined WIN32 -void * ::operator new(size_t size) { +void * operator new(size_t size) { return(calloc(1, size)); } -void * ::operator new[](size_t size) { +void * operator new[](size_t size) { return(calloc(1, size)); } -void ::operator delete(void * ptr) { +void operator delete(void * ptr) { if(ptr) free(ptr); } -void ::operator delete[](void * ptr) { +void operator delete[](void * ptr) { if(ptr) free(ptr); } diff --git a/dlls/arrayx/amxxmodule.h b/dlls/arrayx/amxxmodule.h index 0a000d20..63f0b2ac 100644 --- a/dlls/arrayx/amxxmodule.h +++ b/dlls/arrayx/amxxmodule.h @@ -26,6 +26,11 @@ #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 @@ -1927,6 +1932,30 @@ enum ForwardParam 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*/, ...); @@ -1978,6 +2007,7 @@ 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*/, @@ -2003,6 +2033,9 @@ 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; @@ -2066,6 +2099,10 @@ 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 @@ -2126,6 +2163,10 @@ 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 @@ -2189,8 +2230,12 @@ void MF_LogError(AMX *amx, int err, const char *fmt, ...); #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_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 ***/