mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
- The co-op summary screen now has a totals row at the bottom (if it fits).
- Changed WI_drawPercent() when wi_percents is false so that the total display is optional, and it formats it like Heretic's intermission, with a slash and a fixed-width right column. - Font is no longer a property of the screen object. Pass the font to DrawText and DrawChar directly instead. - Doom's intermission characters are now collected together as a font so they can be colorized. SVN r1294 (trunk)
This commit is contained in:
parent
904b59f266
commit
6e83d231fe
39 changed files with 470 additions and 555 deletions
|
@ -1,5 +1,17 @@
|
||||||
|
November 27, 2008
|
||||||
|
- The co-op summary screen now has a totals row at the bottom (if it fits).
|
||||||
|
- Changed WI_drawPercent() when wi_percents is false so that the total
|
||||||
|
display is optional, and it formats it like Heretic's intermission, with
|
||||||
|
a slash and a fixed-width right column.
|
||||||
|
|
||||||
|
November 21, 2008
|
||||||
|
- Font is no longer a property of the screen object. Pass the font to
|
||||||
|
DrawText and DrawChar directly instead.
|
||||||
|
- Doom's intermission characters are now collected together as a font
|
||||||
|
so they can be colorized.
|
||||||
|
|
||||||
November 15, 2008 (Changes by Graf Zahl)
|
November 15, 2008 (Changes by Graf Zahl)
|
||||||
- moved common code of Raven's fast projectiles into a base class
|
- Moved common code of Raven's fast projectiles into a base class
|
||||||
called FastProjectile. This base class doesn't have any effects attached
|
called FastProjectile. This base class doesn't have any effects attached
|
||||||
so that it can be used for user defined fast projectiles.
|
so that it can be used for user defined fast projectiles.
|
||||||
|
|
||||||
|
|
|
@ -560,11 +560,11 @@ void C_AddNotifyString (int printlevel, const char *source)
|
||||||
if (addtype == APPENDLINE && NotifyStrings[NUMNOTIFIES-1].PrintLevel == printlevel)
|
if (addtype == APPENDLINE && NotifyStrings[NUMNOTIFIES-1].PrintLevel == printlevel)
|
||||||
{
|
{
|
||||||
FString str = NotifyStrings[NUMNOTIFIES-1].Text + source;
|
FString str = NotifyStrings[NUMNOTIFIES-1].Text + source;
|
||||||
lines = V_BreakLines (screen->Font, width, str);
|
lines = V_BreakLines (SmallFont, width, str);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lines = V_BreakLines (screen->Font, width, source);
|
lines = V_BreakLines (SmallFont, width, source);
|
||||||
addtype = (addtype == APPENDLINE) ? NEWLINE : addtype;
|
addtype = (addtype == APPENDLINE) ? NEWLINE : addtype;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -852,7 +852,7 @@ int PrintString (int printlevel, const char *outline)
|
||||||
I_PrintStr (outline);
|
I_PrintStr (outline);
|
||||||
|
|
||||||
AddToConsole (printlevel, outline);
|
AddToConsole (printlevel, outline);
|
||||||
if (vidactive && screen && screen->Font)
|
if (vidactive && screen && SmallFont)
|
||||||
{
|
{
|
||||||
C_AddNotifyString (printlevel, outline);
|
C_AddNotifyString (printlevel, outline);
|
||||||
maybedrawnow (false, false);
|
maybedrawnow (false, false);
|
||||||
|
@ -1036,10 +1036,10 @@ static void C_DrawNotifyText ()
|
||||||
if (con_scaletext == 1)
|
if (con_scaletext == 1)
|
||||||
{
|
{
|
||||||
if (!center)
|
if (!center)
|
||||||
screen->DrawText (color, 0, line, NotifyStrings[i].Text,
|
screen->DrawText (SmallFont, color, 0, line, NotifyStrings[i].Text,
|
||||||
DTA_CleanNoMove, true, DTA_Alpha, alpha, TAG_DONE);
|
DTA_CleanNoMove, true, DTA_Alpha, alpha, TAG_DONE);
|
||||||
else
|
else
|
||||||
screen->DrawText (color, (SCREENWIDTH -
|
screen->DrawText (SmallFont, color, (SCREENWIDTH -
|
||||||
SmallFont->StringWidth (NotifyStrings[i].Text)*CleanXfac)/2,
|
SmallFont->StringWidth (NotifyStrings[i].Text)*CleanXfac)/2,
|
||||||
line, NotifyStrings[i].Text, DTA_CleanNoMove, true,
|
line, NotifyStrings[i].Text, DTA_CleanNoMove, true,
|
||||||
DTA_Alpha, alpha, TAG_DONE);
|
DTA_Alpha, alpha, TAG_DONE);
|
||||||
|
@ -1047,10 +1047,10 @@ static void C_DrawNotifyText ()
|
||||||
else if (con_scaletext == 0)
|
else if (con_scaletext == 0)
|
||||||
{
|
{
|
||||||
if (!center)
|
if (!center)
|
||||||
screen->DrawText (color, 0, line, NotifyStrings[i].Text,
|
screen->DrawText (SmallFont, color, 0, line, NotifyStrings[i].Text,
|
||||||
DTA_Alpha, alpha, TAG_DONE);
|
DTA_Alpha, alpha, TAG_DONE);
|
||||||
else
|
else
|
||||||
screen->DrawText (color, (SCREENWIDTH -
|
screen->DrawText (SmallFont, color, (SCREENWIDTH -
|
||||||
SmallFont->StringWidth (NotifyStrings[i].Text))/2,
|
SmallFont->StringWidth (NotifyStrings[i].Text))/2,
|
||||||
line, NotifyStrings[i].Text,
|
line, NotifyStrings[i].Text,
|
||||||
DTA_Alpha, alpha, TAG_DONE);
|
DTA_Alpha, alpha, TAG_DONE);
|
||||||
|
@ -1058,13 +1058,13 @@ static void C_DrawNotifyText ()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!center)
|
if (!center)
|
||||||
screen->DrawText (color, 0, line, NotifyStrings[i].Text,
|
screen->DrawText (SmallFont, color, 0, line, NotifyStrings[i].Text,
|
||||||
DTA_VirtualWidth, screen->GetWidth() / 2,
|
DTA_VirtualWidth, screen->GetWidth() / 2,
|
||||||
DTA_VirtualHeight, screen->GetHeight() / 2,
|
DTA_VirtualHeight, screen->GetHeight() / 2,
|
||||||
DTA_KeepRatio, true,
|
DTA_KeepRatio, true,
|
||||||
DTA_Alpha, alpha, TAG_DONE);
|
DTA_Alpha, alpha, TAG_DONE);
|
||||||
else
|
else
|
||||||
screen->DrawText (color, (screen->GetWidth() / 2 -
|
screen->DrawText (SmallFont, color, (screen->GetWidth() / 2 -
|
||||||
SmallFont->StringWidth (NotifyStrings[i].Text))/2,
|
SmallFont->StringWidth (NotifyStrings[i].Text))/2,
|
||||||
line, NotifyStrings[i].Text,
|
line, NotifyStrings[i].Text,
|
||||||
DTA_VirtualWidth, screen->GetWidth() / 2,
|
DTA_VirtualWidth, screen->GetWidth() / 2,
|
||||||
|
@ -1161,8 +1161,7 @@ void C_DrawConsole (bool hw2d)
|
||||||
|
|
||||||
if (ConBottom >= 12)
|
if (ConBottom >= 12)
|
||||||
{
|
{
|
||||||
screen->SetFont (ConFont);
|
screen->DrawText (ConFont, CR_ORANGE, SCREENWIDTH - 8 -
|
||||||
screen->DrawText (CR_ORANGE, SCREENWIDTH - 8 -
|
|
||||||
ConFont->StringWidth ("v" DOTVERSIONSTR),
|
ConFont->StringWidth ("v" DOTVERSIONSTR),
|
||||||
ConBottom - ConFont->GetHeight() - 4,
|
ConBottom - ConFont->GetHeight() - 4,
|
||||||
"v" DOTVERSIONSTR, TAG_DONE);
|
"v" DOTVERSIONSTR, TAG_DONE);
|
||||||
|
@ -1194,11 +1193,11 @@ void C_DrawConsole (bool hw2d)
|
||||||
{
|
{
|
||||||
tickstr[tickend+3] = 0;
|
tickstr[tickend+3] = 0;
|
||||||
}
|
}
|
||||||
screen->DrawText (CR_BROWN, LEFTMARGIN, tickerY, tickstr, TAG_DONE);
|
screen->DrawText (ConFont, CR_BROWN, LEFTMARGIN, tickerY, tickstr, TAG_DONE);
|
||||||
|
|
||||||
// Draw the marker
|
// Draw the marker
|
||||||
i = LEFTMARGIN+5+tickbegin*8 + Scale (TickerAt, (SDWORD)(tickend - tickbegin)*8, TickerMax);
|
i = LEFTMARGIN+5+tickbegin*8 + Scale (TickerAt, (SDWORD)(tickend - tickbegin)*8, TickerMax);
|
||||||
screen->DrawChar (CR_ORANGE, (int)i, tickerY, 0x13, TAG_DONE);
|
screen->DrawChar (ConFont, CR_ORANGE, (int)i, tickerY, 0x13, TAG_DONE);
|
||||||
|
|
||||||
TickerVisible = true;
|
TickerVisible = true;
|
||||||
}
|
}
|
||||||
|
@ -1228,7 +1227,6 @@ void C_DrawConsole (bool hw2d)
|
||||||
|
|
||||||
if (menuactive != MENU_Off)
|
if (menuactive != MENU_Off)
|
||||||
{
|
{
|
||||||
screen->SetFont (SmallFont);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1238,8 +1236,6 @@ void C_DrawConsole (bool hw2d)
|
||||||
int pos = (InsertLine - 1) & LINEMASK;
|
int pos = (InsertLine - 1) & LINEMASK;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
screen->SetFont (ConFont);
|
|
||||||
|
|
||||||
ConsoleDrawing = true;
|
ConsoleDrawing = true;
|
||||||
|
|
||||||
for (i = RowAdjust; i; i--)
|
for (i = RowAdjust; i; i--)
|
||||||
|
@ -1260,7 +1256,7 @@ void C_DrawConsole (bool hw2d)
|
||||||
pos = (pos - 1) & LINEMASK;
|
pos = (pos - 1) & LINEMASK;
|
||||||
if (Lines[pos] != NULL)
|
if (Lines[pos] != NULL)
|
||||||
{
|
{
|
||||||
screen->DrawText (CR_TAN, LEFTMARGIN, offset + lines * ConFont->GetHeight(),
|
screen->DrawText (ConFont, CR_TAN, LEFTMARGIN, offset + lines * ConFont->GetHeight(),
|
||||||
Lines[pos], TAG_DONE);
|
Lines[pos], TAG_DONE);
|
||||||
}
|
}
|
||||||
lines--;
|
lines--;
|
||||||
|
@ -1279,13 +1275,13 @@ void C_DrawConsole (bool hw2d)
|
||||||
FString command((char *)&CmdLine[2+CmdLine[259]]);
|
FString command((char *)&CmdLine[2+CmdLine[259]]);
|
||||||
int cursorpos = CmdLine[1] - CmdLine[259];
|
int cursorpos = CmdLine[1] - CmdLine[259];
|
||||||
|
|
||||||
screen->DrawChar (CR_ORANGE, left, bottomline, '\x1c', TAG_DONE);
|
screen->DrawChar (ConFont, CR_ORANGE, left, bottomline, '\x1c', TAG_DONE);
|
||||||
screen->DrawText (CR_ORANGE, left + ConFont->GetCharWidth(0x1c), bottomline,
|
screen->DrawText (ConFont, CR_ORANGE, left + ConFont->GetCharWidth(0x1c), bottomline,
|
||||||
command, TAG_DONE);
|
command, TAG_DONE);
|
||||||
|
|
||||||
if (cursoron)
|
if (cursoron)
|
||||||
{
|
{
|
||||||
screen->DrawChar (CR_YELLOW, left + ConFont->GetCharWidth(0x1c) + cursorpos * ConFont->GetCharWidth(0xb),
|
screen->DrawChar (ConFont, CR_YELLOW, left + ConFont->GetCharWidth(0x1c) + cursorpos * ConFont->GetCharWidth(0xb),
|
||||||
bottomline, '\xb', TAG_DONE);
|
bottomline, '\xb', TAG_DONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1293,11 +1289,10 @@ void C_DrawConsole (bool hw2d)
|
||||||
{
|
{
|
||||||
// Indicate that the view has been scrolled up (10)
|
// Indicate that the view has been scrolled up (10)
|
||||||
// and if we can scroll no further (12)
|
// and if we can scroll no further (12)
|
||||||
screen->DrawChar (CR_GREEN, 0, bottomline, pos == TopLine ? 12 : 10, TAG_DONE);
|
screen->DrawChar (ConFont, CR_GREEN, 0, bottomline, pos == TopLine ? 12 : 10, TAG_DONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
screen->SetFont (SmallFont);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void C_FullConsole ()
|
void C_FullConsole ()
|
||||||
|
@ -1826,12 +1821,12 @@ static const char bar3[] = TEXTCOLOR_RED "\n\35\36\36\36\36\36\36\36\36\36\36\36
|
||||||
"\36\36\36\36\36\36\36\36\36\36\36\36\37" TEXTCOLOR_NORMAL "\n";
|
"\36\36\36\36\36\36\36\36\36\36\36\36\37" TEXTCOLOR_NORMAL "\n";
|
||||||
static const char logbar[] = "\n<------------------------------->\n";
|
static const char logbar[] = "\n<------------------------------->\n";
|
||||||
|
|
||||||
void C_MidPrint (const char *msg)
|
void C_MidPrint (FFont *font, const char *msg)
|
||||||
{
|
{
|
||||||
if (StatusBar == NULL)
|
if (StatusBar == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (msg)
|
if (msg != NULL)
|
||||||
{
|
{
|
||||||
AddToConsole (-1, bar1);
|
AddToConsole (-1, bar1);
|
||||||
AddToConsole (-1, msg);
|
AddToConsole (-1, msg);
|
||||||
|
@ -1844,7 +1839,7 @@ void C_MidPrint (const char *msg)
|
||||||
fflush (Logfile);
|
fflush (Logfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusBar->AttachMessage (new DHUDMessage (msg, 1.5f, 0.375f, 0, 0,
|
StatusBar->AttachMessage (new DHUDMessage (font, msg, 1.5f, 0.375f, 0, 0,
|
||||||
(EColorRange)PrintColors[PRINTLEVELS], con_midtime), MAKE_ID('C','N','T','R'));
|
(EColorRange)PrintColors[PRINTLEVELS], con_midtime), MAKE_ID('C','N','T','R'));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1853,7 +1848,7 @@ void C_MidPrint (const char *msg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void C_MidPrintBold (const char *msg)
|
void C_MidPrintBold (FFont *font, const char *msg)
|
||||||
{
|
{
|
||||||
if (msg)
|
if (msg)
|
||||||
{
|
{
|
||||||
|
@ -1868,7 +1863,7 @@ void C_MidPrintBold (const char *msg)
|
||||||
fflush (Logfile);
|
fflush (Logfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusBar->AttachMessage (new DHUDMessage (msg, 1.5f, 0.375f, 0, 0,
|
StatusBar->AttachMessage (new DHUDMessage (font, msg, 1.5f, 0.375f, 0, 0,
|
||||||
(EColorRange)PrintColors[PRINTLEVELS+1], con_midtime), MAKE_ID('C','N','T','R'));
|
(EColorRange)PrintColors[PRINTLEVELS+1], con_midtime), MAKE_ID('C','N','T','R'));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -73,8 +73,9 @@ void C_FlushDisplay (void);
|
||||||
void C_InitTicker (const char *label, unsigned int max, bool showpercent=true);
|
void C_InitTicker (const char *label, unsigned int max, bool showpercent=true);
|
||||||
void C_SetTicker (unsigned int at, bool forceUpdate=false);
|
void C_SetTicker (unsigned int at, bool forceUpdate=false);
|
||||||
|
|
||||||
void C_MidPrint (const char *message);
|
class FFont;
|
||||||
void C_MidPrintBold (const char *message);
|
void C_MidPrint (FFont *font, const char *message);
|
||||||
|
void C_MidPrintBold (FFont *font, const char *message);
|
||||||
|
|
||||||
bool C_Responder (event_t *ev);
|
bool C_Responder (event_t *ev);
|
||||||
|
|
||||||
|
|
|
@ -213,13 +213,13 @@ void CT_Drawer (void)
|
||||||
y += ((SCREENHEIGHT == viewheight && viewactive) || gamestate != GS_LEVEL) ? screen_height : st_y;
|
y += ((SCREENHEIGHT == viewheight && viewactive) || gamestate != GS_LEVEL) ? screen_height : st_y;
|
||||||
|
|
||||||
promptwidth = SmallFont->StringWidth (prompt) * scalex;
|
promptwidth = SmallFont->StringWidth (prompt) * scalex;
|
||||||
x = screen->Font->GetCharWidth ('_') * scalex * 2 + promptwidth;
|
x = SmallFont->GetCharWidth ('_') * scalex * 2 + promptwidth;
|
||||||
|
|
||||||
// figure out if the text is wider than the screen->
|
// figure out if the text is wider than the screen->
|
||||||
// if so, only draw the right-most portion of it.
|
// if so, only draw the right-most portion of it.
|
||||||
for (i = len - 1; i >= 0 && x < screen_width; i--)
|
for (i = len - 1; i >= 0 && x < screen_width; i--)
|
||||||
{
|
{
|
||||||
x += screen->Font->GetCharWidth (ChatQueue[i] & 0x7f) * scalex;
|
x += SmallFont->GetCharWidth (ChatQueue[i] & 0x7f) * scalex;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i >= 0)
|
if (i >= 0)
|
||||||
|
@ -236,14 +236,14 @@ void CT_Drawer (void)
|
||||||
ChatQueue[len+1] = '\0';
|
ChatQueue[len+1] = '\0';
|
||||||
if (con_scaletext < 2)
|
if (con_scaletext < 2)
|
||||||
{
|
{
|
||||||
screen->DrawText (CR_GREEN, 0, y, prompt, DTA_CleanNoMove, *con_scaletext, TAG_DONE);
|
screen->DrawText (SmallFont, CR_GREEN, 0, y, prompt, DTA_CleanNoMove, *con_scaletext, TAG_DONE);
|
||||||
screen->DrawText (CR_GREY, promptwidth, y, (char *)(ChatQueue + i), DTA_CleanNoMove, *con_scaletext, TAG_DONE);
|
screen->DrawText (SmallFont, CR_GREY, promptwidth, y, (char *)(ChatQueue + i), DTA_CleanNoMove, *con_scaletext, TAG_DONE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
screen->DrawText (CR_GREEN, 0, y, prompt,
|
screen->DrawText (SmallFont, CR_GREEN, 0, y, prompt,
|
||||||
DTA_VirtualWidth, screen_width, DTA_VirtualHeight, screen_height, DTA_KeepRatio, true, TAG_DONE);
|
DTA_VirtualWidth, screen_width, DTA_VirtualHeight, screen_height, DTA_KeepRatio, true, TAG_DONE);
|
||||||
screen->DrawText (CR_GREY, promptwidth, y, (char *)(ChatQueue + i),
|
screen->DrawText (SmallFont, CR_GREY, promptwidth, y, (char *)(ChatQueue + i),
|
||||||
DTA_VirtualWidth, screen_width, DTA_VirtualHeight, screen_height, DTA_KeepRatio, true, TAG_DONE);
|
DTA_VirtualWidth, screen_width, DTA_VirtualHeight, screen_height, DTA_KeepRatio, true, TAG_DONE);
|
||||||
}
|
}
|
||||||
ChatQueue[len] = '\0';
|
ChatQueue[len] = '\0';
|
||||||
|
|
|
@ -897,7 +897,7 @@ void D_PageDrawer (void)
|
||||||
screen->Clear (0, 0, SCREENWIDTH, SCREENHEIGHT, 0, 0);
|
screen->Clear (0, 0, SCREENWIDTH, SCREENHEIGHT, 0, 0);
|
||||||
if (!PageBlank)
|
if (!PageBlank)
|
||||||
{
|
{
|
||||||
screen->DrawText (CR_WHITE, 0, 0, "Page graphic goes here", TAG_DONE);
|
screen->DrawText (SmallFont, CR_WHITE, 0, 0, "Page graphic goes here", TAG_DONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Advisory != NULL)
|
if (Advisory != NULL)
|
||||||
|
|
|
@ -1993,7 +1993,7 @@ void Net_DoCommand (int type, BYTE **stream, int player)
|
||||||
|
|
||||||
case DEM_CENTERPRINT:
|
case DEM_CENTERPRINT:
|
||||||
s = ReadString (stream);
|
s = ReadString (stream);
|
||||||
C_MidPrint (s);
|
C_MidPrint (SmallFont, s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DEM_UINFCHANGED:
|
case DEM_UINFCHANGED:
|
||||||
|
|
|
@ -397,7 +397,7 @@ void F_TextWrite (void)
|
||||||
|
|
||||||
// draw some of the text onto the screen
|
// draw some of the text onto the screen
|
||||||
leftmargin = (gameinfo.gametype & (GAME_DoomStrifeChex|GAME_Hexen) ? 10 : 20) - 160;
|
leftmargin = (gameinfo.gametype & (GAME_DoomStrifeChex|GAME_Hexen) ? 10 : 20) - 160;
|
||||||
rowheight = screen->Font->GetHeight () +
|
rowheight = SmallFont->GetHeight () +
|
||||||
(gameinfo.gametype & (GAME_DoomStrifeChex) ? 3 : -1);
|
(gameinfo.gametype & (GAME_DoomStrifeChex) ? 3 : -1);
|
||||||
scale = (CleanXfac != 1 || CleanYfac != 1);
|
scale = (CleanXfac != 1 || CleanYfac != 1);
|
||||||
|
|
||||||
|
@ -413,7 +413,7 @@ void F_TextWrite (void)
|
||||||
ch = FinaleText.GetChars();
|
ch = FinaleText.GetChars();
|
||||||
|
|
||||||
count = (FinaleCount - 10)/TEXTSPEED;
|
count = (FinaleCount - 10)/TEXTSPEED;
|
||||||
range = screen->Font->GetColorTranslation (CR_UNTRANSLATED);
|
range = SmallFont->GetColorTranslation (CR_UNTRANSLATED);
|
||||||
|
|
||||||
for ( ; count ; count-- )
|
for ( ; count ; count-- )
|
||||||
{
|
{
|
||||||
|
@ -427,7 +427,7 @@ void F_TextWrite (void)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
pic = screen->Font->GetChar (c, &w);
|
pic = SmallFont->GetChar (c, &w);
|
||||||
if (cx+w > SCREENWIDTH)
|
if (cx+w > SCREENWIDTH)
|
||||||
continue;
|
continue;
|
||||||
if (pic != NULL)
|
if (pic != NULL)
|
||||||
|
@ -761,7 +761,7 @@ void F_CastDrawer (void)
|
||||||
DTA_DestHeight, screen->GetHeight(),
|
DTA_DestHeight, screen->GetHeight(),
|
||||||
TAG_DONE);
|
TAG_DONE);
|
||||||
|
|
||||||
screen->DrawText (CR_RED,
|
screen->DrawText (SmallFont, CR_UNTRANSLATED,
|
||||||
(SCREENWIDTH - SmallFont->StringWidth (GStrings(castorder[castnum].name)) * CleanXfac)/2,
|
(SCREENWIDTH - SmallFont->StringWidth (GStrings(castorder[castnum].name)) * CleanXfac)/2,
|
||||||
(SCREENHEIGHT * 180) / 200,
|
(SCREENHEIGHT * 180) / 200,
|
||||||
GStrings(castorder[castnum].name),
|
GStrings(castorder[castnum].name),
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include "v_palette.h"
|
#include "v_palette.h"
|
||||||
#include "w_wad.h"
|
#include "w_wad.h"
|
||||||
#include "doomstat.h"
|
#include "doomstat.h"
|
||||||
|
#include "v_font.h"
|
||||||
|
|
||||||
|
|
||||||
struct OneKey
|
struct OneKey
|
||||||
|
@ -169,9 +169,9 @@ static void PrintMessage (const char *str)
|
||||||
{
|
{
|
||||||
if (str[0]=='$')
|
if (str[0]=='$')
|
||||||
{
|
{
|
||||||
str=GStrings(str+1);
|
str = GStrings(str+1);
|
||||||
}
|
}
|
||||||
C_MidPrint (str);
|
C_MidPrint (SmallFont, str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#include "s_sound.h"
|
#include "s_sound.h"
|
||||||
#include "c_console.h"
|
#include "c_console.h"
|
||||||
#include "doomstat.h"
|
#include "doomstat.h"
|
||||||
|
#include "v_font.h"
|
||||||
|
|
||||||
IMPLEMENT_CLASS (APuzzleItem)
|
IMPLEMENT_CLASS (APuzzleItem)
|
||||||
|
|
||||||
|
@ -38,7 +39,7 @@ bool APuzzleItem::Use (bool pickup)
|
||||||
const char *message = GetClass()->Meta.GetMetaString (AIMETA_PuzzFailMessage);
|
const char *message = GetClass()->Meta.GetMetaString (AIMETA_PuzzFailMessage);
|
||||||
if (message != NULL && *message=='$') message = GStrings[message + 1];
|
if (message != NULL && *message=='$') message = GStrings[message + 1];
|
||||||
if (message == NULL) message = GStrings("TXT_USEPUZZLEFAILED");
|
if (message == NULL) message = GStrings("TXT_USEPUZZLEFAILED");
|
||||||
C_MidPrintBold (message);
|
C_MidPrintBold (SmallFont, message);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
#include "s_sound.h"
|
#include "s_sound.h"
|
||||||
#include "d_player.h"
|
#include "d_player.h"
|
||||||
#include "doomstat.h"
|
#include "doomstat.h"
|
||||||
|
#include "v_font.h"
|
||||||
|
|
||||||
EXTERN_CVAR(String, secretmessage)
|
EXTERN_CVAR(String, secretmessage)
|
||||||
|
|
||||||
|
@ -66,7 +67,7 @@ void ASecretTrigger::Activate (AActor *activator)
|
||||||
{
|
{
|
||||||
if (args[0] <= 1)
|
if (args[0] <= 1)
|
||||||
{
|
{
|
||||||
C_MidPrint (secretmessage);
|
C_MidPrint (SmallFont, secretmessage);
|
||||||
}
|
}
|
||||||
if (args[0] == 0 || args[0] == 2)
|
if (args[0] == 0 || args[0] == 2)
|
||||||
{
|
{
|
||||||
|
|
|
@ -68,7 +68,7 @@ inline FArchive &operator<< (FArchive &arc, EColorRange &i)
|
||||||
//
|
//
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
DHUDMessage::DHUDMessage (const char *text, float x, float y, int hudwidth, int hudheight,
|
DHUDMessage::DHUDMessage (FFont *font, const char *text, float x, float y, int hudwidth, int hudheight,
|
||||||
EColorRange textColor, float holdTime)
|
EColorRange textColor, float holdTime)
|
||||||
{
|
{
|
||||||
if (hudwidth == 0 || hudheight == 0)
|
if (hudwidth == 0 || hudheight == 0)
|
||||||
|
@ -138,7 +138,7 @@ DHUDMessage::DHUDMessage (const char *text, float x, float y, int hudwidth, int
|
||||||
TextColor = textColor;
|
TextColor = textColor;
|
||||||
State = 0;
|
State = 0;
|
||||||
SourceText = copystring (text);
|
SourceText = copystring (text);
|
||||||
Font = screen->Font;
|
Font = font;
|
||||||
ResetText (SourceText);
|
ResetText (SourceText);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -268,11 +268,8 @@ void DHUDMessage::Draw (int bottom)
|
||||||
int ystep;
|
int ystep;
|
||||||
int i;
|
int i;
|
||||||
bool clean = false;
|
bool clean = false;
|
||||||
FFont *oldfont = screen->Font;
|
|
||||||
int hudheight;
|
int hudheight;
|
||||||
|
|
||||||
screen->SetFont (Font);
|
|
||||||
|
|
||||||
DrawSetup ();
|
DrawSetup ();
|
||||||
|
|
||||||
int screen_width = SCREENWIDTH;
|
int screen_width = SCREENWIDTH;
|
||||||
|
@ -371,8 +368,6 @@ void DHUDMessage::Draw (int bottom)
|
||||||
DoDraw (i, drawx, y, clean, hudheight);
|
DoDraw (i, drawx, y, clean, hudheight);
|
||||||
y += ystep;
|
y += ystep;
|
||||||
}
|
}
|
||||||
|
|
||||||
screen->SetFont (oldfont);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
@ -397,13 +392,13 @@ void DHUDMessage::DoDraw (int linenum, int x, int y, bool clean, int hudheight)
|
||||||
{
|
{
|
||||||
if (con_scaletext <= 1)
|
if (con_scaletext <= 1)
|
||||||
{
|
{
|
||||||
screen->DrawText (TextColor, x, y, Lines[linenum].Text,
|
screen->DrawText (Font, TextColor, x, y, Lines[linenum].Text,
|
||||||
DTA_CleanNoMove, clean,
|
DTA_CleanNoMove, clean,
|
||||||
TAG_DONE);
|
TAG_DONE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
screen->DrawText (TextColor, x, y, Lines[linenum].Text,
|
screen->DrawText (Font, TextColor, x, y, Lines[linenum].Text,
|
||||||
DTA_VirtualWidth, SCREENWIDTH/2,
|
DTA_VirtualWidth, SCREENWIDTH/2,
|
||||||
DTA_VirtualHeight, SCREENHEIGHT/2,
|
DTA_VirtualHeight, SCREENHEIGHT/2,
|
||||||
DTA_KeepRatio, true,
|
DTA_KeepRatio, true,
|
||||||
|
@ -412,7 +407,7 @@ void DHUDMessage::DoDraw (int linenum, int x, int y, bool clean, int hudheight)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
screen->DrawText (TextColor, x, y, Lines[linenum].Text,
|
screen->DrawText (Font, TextColor, x, y, Lines[linenum].Text,
|
||||||
DTA_VirtualWidth, HUDWidth,
|
DTA_VirtualWidth, HUDWidth,
|
||||||
DTA_VirtualHeight, hudheight,
|
DTA_VirtualHeight, hudheight,
|
||||||
TAG_DONE);
|
TAG_DONE);
|
||||||
|
@ -429,10 +424,10 @@ void DHUDMessage::DoDraw (int linenum, int x, int y, bool clean, int hudheight)
|
||||||
//
|
//
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
DHUDMessageFadeOut::DHUDMessageFadeOut (const char *text, float x, float y,
|
DHUDMessageFadeOut::DHUDMessageFadeOut (FFont *font, const char *text, float x, float y,
|
||||||
int hudwidth, int hudheight,
|
int hudwidth, int hudheight,
|
||||||
EColorRange textColor, float holdTime, float fadeOutTime)
|
EColorRange textColor, float holdTime, float fadeOutTime)
|
||||||
: DHUDMessage (text, x, y, hudwidth, hudheight, textColor, holdTime)
|
: DHUDMessage (font, text, x, y, hudwidth, hudheight, textColor, holdTime)
|
||||||
{
|
{
|
||||||
FadeOutTics = (int)(fadeOutTime * TICRATE);
|
FadeOutTics = (int)(fadeOutTime * TICRATE);
|
||||||
State = 1;
|
State = 1;
|
||||||
|
@ -490,14 +485,14 @@ void DHUDMessageFadeOut::DoDraw (int linenum, int x, int y, bool clean, int hudh
|
||||||
{
|
{
|
||||||
if (con_scaletext <= 1)
|
if (con_scaletext <= 1)
|
||||||
{
|
{
|
||||||
screen->DrawText (TextColor, x, y, Lines[linenum].Text,
|
screen->DrawText (Font, TextColor, x, y, Lines[linenum].Text,
|
||||||
DTA_CleanNoMove, clean,
|
DTA_CleanNoMove, clean,
|
||||||
DTA_Alpha, trans,
|
DTA_Alpha, trans,
|
||||||
TAG_DONE);
|
TAG_DONE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
screen->DrawText (TextColor, x, y, Lines[linenum].Text,
|
screen->DrawText (Font, TextColor, x, y, Lines[linenum].Text,
|
||||||
DTA_VirtualWidth, SCREENWIDTH/2,
|
DTA_VirtualWidth, SCREENWIDTH/2,
|
||||||
DTA_VirtualHeight, SCREENHEIGHT/2,
|
DTA_VirtualHeight, SCREENHEIGHT/2,
|
||||||
DTA_Alpha, trans,
|
DTA_Alpha, trans,
|
||||||
|
@ -507,7 +502,7 @@ void DHUDMessageFadeOut::DoDraw (int linenum, int x, int y, bool clean, int hudh
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
screen->DrawText (TextColor, x, y, Lines[linenum].Text,
|
screen->DrawText (Font, TextColor, x, y, Lines[linenum].Text,
|
||||||
DTA_VirtualWidth, HUDWidth,
|
DTA_VirtualWidth, HUDWidth,
|
||||||
DTA_VirtualHeight, hudheight,
|
DTA_VirtualHeight, hudheight,
|
||||||
DTA_Alpha, trans,
|
DTA_Alpha, trans,
|
||||||
|
@ -527,10 +522,10 @@ void DHUDMessageFadeOut::DoDraw (int linenum, int x, int y, bool clean, int hudh
|
||||||
//
|
//
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
DHUDMessageFadeInOut::DHUDMessageFadeInOut (const char *text, float x, float y,
|
DHUDMessageFadeInOut::DHUDMessageFadeInOut (FFont *font, const char *text, float x, float y,
|
||||||
int hudwidth, int hudheight,
|
int hudwidth, int hudheight,
|
||||||
EColorRange textColor, float holdTime, float fadeInTime, float fadeOutTime)
|
EColorRange textColor, float holdTime, float fadeInTime, float fadeOutTime)
|
||||||
: DHUDMessageFadeOut (text, x, y, hudwidth, hudheight, textColor, holdTime, fadeOutTime)
|
: DHUDMessageFadeOut (font, text, x, y, hudwidth, hudheight, textColor, holdTime, fadeOutTime)
|
||||||
{
|
{
|
||||||
FadeInTics = (int)(fadeInTime * TICRATE);
|
FadeInTics = (int)(fadeInTime * TICRATE);
|
||||||
State = FadeInTics == 0;
|
State = FadeInTics == 0;
|
||||||
|
@ -583,14 +578,14 @@ void DHUDMessageFadeInOut::DoDraw (int linenum, int x, int y, bool clean, int hu
|
||||||
{
|
{
|
||||||
if (con_scaletext <= 1)
|
if (con_scaletext <= 1)
|
||||||
{
|
{
|
||||||
screen->DrawText (TextColor, x, y, Lines[linenum].Text,
|
screen->DrawText (Font, TextColor, x, y, Lines[linenum].Text,
|
||||||
DTA_CleanNoMove, clean,
|
DTA_CleanNoMove, clean,
|
||||||
DTA_Alpha, trans,
|
DTA_Alpha, trans,
|
||||||
TAG_DONE);
|
TAG_DONE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
screen->DrawText (TextColor, x, y, Lines[linenum].Text,
|
screen->DrawText (Font, TextColor, x, y, Lines[linenum].Text,
|
||||||
DTA_VirtualWidth, SCREENWIDTH/2,
|
DTA_VirtualWidth, SCREENWIDTH/2,
|
||||||
DTA_VirtualHeight, SCREENHEIGHT/2,
|
DTA_VirtualHeight, SCREENHEIGHT/2,
|
||||||
DTA_Alpha, trans,
|
DTA_Alpha, trans,
|
||||||
|
@ -600,7 +595,7 @@ void DHUDMessageFadeInOut::DoDraw (int linenum, int x, int y, bool clean, int hu
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
screen->DrawText (TextColor, x, y, Lines[linenum].Text,
|
screen->DrawText (Font, TextColor, x, y, Lines[linenum].Text,
|
||||||
DTA_VirtualWidth, HUDWidth,
|
DTA_VirtualWidth, HUDWidth,
|
||||||
DTA_VirtualHeight, hudheight,
|
DTA_VirtualHeight, hudheight,
|
||||||
DTA_Alpha, trans,
|
DTA_Alpha, trans,
|
||||||
|
@ -624,10 +619,10 @@ void DHUDMessageFadeInOut::DoDraw (int linenum, int x, int y, bool clean, int hu
|
||||||
//
|
//
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
DHUDMessageTypeOnFadeOut::DHUDMessageTypeOnFadeOut (const char *text, float x, float y,
|
DHUDMessageTypeOnFadeOut::DHUDMessageTypeOnFadeOut (FFont *font, const char *text, float x, float y,
|
||||||
int hudwidth, int hudheight,
|
int hudwidth, int hudheight,
|
||||||
EColorRange textColor, float typeTime, float holdTime, float fadeOutTime)
|
EColorRange textColor, float typeTime, float holdTime, float fadeOutTime)
|
||||||
: DHUDMessageFadeOut (text, x, y, hudwidth, hudheight, textColor, holdTime, fadeOutTime)
|
: DHUDMessageFadeOut (font, text, x, y, hudwidth, hudheight, textColor, holdTime, fadeOutTime)
|
||||||
{
|
{
|
||||||
TypeOnTime = typeTime * TICRATE;
|
TypeOnTime = typeTime * TICRATE;
|
||||||
if (TypeOnTime == 0.f)
|
if (TypeOnTime == 0.f)
|
||||||
|
@ -729,14 +724,14 @@ void DHUDMessageTypeOnFadeOut::DoDraw (int linenum, int x, int y, bool clean, in
|
||||||
{
|
{
|
||||||
if (con_scaletext <= 1)
|
if (con_scaletext <= 1)
|
||||||
{
|
{
|
||||||
screen->DrawText (TextColor, x, y, Lines[linenum].Text,
|
screen->DrawText (Font, TextColor, x, y, Lines[linenum].Text,
|
||||||
DTA_CleanNoMove, clean,
|
DTA_CleanNoMove, clean,
|
||||||
DTA_TextLen, LineVisible,
|
DTA_TextLen, LineVisible,
|
||||||
TAG_DONE);
|
TAG_DONE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
screen->DrawText (TextColor, x, y, Lines[linenum].Text,
|
screen->DrawText (Font, TextColor, x, y, Lines[linenum].Text,
|
||||||
DTA_VirtualWidth, SCREENWIDTH/2,
|
DTA_VirtualWidth, SCREENWIDTH/2,
|
||||||
DTA_VirtualHeight, SCREENHEIGHT/2,
|
DTA_VirtualHeight, SCREENHEIGHT/2,
|
||||||
DTA_KeepRatio, true,
|
DTA_KeepRatio, true,
|
||||||
|
@ -746,7 +741,7 @@ void DHUDMessageTypeOnFadeOut::DoDraw (int linenum, int x, int y, bool clean, in
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
screen->DrawText (TextColor, x, y, Lines[linenum].Text,
|
screen->DrawText (Font, TextColor, x, y, Lines[linenum].Text,
|
||||||
DTA_VirtualWidth, HUDWidth,
|
DTA_VirtualWidth, HUDWidth,
|
||||||
DTA_VirtualHeight, hudheight,
|
DTA_VirtualHeight, hudheight,
|
||||||
DTA_TextLen, LineVisible,
|
DTA_TextLen, LineVisible,
|
||||||
|
|
|
@ -57,7 +57,7 @@ class DHUDMessage : public DObject
|
||||||
DECLARE_CLASS (DHUDMessage, DObject)
|
DECLARE_CLASS (DHUDMessage, DObject)
|
||||||
HAS_OBJECT_POINTERS
|
HAS_OBJECT_POINTERS
|
||||||
public:
|
public:
|
||||||
DHUDMessage (const char *text, float x, float y, int hudwidth, int hudheight,
|
DHUDMessage (FFont *font, const char *text, float x, float y, int hudwidth, int hudheight,
|
||||||
EColorRange textColor, float holdTime);
|
EColorRange textColor, float holdTime);
|
||||||
virtual ~DHUDMessage ();
|
virtual ~DHUDMessage ();
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ class DHUDMessageFadeOut : public DHUDMessage
|
||||||
{
|
{
|
||||||
DECLARE_CLASS (DHUDMessageFadeOut, DHUDMessage)
|
DECLARE_CLASS (DHUDMessageFadeOut, DHUDMessage)
|
||||||
public:
|
public:
|
||||||
DHUDMessageFadeOut (const char *text, float x, float y, int hudwidth, int hudheight,
|
DHUDMessageFadeOut (FFont *font, const char *text, float x, float y, int hudwidth, int hudheight,
|
||||||
EColorRange textColor, float holdTime, float fadeOutTime);
|
EColorRange textColor, float holdTime, float fadeOutTime);
|
||||||
|
|
||||||
virtual void Serialize (FArchive &arc);
|
virtual void Serialize (FArchive &arc);
|
||||||
|
@ -117,7 +117,7 @@ class DHUDMessageFadeInOut : public DHUDMessageFadeOut
|
||||||
{
|
{
|
||||||
DECLARE_CLASS (DHUDMessageFadeInOut, DHUDMessageFadeOut)
|
DECLARE_CLASS (DHUDMessageFadeInOut, DHUDMessageFadeOut)
|
||||||
public:
|
public:
|
||||||
DHUDMessageFadeInOut (const char *text, float x, float y, int hudwidth, int hudheight,
|
DHUDMessageFadeInOut (FFont *font, const char *text, float x, float y, int hudwidth, int hudheight,
|
||||||
EColorRange textColor, float holdTime, float fadeInTime, float fadeOutTime);
|
EColorRange textColor, float holdTime, float fadeInTime, float fadeOutTime);
|
||||||
|
|
||||||
virtual void Serialize (FArchive &arc);
|
virtual void Serialize (FArchive &arc);
|
||||||
|
@ -136,7 +136,7 @@ class DHUDMessageTypeOnFadeOut : public DHUDMessageFadeOut
|
||||||
{
|
{
|
||||||
DECLARE_CLASS (DHUDMessageTypeOnFadeOut, DHUDMessageFadeOut)
|
DECLARE_CLASS (DHUDMessageTypeOnFadeOut, DHUDMessageFadeOut)
|
||||||
public:
|
public:
|
||||||
DHUDMessageTypeOnFadeOut (const char *text, float x, float y, int hudwidth, int hudheight,
|
DHUDMessageTypeOnFadeOut (FFont *font, const char *text, float x, float y, int hudwidth, int hudheight,
|
||||||
EColorRange textColor, float typeTime, float holdTime, float fadeOutTime);
|
EColorRange textColor, float typeTime, float holdTime, float fadeOutTime);
|
||||||
|
|
||||||
virtual void Serialize (FArchive &arc);
|
virtual void Serialize (FArchive &arc);
|
||||||
|
|
|
@ -156,14 +156,14 @@ static void DrawImageToBox(FTexture * tex, int x, int y, int w, int h, int trans
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
static void DrawHudText(int color, char * text, int x, int y, int trans=0xc000)
|
static void DrawHudText(FFont *font, int color, char * text, int x, int y, int trans=0xc000)
|
||||||
{
|
{
|
||||||
int zerowidth = screen->Font->GetCharWidth('0');
|
int zerowidth = font->GetCharWidth('0');
|
||||||
|
|
||||||
x+=zerowidth/2;
|
x+=zerowidth/2;
|
||||||
for(int i=0;text[i];i++)
|
for(int i=0;text[i];i++)
|
||||||
{
|
{
|
||||||
screen->DrawChar(color, x, y, text[i],
|
screen->DrawChar(font, color, x, y, text[i],
|
||||||
DTA_KeepRatio, true,
|
DTA_KeepRatio, true,
|
||||||
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight, DTA_Alpha, trans,
|
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight, DTA_Alpha, trans,
|
||||||
DTA_CenterBottomOffset, 1, TAG_DONE);
|
DTA_CenterBottomOffset, 1, TAG_DONE);
|
||||||
|
@ -178,12 +178,12 @@ static void DrawHudText(int color, char * text, int x, int y, int trans=0xc000)
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
static void DrawHudNumber(int color, int num, int x, int y, int trans=0xc000)
|
static void DrawHudNumber(FFont *font, int color, int num, int x, int y, int trans=0xc000)
|
||||||
{
|
{
|
||||||
char text[15];
|
char text[15];
|
||||||
|
|
||||||
mysnprintf(text, countof(text), "%d", num);
|
mysnprintf(text, countof(text), "%d", num);
|
||||||
DrawHudText(color, text, x, y, trans);
|
DrawHudText(font, color, text, x, y, trans);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -198,29 +198,27 @@ static void DrawStatus(player_t * CPlayer, int x, int y)
|
||||||
char tempstr[50];
|
char tempstr[50];
|
||||||
int space;
|
int space;
|
||||||
|
|
||||||
screen->SetFont(SmallFont);
|
|
||||||
|
|
||||||
if (hud_showstats)
|
if (hud_showstats)
|
||||||
{
|
{
|
||||||
space=SmallFont->StringWidth("Ac: ");
|
space = SmallFont->StringWidth("Ac: ");
|
||||||
|
|
||||||
y-=SmallFont->GetHeight()-1;
|
y -= SmallFont->GetHeight()-1;
|
||||||
screen->DrawText(hudcolor_statnames, x, y, "Ac:",
|
screen->DrawText(SmallFont, hudcolor_statnames, x, y, "Ac:",
|
||||||
DTA_KeepRatio, true,
|
DTA_KeepRatio, true,
|
||||||
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight, DTA_Alpha, 0xc000, TAG_DONE);
|
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight, DTA_Alpha, 0xc000, TAG_DONE);
|
||||||
|
|
||||||
mysnprintf(tempstr, countof(tempstr), "%i ", CPlayer->accuracy);
|
mysnprintf(tempstr, countof(tempstr), "%i ", CPlayer->accuracy);
|
||||||
screen->DrawText(hudcolor_stats, x+space, y, tempstr,
|
screen->DrawText(SmallFont, hudcolor_stats, x+space, y, tempstr,
|
||||||
DTA_KeepRatio, true,
|
DTA_KeepRatio, true,
|
||||||
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight, DTA_Alpha, 0xc000, TAG_DONE);
|
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight, DTA_Alpha, 0xc000, TAG_DONE);
|
||||||
|
|
||||||
y-=SmallFont->GetHeight()-1;
|
y-=SmallFont->GetHeight()-1;
|
||||||
screen->DrawText(hudcolor_statnames, x, y, "St:",
|
screen->DrawText(SmallFont, hudcolor_statnames, x, y, "St:",
|
||||||
DTA_KeepRatio, true,
|
DTA_KeepRatio, true,
|
||||||
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight, DTA_Alpha, 0xc000, TAG_DONE);
|
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight, DTA_Alpha, 0xc000, TAG_DONE);
|
||||||
|
|
||||||
mysnprintf(tempstr, countof(tempstr), "%i ", CPlayer->stamina);
|
mysnprintf(tempstr, countof(tempstr), "%i ", CPlayer->stamina);
|
||||||
screen->DrawText(hudcolor_stats, x+space, y, tempstr,
|
screen->DrawText(SmallFont, hudcolor_stats, x+space, y, tempstr,
|
||||||
DTA_KeepRatio, true,
|
DTA_KeepRatio, true,
|
||||||
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight, DTA_Alpha, 0xc000, TAG_DONE);
|
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight, DTA_Alpha, 0xc000, TAG_DONE);
|
||||||
}
|
}
|
||||||
|
@ -233,39 +231,39 @@ static void DrawStatus(player_t * CPlayer, int x, int y)
|
||||||
// work in cooperative hub games
|
// work in cooperative hub games
|
||||||
if (hud_showsecrets)
|
if (hud_showsecrets)
|
||||||
{
|
{
|
||||||
y-=SmallFont->GetHeight()-1;
|
y -= SmallFont->GetHeight()-1;
|
||||||
screen->DrawText(hudcolor_statnames, x, y, "S:",
|
screen->DrawText(SmallFont, hudcolor_statnames, x, y, "S:",
|
||||||
DTA_KeepRatio, true,
|
DTA_KeepRatio, true,
|
||||||
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight, DTA_Alpha, 0xc000, TAG_DONE);
|
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight, DTA_Alpha, 0xc000, TAG_DONE);
|
||||||
|
|
||||||
mysnprintf(tempstr, countof(tempstr), "%i/%i ", multiplayer? CPlayer->secretcount : level.found_secrets, level.total_secrets);
|
mysnprintf(tempstr, countof(tempstr), "%i/%i ", multiplayer? CPlayer->secretcount : level.found_secrets, level.total_secrets);
|
||||||
screen->DrawText(hudcolor_stats, x+space, y, tempstr,
|
screen->DrawText(SmallFont, hudcolor_stats, x+space, y, tempstr,
|
||||||
DTA_KeepRatio, true,
|
DTA_KeepRatio, true,
|
||||||
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight, DTA_Alpha, 0xc000, TAG_DONE);
|
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight, DTA_Alpha, 0xc000, TAG_DONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hud_showitems)
|
if (hud_showitems)
|
||||||
{
|
{
|
||||||
y-=SmallFont->GetHeight()-1;
|
y -= SmallFont->GetHeight()-1;
|
||||||
screen->DrawText(hudcolor_statnames, x, y, "I:",
|
screen->DrawText(SmallFont, hudcolor_statnames, x, y, "I:",
|
||||||
DTA_KeepRatio, true,
|
DTA_KeepRatio, true,
|
||||||
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight, DTA_Alpha, 0xc000, TAG_DONE);
|
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight, DTA_Alpha, 0xc000, TAG_DONE);
|
||||||
|
|
||||||
mysnprintf(tempstr, countof(tempstr), "%i/%i ", multiplayer? CPlayer->itemcount : level.found_items, level.total_items);
|
mysnprintf(tempstr, countof(tempstr), "%i/%i ", multiplayer? CPlayer->itemcount : level.found_items, level.total_items);
|
||||||
screen->DrawText(hudcolor_stats, x+space, y, tempstr,
|
screen->DrawText(SmallFont, hudcolor_stats, x+space, y, tempstr,
|
||||||
DTA_KeepRatio, true,
|
DTA_KeepRatio, true,
|
||||||
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight, DTA_Alpha, 0xc000, TAG_DONE);
|
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight, DTA_Alpha, 0xc000, TAG_DONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hud_showmonsters)
|
if (hud_showmonsters)
|
||||||
{
|
{
|
||||||
y-=SmallFont->GetHeight()-1;
|
y -= SmallFont->GetHeight()-1;
|
||||||
screen->DrawText(hudcolor_statnames, x, y, "K:",
|
screen->DrawText(SmallFont, hudcolor_statnames, x, y, "K:",
|
||||||
DTA_KeepRatio, true,
|
DTA_KeepRatio, true,
|
||||||
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight, DTA_Alpha, 0xc000, TAG_DONE);
|
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight, DTA_Alpha, 0xc000, TAG_DONE);
|
||||||
|
|
||||||
mysnprintf(tempstr, countof(tempstr), "%i/%i ", multiplayer? CPlayer->killcount : level.killed_monsters, level.total_monsters);
|
mysnprintf(tempstr, countof(tempstr), "%i/%i ", multiplayer? CPlayer->killcount : level.killed_monsters, level.total_monsters);
|
||||||
screen->DrawText(hudcolor_stats, x+space, y, tempstr,
|
screen->DrawText(SmallFont, hudcolor_stats, x+space, y, tempstr,
|
||||||
DTA_KeepRatio, true,
|
DTA_KeepRatio, true,
|
||||||
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight, DTA_Alpha, 0xc000, TAG_DONE);
|
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight, DTA_Alpha, 0xc000, TAG_DONE);
|
||||||
}
|
}
|
||||||
|
@ -289,9 +287,7 @@ static void DrawHealth(int health, int x, int y)
|
||||||
CR_BLUE;
|
CR_BLUE;
|
||||||
|
|
||||||
DrawImageToBox(healthpic, x, y, 31, 17);
|
DrawImageToBox(healthpic, x, y, 31, 17);
|
||||||
|
DrawHudNumber(HudFont, fontcolor, health, x + 33, y + 17);
|
||||||
screen->SetFont(HudFont);
|
|
||||||
DrawHudNumber(fontcolor, health, x + 33, y + 17);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
@ -318,9 +314,7 @@ static void DrawArmor(AInventory * armor, int x, int y)
|
||||||
if (ap)
|
if (ap)
|
||||||
{
|
{
|
||||||
DrawImageToBox(TexMan[armor->Icon], x, y, 31, 17);
|
DrawImageToBox(TexMan[armor->Icon], x, y, 31, 17);
|
||||||
|
DrawHudNumber(HudFont, fontcolor, ap, x + 33, y + 17);
|
||||||
screen->SetFont(HudFont);
|
|
||||||
DrawHudNumber(fontcolor, ap, x + 33, y + 17);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -530,10 +524,9 @@ static int DrawAmmo(player_t * CPlayer, int x, int y)
|
||||||
|
|
||||||
// ok, we got all ammo types. Now draw the list back to front (bottom to top)
|
// ok, we got all ammo types. Now draw the list back to front (bottom to top)
|
||||||
|
|
||||||
int def_width=ConFont->StringWidth("000/000");
|
int def_width = ConFont->StringWidth("000/000");
|
||||||
x-=def_width;
|
x-=def_width;
|
||||||
screen->SetFont(ConFont);
|
int yadd = ConFont->GetHeight();
|
||||||
int yadd=ConFont->GetHeight();
|
|
||||||
|
|
||||||
for(i=orderedammos.Size()-1;i>=0;i--)
|
for(i=orderedammos.Size()-1;i>=0;i--)
|
||||||
{
|
{
|
||||||
|
@ -559,7 +552,7 @@ static int DrawAmmo(player_t * CPlayer, int x, int y)
|
||||||
ammo < ( (maxammo * hud_ammo_red) / 100) ? CR_RED :
|
ammo < ( (maxammo * hud_ammo_red) / 100) ? CR_RED :
|
||||||
ammo < ( (maxammo * hud_ammo_yellow) / 100) ? CR_GOLD : CR_GREEN );
|
ammo < ( (maxammo * hud_ammo_yellow) / 100) ? CR_GOLD : CR_GREEN );
|
||||||
|
|
||||||
DrawHudText(fontcolor, buf, x-tex_width, y+yadd, trans);
|
DrawHudText(ConFont, fontcolor, buf, x-tex_width, y+yadd, trans);
|
||||||
DrawImageToBox(TexMan[icon], x-20, y, 16, 8, trans);
|
DrawImageToBox(TexMan[icon], x-20, y, 16, 8, trans);
|
||||||
y-=10;
|
y-=10;
|
||||||
}
|
}
|
||||||
|
@ -699,8 +692,7 @@ static void DrawInventory(player_t * CPlayer, int x,int y)
|
||||||
if (rover->Amount>=1000) xx = 32 - IndexFont->StringWidth(buffer);
|
if (rover->Amount>=1000) xx = 32 - IndexFont->StringWidth(buffer);
|
||||||
else xx = 22;
|
else xx = 22;
|
||||||
|
|
||||||
screen->SetFont(IndexFont);
|
screen->DrawText(IndexFont, CR_GOLD, x+xx, y+20, buffer,
|
||||||
screen->DrawText(CR_GOLD, x+xx, y+20, buffer,
|
|
||||||
DTA_KeepRatio, true,
|
DTA_KeepRatio, true,
|
||||||
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight, DTA_Alpha, trans, TAG_DONE);
|
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight, DTA_Alpha, trans, TAG_DONE);
|
||||||
}
|
}
|
||||||
|
@ -728,9 +720,7 @@ static void DrawInventory(player_t * CPlayer, int x,int y)
|
||||||
static void DrawFrags(player_t * CPlayer, int x, int y)
|
static void DrawFrags(player_t * CPlayer, int x, int y)
|
||||||
{
|
{
|
||||||
DrawImageToBox(fragpic, x, y, 31, 17);
|
DrawImageToBox(fragpic, x, y, 31, 17);
|
||||||
|
DrawHudNumber(HudFont, CR_GRAY, CPlayer->fragcount, x + 33, y + 17);
|
||||||
screen->SetFont(HudFont);
|
|
||||||
DrawHudNumber(CR_GRAY, CPlayer->fragcount, x + 33, y + 17);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -747,7 +737,7 @@ static void DrawCoordinates(player_t * CPlayer)
|
||||||
fixed_t y;
|
fixed_t y;
|
||||||
fixed_t z;
|
fixed_t z;
|
||||||
char coordstr[18];
|
char coordstr[18];
|
||||||
int h=SmallFont->GetHeight()+1;
|
int h = SmallFont->GetHeight()+1;
|
||||||
|
|
||||||
|
|
||||||
if (!map_point_coordinates || !automapactive)
|
if (!map_point_coordinates || !automapactive)
|
||||||
|
@ -768,17 +758,17 @@ static void DrawCoordinates(player_t * CPlayer)
|
||||||
int ypos = 18;
|
int ypos = 18;
|
||||||
|
|
||||||
mysnprintf(coordstr, countof(coordstr), "X: %d", x>>FRACBITS);
|
mysnprintf(coordstr, countof(coordstr), "X: %d", x>>FRACBITS);
|
||||||
screen->DrawText(hudcolor_xyco, xpos, ypos, coordstr,
|
screen->DrawText(SmallFont, hudcolor_xyco, xpos, ypos, coordstr,
|
||||||
DTA_KeepRatio, true,
|
DTA_KeepRatio, true,
|
||||||
DTA_VirtualWidth, vwidth, DTA_VirtualHeight, vheight, TAG_DONE);
|
DTA_VirtualWidth, vwidth, DTA_VirtualHeight, vheight, TAG_DONE);
|
||||||
|
|
||||||
mysnprintf(coordstr, countof(coordstr), "Y: %d", y>>FRACBITS);
|
mysnprintf(coordstr, countof(coordstr), "Y: %d", y>>FRACBITS);
|
||||||
screen->DrawText(hudcolor_xyco, xpos, ypos+h, coordstr,
|
screen->DrawText(SmallFont, hudcolor_xyco, xpos, ypos+h, coordstr,
|
||||||
DTA_KeepRatio, true,
|
DTA_KeepRatio, true,
|
||||||
DTA_VirtualWidth, vwidth, DTA_VirtualHeight, vheight, TAG_DONE);
|
DTA_VirtualWidth, vwidth, DTA_VirtualHeight, vheight, TAG_DONE);
|
||||||
|
|
||||||
mysnprintf(coordstr, countof(coordstr), "Z: %d", z>>FRACBITS);
|
mysnprintf(coordstr, countof(coordstr), "Z: %d", z>>FRACBITS);
|
||||||
screen->DrawText(hudcolor_xyco, xpos, ypos+2*h, coordstr,
|
screen->DrawText(SmallFont, hudcolor_xyco, xpos, ypos+2*h, coordstr,
|
||||||
DTA_KeepRatio, true,
|
DTA_KeepRatio, true,
|
||||||
DTA_VirtualWidth, vwidth, DTA_VirtualHeight, vheight, TAG_DONE);
|
DTA_VirtualWidth, vwidth, DTA_VirtualHeight, vheight, TAG_DONE);
|
||||||
}
|
}
|
||||||
|
@ -845,7 +835,6 @@ void DrawHUD()
|
||||||
i=DrawAmmo(CPlayer, hudwidth-5, i);
|
i=DrawAmmo(CPlayer, hudwidth-5, i);
|
||||||
DrawWeapons(CPlayer, hudwidth-5, i);
|
DrawWeapons(CPlayer, hudwidth-5, i);
|
||||||
DrawInventory(CPlayer, 144, hudheight-28);
|
DrawInventory(CPlayer, 144, hudheight-28);
|
||||||
screen->SetFont(SmallFont);
|
|
||||||
if (CPlayer->camera && CPlayer->camera->player)
|
if (CPlayer->camera && CPlayer->camera->player)
|
||||||
{
|
{
|
||||||
StatusBar->DrawCrosshair();
|
StatusBar->DrawCrosshair();
|
||||||
|
@ -862,13 +851,11 @@ void DrawHUD()
|
||||||
int fonth=SmallFont->GetHeight()+1;
|
int fonth=SmallFont->GetHeight()+1;
|
||||||
int bottom=hudheight-1;
|
int bottom=hudheight-1;
|
||||||
|
|
||||||
screen->SetFont(SmallFont);
|
|
||||||
|
|
||||||
if (am_showtotaltime)
|
if (am_showtotaltime)
|
||||||
{
|
{
|
||||||
seconds = level.totaltime / TICRATE;
|
seconds = level.totaltime / TICRATE;
|
||||||
mysnprintf(printstr, countof(printstr), "%02i:%02i:%02i", seconds/3600, (seconds%3600)/60, seconds%60);
|
mysnprintf(printstr, countof(printstr), "%02i:%02i:%02i", seconds/3600, (seconds%3600)/60, seconds%60);
|
||||||
DrawHudText(hudcolor_ttim, printstr, hudwidth-length, bottom, FRACUNIT);
|
DrawHudText(SmallFont, hudcolor_ttim, printstr, hudwidth-length, bottom, FRACUNIT);
|
||||||
bottom -= fonth;
|
bottom -= fonth;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -876,7 +863,7 @@ void DrawHUD()
|
||||||
{
|
{
|
||||||
seconds = level.time /TICRATE;
|
seconds = level.time /TICRATE;
|
||||||
mysnprintf(printstr, countof(printstr), "%02i:%02i:%02i", seconds/3600, (seconds%3600)/60, seconds%60);
|
mysnprintf(printstr, countof(printstr), "%02i:%02i:%02i", seconds/3600, (seconds%3600)/60, seconds%60);
|
||||||
DrawHudText(hudcolor_time, printstr, hudwidth-length, bottom, FRACUNIT);
|
DrawHudText(SmallFont, hudcolor_time, printstr, hudwidth-length, bottom, FRACUNIT);
|
||||||
bottom -= fonth;
|
bottom -= fonth;
|
||||||
|
|
||||||
// Single level time for hubs
|
// Single level time for hubs
|
||||||
|
@ -884,12 +871,12 @@ void DrawHUD()
|
||||||
{
|
{
|
||||||
seconds= level.maptime /TICRATE;
|
seconds= level.maptime /TICRATE;
|
||||||
mysnprintf(printstr, countof(printstr), "%02i:%02i:%02i", seconds/3600, (seconds%3600)/60, seconds%60);
|
mysnprintf(printstr, countof(printstr), "%02i:%02i:%02i", seconds/3600, (seconds%3600)/60, seconds%60);
|
||||||
DrawHudText(hudcolor_ltim, printstr, hudwidth-length, bottom, FRACUNIT);
|
DrawHudText(SmallFont, hudcolor_ltim, printstr, hudwidth-length, bottom, FRACUNIT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mysnprintf(printstr, countof(printstr), "%s: %s", level.mapname, level.level_name);
|
mysnprintf(printstr, countof(printstr), "%s: %s", level.mapname, level.level_name);
|
||||||
screen->DrawText(hudcolor_titl, 1, hudheight-fonth-1, printstr,
|
screen->DrawText(SmallFont, hudcolor_titl, 1, hudheight-fonth-1, printstr,
|
||||||
DTA_KeepRatio, true,
|
DTA_KeepRatio, true,
|
||||||
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight, TAG_DONE);
|
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight, TAG_DONE);
|
||||||
|
|
||||||
|
|
|
@ -430,7 +430,7 @@ void DBaseStatusBar::ShowPlayerName ()
|
||||||
EColorRange color;
|
EColorRange color;
|
||||||
|
|
||||||
color = (CPlayer == &players[consoleplayer]) ? CR_GOLD : CR_GREEN;
|
color = (CPlayer == &players[consoleplayer]) ? CR_GOLD : CR_GREEN;
|
||||||
AttachMessage (new DHUDMessageFadeOut (CPlayer->userinfo.netname,
|
AttachMessage (new DHUDMessageFadeOut (SmallFont, CPlayer->userinfo.netname,
|
||||||
1.5f, 0.92f, 0, 0, color, 2.f, 0.35f), MAKE_ID('P','N','A','M'));
|
1.5f, 0.92f, 0, 0, color, 2.f, 0.35f), MAKE_ID('P','N','A','M'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1126,7 +1126,7 @@ void DBaseStatusBar::Draw (EHudState state)
|
||||||
|
|
||||||
if (idmypos)
|
if (idmypos)
|
||||||
{ // Draw current coordinates
|
{ // Draw current coordinates
|
||||||
int height = screen->Font->GetHeight();
|
int height = SmallFont->GetHeight();
|
||||||
char labels[3] = { 'X', 'Y', 'Z' };
|
char labels[3] = { 'X', 'Y', 'Z' };
|
||||||
fixed_t *value;
|
fixed_t *value;
|
||||||
int i;
|
int i;
|
||||||
|
@ -1163,7 +1163,7 @@ void DBaseStatusBar::Draw (EHudState state)
|
||||||
for (i = 2, value = &CPlayer->mo->z; i >= 0; y -= height, --value, --i)
|
for (i = 2, value = &CPlayer->mo->z; i >= 0; y -= height, --value, --i)
|
||||||
{
|
{
|
||||||
mysnprintf (line, countof(line), "%c: %d", labels[i], *value >> FRACBITS);
|
mysnprintf (line, countof(line), "%c: %d", labels[i], *value >> FRACBITS);
|
||||||
screen->DrawText (CR_GREEN, xpos, y, line,
|
screen->DrawText (SmallFont, CR_GREEN, xpos, y, line,
|
||||||
DTA_KeepRatio, true,
|
DTA_KeepRatio, true,
|
||||||
DTA_VirtualWidth, vwidth, DTA_VirtualHeight, vheight,
|
DTA_VirtualWidth, vwidth, DTA_VirtualHeight, vheight,
|
||||||
TAG_DONE);
|
TAG_DONE);
|
||||||
|
@ -1185,20 +1185,20 @@ void DBaseStatusBar::Draw (EHudState state)
|
||||||
EColorRange highlight = (gameinfo.gametype & GAME_DoomChex) ?
|
EColorRange highlight = (gameinfo.gametype & GAME_DoomChex) ?
|
||||||
CR_UNTRANSLATED : CR_YELLOW;
|
CR_UNTRANSLATED : CR_YELLOW;
|
||||||
|
|
||||||
height = screen->Font->GetHeight () * CleanYfac;
|
height = SmallFont->GetHeight () * CleanYfac;
|
||||||
|
|
||||||
// Draw timer
|
// Draw timer
|
||||||
y = 8;
|
y = 8;
|
||||||
if (am_showtime)
|
if (am_showtime)
|
||||||
{
|
{
|
||||||
mysnprintf (line, countof(line), "%02d:%02d:%02d", time/3600, (time%3600)/60, time%60); // Time
|
mysnprintf (line, countof(line), "%02d:%02d:%02d", time/3600, (time%3600)/60, time%60); // Time
|
||||||
screen->DrawText (CR_GREY, SCREENWIDTH - 80*CleanXfac, y, line, DTA_CleanNoMove, true, TAG_DONE);
|
screen->DrawText (SmallFont, CR_GREY, SCREENWIDTH - 80*CleanXfac, y, line, DTA_CleanNoMove, true, TAG_DONE);
|
||||||
y+=8*CleanYfac;
|
y+=8*CleanYfac;
|
||||||
}
|
}
|
||||||
if (am_showtotaltime)
|
if (am_showtotaltime)
|
||||||
{
|
{
|
||||||
mysnprintf (line, countof(line), "%02d:%02d:%02d", totaltime/3600, (totaltime%3600)/60, totaltime%60); // Total time
|
mysnprintf (line, countof(line), "%02d:%02d:%02d", totaltime/3600, (totaltime%3600)/60, totaltime%60); // Total time
|
||||||
screen->DrawText (CR_GREY, SCREENWIDTH - 80*CleanXfac, y, line, DTA_CleanNoMove, true, TAG_DONE);
|
screen->DrawText (SmallFont, CR_GREY, SCREENWIDTH - 80*CleanXfac, y, line, DTA_CleanNoMove, true, TAG_DONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw map name
|
// Draw map name
|
||||||
|
@ -1245,7 +1245,7 @@ void DBaseStatusBar::Draw (EHudState state)
|
||||||
line[i] = TEXTCOLOR_ESCAPE;
|
line[i] = TEXTCOLOR_ESCAPE;
|
||||||
line[i+1] = CR_GREY + 'A';
|
line[i+1] = CR_GREY + 'A';
|
||||||
strcpy (&line[i+2], level.level_name);
|
strcpy (&line[i+2], level.level_name);
|
||||||
screen->DrawText (highlight,
|
screen->DrawText (SmallFont, highlight,
|
||||||
(SCREENWIDTH - SmallFont->StringWidth (line)*CleanXfac)/2, y, line,
|
(SCREENWIDTH - SmallFont->StringWidth (line)*CleanXfac)/2, y, line,
|
||||||
DTA_CleanNoMove, true, TAG_DONE);
|
DTA_CleanNoMove, true, TAG_DONE);
|
||||||
|
|
||||||
|
@ -1258,7 +1258,7 @@ void DBaseStatusBar::Draw (EHudState state)
|
||||||
{
|
{
|
||||||
mysnprintf (line, countof(line), "MONSTERS:" TEXTCOLOR_GREY " %d/%d",
|
mysnprintf (line, countof(line), "MONSTERS:" TEXTCOLOR_GREY " %d/%d",
|
||||||
level.killed_monsters, level.total_monsters);
|
level.killed_monsters, level.total_monsters);
|
||||||
screen->DrawText (highlight, 8, y, line,
|
screen->DrawText (SmallFont, highlight, 8, y, line,
|
||||||
DTA_CleanNoMove, true, TAG_DONE);
|
DTA_CleanNoMove, true, TAG_DONE);
|
||||||
y += height;
|
y += height;
|
||||||
}
|
}
|
||||||
|
@ -1268,7 +1268,7 @@ void DBaseStatusBar::Draw (EHudState state)
|
||||||
{
|
{
|
||||||
mysnprintf (line, countof(line), "SECRETS:" TEXTCOLOR_GREY " %d/%d",
|
mysnprintf (line, countof(line), "SECRETS:" TEXTCOLOR_GREY " %d/%d",
|
||||||
level.found_secrets, level.total_secrets);
|
level.found_secrets, level.total_secrets);
|
||||||
screen->DrawText (highlight, 8, y, line,
|
screen->DrawText (SmallFont, highlight, 8, y, line,
|
||||||
DTA_CleanNoMove, true, TAG_DONE);
|
DTA_CleanNoMove, true, TAG_DONE);
|
||||||
y += height;
|
y += height;
|
||||||
}
|
}
|
||||||
|
@ -1278,7 +1278,7 @@ void DBaseStatusBar::Draw (EHudState state)
|
||||||
{
|
{
|
||||||
mysnprintf (line, countof(line), "ITEMS:" TEXTCOLOR_GREY " %d/%d",
|
mysnprintf (line, countof(line), "ITEMS:" TEXTCOLOR_GREY " %d/%d",
|
||||||
level.found_items, level.total_items);
|
level.found_items, level.total_items);
|
||||||
screen->DrawText (highlight, 8, y, line,
|
screen->DrawText (SmallFont, highlight, 8, y, line,
|
||||||
DTA_CleanNoMove, true, TAG_DONE);
|
DTA_CleanNoMove, true, TAG_DONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1341,11 +1341,10 @@ void DBaseStatusBar::DrawLog ()
|
||||||
Scale(w, SCREENWIDTH, hudwidth), Scale(height, SCREENHEIGHT, hudheight));
|
Scale(w, SCREENWIDTH, hudwidth), Scale(height, SCREENHEIGHT, hudheight));
|
||||||
x+=20;
|
x+=20;
|
||||||
y+=10;
|
y+=10;
|
||||||
screen->SetFont(SmallFont);
|
|
||||||
for (int i = 0; lines[i].Width != -1; i++)
|
for (int i = 0; lines[i].Width != -1; i++)
|
||||||
{
|
{
|
||||||
|
|
||||||
screen->DrawText (CR_UNTRANSLATED, x, y, lines[i].Text,
|
screen->DrawText (SmallFont, CR_UNTRANSLATED, x, y, lines[i].Text,
|
||||||
DTA_KeepRatio, true,
|
DTA_KeepRatio, true,
|
||||||
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight, TAG_DONE);
|
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight, TAG_DONE);
|
||||||
y += SmallFont->GetHeight ()+1;
|
y += SmallFont->GetHeight ()+1;
|
||||||
|
@ -1374,7 +1373,7 @@ void DBaseStatusBar::DrawTopStuff (EHudState state)
|
||||||
{
|
{
|
||||||
if (demoplayback && demover != DEMOGAMEVERSION)
|
if (demoplayback && demover != DEMOGAMEVERSION)
|
||||||
{
|
{
|
||||||
screen->DrawText (CR_TAN, 0, ST_Y - 40 * CleanYfac,
|
screen->DrawText (SmallFont, CR_TAN, 0, ST_Y - 40 * CleanYfac,
|
||||||
"Demo was recorded with a different version\n"
|
"Demo was recorded with a different version\n"
|
||||||
"of ZDoom. Expect it to go out of sync.",
|
"of ZDoom. Expect it to go out of sync.",
|
||||||
DTA_CleanNoMove, true, TAG_DONE);
|
DTA_CleanNoMove, true, TAG_DONE);
|
||||||
|
@ -1548,7 +1547,7 @@ void DBaseStatusBar::DrawConsistancy () const
|
||||||
players[1-consoleplayer].inconsistant/ticdup);
|
players[1-consoleplayer].inconsistant/ticdup);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
screen->DrawText (CR_GREEN,
|
screen->DrawText (SmallFont, CR_GREEN,
|
||||||
(screen->GetWidth() - SmallFont->StringWidth (conbuff)*CleanXfac) / 2,
|
(screen->GetWidth() - SmallFont->StringWidth (conbuff)*CleanXfac) / 2,
|
||||||
0, conbuff, DTA_CleanNoMove, true, TAG_DONE);
|
0, conbuff, DTA_CleanNoMove, true, TAG_DONE);
|
||||||
BorderTopRefresh = screen->GetPageCount ();
|
BorderTopRefresh = screen->GetPageCount ();
|
||||||
|
|
|
@ -111,14 +111,14 @@ DEFINE_ACTION_FUNCTION(AActor, A_AlienSpectreDeath)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NAME_AlienSpectre2:
|
case NAME_AlienSpectre2:
|
||||||
C_MidPrint(GStrings("TXT_KILLED_BISHOP"));
|
C_MidPrint(SmallFont, GStrings("TXT_KILLED_BISHOP"));
|
||||||
log = 74;
|
log = 74;
|
||||||
player->GiveInventoryType (QuestItemClasses[20]);
|
player->GiveInventoryType (QuestItemClasses[20]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NAME_AlienSpectre3:
|
case NAME_AlienSpectre3:
|
||||||
{
|
{
|
||||||
C_MidPrint(GStrings("TXT_KILLED_ORACLE"));
|
C_MidPrint(SmallFont, GStrings("TXT_KILLED_ORACLE"));
|
||||||
// If there are any Oracles still alive, kill them.
|
// If there are any Oracles still alive, kill them.
|
||||||
TThinkerIterator<AActor> it(NAME_Oracle);
|
TThinkerIterator<AActor> it(NAME_Oracle);
|
||||||
AActor *oracle;
|
AActor *oracle;
|
||||||
|
@ -149,7 +149,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_AlienSpectreDeath)
|
||||||
}
|
}
|
||||||
|
|
||||||
case NAME_AlienSpectre4:
|
case NAME_AlienSpectre4:
|
||||||
C_MidPrint(GStrings("TXT_KILLED_MACIL"));
|
C_MidPrint(SmallFont, GStrings("TXT_KILLED_MACIL"));
|
||||||
player->GiveInventoryType (QuestItemClasses[23]);
|
player->GiveInventoryType (QuestItemClasses[23]);
|
||||||
if (player->FindInventory (QuestItemClasses[24]) == NULL)
|
if (player->FindInventory (QuestItemClasses[24]) == NULL)
|
||||||
{ // Richter has taken over. Macil is a snake.
|
{ // Richter has taken over. Macil is a snake.
|
||||||
|
@ -162,7 +162,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_AlienSpectreDeath)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NAME_AlienSpectre5:
|
case NAME_AlienSpectre5:
|
||||||
C_MidPrint(GStrings("TXT_KILLED_LOREMASTER"));
|
C_MidPrint(SmallFont, GStrings("TXT_KILLED_LOREMASTER"));
|
||||||
ASigil *sigil;
|
ASigil *sigil;
|
||||||
|
|
||||||
player->GiveInventoryType (QuestItemClasses[25]);
|
player->GiveInventoryType (QuestItemClasses[25]);
|
||||||
|
|
|
@ -110,7 +110,7 @@ bool AScanner::Use (bool pickup)
|
||||||
{
|
{
|
||||||
if (Owner->CheckLocalView (consoleplayer))
|
if (Owner->CheckLocalView (consoleplayer))
|
||||||
{
|
{
|
||||||
C_MidPrint(GStrings("TXT_NEEDMAP"));
|
C_MidPrint(SmallFont, GStrings("TXT_NEEDMAP"));
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
#include "a_sharedglobal.h"
|
#include "a_sharedglobal.h"
|
||||||
#include "templates.h"
|
#include "templates.h"
|
||||||
#include "d_event.h"
|
#include "d_event.h"
|
||||||
|
#include "v_font.h"
|
||||||
|
|
||||||
// Include all the other Strife stuff here to reduce compile time
|
// Include all the other Strife stuff here to reduce compile time
|
||||||
#include "a_acolyte.cpp"
|
#include "a_acolyte.cpp"
|
||||||
|
|
|
@ -53,7 +53,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_GiveQuestItem)
|
||||||
|
|
||||||
if (name != NULL)
|
if (name != NULL)
|
||||||
{
|
{
|
||||||
C_MidPrint (name);
|
C_MidPrint (SmallFont, name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -581,7 +581,6 @@ private:
|
||||||
|
|
||||||
screen->DrawTexture (Images[back], left, top, DTA_CleanNoMove, true, DTA_Alpha, FRACUNIT*3/4, TAG_DONE);
|
screen->DrawTexture (Images[back], left, top, DTA_CleanNoMove, true, DTA_Alpha, FRACUNIT*3/4, TAG_DONE);
|
||||||
screen->DrawTexture (Images[bars], left, top, DTA_CleanNoMove, true, TAG_DONE);
|
screen->DrawTexture (Images[bars], left, top, DTA_CleanNoMove, true, TAG_DONE);
|
||||||
screen->SetFont (SmallFont2);
|
|
||||||
|
|
||||||
switch (CurrentPop)
|
switch (CurrentPop)
|
||||||
{
|
{
|
||||||
|
@ -592,7 +591,7 @@ private:
|
||||||
((level.time/TICRATE)%3600)/60,
|
((level.time/TICRATE)%3600)/60,
|
||||||
(level.time/TICRATE)%60);
|
(level.time/TICRATE)%60);
|
||||||
|
|
||||||
screen->DrawText (CR_UNTRANSLATED, left+210*xscale, top+8*yscale, buff,
|
screen->DrawText (SmallFont2, CR_UNTRANSLATED, left+210*xscale, top+8*yscale, buff,
|
||||||
DTA_CleanNoMove, true, TAG_DONE);
|
DTA_CleanNoMove, true, TAG_DONE);
|
||||||
|
|
||||||
if (CPlayer->LogText != NULL)
|
if (CPlayer->LogText != NULL)
|
||||||
|
@ -600,7 +599,7 @@ private:
|
||||||
FBrokenLines *lines = V_BreakLines (SmallFont2, 272, CPlayer->LogText);
|
FBrokenLines *lines = V_BreakLines (SmallFont2, 272, CPlayer->LogText);
|
||||||
for (i = 0; lines[i].Width >= 0; ++i)
|
for (i = 0; lines[i].Width >= 0; ++i)
|
||||||
{
|
{
|
||||||
screen->DrawText (CR_UNTRANSLATED, left+24*xscale, top+(18+i*12)*yscale,
|
screen->DrawText (SmallFont2, CR_UNTRANSLATED, left+24*xscale, top+(18+i*12)*yscale,
|
||||||
lines[i].Text, DTA_CleanNoMove, true, TAG_DONE);
|
lines[i].Text, DTA_CleanNoMove, true, TAG_DONE);
|
||||||
}
|
}
|
||||||
V_FreeBrokenLines (lines);
|
V_FreeBrokenLines (lines);
|
||||||
|
@ -653,7 +652,7 @@ private:
|
||||||
DTA_ClipLeft, clipleft,
|
DTA_ClipLeft, clipleft,
|
||||||
DTA_ClipRight, clipright,
|
DTA_ClipRight, clipright,
|
||||||
TAG_DONE);
|
TAG_DONE);
|
||||||
screen->DrawText (CR_UNTRANSLATED,
|
screen->DrawText (SmallFont2, CR_UNTRANSLATED,
|
||||||
left + (colnum * 140 + leftcol + 17)*xscale,
|
left + (colnum * 140 + leftcol + 17)*xscale,
|
||||||
top + (11 + rownum)*yscale,
|
top + (11 + rownum)*yscale,
|
||||||
label,
|
label,
|
||||||
|
@ -711,7 +710,7 @@ private:
|
||||||
};
|
};
|
||||||
for (i = 0; i < 7; ++i)
|
for (i = 0; i < 7; ++i)
|
||||||
{
|
{
|
||||||
const PClass * ammotype = PClass::FindClass(AmmoList[i].AmmoType);
|
const PClass *ammotype = PClass::FindClass(AmmoList[i].AmmoType);
|
||||||
item = CPlayer->mo->FindInventory (ammotype);
|
item = CPlayer->mo->FindInventory (ammotype);
|
||||||
|
|
||||||
if (item == NULL)
|
if (item == NULL)
|
||||||
|
@ -758,8 +757,6 @@ private:
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
screen->SetFont (SmallFont);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DrINumber (signed int val, int x, int y, int imgBase) const
|
void DrINumber (signed int val, int x, int y, int imgBase) const
|
||||||
|
|
|
@ -157,7 +157,7 @@ void HU_DrawScores (player_t *player)
|
||||||
static void HU_DoDrawScores (player_t *player, player_t *sortedplayers[MAXPLAYERS])
|
static void HU_DoDrawScores (player_t *player, player_t *sortedplayers[MAXPLAYERS])
|
||||||
{
|
{
|
||||||
int color;
|
int color;
|
||||||
int height = screen->Font->GetHeight() * CleanYfac;
|
int height = SmallFont->GetHeight() * CleanYfac;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
int maxwidth = 0;
|
int maxwidth = 0;
|
||||||
int numTeams = 0;
|
int numTeams = 0;
|
||||||
|
@ -221,8 +221,7 @@ static void HU_DoDrawScores (player_t *player, player_t *sortedplayers[MAXPLAYER
|
||||||
char score[80];
|
char score[80];
|
||||||
mysnprintf (score, countof(score), "%d", teams[i].score);
|
mysnprintf (score, countof(score), "%d", teams[i].score);
|
||||||
|
|
||||||
screen->SetFont (BigFont);
|
screen->DrawText (BigFont, teams[i].GetTextColor(), scorexwidth, gamestate == GS_INTERMISSION ? y * 4 / 5 : y / 2, score,
|
||||||
screen->DrawText (teams[i].GetTextColor (), scorexwidth, gamestate == GS_INTERMISSION ? y * 4 / 5 : y / 2, score,
|
|
||||||
DTA_CleanNoMove, true, TAG_DONE);
|
DTA_CleanNoMove, true, TAG_DONE);
|
||||||
|
|
||||||
scorexwidth += SCREENWIDTH / 8;
|
scorexwidth += SCREENWIDTH / 8;
|
||||||
|
@ -232,15 +231,13 @@ static void HU_DoDrawScores (player_t *player, player_t *sortedplayers[MAXPLAYER
|
||||||
gamestate == GS_INTERMISSION ? y += 0 : y += SCREENWIDTH / 32;
|
gamestate == GS_INTERMISSION ? y += 0 : y += SCREENWIDTH / 32;
|
||||||
}
|
}
|
||||||
|
|
||||||
screen->SetFont (SmallFont);
|
screen->DrawText (SmallFont, color, SCREENWIDTH / 32, y, "Color",
|
||||||
|
|
||||||
screen->DrawText (color, SCREENWIDTH / 32, y, "Color",
|
|
||||||
DTA_CleanNoMove, true, TAG_DONE);
|
DTA_CleanNoMove, true, TAG_DONE);
|
||||||
|
|
||||||
screen->DrawText (color, SCREENWIDTH / 4, y, deathmatch ? "Frags" : "Kills",
|
screen->DrawText (SmallFont, color, SCREENWIDTH / 4, y, deathmatch ? "Frags" : "Kills",
|
||||||
DTA_CleanNoMove, true, TAG_DONE);
|
DTA_CleanNoMove, true, TAG_DONE);
|
||||||
|
|
||||||
screen->DrawText (color, SCREENWIDTH / 2, y, "Name",
|
screen->DrawText (SmallFont, color, SCREENWIDTH / 2, y, "Name",
|
||||||
DTA_CleanNoMove, true, TAG_DONE);
|
DTA_CleanNoMove, true, TAG_DONE);
|
||||||
|
|
||||||
x = (SCREENWIDTH >> 1) - (((maxwidth + 32 + 32 + 16) * CleanXfac) >> 1);
|
x = (SCREENWIDTH >> 1) - (((maxwidth + 32 + 32 + 16) * CleanXfac) >> 1);
|
||||||
|
@ -287,7 +284,7 @@ static void HU_DrawTimeRemaining (int y)
|
||||||
else
|
else
|
||||||
mysnprintf (str, countof(str), "Level ends in %02d:%02d", minutes, seconds);
|
mysnprintf (str, countof(str), "Level ends in %02d:%02d", minutes, seconds);
|
||||||
|
|
||||||
screen->DrawText (CR_GREY, SCREENWIDTH/2 - SmallFont->StringWidth (str)/2*CleanXfac,
|
screen->DrawText (SmallFont, CR_GREY, SCREENWIDTH/2 - SmallFont->StringWidth (str)/2*CleanXfac,
|
||||||
y, str, DTA_CleanNoMove, true, TAG_DONE);
|
y, str, DTA_CleanNoMove, true, TAG_DONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -329,10 +326,10 @@ static void HU_DrawPlayer (player_t *player, bool highlight, int x, int y, int h
|
||||||
|
|
||||||
mysnprintf (str, countof(str), "%d", deathmatch ? player->fragcount : player->killcount);
|
mysnprintf (str, countof(str), "%d", deathmatch ? player->fragcount : player->killcount);
|
||||||
|
|
||||||
screen->DrawText (color, SCREENWIDTH / 4, y, player->playerstate == PST_DEAD && !deathmatch ? "DEAD" : str,
|
screen->DrawText (SmallFont, color, SCREENWIDTH / 4, y, player->playerstate == PST_DEAD && !deathmatch ? "DEAD" : str,
|
||||||
DTA_CleanNoMove, true, TAG_DONE);
|
DTA_CleanNoMove, true, TAG_DONE);
|
||||||
|
|
||||||
screen->DrawText (color, SCREENWIDTH / 2, y, player->userinfo.netname,
|
screen->DrawText (SmallFont, color, SCREENWIDTH / 2, y, player->userinfo.netname,
|
||||||
DTA_CleanNoMove, true, TAG_DONE);
|
DTA_CleanNoMove, true, TAG_DONE);
|
||||||
|
|
||||||
if (teamplay && teams[player->userinfo.team].logo.GetChars ())
|
if (teamplay && teams[player->userinfo.team].logo.GetChars ())
|
||||||
|
|
113
src/m_menu.cpp
113
src/m_menu.cpp
|
@ -941,11 +941,10 @@ void M_DrawLoad (void)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const char *loadgame = GStrings("MNU_LOADGAME");
|
const char *loadgame = GStrings("MNU_LOADGAME");
|
||||||
screen->DrawText (CR_UNTRANSLATED,
|
screen->DrawText (BigFont, CR_UNTRANSLATED,
|
||||||
(SCREENWIDTH - BigFont->StringWidth (loadgame)*CleanXfac)/2, 10*CleanYfac,
|
(SCREENWIDTH - BigFont->StringWidth (loadgame)*CleanXfac)/2, 10*CleanYfac,
|
||||||
loadgame, DTA_CleanNoMove, true, TAG_DONE);
|
loadgame, DTA_CleanNoMove, true, TAG_DONE);
|
||||||
}
|
}
|
||||||
screen->SetFont (SmallFont);
|
|
||||||
M_DrawSaveLoadCommon ();
|
M_DrawSaveLoadCommon ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -984,10 +983,6 @@ static void M_ExtractSaveData (const FSaveGameNode *node)
|
||||||
|
|
||||||
M_UnloadSaveData ();
|
M_UnloadSaveData ();
|
||||||
|
|
||||||
// When breaking comment strings below, be sure to get the spacing from
|
|
||||||
// the small font instead of some other font.
|
|
||||||
screen->SetFont (SmallFont);
|
|
||||||
|
|
||||||
if (node != NULL &&
|
if (node != NULL &&
|
||||||
node->Succ != NULL &&
|
node->Succ != NULL &&
|
||||||
!node->Filename.IsEmpty() &&
|
!node->Filename.IsEmpty() &&
|
||||||
|
@ -1036,7 +1031,7 @@ static void M_ExtractSaveData (const FSaveGameNode *node)
|
||||||
memcpy (comment + timelen, pcomment, commentlen);
|
memcpy (comment + timelen, pcomment, commentlen);
|
||||||
}
|
}
|
||||||
comment[timelen+commentlen] = 0;
|
comment[timelen+commentlen] = 0;
|
||||||
SaveComment = V_BreakLines (screen->Font, 216*screen->GetWidth()/640/CleanXfac, comment);
|
SaveComment = V_BreakLines (SmallFont, 216*screen->GetWidth()/640/CleanXfac, comment);
|
||||||
delete[] comment;
|
delete[] comment;
|
||||||
delete[] time;
|
delete[] time;
|
||||||
delete[] pcomment;
|
delete[] pcomment;
|
||||||
|
@ -1121,7 +1116,7 @@ static void M_DrawSaveLoadCommon ()
|
||||||
? GStrings("MNU_NOPICTURE") : GStrings("MNU_DIFFVERSION");
|
? GStrings("MNU_NOPICTURE") : GStrings("MNU_DIFFVERSION");
|
||||||
const int textlen = SmallFont->StringWidth (text)*CleanXfac;
|
const int textlen = SmallFont->StringWidth (text)*CleanXfac;
|
||||||
|
|
||||||
screen->DrawText (CR_GOLD, savepicLeft+(savepicWidth-textlen)/2,
|
screen->DrawText (SmallFont, CR_GOLD, savepicLeft+(savepicWidth-textlen)/2,
|
||||||
savepicTop+(savepicHeight-rowHeight)/2, text,
|
savepicTop+(savepicHeight-rowHeight)/2, text,
|
||||||
DTA_CleanNoMove, true, TAG_DONE);
|
DTA_CleanNoMove, true, TAG_DONE);
|
||||||
}
|
}
|
||||||
|
@ -1137,7 +1132,7 @@ static void M_DrawSaveLoadCommon ()
|
||||||
// for that.
|
// for that.
|
||||||
for (i = 0; SaveComment != NULL && SaveComment[i].Width >= 0 && i < 6; ++i)
|
for (i = 0; SaveComment != NULL && SaveComment[i].Width >= 0 && i < 6; ++i)
|
||||||
{
|
{
|
||||||
screen->DrawText (CR_GOLD, commentLeft, commentTop
|
screen->DrawText (SmallFont, CR_GOLD, commentLeft, commentTop
|
||||||
+ SmallFont->GetHeight()*i*CleanYfac, SaveComment[i].Text,
|
+ SmallFont->GetHeight()*i*CleanYfac, SaveComment[i].Text,
|
||||||
DTA_CleanNoMove, true, TAG_DONE);
|
DTA_CleanNoMove, true, TAG_DONE);
|
||||||
}
|
}
|
||||||
|
@ -1154,7 +1149,7 @@ static void M_DrawSaveLoadCommon ()
|
||||||
const char * text = GStrings("MNU_NOFILES");
|
const char * text = GStrings("MNU_NOFILES");
|
||||||
const int textlen = SmallFont->StringWidth (text)*CleanXfac;
|
const int textlen = SmallFont->StringWidth (text)*CleanXfac;
|
||||||
|
|
||||||
screen->DrawText (CR_GOLD, listboxLeft+(listboxWidth-textlen)/2,
|
screen->DrawText (SmallFont, CR_GOLD, listboxLeft+(listboxWidth-textlen)/2,
|
||||||
listboxTop+(listboxHeight-rowHeight)/2, text,
|
listboxTop+(listboxHeight-rowHeight)/2, text,
|
||||||
DTA_CleanNoMove, true, TAG_DONE);
|
DTA_CleanNoMove, true, TAG_DONE);
|
||||||
return;
|
return;
|
||||||
|
@ -1189,17 +1184,16 @@ static void M_DrawSaveLoadCommon ()
|
||||||
didSeeSelected = true;
|
didSeeSelected = true;
|
||||||
if (!genStringEnter)
|
if (!genStringEnter)
|
||||||
{
|
{
|
||||||
screen->DrawText (
|
screen->DrawText (SmallFont, color,
|
||||||
color, listboxLeft+1,
|
listboxLeft+1, listboxTop+rowHeight*i+CleanYfac, node->Title,
|
||||||
listboxTop+rowHeight*i+CleanYfac, node->Title,
|
|
||||||
DTA_CleanNoMove, true, TAG_DONE);
|
DTA_CleanNoMove, true, TAG_DONE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
screen->DrawText (CR_WHITE, listboxLeft+1,
|
screen->DrawText (SmallFont, CR_WHITE,
|
||||||
listboxTop+rowHeight*i+CleanYfac, savegamestring,
|
listboxLeft+1, listboxTop+rowHeight*i+CleanYfac, savegamestring,
|
||||||
DTA_CleanNoMove, true, TAG_DONE);
|
DTA_CleanNoMove, true, TAG_DONE);
|
||||||
screen->DrawText (CR_WHITE,
|
screen->DrawText (SmallFont, CR_WHITE,
|
||||||
listboxLeft+1+SmallFont->StringWidth (savegamestring)*CleanXfac,
|
listboxLeft+1+SmallFont->StringWidth (savegamestring)*CleanXfac,
|
||||||
listboxTop+rowHeight*i+CleanYfac, underscore,
|
listboxTop+rowHeight*i+CleanYfac, underscore,
|
||||||
DTA_CleanNoMove, true, TAG_DONE);
|
DTA_CleanNoMove, true, TAG_DONE);
|
||||||
|
@ -1207,9 +1201,8 @@ static void M_DrawSaveLoadCommon ()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
screen->DrawText (
|
screen->DrawText (SmallFont, color,
|
||||||
color, listboxLeft+1,
|
listboxLeft+1, listboxTop+rowHeight*i+CleanYfac, node->Title,
|
||||||
listboxTop+rowHeight*i+CleanYfac, node->Title,
|
|
||||||
DTA_CleanNoMove, true, TAG_DONE);
|
DTA_CleanNoMove, true, TAG_DONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1306,12 +1299,11 @@ void M_DrawSave()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const char * text = GStrings("MNU_SAVEGAME");
|
const char *text = GStrings("MNU_SAVEGAME");
|
||||||
screen->DrawText (CR_UNTRANSLATED,
|
screen->DrawText (BigFont, CR_UNTRANSLATED,
|
||||||
(SCREENWIDTH - BigFont->StringWidth (text)*CleanXfac)/2, 10*CleanYfac,
|
(SCREENWIDTH - BigFont->StringWidth (text)*CleanXfac)/2, 10*CleanYfac,
|
||||||
text, DTA_CleanNoMove, true, TAG_DONE);
|
text, DTA_CleanNoMove, true, TAG_DONE);
|
||||||
}
|
}
|
||||||
screen->SetFont (SmallFont);
|
|
||||||
M_DrawSaveLoadCommon ();
|
M_DrawSaveLoadCommon ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1681,8 +1673,8 @@ static void DrawClassMenu(void)
|
||||||
"M_MWALK%d"
|
"M_MWALK%d"
|
||||||
};
|
};
|
||||||
|
|
||||||
const char * text = GStrings("MNU_CHOOSECLASS");
|
const char *text = GStrings("MNU_CHOOSECLASS");
|
||||||
screen->DrawText (CR_UNTRANSLATED, 34, 24, text, DTA_Clean, true, TAG_DONE);
|
screen->DrawText (BigFont, CR_UNTRANSLATED, 34, 24, text, DTA_Clean, true, TAG_DONE);
|
||||||
classnum = itemOn;
|
classnum = itemOn;
|
||||||
if (classnum > 2)
|
if (classnum > 2)
|
||||||
{
|
{
|
||||||
|
@ -1703,7 +1695,7 @@ static void M_DrawClassMenu ()
|
||||||
if (ClassMenuDef.numitems > 4 && gameinfo.gametype & GAME_Raven)
|
if (ClassMenuDef.numitems > 4 && gameinfo.gametype & GAME_Raven)
|
||||||
tit_y = 2;
|
tit_y = 2;
|
||||||
|
|
||||||
screen->DrawText (gameinfo.gametype & GAME_DoomChex ? CR_RED : CR_UNTRANSLATED,
|
screen->DrawText (BigFont, gameinfo.gametype & GAME_DoomChex ? CR_RED : CR_UNTRANSLATED,
|
||||||
160 - BigFont->StringWidth (text)/2,
|
160 - BigFont->StringWidth (text)/2,
|
||||||
tit_y,
|
tit_y,
|
||||||
text, DTA_Clean, true, TAG_DONE);
|
text, DTA_Clean, true, TAG_DONE);
|
||||||
|
@ -1753,7 +1745,7 @@ static void M_DrawClassMenu ()
|
||||||
|
|
||||||
static void DrawHexenSkillMenu()
|
static void DrawHexenSkillMenu()
|
||||||
{
|
{
|
||||||
screen->DrawText (CR_UNTRANSLATED, 74, 16, GStrings("MNU_CHOOSESKILL"), DTA_Clean, true, TAG_DONE);
|
screen->DrawText (BigFont, CR_UNTRANSLATED, 74, 16, GStrings("MNU_CHOOSESKILL"), DTA_Clean, true, TAG_DONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2141,31 +2133,30 @@ static void M_PlayerSetupDrawer ()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw title
|
// Draw title
|
||||||
const char * text = GStrings("MNU_PLAYERSETUP");
|
const char *text = GStrings("MNU_PLAYERSETUP");
|
||||||
screen->DrawText (gameinfo.gametype & GAME_DoomChex ? CR_RED : CR_UNTRANSLATED,
|
screen->DrawText (BigFont, gameinfo.gametype & GAME_DoomChex ? CR_RED : CR_UNTRANSLATED,
|
||||||
160 - BigFont->StringWidth (text)/2,
|
160 - BigFont->StringWidth (text)/2,
|
||||||
15,
|
15,
|
||||||
text, DTA_Clean, true, TAG_DONE);
|
text, DTA_Clean, true, TAG_DONE);
|
||||||
|
|
||||||
screen->SetFont (SmallFont);
|
|
||||||
|
|
||||||
// Draw player name box
|
// Draw player name box
|
||||||
screen->DrawText (label, PSetupDef.x, PSetupDef.y+yo, "Name", DTA_Clean, true, TAG_DONE);
|
screen->DrawText (SmallFont, label, PSetupDef.x, PSetupDef.y+yo, "Name", DTA_Clean, true, TAG_DONE);
|
||||||
M_DrawSaveLoadBorder (PSetupDef.x + 56, PSetupDef.y, MAXPLAYERNAME+1);
|
M_DrawSaveLoadBorder (PSetupDef.x + 56, PSetupDef.y, MAXPLAYERNAME+1);
|
||||||
screen->DrawText (CR_UNTRANSLATED, PSetupDef.x + 56 + xo, PSetupDef.y+yo, savegamestring,
|
screen->DrawText (SmallFont, CR_UNTRANSLATED, PSetupDef.x + 56 + xo, PSetupDef.y+yo, savegamestring,
|
||||||
DTA_Clean, true, TAG_DONE);
|
DTA_Clean, true, TAG_DONE);
|
||||||
|
|
||||||
// Draw cursor for player name box
|
// Draw cursor for player name box
|
||||||
if (genStringEnter)
|
if (genStringEnter)
|
||||||
screen->DrawText (CR_UNTRANSLATED,
|
screen->DrawText (SmallFont, CR_UNTRANSLATED,
|
||||||
PSetupDef.x + SmallFont->StringWidth(savegamestring) + 56+xo,
|
PSetupDef.x + SmallFont->StringWidth(savegamestring) + 56+xo,
|
||||||
PSetupDef.y + yo, underscore, DTA_Clean, true, TAG_DONE);
|
PSetupDef.y + yo, underscore, DTA_Clean, true, TAG_DONE);
|
||||||
|
|
||||||
// Draw player team setting
|
// Draw player team setting
|
||||||
x = SmallFont->StringWidth ("Team") + 8 + PSetupDef.x;
|
x = SmallFont->StringWidth ("Team") + 8 + PSetupDef.x;
|
||||||
screen->DrawText (label, PSetupDef.x, PSetupDef.y + LINEHEIGHT+yo, "Team",
|
screen->DrawText (SmallFont, label, PSetupDef.x, PSetupDef.y + LINEHEIGHT+yo, "Team",
|
||||||
DTA_Clean, true, TAG_DONE);
|
DTA_Clean, true, TAG_DONE);
|
||||||
screen->DrawText (value, x, PSetupDef.y + LINEHEIGHT+yo,
|
screen->DrawText (SmallFont, value, x, PSetupDef.y + LINEHEIGHT+yo,
|
||||||
!TEAMINFO_IsValidTeam (players[consoleplayer].userinfo.team) ? "None" :
|
!TEAMINFO_IsValidTeam (players[consoleplayer].userinfo.team) ? "None" :
|
||||||
teams[players[consoleplayer].userinfo.team].name,
|
teams[players[consoleplayer].userinfo.team].name,
|
||||||
DTA_Clean, true, TAG_DONE);
|
DTA_Clean, true, TAG_DONE);
|
||||||
|
@ -2231,12 +2222,12 @@ static void M_PlayerSetupDrawer ()
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *str = "PRESS " TEXTCOLOR_WHITE "SPACE";
|
const char *str = "PRESS " TEXTCOLOR_WHITE "SPACE";
|
||||||
screen->DrawText (CR_GOLD, 320 - 52 - 32 -
|
screen->DrawText (SmallFont, CR_GOLD, 320 - 52 - 32 -
|
||||||
SmallFont->StringWidth (str)/2,
|
SmallFont->StringWidth (str)/2,
|
||||||
PSetupDef.y + LINEHEIGHT*3 + 76, str,
|
PSetupDef.y + LINEHEIGHT*3 + 76, str,
|
||||||
DTA_Clean, true, TAG_DONE);
|
DTA_Clean, true, TAG_DONE);
|
||||||
str = PlayerRotation ? "TO SEE FRONT" : "TO SEE BACK";
|
str = PlayerRotation ? "TO SEE FRONT" : "TO SEE BACK";
|
||||||
screen->DrawText (CR_GOLD, 320 - 52 - 32 -
|
screen->DrawText (SmallFont, CR_GOLD, 320 - 52 - 32 -
|
||||||
SmallFont->StringWidth (str)/2,
|
SmallFont->StringWidth (str)/2,
|
||||||
PSetupDef.y + LINEHEIGHT*3 + 76 + SmallFont->GetHeight (), str,
|
PSetupDef.y + LINEHEIGHT*3 + 76 + SmallFont->GetHeight (), str,
|
||||||
DTA_Clean, true, TAG_DONE);
|
DTA_Clean, true, TAG_DONE);
|
||||||
|
@ -2245,9 +2236,9 @@ static void M_PlayerSetupDrawer ()
|
||||||
// Draw player color sliders
|
// Draw player color sliders
|
||||||
//V_DrawTextCleanMove (CR_GREY, PSetupDef.x, PSetupDef.y + LINEHEIGHT, "Color");
|
//V_DrawTextCleanMove (CR_GREY, PSetupDef.x, PSetupDef.y + LINEHEIGHT, "Color");
|
||||||
|
|
||||||
screen->DrawText (label, PSetupDef.x, PSetupDef.y + LINEHEIGHT*2+yo, "Red", DTA_Clean, true, TAG_DONE);
|
screen->DrawText (SmallFont, label, PSetupDef.x, PSetupDef.y + LINEHEIGHT*2+yo, "Red", DTA_Clean, true, TAG_DONE);
|
||||||
screen->DrawText (label, PSetupDef.x, PSetupDef.y + LINEHEIGHT*3+yo, "Green", DTA_Clean, true, TAG_DONE);
|
screen->DrawText (SmallFont, label, PSetupDef.x, PSetupDef.y + LINEHEIGHT*3+yo, "Green", DTA_Clean, true, TAG_DONE);
|
||||||
screen->DrawText (label, PSetupDef.x, PSetupDef.y + LINEHEIGHT*4+yo, "Blue", DTA_Clean, true, TAG_DONE);
|
screen->DrawText (SmallFont, label, PSetupDef.x, PSetupDef.y + LINEHEIGHT*4+yo, "Blue", DTA_Clean, true, TAG_DONE);
|
||||||
|
|
||||||
x = SmallFont->StringWidth ("Green") + 8 + PSetupDef.x;
|
x = SmallFont->StringWidth ("Green") + 8 + PSetupDef.x;
|
||||||
color = players[consoleplayer].userinfo.color;
|
color = players[consoleplayer].userinfo.color;
|
||||||
|
@ -2259,35 +2250,35 @@ static void M_PlayerSetupDrawer ()
|
||||||
// [GRB] Draw class setting
|
// [GRB] Draw class setting
|
||||||
int pclass = players[consoleplayer].userinfo.PlayerClass;
|
int pclass = players[consoleplayer].userinfo.PlayerClass;
|
||||||
x = SmallFont->StringWidth ("Class") + 8 + PSetupDef.x;
|
x = SmallFont->StringWidth ("Class") + 8 + PSetupDef.x;
|
||||||
screen->DrawText (label, PSetupDef.x, PSetupDef.y + LINEHEIGHT*5+yo, "Class", DTA_Clean, true, TAG_DONE);
|
screen->DrawText (SmallFont, label, PSetupDef.x, PSetupDef.y + LINEHEIGHT*5+yo, "Class", DTA_Clean, true, TAG_DONE);
|
||||||
screen->DrawText (value, x, PSetupDef.y + LINEHEIGHT*5+yo,
|
screen->DrawText (SmallFont, value, x, PSetupDef.y + LINEHEIGHT*5+yo,
|
||||||
pclass == -1 ? "Random" : PlayerClasses[pclass].Type->Meta.GetMetaString (APMETA_DisplayName),
|
pclass == -1 ? "Random" : PlayerClasses[pclass].Type->Meta.GetMetaString (APMETA_DisplayName),
|
||||||
DTA_Clean, true, TAG_DONE);
|
DTA_Clean, true, TAG_DONE);
|
||||||
|
|
||||||
// Draw skin setting
|
// Draw skin setting
|
||||||
x = SmallFont->StringWidth ("Skin") + 8 + PSetupDef.x;
|
x = SmallFont->StringWidth ("Skin") + 8 + PSetupDef.x;
|
||||||
screen->DrawText (label, PSetupDef.x, PSetupDef.y + LINEHEIGHT*6+yo, "Skin", DTA_Clean, true, TAG_DONE);
|
screen->DrawText (SmallFont, label, PSetupDef.x, PSetupDef.y + LINEHEIGHT*6+yo, "Skin", DTA_Clean, true, TAG_DONE);
|
||||||
if (GetDefaultByType (PlayerClass->Type)->flags4 & MF4_NOSKIN ||
|
if (GetDefaultByType (PlayerClass->Type)->flags4 & MF4_NOSKIN ||
|
||||||
players[consoleplayer].userinfo.PlayerClass == -1)
|
players[consoleplayer].userinfo.PlayerClass == -1)
|
||||||
{
|
{
|
||||||
screen->DrawText (value, x, PSetupDef.y + LINEHEIGHT*6+yo, "Base", DTA_Clean, true, TAG_DONE);
|
screen->DrawText (SmallFont, value, x, PSetupDef.y + LINEHEIGHT*6+yo, "Base", DTA_Clean, true, TAG_DONE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
screen->DrawText (value, x, PSetupDef.y + LINEHEIGHT*6+yo,
|
screen->DrawText (SmallFont, value, x, PSetupDef.y + LINEHEIGHT*6+yo,
|
||||||
skins[PlayerSkin].name, DTA_Clean, true, TAG_DONE);
|
skins[PlayerSkin].name, DTA_Clean, true, TAG_DONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw gender setting
|
// Draw gender setting
|
||||||
x = SmallFont->StringWidth ("Gender") + 8 + PSetupDef.x;
|
x = SmallFont->StringWidth ("Gender") + 8 + PSetupDef.x;
|
||||||
screen->DrawText (label, PSetupDef.x, PSetupDef.y + LINEHEIGHT*7+yo, "Gender", DTA_Clean, true, TAG_DONE);
|
screen->DrawText (SmallFont, label, PSetupDef.x, PSetupDef.y + LINEHEIGHT*7+yo, "Gender", DTA_Clean, true, TAG_DONE);
|
||||||
screen->DrawText (value, x, PSetupDef.y + LINEHEIGHT*7+yo,
|
screen->DrawText (SmallFont, value, x, PSetupDef.y + LINEHEIGHT*7+yo,
|
||||||
genders[players[consoleplayer].userinfo.gender], DTA_Clean, true, TAG_DONE);
|
genders[players[consoleplayer].userinfo.gender], DTA_Clean, true, TAG_DONE);
|
||||||
|
|
||||||
// Draw autoaim setting
|
// Draw autoaim setting
|
||||||
x = SmallFont->StringWidth ("Autoaim") + 8 + PSetupDef.x;
|
x = SmallFont->StringWidth ("Autoaim") + 8 + PSetupDef.x;
|
||||||
screen->DrawText (label, PSetupDef.x, PSetupDef.y + LINEHEIGHT*8+yo, "Autoaim", DTA_Clean, true, TAG_DONE);
|
screen->DrawText (SmallFont, label, PSetupDef.x, PSetupDef.y + LINEHEIGHT*8+yo, "Autoaim", DTA_Clean, true, TAG_DONE);
|
||||||
screen->DrawText (value, x, PSetupDef.y + LINEHEIGHT*8+yo,
|
screen->DrawText (SmallFont, value, x, PSetupDef.y + LINEHEIGHT*8+yo,
|
||||||
autoaim == 0 ? "Never" :
|
autoaim == 0 ? "Never" :
|
||||||
autoaim <= 0.25 ? "Very Low" :
|
autoaim <= 0.25 ? "Very Low" :
|
||||||
autoaim <= 0.5 ? "Low" :
|
autoaim <= 0.5 ? "Low" :
|
||||||
|
@ -2762,10 +2753,10 @@ void M_StartMessage (const char *string, void (*routine)(int), bool input)
|
||||||
//
|
//
|
||||||
// Find string height from hu_font chars
|
// Find string height from hu_font chars
|
||||||
//
|
//
|
||||||
int M_StringHeight (const char *string)
|
int M_StringHeight (FFont *font, const char *string)
|
||||||
{
|
{
|
||||||
int h;
|
int h;
|
||||||
int height = screen->Font->GetHeight ();
|
int height = font->GetHeight ();
|
||||||
|
|
||||||
h = height;
|
h = height;
|
||||||
while (*string)
|
while (*string)
|
||||||
|
@ -3036,7 +3027,7 @@ bool M_SaveLoadResponder (event_t *ev)
|
||||||
{
|
{
|
||||||
V_FreeBrokenLines (SaveComment);
|
V_FreeBrokenLines (SaveComment);
|
||||||
}
|
}
|
||||||
SaveComment = V_BreakLines (screen->Font, 216*screen->GetWidth()/640/CleanXfac, workbuf);
|
SaveComment = V_BreakLines (SmallFont, 216*screen->GetWidth()/640/CleanXfac, workbuf);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -3218,17 +3209,17 @@ void M_Drawer ()
|
||||||
BorderNeedRefresh = screen->GetPageCount ();
|
BorderNeedRefresh = screen->GetPageCount ();
|
||||||
SB_state = screen->GetPageCount ();
|
SB_state = screen->GetPageCount ();
|
||||||
|
|
||||||
FBrokenLines *lines = V_BreakLines (screen->Font, 320, messageString);
|
FBrokenLines *lines = V_BreakLines (SmallFont, 320, messageString);
|
||||||
y = 100;
|
y = 100;
|
||||||
|
|
||||||
for (i = 0; lines[i].Width >= 0; i++)
|
for (i = 0; lines[i].Width >= 0; i++)
|
||||||
y -= screen->Font->GetHeight () / 2;
|
y -= SmallFont->GetHeight () / 2;
|
||||||
|
|
||||||
for (i = 0; lines[i].Width >= 0; i++)
|
for (i = 0; lines[i].Width >= 0; i++)
|
||||||
{
|
{
|
||||||
screen->DrawText (CR_UNTRANSLATED, 160 - lines[i].Width/2, y, lines[i].Text,
|
screen->DrawText (SmallFont, CR_UNTRANSLATED, 160 - lines[i].Width/2, y, lines[i].Text,
|
||||||
DTA_Clean, true, TAG_DONE);
|
DTA_Clean, true, TAG_DONE);
|
||||||
y += screen->Font->GetHeight ();
|
y += SmallFont->GetHeight ();
|
||||||
}
|
}
|
||||||
|
|
||||||
V_FreeBrokenLines (lines);
|
V_FreeBrokenLines (lines);
|
||||||
|
@ -3242,8 +3233,8 @@ void M_Drawer ()
|
||||||
// For Heretic shareware message:
|
// For Heretic shareware message:
|
||||||
if (showSharewareMessage)
|
if (showSharewareMessage)
|
||||||
{
|
{
|
||||||
const char * text = GStrings("MNU_ONLYREGISTERED");
|
const char *text = GStrings("MNU_ONLYREGISTERED");
|
||||||
screen->DrawText (CR_WHITE, 160 - SmallFont->StringWidth(text)/2,
|
screen->DrawText (SmallFont, CR_WHITE, 160 - SmallFont->StringWidth(text)/2,
|
||||||
8, text, DTA_Clean, true, TAG_DONE);
|
8, text, DTA_Clean, true, TAG_DONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3256,7 +3247,6 @@ void M_Drawer ()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
screen->SetFont (BigFont);
|
|
||||||
if (currentMenu->routine)
|
if (currentMenu->routine)
|
||||||
currentMenu->routine(); // call Draw routine
|
currentMenu->routine(); // call Draw routine
|
||||||
|
|
||||||
|
@ -3282,7 +3272,7 @@ void M_Drawer ()
|
||||||
}
|
}
|
||||||
const char *text = currentMenu->menuitems[i].name;
|
const char *text = currentMenu->menuitems[i].name;
|
||||||
if (*text == '$') text = GStrings(text+1);
|
if (*text == '$') text = GStrings(text+1);
|
||||||
screen->DrawText (color, x, y, text,
|
screen->DrawText (BigFont, color, x, y, text,
|
||||||
DTA_Clean, true, TAG_DONE);
|
DTA_Clean, true, TAG_DONE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -3293,7 +3283,6 @@ void M_Drawer ()
|
||||||
}
|
}
|
||||||
y += LINEHEIGHT;
|
y += LINEHEIGHT;
|
||||||
}
|
}
|
||||||
screen->SetFont (SmallFont);
|
|
||||||
|
|
||||||
// DRAW CURSOR
|
// DRAW CURSOR
|
||||||
if (drawSkull)
|
if (drawSkull)
|
||||||
|
@ -3303,12 +3292,10 @@ void M_Drawer ()
|
||||||
// [RH] Use options menu cursor for the player setup menu.
|
// [RH] Use options menu cursor for the player setup menu.
|
||||||
if (skullAnimCounter < 6)
|
if (skullAnimCounter < 6)
|
||||||
{
|
{
|
||||||
screen->SetFont (ConFont);
|
screen->DrawText (ConFont, CR_RED, x - 16,
|
||||||
screen->DrawText (CR_RED, x - 16,
|
|
||||||
currentMenu->y + itemOn*LINEHEIGHT +
|
currentMenu->y + itemOn*LINEHEIGHT +
|
||||||
(!(gameinfo.gametype & (GAME_DoomStrifeChex)) ? 6 : -1), "\xd",
|
(!(gameinfo.gametype & (GAME_DoomStrifeChex)) ? 6 : -1), "\xd",
|
||||||
DTA_Clean, true, TAG_DONE);
|
DTA_Clean, true, TAG_DONE);
|
||||||
screen->SetFont (SmallFont);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (gameinfo.gametype & GAME_DoomChex)
|
else if (gameinfo.gametype & GAME_DoomChex)
|
||||||
|
|
|
@ -1482,14 +1482,12 @@ static void M_DrawConText (int color, int x, int y, const char *str)
|
||||||
{
|
{
|
||||||
int len = (int)strlen(str);
|
int len = (int)strlen(str);
|
||||||
|
|
||||||
screen->SetFont (ConFont);
|
|
||||||
x = (x - 160) * CleanXfac + screen->GetWidth() / 2;
|
x = (x - 160) * CleanXfac + screen->GetWidth() / 2;
|
||||||
y = (y - 100) * CleanYfac + screen->GetHeight() / 2;
|
y = (y - 100) * CleanYfac + screen->GetHeight() / 2;
|
||||||
screen->DrawText (color, x, y, str,
|
screen->DrawText (ConFont, color, x, y, str,
|
||||||
DTA_CellX, 8 * CleanXfac,
|
DTA_CellX, 8 * CleanXfac,
|
||||||
DTA_CellY, 8 * CleanYfac,
|
DTA_CellY, 8 * CleanYfac,
|
||||||
TAG_DONE);
|
TAG_DONE);
|
||||||
screen->SetFont (SmallFont);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void M_BuildKeyList (menuitem_t *item, int numitems)
|
void M_BuildKeyList (menuitem_t *item, int numitems)
|
||||||
|
@ -1660,11 +1658,9 @@ void M_OptDrawer ()
|
||||||
{
|
{
|
||||||
if (BigFont && CurrentMenu->texttitle)
|
if (BigFont && CurrentMenu->texttitle)
|
||||||
{
|
{
|
||||||
screen->SetFont (BigFont);
|
screen->DrawText (BigFont, gameinfo.gametype & GAME_DoomChex ? CR_RED : CR_UNTRANSLATED,
|
||||||
screen->DrawText (gameinfo.gametype & GAME_DoomChex ? CR_RED : CR_UNTRANSLATED,
|
|
||||||
160-BigFont->StringWidth (CurrentMenu->texttitle)/2, 10,
|
160-BigFont->StringWidth (CurrentMenu->texttitle)/2, 10,
|
||||||
CurrentMenu->texttitle, DTA_Clean, true, TAG_DONE);
|
CurrentMenu->texttitle, DTA_Clean, true, TAG_DONE);
|
||||||
screen->SetFont (SmallFont);
|
|
||||||
y = 15 + BigFont->GetHeight ();
|
y = 15 + BigFont->GetHeight ();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1746,7 +1742,7 @@ void M_OptDrawer ()
|
||||||
? CR_YELLOW : LabelColor;
|
? CR_YELLOW : LabelColor;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
screen->DrawText (color, x, y, item->label, DTA_Clean, true, DTA_ColorOverlay, overlay, TAG_DONE);
|
screen->DrawText (SmallFont, color, x, y, item->label, DTA_Clean, true, DTA_ColorOverlay, overlay, TAG_DONE);
|
||||||
|
|
||||||
switch (item->type)
|
switch (item->type)
|
||||||
{
|
{
|
||||||
|
@ -1757,7 +1753,7 @@ void M_OptDrawer ()
|
||||||
|
|
||||||
mysnprintf (tbuf, countof(tbuf), "%d.", item->b.position);
|
mysnprintf (tbuf, countof(tbuf), "%d.", item->b.position);
|
||||||
x = CurrentMenu->indent - SmallFont->StringWidth (tbuf);
|
x = CurrentMenu->indent - SmallFont->StringWidth (tbuf);
|
||||||
screen->DrawText (CR_GREY, x, y, tbuf, DTA_Clean, true, TAG_DONE);
|
screen->DrawText (SmallFont, CR_GREY, x, y, tbuf, DTA_Clean, true, TAG_DONE);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1773,12 +1769,12 @@ void M_OptDrawer ()
|
||||||
|
|
||||||
if (v == vals)
|
if (v == vals)
|
||||||
{
|
{
|
||||||
screen->DrawText (ValueColor, CurrentMenu->indent + 14, y, "Unknown",
|
screen->DrawText (SmallFont, ValueColor, CurrentMenu->indent + 14, y, "Unknown",
|
||||||
DTA_Clean, true, TAG_DONE);
|
DTA_Clean, true, TAG_DONE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
screen->DrawText (item->type == cdiscrete ? v : ValueColor,
|
screen->DrawText (SmallFont, item->type == cdiscrete ? v : ValueColor,
|
||||||
CurrentMenu->indent + 14, y, item->e.values[v].name,
|
CurrentMenu->indent + 14, y, item->e.values[v].name,
|
||||||
DTA_Clean, true, TAG_DONE);
|
DTA_Clean, true, TAG_DONE);
|
||||||
}
|
}
|
||||||
|
@ -1822,12 +1818,12 @@ void M_OptDrawer ()
|
||||||
|
|
||||||
if (v == vals)
|
if (v == vals)
|
||||||
{
|
{
|
||||||
screen->DrawText (ValueColor, CurrentMenu->indent + 14, y, "Unknown",
|
screen->DrawText (SmallFont, ValueColor, CurrentMenu->indent + 14, y, "Unknown",
|
||||||
DTA_Clean, true, DTA_ColorOverlay, overlay, TAG_DONE);
|
DTA_Clean, true, DTA_ColorOverlay, overlay, TAG_DONE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
screen->DrawText (item->type == cdiscrete ? v : ValueColor,
|
screen->DrawText (SmallFont, item->type == cdiscrete ? v : ValueColor,
|
||||||
CurrentMenu->indent + 14, y,
|
CurrentMenu->indent + 14, y,
|
||||||
item->type != discretes ? item->e.values[v].name : item->e.valuestrings[v].name.GetChars(),
|
item->type != discretes ? item->e.values[v].name : item->e.valuestrings[v].name.GetChars(),
|
||||||
DTA_Clean, true, DTA_ColorOverlay, overlay, TAG_DONE);
|
DTA_Clean, true, DTA_ColorOverlay, overlay, TAG_DONE);
|
||||||
|
@ -1842,7 +1838,7 @@ void M_OptDrawer ()
|
||||||
|
|
||||||
value = item->a.cvar->GetGenericRep (CVAR_String);
|
value = item->a.cvar->GetGenericRep (CVAR_String);
|
||||||
v = M_FindCurVal(value.String, item->e.enumvalues, (int)item->b.numvalues);
|
v = M_FindCurVal(value.String, item->e.enumvalues, (int)item->b.numvalues);
|
||||||
screen->DrawText(ValueColor, CurrentMenu->indent + 14, y, v, DTA_Clean, true, TAG_DONE);
|
screen->DrawText(SmallFont, ValueColor, CurrentMenu->indent + 14, y, v, DTA_Clean, true, TAG_DONE);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1856,11 +1852,11 @@ void M_OptDrawer ()
|
||||||
if (v == vals)
|
if (v == vals)
|
||||||
{
|
{
|
||||||
UCVarValue val = item->a.guidcvar->GetGenericRep (CVAR_String);
|
UCVarValue val = item->a.guidcvar->GetGenericRep (CVAR_String);
|
||||||
screen->DrawText (ValueColor, CurrentMenu->indent + 14, y, val.String, DTA_Clean, true, TAG_DONE);
|
screen->DrawText (SmallFont, ValueColor, CurrentMenu->indent + 14, y, val.String, DTA_Clean, true, TAG_DONE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
screen->DrawText (ValueColor, CurrentMenu->indent + 14, y, item->e.guidvalues[v].Name,
|
screen->DrawText (SmallFont, ValueColor, CurrentMenu->indent + 14, y, item->e.guidvalues[v].Name,
|
||||||
DTA_Clean, true, TAG_DONE);
|
DTA_Clean, true, TAG_DONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1868,7 +1864,7 @@ void M_OptDrawer ()
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case nochoice:
|
case nochoice:
|
||||||
screen->DrawText (CR_GOLD, CurrentMenu->indent + 14, y,
|
screen->DrawText (SmallFont, CR_GOLD, CurrentMenu->indent + 14, y,
|
||||||
(item->e.values[(int)item->b.min]).name, DTA_Clean, true, TAG_DONE);
|
(item->e.values[(int)item->b.min]).name, DTA_Clean, true, TAG_DONE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1897,7 +1893,7 @@ void M_OptDrawer ()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
screen->DrawText(CR_BLACK, CurrentMenu->indent + 14, y + labelofs, "---",
|
screen->DrawText(SmallFont, CR_BLACK, CurrentMenu->indent + 14, y + labelofs, "---",
|
||||||
DTA_Clean, true, TAG_DONE);
|
DTA_Clean, true, TAG_DONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1976,7 +1972,7 @@ void M_OptDrawer ()
|
||||||
str = "???";
|
str = "???";
|
||||||
}
|
}
|
||||||
|
|
||||||
screen->DrawText (ValueColor,
|
screen->DrawText (SmallFont, ValueColor,
|
||||||
CurrentMenu->indent + 14, y, str, DTA_Clean, true, TAG_DONE);
|
CurrentMenu->indent + 14, y, str, DTA_Clean, true, TAG_DONE);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -2011,7 +2007,7 @@ void M_OptDrawer ()
|
||||||
else
|
else
|
||||||
color = CR_BRICK; //LabelColor;
|
color = CR_BRICK; //LabelColor;
|
||||||
|
|
||||||
screen->DrawText (color, 104 * x + 20, y, str, DTA_Clean, true, TAG_DONE);
|
screen->DrawText (SmallFont, color, 104 * x + 20, y, str, DTA_Clean, true, TAG_DONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2054,7 +2050,7 @@ void M_OptDrawer ()
|
||||||
fillptr += mysnprintf (fillptr, countof(flagsblah) - (fillptr - flagsblah), "%s = %d", vars[i]->GetName (), **vars[i]);
|
fillptr += mysnprintf (fillptr, countof(flagsblah) - (fillptr - flagsblah), "%s = %d", vars[i]->GetName (), **vars[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
screen->DrawText (ValueColor,
|
screen->DrawText (SmallFont, ValueColor,
|
||||||
160 - (SmallFont->StringWidth (flagsblah) >> 1), 0, flagsblah,
|
160 - (SmallFont->StringWidth (flagsblah) >> 1), 0, flagsblah,
|
||||||
DTA_Clean, true, TAG_DONE);
|
DTA_Clean, true, TAG_DONE);
|
||||||
}
|
}
|
||||||
|
@ -2831,9 +2827,9 @@ static void ColorPickerDrawer ()
|
||||||
screen->Clear (x + 48*CleanXfac, y, x + 48*2*CleanXfac, y + 48*CleanYfac, -1, newColor);
|
screen->Clear (x + 48*CleanXfac, y, x + 48*2*CleanXfac, y + 48*CleanYfac, -1, newColor);
|
||||||
|
|
||||||
y += 49*CleanYfac;
|
y += 49*CleanYfac;
|
||||||
screen->DrawText (CR_GRAY, x+(24-SmallFont->StringWidth("Old")/2)*CleanXfac, y,
|
screen->DrawText (SmallFont, CR_GRAY, x+(24-SmallFont->StringWidth("Old")/2)*CleanXfac, y,
|
||||||
"Old", DTA_CleanNoMove, true, TAG_DONE);
|
"Old", DTA_CleanNoMove, true, TAG_DONE);
|
||||||
screen->DrawText (CR_WHITE, x+(48+24-SmallFont->StringWidth("New")/2)*CleanXfac, y,
|
screen->DrawText (SmallFont, CR_WHITE, x+(48+24-SmallFont->StringWidth("New")/2)*CleanXfac, y,
|
||||||
"New", DTA_CleanNoMove, true, TAG_DONE);
|
"New", DTA_CleanNoMove, true, TAG_DONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2154,10 +2154,6 @@ void DLevelScript::DoSetFont (int fontnum)
|
||||||
{
|
{
|
||||||
activefont = SmallFont;
|
activefont = SmallFont;
|
||||||
}
|
}
|
||||||
if (screen != NULL)
|
|
||||||
{
|
|
||||||
screen->SetFont (activefont);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define APROP_Health 0
|
#define APROP_Health 0
|
||||||
|
@ -2536,11 +2532,6 @@ int DLevelScript::RunScript ()
|
||||||
int optstart = -1;
|
int optstart = -1;
|
||||||
int temp;
|
int temp;
|
||||||
|
|
||||||
if (screen != NULL)
|
|
||||||
{
|
|
||||||
screen->SetFont (activefont);
|
|
||||||
}
|
|
||||||
|
|
||||||
while (state == SCRIPT_Running)
|
while (state == SCRIPT_Running)
|
||||||
{
|
{
|
||||||
if (++runaway > 500000)
|
if (++runaway > 500000)
|
||||||
|
@ -4009,7 +4000,7 @@ int DLevelScript::RunScript ()
|
||||||
if (pcd == PCD_ENDPRINTBOLD || screen == NULL ||
|
if (pcd == PCD_ENDPRINTBOLD || screen == NULL ||
|
||||||
screen->CheckLocalView (consoleplayer))
|
screen->CheckLocalView (consoleplayer))
|
||||||
{
|
{
|
||||||
C_MidPrint (work);
|
C_MidPrint (activefont, work);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -4060,26 +4051,26 @@ int DLevelScript::RunScript ()
|
||||||
switch (type & 0xFFFF)
|
switch (type & 0xFFFF)
|
||||||
{
|
{
|
||||||
default: // normal
|
default: // normal
|
||||||
msg = new DHUDMessage (work, x, y, hudwidth, hudheight, color, holdTime);
|
msg = new DHUDMessage (activefont, work, x, y, hudwidth, hudheight, color, holdTime);
|
||||||
break;
|
break;
|
||||||
case 1: // fade out
|
case 1: // fade out
|
||||||
{
|
{
|
||||||
float fadeTime = (optstart < sp) ? FIXED2FLOAT(Stack[optstart]) : 0.5f;
|
float fadeTime = (optstart < sp) ? FIXED2FLOAT(Stack[optstart]) : 0.5f;
|
||||||
msg = new DHUDMessageFadeOut (work, x, y, hudwidth, hudheight, color, holdTime, fadeTime);
|
msg = new DHUDMessageFadeOut (activefont, work, x, y, hudwidth, hudheight, color, holdTime, fadeTime);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2: // type on, then fade out
|
case 2: // type on, then fade out
|
||||||
{
|
{
|
||||||
float typeTime = (optstart < sp) ? FIXED2FLOAT(Stack[optstart]) : 0.05f;
|
float typeTime = (optstart < sp) ? FIXED2FLOAT(Stack[optstart]) : 0.05f;
|
||||||
float fadeTime = (optstart < sp-1) ? FIXED2FLOAT(Stack[optstart+1]) : 0.5f;
|
float fadeTime = (optstart < sp-1) ? FIXED2FLOAT(Stack[optstart+1]) : 0.5f;
|
||||||
msg = new DHUDMessageTypeOnFadeOut (work, x, y, hudwidth, hudheight, color, typeTime, holdTime, fadeTime);
|
msg = new DHUDMessageTypeOnFadeOut (activefont, work, x, y, hudwidth, hudheight, color, typeTime, holdTime, fadeTime);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3: // fade in, then fade out
|
case 3: // fade in, then fade out
|
||||||
{
|
{
|
||||||
float inTime = (optstart < sp) ? FIXED2FLOAT(Stack[optstart]) : 0.5f;
|
float inTime = (optstart < sp) ? FIXED2FLOAT(Stack[optstart]) : 0.5f;
|
||||||
float outTime = (optstart < sp-1) ? FIXED2FLOAT(Stack[optstart+1]) : 0.5f;
|
float outTime = (optstart < sp-1) ? FIXED2FLOAT(Stack[optstart+1]) : 0.5f;
|
||||||
msg = new DHUDMessageFadeInOut (work, x, y, hudwidth, hudheight, color, holdTime, inTime, outTime);
|
msg = new DHUDMessageFadeInOut (activefont, work, x, y, hudwidth, hudheight, color, holdTime, inTime, outTime);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -5582,10 +5573,6 @@ int DLevelScript::RunScript ()
|
||||||
this->pc = pc;
|
this->pc = pc;
|
||||||
assert (sp == 0);
|
assert (sp == 0);
|
||||||
}
|
}
|
||||||
if (screen != NULL)
|
|
||||||
{
|
|
||||||
screen->SetFont (SmallFont);
|
|
||||||
}
|
|
||||||
return resultValue;
|
return resultValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -740,7 +740,7 @@ void P_StartConversation (AActor *npc, AActor *pc, bool facetalker, bool saveang
|
||||||
toSay = GStrings[dlgtext.GetChars()];
|
toSay = GStrings[dlgtext.GetChars()];
|
||||||
if (toSay==NULL) toSay = "Go away!"; // Ok, it's lame - but it doesn't look like an error to the player. ;)
|
if (toSay==NULL) toSay = "Go away!"; // Ok, it's lame - but it doesn't look like an error to the player. ;)
|
||||||
}
|
}
|
||||||
DialogueLines = V_BreakLines (screen->Font, screen->GetWidth()/CleanXfac-24*2, toSay);
|
DialogueLines = V_BreakLines (SmallFont, screen->GetWidth()/CleanXfac-24*2, toSay);
|
||||||
|
|
||||||
// Fill out the possible choices
|
// Fill out the possible choices
|
||||||
ShowGold = false;
|
ShowGold = false;
|
||||||
|
@ -753,7 +753,7 @@ void P_StartConversation (AActor *npc, AActor *pc, bool facetalker, bool saveang
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
ShowGold |= reply->NeedsGold;
|
ShowGold |= reply->NeedsGold;
|
||||||
reply->ReplyLines = V_BreakLines (screen->Font, 320-50-10, reply->Reply);
|
reply->ReplyLines = V_BreakLines (SmallFont, 320-50-10, reply->Reply);
|
||||||
for (j = 0; reply->ReplyLines[j].Width >= 0; ++j)
|
for (j = 0; reply->ReplyLines[j].Width >= 0; ++j)
|
||||||
{
|
{
|
||||||
item.label = reply->ReplyLines[j].Text.LockBuffer();
|
item.label = reply->ReplyLines[j].Text.LockBuffer();
|
||||||
|
@ -895,14 +895,14 @@ static void DrawConversationMenu ()
|
||||||
|
|
||||||
if (speakerName != NULL)
|
if (speakerName != NULL)
|
||||||
{
|
{
|
||||||
screen->DrawText (CR_WHITE, x, y, speakerName,
|
screen->DrawText (SmallFont, CR_WHITE, x, y, speakerName,
|
||||||
DTA_CleanNoMove, true, TAG_DONE);
|
DTA_CleanNoMove, true, TAG_DONE);
|
||||||
y += linesize * 3 / 2;
|
y += linesize * 3 / 2;
|
||||||
}
|
}
|
||||||
x = 24 * screen->GetWidth() / 320;
|
x = 24 * screen->GetWidth() / 320;
|
||||||
for (i = 0; DialogueLines[i].Width >= 0; ++i)
|
for (i = 0; DialogueLines[i].Width >= 0; ++i)
|
||||||
{
|
{
|
||||||
screen->DrawText (CR_UNTRANSLATED, x, y, DialogueLines[i].Text,
|
screen->DrawText (SmallFont, CR_UNTRANSLATED, x, y, DialogueLines[i].Text,
|
||||||
DTA_CleanNoMove, true, TAG_DONE);
|
DTA_CleanNoMove, true, TAG_DONE);
|
||||||
y += linesize;
|
y += linesize;
|
||||||
}
|
}
|
||||||
|
@ -913,12 +913,12 @@ static void DrawConversationMenu ()
|
||||||
char goldstr[32];
|
char goldstr[32];
|
||||||
|
|
||||||
mysnprintf (goldstr, countof(goldstr), "%d", coin != NULL ? coin->Amount : 0);
|
mysnprintf (goldstr, countof(goldstr), "%d", coin != NULL ? coin->Amount : 0);
|
||||||
screen->DrawText (CR_GRAY, 21, 191, goldstr, DTA_320x200, true,
|
screen->DrawText (SmallFont, CR_GRAY, 21, 191, goldstr, DTA_320x200, true,
|
||||||
DTA_FillColor, 0, DTA_Alpha, HR_SHADOW, TAG_DONE);
|
DTA_FillColor, 0, DTA_Alpha, HR_SHADOW, TAG_DONE);
|
||||||
screen->DrawTexture (TexMan(((AInventory *)GetDefaultByType (RUNTIME_CLASS(ACoin)))->Icon),
|
screen->DrawTexture (TexMan(((AInventory *)GetDefaultByType (RUNTIME_CLASS(ACoin)))->Icon),
|
||||||
3, 190, DTA_320x200, true,
|
3, 190, DTA_320x200, true,
|
||||||
DTA_FillColor, 0, DTA_Alpha, HR_SHADOW, TAG_DONE);
|
DTA_FillColor, 0, DTA_Alpha, HR_SHADOW, TAG_DONE);
|
||||||
screen->DrawText (CR_GRAY, 20, 190, goldstr, DTA_320x200, true, TAG_DONE);
|
screen->DrawText (SmallFont, CR_GRAY, 20, 190, goldstr, DTA_320x200, true, TAG_DONE);
|
||||||
screen->DrawTexture (TexMan(((AInventory *)GetDefaultByType (RUNTIME_CLASS(ACoin)))->Icon),
|
screen->DrawTexture (TexMan(((AInventory *)GetDefaultByType (RUNTIME_CLASS(ACoin)))->Icon),
|
||||||
2, 189, DTA_320x200, true, TAG_DONE);
|
2, 189, DTA_320x200, true, TAG_DONE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -452,7 +452,7 @@ void AActor::Die (AActor *source, AActor *inflictor)
|
||||||
SexMessage (GStrings("SPREEKILLSELF"), buff,
|
SexMessage (GStrings("SPREEKILLSELF"), buff,
|
||||||
player->userinfo.gender, player->userinfo.netname,
|
player->userinfo.gender, player->userinfo.netname,
|
||||||
player->userinfo.netname);
|
player->userinfo.netname);
|
||||||
StatusBar->AttachMessage (new DHUDMessageFadeOut (buff,
|
StatusBar->AttachMessage (new DHUDMessageFadeOut (SmallFont, buff,
|
||||||
1.5f, 0.2f, 0, 0, CR_WHITE, 3.f, 0.5f), MAKE_ID('K','S','P','R'));
|
1.5f, 0.2f, 0, 0, CR_WHITE, 3.f, 0.5f), MAKE_ID('K','S','P','R'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -500,7 +500,7 @@ void AActor::Die (AActor *source, AActor *inflictor)
|
||||||
{
|
{
|
||||||
SexMessage (GStrings("SPREEOVER"), buff, player->userinfo.gender,
|
SexMessage (GStrings("SPREEOVER"), buff, player->userinfo.gender,
|
||||||
player->userinfo.netname, source->player->userinfo.netname);
|
player->userinfo.netname, source->player->userinfo.netname);
|
||||||
StatusBar->AttachMessage (new DHUDMessageFadeOut (buff,
|
StatusBar->AttachMessage (new DHUDMessageFadeOut (SmallFont, buff,
|
||||||
1.5f, 0.2f, 0, 0, CR_WHITE, 3.f, 0.5f), MAKE_ID('K','S','P','R'));
|
1.5f, 0.2f, 0, 0, CR_WHITE, 3.f, 0.5f), MAKE_ID('K','S','P','R'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -510,7 +510,7 @@ void AActor::Die (AActor *source, AActor *inflictor)
|
||||||
{
|
{
|
||||||
SexMessage (spreemsg, buff, player->userinfo.gender,
|
SexMessage (spreemsg, buff, player->userinfo.gender,
|
||||||
player->userinfo.netname, source->player->userinfo.netname);
|
player->userinfo.netname, source->player->userinfo.netname);
|
||||||
StatusBar->AttachMessage (new DHUDMessageFadeOut (buff,
|
StatusBar->AttachMessage (new DHUDMessageFadeOut (SmallFont, buff,
|
||||||
1.5f, 0.2f, 0, 0, CR_WHITE, 3.f, 0.5f), MAKE_ID('K','S','P','R'));
|
1.5f, 0.2f, 0, 0, CR_WHITE, 3.f, 0.5f), MAKE_ID('K','S','P','R'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -558,7 +558,7 @@ void AActor::Die (AActor *source, AActor *inflictor)
|
||||||
{
|
{
|
||||||
SexMessage (multimsg, buff, player->userinfo.gender,
|
SexMessage (multimsg, buff, player->userinfo.gender,
|
||||||
player->userinfo.netname, source->player->userinfo.netname);
|
player->userinfo.netname, source->player->userinfo.netname);
|
||||||
StatusBar->AttachMessage (new DHUDMessageFadeOut (buff,
|
StatusBar->AttachMessage (new DHUDMessageFadeOut (SmallFont, buff,
|
||||||
1.5f, 0.8f, 0, 0, CR_RED, 3.f, 0.5f), MAKE_ID('M','K','I','L'));
|
1.5f, 0.8f, 0, 0, CR_RED, 3.f, 0.5f), MAKE_ID('M','K','I','L'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3244,7 +3244,7 @@ void P_SetupLevel (char *lumpname, int position)
|
||||||
AActor::ClearTIDHashes ();
|
AActor::ClearTIDHashes ();
|
||||||
|
|
||||||
// [RH] clear out the mid-screen message
|
// [RH] clear out the mid-screen message
|
||||||
C_MidPrint (NULL);
|
C_MidPrint (NULL, NULL);
|
||||||
|
|
||||||
// Free all level data from the previous map
|
// Free all level data from the previous map
|
||||||
P_FreeLevelData ();
|
P_FreeLevelData ();
|
||||||
|
|
|
@ -58,6 +58,7 @@
|
||||||
#include "gi.h"
|
#include "gi.h"
|
||||||
#include "statnums.h"
|
#include "statnums.h"
|
||||||
#include "g_level.h"
|
#include "g_level.h"
|
||||||
|
#include "v_font.h"
|
||||||
|
|
||||||
// State.
|
// State.
|
||||||
#include "r_state.h"
|
#include "r_state.h"
|
||||||
|
@ -544,7 +545,7 @@ void P_PlayerInSpecialSector (player_t *player)
|
||||||
sector->special &= ~SECRET_MASK;
|
sector->special &= ~SECRET_MASK;
|
||||||
if (player->mo->CheckLocalView (consoleplayer))
|
if (player->mo->CheckLocalView (consoleplayer))
|
||||||
{
|
{
|
||||||
C_MidPrint (secretmessage);
|
C_MidPrint (SmallFont, secretmessage);
|
||||||
S_Sound (CHAN_AUTO, "misc/secret", 1, ATTN_NORM);
|
S_Sound (CHAN_AUTO, "misc/secret", 1, ATTN_NORM);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -670,7 +670,7 @@ void drawquad(float x0, float y0, float x1, float y1, float x2, float y2, float
|
||||||
void printnum(int x, int y, int num)
|
void printnum(int x, int y, int num)
|
||||||
{
|
{
|
||||||
char foo[16]; mysnprintf (foo, countof(foo), "%d", num);
|
char foo[16]; mysnprintf (foo, countof(foo), "%d", num);
|
||||||
RenderTarget->DrawText (CR_WHITE, x, y, foo);
|
RenderTarget->DrawText (SmallFont, CR_WHITE, x, y, foo);
|
||||||
}
|
}
|
||||||
|
|
||||||
void drawpolymosttest()
|
void drawpolymosttest()
|
||||||
|
|
|
@ -151,17 +151,17 @@ void S_NoiseDebug (void)
|
||||||
int y, color;
|
int y, color;
|
||||||
|
|
||||||
y = 32 * CleanYfac;
|
y = 32 * CleanYfac;
|
||||||
screen->DrawText (CR_YELLOW, 0, y, "*** SOUND DEBUG INFO ***", TAG_DONE);
|
screen->DrawText (SmallFont, CR_YELLOW, 0, y, "*** SOUND DEBUG INFO ***", TAG_DONE);
|
||||||
y += 8;
|
y += 8;
|
||||||
|
|
||||||
screen->DrawText (CR_GOLD, 0, y, "name", TAG_DONE);
|
screen->DrawText (SmallFont, CR_GOLD, 0, y, "name", TAG_DONE);
|
||||||
screen->DrawText (CR_GOLD, 70, y, "x", TAG_DONE);
|
screen->DrawText (SmallFont, CR_GOLD, 70, y, "x", TAG_DONE);
|
||||||
screen->DrawText (CR_GOLD, 120, y, "y", TAG_DONE);
|
screen->DrawText (SmallFont, CR_GOLD, 120, y, "y", TAG_DONE);
|
||||||
screen->DrawText (CR_GOLD, 170, y, "z", TAG_DONE);
|
screen->DrawText (SmallFont, CR_GOLD, 170, y, "z", TAG_DONE);
|
||||||
screen->DrawText (CR_GOLD, 220, y, "vol", TAG_DONE);
|
screen->DrawText (SmallFont, CR_GOLD, 220, y, "vol", TAG_DONE);
|
||||||
screen->DrawText (CR_GOLD, 260, y, "dist", TAG_DONE);
|
screen->DrawText (SmallFont, CR_GOLD, 260, y, "dist", TAG_DONE);
|
||||||
screen->DrawText (CR_GOLD, 300, y, "chan", TAG_DONE);
|
screen->DrawText (SmallFont, CR_GOLD, 300, y, "chan", TAG_DONE);
|
||||||
screen->DrawText (CR_GOLD, 340, y, "flags", TAG_DONE);
|
screen->DrawText (SmallFont, CR_GOLD, 340, y, "flags", TAG_DONE);
|
||||||
y += 8;
|
y += 8;
|
||||||
|
|
||||||
if (Channels == NULL)
|
if (Channels == NULL)
|
||||||
|
@ -186,51 +186,51 @@ void S_NoiseDebug (void)
|
||||||
// Name
|
// Name
|
||||||
Wads.GetLumpName (temp, chan->SfxInfo->lumpnum);
|
Wads.GetLumpName (temp, chan->SfxInfo->lumpnum);
|
||||||
temp[8] = 0;
|
temp[8] = 0;
|
||||||
screen->DrawText (color, 0, y, temp, TAG_DONE);
|
screen->DrawText (SmallFont, color, 0, y, temp, TAG_DONE);
|
||||||
|
|
||||||
if (!(chan->ChanFlags & CHAN_IS3D))
|
if (!(chan->ChanFlags & CHAN_IS3D))
|
||||||
{
|
{
|
||||||
screen->DrawText(color, 70, y, "---", TAG_DONE); // X
|
screen->DrawText(SmallFont, color, 70, y, "---", TAG_DONE); // X
|
||||||
screen->DrawText(color, 120, y, "---", TAG_DONE); // Y
|
screen->DrawText(SmallFont, color, 120, y, "---", TAG_DONE); // Y
|
||||||
screen->DrawText(color, 170, y, "---", TAG_DONE); // Z
|
screen->DrawText(SmallFont, color, 170, y, "---", TAG_DONE); // Z
|
||||||
screen->DrawText(color, 260, y, "---", TAG_DONE); // Distance
|
screen->DrawText(SmallFont, color, 260, y, "---", TAG_DONE); // Distance
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// X coordinate
|
// X coordinate
|
||||||
mysnprintf (temp, countof(temp), "%.0f", origin.X);
|
mysnprintf(temp, countof(temp), "%.0f", origin.X);
|
||||||
screen->DrawText (color, 70, y, temp, TAG_DONE);
|
screen->DrawText(SmallFont, color, 70, y, temp, TAG_DONE);
|
||||||
|
|
||||||
// Y coordinate
|
// Y coordinate
|
||||||
mysnprintf (temp, countof(temp), "%.0f", origin.Z);
|
mysnprintf(temp, countof(temp), "%.0f", origin.Z);
|
||||||
screen->DrawText (color, 120, y, temp, TAG_DONE);
|
screen->DrawText(SmallFont, color, 120, y, temp, TAG_DONE);
|
||||||
|
|
||||||
// Z coordinate
|
// Z coordinate
|
||||||
mysnprintf (temp, countof(temp), "%.0f", origin.Y);
|
mysnprintf(temp, countof(temp), "%.0f", origin.Y);
|
||||||
screen->DrawText (color, 170, y, temp, TAG_DONE);
|
screen->DrawText(SmallFont, color, 170, y, temp, TAG_DONE);
|
||||||
|
|
||||||
// Distance
|
// Distance
|
||||||
if (chan->DistanceScale > 0)
|
if (chan->DistanceScale > 0)
|
||||||
{
|
{
|
||||||
mysnprintf (temp, countof(temp), "%.0f", (origin - listener).Length());
|
mysnprintf(temp, countof(temp), "%.0f", (origin - listener).Length());
|
||||||
screen->DrawText (color, 260, y, temp, TAG_DONE);
|
screen->DrawText(SmallFont, color, 260, y, temp, TAG_DONE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
screen->DrawText (color, 260, y, "---", TAG_DONE);
|
screen->DrawText(SmallFont, color, 260, y, "---", TAG_DONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Volume
|
// Volume
|
||||||
mysnprintf (temp, countof(temp), "%.2g", chan->Volume);
|
mysnprintf(temp, countof(temp), "%.2g", chan->Volume);
|
||||||
screen->DrawText (color, 220, y, temp, TAG_DONE);
|
screen->DrawText(SmallFont, color, 220, y, temp, TAG_DONE);
|
||||||
|
|
||||||
// Channel
|
// Channel
|
||||||
mysnprintf (temp, countof(temp), "%d", chan->EntChannel);
|
mysnprintf(temp, countof(temp), "%d", chan->EntChannel);
|
||||||
screen->DrawText (color, 300, y, temp, TAG_DONE);
|
screen->DrawText(SmallFont, color, 300, y, temp, TAG_DONE);
|
||||||
|
|
||||||
// Flags
|
// Flags
|
||||||
mysnprintf (temp, countof(temp), "%s3%sZ%sU%sM%sN%sA%sL%sE",
|
mysnprintf(temp, countof(temp), "%s3%sZ%sU%sM%sN%sA%sL%sE",
|
||||||
(chan->ChanFlags & CHAN_IS3D) ? TEXTCOLOR_GREEN : TEXTCOLOR_BLACK,
|
(chan->ChanFlags & CHAN_IS3D) ? TEXTCOLOR_GREEN : TEXTCOLOR_BLACK,
|
||||||
(chan->ChanFlags & CHAN_LISTENERZ) ? TEXTCOLOR_GREEN : TEXTCOLOR_BLACK,
|
(chan->ChanFlags & CHAN_LISTENERZ) ? TEXTCOLOR_GREEN : TEXTCOLOR_BLACK,
|
||||||
(chan->ChanFlags & CHAN_UI) ? TEXTCOLOR_GREEN : TEXTCOLOR_BLACK,
|
(chan->ChanFlags & CHAN_UI) ? TEXTCOLOR_GREEN : TEXTCOLOR_BLACK,
|
||||||
|
@ -239,7 +239,7 @@ void S_NoiseDebug (void)
|
||||||
(chan->ChanFlags & CHAN_AREA) ? TEXTCOLOR_GREEN : TEXTCOLOR_BLACK,
|
(chan->ChanFlags & CHAN_AREA) ? TEXTCOLOR_GREEN : TEXTCOLOR_BLACK,
|
||||||
(chan->ChanFlags & CHAN_LOOP) ? TEXTCOLOR_GREEN : TEXTCOLOR_BLACK,
|
(chan->ChanFlags & CHAN_LOOP) ? TEXTCOLOR_GREEN : TEXTCOLOR_BLACK,
|
||||||
(chan->ChanFlags & CHAN_EVICTED) ? TEXTCOLOR_GREEN : TEXTCOLOR_BLACK);
|
(chan->ChanFlags & CHAN_EVICTED) ? TEXTCOLOR_GREEN : TEXTCOLOR_BLACK);
|
||||||
screen->DrawText (color, 340, y, temp, TAG_DONE);
|
screen->DrawText(SmallFont, color, 340, y, temp, TAG_DONE);
|
||||||
|
|
||||||
y += 8;
|
y += 8;
|
||||||
if (chan->PrevChan == &Channels)
|
if (chan->PrevChan == &Channels)
|
||||||
|
|
|
@ -94,7 +94,6 @@ void FStat::PrintStat ()
|
||||||
int y = SCREENHEIGHT;
|
int y = SCREENHEIGHT;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
screen->SetFont (ConFont);
|
|
||||||
for (FStat *stat = FirstStat; stat != NULL; stat = stat->m_Next)
|
for (FStat *stat = FirstStat; stat != NULL; stat = stat->m_Next)
|
||||||
{
|
{
|
||||||
if (stat->m_Active)
|
if (stat->m_Active)
|
||||||
|
@ -104,17 +103,16 @@ void FStat::PrintStat ()
|
||||||
if (stattext.Len() > 0)
|
if (stattext.Len() > 0)
|
||||||
{
|
{
|
||||||
y -= fontheight; // there's at least one line of text
|
y -= fontheight; // there's at least one line of text
|
||||||
for(unsigned i = 0; i < stattext.Len()-1; i++)
|
for (unsigned i = 0; i < stattext.Len()-1; i++)
|
||||||
{
|
{
|
||||||
// Count number of linefeeds but ignore terminating ones.
|
// Count number of linefeeds but ignore terminating ones.
|
||||||
if (stattext[i] == '\n') y -= fontheight;
|
if (stattext[i] == '\n') y -= fontheight;
|
||||||
}
|
}
|
||||||
screen->DrawText (CR_GREEN, 5, y, stattext, TAG_DONE);
|
screen->DrawText(ConFont, CR_GREEN, 5, y, stattext, TAG_DONE);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
screen->SetFont (SmallFont);
|
|
||||||
if (count)
|
if (count)
|
||||||
{
|
{
|
||||||
SB_state = screen->GetPageCount ();
|
SB_state = screen->GetPageCount ();
|
||||||
|
|
|
@ -1556,22 +1556,19 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Print)
|
||||||
if (self->CheckLocalView (consoleplayer) ||
|
if (self->CheckLocalView (consoleplayer) ||
|
||||||
(self->target!=NULL && self->target->CheckLocalView (consoleplayer)))
|
(self->target!=NULL && self->target->CheckLocalView (consoleplayer)))
|
||||||
{
|
{
|
||||||
FFont * oldfont = screen->Font;
|
|
||||||
float saved = con_midtime;
|
float saved = con_midtime;
|
||||||
|
FFont *font = NULL;
|
||||||
|
|
||||||
if (fontname != NAME_None)
|
if (fontname != NAME_None)
|
||||||
{
|
{
|
||||||
FFont * font = V_GetFont(fontname);
|
font = V_GetFont(fontname);
|
||||||
if (font != NULL) screen->SetFont(font);
|
|
||||||
}
|
}
|
||||||
if (time > 0)
|
if (time > 0)
|
||||||
{
|
{
|
||||||
con_midtime = time;
|
con_midtime = time;
|
||||||
}
|
}
|
||||||
|
|
||||||
C_MidPrint(text);
|
C_MidPrint(font != NULL ? font : SmallFont, text);
|
||||||
screen->SetFont(oldfont);
|
|
||||||
con_midtime = saved;
|
con_midtime = saved;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,7 @@ The FON2 header is followed by variable length data:
|
||||||
|
|
||||||
ubyte Palette[PaletteSize+1][3];
|
ubyte Palette[PaletteSize+1][3];
|
||||||
-- The last entry is the delimiter color. The delimiter is not used
|
-- The last entry is the delimiter color. The delimiter is not used
|
||||||
-- by the font but is used my imagetool when converting the font
|
-- by the font but is used by imagetool when converting the font
|
||||||
-- back to an image. Color 0 is the transparent color and is also
|
-- back to an image. Color 0 is the transparent color and is also
|
||||||
-- used only for converting the font back to an image. The other
|
-- used only for converting the font back to an image. The other
|
||||||
-- entries are all presorted in increasing order of brightness.
|
-- entries are all presorted in increasing order of brightness.
|
||||||
|
@ -146,6 +146,13 @@ protected:
|
||||||
FTextureID PicNum;
|
FTextureID PicNum;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Essentially a normal multilump font but with an explicit list of character patches
|
||||||
|
class FSpecialFont : public FFont
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
FSpecialFont (const char *name, int first, int count, int *lumplist, const bool *notranslate);
|
||||||
|
};
|
||||||
|
|
||||||
// This is a font character that loads a texture and recolors it.
|
// This is a font character that loads a texture and recolors it.
|
||||||
class FFontChar1 : public FTexture
|
class FFontChar1 : public FTexture
|
||||||
{
|
{
|
||||||
|
@ -1503,18 +1510,6 @@ void FFontChar2::MakeTexture ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
|
||||||
//
|
|
||||||
// Essentially a normal multilump font but
|
|
||||||
// with an explicit list of character patches
|
|
||||||
//
|
|
||||||
//===========================================================================
|
|
||||||
class FSpecialFont : public FFont
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
FSpecialFont (const char *name, int first, int count, int *lumplist, const bool *notranslate);
|
|
||||||
};
|
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
// FSpecialFont :: FSpecialFont
|
// FSpecialFont :: FSpecialFont
|
||||||
|
@ -1723,7 +1718,7 @@ void V_InitCustomFonts()
|
||||||
if (sc.Number >= 0 && sc.Number < 256)
|
if (sc.Number >= 0 && sc.Number < 256)
|
||||||
notranslate[sc.Number] = true;
|
notranslate[sc.Number] = true;
|
||||||
}
|
}
|
||||||
format=2;
|
format = 2;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1756,7 +1751,7 @@ void V_InitCustomFonts()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (count>0)
|
if (count > 0)
|
||||||
{
|
{
|
||||||
new FSpecialFont (namebuffer, first, count, &lumplist[first], notranslate);
|
new FSpecialFont (namebuffer, first, count, &lumplist[first], notranslate);
|
||||||
}
|
}
|
||||||
|
@ -2116,7 +2111,7 @@ void V_InitFonts()
|
||||||
SmallFont = new FFont ("SmallFont", "STCFN%.3d", HU_FONTSTART, HU_FONTSIZE, HU_FONTSTART);
|
SmallFont = new FFont ("SmallFont", "STCFN%.3d", HU_FONTSTART, HU_FONTSIZE, HU_FONTSTART);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!(SmallFont2=FFont::FindFont("SmallFont2")))
|
if (!(SmallFont2 = FFont::FindFont("SmallFont2")))
|
||||||
{
|
{
|
||||||
if (Wads.CheckNumForName ("STBFN033", ns_graphics) >= 0)
|
if (Wads.CheckNumForName ("STBFN033", ns_graphics) >= 0)
|
||||||
{
|
{
|
||||||
|
@ -2127,7 +2122,7 @@ void V_InitFonts()
|
||||||
SmallFont2 = SmallFont;
|
SmallFont2 = SmallFont;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!(BigFont=FFont::FindFont("BigFont")))
|
if (!(BigFont = FFont::FindFont("BigFont")))
|
||||||
{
|
{
|
||||||
if (gameinfo.gametype & GAME_DoomChex)
|
if (gameinfo.gametype & GAME_DoomChex)
|
||||||
{
|
{
|
||||||
|
@ -2142,9 +2137,19 @@ void V_InitFonts()
|
||||||
BigFont = new FFont ("BigFont", "FONTB%02u", HU_FONTSTART, HU_FONTSIZE, 1);
|
BigFont = new FFont ("BigFont", "FONTB%02u", HU_FONTSTART, HU_FONTSIZE, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!(ConFont=FFont::FindFont("ConsoleFont")))
|
if (!(ConFont = FFont::FindFont("ConsoleFont")))
|
||||||
{
|
{
|
||||||
ConFont = new FSingleLumpFont ("ConsoleFont", Wads.GetNumForName ("CONFONT"));
|
ConFont = new FSingleLumpFont ("ConsoleFont", Wads.GetNumForName ("CONFONT"));
|
||||||
}
|
}
|
||||||
|
if (!(IntermissionFont = FFont::FindFont("IntermissionFont")))
|
||||||
|
{
|
||||||
|
if (gameinfo.gametype & GAME_DoomChex)
|
||||||
|
{
|
||||||
|
IntermissionFont = FFont::FindFont("IntermissionFont_Doom");
|
||||||
|
}
|
||||||
|
if (IntermissionFont == NULL)
|
||||||
|
{
|
||||||
|
IntermissionFont = BigFont;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,6 +66,7 @@ enum EColorRange
|
||||||
CR_DARKBROWN,
|
CR_DARKBROWN,
|
||||||
CR_PURPLE,
|
CR_PURPLE,
|
||||||
CR_DARKGRAY,
|
CR_DARKGRAY,
|
||||||
|
CR_CYAN,
|
||||||
NUM_TEXT_COLORS
|
NUM_TEXT_COLORS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -126,7 +127,7 @@ protected:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
extern FFont *SmallFont, *SmallFont2, *BigFont, *ConFont;
|
extern FFont *SmallFont, *SmallFont2, *BigFont, *ConFont, *IntermissionFont;
|
||||||
|
|
||||||
void V_InitFonts();
|
void V_InitFonts();
|
||||||
EColorRange V_FindFontColor (FName name);
|
EColorRange V_FindFontColor (FName name);
|
||||||
|
|
|
@ -48,18 +48,13 @@
|
||||||
#include "templates.h"
|
#include "templates.h"
|
||||||
|
|
||||||
//
|
//
|
||||||
// SetFont
|
// DrawChar
|
||||||
//
|
//
|
||||||
// Set the canvas's font
|
// Write a single character using the given font
|
||||||
//
|
//
|
||||||
void DCanvas::SetFont (FFont *font)
|
void STACK_ARGS DCanvas::DrawChar (FFont *font, int normalcolor, int x, int y, BYTE character, ...)
|
||||||
{
|
{
|
||||||
Font = font;
|
if (font == NULL)
|
||||||
}
|
|
||||||
|
|
||||||
void STACK_ARGS DCanvas::DrawChar (int normalcolor, int x, int y, BYTE character, ...)
|
|
||||||
{
|
|
||||||
if (Font == NULL)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (normalcolor >= NumTextColors)
|
if (normalcolor >= NumTextColors)
|
||||||
|
@ -68,9 +63,9 @@ void STACK_ARGS DCanvas::DrawChar (int normalcolor, int x, int y, BYTE character
|
||||||
FTexture *pic;
|
FTexture *pic;
|
||||||
int dummy;
|
int dummy;
|
||||||
|
|
||||||
if (NULL != (pic = Font->GetChar (character, &dummy)))
|
if (NULL != (pic = font->GetChar (character, &dummy)))
|
||||||
{
|
{
|
||||||
const FRemapTable *range = Font->GetColorTranslation ((EColorRange)normalcolor);
|
const FRemapTable *range = font->GetColorTranslation ((EColorRange)normalcolor);
|
||||||
va_list taglist;
|
va_list taglist;
|
||||||
va_start (taglist, character);
|
va_start (taglist, character);
|
||||||
DrawTexture (pic, x, y, DTA_Translation, range, TAG_MORE, &taglist);
|
DrawTexture (pic, x, y, DTA_Translation, range, TAG_MORE, &taglist);
|
||||||
|
@ -81,9 +76,9 @@ void STACK_ARGS DCanvas::DrawChar (int normalcolor, int x, int y, BYTE character
|
||||||
//
|
//
|
||||||
// DrawText
|
// DrawText
|
||||||
//
|
//
|
||||||
// Write a string using the current font
|
// Write a string using the given font
|
||||||
//
|
//
|
||||||
void STACK_ARGS DCanvas::DrawText (int normalcolor, int x, int y, const char *string, ...)
|
void STACK_ARGS DCanvas::DrawText (FFont *font, int normalcolor, int x, int y, const char *string, ...)
|
||||||
{
|
{
|
||||||
va_list tags;
|
va_list tags;
|
||||||
DWORD tag;
|
DWORD tag;
|
||||||
|
@ -103,16 +98,16 @@ void STACK_ARGS DCanvas::DrawText (int normalcolor, int x, int y, const char *st
|
||||||
int kerning;
|
int kerning;
|
||||||
FTexture *pic;
|
FTexture *pic;
|
||||||
|
|
||||||
if (Font == NULL || string == NULL)
|
if (font == NULL || string == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (normalcolor >= NumTextColors)
|
if (normalcolor >= NumTextColors)
|
||||||
normalcolor = CR_UNTRANSLATED;
|
normalcolor = CR_UNTRANSLATED;
|
||||||
boldcolor = normalcolor ? normalcolor - 1 : NumTextColors - 1;
|
boldcolor = normalcolor ? normalcolor - 1 : NumTextColors - 1;
|
||||||
|
|
||||||
range = Font->GetColorTranslation ((EColorRange)normalcolor);
|
range = font->GetColorTranslation ((EColorRange)normalcolor);
|
||||||
height = Font->GetHeight () + 1;
|
height = font->GetHeight () + 1;
|
||||||
kerning = Font->GetDefaultKerning ();
|
kerning = font->GetDefaultKerning ();
|
||||||
|
|
||||||
ch = (const BYTE *)string;
|
ch = (const BYTE *)string;
|
||||||
cx = x;
|
cx = x;
|
||||||
|
@ -214,7 +209,7 @@ void STACK_ARGS DCanvas::DrawText (int normalcolor, int x, int y, const char *st
|
||||||
EColorRange newcolor = V_ParseFontColor (ch, normalcolor, boldcolor);
|
EColorRange newcolor = V_ParseFontColor (ch, normalcolor, boldcolor);
|
||||||
if (newcolor != CR_UNDEFINED)
|
if (newcolor != CR_UNDEFINED)
|
||||||
{
|
{
|
||||||
range = Font->GetColorTranslation (newcolor);
|
range = font->GetColorTranslation (newcolor);
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -226,7 +221,7 @@ void STACK_ARGS DCanvas::DrawText (int normalcolor, int x, int y, const char *st
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NULL != (pic = Font->GetChar (c, &w)))
|
if (NULL != (pic = font->GetChar (c, &w)))
|
||||||
{
|
{
|
||||||
va_list taglist;
|
va_list taglist;
|
||||||
va_start (taglist, string);
|
va_start (taglist, string);
|
||||||
|
|
|
@ -130,7 +130,7 @@ const FTexture::Span FPaletteTester::DummySpan[2] = { { 0, 16 }, { 0, 0 } };
|
||||||
|
|
||||||
int DisplayWidth, DisplayHeight, DisplayBits;
|
int DisplayWidth, DisplayHeight, DisplayBits;
|
||||||
|
|
||||||
FFont *SmallFont, *SmallFont2, *BigFont, *ConFont;
|
FFont *SmallFont, *SmallFont2, *BigFont, *ConFont, *IntermissionFont;
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
DWORD Col2RGB8[65][256];
|
DWORD Col2RGB8[65][256];
|
||||||
|
@ -206,7 +206,6 @@ DCanvas::DCanvas (int _width, int _height)
|
||||||
{
|
{
|
||||||
// Init member vars
|
// Init member vars
|
||||||
Buffer = NULL;
|
Buffer = NULL;
|
||||||
Font = NULL;
|
|
||||||
LockCount = 0;
|
LockCount = 0;
|
||||||
Width = _width;
|
Width = _width;
|
||||||
Height = _height;
|
Height = _height;
|
||||||
|
@ -823,9 +822,7 @@ void DFrameBuffer::DrawRateStuff ()
|
||||||
chars = mysnprintf (fpsbuff, countof(fpsbuff), "%2u ms (%3u fps)", howlong, LastCount);
|
chars = mysnprintf (fpsbuff, countof(fpsbuff), "%2u ms (%3u fps)", howlong, LastCount);
|
||||||
rate_x = Width - chars * 8;
|
rate_x = Width - chars * 8;
|
||||||
Clear (rate_x, 0, Width, 8, 0, 0);
|
Clear (rate_x, 0, Width, 8, 0, 0);
|
||||||
SetFont (ConFont);
|
DrawText (ConFont, CR_WHITE, rate_x, 0, (char *)&fpsbuff[0], TAG_DONE);
|
||||||
DrawText (CR_WHITE, rate_x, 0, (char *)&fpsbuff[0], TAG_DONE);
|
|
||||||
SetFont (SmallFont);
|
|
||||||
|
|
||||||
DWORD thisSec = ms/1000;
|
DWORD thisSec = ms/1000;
|
||||||
if (LastSec < thisSec)
|
if (LastSec < thisSec)
|
||||||
|
@ -1254,7 +1251,6 @@ bool V_DoModeSetup (int width, int height, int bits)
|
||||||
|
|
||||||
screen = buff;
|
screen = buff;
|
||||||
GC::WriteBarrier(screen);
|
GC::WriteBarrier(screen);
|
||||||
screen->SetFont (SmallFont);
|
|
||||||
screen->SetGamma (Gamma);
|
screen->SetGamma (Gamma);
|
||||||
|
|
||||||
// Load fonts now so they can be packed into textures straight away,
|
// Load fonts now so they can be packed into textures straight away,
|
||||||
|
@ -1464,7 +1460,6 @@ void V_Init2()
|
||||||
int width = screen->GetWidth();
|
int width = screen->GetWidth();
|
||||||
int height = screen->GetHeight();
|
int height = screen->GetHeight();
|
||||||
float gamma = static_cast<DDummyFrameBuffer *>(screen)->Gamma;
|
float gamma = static_cast<DDummyFrameBuffer *>(screen)->Gamma;
|
||||||
FFont *font = screen->Font;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
DFrameBuffer *s = screen;
|
DFrameBuffer *s = screen;
|
||||||
|
@ -1482,7 +1477,6 @@ void V_Init2()
|
||||||
Printf ("Resolution: %d x %d\n", SCREENWIDTH, SCREENHEIGHT);
|
Printf ("Resolution: %d x %d\n", SCREENWIDTH, SCREENHEIGHT);
|
||||||
|
|
||||||
screen->SetGamma (gamma);
|
screen->SetGamma (gamma);
|
||||||
if (font != NULL) screen->SetFont (font);
|
|
||||||
FBaseCVar::ResetColors ();
|
FBaseCVar::ResetColors ();
|
||||||
C_NewModeAdjust();
|
C_NewModeAdjust();
|
||||||
M_InitVideoModesMenu();
|
M_InitVideoModesMenu();
|
||||||
|
|
|
@ -128,8 +128,6 @@ class DCanvas : public DObject
|
||||||
{
|
{
|
||||||
DECLARE_ABSTRACT_CLASS (DCanvas, DObject)
|
DECLARE_ABSTRACT_CLASS (DCanvas, DObject)
|
||||||
public:
|
public:
|
||||||
FFont *Font;
|
|
||||||
|
|
||||||
DCanvas (int width, int height);
|
DCanvas (int width, int height);
|
||||||
virtual ~DCanvas ();
|
virtual ~DCanvas ();
|
||||||
|
|
||||||
|
@ -187,8 +185,6 @@ public:
|
||||||
|
|
||||||
// Text drawing functions -----------------------------------------------
|
// Text drawing functions -----------------------------------------------
|
||||||
|
|
||||||
virtual void SetFont (FFont *font);
|
|
||||||
|
|
||||||
// 2D Texture drawing
|
// 2D Texture drawing
|
||||||
void STACK_ARGS DrawTexture (FTexture *img, int x, int y, int tags, ...);
|
void STACK_ARGS DrawTexture (FTexture *img, int x, int y, int tags, ...);
|
||||||
void FillBorder (FTexture *img); // Fills the border around a 4:3 part of the screen on non-4:3 displays
|
void FillBorder (FTexture *img); // Fills the border around a 4:3 part of the screen on non-4:3 displays
|
||||||
|
@ -196,8 +192,8 @@ public:
|
||||||
void VirtualToRealCoordsInt(int &x, int &y, int &w, int &h, int vwidth, int vheight, bool vbottom=false, bool handleaspect=true) const;
|
void VirtualToRealCoordsInt(int &x, int &y, int &w, int &h, int vwidth, int vheight, bool vbottom=false, bool handleaspect=true) const;
|
||||||
|
|
||||||
// 2D Text drawing
|
// 2D Text drawing
|
||||||
void STACK_ARGS DrawText (int normalcolor, int x, int y, const char *string, ...);
|
void STACK_ARGS DrawText (FFont *font, int normalcolor, int x, int y, const char *string, ...);
|
||||||
void STACK_ARGS DrawChar (int normalcolor, int x, int y, BYTE character, ...);
|
void STACK_ARGS DrawChar (FFont *font, int normalcolor, int x, int y, BYTE character, ...);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
BYTE *Buffer;
|
BYTE *Buffer;
|
||||||
|
|
312
src/wi_stuff.cpp
312
src/wi_stuff.cpp
|
@ -46,6 +46,7 @@
|
||||||
#include "v_text.h"
|
#include "v_text.h"
|
||||||
#include "gi.h"
|
#include "gi.h"
|
||||||
#include "r_translate.h"
|
#include "r_translate.h"
|
||||||
|
#include "templates.h"
|
||||||
|
|
||||||
// States for the intermission
|
// States for the intermission
|
||||||
typedef enum
|
typedef enum
|
||||||
|
@ -210,11 +211,6 @@ static bool noautostartmap;
|
||||||
|
|
||||||
static TArray<FTexture *> yah; // You Are Here graphic
|
static TArray<FTexture *> yah; // You Are Here graphic
|
||||||
static FTexture* splat; // splat
|
static FTexture* splat; // splat
|
||||||
static FTexture* percent; // %, : graphics
|
|
||||||
static FTexture* colon;
|
|
||||||
static FTexture* slash;
|
|
||||||
static FTexture* num[10]; // 0-9 graphic
|
|
||||||
static FTexture* wiminus; // minus sign
|
|
||||||
static FTexture* finished; // "Finished!" graphics
|
static FTexture* finished; // "Finished!" graphics
|
||||||
static FTexture* entering; // "Entering" graphic
|
static FTexture* entering; // "Entering" graphic
|
||||||
static FTexture* sp_secret; // "secret"
|
static FTexture* sp_secret; // "secret"
|
||||||
|
@ -409,12 +405,12 @@ void WI_LoadBackground(bool isenterpic)
|
||||||
{
|
{
|
||||||
case 0: // Background
|
case 0: // Background
|
||||||
sc.MustGetString();
|
sc.MustGetString();
|
||||||
texture=TexMan.CheckForTexture(sc.String, FTexture::TEX_MiscPatch,FTextureManager::TEXMAN_TryAny);
|
texture = TexMan.CheckForTexture(sc.String, FTexture::TEX_MiscPatch, FTextureManager::TEXMAN_TryAny);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1: // Splat
|
case 1: // Splat
|
||||||
sc.MustGetString();
|
sc.MustGetString();
|
||||||
splat=TexMan[sc.String];
|
splat = TexMan[sc.String];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2: // Pointers
|
case 2: // Pointers
|
||||||
|
@ -422,7 +418,8 @@ void WI_LoadBackground(bool isenterpic)
|
||||||
{
|
{
|
||||||
yah.Push(TexMan[sc.String]);
|
yah.Push(TexMan[sc.String]);
|
||||||
}
|
}
|
||||||
if (sc.Crossed) sc.UnGet();
|
if (sc.Crossed)
|
||||||
|
sc.UnGet();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3: // Spots
|
case 3: // Spots
|
||||||
|
@ -683,23 +680,15 @@ void WI_drawBackground()
|
||||||
//
|
//
|
||||||
//====================================================================
|
//====================================================================
|
||||||
|
|
||||||
static void WI_DrawCharPatch (FTexture *patch, int x, int y)
|
static int WI_DrawCharPatch (int charcode, int x, int y, EColorRange translation=CR_UNTRANSLATED)
|
||||||
{
|
{
|
||||||
if (patch->UseType != FTexture::TEX_FontChar)
|
int width;
|
||||||
{
|
screen->DrawTexture(IntermissionFont->GetChar(charcode, &width), x, y,
|
||||||
screen->DrawTexture (patch, x, y,
|
DTA_Clean, true,
|
||||||
DTA_Clean, true,
|
DTA_ShadowAlpha, (gameinfo.gametype & GAME_DoomChex) ? 0 : FRACUNIT/2,
|
||||||
DTA_ShadowAlpha, (gameinfo.gametype & GAME_DoomChex) ? 0 : FRACUNIT/2,
|
DTA_Translation, IntermissionFont->GetColorTranslation(translation),
|
||||||
TAG_DONE);
|
TAG_DONE);
|
||||||
}
|
return x - width;
|
||||||
else
|
|
||||||
{
|
|
||||||
screen->DrawTexture (patch, x, y,
|
|
||||||
DTA_Clean, true,
|
|
||||||
DTA_ShadowAlpha, (gameinfo.gametype & GAME_DoomChex) ? 0 : FRACUNIT/2,
|
|
||||||
DTA_Translation, BigFont->GetColorTranslation (CR_UNTRANSLATED), // otherwise it doesn't look good in Strife!
|
|
||||||
TAG_DONE);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -712,21 +701,20 @@ static void WI_DrawCharPatch (FTexture *patch, int x, int y)
|
||||||
//
|
//
|
||||||
//====================================================================
|
//====================================================================
|
||||||
|
|
||||||
int WI_DrawName(int y,const char * levelname, bool nomove=false)
|
int WI_DrawName(int y, const char *levelname, bool nomove=false)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
size_t l;
|
size_t l;
|
||||||
const char * p;
|
const char *p;
|
||||||
int h=0;
|
int h = 0;
|
||||||
int lumph;
|
int lumph;
|
||||||
|
|
||||||
lumph=BigFont->GetHeight();
|
lumph = BigFont->GetHeight();
|
||||||
|
|
||||||
p=levelname;
|
p = levelname;
|
||||||
l=strlen(p);
|
l = strlen(p);
|
||||||
if (!l) return 0;
|
if (!l) return 0;
|
||||||
|
|
||||||
screen->SetFont(BigFont);
|
|
||||||
FBrokenLines *lines = V_BreakLines(BigFont, 320, p);
|
FBrokenLines *lines = V_BreakLines(BigFont, 320, p);
|
||||||
|
|
||||||
if (lines)
|
if (lines)
|
||||||
|
@ -735,19 +723,18 @@ int WI_DrawName(int y,const char * levelname, bool nomove=false)
|
||||||
{
|
{
|
||||||
if (!nomove)
|
if (!nomove)
|
||||||
{
|
{
|
||||||
screen->DrawText(CR_UNTRANSLATED, 160 - lines[i].Width/2, y+h, lines[i].Text, DTA_Clean, true, TAG_DONE);
|
screen->DrawText(BigFont, CR_UNTRANSLATED, 160 - lines[i].Width/2, y+h, lines[i].Text, DTA_Clean, true, TAG_DONE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
screen->DrawText(CR_UNTRANSLATED, (SCREENWIDTH - lines[i].Width * CleanXfac) / 2, (y+h) * CleanYfac,
|
screen->DrawText(BigFont, CR_UNTRANSLATED, (SCREENWIDTH - lines[i].Width * CleanXfac) / 2, (y+h) * CleanYfac,
|
||||||
lines[i].Text, DTA_CleanNoMove, true, TAG_DONE);
|
lines[i].Text, DTA_CleanNoMove, true, TAG_DONE);
|
||||||
}
|
}
|
||||||
h+=lumph;
|
h+=lumph;
|
||||||
}
|
}
|
||||||
V_FreeBrokenLines(lines);
|
V_FreeBrokenLines(lines);
|
||||||
}
|
}
|
||||||
screen->SetFont(SmallFont);
|
return h + lumph/4;
|
||||||
return h+lumph/4;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -763,7 +750,7 @@ void WI_drawLF ()
|
||||||
{
|
{
|
||||||
int y = WI_TITLEY;
|
int y = WI_TITLEY;
|
||||||
|
|
||||||
FTexture * tex = wbs->LName0;
|
FTexture *tex = wbs->LName0;
|
||||||
|
|
||||||
// draw <LevelName>
|
// draw <LevelName>
|
||||||
if (tex)
|
if (tex)
|
||||||
|
@ -773,11 +760,12 @@ void WI_drawLF ()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
y+=WI_DrawName(y, lnametexts[0]);
|
y += WI_DrawName(y, lnametexts[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// draw "Finished!"
|
// draw "Finished!"
|
||||||
if (y < NG_STATSY - screen->Font->GetHeight()*3/4)
|
FFont *font = gameinfo.gametype & GAME_Raven ? SmallFont : BigFont;
|
||||||
|
if (y < NG_STATSY - font->GetHeight()*3/4)
|
||||||
{
|
{
|
||||||
// don't draw 'finished' if the level name is too high!
|
// don't draw 'finished' if the level name is too high!
|
||||||
if (gameinfo.gametype & GAME_DoomChex)
|
if (gameinfo.gametype & GAME_DoomChex)
|
||||||
|
@ -786,10 +774,9 @@ void WI_drawLF ()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
screen->SetFont(gameinfo.gametype&GAME_Raven? SmallFont : BigFont);
|
screen->DrawText(font, CR_WHITE,
|
||||||
screen->DrawText(CR_WHITE, 160 - screen->Font->StringWidth("finished")/2, y-4, "finished",
|
160 - font->StringWidth("finished")/2, y-4, "finished",
|
||||||
DTA_Clean, true, TAG_DONE);
|
DTA_Clean, true, TAG_DONE);
|
||||||
screen->SetFont(SmallFont);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -806,22 +793,21 @@ void WI_drawLF ()
|
||||||
void WI_drawEL ()
|
void WI_drawEL ()
|
||||||
{
|
{
|
||||||
int y = WI_TITLEY;
|
int y = WI_TITLEY;
|
||||||
|
FFont *font = gameinfo.gametype & GAME_Raven ? SmallFont : BigFont;
|
||||||
|
|
||||||
// draw "entering"
|
// draw "entering"
|
||||||
// be careful with the added height so that it works for oversized 'entering' patches!
|
// be careful with the added height so that it works for oversized 'entering' patches!
|
||||||
if (gameinfo.gametype & GAME_DoomChex)
|
if (gameinfo.gametype & GAME_DoomChex)
|
||||||
{
|
{
|
||||||
screen->DrawTexture(entering, (SCREENWIDTH - entering->GetWidth() * CleanXfac) / 2, y * CleanYfac, DTA_CleanNoMove, true, TAG_DONE);
|
screen->DrawTexture(entering, (SCREENWIDTH - entering->GetWidth() * CleanXfac) / 2, y * CleanYfac, DTA_CleanNoMove, true, TAG_DONE);
|
||||||
y += entering->GetHeight() + screen->Font->GetHeight()/4;
|
y += entering->GetHeight() + font->GetHeight()/4;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
screen->SetFont(gameinfo.gametype&GAME_Raven? SmallFont : BigFont);
|
screen->DrawText(font, CR_WHITE,
|
||||||
screen->DrawText(CR_WHITE, (SCREENWIDTH - screen->Font->StringWidth("now entering:") * CleanXfac) / 2, y * CleanYfac,
|
(SCREENWIDTH - font->StringWidth("now entering:") * CleanXfac) / 2, y * CleanYfac,
|
||||||
"now entering:", DTA_CleanNoMove, true, TAG_DONE);
|
"now entering:", DTA_CleanNoMove, true, TAG_DONE);
|
||||||
y += screen->Font->GetHeight()*5/4;
|
y += font->GetHeight()*5/4;
|
||||||
screen->SetFont(SmallFont);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// draw <LevelName>
|
// draw <LevelName>
|
||||||
|
@ -888,92 +874,81 @@ void WI_drawOnLnode( int n, FTexture * c[] ,int numc)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ====================================================================
|
//====================================================================
|
||||||
//
|
//
|
||||||
// Draws a number.
|
// Draws a number.
|
||||||
// If digits > 0, then use that many digits minimum,
|
// If digits > 0, then use that many digits minimum,
|
||||||
// otherwise only use as many as necessary.
|
// otherwise only use as many as necessary.
|
||||||
// Returns new x position.
|
// x is the right edge of the number.
|
||||||
|
// Returns new x position, that is, the left edge of the number.
|
||||||
//
|
//
|
||||||
// ====================================================================
|
//====================================================================
|
||||||
int WI_drawNum (int x, int y, int n, int digits, bool leadingzeros = true)
|
int WI_drawNum (int x, int y, int n, int digits, bool leadingzeros=true, EColorRange translation=CR_UNTRANSLATED)
|
||||||
{
|
{
|
||||||
int fontwidth = num[3]->GetWidth();
|
int fontwidth = IntermissionFont->GetCharWidth('3');
|
||||||
int xofs;
|
|
||||||
char text[8];
|
char text[8];
|
||||||
|
int len;
|
||||||
char *text_p;
|
char *text_p;
|
||||||
|
|
||||||
if (leadingzeros)
|
if (leadingzeros)
|
||||||
{
|
{
|
||||||
mysnprintf (text, countof(text), "%07d", n);
|
len = mysnprintf (text, countof(text), "%0*d", digits, n);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mysnprintf (text, countof(text), "%7d", n);
|
len = mysnprintf (text, countof(text), "%d", n);
|
||||||
if (digits < 0)
|
|
||||||
{
|
|
||||||
text_p = strrchr (text, ' ');
|
|
||||||
digits = (text_p == NULL) ? 7 : 6 - (int)(text_p - text);
|
|
||||||
x -= digits * fontwidth;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
text_p = text + MIN<int>(len, countof(text)-1);
|
||||||
|
|
||||||
text_p = strchr (text, '-');
|
while (--text_p >= text)
|
||||||
if (text_p == NULL || text_p - text > 7 - digits)
|
|
||||||
{
|
|
||||||
text_p = text + 7 - digits;
|
|
||||||
}
|
|
||||||
|
|
||||||
xofs = x;
|
|
||||||
|
|
||||||
if (*text_p == '-')
|
|
||||||
{
|
|
||||||
x -= fontwidth;
|
|
||||||
WI_DrawCharPatch (wiminus, x, y);
|
|
||||||
}
|
|
||||||
|
|
||||||
// draw the new number
|
|
||||||
while (*text_p)
|
|
||||||
{
|
{
|
||||||
|
// Digits are centered in a box the width of the '3' character.
|
||||||
|
// Other characters (specifically, '-') are right-aligned in their cell.
|
||||||
if (*text_p >= '0' && *text_p <= '9')
|
if (*text_p >= '0' && *text_p <= '9')
|
||||||
{
|
{
|
||||||
FTexture *p = num[*text_p - '0'];
|
x -= fontwidth;
|
||||||
WI_DrawCharPatch (p, xofs + (fontwidth - p->GetWidth())/2, y);
|
WI_DrawCharPatch(*text_p, x + (fontwidth - IntermissionFont->GetCharWidth(*text_p)) / 2, y, translation);
|
||||||
}
|
}
|
||||||
text_p++;
|
else
|
||||||
xofs += fontwidth;
|
{
|
||||||
|
WI_DrawCharPatch(*text_p, x - IntermissionFont->GetCharWidth(*text_p), y, translation);
|
||||||
|
x -= fontwidth;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (len < digits)
|
||||||
|
{
|
||||||
|
x -= fontwidth * (digits - len);
|
||||||
}
|
}
|
||||||
return x;
|
return x;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ====================================================================
|
//====================================================================
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// ====================================================================
|
//====================================================================
|
||||||
|
|
||||||
void WI_drawPercent (int x, int y, int p, int b)
|
void WI_drawPercent (int x, int y, int p, int b, bool show_total=true)
|
||||||
{
|
{
|
||||||
if (p < 0)
|
if (p < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (wi_percents)
|
if (wi_percents)
|
||||||
{
|
{
|
||||||
WI_DrawCharPatch (percent, x, y);
|
WI_DrawCharPatch('%', x, y, CR_UNTRANSLATED);
|
||||||
|
WI_drawNum(x, y, b == 0 ? 100 : p * 100 / b, -1, false);
|
||||||
if (b == 0)
|
|
||||||
WI_drawNum (x, y, 100, -1, false);
|
|
||||||
else
|
|
||||||
WI_drawNum(x, y, p * 100 / b, -1, false);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int y2 = y + percent->GetHeight() - screen->Font->GetHeight ();
|
x += IntermissionFont->GetCharWidth('%');
|
||||||
x = WI_drawNum (x, y, b, -1, false);
|
if (show_total)
|
||||||
x -= SmallFont->StringWidth (" OF ");
|
{
|
||||||
screen->DrawText (CR_UNTRANSLATED, x, y2, " OF",
|
int y2 = y + IntermissionFont->GetHeight() - BigFont->GetHeight();
|
||||||
DTA_Clean, true, TAG_DONE);
|
x = WI_drawNum(x, y, b, 3, false);
|
||||||
|
x -= BigFont->GetCharWidth('/');
|
||||||
|
screen->DrawText (BigFont, gameinfo.gametype & GAME_Doom ? CR_RED : CR_UNTRANSLATED, x, y2, "/",
|
||||||
|
DTA_Clean, true, TAG_DONE);
|
||||||
|
}
|
||||||
WI_drawNum (x, y, p, -1, false);
|
WI_drawNum (x, y, p, -1, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -991,6 +966,21 @@ void WI_drawTime (int x, int y, int t, bool no_sucks=false)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
sucky = !no_sucks && t >= wbs->sucktime * 60 * 60 && wbs->sucktime > 0;
|
sucky = !no_sucks && t >= wbs->sucktime * 60 * 60 && wbs->sucktime > 0;
|
||||||
|
|
||||||
|
if (sucky)
|
||||||
|
{ // "sucks"
|
||||||
|
if (sucks != NULL)
|
||||||
|
{
|
||||||
|
screen->DrawTexture (sucks, x - sucks->GetWidth(), y - IntermissionFont->GetHeight() - 2,
|
||||||
|
DTA_Clean, true, TAG_DONE);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
screen->DrawText (BigFont, CR_UNTRANSLATED, x - BigFont->StringWidth("SUCKS"), y - IntermissionFont->GetHeight() - 2,
|
||||||
|
"SUCKS", DTA_Clean, true, TAG_DONE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int hours = t / 3600;
|
int hours = t / 3600;
|
||||||
t -= hours * 3600;
|
t -= hours * 3600;
|
||||||
int minutes = t / 60;
|
int minutes = t / 60;
|
||||||
|
@ -999,38 +989,17 @@ void WI_drawTime (int x, int y, int t, bool no_sucks=false)
|
||||||
|
|
||||||
// Why were these offsets hard coded? Half the WADs with custom patches
|
// Why were these offsets hard coded? Half the WADs with custom patches
|
||||||
// I tested screwed up miserably in this function!
|
// I tested screwed up miserably in this function!
|
||||||
int num_spacing = num[3]->GetWidth();
|
int num_spacing = IntermissionFont->GetCharWidth('3');
|
||||||
int colon_spacing = colon->GetWidth();
|
int colon_spacing = IntermissionFont->GetCharWidth(':');
|
||||||
|
|
||||||
x -= 2*num_spacing;
|
x = WI_drawNum (x, y, seconds, 2) - 1;
|
||||||
WI_drawNum (x, y, seconds, 2);
|
WI_DrawCharPatch (':', x -= colon_spacing, y);
|
||||||
x -= colon_spacing;
|
x = WI_drawNum (x, y, minutes, 2, hours!=0);
|
||||||
WI_DrawCharPatch (colon, x , y);
|
|
||||||
x -= 2*num_spacing ;
|
|
||||||
WI_drawNum (x, y, minutes, 2, hours!=0);
|
|
||||||
if (hours)
|
if (hours)
|
||||||
{
|
{
|
||||||
x -= colon_spacing;
|
WI_DrawCharPatch (':', x -= colon_spacing, y);
|
||||||
WI_DrawCharPatch (colon, x , y);
|
|
||||||
x -= 2*num_spacing ;
|
|
||||||
WI_drawNum (x, y, hours, 2);
|
WI_drawNum (x, y, hours, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sucky)
|
|
||||||
{ // "sucks"
|
|
||||||
if (sucks != NULL)
|
|
||||||
{
|
|
||||||
screen->DrawTexture (sucks, x - sucks->GetWidth(), y - num[0]->GetHeight() - 2,
|
|
||||||
DTA_Clean, true, TAG_DONE);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
screen->SetFont (BigFont);
|
|
||||||
screen->DrawText (CR_UNTRANSLATED, x - BigFont->StringWidth("SUCKS"), y - BigFont->GetHeight() - 2,
|
|
||||||
"SUCKS", DTA_Clean, true, TAG_DONE);
|
|
||||||
screen->SetFont (SmallFont);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void WI_End ()
|
void WI_End ()
|
||||||
|
@ -1547,7 +1516,7 @@ void WI_updateNetgameStats ()
|
||||||
void WI_drawNetgameStats ()
|
void WI_drawNetgameStats ()
|
||||||
{
|
{
|
||||||
int i, x, y;
|
int i, x, y;
|
||||||
int pwidth = percent->GetWidth();
|
int pwidth = IntermissionFont->GetCharWidth('%');
|
||||||
|
|
||||||
// draw animated background
|
// draw animated background
|
||||||
WI_drawBackground();
|
WI_drawBackground();
|
||||||
|
@ -1588,33 +1557,41 @@ void WI_drawNetgameStats ()
|
||||||
DTA_Clean, true,
|
DTA_Clean, true,
|
||||||
TAG_DONE);
|
TAG_DONE);
|
||||||
|
|
||||||
|
screen->DrawText(SmallFont, CR_GRAY, x + 3, y + 2, players[i].userinfo.netname, DTA_Clean, true, TAG_DONE);
|
||||||
x += NG_SPACINGX;
|
x += NG_SPACINGX;
|
||||||
WI_drawPercent (x-pwidth, y+10, cnt_kills[i], wbs->maxkills); x += NG_SPACINGX;
|
WI_drawPercent (x-pwidth, y+10, cnt_kills[i], wbs->maxkills, false); x += NG_SPACINGX;
|
||||||
WI_drawPercent (x-pwidth, y+10, cnt_items[i], wbs->maxitems); x += NG_SPACINGX;
|
WI_drawPercent (x-pwidth, y+10, cnt_items[i], wbs->maxitems, false); x += NG_SPACINGX;
|
||||||
WI_drawPercent (x-pwidth, y+10, cnt_secret[i], wbs->maxsecret); x += NG_SPACINGX;
|
WI_drawPercent (x-pwidth, y+10, cnt_secret[i], wbs->maxsecret, false); x += NG_SPACINGX;
|
||||||
|
|
||||||
if (dofrags)
|
if (dofrags)
|
||||||
WI_drawNum(x, y+10, cnt_frags[i], -1, false);
|
WI_drawNum(x, y+10, cnt_frags[i], -1, false);
|
||||||
|
|
||||||
y += WI_SPACINGY;
|
y += WI_SPACINGY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// [RH] Draw totals
|
||||||
|
x = NG_STATSX;
|
||||||
|
y += 10;
|
||||||
|
screen->DrawText(BigFont, CR_CYAN, x - BigFont->StringWidth("TOTALS"), y, "TOTALS", DTA_Clean, true, TAG_DONE);
|
||||||
|
x += NG_SPACINGX - pwidth + IntermissionFont->GetCharWidth('%');
|
||||||
|
WI_drawNum(x, y, wbs->maxkills, -1, false, CR_CYAN); x += NG_SPACINGX;
|
||||||
|
WI_drawNum(x, y, wbs->maxitems, -1, false, CR_CYAN); x += NG_SPACINGX;
|
||||||
|
WI_drawNum(x, y, wbs->maxsecret, -1, false, CR_CYAN);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (gameinfo.gametype & GAME_Raven)
|
if (gameinfo.gametype & GAME_Raven)
|
||||||
{
|
{
|
||||||
screen->SetFont (BigFont);
|
screen->DrawText (BigFont, CR_UNTRANSLATED, 95, 35, "KILLS", DTA_Clean, true, DTA_Shadow, true, TAG_DONE);
|
||||||
screen->DrawText (CR_UNTRANSLATED, 95, 35, "KILLS", DTA_Clean, true, DTA_Shadow, true, TAG_DONE);
|
screen->DrawText (BigFont, CR_UNTRANSLATED, 155, 35, "BONUS", DTA_Clean, true, DTA_Shadow, true, TAG_DONE);
|
||||||
screen->DrawText (CR_UNTRANSLATED, 155, 35, "BONUS", DTA_Clean, true, DTA_Shadow, true, TAG_DONE);
|
screen->DrawText (BigFont, CR_UNTRANSLATED, 232, 35, "SECRET", DTA_Clean, true, DTA_Shadow, true, TAG_DONE);
|
||||||
screen->DrawText (CR_UNTRANSLATED, 232, 35, "SECRET", DTA_Clean, true, DTA_Shadow, true, TAG_DONE);
|
|
||||||
y = 50;
|
y = 50;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
screen->SetFont (SmallFont);
|
screen->DrawText (SmallFont, CR_UNTRANSLATED, 95, 50, "KILLS", DTA_Clean, true, DTA_Shadow, true, TAG_DONE);
|
||||||
screen->DrawText (CR_UNTRANSLATED, 95, 50, "KILLS", DTA_Clean, true, DTA_Shadow, true, TAG_DONE);
|
screen->DrawText (SmallFont, CR_UNTRANSLATED, 155, 50, "BONUS", DTA_Clean, true, DTA_Shadow, true, TAG_DONE);
|
||||||
screen->DrawText (CR_UNTRANSLATED, 155, 50, "BONUS", DTA_Clean, true, DTA_Shadow, true, TAG_DONE);
|
screen->DrawText (SmallFont, CR_UNTRANSLATED, 232, 50, "SECRET", DTA_Clean, true, DTA_Shadow, true, TAG_DONE);
|
||||||
screen->DrawText (CR_UNTRANSLATED, 232, 50, "SECRET", DTA_Clean, true, DTA_Shadow, true, TAG_DONE);
|
|
||||||
y = 62;
|
y = 62;
|
||||||
}
|
}
|
||||||
WI_drawLF ();
|
WI_drawLF ();
|
||||||
|
@ -1634,9 +1611,8 @@ void WI_drawNetgameStats ()
|
||||||
}
|
}
|
||||||
else // Hexen and Strife don't have a face graphic for this.
|
else // Hexen and Strife don't have a face graphic for this.
|
||||||
{
|
{
|
||||||
char pstr[3]={'P', '1'+i, 0};
|
char pstr[3] = {'P', '1'+i, 0};
|
||||||
screen->SetFont (BigFont);
|
screen->DrawText(BigFont, CR_UNTRANSLATED, 25, y+10, pstr, DTA_Clean, true, TAG_DONE);
|
||||||
screen->DrawText(CR_UNTRANSLATED, 25, y+10, pstr, DTA_Clean, true, TAG_DONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WI_drawPercent (127, y+10, cnt_kills[i], wbs->maxkills);
|
WI_drawPercent (127, y+10, cnt_kills[i], wbs->maxkills);
|
||||||
|
@ -1650,7 +1626,6 @@ void WI_drawNetgameStats ()
|
||||||
}
|
}
|
||||||
y += 37;
|
y += 37;
|
||||||
}
|
}
|
||||||
screen->SetFont (SmallFont);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1790,7 +1765,7 @@ void WI_drawStats (void)
|
||||||
// line height
|
// line height
|
||||||
int lh;
|
int lh;
|
||||||
|
|
||||||
lh = (3*num[0]->GetHeight())/2;
|
lh = IntermissionFont->GetHeight() * 3 / 2;
|
||||||
|
|
||||||
// draw animated background
|
// draw animated background
|
||||||
WI_drawBackground();
|
WI_drawBackground();
|
||||||
|
@ -1824,34 +1799,33 @@ void WI_drawStats (void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
screen->SetFont (BigFont);
|
screen->DrawText (BigFont, CR_UNTRANSLATED, 50, 65, "KILLS", DTA_Clean, true, DTA_Shadow, true, TAG_DONE);
|
||||||
screen->DrawText (CR_UNTRANSLATED, 50, 65, "KILLS", DTA_Clean, true, DTA_Shadow, true, TAG_DONE);
|
screen->DrawText (BigFont, CR_UNTRANSLATED, 50, 90, "ITEMS", DTA_Clean, true, DTA_Shadow, true, TAG_DONE);
|
||||||
screen->DrawText (CR_UNTRANSLATED, 50, 90, "ITEMS", DTA_Clean, true, DTA_Shadow, true, TAG_DONE);
|
screen->DrawText (BigFont, CR_UNTRANSLATED, 50, 115, "SECRETS", DTA_Clean, true, DTA_Shadow, true, TAG_DONE);
|
||||||
screen->DrawText (CR_UNTRANSLATED, 50, 115, "SECRETS", DTA_Clean, true, DTA_Shadow, true, TAG_DONE);
|
|
||||||
|
|
||||||
int slashpos = gameinfo.gametype==GAME_Strife? 235:237;
|
int slashpos = gameinfo.gametype==GAME_Strife? 235:237;
|
||||||
int countpos = gameinfo.gametype==GAME_Strife? 185:200;
|
int countpos = gameinfo.gametype==GAME_Strife? 185:200;
|
||||||
if (sp_state >= 2)
|
if (sp_state >= 2)
|
||||||
{
|
{
|
||||||
WI_drawNum (countpos, 65, cnt_kills[0], 3, false);
|
WI_drawNum (countpos, 65, cnt_kills[0], 3, false);
|
||||||
WI_DrawCharPatch (slash, slashpos, 65);
|
WI_DrawCharPatch ('/', slashpos, 65);
|
||||||
WI_drawNum (248, 65, wbs->maxkills, 3, false);
|
WI_drawNum (248, 65, wbs->maxkills, 3, false);
|
||||||
}
|
}
|
||||||
if (sp_state >= 4)
|
if (sp_state >= 4)
|
||||||
{
|
{
|
||||||
WI_drawNum (countpos, 90, cnt_items[0], 3, false);
|
WI_drawNum (countpos, 90, cnt_items[0], 3, false);
|
||||||
WI_DrawCharPatch (slash, slashpos, 90);
|
WI_DrawCharPatch ('/', slashpos, 90);
|
||||||
WI_drawNum (248, 90, wbs->maxitems, 3, false);
|
WI_drawNum (248, 90, wbs->maxitems, 3, false);
|
||||||
}
|
}
|
||||||
if (sp_state >= 6)
|
if (sp_state >= 6)
|
||||||
{
|
{
|
||||||
WI_drawNum (countpos, 115, cnt_secret[0], 3, false);
|
WI_drawNum (countpos, 115, cnt_secret[0], 3, false);
|
||||||
WI_DrawCharPatch (slash, slashpos, 115);
|
WI_DrawCharPatch ('/', slashpos, 115);
|
||||||
WI_drawNum (248, 115, wbs->maxsecret, 3, false);
|
WI_drawNum (248, 115, wbs->maxsecret, 3, false);
|
||||||
}
|
}
|
||||||
if (sp_state >= 8)
|
if (sp_state >= 8)
|
||||||
{
|
{
|
||||||
screen->DrawText (CR_UNTRANSLATED, 85, 160, "TIME",
|
screen->DrawText (BigFont, CR_UNTRANSLATED, 85, 160, "TIME",
|
||||||
DTA_Clean, true, DTA_Shadow, true, TAG_DONE);
|
DTA_Clean, true, DTA_Shadow, true, TAG_DONE);
|
||||||
WI_drawTime (249, 160, cnt_time);
|
WI_drawTime (249, 160, cnt_time);
|
||||||
if (wi_showtotaltime)
|
if (wi_showtotaltime)
|
||||||
|
@ -1859,7 +1833,6 @@ void WI_drawStats (void)
|
||||||
WI_drawTime (249, 180, cnt_total_time);
|
WI_drawTime (249, 180, cnt_total_time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
screen->SetFont (SmallFont);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1950,13 +1923,8 @@ void WI_Ticker(void)
|
||||||
|
|
||||||
void WI_loadData(void)
|
void WI_loadData(void)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
char name[9];
|
|
||||||
|
|
||||||
if (gameinfo.gametype & GAME_DoomChex)
|
if (gameinfo.gametype & GAME_DoomChex)
|
||||||
{
|
{
|
||||||
wiminus = TexMan["WIMINUS"]; // minus sign
|
|
||||||
percent = TexMan["WIPCNT"]; // percent sign
|
|
||||||
finished = TexMan["WIF"]; // "finished"
|
finished = TexMan["WIF"]; // "finished"
|
||||||
entering = TexMan["WIENTER"]; // "entering"
|
entering = TexMan["WIENTER"]; // "entering"
|
||||||
kills = TexMan["WIOSTK"]; // "kills"
|
kills = TexMan["WIOSTK"]; // "kills"
|
||||||
|
@ -1964,30 +1932,19 @@ void WI_loadData(void)
|
||||||
sp_secret = TexMan["WISCRT2"]; // "secret"
|
sp_secret = TexMan["WISCRT2"]; // "secret"
|
||||||
items = TexMan["WIOSTI"]; // "items"
|
items = TexMan["WIOSTI"]; // "items"
|
||||||
frags = TexMan["WIFRGS"]; // "frgs"
|
frags = TexMan["WIFRGS"]; // "frgs"
|
||||||
colon = TexMan["WICOLON"]; // ":"
|
|
||||||
timepic = TexMan["WITIME"]; // "time"
|
timepic = TexMan["WITIME"]; // "time"
|
||||||
sucks = TexMan["WISUCKS"]; // "sucks"
|
sucks = TexMan["WISUCKS"]; // "sucks"
|
||||||
par = TexMan["WIPAR"]; // "par"
|
par = TexMan["WIPAR"]; // "par"
|
||||||
killers = TexMan["WIKILRS"]; // "killers" (vertical]
|
killers = TexMan["WIKILRS"]; // "killers" (vertical]
|
||||||
victims = TexMan["WIVCTMS"]; // "victims" (horiz]
|
victims = TexMan["WIVCTMS"]; // "victims" (horiz]
|
||||||
total = TexMan["WIMSTT"]; // "total"
|
total = TexMan["WIMSTT"]; // "total"
|
||||||
star = TexMan["STFST01"]; // your face
|
star = TexMan["STFST01"]; // your face
|
||||||
bstar = TexMan["STFDEAD0"]; // dead face
|
bstar = TexMan["STFDEAD0"]; // dead face
|
||||||
p = TexMan["STPBANY"];
|
p = TexMan["STPBANY"];
|
||||||
|
|
||||||
for (i = 0; i < 10; i++)
|
|
||||||
{ // numbers 0-9
|
|
||||||
mysnprintf (name, countof(name), "WINUM%d", i);
|
|
||||||
num[i] = TexMan[name];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (gameinfo.gametype & GAME_Raven)
|
else if (gameinfo.gametype & GAME_Raven)
|
||||||
{
|
{
|
||||||
wiminus = TexMan["FONTB13"];
|
if (gameinfo.gametype == GAME_Heretic)
|
||||||
percent = TexMan["FONTB05"];
|
|
||||||
colon = TexMan["FONTB26"];
|
|
||||||
slash = TexMan["FONTB15"];
|
|
||||||
if (gameinfo.gametype==GAME_Heretic)
|
|
||||||
{
|
{
|
||||||
star = TexMan["FACEA0"];
|
star = TexMan["FACEA0"];
|
||||||
bstar = TexMan["FACEB0"];
|
bstar = TexMan["FACEB0"];
|
||||||
|
@ -1998,34 +1955,19 @@ void WI_loadData(void)
|
||||||
star = BigFont->GetChar('*', &dummywidth); // just a dummy to avoid an error if it is being used
|
star = BigFont->GetChar('*', &dummywidth); // just a dummy to avoid an error if it is being used
|
||||||
bstar = star;
|
bstar = star;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 10; i++)
|
|
||||||
{
|
|
||||||
mysnprintf (name, countof(name), "FONTB%d", 16 + i);
|
|
||||||
num[i] = TexMan[name];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else // Strife needs some handling, too!
|
else // Strife needs some handling, too!
|
||||||
{
|
{
|
||||||
int dummywidth;
|
int dummywidth;
|
||||||
wiminus = BigFont->GetChar('-', &dummywidth);
|
|
||||||
percent = BigFont->GetChar('%', &dummywidth);
|
|
||||||
colon = BigFont->GetChar(':', &dummywidth);
|
|
||||||
slash = BigFont->GetChar('/', &dummywidth);
|
|
||||||
star = BigFont->GetChar('*', &dummywidth); // just a dummy to avoid an error if it is being used
|
star = BigFont->GetChar('*', &dummywidth); // just a dummy to avoid an error if it is being used
|
||||||
bstar = star;
|
bstar = star;
|
||||||
for (i = 0; i < 10; i++)
|
|
||||||
{
|
|
||||||
num[i] = BigFont->GetChar('0'+i, &dummywidth);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use the local level structure which can be overridden by hubs if they eventually get names!
|
// Use the local level structure which can be overridden by hubs if they eventually get names!
|
||||||
lnametexts[0] = level.level_name;
|
lnametexts[0] = level.level_name;
|
||||||
|
|
||||||
level_info_t * li = FindLevelInfo(wbs->next);
|
level_info_t *li = FindLevelInfo(wbs->next);
|
||||||
if (li) lnametexts[1] = G_MaybeLookupLevelName(li);
|
lnametexts[1] = li ? G_MaybeLookupLevelName(li) : NULL;
|
||||||
else lnametexts[1]=NULL;
|
|
||||||
|
|
||||||
WI_LoadBackground(false);
|
WI_LoadBackground(false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,3 +45,23 @@ INDEXFONT_RAVEN
|
||||||
8 SMALLIN8
|
8 SMALLIN8
|
||||||
9 SMALLIN9
|
9 SMALLIN9
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Doom and Chex intermissions use special text glyphs. The Raven and Strife
|
||||||
|
// games just use the standard big font.
|
||||||
|
|
||||||
|
IntermissionFont_Doom
|
||||||
|
{
|
||||||
|
% WIPCNT
|
||||||
|
: WICOLON
|
||||||
|
0 WINUM0
|
||||||
|
1 WINUM1
|
||||||
|
2 WINUM2
|
||||||
|
3 WINUM3
|
||||||
|
4 WINUM4
|
||||||
|
5 WINUM5
|
||||||
|
6 WINUM6
|
||||||
|
7 WINUM7
|
||||||
|
8 WINUM8
|
||||||
|
9 WINUM9
|
||||||
|
- WIMINUS
|
||||||
|
}
|
||||||
|
|
|
@ -207,3 +207,13 @@ Console:
|
||||||
Flat:
|
Flat:
|
||||||
#808080
|
#808080
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Cyan
|
||||||
|
{
|
||||||
|
#001F1F #00F0F0
|
||||||
|
Console:
|
||||||
|
#000000 #007F7F 0 127
|
||||||
|
#00FFFF #FEFFFF 128 256
|
||||||
|
Flat:
|
||||||
|
#00DDDD
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue