(svn r822) Use a struct instead of pairs of bytes for the string colormap.

While here give the string colormap a more canonical name.
pull/155/head
tron 20 years ago
parent d801ca16a3
commit 7b8bf96c2b

@ -487,8 +487,8 @@ int DoDrawString(const byte *string, int x, int y, byte color) {
if (color != 0xFF) { if (color != 0xFF) {
switch_color:; switch_color:;
_string_colorremap[1] = StringColormap[color][0]; _string_colorremap[1] = _string_colormap[color].text;
_string_colorremap[2] = StringColormap[color][1]; _string_colorremap[2] = _string_colormap[color].shadow;
_color_remap_ptr = _string_colorremap; _color_remap_ptr = _string_colorremap;
} }
} }

@ -95,9 +95,12 @@ static const ExtraPaletteValues _extra_palette_values = {
}; };
// Color table for colors in lang files (e.g. {BLACK}) // Color table for colors in lang files (e.g. {BLACK})
// 1st color: text typedef struct StringColor {
// 2nd color: shadow byte text;
static const byte StringColormap[17][2] = { byte shadow;
} StringColor;
static const StringColor _string_colormap[] = {
{ 150, 215 }, // BLUE { 150, 215 }, // BLUE
{ 12, 215 }, // SILVER { 12, 215 }, // SILVER
{ 189, 215 }, // GOLD { 189, 215 }, // GOLD

Loading…
Cancel
Save