mirror of
https://github.com/UberGames/ioef.git
synced 2025-01-18 23:21:37 +00:00
Ludwig's 1st diff: Some 64bit fixes for x86_64. Also fixes Makefile build.
This commit is contained in:
parent
59cce31e75
commit
f46ede91fb
23 changed files with 150 additions and 84 deletions
|
@ -623,7 +623,10 @@ int CL_CgameSystemCalls( int *args ) {
|
||||||
Com_Memcpy( VMA(1), VMA(2), args[3] );
|
Com_Memcpy( VMA(1), VMA(2), args[3] );
|
||||||
return 0;
|
return 0;
|
||||||
case CG_STRNCPY:
|
case CG_STRNCPY:
|
||||||
return (int)strncpy( VMA(1), VMA(2), args[3] );
|
#warning 64bit broken!
|
||||||
|
strncpy( VMA(1), VMA(2), args[3] );
|
||||||
|
// Com_Printf("%s:%d %s() *** return value of CG_STRNCPY not 64bit clean\n", __FILE__, __LINE__, __FUNCTION__);
|
||||||
|
return 0;
|
||||||
case CG_SIN:
|
case CG_SIN:
|
||||||
return FloatAsInt( sin( VMF(1) ) );
|
return FloatAsInt( sin( VMF(1) ) );
|
||||||
case CG_COS:
|
case CG_COS:
|
||||||
|
|
|
@ -1410,6 +1410,10 @@ e_status CIN_RunCinematic (int handle)
|
||||||
|
|
||||||
if (handle < 0 || handle>= MAX_VIDEO_HANDLES || cinTable[handle].status == FMV_EOF) return FMV_EOF;
|
if (handle < 0 || handle>= MAX_VIDEO_HANDLES || cinTable[handle].status == FMV_EOF) return FMV_EOF;
|
||||||
|
|
||||||
|
#warning disabled CIN_RunCinematic
|
||||||
|
Com_Printf("XXX: %s disabled\n", __FUNCTION__);
|
||||||
|
return FMV_EOF;
|
||||||
|
|
||||||
if (cin.currentHandle != handle) {
|
if (cin.currentHandle != handle) {
|
||||||
currentHandle = handle;
|
currentHandle = handle;
|
||||||
cin.currentHandle = currentHandle;
|
cin.currentHandle = currentHandle;
|
||||||
|
@ -1489,6 +1493,11 @@ int CIN_PlayCinematic( const char *arg, int x, int y, int w, int h, int systemBi
|
||||||
Com_sprintf (name, sizeof(name), "%s", arg);
|
Com_sprintf (name, sizeof(name), "%s", arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#warning disabled CIN_PlayCinematic
|
||||||
|
Com_Printf("XXX: %s disabled, not playing %s\n", __FUNCTION__, name);
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
|
||||||
if (!(systemBits & CIN_system)) {
|
if (!(systemBits & CIN_system)) {
|
||||||
for ( i = 0 ; i < MAX_VIDEO_HANDLES ; i++ ) {
|
for ( i = 0 ; i < MAX_VIDEO_HANDLES ; i++ ) {
|
||||||
if (!strcmp(cinTable[i].fileName, name) ) {
|
if (!strcmp(cinTable[i].fileName, name) ) {
|
||||||
|
|
|
@ -1043,7 +1043,11 @@ int CL_UISystemCalls( int *args ) {
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case UI_STRNCPY:
|
case UI_STRNCPY:
|
||||||
return (int)strncpy( VMA(1), VMA(2), args[3] );
|
#warning 64bit broken!
|
||||||
|
// Com_Printf("%s:%d %s() *** return value of UI_STRNCPY not 64bit clean\n", __FILE__, __LINE__, __FUNCTION__);
|
||||||
|
// Com_Printf("%s %d\n", VMA(2), args[3]);
|
||||||
|
strncpy( VMA(1), VMA(2), args[3] );
|
||||||
|
return 0;
|
||||||
|
|
||||||
case UI_SIN:
|
case UI_SIN:
|
||||||
return FloatAsInt( sin( VMF(1) ) );
|
return FloatAsInt( sin( VMF(1) ) );
|
||||||
|
|
|
@ -209,6 +209,7 @@ int vmMain( int command, int arg0, int arg1, int arg2, int arg3, int arg4, int a
|
||||||
G_ShutdownGame( arg0 );
|
G_ShutdownGame( arg0 );
|
||||||
return 0;
|
return 0;
|
||||||
case GAME_CLIENT_CONNECT:
|
case GAME_CLIENT_CONNECT:
|
||||||
|
#warning 64bit broken!
|
||||||
return (int)ClientConnect( arg0, arg1, arg2 );
|
return (int)ClientConnect( arg0, arg1, arg2 );
|
||||||
case GAME_CLIENT_THINK:
|
case GAME_CLIENT_THINK:
|
||||||
ClientThink( arg0 );
|
ClientThink( arg0 );
|
||||||
|
|
|
@ -254,6 +254,8 @@ static inline float LittleFloat (const float l) { return FloatSwap(&l); }
|
||||||
#define CPUSTRING "linux-i386"
|
#define CPUSTRING "linux-i386"
|
||||||
#elif defined __axp__
|
#elif defined __axp__
|
||||||
#define CPUSTRING "linux-alpha"
|
#define CPUSTRING "linux-alpha"
|
||||||
|
#elif defined __x86_64__
|
||||||
|
#define CPUSTRING "linux-x86_64"
|
||||||
#else
|
#else
|
||||||
#define CPUSTRING "linux-other"
|
#define CPUSTRING "linux-other"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -272,11 +272,11 @@ CopyWinding
|
||||||
*/
|
*/
|
||||||
winding_t *CopyWinding (winding_t *w)
|
winding_t *CopyWinding (winding_t *w)
|
||||||
{
|
{
|
||||||
int size;
|
unsigned long size;
|
||||||
winding_t *c;
|
winding_t *c;
|
||||||
|
|
||||||
c = AllocWinding (w->numpoints);
|
c = AllocWinding (w->numpoints);
|
||||||
size = (int)((winding_t *)0)->p[w->numpoints];
|
size = (long)((winding_t *)0)->p[w->numpoints];
|
||||||
Com_Memcpy (c, w, size);
|
Com_Memcpy (c, w, size);
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
|
@ -145,6 +145,7 @@ void QDECL Com_Printf( const char *fmt, ... ) {
|
||||||
char msg[MAXPRINTMSG];
|
char msg[MAXPRINTMSG];
|
||||||
static qboolean opening_qconsole = qfalse;
|
static qboolean opening_qconsole = qfalse;
|
||||||
|
|
||||||
|
|
||||||
va_start (argptr,fmt);
|
va_start (argptr,fmt);
|
||||||
Q_vsnprintf (msg, sizeof(msg), fmt, argptr);
|
Q_vsnprintf (msg, sizeof(msg), fmt, argptr);
|
||||||
va_end (argptr);
|
va_end (argptr);
|
||||||
|
@ -1527,7 +1528,7 @@ void Com_InitHunkMemory( void ) {
|
||||||
Com_Error( ERR_FATAL, "Hunk data failed to allocate %i megs", s_hunkTotal / (1024*1024) );
|
Com_Error( ERR_FATAL, "Hunk data failed to allocate %i megs", s_hunkTotal / (1024*1024) );
|
||||||
}
|
}
|
||||||
// cacheline align
|
// cacheline align
|
||||||
s_hunkData = (byte *) ( ( (int)s_hunkData + 31 ) & ~31 );
|
s_hunkData = (byte *) ( ( (long)s_hunkData + 31 ) & ~31 );
|
||||||
Hunk_Clear();
|
Hunk_Clear();
|
||||||
|
|
||||||
Cmd_AddCommand( "meminfo", Com_Meminfo_f );
|
Cmd_AddCommand( "meminfo", Com_Meminfo_f );
|
||||||
|
|
|
@ -2503,7 +2503,7 @@ static void FS_AddGameDirectory( const char *path, const char *dir ) {
|
||||||
sorted[i] = pakfiles[i];
|
sorted[i] = pakfiles[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
qsort( sorted, numfiles, 4, paksort );
|
qsort( sorted, numfiles, sizeof(char*), paksort );
|
||||||
|
|
||||||
for ( i = 0 ; i < numfiles ; i++ ) {
|
for ( i = 0 ; i < numfiles ; i++ ) {
|
||||||
pakfile = FS_BuildOSPath( path, dir, sorted[i] );
|
pakfile = FS_BuildOSPath( path, dir, sorted[i] );
|
||||||
|
|
|
@ -12,7 +12,7 @@ typedef unsigned char *POINTER;
|
||||||
typedef unsigned short int UINT2;
|
typedef unsigned short int UINT2;
|
||||||
|
|
||||||
/* UINT4 defines a four byte word */
|
/* UINT4 defines a four byte word */
|
||||||
typedef unsigned long int UINT4;
|
typedef unsigned int UINT4;
|
||||||
|
|
||||||
|
|
||||||
/* MD4.H - header file for MD4C.C */
|
/* MD4.H - header file for MD4C.C */
|
||||||
|
|
|
@ -48,11 +48,14 @@ void VM_VmInfo_f( void );
|
||||||
void VM_VmProfile_f( void );
|
void VM_VmProfile_f( void );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#if 0 // 64bit!
|
||||||
// converts a VM pointer to a C pointer and
|
// converts a VM pointer to a C pointer and
|
||||||
// checks to make sure that the range is acceptable
|
// checks to make sure that the range is acceptable
|
||||||
void *VM_VM2C( vmptr_t p, int length ) {
|
void *VM_VM2C( vmptr_t p, int length ) {
|
||||||
return (void *)p;
|
return (void *)p;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void VM_Debug( int level ) {
|
void VM_Debug( int level ) {
|
||||||
vm_debugLevel = level;
|
vm_debugLevel = level;
|
||||||
|
@ -151,6 +154,7 @@ int VM_SymbolToValue( vm_t *vm, const char *symbol ) {
|
||||||
VM_SymbolForCompiledPointer
|
VM_SymbolForCompiledPointer
|
||||||
=====================
|
=====================
|
||||||
*/
|
*/
|
||||||
|
#if 0 // 64bit!
|
||||||
const char *VM_SymbolForCompiledPointer( vm_t *vm, void *code ) {
|
const char *VM_SymbolForCompiledPointer( vm_t *vm, void *code ) {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -172,6 +176,7 @@ const char *VM_SymbolForCompiledPointer( vm_t *vm, void *code ) {
|
||||||
// now look up the bytecode instruction pointer
|
// now look up the bytecode instruction pointer
|
||||||
return VM_ValueToSymbol( vm, i );
|
return VM_ValueToSymbol( vm, i );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -445,6 +450,11 @@ vm_t *VM_Create( const char *module, int (*systemCalls)(int *),
|
||||||
Com_Error( ERR_FATAL, "VM_Create: bad parms" );
|
Com_Error( ERR_FATAL, "VM_Create: bad parms" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(__i386__) && !defined(__ppc__)
|
||||||
|
if(interpret >= VMI_COMPILED)
|
||||||
|
interpret = VMI_BYTECODE;
|
||||||
|
#endif
|
||||||
|
|
||||||
remaining = Hunk_MemoryRemaining();
|
remaining = Hunk_MemoryRemaining();
|
||||||
|
|
||||||
// see if we already have the VM
|
// see if we already have the VM
|
||||||
|
@ -669,9 +679,6 @@ int QDECL VM_Call( vm_t *vm, int callnum, ... ) {
|
||||||
vm_t *oldVM;
|
vm_t *oldVM;
|
||||||
int r;
|
int r;
|
||||||
int i;
|
int i;
|
||||||
int args[16];
|
|
||||||
va_list ap;
|
|
||||||
|
|
||||||
|
|
||||||
if ( !vm ) {
|
if ( !vm ) {
|
||||||
Com_Error( ERR_FATAL, "VM_Call with NULL vm" );
|
Com_Error( ERR_FATAL, "VM_Call with NULL vm" );
|
||||||
|
@ -688,6 +695,8 @@ int QDECL VM_Call( vm_t *vm, int callnum, ... ) {
|
||||||
// if we have a dll loaded, call it directly
|
// if we have a dll loaded, call it directly
|
||||||
if ( vm->entryPoint ) {
|
if ( vm->entryPoint ) {
|
||||||
//rcg010207 - see dissertation at top of VM_DllSyscall() in this file.
|
//rcg010207 - see dissertation at top of VM_DllSyscall() in this file.
|
||||||
|
int args[16];
|
||||||
|
va_list ap;
|
||||||
va_start(ap, callnum);
|
va_start(ap, callnum);
|
||||||
for (i = 0; i < sizeof (args) / sizeof (args[i]); i++) {
|
for (i = 0; i < sizeof (args) / sizeof (args[i]); i++) {
|
||||||
args[i] = va_arg(ap, int);
|
args[i] = va_arg(ap, int);
|
||||||
|
@ -698,10 +707,24 @@ int QDECL VM_Call( vm_t *vm, int callnum, ... ) {
|
||||||
args[4], args[5], args[6], args[7],
|
args[4], args[5], args[6], args[7],
|
||||||
args[8], args[9], args[10], args[11],
|
args[8], args[9], args[10], args[11],
|
||||||
args[12], args[13], args[14], args[15]);
|
args[12], args[13], args[14], args[15]);
|
||||||
|
#if defined(__ppc__) || defined(__i386__)
|
||||||
} else if ( vm->compiled ) {
|
} else if ( vm->compiled ) {
|
||||||
r = VM_CallCompiled( vm, &callnum );
|
r = VM_CallCompiled( vm, &callnum );
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
r = VM_CallInterpreted( vm, &callnum );
|
struct {
|
||||||
|
int callnum;
|
||||||
|
int args[16];
|
||||||
|
} a;
|
||||||
|
va_list ap;
|
||||||
|
|
||||||
|
a.callnum = callnum;
|
||||||
|
va_start(ap, callnum);
|
||||||
|
for (i = 0; i < sizeof (a.args) / sizeof (a.args[0]); i++) {
|
||||||
|
a.args[i] = va_arg(ap, int);
|
||||||
|
}
|
||||||
|
va_end(ap);
|
||||||
|
r = VM_CallInterpreted( vm, &a.callnum );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( oldVM != NULL ) // bk001220 - assert(currentVM!=NULL) for oldVM==NULL
|
if ( oldVM != NULL ) // bk001220 - assert(currentVM!=NULL) for oldVM==NULL
|
||||||
|
@ -820,7 +843,7 @@ void VM_LogSyscalls( int *args ) {
|
||||||
f = fopen("syscalls.log", "w" );
|
f = fopen("syscalls.log", "w" );
|
||||||
}
|
}
|
||||||
callnum++;
|
callnum++;
|
||||||
fprintf(f, "%i: %i (%i) = %i %i %i %i\n", callnum, args - (int *)currentVM->dataBase,
|
fprintf(f, "%i: %li (%i) = %i %i %i %i\n", callnum, args - (int *)currentVM->dataBase,
|
||||||
args[0], args[1], args[2], args[3], args[4] );
|
args[0], args[1], args[2], args[3], args[4] );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -479,7 +479,7 @@ nextInstruction2:
|
||||||
|
|
||||||
src = (int *)&image[ r0&dataMask ];
|
src = (int *)&image[ r0&dataMask ];
|
||||||
dest = (int *)&image[ r1&dataMask ];
|
dest = (int *)&image[ r1&dataMask ];
|
||||||
if ( ( (int)src | (int)dest | count ) & 3 ) {
|
if ( ( (long)src | (long)dest | count ) & 3 ) {
|
||||||
Com_Error( ERR_DROP, "OP_BLOCK_COPY not dword aligned" );
|
Com_Error( ERR_DROP, "OP_BLOCK_COPY not dword aligned" );
|
||||||
}
|
}
|
||||||
count >>= 2;
|
count >>= 2;
|
||||||
|
|
|
@ -87,7 +87,7 @@ void RB_SurfaceAnim( md4Surface_t *surface ) {
|
||||||
}
|
}
|
||||||
header = (md4Header_t *)((byte *)surface + surface->ofsHeader);
|
header = (md4Header_t *)((byte *)surface + surface->ofsHeader);
|
||||||
|
|
||||||
frameSize = (int)( &((md4Frame_t *)0)->bones[ header->numBones ] );
|
frameSize = (size_t)( &((md4Frame_t *)0)->bones[ header->numBones ] );
|
||||||
|
|
||||||
frame = (md4Frame_t *)((byte *)header + header->ofsFrames +
|
frame = (md4Frame_t *)((byte *)header + header->ofsFrames +
|
||||||
backEnd.currentEntity->e.frame * frameSize );
|
backEnd.currentEntity->e.frame * frameSize );
|
||||||
|
|
|
@ -328,7 +328,7 @@ static void ParseFace( dsurface_t *ds, drawVert_t *verts, msurface_t *surf, int
|
||||||
numIndexes = LittleLong( ds->numIndexes );
|
numIndexes = LittleLong( ds->numIndexes );
|
||||||
|
|
||||||
// create the srfSurfaceFace_t
|
// create the srfSurfaceFace_t
|
||||||
sfaceSize = ( int ) &((srfSurfaceFace_t *)0)->points[numPoints];
|
sfaceSize = ( size_t ) &((srfSurfaceFace_t *)0)->points[numPoints];
|
||||||
ofsIndexes = sfaceSize;
|
ofsIndexes = sfaceSize;
|
||||||
sfaceSize += sizeof( int ) * numIndexes;
|
sfaceSize += sizeof( int ) * numIndexes;
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
#include "tr_local.h"
|
#include "tr_local.h"
|
||||||
|
|
||||||
|
#include <string.h> // memcpy
|
||||||
|
|
||||||
trGlobals_t tr;
|
trGlobals_t tr;
|
||||||
|
|
||||||
static float s_flipMatrix[16] = {
|
static float s_flipMatrix[16] = {
|
||||||
|
@ -1003,7 +1005,13 @@ qsort replacement
|
||||||
|
|
||||||
=================
|
=================
|
||||||
*/
|
*/
|
||||||
#define SWAP_DRAW_SURF(a,b) temp=((int *)a)[0];((int *)a)[0]=((int *)b)[0];((int *)b)[0]=temp; temp=((int *)a)[1];((int *)a)[1]=((int *)b)[1];((int *)b)[1]=temp;
|
static inline void SWAP_DRAW_SURF(drawSurf_t* a, drawSurf_t* b)
|
||||||
|
{
|
||||||
|
drawSurf_t t;
|
||||||
|
memcpy(&t, a, sizeof(t));
|
||||||
|
memcpy(a, b, sizeof(t));
|
||||||
|
memcpy(b, &t, sizeof(t));
|
||||||
|
}
|
||||||
|
|
||||||
/* this parameter defines the cutoff between using quick sort and
|
/* this parameter defines the cutoff between using quick sort and
|
||||||
insertion sort for arrays; arrays with lengths shorter or equal to the
|
insertion sort for arrays; arrays with lengths shorter or equal to the
|
||||||
|
@ -1046,9 +1054,11 @@ void qsortFast (
|
||||||
int stkptr; /* stack for saving sub-array to be processed */
|
int stkptr; /* stack for saving sub-array to be processed */
|
||||||
int temp;
|
int temp;
|
||||||
|
|
||||||
|
#if 0
|
||||||
if ( sizeof(drawSurf_t) != 8 ) {
|
if ( sizeof(drawSurf_t) != 8 ) {
|
||||||
ri.Error( ERR_DROP, "change SWAP_DRAW_SURF macro" );
|
ri.Error( ERR_DROP, "change SWAP_DRAW_SURF macro" );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Note: the number of stack entries required is no more than
|
/* Note: the number of stack entries required is no more than
|
||||||
1 + log2(size), so 30 is sufficient for any array */
|
1 + log2(size), so 30 is sufficient for any array */
|
||||||
|
|
|
@ -418,7 +418,7 @@ static qboolean R_LoadMD4( model_t *mod, void *buffer, const char *mod_name ) {
|
||||||
// we don't need to swap tags in the renderer, they aren't used
|
// we don't need to swap tags in the renderer, they aren't used
|
||||||
|
|
||||||
// swap all the frames
|
// swap all the frames
|
||||||
frameSize = (int)( &((md4Frame_t *)0)->bones[ md4->numBones ] );
|
frameSize = (size_t)( &((md4Frame_t *)0)->bones[ md4->numBones ] );
|
||||||
for ( i = 0 ; i < md4->numFrames ; i++, frame++) {
|
for ( i = 0 ; i < md4->numFrames ; i++, frame++) {
|
||||||
frame = (md4Frame_t *) ( (byte *)md4 + md4->ofsFrames + i * frameSize );
|
frame = (md4Frame_t *) ( (byte *)md4 + md4->ofsFrames + i * frameSize );
|
||||||
frame->radius = LittleFloat( frame->radius );
|
frame->radius = LittleFloat( frame->radius );
|
||||||
|
|
|
@ -43,6 +43,7 @@ static char **shaderTextHashTable[MAX_SHADERTEXT_HASH];
|
||||||
return a hash value for the filename
|
return a hash value for the filename
|
||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
|
#warning TODO: check if long is ok here
|
||||||
static long generateHashValue( const char *fname, const int size ) {
|
static long generateHashValue( const char *fname, const int size ) {
|
||||||
int i;
|
int i;
|
||||||
long hash;
|
long hash;
|
||||||
|
|
|
@ -239,7 +239,7 @@ void SV_DirectConnect( netadr_t from ) {
|
||||||
int challenge;
|
int challenge;
|
||||||
char *password;
|
char *password;
|
||||||
int startIndex;
|
int startIndex;
|
||||||
char *denied;
|
int denied;
|
||||||
int count;
|
int count;
|
||||||
|
|
||||||
Com_DPrintf ("SVC_DirectConnect ()\n");
|
Com_DPrintf ("SVC_DirectConnect ()\n");
|
||||||
|
@ -420,13 +420,13 @@ gotnewcl:
|
||||||
Q_strncpyz( newcl->userinfo, userinfo, sizeof(newcl->userinfo) );
|
Q_strncpyz( newcl->userinfo, userinfo, sizeof(newcl->userinfo) );
|
||||||
|
|
||||||
// get the game a chance to reject this connection or modify the userinfo
|
// get the game a chance to reject this connection or modify the userinfo
|
||||||
denied = (char *)VM_Call( gvm, GAME_CLIENT_CONNECT, clientNum, qtrue, qfalse ); // firstTime = qtrue
|
denied = VM_Call( gvm, GAME_CLIENT_CONNECT, clientNum, qtrue, qfalse ); // firstTime = qtrue
|
||||||
if ( denied ) {
|
if ( denied ) {
|
||||||
// we can't just use VM_ArgPtr, because that is only valid inside a VM_Call
|
// we can't just use VM_ArgPtr, because that is only valid inside a VM_Call
|
||||||
denied = VM_ExplicitArgPtr( gvm, (int)denied );
|
char *str = VM_ExplicitArgPtr( gvm, denied );
|
||||||
|
|
||||||
NET_OutOfBandPrint( NS_SERVER, from, "print\n%s\n", denied );
|
NET_OutOfBandPrint( NS_SERVER, from, "print\n%s\n", str );
|
||||||
Com_DPrintf ("Game rejected a connection: %s.\n", denied);
|
Com_DPrintf ("Game rejected a connection: %s.\n", str);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -828,7 +828,11 @@ int SV_GameSystemCalls( int *args ) {
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case TRAP_STRNCPY:
|
case TRAP_STRNCPY:
|
||||||
return (int)strncpy( VMA(1), VMA(2), args[3] );
|
#warning 64bit broken!
|
||||||
|
// Com_Printf("%s:%d %s() *** return value of TRAP_STRNCPY not 64bit clean\n", __FILE__, __LINE__, __FUNCTION__);
|
||||||
|
// Com_Printf("%s %d\n", VMA(2), args[3]);
|
||||||
|
strncpy( VMA(1), VMA(2), args[3] );
|
||||||
|
return 0;
|
||||||
|
|
||||||
case TRAP_SIN:
|
case TRAP_SIN:
|
||||||
return FloatAsInt( sin( VMF(1) ) );
|
return FloatAsInt( sin( VMF(1) ) );
|
||||||
|
|
|
@ -200,6 +200,8 @@ void Sys_PumpEvents( void );
|
||||||
#define CPUSTRING "linux-i386"
|
#define CPUSTRING "linux-i386"
|
||||||
#elif defined __axp__
|
#elif defined __axp__
|
||||||
#define CPUSTRING "linux-alpha"
|
#define CPUSTRING "linux-alpha"
|
||||||
|
#elif defined __x86_64__
|
||||||
|
#define CPUSTRING "linux-x86_64"
|
||||||
#else
|
#else
|
||||||
#define CPUSTRING "linux-other"
|
#define CPUSTRING "linux-other"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -132,16 +132,16 @@ qboolean UI_OutOfMemory() {
|
||||||
return a hash value for the string
|
return a hash value for the string
|
||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
static long hashForString(const char *str) {
|
static unsigned hashForString(const char *str) {
|
||||||
int i;
|
int i;
|
||||||
long hash;
|
unsigned hash;
|
||||||
char letter;
|
char letter;
|
||||||
|
|
||||||
hash = 0;
|
hash = 0;
|
||||||
i = 0;
|
i = 0;
|
||||||
while (str[i] != '\0') {
|
while (str[i] != '\0') {
|
||||||
letter = tolower(str[i]);
|
letter = tolower(str[i]);
|
||||||
hash+=(long)(letter)*(i+119);
|
hash+=(unsigned)(letter)*(i+119);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
hash &= (HASH_TABLE_SIZE-1);
|
hash &= (HASH_TABLE_SIZE-1);
|
||||||
|
@ -162,7 +162,7 @@ static stringDef_t *strHandle[HASH_TABLE_SIZE];
|
||||||
|
|
||||||
const char *String_Alloc(const char *p) {
|
const char *String_Alloc(const char *p) {
|
||||||
int len;
|
int len;
|
||||||
long hash;
|
unsigned hash;
|
||||||
stringDef_t *str, *last;
|
stringDef_t *str, *last;
|
||||||
static const char *staticNULL = "";
|
static const char *staticNULL = "";
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ BLIBDIR=$(MOUNT_DIR)/botlib
|
||||||
NDIR=$(MOUNT_DIR)/null
|
NDIR=$(MOUNT_DIR)/null
|
||||||
UIDIR=$(MOUNT_DIR)/ui
|
UIDIR=$(MOUNT_DIR)/ui
|
||||||
Q3UIDIR=$(MOUNT_DIR)/q3_ui
|
Q3UIDIR=$(MOUNT_DIR)/q3_ui
|
||||||
FTDIR=$(MOUNT_DIR)/ft2
|
#FTDIR=$(MOUNT_DIR)/ft2
|
||||||
JPDIR=$(MOUNT_DIR)/jpeg-6
|
JPDIR=$(MOUNT_DIR)/jpeg-6
|
||||||
SPLNDIR=$(MOUNT_DIR)/splines
|
SPLNDIR=$(MOUNT_DIR)/splines
|
||||||
|
|
||||||
|
@ -80,6 +80,7 @@ DLL_ONLY=false
|
||||||
# bk010215 - TODO - add all defaults / kill Ryan
|
# bk010215 - TODO - add all defaults / kill Ryan
|
||||||
|
|
||||||
|
|
||||||
|
LIB=lib
|
||||||
ifeq ($(PLATFORM),linux)
|
ifeq ($(PLATFORM),linux)
|
||||||
|
|
||||||
ifneq (,$(findstring libc6,$(shell if [ -e /lib/libc.so.6* ];then echo libc6;fi)))
|
ifneq (,$(findstring libc6,$(shell if [ -e /lib/libc.so.6* ];then echo libc6;fi)))
|
||||||
|
@ -100,6 +101,14 @@ ifeq ($(PLATFORM),linux)
|
||||||
RPMARCH=ppc
|
RPMARCH=ppc
|
||||||
VENDOR=unknown
|
VENDOR=unknown
|
||||||
DLL_ONLY=true
|
DLL_ONLY=true
|
||||||
|
else
|
||||||
|
ifneq (,$(findstring x86_64,$(shell uname -m)))
|
||||||
|
MESADIR=../Mesa/
|
||||||
|
ARCH=x86_64
|
||||||
|
RPMARCH=x86_64
|
||||||
|
VENDOR=unknown
|
||||||
|
DLL_ONLY=false
|
||||||
|
LIB=lib64
|
||||||
else #default to i386
|
else #default to i386
|
||||||
MESADIR=../Mesa/
|
MESADIR=../Mesa/
|
||||||
ARCH=i386
|
ARCH=i386
|
||||||
|
@ -108,10 +117,11 @@ ifeq ($(PLATFORM),linux)
|
||||||
DLL_ONLY=false
|
DLL_ONLY=false
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# bk001205: no mo' -I/usr/include/glide, no FX
|
# bk001205: no mo' -I/usr/include/glide, no FX
|
||||||
# bk001205: no mo' -Dstricmp=strcasecmp, see q_shared.h
|
# bk001205: no mo' -Dstricmp=strcasecmp, see q_shared.h
|
||||||
BASE_CFLAGS = -pipe -fsigned-char
|
BASE_CFLAGS = -pipe -Wall
|
||||||
# rcg010216: DLL_ONLY for PPC
|
# rcg010216: DLL_ONLY for PPC
|
||||||
ifeq ($(strip $(DLL_ONLY)),true)
|
ifeq ($(strip $(DLL_ONLY)),true)
|
||||||
BASE_CFLAGS += -DDLL_ONLY
|
BASE_CFLAGS += -DDLL_ONLY
|
||||||
|
@ -125,9 +135,9 @@ ifeq ($(PLATFORM),linux)
|
||||||
# bk001205 - took out -O to get assertions (NDEBUG)
|
# bk001205 - took out -O to get assertions (NDEBUG)
|
||||||
# bk001206 - MALLOC_CHECK in addition to ZONE_DEBUG
|
# bk001206 - MALLOC_CHECK in addition to ZONE_DEBUG
|
||||||
# TTimo 03/30/2001 temporary took out -Werror for initial merge
|
# TTimo 03/30/2001 temporary took out -Werror for initial merge
|
||||||
DEBUG_CFLAGS = $(BASE_CFLAGS) -g -Wall -Werror
|
DEBUG_CFLAGS = $(BASE_CFLAGS) -g
|
||||||
DEBUG_CFLAGS += -DNO_MOUSEGRAB
|
DEBUG_CFLAGS += -DNO_MOUSEGRAB
|
||||||
DEBUG_CFLAGS += -O
|
DEBUG_CFLAGS += -O0
|
||||||
# DEBUG_CFLAGS=$(BASE_CFLAGS) -g -Wall -O
|
# DEBUG_CFLAGS=$(BASE_CFLAGS) -g -Wall -O
|
||||||
ifeq ($(ARCH),axp)
|
ifeq ($(ARCH),axp)
|
||||||
CC=pgcc
|
CC=pgcc
|
||||||
|
@ -136,17 +146,21 @@ ifeq ($(PLATFORM),linux)
|
||||||
ifeq ($(ARCH),ppc)
|
ifeq ($(ARCH),ppc)
|
||||||
NEWPGCC=/loki/global/ppc/bin/gcc
|
NEWPGCC=/loki/global/ppc/bin/gcc
|
||||||
CC=$(NEWPGCC)
|
CC=$(NEWPGCC)
|
||||||
RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O6 -fomit-frame-pointer -pipe -ffast-math -malign-loops=2 -malign-jumps=2 -malign-functions=2 -fno-strict-aliasing -fstrength-reduce
|
RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O6 -fomit-frame-pointer -ffast-math -malign-loops=2 -malign-jumps=2 -malign-functions=2 -fno-strict-aliasing -fstrength-reduce
|
||||||
|
endif
|
||||||
|
ifeq ($(ARCH),x86_64)
|
||||||
|
CC=gcc
|
||||||
|
CXX=g++
|
||||||
|
RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O6 -fomit-frame-pointer -ffast-math -falign-loops=2 -falign-jumps=2 -falign-functions=2 -fno-strict-aliasing -fstrength-reduce
|
||||||
else
|
else
|
||||||
#NEWPGCC=/usr/local/gcc-2.95.2/bin/gcc # bk001205
|
#NEWPGCC=/usr/local/gcc-2.95.2/bin/gcc # bk001205
|
||||||
#NEWPGCC=/loki/global/x86/bin/gcc
|
#NEWPGCC=/loki/global/x86/bin/gcc
|
||||||
NEWPGCC=/usr/bin/gcc
|
CC=gcc
|
||||||
CC=$(shell if [ -f $(NEWPGCC) ]; then echo $(NEWPGCC); else echo pgcc; fi )
|
CXX=g++
|
||||||
CXX=/usr/bin/g++
|
|
||||||
# TTimo: legacy RELEASE_CFLAGS
|
# TTimo: legacy RELEASE_CFLAGS
|
||||||
# NOTE: the -fomit-frame-pointer option leads to an unstable binary on my test box if it was built on the main box
|
# NOTE: the -fomit-frame-pointer option leads to an unstable binary on my test box if it was built on the main box
|
||||||
# but building on the Mdk 7.2 baseline seems to work
|
# but building on the Mdk 7.2 baseline seems to work
|
||||||
RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O6 -mcpu=pentiumpro -march=pentium -fomit-frame-pointer -pipe -ffast-math -malign-loops=2 -malign-jumps=2 -malign-functions=2 -fno-strict-aliasing -fstrength-reduce
|
RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O6 -mcpu=pentiumpro -march=pentium -fomit-frame-pointer -ffast-math -falign-loops=2 -falign-jumps=2 -falign-functions=2 -fno-strict-aliasing -fstrength-reduce
|
||||||
# TTimo: use this for building on P3 gcc 2.95.3 libc2.2 for all targets (experimental! -fomit-fram-pointer removed)
|
# TTimo: use this for building on P3 gcc 2.95.3 libc2.2 for all targets (experimental! -fomit-fram-pointer removed)
|
||||||
# RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O6 -mcpu=pentiumpro -march=pentium -pipe -ffast-math -malign-loops=2 -malign-jumps=2 -malign-functions=2 -fno-strict-aliasing -fstrength-reduce
|
# RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O6 -mcpu=pentiumpro -march=pentium -pipe -ffast-math -malign-loops=2 -malign-jumps=2 -malign-functions=2 -fno-strict-aliasing -fstrength-reduce
|
||||||
endif
|
endif
|
||||||
|
@ -163,7 +177,7 @@ ifeq ($(PLATFORM),linux)
|
||||||
|
|
||||||
THREAD_LDFLAGS=-lpthread
|
THREAD_LDFLAGS=-lpthread
|
||||||
LDFLAGS=-ldl -lm
|
LDFLAGS=-ldl -lm
|
||||||
GLLDFLAGS=-L/usr/X11R6/lib -lX11 -lXext -lXxf86dga -lXxf86vm
|
GLLDFLAGS=-L/usr/X11R6/$(LIB) -lX11 -lXext -lXxf86dga -lXxf86vm
|
||||||
|
|
||||||
ifeq ($(ARCH),axp)
|
ifeq ($(ARCH),axp)
|
||||||
TARGETS=\
|
TARGETS=\
|
||||||
|
@ -240,7 +254,7 @@ THREAD_LDFLAGS=-lpthread
|
||||||
LDFLAGS=-lm
|
LDFLAGS=-lm
|
||||||
#GLLDFLAGS=-L/usr/X11R6/lib -L$(MESADIR)/lib -lGL -lX11 -lXext -lXxf86dga -lXxf86vm
|
#GLLDFLAGS=-L/usr/X11R6/lib -L$(MESADIR)/lib -lGL -lX11 -lXext -lXxf86dga -lXxf86vm
|
||||||
#GLLDFLAGS=-L/usr/X11/lib -lGL -lX11 -lXext -lm
|
#GLLDFLAGS=-L/usr/X11/lib -lGL -lX11 -lXext -lm
|
||||||
GLLDFLAGS=-L/usr/X11R6/lib -lGL -lX11 -lXext -lXxf86dga -lXxf86vm
|
GLLDFLAGS=-L/usr/X11R6/$(LIB) -lGL -lX11 -lXext -lXxf86dga -lXxf86vm
|
||||||
|
|
||||||
ifeq ($(ARCH),axp)
|
ifeq ($(ARCH),axp)
|
||||||
TARGETS=\
|
TARGETS=\
|
||||||
|
@ -284,7 +298,7 @@ ARFLAGS=ar rv
|
||||||
RANLIB=ranlib
|
RANLIB=ranlib
|
||||||
|
|
||||||
LDFLAGS=-ldl -lm
|
LDFLAGS=-ldl -lm
|
||||||
GLLDFLAGS=-L/usr/X11/lib -lGL -lX11 -lXext -lm
|
GLLDFLAGS=-L/usr/X11/$(LIB) -lGL -lX11 -lXext -lm
|
||||||
|
|
||||||
TARGETS=$(B)/sgiquake3 \
|
TARGETS=$(B)/sgiquake3 \
|
||||||
$(B)/q3ded
|
$(B)/q3ded
|
||||||
|
@ -516,20 +530,6 @@ Q3OBJ = \
|
||||||
$(B)/client/unix_net.o \
|
$(B)/client/unix_net.o \
|
||||||
$(B)/client/unix_shared.o \
|
$(B)/client/unix_shared.o \
|
||||||
\
|
\
|
||||||
$(B)/client/ahoptim.o \
|
|
||||||
$(B)/client/autohint.o \
|
|
||||||
$(B)/client/ftbase.o \
|
|
||||||
$(B)/client/ftdebug.o \
|
|
||||||
$(B)/client/ftglyph.o \
|
|
||||||
$(B)/client/ftinit.o \
|
|
||||||
$(B)/client/ftmm.o \
|
|
||||||
$(B)/client/ftsystem.o \
|
|
||||||
$(B)/client/raster1.o \
|
|
||||||
$(B)/client/sfnt.o \
|
|
||||||
$(B)/client/sfobjs.o \
|
|
||||||
$(B)/client/smooth.o \
|
|
||||||
$(B)/client/truetype.o
|
|
||||||
# \
|
|
||||||
# $(B)/client/q_parse.o \
|
# $(B)/client/q_parse.o \
|
||||||
# $(B)/client/math_quaternion.o \
|
# $(B)/client/math_quaternion.o \
|
||||||
# $(B)/client/util_str.o \
|
# $(B)/client/util_str.o \
|
||||||
|
@ -544,6 +544,10 @@ Q3OBJ = \
|
||||||
Q3OBJ += $(B)/client/vm_x86.o
|
Q3OBJ += $(B)/client/vm_x86.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(ARCH),x86_64)
|
||||||
|
Q3OBJ += $(B)/client/vm_none.o
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(ARCH),ppc)
|
ifeq ($(ARCH),ppc)
|
||||||
ifeq ($(DLL_ONLY),false)
|
ifeq ($(DLL_ONLY),false)
|
||||||
Q3OBJ += $(B)/client/vm_ppc.o
|
Q3OBJ += $(B)/client/vm_ppc.o
|
||||||
|
@ -555,6 +559,7 @@ Q3OBJ = \
|
||||||
#platform specific objects
|
#platform specific objects
|
||||||
ifeq ($(PLATFORM),freebsd)
|
ifeq ($(PLATFORM),freebsd)
|
||||||
Q3POBJ=\
|
Q3POBJ=\
|
||||||
|
$(B)/client/linux_signals.o \
|
||||||
$(B)/client/linux_common.o \
|
$(B)/client/linux_common.o \
|
||||||
$(B)/client/linux_qgl.o \
|
$(B)/client/linux_qgl.o \
|
||||||
$(B)/client/linux_glimp.o \
|
$(B)/client/linux_glimp.o \
|
||||||
|
@ -575,6 +580,7 @@ ifeq ($(ARCH),axp)
|
||||||
Q3POBJ=
|
Q3POBJ=
|
||||||
else
|
else
|
||||||
Q3POBJ=\
|
Q3POBJ=\
|
||||||
|
$(B)/client/linux_signals.o \
|
||||||
$(B)/client/linux_common.o \
|
$(B)/client/linux_common.o \
|
||||||
$(B)/client/linux_qgl.o \
|
$(B)/client/linux_qgl.o \
|
||||||
$(B)/client/linux_glimp.o \
|
$(B)/client/linux_glimp.o \
|
||||||
|
@ -584,6 +590,7 @@ else
|
||||||
$(B)/client/matha.o \
|
$(B)/client/matha.o \
|
||||||
|
|
||||||
Q3POBJ_SMP=\
|
Q3POBJ_SMP=\
|
||||||
|
$(B)/client/linux_signals.o \
|
||||||
$(B)/client/linux_common.o \
|
$(B)/client/linux_common.o \
|
||||||
$(B)/client/linux_qgl.o \
|
$(B)/client/linux_qgl.o \
|
||||||
$(B)/client/linux_glimp_smp.o \
|
$(B)/client/linux_glimp_smp.o \
|
||||||
|
@ -751,6 +758,7 @@ $(B)/client/irix_glimp.o : $(UDIR)/irix_glimp.c; $(DO_CC)
|
||||||
$(B)/client/irix_glimp_smp.o : $(UDIR)/irix_glimp.c; $(DO_SMP_CC)
|
$(B)/client/irix_glimp_smp.o : $(UDIR)/irix_glimp.c; $(DO_SMP_CC)
|
||||||
$(B)/client/irix_snd.o : $(UDIR)/irix_snd.c; $(DO_CC)
|
$(B)/client/irix_snd.o : $(UDIR)/irix_snd.c; $(DO_CC)
|
||||||
$(B)/client/irix_input.o : $(UDIR)/irix_input.c; $(DO_CC)
|
$(B)/client/irix_input.o : $(UDIR)/irix_input.c; $(DO_CC)
|
||||||
|
$(B)/client/linux_signals.o : $(UDIR)/linux_signals.c; $(DO_CC)
|
||||||
$(B)/client/linux_common.o : $(UDIR)/linux_common.c; $(DO_CC)
|
$(B)/client/linux_common.o : $(UDIR)/linux_common.c; $(DO_CC)
|
||||||
$(B)/client/linux_glimp.o : $(UDIR)/linux_glimp.c; $(DO_CC) $(GL_CFLAGS)
|
$(B)/client/linux_glimp.o : $(UDIR)/linux_glimp.c; $(DO_CC) $(GL_CFLAGS)
|
||||||
$(B)/client/linux_glimp_smp.o : $(UDIR)/linux_glimp.c; $(DO_SMP_CC) $(GL_CFLAGS)
|
$(B)/client/linux_glimp_smp.o : $(UDIR)/linux_glimp.c; $(DO_SMP_CC) $(GL_CFLAGS)
|
||||||
|
@ -767,6 +775,10 @@ $(B)/client/snapvector.o : $(UDIR)/snapvector.nasm; $(DO_NASM)
|
||||||
$(B)/client/vm_x86.o : $(CMDIR)/vm_x86.c; $(DO_CC)
|
$(B)/client/vm_x86.o : $(CMDIR)/vm_x86.c; $(DO_CC)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(ARCH),x86_64)
|
||||||
|
$(B)/client/vm_none.o : $(CMDIR)/vm_none.c; $(DO_CC)
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(ARCH),ppc)
|
ifeq ($(ARCH),ppc)
|
||||||
ifeq ($(DLL_ONLY),false)
|
ifeq ($(DLL_ONLY),false)
|
||||||
$(B)/client/vm_ppc.o : $(CMDIR)/vm_ppc.c; $(DO_CC)
|
$(B)/client/vm_ppc.o : $(CMDIR)/vm_ppc.c; $(DO_CC)
|
||||||
|
@ -777,20 +789,6 @@ $(B)/client/unzip.o : $(CMDIR)/unzip.c; $(DO_CC)
|
||||||
$(B)/client/vm.o : $(CMDIR)/vm.c; $(DO_CC)
|
$(B)/client/vm.o : $(CMDIR)/vm.c; $(DO_CC)
|
||||||
$(B)/client/vm_interpreted.o : $(CMDIR)/vm_interpreted.c; $(DO_CC)
|
$(B)/client/vm_interpreted.o : $(CMDIR)/vm_interpreted.c; $(DO_CC)
|
||||||
|
|
||||||
$(B)/client/ahoptim.o : $(FTDIR)/ahoptim.c; $(DO_CC)
|
|
||||||
$(B)/client/autohint.o : $(FTDIR)/autohint.c; $(DO_CC)
|
|
||||||
$(B)/client/ftbase.o : $(FTDIR)/ftbase.c; $(DO_CC)
|
|
||||||
$(B)/client/ftdebug.o : $(FTDIR)/ftdebug.c; $(DO_CC)
|
|
||||||
$(B)/client/ftglyph.o : $(FTDIR)/ftglyph.c; $(DO_CC)
|
|
||||||
$(B)/client/ftinit.o : $(FTDIR)/ftinit.c; $(DO_CC)
|
|
||||||
$(B)/client/ftmm.o : $(FTDIR)/ftmm.c; $(DO_CC)
|
|
||||||
$(B)/client/ftsystem.o : $(FTDIR)/ftsystem.c; $(DO_CC)
|
|
||||||
$(B)/client/raster1.o : $(FTDIR)/raster1.c; $(DO_CC) -DFT_FLAT_COMPILE
|
|
||||||
$(B)/client/sfnt.o : $(FTDIR)/sfnt.c; $(DO_CC)
|
|
||||||
$(B)/client/sfobjs.o : $(FTDIR)/sfobjs.c; $(DO_CC)
|
|
||||||
$(B)/client/smooth.o : $(FTDIR)/smooth.c; $(DO_CC) -DFT_FLAT_COMPILE
|
|
||||||
$(B)/client/truetype.o : $(FTDIR)/truetype.c; $(DO_CC)
|
|
||||||
|
|
||||||
# TTimo: took out splines code
|
# TTimo: took out splines code
|
||||||
#$(B)/client/q_parse.o : $(SPLNDIR)/q_parse.cpp; $(DO_CXX)
|
#$(B)/client/q_parse.o : $(SPLNDIR)/q_parse.cpp; $(DO_CXX)
|
||||||
#$(B)/client/math_quaternion.o : $(SPLNDIR)/math_quaternion.cpp; $(DO_CXX)
|
#$(B)/client/math_quaternion.o : $(SPLNDIR)/math_quaternion.cpp; $(DO_CXX)
|
||||||
|
@ -908,6 +906,7 @@ Q3DOBJ = \
|
||||||
$(B)/ded/l_script.o \
|
$(B)/ded/l_script.o \
|
||||||
$(B)/ded/l_struct.o \
|
$(B)/ded/l_struct.o \
|
||||||
\
|
\
|
||||||
|
$(B)/ded/linux_signals.o \
|
||||||
$(B)/ded/linux_common.o \
|
$(B)/ded/linux_common.o \
|
||||||
$(B)/ded/unix_main.o \
|
$(B)/ded/unix_main.o \
|
||||||
$(B)/ded/unix_net.o \
|
$(B)/ded/unix_net.o \
|
||||||
|
@ -921,6 +920,10 @@ ifeq ($(ARCH),i386)
|
||||||
Q3DOBJ += $(B)/ded/vm_x86.o $(B)/ded/ftol.o $(B)/ded/snapvector.o
|
Q3DOBJ += $(B)/ded/vm_x86.o $(B)/ded/ftol.o $(B)/ded/snapvector.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(ARCH),x86_64)
|
||||||
|
Q3DOBJ += $(B)/ded/vm_none.o
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(ARCH),ppc)
|
ifeq ($(ARCH),ppc)
|
||||||
ifeq ($(DLL_ONLY),false)
|
ifeq ($(DLL_ONLY),false)
|
||||||
Q3DOBJ += $(B)/ded/vm_ppc.o
|
Q3DOBJ += $(B)/ded/vm_ppc.o
|
||||||
|
@ -984,7 +987,8 @@ $(B)/ded/l_precomp.o : $(BLIBDIR)/l_precomp.c; $(DO_BOT_CC)
|
||||||
$(B)/ded/l_script.o : $(BLIBDIR)/l_script.c; $(DO_BOT_CC)
|
$(B)/ded/l_script.o : $(BLIBDIR)/l_script.c; $(DO_BOT_CC)
|
||||||
$(B)/ded/l_struct.o : $(BLIBDIR)/l_struct.c; $(DO_BOT_CC)
|
$(B)/ded/l_struct.o : $(BLIBDIR)/l_struct.c; $(DO_BOT_CC)
|
||||||
|
|
||||||
$(B)/ded/linux_common.o : $(UDIR)/linux_common.c; $(DO_CC)
|
$(B)/ded/linux_signals.o : $(UDIR)/linux_signals.c; $(DO_DED_CC)
|
||||||
|
$(B)/ded/linux_common.o : $(UDIR)/linux_common.c; $(DO_DED_CC)
|
||||||
$(B)/ded/unix_main.o : $(UDIR)/unix_main.c; $(DO_DED_CC)
|
$(B)/ded/unix_main.o : $(UDIR)/unix_main.c; $(DO_DED_CC)
|
||||||
$(B)/ded/unix_net.o : $(UDIR)/unix_net.c; $(DO_DED_CC)
|
$(B)/ded/unix_net.o : $(UDIR)/unix_net.c; $(DO_DED_CC)
|
||||||
$(B)/ded/unix_shared.o : $(UDIR)/unix_shared.c; $(DO_DED_CC)
|
$(B)/ded/unix_shared.o : $(UDIR)/unix_shared.c; $(DO_DED_CC)
|
||||||
|
@ -1001,6 +1005,10 @@ $(B)/ded/ftol.o : $(UDIR)/ftol.nasm; $(DO_NASM)
|
||||||
$(B)/ded/snapvector.o : $(UDIR)/snapvector.nasm; $(DO_NASM)
|
$(B)/ded/snapvector.o : $(UDIR)/snapvector.nasm; $(DO_NASM)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(ARCH),x86_64)
|
||||||
|
$(B)/ded/vm_none.o : $(CMDIR)/vm_none.c; $(DO_DED_CC)
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(ARCH),ppc)
|
ifeq ($(ARCH),ppc)
|
||||||
ifeq ($(DLL_ONLY),false)
|
ifeq ($(DLL_ONLY),false)
|
||||||
$(B)/ded/vm_ppc.o : $(CMDIR)/vm_ppc.c; $(DO_DED_CC)
|
$(B)/ded/vm_ppc.o : $(CMDIR)/vm_ppc.c; $(DO_DED_CC)
|
||||||
|
@ -1410,7 +1418,7 @@ $(B)/baseq3/ui/ui_spskill.o : $(Q3UIDIR)/ui_spskill.c; $(DO_SHLIB_CC)
|
||||||
$(B)/baseq3/ui/ui_startserver.o : $(Q3UIDIR)/ui_startserver.c; $(DO_SHLIB_CC)
|
$(B)/baseq3/ui/ui_startserver.o : $(Q3UIDIR)/ui_startserver.c; $(DO_SHLIB_CC)
|
||||||
$(B)/baseq3/ui/ui_team.o : $(Q3UIDIR)/ui_team.c; $(DO_SHLIB_CC)
|
$(B)/baseq3/ui/ui_team.o : $(Q3UIDIR)/ui_team.c; $(DO_SHLIB_CC)
|
||||||
$(B)/baseq3/ui/ui_teamorders.o : $(Q3UIDIR)/ui_teamorders.c; $(DO_SHLIB_CC)
|
$(B)/baseq3/ui/ui_teamorders.o : $(Q3UIDIR)/ui_teamorders.c; $(DO_SHLIB_CC)
|
||||||
$(B)/baseq3/ui/ui_syscalls.o : $(Q3UIDIR)/ui_syscalls.c; $(DO_SHLIB_CC)
|
$(B)/baseq3/ui/ui_syscalls.o : $(UIDIR)/ui_syscalls.c; $(DO_SHLIB_CC)
|
||||||
$(B)/baseq3/ui/ui_video.o : $(Q3UIDIR)/ui_video.c; $(DO_SHLIB_CC)
|
$(B)/baseq3/ui/ui_video.o : $(Q3UIDIR)/ui_video.c; $(DO_SHLIB_CC)
|
||||||
|
|
||||||
# bk001205 - these wre the only SHLIB compiles in 1.17
|
# bk001205 - these wre the only SHLIB compiles in 1.17
|
||||||
|
@ -1613,20 +1621,6 @@ Q3SOBJ = \
|
||||||
$(B)/q3static/unix_net.o \
|
$(B)/q3static/unix_net.o \
|
||||||
$(B)/q3static/unix_shared.o \
|
$(B)/q3static/unix_shared.o \
|
||||||
\
|
\
|
||||||
$(B)/q3static/ahoptim.o \
|
|
||||||
$(B)/q3static/autohint.o \
|
|
||||||
$(B)/q3static/ftbase.o \
|
|
||||||
$(B)/q3static/ftdebug.o \
|
|
||||||
$(B)/q3static/ftglyph.o \
|
|
||||||
$(B)/q3static/ftinit.o \
|
|
||||||
$(B)/q3static/ftmm.o \
|
|
||||||
$(B)/q3static/ftsystem.o \
|
|
||||||
$(B)/q3static/raster1.o \
|
|
||||||
$(B)/q3static/sfnt.o \
|
|
||||||
$(B)/q3static/sfobjs.o \
|
|
||||||
$(B)/q3static/smooth.o \
|
|
||||||
$(B)/q3static/truetype.o \
|
|
||||||
\
|
|
||||||
$(B)/q3static/linux_qgl.o \
|
$(B)/q3static/linux_qgl.o \
|
||||||
$(B)/q3static/linux_glimp.o \
|
$(B)/q3static/linux_glimp.o \
|
||||||
$(B)/q3static/linux_joystick.o \
|
$(B)/q3static/linux_joystick.o \
|
||||||
|
@ -1638,6 +1632,10 @@ ifeq ($(ARCH),i386)
|
||||||
Q3SOBJ += $(B)/q3static/vm_x86.o
|
Q3SOBJ += $(B)/q3static/vm_x86.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(ARCH),x86_64)
|
||||||
|
Q3SOBJ += $(B)/q3static/vm_none.o
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(ARCH),ppc)
|
ifeq ($(ARCH),ppc)
|
||||||
ifeq ($(DLL_ONLY),false)
|
ifeq ($(DLL_ONLY),false)
|
||||||
Q3SOBJ += $(B)/q3static/vm_ppc.o
|
Q3SOBJ += $(B)/q3static/vm_ppc.o
|
||||||
|
@ -1793,6 +1791,10 @@ ifeq ($(ARCH),i386)
|
||||||
$(B)/q3static/vm_x86.o : $(CMDIR)/vm_x86.c; $(DO_CC) -DQ3_STATIC
|
$(B)/q3static/vm_x86.o : $(CMDIR)/vm_x86.c; $(DO_CC) -DQ3_STATIC
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(ARCH),x86_64)
|
||||||
|
$(B)/q3static/vm_none.o : $(CMDIR)/vm_none.c; $(DO_CC) -DQ3_STATIC
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(ARCH),ppc)
|
ifeq ($(ARCH),ppc)
|
||||||
ifeq ($(DLL_ONLY),false)
|
ifeq ($(DLL_ONLY),false)
|
||||||
$(B)/q3static/vm_ppc.o : $(CMDIR)/vm_ppc.c; $(DO_CC) -DQ3_STATIC
|
$(B)/q3static/vm_ppc.o : $(CMDIR)/vm_ppc.c; $(DO_CC) -DQ3_STATIC
|
||||||
|
|
|
@ -349,6 +349,8 @@ void Sys_Init(void)
|
||||||
#if defined __linux__
|
#if defined __linux__
|
||||||
#if defined __i386__
|
#if defined __i386__
|
||||||
Cvar_Set( "arch", "linux i386" );
|
Cvar_Set( "arch", "linux i386" );
|
||||||
|
#elif defined __x86_64__
|
||||||
|
Cvar_Set( "arch", "linux x86_64" );
|
||||||
#elif defined __alpha__
|
#elif defined __alpha__
|
||||||
Cvar_Set( "arch", "linux alpha" );
|
Cvar_Set( "arch", "linux alpha" );
|
||||||
#elif defined __sparc__
|
#elif defined __sparc__
|
||||||
|
@ -724,6 +726,8 @@ void *Sys_LoadDll( const char *name, char *fqpath ,
|
||||||
getcwd(curpath, sizeof(curpath));
|
getcwd(curpath, sizeof(curpath));
|
||||||
#if defined __i386__
|
#if defined __i386__
|
||||||
snprintf (fname, sizeof(fname), "%si386.so", name);
|
snprintf (fname, sizeof(fname), "%si386.so", name);
|
||||||
|
#elif defined __x86_64__
|
||||||
|
snprintf (fname, sizeof(fname), "%sx86_64.so", name);
|
||||||
#elif defined __powerpc__ //rcg010207 - PPC support.
|
#elif defined __powerpc__ //rcg010207 - PPC support.
|
||||||
snprintf (fname, sizeof(fname), "%sppc.so", name);
|
snprintf (fname, sizeof(fname), "%sppc.so", name);
|
||||||
#elif defined __axp__
|
#elif defined __axp__
|
||||||
|
|
|
@ -139,7 +139,7 @@ int Sys_XTimeToSysTime (unsigned long xtime)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//#if 0 // bk001215 - see snapvector.nasm for replacement
|
//#if 0 // bk001215 - see snapvector.nasm for replacement
|
||||||
#if (defined __APPLE__) // rcg010206 - using this for PPC builds...
|
#if !(defined __i386__) // rcg010206 - using this for PPC builds...
|
||||||
long fastftol( float f ) { // bk001213 - from win32/win_shared.c
|
long fastftol( float f ) { // bk001213 - from win32/win_shared.c
|
||||||
//static int tmp;
|
//static int tmp;
|
||||||
// __asm fld f
|
// __asm fld f
|
||||||
|
|
Loading…
Reference in a new issue