diff options
author | Tim Angus <tim@ngus.net> | 2005-06-27 00:25:17 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2005-06-27 00:25:17 +0000 |
commit | dcce2065d01d3e4b175fcb4efe8ad2aa787c8c05 (patch) | |
tree | 376a9ad66e1dfe748ca3422a9bd5f7693b282cdd /src | |
parent | 2225bfe3b44d5f73976cc3aa17e1aa766fc57148 (diff) |
* Fixed all the warnings reported after turning on -Wall
Diffstat (limited to 'src')
34 files changed, 118 insertions, 798 deletions
diff --git a/src/cgame/cg_animmapobj.c b/src/cgame/cg_animmapobj.c index 2fc98bc6..6913721d 100644 --- a/src/cgame/cg_animmapobj.c +++ b/src/cgame/cg_animmapobj.c @@ -125,13 +125,8 @@ void CG_ModelDoor( centity_t *cent ) { refEntity_t ent; entityState_t *es; - vec3_t mins, maxs, size, rotSize; - vec3_t cMins, cMaxs, displacement; - vec3_t bMaxs, scale; animation_t anim; lerpFrame_t *lf = ¢->lerpFrame; - float temp; - es = ¢->currentState; diff --git a/src/cgame/cg_buildable.c b/src/cgame/cg_buildable.c index b027503a..b87483e6 100644 --- a/src/cgame/cg_buildable.c +++ b/src/cgame/cg_buildable.c @@ -80,7 +80,7 @@ void CG_AlienBuildableExplosion( vec3_t origin, vec3_t dir ) { vec3_t velocity; particleSystem_t *ps; - qhandle_t gibModel; + qhandle_t gibModel = cgs.media.alienGib1; int i; trap_S_StartSound( origin, ENTITYNUM_WORLD, CHAN_AUTO, cgs.media.alienBuildableExplosion ); @@ -162,7 +162,7 @@ void CG_HumanBuildableExplosion( vec3_t origin, vec3_t dir ) vec3_t lightColor, fragOrigin, velocity; localEntity_t *le; int i; - qhandle_t gibModel; + qhandle_t gibModel = cgs.media.metalGib1; particleSystem_t *ps; lightColor[ 0 ] = 1; @@ -220,14 +220,10 @@ CG_Creep */ static void CG_Creep( centity_t *cent ) { - polyVert_t verts[ 4 ]; - vec3_t square[ 4 ]; - vec2_t tex[ 4 ]; - int i, msec, seed; - float size, newsize, frac; - float length; - trace_t tr, tr2; - vec3_t temp, origin, p1, p2; + int msec; + float size, frac; + trace_t tr; + vec3_t temp, origin; int scaleUpTime = BG_FindBuildTimeForBuildable( cent->currentState.modelindex ); int time; @@ -276,7 +272,7 @@ models/buildables/hivemind/animation.cfg, etc */ static qboolean CG_ParseBuildableAnimationFile( const char *filename, buildable_t buildable ) { - char *text_p, *prev; + char *text_p; int len; int i; char *token; @@ -367,7 +363,7 @@ sound/buildables/hivemind/sound.cfg, etc */ static qboolean CG_ParseBuildableSoundFile( const char *filename, buildable_t buildable ) { - char *text_p, *prev; + char *text_p; int len; int i; char *token; @@ -471,7 +467,7 @@ void CG_InitBuildables( ) //models for( j = 0; j <= 3; j++ ) { - if( modelFile = BG_FindModelsForBuildable( i, j ) ) + if( ( modelFile = BG_FindModelsForBuildable( i, j ) ) ) cg_buildables[ i ].models[ j ] = trap_R_RegisterModel( modelFile ); } @@ -754,9 +750,8 @@ void CG_GhostBuildable( buildable_t buildable ) { refEntity_t ent; playerState_t *ps; - vec3_t angles, forward, player_origin, entity_origin, target_origin, normal, cross; - vec3_t mins, maxs, start, end; - float distance; + vec3_t angles, entity_origin; + vec3_t mins, maxs; trace_t tr; ps = &cg.predictedPlayerState; @@ -921,7 +916,7 @@ void CG_Buildable( centity_t *cent ) refEntity_t ent; entityState_t *es = ¢->currentState; vec3_t angles; - vec3_t forward, surfNormal, xNormal, mins, maxs; + vec3_t surfNormal, xNormal, mins, maxs; vec3_t refNormal = { 0.0f, 0.0f, 1.0f }; float rotAngle; buildableTeam_t team = BG_FindTeamForBuildable( es->modelindex ); @@ -966,7 +961,7 @@ void CG_Buildable( centity_t *cent ) if( !( es->generic1 & B_SPAWNED_TOGGLEBIT ) ) { - sfxHandle_t prebuildSound; + sfxHandle_t prebuildSound = cgs.media.humanBuildablePrebuild; if( team == BIT_HUMANS ) { diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c index a2b2186f..7d2fbedd 100644 --- a/src/cgame/cg_draw.c +++ b/src/cgame/cg_draw.c @@ -17,6 +17,7 @@ */ #include "cg_local.h" +#include "../ui/ui_shared.h" // used for scoreboard extern displayContextDef_t cgDC; @@ -1419,7 +1420,6 @@ void CG_DrawLoadingScreen( void ) float CG_GetValue( int ownerDraw ) { centity_t *cent; - clientInfo_t *ci; playerState_t *ps; cent = &cg_entities[ cg.snap->ps.clientNum ]; @@ -1753,7 +1753,7 @@ CG_DrawTimerMins */ static void CG_DrawTimerMins( rectDef_t *rect, vec4_t color ) { - int mins, seconds, tens; + int mins, seconds; int msec; if( !cg_drawTimer.integer ) @@ -1778,7 +1778,7 @@ CG_DrawTimerSecs */ static void CG_DrawTimerSecs( rectDef_t *rect, vec4_t color ) { - int mins, seconds, tens; + int mins, seconds; int msec; if( !cg_drawTimer.integer ) @@ -2265,7 +2265,6 @@ static void CG_DrawCrosshair( void ) { float w, h; qhandle_t hShader; - float f; float x, y; weaponInfo_t *wi; diff --git a/src/cgame/cg_ents.c b/src/cgame/cg_ents.c index 1b4a1639..d3672465 100644 --- a/src/cgame/cg_ents.c +++ b/src/cgame/cg_ents.c @@ -350,9 +350,6 @@ static void CG_Missile( centity_t *cent ) refEntity_t ent; entityState_t *es; const weaponInfo_t *wi; - vec3_t up; - float fraction; - int index; weapon_t weapon; weaponMode_t weaponMode; const weaponInfoMode_t *wim; diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h index 6b93f142..61c15f95 100644 --- a/src/cgame/cg_local.h +++ b/src/cgame/cg_local.h @@ -1506,6 +1506,7 @@ void CG_SetScoreSelection( void *menu ); void CG_BuildSpectatorString( ); qboolean CG_FileExists( char *filename ); +void CG_RemoveConsoleLine( void ); // @@ -1893,6 +1894,13 @@ void trap_CM_TransformedBoxTrace( trace_t *results, const vec3_t start, const vec3_t mins, const vec3_t maxs, clipHandle_t model, int brushmask, const vec3_t origin, const vec3_t angles ); +void trap_CM_CapsuleTrace( trace_t *results, const vec3_t start, const vec3_t end, + const vec3_t mins, const vec3_t maxs, + clipHandle_t model, int brushmask ); +void trap_CM_TransformedCapsuleTrace( trace_t *results, const vec3_t start, const vec3_t end, + const vec3_t mins, const vec3_t maxs, + clipHandle_t model, int brushmask, + const vec3_t origin, const vec3_t angles ); // Returns the projection of a polygon onto the solid brushes in the world int trap_CM_MarkFragments( int numPoints, const vec3_t *points, diff --git a/src/cgame/cg_main.c b/src/cgame/cg_main.c index 1ca58707..17772d30 100644 --- a/src/cgame/cg_main.c +++ b/src/cgame/cg_main.c @@ -969,8 +969,6 @@ CG_RegisterClients */ static void CG_RegisterClients( void ) { - char buffer[ MAX_INFO_STRING ]; - char *s; int i; cg.charModelFraction = 0.0f; diff --git a/src/cgame/cg_particles.c b/src/cgame/cg_particles.c index 7f4ac64c..4b302b01 100644 --- a/src/cgame/cg_particles.c +++ b/src/cgame/cg_particles.c @@ -114,7 +114,7 @@ Introduce a new particle into the world */ static particle_t *CG_SpawnNewParticle( baseParticle_t *bp, particleEjector_t *parent ) { - int i, j, start; + int i, j; particle_t *p = NULL; particleEjector_t *pe = parent; particleSystem_t *ps = parent->parent; @@ -382,7 +382,7 @@ Allocate a new particle ejector static particleEjector_t *CG_SpawnNewParticleEjector( baseParticleEjector_t *bpe, particleSystem_t *parent ) { - int i, start; + int i; particleEjector_t *pe = NULL; particleSystem_t *ps = parent; @@ -429,7 +429,7 @@ Allocate a new particle system */ particleSystem_t *CG_SpawnNewParticleSystem( qhandle_t psHandle ) { - int i, j, start; + int i, j; particleSystem_t *ps = NULL; baseParticleSystem_t *bps = &baseParticleSystems[ psHandle - 1 ]; @@ -1234,7 +1234,6 @@ Parse a particle system section static qboolean CG_ParseParticleSystem( baseParticleSystem_t *bps, char **text_p ) { char *token; - int i; baseParticleEjector_t *bpe; // read optional parameters @@ -2097,7 +2096,7 @@ Actually render a particle static void CG_RenderParticle( particle_t *p ) { refEntity_t re; - float timeFrac, frac; + float timeFrac; int index; baseParticle_t *bp = p->class; vec3_t alight, dlight, lightdir; diff --git a/src/cgame/cg_players.c b/src/cgame/cg_players.c index 0dadbb8f..280675ca 100644 --- a/src/cgame/cg_players.c +++ b/src/cgame/cg_players.c @@ -716,8 +716,6 @@ void CG_PrecacheClientInfo( pClass_t class, char *model, char *skin ) { clientInfo_t *ci; clientInfo_t newInfo; - const char *v; - char *slash; ci = &cgs.corpseinfo[ class ]; @@ -1438,11 +1436,9 @@ Resolve angles for non-segmented models static void CG_PlayerNonSegAngles( centity_t *cent, vec3_t srcAngles, vec3_t nonSegAxis[ 3 ] ) { vec3_t localAngles; - float dest; vec3_t velocity; float speed; - int dir, clientNum; - clientInfo_t *ci; + int dir; entityState_t *es = ¢->currentState; vec3_t surfNormal; vec3_t ceilingNormal = { 0.0f, 0.0f, -1.0f }; @@ -1966,12 +1962,12 @@ CG_LightFromDirection */ int CG_LightFromDirection( vec3_t point, vec3_t direction ) { - int i, j; + int j; float incoming; - vec3_t ambientLight; - vec3_t lightDir; - vec3_t directedLight; - vec3_t result; + vec3_t ambientLight; + vec3_t lightDir; + vec3_t directedLight; + vec3_t result; trap_R_LightForPoint( point, ambientLight, directedLight, lightDir ); @@ -2056,7 +2052,6 @@ void CG_Player( centity_t *cent ) vec3_t tempAxis[ 3 ], tempAxis2[ 3 ]; vec3_t angles; int held = es->modelindex; - pTeam_t team = es->powerups & 0xFF; vec3_t surfNormal = { 0.0f, 0.0f, 1.0f }; // the client number is stored in clientNum. It can't be derived diff --git a/src/cgame/cg_playerstate.c b/src/cgame/cg_playerstate.c index 68a0a2f1..df568cdd 100644 --- a/src/cgame/cg_playerstate.c +++ b/src/cgame/cg_playerstate.c @@ -234,8 +234,7 @@ CG_CheckLocalSounds */ void CG_CheckLocalSounds( playerState_t *ps, playerState_t *ops ) { - int highScore, health, armor, reward; - sfxHandle_t sfx; + int reward; // don't play the sounds if the player just changed teams if( ps->persistant[ PERS_TEAM ] != ops->persistant[ PERS_TEAM ] ) diff --git a/src/cgame/cg_servercmds.c b/src/cgame/cg_servercmds.c index 627642c2..f01382ec 100644 --- a/src/cgame/cg_servercmds.c +++ b/src/cgame/cg_servercmds.c @@ -27,7 +27,7 @@ CG_ParseScores */ static void CG_ParseScores( void ) { - int i, powerups; + int i; cg.numScores = atoi( CG_Argv( 1 ) ); @@ -54,7 +54,7 @@ static void CG_ParseScores( void ) cg.scores[ i ].client = 0; cgs.clientinfo[ cg.scores[ i ].client ].score = cg.scores[ i ].score; - cgs.clientinfo[ cg.scores[ i ].client ].powerups = powerups; + cgs.clientinfo[ cg.scores[ i ].client ].powerups = 0; cg.scores[ i ].team = cgs.clientinfo[ cg.scores[ i ].client ].team; } @@ -141,8 +141,6 @@ Called on load to set the initial values from configure strings */ void CG_SetConfigValues( void ) { - const char *s; - cgs.scores1 = atoi( CG_ConfigString( CS_SCORES1 ) ); cgs.scores2 = atoi( CG_ConfigString( CS_SCORES2 ) ); diff --git a/src/cgame/cg_view.c b/src/cgame/cg_view.c index d3173024..e88bb8f8 100644 --- a/src/cgame/cg_view.c +++ b/src/cgame/cg_view.c @@ -382,7 +382,6 @@ static void CG_OffsetFirstPersonView( void ) float bob2; vec3_t normal, baseOrigin; playerState_t *ps = &cg.predictedPlayerState; - centity_t *cent = &cg.predictedPlayerEntity; if( ps->stats[ STAT_STATE ] & SS_WALLCLIMBING ) { @@ -708,8 +707,6 @@ static int CG_CalcFov( void ) float f; int inwater; int attribFov; - int a; - float b; if( cg.predictedPlayerState.pm_type == PM_INTERMISSION || ( cg.snap->ps.persistant[ PERS_TEAM ] == TEAM_SPECTATOR ) ) diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c index 3c4e1d3e..e9622edb 100644 --- a/src/cgame/cg_weapons.c +++ b/src/cgame/cg_weapons.c @@ -227,8 +227,6 @@ The server says this item is used on this level void CG_RegisterUpgrade( int upgradeNum ) { upgradeInfo_t *upgradeInfo; - char path[MAX_QPATH]; - int i; char *icon; upgradeInfo = &cg_upgrades[ upgradeNum ]; @@ -247,7 +245,7 @@ void CG_RegisterUpgrade( int upgradeNum ) upgradeInfo->humanName = BG_FindHumanNameForUpgrade( upgradeNum ); - if( icon = BG_FindIconForUpgrade( upgradeNum ) ) + if( ( icon = BG_FindIconForUpgrade( upgradeNum ) ) ) upgradeInfo->upgradeIcon = trap_R_RegisterShader( icon ); } @@ -279,7 +277,6 @@ Parse a weapon mode section static qboolean CG_ParseWeaponModeSection( weaponInfoMode_t *wim, char **text_p ) { char *token; - float number, randFrac; int i; // read optional parameters @@ -651,7 +648,6 @@ Parses a configuration file describing a weapon static qboolean CG_ParseWeaponFile( const char *filename, weaponInfo_t *wi ) { char *text_p; - int i; int len; char *token; char text[ 20000 ]; @@ -826,7 +822,6 @@ void CG_RegisterWeapon( int weaponNum ) char path[ MAX_QPATH ]; vec3_t mins, maxs; int i; - char *icon, *model; weaponInfo = &cg_weapons[ weaponNum ]; @@ -1037,7 +1032,6 @@ void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent weaponMode_t weaponMode; weaponInfo_t *weapon; centity_t *nonPredictedCent; - pTeam_t team = cent->currentState.powerups & 0xFF; qboolean noGunModel; weaponNum = cent->currentState.weapon; @@ -1358,7 +1352,7 @@ void CG_DrawItemSelect( rectDef_t *rect, vec4_t color ) int height = rect->h; int iconsize; int items[ 64 ]; - int numItems = 0, selectedItem; + int numItems = 0, selectedItem = 0; int length; int selectWindow; qboolean vertical; @@ -1471,7 +1465,7 @@ void CG_DrawItemSelectText( rectDef_t *rect, float scale, int textStyle ) if( cg_weapons[ cg.weaponSelect ].registered && BG_InventoryContainsWeapon( cg.weaponSelect, cg.snap->ps.stats ) ) { - if( name = cg_weapons[ cg.weaponSelect ].humanName ) + if( ( name = cg_weapons[ cg.weaponSelect ].humanName ) ) { w = CG_Text_Width( name, scale, 0 ); x = rect->x + rect->w / 2; @@ -1484,7 +1478,7 @@ void CG_DrawItemSelectText( rectDef_t *rect, float scale, int textStyle ) if( cg_upgrades[ cg.weaponSelect - 32 ].registered && BG_InventoryContainsUpgrade( cg.weaponSelect - 32, cg.snap->ps.stats ) ) { - if( name = cg_upgrades[ cg.weaponSelect - 32 ].humanName ) + if( ( name = cg_upgrades[ cg.weaponSelect - 32 ].humanName ) ) { w = CG_Text_Width( name, scale, 0 ); x = rect->x + rect->w / 2; @@ -1750,7 +1744,6 @@ void CG_MissileHitWall( weapon_t weaponNum, weaponMode_t weaponMode, int clientN float light = 0.0f; vec3_t lightColor = { 0.0f, 0.0f, 0.0f }; localEntity_t *le; - weaponMode_t mode; weaponInfo_t *weapon = &cg_weapons[ weaponNum ]; mark = weapon->wim[ weaponMode ].impactMark; @@ -1828,7 +1821,6 @@ CG_MissileHitPlayer */ void CG_MissileHitPlayer( weapon_t weaponNum, weaponMode_t weaponMode, vec3_t origin, vec3_t dir, int entityNum ) { - weaponMode_t mode; weaponInfo_t *weapon = &cg_weapons[ weaponNum ]; CG_Bleed( origin, entityNum ); @@ -1978,7 +1970,6 @@ Renders bullet effects. */ void CG_Bullet( vec3_t end, int sourceEntityNum, vec3_t normal, qboolean flesh, int fleshEntityNum ) { - trace_t trace; vec3_t start; // if the shooter is currently valid, calc a source point and possibly @@ -2063,9 +2054,7 @@ CG_ShotgunFire */ void CG_ShotgunFire( entityState_t *es ) { - vec3_t up; vec3_t v; - int contents; VectorSubtract( es->origin2, es->pos.trBase, v ); VectorNormalize( v ); diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c index 9c756e54..498db049 100644 --- a/src/game/bg_misc.c +++ b/src/game/bg_misc.c @@ -18,6 +18,12 @@ #include "q_shared.h" #include "bg_public.h" +int trap_FS_FOpenFile( const char *qpath, fileHandle_t *f, fsMode_t mode ); +void trap_FS_Read( void *buffer, int len, fileHandle_t f ); +void trap_FS_Write( const void *buffer, int len, fileHandle_t f ); +void trap_FS_FCloseFile( fileHandle_t f ); +void trap_FS_Seek( fileHandle_t f, long offset, fsOrigin_t origin ); // fsOrigin_t + buildableAttributes_t bg_buildableList[ ] = { { @@ -1261,7 +1267,6 @@ static qboolean BG_ParseBuildableFile( const char *filename, buildableAttributeO char *token; char text[ 20000 ]; fileHandle_t f; - float scale = 0.0f; // load the file @@ -4479,7 +4484,6 @@ and after local prediction on the client void BG_PlayerStateToEntityState( playerState_t *ps, entityState_t *s, qboolean snap ) { int i; - vec3_t ceilingNormal = { 0, 0, -1 }; if( ps->pm_type == PM_INTERMISSION || ps->pm_type == PM_SPECTATOR || ps->pm_type == PM_FREEZE ) s->eType = ET_INVISIBLE; @@ -4584,7 +4588,6 @@ and after local prediction on the client void BG_PlayerStateToEntityStateExtraPolate( playerState_t *ps, entityState_t *s, int time, qboolean snap ) { int i; - vec3_t ceilingNormal = { 0, 0, -1 }; if( ps->pm_type == PM_INTERMISSION || ps->pm_type == PM_SPECTATOR || ps->pm_type == PM_FREEZE ) s->eType = ET_INVISIBLE; diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c index b2606c23..b28366be 100644 --- a/src/game/bg_pmove.c +++ b/src/game/bg_pmove.c @@ -344,7 +344,6 @@ static float PM_CmdScale( usercmd_t *cmd ) float total; float scale; float modifier = 1.0f; - int aForward, aRight; if( pm->ps->stats[ STAT_PTEAM ] == PTE_HUMANS && pm->ps->pm_type == PM_NORMAL ) { @@ -545,7 +544,7 @@ PM_CheckWallJump */ static qboolean PM_CheckWallJump( void ) { - vec3_t dir, forward, right, temp; + vec3_t dir, forward, right; vec3_t refNormal = { 0.0f, 0.0f, 1.0f }; float normalFraction = 1.5f; float cmdFraction = 1.0f; @@ -1025,34 +1024,6 @@ static void PM_AirMove( void ) /* =================== -PM_GrappleMove - -=================== -*/ -static void PM_GrappleMove( void ) -{ - vec3_t vel, v; - float vlen; - - VectorScale( pml.forward, -16, v ); - VectorAdd( pm->ps->grapplePoint, v, v ); - VectorSubtract( v, pm->ps->origin, vel ); - vlen = VectorLength( vel ); - VectorNormalize( vel ); - - if( vlen <= 100 ) - VectorScale( vel, 10 * vlen, vel ); - else - VectorScale( vel, 800, vel ); - - VectorCopy( vel, pm->ps->velocity ); - - pml.groundPlane = qfalse; -} - - -/* -=================== PM_ClimbMove =================== @@ -2009,11 +1980,10 @@ PM_GroundTrace */ static void PM_GroundTrace( void ) { - vec3_t point, srotAxis; + vec3_t point; vec3_t movedir; vec3_t refNormal = { 0.0f, 0.0f, 1.0f }; trace_t trace; - float srotAngle; if( BG_ClassHasAbility( pm->ps->stats[ STAT_PCLASS ], SCA_WALLCLIMBER ) ) { diff --git a/src/game/g_active.c b/src/game/g_active.c index 820586d9..b12f1e41 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -507,7 +507,7 @@ void ClientTimerActions( gentity_t *ent, int msec ) //client is charging up for a pounce if( client->ps.weapon == WP_ALEVEL3 || client->ps.weapon == WP_ALEVEL3_UPG ) { - int pounceSpeed; + int pounceSpeed = 0; if( client->ps.weapon == WP_ALEVEL3 ) pounceSpeed = LEVEL3_POUNCE_SPEED; @@ -641,7 +641,7 @@ void ClientTimerActions( gentity_t *ent, int msec ) { int i; int seconds = ( ( level.time - client->lastPoisonTime ) / 1000 ) + 1; - int damage = ALIEN_POISON_DMG, damage2; + int damage = ALIEN_POISON_DMG, damage2 = 0; for( i = 0; i < seconds; i++ ) { @@ -662,7 +662,7 @@ void ClientTimerActions( gentity_t *ent, int msec ) { int entityList[ MAX_GENTITIES ]; vec3_t range = { LEVEL4_REGEN_RANGE, LEVEL4_REGEN_RANGE, LEVEL4_REGEN_RANGE }; - vec3_t mins, maxs, dir; + vec3_t mins, maxs; int i, num; gentity_t *alienPlayer; float modifier = 1.0f; @@ -743,13 +743,12 @@ but any server game effects are handled here */ void ClientEvents( gentity_t *ent, int oldEventSequence ) { - int i, j; + int i; int event; gclient_t *client; int damage; vec3_t dir; vec3_t point, mins; - gentity_t *drop; float fallDistance; pClass_t class; @@ -842,56 +841,6 @@ void ClientEvents( gentity_t *ent, int oldEventSequence ) } } -/* -============== -StuckInOtherClient -============== -*/ -static int StuckInOtherClient( gentity_t *ent ) -{ - int i; - gentity_t *ent2; - - ent2 = &g_entities[ 0 ]; - - for( i = 0; i < MAX_CLIENTS; i++, ent2++ ) - { - if( ent2 == ent ) - continue; - - if( !ent2->inuse ) - continue; - - if( !ent2->client ) - continue; - - if( ent2->health <= 0 ) - continue; - - // - if( ent2->r.absmin[ 0 ] > ent->r.absmax[ 0 ] ) - continue; - - if( ent2->r.absmin[ 1 ] > ent->r.absmax[ 1 ] ) - continue; - - if( ent2->r.absmin[ 2 ] > ent->r.absmax[ 2 ] ) - continue; - - if( ent2->r.absmax[ 0 ] < ent->r.absmin[ 0 ] ) - continue; - - if( ent2->r.absmax[ 1 ] < ent->r.absmin[ 1 ] ) - continue; - - if( ent2->r.absmax[ 2 ] < ent->r.absmin[ 2 ] ) - continue; - - return qtrue; - } - - return qfalse; -} /* ============== @@ -948,7 +897,6 @@ void ClientThink_real( gentity_t *ent ) int oldEventSequence; int msec; usercmd_t *ucmd; - float speed; client = ent->client; @@ -1252,7 +1200,7 @@ void ClientThink_real( gentity_t *ent ) int entityList[ MAX_GENTITIES ]; vec3_t range = { USE_OBJECT_RANGE, USE_OBJECT_RANGE, USE_OBJECT_RANGE }; - vec3_t mins, maxs, dir; + vec3_t mins, maxs; int i, num; int j; qboolean upgrade = qfalse; @@ -1463,7 +1411,6 @@ while a slow client may have multiple ClientEndFrame between ClientThink. */ void ClientEndFrame( gentity_t *ent ) { - int i; clientPersistant_t *pers; if( ent->client->sess.sessionTeam == TEAM_SPECTATOR ) diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index f74715ba..e24edc57 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -117,7 +117,7 @@ static qboolean findPower( gentity_t *self ) { int i; gentity_t *ent; - gentity_t *closestPower; + gentity_t *closestPower = NULL; int distance = 0; int minDistance = 10000; vec3_t temp_v; @@ -204,7 +204,7 @@ static qboolean findDCC( gentity_t *self ) { int i; gentity_t *ent; - gentity_t *closestDCC; + gentity_t *closestDCC = NULL; int distance = 0; int minDistance = 10000; vec3_t temp_v; @@ -333,7 +333,7 @@ static qboolean findCreep( gentity_t *self ) { int i; gentity_t *ent; - gentity_t *closestSpawn; + gentity_t *closestSpawn = NULL; int distance = 0; int minDistance = 10000; vec3_t temp_v; @@ -1264,7 +1264,6 @@ Used by ADef2_Think to fire at enemy void ADef_FireOnEnemy( gentity_t *self, int firespeed ) { vec3_t dirToTarget; - vec3_t target; vec3_t halfAcceleration, thirdJerk; float distanceToTarget = BG_FindRangeForBuildable( self->s.modelindex ); int i; @@ -1469,7 +1468,6 @@ Use for human power repeater void HRpt_Use( gentity_t *self, gentity_t *other, gentity_t *activator ) { int maxAmmo, maxClips; - int ammo, clips; weapon_t weapon; playerState_t *ps = &activator->client->ps; @@ -1864,7 +1862,6 @@ void HMGTurret_FindEnemy( gentity_t *self ) int entityList[ MAX_GENTITIES ]; vec3_t range; vec3_t mins, maxs; - vec3_t dir; int i, num; gentity_t *target; @@ -2338,7 +2335,7 @@ qboolean G_BuildableRange( vec3_t origin, float r, buildable_t buildable ) { int entityList[ MAX_GENTITIES ]; vec3_t range; - vec3_t mins, maxs, dir; + vec3_t mins, maxs; int i, num; gentity_t *ent; @@ -2374,9 +2371,7 @@ itemBuildError_t G_itemFits( gentity_t *ent, buildable_t buildable, int distance trace_t tr1, tr2, tr3; int i; itemBuildError_t reason = IBE_NONE; - gentity_t *tempent, *closestPower; - int minDistance = 10000; - int templength; + gentity_t *tempent; float minNormal; qboolean invert; int contents; @@ -2715,10 +2710,10 @@ gentity_t *G_buildItem( gentity_t *builder, buildable_t buildable, vec3_t origin if( built->s.generic1 < 0 ) built->s.generic1 = 0; - if( built->powered = findPower( built ) ) + if( ( built->powered = findPower( built ) ) ) built->s.generic1 |= B_POWERED_TOGGLEBIT; - if( built->dcced = findDCC( built ) ) + if( ( built->dcced = findDCC( built ) ) ) built->s.generic1 |= B_DCCED_TOGGLEBIT; built->s.generic1 &= ~B_SPAWNED_TOGGLEBIT; @@ -2744,7 +2739,6 @@ G_ValidateBuild */ qboolean G_ValidateBuild( gentity_t *ent, buildable_t buildable ) { - weapon_t weapon; float dist; vec3_t origin; @@ -2827,6 +2821,9 @@ qboolean G_ValidateBuild( gentity_t *ent, buildable_t buildable ) G_TriggerMenu( ent->client->ps.clientNum, MN_H_RPTWARN ); G_buildItem( ent, buildable, origin, ent->s.apos.trBase ); return qtrue; + + default: + break; } return qfalse; diff --git a/src/game/g_client.c b/src/game/g_client.c index 25bf0dac..0cc6ab05 100644 --- a/src/game/g_client.c +++ b/src/game/g_client.c @@ -431,7 +431,7 @@ Chooses a player start, deathmatch start, etc */ gentity_t *SelectTremulousSpawnPoint( pTeam_t team, vec3_t origin, vec3_t angles ) { - gentity_t *spot; + gentity_t *spot = NULL; if( team == PTE_ALIENS ) spot = SelectAlienSpawnPoint( ); @@ -623,7 +623,6 @@ void SpawnCorpse( gentity_t *ent ) int contents; vec3_t origin, dest; trace_t tr; - int i; float vDiff; VectorCopy( ent->r.currentOrigin, origin ); @@ -756,8 +755,6 @@ respawn */ void respawn( gentity_t *ent ) { - gentity_t *tent; - SpawnCorpse( ent ); //TA: Clients can't respawn - they must go thru the class cmd @@ -948,7 +945,7 @@ if desired. void ClientUserinfoChanged( int clientNum ) { gentity_t *ent; - int teamTask, teamLeader, team, health; + int teamTask, teamLeader, health; char *s; char model[ MAX_QPATH ]; char buffer[ MAX_QPATH ]; @@ -1244,14 +1241,13 @@ void ClientSpawn( gentity_t *ent, gentity_t *spawn, vec3_t origin, vec3_t angles clientPersistant_t saved; clientSession_t savedSess; int persistant[ MAX_PERSISTANT ]; - gentity_t *spawnPoint; + gentity_t *spawnPoint = NULL; int flags; int savedPing; - int ammoIndex, ammoSubIndex; int teamLocal; int eventSequence; char userinfo[ MAX_INFO_STRING ]; - vec3_t classMins, classMaxs, up = { 0.0f, 0.0f, 1.0f }; + vec3_t up = { 0.0f, 0.0f, 1.0f }; int ammo, clips, maxClips; weapon_t weapon; diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 35bc1e5c..e8bf564f 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -238,8 +238,6 @@ void Cmd_Give_f( gentity_t *ent ) char *name; int i; qboolean give_all; - gentity_t *it_ent; - trace_t trace; if( !CheatsOk( ent ) ) return; @@ -1084,15 +1082,10 @@ Cmd_Class_f void Cmd_Class_f( gentity_t *ent ) { char s[ MAX_TOKEN_CHARS ]; - qboolean dontSpawn = qfalse; int clientNum; - gentity_t *spawn; - vec3_t spawn_origin, spawn_angles; - vec3_t up = { 0.0f, 0.0f, 1.0f }; - int length = 4096; int i; trace_t tr, tr2; - vec3_t infestOrigin, infestAngles; + vec3_t infestOrigin; int allowedClasses[ PCL_NUM_CLASSES ]; int numClasses = 0; @@ -1102,7 +1095,7 @@ void Cmd_Class_f( gentity_t *ent ) int entityList[ MAX_GENTITIES ]; vec3_t range = { AS_OVER_RT3, AS_OVER_RT3, AS_OVER_RT3 }; - vec3_t mins, maxs, dir; + vec3_t mins, maxs; int num; gentity_t *other; @@ -1573,8 +1566,6 @@ void Cmd_Buy_f( gentity_t *ent ) } else if( upgrade != UP_NONE ) { - weapon_t weaponAmmo; - //already got this? if( BG_InventoryContainsUpgrade( upgrade, ent->client->ps.stats ) ) { @@ -1689,7 +1680,6 @@ void Cmd_Sell_f( gentity_t *ent ) char s[ MAX_TOKEN_CHARS ]; int i; int weapon, upgrade; - int quan, clips, maxClips; trap_Argv( 1, s, sizeof( s ) ); @@ -1852,9 +1842,7 @@ Cmd_Build_f void Cmd_Build_f( gentity_t *ent ) { char s[ MAX_TOKEN_CHARS ]; - char s1[ MAX_TOKEN_CHARS ]; buildable_t buildable; - weapon_t weapon; float dist; vec3_t origin; pTeam_t team; @@ -1917,6 +1905,9 @@ void Cmd_Build_f( gentity_t *ent ) case IBE_NODCC: G_TriggerMenu( ent->client->ps.clientNum, MN_H_NODCC ); break; + + default: + break; } } else @@ -2252,7 +2243,7 @@ void Cmd_Evolve_Debug_f( gentity_t *ent ) int entityList[ MAX_GENTITIES ]; vec3_t range = { USE_OBJECT_RANGE, USE_OBJECT_RANGE, USE_OBJECT_RANGE }; - vec3_t mins, maxs, dir; + vec3_t mins, maxs; int i, num; int j; qboolean upgrade = qfalse; diff --git a/src/game/g_combat.c b/src/game/g_combat.c index d89adadc..9d13fd16 100644 --- a/src/game/g_combat.c +++ b/src/game/g_combat.c @@ -149,7 +149,6 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int { gentity_t *ent; int anim; - int contents; int killer; int i, j; char *killerName, *obit; @@ -323,7 +322,7 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int for( i = 0; i < unclaimedFrags; i++ ) { int maximum = 0; - int topClient; + int topClient = 0; for( j = 0; j < MAX_CLIENTS; j++ ) { @@ -902,9 +901,8 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker, gclient_t *client; int take; int save; - int asave; + int asave = 0; int knockback; - int max; if( !targ->takedamage ) return; diff --git a/src/game/g_local.h b/src/game/g_local.h index b974cf7d..4a12e3c0 100644 --- a/src/game/g_local.h +++ b/src/game/g_local.h @@ -693,6 +693,8 @@ const char *BuildShaderStateConfig(); void G_TriggerMenu( int clientNum, dynMenu_t menu ); void G_CloseMenus( int clientNum ); +qboolean G_Visible( gentity_t *ent1, gentity_t *ent2 ); + // // g_combat.c // @@ -740,6 +742,7 @@ gentity_t *launch_grenade( gentity_t *self, vec3_t start, vec3_t dir ); // void G_RunMover( gentity_t *ent ); void Touch_DoorTrigger( gentity_t *ent, gentity_t *other, trace_t *trace ); +void manualTriggerSpectator( gentity_t *trigger, gentity_t *player ); // // g_trigger.c diff --git a/src/game/g_main.c b/src/game/g_main.c index 239b46d9..77de3f01 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -860,8 +860,8 @@ void G_SpawnClients( pTeam_t team ) int clientNum; gentity_t *ent, *spawn; vec3_t spawn_origin, spawn_angles; - spawnQueue_t *sq; - int numSpawns; + spawnQueue_t *sq = NULL; + int numSpawns = 0; if( team == PTE_ALIENS ) { @@ -935,7 +935,6 @@ Recalculate the quantity of building points available to the teams void G_CalculateBuildPoints( void ) { int i; - int bclass; buildable_t buildable; gentity_t *ent; int localHTP = g_humanBuildPoints.integer, @@ -1578,8 +1577,6 @@ can see the last frag. */ void CheckExitRules( void ) { - int i; - gclient_t *cl; char s[ MAX_STRING_CHARS ]; trap_Cvar_VariableStringBuffer( "mapname", s, sizeof( s ) ); diff --git a/src/game/g_maprotation.c b/src/game/g_maprotation.c index b5f55522..c6010c34 100644 --- a/src/game/g_maprotation.c +++ b/src/game/g_maprotation.c @@ -78,7 +78,7 @@ static qboolean G_ParseMapRotation( mapRotation_t *mr, char **text_p ) { char *token; qboolean mnSet = qfalse; - mapRotationEntry_t *mre; + mapRotationEntry_t *mre = NULL; mapRotationCondition_t *mrc; // read optional parameters diff --git a/src/game/g_misc.c b/src/game/g_misc.c index 21c918d0..3c5314b4 100644 --- a/src/game/g_misc.c +++ b/src/game/g_misc.c @@ -264,8 +264,6 @@ Spawn function for spriter */ void SP_misc_spriter( gentity_t *self ) { - vec3_t accel; - G_SetOrigin( self, self->s.origin ); //set a bunch of stuff to be visible client side diff --git a/src/game/g_mover.c b/src/game/g_mover.c index 82de7360..822b8129 100644 --- a/src/game/g_mover.c +++ b/src/game/g_mover.c @@ -528,6 +528,9 @@ void SetMoverState( gentity_t *ent, moverState_t moverState, int time ) case MODEL_POS2: break; + + default: + break; } if( moverState >= MOVER_POS1 && moverState <= MOVER_2TO1 ) @@ -1604,15 +1607,11 @@ NOMONSTER monsters will not trigger this door */ void SP_func_door_model( gentity_t *ent ) { - vec3_t abs_movedir; - float distance; - vec3_t size; char *s; float light; vec3_t color; qboolean lightSet, colorSet; char *sound; - gentity_t *door; gentity_t *clipBrush; G_SpawnString( "sound2to1", "sound/movers/doors/dr1_strt.wav", &s ); diff --git a/src/game/g_physics.c b/src/game/g_physics.c index 856fcadb..63abaf9e 100644 --- a/src/game/g_physics.c +++ b/src/game/g_physics.c @@ -28,7 +28,7 @@ static void G_Bounce( gentity_t *ent, trace_t *trace ) float dot; int hitTime; float minNormal; - qboolean invert; + qboolean invert = qfalse; // reflect the velocity on the trace plane hitTime = level.previousTime + ( level.time - level.previousTime ) * trace->fraction; diff --git a/src/game/g_ptr.c b/src/game/g_ptr.c index ba8c095a..861f4b87 100644 --- a/src/game/g_ptr.c +++ b/src/game/g_ptr.c @@ -67,11 +67,9 @@ connectionRecord_t *G_GenerateNewConnection( gclient_t *client ) { int code = 0; int i; - qtime_t time; // this should be really random - trap_RealTime( &time ); - srand( time.tm_sec + time.tm_min + time.tm_hour ); + srand( trap_Milliseconds( ) ); // there is a very very small possibility that this // will loop infinitely diff --git a/src/game/g_spawn.c b/src/game/g_spawn.c index f31c9dde..b737a8ab 100644 --- a/src/game/g_spawn.c +++ b/src/game/g_spawn.c @@ -479,10 +479,6 @@ void G_SpawnGEntityFromSpawnVars( void ) { int i; gentity_t *ent; - char *s, *value, *gametypeName; - static char *gametypeNames[ ] = { "ffa", "tournament", "single", - "team", "ctf", "oneflag", - "obelisk", "harvester", "teamtournament" }; // get the next free entity ent = G_Spawn( ); diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c index ddb5e0a7..aca895d6 100644 --- a/src/game/g_weapon.c +++ b/src/game/g_weapon.c @@ -514,7 +514,6 @@ void teslaFire( gentity_t *ent ) trace_t tr; vec3_t end; gentity_t *traceEnt, *tent; - int i, passent; VectorMA( muzzle, TESLAGEN_RANGE, forward, end ); @@ -696,7 +695,6 @@ qboolean CheckVenomAttack( gentity_t *ent ) vec3_t end; gentity_t *tent; gentity_t *traceEnt; - int damage; vec3_t mins, maxs; VectorSet( mins, -LEVEL0_BITE_WIDTH, -LEVEL0_BITE_WIDTH, -LEVEL0_BITE_WIDTH ); @@ -809,7 +807,7 @@ void poisonCloud( gentity_t *ent ) { int entityList[ MAX_GENTITIES ]; vec3_t range = { LEVEL1_PCLOUD_RANGE, LEVEL1_PCLOUD_RANGE, LEVEL1_PCLOUD_RANGE }; - vec3_t mins, maxs, dir; + vec3_t mins, maxs; int i, num; gentity_t *humanPlayer; trace_t tr; diff --git a/src/game/q_math.c b/src/game/q_math.c index cbc7fdac..2600459c 100644 --- a/src/game/q_math.c +++ b/src/game/q_math.c @@ -465,7 +465,7 @@ TA: takes an axis (forward + right + up) */ void AxisToAngles( vec3_t axis[3], vec3_t angles ) { float length1; - float yaw, pitch, roll; + float yaw, pitch, roll = 0.0f; if ( axis[0][1] == 0 && axis[0][0] == 0 ) { yaw = 0; @@ -1362,8 +1362,8 @@ Distance from a point to some line */ float pointToLineDistance( const vec3_t p0, const vec3_t p1, const vec3_t p2 ) { - vec3_t v, w, x, y; - float c1, c2, b; + vec3_t v, w, y; + float c1, c2; VectorSubtract( p2, p1, v ); VectorSubtract( p1, p0, w ); diff --git a/src/ui/ui_atoms.c b/src/ui/ui_atoms.c index b8adacdd..5abf7c31 100644 --- a/src/ui/ui_atoms.c +++ b/src/ui/ui_atoms.c @@ -74,23 +74,6 @@ void UI_StartDemoLoop( void ) { trap_Cmd_ExecuteText( EXEC_APPEND, "d1\n" ); } - -#ifndef MISSIONPACK // bk001206 -static void NeedCDAction( qboolean result ) { - if ( !result ) { - trap_Cmd_ExecuteText( EXEC_APPEND, "quit\n" ); - } -} -#endif // MISSIONPACK - -#ifndef MISSIONPACK // bk001206 -static void NeedCDKeyAction( qboolean result ) { - if ( !result ) { - trap_Cmd_ExecuteText( EXEC_APPEND, "quit\n" ); - } -} -#endif // MISSIONPACK - char *UI_Argv( int arg ) { static char buffer[MAX_STRING_CHARS]; diff --git a/src/ui/ui_gameinfo.c b/src/ui/ui_gameinfo.c index 7b032bbc..5a04db53 100644 --- a/src/ui/ui_gameinfo.c +++ b/src/ui/ui_gameinfo.c @@ -32,11 +32,6 @@ static char *ui_botInfos[MAX_BOTS]; static int ui_numArenas; static char *ui_arenaInfos[MAX_ARENAS]; -#ifndef MISSIONPACK // bk001206 -static int ui_numSinglePlayerArenas; -static int ui_numSpecialSinglePlayerArenas; -#endif - /* =============== UI_ParseInfos @@ -128,7 +123,6 @@ UI_LoadArenas */ void UI_LoadArenas( void ) { int numdirs; - vmCvar_t arenasFile; char filename[128]; char dirlist[1024]; char* dirptr; diff --git a/src/ui/ui_main.c b/src/ui/ui_main.c index 60480b90..76d9e8d3 100644 --- a/src/ui/ui_main.c +++ b/src/ui/ui_main.c @@ -114,10 +114,6 @@ static char* netnames[] = { NULL }; -#ifndef MISSIONPACK // bk001206 -static char quake3worldMessage[] = "Visit www.quake3world.com - News, Community, Events, Files"; -#endif - static int gamecodetoui[] = {4,2,3,0,5,1,6}; static int uitogamecode[] = {4,6,2,3,1,5,7}; @@ -132,8 +128,6 @@ static void UI_BuildFindPlayerList(qboolean force); static int QDECL UI_ServersQsortCompare( const void *arg1, const void *arg2 ); static int UI_MapCountByGameType(qboolean singlePlayer); static int UI_HeadCountByTeam( void ); -static void UI_ParseGameInfo(const char *teamFile); -static void UI_ParseTeamInfo(const char *teamFile); static const char *UI_SelectedMap(int index, int *actual); static const char *UI_SelectedHead(int index, int *actual); static int UI_GetIndexFromSelection(int actual); @@ -1133,8 +1127,6 @@ qboolean UI_LoadInfoPane( int handle ) } else if( !Q_stricmp( token.string, "text" ) ) { - int *line; - memset( &token, 0, sizeof( pc_token_t ) ); if( !trap_PC_ReadToken( handle, &token ) ) @@ -1315,9 +1307,6 @@ void UI_Load() { } static const char *handicapValues[] = {"None","95","90","85","80","75","70","65","60","55","50","45","40","35","30","25","20","15","10","5",NULL}; -#ifndef MISSIONPACK // bk001206 -static int numHandicaps = sizeof(handicapValues) / sizeof(const char*); -#endif static void UI_DrawHandicap(rectDef_t *rect, float scale, vec4_t color, int textStyle) { int i, h; @@ -1836,13 +1825,6 @@ static void UI_DrawTierGameType(rectDef_t *rect, float scale, vec4_t color, int } -#ifndef MISSIONPACK // bk001206 -static const char *UI_OpponentLeaderName() { - int i = UI_TeamIndexFromName(UI_Cvar_VariableString("ui_opponentName")); - return uiInfo.teamList[i].teamMembers[0]; -} -#endif - static const char *UI_AIFromName(const char *name) { int j; for (j = 0; j < uiInfo.aliasCount; j++) { @@ -1853,52 +1835,6 @@ static const char *UI_AIFromName(const char *name) { return "James"; } -#ifndef MISSIONPACK // bk001206 -static const int UI_AIIndex(const char *name) { - int j; - for (j = 0; j < uiInfo.characterCount; j++) { - if (Q_stricmp(name, uiInfo.characterList[j].name) == 0) { - return j; - } - } - return 0; -} -#endif - -#ifndef MISSIONPACK // bk001206 -static const int UI_AIIndexFromName(const char *name) { - int j; - for (j = 0; j < uiInfo.aliasCount; j++) { - if (Q_stricmp(uiInfo.aliasList[j].name, name) == 0) { - return UI_AIIndex(uiInfo.aliasList[j].ai); - } - } - return 0; -} -#endif - - -#ifndef MISSIONPACK // bk001206 -static const char *UI_OpponentLeaderHead() { - const char *leader = UI_OpponentLeaderName(); - return UI_AIFromName(leader); -} -#endif - -#ifndef MISSIONPACK // bk001206 -static const char *UI_OpponentLeaderModel() { - int i; - const char *head = UI_OpponentLeaderHead(); - for (i = 0; i < uiInfo.characterCount; i++) { - if (Q_stricmp(head, uiInfo.characterList[i].name) == 0) { - return uiInfo.characterList[i].base; - } - } - return "James"; -} -#endif - - static qboolean updateOpponentModel = qtrue; static void UI_DrawOpponent(rectDef_t *rect) { static playerInfo_t info2; @@ -2171,7 +2107,6 @@ static int UI_OwnerDrawWidth(int ownerDraw, float scale) { static void UI_DrawBotName(rectDef_t *rect, float scale, vec4_t color, int textStyle) { int value = uiInfo.botIndex; - int game = trap_Cvar_VariableValue("g_gametype"); const char *text = ""; if( value >= UI_GetNumBots( ) ) @@ -2412,42 +2347,42 @@ static void UI_OwnerDraw( float x, float y, float w, float h, switch( ownerDraw ) { case UI_TEAMINFOPANE: - if( pane = uiInfo.tremTeamList[ uiInfo.tremTeamIndex ].infopane ) + if( ( pane = uiInfo.tremTeamList[ uiInfo.tremTeamIndex ].infopane ) ) UI_DrawInfoPane( pane, &rect, text_x, text_y, scale, color, textStyle ); break; case UI_ACLASSINFOPANE: - if( pane = uiInfo.tremAlienClassList[ uiInfo.tremAlienClassIndex ].infopane ) + if( ( pane = uiInfo.tremAlienClassList[ uiInfo.tremAlienClassIndex ].infopane ) ) UI_DrawInfoPane( pane, &rect, text_x, text_y, scale, color, textStyle ); break; case UI_AUPGRADEINFOPANE: - if( pane = uiInfo.tremAlienUpgradeList[ uiInfo.tremAlienUpgradeIndex ].infopane ) + if( ( pane = uiInfo.tremAlienUpgradeList[ uiInfo.tremAlienUpgradeIndex ].infopane ) ) UI_DrawInfoPane( pane, &rect, text_x, text_y, scale, color, textStyle ); break; case UI_HITEMINFOPANE: - if( pane = uiInfo.tremHumanItemList[ uiInfo.tremHumanItemIndex ].infopane ) + if( ( pane = uiInfo.tremHumanItemList[ uiInfo.tremHumanItemIndex ].infopane ) ) UI_DrawInfoPane( pane, &rect, text_x, text_y, scale, color, textStyle ); break; case UI_HBUYINFOPANE: - if( pane = uiInfo.tremHumanArmouryBuyList[ uiInfo.tremHumanArmouryBuyIndex ].infopane ) + if( ( pane = uiInfo.tremHumanArmouryBuyList[ uiInfo.tremHumanArmouryBuyIndex ].infopane ) ) UI_DrawInfoPane( pane, &rect, text_x, text_y, scale, color, textStyle ); break; case UI_HSELLINFOPANE: - if( pane = uiInfo.tremHumanArmourySellList[ uiInfo.tremHumanArmourySellIndex ].infopane ) + if( ( pane = uiInfo.tremHumanArmourySellList[ uiInfo.tremHumanArmourySellIndex ].infopane ) ) UI_DrawInfoPane( pane, &rect, text_x, text_y, scale, color, textStyle ); break; case UI_ABUILDINFOPANE: - if( pane = uiInfo.tremAlienBuildList[ uiInfo.tremAlienBuildIndex ].infopane ) + if( ( pane = uiInfo.tremAlienBuildList[ uiInfo.tremAlienBuildIndex ].infopane ) ) UI_DrawInfoPane( pane, &rect, text_x, text_y, scale, color, textStyle ); break; case UI_HBUILDINFOPANE: - if( pane = uiInfo.tremHumanBuildList[ uiInfo.tremHumanBuildIndex ].infopane ) + if( ( pane = uiInfo.tremHumanBuildList[ uiInfo.tremHumanBuildIndex ].infopane ) ) UI_DrawInfoPane( pane, &rect, text_x, text_y, scale, color, textStyle ); break; @@ -3033,7 +2968,6 @@ static qboolean UI_OpponentName_HandleKey(int flags, float *special, int key) { static qboolean UI_BotName_HandleKey(int flags, float *special, int key) { if (key == K_MOUSE1 || key == K_MOUSE2 || key == K_ENTER || key == K_KP_ENTER) { - int game = trap_Cvar_VariableValue("g_gametype"); int value = uiInfo.botIndex; if (key == K_MOUSE2) { @@ -3290,7 +3224,7 @@ static stage_t UI_GetCurrentAlienStage( void ) stage_t stage, dummy; trap_Cvar_VariableStringBuffer( "ui_stages", buffer, sizeof( buffer ) ); - sscanf( buffer, "%d %d", &stage, &dummy ); + sscanf( buffer, "%d %d", (int *)&stage , (int *)&dummy ); return stage; } @@ -3306,7 +3240,7 @@ static stage_t UI_GetCurrentHumanStage( void ) stage_t stage, dummy; trap_Cvar_VariableStringBuffer( "ui_stages", buffer, sizeof( buffer ) ); - sscanf( buffer, "%d %d", &dummy, &stage ); + sscanf( buffer, "%d %d", (int *)&dummy, (int *)&stage ); return stage; } @@ -3708,30 +3642,6 @@ static void UI_LoadMods() { /* =============== -UI_LoadTeams -=============== -*/ -static void UI_LoadTeams() { - char teamList[4096]; - char *teamName; - int i, len, count; - - count = trap_FS_GetFileList( "", "team", teamList, 4096 ); - - if (count) { - teamName = teamList; - for ( i = 0; i < count; i++ ) { - len = strlen( teamName ); - UI_ParseTeamInfo(teamName); - teamName += len + 1; - } - } - -} - - -/* -=============== UI_LoadMovies =============== */ @@ -4150,35 +4060,35 @@ static void UI_RunMenuScript(char **args) { UI_LoadTremTeams( ); else if( Q_stricmp( name, "JoinTeam" ) == 0 ) { - if( cmd = uiInfo.tremTeamList[ uiInfo.tremTeamIndex ].cmd ) + if( ( cmd = uiInfo.tremTeamList[ uiInfo.tremTeamIndex ].cmd ) ) trap_Cmd_ExecuteText( EXEC_APPEND, cmd ); } else if( Q_stricmp( name, "LoadHumanItems" ) == 0 ) UI_LoadTremHumanItems( ); else if( Q_stricmp( name, "SpawnWithHumanItem" ) == 0 ) { - if( cmd = uiInfo.tremHumanItemList[ uiInfo.tremHumanItemIndex ].cmd ) + if( ( cmd = uiInfo.tremHumanItemList[ uiInfo.tremHumanItemIndex ].cmd ) ) trap_Cmd_ExecuteText( EXEC_APPEND, cmd ); } else if( Q_stricmp( name, "LoadAlienClasses" ) == 0 ) UI_LoadTremAlienClasses( ); else if( Q_stricmp( name, "SpawnAsAlienClass" ) == 0 ) { - if( cmd = uiInfo.tremAlienClassList[ uiInfo.tremAlienClassIndex ].cmd ) + if( ( cmd = uiInfo.tremAlienClassList[ uiInfo.tremAlienClassIndex ].cmd ) ) trap_Cmd_ExecuteText( EXEC_APPEND, cmd ); } else if( Q_stricmp( name, "LoadHumanArmouryBuys" ) == 0 ) UI_LoadTremHumanArmouryBuys( ); else if( Q_stricmp( name, "BuyFromArmoury" ) == 0 ) { - if( cmd = uiInfo.tremHumanArmouryBuyList[ uiInfo.tremHumanArmouryBuyIndex ].cmd ) + if( ( cmd = uiInfo.tremHumanArmouryBuyList[ uiInfo.tremHumanArmouryBuyIndex ].cmd ) ) trap_Cmd_ExecuteText( EXEC_APPEND, cmd ); } else if( Q_stricmp( name, "LoadHumanArmourySells" ) == 0 ) UI_LoadTremHumanArmourySells( ); else if( Q_stricmp( name, "SellToArmoury" ) == 0 ) { - if( cmd = uiInfo.tremHumanArmourySellList[ uiInfo.tremHumanArmourySellIndex ].cmd ) + if( ( cmd = uiInfo.tremHumanArmourySellList[ uiInfo.tremHumanArmourySellIndex ].cmd ) ) trap_Cmd_ExecuteText( EXEC_APPEND, cmd ); } else if( Q_stricmp( name, "LoadAlienUpgrades" ) == 0 ) @@ -4191,21 +4101,21 @@ static void UI_RunMenuScript(char **args) { } else if( Q_stricmp( name, "UpgradeToNewClass" ) == 0 ) { - if( cmd = uiInfo.tremAlienUpgradeList[ uiInfo.tremAlienUpgradeIndex ].cmd ) + if( ( cmd = uiInfo.tremAlienUpgradeList[ uiInfo.tremAlienUpgradeIndex ].cmd ) ) trap_Cmd_ExecuteText( EXEC_APPEND, cmd ); } else if( Q_stricmp( name, "LoadAlienBuilds" ) == 0 ) UI_LoadTremAlienBuilds( ); else if( Q_stricmp( name, "BuildAlienBuildable" ) == 0 ) { - if( cmd = uiInfo.tremAlienBuildList[ uiInfo.tremAlienBuildIndex ].cmd ) + if( ( cmd = uiInfo.tremAlienBuildList[ uiInfo.tremAlienBuildIndex ].cmd ) ) trap_Cmd_ExecuteText( EXEC_APPEND, cmd ); } else if( Q_stricmp( name, "LoadHumanBuilds" ) == 0 ) UI_LoadTremHumanBuilds( ); else if( Q_stricmp( name, "BuildHumanBuildable" ) == 0 ) { - if( cmd = uiInfo.tremHumanBuildList[ uiInfo.tremHumanBuildIndex ].cmd ) + if( ( cmd = uiInfo.tremHumanBuildList[ uiInfo.tremHumanBuildIndex ].cmd ) ) trap_Cmd_ExecuteText( EXEC_APPEND, cmd ); } else if( Q_stricmp( name, "PTRCRestore" ) == 0 ) @@ -5252,7 +5162,7 @@ static const char *UI_FeederItemText(float feederID, int index, int column, qhan return UI_SelectedMap(index, &actual); } else if (feederID == FEEDER_SERVERS) { if (index >= 0 && index < uiInfo.serverStatus.numDisplayServers) { - int ping, game, punkbuster; + int ping, punkbuster; if (lastColumn != column || lastTime > uiInfo.uiDC.realTime + 5000) { trap_LAN_GetServerInfo(ui_netSource.integer, uiInfo.serverStatus.displayServers[index], info, MAX_STRING_CHARS); lastColumn = column; @@ -5515,391 +5425,6 @@ static void UI_FeederSelection(float feederID, int index) { //TA: tremulous menus } -static qboolean Team_Parse(char **p) { - char *token; - const char *tempStr; - int i; - - token = COM_ParseExt(p, qtrue); - - if (token[0] != '{') { - return qfalse; - } - - while ( 1 ) { - - token = COM_ParseExt(p, qtrue); - - if (Q_stricmp(token, "}") == 0) { - return qtrue; - } - - if ( !token || token[0] == 0 ) { - return qfalse; - } - - if (token[0] == '{') { - // seven tokens per line, team name and icon, and 5 team member names - if (!String_Parse(p, &uiInfo.teamList[uiInfo.teamCount].teamName) || !String_Parse(p, &tempStr)) { - return qfalse; - } - - - uiInfo.teamList[uiInfo.teamCount].imageName = tempStr; - uiInfo.teamList[uiInfo.teamCount].teamIcon = trap_R_RegisterShaderNoMip(uiInfo.teamList[uiInfo.teamCount].imageName); - uiInfo.teamList[uiInfo.teamCount].teamIcon_Metal = trap_R_RegisterShaderNoMip(va("%s_metal",uiInfo.teamList[uiInfo.teamCount].imageName)); - uiInfo.teamList[uiInfo.teamCount].teamIcon_Name = trap_R_RegisterShaderNoMip(va("%s_name", uiInfo.teamList[uiInfo.teamCount].imageName)); - - uiInfo.teamList[uiInfo.teamCount].cinematic = -1; - - for (i = 0; i < TEAM_MEMBERS; i++) { - uiInfo.teamList[uiInfo.teamCount].teamMembers[i] = NULL; - if (!String_Parse(p, &uiInfo.teamList[uiInfo.teamCount].teamMembers[i])) { - return qfalse; - } - } - - Com_Printf("Loaded team %s with team icon %s.\n", uiInfo.teamList[uiInfo.teamCount].teamName, tempStr); - if (uiInfo.teamCount < MAX_TEAMS) { - uiInfo.teamCount++; - } else { - Com_Printf("Too many teams, last team replaced!\n"); - } - token = COM_ParseExt(p, qtrue); - if (token[0] != '}') { - return qfalse; - } - } - } - - return qfalse; -} - -static qboolean Character_Parse(char **p) { - char *token; - const char *tempStr; - - token = COM_ParseExt(p, qtrue); - - if (token[0] != '{') { - return qfalse; - } - - - while ( 1 ) { - token = COM_ParseExt(p, qtrue); - - if (Q_stricmp(token, "}") == 0) { - return qtrue; - } - - if ( !token || token[0] == 0 ) { - return qfalse; - } - - if (token[0] == '{') { - // two tokens per line, character name and sex - if (!String_Parse(p, &uiInfo.characterList[uiInfo.characterCount].name) || !String_Parse(p, &tempStr)) { - return qfalse; - } - - uiInfo.characterList[uiInfo.characterCount].headImage = -1; - uiInfo.characterList[uiInfo.characterCount].imageName = String_Alloc(va("models/players/heads/%s/icon_default.tga", uiInfo.characterList[uiInfo.characterCount].name)); - - if (tempStr && (!Q_stricmp(tempStr, "female"))) { - uiInfo.characterList[uiInfo.characterCount].base = String_Alloc(va("Janet")); - } else if (tempStr && (!Q_stricmp(tempStr, "male"))) { - uiInfo.characterList[uiInfo.characterCount].base = String_Alloc(va("James")); - } else { - uiInfo.characterList[uiInfo.characterCount].base = String_Alloc(va("%s",tempStr)); - } - - Com_Printf("Loaded %s character %s.\n", uiInfo.characterList[uiInfo.characterCount].base, uiInfo.characterList[uiInfo.characterCount].name); - if (uiInfo.characterCount < MAX_HEADS) { - uiInfo.characterCount++; - } else { - Com_Printf("Too many characters, last character replaced!\n"); - } - - token = COM_ParseExt(p, qtrue); - if (token[0] != '}') { - return qfalse; - } - } - } - - return qfalse; -} - - -static qboolean Alias_Parse(char **p) { - char *token; - - token = COM_ParseExt(p, qtrue); - - if (token[0] != '{') { - return qfalse; - } - - while ( 1 ) { - token = COM_ParseExt(p, qtrue); - - if (Q_stricmp(token, "}") == 0) { - return qtrue; - } - - if ( !token || token[0] == 0 ) { - return qfalse; - } - - if (token[0] == '{') { - // three tokens per line, character name, bot alias, and preferred action a - all purpose, d - defense, o - offense - if (!String_Parse(p, &uiInfo.aliasList[uiInfo.aliasCount].name) || !String_Parse(p, &uiInfo.aliasList[uiInfo.aliasCount].ai) || !String_Parse(p, &uiInfo.aliasList[uiInfo.aliasCount].action)) { - return qfalse; - } - - Com_Printf("Loaded character alias %s using character ai %s.\n", uiInfo.aliasList[uiInfo.aliasCount].name, uiInfo.aliasList[uiInfo.aliasCount].ai); - if (uiInfo.aliasCount < MAX_ALIASES) { - uiInfo.aliasCount++; - } else { - Com_Printf("Too many aliases, last alias replaced!\n"); - } - - token = COM_ParseExt(p, qtrue); - if (token[0] != '}') { - return qfalse; - } - } - } - - return qfalse; -} - - - -// mode -// 0 - high level parsing -// 1 - team parsing -// 2 - character parsing -static void UI_ParseTeamInfo(const char *teamFile) { - char *token; - char *p; - char *buff = NULL; - //static int mode = 0; TTimo: unused - - buff = GetMenuBuffer(teamFile); - if (!buff) { - return; - } - - p = buff; - - while ( 1 ) { - token = COM_ParseExt( &p, qtrue ); - if( !token || token[0] == 0 || token[0] == '}') { - break; - } - - if ( Q_stricmp( token, "}" ) == 0 ) { - break; - } - - if (Q_stricmp(token, "teams") == 0) { - - if (Team_Parse(&p)) { - continue; - } else { - break; - } - } - - if (Q_stricmp(token, "characters") == 0) { - Character_Parse(&p); - } - - if (Q_stricmp(token, "aliases") == 0) { - Alias_Parse(&p); - } - - } - -} - - -static qboolean GameType_Parse(char **p, qboolean join) { - char *token; - - token = COM_ParseExt(p, qtrue); - - if (token[0] != '{') { - return qfalse; - } - - if (join) { - uiInfo.numJoinGameTypes = 0; - } else { - uiInfo.numGameTypes = 0; - } - - while ( 1 ) { - token = COM_ParseExt(p, qtrue); - - if (Q_stricmp(token, "}") == 0) { - return qtrue; - } - - if ( !token || token[0] == 0 ) { - return qfalse; - } - - if (token[0] == '{') { - // two tokens per line, character name and sex - if (join) { - if (!String_Parse(p, &uiInfo.joinGameTypes[uiInfo.numJoinGameTypes].gameType) || !Int_Parse(p, &uiInfo.joinGameTypes[uiInfo.numJoinGameTypes].gtEnum)) { - return qfalse; - } - } else { - if (!String_Parse(p, &uiInfo.gameTypes[uiInfo.numGameTypes].gameType) || !Int_Parse(p, &uiInfo.gameTypes[uiInfo.numGameTypes].gtEnum)) { - return qfalse; - } - } - - if (join) { - if (uiInfo.numJoinGameTypes < MAX_GAMETYPES) { - uiInfo.numJoinGameTypes++; - } else { - Com_Printf("Too many net game types, last one replace!\n"); - } - } else { - if (uiInfo.numGameTypes < MAX_GAMETYPES) { - uiInfo.numGameTypes++; - } else { - Com_Printf("Too many game types, last one replace!\n"); - } - } - - token = COM_ParseExt(p, qtrue); - if (token[0] != '}') { - return qfalse; - } - } - } - return qfalse; -} - -static qboolean MapList_Parse(char **p) { - char *token; - - token = COM_ParseExt(p, qtrue); - - if (token[0] != '{') { - return qfalse; - } - - uiInfo.mapCount = 0; - - while ( 1 ) { - token = COM_ParseExt(p, qtrue); - - if (Q_stricmp(token, "}") == 0) { - return qtrue; - } - - if ( !token || token[0] == 0 ) { - return qfalse; - } - - if (token[0] == '{') { - if (!String_Parse(p, &uiInfo.mapList[uiInfo.mapCount].mapName) || !String_Parse(p, &uiInfo.mapList[uiInfo.mapCount].mapLoadName) - ||!Int_Parse(p, &uiInfo.mapList[uiInfo.mapCount].teamMembers) ) { - return qfalse; - } - - if (!String_Parse(p, &uiInfo.mapList[uiInfo.mapCount].opponentName)) { - return qfalse; - } - - uiInfo.mapList[uiInfo.mapCount].typeBits = 0; - - while (1) { - token = COM_ParseExt(p, qtrue); - if (token[0] >= '0' && token[0] <= '9') { - uiInfo.mapList[uiInfo.mapCount].typeBits |= (1 << (token[0] - 0x030)); - if (!Int_Parse(p, &uiInfo.mapList[uiInfo.mapCount].timeToBeat[token[0] - 0x30])) { - return qfalse; - } - } else { - break; - } - } - - //mapList[mapCount].imageName = String_Alloc(va("levelshots/%s", mapList[mapCount].mapLoadName)); - //if (uiInfo.mapCount == 0) { - // only load the first cinematic, selection loads the others - // uiInfo.mapList[uiInfo.mapCount].cinematic = trap_CIN_PlayCinematic(va("%s.roq",uiInfo.mapList[uiInfo.mapCount].mapLoadName), qfalse, qfalse, qtrue, 0, 0, 0, 0); - //} - uiInfo.mapList[uiInfo.mapCount].cinematic = -1; - uiInfo.mapList[uiInfo.mapCount].levelShot = trap_R_RegisterShaderNoMip(va("levelshots/%s_small", uiInfo.mapList[uiInfo.mapCount].mapLoadName)); - - if (uiInfo.mapCount < MAX_MAPS) { - uiInfo.mapCount++; - } else { - Com_Printf("Too many maps, last one replaced!\n"); - } - } - } - return qfalse; -} - -static void UI_ParseGameInfo(const char *teamFile) { - char *token; - char *p; - char *buff = NULL; - //int mode = 0; TTimo: unused - - buff = GetMenuBuffer(teamFile); - if (!buff) { - return; - } - - p = buff; - - while ( 1 ) { - token = COM_ParseExt( &p, qtrue ); - if( !token || token[0] == 0 || token[0] == '}') { - break; - } - - if ( Q_stricmp( token, "}" ) == 0 ) { - break; - } - - if (Q_stricmp(token, "gametypes") == 0) { - - if (GameType_Parse(&p, qfalse)) { - continue; - } else { - break; - } - } - - if (Q_stricmp(token, "joingametypes") == 0) { - - if (GameType_Parse(&p, qtrue)) { - continue; - } else { - break; - } - } - - if (Q_stricmp(token, "maps") == 0) { - // start a new menu - MapList_Parse(&p); - } - - } -} - static void UI_Pause(qboolean b) { if (b) { // pause the game and set the ui keycatcher @@ -5913,13 +5438,6 @@ static void UI_Pause(qboolean b) { } } -#ifndef MISSIONPACK // bk001206 -static int UI_OwnerDraw_Width(int ownerDraw) { - // bk001205 - LCC missing return value - return 0; -} -#endif - static int UI_PlayCinematic(const char *name, float x, float y, float w, float h) { return trap_CIN_PlayCinematic(name, x, y, w, h, (CIN_loop | CIN_silent)); } @@ -6923,23 +6441,6 @@ static void UI_StopServerRefresh( void ) /* ================= -ArenaServers_MaxPing -================= -*/ -#ifndef MISSIONPACK // bk001206 -static int ArenaServers_MaxPing( void ) { - int maxPing; - - maxPing = (int)trap_Cvar_VariableValue( "cl_maxPing" ); - if( maxPing < 100 ) { - maxPing = 100; - } - return maxPing; -} -#endif - -/* -================= UI_DoServerRefresh ================= */ diff --git a/src/ui/ui_shared.c b/src/ui/ui_shared.c index 8bc2c1d4..06ba8cde 100644 --- a/src/ui/ui_shared.c +++ b/src/ui/ui_shared.c @@ -2853,7 +2853,6 @@ int Item_Text_AutoWrapped_Lines( itemDef_t *item ) const char *p, *textPtr, *newLinePtr; char buff[ 1024 ]; int len, textWidth, newLine; - vec4_t color; int lines = 0; textWidth = 0; @@ -2973,7 +2972,7 @@ void Item_Text_AutoWrapped_Paint( itemDef_t *item ) const char *p, *textPtr, *newLinePtr; char buff[ 1024 ]; char lastCMod[ 2 ] = { 0, 0 }; - qboolean forwardColor; + qboolean forwardColor = qfalse; int width, height, len, textWidth, newLine, newLineWidth; int skipLines, totalLines, lineNum = 0; float y, totalY, diffY; @@ -3265,7 +3264,7 @@ void Item_Text_Paint(itemDef_t *item) { void Item_TextField_Paint(itemDef_t *item) { char buff[1024]; - vec4_t newColor, lowLight; + vec4_t newColor; int offset; menuDef_t *parent = (menuDef_t*)item->parent; editFieldDef_t *editPtr = (editFieldDef_t*)item->typeData; @@ -3303,7 +3302,7 @@ void Item_TextField_Paint(itemDef_t *item) { } void Item_YesNo_Paint(itemDef_t *item) { - vec4_t newColor, lowLight; + vec4_t newColor; float value; menuDef_t *parent = (menuDef_t*)item->parent; @@ -3330,7 +3329,7 @@ void Item_YesNo_Paint(itemDef_t *item) { } void Item_Multi_Paint(itemDef_t *item) { - vec4_t newColor, lowLight; + vec4_t newColor; const char *text = ""; menuDef_t *parent = (menuDef_t*)item->parent; @@ -3448,21 +3447,6 @@ static bind_t g_bindings[] = static const int g_bindCount = sizeof(g_bindings) / sizeof(bind_t); -#ifndef MISSIONPACK // bk001206 -static configcvar_t g_configcvars[] = -{ - {"cl_run", 0, 0}, - {"m_pitch", 0, 0}, - {"cg_autoswitch", 0, 0}, - {"sensitivity", 0, 0}, - {"in_joystick", 0, 0}, - {"joy_threshold", 0, 0}, - {"m_filter", 0, 0}, - {"cl_freelook", 0, 0}, - {NULL, 0, 0} -}; -#endif - /* ================= Controls_GetKeyAssignment @@ -3629,7 +3613,7 @@ void BindingFromName(const char *cvar) { } void Item_Slider_Paint(itemDef_t *item) { - vec4_t newColor, lowLight; + vec4_t newColor; float x, y, value; menuDef_t *parent = (menuDef_t*)item->parent; @@ -5945,11 +5929,6 @@ displayContextDef_t *Display_GetContext() { return DC; } -#ifndef MISSIONPACK // bk001206 -static float captureX; -static float captureY; -#endif - void *Display_CaptureItem(int x, int y) { int i; diff --git a/src/ui/ui_shared.h b/src/ui/ui_shared.h index f20af2b4..51f6eac0 100644 --- a/src/ui/ui_shared.h +++ b/src/ui/ui_shared.h @@ -434,6 +434,9 @@ void Controls_GetConfig( void ); void Controls_SetConfig(qboolean restart); void Controls_SetDefaults( void ); +//for cg_draw.c +void Item_Text_AutoWrapped_Paint( itemDef_t *item ); + int trap_PC_AddGlobalDefine( char *define ); int trap_PC_LoadSource( const char *filename ); int trap_PC_FreeSource( int handle ); |