- fixed declaration of ACS getters for status bar.

- fixed some uninitialized variables in font print code.
This commit is contained in:
Christoph Oelckers 2017-03-29 21:54:11 +02:00
parent 01b095c911
commit b38934b532
2 changed files with 9 additions and 9 deletions

View file

@ -80,7 +80,7 @@ void DCanvas::DrawChar (FFont *font, int normalcolor, double x, double y, int ch
{ {
return; return;
} }
PalEntry color; PalEntry color = 0xffffffff;
parms.remap = font->GetColorTranslation((EColorRange)normalcolor, &color); parms.remap = font->GetColorTranslation((EColorRange)normalcolor, &color);
parms.color = PalEntry((color.a * parms.color.a) / 255, (color.r * parms.color.r) / 255, (color.g * parms.color.g) / 255, (color.b * parms.color.b) / 255); parms.color = PalEntry((color.a * parms.color.a) / 255, (color.r * parms.color.r) / 255, (color.g * parms.color.g) / 255, (color.b * parms.color.b) / 255);
DrawTextureParms(pic, parms); DrawTextureParms(pic, parms);
@ -104,7 +104,7 @@ void DCanvas::DrawChar(FFont *font, int normalcolor, double x, double y, int cha
uint32_t tag = ListGetInt(args); uint32_t tag = ListGetInt(args);
bool res = ParseDrawTextureTags(pic, x, y, tag, args, &parms, false); bool res = ParseDrawTextureTags(pic, x, y, tag, args, &parms, false);
if (!res) return; if (!res) return;
PalEntry color; PalEntry color = 0xffffffff;
parms.remap = font->GetColorTranslation((EColorRange)normalcolor, &color); parms.remap = font->GetColorTranslation((EColorRange)normalcolor, &color);
parms.color = PalEntry((color.a * parms.color.a) / 255, (color.r * parms.color.r) / 255, (color.g * parms.color.g) / 255, (color.b * parms.color.b) / 255); parms.color = PalEntry((color.a * parms.color.a) / 255, (color.r * parms.color.r) / 255, (color.g * parms.color.g) / 255, (color.b * parms.color.b) / 255);
DrawTextureParms(pic, parms); DrawTextureParms(pic, parms);
@ -156,9 +156,9 @@ void DCanvas::DrawTextCommon(FFont *font, int normalcolor, double x, double y, c
boldcolor = normalcolor ? normalcolor - 1 : NumTextColors - 1; boldcolor = normalcolor ? normalcolor - 1 : NumTextColors - 1;
PalEntry colorparm = parms.color; PalEntry colorparm = parms.color;
PalEntry color; PalEntry color = 0xffffffff;
range = font->GetColorTranslation((EColorRange)normalcolor, &color); range = font->GetColorTranslation((EColorRange)normalcolor, &color);
parms.color = PalEntry((color.a * colorparm.a) / 255, (color.r * colorparm.r) / 255, (color.g * colorparm.g) / 255, (color.b * colorparm.b) / 255); parms.color = PalEntry(colorparm.a, (color.r * colorparm.r) / 255, (color.g * colorparm.g) / 255, (color.b * colorparm.b) / 255);
kerning = font->GetDefaultKerning(); kerning = font->GetDefaultKerning();
@ -179,7 +179,7 @@ void DCanvas::DrawTextCommon(FFont *font, int normalcolor, double x, double y, c
if (newcolor != CR_UNDEFINED) if (newcolor != CR_UNDEFINED)
{ {
range = font->GetColorTranslation(newcolor, &color); range = font->GetColorTranslation(newcolor, &color);
parms.color = PalEntry((color.a * colorparm.a) / 255, (color.r * colorparm.r) / 255, (color.g * colorparm.g) / 255, (color.b * colorparm.b) / 255); parms.color = PalEntry(colorparm.a, (color.r * colorparm.r) / 255, (color.g * colorparm.g) / 255, (color.b * colorparm.b) / 255);
} }
continue; continue;
} }

View file

@ -426,10 +426,10 @@ class BaseStatusBar native ui
} }
// These cannot be done in ZScript. // These cannot be done in ZScript.
native String GetGlobalACSString(int index); native static String GetGlobalACSString(int index);
native String GetGlobalACSArrayString(int arrayno, int index); native static String GetGlobalACSArrayString(int arrayno, int index);
native int GetGlobalACSValue(int index); native static int GetGlobalACSValue(int index);
native int GetGlobalACSArrayValue(int arrayno, int index); native static int GetGlobalACSArrayValue(int arrayno, int index);
//============================================================================ //============================================================================
// //