mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-30 16:54:29 +00:00
MSVC & Win32 related fixes
This commit is contained in:
parent
d0ff201da2
commit
473810fc0c
@ -118,6 +118,7 @@ GNU General Public License for more details.
|
|||||||
#define strncasecmp _strnicmp
|
#define strncasecmp _strnicmp
|
||||||
#define open _open
|
#define open _open
|
||||||
#define read _read
|
#define read _read
|
||||||
|
#define alloca _alloca
|
||||||
|
|
||||||
// shut-up compiler warnings
|
// shut-up compiler warnings
|
||||||
#pragma warning(disable : 4244) // MIPS
|
#pragma warning(disable : 4244) // MIPS
|
||||||
|
@ -48,7 +48,7 @@ void *COM_FunctionFromName_SR( void *hInstance, const char *pName )
|
|||||||
const char *COM_OffsetNameForFunction( void *function )
|
const char *COM_OffsetNameForFunction( void *function )
|
||||||
{
|
{
|
||||||
static string sname;
|
static string sname;
|
||||||
Q_snprintf( sname, MAX_STRING, "ofs:%d", (int)(void*)(function - (void*)svgame.dllFuncs.pfnGameInit) );
|
Q_snprintf( sname, MAX_STRING, "ofs:%d", (size_t)((byte*)function - (byte*)svgame.dllFuncs.pfnGameInit) );
|
||||||
MsgDev( D_NOTE, "COM_OffsetNameForFunction %s\n", sname );
|
MsgDev( D_NOTE, "COM_OffsetNameForFunction %s\n", sname );
|
||||||
return sname;
|
return sname;
|
||||||
}
|
}
|
||||||
|
@ -390,6 +390,7 @@ typedef struct
|
|||||||
short flags;
|
short flags;
|
||||||
} TYPEDESCRIPTION;
|
} TYPEDESCRIPTION;
|
||||||
|
|
||||||
|
#undef ARRAYSIZE
|
||||||
#define ARRAYSIZE(p) (sizeof(p)/sizeof(p[0]))
|
#define ARRAYSIZE(p) (sizeof(p)/sizeof(p[0]))
|
||||||
|
|
||||||
typedef struct playermove_s playermove_t;
|
typedef struct playermove_s playermove_t;
|
||||||
|
@ -950,7 +950,7 @@ const char *COM_NameForFunction( void *hInstance, void *function )
|
|||||||
{
|
{
|
||||||
index = hInst->ordinals[i];
|
index = hInst->ordinals[i];
|
||||||
|
|
||||||
if(( function - hInst->funcBase ) == hInst->funcs[index] )
|
if(( (char*)function - (char*)hInst->funcBase ) == hInst->funcs[index] )
|
||||||
return hInst->names[i];
|
return hInst->names[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,6 +36,7 @@ GNU General Public License for more details.
|
|||||||
#else
|
#else
|
||||||
#define XASHLIB "xash_dedicated.dll"
|
#define XASHLIB "xash_dedicated.dll"
|
||||||
#endif
|
#endif
|
||||||
|
#define dlerror() GetStringLastError()
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user