Cleanups from pomac!

This commit is contained in:
Zachary Slater 2005-09-02 20:13:47 +00:00
parent b0fc4a7b6e
commit f327407bb8
36 changed files with 155 additions and 195 deletions

View File

@ -1067,8 +1067,8 @@ int AAS_Reachability_Step_Barrier_WaterJump_WalkOffLedge(int area1num, int area2
float length, ground_bestlength, water_bestlength, ground_bestdist, water_bestdist; float length, ground_bestlength, water_bestlength, ground_bestdist, water_bestdist;
vec3_t v1, v2, v3, v4, tmpv, p1area1, p1area2, p2area1, p2area2; vec3_t v1, v2, v3, v4, tmpv, p1area1, p1area2, p2area1, p2area2;
vec3_t normal, ort, edgevec, start, end, dir; vec3_t normal, ort, edgevec, start, end, dir;
vec3_t ground_beststart, ground_bestend, ground_bestnormal; vec3_t ground_beststart = {0, 0, 0}, ground_bestend = {0, 0, 0}, ground_bestnormal = {0, 0, 0};
vec3_t water_beststart, water_bestend, water_bestnormal; vec3_t water_beststart = {0, 0, 0}, water_bestend = {0, 0, 0}, water_bestnormal = {0, 0, 0};
vec3_t invgravity = {0, 0, 1}; vec3_t invgravity = {0, 0, 1};
vec3_t testpoint; vec3_t testpoint;
aas_plane_t *plane; aas_plane_t *plane;
@ -2379,15 +2379,15 @@ int AAS_Reachability_Jump(int area1num, int area2num)
//=========================================================================== //===========================================================================
int AAS_Reachability_Ladder(int area1num, int area2num) int AAS_Reachability_Ladder(int area1num, int area2num)
{ {
int i, j, k, l, edge1num, edge2num, sharededgenum, lowestedgenum; int i, j, k, l, edge1num, edge2num, sharededgenum = 0, lowestedgenum = 0;
int face1num, face2num, ladderface1num, ladderface2num; int face1num, face2num, ladderface1num = 0, ladderface2num = 0;
int ladderface1vertical, ladderface2vertical, firstv; int ladderface1vertical, ladderface2vertical, firstv;
float face1area, face2area, bestface1area, bestface2area; float face1area, face2area, bestface1area = -9999, bestface2area = -9999;
float phys_jumpvel, maxjumpheight; float phys_jumpvel, maxjumpheight;
vec3_t area1point, area2point, v1, v2, up = {0, 0, 1}; vec3_t area1point, area2point, v1, v2, up = {0, 0, 1};
vec3_t mid, lowestpoint, start, end, sharededgevec, dir; vec3_t mid, lowestpoint = {0, 0}, start, end, sharededgevec, dir;
aas_area_t *area1, *area2; aas_area_t *area1, *area2;
aas_face_t *face1, *face2, *ladderface1, *ladderface2; aas_face_t *face1, *face2, *ladderface1 = NULL, *ladderface2 = NULL;
aas_plane_t *plane1, *plane2; aas_plane_t *plane1, *plane2;
aas_edge_t *sharededge, *edge1; aas_edge_t *sharededge, *edge1;
aas_lreachability_t *lreach; aas_lreachability_t *lreach;
@ -2401,16 +2401,7 @@ int AAS_Reachability_Ladder(int area1num, int area2num)
area1 = &aasworld.areas[area1num]; area1 = &aasworld.areas[area1num];
area2 = &aasworld.areas[area2num]; area2 = &aasworld.areas[area2num];
//
ladderface1 = NULL;
ladderface2 = NULL;
ladderface1num = 0; //make compiler happy
ladderface2num = 0; //make compiler happy
bestface1area = -9999;
bestface2area = -9999;
sharededgenum = 0; //make compiler happy
lowestedgenum = 0; //make compiler happy
//
for (i = 0; i < area1->numfaces; i++) for (i = 0; i < area1->numfaces; i++)
{ {
face1num = aasworld.faceindex[area1->firstface + i]; face1num = aasworld.faceindex[area1->firstface + i];

View File

@ -1327,28 +1327,12 @@ void BotCheckBlocked(bot_movestate_t *ms, vec3_t dir, int checkbottom, bot_mover
// Returns: - // Returns: -
// Changes Globals: - // Changes Globals: -
//=========================================================================== //===========================================================================
void BotClearMoveResult(bot_moveresult_t *moveresult)
{
moveresult->failure = qfalse;
moveresult->type = 0;
moveresult->blocked = qfalse;
moveresult->blockentity = 0;
moveresult->traveltype = 0;
moveresult->flags = 0;
} //end of the function BotClearMoveResult
//===========================================================================
//
// Parameter: -
// Returns: -
// Changes Globals: -
//===========================================================================
bot_moveresult_t BotTravel_Walk(bot_movestate_t *ms, aas_reachability_t *reach) bot_moveresult_t BotTravel_Walk(bot_movestate_t *ms, aas_reachability_t *reach)
{ {
float dist, speed; float dist, speed;
vec3_t hordir; vec3_t hordir;
bot_moveresult_t result; bot_moveresult_t_cleared( result );
BotClearMoveResult(&result);
//first walk straight to the reachability start //first walk straight to the reachability start
hordir[0] = reach->start[0] - ms->origin[0]; hordir[0] = reach->start[0] - ms->origin[0];
hordir[1] = reach->start[1] - ms->origin[1]; hordir[1] = reach->start[1] - ms->origin[1];
@ -1401,9 +1385,7 @@ bot_moveresult_t BotFinishTravel_Walk(bot_movestate_t *ms, aas_reachability_t *r
{ {
vec3_t hordir; vec3_t hordir;
float dist, speed; float dist, speed;
bot_moveresult_t result; bot_moveresult_t_cleared( result );
BotClearMoveResult(&result);
//if not on the ground and changed areas... don't walk back!! //if not on the ground and changed areas... don't walk back!!
//(doesn't seem to help) //(doesn't seem to help)
/* /*
@ -1439,9 +1421,8 @@ bot_moveresult_t BotTravel_Crouch(bot_movestate_t *ms, aas_reachability_t *reach
{ {
float speed; float speed;
vec3_t hordir; vec3_t hordir;
bot_moveresult_t result; bot_moveresult_t_cleared( result );
BotClearMoveResult(&result);
// //
speed = 400; speed = 400;
//walk straight to reachability end //walk straight to reachability end
@ -1469,9 +1450,8 @@ bot_moveresult_t BotTravel_BarrierJump(bot_movestate_t *ms, aas_reachability_t *
{ {
float dist, speed; float dist, speed;
vec3_t hordir; vec3_t hordir;
bot_moveresult_t result; bot_moveresult_t_cleared( result );
BotClearMoveResult(&result);
//walk straight to reachability start //walk straight to reachability start
hordir[0] = reach->start[0] - ms->origin[0]; hordir[0] = reach->start[0] - ms->origin[0];
hordir[1] = reach->start[1] - ms->origin[1]; hordir[1] = reach->start[1] - ms->origin[1];
@ -1504,9 +1484,8 @@ bot_moveresult_t BotFinishTravel_BarrierJump(bot_movestate_t *ms, aas_reachabili
{ {
float dist; float dist;
vec3_t hordir; vec3_t hordir;
bot_moveresult_t result; bot_moveresult_t_cleared( result );
BotClearMoveResult(&result);
//if near the top or going down //if near the top or going down
if (ms->velocity[2] < 250) if (ms->velocity[2] < 250)
{ {
@ -1532,9 +1511,8 @@ bot_moveresult_t BotFinishTravel_BarrierJump(bot_movestate_t *ms, aas_reachabili
bot_moveresult_t BotTravel_Swim(bot_movestate_t *ms, aas_reachability_t *reach) bot_moveresult_t BotTravel_Swim(bot_movestate_t *ms, aas_reachability_t *reach)
{ {
vec3_t dir; vec3_t dir;
bot_moveresult_t result; bot_moveresult_t_cleared( result );
BotClearMoveResult(&result);
//swim straight to reachability end //swim straight to reachability end
VectorSubtract(reach->start, ms->origin, dir); VectorSubtract(reach->start, ms->origin, dir);
VectorNormalize(dir); VectorNormalize(dir);
@ -1559,9 +1537,8 @@ bot_moveresult_t BotTravel_WaterJump(bot_movestate_t *ms, aas_reachability_t *re
{ {
vec3_t dir, hordir; vec3_t dir, hordir;
float dist; float dist;
bot_moveresult_t result; bot_moveresult_t_cleared( result );
BotClearMoveResult(&result);
//swim straight to reachability end //swim straight to reachability end
VectorSubtract(reach->end, ms->origin, dir); VectorSubtract(reach->end, ms->origin, dir);
VectorCopy(dir, hordir); VectorCopy(dir, hordir);
@ -1593,10 +1570,9 @@ bot_moveresult_t BotFinishTravel_WaterJump(bot_movestate_t *ms, aas_reachability
{ {
vec3_t dir, pnt; vec3_t dir, pnt;
float dist; float dist;
bot_moveresult_t result; bot_moveresult_t_cleared( result );
//botimport.Print(PRT_MESSAGE, "BotFinishTravel_WaterJump\n"); //botimport.Print(PRT_MESSAGE, "BotFinishTravel_WaterJump\n");
BotClearMoveResult(&result);
//if waterjumping there's nothing to do //if waterjumping there's nothing to do
if (ms->moveflags & MFL_WATERJUMP) return result; if (ms->moveflags & MFL_WATERJUMP) return result;
//if not touching any water anymore don't do anything //if not touching any water anymore don't do anything
@ -1630,9 +1606,8 @@ bot_moveresult_t BotTravel_WalkOffLedge(bot_movestate_t *ms, aas_reachability_t
{ {
vec3_t hordir, dir; vec3_t hordir, dir;
float dist, speed, reachhordist; float dist, speed, reachhordist;
bot_moveresult_t result; bot_moveresult_t_cleared( result );
BotClearMoveResult(&result);
//check if the bot is blocked by anything //check if the bot is blocked by anything
VectorSubtract(reach->start, ms->origin, dir); VectorSubtract(reach->start, ms->origin, dir);
VectorNormalize(dir); VectorNormalize(dir);
@ -1730,9 +1705,8 @@ bot_moveresult_t BotFinishTravel_WalkOffLedge(bot_movestate_t *ms, aas_reachabil
{ {
vec3_t dir, hordir, end, v; vec3_t dir, hordir, end, v;
float dist, speed; float dist, speed;
bot_moveresult_t result; bot_moveresult_t( result );
BotClearMoveResult(&result);
// //
VectorSubtract(reach->end, ms->origin, dir); VectorSubtract(reach->end, ms->origin, dir);
BotCheckBlocked(ms, dir, qtrue, &result); BotCheckBlocked(ms, dir, qtrue, &result);
@ -1769,9 +1743,8 @@ bot_moveresult_t BotTravel_Jump(bot_movestate_t *ms, aas_reachability_t *reach)
{ {
vec3_t hordir; vec3_t hordir;
float dist, gapdist, speed, horspeed, sv_jumpvel; float dist, gapdist, speed, horspeed, sv_jumpvel;
bot_moveresult_t result; bot_moveresult_t_cleared( result );
BotClearMoveResult(&result);
// //
sv_jumpvel = botlibglobals.sv_jumpvel->value; sv_jumpvel = botlibglobals.sv_jumpvel->value;
//walk straight to the reachability start //walk straight to the reachability start
@ -1818,10 +1791,9 @@ bot_moveresult_t BotTravel_Jump(bot_movestate_t *ms, aas_reachability_t *reach)
{ {
vec3_t hordir, dir1, dir2, mins, maxs, start, end; vec3_t hordir, dir1, dir2, mins, maxs, start, end;
float dist1, dist2, speed; float dist1, dist2, speed;
bot_moveresult_t result; bot_moveresult_t_cleared( result );
bsp_trace_t trace; bsp_trace_t trace;
BotClearMoveResult(&result);
// //
hordir[0] = reach->start[0] - reach->end[0]; hordir[0] = reach->start[0] - reach->end[0];
hordir[1] = reach->start[1] - reach->end[1]; hordir[1] = reach->start[1] - reach->end[1];
@ -1891,9 +1863,8 @@ bot_moveresult_t BotTravel_Jump(bot_movestate_t *ms, aas_reachability_t *reach)
vec3_t hordir, dir1, dir2, start, end, runstart; vec3_t hordir, dir1, dir2, start, end, runstart;
// vec3_t runstart, dir1, dir2, hordir; // vec3_t runstart, dir1, dir2, hordir;
float dist1, dist2, speed; float dist1, dist2, speed;
bot_moveresult_t result; bot_moveresult_t_cleared( result );
BotClearMoveResult(&result);
// //
AAS_JumpReachRunStart(reach, runstart); AAS_JumpReachRunStart(reach, runstart);
//* //*
@ -1961,9 +1932,8 @@ bot_moveresult_t BotFinishTravel_Jump(bot_movestate_t *ms, aas_reachability_t *r
{ {
vec3_t hordir, hordir2; vec3_t hordir, hordir2;
float speed, dist; float speed, dist;
bot_moveresult_t result; bot_moveresult_t_cleared( result );
BotClearMoveResult(&result);
//if not jumped yet //if not jumped yet
if (!ms->jumpreach) return result; if (!ms->jumpreach) return result;
//go straight to the reachability end //go straight to the reachability end
@ -1998,9 +1968,8 @@ bot_moveresult_t BotTravel_Ladder(bot_movestate_t *ms, aas_reachability_t *reach
vec3_t dir, viewdir;//, hordir; vec3_t dir, viewdir;//, hordir;
vec3_t origin = {0, 0, 0}; vec3_t origin = {0, 0, 0};
// vec3_t up = {0, 0, 1}; // vec3_t up = {0, 0, 1};
bot_moveresult_t result; bot_moveresult_t_cleared( result );
BotClearMoveResult(&result);
// //
// if ((ms->moveflags & MFL_AGAINSTLADDER)) // if ((ms->moveflags & MFL_AGAINSTLADDER))
//NOTE: not a good idea for ladders starting in water //NOTE: not a good idea for ladders starting in water
@ -2052,9 +2021,8 @@ bot_moveresult_t BotTravel_Teleport(bot_movestate_t *ms, aas_reachability_t *rea
{ {
vec3_t hordir; vec3_t hordir;
float dist; float dist;
bot_moveresult_t result; bot_moveresult_t_cleared( result );
BotClearMoveResult(&result);
//if the bot is being teleported //if the bot is being teleported
if (ms->moveflags & MFL_TELEPORTED) return result; if (ms->moveflags & MFL_TELEPORTED) return result;
@ -2083,9 +2051,8 @@ bot_moveresult_t BotTravel_Elevator(bot_movestate_t *ms, aas_reachability_t *rea
{ {
vec3_t dir, dir1, dir2, hordir, bottomcenter; vec3_t dir, dir1, dir2, hordir, bottomcenter;
float dist, dist1, dist2, speed; float dist, dist1, dist2, speed;
bot_moveresult_t result; bot_moveresult_t_cleared( result );
BotClearMoveResult(&result);
//if standing on the plat //if standing on the plat
if (BotOnMover(ms->origin, ms->entitynum, reach)) if (BotOnMover(ms->origin, ms->entitynum, reach))
{ {
@ -2233,9 +2200,8 @@ bot_moveresult_t BotTravel_Elevator(bot_movestate_t *ms, aas_reachability_t *rea
bot_moveresult_t BotFinishTravel_Elevator(bot_movestate_t *ms, aas_reachability_t *reach) bot_moveresult_t BotFinishTravel_Elevator(bot_movestate_t *ms, aas_reachability_t *reach)
{ {
vec3_t bottomcenter, bottomdir, topdir; vec3_t bottomcenter, bottomdir, topdir;
bot_moveresult_t result; bot_moveresult_t_cleared( result );
BotClearMoveResult(&result);
// //
MoverBottomCenter(reach, bottomcenter); MoverBottomCenter(reach, bottomcenter);
VectorSubtract(bottomcenter, ms->origin, bottomdir); VectorSubtract(bottomcenter, ms->origin, bottomdir);
@ -2322,9 +2288,8 @@ bot_moveresult_t BotTravel_FuncBobbing(bot_movestate_t *ms, aas_reachability_t *
{ {
vec3_t dir, dir1, dir2, hordir, bottomcenter, bob_start, bob_end, bob_origin; vec3_t dir, dir1, dir2, hordir, bottomcenter, bob_start, bob_end, bob_origin;
float dist, dist1, dist2, speed; float dist, dist1, dist2, speed;
bot_moveresult_t result; bot_moveresult_t_cleared( result );
BotClearMoveResult(&result);
// //
BotFuncBobStartEnd(reach, bob_start, bob_end, bob_origin); BotFuncBobStartEnd(reach, bob_start, bob_end, bob_origin);
//if standing ontop of the func_bobbing //if standing ontop of the func_bobbing
@ -2479,10 +2444,9 @@ bot_moveresult_t BotTravel_FuncBobbing(bot_movestate_t *ms, aas_reachability_t *
bot_moveresult_t BotFinishTravel_FuncBobbing(bot_movestate_t *ms, aas_reachability_t *reach) bot_moveresult_t BotFinishTravel_FuncBobbing(bot_movestate_t *ms, aas_reachability_t *reach)
{ {
vec3_t bob_origin, bob_start, bob_end, dir, hordir, bottomcenter; vec3_t bob_origin, bob_start, bob_end, dir, hordir, bottomcenter;
bot_moveresult_t result; bot_moveresult_t_cleared( result );
float dist, speed; float dist, speed;
BotClearMoveResult(&result);
// //
BotFuncBobStartEnd(reach, bob_start, bob_end, bob_origin); BotFuncBobStartEnd(reach, bob_start, bob_end, bob_origin);
// //
@ -2589,7 +2553,7 @@ void BotResetGrapple(bot_movestate_t *ms)
//=========================================================================== //===========================================================================
bot_moveresult_t BotTravel_Grapple(bot_movestate_t *ms, aas_reachability_t *reach) bot_moveresult_t BotTravel_Grapple(bot_movestate_t *ms, aas_reachability_t *reach)
{ {
bot_moveresult_t result; bot_moveresult_t_cleared( result );
float dist, speed; float dist, speed;
vec3_t dir, viewdir, org; vec3_t dir, viewdir, org;
int state, areanum; int state, areanum;
@ -2601,7 +2565,6 @@ bot_moveresult_t BotTravel_Grapple(bot_movestate_t *ms, aas_reachability_t *reac
botimport.DebugLineShow(debugline, reach->start, reach->end, LINECOLOR_BLUE); botimport.DebugLineShow(debugline, reach->start, reach->end, LINECOLOR_BLUE);
#endif //DEBUG_GRAPPLE #endif //DEBUG_GRAPPLE
BotClearMoveResult(&result);
// //
if (ms->moveflags & MFL_GRAPPLERESET) if (ms->moveflags & MFL_GRAPPLERESET)
{ {
@ -2745,10 +2708,9 @@ bot_moveresult_t BotTravel_RocketJump(bot_movestate_t *ms, aas_reachability_t *r
{ {
vec3_t hordir; vec3_t hordir;
float dist, speed; float dist, speed;
bot_moveresult_t result; bot_moveresult_t_cleared( result );
//botimport.Print(PRT_MESSAGE, "BotTravel_RocketJump: bah\n"); //botimport.Print(PRT_MESSAGE, "BotTravel_RocketJump: bah\n");
BotClearMoveResult(&result);
// //
hordir[0] = reach->start[0] - ms->origin[0]; hordir[0] = reach->start[0] - ms->origin[0];
hordir[1] = reach->start[1] - ms->origin[1]; hordir[1] = reach->start[1] - ms->origin[1];
@ -2810,10 +2772,9 @@ bot_moveresult_t BotTravel_BFGJump(bot_movestate_t *ms, aas_reachability_t *reac
{ {
vec3_t hordir; vec3_t hordir;
float dist, speed; float dist, speed;
bot_moveresult_t result; bot_moveresult_t_cleared( result );
//botimport.Print(PRT_MESSAGE, "BotTravel_BFGJump: bah\n"); //botimport.Print(PRT_MESSAGE, "BotTravel_BFGJump: bah\n");
BotClearMoveResult(&result);
// //
hordir[0] = reach->start[0] - ms->origin[0]; hordir[0] = reach->start[0] - ms->origin[0];
hordir[1] = reach->start[1] - ms->origin[1]; hordir[1] = reach->start[1] - ms->origin[1];
@ -2871,9 +2832,8 @@ bot_moveresult_t BotFinishTravel_WeaponJump(bot_movestate_t *ms, aas_reachabilit
{ {
vec3_t hordir; vec3_t hordir;
float speed; float speed;
bot_moveresult_t result; bot_moveresult_t_cleared( result );
BotClearMoveResult(&result);
//if not jumped yet //if not jumped yet
if (!ms->jumpreach) return result; if (!ms->jumpreach) return result;
/* /*
@ -2911,9 +2871,8 @@ bot_moveresult_t BotTravel_JumpPad(bot_movestate_t *ms, aas_reachability_t *reac
{ {
float dist, speed; float dist, speed;
vec3_t hordir; vec3_t hordir;
bot_moveresult_t result; bot_moveresult_t_cleared( result );
BotClearMoveResult(&result);
//first walk straight to the reachability start //first walk straight to the reachability start
hordir[0] = reach->start[0] - ms->origin[0]; hordir[0] = reach->start[0] - ms->origin[0];
hordir[1] = reach->start[1] - ms->origin[1]; hordir[1] = reach->start[1] - ms->origin[1];
@ -2938,9 +2897,8 @@ bot_moveresult_t BotFinishTravel_JumpPad(bot_movestate_t *ms, aas_reachability_t
{ {
float speed; float speed;
vec3_t hordir; vec3_t hordir;
bot_moveresult_t result; bot_moveresult_t_cleared( result );
BotClearMoveResult(&result);
if (!BotAirControl(ms->origin, ms->velocity, reach->end, hordir, &speed)) if (!BotAirControl(ms->origin, ms->velocity, reach->end, hordir, &speed))
{ {
hordir[0] = reach->end[0] - ms->origin[0]; hordir[0] = reach->end[0] - ms->origin[0];
@ -2997,7 +2955,7 @@ int BotReachabilityTime(aas_reachability_t *reach)
//=========================================================================== //===========================================================================
bot_moveresult_t BotMoveInGoalArea(bot_movestate_t *ms, bot_goal_t *goal) bot_moveresult_t BotMoveInGoalArea(bot_movestate_t *ms, bot_goal_t *goal)
{ {
bot_moveresult_t result; bot_moveresult_t_cleared( result );
vec3_t dir; vec3_t dir;
float dist, speed; float dist, speed;
@ -3006,7 +2964,6 @@ bot_moveresult_t BotMoveInGoalArea(bot_movestate_t *ms, bot_goal_t *goal)
//AAS_ClearShownDebugLines(); //AAS_ClearShownDebugLines();
//AAS_DebugLine(ms->origin, goal->origin, LINECOLOR_RED); //AAS_DebugLine(ms->origin, goal->origin, LINECOLOR_RED);
#endif //DEBUG #endif //DEBUG
BotClearMoveResult(&result);
//walk straight to the goal origin //walk straight to the goal origin
dir[0] = goal->origin[0] - ms->origin[0]; dir[0] = goal->origin[0] - ms->origin[0];
dir[1] = goal->origin[1] - ms->origin[1]; dir[1] = goal->origin[1] - ms->origin[1];
@ -3061,8 +3018,13 @@ void BotMoveToGoal(bot_moveresult_t *result, int movestate, bot_goal_t *goal, in
//bsp_trace_t trace; //bsp_trace_t trace;
//static int debugline; //static int debugline;
result->failure = qfalse;
result->type = 0;
result->blocked = qfalse;
result->blockentity = 0;
result->traveltype = 0;
result->flags = 0;
BotClearMoveResult(result);
// //
ms = BotMoveStateFromHandle(movestate); ms = BotMoveStateFromHandle(movestate);
if (!ms) return; if (!ms) return;

View File

@ -117,7 +117,7 @@ static void CG_ScoresUp_f( void ) {
#ifdef MISSIONPACK #ifdef MISSIONPACK
extern menuDef_t *menuScoreboard; extern menuDef_t *menuScoreboard;
void Menu_Reset(); // FIXME: add to right include file void Menu_Reset( void ); // FIXME: add to right include file
static void CG_LoadHud_f( void) { static void CG_LoadHud_f( void) {
char buff[1024]; char buff[1024];

View File

@ -2135,7 +2135,7 @@ static void CG_DrawTeamVote(void) {
} }
static qboolean CG_DrawScoreboard() { static qboolean CG_DrawScoreboard( void ) {
#ifdef MISSIONPACK #ifdef MISSIONPACK
static qboolean firstTime = qtrue; static qboolean firstTime = qtrue;
float fade, *fadeColor; float fade, *fadeColor;
@ -2475,7 +2475,7 @@ static void CG_DrawWarmup( void ) {
CG_DrawTimedMenus CG_DrawTimedMenus
================= =================
*/ */
void CG_DrawTimedMenus() { void CG_DrawTimedMenus( void ) {
if (cg.voiceTime) { if (cg.voiceTime) {
int t = cg.time - cg.voiceTime; int t = cg.time - cg.voiceTime;
if ( t > 2500 ) { if ( t > 2500 ) {
@ -2587,7 +2587,7 @@ static void CG_Draw2D( void ) {
} }
static void CG_DrawTourneyScoreboard() { static void CG_DrawTourneyScoreboard( void ) {
#ifdef MISSIONPACK #ifdef MISSIONPACK
#else #else
CG_DrawOldTourneyScoreboard(); CG_DrawOldTourneyScoreboard();

View File

@ -1205,8 +1205,8 @@ void CG_MouseEvent(int x, int y);
void CG_EventHandling(int type); void CG_EventHandling(int type);
void CG_RankRunFrame( void ); void CG_RankRunFrame( void );
void CG_SetScoreSelection(void *menu); void CG_SetScoreSelection(void *menu);
score_t *CG_GetSelectedScore(); score_t *CG_GetSelectedScore( void );
void CG_BuildSpectatorString(); void CG_BuildSpectatorString( void );
// //
@ -1277,23 +1277,23 @@ void CG_OwnerDraw(float x, float y, float w, float h, float text_x, float text_y
void CG_Text_Paint(float x, float y, float scale, vec4_t color, const char *text, float adjust, int limit, int style); void CG_Text_Paint(float x, float y, float scale, vec4_t color, const char *text, float adjust, int limit, int style);
int CG_Text_Width(const char *text, float scale, int limit); int CG_Text_Width(const char *text, float scale, int limit);
int CG_Text_Height(const char *text, float scale, int limit); int CG_Text_Height(const char *text, float scale, int limit);
void CG_SelectPrevPlayer(); void CG_SelectPrevPlayer( void );
void CG_SelectNextPlayer(); void CG_SelectNextPlayer( void );
float CG_GetValue(int ownerDraw); float CG_GetValue(int ownerDraw);
qboolean CG_OwnerDrawVisible(int flags); qboolean CG_OwnerDrawVisible(int flags);
void CG_RunMenuScript(char **args); void CG_RunMenuScript(char **args);
void CG_ShowResponseHead(); void CG_ShowResponseHead( void );
void CG_SetPrintString(int type, const char *p); void CG_SetPrintString(int type, const char *p);
void CG_InitTeamChat(); void CG_InitTeamChat( void );
void CG_GetTeamColor(vec4_t *color); void CG_GetTeamColor(vec4_t *color);
const char *CG_GetGameStatusText(); const char *CG_GetGameStatusText( void );
const char *CG_GetKillerText(); const char *CG_GetKillerText( void );
void CG_Draw3DModel( float x, float y, float w, float h, qhandle_t model, qhandle_t skin, vec3_t origin, vec3_t angles ); void CG_Draw3DModel( float x, float y, float w, float h, qhandle_t model, qhandle_t skin, vec3_t origin, vec3_t angles );
void CG_Text_PaintChar(float x, float y, float width, float height, float scale, float s, float t, float s2, float t2, qhandle_t hShader); void CG_Text_PaintChar(float x, float y, float width, float height, float scale, float s, float t, float s2, float t2, qhandle_t hShader);
void CG_CheckOrderPending(); void CG_CheckOrderPending( void );
const char *CG_GameTypeString(); const char *CG_GameTypeString( void );
qboolean CG_YourTeamHasFlag(); qboolean CG_YourTeamHasFlag( void );
qboolean CG_OtherTeamHasFlag(); qboolean CG_OtherTeamHasFlag( void );
qhandle_t CG_StatusHandle(int task); qhandle_t CG_StatusHandle(int task);

View File

@ -1756,7 +1756,7 @@ CG_LoadHudMenu();
================= =================
*/ */
void CG_LoadHudMenu() { void CG_LoadHudMenu( void ) {
char buff[1024]; char buff[1024];
const char *hudSet; const char *hudSet;
@ -1823,7 +1823,7 @@ void CG_LoadHudMenu() {
CG_LoadMenus(hudSet); CG_LoadMenus(hudSet);
} }
void CG_AssetCache() { void CG_AssetCache( void ) {
//if (Assets.textFont == NULL) { //if (Assets.textFont == NULL) {
// trap_R_RegisterFont("fonts/arial.ttf", 72, &Assets.textFont); // trap_R_RegisterFont("fonts/arial.ttf", 72, &Assets.textFont);
//} //}

View File

@ -119,7 +119,7 @@ void CG_CheckOrderPending() {
} }
} }
static void CG_SetSelectedPlayerName() { static void CG_SetSelectedPlayerName( void ) {
if (cg_currentSelectedPlayer.integer >= 0 && cg_currentSelectedPlayer.integer < numSortedTeamPlayers) { if (cg_currentSelectedPlayer.integer >= 0 && cg_currentSelectedPlayer.integer < numSortedTeamPlayers) {
clientInfo_t *ci = cgs.clientinfo + sortedTeamPlayers[cg_currentSelectedPlayer.integer]; clientInfo_t *ci = cgs.clientinfo + sortedTeamPlayers[cg_currentSelectedPlayer.integer];
if (ci) { if (ci) {
@ -131,14 +131,14 @@ static void CG_SetSelectedPlayerName() {
trap_Cvar_Set("cg_selectedPlayerName", "Everyone"); trap_Cvar_Set("cg_selectedPlayerName", "Everyone");
} }
} }
int CG_GetSelectedPlayer() { int CG_GetSelectedPlayer( void ) {
if (cg_currentSelectedPlayer.integer < 0 || cg_currentSelectedPlayer.integer >= numSortedTeamPlayers) { if (cg_currentSelectedPlayer.integer < 0 || cg_currentSelectedPlayer.integer >= numSortedTeamPlayers) {
cg_currentSelectedPlayer.integer = 0; cg_currentSelectedPlayer.integer = 0;
} }
return cg_currentSelectedPlayer.integer; return cg_currentSelectedPlayer.integer;
} }
void CG_SelectNextPlayer() { void CG_SelectNextPlayer( void ) {
CG_CheckOrderPending(); CG_CheckOrderPending();
if (cg_currentSelectedPlayer.integer >= 0 && cg_currentSelectedPlayer.integer < numSortedTeamPlayers) { if (cg_currentSelectedPlayer.integer >= 0 && cg_currentSelectedPlayer.integer < numSortedTeamPlayers) {
cg_currentSelectedPlayer.integer++; cg_currentSelectedPlayer.integer++;
@ -148,7 +148,7 @@ void CG_SelectNextPlayer() {
CG_SetSelectedPlayerName(); CG_SetSelectedPlayerName();
} }
void CG_SelectPrevPlayer() { void CG_SelectPrevPlayer( void ) {
CG_CheckOrderPending(); CG_CheckOrderPending();
if (cg_currentSelectedPlayer.integer > 0 && cg_currentSelectedPlayer.integer < numSortedTeamPlayers) { if (cg_currentSelectedPlayer.integer > 0 && cg_currentSelectedPlayer.integer < numSortedTeamPlayers) {
cg_currentSelectedPlayer.integer--; cg_currentSelectedPlayer.integer--;
@ -1743,7 +1743,7 @@ CG_HideTeamMenus
================== ==================
*/ */
void CG_HideTeamMenu() { void CG_HideTeamMenu( void ) {
Menus_CloseByName("teamMenu"); Menus_CloseByName("teamMenu");
Menus_CloseByName("getMenu"); Menus_CloseByName("getMenu");
} }
@ -1754,7 +1754,7 @@ CG_ShowTeamMenus
================== ==================
*/ */
void CG_ShowTeamMenu() { void CG_ShowTeamMenu( void ) {
Menus_OpenByName("teamMenu"); Menus_OpenByName("teamMenu");
} }

View File

@ -175,7 +175,7 @@ extern int CL_ScaledMilliseconds(void);
// //
// Returns: Nothing // Returns: Nothing
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static void RllSetupTable() static void RllSetupTable( void )
{ {
int z; int z;
@ -1106,7 +1106,7 @@ static void RoQPrepMcomp( long xoff, long yoff )
* *
******************************************************************************/ ******************************************************************************/
static void initRoQ() static void initRoQ( void )
{ {
if (currentHandle < 0) return; if (currentHandle < 0) return;
@ -1140,7 +1140,7 @@ static byte* RoQFetchInterlaced( byte *source ) {
return cinTable[currentHandle].buf2; return cinTable[currentHandle].buf2;
} }
*/ */
static void RoQReset() { static void RoQReset( void ) {
if (currentHandle < 0) return; if (currentHandle < 0) return;

View File

@ -507,8 +507,8 @@ void CL_InitUI( void );
void CL_ShutdownUI( void ); void CL_ShutdownUI( void );
int Key_GetCatcher( void ); int Key_GetCatcher( void );
void Key_SetCatcher( int catcher ); void Key_SetCatcher( int catcher );
void LAN_LoadCachedServers(); void LAN_LoadCachedServers( void );
void LAN_SaveServersToCache(); void LAN_SaveServersToCache( void );
// //

View File

@ -36,7 +36,7 @@ void S_Play_f(void);
void S_SoundList_f(void); void S_SoundList_f(void);
void S_Music_f(void); void S_Music_f(void);
void S_Update_(); void S_Update_( void );
void S_StopAllSounds(void); void S_StopAllSounds(void);
void S_UpdateBackgroundTrack( void ); void S_UpdateBackgroundTrack( void );
@ -193,7 +193,7 @@ void S_ChannelFree(channel_t *v) {
freelist = (channel_t*)v; freelist = (channel_t*)v;
} }
channel_t* S_ChannelMalloc() { channel_t* S_ChannelMalloc( void ) {
channel_t *v; channel_t *v;
if (freelist == NULL) { if (freelist == NULL) {
return NULL; return NULL;
@ -204,7 +204,7 @@ channel_t* S_ChannelMalloc() {
return v; return v;
} }
void S_ChannelSetup() { void S_ChannelSetup( void ) {
channel_t *p, *q; channel_t *p, *q;
// clear all the sounds so they don't // clear all the sounds so they don't

View File

@ -167,13 +167,13 @@ extern cvar_t *s_separation;
qboolean S_LoadSound( sfx_t *sfx ); qboolean S_LoadSound( sfx_t *sfx );
void SND_free(sndBuffer *v); void SND_free(sndBuffer *v);
sndBuffer* SND_malloc(); sndBuffer* SND_malloc( void );
void SND_setup(); void SND_setup( void );
void S_PaintChannels(int endtime); void S_PaintChannels(int endtime);
void S_memoryLoad(sfx_t *sfx); void S_memoryLoad(sfx_t *sfx);
portable_samplepair_t *S_GetRawSamplePointer(); portable_samplepair_t *S_GetRawSamplePointer( void );
// spatializes a channel // spatializes a channel
void S_Spatialize(channel_t *ch); void S_Spatialize(channel_t *ch);
@ -188,7 +188,7 @@ void S_AdpcmGetSamples(sndBuffer *chunk, short *to);
#define SENTINEL_MULAW_ZERO_RUN 127 #define SENTINEL_MULAW_ZERO_RUN 127
#define SENTINEL_MULAW_FOUR_BIT_RUN 126 #define SENTINEL_MULAW_FOUR_BIT_RUN 126
void S_FreeOldestSound(); void S_FreeOldestSound( void );
#define NXStream byte #define NXStream byte

View File

@ -100,6 +100,8 @@ typedef struct bot_moveresult_s
vec3_t ideal_viewangles; //ideal viewangles for the movement vec3_t ideal_viewangles; //ideal viewangles for the movement
} bot_moveresult_t; } bot_moveresult_t;
#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 // bk001204: from code/botlib/be_ai_move.c
// TTimo 04/12/2001 was moved here to avoid dup defines // TTimo 04/12/2001 was moved here to avoid dup defines
typedef struct bot_avoidspot_s typedef struct bot_avoidspot_s

View File

@ -490,7 +490,7 @@ void G_AddPredictableEvent( gentity_t *ent, int event, int eventParm );
void G_AddEvent( gentity_t *ent, int event, int eventParm ); void G_AddEvent( gentity_t *ent, int event, int eventParm );
void G_SetOrigin( gentity_t *ent, vec3_t origin ); void G_SetOrigin( gentity_t *ent, vec3_t origin );
void AddRemap(const char *oldShader, const char *newShader, float timeOffset); void AddRemap(const char *oldShader, const char *newShader, float timeOffset);
const char *BuildShaderStateConfig(); const char *BuildShaderStateConfig( void );
// //
// g_combat.c // g_combat.c

View File

@ -316,7 +316,7 @@ void G_FindTeams( void ) {
G_Printf ("%i teams with %i entities\n", c, c2); G_Printf ("%i teams with %i entities\n", c, c2);
} }
void G_RemapTeamShaders() { void G_RemapTeamShaders( void ) {
#ifdef MISSIONPACK #ifdef MISSIONPACK
char string[1024]; char string[1024];
float f = level.time * 0.001; float f = level.time * 0.001;

View File

@ -1379,7 +1379,7 @@ void CM_TraceThroughPatchCollide( traceWork_t *tw, const struct patchCollide_s *
float offset, enterFrac, leaveFrac, t; float offset, enterFrac, leaveFrac, t;
patchPlane_t *planes; patchPlane_t *planes;
facet_t *facet; facet_t *facet;
float plane[4], bestplane[4]; float plane[4] = {0, 0, 0, 0}, bestplane[4] = {0, 0, 0, 0};
vec3_t startp, endp; vec3_t startp, endp;
#ifndef BSPC #ifndef BSPC
static cvar_t *cv; static cvar_t *cv;

View File

@ -100,7 +100,7 @@ qboolean com_fullyInitialized;
char com_errorMessage[MAXPRINTMSG]; char com_errorMessage[MAXPRINTMSG];
void Com_WriteConfig_f( void ); void Com_WriteConfig_f( void );
void CIN_CloseAllVideos(); void CIN_CloseAllVideos( void );
//============================================================================ //============================================================================

View File

@ -2699,7 +2699,7 @@ NOTE TTimo: the reordering that happens here is not reflected in the cvars (\cva
this can lead to misleading situations, see https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=540 this can lead to misleading situations, see https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=540
================ ================
*/ */
static void FS_ReorderPurePaks() static void FS_ReorderPurePaks( void )
{ {
searchpath_t *s; searchpath_t *s;
int i; int i;

View File

@ -39,7 +39,7 @@ Handles byte ordering and avoids alignment errors
int oldsize = 0; int oldsize = 0;
void MSG_initHuffman(); void MSG_initHuffman( void );
void MSG_Init( msg_t *buf, byte *data, int length ) { void MSG_Init( msg_t *buf, byte *data, int length ) {
if (!msgInit) { if (!msgInit) {
@ -1706,7 +1706,7 @@ int msg_hData[256] = {
13504, // 255 13504, // 255
}; };
void MSG_initHuffman() { void MSG_initHuffman( void ) {
int i,j; int i,j;
msgInit = qtrue; msgInit = qtrue;

View File

@ -529,9 +529,9 @@ issues.
#define BASEGAME "baseq3" #define BASEGAME "baseq3"
qboolean FS_Initialized(); qboolean FS_Initialized( void );
void FS_InitFilesystem (void); void FS_InitFilesystem ( void );
void FS_Shutdown( qboolean closemfp ); void FS_Shutdown( qboolean closemfp );
qboolean FS_ConditionalRestart( int checksumFeed ); qboolean FS_ConditionalRestart( int checksumFeed );
@ -547,7 +547,7 @@ void FS_FreeFileList( char **list );
qboolean FS_FileExists( const char *file ); qboolean FS_FileExists( const char *file );
int FS_LoadStack(); int FS_LoadStack( void );
int FS_GetFileList( const char *path, const char *extension, char *listbuf, int bufsize ); int FS_GetFileList( const char *path, const char *extension, char *listbuf, int bufsize );
int FS_GetModList( char *listbuf, int bufsize ); int FS_GetModList( char *listbuf, int bufsize );
@ -904,7 +904,7 @@ qboolean SV_GameCommand( void );
// UI interface // UI interface
// //
qboolean UI_GameCommand( void ); qboolean UI_GameCommand( void );
qboolean UI_usesUniqueCDKey(); qboolean UI_usesUniqueCDKey(void);
/* /*
============================================================== ==============================================================
@ -1018,8 +1018,8 @@ void Sys_FreeFileList( char **list );
void Sys_BeginProfiling( void ); void Sys_BeginProfiling( void );
void Sys_EndProfiling( void ); void Sys_EndProfiling( void );
qboolean Sys_LowPhysicalMemory(); qboolean Sys_LowPhysicalMemory( void );
unsigned int Sys_ProcessorCount(); unsigned int Sys_ProcessorCount( void );
int Sys_MonkeyShouldBeSpanked( void ); int Sys_MonkeyShouldBeSpanked( void );

View File

@ -454,6 +454,8 @@ typedef struct {
byte color[4]; byte color[4];
} drawVert_t; } drawVert_t;
#define drawVert_t_cleared(x) drawVert_t (x) = {{0, 0, 0}, {0, 0}, {0, 0}, {0, 0, 0}, {0, 0, 0, 0}}
typedef enum { typedef enum {
MST_BAD, MST_BAD,
MST_PLANAR, MST_PLANAR,

View File

@ -3034,7 +3034,7 @@ static int huft_build(uInt *b, uInt n, uInt s, const uInt *d, const uInt *e, inf
uInt mask; /* (1 << w) - 1, to avoid cc -O bug on HP */ uInt mask; /* (1 << w) - 1, to avoid cc -O bug on HP */
register uInt *p; /* pointer into c[], b[], or v[] */ register uInt *p; /* pointer into c[], b[], or v[] */
inflate_huft *q; /* points to current table */ inflate_huft *q; /* points to current table */
struct inflate_huft_s r; /* table entry for structure assignment */ struct inflate_huft_s r = {{{0, 0}}}; /* table entry for structure assignment */
inflate_huft *u[BMAX]; /* table stack */ inflate_huft *u[BMAX]; /* table stack */
register int w; /* bits before this table == (l * h) */ register int w; /* bits before this table == (l * h) */
uInt x[BMAX+1]; /* bit offsets, then code stack */ uInt x[BMAX+1]; /* bit offsets, then code stack */

View File

@ -174,7 +174,7 @@ static void R_LoadLightmaps( lump_t *l ) {
float g = buf_p[j*3+1]; float g = buf_p[j*3+1];
float b = buf_p[j*3+2]; float b = buf_p[j*3+2];
float intensity; float intensity;
float out[3]; float out[3] = {0.0, 0.0, 0.0};
intensity = 0.33f * r + 0.685f * g + 0.063f * b; intensity = 0.33f * r + 0.685f * g + 0.063f * b;

View File

@ -360,7 +360,9 @@ R_SubdividePatchToGrid
srfGridMesh_t *R_SubdividePatchToGrid( int width, int height, srfGridMesh_t *R_SubdividePatchToGrid( int width, int height,
drawVert_t points[MAX_PATCH_SIZE*MAX_PATCH_SIZE] ) { drawVert_t points[MAX_PATCH_SIZE*MAX_PATCH_SIZE] ) {
int i, j, k, l; int i, j, k, l;
drawVert_t prev, next, mid; drawVert_t_cleared( prev );
drawVert_t_cleared( next );
drawVert_t_cleared( mid );
float len, maxLen; float len, maxLen;
int dir; int dir;
int t; int t;

View File

@ -298,7 +298,7 @@ static glyphInfo_t *RE_ConstructGlyphInfo(unsigned char *imageOut, int *xOut, in
static int fdOffset; static int fdOffset;
static byte *fdFile; static byte *fdFile;
int readInt() { int readInt( void ) {
int i = fdFile[fdOffset]+(fdFile[fdOffset+1]<<8)+(fdFile[fdOffset+2]<<16)+(fdFile[fdOffset+3]<<24); int i = fdFile[fdOffset]+(fdFile[fdOffset+1]<<8)+(fdFile[fdOffset+2]<<16)+(fdFile[fdOffset+3]<<24);
fdOffset += 4; fdOffset += 4;
return i; return i;
@ -309,7 +309,7 @@ typedef union {
float ffred; float ffred;
} poor; } poor;
float readFloat() { float readFloat( void ) {
poor me; poor me;
#if __WORD_ORDER == __BIG_ENDIAN #if __WORD_ORDER == __BIG_ENDIAN
me.fred[0] = fdFile[fdOffset+3]; me.fred[0] = fdFile[fdOffset+3];

View File

@ -1601,8 +1601,8 @@ void RE_EndFrame( int *frontEndMsec, int *backEndMsec );
void SaveJPG(char * filename, int quality, int image_width, int image_height, unsigned char *image_buffer); void SaveJPG(char * filename, int quality, int image_width, int image_height, unsigned char *image_buffer);
// font stuff // font stuff
void R_InitFreeType(); void R_InitFreeType( void );
void R_DoneFreeType(); void R_DoneFreeType( void );
void RE_RegisterFont(const char *fontName, int pointSize, fontInfo_t *font); void RE_RegisterFont(const char *fontName, int pointSize, fontInfo_t *font);

View File

@ -810,7 +810,7 @@ void RB_CalcFogTexCoords( float *st ) {
qboolean eyeOutside; qboolean eyeOutside;
fog_t *fog; fog_t *fog;
vec3_t local; vec3_t local;
vec4_t fogDistanceVector, fogDepthVector; vec4_t fogDistanceVector, fogDepthVector = {0, 0, 0, 0};
fog = tr.world->fogs + tess.fogNum; fog = tr.world->fogs + tess.fogNum;

View File

@ -43,7 +43,7 @@ static char **shaderTextHashTable[MAX_SHADERTEXT_HASH];
return a hash value for the filename return a hash value for the filename
================ ================
*/ */
#warning TODO: check if long is ok here #warning TODO: check if long is ok here
static long generateHashValue( const char *fname, const int size ) { static long generateHashValue( const char *fname, const int size ) {
int i; int i;
long hash; long hash;

View File

@ -211,7 +211,7 @@ void UI_ClearScores() {
static void UI_Cache_f() { static void UI_Cache_f( void ) {
Display_CacheAll(); Display_CacheAll();
} }
@ -220,7 +220,7 @@ static void UI_Cache_f() {
UI_CalcPostGameStats UI_CalcPostGameStats
======================= =======================
*/ */
static void UI_CalcPostGameStats() { static void UI_CalcPostGameStats( void ) {
char map[MAX_QPATH]; char map[MAX_QPATH];
char fileName[MAX_QPATH]; char fileName[MAX_QPATH];
char info[MAX_INFO_STRING]; char info[MAX_INFO_STRING];

View File

@ -352,13 +352,13 @@ extern sfxHandle_t MenuField_Key( menufield_s* m, int* key );
// //
// ui_main.c // ui_main.c
// //
void UI_Report(); void UI_Report( void );
void UI_Load(); void UI_Load( void );
void UI_LoadMenus(const char *menuFile, qboolean reset); void UI_LoadMenus(const char *menuFile, qboolean reset);
void _UI_SetActiveMenu( uiMenuCommand_t menu ); void _UI_SetActiveMenu( uiMenuCommand_t menu );
int UI_AdjustTimeByGame(int time); int UI_AdjustTimeByGame(int time);
void UI_ShowPostGame(qboolean newHigh); void UI_ShowPostGame(qboolean newHigh);
void UI_ClearScores(); void UI_ClearScores( void );
void UI_LoadArenas(void); void UI_LoadArenas(void);
// //
@ -972,8 +972,8 @@ int trap_LAN_GetPingQueueCount( void );
void trap_LAN_ClearPing( int n ); void trap_LAN_ClearPing( int n );
void trap_LAN_GetPing( int n, char *buf, int buflen, int *pingtime ); void trap_LAN_GetPing( int n, char *buf, int buflen, int *pingtime );
void trap_LAN_GetPingInfo( int n, char *buf, int buflen ); void trap_LAN_GetPingInfo( int n, char *buf, int buflen );
void trap_LAN_LoadCachedServers(); void trap_LAN_LoadCachedServers( void );
void trap_LAN_SaveCachedServers(); void trap_LAN_SaveCachedServers( void );
void trap_LAN_MarkServerVisible(int source, int n, qboolean visible); void trap_LAN_MarkServerVisible(int source, int n, qboolean visible);
int trap_LAN_ServerIsVisible( int source, int n); int trap_LAN_ServerIsVisible( int source, int n);
qboolean trap_LAN_UpdateVisiblePings( int source ); qboolean trap_LAN_UpdateVisiblePings( int source );

View File

@ -213,7 +213,7 @@ long vmMain( long command, long arg0, long arg1, long arg2, long arg3, long arg4
void AssetCache() { void AssetCache( void ) {
int n; int n;
//if (Assets.textFont == NULL) { //if (Assets.textFont == NULL) {
//} //}
@ -845,7 +845,7 @@ qboolean Asset_Parse(int handle) {
return qfalse; return qfalse;
} }
void Font_Report() { void Font_Report( void ) {
int i; int i;
Com_Printf("Font Info\n"); Com_Printf("Font Info\n");
Com_Printf("=========\n"); Com_Printf("=========\n");
@ -854,7 +854,7 @@ void Font_Report() {
} }
} }
void UI_Report() { void UI_Report( void ) {
String_Report(); String_Report();
//Font_Report(); //Font_Report();
@ -1506,7 +1506,7 @@ static void UI_DrawOpponent(rectDef_t *rect) {
} }
static void UI_NextOpponent() { static void UI_NextOpponent( void ) {
int i = UI_TeamIndexFromName(UI_Cvar_VariableString("ui_opponentName")); int i = UI_TeamIndexFromName(UI_Cvar_VariableString("ui_opponentName"));
int j = UI_TeamIndexFromName(UI_Cvar_VariableString("ui_teamName")); int j = UI_TeamIndexFromName(UI_Cvar_VariableString("ui_teamName"));
i++; i++;
@ -1522,7 +1522,7 @@ static void UI_NextOpponent() {
trap_Cvar_Set( "ui_opponentName", uiInfo.teamList[i].teamName ); trap_Cvar_Set( "ui_opponentName", uiInfo.teamList[i].teamName );
} }
static void UI_PriorOpponent() { static void UI_PriorOpponent( void ) {
int i = UI_TeamIndexFromName(UI_Cvar_VariableString("ui_opponentName")); int i = UI_TeamIndexFromName(UI_Cvar_VariableString("ui_opponentName"));
int j = UI_TeamIndexFromName(UI_Cvar_VariableString("ui_teamName")); int j = UI_TeamIndexFromName(UI_Cvar_VariableString("ui_teamName"));
i--; i--;
@ -1787,7 +1787,7 @@ static void UI_DrawCrosshair(rectDef_t *rect, float scale, vec4_t color) {
UI_BuildPlayerList UI_BuildPlayerList
=============== ===============
*/ */
static void UI_BuildPlayerList() { static void UI_BuildPlayerList( void ) {
uiClientState_t cs; uiClientState_t cs;
int n, count, team, team2, playerTeamNumber; int n, count, team, team2, playerTeamNumber;
char info[MAX_INFO_STRING]; char info[MAX_INFO_STRING];
@ -2813,7 +2813,7 @@ static void UI_StartSinglePlayer() {
UI_LoadMods UI_LoadMods
=============== ===============
*/ */
static void UI_LoadMods() { static void UI_LoadMods( void ) {
int numdirs; int numdirs;
char dirlist[2048]; char dirlist[2048];
char *dirptr; char *dirptr;
@ -2844,7 +2844,7 @@ static void UI_LoadMods() {
UI_LoadTeams UI_LoadTeams
=============== ===============
*/ */
static void UI_LoadTeams() { static void UI_LoadTeams( void ) {
char teamList[4096]; char teamList[4096];
char *teamName; char *teamName;
int i, len, count; int i, len, count;
@ -2868,7 +2868,7 @@ static void UI_LoadTeams() {
UI_LoadMovies UI_LoadMovies
=============== ===============
*/ */
static void UI_LoadMovies() { static void UI_LoadMovies( void ) {
char movielist[4096]; char movielist[4096];
char *moviename; char *moviename;
int i, len; int i, len;
@ -2900,7 +2900,7 @@ static void UI_LoadMovies() {
UI_LoadDemos UI_LoadDemos
=============== ===============
*/ */
static void UI_LoadDemos() { static void UI_LoadDemos( void ) {
char demolist[4096]; char demolist[4096];
char demoExt[32]; char demoExt[32];
char *demoname; char *demoname;
@ -4270,7 +4270,7 @@ static int UI_GetIndexFromSelection(int actual) {
return 0; return 0;
} }
static void UI_UpdatePendingPings() { static void UI_UpdatePendingPings( void ) {
trap_LAN_ResetPings(ui_netSource.integer); trap_LAN_ResetPings(ui_netSource.integer);
uiInfo.serverStatus.refreshActive = qtrue; uiInfo.serverStatus.refreshActive = qtrue;
uiInfo.serverStatus.refreshtime = uiInfo.uiDC.realTime + 1000; uiInfo.serverStatus.refreshtime = uiInfo.uiDC.realTime + 1000;
@ -5222,7 +5222,7 @@ void _UI_MouseEvent( int dx, int dy )
} }
void UI_LoadNonIngame() { void UI_LoadNonIngame( void ) {
const char *menuSet = UI_Cvar_VariableString("ui_menuFiles"); const char *menuSet = UI_Cvar_VariableString("ui_menuFiles");
if (menuSet == NULL || menuSet[0] == '\0') { if (menuSet == NULL || menuSet[0] == '\0') {
menuSet = "ui/menus.txt"; menuSet = "ui/menus.txt";

View File

@ -2513,7 +2513,7 @@ static void Menu_CloseCinematics(menuDef_t *menu) {
} }
} }
static void Display_CloseCinematics() { static void Display_CloseCinematics( void ) {
int i; int i;
for (i = 0; i < menuCount; i++) { for (i = 0; i < menuCount; i++) {
Menu_CloseCinematics(&Menus[i]); Menu_CloseCinematics(&Menus[i]);
@ -2537,7 +2537,7 @@ void Menus_Activate(menuDef_t *menu) {
} }
int Display_VisibleMenuCount() { int Display_VisibleMenuCount( void ) {
int i, count; int i, count;
count = 0; count = 0;
for (i = 0; i < menuCount; i++) { for (i = 0; i < menuCount; i++) {

View File

@ -329,7 +329,7 @@ typedef struct {
void (*drawRect) ( float x, float y, float w, float h, float size, const vec4_t color); void (*drawRect) ( float x, float y, float w, float h, float size, const vec4_t color);
void (*drawSides) (float x, float y, float w, float h, float size); void (*drawSides) (float x, float y, float w, float h, float size);
void (*drawTopBottom) (float x, float y, float w, float h, float size); void (*drawTopBottom) (float x, float y, float w, float h, float size);
void (*clearScene) (); void (*clearScene) ( void );
void (*addRefEntityToScene) (const refEntity_t *re ); void (*addRefEntityToScene) (const refEntity_t *re );
void (*renderScene) ( const refdef_t *fd ); void (*renderScene) ( const refdef_t *fd );
void (*registerFont) (const char *pFontname, int pointSize, fontInfo_t *font); void (*registerFont) (const char *pFontname, int pointSize, fontInfo_t *font);
@ -343,7 +343,7 @@ typedef struct {
void (*setCVar)(const char *cvar, const char *value); void (*setCVar)(const char *cvar, const char *value);
void (*drawTextWithCursor)(float x, float y, float scale, vec4_t color, const char *text, int cursorPos, char cursor, int limit, int style); void (*drawTextWithCursor)(float x, float y, float scale, vec4_t color, const char *text, int cursorPos, char cursor, int limit, int style);
void (*setOverstrikeMode)(qboolean b); void (*setOverstrikeMode)(qboolean b);
qboolean (*getOverstrikeMode)(); qboolean (*getOverstrikeMode)( void );
void (*startLocalSound)( sfxHandle_t sfx, int channelNum ); void (*startLocalSound)( sfxHandle_t sfx, int channelNum );
qboolean (*ownerDrawHandleKey)(int ownerDraw, int flags, float *special, int key); qboolean (*ownerDrawHandleKey)(int ownerDraw, int flags, float *special, int key);
int (*feederCount)(float feederID); int (*feederCount)(float feederID);
@ -360,7 +360,7 @@ typedef struct {
int (*ownerDrawWidth)(int ownerDraw, float scale); int (*ownerDrawWidth)(int ownerDraw, float scale);
sfxHandle_t (*registerSound)(const char *name, qboolean compressed); sfxHandle_t (*registerSound)(const char *name, qboolean compressed);
void (*startBackgroundTrack)( const char *intro, const char *loop); void (*startBackgroundTrack)( const char *intro, const char *loop);
void (*stopBackgroundTrack)(); void (*stopBackgroundTrack)( void );
int (*playCinematic)(const char *name, float x, float y, float w, float h); int (*playCinematic)(const char *name, float x, float y, float w, float h);
void (*stopCinematic)(int handle); void (*stopCinematic)(int handle);
void (*drawCinematic)(int handle, float x, float y, float w, float h); void (*drawCinematic)(int handle, float x, float y, float w, float h);
@ -386,14 +386,14 @@ typedef struct {
} displayContextDef_t; } displayContextDef_t;
const char *String_Alloc(const char *p); const char *String_Alloc(const char *p);
void String_Init(); void String_Init( void );
void String_Report(); void String_Report( void );
void Init_Display(displayContextDef_t *dc); void Init_Display(displayContextDef_t *dc);
void Display_ExpandMacros(char * buff); void Display_ExpandMacros(char * buff);
void Menu_Init(menuDef_t *menu); void Menu_Init(menuDef_t *menu);
void Item_Init(itemDef_t *item); void Item_Init(itemDef_t *item);
void Menu_PostParse(menuDef_t *menu); void Menu_PostParse(menuDef_t *menu);
menuDef_t *Menu_GetFocused(); menuDef_t *Menu_GetFocused( void );
void Menu_HandleKey(menuDef_t *menu, int key, qboolean down); void Menu_HandleKey(menuDef_t *menu, int key, qboolean down);
void Menu_HandleMouseMove(menuDef_t *menu, float x, float y); void Menu_HandleMouseMove(menuDef_t *menu, float x, float y);
void Menu_ScrollFeeder(menuDef_t *menu, int feeder, qboolean down); void Menu_ScrollFeeder(menuDef_t *menu, int feeder, qboolean down);
@ -409,33 +409,33 @@ qboolean PC_Int_Parse(int handle, int *i);
qboolean PC_Rect_Parse(int handle, rectDef_t *r); qboolean PC_Rect_Parse(int handle, rectDef_t *r);
qboolean PC_String_Parse(int handle, const char **out); qboolean PC_String_Parse(int handle, const char **out);
qboolean PC_Script_Parse(int handle, const char **out); qboolean PC_Script_Parse(int handle, const char **out);
int Menu_Count(); int Menu_Count( void );
void Menu_New(int handle); void Menu_New(int handle);
void Menu_PaintAll(); void Menu_PaintAll( void );
menuDef_t *Menus_ActivateByName(const char *p); menuDef_t *Menus_ActivateByName(const char *p);
void Menu_Reset(); void Menu_Reset( void );
qboolean Menus_AnyFullScreenVisible(); qboolean Menus_AnyFullScreenVisible( void );
void Menus_Activate(menuDef_t *menu); void Menus_Activate(menuDef_t *menu);
displayContextDef_t *Display_GetContext(); displayContextDef_t *Display_GetContext( void );
void *Display_CaptureItem(int x, int y); void *Display_CaptureItem(int x, int y);
qboolean Display_MouseMove(void *p, int x, int y); qboolean Display_MouseMove(void *p, int x, int y);
int Display_CursorType(int x, int y); int Display_CursorType(int x, int y);
qboolean Display_KeyBindPending(); qboolean Display_KeyBindPending( void );
void Menus_OpenByName(const char *p); void Menus_OpenByName(const char *p);
menuDef_t *Menus_FindByName(const char *p); menuDef_t *Menus_FindByName(const char *p);
void Menus_ShowByName(const char *p); void Menus_ShowByName(const char *p);
void Menus_CloseByName(const char *p); void Menus_CloseByName(const char *p);
void Display_HandleKey(int key, qboolean down, int x, int y); void Display_HandleKey(int key, qboolean down, int x, int y);
void LerpColor(vec4_t a, vec4_t b, vec4_t c, float t); void LerpColor(vec4_t a, vec4_t b, vec4_t c, float t);
void Menus_CloseAll(); void Menus_CloseAll( void );
void Menu_Paint(menuDef_t *menu, qboolean forcePaint); void Menu_Paint(menuDef_t *menu, qboolean forcePaint);
void Menu_SetFeederSelection(menuDef_t *menu, int feeder, int index, const char *name); void Menu_SetFeederSelection(menuDef_t *menu, int feeder, int index, const char *name);
void Display_CacheAll(); void Display_CacheAll( void );
void *UI_Alloc( int size ); void *UI_Alloc( int size );
void UI_InitMemory( void ); void UI_InitMemory( void );
qboolean UI_OutOfMemory(); qboolean UI_OutOfMemory( void );
void Controls_GetConfig( void ); void Controls_GetConfig( void );
void Controls_SetConfig(qboolean restart); void Controls_SetConfig(qboolean restart);

View File

@ -266,11 +266,11 @@ int trap_LAN_ServerStatus( const char *serverAddress, char *serverStatus, int ma
return syscall( UI_LAN_SERVERSTATUS, serverAddress, serverStatus, maxLen ); return syscall( UI_LAN_SERVERSTATUS, serverAddress, serverStatus, maxLen );
} }
void trap_LAN_SaveCachedServers() { void trap_LAN_SaveCachedServers( void ) {
syscall( UI_LAN_SAVECACHEDSERVERS ); syscall( UI_LAN_SAVECACHEDSERVERS );
} }
void trap_LAN_LoadCachedServers() { void trap_LAN_LoadCachedServers( void ) {
syscall( UI_LAN_LOADCACHEDSERVERS ); syscall( UI_LAN_LOADCACHEDSERVERS );
} }

View File

@ -120,7 +120,8 @@ ifeq ($(PLATFORM),linux)
# bk001205: no mo' -I/usr/include/glide, no FX # bk001205: no mo' -I/usr/include/glide, no FX
# bk001205: no mo' -Dstricmp=strcasecmp, see q_shared.h # bk001205: no mo' -Dstricmp=strcasecmp, see q_shared.h
BASE_CFLAGS = -pipe -Wall BASE_CFLAGS = -pipe -Wall -Wimplicit -Wstrict-prototypes
#BASE_CFLAGS += -Werror # Disabled due to #warning usage.
# rcg010216: DLL_ONLY for PPC # rcg010216: DLL_ONLY for PPC
ifeq ($(strip $(DLL_ONLY)),true) ifeq ($(strip $(DLL_ONLY)),true)
BASE_CFLAGS += -DDLL_ONLY BASE_CFLAGS += -DDLL_ONLY

View File

@ -803,7 +803,7 @@ static void GLW_InitExtensions( void )
} }
static void GLW_InitGamma() static void GLW_InitGamma( void )
{ {
glConfig.deviceSupportsGamma = qtrue; glConfig.deviceSupportsGamma = qtrue;
} }

View File

@ -163,7 +163,7 @@ void Sys_In_Restart_f( void )
// flush stdin, I suspect some terminals are sending a LOT of shit // flush stdin, I suspect some terminals are sending a LOT of shit
// FIXME TTimo relevant? // FIXME TTimo relevant?
void tty_FlushIn() void tty_FlushIn( void )
{ {
char key; char key;
while (read(0, &key, 1)!=-1); while (read(0, &key, 1)!=-1);
@ -173,7 +173,7 @@ void tty_FlushIn()
// TTimo NOTE: it seems on some terminals just sending '\b' is not enough // TTimo NOTE: it seems on some terminals just sending '\b' is not enough
// so for now, in any case we send "\b \b" .. yeah well .. // so for now, in any case we send "\b \b" .. yeah well ..
// (there may be a way to find out if '\b' alone would work though) // (there may be a way to find out if '\b' alone would work though)
void tty_Back() void tty_Back( void )
{ {
char key; char key;
key = '\b'; key = '\b';
@ -186,7 +186,7 @@ void tty_Back()
// clear the display of the line currently edited // clear the display of the line currently edited
// bring cursor back to beginning of line // bring cursor back to beginning of line
void tty_Hide() void tty_Hide( void )
{ {
int i; int i;
assert(ttycon_on); assert(ttycon_on);
@ -207,7 +207,7 @@ void tty_Hide()
// show the current line // show the current line
// FIXME TTimo need to position the cursor if needed?? // FIXME TTimo need to position the cursor if needed??
void tty_Show() void tty_Show( void )
{ {
int i; int i;
assert(ttycon_on); assert(ttycon_on);
@ -226,7 +226,7 @@ void tty_Show()
} }
// never exit without calling this, or your terminal will be left in a pretty bad state // never exit without calling this, or your terminal will be left in a pretty bad state
void Sys_ConsoleInputShutdown() void Sys_ConsoleInputShutdown( void )
{ {
if (ttycon_on) if (ttycon_on)
{ {
@ -255,7 +255,7 @@ void Hist_Add(field_t *field)
hist_current = -1; // re-init hist_current = -1; // re-init
} }
field_t *Hist_Prev() field_t *Hist_Prev( void )
{ {
int hist_prev; int hist_prev;
assert(hist_count <= TTY_HISTORY); assert(hist_count <= TTY_HISTORY);
@ -271,7 +271,7 @@ field_t *Hist_Prev()
return &(ttyEditLines[hist_current]); return &(ttyEditLines[hist_current]);
} }
field_t *Hist_Next() field_t *Hist_Next( void )
{ {
assert(hist_count <= TTY_HISTORY); assert(hist_count <= TTY_HISTORY);
assert(hist_count >= 0); assert(hist_count >= 0);
@ -473,7 +473,7 @@ void floating_point_exception_handler(int whatever)
} }
// initialize the console input (tty mode if wanted and possible) // initialize the console input (tty mode if wanted and possible)
void Sys_ConsoleInputInit() void Sys_ConsoleInputInit( void )
{ {
struct termios tc; struct termios tc;
@ -1193,7 +1193,7 @@ void Sys_Print( const char *msg )
} }
void Sys_ConfigureFPU() { // bk001213 - divide by zero void Sys_ConfigureFPU( void ) { // bk001213 - divide by zero
#ifdef __linux__ #ifdef __linux__
#ifdef __i386 #ifdef __i386
#ifndef NDEBUG #ifndef NDEBUG