Works on t3h linux

This commit is contained in:
Twilight Suzuka 2006-04-22 19:50:51 +00:00
parent 07b1f0ea87
commit 3ba923e4c0
7 changed files with 164 additions and 33 deletions

View File

@ -130,10 +130,6 @@ SOURCE=.\MapNatives.cpp
# PROP Default_Filter "h;hpp;hxx;hm;inl" # PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File # Begin Source File
SOURCE=.\BinTrieNativeFunctions.h
# End Source File
# Begin Source File
SOURCE=.\Capsule.h SOURCE=.\Capsule.h
# End Source File # End Source File
# Begin Source File # Begin Source File
@ -170,16 +166,8 @@ SOURCE=.\ComboTable.h
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\GenericNatives.h
# End Source File
# Begin Source File
SOURCE=.\JudyIncludes.h SOURCE=.\JudyIncludes.h
# End Source File # End Source File
# Begin Source File
SOURCE=.\MapNativeFunctions.h
# End Source File
# End Group # End Group
# Begin Group "Resource Files" # Begin Group "Resource Files"
@ -194,6 +182,14 @@ SOURCE=.\amxxmodule.h
# End Source File # End Source File
# Begin 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 SOURCE=.\Judy.h
# End Source File # End Source File
# Begin Source File # Begin Source File
@ -218,6 +214,10 @@ SOURCE=.\ListNativeFunctions.h
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\MapNativeFunctions.h
# End Source File
# Begin Source File
SOURCE=.\moduleconfig.h SOURCE=.\moduleconfig.h
# End Source File # End Source File
# Begin Source File # Begin Source File

Binary file not shown.

Binary file not shown.

View File

@ -6,31 +6,105 @@
--------------------Configuration: Array - Win32 Release-------------------- --------------------Configuration: Array - Win32 Release--------------------
</h3> </h3>
<h3>Command Lines</h3> <h3>Command Lines</h3>
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" 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\Array.obj
".\Release\BinTrieNatives.obj" .\Release\BinTrieNatives.obj
".\Release\Capsule.obj" .\Release\Capsule.obj
".\Release\CArray.obj" .\Release\CArray.obj
".\Release\CBinTrie.obj" .\Release\CBinTrie.obj
".\Release\CKeytable.obj" .\Release\CKeytable.obj
".\Release\JudyExtra.obj" .\Release\JudyExtra.obj
".\Release\ListNatives.obj" .\Release\ListNatives.obj
".\Release\MapNatives.obj" .\Release\MapNatives.obj
".\Release\amxxmodule.obj" .\Release\amxxmodule.obj
".\Judy.lib" .\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"
<h3>Output Window</h3> <h3>Output Window</h3>
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... Linking...
Creating library Release/Array.lib and object Release/Array.exp Creating library Release/Array.lib and object Release/Array.exp
LINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:library 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...
<h3>Output Window</h3>
<h3>Results</h3> <h3>Results</h3>
Array.dll - 0 error(s), 1 warning(s) Array.dll - 0 error(s), 33 warning(s)
</pre> </pre>
</body> </body>
</html> </html>

View File

@ -66,14 +66,14 @@ bool Capsule::GetBool( void )
{ {
if (type != capsule_type_bool) ThrowTypeError(capsule_type_bool); if (type != capsule_type_bool) ThrowTypeError(capsule_type_bool);
return reinterpret_cast<bool>(data); return (data != NULL);
} }
void Capsule::SetBool(bool Value) void Capsule::SetBool(bool Value)
{ {
CheckEmpty(true); CheckEmpty(true);
type = capsule_type_bool; type = capsule_type_bool;
data = reinterpret_cast<void*>(Value); if(Value == true) data = reinterpret_cast<Pvoid_t>(1);
}; };
cell Capsule::GetInt( void ) cell Capsule::GetInt( void )

View File

@ -2502,6 +2502,10 @@ PFN_FORMAT g_fn_Format;
PFN_REGISTERFUNCTION g_fn_RegisterFunction; PFN_REGISTERFUNCTION g_fn_RegisterFunction;
PFN_REQ_FNPTR g_fn_RequestFunction; PFN_REQ_FNPTR g_fn_RequestFunction;
PFN_AMX_PUSH g_fn_AmxPush; 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 *** // *** Exports ***
C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo) 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("GetPlayerFlags", g_fn_GetPlayerFlags, PFN_GETPLAYERFLAGS);
REQFUNC("GetPlayerEdict", g_fn_GetPlayerEdict, PFN_GET_PLAYER_EDICT); REQFUNC("GetPlayerEdict", g_fn_GetPlayerEdict, PFN_GET_PLAYER_EDICT);
REQFUNC("amx_Push", g_fn_AmxPush, PFN_AMX_PUSH); 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 #ifdef MEMORY_TEST
// Memory // Memory
@ -2733,6 +2741,10 @@ void ValidateMacros_DontCallThis_Smiley()
MF_GetPlayerEdict(0); MF_GetPlayerEdict(0);
MF_Format("", 4, "str"); MF_Format("", 4, "str");
MF_RegisterFunction(NULL, ""); MF_RegisterFunction(NULL, "");
MF_SetPlayerTeamInfo(0, 0, "");
MF_PlayerPropAddr(0, 0);
MF_RegAuthFunc(NULL);
MF_UnregAuthFunc(NULL);
} }
#endif #endif
@ -2912,20 +2924,20 @@ void operator delete[](void *reportedAddress)
#else #else
#if !defined NO_ALLOC_OVERRIDES && !defined MEMORY_TEST && !defined WIN32 #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)); return(calloc(1, size));
} }
void * ::operator new[](size_t size) { void * operator new[](size_t size) {
return(calloc(1, size)); return(calloc(1, size));
} }
void ::operator delete(void * ptr) { void operator delete(void * ptr) {
if(ptr) if(ptr)
free(ptr); free(ptr);
} }
void ::operator delete[](void * ptr) { void operator delete[](void * ptr) {
if(ptr) if(ptr)
free(ptr); free(ptr);
} }

View File

@ -26,6 +26,11 @@
#define LINUX #define LINUX
#endif #endif
#ifndef _SIZE_T_DEFINED
typedef unsigned int size_t;
#define _SIZE_T_DEFINED
#endif
#undef C_DLLEXPORT #undef C_DLLEXPORT
#define C_DLLEXPORT extern "C" DLLEXPORT #define C_DLLEXPORT extern "C" DLLEXPORT
@ -1927,6 +1932,30 @@ enum ForwardParam
FP_ARRAY, // array; use the return value of prepareArray. 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 int (*PFN_ADD_NATIVES) (const AMX_NATIVE_INFO * /*list*/);
typedef char * (*PFN_BUILD_PATHNAME) (const char * /*format*/, ...); typedef char * (*PFN_BUILD_PATHNAME) (const char * /*format*/, ...);
@ -1978,6 +2007,7 @@ typedef edict_t * (*PFN_GET_PLAYER_EDICT) (int /*id*/);
#else #else
typedef void * (*PFN_GET_PLAYER_EDICT) (int /*id*/); typedef void * (*PFN_GET_PLAYER_EDICT) (int /*id*/);
#endif #endif
typedef void * (*PFN_PLAYER_PROP_ADDR) (int /*id*/, int /*prop*/);
#ifdef MEMORY_TEST #ifdef MEMORY_TEST
typedef void * (*PFN_ALLOCATOR) (const char* /*filename*/, const unsigned int /*line*/, const char* /*func*/, 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 const char * (*PFN_FORMAT) (const char * /*fmt*/, ... /*params*/);
typedef void (*PFN_REGISTERFUNCTION) (void * /*pfn*/, const char * /*desc*/); typedef void (*PFN_REGISTERFUNCTION) (void * /*pfn*/, const char * /*desc*/);
typedef int (*PFN_AMX_PUSH) (AMX * /*amx*/, cell /*value*/); 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_ADD_NATIVES g_fn_AddNatives;
extern PFN_BUILD_PATHNAME g_fn_BuildPathname; 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_REGISTERFUNCTION g_fn_RegisterFunction;
extern PFN_REQ_FNPTR g_fn_RequestFunction; extern PFN_REQ_FNPTR g_fn_RequestFunction;
extern PFN_AMX_PUSH g_fn_AmxPush; 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 #ifdef MAY_NEVER_BE_DEFINED
// Function prototypes for intellisense and similar systems // 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) { } void * MF_RequestFunction (const char *description) { }
int MF_AmxPush (AMX *amx, cell *params) { } int MF_AmxPush (AMX *amx, cell *params) { }
int MF_AmxExec (AMX *amx, cell *retval, int idx) { } 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 #endif // MAY_NEVER_BE_DEFINED
#define MF_AddNatives g_fn_AddNatives #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_GetPlayerEdict g_fn_GetPlayerEdict
#define MF_Format g_fn_Format #define MF_Format g_fn_Format
#define MF_RegisterFunction g_fn_RegisterFunction #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_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 #ifdef MEMORY_TEST
/*** Memory ***/ /*** Memory ***/