Mercurial > hg > openttd
changeset 16902:b95acd0a1ed0 draft
(svn r21637) -Codechange: make it more clear that IS_PALETTE_COLOUR belongs to TextColour
author | rubidium <rubidium@openttd.org> |
---|---|
date | Sat, 25 Dec 2010 19:47:15 +0000 |
parents | 3edad3267ff6 |
children | fadc91833566 |
files | src/company_cmd.cpp src/gfx.cpp src/gfx_type.h src/network/network_chat_gui.cpp src/viewport.cpp |
diffstat | 5 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/company_cmd.cpp +++ b/src/company_cmd.cpp @@ -118,8 +118,8 @@ */ uint16 GetDrawStringCompanyColour(CompanyID company) { - if (!Company::IsValidID(company)) return _colour_gradient[COLOUR_WHITE][4] | IS_PALETTE_COLOUR; - return (_colour_gradient[_company_colours[company]][4]) | IS_PALETTE_COLOUR; + if (!Company::IsValidID(company)) return _colour_gradient[COLOUR_WHITE][4] | TC_IS_PALETTE_COLOUR; + return (_colour_gradient[_company_colours[company]][4]) | TC_IS_PALETTE_COLOUR; } /**
--- a/src/gfx.cpp +++ b/src/gfx.cpp @@ -284,8 +284,8 @@ { if (colour == TC_INVALID) return; - if (colour & IS_PALETTE_COLOUR) { - _string_colourremap[1] = colour & ~IS_PALETTE_COLOUR; + if (colour & TC_IS_PALETTE_COLOUR) { + _string_colourremap[1] = colour & ~TC_IS_PALETTE_COLOUR; _string_colourremap[2] = (_use_palette == PAL_DOS) ? 1 : 215; } else { _string_colourremap[1] = _string_colourmap[_use_palette][colour].text;
--- a/src/gfx_type.h +++ b/src/gfx_type.h @@ -224,7 +224,7 @@ TC_BLACK = 0x10, TC_INVALID = 0xFF, - IS_PALETTE_COLOUR = 0x100, ///< colour value is already a real palette colour index, not an index of a StringColour + TC_IS_PALETTE_COLOUR = 0x100, ///< Colour value is already a real palette colour index, not an index of a StringColour. }; DECLARE_ENUM_AS_BIT_SET(TextColour)
--- a/src/network/network_chat_gui.cpp +++ b/src/network/network_chat_gui.cpp @@ -103,7 +103,7 @@ /* The default colour for a message is company colour. Replace this with * white for any additional lines */ - cmsg->colour = (bufp == buf && (colour & IS_PALETTE_COLOUR)) ? colour : TC_WHITE; + cmsg->colour = (bufp == buf && (colour & TC_IS_PALETTE_COLOUR)) ? colour : TC_WHITE; cmsg->remove_time = _realtime_tick + duration * 1000; bufp += strlen(bufp) + 1; // jump to 'next line' in the formatted string
--- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -1407,9 +1407,9 @@ /* if we didn't draw a rectangle, or if transparant building is on, * draw the text in the colour the rectangle would have */ if (IsTransparencySet(TO_SIGNS) && ss->string != STR_WHITE_SIGN) { - /* Real colours need the IS_PALETTE_COLOUR flag + /* Real colours need the TC_IS_PALETTE_COLOUR flag * otherwise colours from _string_colourmap are assumed. */ - colour = (TextColour)_colour_gradient[ss->colour][6] | IS_PALETTE_COLOUR; + colour = (TextColour)_colour_gradient[ss->colour][6] | TC_IS_PALETTE_COLOUR; } /* Draw the rectangle if 'tranparent station signs' is off,