64-bit support for CSGO on Linux and macOS (#705)
This commit is contained in:
@@ -11,14 +11,24 @@ project.sources += [
|
||||
'util_cstrike.cpp',
|
||||
'../../public/smsdk_ext.cpp',
|
||||
'../../public/CDetour/detours.cpp',
|
||||
'../../public/asm/asm.c'
|
||||
'../../public/asm/asm.c',
|
||||
'../../public/libudis86/decode.c',
|
||||
'../../public/libudis86/itab.c',
|
||||
'../../public/libudis86/syn-att.c',
|
||||
'../../public/libudis86/syn-intel.c',
|
||||
'../../public/libudis86/syn.c',
|
||||
'../../public/libudis86/udis86.c',
|
||||
]
|
||||
project.compiler.defines += ['HAVE_STRING_H'];
|
||||
|
||||
for sdk_name in ['css', 'csgo']:
|
||||
if sdk_name not in SM.sdks:
|
||||
continue
|
||||
sdk = SM.sdks[sdk_name]
|
||||
|
||||
SM.HL2Config(project, 'game.cstrike.ext.' + sdk.ext, sdk)
|
||||
for arch in SM.archs:
|
||||
if not arch in sdk.platformSpec[builder.target.platform]:
|
||||
continue
|
||||
|
||||
SM.HL2Config(project, 'game.cstrike.ext.' + sdk.ext, sdk, arch)
|
||||
|
||||
SM.extensions += builder.Add(project)
|
||||
|
||||
@@ -18,7 +18,11 @@ struct HashItemDef_Node
|
||||
class CHashItemDef
|
||||
{
|
||||
public:
|
||||
#ifdef PLATFORM_X86
|
||||
unsigned char padding[36];
|
||||
#else
|
||||
unsigned char padding[56];
|
||||
#endif
|
||||
HashItemDef_Node *pMem;
|
||||
int nAllocatedCount;
|
||||
int nGrowSize;
|
||||
|
||||
@@ -192,9 +192,9 @@ CEconItemSchema *GetItemSchema()
|
||||
void *pSchema = NULL;
|
||||
pWrapper->Execute(NULL, &pSchema);
|
||||
|
||||
//In windows this is actually ItemSystem() + 4 is ItemSchema
|
||||
#ifdef WIN32
|
||||
return (CEconItemSchema *)((intptr_t)pSchema + 4);
|
||||
//On windows/mac this is actually ItemSystem() + sizeof(void *) is ItemSchema
|
||||
#if defined(PLATFORM_WINDOWS) || defined(PLATFORM_APPLE)
|
||||
return (CEconItemSchema *)((intptr_t)pSchema + sizeof(void *));
|
||||
#else
|
||||
return (CEconItemSchema *)pSchema;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user