r1456 - in trunk: . code/botlib code/client code/null code/qcommon

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Aug 22 18:47:27 EDT 2008


Author: tma
Date: 2008-08-22 18:47:26 -0400 (Fri, 22 Aug 2008)
New Revision: 1456

Modified:
   trunk/Makefile
   trunk/code/botlib/be_aas_sample.c
   trunk/code/client/cl_cin.c
   trunk/code/client/client.h
   trunk/code/client/snd_dma.c
   trunk/code/null/null_client.c
   trunk/code/null/null_input.c
   trunk/code/null/null_snddma.c
   trunk/code/qcommon/files.c
   trunk/code/qcommon/msg.c
   trunk/code/qcommon/qcommon.h
   trunk/code/qcommon/unzip.c
   trunk/code/qcommon/vm_interpreted.c
Log:
* (bug #3729) server dependencies on client.h (Ben Millwood)
* (bug #3731) BUILD_MISSIONPACK flag in Makefile (Gabriel Schnoering
  <gabriel.schnoering at gmail.com>)
* (bug #3756) Q3VM crashes on unaligned block copy with SIGBUS (Patrick Baggett
  <baggett.patrick at figglesoftware.com>) and...
* (bug #3755) IOQuake3 shouldn't use GCC-specific __FUNCTION__


Modified: trunk/Makefile
===================================================================
--- trunk/Makefile	2008-08-22 22:16:37 UTC (rev 1455)
+++ trunk/Makefile	2008-08-22 22:47:26 UTC (rev 1456)
@@ -41,6 +41,9 @@
 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 @@
   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 @@
     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 @@
 					$(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 @@
 					$(COPYDIR)/missionpack/.
 	$(INSTALL) -s -m 0755 $(BR)/missionpack/ui$(ARCH).$(SHLIBEXT) \
 					$(COPYDIR)/missionpack/.
+  endif
 endif
 
 clean: clean-debug clean-release

Modified: trunk/code/botlib/be_aas_sample.c
===================================================================
--- trunk/code/botlib/be_aas_sample.c	2008-08-22 22:16:37 UTC (rev 1455)
+++ trunk/code/botlib/be_aas_sample.c	2008-08-22 22:47:26 UTC (rev 1456)
@@ -44,7 +44,6 @@
 #include "be_aas_funcs.h"
 #include "be_aas_def.h"
 
-extern botlib_import_t botimport;
 
 //#define AAS_SAMPLE_DEBUG
 

Modified: trunk/code/client/cl_cin.c
===================================================================
--- trunk/code/client/cl_cin.c	2008-08-22 22:16:37 UTC (rev 1455)
+++ trunk/code/client/cl_cin.c	2008-08-22 22:47:26 UTC (rev 1456)
@@ -135,7 +135,6 @@
 static int				CL_handle = -1;
 
 extern int				s_soundtime;		// sample PAIRS
-extern int   			s_paintedtime; 		// sample PAIRS
 
 
 void CIN_CloseAllVideos(void) {

Modified: trunk/code/client/client.h
===================================================================
--- trunk/code/client/client.h	2008-08-22 22:16:37 UTC (rev 1455)
+++ trunk/code/client/client.h	2008-08-22 22:47:26 UTC (rev 1456)
@@ -490,8 +490,6 @@
 
 float CL_KeyState (kbutton_t *key);
 char *Key_KeynumToString (int keynum);
-int Key_GetCatcher( void );
-void Key_SetCatcher( int catcher );
 
 //
 // cl_parse.c

Modified: trunk/code/client/snd_dma.c
===================================================================
--- trunk/code/client/snd_dma.c	2008-08-22 22:16:37 UTC (rev 1455)
+++ trunk/code/client/snd_dma.c	2008-08-22 22:47:26 UTC (rev 1456)
@@ -38,7 +38,6 @@
 void S_Music_f(void);
 
 void S_Update_( void );
-void S_UpdateBackgroundTrack( void );
 void S_Base_StopAllSounds(void);
 void S_Base_StopBackgroundTrack( void );
 

Modified: trunk/code/null/null_client.c
===================================================================
--- trunk/code/null/null_client.c	2008-08-22 22:16:37 UTC (rev 1455)
+++ trunk/code/null/null_client.c	2008-08-22 22:47:26 UTC (rev 1456)
@@ -20,7 +20,8 @@
 ===========================================================================
 */
 
-#include "../client/client.h"
+#include "../qcommon/q_shared.h"
+#include "../qcommon/qcommon.h"
 
 cvar_t *cl_shownet;
 

Modified: trunk/code/null/null_input.c
===================================================================
--- trunk/code/null/null_input.c	2008-08-22 22:16:37 UTC (rev 1455)
+++ trunk/code/null/null_input.c	2008-08-22 22:47:26 UTC (rev 1456)
@@ -19,7 +19,6 @@
 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 ===========================================================================
 */
-#include "../client/client.h"
 
 void IN_Init( void ) {
 }

Modified: trunk/code/null/null_snddma.c
===================================================================
--- trunk/code/null/null_snddma.c	2008-08-22 22:16:37 UTC (rev 1455)
+++ trunk/code/null/null_snddma.c	2008-08-22 22:47:26 UTC (rev 1456)
@@ -23,7 +23,8 @@
 // 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)
 {

Modified: trunk/code/qcommon/files.c
===================================================================
--- trunk/code/qcommon/files.c	2008-08-22 22:16:37 UTC (rev 1455)
+++ trunk/code/qcommon/files.c	2008-08-22 22:47:26 UTC (rev 1456)
@@ -298,6 +298,11 @@
 FILE*		missingFiles = NULL;
 #endif
 
+/* C99 defines __func__ */
+#ifndef __func__
+#define __func__ "(unknown)"
+#endif
+
 /*
 ==============
 FS_Initialized
@@ -526,7 +531,7 @@
 
 	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 @@
 ===========
 */
 void FS_Remove( const char *osPath ) {
-	FS_FilenameIsExecutable( osPath, __FUNCTION__ );
+	FS_FilenameIsExecutable( osPath, __func__ );
 
 	remove( osPath );
 }
@@ -581,7 +586,7 @@
 ===========
 */
 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 @@
 		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 @@
 		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 @@
 		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 @@
 		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 @@
 		Com_Printf( "FS_FOpenFileAppend: %s\n", ospath );
 	}
 
-	FS_FilenameIsExecutable( ospath, __FUNCTION__ );
+	FS_FilenameIsExecutable( ospath, __func__ );
 
 	if( FS_CreatePath( ospath ) ) {
 		return 0;

Modified: trunk/code/qcommon/msg.c
===================================================================
--- trunk/code/qcommon/msg.c	2008-08-22 22:16:37 UTC (rev 1455)
+++ trunk/code/qcommon/msg.c	2008-08-22 22:47:26 UTC (rev 1456)
@@ -992,8 +992,6 @@
 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;

Modified: trunk/code/qcommon/qcommon.h
===================================================================
--- trunk/code/qcommon/qcommon.h	2008-08-22 22:16:37 UTC (rev 1455)
+++ trunk/code/qcommon/qcommon.h	2008-08-22 22:47:26 UTC (rev 1456)
@@ -597,7 +597,6 @@
 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 );

Modified: trunk/code/qcommon/unzip.c
===================================================================
--- trunk/code/qcommon/unzip.c	2008-08-22 22:16:37 UTC (rev 1455)
+++ trunk/code/qcommon/unzip.c	2008-08-22 22:47:26 UTC (rev 1456)
@@ -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 

Modified: trunk/code/qcommon/vm_interpreted.c
===================================================================
--- trunk/code/qcommon/vm_interpreted.c	2008-08-22 22:16:37 UTC (rev 1455)
+++ trunk/code/qcommon/vm_interpreted.c	2008-08-22 22:47:26 UTC (rev 1456)
@@ -489,16 +489,10 @@
 				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;
 			}




More information about the quake3-commits mailing list