New code added for the callvote menu map list

This commit is contained in:
Andrei Drexler 2002-09-08 13:14:47 +00:00
parent 27fdd7d322
commit e1cc193ea8
3 changed files with 60 additions and 25 deletions

View File

@ -3,34 +3,25 @@
<pre> <pre>
<h1>Build Log</h1> <h1>Build Log</h1>
<h3> <h3>
--------------------Configuration: cgame - Win32 Release--------------------
</h3>
<h3>Command Lines</h3>
<h3>Results</h3>
cgamex86.dll - 0 error(s), 0 warning(s)
<h3>
--------------------Configuration: game - Win32 Release--------------------
</h3>
<h3>Command Lines</h3>
<h3>Results</h3>
qagamex86.dll - 0 error(s), 0 warning(s)
<h3>
--------------------Configuration: ui - Win32 Release TA-------------------- --------------------Configuration: ui - Win32 Release TA--------------------
</h3> </h3>
<h3>Command Lines</h3> <h3>Command Lines</h3>
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 /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_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 command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP463.tmp"
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP2E.tmp" with contents 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" /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 .\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_syscalls.obj
.\Release_TA\ui_util.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"
<h3>Output Window</h3> <h3>Output Window</h3>
Compiling... Compiling...
bg_misc.c
q_math.c
q_shared.c
ui_atoms.c ui_atoms.c
ui_gameinfo.c
ui_main.c
ui_players.c
ui_shared.c
ui_syscalls.c
ui_util.c
Linking... Linking...
Creating library Release_TA/uix86.lib and object Release_TA/uix86.exp Creating library Release_TA/uix86.lib and object Release_TA/uix86.exp

View File

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $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 // Revision 1.9 2002/07/24 05:28:44 jbravo
// Changed rq3ctf to rq3ctb in the .arena parsing code. // 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; uiInfo.mapList[uiInfo.mapCount].typeBits |= RQ3_GameTypes[i].Value;
} }
} }
} else { }// else {
uiInfo.mapList[uiInfo.mapCount].typeBits |= UI_RQ3_DefaultArenaGameType; // uiInfo.mapList[uiInfo.mapCount].typeBits |= UI_RQ3_DefaultArenaGameType;
} //}
uiInfo.mapCount++; uiInfo.mapCount++;
if (uiInfo.mapCount >= MAX_MAPS) { if (uiInfo.mapCount >= MAX_MAPS) {

View File

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $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 // Revision 1.50 2002/09/08 00:34:26 jbravo
// Bumped version to 2.21 // Bumped version to 2.21
// //
@ -307,6 +310,8 @@ static void UI_ParseGameInfo(const char *teamFile);
static void UI_ParseTeamInfo(const char *teamFile); static void UI_ParseTeamInfo(const char *teamFile);
static const char *UI_SelectedMap(int index, int *actual); static const char *UI_SelectedMap(int index, int *actual);
static const char *UI_SelectedHead(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); static int UI_GetIndexFromSelection(int actual);
@ -4204,6 +4209,12 @@ static void UI_RunMenuScript(char **args)
UI_LoadArenas(); UI_LoadArenas();
UI_MapCountByGameType(qfalse); UI_MapCountByGameType(qfalse);
Menu_SetFeederSelection(NULL, FEEDER_ALLMAPS, 0, "createserver"); 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) { } else if (Q_stricmp(name, "saveControls") == 0) {
Controls_SetConfig(qtrue); Controls_SetConfig(qtrue);
} else if (Q_stricmp(name, "loadControls") == 0) { } else if (Q_stricmp(name, "loadControls") == 0) {
@ -4615,6 +4626,27 @@ static int UI_MapCountByGameType(qboolean singlePlayer)
return c; 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) qboolean UI_hasSkinForBase(const char *base, const char *team)
{ {
char test[1024]; char test[1024];