mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-14 08:30:50 +00:00
- got rid of all DTA_Translation uses.
This commit is contained in:
parent
dadc8e2ec2
commit
470dc138c6
5 changed files with 11 additions and 24 deletions
|
@ -332,7 +332,6 @@ void DTextEnterMenu::Drawer ()
|
||||||
const int ch = InputGridChars[y * INPUTGRID_WIDTH + x];
|
const int ch = InputGridChars[y * INPUTGRID_WIDTH + x];
|
||||||
FTexture *pic = SmallFont->GetChar(ch, &width);
|
FTexture *pic = SmallFont->GetChar(ch, &width);
|
||||||
EColorRange color;
|
EColorRange color;
|
||||||
FRemapTable *remap;
|
|
||||||
|
|
||||||
// The highlighted character is yellow; the rest are dark gray.
|
// The highlighted character is yellow; the rest are dark gray.
|
||||||
color = (x == InputGridX && y == InputGridY) ? CR_YELLOW : CR_DARKGRAY;
|
color = (x == InputGridX && y == InputGridY) ? CR_YELLOW : CR_DARKGRAY;
|
||||||
|
@ -344,6 +343,7 @@ void DTextEnterMenu::Drawer ()
|
||||||
}
|
}
|
||||||
else if (ch == ' ')
|
else if (ch == ' ')
|
||||||
{
|
{
|
||||||
|
FRemapTable *remap = SmallFont->GetColorTranslation(color);
|
||||||
// Draw the space as a box outline. We also draw it 50% wider than it really is.
|
// Draw the space as a box outline. We also draw it 50% wider than it really is.
|
||||||
const int x1 = xx + cell_width/2 - width * CleanXfac * 3 / 4;
|
const int x1 = xx + cell_width/2 - width * CleanXfac * 3 / 4;
|
||||||
const int x2 = x1 + width * 3 * CleanXfac / 2;
|
const int x2 = x1 + width * 3 * CleanXfac / 2;
|
||||||
|
|
|
@ -360,13 +360,14 @@ DListMenuItemPlayerDisplay::DListMenuItemPlayerDisplay(FListMenuDescriptor *menu
|
||||||
{
|
{
|
||||||
mOwner = menu;
|
mOwner = menu;
|
||||||
|
|
||||||
|
FRemapTable *bdremap = translationtables[TRANSLATION_Players][MAXPLAYERS + 1];
|
||||||
for (int i = 0; i < 256; i++)
|
for (int i = 0; i < 256; i++)
|
||||||
{
|
{
|
||||||
int r = c1.r + c2.r * i / 255;
|
int r = c1.r + c2.r * i / 255;
|
||||||
int g = c1.g + c2.g * i / 255;
|
int g = c1.g + c2.g * i / 255;
|
||||||
int b = c1.b + c2.b * i / 255;
|
int b = c1.b + c2.b * i / 255;
|
||||||
mRemap.Remap[i] = ColorMatcher.Pick (r, g, b);
|
bdremap->Remap[i] = ColorMatcher.Pick (r, g, b);
|
||||||
mRemap.Palette[i] = PalEntry(255, r, g, b);
|
bdremap->Palette[i] = PalEntry(255, r, g, b);
|
||||||
}
|
}
|
||||||
mBackdrop = new FBackdropTexture;
|
mBackdrop = new FBackdropTexture;
|
||||||
mPlayerClass = NULL;
|
mPlayerClass = NULL;
|
||||||
|
@ -577,7 +578,7 @@ void DListMenuItemPlayerDisplay::Drawer(bool selected)
|
||||||
screen->DrawTexture(mBackdrop, x, y - 1,
|
screen->DrawTexture(mBackdrop, x, y - 1,
|
||||||
DTA_DestWidth, 72 * CleanXfac,
|
DTA_DestWidth, 72 * CleanXfac,
|
||||||
DTA_DestHeight, 80 * CleanYfac,
|
DTA_DestHeight, 80 * CleanYfac,
|
||||||
DTA_Translation, &mRemap,
|
DTA_TranslationIndex, TRANSLATION(TRANSLATION_Players, MAXPLAYERS + 1),
|
||||||
DTA_Masked, true,
|
DTA_Masked, true,
|
||||||
TAG_DONE);
|
TAG_DONE);
|
||||||
|
|
||||||
|
|
|
@ -740,6 +740,8 @@ void R_InitTranslationTables ()
|
||||||
}
|
}
|
||||||
// The menu player also gets a separate translation table
|
// The menu player also gets a separate translation table
|
||||||
PushIdentityTable(TRANSLATION_Players);
|
PushIdentityTable(TRANSLATION_Players);
|
||||||
|
// This one is for the backdrop in the menu
|
||||||
|
PushIdentityTable(TRANSLATION_Players);
|
||||||
|
|
||||||
// The three standard translations from Doom or Heretic (seven for Strife),
|
// The three standard translations from Doom or Heretic (seven for Strife),
|
||||||
// plus the generic ice translation.
|
// plus the generic ice translation.
|
||||||
|
|
|
@ -472,11 +472,6 @@ static inline double ListGetDouble(va_list &tags)
|
||||||
return va_arg(tags, double);
|
return va_arg(tags, double);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline FRemapTable* ListGetTranslation(va_list &tags)
|
|
||||||
{
|
|
||||||
return va_arg(tags, FRemapTable*);
|
|
||||||
}
|
|
||||||
|
|
||||||
// These two options are only being used by the D3D version of the HUD weapon drawer, they serve no purpose anywhere else.
|
// These two options are only being used by the D3D version of the HUD weapon drawer, they serve no purpose anywhere else.
|
||||||
static inline FSpecialColormap * ListGetSpecialColormap(va_list &tags)
|
static inline FSpecialColormap * ListGetSpecialColormap(va_list &tags)
|
||||||
{
|
{
|
||||||
|
@ -512,12 +507,6 @@ static inline double ListGetDouble(VMVa_List &tags)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline FRemapTable* ListGetTranslation(VMVa_List &tags)
|
|
||||||
{
|
|
||||||
ThrowAbortException(X_OTHER, "Invalid tag in draw function");
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline FSpecialColormap * ListGetSpecialColormap(VMVa_List &tags)
|
static inline FSpecialColormap * ListGetSpecialColormap(VMVa_List &tags)
|
||||||
{
|
{
|
||||||
ThrowAbortException(X_OTHER, "Invalid tag in draw function");
|
ThrowAbortException(X_OTHER, "Invalid tag in draw function");
|
||||||
|
@ -731,10 +720,6 @@ bool DCanvas::ParseDrawTextureTags(FTexture *img, double x, double y, DWORD tag,
|
||||||
fillcolorset = true;
|
fillcolorset = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DTA_Translation:
|
|
||||||
parms->remap = ListGetTranslation(tags);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case DTA_TranslationIndex:
|
case DTA_TranslationIndex:
|
||||||
parms->remap = TranslationToTable(ListGetInt(tags));
|
parms->remap = TranslationToTable(ListGetInt(tags));
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -76,8 +76,7 @@ enum
|
||||||
DTA_DestHeight, // height of area to draw to
|
DTA_DestHeight, // height of area to draw to
|
||||||
DTA_Alpha, // alpha value for translucency
|
DTA_Alpha, // alpha value for translucency
|
||||||
DTA_FillColor, // color to stencil onto the destination (RGB is the color for truecolor drawers, A is the palette index for paletted drawers)
|
DTA_FillColor, // color to stencil onto the destination (RGB is the color for truecolor drawers, A is the palette index for paletted drawers)
|
||||||
DTA_Translation, // translation table to recolor the source
|
DTA_TranslationIndex, // translation table to recolor the source
|
||||||
DTA_TranslationIndex,
|
|
||||||
DTA_AlphaChannel, // bool: the source is an alpha channel; used with DTA_FillColor
|
DTA_AlphaChannel, // bool: the source is an alpha channel; used with DTA_FillColor
|
||||||
DTA_Clean, // bool: scale texture size and position by CleanXfac and CleanYfac
|
DTA_Clean, // bool: scale texture size and position by CleanXfac and CleanYfac
|
||||||
DTA_320x200, // bool: scale texture size and position to fit on a virtual 320x200 screen
|
DTA_320x200, // bool: scale texture size and position to fit on a virtual 320x200 screen
|
||||||
|
|
Loading…
Reference in a new issue