turn off c++ symbol mangling for GetGameAPI/vmMain/dllEntry

This commit is contained in:
Jonathan Gray 2013-04-23 01:56:28 +10:00
parent c0f29e95a2
commit ea4f7f0599
4 changed files with 8 additions and 0 deletions

View file

@ -92,6 +92,7 @@ This is the only way control passes into the cgame module.
This must be the very first function compiled into the .q3vm file This must be the very first function compiled into the .q3vm file
================ ================
*/ */
extern "C" {
int vmMain( int command, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7 ) { int vmMain( int command, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7 ) {
centity_t *cent; centity_t *cent;
@ -175,6 +176,7 @@ Ghoul2 Insert End
} }
return -1; return -1;
} }
} // extern "C"
/* /*
Ghoul2 Insert Start Ghoul2 Insert Start

View file

@ -27,6 +27,7 @@ extern void CG_PreInit();
static int (*qsyscall)( int arg, ... ) = (int (*)( int, ...))-1; static int (*qsyscall)( int arg, ... ) = (int (*)( int, ...))-1;
extern "C" {
#ifdef _XBOX #ifdef _XBOX
void cg_dllEntry( int (*syscallptr)( int arg,... ) ) { void cg_dllEntry( int (*syscallptr)( int arg,... ) ) {
#else #else
@ -35,6 +36,7 @@ void dllEntry( int (*syscallptr)( int arg,... ) ) {
qsyscall = syscallptr; qsyscall = syscallptr;
CG_PreInit(); CG_PreInit();
} }
} // extern "C"
inline int PASSFLOAT( float x ) { inline int PASSFLOAT( float x ) {

View file

@ -872,6 +872,7 @@ and global variables
================= =================
*/ */
extern int PM_ValidateAnimRange( const int startFrame, const int endFrame, const float animSpeed ); extern int PM_ValidateAnimRange( const int startFrame, const int endFrame, const float animSpeed );
extern "C" {
game_export_t *GetGameAPI( game_import_t *import ) { game_export_t *GetGameAPI( game_import_t *import ) {
gameinfo_import_t gameinfo_import; gameinfo_import_t gameinfo_import;
@ -915,6 +916,7 @@ game_export_t *GetGameAPI( game_import_t *import ) {
return &globals; return &globals;
} }
} // extern "C"
void QDECL G_Error( const char *fmt, ... ) { void QDECL G_Error( const char *fmt, ... ) {
va_list argptr; va_list argptr;

View file

@ -15,10 +15,12 @@
static int (*qsyscall)( int arg, ... ) = (int (*)( int, ...))-1; static int (*qsyscall)( int arg, ... ) = (int (*)( int, ...))-1;
extern "C" {
void dllEntry( int (*syscallptr)( int arg,... ) ) { void dllEntry( int (*syscallptr)( int arg,... ) ) {
qsyscall = syscallptr; qsyscall = syscallptr;
// CG_PreInit(); // CG_PreInit();
} }
} // extern "C"
inline int PASSFLOAT( float x ) inline int PASSFLOAT( float x )
{ {