mirror of https://github.com/OpenTTD/OpenTTD
(svn r9654) -Fix: Add string colours for the DOS palette and use them when playing with the DOS data files.
parent
792339554f
commit
2a32b3b8db
|
@ -652,10 +652,11 @@ int DoDrawString(const char *string, int x, int y, uint16 real_color)
|
||||||
switch_color:;
|
switch_color:;
|
||||||
if (real_color & IS_PALETTE_COLOR) {
|
if (real_color & IS_PALETTE_COLOR) {
|
||||||
_string_colorremap[1] = color;
|
_string_colorremap[1] = color;
|
||||||
_string_colorremap[2] = 215;
|
_string_colorremap[2] = _use_dos_palette ? 1 : 215;
|
||||||
} else {
|
} else {
|
||||||
_string_colorremap[1] = _string_colormap[color].text;
|
uint palette = _use_dos_palette ? 1 : 0;
|
||||||
_string_colorremap[2] = _string_colormap[color].shadow;
|
_string_colorremap[1] = _string_colormap[palette][color].text;
|
||||||
|
_string_colorremap[2] = _string_colormap[palette][color].shadow;
|
||||||
}
|
}
|
||||||
_color_remap_ptr = _string_colorremap;
|
_color_remap_ptr = _string_colorremap;
|
||||||
}
|
}
|
||||||
|
|
|
@ -178,22 +178,43 @@ struct StringColor {
|
||||||
byte shadow;
|
byte shadow;
|
||||||
};
|
};
|
||||||
|
|
||||||
static const StringColor _string_colormap[] = {
|
static const StringColor _string_colormap[][17] = {
|
||||||
{ 150, 215 }, // BLUE
|
{ /* Windows palette. */
|
||||||
{ 12, 215 }, // SILVER
|
{ 150, 215 }, // BLUE
|
||||||
{ 189, 215 }, // GOLD
|
{ 12, 215 }, // SILVER
|
||||||
{ 184, 215 }, // RED
|
{ 189, 215 }, // GOLD
|
||||||
{ 174, 215 }, // PURPLE
|
{ 184, 215 }, // RED
|
||||||
{ 30, 215 }, // LTBROWN
|
{ 174, 215 }, // PURPLE
|
||||||
{ 195, 215 }, // ORANGE
|
{ 30, 215 }, // LTBROWN
|
||||||
{ 209, 215 }, // GREEN
|
{ 195, 215 }, // ORANGE
|
||||||
{ 68, 215 }, // YELLOW
|
{ 209, 215 }, // GREEN
|
||||||
{ 95, 215 }, // DKGREEN
|
{ 68, 215 }, // YELLOW
|
||||||
{ 79, 215 }, // CREAM
|
{ 95, 215 }, // DKGREEN
|
||||||
{ 116, 215 }, // BROWN
|
{ 79, 215 }, // CREAM
|
||||||
{ 15, 215 }, // WHITE
|
{ 116, 215 }, // BROWN
|
||||||
{ 152, 215 }, // LTBLUE
|
{ 15, 215 }, // WHITE
|
||||||
{ 32, 215 }, // GRAY
|
{ 152, 215 }, // LTBLUE
|
||||||
{ 133, 215 }, // DKBLUE
|
{ 32, 215 }, // GRAY
|
||||||
{ 215, 0 }, // BLACK
|
{ 133, 215 }, // DKBLUE
|
||||||
|
{ 215, 0 }, // BLACK
|
||||||
|
},
|
||||||
|
{ /* DOS palette. */
|
||||||
|
{ 150, 1 }, // BLUE
|
||||||
|
{ 12, 1 }, // SILVER
|
||||||
|
{ 189, 1 }, // GOLD
|
||||||
|
{ 184, 1 }, // RED
|
||||||
|
{ 174, 1 }, // PURPLE
|
||||||
|
{ 30, 1 }, // LTBROWN
|
||||||
|
{ 195, 1 }, // ORANGE
|
||||||
|
{ 209, 1 }, // GREEN
|
||||||
|
{ 68, 1 }, // YELLOW
|
||||||
|
{ 95, 1 }, // DKGREEN
|
||||||
|
{ 79, 1 }, // CREAM
|
||||||
|
{ 116, 1 }, // BROWN
|
||||||
|
{ 15, 1 }, // WHITE
|
||||||
|
{ 152, 1 }, // LTBLUE
|
||||||
|
{ 6, 1 }, // GRAY
|
||||||
|
{ 133, 1 }, // DKBLUE
|
||||||
|
{ 1, 0 }, // BLACK
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue