Browse Source

Fix saverestore on LP64

pull/1/head
mittorn 7 years ago
parent
commit
3bce17e3a0
  1. 2
      dlls/saverestore.h
  2. 6
      dlls/util.cpp
  3. 4
      engine/eiface.h

2
dlls/saverestore.h

@ -59,7 +59,7 @@ public: @@ -59,7 +59,7 @@ public:
void WriteVector( const char *pname, const float *value, int count ); // Save a vector
void WritePositionVector( const char *pname, const Vector &value ); // Offset for landmark if necessary
void WritePositionVector( const char *pname, const float *value, int count ); // array of pos vectors
void WriteFunction( const char *pname, const int *value, int count ); // Save a function pointer
void WriteFunction( const char *pname, void **value, int count ); // Save a function pointer
int WriteEntVars( const char *pname, entvars_t *pev ); // Save entvars_t (entvars_t)
int WriteFields( const char *pname, void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount );

6
dlls/util.cpp

@ -1886,7 +1886,7 @@ void CSave::WritePositionVector( const char *pname, const float *value, int coun @@ -1886,7 +1886,7 @@ void CSave::WritePositionVector( const char *pname, const float *value, int coun
}
}
void CSave::WriteFunction( const char *pname, const int *data, int count )
void CSave::WriteFunction( const char *pname, void **data, int count )
{
const char *functionName;
@ -1894,7 +1894,7 @@ void CSave::WriteFunction( const char *pname, const int *data, int count ) @@ -1894,7 +1894,7 @@ void CSave::WriteFunction( const char *pname, const int *data, int count )
if( functionName )
BufferField( pname, strlen( functionName ) + 1, functionName );
else
ALERT( at_error, "Invalid function pointer in entity!" );
ALERT( at_error, "Invalid function pointer in entity!\n" );
}
void EntvarsKeyvalue( entvars_t *pev, KeyValueData *pkvd )
@ -2042,7 +2042,7 @@ int CSave::WriteFields( const char *pname, void *pBaseData, TYPEDESCRIPTION *pFi @@ -2042,7 +2042,7 @@ int CSave::WriteFields( const char *pname, void *pBaseData, TYPEDESCRIPTION *pFi
WriteInt( pTest->fieldName, (int *)(char *)pOutputData, pTest->fieldSize );
break;
case FIELD_FUNCTION:
WriteFunction( pTest->fieldName, (int *)pOutputData, pTest->fieldSize );
WriteFunction( pTest->fieldName, (void **)pOutputData, pTest->fieldSize );
break;
default:
ALERT( at_error, "Bad field type\n" );

4
engine/eiface.h

@ -171,8 +171,8 @@ typedef struct enginefuncs_s @@ -171,8 +171,8 @@ typedef struct enginefuncs_s
int (*pfnRegUserMsg)( const char *pszName, int iSize );
void (*pfnAnimationAutomove)( const edict_t* pEdict, float flTime );
void (*pfnGetBonePosition)( const edict_t* pEdict, int iBone, float *rgflOrigin, float *rgflAngles );
unsigned long (*pfnFunctionFromName)( const char *pName );
const char *(*pfnNameForFunction)( unsigned long function );
void* (*pfnFunctionFromName)( const char *pName );
const char *(*pfnNameForFunction)( void *function );
void (*pfnClientPrintf)( edict_t* pEdict, PRINT_TYPE ptype, const char *szMsg ); // JOHN: engine callbacks so game DLL can print messages to individual clients
void (*pfnServerPrint)( const char *szMsg );
const char *(*pfnCmd_Args)( void ); // these 3 added

Loading…
Cancel
Save