diff -ru tremulous-1.1.0-src.orig/Makefile tremulous-1.1.0-src/Makefile
--- tremulous-1.1.0-src.orig/Makefile 2007年 9月 18日 二 18:47:15
+++ tremulous-1.1.0-src/Makefile 2007年 9月 18日 二 21:37:06
@@ -12,13 +12,17 @@
# GNU Make required
#
-COMPILE_PLATFORM=$(shell uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]')
+COMPILE_PLATFORM=$(shell uname|sed -e s/_.*//|tr '[A-Z]' '[a-z]')
ifeq ($(COMPILE_PLATFORM),darwin)
# Apple does some things a little differently...
COMPILE_ARCH=$(shell uname -p | sed -e s/i.86/x86/)
else
- COMPILE_ARCH=$(shell uname -m | sed -e s/i.86/x86/)
+ ifeq ($(COMPILE_PLATFORM),sunos)
+ COMPILE_ARCH=$(shell uname -p | sed -e s/i.86/x86/)
+ else
+ COMPILE_ARCH=$(shell uname -m | sed -e s/i.86/x86/)
+ endif
endif
BUILD_CLIENT =
@@ -610,15 +614,9 @@
CC=gcc
INSTALL=ginstall
- MKDIR=gmkdir
+ MKDIR=mkdir
COPYDIR="/usr/local/share/games/tremulous"
- ifneq (,$(findstring i86pc,$(shell uname -m)))
- ARCH=x86
- else #default to sparc
- ARCH=sparc
- endif
-
ifneq ($(ARCH),x86)
ifneq ($(ARCH),sparc)
$(error arch $(ARCH) is currently not supported)
@@ -628,6 +626,24 @@
BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes -pipe
+ ifeq ($(USE_OPENAL),1)
+ BASE_CFLAGS += -DUSE_OPENAL=1
+ ifeq ($(USE_OPENAL_DLOPEN),1)
+ BASE_CFLAGS += -DUSE_OPENAL_DLOPEN=1
+ endif
+ endif
+
+ ifeq ($(USE_CURL),1)
+ BASE_CFLAGS += -DUSE_CURL=1
+ ifeq ($(USE_CURL_DLOPEN),1)
+ BASE_CFLAGS += -DUSE_CURL_DLOPEN=1
+ endif
+ endif
+
+ ifeq ($(USE_CODEC_VORBIS),1)
+ BASE_CFLAGS += -DUSE_CODEC_VORBIS=1
+ endif
+
ifeq ($(USE_SDL),1)
BASE_CFLAGS += -DUSE_SDL_SOUND=1 $(shell sdl-config --cflags)
else
@@ -676,6 +692,22 @@
CLIENT_LDFLAGS=-L/usr/openwin/$(LIB) -L/usr/X11/lib -lGLU -lX11 -lXext
endif
+ ifeq ($(USE_OPENAL),1)
+ ifneq ($(USE_OPENAL_DLOPEN),1)
+ CLIENT_LDFLAGS += -lopenal
+ endif
+ endif
+
+ ifeq ($(USE_CURL),1)
+ ifneq ($(USE_CURL_DLOPEN),1)
+ CLIENT_LDFLAGS += -lcurl
+ endif
+ endif
+
+ ifeq ($(USE_CODEC_VORBIS),1)
+ CLIENT_LDFLAGS += -lvorbisfile -lvorbis -logg
+ endif
+
else # ifeq sunos
#############################################################################
diff -ru tremulous-1.1.0-src.orig/src/renderer/tr_bsp.c tremulous-1.1.0-src/src/renderer/tr_bsp.c
--- tremulous-1.1.0-src.orig/src/renderer/tr_bsp.c 2007年 9月 18日 二 18:47:11
+++ tremulous-1.1.0-src/src/renderer/tr_bsp.c 2007年 9月 18日 二 21:32:11
@@ -1316,7 +1316,7 @@
s_worldData.bmodels = out = ri.Hunk_Alloc( count * sizeof(*out), h_low );
for ( i=0 ; i<count ; i++, in++, out++ ) {
- model_t *model;
+ qmodel_t *model;
model = R_AllocModel();
diff -ru tremulous-1.1.0-src.orig/src/renderer/tr_local.h tremulous-1.1.0-src/src/renderer/tr_local.h
--- tremulous-1.1.0-src.orig/src/renderer/tr_local.h 2007年 9月 18日 二 18:46:52
+++ tremulous-1.1.0-src/src/renderer/tr_local.h 2007年 9月 18日 二 21:30:15
@@ -757,13 +757,13 @@
void *md4; // only if type == (MOD_MD4 | MOD_MDR)
int numLods;
-} model_t;
+} qmodel_t;
#define MAX_MOD_KNOWN 1024
void R_ModelInit (void);
-model_t *R_GetModelByHandle( qhandle_t hModel );
+qmodel_t *R_GetModelByHandle( qhandle_t hModel );
int R_LerpTag( orientation_t *tag, qhandle_t handle, int startFrame, int endFrame,
float frac, const char *tagName );
void R_ModelBounds( qhandle_t handle, vec3_t mins, vec3_t maxs );
@@ -919,7 +919,7 @@
trRefEntity_t worldEntity; // point currentEntity at this when rendering world
int currentEntityNum;
int shiftedEntityNum; // currentEntityNum << QSORT_ENTITYNUM_SHIFT
- model_t *currentModel;
+ qmodel_t *currentModel;
viewParms_t viewParms;
@@ -943,7 +943,7 @@
// put large tables at the end, so most elements will be
// within the +/32K indexed range on risc processors
//
- model_t *models[MAX_MOD_KNOWN];
+ qmodel_t *models[MAX_MOD_KNOWN];
int numModels;
int numImages;
@@ -1201,7 +1201,7 @@
qboolean R_GetEntityToken( char *buffer, int size );
-model_t *R_AllocModel( void );
+qmodel_t *R_AllocModel( void );
void R_Init( void );
image_t *R_FindImageFile( const char *name, qboolean mipmap, qboolean allowPicmip, int glWrapClampMode );
diff -ru tremulous-1.1.0-src.orig/src/renderer/tr_model.c tremulous-1.1.0-src/src/renderer/qmodel.c
--- tremulous-1.1.0-src.orig/src/renderer/tr_model.c 2007年 9月 18日 二 18:46:44
+++ tremulous-1.1.0-src/src/renderer/tr_model.c 2007年 9月 18日 二 21:31:59
@@ -25,19 +25,19 @@
#define LL(x) x=LittleLong(x)
-static qboolean R_LoadMD3 (model_t *mod, int lod, void *buffer, const char *name );
-static qboolean R_LoadMD4 (model_t *mod, void *buffer, const char *name );
+static qboolean R_LoadMD3 (qmodel_t *mod, int lod, void *buffer, const char *name );
+static qboolean R_LoadMD4 (qmodel_t *mod, void *buffer, const char *name );
#ifdef RAVENMD4
-static qboolean R_LoadMDR (model_t *mod, void *buffer, int filesize, const char *name );
+static qboolean R_LoadMDR (qmodel_t *mod, void *buffer, int filesize, const char *name );
#endif
-model_t *loadmodel;
+qmodel_t *loadmodel;
/*
** R_GetModelByHandle
*/
-model_t *R_GetModelByHandle( qhandle_t index ) {
- model_t *mod;
+qmodel_t *R_GetModelByHandle( qhandle_t index ) {
+ qmodel_t *mod;
// out of range gets the defualt model
if ( index < 1 || index >= tr.numModels ) {
@@ -54,8 +54,8 @@
/*
** R_AllocModel
*/
-model_t *R_AllocModel( void ) {
- model_t *mod;
+qmodel_t *R_AllocModel( void ) {
+ qmodel_t *mod;
if ( tr.numModels == MAX_MOD_KNOWN ) {
return NULL;
@@ -82,7 +82,7 @@
====================
*/
qhandle_t RE_RegisterModel( const char *name ) {
- model_t *mod;
+ qmodel_t *mod;
unsigned *buf;
int lod;
int ident;
@@ -252,7 +252,7 @@
R_LoadMD3
=================
*/
-static qboolean R_LoadMD3 (model_t *mod, int lod, void *buffer, const char *mod_name ) {
+static qboolean R_LoadMD3 (qmodel_t *mod, int lod, void *buffer, const char *mod_name ) {
int i, j;
md3Header_t *pinmodel;
md3Frame_t *frame;
@@ -411,7 +411,7 @@
=================
*/
#ifdef RAVENMD4
-static qboolean R_LoadMDR( model_t *mod, void *buffer, int filesize, const char *mod_name )
+static qboolean R_LoadMDR( qmodel_t *mod, void *buffer, int filesize, const char *mod_name )
{
int i, j, k, l;
mdrHeader_t *pinmodel, *mdr;
@@ -705,7 +705,7 @@
=================
*/
-static qboolean R_LoadMD4( model_t *mod, void *buffer, const char *mod_name ) {
+static qboolean R_LoadMD4( qmodel_t *mod, void *buffer, const char *mod_name ) {
int i, j, k, lodindex;
md4Header_t *pinmodel, *md4;
md4Frame_t *frame;
@@ -886,7 +886,7 @@
===============
*/
void R_ModelInit( void ) {
- model_t *mod;
+ qmodel_t *mod;
// leave a space for NULL model
tr.numModels = 0;
@@ -903,7 +903,7 @@
*/
void R_Modellist_f( void ) {
int i, j;
- model_t *mod;
+ qmodel_t *mod;
int total;
int lods;
@@ -1015,7 +1015,7 @@
#endif
int i;
float frontLerp, backLerp;
- model_t *model;
+ qmodel_t *model;
model = R_GetModelByHandle( handle );
if ( !model->md3[0] )
@@ -1071,7 +1071,7 @@
====================
*/
void R_ModelBounds( qhandle_t handle, vec3_t mins, vec3_t maxs ) {
- model_t *model;
+ qmodel_t *model;
md3Header_t *header;
md3Frame_t *frame;
diff -ru tremulous-1.1.0-src.orig/src/renderer/tr_world.c tremulous-1.1.0-src/src/renderer/tr_world.c
--- tremulous-1.1.0-src.orig/src/renderer/tr_world.c 2007年 9月 18日 二 18:46:52
+++ tremulous-1.1.0-src/src/renderer/tr_world.c 2007年 9月 18日 二 21:29:02
@@ -319,7 +319,7 @@
void R_AddBrushModelSurfaces ( trRefEntity_t *ent ) {
bmodel_t *bmodel;
int clip;
- model_t *pModel;
+ qmodel_t *pModel;
int i;
pModel = R_GetModelByHandle( ent->e.hModel );