- fixed uninitialized variable and a few warnings.

This commit is contained in:
Christoph Oelckers 2019-02-18 23:36:56 +01:00
parent b98c3b766c
commit c5a6c72719
3 changed files with 10 additions and 10 deletions

View file

@ -361,7 +361,7 @@ void FFont::ReadSheetFont(TArray<FolderEntry> &folderdata, int width, int height
tex->bNoDecals = false;
tex->SourceLump = -1; // We do not really care.
TexMan.AddTexture(tex);
charMap.Insert(position + x + y * numtex_x, tex);
charMap.Insert(int(position) + x + y * numtex_x, tex);
}
}
}

View file

@ -696,6 +696,7 @@ bool DIntermissionController::NextPage ()
// last page
return false;
}
bg.SetInvalid();
if (mScreen != NULL)
{

View file

@ -63,9 +63,8 @@ FTexture * BuildTextTexture(FFont *font, const char *string, int textcolor)
{
int w;
const uint8_t *ch;
int c;
double cx;
double cy;
int cx;
int cy;
FRemapTable *range;
int kerning;
FTexture *pic;
@ -99,10 +98,10 @@ FTexture * BuildTextTexture(FFont *font, const char *string, int textcolor)
{
auto img = pic->GetImage();
auto offsets = img->GetOffsets();
double x = cx - offsets.first;
double y = cy - offsets.second;
double ww = img->GetWidth();
double h = img->GetHeight();
int x = cx - offsets.first;
int y = cy - offsets.second;
int ww = img->GetWidth();
int h = img->GetHeight();
box.AddToRect(x, y);
box.AddToRect(x + ww, y + h);
@ -139,8 +138,8 @@ FTexture * BuildTextTexture(FFont *font, const char *string, int textcolor)
{
auto img = pic->GetImage();
auto offsets = img->GetOffsets();
double x = cx - offsets.first;
double y = cy - offsets.second;
int x = cx - offsets.first;
int y = cy - offsets.second;
auto &tp = part[part.Reserve(1)];