diff --git a/code/cgame/cg_syscalls.c b/code/cgame/cg_syscalls.c index 3c1efa04..a03068e7 100644 --- a/code/cgame/cg_syscalls.c +++ b/code/cgame/cg_syscalls.c @@ -28,10 +28,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "cg_local.h" -static long (QDECL *syscall)( int arg, ... ) = (long (QDECL *)( int, ...))-1; +static long (QDECL *syscall)( long arg, ... ) = (long (QDECL *)( long, ...))-1; -void dllEntry( long (QDECL *syscallptr)( int arg,... ) ) { +void dllEntry( long (QDECL *syscallptr)( long arg,... ) ) { syscall = syscallptr; } diff --git a/code/game/g_syscalls.c b/code/game/g_syscalls.c index 0e7c8cd3..256a1c8a 100644 --- a/code/game/g_syscalls.c +++ b/code/game/g_syscalls.c @@ -28,10 +28,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #error "Do not use in VM build" #endif -static int (QDECL *syscall)( int arg, ... ) = (int (QDECL *)( int, ...))-1; +static long (QDECL *syscall)( long arg, ... ) = (long (QDECL *)( long, ...))-1; -void dllEntry( int (QDECL *syscallptr)( int arg,... ) ) { +void dllEntry( long (QDECL *syscallptr)( long arg,... ) ) { syscall = syscallptr; } diff --git a/code/qcommon/vm.c b/code/qcommon/vm.c index 713e6aee..87f07952 100644 --- a/code/qcommon/vm.c +++ b/code/qcommon/vm.c @@ -716,8 +716,10 @@ long QDECL VM_Call( vm_t *vm, long callnum, ... ) { args[4], args[5], args[6], args[7], args[8], args[9], args[10], args[11], args[12], args[13], args[14], args[15]); +#if defined(HAVE_VM_COMPILED) } else if ( vm->compiled ) { r = VM_CallCompiled( vm, &callnum ); +#endif } else { struct { int callnum; diff --git a/code/ui/ui_syscalls.c b/code/ui/ui_syscalls.c index 7240c2b2..2ed67123 100644 --- a/code/ui/ui_syscalls.c +++ b/code/ui/ui_syscalls.c @@ -28,9 +28,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #error "Do not use in VM build" #endif -static int (QDECL *syscall)( int arg, ... ) = (int (QDECL *)( int, ...))-1; +static long (QDECL *syscall)( long arg, ... ) = (long (QDECL *)( long, ...))-1; -void dllEntry( int (QDECL *syscallptr)( int arg,... ) ) { +void dllEntry( long (QDECL *syscallptr)( long arg,... ) ) { syscall = syscallptr; } diff --git a/i_o-q3-readme b/i_o-q3-readme index 22d23b12..bf7d5001 100644 --- a/i_o-q3-readme +++ b/i_o-q3-readme @@ -12,3 +12,22 @@ http://www.qeradiant.com/ cd code/unix && make Refer to the web-site for updated status, enjoy! + +Using shared libraries instead of qvm +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +To make quake3 prefer shared libraries instead of qvm run it with +the following parameters: ++set sv_pure 0 +set vm_cgame 0 +set vm_game 0 +set vm_ui 0 + +Using Demo Data Files +~~~~~~~~~~~~~~~~~~~~~ +you only need demoq3/pak0.pk3 from the demo installer. The qvm files inside +pak0.pk3 will not work, you have to use the native shared libraries from this +project. To do so copy or link ui*.so, qagame*.so, cgame*.so from baseq3 to +demoq3 and run quake3 with the parameters described above. + +64bit mods +~~~~~~~~~~ +To compile working(!) shared libraries for 64bit mods the vmMain and +dllEntry functions as well as the syscall pointer have to be changed +to accept and return long instead of int.