From e1cc193ea874a54514548b6ae79ad07869afcdec Mon Sep 17 00:00:00 2001 From: Andrei Drexler Date: Sun, 8 Sep 2002 13:14:47 +0000 Subject: [PATCH] New code added for the callvote menu map list --- reaction/ta_ui/ta_ui.plg | 44 ++++++++++++++++++------------------ reaction/ta_ui/ui_gameinfo.c | 9 +++++--- reaction/ta_ui/ui_main.c | 32 ++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 25 deletions(-) diff --git a/reaction/ta_ui/ta_ui.plg b/reaction/ta_ui/ta_ui.plg index 17070161..22f8a991 100644 --- a/reaction/ta_ui/ta_ui.plg +++ b/reaction/ta_ui/ta_ui.plg @@ -3,34 +3,25 @@
 

Build Log

---------------------Configuration: cgame - Win32 Release-------------------- -

-

Command Lines

- - - -

Results

-cgamex86.dll - 0 error(s), 0 warning(s) -

---------------------Configuration: game - Win32 Release-------------------- -

-

Command Lines

- - - -

Results

-qagamex86.dll - 0 error(s), 0 warning(s) -

--------------------Configuration: ui - Win32 Release TA--------------------

Command Lines

-Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP2D.tmp" with contents +Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP463.tmp" with contents [ /nologo /G6 /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UI_EXPORTS" /Fp"Release_TA/ta_ui.pch" /YX /Fo"Release_TA/" /Fd"Release_TA/" /FD /c +"C:\Games\Quake3\rq3source\reaction\game\bg_misc.c" +"C:\Games\Quake3\rq3source\reaction\game\q_math.c" +"C:\Games\Quake3\rq3source\reaction\game\q_shared.c" "C:\Games\Quake3\rq3source\reaction\ta_ui\ui_atoms.c" +"C:\Games\Quake3\rq3source\reaction\ta_ui\ui_gameinfo.c" +"C:\Games\Quake3\rq3source\reaction\ta_ui\ui_main.c" +"C:\Games\Quake3\rq3source\reaction\ta_ui\ui_players.c" +"C:\Games\Quake3\rq3source\reaction\ta_ui\ui_shared.c" +"C:\Games\Quake3\rq3source\reaction\ta_ui\ui_syscalls.c" +"C:\Games\Quake3\rq3source\reaction\ta_ui\ui_util.c" ] -Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP2D.tmp" -Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP2E.tmp" with contents +Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP463.tmp" +Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP464.tmp" with contents [ /nologo /base:"0x40000000" /dll /incremental:no /pdb:"Release_TA/uix86.pdb" /map:"Release_TA/uix86.map" /machine:I386 /def:".\ui.def" /out:"../Release/uix86.dll" /implib:"Release_TA/uix86.lib" .\Release_TA\bg_misc.obj @@ -44,10 +35,19 @@ Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP2E.tmp" with conten .\Release_TA\ui_syscalls.obj .\Release_TA\ui_util.obj ] -Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP2E.tmp" +Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP464.tmp"

Output Window

Compiling... +bg_misc.c +q_math.c +q_shared.c ui_atoms.c +ui_gameinfo.c +ui_main.c +ui_players.c +ui_shared.c +ui_syscalls.c +ui_util.c Linking... Creating library Release_TA/uix86.lib and object Release_TA/uix86.exp diff --git a/reaction/ta_ui/ui_gameinfo.c b/reaction/ta_ui/ui_gameinfo.c index 53183b14..ba1d899e 100644 --- a/reaction/ta_ui/ui_gameinfo.c +++ b/reaction/ta_ui/ui_gameinfo.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.10 2002/09/08 13:14:47 makro +// New code added for the callvote menu map list +// // Revision 1.9 2002/07/24 05:28:44 jbravo // Changed rq3ctf to rq3ctb in the .arena parsing code. // @@ -253,9 +256,9 @@ void UI_LoadArenas(void) uiInfo.mapList[uiInfo.mapCount].typeBits |= RQ3_GameTypes[i].Value; } } - } else { - uiInfo.mapList[uiInfo.mapCount].typeBits |= UI_RQ3_DefaultArenaGameType; - } + }// else { + // uiInfo.mapList[uiInfo.mapCount].typeBits |= UI_RQ3_DefaultArenaGameType; + //} uiInfo.mapCount++; if (uiInfo.mapCount >= MAX_MAPS) { diff --git a/reaction/ta_ui/ui_main.c b/reaction/ta_ui/ui_main.c index 8143d46a..af9372dc 100644 --- a/reaction/ta_ui/ui_main.c +++ b/reaction/ta_ui/ui_main.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.51 2002/09/08 13:14:47 makro +// New code added for the callvote menu map list +// // Revision 1.50 2002/09/08 00:34:26 jbravo // Bumped version to 2.21 // @@ -307,6 +310,8 @@ 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); +//Makro - added +static int UI_MapCountVote(void); static int UI_GetIndexFromSelection(int actual); @@ -4204,6 +4209,12 @@ static void UI_RunMenuScript(char **args) UI_LoadArenas(); UI_MapCountByGameType(qfalse); Menu_SetFeederSelection(NULL, FEEDER_ALLMAPS, 0, "createserver"); + //Makro - new UI script that doesn't check the gametype + } else if (Q_stricmp(name, "loadVoteArenas") == 0) { + trap_Cvar_Set("ui_currentNetMap", "0"); + UI_LoadArenas(); + UI_MapCountVote(); + Menu_SetFeederSelection(NULL, FEEDER_ALLMAPS, 0, "ingame_callvote"); } else if (Q_stricmp(name, "saveControls") == 0) { Controls_SetConfig(qtrue); } else if (Q_stricmp(name, "loadControls") == 0) { @@ -4615,6 +4626,27 @@ static int UI_MapCountByGameType(qboolean singlePlayer) return c; } +/* +================== +UI_MapCountVote +Added by Makro +================== +*/ +static int UI_MapCountVote(void) +{ + int i, c = 0; + + for (i=0; i < uiInfo.mapCount; i++) { + if (uiInfo.mapList[i].typeBits != 0) { + c++; + uiInfo.mapList[i].active = qtrue; + } else { + uiInfo.mapList[i].active = qfalse; + } + } + return c; +} + qboolean UI_hasSkinForBase(const char *base, const char *team) { char test[1024];