mirror of
https://github.com/UberGames/ioef.git
synced 2025-05-30 17:01:23 +00:00
* (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:
parent
881988636a
commit
31c24bd0d2
25 changed files with 10014 additions and 103 deletions
|
@ -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");
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue