* (bug 3393) Blank user names still possible (Michael Jard <kfaust@gmail.com>)

* (bug 3363) Download percentage overflow (Martin Doucha <next_ghost@quick.cz>)
* (bug 3390) MSVC project (Julian Priestley <juzley@gmail.com>)
* For OS X and MinGW ports, don't -I code/SDL when USE_LOCAL_HEADERS is 0
This commit is contained in:
Tim Angus 2007-11-02 23:36:23 +00:00
parent 881988636a
commit 31c24bd0d2
25 changed files with 10014 additions and 103 deletions

View File

@ -366,7 +366,12 @@ ifeq ($(PLATFORM),darwin)
CLIENT_LDFLAGS += -lvorbisfile -lvorbis -logg
endif
BASE_CFLAGS += -D_THREAD_SAFE=1 -I$(SDLHDIR)/include
BASE_CFLAGS += -D_THREAD_SAFE=1
ifeq ($(USE_LOCAL_HEADERS),1)
BASE_CFLAGS += -I$(SDLHDIR)/include
endif
# We copy sdlmain before ranlib'ing it so that subversion doesn't think
# the file has been modified by each build.
LIBSDLMAIN=$(B)/libSDLmain.a
@ -408,7 +413,11 @@ endif
ARCH=x86
BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
-DUSE_ICON -I$(SDLHDIR)/include
-DUSE_ICON
ifeq ($(USE_LOCAL_HEADERS),1)
BASE_CFLAGS += -I$(SDLHDIR)/include
endif
ifeq ($(USE_OPENAL),1)
BASE_CFLAGS += -DUSE_OPENAL=1 -DUSE_OPENAL_DLOPEN

View File

@ -136,7 +136,7 @@ qboolean BotLibSetup(char *str)
int Export_BotLibSetup(void)
{
int errnum;
char logfilename[MAX_QPATH];
char logfilename[MAX_OSPATH];
char *homedir, *gamedir;
bot_developer = LibVarGetValue("bot_developer");

View File

@ -705,11 +705,7 @@ int PC_ExpandBuiltinDefine(source_t *source, token_t *deftoken, define_t *define
token_t **firsttoken, token_t **lasttoken)
{
token_t *token;
#ifdef _WIN32
unsigned long t; // time_t t; //to prevent LCC warning
#else
time_t t;
#endif
char *curtime;

View File

@ -629,7 +629,7 @@ static void ClientCleanName( const char *in, char *out, int outSize ) {
}
// don't allow leading spaces
if( !*p && ch == ' ' ) {
if( colorlessLen == 0 && ch == ' ' ) {
continue;
}
@ -658,11 +658,15 @@ static void ClientCleanName( const char *in, char *out, int outSize ) {
}
// don't allow too many consecutive spaces
// don't count spaces in colorlessLen
if( ch == ' ' ) {
spaces++;
if( spaces > 3 ) {
continue;
}
*out++ = ch;
len++;
continue;
}
else {
spaces = 0;

View File

@ -94,7 +94,7 @@ static void UI_DisplayDownloadInfo( const char *downloadName ) {
UI_DrawProportionalString( 8, 224, xferText, style, color_white );
if (downloadSize > 0) {
s = va( "%s (%d%%)", downloadName, downloadCount * 100 / downloadSize );
s = va( "%s (%d%%)", downloadName, (int)( (float)downloadCount * 100.0f / downloadSize ) );
} else {
s = downloadName;
}

View File

@ -26,7 +26,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#ifndef __QGL_H__
#define __QGL_H__
#include "SDL_opengl.h"
#ifdef USE_LOCAL_HEADERS
# include "SDL_opengl.h"
#else
# include <SDL_opengl.h>
#endif
extern void (APIENTRYP qglActiveTextureARB) (GLenum texture);
extern void (APIENTRYP qglClientActiveTextureARB) (GLenum texture);

View File

@ -20,7 +20,12 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
#include "SDL.h"
#ifdef USE_LOCAL_HEADERS
# include "SDL.h"
#else
# include <SDL.h>
#endif
#include "../renderer/tr_local.h"
#include "../qcommon/qcommon.h"

View File

@ -20,7 +20,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
#include "SDL.h"
#ifdef USE_LOCAL_HEADERS
# include "SDL.h"
#else
# include <SDL.h>
#endif
#if !SDL_VERSION_ATLEAST(1, 2, 10)
#define SDL_GL_ACCELERATED_VISUAL 15
@ -30,7 +34,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#endif
#ifdef SMP
#include "SDL_thread.h"
# ifdef USE_LOCAL_HEADERS
# include "SDL_thread.h"
# else
# include <SDL_thread.h>
# endif
#endif
#include <stdarg.h>

View File

@ -20,7 +20,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
#include "SDL.h"
#ifdef USE_LOCAL_HEADERS
# include "SDL.h"
#else
# include <SDL.h>
#endif
#include <stdarg.h>
#include <stdio.h>

View File

@ -23,7 +23,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <stdlib.h>
#include <stdio.h>
#include "SDL.h"
#ifdef USE_LOCAL_HEADERS
# include "SDL.h"
#else
# include <SDL.h>
#endif
#include "../qcommon/q_shared.h"
#include "../client/snd_local.h"

View File

@ -19,13 +19,11 @@ 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 <unistd.h>
#include <signal.h>
#include <stdlib.h>
#include <limits.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdarg.h>
#include <stdio.h>
#include <sys/stat.h>
@ -34,8 +32,13 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <errno.h>
#ifndef DEDICATED
#include "SDL.h"
#include "SDL_cpuinfo.h"
#ifdef USE_LOCAL_HEADERS
# include "SDL.h"
# include "SDL_cpuinfo.h"
#else
# include <SDL.h>
# include <SDL_cpuinfo.h>
#endif
#endif
#include "sys_local.h"
@ -163,10 +166,7 @@ void Sys_Exit( int ex )
#endif
#ifdef NDEBUG
// _exit is called instead of exit since there are rumours of
// GL libraries installing atexit calls that we don't want to call
// FIXME: get some testing done with plain exit
_exit(ex);
exit(ex);
#else
// Cause a backtrace on error exits
assert( ex == 0 );
@ -436,7 +436,6 @@ void *Sys_LoadDll( const char *name, char *fqpath ,
{
void *libHandle;
void (*dllEntry)( intptr_t (*syscallptr)(intptr_t, ...) );
char curpath[MAX_OSPATH];
char fname[MAX_OSPATH];
char *basepath;
char *homepath;
@ -445,7 +444,6 @@ void *Sys_LoadDll( const char *name, char *fqpath ,
assert( name );
getcwd(curpath, sizeof(curpath));
Q_snprintf (fname, sizeof(fname), "%s" ARCH_STRING DLL_EXT, name);
// TODO: use fs_searchpaths from files.c

View File

@ -57,7 +57,12 @@ END
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
#ifndef __MINGW32__
IDI_ICON1 ICON DISCARDABLE "../quake3.ico"
#else
IDI_ICON1 ICON DISCARDABLE "misc/quake3.ico"
#endif
/////////////////////////////////////////////////////////////////////////////
//

View File

@ -1357,7 +1357,6 @@ void WriteVmFile( void ) {
vmHeader_t header;
FILE *f;
int headerSize;
int i;
report( "%i total errors\n", errorCount );
@ -1403,9 +1402,13 @@ void WriteVmFile( void ) {
report( "Writing to %s\n", imageName );
#ifdef Q3_BIG_ENDIAN
// byte swap the header
for ( i = 0 ; i < sizeof( vmHeader_t ) / 4 ; i++ ) {
((int *)&header)[i] = LittleLong( ((int *)&header)[i] );
{
int i;
// byte swap the header
for ( i = 0 ; i < sizeof( vmHeader_t ) / 4 ; i++ ) {
((int *)&header)[i] = LittleLong( ((int *)&header)[i] );
}
}
#endif

View File

@ -5424,7 +5424,8 @@ static void UI_DisplayDownloadInfo( const char *downloadName, float centerPoint,
Text_PaintCenter(centerPoint, yStart + 248, scale, colorWhite, xferText, 0);
if (downloadSize > 0) {
s = va( "%s (%d%%)", downloadName, downloadCount * 100 / downloadSize );
s = va( "%s (%d%%)", downloadName,
(int)( (float)downloadCount * 100.0f / downloadSize ) );
} else {
s = downloadName;
}

3
misc/msvc/cgame.def Normal file
View File

@ -0,0 +1,3 @@
EXPORTS
vmMain
dllEntry

1513
misc/msvc/cgame.vcproj Normal file

File diff suppressed because it is too large Load Diff

3
misc/msvc/game.def Normal file
View File

@ -0,0 +1,3 @@
EXPORTS
dllEntry
vmMain

1906
misc/msvc/game.vcproj Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,21 +1,65 @@
¿
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual C++ Express 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ioq3", "ioq3.vcproj", "{0D5316E4-B20F-4E09-8989-3B9064358F0C}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cgame", "cgame.vcproj", "{C878E295-CB82-4B40-8ECF-5CE5525466FA}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "game", "game.vcproj", "{F9EE10DA-2404-4154-B904-F93C936C040A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "q3_ui", "q3_ui.vcproj", "{D454C4C7-7765-4149-ABAD-05FDEB9D94F8}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "quake3", "quake3.vcproj", "{81CB51C4-B434-4E12-B69B-BAEE102F2852}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ui", "ui.vcproj", "{A8EAC38E-C7DA-42F8-811D-77FD092B9D19}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug TA|Win32 = Debug TA|Win32
Debug|Win32 = Debug|Win32
Release TA|Win32 = Release TA|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0D5316E4-B20F-4E09-8989-3B9064358F0C}.Debug|Win32.ActiveCfg = Debug|Win32
{0D5316E4-B20F-4E09-8989-3B9064358F0C}.Debug|Win32.Build.0 = Debug|Win32
{0D5316E4-B20F-4E09-8989-3B9064358F0C}.Release|Win32.ActiveCfg = Release|Win32
{0D5316E4-B20F-4E09-8989-3B9064358F0C}.Release|Win32.Build.0 = Release|Win32
{C878E295-CB82-4B40-8ECF-5CE5525466FA}.Debug TA|Win32.ActiveCfg = Debug TA|Win32
{C878E295-CB82-4B40-8ECF-5CE5525466FA}.Debug TA|Win32.Build.0 = Debug TA|Win32
{C878E295-CB82-4B40-8ECF-5CE5525466FA}.Debug|Win32.ActiveCfg = Debug|Win32
{C878E295-CB82-4B40-8ECF-5CE5525466FA}.Debug|Win32.Build.0 = Debug|Win32
{C878E295-CB82-4B40-8ECF-5CE5525466FA}.Release TA|Win32.ActiveCfg = Release TA|Win32
{C878E295-CB82-4B40-8ECF-5CE5525466FA}.Release TA|Win32.Build.0 = Release TA|Win32
{C878E295-CB82-4B40-8ECF-5CE5525466FA}.Release|Win32.ActiveCfg = Release|Win32
{C878E295-CB82-4B40-8ECF-5CE5525466FA}.Release|Win32.Build.0 = Release|Win32
{F9EE10DA-2404-4154-B904-F93C936C040A}.Debug TA|Win32.ActiveCfg = Debug TA|Win32
{F9EE10DA-2404-4154-B904-F93C936C040A}.Debug TA|Win32.Build.0 = Debug TA|Win32
{F9EE10DA-2404-4154-B904-F93C936C040A}.Debug|Win32.ActiveCfg = Debug|Win32
{F9EE10DA-2404-4154-B904-F93C936C040A}.Debug|Win32.Build.0 = Debug|Win32
{F9EE10DA-2404-4154-B904-F93C936C040A}.Release TA|Win32.ActiveCfg = Release TA|Win32
{F9EE10DA-2404-4154-B904-F93C936C040A}.Release TA|Win32.Build.0 = Release TA|Win32
{F9EE10DA-2404-4154-B904-F93C936C040A}.Release|Win32.ActiveCfg = Release|Win32
{F9EE10DA-2404-4154-B904-F93C936C040A}.Release|Win32.Build.0 = Release|Win32
{D454C4C7-7765-4149-ABAD-05FDEB9D94F8}.Debug TA|Win32.ActiveCfg = Debug TA|Win32
{D454C4C7-7765-4149-ABAD-05FDEB9D94F8}.Debug TA|Win32.Build.0 = Debug TA|Win32
{D454C4C7-7765-4149-ABAD-05FDEB9D94F8}.Debug|Win32.ActiveCfg = Debug|Win32
{D454C4C7-7765-4149-ABAD-05FDEB9D94F8}.Debug|Win32.Build.0 = Debug|Win32
{D454C4C7-7765-4149-ABAD-05FDEB9D94F8}.Release TA|Win32.ActiveCfg = Release TA|Win32
{D454C4C7-7765-4149-ABAD-05FDEB9D94F8}.Release TA|Win32.Build.0 = Release TA|Win32
{D454C4C7-7765-4149-ABAD-05FDEB9D94F8}.Release|Win32.ActiveCfg = Release|Win32
{D454C4C7-7765-4149-ABAD-05FDEB9D94F8}.Release|Win32.Build.0 = Release|Win32
{81CB51C4-B434-4E12-B69B-BAEE102F2852}.Debug TA|Win32.ActiveCfg = Debug TA|Win32
{81CB51C4-B434-4E12-B69B-BAEE102F2852}.Debug TA|Win32.Build.0 = Debug TA|Win32
{81CB51C4-B434-4E12-B69B-BAEE102F2852}.Debug|Win32.ActiveCfg = Debug|Win32
{81CB51C4-B434-4E12-B69B-BAEE102F2852}.Debug|Win32.Build.0 = Debug|Win32
{81CB51C4-B434-4E12-B69B-BAEE102F2852}.Release TA|Win32.ActiveCfg = Release TA|Win32
{81CB51C4-B434-4E12-B69B-BAEE102F2852}.Release TA|Win32.Build.0 = Release TA|Win32
{81CB51C4-B434-4E12-B69B-BAEE102F2852}.Release|Win32.ActiveCfg = Release|Win32
{81CB51C4-B434-4E12-B69B-BAEE102F2852}.Release|Win32.Build.0 = Release|Win32
{A8EAC38E-C7DA-42F8-811D-77FD092B9D19}.Debug TA|Win32.ActiveCfg = Debug TA|Win32
{A8EAC38E-C7DA-42F8-811D-77FD092B9D19}.Debug TA|Win32.Build.0 = Debug TA|Win32
{A8EAC38E-C7DA-42F8-811D-77FD092B9D19}.Debug|Win32.ActiveCfg = Debug|Win32
{A8EAC38E-C7DA-42F8-811D-77FD092B9D19}.Debug|Win32.Build.0 = Debug|Win32
{A8EAC38E-C7DA-42F8-811D-77FD092B9D19}.Release TA|Win32.ActiveCfg = Release TA|Win32
{A8EAC38E-C7DA-42F8-811D-77FD092B9D19}.Release TA|Win32.Build.0 = Release TA|Win32
{A8EAC38E-C7DA-42F8-811D-77FD092B9D19}.Release|Win32.ActiveCfg = Release|Win32
{A8EAC38E-C7DA-42F8-811D-77FD092B9D19}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -1,65 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="ioq3"
ProjectGUID="{0D5316E4-B20F-4E09-8989-3B9064358F0C}"
RootNamespace="ioq3"
Keyword="MakeFileProj"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="../../build/$(ConfigurationName)-Win32-x86"
IntermediateDirectory="../../build/$(ConfigurationName)-Win32-x86"
ConfigurationType="0"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="make -C ../../ debug"
ReBuildCommandLine="make -C ../../ clean-debug debug"
CleanCommandLine="make -C ../../ clean-debug"
Output="$(Outdir)/ioquake3.x86.exe"
PreprocessorDefinitions=""
IncludeSearchPath=""
ForcedIncludes=""
AssemblySearchPath=""
ForcedUsingAssemblies=""
CompileAsManaged=""
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="../../build/$(ConfigurationName)-Win32-x86"
IntermediateDirectory="../../build/$(ConfigurationName)-Win32-x86"
ConfigurationType="0"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="make -C ../../ release"
ReBuildCommandLine="make -C ../../ clean-release release"
CleanCommandLine="make -C ../../ clean-release"
Output="$(Outdir)/ioquake3.x86.exe"
PreprocessorDefinitions=""
IncludeSearchPath=""
ForcedIncludes=""
AssemblySearchPath=""
ForcedUsingAssemblies=""
CompileAsManaged=""
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

3
misc/msvc/q3_ui.def Normal file
View File

@ -0,0 +1,3 @@
EXPORTS
vmMain
dllEntry

2481
misc/msvc/q3_ui.vcproj Normal file

File diff suppressed because it is too large Load Diff

2953
misc/msvc/quake3.vcproj Normal file

File diff suppressed because it is too large Load Diff

3
misc/msvc/ui.def Normal file
View File

@ -0,0 +1,3 @@
EXPORTS
vmMain
dllEntry

1026
misc/msvc/ui.vcproj Normal file

File diff suppressed because it is too large Load Diff