From 7b8bf96c2bf0e35d760325e3e09bf0d6703d7cc8 Mon Sep 17 00:00:00 2001 From: tron Date: Fri, 26 Nov 2004 16:55:35 +0000 Subject: [PATCH] (svn r822) Use a struct instead of pairs of bytes for the string colormap. While here give the string colormap a more canonical name. --- gfx.c | 4 ++-- table/palettes.h | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/gfx.c b/gfx.c index 9b24cbf6ae..63c523643e 100644 --- a/gfx.c +++ b/gfx.c @@ -487,8 +487,8 @@ int DoDrawString(const byte *string, int x, int y, byte color) { if (color != 0xFF) { switch_color:; - _string_colorremap[1] = StringColormap[color][0]; - _string_colorremap[2] = StringColormap[color][1]; + _string_colorremap[1] = _string_colormap[color].text; + _string_colorremap[2] = _string_colormap[color].shadow; _color_remap_ptr = _string_colorremap; } } diff --git a/table/palettes.h b/table/palettes.h index 184a2a495a..efee5f401a 100644 --- a/table/palettes.h +++ b/table/palettes.h @@ -95,9 +95,12 @@ static const ExtraPaletteValues _extra_palette_values = { }; // Color table for colors in lang files (e.g. {BLACK}) -// 1st color: text -// 2nd color: shadow -static const byte StringColormap[17][2] = { +typedef struct StringColor { + byte text; + byte shadow; +} StringColor; + +static const StringColor _string_colormap[] = { { 150, 215 }, // BLUE { 12, 215 }, // SILVER { 189, 215 }, // GOLD