mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-11-10 06:31:47 +00:00
* Replaced a bunch of inline and __inline with ID_INLINE
* Replaced a bunch of __i386__ with id386 * General tidy up of asm preprocessor decisions * Removed C_ONLY from the dedicated server build
This commit is contained in:
parent
857a5e264e
commit
e4b7a04d5c
24 changed files with 506 additions and 795 deletions
|
@ -106,7 +106,7 @@ void AAS_RoutingInfo(void)
|
|||
// Returns: -
|
||||
// Changes Globals: -
|
||||
//===========================================================================
|
||||
__inline int AAS_ClusterAreaNum(int cluster, int areanum)
|
||||
ID_INLINE int AAS_ClusterAreaNum(int cluster, int areanum)
|
||||
{
|
||||
int side, areacluster;
|
||||
|
||||
|
@ -166,7 +166,7 @@ void AAS_InitTravelFlagFromType(void)
|
|||
// Returns: -
|
||||
// Changes Globals: -
|
||||
//===========================================================================
|
||||
__inline int AAS_TravelFlagForType_inline(int traveltype)
|
||||
ID_INLINE int AAS_TravelFlagForType_inline(int traveltype)
|
||||
{
|
||||
int tfl;
|
||||
|
||||
|
@ -339,7 +339,7 @@ int AAS_EnableRoutingArea(int areanum, int enable)
|
|||
// Returns: -
|
||||
// Changes Globals: -
|
||||
//===========================================================================
|
||||
__inline float AAS_RoutingTime(void)
|
||||
ID_INLINE float AAS_RoutingTime(void)
|
||||
{
|
||||
return AAS_Time();
|
||||
} //end of the function AAS_RoutingTime
|
||||
|
@ -379,7 +379,7 @@ int AAS_GetAreaContentsTravelFlags(int areanum)
|
|||
// Returns: -
|
||||
// Changes Globals: -
|
||||
//===========================================================================
|
||||
__inline int AAS_AreaContentsTravelFlags_inline(int areanum)
|
||||
ID_INLINE int AAS_AreaContentsTravelFlags_inline(int areanum)
|
||||
{
|
||||
return aasworld.areacontentstravelflags[areanum];
|
||||
} //end of the function AAS_AreaContentsTravelFlags
|
||||
|
|
|
@ -645,7 +645,7 @@ static unsigned short yuv_to_rgb( long y, long u, long v )
|
|||
******************************************************************************/
|
||||
#if defined(MACOS_X)
|
||||
|
||||
static inline unsigned int yuv_to_rgb24( long y, long u, long v )
|
||||
static ID_INLINE unsigned int yuv_to_rgb24( long y, long u, long v )
|
||||
{
|
||||
long r,g,b,YY;
|
||||
|
||||
|
|
|
@ -34,7 +34,6 @@ int* snd_p;
|
|||
int snd_linear_count;
|
||||
short* snd_out;
|
||||
|
||||
#if !( (defined __GNUC__) && (defined __i386__) ) // if not a GNU x86 target
|
||||
#if !id386 // if configured not to use asm
|
||||
|
||||
void S_WriteLinearBlastStereo16 (void)
|
||||
|
@ -61,6 +60,9 @@ void S_WriteLinearBlastStereo16 (void)
|
|||
snd_out[i+1] = val;
|
||||
}
|
||||
}
|
||||
#elif defined(__GNUC__)
|
||||
// uses snd_mixa.s
|
||||
void S_WriteLinearBlastStereo16 (void);
|
||||
#else
|
||||
|
||||
__declspec( naked ) void S_WriteLinearBlastStereo16 (void)
|
||||
|
@ -107,10 +109,6 @@ LClampDone2:
|
|||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
#else
|
||||
// forward declare, implementation somewhere else
|
||||
void S_WriteLinearBlastStereo16 (void);
|
||||
#endif
|
||||
|
||||
void S_TransferStereo16 (unsigned long *pbuf, int endtime)
|
||||
|
|
|
@ -80,7 +80,7 @@ enum {
|
|||
RenderCompletedMsg = 2,
|
||||
};
|
||||
|
||||
static /*inline*/ void MsgPortInit(MsgPort *port)
|
||||
static /*ID_INLINE*/ void MsgPortInit(MsgPort *port)
|
||||
{
|
||||
#if USE_MACH_PORTS
|
||||
port->nsPort = [[NSMachPort alloc] init];
|
||||
|
@ -106,7 +106,7 @@ static /*inline*/ void MsgPortInit(MsgPort *port)
|
|||
#endif
|
||||
}
|
||||
|
||||
static /*inline*/ void _SendMsg(MsgPort *port, unsigned int msgCode, void *msgData,
|
||||
static /*ID_INLINE*/ void _SendMsg(MsgPort *port, unsigned int msgCode, void *msgData,
|
||||
const char *functionName, const char *portName, const char *msgName)
|
||||
{
|
||||
int rc;
|
||||
|
@ -173,7 +173,7 @@ static /*inline*/ void _SendMsg(MsgPort *port, unsigned int msgCode, void *msgDa
|
|||
#endif
|
||||
}
|
||||
|
||||
static /*inline*/ void _WaitMsg(MsgPort *port, unsigned int *msgCode, void **msgData,
|
||||
static /*ID_INLINE*/ void _WaitMsg(MsgPort *port, unsigned int *msgCode, void **msgData,
|
||||
const char *functionName, const char *portName)
|
||||
{
|
||||
int rc;
|
||||
|
|
|
@ -356,7 +356,7 @@ static qboolean maybeHide()
|
|||
return Sys_Hide();
|
||||
}
|
||||
|
||||
static inline void sendEventForCharacter(NSEvent *event, unichar character, qboolean keyDownFlag, int currentTime)
|
||||
static ID_INLINE void sendEventForCharacter(NSEvent *event, unichar character, qboolean keyDownFlag, int currentTime)
|
||||
{
|
||||
if (in_showevents->integer)
|
||||
Com_Printf("CHARACTER: 0x%02x down=%d\n", character, keyDownFlag);
|
||||
|
@ -563,7 +563,7 @@ static inline void sendEventForCharacter(NSEvent *event, unichar character, qboo
|
|||
}
|
||||
}
|
||||
|
||||
static inline void processKeyEvent(NSEvent *keyEvent, qboolean keyDownFlag, int currentTime)
|
||||
static ID_INLINE void processKeyEvent(NSEvent *keyEvent, qboolean keyDownFlag, int currentTime)
|
||||
{
|
||||
NSEventType eventType;
|
||||
NSString *characters;
|
||||
|
@ -578,7 +578,7 @@ static inline void processKeyEvent(NSEvent *keyEvent, qboolean keyDownFlag, int
|
|||
}
|
||||
}
|
||||
|
||||
static inline void sendEventForMaskChangeInFlags(int quakeKey, unsigned int modifierMask, unsigned int newModifierFlags, int currentTime)
|
||||
static ID_INLINE void sendEventForMaskChangeInFlags(int quakeKey, unsigned int modifierMask, unsigned int newModifierFlags, int currentTime)
|
||||
{
|
||||
BOOL oldHadModifier, newHasModifier;
|
||||
|
||||
|
@ -590,7 +590,7 @@ static inline void sendEventForMaskChangeInFlags(int quakeKey, unsigned int modi
|
|||
}
|
||||
}
|
||||
|
||||
static inline void processFlagsChangedEvent(NSEvent *flagsChangedEvent, int currentTime)
|
||||
static ID_INLINE void processFlagsChangedEvent(NSEvent *flagsChangedEvent, int currentTime)
|
||||
{
|
||||
int newModifierFlags;
|
||||
|
||||
|
@ -603,7 +603,7 @@ static inline void processFlagsChangedEvent(NSEvent *flagsChangedEvent, int curr
|
|||
currentModifierFlags = newModifierFlags;
|
||||
}
|
||||
|
||||
static inline void processSystemDefinedEvent(NSEvent *systemDefinedEvent, int currentTime)
|
||||
static ID_INLINE void processSystemDefinedEvent(NSEvent *systemDefinedEvent, int currentTime)
|
||||
{
|
||||
static int oldButtons = 0;
|
||||
int buttonsDelta;
|
||||
|
@ -666,7 +666,7 @@ static inline void processSystemDefinedEvent(NSEvent *systemDefinedEvent, int cu
|
|||
}
|
||||
}
|
||||
|
||||
static inline void processEvent(NSEvent *event, int currentTime)
|
||||
static ID_INLINE void processEvent(NSEvent *event, int currentTime)
|
||||
{
|
||||
NSEventType eventType;
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -2812,9 +2812,8 @@ void Com_Shutdown (void) {
|
|||
|
||||
}
|
||||
|
||||
#if !( defined __VECTORC )
|
||||
#if !( defined __GNUC__ ) // GNU versions in linux_common.c
|
||||
#if ((!id386) && (!defined __i386__)) // rcg010212 - for PPC
|
||||
#if !id386
|
||||
|
||||
void Com_Memcpy (void* dest, const void* src, const size_t count)
|
||||
{
|
||||
|
@ -3126,7 +3125,6 @@ skipClamp:
|
|||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif // bk001208 - memset/memcpy assembly, Q_acos needed (RC4)
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
|
|
@ -38,13 +38,8 @@ void MD4Init (MD4_CTX *);
|
|||
void MD4Update (MD4_CTX *, const unsigned char *, unsigned int);
|
||||
void MD4Final (unsigned char [16], MD4_CTX *);
|
||||
|
||||
#ifndef __VECTORC
|
||||
void Com_Memset (void* dest, const int val, const size_t count);
|
||||
void Com_Memcpy (void* dest, const void* src, const size_t count);
|
||||
#else
|
||||
#define Com_Memset memset
|
||||
#define Com_Memcpy memcpy
|
||||
#endif
|
||||
|
||||
/* MD4C.C - RSA Data Security, Inc., MD4 message-digest algorithm */
|
||||
/* Copyright (C) 1990-2, RSA Data Security, Inc. All rights reserved.
|
||||
|
|
|
@ -21,8 +21,15 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
*/
|
||||
//
|
||||
// q_math.c -- stateless support routines that are included in each code module
|
||||
#include "q_shared.h"
|
||||
|
||||
// Some of the vector functions are static inline in q_shared.h. q3asm
|
||||
// doesn't understand static functions though, so we only want them in
|
||||
// one file. That's what this is about.
|
||||
#ifdef Q3_VM
|
||||
#define __Q3_VM_MATH
|
||||
#endif
|
||||
|
||||
#include "q_shared.h"
|
||||
|
||||
vec3_t vec3_origin = {0,0,0};
|
||||
vec3_t axisDefault[3] = { { 1, 0, 0 }, { 0, 1, 0 }, { 0, 0, 1 } };
|
||||
|
@ -153,63 +160,6 @@ float Q_crandom( int *seed ) {
|
|||
return 2.0 * ( Q_random( seed ) - 0.5 );
|
||||
}
|
||||
|
||||
#ifdef Q3_VM
|
||||
|
||||
int VectorCompare( const vec3_t v1, const vec3_t v2 ) {
|
||||
if (v1[0] != v2[0] || v1[1] != v2[1] || v1[2] != v2[2]) {
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
vec_t VectorLength( const vec3_t v ) {
|
||||
return (vec_t)sqrt (v[0]*v[0] + v[1]*v[1] + v[2]*v[2]);
|
||||
}
|
||||
|
||||
vec_t VectorLengthSquared( const vec3_t v ) {
|
||||
return (v[0]*v[0] + v[1]*v[1] + v[2]*v[2]);
|
||||
}
|
||||
|
||||
vec_t Distance( const vec3_t p1, const vec3_t p2 ) {
|
||||
vec3_t v;
|
||||
|
||||
VectorSubtract (p2, p1, v);
|
||||
return VectorLength( v );
|
||||
}
|
||||
|
||||
vec_t DistanceSquared( const vec3_t p1, const vec3_t p2 ) {
|
||||
vec3_t v;
|
||||
|
||||
VectorSubtract (p2, p1, v);
|
||||
return v[0]*v[0] + v[1]*v[1] + v[2]*v[2];
|
||||
}
|
||||
|
||||
// fast vector normalize routine that does not check to make sure
|
||||
// that length != 0, nor does it return length, uses rsqrt approximation
|
||||
void VectorNormalizeFast( vec3_t v )
|
||||
{
|
||||
float ilength;
|
||||
|
||||
ilength = Q_rsqrt( DotProduct( v, v ) );
|
||||
|
||||
v[0] *= ilength;
|
||||
v[1] *= ilength;
|
||||
v[2] *= ilength;
|
||||
}
|
||||
|
||||
void VectorInverse( vec3_t v ){
|
||||
v[0] = -v[0];
|
||||
v[1] = -v[1];
|
||||
v[2] = -v[2];
|
||||
}
|
||||
|
||||
void CrossProduct( const vec3_t v1, const vec3_t v2, vec3_t cross ) {
|
||||
cross[0] = v1[1]*v2[2] - v1[2]*v2[1];
|
||||
cross[1] = v1[2]*v2[0] - v1[0]*v2[2];
|
||||
cross[2] = v1[0]*v2[1] - v1[1]*v2[0];
|
||||
}
|
||||
#endif
|
||||
|
||||
//=======================================================
|
||||
|
||||
signed char ClampChar( int i ) {
|
||||
|
@ -736,10 +686,7 @@ int BoxOnPlaneSide2 (vec3_t emins, vec3_t emaxs, struct cplane_s *p)
|
|||
==================
|
||||
*/
|
||||
|
||||
// if not GNU x86 and configured to use asm
|
||||
#if !( (defined __GNUC__) && (defined __i386__) && (!defined C_ONLY))
|
||||
|
||||
#if defined Q3_VM || defined C_ONLY || !id386 || defined __VECTORC
|
||||
#if !id386
|
||||
|
||||
int BoxOnPlaneSide (vec3_t emins, vec3_t emaxs, struct cplane_s *p)
|
||||
{
|
||||
|
@ -804,6 +751,8 @@ int BoxOnPlaneSide (vec3_t emins, vec3_t emaxs, struct cplane_s *p)
|
|||
|
||||
return sides;
|
||||
}
|
||||
#elif __GNUC__
|
||||
// use matha.s
|
||||
#else
|
||||
#pragma warning( disable: 4035 )
|
||||
|
||||
|
@ -1038,7 +987,6 @@ Lerror:
|
|||
}
|
||||
#pragma warning( default: 4035 )
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
|
@ -23,68 +23,82 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#ifndef __Q_PLATFORM_H
|
||||
#define __Q_PLATFORM_H
|
||||
|
||||
// this is the define for determining if we have an asm version of a C function
|
||||
#if (defined _M_IX86 || defined __i386__) && !defined __sun && !defined Q3_VM
|
||||
#define id386 1
|
||||
// this is for determining if we have an asm version of a C function
|
||||
#ifdef Q3_VM
|
||||
|
||||
#define id386 0
|
||||
#define idppc 0
|
||||
#define idppc_altivec 0
|
||||
|
||||
#else
|
||||
#define id386 0
|
||||
|
||||
#if (defined _M_IX86 || defined __i386__) && \
|
||||
!defined __sun && !defined(C_ONLY)
|
||||
#define id386 1
|
||||
#else
|
||||
#define id386 0
|
||||
#endif
|
||||
|
||||
#if (defined(powerc) || defined(powerpc) || defined(ppc) || defined(__ppc) || defined(__ppc__)) && !defined(C_ONLY)
|
||||
#define idppc 1
|
||||
#if (defined(powerc) || defined(powerpc) || defined(ppc) || \
|
||||
defined(__ppc) || defined(__ppc__)) && !defined(C_ONLY)
|
||||
#define idppc 1
|
||||
#if defined(__VEC__)
|
||||
#define idppc_altivec 1
|
||||
#else
|
||||
#define idppc_altivec 0
|
||||
#endif
|
||||
#else
|
||||
#define idppc 0
|
||||
#define idppc 0
|
||||
#define idppc_altivec 0
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef __ASM_I386__ // don't include the C bits if included from qasm.h
|
||||
|
||||
// for windows fastcall option
|
||||
|
||||
#define QDECL
|
||||
#define QDECL
|
||||
|
||||
short ShortSwap (short l);
|
||||
int LongSwap (int l);
|
||||
float FloatSwap (const float *f);
|
||||
|
||||
//======================= WIN32 DEFINES =================================
|
||||
//================================================================= WIN32 ===
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
#undef QDECL
|
||||
#define QDECL __cdecl
|
||||
#define QDECL __cdecl
|
||||
|
||||
// buildstring will be incorporated into the version string
|
||||
#ifdef _MSC_VER
|
||||
#ifdef NDEBUG
|
||||
#ifdef _M_IX86
|
||||
#define CPUSTRING "win-x86"
|
||||
#define CPUSTRING "win-x86"
|
||||
#elif defined _M_ALPHA
|
||||
#define CPUSTRING "win-AXP"
|
||||
#define CPUSTRING "win-AXP"
|
||||
#endif
|
||||
#else
|
||||
#ifdef _M_IX86
|
||||
#define CPUSTRING "win-x86-debug"
|
||||
#define CPUSTRING "win-x86-debug"
|
||||
#elif defined _M_ALPHA
|
||||
#define CPUSTRING "win-AXP-debug"
|
||||
#define CPUSTRING "win-AXP-debug"
|
||||
#endif
|
||||
#endif
|
||||
#elif defined __MINGW32__
|
||||
#ifdef NDEBUG
|
||||
#ifdef __i386__
|
||||
#define CPUSTRING "mingw-x86"
|
||||
#define CPUSTRING "mingw-x86"
|
||||
#endif
|
||||
#else
|
||||
#ifdef __i386__
|
||||
#define CPUSTRING "mingw-x86-debug"
|
||||
#define CPUSTRING "mingw-x86-debug"
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define ID_INLINE __inline
|
||||
#define ID_INLINE __inline
|
||||
|
||||
static ID_INLINE short BigShort( short l) { return ShortSwap(l); }
|
||||
#define LittleShort
|
||||
|
@ -93,88 +107,89 @@ static ID_INLINE int BigLong(int l) { return LongSwap(l); }
|
|||
static ID_INLINE float BigFloat(const float l) { return FloatSwap(&l); }
|
||||
#define LittleFloat
|
||||
|
||||
#define PATH_SEP '\\'
|
||||
#define PATH_SEP '\\'
|
||||
|
||||
#endif
|
||||
|
||||
//======================= MAC OS X DEFINES =====================
|
||||
//============================================================== MAC OS X ===
|
||||
|
||||
#if defined(MACOS_X)
|
||||
|
||||
#define __cdecl
|
||||
#define __declspec(x)
|
||||
#define stricmp strcasecmp
|
||||
#define ID_INLINE inline
|
||||
#define ID_INLINE inline
|
||||
|
||||
#ifdef __ppc__
|
||||
#define CPUSTRING "MacOSX-ppc"
|
||||
#define CPUSTRING "MacOSX-ppc"
|
||||
#elif defined __i386__
|
||||
#define CPUSTRING "MacOSX-i386"
|
||||
#define CPUSTRING "MacOSX-i386"
|
||||
#else
|
||||
#define CPUSTRING "MacOSX-other"
|
||||
#define CPUSTRING "MacOSX-other"
|
||||
#endif
|
||||
|
||||
#define PATH_SEP '/'
|
||||
#define PATH_SEP '/'
|
||||
|
||||
#define __rlwimi(out, in, shift, maskBegin, maskEnd) \
|
||||
asm("rlwimi %0,%1,%2,%3,%4" : "=r" (out) : "r" (in), \
|
||||
"i" (shift), "i" (maskBegin), "i" (maskEnd))
|
||||
#define __dcbt(addr, offset) asm("dcbt %0,%1" : : "b" (addr), "r" (offset))
|
||||
|
||||
static inline unsigned int __lwbrx(register void *addr, register int offset) {
|
||||
register unsigned int word;
|
||||
|
||||
asm("lwbrx %0,%2,%1" : "=r" (word) : "r" (addr), "b" (offset));
|
||||
return word;
|
||||
static ID_INLINE unsigned int __lwbrx(register void *addr,
|
||||
register int offset) {
|
||||
register unsigned int word;
|
||||
|
||||
asm("lwbrx %0,%2,%1" : "=r" (word) : "r" (addr), "b" (offset));
|
||||
return word;
|
||||
}
|
||||
|
||||
static inline unsigned short __lhbrx(register void *addr, register int offset) {
|
||||
register unsigned short halfword;
|
||||
|
||||
asm("lhbrx %0,%2,%1" : "=r" (halfword) : "r" (addr), "b" (offset));
|
||||
return halfword;
|
||||
static ID_INLINE unsigned short __lhbrx(register void *addr,
|
||||
register int offset) {
|
||||
register unsigned short halfword;
|
||||
|
||||
asm("lhbrx %0,%2,%1" : "=r" (halfword) : "r" (addr), "b" (offset));
|
||||
return halfword;
|
||||
}
|
||||
|
||||
static inline float __fctiw(register float f) {
|
||||
register float fi;
|
||||
|
||||
asm("fctiw %0,%1" : "=f" (fi) : "f" (f));
|
||||
static ID_INLINE float __fctiw(register float f) {
|
||||
register float fi;
|
||||
|
||||
return fi;
|
||||
asm("fctiw %0,%1" : "=f" (fi) : "f" (f));
|
||||
return fi;
|
||||
}
|
||||
|
||||
#define BigShort
|
||||
static inline short LittleShort(short l) { return ShortSwap(l); }
|
||||
static ID_INLINE short LittleShort(short l) { return ShortSwap(l); }
|
||||
#define BigLong
|
||||
static inline int LittleLong (int l) { return LongSwap(l); }
|
||||
static ID_INLINE int LittleLong(int l) { return LongSwap(l); }
|
||||
#define BigFloat
|
||||
static inline float LittleFloat (const float l) { return FloatSwap(&l); }
|
||||
static ID_INLINE float LittleFloat(const float l) { return FloatSwap(&l); }
|
||||
|
||||
#endif
|
||||
|
||||
//======================= MAC DEFINES =================================
|
||||
//=================================================================== MAC ===
|
||||
|
||||
#ifdef __MACOS__
|
||||
|
||||
#include <MacTypes.h>
|
||||
#define ID_INLINE inline
|
||||
#define ID_INLINE inline
|
||||
|
||||
#define CPUSTRING "MacOS-PPC"
|
||||
#define CPUSTRING "MacOS-PPC"
|
||||
|
||||
#define PATH_SEP ':'
|
||||
#define PATH_SEP ':'
|
||||
|
||||
void Sys_PumpEvents( void );
|
||||
|
||||
#define BigShort
|
||||
static inline short LittleShort(short l) { return ShortSwap(l); }
|
||||
static ID_INLINE short LittleShort(short l) { return ShortSwap(l); }
|
||||
#define BigLong
|
||||
static inline int LittleLong (int l) { return LongSwap(l); }
|
||||
static ID_INLINE int LittleLong(int l) { return LongSwap(l); }
|
||||
#define BigFloat
|
||||
static inline float LittleFloat (const float l) { return FloatSwap(&l); }
|
||||
static ID_INLINE float LittleFloat(const float l) { return FloatSwap(&l); }
|
||||
|
||||
#endif
|
||||
|
||||
//======================= LINUX DEFINES =================================
|
||||
//================================================================= LINUX ===
|
||||
|
||||
// the mac compiler can't handle >32k of locals, so we
|
||||
// just waste space and make big arrays static...
|
||||
|
@ -183,64 +198,65 @@ static inline float LittleFloat (const float l) { return FloatSwap(&l); }
|
|||
// bk001205 - from Makefile
|
||||
#define stricmp strcasecmp
|
||||
|
||||
#define ID_INLINE inline
|
||||
#define ID_INLINE inline
|
||||
|
||||
#ifdef __i386__
|
||||
#define CPUSTRING "linux-i386"
|
||||
#define CPUSTRING "linux-i386"
|
||||
#elif defined __axp__
|
||||
#define CPUSTRING "linux-alpha"
|
||||
#define CPUSTRING "linux-alpha"
|
||||
#elif defined __x86_64__
|
||||
#define CPUSTRING "linux-x86_64"
|
||||
#define CPUSTRING "linux-x86_64"
|
||||
#elif defined __powerpc64__
|
||||
#define CPUSTRING "linux-ppc64"
|
||||
#define CPUSTRING "linux-ppc64"
|
||||
#elif defined __powerpc__
|
||||
#define CPUSTRING "linux-ppc"
|
||||
#define CPUSTRING "linux-ppc"
|
||||
#elif defined __s390__
|
||||
#define CPUSTRING "linux-s390"
|
||||
#define CPUSTRING "linux-s390"
|
||||
#elif defined __s390x__
|
||||
#define CPUSTRING "linux-s390x"
|
||||
#define CPUSTRING "linux-s390x"
|
||||
#elif defined __ia64__
|
||||
#define CPUSTRING "linux-ia64"
|
||||
#define CPUSTRING "linux-ia64"
|
||||
#else
|
||||
#define CPUSTRING "linux-other"
|
||||
#define CPUSTRING "linux-other"
|
||||
#endif
|
||||
|
||||
#define PATH_SEP '/'
|
||||
#define PATH_SEP '/'
|
||||
|
||||
#if __FLOAT_WORD_ORDER == __LITTLE_ENDIAN
|
||||
inline static short BigShort( short l) { return ShortSwap(l); }
|
||||
ID_INLINE static short BigShort( short l) { return ShortSwap(l); }
|
||||
#define LittleShort
|
||||
inline static int BigLong(int l) { return LongSwap(l); }
|
||||
ID_INLINE static int BigLong(int l) { return LongSwap(l); }
|
||||
#define LittleLong
|
||||
inline static float BigFloat(const float l) { return FloatSwap(&l); }
|
||||
ID_INLINE static float BigFloat(const float l) { return FloatSwap(&l); }
|
||||
#define LittleFloat
|
||||
#else
|
||||
#define BigShort
|
||||
inline static short LittleShort(short l) { return ShortSwap(l); }
|
||||
ID_INLINE static short LittleShort(short l) { return ShortSwap(l); }
|
||||
#define BigLong
|
||||
inline static int LittleLong (int l) { return LongSwap(l); }
|
||||
ID_INLINE static int LittleLong(int l) { return LongSwap(l); }
|
||||
#define BigFloat
|
||||
inline static float LittleFloat (const float l) { return FloatSwap(&l); }
|
||||
ID_INLINE static float LittleFloat(const float l) { return FloatSwap(&l); }
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
//======================= FreeBSD DEFINES =====================
|
||||
//=============================================================== FreeBSD ===
|
||||
|
||||
#ifdef __FreeBSD__ // rb010123
|
||||
|
||||
#define stricmp strcasecmp
|
||||
|
||||
#define ID_INLINE inline
|
||||
#define ID_INLINE inline
|
||||
|
||||
#ifdef __i386__
|
||||
#define CPUSTRING "freebsd-i386"
|
||||
#define CPUSTRING "freebsd-i386"
|
||||
#elif defined __axp__
|
||||
#define CPUSTRING "freebsd-alpha"
|
||||
#define CPUSTRING "freebsd-alpha"
|
||||
#else
|
||||
#define CPUSTRING "freebsd-other"
|
||||
#define CPUSTRING "freebsd-other"
|
||||
#endif
|
||||
|
||||
#define PATH_SEP '/'
|
||||
#define PATH_SEP '/'
|
||||
|
||||
#if !idppc
|
||||
static short BigShort( short l) { return ShortSwap(l); }
|
||||
|
@ -253,14 +269,14 @@ static float BigFloat(const float l) { return FloatSwap(&l); }
|
|||
#define BigShort
|
||||
static short LittleShort(short l) { return ShortSwap(l); }
|
||||
#define BigLong
|
||||
static int LittleLong (int l) { return LongSwap(l); }
|
||||
static int LittleLong(int l) { return LongSwap(l); }
|
||||
#define BigFloat
|
||||
static float LittleFloat (const float l) { return FloatSwap(&l); }
|
||||
static float LittleFloat(const float l) { return FloatSwap(&l); }
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
//======================= SUNOS DEFINES =================================
|
||||
//================================================================= SUNOS ===
|
||||
|
||||
#ifdef __sun
|
||||
|
||||
|
@ -270,30 +286,30 @@ static float LittleFloat (const float l) { return FloatSwap(&l); }
|
|||
// bk001205 - from Makefile
|
||||
#define stricmp strcasecmp
|
||||
|
||||
#define ID_INLINE inline
|
||||
#define ID_INLINE inline
|
||||
|
||||
#ifdef __i386__
|
||||
#define CPUSTRING "Solaris-i386"
|
||||
#define CPUSTRING "Solaris-i386"
|
||||
#elif defined __sparc
|
||||
#define CPUSTRING "Solaris-sparc"
|
||||
#define CPUSTRING "Solaris-sparc"
|
||||
#endif
|
||||
|
||||
#define PATH_SEP '/'
|
||||
#define PATH_SEP '/'
|
||||
|
||||
#if defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN)
|
||||
#define BigShort
|
||||
inline static short LittleShort(short l) { return ShortSwap(l); }
|
||||
ID_INLINE static short LittleShort(short l) { return ShortSwap(l); }
|
||||
#define BigLong
|
||||
inline static int LittleLong (int l) { return LongSwap(l); }
|
||||
ID_INLINE static int LittleLong(int l) { return LongSwap(l); }
|
||||
#define BigFloat
|
||||
inline static float LittleFloat (const float l) { return FloatSwap(&l); }
|
||||
ID_INLINE static float LittleFloat(const float l) { return FloatSwap(&l); }
|
||||
|
||||
#elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN)
|
||||
inline static short BigShort( short l) { return ShortSwap(l); }
|
||||
ID_INLINE static short BigShort( short l) { return ShortSwap(l); }
|
||||
#define LittleShort
|
||||
inline static int BigLong(int l) { return LongSwap(l); }
|
||||
ID_INLINE static int BigLong(int l) { return LongSwap(l); }
|
||||
#define LittleLong
|
||||
inline static float BigFloat(const float l) { return FloatSwap(&l); }
|
||||
ID_INLINE static float BigFloat(const float l) { return FloatSwap(&l); }
|
||||
#define LittleFloat
|
||||
|
||||
#else
|
||||
|
@ -302,7 +318,26 @@ inline static float BigFloat(const float l) { return FloatSwap(&l); }
|
|||
|
||||
#endif
|
||||
|
||||
#ifndef Q3_VM
|
||||
//================================================================== Q3VM ===
|
||||
|
||||
#ifdef Q3_VM
|
||||
|
||||
#define ID_INLINE
|
||||
|
||||
#define CPUSTRING "q3vm"
|
||||
|
||||
#define PATH_SEP '/'
|
||||
|
||||
#define LittleShort
|
||||
#define LittleLong
|
||||
#define LittleFloat
|
||||
#define BigShort
|
||||
#define BigLong
|
||||
#define BigFloat
|
||||
|
||||
#endif
|
||||
|
||||
//===========================================================================
|
||||
|
||||
//catch missing defines in above blocks
|
||||
#ifndef CPUSTRING
|
||||
|
|
|
@ -236,13 +236,8 @@ void Snd_Memset (void* dest, const int val, const size_t count);
|
|||
#define Snd_Memset Com_Memset
|
||||
#endif
|
||||
|
||||
#if !( defined __VECTORC )
|
||||
void Com_Memset (void* dest, const int val, const size_t count);
|
||||
void Com_Memcpy (void* dest, const void* src, const size_t count);
|
||||
#else
|
||||
#define Com_Memset memset
|
||||
#define Com_Memcpy memcpy
|
||||
#endif
|
||||
|
||||
#define CIN_system 1
|
||||
#define CIN_loop 2
|
||||
|
@ -346,7 +341,7 @@ extern vec3_t axisDefault[3];
|
|||
|
||||
#if idppc
|
||||
|
||||
static inline float Q_rsqrt( float number ) {
|
||||
static ID_INLINE float Q_rsqrt( float number ) {
|
||||
float x = 0.5f * number;
|
||||
float y;
|
||||
#ifdef __GNUC__
|
||||
|
@ -358,7 +353,7 @@ static inline float Q_rsqrt( float number ) {
|
|||
}
|
||||
|
||||
#ifdef __GNUC__
|
||||
static inline float Q_fabs(float x) {
|
||||
static ID_INLINE float Q_fabs(float x) {
|
||||
float abs_x;
|
||||
|
||||
asm("fabs %0,%1" : "=f" (abs_x) : "f" (x));
|
||||
|
@ -410,7 +405,6 @@ typedef struct {
|
|||
float v[3];
|
||||
} vec3struct_t;
|
||||
#define VectorCopy(a,b) (*(vec3struct_t *)b=*(vec3struct_t *)a)
|
||||
#define ID_INLINE static
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -437,7 +431,7 @@ float RadiusFromBounds( const vec3_t mins, const vec3_t maxs );
|
|||
void ClearBounds( vec3_t mins, vec3_t maxs );
|
||||
void AddPointToBounds( const vec3_t v, vec3_t mins, vec3_t maxs );
|
||||
|
||||
#ifndef Q3_VM
|
||||
#if !defined( Q3_VM ) || ( defined( Q3_VM ) && defined( __Q3_VM_MATH ) )
|
||||
static ID_INLINE int VectorCompare( const vec3_t v1, const vec3_t v2 ) {
|
||||
if (v1[0] != v2[0] || v1[1] != v2[1] || v1[2] != v2[2]) {
|
||||
return 0;
|
||||
|
|
|
@ -333,7 +333,7 @@ void *VM_ArgPtr( long intValue );
|
|||
void *VM_ExplicitArgPtr( vm_t *vm, long intValue );
|
||||
|
||||
#define VMA(x) VM_ArgPtr(args[x])
|
||||
static __inline float _vmf(long x)
|
||||
static ID_INLINE float _vmf(long x)
|
||||
{
|
||||
union {
|
||||
long l;
|
||||
|
|
|
@ -330,7 +330,7 @@ Dlls will call this directly
|
|||
============
|
||||
*/
|
||||
long QDECL VM_DllSyscall( long arg, ... ) {
|
||||
#if ((defined __GNUC__) && !(defined __i386__))
|
||||
#if !id386
|
||||
// rcg010206 - see commentary above
|
||||
long args[16];
|
||||
int i;
|
||||
|
@ -738,7 +738,7 @@ long QDECL VM_Call( vm_t *vm, long callnum, ... ) {
|
|||
args[4], args[5], args[6], args[7],
|
||||
args[8], args[9]);
|
||||
} else {
|
||||
#ifdef __i386__ // i386 calling convention doesn't need conversion
|
||||
#if id386 // i386 calling convention doesn't need conversion
|
||||
#ifndef NO_VM_COMPILED
|
||||
if ( vm->compiled )
|
||||
r = VM_CallCompiled( vm, (int*)&callnum );
|
||||
|
|
|
@ -114,7 +114,7 @@ static char *opnames[256] = {
|
|||
|
||||
#if idppc
|
||||
#if defined(__GNUC__)
|
||||
static inline unsigned int loadWord(void *addr) {
|
||||
static ID_INLINE unsigned int loadWord(void *addr) {
|
||||
unsigned int word;
|
||||
|
||||
asm("lwbrx %0,0,%1" : "=r" (word) : "r" (addr));
|
||||
|
@ -124,7 +124,7 @@ static char *opnames[256] = {
|
|||
#define loadWord(addr) __lwbrx(addr,0)
|
||||
#endif
|
||||
#else
|
||||
static inline int loadWord(void *addr) {
|
||||
static ID_INLINE int loadWord(void *addr) {
|
||||
int word;
|
||||
memcpy(&word, addr, 4);
|
||||
return LittleLong(word);
|
||||
|
|
|
@ -34,7 +34,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
typedef unsigned int glIndex_t;
|
||||
|
||||
// fast float to int conversion
|
||||
#if id386 && !( (defined __GNUC__ ) && (defined __i386__ ) ) // rb010123
|
||||
#if id386 && !defined(__GNUC__)
|
||||
long myftol( float f );
|
||||
#else
|
||||
#define myftol(x) ((int)(x))
|
||||
|
|
|
@ -1004,7 +1004,7 @@ DRAWSURF SORTING
|
|||
R_Radix
|
||||
===============
|
||||
*/
|
||||
static __inline void R_Radix( int byte, int size, drawSurf_t *source, drawSurf_t *dest )
|
||||
static ID_INLINE void R_Radix( int byte, int size, drawSurf_t *source, drawSurf_t *dest )
|
||||
{
|
||||
int count[ 256 ] = { 0 };
|
||||
int index[ 256 ];
|
||||
|
|
|
@ -1022,7 +1022,7 @@ void RB_CalcRotateTexCoords( float degsPerSecond, float *st )
|
|||
|
||||
|
||||
|
||||
#if id386 && !( (defined __GNUC__ ) && (defined __i386__ ) ) // rb010123
|
||||
#if id386 && !defined(__GNUC__)
|
||||
|
||||
long myftol( float f ) {
|
||||
static int tmp;
|
||||
|
|
|
@ -506,7 +506,7 @@ DO_DEBUG_CC=$(CC) $(DEBUG_CFLAGS) -o $@ -c $<
|
|||
DO_SHLIB_CC=$(CC) $(CFLAGS) $(SHLIBCFLAGS) -o $@ -c $<
|
||||
DO_SHLIB_DEBUG_CC=$(CC) $(DEBUG_CFLAGS) $(SHLIBCFLAGS) -o $@ -c $<
|
||||
DO_AS=$(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $<
|
||||
DO_DED_CC=$(CC) -DDEDICATED -DC_ONLY $(CFLAGS) -o $@ -c $<
|
||||
DO_DED_CC=$(CC) -DDEDICATED $(CFLAGS) -o $@ -c $<
|
||||
DO_WINDRES=$(WINDRES) -i $< -o $@
|
||||
|
||||
#############################################################################
|
||||
|
@ -1111,7 +1111,8 @@ Q3DOBJ = \
|
|||
$(B)/ded/null_snddma.o
|
||||
|
||||
ifeq ($(ARCH),i386)
|
||||
Q3DOBJ += $(B)/ded/vm_x86.o $(B)/ded/ftola.o $(B)/ded/snapvectora.o
|
||||
Q3DOBJ += $(B)/ded/vm_x86.o $(B)/ded/ftola.o \
|
||||
$(B)/ded/snapvectora.o $(B)/ded/matha.o
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH),x86_64)
|
||||
|
@ -1196,6 +1197,7 @@ $(B)/ded/vm_interpreted.o : $(CMDIR)/vm_interpreted.c; $(DO_DED_CC)
|
|||
|
||||
$(B)/ded/ftola.o : $(UDIR)/ftola.s; $(DO_AS)
|
||||
$(B)/ded/snapvectora.o : $(UDIR)/snapvectora.s; $(DO_AS)
|
||||
$(B)/ded/matha.o : $(UDIR)/matha.s; $(DO_AS)
|
||||
|
||||
$(B)/ded/vm_x86.o : $(CMDIR)/vm_x86.c; $(DO_DED_CC)
|
||||
$(B)/ded/vm_x86_64.o : $(CMDIR)/vm_x86_64.c; $(DO_DED_CC)
|
||||
|
|
|
@ -27,7 +27,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
// 23/09/05 Ported to gas by intel2gas, best supporting actor Tim Angus
|
||||
// <tim@ngus.net>
|
||||
|
||||
#define GLQUAKE 1 // don't include unneeded defs
|
||||
#include "qasm.h"
|
||||
|
||||
#ifdef id386
|
||||
|
|
|
@ -23,7 +23,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
// math.s
|
||||
// x86 assembly-language math routines.
|
||||
|
||||
#define GLQUAKE 1 // don't include unneeded defs
|
||||
#include "qasm.h"
|
||||
|
||||
|
||||
|
|
253
code/unix/qasm.h
253
code/unix/qasm.h
|
@ -22,6 +22,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#ifndef __ASM_I386__
|
||||
#define __ASM_I386__
|
||||
|
||||
#include "../qcommon/q_platform.h"
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#undef ELF
|
||||
#endif
|
||||
|
@ -32,251 +34,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#define C(label) _##label
|
||||
#endif
|
||||
|
||||
|
||||
//#define GLQUAKE 1
|
||||
|
||||
#if defined(_WIN32) && !defined(WINDED)
|
||||
|
||||
#if defined(_M_IX86)
|
||||
#define __i386__ 1
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __i386__
|
||||
#define id386 1
|
||||
#else
|
||||
#define id386 0
|
||||
#endif
|
||||
|
||||
// !!! must be kept the same as in d_iface.h !!!
|
||||
#define TRANSPARENT_COLOR 255
|
||||
|
||||
#ifndef GLQUAKE
|
||||
.extern C(d_zistepu)
|
||||
.extern C(d_pzbuffer)
|
||||
.extern C(d_zistepv)
|
||||
.extern C(d_zrowbytes)
|
||||
.extern C(d_ziorigin)
|
||||
.extern C(r_turb_s)
|
||||
.extern C(r_turb_t)
|
||||
.extern C(r_turb_pdest)
|
||||
.extern C(r_turb_spancount)
|
||||
.extern C(r_turb_turb)
|
||||
.extern C(r_turb_pbase)
|
||||
.extern C(r_turb_sstep)
|
||||
.extern C(r_turb_tstep)
|
||||
.extern C(r_bmodelactive)
|
||||
.extern C(d_sdivzstepu)
|
||||
.extern C(d_tdivzstepu)
|
||||
.extern C(d_sdivzstepv)
|
||||
.extern C(d_tdivzstepv)
|
||||
.extern C(d_sdivzorigin)
|
||||
.extern C(d_tdivzorigin)
|
||||
.extern C(sadjust)
|
||||
.extern C(tadjust)
|
||||
.extern C(bbextents)
|
||||
.extern C(bbextentt)
|
||||
.extern C(cacheblock)
|
||||
.extern C(d_viewbuffer)
|
||||
.extern C(cachewidth)
|
||||
.extern C(d_pzbuffer)
|
||||
.extern C(d_zrowbytes)
|
||||
.extern C(d_zwidth)
|
||||
.extern C(d_scantable)
|
||||
.extern C(r_lightptr)
|
||||
.extern C(r_numvblocks)
|
||||
.extern C(prowdestbase)
|
||||
.extern C(pbasesource)
|
||||
.extern C(r_lightwidth)
|
||||
.extern C(lightright)
|
||||
.extern C(lightrightstep)
|
||||
.extern C(lightdeltastep)
|
||||
.extern C(lightdelta)
|
||||
.extern C(lightright)
|
||||
.extern C(lightdelta)
|
||||
.extern C(sourcetstep)
|
||||
.extern C(surfrowbytes)
|
||||
.extern C(lightrightstep)
|
||||
.extern C(lightdeltastep)
|
||||
.extern C(r_sourcemax)
|
||||
.extern C(r_stepback)
|
||||
.extern C(colormap)
|
||||
.extern C(blocksize)
|
||||
.extern C(sourcesstep)
|
||||
.extern C(lightleft)
|
||||
.extern C(blockdivshift)
|
||||
.extern C(blockdivmask)
|
||||
.extern C(lightleftstep)
|
||||
.extern C(r_origin)
|
||||
.extern C(r_ppn)
|
||||
.extern C(r_pup)
|
||||
.extern C(r_pright)
|
||||
.extern C(ycenter)
|
||||
.extern C(xcenter)
|
||||
.extern C(d_vrectbottom_particle)
|
||||
.extern C(d_vrectright_particle)
|
||||
.extern C(d_vrecty)
|
||||
.extern C(d_vrectx)
|
||||
.extern C(d_pix_shift)
|
||||
.extern C(d_pix_min)
|
||||
.extern C(d_pix_max)
|
||||
.extern C(d_y_aspect_shift)
|
||||
.extern C(screenwidth)
|
||||
.extern C(r_leftclipped)
|
||||
.extern C(r_leftenter)
|
||||
.extern C(r_rightclipped)
|
||||
.extern C(r_rightenter)
|
||||
.extern C(modelorg)
|
||||
.extern C(xscale)
|
||||
.extern C(r_refdef)
|
||||
.extern C(yscale)
|
||||
.extern C(r_leftexit)
|
||||
.extern C(r_rightexit)
|
||||
.extern C(r_lastvertvalid)
|
||||
.extern C(cacheoffset)
|
||||
.extern C(newedges)
|
||||
.extern C(removeedges)
|
||||
.extern C(r_pedge)
|
||||
.extern C(r_framecount)
|
||||
.extern C(r_u1)
|
||||
.extern C(r_emitted)
|
||||
.extern C(edge_p)
|
||||
.extern C(surface_p)
|
||||
.extern C(surfaces)
|
||||
.extern C(r_lzi1)
|
||||
.extern C(r_v1)
|
||||
.extern C(r_ceilv1)
|
||||
.extern C(r_nearzi)
|
||||
.extern C(r_nearzionly)
|
||||
.extern C(edge_aftertail)
|
||||
.extern C(edge_tail)
|
||||
.extern C(current_iv)
|
||||
.extern C(edge_head_u_shift20)
|
||||
.extern C(span_p)
|
||||
.extern C(edge_head)
|
||||
.extern C(fv)
|
||||
.extern C(edge_tail_u_shift20)
|
||||
.extern C(r_apverts)
|
||||
.extern C(r_anumverts)
|
||||
.extern C(aliastransform)
|
||||
.extern C(r_avertexnormals)
|
||||
.extern C(r_plightvec)
|
||||
.extern C(r_ambientlight)
|
||||
.extern C(r_shadelight)
|
||||
.extern C(aliasxcenter)
|
||||
.extern C(aliasycenter)
|
||||
.extern C(a_sstepxfrac)
|
||||
.extern C(r_affinetridesc)
|
||||
.extern C(acolormap)
|
||||
.extern C(d_pcolormap)
|
||||
.extern C(r_affinetridesc)
|
||||
.extern C(d_sfrac)
|
||||
.extern C(d_ptex)
|
||||
.extern C(d_pedgespanpackage)
|
||||
.extern C(d_tfrac)
|
||||
.extern C(d_light)
|
||||
.extern C(d_zi)
|
||||
.extern C(d_pdest)
|
||||
.extern C(d_pz)
|
||||
.extern C(d_aspancount)
|
||||
.extern C(erroradjustup)
|
||||
.extern C(errorterm)
|
||||
.extern C(d_xdenom)
|
||||
.extern C(r_p0)
|
||||
.extern C(r_p1)
|
||||
.extern C(r_p2)
|
||||
.extern C(a_tstepxfrac)
|
||||
.extern C(r_sstepx)
|
||||
.extern C(r_tstepx)
|
||||
.extern C(a_ststepxwhole)
|
||||
.extern C(zspantable)
|
||||
.extern C(skintable)
|
||||
.extern C(r_zistepx)
|
||||
.extern C(erroradjustdown)
|
||||
.extern C(d_countextrastep)
|
||||
.extern C(ubasestep)
|
||||
.extern C(a_ststepxwhole)
|
||||
.extern C(a_tstepxfrac)
|
||||
.extern C(r_lstepx)
|
||||
.extern C(a_spans)
|
||||
.extern C(erroradjustdown)
|
||||
.extern C(d_pdestextrastep)
|
||||
.extern C(d_pzextrastep)
|
||||
.extern C(d_sfracextrastep)
|
||||
.extern C(d_ptexextrastep)
|
||||
.extern C(d_countextrastep)
|
||||
.extern C(d_tfracextrastep)
|
||||
.extern C(d_lightextrastep)
|
||||
.extern C(d_ziextrastep)
|
||||
.extern C(d_pdestbasestep)
|
||||
.extern C(d_pzbasestep)
|
||||
.extern C(d_sfracbasestep)
|
||||
.extern C(d_ptexbasestep)
|
||||
.extern C(ubasestep)
|
||||
.extern C(d_tfracbasestep)
|
||||
.extern C(d_lightbasestep)
|
||||
.extern C(d_zibasestep)
|
||||
.extern C(zspantable)
|
||||
.extern C(r_lstepy)
|
||||
.extern C(r_sstepy)
|
||||
.extern C(r_tstepy)
|
||||
.extern C(r_zistepy)
|
||||
.extern C(D_PolysetSetEdgeTable)
|
||||
.extern C(D_RasterizeAliasPolySmooth)
|
||||
|
||||
.extern float_point5
|
||||
.extern Float2ToThe31nd
|
||||
.extern izistep
|
||||
.extern izi
|
||||
.extern FloatMinus2ToThe31nd
|
||||
.extern float_1
|
||||
.extern float_particle_z_clip
|
||||
.extern float_minus_1
|
||||
.extern float_0
|
||||
.extern fp_16
|
||||
.extern fp_64k
|
||||
.extern fp_1m
|
||||
.extern fp_1m_minus_1
|
||||
.extern fp_8
|
||||
.extern entryvec_table
|
||||
.extern advancetable
|
||||
.extern sstep
|
||||
.extern tstep
|
||||
.extern pspantemp
|
||||
.extern counttemp
|
||||
.extern jumptemp
|
||||
.extern reciprocal_table
|
||||
.extern DP_Count
|
||||
.extern DP_u
|
||||
.extern DP_v
|
||||
.extern DP_32768
|
||||
.extern DP_Color
|
||||
.extern DP_Pix
|
||||
.extern DP_EntryTable
|
||||
.extern pbase
|
||||
.extern s
|
||||
.extern t
|
||||
.extern sfracf
|
||||
.extern tfracf
|
||||
.extern snext
|
||||
.extern tnext
|
||||
.extern spancountminus1
|
||||
.extern zi16stepu
|
||||
.extern sdivz16stepu
|
||||
.extern tdivz16stepu
|
||||
.extern zi8stepu
|
||||
.extern sdivz8stepu
|
||||
.extern tdivz8stepu
|
||||
.extern reciprocal_table_16
|
||||
.extern entryvec_table_16
|
||||
.extern ceil_cw
|
||||
.extern single_cw
|
||||
.extern fp_64kx64k
|
||||
.extern pz
|
||||
.extern spr8entryvec_table
|
||||
#endif
|
||||
|
||||
.extern C(snd_scaletable)
|
||||
.extern C(paintbuffer)
|
||||
.extern C(snd_linear_count)
|
||||
|
@ -360,12 +117,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
// times !!!
|
||||
//
|
||||
|
||||
// !!! if this is changed, it must be changed in r_local.h too !!!
|
||||
#define NEAR_CLIP 0.01
|
||||
|
||||
// !!! if this is changed, it must be changed in r_local.h too !!!
|
||||
#define CYCLE 128
|
||||
|
||||
// espan_t structure
|
||||
// !!! if this is changed, it must be changed in r_shared.h too !!!
|
||||
#define espan_t_u 0
|
||||
|
|
|
@ -35,7 +35,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
// 23/09/05 Ported to gas by intel2gas, best supporting actor Tim Angus
|
||||
// <tim@ngus.net>
|
||||
|
||||
#define GLQUAKE 1 // don't include unneeded defs
|
||||
#include "qasm.h"
|
||||
|
||||
#ifdef id386
|
||||
|
|
|
@ -139,7 +139,7 @@ int Sys_XTimeToSysTime (unsigned long xtime)
|
|||
#endif
|
||||
|
||||
//#if 0 // bk001215 - see snapvector.nasm for replacement
|
||||
#if !(defined __i386__) // rcg010206 - using this for PPC builds...
|
||||
#if !id386 // rcg010206 - using this for PPC builds...
|
||||
long fastftol( float f ) { // bk001213 - from win32/win_shared.c
|
||||
//static int tmp;
|
||||
// __asm fld f
|
||||
|
|
|
@ -105,7 +105,6 @@ static void CPUID( int func, unsigned regs[4] )
|
|||
{
|
||||
unsigned regEAX, regEBX, regECX, regEDX;
|
||||
|
||||
#ifndef __VECTORC
|
||||
__asm mov eax, func
|
||||
__asm __emit 00fh
|
||||
__asm __emit 0a2h
|
||||
|
@ -118,12 +117,6 @@ static void CPUID( int func, unsigned regs[4] )
|
|||
regs[1] = regEBX;
|
||||
regs[2] = regECX;
|
||||
regs[3] = regEDX;
|
||||
#else
|
||||
regs[0] = 0;
|
||||
regs[1] = 0;
|
||||
regs[2] = 0;
|
||||
regs[3] = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static int IsPentium( void )
|
||||
|
|
Loading…
Reference in a new issue