* Disable ccache by default. If you want it, add USE_CCACHE=1 to Makefile.local

* Remove -gfull from linux section in Makefile -- it's darwin only
* Cast away some warnings that surfaced from using "new" AL headers
* Various whitespace and consistency fixes
This commit is contained in:
Tim Angus 2005-11-26 15:01:28 +00:00
parent 877f360812
commit 382c6adb54
11 changed files with 125 additions and 170 deletions

View file

@ -467,15 +467,14 @@ static void S_PaintChannelFrom16_scalar( channel_t *ch, const sfx_t *sc, int cou
} }
static void S_PaintChannelFrom16( channel_t *ch, const sfx_t *sc, int count, int sampleOffset, int bufferOffset ) { static void S_PaintChannelFrom16( channel_t *ch, const sfx_t *sc, int count, int sampleOffset, int bufferOffset ) {
#if idppc_altivec #if idppc_altivec
extern cvar_t *com_altivec; if (com_altivec->integer) {
if (com_altivec->integer) { // must be in a seperate function or G3 systems will crash.
// must be in a seperate function or G3 systems will crash. S_PaintChannelFrom16_altivec( ch, sc, count, sampleOffset, bufferOffset );
S_PaintChannelFrom16_altivec( ch, sc, count, sampleOffset, bufferOffset ); return;
return; }
} #endif
#endif S_PaintChannelFrom16_scalar( ch, sc, count, sampleOffset, bufferOffset );
S_PaintChannelFrom16_scalar( ch, sc, count, sampleOffset, bufferOffset );
} }
void S_PaintChannelFromWavelet( channel_t *ch, sfx_t *sc, int count, int sampleOffset, int bufferOffset ) { void S_PaintChannelFromWavelet( channel_t *ch, sfx_t *sc, int count, int sampleOffset, int bufferOffset ) {

View file

@ -847,8 +847,8 @@ static void S_AL_SrcLoop( alSrcPriority_t priority, sfxHandle_t sfx,
// Set up the position and velocity // Set up the position and velocity
VectorScale(entityList[entnum].origin, POSITION_SCALE, sorigin); VectorScale(entityList[entnum].origin, POSITION_SCALE, sorigin);
qalSourcefv(srcList[src].source, AL_POSITION, sorigin); qalSourcefv(srcList[src].source, AL_POSITION, (ALfloat *)sorigin);
qalSourcefv(srcList[src].source, AL_VELOCITY, velocity); qalSourcefv(srcList[src].source, AL_VELOCITY, (ALfloat *)velocity);
// Flag it // Flag it
entityList[entnum].touched = qtrue; entityList[entnum].touched = qtrue;
@ -1067,7 +1067,7 @@ void S_AL_RawSamples(int samples, int rate, int width, int channels, const byte
// Create a buffer, and stuff the data into it // Create a buffer, and stuff the data into it
qalGenBuffers(1, &buffer); qalGenBuffers(1, &buffer);
qalBufferData(buffer, format, data, (samples * width * channels), rate); qalBufferData(buffer, format, (ALvoid *)data, (samples * width * channels), rate);
// Shove the data onto the streamSource // Shove the data onto the streamSource
qalSourceQueueBuffers(streamSource, 1, &buffer); qalSourceQueueBuffers(streamSource, 1, &buffer);
@ -1384,7 +1384,7 @@ void S_AL_Respatialize( int entityNum, const vec3_t origin, vec3_t axis[3], int
// Set OpenAL listener paramaters // Set OpenAL listener paramaters
VectorScale(origin, POSITION_SCALE, sorigin); VectorScale(origin, POSITION_SCALE, sorigin);
qalListenerfv(AL_POSITION, origin); qalListenerfv(AL_POSITION, (ALfloat *)origin);
qalListenerfv(AL_VELOCITY, velocity); qalListenerfv(AL_VELOCITY, velocity);
qalListenerfv(AL_ORIENTATION, orientation); qalListenerfv(AL_ORIENTATION, orientation);
} }

View file

@ -39,10 +39,17 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#endif #endif
#if (defined(powerc) || defined(powerpc) || defined(ppc) || \ #if (defined(powerc) || defined(powerpc) || defined(ppc) || \
defined(__ppc) || defined(__ppc__)) && !defined(C_ONLY) defined(__ppc) || defined(__ppc__)) && !defined(C_ONLY)
#define idppc 1 #define idppc 1
#if defined(__VEC__) #if defined(__VEC__)
#define idppc_altivec 1 #define idppc_altivec 1
#ifdef MACOS_X // Apple's GCC does this differently than the FSF.
#define VECCONST_UINT8(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) \
(vector unsigned char) (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p)
#else
#define VECCONST_UINT8(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) \
(vector unsigned char) {a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p}
#endif
#else #else
#define idppc_altivec 0 #define idppc_altivec 0
#endif #endif
@ -51,12 +58,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define idppc_altivec 0 #define idppc_altivec 0
#endif #endif
#if (MACOS_X) // Apple's GCC does this differently than the FSF.
#define VECCONST_UINT8(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) (vector unsigned char) (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p)
#else
#define VECCONST_UINT8(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) (vector unsigned char) {a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p}
#endif
#endif #endif
#ifndef __ASM_I386__ // don't include the C bits if included from qasm.h #ifndef __ASM_I386__ // don't include the C bits if included from qasm.h

View file

@ -748,6 +748,7 @@ extern cvar_t *com_blood;
extern cvar_t *com_buildScript; // for building release pak files extern cvar_t *com_buildScript; // for building release pak files
extern cvar_t *com_journal; extern cvar_t *com_journal;
extern cvar_t *com_cameraMode; extern cvar_t *com_cameraMode;
extern cvar_t *com_altivec;
// both client and server must agree to pause // both client and server must agree to pause
extern cvar_t *cl_paused; extern cvar_t *cl_paused;

View file

@ -463,11 +463,6 @@ static void ProjectDlightTexture_altivec( void ) {
floatColorVec0 = vec_perm(floatColorVec0,floatColorVec0,floatColorVecPerm); floatColorVec0 = vec_perm(floatColorVec0,floatColorVec0,floatColorVecPerm);
for ( i = 0 ; i < tess.numVertexes ; i++, texCoords += 2, colors += 4 ) { for ( i = 0 ; i < tess.numVertexes ; i++, texCoords += 2, colors += 4 ) {
int clip = 0; int clip = 0;
#define DIST0 dist0
#define DIST1 dist1
#define DIST2 dist2
#define TEXCOORDS0 texCoords0
#define TEXCOORDS1 texCoords1
vec_t dist0, dist1, dist2; vec_t dist0, dist1, dist2;
dist0 = origin0 - tess.xyz[i][0]; dist0 = origin0 - tess.xyz[i][0];
@ -476,42 +471,42 @@ static void ProjectDlightTexture_altivec( void ) {
backEnd.pc.c_dlightVertexes++; backEnd.pc.c_dlightVertexes++;
TEXCOORDS0 = 0.5f + DIST0 * scale; texCoords0 = 0.5f + dist0 * scale;
TEXCOORDS1 = 0.5f + DIST1 * scale; texCoords1 = 0.5f + dist1 * scale;
if( !r_dlightBacks->integer && if( !r_dlightBacks->integer &&
// dist . tess.normal[i] // dist . tess.normal[i]
( DIST0 * tess.normal[i][0] + ( dist0 * tess.normal[i][0] +
DIST1 * tess.normal[i][1] + dist1 * tess.normal[i][1] +
DIST2 * tess.normal[i][2] ) < 0.0f ) { dist2 * tess.normal[i][2] ) < 0.0f ) {
clip = 63; clip = 63;
} else { } else {
if ( TEXCOORDS0 < 0.0f ) { if ( texCoords0 < 0.0f ) {
clip |= 1; clip |= 1;
} else if ( TEXCOORDS0 > 1.0f ) { } else if ( texCoords0 > 1.0f ) {
clip |= 2; clip |= 2;
} }
if ( TEXCOORDS1 < 0.0f ) { if ( texCoords1 < 0.0f ) {
clip |= 4; clip |= 4;
} else if ( TEXCOORDS1 > 1.0f ) { } else if ( texCoords1 > 1.0f ) {
clip |= 8; clip |= 8;
} }
texCoords[0] = TEXCOORDS0; texCoords[0] = texCoords0;
texCoords[1] = TEXCOORDS1; texCoords[1] = texCoords1;
// modulate the strength based on the height and color // modulate the strength based on the height and color
if ( DIST2 > radius ) { if ( dist2 > radius ) {
clip |= 16; clip |= 16;
modulate = 0.0f; modulate = 0.0f;
} else if ( DIST2 < -radius ) { } else if ( dist2 < -radius ) {
clip |= 32; clip |= 32;
modulate = 0.0f; modulate = 0.0f;
} else { } else {
DIST2 = Q_fabs(DIST2); dist2 = Q_fabs(dist2);
if ( DIST2 < radius * 0.5f ) { if ( dist2 < radius * 0.5f ) {
modulate = 1.0f; modulate = 1.0f;
} else { } else {
modulate = 2.0f * (radius - DIST2) * scale; modulate = 2.0f * (radius - dist2) * scale;
} }
} }
} }
@ -526,11 +521,6 @@ static void ProjectDlightTexture_altivec( void ) {
colorChar = vec_sel(colorChar,vSel,vSel); // RGBARGBARGBARGBA replace alpha with 255 colorChar = vec_sel(colorChar,vSel,vSel); // RGBARGBARGBARGBA replace alpha with 255
vec_ste((vector unsigned int)colorChar,0,(unsigned int *)colors); // store color vec_ste((vector unsigned int)colorChar,0,(unsigned int *)colors); // store color
} }
#undef DIST0
#undef DIST1
#undef DIST2
#undef TEXCOORDS0
#undef TEXCOORDS1
// build a list of triangles that need light // build a list of triangles that need light
numIndexes = 0; numIndexes = 0;
@ -614,53 +604,48 @@ static void ProjectDlightTexture_scalar( void ) {
floatColor[2] = dl->color[2] * 255.0f; floatColor[2] = dl->color[2] * 255.0f;
for ( i = 0 ; i < tess.numVertexes ; i++, texCoords += 2, colors += 4 ) { for ( i = 0 ; i < tess.numVertexes ; i++, texCoords += 2, colors += 4 ) {
int clip = 0; int clip = 0;
#define DIST0 dist[0]
#define DIST1 dist[1]
#define DIST2 dist[2]
#define TEXCOORDS0 texCoords[0]
#define TEXCOORDS1 texCoords[1]
vec3_t dist; vec3_t dist;
VectorSubtract( origin, tess.xyz[i], dist ); VectorSubtract( origin, tess.xyz[i], dist );
backEnd.pc.c_dlightVertexes++; backEnd.pc.c_dlightVertexes++;
TEXCOORDS0 = 0.5f + DIST0 * scale; texCoords[0] = 0.5f + dist[0] * scale;
TEXCOORDS1 = 0.5f + DIST1 * scale; texCoords[1] = 0.5f + dist[1] * scale;
if( !r_dlightBacks->integer && if( !r_dlightBacks->integer &&
// dist . tess.normal[i] // dist . tess.normal[i]
( DIST0 * tess.normal[i][0] + ( dist[0] * tess.normal[i][0] +
DIST1 * tess.normal[i][1] + dist[1] * tess.normal[i][1] +
DIST2 * tess.normal[i][2] ) < 0.0f ) { dist[2] * tess.normal[i][2] ) < 0.0f ) {
clip = 63; clip = 63;
} else { } else {
if ( TEXCOORDS0 < 0.0f ) { if ( texCoords[0] < 0.0f ) {
clip |= 1; clip |= 1;
} else if ( TEXCOORDS0 > 1.0f ) { } else if ( texCoords[0] > 1.0f ) {
clip |= 2; clip |= 2;
} }
if ( TEXCOORDS1 < 0.0f ) { if ( texCoords[1] < 0.0f ) {
clip |= 4; clip |= 4;
} else if ( TEXCOORDS1 > 1.0f ) { } else if ( texCoords[1] > 1.0f ) {
clip |= 8; clip |= 8;
} }
texCoords[0] = TEXCOORDS0; texCoords[0] = texCoords[0];
texCoords[1] = TEXCOORDS1; texCoords[1] = texCoords[1];
// modulate the strength based on the height and color // modulate the strength based on the height and color
if ( DIST2 > radius ) { if ( dist[2] > radius ) {
clip |= 16; clip |= 16;
modulate = 0.0f; modulate = 0.0f;
} else if ( DIST2 < -radius ) { } else if ( dist[2] < -radius ) {
clip |= 32; clip |= 32;
modulate = 0.0f; modulate = 0.0f;
} else { } else {
DIST2 = Q_fabs(DIST2); dist[2] = Q_fabs(dist[2]);
if ( DIST2 < radius * 0.5f ) { if ( dist[2] < radius * 0.5f ) {
modulate = 1.0f; modulate = 1.0f;
} else { } else {
modulate = 2.0f * (radius - DIST2) * scale; modulate = 2.0f * (radius - dist[2]) * scale;
} }
} }
} }
@ -670,11 +655,6 @@ static void ProjectDlightTexture_scalar( void ) {
colors[2] = myftol(floatColor[2] * modulate); colors[2] = myftol(floatColor[2] * modulate);
colors[3] = 255; colors[3] = 255;
} }
#undef DIST0
#undef DIST1
#undef DIST2
#undef TEXCOORDS0
#undef TEXCOORDS1
// build a list of triangles that need light // build a list of triangles that need light
numIndexes = 0; numIndexes = 0;
@ -719,15 +699,14 @@ static void ProjectDlightTexture_scalar( void ) {
} }
static void ProjectDlightTexture( void ) { static void ProjectDlightTexture( void ) {
#if idppc_altivec #if idppc_altivec
extern cvar_t *com_altivec; if (com_altivec->integer) {
if (com_altivec->integer) { // must be in a seperate function or G3 systems will crash.
// must be in a seperate function or G3 systems will crash. ProjectDlightTexture_altivec();
ProjectDlightTexture_altivec(); return;
return; }
} #endif
#endif ProjectDlightTexture_scalar();
ProjectDlightTexture_scalar();
} }

View file

@ -1219,14 +1219,13 @@ static void RB_CalcDiffuseColor_scalar( unsigned char *colors )
void RB_CalcDiffuseColor( unsigned char *colors ) void RB_CalcDiffuseColor( unsigned char *colors )
{ {
#if idppc_altivec #if idppc_altivec
extern cvar_t *com_altivec; if (com_altivec->integer) {
if (com_altivec->integer) { // must be in a seperate function or G3 systems will crash.
// must be in a seperate function or G3 systems will crash. RB_CalcDiffuseColor_altivec( colors );
RB_CalcDiffuseColor_altivec( colors ); return;
return; }
} #endif
#endif RB_CalcDiffuseColor_scalar( colors );
RB_CalcDiffuseColor_scalar( colors );
} }

View file

@ -838,28 +838,23 @@ static void LerpMeshVertexes_scalar(md3Surface_t *surf, float backlerp)
static void LerpMeshVertexes(md3Surface_t *surf, float backlerp) static void LerpMeshVertexes(md3Surface_t *surf, float backlerp)
{ {
#if idppc_altivec #if idppc_altivec
// !!! FIXME: figure out what's broken and remove this.
// !!! FIXME: figure out what's broken and remove this. #ifndef NDEBUG
#ifndef NDEBUG static int already_complained = 0;
static int already_complained = 0; if (!already_complained) {
if (!already_complained) already_complained = 1;
{ Com_Printf("WARNING! FIXME! Altivec mesh lerping broken in debug builds!\n");
already_complained = 1; }
Com_Printf("WARNING! FIXME! Altivec mesh lerping broken in debug builds!\n"); #else
} if (com_altivec->integer) {
#else // must be in a seperate function or G3 systems will crash.
extern cvar_t *com_altivec; LerpMeshVertexes_altivec( surf, backlerp );
if (com_altivec->integer) { return;
// must be in a seperate function or G3 systems will crash. }
LerpMeshVertexes_altivec( surf, backlerp ); #endif
return; #endif // idppc_altivec
} LerpMeshVertexes_scalar( surf, backlerp );
#endif
#endif // idppc_altivec
LerpMeshVertexes_scalar( surf, backlerp );
} }

View file

@ -22,17 +22,8 @@ RMDIR=rmdir
BUILDDIR=build BUILDDIR=build
BD=$(BUILDDIR)/ BD=$(BUILDDIR)/
ifeq ($(PLATFORM),darwin)
LCC_CFLAGS += -DMACOS_X=1
endif
ifndef USE_CCACHE
USE_CCACHE=0
endif
ifeq ($(USE_CCACHE),1) ifeq ($(USE_CCACHE),1)
CC := ccache $(CC) CC := ccache $(CC)
CXX := ccache $(CXX)
endif endif
ifeq ($(PLATFORM),SunOS) ifeq ($(PLATFORM),SunOS)

View file

@ -54,7 +54,7 @@ DXSDK_DIR=C:/DXSDK
endif endif
ifndef USE_CCACHE ifndef USE_CCACHE
USE_CCACHE=1 USE_CCACHE=0
endif endif
export USE_CCACHE export USE_CCACHE
@ -118,7 +118,6 @@ ifeq ($(PLATFORM),linux)
GLIBC=-glibc GLIBC=-glibc
CC=gcc CC=gcc
CXX=g++
ifeq ($(ARCH),alpha) ifeq ($(ARCH),alpha)
ARCH=axp ARCH=axp
@ -138,9 +137,6 @@ ifeq ($(PLATFORM),linux)
BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes -pipe BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes -pipe
# Always include debug symbols...you can strip the binary later...
BASE_CFLAGS += -gfull
ifeq ($(USE_OPENAL),1) ifeq ($(USE_OPENAL),1)
BASE_CFLAGS += -DUSE_OPENAL=1 BASE_CFLAGS += -DUSE_OPENAL=1
ifeq ($(USE_OPENAL_DLOPEN),1) ifeq ($(USE_OPENAL_DLOPEN),1)
@ -244,12 +240,11 @@ else # ifeq Linux
ifeq ($(PLATFORM),darwin) ifeq ($(PLATFORM),darwin)
GLIBC= GLIBC=
CC=gcc CC=gcc
CXX=g++
VM_PPC=vm_ppc_new VM_PPC=vm_ppc_new
BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes
BASE_CFLAGS += -DMACOS_X=1 -fno-common -pipe BASE_CFLAGS += -DMACOS_X -fno-common -pipe
# Always include debug symbols...you can strip the binary later... # Always include debug symbols...you can strip the binary later...
BASE_CFLAGS += -gfull BASE_CFLAGS += -gfull
@ -269,7 +264,7 @@ ifeq ($(PLATFORM),darwin)
OPTIMIZE = -O3 -ffast-math -fomit-frame-pointer -falign-loops=16 OPTIMIZE = -O3 -ffast-math -fomit-frame-pointer -falign-loops=16
ifeq ($(ARCH),ppc) ifeq ($(ARCH),ppc)
BASE_CFLAGS += -faltivec BASE_CFLAGS += -faltivec
ifneq ($(VM_PPC),) ifneq ($(VM_PPC),)
HAVE_VM_COMPILED=true HAVE_VM_COMPILED=true
endif endif
@ -300,7 +295,7 @@ ifeq ($(PLATFORM),darwin)
ifeq ($(USE_SDL),1) ifeq ($(USE_SDL),1)
# We copy sdlmain before ranlib'ing it so that subversion doesn't think # We copy sdlmain before ranlib'ing it so that subversion doesn't think
# the file has been modified by each build. # the file has been modified by each build.
LIBSDLMAIN=$(B)/libSDLmain.a LIBSDLMAIN=$(B)/libSDLmain.a
LIBSDLMAINSRC=../libs/macosx/libSDLmain.a LIBSDLMAINSRC=../libs/macosx/libSDLmain.a
CLIENT_LDFLAGS=-framework Cocoa -framework OpenGL ../libs/macosx/libSDL-1.2.0.dylib CLIENT_LDFLAGS=-framework Cocoa -framework OpenGL ../libs/macosx/libSDL-1.2.0.dylib
else else
@ -345,7 +340,6 @@ ifeq ($(PLATFORM),mingw32)
GLIBC=-mingw GLIBC=-mingw
CC=gcc CC=gcc
CXX=g++
WINDRES=windres WINDRES=windres
ifeq ($(ARCH),i386) ifeq ($(ARCH),i386)
@ -508,7 +502,6 @@ ifeq ($(PLATFORM),SunOS)
GLIBC= #libc is irrelevant GLIBC= #libc is irrelevant
CC=gcc CC=gcc
CXX=g++
INSTALL=ginstall INSTALL=ginstall
MKDIR=gmkdir MKDIR=gmkdir
COPYDIR="/usr/local/share/games/quake3" COPYDIR="/usr/local/share/games/quake3"
@ -636,7 +629,6 @@ endif #SunOS
ifeq ($(USE_CCACHE),1) ifeq ($(USE_CCACHE),1)
CC := ccache $(CC) CC := ccache $(CC)
CXX := ccache $(CXX)
endif endif
ifneq ($(BUILD_SERVER),1) ifneq ($(BUILD_SERVER),1)
@ -668,7 +660,6 @@ ifeq ($(GENERATE_DEPENDENCIES),1)
endif endif
DO_CC=$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) -o $@ -c $< DO_CC=$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) -o $@ -c $<
DO_CXX=$(CXX) $(NOTSHLIBCFLAGS) $(CFLAGS) -o $@ -c $<
DO_SMP_CC=$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) -DSMP -o $@ -c $< DO_SMP_CC=$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) -DSMP -o $@ -c $<
DO_BOT_CC=$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) -DBOTLIB -o $@ -c $< # $(SHLIBCFLAGS) # bk001212 DO_BOT_CC=$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) -DBOTLIB -o $@ -c $< # $(SHLIBCFLAGS) # bk001212
DO_DEBUG_CC=$(CC) $(NOTSHLIBCFLAGS) $(DEBUG_CFLAGS) -o $@ -c $< DO_DEBUG_CC=$(CC) $(NOTSHLIBCFLAGS) $(DEBUG_CFLAGS) -o $@ -c $<
@ -1007,11 +998,11 @@ ifeq ($(PLATFORM),darwin)
$(B)/client/sdl_snd.o \ $(B)/client/sdl_snd.o \
ifeq ($(ARCH),i386) ifeq ($(ARCH),i386)
I386OBJS := \ I386OBJS := \
$(B)/client/ftola.o \ $(B)/client/ftola.o \
$(B)/client/snapvectora.o \ $(B)/client/snapvectora.o \
$(B)/client/snd_mixa.o \ $(B)/client/snd_mixa.o \
$(B)/client/matha.o \ $(B)/client/matha.o \
Q3POBJ += $(I386OBJS) Q3POBJ += $(I386OBJS)
Q3POBJ_SMP += $(I386OBJS) Q3POBJ_SMP += $(I386OBJS)
@ -1344,7 +1335,7 @@ ifeq ($(ARCH),ppc)
endif endif
$(B)/$(PLATFORM)q3ded$(BINEXT): $(Q3DOBJ) $(B)/$(PLATFORM)q3ded$(BINEXT): $(Q3DOBJ)
$(CC) -o $@ $(Q3DOBJ) $(LDFLAGS) $(CC) -o $@ $(Q3DOBJ) $(LDFLAGS)
$(B)/ded/sv_bot.o : $(SDIR)/sv_bot.c; $(DO_DED_CC) $(B)/ded/sv_bot.o : $(SDIR)/sv_bot.c; $(DO_DED_CC)
$(B)/ded/sv_client.o : $(SDIR)/sv_client.c; $(DO_DED_CC) $(B)/ded/sv_client.o : $(SDIR)/sv_client.c; $(DO_DED_CC)
@ -1459,7 +1450,7 @@ Q3CGOBJ = $(Q3CGOBJ_) $(B)/baseq3/cgame/cg_syscalls.o
Q3CGVMOBJ = $(Q3CGOBJ_:%.o=%.asm) $(B)/baseq3/game/bg_lib.asm Q3CGVMOBJ = $(Q3CGOBJ_:%.o=%.asm) $(B)/baseq3/game/bg_lib.asm
$(B)/baseq3/cgame$(ARCH).$(SHLIBEXT) : $(Q3CGOBJ) $(B)/baseq3/cgame$(ARCH).$(SHLIBEXT) : $(Q3CGOBJ)
$(CC) $(SHLIBLDFLAGS) -o $@ $(Q3CGOBJ) $(CC) $(SHLIBLDFLAGS) -o $@ $(Q3CGOBJ)
$(B)/baseq3/vm/cgame.qvm: $(Q3CGVMOBJ) $(CGDIR)/cg_syscalls.asm $(B)/baseq3/vm/cgame.qvm: $(Q3CGVMOBJ) $(CGDIR)/cg_syscalls.asm
$(Q3ASM) -o $@ $(Q3CGVMOBJ) $(CGDIR)/cg_syscalls.asm $(Q3ASM) -o $@ $(Q3CGVMOBJ) $(CGDIR)/cg_syscalls.asm
@ -1550,7 +1541,7 @@ Q3GOBJ = $(Q3GOBJ_) $(B)/baseq3/game/g_syscalls.o
Q3GVMOBJ = $(Q3GOBJ_:%.o=%.asm) $(B)/baseq3/game/bg_lib.asm Q3GVMOBJ = $(Q3GOBJ_:%.o=%.asm) $(B)/baseq3/game/bg_lib.asm
$(B)/baseq3/qagame$(ARCH).$(SHLIBEXT) : $(Q3GOBJ) $(B)/baseq3/qagame$(ARCH).$(SHLIBEXT) : $(Q3GOBJ)
$(CC) $(SHLIBLDFLAGS) -o $@ $(Q3GOBJ) $(CC) $(SHLIBLDFLAGS) -o $@ $(Q3GOBJ)
$(B)/baseq3/vm/qagame.qvm: $(Q3GVMOBJ) $(GDIR)/g_syscalls.asm $(B)/baseq3/vm/qagame.qvm: $(Q3GVMOBJ) $(GDIR)/g_syscalls.asm
$(Q3ASM) -o $@ $(Q3GVMOBJ) $(GDIR)/g_syscalls.asm $(Q3ASM) -o $@ $(Q3GVMOBJ) $(GDIR)/g_syscalls.asm

View file

@ -267,10 +267,10 @@ static void install_grabs(void)
// This is a bug in the current SDL/macosx...have to toggle it a few // This is a bug in the current SDL/macosx...have to toggle it a few
// times to get the cursor to hide. // times to get the cursor to hide.
#if defined(MACOS_X) #if defined(MACOS_X)
SDL_ShowCursor(1); SDL_ShowCursor(1);
SDL_ShowCursor(0); SDL_ShowCursor(0);
#endif #endif
} }
static void uninstall_grabs(void) static void uninstall_grabs(void)

View file

@ -364,24 +364,22 @@ void Sys_Quit (void) {
static void Sys_DetectAltivec(void) static void Sys_DetectAltivec(void)
{ {
extern cvar_t *com_altivec;
// Only detect if user hasn't forcibly disabled it. // Only detect if user hasn't forcibly disabled it.
if (com_altivec->integer) { if (com_altivec->integer) {
#if idppc_altivec #if idppc_altivec
#if MACOS_X #ifdef MACOS_X
{ long feat = 0;
long feat = 0; OSErr err = Gestalt(gestaltPowerPCProcessorFeatures, &feat);
OSErr err = Gestalt(gestaltPowerPCProcessorFeatures, &feat); if ((err==noErr) && ((1 << gestaltPowerPCHasVectorInstructions) & feat)) {
if ((err==noErr) && ((1 << gestaltPowerPCHasVectorInstructions) & feat)) Cvar_Set( "com_altivec", "1" );
com_altivec->integer = 1; }
} #else // !!! FIXME: PowerPC Linux, etc: how to detect?
#else // !!! FIXME: PowerPC Linux, etc: how to detect? Cvar_Set( "com_altivec", "1" );
com_altivec->integer = 1; #endif
#endif #else
#else // not an Altivec system, so never use it.
com_altivec->integer = 0; // not an Altivec system, so never use it. Cvar_Set( "com_altivec", "0" );
#endif #endif
} }
} }
@ -705,9 +703,9 @@ void Sys_UnloadDll( void *dllHandle ) {
return; return;
} }
#if USE_SDL_VIDEO #if USE_SDL_VIDEO
SDL_UnloadObject(dllHandle); SDL_UnloadObject(dllHandle);
#else #else
dlclose( dllHandle ); dlclose( dllHandle );
{ {
const char* err; // rb010123 - now const const char* err; // rb010123 - now const
@ -715,7 +713,7 @@ void Sys_UnloadDll( void *dllHandle ) {
if ( err != NULL ) if ( err != NULL )
Com_Printf ( "Sys_UnloadGame failed on dlclose: \"%s\"!\n", err ); Com_Printf ( "Sys_UnloadGame failed on dlclose: \"%s\"!\n", err );
} }
#endif #endif
} }
@ -745,11 +743,11 @@ static void* try_dlopen(const char* base, const char* gamedir, const char* fname
fn = FS_BuildOSPath( base, gamedir, fname ); fn = FS_BuildOSPath( base, gamedir, fname );
Com_Printf( "Sys_LoadDll(%s)... \n", fn ); Com_Printf( "Sys_LoadDll(%s)... \n", fn );
#if USE_SDL_VIDEO #if USE_SDL_VIDEO
libHandle = SDL_LoadObject(fn); libHandle = SDL_LoadObject(fn);
#else #else
libHandle = dlopen( fn, Q_RTLD ); libHandle = dlopen( fn, Q_RTLD );
#endif #endif
if(!libHandle) { if(!libHandle) {
Com_Printf( "Sys_LoadDll(%s) failed:\n\"%s\"\n", fn, do_dlerror() ); Com_Printf( "Sys_LoadDll(%s) failed:\n\"%s\"\n", fn, do_dlerror() );
@ -827,14 +825,15 @@ void *Sys_LoadDll( const char *name, char *fqpath ,
#else #else
Com_Printf ( "Sys_LoadDll(%s) failed dlsym(vmMain):\n\"%s\" !\n", name, err ); Com_Printf ( "Sys_LoadDll(%s) failed dlsym(vmMain):\n\"%s\" !\n", name, err );
#endif #endif
#if USE_SDL_VIDEO #if USE_SDL_VIDEO
SDL_UnloadObject(libHandle); SDL_UnloadObject(libHandle);
#else #else
dlclose( libHandle ); dlclose( libHandle );
err = do_dlerror(); err = do_dlerror();
if ( err != NULL ) if ( err != NULL ) {
Com_Printf ( "Sys_LoadDll(%s) failed dlcose:\n\"%s\"\n", name, err ); Com_Printf ( "Sys_LoadDll(%s) failed dlcose:\n\"%s\"\n", name, err );
#endif }
#endif
return NULL; return NULL;
} }