mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 05:51:20 +00:00
Silence "truncation of floating point value" warnings in gzdoom.pk3.
This commit is contained in:
parent
8919a991a7
commit
659de5d2d8
2 changed files with 12 additions and 12 deletions
|
@ -127,7 +127,7 @@ class LoadSaveMenu : ListMenu
|
|||
savepicHeight = 135*screen.GetHeight() / 400;
|
||||
|
||||
FontScale = max(screen.GetHeight() / 480, 1);
|
||||
rowHeight = max((NewConsoleFont.GetHeight() + 1) * FontScale, 1);
|
||||
rowHeight = int(max((NewConsoleFont.GetHeight() + 1) * FontScale, 1));
|
||||
|
||||
listboxLeft = savepicLeft + savepicWidth + 14;
|
||||
listboxTop = savepicTop;
|
||||
|
@ -216,7 +216,7 @@ class LoadSaveMenu : ListMenu
|
|||
if (manager.SavegameCount() == 0)
|
||||
{
|
||||
String text = Stringtable.Localize("$MNU_NOFILES");
|
||||
int textlen = NewConsoleFont.StringWidth(text) * FontScale;
|
||||
int textlen = int(NewConsoleFont.StringWidth(text) * FontScale);
|
||||
|
||||
screen.DrawText (NewConsoleFont, Font.CR_GOLD, (listboxLeft+(listboxWidth-textlen)/2) / FontScale, (listboxTop+(listboxHeight-rowHeight)/2) / FontScale, text,
|
||||
DTA_VirtualWidthF, screen.GetWidth() / FontScale, DTA_VirtualHeightF, screen.GetHeight() / FontScale, DTA_KeepRatio, true);
|
||||
|
@ -259,7 +259,7 @@ class LoadSaveMenu : ListMenu
|
|||
else
|
||||
{
|
||||
String s = mInput.GetText() .. NewConsoleFont.GetCursor();
|
||||
int length = NewConsoleFont.StringWidth(s) * FontScale;
|
||||
int length = int(NewConsoleFont.StringWidth(s) * FontScale);
|
||||
int displacement = min(0, listboxWidth - 2 - length);
|
||||
screen.DrawText (NewConsoleFont, Font.CR_WHITE, (listboxLeft + 1 + displacement) / FontScale, (listboxTop+rowHeight*i + FontScale) / FontScale, s,
|
||||
DTA_VirtualWidthF, screen.GetWidth() / FontScale, DTA_VirtualHeightF, screen.GetHeight() / FontScale, DTA_KeepRatio, true);
|
||||
|
@ -277,7 +277,7 @@ class LoadSaveMenu : ListMenu
|
|||
|
||||
void UpdateSaveComment()
|
||||
{
|
||||
BrokenSaveComment = NewConsoleFont.BreakLines(manager.SaveCommentString, commentWidth / FontScale);
|
||||
BrokenSaveComment = NewConsoleFont.BreakLines(manager.SaveCommentString, int(commentWidth / FontScale));
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
|
|
@ -21,7 +21,7 @@ class CoopStatusScreen : StatusScreen
|
|||
ng_state = 1;
|
||||
displayFont = NewSmallFont;
|
||||
FontScale = max(screen.GetHeight() / 480, 1);
|
||||
RowHeight = max((displayFont.GetHeight() + 1) * FontScale, 1);
|
||||
RowHeight = int(max((displayFont.GetHeight() + 1) * FontScale, 1));
|
||||
|
||||
cnt_pause = Thinker.TICRATE;
|
||||
|
||||
|
@ -229,7 +229,7 @@ class CoopStatusScreen : StatusScreen
|
|||
Vector2 readyoffset = TexMan.GetScaledOffset(readyico);
|
||||
height = int(readysize.Y - readyoffset.Y);
|
||||
maxiconheight = MAX(height, maxiconheight);
|
||||
height = displayFont.GetHeight() * FontScale;
|
||||
height = int(displayFont.GetHeight() * FontScale);
|
||||
lineheight = MAX(height, maxiconheight * CleanYfac);
|
||||
ypadding = (lineheight - height + 1) / 2;
|
||||
y += CleanYfac;
|
||||
|
@ -238,11 +238,11 @@ class CoopStatusScreen : StatusScreen
|
|||
text_secret = Stringtable.Localize("$SCORE_SECRET");
|
||||
text_kills = Stringtable.Localize("$SCORE_KILLS");
|
||||
|
||||
icon_x = 8 * FontScale;
|
||||
name_x = icon_x + maxscorewidth * FontScale;
|
||||
kills_x = name_x + (maxnamewidth + 1 + MAX(displayFont.StringWidth("XXXXXXXXXX"), displayFont.StringWidth(text_kills)) + 16) * FontScale;
|
||||
bonus_x = kills_x + ((bonus_len = displayFont.StringWidth(text_bonus)) + 16) * FontScale;
|
||||
secret_x = bonus_x + ((secret_len = displayFont.StringWidth(text_secret)) + 16) * FontScale;
|
||||
icon_x = int(8 * FontScale);
|
||||
name_x = int(icon_x + maxscorewidth * FontScale);
|
||||
kills_x = int(name_x + (maxnamewidth + 1 + MAX(displayFont.StringWidth("XXXXXXXXXX"), displayFont.StringWidth(text_kills)) + 16) * FontScale);
|
||||
bonus_x = int(kills_x + ((bonus_len = displayFont.StringWidth(text_bonus)) + 16) * FontScale);
|
||||
secret_x = int(bonus_x + ((secret_len = displayFont.StringWidth(text_secret)) + 16) * FontScale);
|
||||
|
||||
x = (screen.GetWidth() - secret_x) >> 1;
|
||||
icon_x += x;
|
||||
|
@ -256,7 +256,7 @@ class CoopStatusScreen : StatusScreen
|
|||
drawTextScaled(displayFont, kills_x - displayFont.StringWidth(text_kills) * FontScale, y, text_kills, FontScale, textcolor);
|
||||
drawTextScaled(displayFont, bonus_x - bonus_len * FontScale, y, text_bonus, FontScale, textcolor);
|
||||
drawTextScaled(displayFont, secret_x - secret_len * FontScale, y, text_secret, FontScale, textcolor);
|
||||
y += height + 6 * FontScale;
|
||||
y += int(height + 6 * FontScale);
|
||||
|
||||
missed_kills = wbs.maxkills;
|
||||
missed_items = wbs.maxitems;
|
||||
|
|
Loading…
Reference in a new issue