Browse Source

64 bit support

wantedhl
mittorn 9 years ago
parent
commit
d287ed4463
  1. 2
      cl_dll/StudioModelRenderer.cpp
  2. 8
      dlls/nodes.cpp
  3. 6
      dlls/util.cpp
  4. 5
      dlls/util.h
  5. 2
      engine/studio.h

2
cl_dll/StudioModelRenderer.cpp

@ -377,7 +377,7 @@ mstudioanim_t *CStudioModelRenderer::StudioGetAnim( model_t *m_pSubModel, mstudi
if (pseqdesc->seqgroup == 0) if (pseqdesc->seqgroup == 0)
{ {
return (mstudioanim_t *)((byte *)m_pStudioHeader + pseqgroup->data + pseqdesc->animindex); return (mstudioanim_t *)((byte *)m_pStudioHeader + pseqdesc->animindex);
} }
paSequences = (cache_user_t *)m_pSubModel->submodels; paSequences = (cache_user_t *)m_pSubModel->submodels;

8
dlls/nodes.cpp

@ -3312,10 +3312,10 @@ void CGraph :: ComputeStaticRoutingTables( void )
} }
ALERT( at_aiconsole, "Size of Routes = %d\n", nTotalCompressedSize); ALERT( at_aiconsole, "Size of Routes = %d\n", nTotalCompressedSize);
} }
if (Routes) delete Routes; if (Routes) delete[] Routes;
if (BestNextNodes) delete BestNextNodes; if (BestNextNodes) delete[] BestNextNodes;
if (pRoute) delete pRoute; if (pRoute) delete[] pRoute;
if (pMyPath) delete pMyPath; if (pMyPath) delete[] pMyPath;
Routes = 0; Routes = 0;
BestNextNodes = 0; BestNextNodes = 0;
pRoute = 0; pRoute = 0;

6
dlls/util.cpp

@ -2372,13 +2372,13 @@ int CRestore::ReadField( void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCou
break; break;
case FIELD_POINTER: case FIELD_POINTER:
*((int *)pOutputData) = *( int *)pInputData; *((void**)pOutputData) = *( void **)pInputData;
break; break;
case FIELD_FUNCTION: case FIELD_FUNCTION:
if ( strlen( (char *)pInputData ) == 0 ) if ( strlen( (char *)pInputData ) == 0 )
*((int *)pOutputData) = 0; *((void**)pOutputData) = 0;
else else
*((int *)pOutputData) = FUNCTION_FROM_NAME( (char *)pInputData ); *((void**)pOutputData) = FUNCTION_FROM_NAME( (char *)pInputData );
break; break;
default: default:

5
dlls/util.h

@ -36,8 +36,11 @@ extern globalvars_t *gpGlobals;
// Use this instead of ALLOC_STRING on constant strings // Use this instead of ALLOC_STRING on constant strings
#define STRING(offset) (const char *)(gpGlobals->pStringBase + (int)offset) #define STRING(offset) (const char *)(gpGlobals->pStringBase + (int)offset)
#if !defined __amd64__ || defined(CLIENT_DLL)
#define MAKE_STRING(str) ((int)str - (int)STRING(0)) #define MAKE_STRING(str) ((int)str - (int)STRING(0))
#else
#define MAKE_STRING ALLOC_STRING
#endif
inline edict_t *FIND_ENTITY_BY_CLASSNAME(edict_t *entStart, const char *pszName) inline edict_t *FIND_ENTITY_BY_CLASSNAME(edict_t *entStart, const char *pszName)
{ {
return FIND_ENTITY_BY_STRING(entStart, "classname", pszName); return FIND_ENTITY_BY_STRING(entStart, "classname", pszName);

2
engine/studio.h

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

Loading…
Cancel
Save