aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile15
-rw-r--r--code/botlib/be_aas_sample.c1
-rw-r--r--code/client/cl_cin.c1
-rw-r--r--code/client/client.h2
-rw-r--r--code/client/snd_dma.c1
-rw-r--r--code/null/null_client.c3
-rw-r--r--code/null/null_input.c1
-rw-r--r--code/null/null_snddma.c3
-rw-r--r--code/qcommon/files.c21
-rw-r--r--code/qcommon/msg.c2
-rw-r--r--code/qcommon/qcommon.h1
-rw-r--r--code/qcommon/unzip.c3
-rw-r--r--code/qcommon/vm_interpreted.c14
13 files changed, 36 insertions, 32 deletions
diff --git a/Makefile b/Makefile
index 2082085..f42dcb9 100644
--- a/Makefile
+++ b/Makefile
@@ -41,6 +41,9 @@ endif
ifndef BUILD_GAME_QVM
BUILD_GAME_QVM =
endif
+ifndef BUILD_MISSIONPACK
+ BUILD_MISSIONPACK=
+endif
ifneq ($(PLATFORM),darwin)
BUILD_CLIENT_SMP = 0
@@ -786,10 +789,13 @@ ifneq ($(BUILD_GAME_SO),0)
TARGETS += \
$(B)/baseq3/cgame$(ARCH).$(SHLIBEXT) \
$(B)/baseq3/qagame$(ARCH).$(SHLIBEXT) \
- $(B)/baseq3/ui$(ARCH).$(SHLIBEXT) \
+ $(B)/baseq3/ui$(ARCH).$(SHLIBEXT)
+ ifneq ($(BUILD_MISSIONPACK),0)
+ TARGETS += \
$(B)/missionpack/cgame$(ARCH).$(SHLIBEXT) \
$(B)/missionpack/qagame$(ARCH).$(SHLIBEXT) \
$(B)/missionpack/ui$(ARCH).$(SHLIBEXT)
+ endif
endif
ifneq ($(BUILD_GAME_QVM),0)
@@ -797,10 +803,13 @@ ifneq ($(BUILD_GAME_QVM),0)
TARGETS += \
$(B)/baseq3/vm/cgame.qvm \
$(B)/baseq3/vm/qagame.qvm \
- $(B)/baseq3/vm/ui.qvm \
+ $(B)/baseq3/vm/ui.qvm
+ ifneq ($(BUILD_MISSIONPACK),0)
+ TARGETS += \
$(B)/missionpack/vm/qagame.qvm \
$(B)/missionpack/vm/cgame.qvm \
$(B)/missionpack/vm/ui.qvm
+ endif
endif
endif
@@ -2048,6 +2057,7 @@ ifneq ($(BUILD_GAME_SO),0)
$(COPYDIR)/baseq3/.
$(INSTALL) -s -m 0755 $(BR)/baseq3/ui$(ARCH).$(SHLIBEXT) \
$(COPYDIR)/baseq3/.
+ ifneq ($(BUILD_MISSIONPACK),0)
-$(MKDIR) -p -m 0755 $(COPYDIR)/missionpack
$(INSTALL) -s -m 0755 $(BR)/missionpack/cgame$(ARCH).$(SHLIBEXT) \
$(COPYDIR)/missionpack/.
@@ -2055,6 +2065,7 @@ ifneq ($(BUILD_GAME_SO),0)
$(COPYDIR)/missionpack/.
$(INSTALL) -s -m 0755 $(BR)/missionpack/ui$(ARCH).$(SHLIBEXT) \
$(COPYDIR)/missionpack/.
+ endif
endif
clean: clean-debug clean-release
diff --git a/code/botlib/be_aas_sample.c b/code/botlib/be_aas_sample.c
index 92b7517..6c7adec 100644
--- a/code/botlib/be_aas_sample.c
+++ b/code/botlib/be_aas_sample.c
@@ -44,7 +44,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "be_aas_funcs.h"
#include "be_aas_def.h"
-extern botlib_import_t botimport;
//#define AAS_SAMPLE_DEBUG
diff --git a/code/client/cl_cin.c b/code/client/cl_cin.c
index bb5be7e..a1bd853 100644
--- a/code/client/cl_cin.c
+++ b/code/client/cl_cin.c
@@ -135,7 +135,6 @@ static int currentHandle = -1;
static int CL_handle = -1;
extern int s_soundtime; // sample PAIRS
-extern int s_paintedtime; // sample PAIRS
void CIN_CloseAllVideos(void) {
diff --git a/code/client/client.h b/code/client/client.h
index 889affa..aa4e389 100644
--- a/code/client/client.h
+++ b/code/client/client.h
@@ -490,8 +490,6 @@ void CL_VerifyCode( void );
float CL_KeyState (kbutton_t *key);
char *Key_KeynumToString (int keynum);
-int Key_GetCatcher( void );
-void Key_SetCatcher( int catcher );
//
// cl_parse.c
diff --git a/code/client/snd_dma.c b/code/client/snd_dma.c
index 3058281..acda0f5 100644
--- a/code/client/snd_dma.c
+++ b/code/client/snd_dma.c
@@ -38,7 +38,6 @@ void S_SoundList_f(void);
void S_Music_f(void);
void S_Update_( void );
-void S_UpdateBackgroundTrack( void );
void S_Base_StopAllSounds(void);
void S_Base_StopBackgroundTrack( void );
diff --git a/code/null/null_client.c b/code/null/null_client.c
index e70b3b8..8b0d1ab 100644
--- a/code/null/null_client.c
+++ b/code/null/null_client.c
@@ -20,7 +20,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
-#include "../client/client.h"
+#include "../qcommon/q_shared.h"
+#include "../qcommon/qcommon.h"
cvar_t *cl_shownet;
diff --git a/code/null/null_input.c b/code/null/null_input.c
index f0c89c4..8a76555 100644
--- a/code/null/null_input.c
+++ b/code/null/null_input.c
@@ -19,7 +19,6 @@ along with Quake III Arena source code; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
-#include "../client/client.h"
void IN_Init( void ) {
}
diff --git a/code/null/null_snddma.c b/code/null/null_snddma.c
index 1918201..448a4dc 100644
--- a/code/null/null_snddma.c
+++ b/code/null/null_snddma.c
@@ -23,7 +23,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
// snddma_null.c
// all other sound mixing is portable
-#include "../client/client.h"
+#include "../qcommon/q_shared.h"
+#include "../qcommon/qcommon.h"
qboolean SNDDMA_Init(void)
{
diff --git a/code/qcommon/files.c b/code/qcommon/files.c
index 821de07..88df191 100644
--- a/code/qcommon/files.c
+++ b/code/qcommon/files.c
@@ -298,6 +298,11 @@ char lastValidGame[MAX_OSPATH];
FILE* missingFiles = NULL;
#endif
+/* C99 defines __func__ */
+#ifndef __func__
+#define __func__ "(unknown)"
+#endif
+
/*
==============
FS_Initialized
@@ -526,7 +531,7 @@ static void FS_CopyFile( char *fromOSPath, char *toOSPath ) {
Com_Printf( "copy %s to %s\n", fromOSPath, toOSPath );
- FS_FilenameIsExecutable( toOSPath, __FUNCTION__ );
+ FS_FilenameIsExecutable( toOSPath, __func__ );
if (strstr(fromOSPath, "journal.dat") || strstr(fromOSPath, "journaldata.dat")) {
Com_Printf( "Ignoring journal files\n");
@@ -569,7 +574,7 @@ FS_Remove
===========
*/
void FS_Remove( const char *osPath ) {
- FS_FilenameIsExecutable( osPath, __FUNCTION__ );
+ FS_FilenameIsExecutable( osPath, __func__ );
remove( osPath );
}
@@ -581,7 +586,7 @@ FS_HomeRemove
===========
*/
void FS_HomeRemove( const char *homePath ) {
- FS_FilenameIsExecutable( homePath, __FUNCTION__ );
+ FS_FilenameIsExecutable( homePath, __func__ );
remove( FS_BuildOSPath( fs_homepath->string,
fs_gamedir, homePath ) );
@@ -660,7 +665,7 @@ fileHandle_t FS_SV_FOpenFileWrite( const char *filename ) {
Com_Printf( "FS_SV_FOpenFileWrite: %s\n", ospath );
}
- FS_FilenameIsExecutable( ospath, __FUNCTION__ );
+ FS_FilenameIsExecutable( ospath, __func__ );
if( FS_CreatePath( ospath ) ) {
return 0;
@@ -771,7 +776,7 @@ void FS_SV_Rename( const char *from, const char *to ) {
Com_Printf( "FS_SV_Rename: %s --> %s\n", from_ospath, to_ospath );
}
- FS_FilenameIsExecutable( to_ospath, __FUNCTION__ );
+ FS_FilenameIsExecutable( to_ospath, __func__ );
if (rename( from_ospath, to_ospath )) {
// Failed, try copying it and deleting the original
@@ -805,7 +810,7 @@ void FS_Rename( const char *from, const char *to ) {
Com_Printf( "FS_Rename: %s --> %s\n", from_ospath, to_ospath );
}
- FS_FilenameIsExecutable( to_ospath, __FUNCTION__ );
+ FS_FilenameIsExecutable( to_ospath, __func__ );
if (rename( from_ospath, to_ospath )) {
// Failed, try copying it and deleting the original
@@ -868,7 +873,7 @@ fileHandle_t FS_FOpenFileWrite( const char *filename ) {
Com_Printf( "FS_FOpenFileWrite: %s\n", ospath );
}
- FS_FilenameIsExecutable( ospath, __FUNCTION__ );
+ FS_FilenameIsExecutable( ospath, __func__ );
if( FS_CreatePath( ospath ) ) {
return 0;
@@ -916,7 +921,7 @@ fileHandle_t FS_FOpenFileAppend( const char *filename ) {
Com_Printf( "FS_FOpenFileAppend: %s\n", ospath );
}
- FS_FilenameIsExecutable( ospath, __FUNCTION__ );
+ FS_FilenameIsExecutable( ospath, __func__ );
if( FS_CreatePath( ospath ) ) {
return 0;
diff --git a/code/qcommon/msg.c b/code/qcommon/msg.c
index 3840a8c..1fc03eb 100644
--- a/code/qcommon/msg.c
+++ b/code/qcommon/msg.c
@@ -992,8 +992,6 @@ If the delta removes the entity, entityState_t->number will be set to MAX_GENTIT
Can go from either a baseline or a previous packet_entity
==================
*/
-extern cvar_t *cl_shownet;
-
void MSG_ReadDeltaEntity( msg_t *msg, entityState_t *from, entityState_t *to,
int number) {
int i, lc;
diff --git a/code/qcommon/qcommon.h b/code/qcommon/qcommon.h
index 34a9780..72ea617 100644
--- a/code/qcommon/qcommon.h
+++ b/code/qcommon/qcommon.h
@@ -597,7 +597,6 @@ fileHandle_t FS_FOpenFileWrite( const char *qpath );
fileHandle_t FS_FOpenFileAppend( const char *filename );
// will properly create any needed paths and deal with seperater character issues
-int FS_filelength( fileHandle_t f );
fileHandle_t FS_SV_FOpenFileWrite( const char *filename );
int FS_SV_FOpenFileRead( const char *filename, fileHandle_t *fp );
void FS_SV_Rename( const char *from, const char *to );
diff --git a/code/qcommon/unzip.c b/code/qcommon/unzip.c
index 7daf271..90f5354 100644
--- a/code/qcommon/unzip.c
+++ b/code/qcommon/unzip.c
@@ -7,7 +7,8 @@
*
*****************************************************************************/
-#include "../client/client.h"
+#include "../qcommon/q_shared.h"
+#include "../qcommon/qcommon.h"
#include "unzip.h"
/* unzip.h -- IO for uncompress .zip files using zlib
diff --git a/code/qcommon/vm_interpreted.c b/code/qcommon/vm_interpreted.c
index 897da68..7183e24 100644
--- a/code/qcommon/vm_interpreted.c
+++ b/code/qcommon/vm_interpreted.c
@@ -489,16 +489,10 @@ nextInstruction2:
count = ((srci + count) & dataMask) - srci;
count = ((desti + count) & dataMask) - desti;
- src = (int *)&image[ r0&dataMask ];
- dest = (int *)&image[ r1&dataMask ];
- if ( ( (intptr_t)src | (intptr_t)dest | count ) & 3 ) {
- // happens in westernq3
- Com_Printf( S_COLOR_YELLOW "Warning: OP_BLOCK_COPY not dword aligned\n");
- }
- count >>= 2;
- for ( i = count-1 ; i>= 0 ; i-- ) {
- dest[i] = src[i];
- }
+ src = (int *)&image[ srci ];
+ dest = (int *)&image[ desti ];
+
+ memcpy(dest, src, count);
programCounter += 4;
opStack -= 2;
}