Use XASH_64BIT macro

This commit is contained in:
mittorn 2017-07-14 15:34:44 +00:00
parent 00833188da
commit 1674a4b6d4
5 changed files with 11 additions and 3 deletions

View File

@ -41,6 +41,10 @@ typedef int ( *pfnUserMsgHook )( const char *pszName, int iSize, void *pbuf );
#include "exportdef.h"
#include <string.h>
#if defined(__LP64__) || defined(__LLP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)
#define XASH_64BIT
#endif
extern cl_enginefunc_t gEngfuncs;
#include "../engine/mobility_int.h"
extern mobile_engfuncs_t *gMobileEngfuncs;

View File

@ -57,6 +57,10 @@ typedef int BOOL;
#include "stdlib.h"
#include "math.h"
#if defined(__LP64__) || defined(__LLP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)
#define XASH_64BIT
#endif
// Header file containing definition of globalvars_t and entvars_t
typedef unsigned int func_t;
typedef unsigned int string_t; // from engine's pr_comp.h;

View File

@ -103,7 +103,7 @@ typedef struct
//=========================================================
// CGraph
//=========================================================
#ifdef __amd64
#ifdef XASH_64BIT
#define GRAPH_VERSION (int)16 * 10
#else
#define GRAPH_VERSION (int)16// !!!increment this whever graph/node/link classes change, to obsolesce older disk files.

View File

@ -36,7 +36,7 @@ extern globalvars_t *gpGlobals;
// Use this instead of ALLOC_STRING on constant strings
#define STRING(offset) (const char *)(gpGlobals->pStringBase + (int)offset)
#if !defined __amd64__ || defined(CLIENT_DLL)
#if !defined XASH_64BIT || defined(CLIENT_DLL)
#define MAKE_STRING(str) ((int)(size_t)str - (int)(size_t)STRING(0))
#else
static inline int MAKE_STRING(const char *szValue)

View File

@ -215,7 +215,7 @@ typedef struct
char label[32]; // textual name
char name[64]; // file name
cache_user_t cache; // cache index pointer
#ifndef __amd64
#ifndef XASH_64BIT
int data; // hack for group 0
#endif
} mstudioseqgroup_t;