Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* Merge unified-sdl to trunk
* Bump Q3_VERSION to 1.35
  • Loading branch information
timangus committed Sep 5, 2007
1 parent 39abffe commit 672cfbf
Show file tree
Hide file tree
Showing 188 changed files with 5,068 additions and 41,736 deletions.
201 changes: 79 additions & 122 deletions Makefile

Large diffs are not rendered by default.

40 changes: 12 additions & 28 deletions README
Expand Up @@ -10,7 +10,7 @@
The intent of this project is to provide a baseline Quake 3 which may be used
for further development. Some of the major features currently implemented are:

* SDL backend for unix-like operating systems
* SDL backend
* OpenAL sound API support (multiple speaker support and better sound
quality)
* Full x86_64 support on Linux
Expand Down Expand Up @@ -46,17 +46,7 @@ For *nix

For Windows, using MinGW
1. Download and install MinGW and MSys from http://www.mingw.org/.
2. Download http://www.libsdl.org/extras/win32/common/directx-devel.tar.gz
and untar it into your MinGW directory (usually C:\MinGW).
3. Open an MSys terminal, and follow the instructions for compiling on *nix.

For Windows, using MSVC
1. Run Visual Studio and open the quake3.sln file in the code/win32/msvc
directory.
2. Build.
3. Copy the resultant Quake3.exe to your quake 3 directory, make a backup if
you want to keep your original. If you wish to use native libraries, copy
the resultant dlls to your baseq3 directory.
2. Open an MSys terminal, and follow the instructions for compiling on *nix.

For Mac OS X, building a Universal Binary
1. Install the MacOSX10.2.8.sdk and MacOSX10.4u.sdk which are included in
Expand All @@ -68,7 +58,7 @@ For Mac OS X, building a Universal Binary

Installation, for *nix
1. Set the COPYDIR variable in the shell to be where you installed Quake 3
to. By default it will be /usr/local/games/quake3 if you haven't set it.
to. By default it will be /usr/local/games/quake3 if you haven't set it.
This is the path as used by the original Linux Q3 installer and subsequent
point releases.
2. Run 'make copyfiles'.
Expand All @@ -83,19 +73,17 @@ compiling is simply a case of using './cross-make-mingw.sh' in place of 'make',
though you may find you need to change the value of the variables in this
script to match your environment.

If the make based build system is being used (i.e. *nix or MinGW), the
following variables may be set, either on the command line or in
The following variables may be set, either on the command line or in
Makefile.local:

OPTIMIZE - use this for custom CFLAGS
CFLAGS - use this for custom CFLAGS
V - set to show cc command line when building
DEFAULT_BASEDIR - extra path to search for baseq3 and such
BUILD_SERVER - build the 'ioq3ded' server binary
BUILD_CLIENT - build the 'ioquake3' client binary
BUILD_CLIENT_SMP - build the 'ioquake3-smp' client binary
BUILD_GAME_SO - build the game shared libraries
BUILD_GAME_QVM - build the game qvms
USE_SDL - use the SDL backend where available
USE_OPENAL - use OpenAL where available
USE_OPENAL_DLOPEN - link with OpenAL at runtime
USE_CURL - use libcurl for http/ftp download support
Expand Down Expand Up @@ -140,15 +128,12 @@ New cvars
s_sdlDevSamps - SDL DMA buffer size override
s_sdlMixSamps - SDL mix buffer size override

ttycon_ansicolor - enable use of ANSI escape codes in the tty
r_GLlibCoolDownMsec - wait for some milliseconds to close GL
library
com_ansiColor - enable use of ANSI escape codes in the tty
com_altivec - enable use of altivec on PowerPC systems
s_backend - read only, indicates the current sound
backend
in_shiftedKeys - non-SDL Linux only; enables binding to
shifted keys
in_joystickNo - SDL only; select which joystick to use
s_muteWhenMinimized - mute sound when minimized
in_joystickNo - select which joystick to use
cl_consoleHistory - read only, stores the console history
cl_platformSensitivity - read only, indicates the mouse input
scaling
Expand Down Expand Up @@ -292,8 +277,8 @@ Multiuser Support on Windows systems
Note that this cvar MUST be set as a command line parameter.

SDL Keyboard Differences
ioquake3 clients built againt SDL (e.g. Linux and Mac OS X) have different
keyboard behaviour than the original Quake3 clients.
ioquake3 clients have different keyboard behaviour compared to the original
Quake3 clients.

* "Caps Lock" and "Num Lock" can not be used as normal binds since they
do not send a KEYUP event until the key is pressed again.
Expand Down Expand Up @@ -345,7 +330,7 @@ all.

The focus for ioquake3 to develop a stable base suitable for further
development, and provide players with the same Quake 3 experience they've had
for years. As such ioq3 does not have any significant graphical enhancements
for years. As such ioq3 does not have any significant graphical enhancements
and none are planned at this time. However, improved graphics and sound
patches will be accepted as long as they are entirely optional, do not
require new media and are off by default.
Expand All @@ -372,8 +357,7 @@ but we have some general guidelines:
providing pak0.pk3 and the patch pk3s are not refered to or included in the
installer.

* Please include at least an SDL so/dylib on every platform but Windows
(which doesn't use it yet).
* Please include at least an SDL so/dylib on every platform.

* Please include an OpenAL so/dylib/dll, since every platform should be using
it by now.
Expand Down
1 change: 0 additions & 1 deletion TODO
Expand Up @@ -19,7 +19,6 @@ MacOS X

For 1.35+:
* IPv6 support
* Replace windows DirectX backend with SDL
* Graphical "ioquake3" watermark in videos, optional, on by default
* Gamma stuff while recording videos.
* Application for OS X at least to launch mods with appropriate hunkmegs, etc.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions code/botlib/be_ai_chat.c
Expand Up @@ -1439,7 +1439,7 @@ int StringsMatch(bot_matchpiece_t *pieces, bot_match_t *match)
//if the last piece was a variable string
if (lastvariable >= 0)
{
assert( match->variables[lastvariable].offset >= 0 ); // bk001204
assert( match->variables[lastvariable].offset >= 0 );
match->variables[lastvariable].length =
strlen(&match->string[ (int) match->variables[lastvariable].offset]);
} //end if
Expand Down Expand Up @@ -1500,7 +1500,7 @@ void BotMatchVariable(bot_match_t *match, int variable, char *buf, int size)
{
if (match->variables[variable].length < size)
size = match->variables[variable].length+1;
assert( match->variables[variable].offset >= 0 ); // bk001204
assert( match->variables[variable].offset >= 0 );
strncpy(buf, &match->string[ (int) match->variables[variable].offset], size-1);
buf[size-1] = '\0';
} //end if
Expand Down Expand Up @@ -2316,7 +2316,7 @@ int BotExpandChatMessage(char *outmessage, char *message, unsigned long mcontext
} //end if
if (match->variables[num].offset >= 0)
{
assert( match->variables[num].offset >= 0 ); // bk001204
assert( match->variables[num].offset >= 0 );
ptr = &match->string[ (int) match->variables[num].offset];
for (i = 0; i < match->variables[num].length; i++)
{
Expand Down
18 changes: 9 additions & 9 deletions code/botlib/be_ai_goal.c
Expand Up @@ -176,22 +176,22 @@ typedef struct bot_goalstate_s
float avoidgoaltimes[MAX_AVOIDGOALS]; //times to avoid the goals
} bot_goalstate_t;

bot_goalstate_t *botgoalstates[MAX_CLIENTS + 1]; // bk001206 - FIXME: init?
bot_goalstate_t *botgoalstates[MAX_CLIENTS + 1]; // FIXME: init?
//item configuration
itemconfig_t *itemconfig = NULL; // bk001206 - init
itemconfig_t *itemconfig = NULL;
//level items
levelitem_t *levelitemheap = NULL; // bk001206 - init
levelitem_t *freelevelitems = NULL; // bk001206 - init
levelitem_t *levelitems = NULL; // bk001206 - init
levelitem_t *levelitemheap = NULL;
levelitem_t *freelevelitems = NULL;
levelitem_t *levelitems = NULL;
int numlevelitems = 0;
//map locations
maplocation_t *maplocations = NULL; // bk001206 - init
maplocation_t *maplocations = NULL;
//camp spots
campspot_t *campspots = NULL; // bk001206 - init
campspot_t *campspots = NULL;
//the game type
int g_gametype = 0; // bk001206 - init
int g_gametype = 0;
//additional dropped item weight
libvar_t *droppedweight = NULL; // bk001206 - init
libvar_t *droppedweight = NULL;

//========================================================================
//
Expand Down
2 changes: 0 additions & 2 deletions code/botlib/be_ai_move.c
Expand Up @@ -51,8 +51,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//#define DEBUG_ELEVATOR
//#define DEBUG_GRAPPLE

// bk001204 - redundant bot_avoidspot_t, see be_ai_move.h

//movement state
//NOTE: the moveflags MFL_ONGROUND, MFL_TELEPORTED, MFL_WATERJUMP and
// MFL_GRAPPLEPULL must be set outside the movement code
Expand Down
2 changes: 0 additions & 2 deletions code/botlib/be_ai_move.h
Expand Up @@ -102,8 +102,6 @@ typedef struct bot_moveresult_s

#define bot_moveresult_t_cleared(x) bot_moveresult_t (x) = {0, 0, 0, 0, 0, 0, 0, {0, 0, 0}, {0, 0, 0}}

// bk001204: from code/botlib/be_ai_move.c
// TTimo 04/12/2001 was moved here to avoid dup defines
typedef struct bot_avoidspot_s
{
vec3_t origin;
Expand Down
2 changes: 1 addition & 1 deletion code/botlib/be_ai_weap.c
Expand Up @@ -51,7 +51,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define WEAPON_OFS(x) (size_t)&(((weaponinfo_t *)0)->x)
#define PROJECTILE_OFS(x) (size_t)&(((projectileinfo_t *)0)->x)

//weapon definition // bk001212 - static
//weapon definition
static fielddef_t weaponinfo_fields[] =
{
{"number", WEAPON_OFS(number), FT_INT}, //weapon number
Expand Down
10 changes: 5 additions & 5 deletions code/botlib/be_interface.c
Expand Up @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/

/*****************************************************************************
* name: be_interface.c // bk010221 - FIXME - DEAD code elimination
* name: be_interface.c
*
* desc: bot library interface
*
Expand Down Expand Up @@ -140,7 +140,7 @@ int Export_BotLibSetup(void)
char *homedir, *gamedir;

bot_developer = LibVarGetValue("bot_developer");
memset( &botlibglobals, 0, sizeof(botlibglobals) ); // bk001207 - init
memset( &botlibglobals, 0, sizeof(botlibglobals) );
//initialize byte swapping (litte endian etc.)
// Swap_Init();
homedir = LibVarGetString("homedir");
Expand Down Expand Up @@ -860,9 +860,9 @@ GetBotLibAPI
============
*/
botlib_export_t *GetBotLibAPI(int apiVersion, botlib_import_t *import) {
assert(import); // bk001129 - this wasn't set for baseq3/
botimport = *import;
assert(botimport.Print); // bk001129 - pars pro toto
assert(import);
botimport = *import;
assert(botimport.Print);

Com_Memset( &be_botlib_export, 0, sizeof( be_botlib_export ) );

Expand Down
2 changes: 1 addition & 1 deletion code/botlib/l_memory.c
Expand Up @@ -100,7 +100,7 @@ void *GetMemory(unsigned long size)
{
void *ptr;
memoryblock_t *block;
assert(botimport.GetMemory); // bk001129 - was NULL'ed
assert(botimport.GetMemory);
ptr = botimport.GetMemory(size + sizeof(memoryblock_t));
block = (memoryblock_t *) ptr;
block->id = MEM_ID;
Expand Down
2 changes: 1 addition & 1 deletion code/botlib/l_precomp.c
Expand Up @@ -669,7 +669,7 @@ void PC_AddBuiltinDefines(source_t *source)
{
char *string;
int builtin;
} builtin[] = { // bk001204 - brackets
} builtin[] = {
{ "__LINE__", BUILTIN_LINE },
{ "__FILE__", BUILTIN_FILE },
{ "__DATE__", BUILTIN_DATE },
Expand Down
4 changes: 2 additions & 2 deletions code/botlib/l_script.c
Expand Up @@ -706,14 +706,14 @@ int PS_ReadNumber(script_t *script, token_t *token)
{
c = *script->script_p;
//check for a LONG number
if ( (c == 'l' || c == 'L') // bk001204 - brackets
if ( (c == 'l' || c == 'L')
&& !(token->subtype & TT_LONG))
{
script->script_p++;
token->subtype |= TT_LONG;
} //end if
//check for an UNSIGNED number
else if ( (c == 'u' || c == 'U') // bk001204 - brackets
else if ( (c == 'u' || c == 'U')
&& !(token->subtype & (TT_UNSIGNED | TT_FLOAT)))
{
script->script_p++;
Expand Down
10 changes: 5 additions & 5 deletions code/cgame/cg_draw.c
Expand Up @@ -1596,18 +1596,18 @@ static void CG_DrawDisconnect( void ) {
int cmdNum;
usercmd_t cmd;
const char *s;
int w; // bk010215 - FIXME char message[1024];
int w;

// draw the phone jack if we are completely past our buffers
cmdNum = trap_GetCurrentCmdNumber() - CMD_BACKUP + 1;
trap_GetUserCmd( cmdNum, &cmd );
if ( cmd.serverTime <= cg.snap->ps.commandTime
|| cmd.serverTime > cg.time ) { // special check for map_restart // bk 0102165 - FIXME
|| cmd.serverTime > cg.time ) { // special check for map_restart
return;
}

// also add text in center of screen
s = "Connection Interrupted"; // bk 010215 - FIXME
s = "Connection Interrupted";
w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH;
CG_DrawBigString( 320 - w/2, 100, s, 1.0F);

Expand Down Expand Up @@ -1786,8 +1786,8 @@ static void CG_DrawCenterString( void ) {
char *start;
int l;
int x, y, w;
#ifdef MISSIONPACK // bk010221 - unused else
int h;
#ifdef MISSIONPACK
int h;
#endif
float *color;

Expand Down
8 changes: 2 additions & 6 deletions code/cgame/cg_drawtools.c
Expand Up @@ -431,10 +431,6 @@ void CG_ColorForHealth( vec4_t hcolor ) {
}




// bk001205 - code below duplicated in q3_ui/ui-atoms.c
// bk001205 - FIXME: does this belong in ui_shared.c?
/*
=================
UI_DrawProportionalString2
Expand Down Expand Up @@ -594,7 +590,7 @@ UI_DrawBannerString
static void UI_DrawBannerString2( int x, int y, const char* str, vec4_t color )
{
const char* s;
unsigned char ch; // bk001204 : array subscript
unsigned char ch;
float ax;
float ay;
float aw;
Expand Down Expand Up @@ -704,7 +700,7 @@ int UI_ProportionalStringWidth( const char* str ) {
static void UI_DrawProportionalString2( int x, int y, const char* str, vec4_t color, float sizeScale, qhandle_t charset )
{
const char* s;
unsigned char ch; // bk001204 - unsigned
unsigned char ch;
float ax;
float ay;
float aw;
Expand Down
2 changes: 1 addition & 1 deletion code/cgame/cg_event.c
Expand Up @@ -25,7 +25,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "cg_local.h"

// for the voice chats
#ifdef MISSIONPACK // bk001205
#ifdef MISSIONPACK
#include "../../ui/menudef.h"
#endif
//==========================================================================
Expand Down
2 changes: 1 addition & 1 deletion code/cgame/cg_local.h
Expand Up @@ -1635,7 +1635,7 @@ typedef enum {
SYSTEM_PRINT,
CHAT_PRINT,
TEAMCHAT_PRINT
} q3print_t; // bk001201 - warning: useless keyword or type name in empty declaration
} q3print_t;


int trap_CIN_PlayCinematic( const char *arg0, int xpos, int ypos, int width, int height, int bits);
Expand Down
6 changes: 3 additions & 3 deletions code/cgame/cg_main.c
Expand Up @@ -204,7 +204,7 @@ typedef struct {
int cvarFlags;
} cvarTable_t;

static cvarTable_t cvarTable[] = { // bk001129
static cvarTable_t cvarTable[] = {
{ &cg_ignore, "cg_ignore", "0", 0 }, // used for debugging
{ &cg_autoswitch, "cg_autoswitch", "1", CVAR_ARCHIVE },
{ &cg_drawGun, "cg_drawGun", "1", CVAR_ARCHIVE },
Expand Down Expand Up @@ -1357,7 +1357,7 @@ qboolean CG_Asset_Parse(int handle) {
continue;
}
}
return qfalse; // bk001204 - why not?
return qfalse;
}

void CG_ParseMenu(const char *menuFile) {
Expand Down Expand Up @@ -1690,7 +1690,7 @@ static void CG_FeederSelection(float feederID, int index) {
}
#endif

#ifdef MISSIONPACK // bk001204 - only needed there
#ifdef MISSIONPACK
static float CG_Cvar_Get(const char *cvar) {
char buff[128];
memset(buff, 0, sizeof(buff));
Expand Down

0 comments on commit 672cfbf

Please sign in to comment.