mirror of
https://github.com/ZDoom/gzdoom-last-svn.git
synced 2025-06-04 11:10:48 +00:00
Update to ZDoom r1297:
- WI_drawLF() now draws the level name at the top of the screen, always. - Fixed: disabling lowerHealthCap didn't affect interpolateHealth. - 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. - Fixed: compatf_limitpain must check for 21 Lost Souls, not 20. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@245 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
parent
aaf24fa770
commit
f0d12d0449
49 changed files with 560 additions and 612 deletions
|
@ -48,18 +48,13 @@
|
|||
#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;
|
||||
}
|
||||
|
||||
void STACK_ARGS DCanvas::DrawChar (int normalcolor, int x, int y, BYTE character, ...)
|
||||
{
|
||||
if (Font == NULL)
|
||||
if (font == NULL)
|
||||
return;
|
||||
|
||||
if (normalcolor >= NumTextColors)
|
||||
|
@ -68,9 +63,9 @@ void STACK_ARGS DCanvas::DrawChar (int normalcolor, int x, int y, BYTE character
|
|||
FTexture *pic;
|
||||
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_start (taglist, character);
|
||||
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
|
||||
//
|
||||
// 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;
|
||||
DWORD tag;
|
||||
|
@ -103,16 +98,16 @@ void STACK_ARGS DCanvas::DrawText (int normalcolor, int x, int y, const char *st
|
|||
int kerning;
|
||||
FTexture *pic;
|
||||
|
||||
if (Font == NULL || string == NULL)
|
||||
if (font == NULL || string == NULL)
|
||||
return;
|
||||
|
||||
if (normalcolor >= NumTextColors)
|
||||
normalcolor = CR_UNTRANSLATED;
|
||||
boldcolor = normalcolor ? normalcolor - 1 : NumTextColors - 1;
|
||||
|
||||
range = Font->GetColorTranslation ((EColorRange)normalcolor);
|
||||
height = Font->GetHeight () + 1;
|
||||
kerning = Font->GetDefaultKerning ();
|
||||
range = font->GetColorTranslation ((EColorRange)normalcolor);
|
||||
height = font->GetHeight () + 1;
|
||||
kerning = font->GetDefaultKerning ();
|
||||
|
||||
ch = (const BYTE *)string;
|
||||
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);
|
||||
if (newcolor != CR_UNDEFINED)
|
||||
{
|
||||
range = Font->GetColorTranslation (newcolor);
|
||||
range = font->GetColorTranslation (newcolor);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
@ -226,7 +221,7 @@ void STACK_ARGS DCanvas::DrawText (int normalcolor, int x, int y, const char *st
|
|||
continue;
|
||||
}
|
||||
|
||||
if (NULL != (pic = Font->GetChar (c, &w)))
|
||||
if (NULL != (pic = font->GetChar (c, &w)))
|
||||
{
|
||||
va_list taglist;
|
||||
va_start (taglist, string);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue