mirror of
https://github.com/dhewm/dhewm3-sdk.git
synced 2024-11-22 04:31:15 +00:00
Fix event callbacks for x86_64
Fix remaining event related code for the new intptr_t value type. Regenerated game/gamesys/Callbacks.cpp via CREATE_EVENT_CODE.
This commit is contained in:
parent
379ab902bb
commit
30dd372efa
12 changed files with 1041 additions and 1041 deletions
File diff suppressed because it is too large
Load diff
|
@ -828,7 +828,7 @@ idClass::ProcessEventArgs
|
|||
bool idClass::ProcessEventArgs( const idEventDef *ev, int numargs, ... ) {
|
||||
idTypeInfo *c;
|
||||
int num;
|
||||
int data[ D_EVENT_MAXARGS ];
|
||||
intptr_t data[ D_EVENT_MAXARGS ];
|
||||
va_list args;
|
||||
|
||||
assert( ev );
|
||||
|
@ -936,7 +936,7 @@ bool idClass::ProcessEvent( const idEventDef *ev, idEventArg arg1, idEventArg ar
|
|||
idClass::ProcessEventArgPtr
|
||||
================
|
||||
*/
|
||||
bool idClass::ProcessEventArgPtr( const idEventDef *ev, int *data ) {
|
||||
bool idClass::ProcessEventArgPtr( const idEventDef *ev, intptr_t *data ) {
|
||||
idTypeInfo *c;
|
||||
int num;
|
||||
eventCallback_t callback;
|
||||
|
@ -999,42 +999,42 @@ http://developer.apple.com/documentation/DeveloperTools/Conceptual/MachORuntime/
|
|||
break;
|
||||
|
||||
case 1 :
|
||||
typedef void ( idClass::*eventCallback_1_t )( const int );
|
||||
typedef void ( idClass::*eventCallback_1_t )( const intptr_t );
|
||||
( this->*( eventCallback_1_t )callback )( data[ 0 ] );
|
||||
break;
|
||||
|
||||
case 2 :
|
||||
typedef void ( idClass::*eventCallback_2_t )( const int, const int );
|
||||
typedef void ( idClass::*eventCallback_2_t )( const intptr_t, const intptr_t );
|
||||
( this->*( eventCallback_2_t )callback )( data[ 0 ], data[ 1 ] );
|
||||
break;
|
||||
|
||||
case 3 :
|
||||
typedef void ( idClass::*eventCallback_3_t )( const int, const int, const int );
|
||||
typedef void ( idClass::*eventCallback_3_t )( const intptr_t, const intptr_t, const intptr_t );
|
||||
( this->*( eventCallback_3_t )callback )( data[ 0 ], data[ 1 ], data[ 2 ] );
|
||||
break;
|
||||
|
||||
case 4 :
|
||||
typedef void ( idClass::*eventCallback_4_t )( const int, const int, const int, const int );
|
||||
typedef void ( idClass::*eventCallback_4_t )( const intptr_t, const intptr_t, const intptr_t, const intptr_t );
|
||||
( this->*( eventCallback_4_t )callback )( data[ 0 ], data[ 1 ], data[ 2 ], data[ 3 ] );
|
||||
break;
|
||||
|
||||
case 5 :
|
||||
typedef void ( idClass::*eventCallback_5_t )( const int, const int, const int, const int, const int );
|
||||
typedef void ( idClass::*eventCallback_5_t )( const intptr_t, const intptr_t, const intptr_t, const intptr_t, const intptr_t );
|
||||
( this->*( eventCallback_5_t )callback )( data[ 0 ], data[ 1 ], data[ 2 ], data[ 3 ], data[ 4 ] );
|
||||
break;
|
||||
|
||||
case 6 :
|
||||
typedef void ( idClass::*eventCallback_6_t )( const int, const int, const int, const int, const int, const int );
|
||||
typedef void ( idClass::*eventCallback_6_t )( const intptr_t, const intptr_t, const intptr_t, const intptr_t, const intptr_t, const intptr_t );
|
||||
( this->*( eventCallback_6_t )callback )( data[ 0 ], data[ 1 ], data[ 2 ], data[ 3 ], data[ 4 ], data[ 5 ] );
|
||||
break;
|
||||
|
||||
case 7 :
|
||||
typedef void ( idClass::*eventCallback_7_t )( const int, const int, const int, const int, const int, const int, const int );
|
||||
typedef void ( idClass::*eventCallback_7_t )( const intptr_t, const intptr_t, const intptr_t, const intptr_t, const intptr_t, const intptr_t, const intptr_t );
|
||||
( this->*( eventCallback_7_t )callback )( data[ 0 ], data[ 1 ], data[ 2 ], data[ 3 ], data[ 4 ], data[ 5 ], data[ 6 ] );
|
||||
break;
|
||||
|
||||
case 8 :
|
||||
typedef void ( idClass::*eventCallback_8_t )( const int, const int, const int, const int, const int, const int, const int, const int );
|
||||
typedef void ( idClass::*eventCallback_8_t )( const intptr_t, const intptr_t, const intptr_t, const intptr_t, const intptr_t, const intptr_t, const intptr_t, const intptr_t );
|
||||
( this->*( eventCallback_8_t )callback )( data[ 0 ], data[ 1 ], data[ 2 ], data[ 3 ], data[ 4 ], data[ 5 ], data[ 6 ], data[ 7 ] );
|
||||
break;
|
||||
|
||||
|
|
|
@ -230,7 +230,7 @@ public:
|
|||
bool ProcessEvent( const idEventDef *ev, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5, idEventArg arg6, idEventArg arg7 );
|
||||
bool ProcessEvent( const idEventDef *ev, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5, idEventArg arg6, idEventArg arg7, idEventArg arg8 );
|
||||
|
||||
bool ProcessEventArgPtr( const idEventDef *ev, int *data );
|
||||
bool ProcessEventArgPtr( const idEventDef *ev, intptr_t *data );
|
||||
void CancelEvents( const idEventDef *ev );
|
||||
|
||||
void Event_Remove( void );
|
||||
|
|
|
@ -334,7 +334,7 @@ idEvent *idEvent::Alloc( const idEventDef *evdef, int numargs, va_list args ) {
|
|||
idEvent::CopyArgs
|
||||
================
|
||||
*/
|
||||
void idEvent::CopyArgs( const idEventDef *evdef, int numargs, va_list args, int data[ D_EVENT_MAXARGS ] ) {
|
||||
void idEvent::CopyArgs( const idEventDef *evdef, int numargs, va_list args, intptr_t data[ D_EVENT_MAXARGS ] ) {
|
||||
int i;
|
||||
const char *format;
|
||||
idEventArg *arg;
|
||||
|
@ -493,7 +493,7 @@ idEvent::ServiceEvents
|
|||
void idEvent::ServiceEvents( void ) {
|
||||
idEvent *event;
|
||||
int num;
|
||||
int args[ D_EVENT_MAXARGS ];
|
||||
intptr_t args[ D_EVENT_MAXARGS ];
|
||||
int offset;
|
||||
int i;
|
||||
int numargs;
|
||||
|
@ -593,7 +593,7 @@ idEvent::ServiceFastEvents
|
|||
void idEvent::ServiceFastEvents() {
|
||||
idEvent *event;
|
||||
int num;
|
||||
int args[ D_EVENT_MAXARGS ];
|
||||
intptr_t args[ D_EVENT_MAXARGS ];
|
||||
int offset;
|
||||
int i;
|
||||
int numargs;
|
||||
|
@ -1016,8 +1016,6 @@ CreateEventCallbackHandler
|
|||
================
|
||||
*/
|
||||
void CreateEventCallbackHandler( void ) {
|
||||
int num;
|
||||
int count;
|
||||
int i, j, k;
|
||||
char argString[ D_EVENT_MAXARGS + 1 ];
|
||||
idStr string1;
|
||||
|
@ -1046,7 +1044,7 @@ void CreateEventCallbackHandler( void ) {
|
|||
string1 += "const float";
|
||||
string2 += va( "*( float * )&data[ %d ]", k );
|
||||
} else {
|
||||
string1 += "const int";
|
||||
string1 += "const intptr_t";
|
||||
string2 += va( "data[ %d ]", k );
|
||||
}
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ public:
|
|||
~idEvent();
|
||||
|
||||
static idEvent *Alloc( const idEventDef *evdef, int numargs, va_list args );
|
||||
static void CopyArgs( const idEventDef *evdef, int numargs, va_list args, int data[ D_EVENT_MAXARGS ] );
|
||||
static void CopyArgs( const idEventDef *evdef, int numargs, va_list args, intptr_t data[ D_EVENT_MAXARGS ] );
|
||||
|
||||
void Free( void );
|
||||
void Schedule( idClass *object, const idTypeInfo *cls, int time );
|
||||
|
|
|
@ -686,7 +686,7 @@ void idInterpreter::CallEvent( const function_t *func, int argsize ) {
|
|||
varEval_t var;
|
||||
int pos;
|
||||
int start;
|
||||
int data[ D_EVENT_MAXARGS ];
|
||||
intptr_t data[ D_EVENT_MAXARGS ];
|
||||
const idEventDef *evdef;
|
||||
const char *format;
|
||||
|
||||
|
@ -857,7 +857,7 @@ void idInterpreter::CallSysEvent( const function_t *func, int argsize ) {
|
|||
varEval_t source;
|
||||
int pos;
|
||||
int start;
|
||||
int data[ D_EVENT_MAXARGS ];
|
||||
intptr_t data[ D_EVENT_MAXARGS ];
|
||||
const idEventDef *evdef;
|
||||
const char *format;
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -828,7 +828,7 @@ idClass::ProcessEventArgs
|
|||
bool idClass::ProcessEventArgs( const idEventDef *ev, int numargs, ... ) {
|
||||
idTypeInfo *c;
|
||||
int num;
|
||||
int data[ D_EVENT_MAXARGS ];
|
||||
intptr_t data[ D_EVENT_MAXARGS ];
|
||||
va_list args;
|
||||
|
||||
assert( ev );
|
||||
|
@ -936,7 +936,7 @@ bool idClass::ProcessEvent( const idEventDef *ev, idEventArg arg1, idEventArg ar
|
|||
idClass::ProcessEventArgPtr
|
||||
================
|
||||
*/
|
||||
bool idClass::ProcessEventArgPtr( const idEventDef *ev, int *data ) {
|
||||
bool idClass::ProcessEventArgPtr( const idEventDef *ev, intptr_t *data ) {
|
||||
idTypeInfo *c;
|
||||
int num;
|
||||
eventCallback_t callback;
|
||||
|
@ -990,42 +990,42 @@ http://developer.apple.com/documentation/DeveloperTools/Conceptual/MachORuntime/
|
|||
break;
|
||||
|
||||
case 1 :
|
||||
typedef void ( idClass::*eventCallback_1_t )( const int );
|
||||
typedef void ( idClass::*eventCallback_1_t )( const intptr_t );
|
||||
( this->*( eventCallback_1_t )callback )( data[ 0 ] );
|
||||
break;
|
||||
|
||||
case 2 :
|
||||
typedef void ( idClass::*eventCallback_2_t )( const int, const int );
|
||||
typedef void ( idClass::*eventCallback_2_t )( const intptr_t, const intptr_t );
|
||||
( this->*( eventCallback_2_t )callback )( data[ 0 ], data[ 1 ] );
|
||||
break;
|
||||
|
||||
case 3 :
|
||||
typedef void ( idClass::*eventCallback_3_t )( const int, const int, const int );
|
||||
typedef void ( idClass::*eventCallback_3_t )( const intptr_t, const intptr_t, const intptr_t );
|
||||
( this->*( eventCallback_3_t )callback )( data[ 0 ], data[ 1 ], data[ 2 ] );
|
||||
break;
|
||||
|
||||
case 4 :
|
||||
typedef void ( idClass::*eventCallback_4_t )( const int, const int, const int, const int );
|
||||
typedef void ( idClass::*eventCallback_4_t )( const intptr_t, const intptr_t, const intptr_t, const intptr_t );
|
||||
( this->*( eventCallback_4_t )callback )( data[ 0 ], data[ 1 ], data[ 2 ], data[ 3 ] );
|
||||
break;
|
||||
|
||||
case 5 :
|
||||
typedef void ( idClass::*eventCallback_5_t )( const int, const int, const int, const int, const int );
|
||||
typedef void ( idClass::*eventCallback_5_t )( const intptr_t, const intptr_t, const intptr_t, const intptr_t, const intptr_t );
|
||||
( this->*( eventCallback_5_t )callback )( data[ 0 ], data[ 1 ], data[ 2 ], data[ 3 ], data[ 4 ] );
|
||||
break;
|
||||
|
||||
case 6 :
|
||||
typedef void ( idClass::*eventCallback_6_t )( const int, const int, const int, const int, const int, const int );
|
||||
typedef void ( idClass::*eventCallback_6_t )( const intptr_t, const intptr_t, const intptr_t, const intptr_t, const intptr_t, const intptr_t );
|
||||
( this->*( eventCallback_6_t )callback )( data[ 0 ], data[ 1 ], data[ 2 ], data[ 3 ], data[ 4 ], data[ 5 ] );
|
||||
break;
|
||||
|
||||
case 7 :
|
||||
typedef void ( idClass::*eventCallback_7_t )( const int, const int, const int, const int, const int, const int, const int );
|
||||
typedef void ( idClass::*eventCallback_7_t )( const intptr_t, const intptr_t, const intptr_t, const intptr_t, const intptr_t, const intptr_t, const intptr_t );
|
||||
( this->*( eventCallback_7_t )callback )( data[ 0 ], data[ 1 ], data[ 2 ], data[ 3 ], data[ 4 ], data[ 5 ], data[ 6 ] );
|
||||
break;
|
||||
|
||||
case 8 :
|
||||
typedef void ( idClass::*eventCallback_8_t )( const int, const int, const int, const int, const int, const int, const int, const int );
|
||||
typedef void ( idClass::*eventCallback_8_t )( const intptr_t, const intptr_t, const intptr_t, const intptr_t, const intptr_t, const intptr_t, const intptr_t, const intptr_t );
|
||||
( this->*( eventCallback_8_t )callback )( data[ 0 ], data[ 1 ], data[ 2 ], data[ 3 ], data[ 4 ], data[ 5 ], data[ 6 ], data[ 7 ] );
|
||||
break;
|
||||
|
||||
|
|
|
@ -230,7 +230,7 @@ public:
|
|||
bool ProcessEvent( const idEventDef *ev, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5, idEventArg arg6, idEventArg arg7 );
|
||||
bool ProcessEvent( const idEventDef *ev, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5, idEventArg arg6, idEventArg arg7, idEventArg arg8 );
|
||||
|
||||
bool ProcessEventArgPtr( const idEventDef *ev, int *data );
|
||||
bool ProcessEventArgPtr( const idEventDef *ev, intptr_t *data );
|
||||
void CancelEvents( const idEventDef *ev );
|
||||
|
||||
void Event_Remove( void );
|
||||
|
|
|
@ -331,7 +331,7 @@ idEvent *idEvent::Alloc( const idEventDef *evdef, int numargs, va_list args ) {
|
|||
idEvent::CopyArgs
|
||||
================
|
||||
*/
|
||||
void idEvent::CopyArgs( const idEventDef *evdef, int numargs, va_list args, int data[ D_EVENT_MAXARGS ] ) {
|
||||
void idEvent::CopyArgs( const idEventDef *evdef, int numargs, va_list args, intptr_t data[ D_EVENT_MAXARGS ] ) {
|
||||
int i;
|
||||
const char *format;
|
||||
idEventArg *arg;
|
||||
|
@ -460,7 +460,7 @@ idEvent::ServiceEvents
|
|||
void idEvent::ServiceEvents( void ) {
|
||||
idEvent *event;
|
||||
int num;
|
||||
int args[ D_EVENT_MAXARGS ];
|
||||
intptr_t args[ D_EVENT_MAXARGS ];
|
||||
int offset;
|
||||
int i;
|
||||
int numargs;
|
||||
|
@ -850,7 +850,7 @@ void CreateEventCallbackHandler( void ) {
|
|||
string1 += "const float";
|
||||
string2 += va( "*( float * )&data[ %d ]", k );
|
||||
} else {
|
||||
string1 += "const int";
|
||||
string1 += "const intptr_t";
|
||||
string2 += va( "data[ %d ]", k );
|
||||
}
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ public:
|
|||
~idEvent();
|
||||
|
||||
static idEvent *Alloc( const idEventDef *evdef, int numargs, va_list args );
|
||||
static void CopyArgs( const idEventDef *evdef, int numargs, va_list args, int data[ D_EVENT_MAXARGS ] );
|
||||
static void CopyArgs( const idEventDef *evdef, int numargs, va_list args, intptr_t data[ D_EVENT_MAXARGS ] );
|
||||
|
||||
void Free( void );
|
||||
void Schedule( idClass *object, const idTypeInfo *cls, int time );
|
||||
|
|
|
@ -686,7 +686,7 @@ void idInterpreter::CallEvent( const function_t *func, int argsize ) {
|
|||
varEval_t var;
|
||||
int pos;
|
||||
int start;
|
||||
int data[ D_EVENT_MAXARGS ];
|
||||
intptr_t data[ D_EVENT_MAXARGS ];
|
||||
const idEventDef *evdef;
|
||||
const char *format;
|
||||
|
||||
|
@ -857,7 +857,7 @@ void idInterpreter::CallSysEvent( const function_t *func, int argsize ) {
|
|||
varEval_t source;
|
||||
int pos;
|
||||
int start;
|
||||
int data[ D_EVENT_MAXARGS ];
|
||||
intptr_t data[ D_EVENT_MAXARGS ];
|
||||
const idEventDef *evdef;
|
||||
const char *format;
|
||||
|
||||
|
|
Loading…
Reference in a new issue