diff --git a/reaction/cgame/cg_info.c b/reaction/cgame/cg_info.c index 4b426ac1..785a11da 100644 --- a/reaction/cgame/cg_info.c +++ b/reaction/cgame/cg_info.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.18 2002/05/25 10:40:31 makro +// Loading screen +// // Revision 1.17 2002/05/24 18:41:34 makro // Loading screen // @@ -165,19 +168,22 @@ CG_DrawInformation Draw all the status / pacifier stuff during level loading ==================== */ -#define LOADING_SCREEN_TOPMARGIN 64 -#define LOADING_SCREEN_BOTTOMMARGIN 32 +#define LS_TOPMARGIN 72 +#define LS_BOTTOMMARGIN 48 +#define LS_CHAR_WIDTH 8 +#define LS_CHAR_HEIGHT 12 + void CG_DrawInformation( void ) { const char *s; const char *info; const char *sysInfo; - const char *line; + char *line; int x = 8; int y; int value; qhandle_t levelshot, shadow; - qhandle_t detail; + //qhandle_t detail; char buf[1024]; qboolean skipdetail; vec4_t color1 = {.75, .75, .75, 1}, color2 = {1, 1, 1, 1}; @@ -187,6 +193,7 @@ void CG_DrawInformation( void ) { info = CG_ConfigString( CS_SERVERINFO ); sysInfo = CG_ConfigString( CS_SYSTEMINFO ); + /* Makro - no longer used //Makro - settings read from the worldspawn entity s = CG_ConfigString( CS_LOADINGSCREEN ); color1[0] = atof(Info_ValueForKey(s, "r1")); @@ -197,6 +204,7 @@ void CG_DrawInformation( void ) { color2[2] = atof(Info_ValueForKey(s, "b2")); color1[3] = color2[3] = 1; skipdetail = ( atoi(Info_ValueForKey(s, "nodetail")) != 0 ); + */ s = Info_ValueForKey( info, "mapname" ); shadow = trap_R_RegisterShaderNoMip("ui/assets/rq3-main-shadow-1.tga"); @@ -209,21 +217,23 @@ void CG_DrawInformation( void ) { trap_R_SetColor( NULL ); CG_DrawPic( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, levelshot ); + /* Makro - removed // blend a detail texture over it //Elder: changed to RQ3 detail overlay if (!skipdetail) { detail = trap_R_RegisterShader( "rq3-levelShotDetail" ); trap_R_DrawStretchPic( 0, 0, cgs.glconfig.vidWidth, cgs.glconfig.vidHeight, 0, 0, 2.5, 2, detail ); } + */ //Elder: "Letterbox" mask //Makro - changed it a bit - CG_FillRect( 0, 0, SCREEN_WIDTH, LOADING_SCREEN_TOPMARGIN, colorBlack); - CG_FillRect( 0, LOADING_SCREEN_TOPMARGIN, SCREEN_WIDTH, 2, colorMdGrey); - CG_FillRect( 0, SCREEN_HEIGHT - LOADING_SCREEN_BOTTOMMARGIN, SCREEN_WIDTH, LOADING_SCREEN_BOTTOMMARGIN, colorBlack); - CG_FillRect( 0, SCREEN_HEIGHT - LOADING_SCREEN_BOTTOMMARGIN - 2, SCREEN_WIDTH, 2, colorMdGrey); + CG_FillRect( 0, 0, SCREEN_WIDTH, LS_TOPMARGIN, colorBlack); + CG_FillRect( 0, LS_TOPMARGIN, SCREEN_WIDTH, 2, colorMdGrey); + CG_FillRect( 0, SCREEN_HEIGHT - LS_BOTTOMMARGIN, SCREEN_WIDTH, LS_BOTTOMMARGIN, colorBlack); + CG_FillRect( 0, SCREEN_HEIGHT - LS_BOTTOMMARGIN - 2, SCREEN_WIDTH, 2, colorMdGrey); //Makro - shadow - CG_DrawPic( 0, LOADING_SCREEN_TOPMARGIN + 2, 640, 12, shadow ); + CG_DrawPic( 0, LS_TOPMARGIN + 2, 640, 12, shadow ); //Elder: mapname //Makro - removed @@ -234,65 +244,27 @@ void CG_DrawInformation( void ) { // draw the icons of things as they are loaded //CG_DrawLoadingIcons(); - // the first 150 rows are reserved for the client connection - // screen to write into - y = SCREEN_HEIGHT - (int) (0.5 * (LOADING_SCREEN_BOTTOMMARGIN + SMALLCHAR_HEIGHT)); - if ( cg.infoScreenText[0] ) { - CG_DrawSmallStringColor(x, y, va("LOADING... %s", Q_strupr(cg.infoScreenText)), colorWhite); - } else { - CG_DrawSmallStringColor( x, y, "AWAITING SNAPSHOT...", colorWhite); - } - // draw info string information //Elder: Initial y-position - y = 8; + y = LS_TOPMARGIN - 8 - LS_CHAR_HEIGHT; // map-specific message (long map name) s = CG_ConfigString( CS_MESSAGE ); if ( s[0] ) { - //Makro - allow color-coded texts; also changed to use custom color instead of colorLtGrey + //Makro - allow color-coded text; also changed to use custom color instead of colorLtGrey //CG_DrawSmallStringColor(x, y, s, colorMdGrey); - CG_DrawStringExt(x, y, s, color1, qfalse, qfalse, SMALLCHAR_WIDTH, SMALLCHAR_HEIGHT, 0); - //CG_DrawStringExt(x, y, s, colorWhite, qtrue, qfalse, SMALLCHAR_WIDTH, SMALLCHAR_HEIGHT, 0); + CG_DrawStringExt(x, y, s, color1, qtrue, qfalse, LS_CHAR_WIDTH, LS_CHAR_HEIGHT, 0); + //CG_DrawStringExt(x, y, s, colorWhite, qtrue, qfalse, LS_CHAR_WIDTH, LS_CHAR_HEIGHT, 0); - y += SMALLCHAR_HEIGHT; + y -= (2 * LS_CHAR_HEIGHT); } - // don't print server lines if playing a local game - trap_Cvar_VariableStringBuffer( "sv_running", buf, sizeof( buf ) ); - if ( !atoi( buf ) ) { - - // server hostname - Q_strncpyz(buf, Info_ValueForKey( info, "sv_hostname" ), 1024); - Q_CleanStr(buf); - //Makro - custom color; changed from colorWhite - CG_DrawSmallStringColor(x, y, buf, color2); - y += SMALLCHAR_HEIGHT; - - // pure server - s = Info_ValueForKey( sysInfo, "sv_pure" ); - if ( s[0] == '1' ) { - //Makro - custom color; changed from colorWhite - CG_DrawSmallStringColor(x, y, "PURE SERVER", color2); - y += SMALLCHAR_HEIGHT; - } - - // server-specific message of the day - s = CG_ConfigString( CS_MOTD ); - if ( s[0] ) { - //Makro - custom color; changed from colorWhite - UI_DrawProportionalString( x, 360, s, UI_LEFT|UI_SMALLFONT, color2 ); - y += PROP_HEIGHT; - } - - } - - //y += SMALLCHAR_HEIGHT; + //y += LS_CHAR_HEIGHT; // game type switch ( cgs.gametype ) { case GT_FFA: - line = "CLASSIC ACTION DEATHMATCH"; + line = "Classic Action Deathmatch"; break; case GT_SINGLE_PLAYER: line = "Single Player"; @@ -306,7 +278,7 @@ void CG_DrawInformation( void ) { // JBravo: teamplay stuff. case GT_TEAMPLAY: //Makro - changed from RQ3 Teamplay - line = "CLASSIC ACTION TEAMPLAY"; + line = "Classic Action Teamplay"; break; case GT_CTF: line = "Capture The Flag"; @@ -326,17 +298,29 @@ void CG_DrawInformation( void ) { line = "Unknown Gametype"; break; } + line = Q_strupr(line); + // cheats warning s = Info_ValueForKey( sysInfo, "sv_cheats" ); - if ( s[0] == '1' ) { + //Makro - didn't like this + //if ( s[0] == '1' ) { + if ( atoi(s) ) { line = va("%s / CHEATS ARE ENABLED", line); } //Makro - custom color; changed from colorWhite - CG_DrawSmallStringColor(x, y, line, color2); - y += SMALLCHAR_HEIGHT; + //CG_DrawSmallStringColor(x, y, line, color2); + CG_DrawStringExt(x, y, line, color2, qfalse, qfalse, LS_CHAR_WIDTH, LS_CHAR_HEIGHT, 0); + y -= LS_CHAR_HEIGHT; line = ""; + // pure server + s = Info_ValueForKey( sysInfo, "sv_pure" ); + if ( atoi(s) ) { + if (line[0]) line = va("%s / ", line); + line = va("%sPURE SERVER", line); + } + value = atoi( Info_ValueForKey( info, "timelimit" ) ); if ( value ) { line = va("TIMELIMIT %i", value); @@ -345,22 +329,64 @@ void CG_DrawInformation( void ) { if (cgs.gametype < GT_CTF ) { value = atoi( Info_ValueForKey( info, "fraglimit" ) ); if ( value ) { - if (line[0] != '\0') line = va("%s /", line); - line = va("%s FRAGLIMIT %i", line, value); + if (line[0]) line = va("%s / ", line); + line = va("%sFRAGLIMIT %i", line, value); } } if (cgs.gametype >= GT_CTF) { value = atoi( Info_ValueForKey( info, "capturelimit" ) ); if ( value ) { - if (line[0] != '\0') line = va("%s /", line); - line = va("%s CAPTURELIMIT %i", line, value); + if (line[0]) line = va("%s / ", line); + line = va("%sCAPTURELIMIT %i", line, value); } } - //Makro - custom color; changed from colorWhite - CG_DrawSmallStringColor(x, y, line, color2); - y += SMALLCHAR_HEIGHT; + //Makro - don't write unless there's something to write + if ( line[0] ) { + CG_DrawStringExt(x, y, line, color2, qfalse, qfalse, LS_CHAR_WIDTH, LS_CHAR_HEIGHT, 0); + y -= LS_CHAR_HEIGHT; + } + + line = ""; + // don't print server lines if playing a local game + trap_Cvar_VariableStringBuffer( "sv_running", buf, sizeof( buf ) ); + if ( !atoi( buf ) ) { + + // server hostname + Q_strncpyz(buf, Info_ValueForKey( info, "sv_hostname" ), 1024); + Q_CleanStr(buf); + if (buf[0] && Q_stricmp(buf, "noname")) { + line = va("%s", buf); + } + + // server-specific message of the day + s = CG_ConfigString( CS_MOTD ); + if ( s[0] ) { + if (line[0]) line = va("%s / ", line); + line = va("%s%s", line, s); + } + + //Makro - don't write unless there's something to write + if ( line[0] ) + CG_DrawStringExt(x, y, line, color2, qfalse, qfalse, LS_CHAR_WIDTH, LS_CHAR_HEIGHT, 0); + y -= LS_CHAR_HEIGHT; + } + + // BOTTOM // + + // the first 150 rows are reserved for the client connection + // screen to write into + //y = SCREEN_HEIGHT - (int) (0.5 * (LS_BOTTOMMARGIN + LS_CHAR_HEIGHT)); + y = SCREEN_HEIGHT - LS_BOTTOMMARGIN + 8; + if ( cg.infoScreenText[0] ) { + CG_DrawStringExt(x, y, va("LOADING... %s", Q_strupr(cg.infoScreenText)), color2, qfalse, qfalse, LS_CHAR_WIDTH, LS_CHAR_HEIGHT, 0); + //UI_DrawProportionalString(SCREEN_WIDTH - 8, y, va("LOADING... %s", Q_strupr(cg.infoScreenText)), UI_RIGHT, colorWhite); + } else { + CG_DrawStringExt(x, y, "AWAITING SNAPSHOT...", color2, qfalse, qfalse, LS_CHAR_WIDTH, LS_CHAR_HEIGHT, 0); + //UI_DrawProportionalString(SCREEN_WIDTH - 8, y, "AWAITING SNAPSHOT...", UI_RIGHT, colorWhite); + } + //y += LS_CHAR_HEIGHT; } diff --git a/reaction/cgame/cgame.plg b/reaction/cgame/cgame.plg index 429c1d56..4268444b 100644 --- a/reaction/cgame/cgame.plg +++ b/reaction/cgame/cgame.plg @@ -6,13 +6,13 @@ --------------------Configuration: cgame - Win32 Release--------------------
Build Log
---------------------Configuration: game - Win32 Release-------------------- +--------------------Configuration: cgame - Win32 Release--------------------
Command Lines
-Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP94.tmp" with contents +Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP1A7.tmp" with contents [ -/nologo /G6 /ML /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FR"c:\reactionoutput/" /Fp"c:\reactionoutput/game.pch" /YX /Fo"c:\reactionoutput/" /Fd"c:\reactionoutput/" /FD /c -"C:\Games\Quake3\rq3source\reaction\game\g_mover.c" -"C:\Games\Quake3\rq3source\reaction\game\g_weapon.c" +/nologo /G6 /ML /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Fp"Release/cgame.pch" /YX /Fo"Release/" /Fd"Release/" /FD /c +"C:\Games\Quake3\rq3source\reaction\game\bg_misc.c" +"C:\Games\Quake3\rq3source\reaction\game\bg_pmove.c" +"C:\Games\Quake3\rq3source\reaction\game\bg_slidemove.c" +"C:\Games\Quake3\rq3source\reaction\cgame\cg_consolecmds.c" +"C:\Games\Quake3\rq3source\reaction\cgame\cg_draw.c" +"C:\Games\Quake3\rq3source\reaction\cgame\cg_drawtools.c" +"C:\Games\Quake3\rq3source\reaction\cgame\cg_effects.c" +"C:\Games\Quake3\rq3source\reaction\cgame\cg_ents.c" +"C:\Games\Quake3\rq3source\reaction\cgame\cg_event.c" +"C:\Games\Quake3\rq3source\reaction\cgame\cg_info.c" +"C:\Games\Quake3\rq3source\reaction\cgame\cg_localents.c" +"C:\Games\Quake3\rq3source\reaction\cgame\cg_main.c" +"C:\Games\Quake3\rq3source\reaction\cgame\cg_marks.c" +"C:\Games\Quake3\rq3source\reaction\cgame\cg_players.c" +"C:\Games\Quake3\rq3source\reaction\cgame\cg_playerstate.c" +"C:\Games\Quake3\rq3source\reaction\cgame\cg_predict.c" +"C:\Games\Quake3\rq3source\reaction\cgame\cg_scoreboard.c" +"C:\Games\Quake3\rq3source\reaction\cgame\cg_servercmds.c" +"C:\Games\Quake3\rq3source\reaction\cgame\cg_snapshot.c" +"C:\Games\Quake3\rq3source\reaction\cgame\cg_syscalls.c" +"C:\Games\Quake3\rq3source\reaction\cgame\cg_view.c" +"C:\Games\Quake3\rq3source\reaction\cgame\cg_weapons.c" ] -Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP94.tmp" -Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP95.tmp" with contents +Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP1A7.tmp" +Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP1A8.tmp" with contents [ -kernel32.lib user32.lib winmm.lib /nologo /base:"0x20000000" /subsystem:windows /dll /incremental:no /pdb:"c:\reactionoutput/qagamex86.pdb" /map:"c:\reactionoutput/qagamex86.map" /machine:I386 /def:".\game.def" /out:"..\Release/qagamex86.dll" /implib:"c:\reactionoutput/qagamex86.lib" -\reactionoutput\ai_chat.obj -\reactionoutput\ai_cmd.obj -\reactionoutput\ai_dmnet.obj -\reactionoutput\ai_dmq3.obj -\reactionoutput\ai_main.obj -\reactionoutput\ai_team.obj -\reactionoutput\ai_vcmd.obj -\reactionoutput\bg_misc.obj -\reactionoutput\bg_pmove.obj -\reactionoutput\bg_slidemove.obj -\reactionoutput\g_active.obj -\reactionoutput\g_arenas.obj -\reactionoutput\g_bot.obj -\reactionoutput\g_client.obj -\reactionoutput\g_cmds.obj -\reactionoutput\g_combat.obj -\reactionoutput\g_fileio.obj -\reactionoutput\g_items.obj -\reactionoutput\g_main.obj -\reactionoutput\g_matchmode.obj -\reactionoutput\g_mem.obj -\reactionoutput\g_misc.obj -\reactionoutput\g_missile.obj -\reactionoutput\g_mover.obj -\reactionoutput\g_session.obj -\reactionoutput\g_spawn.obj -\reactionoutput\g_svcmds.obj -\reactionoutput\g_syscalls.obj -\reactionoutput\g_target.obj -\reactionoutput\g_team.obj -\reactionoutput\g_teamplay.obj -\reactionoutput\g_trigger.obj -\reactionoutput\g_utils.obj -\reactionoutput\g_weapon.obj -\reactionoutput\q_math.obj -\reactionoutput\q_shared.obj -\reactionoutput\rxn_game.obj -\reactionoutput\zcam.obj -\reactionoutput\zcam_target.obj +/nologo /base:"0x30000000" /subsystem:windows /dll /incremental:no /pdb:"Release/cgamex86.pdb" /map:"Release/cgamex86.map" /machine:I386 /def:".\cgame.def" /out:"../Release/cgamex86.dll" /implib:"Release/cgamex86.lib" +.\Release\bg_misc.obj +.\Release\bg_pmove.obj +.\Release\bg_slidemove.obj +.\Release\cg_consolecmds.obj +.\Release\cg_draw.obj +.\Release\cg_drawtools.obj +.\Release\cg_effects.obj +.\Release\cg_ents.obj +.\Release\cg_event.obj +.\Release\cg_info.obj +.\Release\cg_localents.obj +.\Release\cg_main.obj +.\Release\cg_marks.obj +.\Release\cg_players.obj +.\Release\cg_playerstate.obj +.\Release\cg_predict.obj +.\Release\cg_scoreboard.obj +.\Release\cg_servercmds.obj +.\Release\cg_snapshot.obj +.\Release\cg_syscalls.obj +.\Release\cg_view.obj +.\Release\cg_weapons.obj +.\Release\q_math.obj +.\Release\q_shared.obj +.\Release\ui_shared.obj ] -Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP95.tmp" +Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP1A8.tmp"Output Window
Compiling... -g_mover.c -g_weapon.c -C:\Games\Quake3\rq3source\reaction\game\g_weapon.c(2652) : warning C4701: local variable 'tr' may be used without having been initialized +bg_misc.c +bg_pmove.c +bg_slidemove.c +cg_consolecmds.c +cg_draw.c +cg_drawtools.c +cg_effects.c +cg_ents.c +cg_event.c +cg_info.c +cg_localents.c +cg_main.c +cg_marks.c +cg_players.c +cg_playerstate.c +cg_predict.c +cg_scoreboard.c +C:\Games\Quake3\rq3source\reaction\cgame\cg_scoreboard.c(220) : warning C4101: 'RedSubs' : unreferenced local variable +C:\Games\Quake3\rq3source\reaction\cgame\cg_scoreboard.c(217) : warning C4101: 'subs' : unreferenced local variable +C:\Games\Quake3\rq3source\reaction\cgame\cg_scoreboard.c(220) : warning C4101: 'BlueSubs' : unreferenced local variable +cg_servercmds.c +cg_snapshot.c +cg_syscalls.c +cg_view.c +cg_weapons.c Linking... -LINK : warning LNK4075: ignoring /EDITANDCONTINUE due to /INCREMENTAL:NO specification - Creating library c:\reactionoutput/qagamex86.lib and object c:\reactionoutput/qagamex86.exp -LINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:library + Creating library Release/cgamex86.lib and object Release/cgamex86.expResults
-qagamex86.dll - 0 error(s), 3 warning(s) +cgamex86.dll - 0 error(s), 3 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\RSP1AC.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\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_syscalls.c" +] +Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP1AC.tmp" +Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP1AD.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 +.\Release_TA\q_math.obj +.\Release_TA\q_shared.obj +.\Release_TA\ui_atoms.obj +.\Release_TA\ui_gameinfo.obj +.\Release_TA\ui_main.obj +.\Release_TA\ui_players.obj +.\Release_TA\ui_shared.obj +.\Release_TA\ui_syscalls.obj +.\Release_TA\ui_util.obj +] +Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP1AD.tmp" +Output Window
+Compiling... +bg_misc.c +ui_atoms.c +ui_gameinfo.c +ui_main.c +ui_players.c +ui_syscalls.c +Linking... + Creating library Release_TA/uix86.lib and object Release_TA/uix86.exp + + + +Results
+uix86.dll - 0 error(s), 0 warning(s)