1
0
Fork 0

(svn r15428) -Codechange: consistently use colour instead of having both color and colour.

release/0.7
rubidium 2009-02-09 02:57:15 +00:00
parent 90e2465d7d
commit c0a8d09ca7
102 changed files with 862 additions and 862 deletions

View File

@ -258,7 +258,7 @@ struct AISettingsWindow : public Window {
int x = 0; int x = 0;
if (((*it).flags & AICONFIG_BOOLEAN) != 0) { if (((*it).flags & AICONFIG_BOOLEAN) != 0) {
DrawFrameRect(4, y + 2, 23, y + 10, (current_value != 0) ? 6 : 4, (current_value != 0) ? FR_LOWERED : FR_NONE); DrawFrameRect(4, y + 2, 23, y + 10, (current_value != 0) ? COLOUR_GREEN : COLOUR_RED, (current_value != 0) ? FR_LOWERED : FR_NONE);
} else { } else {
DrawArrowButtons(4, y + 2, COLOUR_YELLOW, (this->clicked_button == i) ? 1 + !!this->clicked_increase : 0, current_value > (*it).min_value, current_value < (*it).max_value); DrawArrowButtons(4, y + 2, COLOUR_YELLOW, (this->clicked_button == i) ? 1 + !!this->clicked_increase : 0, current_value > (*it).min_value, current_value < (*it).max_value);
if (it->labels != NULL && it->labels->Find(current_value) != it->labels->End()) { if (it->labels != NULL && it->labels->Find(current_value) != it->labels->End()) {

View File

@ -584,7 +584,7 @@ CommandCost CmdRefitAircraft(TileIndex tile, uint32 flags, uint32 p1, uint32 p2,
u->cargo.Truncate(v->cargo_type == new_cid ? mail : 0); u->cargo.Truncate(v->cargo_type == new_cid ? mail : 0);
v->cargo_type = new_cid; v->cargo_type = new_cid;
v->cargo_subtype = new_subtype; v->cargo_subtype = new_subtype;
v->colormap = PAL_NONE; // invalidate vehicle colour map v->colourmap = PAL_NONE; // invalidate vehicle colour map
InvalidateWindow(WC_VEHICLE_DETAILS, v->index); InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
InvalidateWindow(WC_VEHICLE_DEPOT, v->tile); InvalidateWindow(WC_VEHICLE_DEPOT, v->tile);
InvalidateWindowClassesData(WC_AIRCRAFT_LIST, 0); InvalidateWindowClassesData(WC_AIRCRAFT_LIST, 0);

View File

@ -129,11 +129,11 @@ inline void Blitter_32bppAnim::Draw(const Blitter::BlitterParams *bp, ZoomLevel
break; break;
case BM_TRANSPARENT: case BM_TRANSPARENT:
/* TODO -- We make an assumption here that the remap in fact is transparency, not some color. /* TODO -- We make an assumption here that the remap in fact is transparency, not some colour.
* This is never a problem with the code we produce, but newgrfs can make it fail... or at least: * This is never a problem with the code we produce, but newgrfs can make it fail... or at least:
* we produce a result the newgrf maker didn't expect ;) */ * we produce a result the newgrf maker didn't expect ;) */
/* Make the current color a bit more black, so it looks like this image is transparent */ /* Make the current colour a bit more black, so it looks like this image is transparent */
src_n += n; src_n += n;
if (src_px->a == 255) { if (src_px->a == 255) {
src_px += n; src_px += n;
@ -212,11 +212,11 @@ void Blitter_32bppAnim::Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomL
} }
} }
void Blitter_32bppAnim::DrawColorMappingRect(void *dst, int width, int height, int pal) void Blitter_32bppAnim::DrawColourMappingRect(void *dst, int width, int height, int pal)
{ {
if (_screen_disable_anim) { if (_screen_disable_anim) {
/* This means our output is not to the screen, so we can't be doing any animation stuff, so use our parent DrawColorMappingRect() */ /* This means our output is not to the screen, so we can't be doing any animation stuff, so use our parent DrawColourMappingRect() */
Blitter_32bppOptimized::DrawColorMappingRect(dst, width, height, pal); Blitter_32bppOptimized::DrawColourMappingRect(dst, width, height, pal);
return; return;
} }
@ -252,38 +252,38 @@ void Blitter_32bppAnim::DrawColorMappingRect(void *dst, int width, int height, i
return; return;
} }
DEBUG(misc, 0, "32bpp blitter doesn't know how to draw this color table ('%d')", pal); DEBUG(misc, 0, "32bpp blitter doesn't know how to draw this colour table ('%d')", pal);
} }
void Blitter_32bppAnim::SetPixel(void *video, int x, int y, uint8 color) void Blitter_32bppAnim::SetPixel(void *video, int x, int y, uint8 colour)
{ {
*((uint32 *)video + x + y * _screen.pitch) = LookupColourInPalette(color); *((uint32 *)video + x + y * _screen.pitch) = LookupColourInPalette(colour);
/* Set the color in the anim-buffer too, if we are rendering to the screen */ /* Set the colour in the anim-buffer too, if we are rendering to the screen */
if (_screen_disable_anim) return; if (_screen_disable_anim) return;
this->anim_buf[((uint32 *)video - (uint32 *)_screen.dst_ptr) + x + y * this->anim_buf_width] = color; this->anim_buf[((uint32 *)video - (uint32 *)_screen.dst_ptr) + x + y * this->anim_buf_width] = colour;
} }
void Blitter_32bppAnim::SetPixelIfEmpty(void *video, int x, int y, uint8 color) void Blitter_32bppAnim::SetPixelIfEmpty(void *video, int x, int y, uint8 colour)
{ {
uint32 *dst = (uint32 *)video + x + y * _screen.pitch; uint32 *dst = (uint32 *)video + x + y * _screen.pitch;
if (*dst == 0) { if (*dst == 0) {
*dst = LookupColourInPalette(color); *dst = LookupColourInPalette(colour);
/* Set the color in the anim-buffer too, if we are rendering to the screen */ /* Set the colour in the anim-buffer too, if we are rendering to the screen */
if (_screen_disable_anim) return; if (_screen_disable_anim) return;
this->anim_buf[((uint32 *)video - (uint32 *)_screen.dst_ptr) + x + y * this->anim_buf_width] = color; this->anim_buf[((uint32 *)video - (uint32 *)_screen.dst_ptr) + x + y * this->anim_buf_width] = colour;
} }
} }
void Blitter_32bppAnim::DrawRect(void *video, int width, int height, uint8 color) void Blitter_32bppAnim::DrawRect(void *video, int width, int height, uint8 colour)
{ {
if (_screen_disable_anim) { if (_screen_disable_anim) {
/* This means our output is not to the screen, so we can't be doing any animation stuff, so use our parent DrawRect() */ /* This means our output is not to the screen, so we can't be doing any animation stuff, so use our parent DrawRect() */
Blitter_32bppOptimized::DrawRect(video, width, height, color); Blitter_32bppOptimized::DrawRect(video, width, height, colour);
return; return;
} }
uint32 color32 = LookupColourInPalette(color); uint32 colour32 = LookupColourInPalette(colour);
uint8 *anim_line; uint8 *anim_line;
anim_line = ((uint32 *)video - (uint32 *)_screen.dst_ptr) + this->anim_buf; anim_line = ((uint32 *)video - (uint32 *)_screen.dst_ptr) + this->anim_buf;
@ -293,9 +293,9 @@ void Blitter_32bppAnim::DrawRect(void *video, int width, int height, uint8 color
uint8 *anim = anim_line; uint8 *anim = anim_line;
for (int i = width; i > 0; i--) { for (int i = width; i > 0; i--) {
*dst = color32; *dst = colour32;
/* Set the color in the anim-buffer too */ /* Set the colour in the anim-buffer too */
*anim = color; *anim = colour;
dst++; dst++;
anim++; anim++;
} }

View File

@ -22,10 +22,10 @@ public:
{} {}
/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom); /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
/* virtual */ void DrawColorMappingRect(void *dst, int width, int height, int pal); /* virtual */ void DrawColourMappingRect(void *dst, int width, int height, int pal);
/* virtual */ void SetPixel(void *video, int x, int y, uint8 color); /* virtual */ void SetPixel(void *video, int x, int y, uint8 colour);
/* virtual */ void SetPixelIfEmpty(void *video, int x, int y, uint8 color); /* virtual */ void SetPixelIfEmpty(void *video, int x, int y, uint8 colour);
/* virtual */ void DrawRect(void *video, int width, int height, uint8 color); /* virtual */ void DrawRect(void *video, int width, int height, uint8 colour);
/* virtual */ void CopyFromBuffer(void *video, const void *src, int width, int height); /* virtual */ void CopyFromBuffer(void *video, const void *src, int width, int height);
/* virtual */ void CopyToBuffer(const void *video, void *dst, int width, int height); /* virtual */ void CopyToBuffer(const void *video, void *dst, int width, int height);
/* virtual */ void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y); /* virtual */ void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y);

View File

@ -11,32 +11,32 @@ void *Blitter_32bppBase::MoveTo(const void *video, int x, int y)
return (uint32 *)video + x + y * _screen.pitch; return (uint32 *)video + x + y * _screen.pitch;
} }
void Blitter_32bppBase::SetPixel(void *video, int x, int y, uint8 color) void Blitter_32bppBase::SetPixel(void *video, int x, int y, uint8 colour)
{ {
*((uint32 *)video + x + y * _screen.pitch) = LookupColourInPalette(color); *((uint32 *)video + x + y * _screen.pitch) = LookupColourInPalette(colour);
} }
void Blitter_32bppBase::SetPixelIfEmpty(void *video, int x, int y, uint8 color) void Blitter_32bppBase::SetPixelIfEmpty(void *video, int x, int y, uint8 colour)
{ {
uint32 *dst = (uint32 *)video + x + y * _screen.pitch; uint32 *dst = (uint32 *)video + x + y * _screen.pitch;
if (*dst == 0) *dst = LookupColourInPalette(color); if (*dst == 0) *dst = LookupColourInPalette(colour);
} }
void Blitter_32bppBase::DrawRect(void *video, int width, int height, uint8 color) void Blitter_32bppBase::DrawRect(void *video, int width, int height, uint8 colour)
{ {
uint32 color32 = LookupColourInPalette(color); uint32 colour32 = LookupColourInPalette(colour);
do { do {
uint32 *dst = (uint32 *)video; uint32 *dst = (uint32 *)video;
for (int i = width; i > 0; i--) { for (int i = width; i > 0; i--) {
*dst = color32; *dst = colour32;
dst++; dst++;
} }
video = (uint32 *)video + _screen.pitch; video = (uint32 *)video + _screen.pitch;
} while (--height); } while (--height);
} }
void Blitter_32bppBase::DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 color) void Blitter_32bppBase::DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour)
{ {
int dy; int dy;
int dx; int dx;
@ -60,7 +60,7 @@ void Blitter_32bppBase::DrawLine(void *video, int x, int y, int x2, int y2, int
stepx = 1; stepx = 1;
} }
if (x >= 0 && y >= 0 && x < screen_width && y < screen_height) this->SetPixel(video, x, y, color); if (x >= 0 && y >= 0 && x < screen_width && y < screen_height) this->SetPixel(video, x, y, colour);
if (dx > dy) { if (dx > dy) {
frac = dy - (dx / 2); frac = dy - (dx / 2);
while (x != x2) { while (x != x2) {
@ -70,7 +70,7 @@ void Blitter_32bppBase::DrawLine(void *video, int x, int y, int x2, int y2, int
} }
x += stepx; x += stepx;
frac += dy; frac += dy;
if (x >= 0 && y >= 0 && x < screen_width && y < screen_height) this->SetPixel(video, x, y, color); if (x >= 0 && y >= 0 && x < screen_width && y < screen_height) this->SetPixel(video, x, y, colour);
} }
} else { } else {
frac = dx - (dy / 2); frac = dx - (dy / 2);
@ -81,7 +81,7 @@ void Blitter_32bppBase::DrawLine(void *video, int x, int y, int x2, int y2, int
} }
y += stepy; y += stepy;
frac += dx; frac += dx;
if (x >= 0 && y >= 0 && x < screen_width && y < screen_height) this->SetPixel(video, x, y, color); if (x >= 0 && y >= 0 && x < screen_width && y < screen_height) this->SetPixel(video, x, y, colour);
} }
} }
} }

View File

@ -12,13 +12,13 @@ class Blitter_32bppBase : public Blitter {
public: public:
/* virtual */ uint8 GetScreenDepth() { return 32; } /* virtual */ uint8 GetScreenDepth() { return 32; }
// /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom); // /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
// /* virtual */ void DrawColorMappingRect(void *dst, int width, int height, int pal); // /* virtual */ void DrawColourMappingRect(void *dst, int width, int height, int pal);
// /* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator); // /* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator);
/* virtual */ void *MoveTo(const void *video, int x, int y); /* virtual */ void *MoveTo(const void *video, int x, int y);
/* virtual */ void SetPixel(void *video, int x, int y, uint8 color); /* virtual */ void SetPixel(void *video, int x, int y, uint8 colour);
/* virtual */ void SetPixelIfEmpty(void *video, int x, int y, uint8 color); /* virtual */ void SetPixelIfEmpty(void *video, int x, int y, uint8 colour);
/* virtual */ void DrawRect(void *video, int width, int height, uint8 color); /* virtual */ void DrawRect(void *video, int width, int height, uint8 colour);
/* virtual */ void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 color); /* virtual */ void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour);
/* virtual */ void CopyFromBuffer(void *video, const void *src, int width, int height); /* virtual */ void CopyFromBuffer(void *video, const void *src, int width, int height);
/* virtual */ void CopyToBuffer(const void *video, void *dst, int width, int height); /* virtual */ void CopyToBuffer(const void *video, void *dst, int width, int height);
/* virtual */ void CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch); /* virtual */ void CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch);

View File

@ -136,11 +136,11 @@ inline void Blitter_32bppOptimized::Draw(const Blitter::BlitterParams *bp, ZoomL
break; break;
case BM_TRANSPARENT: case BM_TRANSPARENT:
/* TODO -- We make an assumption here that the remap in fact is transparency, not some color. /* TODO -- We make an assumption here that the remap in fact is transparency, not some colour.
* This is never a problem with the code we produce, but newgrfs can make it fail... or at least: * This is never a problem with the code we produce, but newgrfs can make it fail... or at least:
* we produce a result the newgrf maker didn't expect ;) */ * we produce a result the newgrf maker didn't expect ;) */
/* Make the current color a bit more black, so it looks like this image is transparent */ /* Make the current colour a bit more black, so it looks like this image is transparent */
src_n += n; src_n += n;
if (src_px->a == 255) { if (src_px->a == 255) {
src_px += n; src_px += n;

View File

@ -39,11 +39,11 @@ void Blitter_32bppSimple::Draw(Blitter::BlitterParams *bp, BlitterMode mode, Zoo
break; break;
case BM_TRANSPARENT: case BM_TRANSPARENT:
/* TODO -- We make an assumption here that the remap in fact is transparency, not some color. /* TODO -- We make an assumption here that the remap in fact is transparency, not some colour.
* This is never a problem with the code we produce, but newgrfs can make it fail... or at least: * This is never a problem with the code we produce, but newgrfs can make it fail... or at least:
* we produce a result the newgrf maker didn't expect ;) */ * we produce a result the newgrf maker didn't expect ;) */
/* Make the current color a bit more black, so it looks like this image is transparent */ /* Make the current colour a bit more black, so it looks like this image is transparent */
if (src->a != 0) *dst = MakeTransparent(*dst, 192); if (src->a != 0) *dst = MakeTransparent(*dst, 192);
break; break;
@ -57,7 +57,7 @@ void Blitter_32bppSimple::Draw(Blitter::BlitterParams *bp, BlitterMode mode, Zoo
} }
} }
void Blitter_32bppSimple::DrawColorMappingRect(void *dst, int width, int height, int pal) void Blitter_32bppSimple::DrawColourMappingRect(void *dst, int width, int height, int pal)
{ {
uint32 *udst = (uint32 *)dst; uint32 *udst = (uint32 *)dst;
@ -82,7 +82,7 @@ void Blitter_32bppSimple::DrawColorMappingRect(void *dst, int width, int height,
return; return;
} }
DEBUG(misc, 0, "32bpp blitter doesn't know how to draw this color table ('%d')", pal); DEBUG(misc, 0, "32bpp blitter doesn't know how to draw this colour table ('%d')", pal);
} }
Sprite *Blitter_32bppSimple::Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator) Sprite *Blitter_32bppSimple::Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator)
@ -102,10 +102,10 @@ Sprite *Blitter_32bppSimple::Encode(SpriteLoader::Sprite *sprite, Blitter::Alloc
for (int i = 0; i < sprite->height * sprite->width; i++) { for (int i = 0; i < sprite->height * sprite->width; i++) {
if (dst[i].m != 0) { if (dst[i].m != 0) {
/* Pre-convert the mapping channel to a RGB value */ /* Pre-convert the mapping channel to a RGB value */
uint color = this->LookupColourInPalette(dst[i].m); uint colour = this->LookupColourInPalette(dst[i].m);
dst[i].r = GB(color, 16, 8); dst[i].r = GB(colour, 16, 8);
dst[i].g = GB(color, 8, 8); dst[i].g = GB(colour, 8, 8);
dst[i].b = GB(color, 0, 8); dst[i].b = GB(colour, 0, 8);
} }
} }

View File

@ -11,7 +11,7 @@
class Blitter_32bppSimple : public Blitter_32bppBase { class Blitter_32bppSimple : public Blitter_32bppBase {
public: public:
/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom); /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
/* virtual */ void DrawColorMappingRect(void *dst, int width, int height, int pal); /* virtual */ void DrawColourMappingRect(void *dst, int width, int height, int pal);
/* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator); /* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator);
/* virtual */ const char *GetName() { return "32bpp-simple"; } /* virtual */ const char *GetName() { return "32bpp-simple"; }

View File

@ -6,7 +6,7 @@
#include "../gfx_func.h" #include "../gfx_func.h"
#include "8bpp_base.hpp" #include "8bpp_base.hpp"
void Blitter_8bppBase::DrawColorMappingRect(void *dst, int width, int height, int pal) void Blitter_8bppBase::DrawColourMappingRect(void *dst, int width, int height, int pal)
{ {
const uint8 *ctab = GetNonSprite(pal, ST_RECOLOUR) + 1; const uint8 *ctab = GetNonSprite(pal, ST_RECOLOUR) + 1;
@ -21,26 +21,26 @@ void *Blitter_8bppBase::MoveTo(const void *video, int x, int y)
return (uint8 *)video + x + y * _screen.pitch; return (uint8 *)video + x + y * _screen.pitch;
} }
void Blitter_8bppBase::SetPixel(void *video, int x, int y, uint8 color) void Blitter_8bppBase::SetPixel(void *video, int x, int y, uint8 colour)
{ {
*((uint8 *)video + x + y * _screen.pitch) = color; *((uint8 *)video + x + y * _screen.pitch) = colour;
} }
void Blitter_8bppBase::SetPixelIfEmpty(void *video, int x, int y, uint8 color) void Blitter_8bppBase::SetPixelIfEmpty(void *video, int x, int y, uint8 colour)
{ {
uint8 *dst = (uint8 *)video + x + y * _screen.pitch; uint8 *dst = (uint8 *)video + x + y * _screen.pitch;
if (*dst == 0) *dst = color; if (*dst == 0) *dst = colour;
} }
void Blitter_8bppBase::DrawRect(void *video, int width, int height, uint8 color) void Blitter_8bppBase::DrawRect(void *video, int width, int height, uint8 colour)
{ {
do { do {
memset(video, color, width); memset(video, colour, width);
video = (uint8 *)video + _screen.pitch; video = (uint8 *)video + _screen.pitch;
} while (--height); } while (--height);
} }
void Blitter_8bppBase::DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 color) void Blitter_8bppBase::DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour)
{ {
int dy; int dy;
int dx; int dx;
@ -64,7 +64,7 @@ void Blitter_8bppBase::DrawLine(void *video, int x, int y, int x2, int y2, int s
stepx = 1; stepx = 1;
} }
if (x >= 0 && y >= 0 && x < screen_width && y < screen_height) this->SetPixel(video, x, y, color); if (x >= 0 && y >= 0 && x < screen_width && y < screen_height) this->SetPixel(video, x, y, colour);
if (dx > dy) { if (dx > dy) {
frac = dy - (dx / 2); frac = dy - (dx / 2);
while (x != x2) { while (x != x2) {
@ -74,7 +74,7 @@ void Blitter_8bppBase::DrawLine(void *video, int x, int y, int x2, int y2, int s
} }
x += stepx; x += stepx;
frac += dy; frac += dy;
if (x >= 0 && y >= 0 && x < screen_width && y < screen_height) this->SetPixel(video, x, y, color); if (x >= 0 && y >= 0 && x < screen_width && y < screen_height) this->SetPixel(video, x, y, colour);
} }
} else { } else {
frac = dx - (dy / 2); frac = dx - (dy / 2);
@ -85,7 +85,7 @@ void Blitter_8bppBase::DrawLine(void *video, int x, int y, int x2, int y2, int s
} }
y += stepy; y += stepy;
frac += dx; frac += dx;
if (x >= 0 && y >= 0 && x < screen_width && y < screen_height) this->SetPixel(video, x, y, color); if (x >= 0 && y >= 0 && x < screen_width && y < screen_height) this->SetPixel(video, x, y, colour);
} }
} }
} }

View File

@ -11,13 +11,13 @@ class Blitter_8bppBase : public Blitter {
public: public:
/* virtual */ uint8 GetScreenDepth() { return 8; } /* virtual */ uint8 GetScreenDepth() { return 8; }
// /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom); // /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
/* virtual */ void DrawColorMappingRect(void *dst, int width, int height, int pal); /* virtual */ void DrawColourMappingRect(void *dst, int width, int height, int pal);
// /* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator); // /* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator);
/* virtual */ void *MoveTo(const void *video, int x, int y); /* virtual */ void *MoveTo(const void *video, int x, int y);
/* virtual */ void SetPixel(void *video, int x, int y, uint8 color); /* virtual */ void SetPixel(void *video, int x, int y, uint8 colour);
/* virtual */ void SetPixelIfEmpty(void *video, int x, int y, uint8 color); /* virtual */ void SetPixelIfEmpty(void *video, int x, int y, uint8 colour);
/* virtual */ void DrawRect(void *video, int width, int height, uint8 color); /* virtual */ void DrawRect(void *video, int width, int height, uint8 colour);
/* virtual */ void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 color); /* virtual */ void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour);
/* virtual */ void CopyFromBuffer(void *video, const void *src, int width, int height); /* virtual */ void CopyFromBuffer(void *video, const void *src, int width, int height);
/* virtual */ void CopyToBuffer(const void *video, void *dst, int width, int height); /* virtual */ void CopyToBuffer(const void *video, void *dst, int width, int height);
/* virtual */ void CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch); /* virtual */ void CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch);

View File

@ -44,10 +44,10 @@ Sprite *Blitter_8bppDebug::Encode(SpriteLoader::Sprite *sprite, Blitter::Allocat
dest_sprite->x_offs = sprite->x_offs; dest_sprite->x_offs = sprite->x_offs;
dest_sprite->y_offs = sprite->y_offs; dest_sprite->y_offs = sprite->y_offs;
/* Write a random color as sprite; this makes debugging really easy */ /* Write a random colour as sprite; this makes debugging really easy */
uint color = InteractiveRandom() % 150 + 2; uint colour = InteractiveRandom() % 150 + 2;
for (int i = 0; i < sprite->height * sprite->width; i++) { for (int i = 0; i < sprite->height * sprite->width; i++) {
dest_sprite->data[i] = (sprite->data[i].m == 0) ? 0 : color; dest_sprite->data[i] = (sprite->data[i].m == 0) ? 0 : colour;
} }
return dest_sprite; return dest_sprite;

View File

@ -140,7 +140,7 @@ Sprite *Blitter_8bppOptimized::Encode(SpriteLoader::Sprite *sprite, Blitter::All
for (int x = 0; x < scaled_width; x++) { for (int x = 0; x < scaled_width; x++) {
uint colour = 0; uint colour = 0;
/* Get the color keeping in mind the zoom-level */ /* Get the colour keeping in mind the zoom-level */
for (int j = 0; j < scaled_1; j++) { for (int j = 0; j < scaled_1; j++) {
if (src->m != 0) colour = src->m; if (src->m != 0) colour = src->m;
/* Because of the scaling it might happen we read outside the buffer. Avoid that. */ /* Because of the scaling it might happen we read outside the buffer. Avoid that. */

View File

@ -25,22 +25,22 @@ void Blitter_8bppSimple::Draw(Blitter::BlitterParams *bp, BlitterMode mode, Zoom
src_line += bp->sprite_width * ScaleByZoom(1, zoom); src_line += bp->sprite_width * ScaleByZoom(1, zoom);
for (int x = 0; x < bp->width; x++) { for (int x = 0; x < bp->width; x++) {
uint color = 0; uint colour = 0;
switch (mode) { switch (mode) {
case BM_COLOUR_REMAP: case BM_COLOUR_REMAP:
color = bp->remap[*src]; colour = bp->remap[*src];
break; break;
case BM_TRANSPARENT: case BM_TRANSPARENT:
if (*src != 0) color = bp->remap[*dst]; if (*src != 0) colour = bp->remap[*dst];
break; break;
default: default:
color = *src; colour = *src;
break; break;
} }
if (color != 0) *dst = color; if (colour != 0) *dst = colour;
dst++; dst++;
src += ScaleByZoom(1, zoom); src += ScaleByZoom(1, zoom);
} }

View File

@ -54,15 +54,15 @@ public:
virtual void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) = 0; virtual void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) = 0;
/** /**
* Draw a colortable to the screen. This is: the color of the screen is read * Draw a colourtable to the screen. This is: the colour of the screen is read
* and is looked-up in the palette to match a new color, which then is put * and is looked-up in the palette to match a new colour, which then is put
* on the screen again. * on the screen again.
* @param dst the destination pointer (video-buffer). * @param dst the destination pointer (video-buffer).
* @param width the width of the buffer. * @param width the width of the buffer.
* @param height the height of the buffer. * @param height the height of the buffer.
* @param pal the palette to use. * @param pal the palette to use.
*/ */
virtual void DrawColorMappingRect(void *dst, int width, int height, int pal) = 0; virtual void DrawColourMappingRect(void *dst, int width, int height, int pal) = 0;
/** /**
* Convert a sprite from the loader to our own format. * Convert a sprite from the loader to our own format.
@ -80,33 +80,33 @@ public:
virtual void *MoveTo(const void *video, int x, int y) = 0; virtual void *MoveTo(const void *video, int x, int y) = 0;
/** /**
* Draw a pixel with a given color on the video-buffer. * Draw a pixel with a given colour on the video-buffer.
* @param video The destination pointer (video-buffer). * @param video The destination pointer (video-buffer).
* @param x The x position within video-buffer. * @param x The x position within video-buffer.
* @param y The y position within video-buffer. * @param y The y position within video-buffer.
* @param color A 8bpp mapping color. * @param colour A 8bpp mapping colour.
*/ */
virtual void SetPixel(void *video, int x, int y, uint8 color) = 0; virtual void SetPixel(void *video, int x, int y, uint8 colour) = 0;
/** /**
* Draw a pixel with a given color on the video-buffer if there is currently a black pixel. * Draw a pixel with a given colour on the video-buffer if there is currently a black pixel.
* @param video The destination pointer (video-buffer). * @param video The destination pointer (video-buffer).
* @param x The x position within video-buffer. * @param x The x position within video-buffer.
* @param y The y position within video-buffer. * @param y The y position within video-buffer.
* @param color A 8bpp mapping color. * @param colour A 8bpp mapping colour.
*/ */
virtual void SetPixelIfEmpty(void *video, int x, int y, uint8 color) = 0; virtual void SetPixelIfEmpty(void *video, int x, int y, uint8 colour) = 0;
/** /**
* Make a single horizontal line in a single color on the video-buffer. * Make a single horizontal line in a single colour on the video-buffer.
* @param video The destination pointer (video-buffer). * @param video The destination pointer (video-buffer).
* @param width The lenght of the line. * @param width The lenght of the line.
* @param color A 8bpp mapping color. * @param colour A 8bpp mapping colour.
*/ */
virtual void DrawRect(void *video, int width, int height, uint8 color) = 0; virtual void DrawRect(void *video, int width, int height, uint8 colour) = 0;
/** /**
* Draw a line with a given color. * Draw a line with a given colour.
* @param video The destination pointer (video-buffer). * @param video The destination pointer (video-buffer).
* @param x The x coordinate from where the line starts. * @param x The x coordinate from where the line starts.
* @param y The y coordinate from where the line starts. * @param y The y coordinate from where the line starts.
@ -114,9 +114,9 @@ public:
* @param y2 The y coordinate to where the lines goes. * @param y2 The y coordinate to where the lines goes.
* @param screen_width The width of the screen you are drawing in (to avoid buffer-overflows). * @param screen_width The width of the screen you are drawing in (to avoid buffer-overflows).
* @param screen_height The height of the screen you are drawing in (to avoid buffer-overflows). * @param screen_height The height of the screen you are drawing in (to avoid buffer-overflows).
* @param color A 8bpp mapping color. * @param colour A 8bpp mapping colour.
*/ */
virtual void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 color) = 0; virtual void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour) = 0;
/** /**
* Copy from a buffer to the screen. * Copy from a buffer to the screen.

View File

@ -12,13 +12,13 @@ class Blitter_Null : public Blitter {
public: public:
/* virtual */ uint8 GetScreenDepth() { return 0; } /* virtual */ uint8 GetScreenDepth() { return 0; }
/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) {}; /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) {};
/* virtual */ void DrawColorMappingRect(void *dst, int width, int height, int pal) {}; /* virtual */ void DrawColourMappingRect(void *dst, int width, int height, int pal) {};
/* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator); /* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator);
/* virtual */ void *MoveTo(const void *video, int x, int y) { return NULL; }; /* virtual */ void *MoveTo(const void *video, int x, int y) { return NULL; };
/* virtual */ void SetPixel(void *video, int x, int y, uint8 color) {}; /* virtual */ void SetPixel(void *video, int x, int y, uint8 colour) {};
/* virtual */ void SetPixelIfEmpty(void *video, int x, int y, uint8 color) {}; /* virtual */ void SetPixelIfEmpty(void *video, int x, int y, uint8 colour) {};
/* virtual */ void DrawRect(void *video, int width, int height, uint8 color) {}; /* virtual */ void DrawRect(void *video, int width, int height, uint8 colour) {};
/* virtual */ void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 color) {}; /* virtual */ void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour) {};
/* virtual */ void CopyFromBuffer(void *video, const void *src, int width, int height) {}; /* virtual */ void CopyFromBuffer(void *video, const void *src, int width, int height) {};
/* virtual */ void CopyToBuffer(const void *video, void *dst, int width, int height) {}; /* virtual */ void CopyToBuffer(const void *video, void *dst, int width, int height) {};
/* virtual */ void CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch) {}; /* virtual */ void CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch) {};

View File

@ -322,10 +322,10 @@ bool BmpReadHeader(BmpBuffer *buffer, BmpInfo *info, BmpData *data)
if (info->bpp <= 8) { if (info->bpp <= 8) {
uint i; uint i;
/* Reads number of colors if available in info header */ /* Reads number of colours if available in info header */
if (header_size >= 16) { if (header_size >= 16) {
SkipBytes(buffer, 12); // skip image size and resolution SkipBytes(buffer, 12); // skip image size and resolution
info->palette_size = ReadDword(buffer); // number of colors in palette info->palette_size = ReadDword(buffer); // number of colours in palette
SkipBytes(buffer, header_size - 16); // skip the end of info header SkipBytes(buffer, header_size - 16); // skip the end of info header
} }
if (info->palette_size == 0) info->palette_size = 1 << info->bpp; if (info->palette_size == 0) info->palette_size = 1 << info->bpp;

View File

@ -14,7 +14,7 @@ struct BmpInfo {
bool os2_bmp; ///< true if OS/2 1.x or windows 2.x bitmap bool os2_bmp; ///< true if OS/2 1.x or windows 2.x bitmap
uint16 bpp; ///< bits per pixel uint16 bpp; ///< bits per pixel
uint32 compression; ///< compression method (0 = none, 1 = 8-bit RLE, 2 = 4-bit RLE) uint32 compression; ///< compression method (0 = none, 1 = 8-bit RLE, 2 = 4-bit RLE)
uint32 palette_size; ///< number of colors in palette uint32 palette_size; ///< number of colours in palette
}; };
struct BmpData { struct BmpData {

View File

@ -160,7 +160,7 @@ struct CheatWindow : Window {
/* Display date for change date cheat */ /* Display date for change date cheat */
case STR_CHEAT_CHANGE_DATE: SetDParam(0, _date); break; case STR_CHEAT_CHANGE_DATE: SetDParam(0, _date); break;
/* Draw colored flag for change company cheat */ /* Draw coloured flag for change company cheat */
case STR_CHEAT_CHANGE_COMPANY: case STR_CHEAT_CHANGE_COMPANY:
SetDParam(0, val + 1); SetDParam(0, val + 1);
GetString(buf, STR_CHEAT_CHANGE_COMPANY, lastof(buf)); GetString(buf, STR_CHEAT_CHANGE_COMPANY, lastof(buf));

View File

@ -104,7 +104,7 @@ DEF_COMMAND(CmdBuildIndustry);
DEF_COMMAND(CmdBuildCompanyHQ); DEF_COMMAND(CmdBuildCompanyHQ);
DEF_COMMAND(CmdSetCompanyManagerFace); DEF_COMMAND(CmdSetCompanyManagerFace);
DEF_COMMAND(CmdSetCompanyColor); DEF_COMMAND(CmdSetCompanyColour);
DEF_COMMAND(CmdIncreaseLoan); DEF_COMMAND(CmdIncreaseLoan);
DEF_COMMAND(CmdDecreaseLoan); DEF_COMMAND(CmdDecreaseLoan);
@ -252,7 +252,7 @@ static const Command _command_proc_table[] = {
{CmdBuildIndustry, 0}, /* CMD_BUILD_INDUSTRY */ {CmdBuildIndustry, 0}, /* CMD_BUILD_INDUSTRY */
{CmdBuildCompanyHQ, CMD_NO_WATER | CMD_AUTO}, /* CMD_BUILD_COMPANY_HQ */ {CmdBuildCompanyHQ, CMD_NO_WATER | CMD_AUTO}, /* CMD_BUILD_COMPANY_HQ */
{CmdSetCompanyManagerFace, 0}, /* CMD_SET_COMPANY_MANAGER_FACE */ {CmdSetCompanyManagerFace, 0}, /* CMD_SET_COMPANY_MANAGER_FACE */
{CmdSetCompanyColor, 0}, /* CMD_SET_COMPANY_COLOR */ {CmdSetCompanyColour, 0}, /* CMD_SET_COMPANY_COLOUR */
{CmdIncreaseLoan, 0}, /* CMD_INCREASE_LOAN */ {CmdIncreaseLoan, 0}, /* CMD_INCREASE_LOAN */
{CmdDecreaseLoan, 0}, /* CMD_DECREASE_LOAN */ {CmdDecreaseLoan, 0}, /* CMD_DECREASE_LOAN */

View File

@ -202,7 +202,7 @@ enum {
CMD_BUILD_COMPANY_HQ, ///< build the company headquarter CMD_BUILD_COMPANY_HQ, ///< build the company headquarter
CMD_SET_COMPANY_MANAGER_FACE, ///< set the manager's face of the company CMD_SET_COMPANY_MANAGER_FACE, ///< set the manager's face of the company
CMD_SET_COMPANY_COLOR, ///< set the color of the company CMD_SET_COMPANY_COLOUR, ///< set the colour of the company
CMD_INCREASE_LOAN, ///< increase the loan from the bank CMD_INCREASE_LOAN, ///< increase the loan from the bank
CMD_DECREASE_LOAN, ///< decrease the loan from the bank CMD_DECREASE_LOAN, ///< decrease the loan from the bank

View File

@ -97,17 +97,17 @@ bool IsHumanCompany(CompanyID company)
} }
uint16 GetDrawStringCompanyColor(CompanyID company) uint16 GetDrawStringCompanyColour(CompanyID company)
{ {
/* Get the color for DrawString-subroutines which matches the color /* Get the colour for DrawString-subroutines which matches the colour
* of the company */ * of the company */
if (!IsValidCompanyID(company)) return _colour_gradient[COLOUR_WHITE][4] | IS_PALETTE_COLOR; if (!IsValidCompanyID(company)) return _colour_gradient[COLOUR_WHITE][4] | IS_PALETTE_COLOUR;
return (_colour_gradient[_company_colours[company]][4]) | IS_PALETTE_COLOR; return (_colour_gradient[_company_colours[company]][4]) | IS_PALETTE_COLOUR;
} }
void DrawCompanyIcon(CompanyID c, int x, int y) void DrawCompanyIcon(CompanyID c, int x, int y)
{ {
DrawSprite(SPR_PLAYER_ICON, COMPANY_SPRITE_COLOR(c), x, y); DrawSprite(SPR_PLAYER_ICON, COMPANY_SPRITE_COLOUR(c), x, y);
} }
/** /**
@ -352,7 +352,7 @@ static Colours GenerateCompanyColour()
} }
}; };
/* Move the colors that look similar to each company's color to the side */ /* Move the colours that look similar to each company's colour to the side */
Company *c; Company *c;
FOR_ALL_COMPANIES(c) { FOR_ALL_COMPANIES(c) {
Colours pcolour = (Colours)c->colour; Colours pcolour = (Colours)c->colour;
@ -374,7 +374,7 @@ static Colours GenerateCompanyColour()
} }
} }
/* Return the first available color */ /* Return the first available colour */
for (uint i = 0; i < COLOUR_END; i++) { for (uint i = 0; i < COLOUR_END; i++) {
if (colours[i] != INVALID_COLOUR) return colours[i]; if (colours[i] != INVALID_COLOUR) return colours[i];
} }

View File

@ -401,7 +401,7 @@ public:
void Draw(int x, int y, uint width, uint height, bool sel, int bg_colour) const void Draw(int x, int y, uint width, uint height, bool sel, int bg_colour) const
{ {
DrawSprite(SPR_VEH_BUS_SIDE_VIEW, PALETTE_RECOLOR_START + this->result, x + 16, y + 7); DrawSprite(SPR_VEH_BUS_SIDE_VIEW, PALETTE_RECOLOUR_START + this->result, x + 16, y + 7);
DrawStringTruncated(x + 32, y + 3, this->String(), sel ? TC_WHITE : TC_BLACK, width - 30); DrawStringTruncated(x + 32, y + 3, this->String(), sel ? TC_WHITE : TC_BLACK, width - 30);
} }
}; };
@ -498,11 +498,11 @@ public:
DrawString(15, y, STR_LIVERY_DEFAULT + scheme, sel ? TC_WHITE : TC_BLACK); DrawString(15, y, STR_LIVERY_DEFAULT + scheme, sel ? TC_WHITE : TC_BLACK);
DrawSprite(SPR_SQUARE, GENERAL_SPRITE_COLOR(c->livery[scheme].colour1), 152, y); DrawSprite(SPR_SQUARE, GENERAL_SPRITE_COLOUR(c->livery[scheme].colour1), 152, y);
DrawString(165, y, STR_00D1_DARK_BLUE + c->livery[scheme].colour1, sel ? TC_WHITE : TC_GOLD); DrawString(165, y, STR_00D1_DARK_BLUE + c->livery[scheme].colour1, sel ? TC_WHITE : TC_GOLD);
if (!this->IsWidgetHidden(SCLW_WIDGET_SEC_COL_DROPDOWN)) { if (!this->IsWidgetHidden(SCLW_WIDGET_SEC_COL_DROPDOWN)) {
DrawSprite(SPR_SQUARE, GENERAL_SPRITE_COLOR(c->livery[scheme].colour2), 277, y); DrawSprite(SPR_SQUARE, GENERAL_SPRITE_COLOUR(c->livery[scheme].colour2), 277, y);
DrawString(290, y, STR_00D1_DARK_BLUE + c->livery[scheme].colour2, sel ? TC_WHITE : TC_GOLD); DrawString(290, y, STR_00D1_DARK_BLUE + c->livery[scheme].colour2, sel ? TC_WHITE : TC_GOLD);
} }
@ -570,7 +570,7 @@ public:
/* If clicking on the left edge, toggle using the livery */ /* If clicking on the left edge, toggle using the livery */
if (pt.x < 10) { if (pt.x < 10) {
DoCommandP(0, j | (2 << 8), !GetCompany((CompanyID)this->window_number)->livery[j].in_use, CMD_SET_COMPANY_COLOR); DoCommandP(0, j | (2 << 8), !GetCompany((CompanyID)this->window_number)->livery[j].in_use, CMD_SET_COMPANY_COLOUR);
} }
if (_ctrl_pressed) { if (_ctrl_pressed) {
@ -588,7 +588,7 @@ public:
{ {
for (LiveryScheme scheme = LS_DEFAULT; scheme < LS_END; scheme++) { for (LiveryScheme scheme = LS_DEFAULT; scheme < LS_END; scheme++) {
if (HasBit(this->sel, scheme)) { if (HasBit(this->sel, scheme)) {
DoCommandP(0, scheme | (widget == SCLW_WIDGET_PRI_COL_DROPDOWN ? 0 : 256), index, CMD_SET_COMPANY_COLOR); DoCommandP(0, scheme | (widget == SCLW_WIDGET_PRI_COL_DROPDOWN ? 0 : 256), index, CMD_SET_COMPANY_COLOUR);
} }
} }
} }
@ -628,7 +628,7 @@ static const Widget _select_company_livery_widgets[] = {
static const WindowDesc _select_company_livery_desc = { static const WindowDesc _select_company_livery_desc = {
WDP_AUTO, WDP_AUTO, 400, 49 + 1 * 14, 400, 49 + 1 * 14, WDP_AUTO, WDP_AUTO, 400, 49 + 1 * 14, 400, 49 + 1 * 14,
WC_COMPANY_COLOR, WC_NONE, WC_COMPANY_COLOUR, WC_NONE,
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET, WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
_select_company_livery_widgets, _select_company_livery_widgets,
}; };
@ -636,11 +636,11 @@ static const WindowDesc _select_company_livery_desc = {
/** /**
* Draws the face of a company manager's face. * Draws the face of a company manager's face.
* @param cmf the company manager's face * @param cmf the company manager's face
* @param color the (background) color of the gradient * @param colour the (background) colour of the gradient
* @param x x-position to draw the face * @param x x-position to draw the face
* @param y y-position to draw the face * @param y y-position to draw the face
*/ */
void DrawCompanyManagerFace(CompanyManagerFace cmf, int color, int x, int y) void DrawCompanyManagerFace(CompanyManagerFace cmf, int colour, int x, int y)
{ {
GenderEthnicity ge = (GenderEthnicity)GetCompanyManagerFaceBits(cmf, CMFV_GEN_ETHN, GE_WM); GenderEthnicity ge = (GenderEthnicity)GetCompanyManagerFaceBits(cmf, CMFV_GEN_ETHN, GE_WM);
@ -662,7 +662,7 @@ void DrawCompanyManagerFace(CompanyManagerFace cmf, int color, int x, int y)
} }
/* Draw the gradient (background) */ /* Draw the gradient (background) */
DrawSprite(SPR_GRADIENT, GENERAL_SPRITE_COLOR(color), x, y); DrawSprite(SPR_GRADIENT, GENERAL_SPRITE_COLOUR(colour), x, y);
for (CompanyManagerFaceVariable cmfv = CMFV_CHEEKS; cmfv < CMFV_END; cmfv++) { for (CompanyManagerFaceVariable cmfv = CMFV_CHEEKS; cmfv < CMFV_END; cmfv++) {
switch (cmfv) { switch (cmfv) {
@ -1131,7 +1131,7 @@ enum CompanyWindowWidgets {
CW_WIDGET_CAPTION, CW_WIDGET_CAPTION,
CW_WIDGET_FACE, CW_WIDGET_FACE,
CW_WIDGET_NEW_FACE, CW_WIDGET_NEW_FACE,
CW_WIDGET_COLOR_SCHEME, CW_WIDGET_COLOUR_SCHEME,
CW_WIDGET_PRESIDENT_NAME, CW_WIDGET_PRESIDENT_NAME,
CW_WIDGET_COMPANY_NAME, CW_WIDGET_COMPANY_NAME,
CW_WIDGET_BUILD_VIEW_HQ, CW_WIDGET_BUILD_VIEW_HQ,
@ -1264,7 +1264,7 @@ struct CompanyWindow : Window
bool local = this->window_number == _local_company; bool local = this->window_number == _local_company;
this->SetWidgetHiddenState(CW_WIDGET_NEW_FACE, !local); this->SetWidgetHiddenState(CW_WIDGET_NEW_FACE, !local);
this->SetWidgetHiddenState(CW_WIDGET_COLOR_SCHEME, !local); this->SetWidgetHiddenState(CW_WIDGET_COLOUR_SCHEME, !local);
this->SetWidgetHiddenState(CW_WIDGET_PRESIDENT_NAME, !local); this->SetWidgetHiddenState(CW_WIDGET_PRESIDENT_NAME, !local);
this->SetWidgetHiddenState(CW_WIDGET_COMPANY_NAME, !local); this->SetWidgetHiddenState(CW_WIDGET_COMPANY_NAME, !local);
this->widget[CW_WIDGET_BUILD_VIEW_HQ].data = (local && c->location_of_HQ == INVALID_TILE) ? STR_706F_BUILD_HQ : STR_7072_VIEW_HQ; this->widget[CW_WIDGET_BUILD_VIEW_HQ].data = (local && c->location_of_HQ == INVALID_TILE) ? STR_706F_BUILD_HQ : STR_7072_VIEW_HQ;
@ -1321,7 +1321,7 @@ struct CompanyWindow : Window
/* "Colour scheme:" */ /* "Colour scheme:" */
DrawString(110, 43, STR_7006_COLOR_SCHEME, TC_FROMSTRING); DrawString(110, 43, STR_7006_COLOR_SCHEME, TC_FROMSTRING);
/* Draw company-colour bus */ /* Draw company-colour bus */
DrawSprite(SPR_VEH_BUS_SW_VIEW, COMPANY_SPRITE_COLOR(c->index), 215, 44); DrawSprite(SPR_VEH_BUS_SW_VIEW, COMPANY_SPRITE_COLOUR(c->index), 215, 44);
/* "Vehicles:" */ /* "Vehicles:" */
DrawCompanyVehiclesAmount((CompanyID)this->window_number); DrawCompanyVehiclesAmount((CompanyID)this->window_number);
@ -1339,8 +1339,8 @@ struct CompanyWindow : Window
switch (widget) { switch (widget) {
case CW_WIDGET_NEW_FACE: DoSelectCompanyManagerFace(this, false); break; case CW_WIDGET_NEW_FACE: DoSelectCompanyManagerFace(this, false); break;
case CW_WIDGET_COLOR_SCHEME: case CW_WIDGET_COLOUR_SCHEME:
if (BringWindowToFrontById(WC_COMPANY_COLOR, this->window_number)) break; if (BringWindowToFrontById(WC_COMPANY_COLOUR, this->window_number)) break;
new SelectCompanyLiveryWindow(&_select_company_livery_desc, (CompanyID)this->window_number); new SelectCompanyLiveryWindow(&_select_company_livery_desc, (CompanyID)this->window_number);
break; break;

View File

@ -7,7 +7,7 @@
#include "company_type.h" #include "company_type.h"
uint16 GetDrawStringCompanyColor(CompanyID company); uint16 GetDrawStringCompanyColour(CompanyID company);
void DrawCompanyIcon(CompanyID c, int x, int y); void DrawCompanyIcon(CompanyID c, int x, int y);
void ShowCompanyStations(CompanyID company); void ShowCompanyStations(CompanyID company);

View File

@ -229,7 +229,7 @@ static inline SpriteID GetCompanyManagerFaceSprite(CompanyManagerFace cmf, Compa
return _cmf_info[cmfv].first_sprite[ge] + GB(cmf, _cmf_info[cmfv].offset, _cmf_info[cmfv].length); return _cmf_info[cmfv].first_sprite[ge] + GB(cmf, _cmf_info[cmfv].offset, _cmf_info[cmfv].length);
} }
void DrawCompanyManagerFace(CompanyManagerFace face, int color, int x, int y); void DrawCompanyManagerFace(CompanyManagerFace face, int colour, int x, int y);
bool IsValidCompanyManagerFace(CompanyManagerFace cmf); bool IsValidCompanyManagerFace(CompanyManagerFace cmf);
#endif /* COMPANY_MANAGER_FACE_H */ #endif /* COMPANY_MANAGER_FACE_H */

View File

@ -79,16 +79,16 @@ void IConsoleFree()
* as well as to a logfile. If the network server is a dedicated server, all activities * as well as to a logfile. If the network server is a dedicated server, all activities
* are also logged. All lines to print are added to a temporary buffer which can be * are also logged. All lines to print are added to a temporary buffer which can be
* used as a history to print them onscreen * used as a history to print them onscreen
* @param color_code the colour of the command. Red in case of errors, etc. * @param colour_code the colour of the command. Red in case of errors, etc.
* @param string the message entered or output on the console (notice, error, etc.) * @param string the message entered or output on the console (notice, error, etc.)
*/ */
void IConsolePrint(ConsoleColour color_code, const char *string) void IConsolePrint(ConsoleColour colour_code, const char *string)
{ {
char *str; char *str;
#ifdef ENABLE_NETWORK #ifdef ENABLE_NETWORK
if (_redirect_console_to_client != INVALID_CLIENT_ID) { if (_redirect_console_to_client != INVALID_CLIENT_ID) {
/* Redirect the string to the client */ /* Redirect the string to the client */
NetworkServerSendRcon(_redirect_console_to_client, color_code, string); NetworkServerSendRcon(_redirect_console_to_client, colour_code, string);
return; return;
} }
#endif #endif
@ -108,7 +108,7 @@ void IConsolePrint(ConsoleColour color_code, const char *string)
} }
IConsoleWriteToLogFile(str); IConsoleWriteToLogFile(str);
IConsoleGUIPrint(color_code, str); IConsoleGUIPrint(colour_code, str);
} }
/** /**
@ -116,7 +116,7 @@ void IConsolePrint(ConsoleColour color_code, const char *string)
* by any other means. Uses printf() style format, for more information look * by any other means. Uses printf() style format, for more information look
* at IConsolePrint() * at IConsolePrint()
*/ */
void CDECL IConsolePrintF(ConsoleColour color_code, const char *s, ...) void CDECL IConsolePrintF(ConsoleColour colour_code, const char *s, ...)
{ {
va_list va; va_list va;
char buf[ICON_MAX_STREAMSIZE]; char buf[ICON_MAX_STREAMSIZE];
@ -125,7 +125,7 @@ void CDECL IConsolePrintF(ConsoleColour color_code, const char *s, ...)
vsnprintf(buf, sizeof(buf), s, va); vsnprintf(buf, sizeof(buf), s, va);
va_end(va); va_end(va);
IConsolePrint(color_code, buf); IConsolePrint(colour_code, buf);
} }
/** /**

View File

@ -16,8 +16,8 @@ void IConsoleFree();
void IConsoleClose(); void IConsoleClose();
/* console output */ /* console output */
void IConsolePrint(ConsoleColour color_code, const char *string); void IConsolePrint(ConsoleColour colour_code, const char *string);
void CDECL IConsolePrintF(ConsoleColour color_code, const char *s, ...); void CDECL IConsolePrintF(ConsoleColour colour_code, const char *s, ...);
void IConsoleDebug(const char *dbg, const char *string); void IConsoleDebug(const char *dbg, const char *string);
void IConsoleWarning(const char *string); void IConsoleWarning(const char *string);
void IConsoleError(const char *string); void IConsoleError(const char *string);

View File

@ -437,11 +437,11 @@ static void IConsoleHistoryNavigate(int direction)
* as well as to a logfile. If the network server is a dedicated server, all activities * as well as to a logfile. If the network server is a dedicated server, all activities
* are also logged. All lines to print are added to a temporary buffer which can be * are also logged. All lines to print are added to a temporary buffer which can be
* used as a history to print them onscreen * used as a history to print them onscreen
* @param color_code the colour of the command. Red in case of errors, etc. * @param colour_code the colour of the command. Red in case of errors, etc.
* @param string the message entered or output on the console (notice, error, etc.) * @param string the message entered or output on the console (notice, error, etc.)
*/ */
void IConsoleGUIPrint(ConsoleColour color_code, char *str) void IConsoleGUIPrint(ConsoleColour colour_code, char *str)
{ {
new IConsoleLine(str, (TextColour)color_code); new IConsoleLine(str, (TextColour)colour_code);
SetWindowDirty(FindWindowById(WC_CONSOLE, 0)); SetWindowDirty(FindWindowById(WC_CONSOLE, 0));
} }

View File

@ -134,6 +134,6 @@ bool GetArgumentInteger(uint32 *value, const char *arg);
void IConsoleGUIInit(); void IConsoleGUIInit();
void IConsoleGUIFree(); void IConsoleGUIFree();
void IConsoleGUIPrint(ConsoleColour color_code, char *string); void IConsoleGUIPrint(ConsoleColour colour_code, char *string);
#endif /* CONSOLE_INTERNAL_H */ #endif /* CONSOLE_INTERNAL_H */

View File

@ -359,7 +359,7 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner)
if (v->Previous() == NULL) delete v; if (v->Previous() == NULL) delete v;
} else { } else {
v->owner = new_owner; v->owner = new_owner;
v->colormap = PAL_NONE; v->colourmap = PAL_NONE;
if (IsEngineCountable(v)) GetCompany(new_owner)->num_engines[v->engine_type]++; if (IsEngineCountable(v)) GetCompany(new_owner)->num_engines[v->engine_type]++;
if (v->IsPrimaryVehicle()) v->unitnumber = unitidgen[v->type].NextID(); if (v->IsPrimaryVehicle()) v->unitnumber = unitidgen[v->type].NextID();
} }
@ -416,7 +416,7 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner)
if (si->owner == old_owner) si->owner = new_owner == INVALID_OWNER ? OWNER_NONE : new_owner; if (si->owner == old_owner) si->owner = new_owner == INVALID_OWNER ? OWNER_NONE : new_owner;
} }
/* Change color of existing windows */ /* Change colour of existing windows */
if (new_owner != INVALID_OWNER) ChangeWindowOwner(old_owner, new_owner); if (new_owner != INVALID_OWNER) ChangeWindowOwner(old_owner, new_owner);
_current_company = old; _current_company = old;

View File

@ -198,7 +198,7 @@ void DrawNewsNewVehicleAvail(Window *w, const NewsItem *ni)
DrawStringMultiCenter(w->width >> 1, 57, STR_NEW_VEHICLE_TYPE, w->width - 2); DrawStringMultiCenter(w->width >> 1, 57, STR_NEW_VEHICLE_TYPE, w->width - 2);
dei->engine_proc(w->width >> 1, 88, engine, 0); dei->engine_proc(w->width >> 1, 88, engine, 0);
GfxFillRect(25, 56, w->width - 56, 112, PALETTE_TO_STRUCT_GREY, FILLRECT_RECOLOR); GfxFillRect(25, 56, w->width - 56, 112, PALETTE_TO_STRUCT_GREY, FILLRECT_RECOLOUR);
dei->info_proc(engine, w->width >> 1, 129, w->width - 52); dei->info_proc(engine, w->width >> 1, 129, w->width - 52);
} }

View File

@ -295,7 +295,7 @@ void GenerateWorld(GenerateWorldMode mode, uint size_x, uint size_y)
ResetWindowSystem(); ResetWindowSystem();
/* Create toolbars */ /* Create toolbars */
SetupColorsAndInitialWindow(); SetupColoursAndInitialWindow();
if (_gw.thread != NULL) { if (_gw.thread != NULL) {
_gw.thread->Join(); _gw.thread->Join();

View File

@ -97,11 +97,11 @@ void GfxScroll(int left, int top, int width, int height, int xo, int yo)
* @param top Minimum Y (inclusive) * @param top Minimum Y (inclusive)
* @param right Maximum X (inclusive) * @param right Maximum X (inclusive)
* @param bottom Maximum Y (inclusive) * @param bottom Maximum Y (inclusive)
* @param colour A 8 bit palette index (FILLRECT_OPAQUE and FILLRECT_CHECKER) or a recolour spritenumber (FILLRECT_RECOLOR) * @param colour A 8 bit palette index (FILLRECT_OPAQUE and FILLRECT_CHECKER) or a recolour spritenumber (FILLRECT_RECOLOUR)
* @param mode * @param mode
* FILLRECT_OPAQUE: Fill the rectangle with the specified colour * FILLRECT_OPAQUE: Fill the rectangle with the specified colour
* FILLRECT_CHECKER: Like FILLRECT_OPAQUE, but only draw every second pixel (used to grey out things) * FILLRECT_CHECKER: Like FILLRECT_OPAQUE, but only draw every second pixel (used to grey out things)
* FILLRECT_RECOLOR: Apply a recolour sprite to every pixel in the rectangle currently on screen * FILLRECT_RECOLOUR: Apply a recolour sprite to every pixel in the rectangle currently on screen
*/ */
void GfxFillRect(int left, int top, int right, int bottom, int colour, FillRectMode mode) void GfxFillRect(int left, int top, int right, int bottom, int colour, FillRectMode mode)
{ {
@ -135,8 +135,8 @@ void GfxFillRect(int left, int top, int right, int bottom, int colour, FillRectM
blitter->DrawRect(dst, right, bottom, (uint8)colour); blitter->DrawRect(dst, right, bottom, (uint8)colour);
break; break;
case FILLRECT_RECOLOR: case FILLRECT_RECOLOUR:
blitter->DrawColorMappingRect(dst, right, bottom, GB(colour, 0, PALETTE_WIDTH)); blitter->DrawColourMappingRect(dst, right, bottom, GB(colour, 0, PALETTE_WIDTH));
break; break;
case FILLRECT_CHECKER: { case FILLRECT_CHECKER: {
@ -838,8 +838,8 @@ Dimension GetStringBoundingBox(const char *str)
void DrawCharCentered(WChar c, int x, int y, TextColour colour) void DrawCharCentered(WChar c, int x, int y, TextColour colour)
{ {
FontSize size = FS_NORMAL; FontSize size = FS_NORMAL;
assert(colour & IS_PALETTE_COLOR); assert(colour & IS_PALETTE_COLOUR);
colour &= ~IS_PALETTE_COLOR; colour &= ~IS_PALETTE_COLOUR;
int w = GetCharacterWidth(size, c); int w = GetCharacterWidth(size, c);
_string_colourremap[1] = _string_colourmap[_use_palette][colour].text; _string_colourremap[1] = _string_colourmap[_use_palette][colour].text;
@ -908,8 +908,8 @@ static int ReallyDoDrawString(const char *string, int x, int y, TextColour colou
if (colour != TC_INVALID) { // the invalid colour flag test should not really occur. But better be safe if (colour != TC_INVALID) { // the invalid colour flag test should not really occur. But better be safe
switch_colour:; switch_colour:;
if (colour & IS_PALETTE_COLOR) { if (colour & IS_PALETTE_COLOUR) {
_string_colourremap[1] = colour & ~IS_PALETTE_COLOR; _string_colourremap[1] = colour & ~IS_PALETTE_COLOUR;
_string_colourremap[2] = (_use_palette == PAL_DOS) ? 1 : 215; _string_colourremap[2] = (_use_palette == PAL_DOS) ? 1 : 215;
} else { } else {
_string_colourremap[1] = _string_colourmap[_use_palette][colour].text; _string_colourremap[1] = _string_colourmap[_use_palette][colour].text;
@ -1111,8 +1111,8 @@ void DoPaletteAnimations()
Blitter *blitter = BlitterFactoryBase::GetCurrentBlitter(); Blitter *blitter = BlitterFactoryBase::GetCurrentBlitter();
const Colour *s; const Colour *s;
const ExtraPaletteValues *ev = &_extra_palette_values; const ExtraPaletteValues *ev = &_extra_palette_values;
/* Amount of colors to be rotated. /* Amount of colours to be rotated.
* A few more for the DOS palette, because the water colors are * A few more for the DOS palette, because the water colours are
* 245-254 for DOS and 217-226 for Windows. */ * 245-254 for DOS and 217-226 for Windows. */
const int colour_rotation_amount = (_use_palette == PAL_DOS) ? PALETTE_ANIM_SIZE_DOS : PALETTE_ANIM_SIZE_WIN; const int colour_rotation_amount = (_use_palette == PAL_DOS) ? PALETTE_ANIM_SIZE_DOS : PALETTE_ANIM_SIZE_WIN;
Colour old_val[PALETTE_ANIM_SIZE_DOS]; Colour old_val[PALETTE_ANIM_SIZE_DOS];

View File

@ -10,7 +10,7 @@
#include "core/geometry_type.hpp" #include "core/geometry_type.hpp"
#include "zoom_type.h" #include "zoom_type.h"
typedef uint32 SpriteID; ///< The number of a sprite, without mapping bits and colortables typedef uint32 SpriteID; ///< The number of a sprite, without mapping bits and colourtables
/** Combination of a palette sprite and a 'real' sprite */ /** Combination of a palette sprite and a 'real' sprite */
struct PalSpriteID { struct PalSpriteID {
@ -185,7 +185,7 @@ enum Colours {
INVALID_COLOUR = 0xFF, INVALID_COLOUR = 0xFF,
}; };
/** Colour of the strings, see _string_colormap in table/palettes.h or docs/ottd-colourtext-palette.png */ /** Colour of the strings, see _string_colourmap in table/palettes.h or docs/ottd-colourtext-palette.png */
enum TextColour { enum TextColour {
TC_FROMSTRING = 0x00, TC_FROMSTRING = 0x00,
TC_BLUE = 0x00, TC_BLUE = 0x00,
@ -207,7 +207,7 @@ enum TextColour {
TC_BLACK = 0x10, TC_BLACK = 0x10,
TC_INVALID = 0xFF, TC_INVALID = 0xFF,
IS_PALETTE_COLOR = 0x100, ///< colour value is already a real palette colour index, not an index of a StringColour 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); DECLARE_ENUM_AS_BIT_SET(TextColour);
@ -220,9 +220,9 @@ enum PaletteAnimationSizes {
/** Define the operation GfxFillRect performs */ /** Define the operation GfxFillRect performs */
enum FillRectMode { enum FillRectMode {
FILLRECT_OPAQUE, ///< Fill rectangle with a single color FILLRECT_OPAQUE, ///< Fill rectangle with a single colour
FILLRECT_CHECKER, ///< Draw only every second pixel, used for greying-out FILLRECT_CHECKER, ///< Draw only every second pixel, used for greying-out
FILLRECT_RECOLOR, ///< Apply a recolor sprite to the screen content FILLRECT_RECOLOUR, ///< Apply a recolour sprite to the screen content
}; };
/** Palettes OpenTTD supports. */ /** Palettes OpenTTD supports. */

View File

@ -149,7 +149,7 @@ protected:
int gd_left, gd_top; ///< Where to start drawing the graph, in pixels. int gd_left, gd_top; ///< Where to start drawing the graph, in pixels.
uint gd_height; ///< The height of the graph in pixels. uint gd_height; ///< The height of the graph in pixels.
StringID format_str_y_axis; StringID format_str_y_axis;
byte colors[GRAPH_MAX_DATASETS]; byte colours[GRAPH_MAX_DATASETS];
OverflowSafeInt64 cost[GRAPH_MAX_DATASETS][24]; ///< last 2 years OverflowSafeInt64 cost[GRAPH_MAX_DATASETS][24]; ///< last 2 years
void DrawGraph() const void DrawGraph() const
@ -158,7 +158,7 @@ protected:
OverflowSafeInt64 highest_value; ///< Highest value to be drawn. OverflowSafeInt64 highest_value; ///< Highest value to be drawn.
int x_axis_offset; ///< Distance from the top of the graph to the x axis. int x_axis_offset; ///< Distance from the top of the graph to the x axis.
/* the colors and cost array of GraphDrawer must accomodate /* the colours and cost array of GraphDrawer must accomodate
* both values for cargo and companies. So if any are higher, quit */ * both values for cargo and companies. So if any are higher, quit */
assert(GRAPH_MAX_DATASETS >= (int)NUM_CARGO && GRAPH_MAX_DATASETS >= (int)MAX_COMPANIES); assert(GRAPH_MAX_DATASETS >= (int)NUM_CARGO && GRAPH_MAX_DATASETS >= (int)MAX_COMPANIES);
assert(this->num_vert_lines > 0); assert(this->num_vert_lines > 0);
@ -294,7 +294,7 @@ protected:
/* Centre the dot between the grid lines. */ /* Centre the dot between the grid lines. */
x = this->gd_left + GRAPH_X_POSITION_BEGINNING + (GRAPH_X_POSITION_SEPARATION / 2); x = this->gd_left + GRAPH_X_POSITION_BEGINNING + (GRAPH_X_POSITION_SEPARATION / 2);
byte color = this->colors[i]; byte colour = this->colours[i];
uint prev_x = INVALID_DATAPOINT_POS; uint prev_x = INVALID_DATAPOINT_POS;
uint prev_y = INVALID_DATAPOINT_POS; uint prev_y = INVALID_DATAPOINT_POS;
@ -326,10 +326,10 @@ protected:
y = this->gd_top + x_axis_offset - (x_axis_offset * datapoint) / (highest_value >> reduce_range); y = this->gd_top + x_axis_offset - (x_axis_offset * datapoint) / (highest_value >> reduce_range);
/* Draw the point. */ /* Draw the point. */
GfxFillRect(x - 1, y - 1, x + 1, y + 1, color); GfxFillRect(x - 1, y - 1, x + 1, y + 1, colour);
/* Draw the line connected to the previous point. */ /* Draw the line connected to the previous point. */
if (prev_x != INVALID_DATAPOINT_POS) GfxDrawLine(prev_x, prev_y, x, y, color); if (prev_x != INVALID_DATAPOINT_POS) GfxDrawLine(prev_x, prev_y, x, y, colour);
prev_x = x; prev_x = x;
prev_y = y; prev_y = y;
@ -388,7 +388,7 @@ public:
for (CompanyID k = COMPANY_FIRST; k < MAX_COMPANIES; k++) { for (CompanyID k = COMPANY_FIRST; k < MAX_COMPANIES; k++) {
if (IsValidCompanyID(k)) { if (IsValidCompanyID(k)) {
c = GetCompany(k); c = GetCompany(k);
this->colors[numd] = _colour_gradient[c->colour][6]; this->colours[numd] = _colour_gradient[c->colour][6];
for (int j = this->num_on_x_axis, i = 0; --j >= 0;) { for (int j = this->num_on_x_axis, i = 0; --j >= 0;) {
this->cost[numd][i] = (j >= c->num_valid_stat_ent) ? INVALID_DATAPOINT : GetGraphData(c, j); this->cost[numd][i] = (j >= c->num_valid_stat_ent) ? INVALID_DATAPOINT : GetGraphData(c, j);
i++; i++;
@ -676,7 +676,7 @@ struct PaymentRatesGraphWindow : BaseGraphWindow {
* changed the NewGRF configuration with this window open. */ * changed the NewGRF configuration with this window open. */
if (i + 3 < this->widget_count) { if (i + 3 < this->widget_count) {
/* Since the buttons have no text, no images, /* Since the buttons have no text, no images,
* both the text and the colored box have to be manually painted. * both the text and the coloured box have to be manually painted.
* clk_dif will move one pixel down and one pixel to the right * clk_dif will move one pixel down and one pixel to the right
* when the button is clicked */ * when the button is clicked */
byte clk_dif = this->IsWidgetLowered(i + 3) ? 1 : 0; byte clk_dif = this->IsWidgetLowered(i + 3) ? 1 : 0;
@ -688,7 +688,7 @@ struct PaymentRatesGraphWindow : BaseGraphWindow {
y += 8; y += 8;
} }
this->colors[i] = cs->legend_colour; this->colours[i] = cs->legend_colour;
for (uint j = 0; j != 20; j++) { for (uint j = 0; j != 20; j++) {
this->cost[i][j] = GetTransportedGoodsIncome(10, 20, j * 4 + 4, c); this->cost[i][j] = GetTransportedGoodsIncome(10, 20, j * 4 + 4, c);
} }
@ -902,7 +902,7 @@ public:
byte x; byte x;
uint16 y = 27; uint16 y = 27;
int total_score = 0; int total_score = 0;
int color_done, color_notdone; int colour_done, colour_notdone;
/* Draw standard stuff */ /* Draw standard stuff */
this->DrawWidgets(); this->DrawWidgets();
@ -959,9 +959,9 @@ public:
DrawCompanyIcon(i, (i % 8) * 37 + 13 + x, (i < 8 ? 0 : 13) + 16 + x); DrawCompanyIcon(i, (i % 8) * 37 + 13 + x, (i < 8 ? 0 : 13) + 16 + x);
} }
/* The colors used to show how the progress is going */ /* The colours used to show how the progress is going */
color_done = _colour_gradient[COLOUR_GREEN][4]; colour_done = _colour_gradient[COLOUR_GREEN][4];
color_notdone = _colour_gradient[COLOUR_RED][4]; colour_notdone = _colour_gradient[COLOUR_RED][4];
/* Draw all the score parts */ /* Draw all the score parts */
for (ScoreID i = SCORE_BEGIN; i < SCORE_END; i++) { for (ScoreID i = SCORE_BEGIN; i < SCORE_END; i++) {
@ -991,8 +991,8 @@ public:
if (val < 0 && i == SCORE_LOAN) x = 0; if (val < 0 && i == SCORE_LOAN) x = 0;
/* Draw the bar */ /* Draw the bar */
if (x != 0) GfxFillRect(112, y - 2, 112 + x, y + 10, color_done); if (x != 0) GfxFillRect(112, y - 2, 112 + x, y + 10, colour_done);
if (x != 50) GfxFillRect(112 + x, y - 2, 112 + 50, y + 10, color_notdone); if (x != 50) GfxFillRect(112 + x, y - 2, 112 + 50, y + 10, colour_notdone);
/* Calculate the % */ /* Calculate the % */
x = Clamp(val, 0, needed) * 100 / needed; x = Clamp(val, 0, needed) * 100 / needed;

View File

@ -67,7 +67,7 @@ void BuildFileList();
void SetFiosType(const byte fiostype); void SetFiosType(const byte fiostype);
/* FIOS_TYPE_FILE, FIOS_TYPE_OLDFILE etc. different colours */ /* FIOS_TYPE_FILE, FIOS_TYPE_OLDFILE etc. different colours */
extern const TextColour _fios_colors[]; extern const TextColour _fios_colours[];
/* bridge_gui.cpp */ /* bridge_gui.cpp */
void ShowBuildBridgeWindow(TileIndex start, TileIndex end, TransportType transport_type, byte bridge_type); void ShowBuildBridgeWindow(TileIndex start, TileIndex end, TransportType transport_type, byte bridge_type);

View File

@ -16,9 +16,9 @@
#include "table/strings.h" #include "table/strings.h"
/** /**
* Convert RGB colors to Grayscale using 29.9% Red, 58.7% Green, 11.4% Blue * Convert RGB colours to Grayscale using 29.9% Red, 58.7% Green, 11.4% Blue
* (average luminosity formula) -- Dalestan * (average luminosity formula) -- Dalestan
* This in fact is the NTSC Color Space -- TrueLight * This in fact is the NTSC Colour Space -- TrueLight
*/ */
static inline byte RGBToGrayscale(byte red, byte green, byte blue) static inline byte RGBToGrayscale(byte red, byte green, byte blue)
{ {
@ -126,7 +126,7 @@ static bool ReadHeightmapPNG(char *filename, uint *x, uint *y, byte **map)
png_set_packing(png_ptr); png_set_packing(png_ptr);
png_read_png(png_ptr, info_ptr, PNG_TRANSFORM_PACKING | PNG_TRANSFORM_STRIP_ALPHA | PNG_TRANSFORM_STRIP_16, NULL); png_read_png(png_ptr, info_ptr, PNG_TRANSFORM_PACKING | PNG_TRANSFORM_STRIP_ALPHA | PNG_TRANSFORM_STRIP_16, NULL);
/* Maps of wrong color-depth are not used. /* Maps of wrong colour-depth are not used.
* (this should have been taken care of by stripping alpha and 16-bit samples on load) */ * (this should have been taken care of by stripping alpha and 16-bit samples on load) */
if ((info_ptr->channels != 1) && (info_ptr->channels != 3) && (info_ptr->bit_depth != 8)) { if ((info_ptr->channels != 1) && (info_ptr->channels != 3) && (info_ptr->bit_depth != 8)) {
ShowErrorMessage(STR_PNGMAP_ERR_IMAGE_TYPE, STR_PNGMAP_ERROR, 0, 0); ShowErrorMessage(STR_PNGMAP_ERR_IMAGE_TYPE, STR_PNGMAP_ERROR, 0, 0);
@ -351,7 +351,7 @@ static void GrayscaleToMapHeights(uint img_width, uint img_height, byte *map)
assert(img_row < img_height); assert(img_row < img_height);
assert(img_col < img_width); assert(img_col < img_width);
/* Color scales from 0 to 255, OpenTTD height scales from 0 to 15 */ /* Colour scales from 0 to 255, OpenTTD height scales from 0 to 15 */
SetTileHeight(tile, map[img_row * img_width + img_col] / 16); SetTileHeight(tile, map[img_row * img_width + img_col] / 16);
} }
/* Only clear the tiles within the map area. */ /* Only clear the tiles within the map area. */

View File

@ -117,7 +117,7 @@ struct Industry : PoolItem<Industry, IndustryID, &_Industry_pool> {
IndustryType type; ///< type of industry. IndustryType type; ///< type of industry.
OwnerByte owner; ///< owner of the industry. Which SHOULD always be (imho) OWNER_NONE OwnerByte owner; ///< owner of the industry. Which SHOULD always be (imho) OWNER_NONE
byte random_color; ///< randomized colour of the industry, for display purpose byte random_colour; ///< randomized colour of the industry, for display purpose
Year last_prod_year; ///< last year of production Year last_prod_year; ///< last year of production
byte was_cargo_delivered; ///< flag that indicate this has been the closest industry chosen for cargo delivery by a station. see DeliverGoodsToIndustry byte was_cargo_delivered; ///< flag that indicate this has been the closest industry chosen for cargo delivery by a station. see DeliverGoodsToIndustry

View File

@ -288,8 +288,8 @@ static void DrawTile_Industry(TileInfo *ti)
GetIndustryConstructionStage(ti->tile))]; GetIndustryConstructionStage(ti->tile))];
image = dits->ground.sprite; image = dits->ground.sprite;
if (HasBit(image, PALETTE_MODIFIER_COLOR) && dits->ground.pal == PAL_NONE) { if (HasBit(image, PALETTE_MODIFIER_COLOUR) && dits->ground.pal == PAL_NONE) {
pal = GENERAL_SPRITE_COLOR(ind->random_color); pal = GENERAL_SPRITE_COLOUR(ind->random_colour);
} else { } else {
pal = dits->ground.pal; pal = dits->ground.pal;
} }
@ -312,7 +312,7 @@ static void DrawTile_Industry(TileInfo *ti)
image = dits->building.sprite; image = dits->building.sprite;
if (image != 0) { if (image != 0) {
AddSortableSpriteToDraw(image, AddSortableSpriteToDraw(image,
(HasBit(image, PALETTE_MODIFIER_COLOR) && dits->building.pal == PAL_NONE) ? GENERAL_SPRITE_COLOR(ind->random_color) : dits->building.pal, (HasBit(image, PALETTE_MODIFIER_COLOUR) && dits->building.pal == PAL_NONE) ? GENERAL_SPRITE_COLOUR(ind->random_colour) : dits->building.pal,
ti->x + dits->subtile_x, ti->x + dits->subtile_x,
ti->y + dits->subtile_y, ti->y + dits->subtile_y,
dits->width, dits->width,
@ -1488,7 +1488,7 @@ static void DoCreateNewIndustry(Industry *i, TileIndex tile, int type, const Ind
i->owner = owner; i->owner = owner;
r = Random(); r = Random();
i->random_color = GB(r, 0, 4); i->random_colour = GB(r, 0, 4);
i->counter = GB(r, 4, 12); i->counter = GB(r, 4, 12);
i->random = GB(r, 16, 16); i->random = GB(r, 16, 16);
i->produced_cargo_waiting[0] = 0; i->produced_cargo_waiting[0] = 0;
@ -1512,7 +1512,7 @@ static void DoCreateNewIndustry(Industry *i, TileIndex tile, int type, const Ind
if (HasBit(indspec->callback_flags, CBM_IND_DECIDE_COLOUR)) { if (HasBit(indspec->callback_flags, CBM_IND_DECIDE_COLOUR)) {
uint16 res = GetIndustryCallback(CBID_INDUSTRY_DECIDE_COLOUR, 0, 0, i, type, INVALID_TILE); uint16 res = GetIndustryCallback(CBID_INDUSTRY_DECIDE_COLOUR, 0, 0, i, type, INVALID_TILE);
if (res != CALLBACK_FAILED) i->random_color = GB(res, 0, 4); if (res != CALLBACK_FAILED) i->random_colour = GB(res, 0, 4);
} }
if (HasBit(indspec->callback_flags, CBM_IND_INPUT_CARGO_TYPES)) { if (HasBit(indspec->callback_flags, CBM_IND_INPUT_CARGO_TYPES)) {

View File

@ -366,10 +366,10 @@ struct MainWindow : Window
void ShowSelectGameWindow(); void ShowSelectGameWindow();
void SetupColorsAndInitialWindow() void SetupColoursAndInitialWindow()
{ {
for (uint i = 0; i != 16; i++) { for (uint i = 0; i != 16; i++) {
const byte *b = GetNonSprite(PALETTE_RECOLOR_START + i, ST_RECOLOUR); const byte *b = GetNonSprite(PALETTE_RECOLOUR_START + i, ST_RECOLOUR);
assert(b); assert(b);
memcpy(_colour_gradient[i], b + 0xC6, sizeof(_colour_gradient[i])); memcpy(_colour_gradient[i], b + 0xC6, sizeof(_colour_gradient[i]));

View File

@ -49,7 +49,7 @@ CommandCost CmdSetCompanyManagerFace(TileIndex tile, uint32 flags, uint32 p1, ui
* p1 bits 8-9 set in use state or first/second colour * p1 bits 8-9 set in use state or first/second colour
* @param p2 new colour for vehicles, property, etc. * @param p2 new colour for vehicles, property, etc.
*/ */
CommandCost CmdSetCompanyColor(TileIndex tile, uint32 flags, uint32 p1, uint32 p2, const char *text) CommandCost CmdSetCompanyColour(TileIndex tile, uint32 flags, uint32 p1, uint32 p2, const char *text)
{ {
if (p2 >= 16) return CMD_ERROR; // max 16 colours if (p2 >= 16) return CMD_ERROR; // max 16 colours
@ -116,7 +116,7 @@ CommandCost CmdSetCompanyColor(TileIndex tile, uint32 flags, uint32 p1, uint32 p
default: default:
break; break;
} }
ResetVehicleColorMap(); ResetVehicleColourMap();
MarkWholeScreenDirty(); MarkWholeScreenDirty();
} }
return CommandCost(); return CommandCost();

View File

@ -1367,8 +1367,8 @@ static const Widget _save_dialog_widgets[] = {
{ WIDGETS_END}, { WIDGETS_END},
}; };
/* Colors for fios types */ /* Colours for fios types */
const TextColour _fios_colors[] = { const TextColour _fios_colours[] = {
TC_LIGHT_BLUE, TC_DARK_GREEN, TC_DARK_GREEN, TC_ORANGE, TC_LIGHT_BROWN, TC_LIGHT_BLUE, TC_DARK_GREEN, TC_DARK_GREEN, TC_ORANGE, TC_LIGHT_BROWN,
TC_ORANGE, TC_LIGHT_BROWN, TC_ORANGE, TC_ORANGE, TC_YELLOW TC_ORANGE, TC_LIGHT_BROWN, TC_ORANGE, TC_ORANGE, TC_YELLOW
}; };
@ -1554,7 +1554,7 @@ public:
for (uint pos = this->vscroll.pos; pos < _fios_items.Length(); pos++) { for (uint pos = this->vscroll.pos; pos < _fios_items.Length(); pos++) {
const FiosItem *item = _fios_items.Get(pos); const FiosItem *item = _fios_items.Get(pos);
DoDrawStringTruncated(item->title, 4, y, _fios_colors[item->type], this->width - 18); DoDrawStringTruncated(item->title, 4, y, _fios_colours[item->type], this->width - 18);
y += 10; y += 10;
if (y >= this->vscroll.cap * 10 + widg->top + 1) break; if (y >= this->vscroll.cap * 10 + widg->top + 1) break;
} }

View File

@ -398,14 +398,14 @@ public:
GfxFillRect(187, 16, 200, 33, 0); GfxFillRect(187, 16, 200, 33, 0);
for (i = 0; i != 8; i++) { for (i = 0; i != 8; i++) {
int color = 0xD0; int colour = 0xD0;
if (i > 4) { if (i > 4) {
color = 0xBF; colour = 0xBF;
if (i > 6) { if (i > 6) {
color = 0xB8; colour = 0xB8;
} }
} }
GfxFillRect(187, NUM_SONGS_PLAYLIST - i * 2, 200, NUM_SONGS_PLAYLIST - i * 2, color); GfxFillRect(187, NUM_SONGS_PLAYLIST - i * 2, 200, NUM_SONGS_PLAYLIST - i * 2, colour);
} }
GfxFillRect(60, 46, 239, 52, 0); GfxFillRect(60, 46, 239, 52, 0);

View File

@ -60,7 +60,7 @@ static inline uint GetChatMessageCount()
/** /**
* Add a text message to the 'chat window' to be shown * Add a text message to the 'chat window' to be shown
* @param color The colour this message is to be shown in * @param colour The colour this message is to be shown in
* @param duration The duration of the chat message in game-days * @param duration The duration of the chat message in game-days
* @param message message itself in printf() style * @param message message itself in printf() style
*/ */
@ -96,7 +96,7 @@ void CDECL NetworkAddChatMessage(TextColour colour, uint8 duration, const char *
/* The default colour for a message is company colour. Replace this with /* The default colour for a message is company colour. Replace this with
* white for any additional lines */ * white for any additional lines */
cmsg->colour = (bufp == buf && colour & IS_PALETTE_COLOR) ? colour : (TextColour)(0x1D - 15) | IS_PALETTE_COLOR; cmsg->colour = (bufp == buf && colour & IS_PALETTE_COLOUR) ? colour : (TextColour)(0x1D - 15) | IS_PALETTE_COLOUR;
cmsg->end_date = _date + duration; cmsg->end_date = _date + duration;
bufp += strlen(bufp) + 1; // jump to 'next line' in the formatted string bufp += strlen(bufp) + 1; // jump to 'next line' in the formatted string
@ -232,7 +232,7 @@ void NetworkDrawChatMessage()
_screen.height - _chatmsg_box.y - count * NETWORK_CHAT_LINE_HEIGHT - 2, _screen.height - _chatmsg_box.y - count * NETWORK_CHAT_LINE_HEIGHT - 2,
_chatmsg_box.x + _chatmsg_box.width - 1, _chatmsg_box.x + _chatmsg_box.width - 1,
_screen.height - _chatmsg_box.y - 2, _screen.height - _chatmsg_box.y - 2,
PALETTE_TO_TRANSPARENT, FILLRECT_RECOLOR // black, but with some alpha for background PALETTE_TO_TRANSPARENT, FILLRECT_RECOLOUR // black, but with some alpha for background
); );
/* Paint the chat messages starting with the lowest at the bottom */ /* Paint the chat messages starting with the lowest at the bottom */

View File

@ -741,7 +741,7 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_CHAT)
} }
if (ci != NULL) if (ci != NULL)
NetworkTextMessage(action, (ConsoleColour)GetDrawStringCompanyColor(ci->client_playas), self_send, name, msg, data); NetworkTextMessage(action, (ConsoleColour)GetDrawStringCompanyColour(ci->client_playas), self_send, name, msg, data);
return NETWORK_RECV_STATUS_OKAY; return NETWORK_RECV_STATUS_OKAY;
} }
@ -816,10 +816,10 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_RCON)
{ {
char rcon_out[NETWORK_RCONCOMMAND_LENGTH]; char rcon_out[NETWORK_RCONCOMMAND_LENGTH];
ConsoleColour color_code = (ConsoleColour)p->Recv_uint16(); ConsoleColour colour_code = (ConsoleColour)p->Recv_uint16();
p->Recv_string(rcon_out, sizeof(rcon_out)); p->Recv_string(rcon_out, sizeof(rcon_out));
IConsolePrint(color_code, rcon_out); IConsolePrint(colour_code, rcon_out);
return NETWORK_RECV_STATUS_OKAY; return NETWORK_RECV_STATUS_OKAY;
} }

View File

@ -917,7 +917,7 @@ struct NetworkStartServerWindow : public QueryStringBaseWindow {
if (pos == 0) { if (pos == 0) {
DrawString(14, y, STR_4010_GENERATE_RANDOM_NEW_GAME, TC_DARK_GREEN); DrawString(14, y, STR_4010_GENERATE_RANDOM_NEW_GAME, TC_DARK_GREEN);
} else { } else {
DoDrawString(item->title, 14, y, _fios_colors[item->type] ); DoDrawString(item->title, 14, y, _fios_colours[item->type] );
} }
y += NSSWND_ROWSIZE; y += NSSWND_ROWSIZE;

View File

@ -148,7 +148,7 @@ void NetworkFreeLocalCommandQueue();
// from network.c // from network.c
void NetworkCloseClient(NetworkClientSocket *cs); void NetworkCloseClient(NetworkClientSocket *cs);
void NetworkTextMessage(NetworkAction action, ConsoleColour color, bool self_send, const char *name, const char *str = "", int64 data = 0); void NetworkTextMessage(NetworkAction action, ConsoleColour colour, bool self_send, const char *name, const char *str = "", int64 data = 0);
void NetworkGetClientName(char *clientname, size_t size, const NetworkClientSocket *cs); void NetworkGetClientName(char *clientname, size_t size, const NetworkClientSocket *cs);
uint NetworkCalculateLag(const NetworkClientSocket *cs); uint NetworkCalculateLag(const NetworkClientSocket *cs);
byte NetworkGetCurrentLanguageIndex(); byte NetworkGetCurrentLanguageIndex();

View File

@ -572,11 +572,11 @@ DEF_SERVER_SEND_COMMAND(PACKET_SERVER_NEWGAME)
cs->Send_Packet(p); cs->Send_Packet(p);
} }
DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_RCON)(NetworkClientSocket *cs, uint16 color, const char *command) DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_RCON)(NetworkClientSocket *cs, uint16 colour, const char *command)
{ {
Packet *p = NetworkSend_Init(PACKET_SERVER_RCON); Packet *p = NetworkSend_Init(PACKET_SERVER_RCON);
p->Send_uint16(color); p->Send_uint16(colour);
p->Send_string(command); p->Send_string(command);
cs->Send_Packet(p); cs->Send_Packet(p);
} }
@ -1044,7 +1044,7 @@ void NetworkServerSendChat(NetworkAction action, DestType desttype, int dest, co
ci = NetworkFindClientInfoFromClientID(from_id); ci = NetworkFindClientInfoFromClientID(from_id);
/* Display the text locally, and that is it */ /* Display the text locally, and that is it */
if (ci != NULL) if (ci != NULL)
NetworkTextMessage(action, (ConsoleColour)GetDrawStringCompanyColor(ci->client_playas), false, ci->client_name, msg, data); NetworkTextMessage(action, (ConsoleColour)GetDrawStringCompanyColour(ci->client_playas), false, ci->client_name, msg, data);
} else { } else {
/* Else find the client to send the message to */ /* Else find the client to send the message to */
FOR_ALL_CLIENT_SOCKETS(cs) { FOR_ALL_CLIENT_SOCKETS(cs) {
@ -1061,7 +1061,7 @@ void NetworkServerSendChat(NetworkAction action, DestType desttype, int dest, co
ci = NetworkFindClientInfoFromClientID(from_id); ci = NetworkFindClientInfoFromClientID(from_id);
ci_to = NetworkFindClientInfoFromClientID((ClientID)dest); ci_to = NetworkFindClientInfoFromClientID((ClientID)dest);
if (ci != NULL && ci_to != NULL) if (ci != NULL && ci_to != NULL)
NetworkTextMessage(action, (ConsoleColour)GetDrawStringCompanyColor(ci->client_playas), true, ci_to->client_name, msg, data); NetworkTextMessage(action, (ConsoleColour)GetDrawStringCompanyColour(ci->client_playas), true, ci_to->client_name, msg, data);
} else { } else {
FOR_ALL_CLIENT_SOCKETS(cs) { FOR_ALL_CLIENT_SOCKETS(cs) {
if (cs->client_id == from_id) { if (cs->client_id == from_id) {
@ -1089,7 +1089,7 @@ void NetworkServerSendChat(NetworkAction action, DestType desttype, int dest, co
ci = NetworkFindClientInfoFromClientID(from_id); ci = NetworkFindClientInfoFromClientID(from_id);
ci_own = NetworkFindClientInfoFromClientID(CLIENT_ID_SERVER); ci_own = NetworkFindClientInfoFromClientID(CLIENT_ID_SERVER);
if (ci != NULL && ci_own != NULL && ci_own->client_playas == dest) { if (ci != NULL && ci_own != NULL && ci_own->client_playas == dest) {
NetworkTextMessage(action, (ConsoleColour)GetDrawStringCompanyColor(ci->client_playas), false, ci->client_name, msg, data); NetworkTextMessage(action, (ConsoleColour)GetDrawStringCompanyColour(ci->client_playas), false, ci->client_name, msg, data);
if (from_id == CLIENT_ID_SERVER) show_local = false; if (from_id == CLIENT_ID_SERVER) show_local = false;
ci_to = ci_own; ci_to = ci_own;
} }
@ -1104,7 +1104,7 @@ void NetworkServerSendChat(NetworkAction action, DestType desttype, int dest, co
StringID str = IsValidCompanyID(ci_to->client_playas) ? STR_COMPANY_NAME : STR_NETWORK_SPECTATORS; StringID str = IsValidCompanyID(ci_to->client_playas) ? STR_COMPANY_NAME : STR_NETWORK_SPECTATORS;
SetDParam(0, ci_to->client_playas); SetDParam(0, ci_to->client_playas);
GetString(name, str, lastof(name)); GetString(name, str, lastof(name));
NetworkTextMessage(action, (ConsoleColour)GetDrawStringCompanyColor(ci_own->client_playas), true, name, msg, data); NetworkTextMessage(action, (ConsoleColour)GetDrawStringCompanyColour(ci_own->client_playas), true, name, msg, data);
} else { } else {
FOR_ALL_CLIENT_SOCKETS(cs) { FOR_ALL_CLIENT_SOCKETS(cs) {
if (cs->client_id == from_id) { if (cs->client_id == from_id) {
@ -1124,7 +1124,7 @@ void NetworkServerSendChat(NetworkAction action, DestType desttype, int dest, co
} }
ci = NetworkFindClientInfoFromClientID(from_id); ci = NetworkFindClientInfoFromClientID(from_id);
if (ci != NULL) if (ci != NULL)
NetworkTextMessage(action, (ConsoleColour)GetDrawStringCompanyColor(ci->client_playas), false, ci->client_name, msg, data); NetworkTextMessage(action, (ConsoleColour)GetDrawStringCompanyColour(ci->client_playas), false, ci->client_name, msg, data);
break; break;
} }
} }

View File

@ -12,7 +12,7 @@ DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_ERROR_QUIT)(NetworkClientSocket *cs,
DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_ERROR)(NetworkClientSocket *cs, NetworkErrorCode error); DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_ERROR)(NetworkClientSocket *cs, NetworkErrorCode error);
DEF_SERVER_SEND_COMMAND(PACKET_SERVER_SHUTDOWN); DEF_SERVER_SEND_COMMAND(PACKET_SERVER_SHUTDOWN);
DEF_SERVER_SEND_COMMAND(PACKET_SERVER_NEWGAME); DEF_SERVER_SEND_COMMAND(PACKET_SERVER_NEWGAME);
DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_RCON)(NetworkClientSocket *cs, uint16 color, const char *command); DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_RCON)(NetworkClientSocket *cs, uint16 colour, const char *command);
DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_MOVE)(NetworkClientSocket *cs, uint16 client_id, CompanyID company_id); DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_MOVE)(NetworkClientSocket *cs, uint16 client_id, CompanyID company_id);
bool NetworkServer_ReadPackets(NetworkClientSocket *cs); bool NetworkServer_ReadPackets(NetworkClientSocket *cs);

View File

@ -414,7 +414,7 @@ static void MapSpriteMappingRecolour(PalSpriteID *grf_sprite)
if (HasBit(grf_sprite->sprite, 15)) { if (HasBit(grf_sprite->sprite, 15)) {
ClrBit(grf_sprite->sprite, 15); ClrBit(grf_sprite->sprite, 15);
SetBit(grf_sprite->sprite, PALETTE_MODIFIER_COLOR); SetBit(grf_sprite->sprite, PALETTE_MODIFIER_COLOUR);
} }
} }
@ -2353,7 +2353,7 @@ static ChangeInfoResult IndustriesChangeInfo(uint indid, int numinfo, int prop,
indsp->appear_ingame[_settings_game.game_creation.landscape] = grf_load_byte(&buf); indsp->appear_ingame[_settings_game.game_creation.landscape] = grf_load_byte(&buf);
break; break;
case 0x19: // Map color case 0x19: // Map colour
indsp->map_colour = MapDOSColour(grf_load_byte(&buf)); indsp->map_colour = MapDOSColour(grf_load_byte(&buf));
break; break;
@ -4413,7 +4413,7 @@ static uint32 GetPatchVariable(uint8 param)
} }
/* 2CC colormap base sprite */ /* 2CC colourmap base sprite */
case 0x11: return SPR_2CCMAP_BASE; case 0x11: return SPR_2CCMAP_BASE;
/* map size: format = -MABXYSS /* map size: format = -MABXYSS

View File

@ -199,7 +199,7 @@ enum CallbackID {
/** Callback done for each tile of a station to check the slope. */ /** Callback done for each tile of a station to check the slope. */
CBID_STATION_LAND_SLOPE_CHECK = 0x149, // 15 bit callback, not implemented CBID_STATION_LAND_SLOPE_CHECK = 0x149, // 15 bit callback, not implemented
/** Called to determine the color of an industry. */ /** Called to determine the colour of an industry. */
CBID_INDUSTRY_DECIDE_COLOUR = 0x14A, // 4 bit callback CBID_INDUSTRY_DECIDE_COLOUR = 0x14A, // 4 bit callback
/** Customize the input cargo types of a newly build industry. */ /** Customize the input cargo types of a newly build industry. */

View File

@ -101,19 +101,19 @@ TileIndex GetNearbyTile(byte parameter, TileIndex tile);
uint32 GetNearbyTileInformation(TileIndex tile); uint32 GetNearbyTileInformation(TileIndex tile);
/** /**
* Applies PALETTE_MODIFIER_TRANSPARENT and PALETTE_MODIFIER_COLOR to a palette entry of a sprite layout entry * Applies PALETTE_MODIFIER_TRANSPARENT and PALETTE_MODIFIER_COLOUR to a palette entry of a sprite layout entry
* @Note for ground sprites use #GroundSpritePaletteTransform * @Note for ground sprites use #GroundSpritePaletteTransform
* @Note Not useable for OTTD internal spritelayouts from table/xxx_land.h as PALETTE_MODIFIER_TRANSPARENT is only set * @Note Not useable for OTTD internal spritelayouts from table/xxx_land.h as PALETTE_MODIFIER_TRANSPARENT is only set
* when to use the default palette. * when to use the default palette.
* *
* @param image The sprite to draw * @param image The sprite to draw
* @param pal The palette from the sprite layout * @param pal The palette from the sprite layout
* @param default_pal The default recolour sprite to use (typically company color resp. random industry/house color) * @param default_pal The default recolour sprite to use (typically company colour resp. random industry/house colour)
* @return The palette to use * @return The palette to use
*/ */
static inline SpriteID SpriteLayoutPaletteTransform(SpriteID image, SpriteID pal, SpriteID default_pal) static inline SpriteID SpriteLayoutPaletteTransform(SpriteID image, SpriteID pal, SpriteID default_pal)
{ {
if (HasBit(image, PALETTE_MODIFIER_TRANSPARENT) || HasBit(image, PALETTE_MODIFIER_COLOR)) { if (HasBit(image, PALETTE_MODIFIER_TRANSPARENT) || HasBit(image, PALETTE_MODIFIER_COLOUR)) {
return (pal != 0 ? pal : default_pal); return (pal != 0 ? pal : default_pal);
} else { } else {
return PAL_NONE; return PAL_NONE;
@ -121,18 +121,18 @@ static inline SpriteID SpriteLayoutPaletteTransform(SpriteID image, SpriteID pal
} }
/** /**
* Applies PALETTE_MODIFIER_COLOR to a palette entry of a ground sprite * Applies PALETTE_MODIFIER_COLOUR to a palette entry of a ground sprite
* @Note Not useable for OTTD internal spritelayouts from table/xxx_land.h as PALETTE_MODIFIER_TRANSPARENT is only set * @Note Not useable for OTTD internal spritelayouts from table/xxx_land.h as PALETTE_MODIFIER_TRANSPARENT is only set
* when to use the default palette. * when to use the default palette.
* *
* @param image The sprite to draw * @param image The sprite to draw
* @param pal The palette from the sprite layout * @param pal The palette from the sprite layout
* @param default_pal The default recolour sprite to use (typically company color resp. random industry/house color) * @param default_pal The default recolour sprite to use (typically company colour resp. random industry/house colour)
* @return The palette to use * @return The palette to use
*/ */
static inline SpriteID GroundSpritePaletteTransform(SpriteID image, SpriteID pal, SpriteID default_pal) static inline SpriteID GroundSpritePaletteTransform(SpriteID image, SpriteID pal, SpriteID default_pal)
{ {
if (HasBit(image, PALETTE_MODIFIER_COLOR)) { if (HasBit(image, PALETTE_MODIFIER_COLOUR)) {
return (pal != 0 ? pal : default_pal); return (pal != 0 ? pal : default_pal);
} else { } else {
return PAL_NONE; return PAL_NONE;

View File

@ -373,7 +373,7 @@ static void DrawTileLayout(const TileInfo *ti, const SpriteGroup *group, byte st
const DrawTileSeqStruct *dtss; const DrawTileSeqStruct *dtss;
const HouseSpec *hs = GetHouseSpecs(house_id); const HouseSpec *hs = GetHouseSpecs(house_id);
SpriteID palette = hs->random_colour[TileHash2Bit(ti->x, ti->y)] + PALETTE_RECOLOR_START; SpriteID palette = hs->random_colour[TileHash2Bit(ti->x, ti->y)] + PALETTE_RECOLOUR_START;
if (HasBit(hs->callback_mask, CBM_HOUSE_COLOUR)) { if (HasBit(hs->callback_mask, CBM_HOUSE_COLOUR)) {
uint16 callback = GetHouseCallback(CBID_HOUSE_COLOUR, 0, 0, house_id, GetTownByTile(ti->tile), ti->tile); uint16 callback = GetHouseCallback(CBID_HOUSE_COLOUR, 0, 0, house_id, GetTownByTile(ti->tile), ti->tile);
if (callback != CALLBACK_FAILED) { if (callback != CALLBACK_FAILED) {

View File

@ -366,7 +366,7 @@ uint32 IndustryGetVariable(const ResolverObject *object, byte variable, byte par
case 0xA6: return industry->type; case 0xA6: return industry->type;
case 0xA7: return industry->founder; case 0xA7: return industry->founder;
case 0xA8: return industry->random_color; case 0xA8: return industry->random_colour;
case 0xA9: return Clamp(industry->last_prod_year - ORIGINAL_BASE_YEAR, 0, 255); case 0xA9: return Clamp(industry->last_prod_year - ORIGINAL_BASE_YEAR, 0, 255);
case 0xAA: return industry->counter; case 0xAA: return industry->counter;
case 0xAB: return GB(industry->counter, 8, 8); case 0xAB: return GB(industry->counter, 8, 8);

View File

@ -163,7 +163,7 @@ static void NewIndustryTileResolver(ResolverObject *res, IndustryGfx gfx, TileIn
res->grffile = (its != NULL ? its->grf_prop.grffile : NULL); res->grffile = (its != NULL ? its->grf_prop.grffile : NULL);
} }
static void IndustryDrawTileLayout(const TileInfo *ti, const SpriteGroup *group, byte rnd_color, byte stage, IndustryGfx gfx) static void IndustryDrawTileLayout(const TileInfo *ti, const SpriteGroup *group, byte rnd_colour, byte stage, IndustryGfx gfx)
{ {
const DrawTileSprites *dts = group->g.layout.dts; const DrawTileSprites *dts = group->g.layout.dts;
const DrawTileSeqStruct *dtss; const DrawTileSeqStruct *dtss;
@ -179,7 +179,7 @@ static void IndustryDrawTileLayout(const TileInfo *ti, const SpriteGroup *group,
if (image == SPR_FLAT_WATER_TILE && IsIndustryTileOnWater(ti->tile)) { if (image == SPR_FLAT_WATER_TILE && IsIndustryTileOnWater(ti->tile)) {
DrawWaterClassGround(ti); DrawWaterClassGround(ti);
} else { } else {
DrawGroundSprite(image, GroundSpritePaletteTransform(image, pal, GENERAL_SPRITE_COLOR(rnd_color))); DrawGroundSprite(image, GroundSpritePaletteTransform(image, pal, GENERAL_SPRITE_COLOUR(rnd_colour)));
} }
} }
@ -194,7 +194,7 @@ static void IndustryDrawTileLayout(const TileInfo *ti, const SpriteGroup *group,
if (IS_CUSTOM_SPRITE(image)) image += stage; if (IS_CUSTOM_SPRITE(image)) image += stage;
pal = SpriteLayoutPaletteTransform(image, pal, GENERAL_SPRITE_COLOR(rnd_color)); pal = SpriteLayoutPaletteTransform(image, pal, GENERAL_SPRITE_COLOUR(rnd_colour));
if ((byte)dtss->delta_z != 0x80) { if ((byte)dtss->delta_z != 0x80) {
AddSortableSpriteToDraw( AddSortableSpriteToDraw(
@ -252,7 +252,7 @@ bool DrawNewIndustryTile(TileInfo *ti, Industry *i, IndustryGfx gfx, const Indus
/* Limit the building stage to the number of stages supplied. */ /* Limit the building stage to the number of stages supplied. */
byte stage = GetIndustryConstructionStage(ti->tile); byte stage = GetIndustryConstructionStage(ti->tile);
stage = Clamp(stage - 4 + group->g.layout.num_sprites, 0, group->g.layout.num_sprites - 1); stage = Clamp(stage - 4 + group->g.layout.num_sprites, 0, group->g.layout.num_sprites - 1);
IndustryDrawTileLayout(ti, group, i->random_color, stage, gfx); IndustryDrawTileLayout(ti, group, i->random_colour, stage, gfx);
return true; return true;
} }
} }

View File

@ -780,7 +780,7 @@ bool DrawStationTile(int x, int y, RailType railtype, Axis axis, StationClassID
const RailtypeInfo *rti = GetRailTypeInfo(railtype); const RailtypeInfo *rti = GetRailTypeInfo(railtype);
SpriteID relocation; SpriteID relocation;
SpriteID image; SpriteID image;
SpriteID palette = COMPANY_SPRITE_COLOR(_local_company); SpriteID palette = COMPANY_SPRITE_COLOUR(_local_company);
uint tile = 2; uint tile = 2;
statspec = GetCustomStationSpec(sclass, station); statspec = GetCustomStationSpec(sclass, station);

View File

@ -50,7 +50,7 @@ static void DrawNewsBankrupcy(Window *w, const NewsItem *ni)
const CompanyNewsInformation *cni = (const CompanyNewsInformation*)ni->free_data; const CompanyNewsInformation *cni = (const CompanyNewsInformation*)ni->free_data;
DrawCompanyManagerFace(cni->face, cni->colour, 2, 23); DrawCompanyManagerFace(cni->face, cni->colour, 2, 23);
GfxFillRect(3, 23, 3 + 91, 23 + 118, PALETTE_TO_STRUCT_GREY, FILLRECT_RECOLOR); GfxFillRect(3, 23, 3 + 91, 23 + 118, PALETTE_TO_STRUCT_GREY, FILLRECT_RECOLOUR);
SetDParamStr(0, cni->president_name); SetDParamStr(0, cni->president_name);
DrawStringMultiCenter(49, 148, STR_JUST_RAW_STRING, 94); DrawStringMultiCenter(49, 148, STR_JUST_RAW_STRING, 94);
@ -229,11 +229,11 @@ struct NewsWindow : Window {
this->DrawViewport(); this->DrawViewport();
_transparency_opt = to_backup; _transparency_opt = to_backup;
/* Shade the viewport into gray, or color*/ /* Shade the viewport into gray, or colour*/
ViewPort *vp = this->viewport; ViewPort *vp = this->viewport;
GfxFillRect(vp->left - this->left, vp->top - this->top, GfxFillRect(vp->left - this->left, vp->top - this->top,
vp->left - this->left + vp->width - 1, vp->top - this->top + vp->height - 1, vp->left - this->left + vp->width - 1, vp->top - this->top + vp->height - 1,
(this->ni->flags & NF_INCOLOR ? PALETTE_TO_TRANSPARENT : PALETTE_TO_STRUCT_GREY), FILLRECT_RECOLOR (this->ni->flags & NF_INCOLOUR ? PALETTE_TO_TRANSPARENT : PALETTE_TO_STRUCT_GREY), FILLRECT_RECOLOUR
); );
CopyInDParam(0, this->ni->params, lengthof(this->ni->params)); CopyInDParam(0, this->ni->params, lengthof(this->ni->params));
@ -497,8 +497,8 @@ void AddNewsItem(StringID string, NewsSubtype subtype, uint data_a, uint data_b,
ni->subtype = subtype; ni->subtype = subtype;
ni->flags = _news_subtype_data[subtype].flags; ni->flags = _news_subtype_data[subtype].flags;
/* show this news message in color? */ /* show this news message in colour? */
if (_cur_year >= _settings_client.gui.colored_news_year) ni->flags |= NF_INCOLOR; if (_cur_year >= _settings_client.gui.coloured_news_year) ni->flags |= NF_INCOLOUR;
ni->data_a = data_a; ni->data_a = data_a;
ni->data_b = data_b; ni->data_b = data_b;

View File

@ -68,14 +68,14 @@ enum NewsMode {
/** /**
* Various OR-able news-item flags. * Various OR-able news-item flags.
* note: NF_INCOLOR is set automatically if needed * note: NF_INCOLOUR is set automatically if needed
*/ */
enum NewsFlag { enum NewsFlag {
NF_NONE = 0, ///< No flag is set. NF_NONE = 0, ///< No flag is set.
NF_VIEWPORT = (1 << 1), ///< Does the news message have a viewport? (ingame picture of happening) NF_VIEWPORT = (1 << 1), ///< Does the news message have a viewport? (ingame picture of happening)
NF_TILE = (1 << 2), ///< When clicked on the news message scroll to a given tile? Tile is in data_a NF_TILE = (1 << 2), ///< When clicked on the news message scroll to a given tile? Tile is in data_a
NF_VEHICLE = (1 << 3), ///< When clicked on the message scroll to the vehicle? VehicleID is in data_a NF_VEHICLE = (1 << 3), ///< When clicked on the message scroll to the vehicle? VehicleID is in data_a
NF_INCOLOR = (1 << 5), ///< Show the newsmessage in colour, otherwise it defaults to black & white NF_INCOLOUR = (1 << 5), ///< Show the newsmessage in colour, otherwise it defaults to black & white
NF_TILE2 = (1 << 6), ///< There is a second tile to scroll to; tile is in data_b NF_TILE2 = (1 << 6), ///< There is a second tile to scroll to; tile is in data_b
}; };
DECLARE_ENUM_AS_BIT_SET(NewsFlag); DECLARE_ENUM_AS_BIT_SET(NewsFlag);

View File

@ -338,7 +338,7 @@ static void LoadIntroGame()
/* Setup main window */ /* Setup main window */
ResetWindowSystem(); ResetWindowSystem();
SetupColorsAndInitialWindow(); SetupColoursAndInitialWindow();
/* Load the default opening screen savegame */ /* Load the default opening screen savegame */
if (SaveOrLoad("opntitle.dat", SL_LOAD, DATA_DIR) != SL_OK) { if (SaveOrLoad("opntitle.dat", SL_LOAD, DATA_DIR) != SL_OK) {
@ -811,7 +811,7 @@ static void StartScenario()
/* Reinitialize windows */ /* Reinitialize windows */
ResetWindowSystem(); ResetWindowSystem();
SetupColorsAndInitialWindow(); SetupColoursAndInitialWindow();
ResetGRFConfig(true); ResetGRFConfig(true);

View File

@ -1883,7 +1883,7 @@ static void DrawTile_Track(TileInfo *ti)
const RailtypeInfo *rti = GetRailTypeInfo(GetRailType(ti->tile)); const RailtypeInfo *rti = GetRailTypeInfo(GetRailType(ti->tile));
SpriteID image; SpriteID image;
_drawtile_track_palette = COMPANY_SPRITE_COLOR(GetTileOwner(ti->tile)); _drawtile_track_palette = COMPANY_SPRITE_COLOUR(GetTileOwner(ti->tile));
if (IsPlainRailTile(ti->tile)) { if (IsPlainRailTile(ti->tile)) {
TrackBits rails = GetTrackBits(ti->tile); TrackBits rails = GetTrackBits(ti->tile);
@ -2020,14 +2020,14 @@ default_waypoint:
static void DrawTileSequence(int x, int y, SpriteID ground, const DrawTileSeqStruct *dtss, uint32 offset) static void DrawTileSequence(int x, int y, SpriteID ground, const DrawTileSeqStruct *dtss, uint32 offset)
{ {
SpriteID palette = COMPANY_SPRITE_COLOR(_local_company); SpriteID palette = COMPANY_SPRITE_COLOUR(_local_company);
DrawSprite(ground, PAL_NONE, x, y); DrawSprite(ground, PAL_NONE, x, y);
for (; dtss->image.sprite != 0; dtss++) { for (; dtss->image.sprite != 0; dtss++) {
Point pt = RemapCoords(dtss->delta_x, dtss->delta_y, dtss->delta_z); Point pt = RemapCoords(dtss->delta_x, dtss->delta_y, dtss->delta_z);
SpriteID image = dtss->image.sprite + offset; SpriteID image = dtss->image.sprite + offset;
DrawSprite(image, HasBit(image, PALETTE_MODIFIER_COLOR) ? palette : PAL_NONE, x + pt.x, y + pt.y); DrawSprite(image, HasBit(image, PALETTE_MODIFIER_COLOUR) ? palette : PAL_NONE, x + pt.x, y + pt.y);
} }
} }

View File

@ -1178,7 +1178,7 @@ static void DrawTile_Road(TileInfo *ti)
case ROAD_TILE_DEPOT: { case ROAD_TILE_DEPOT: {
if (ti->tileh != SLOPE_FLAT) DrawFoundation(ti, FOUNDATION_LEVELED); if (ti->tileh != SLOPE_FLAT) DrawFoundation(ti, FOUNDATION_LEVELED);
SpriteID palette = COMPANY_SPRITE_COLOR(GetTileOwner(ti->tile)); SpriteID palette = COMPANY_SPRITE_COLOUR(GetTileOwner(ti->tile));
const DrawTileSprites *dts; const DrawTileSprites *dts;
if (HasTileRoadType(ti->tile, ROADTYPE_TRAM)) { if (HasTileRoadType(ti->tile, ROADTYPE_TRAM)) {
@ -1196,7 +1196,7 @@ static void DrawTile_Road(TileInfo *ti)
SpriteID image = dtss->image.sprite; SpriteID image = dtss->image.sprite;
SpriteID pal; SpriteID pal;
if (!IsTransparencySet(TO_BUILDINGS) && HasBit(image, PALETTE_MODIFIER_COLOR)) { if (!IsTransparencySet(TO_BUILDINGS) && HasBit(image, PALETTE_MODIFIER_COLOUR)) {
pal = palette; pal = palette;
} else { } else {
pal = PAL_NONE; pal = PAL_NONE;
@ -1218,7 +1218,7 @@ static void DrawTile_Road(TileInfo *ti)
void DrawRoadDepotSprite(int x, int y, DiagDirection dir, RoadType rt) void DrawRoadDepotSprite(int x, int y, DiagDirection dir, RoadType rt)
{ {
SpriteID palette = COMPANY_SPRITE_COLOR(_local_company); SpriteID palette = COMPANY_SPRITE_COLOUR(_local_company);
const DrawTileSprites *dts = (rt == ROADTYPE_TRAM) ? &_tram_depot[dir] : &_road_depot[dir]; const DrawTileSprites *dts = (rt == ROADTYPE_TRAM) ? &_tram_depot[dir] : &_road_depot[dir];
x += 33; x += 33;
@ -1230,7 +1230,7 @@ void DrawRoadDepotSprite(int x, int y, DiagDirection dir, RoadType rt)
Point pt = RemapCoords(dtss->delta_x, dtss->delta_y, dtss->delta_z); Point pt = RemapCoords(dtss->delta_x, dtss->delta_y, dtss->delta_z);
SpriteID image = dtss->image.sprite; SpriteID image = dtss->image.sprite;
DrawSprite(image, HasBit(image, PALETTE_MODIFIER_COLOR) ? palette : PAL_NONE, x + pt.x, y + pt.y); DrawSprite(image, HasBit(image, PALETTE_MODIFIER_COLOUR) ? palette : PAL_NONE, x + pt.x, y + pt.y);
} }
} }

View File

@ -148,7 +148,7 @@ void RoadVehUpdateCache(Vehicle *v)
u->u.road.cached_veh_length = GetRoadVehLength(u); u->u.road.cached_veh_length = GetRoadVehLength(u);
/* Invalidate the vehicle colour map */ /* Invalidate the vehicle colour map */
u->colormap = PAL_NONE; u->colourmap = PAL_NONE;
} }
} }

View File

@ -203,7 +203,7 @@ static bool InitializeWindowsAndCaches()
{ {
/* Initialize windows */ /* Initialize windows */
ResetWindowSystem(); ResetWindowSystem();
SetupColorsAndInitialWindow(); SetupColoursAndInitialWindow();
ResetViewportAfterLoadGame(); ResetViewportAfterLoadGame();
@ -1754,7 +1754,7 @@ void ReloadNewGRFData()
/* Check and update house and town values */ /* Check and update house and town values */
UpdateHousesAndTowns(); UpdateHousesAndTowns();
/* Update livery selection windows */ /* Update livery selection windows */
for (CompanyID i = COMPANY_FIRST; i < MAX_COMPANIES; i++) InvalidateWindowData(WC_COMPANY_COLOR, i, _loaded_newgrf_features.has_2CC); for (CompanyID i = COMPANY_FIRST; i < MAX_COMPANIES; i++) InvalidateWindowData(WC_COMPANY_COLOUR, i, _loaded_newgrf_features.has_2CC);
/* redraw the whole screen */ /* redraw the whole screen */
MarkWholeScreenDirty(); MarkWholeScreenDirty();
CheckTrainsLengths(); CheckTrainsLengths();

View File

@ -18,7 +18,7 @@
* - 10 to 13: nose * - 10 to 13: nose
* - 13 to 15: lips (also moustache for males) * - 13 to 15: lips (also moustache for males)
* - 16 to 19: hair * - 16 to 19: hair
* - 20 to 22: eye color * - 20 to 22: eye colour
* - 20 to 27: tie, ear rings etc. * - 20 to 27: tie, ear rings etc.
* - 28 to 30: glasses * - 28 to 30: glasses
* - 19, 26 and 27: race (bit 27 set and bit 19 equal to bit 26 = black, otherwise white) * - 19, 26 and 27: race (bit 27 set and bit 19 equal to bit 26 = black, otherwise white)

View File

@ -35,7 +35,7 @@ static const SaveLoad _industry_desc[] = {
SLE_VAR(Industry, type, SLE_UINT8), SLE_VAR(Industry, type, SLE_UINT8),
SLE_VAR(Industry, owner, SLE_UINT8), SLE_VAR(Industry, owner, SLE_UINT8),
SLE_VAR(Industry, random_color, SLE_UINT8), SLE_VAR(Industry, random_colour, SLE_UINT8),
SLE_CONDVAR(Industry, last_prod_year, SLE_FILE_U8 | SLE_VAR_I32, 0, 30), SLE_CONDVAR(Industry, last_prod_year, SLE_FILE_U8 | SLE_VAR_I32, 0, 30),
SLE_CONDVAR(Industry, last_prod_year, SLE_INT32, 31, SL_MAX_VERSION), SLE_CONDVAR(Industry, last_prod_year, SLE_INT32, 31, SL_MAX_VERSION),
SLE_VAR(Industry, was_cargo_delivered, SLE_UINT8), SLE_VAR(Industry, was_cargo_delivered, SLE_UINT8),

View File

@ -853,7 +853,7 @@ static const OldChunks industry_chunk[] = {
OCL_SVAR( OC_UINT8, Industry, type ), OCL_SVAR( OC_UINT8, Industry, type ),
OCL_SVAR( OC_TTO | OC_FILE_U8 | OC_VAR_U16, Industry, counter ), OCL_SVAR( OC_TTO | OC_FILE_U8 | OC_VAR_U16, Industry, counter ),
OCL_SVAR( OC_UINT8, Industry, owner ), OCL_SVAR( OC_UINT8, Industry, owner ),
OCL_SVAR( OC_UINT8, Industry, random_color ), OCL_SVAR( OC_UINT8, Industry, random_colour ),
OCL_SVAR( OC_TTD | OC_FILE_U8 | OC_VAR_I32, Industry, last_prod_year ), OCL_SVAR( OC_TTD | OC_FILE_U8 | OC_VAR_I32, Industry, last_prod_year ),
OCL_SVAR( OC_TTD | OC_UINT16, Industry, counter ), OCL_SVAR( OC_TTD | OC_UINT16, Industry, counter ),
OCL_SVAR( OC_TTD | OC_UINT8, Industry, was_cargo_delivered ), OCL_SVAR( OC_TTD | OC_UINT8, Industry, was_cargo_delivered ),
@ -879,7 +879,7 @@ static bool LoadOldIndustry(LoadgameState *ls, int num)
ConvertDateToYMD(_date, &ymd); ConvertDateToYMD(_date, &ymd);
i->last_prod_year = ymd.year; i->last_prod_year = ymd.year;
i->random_color = RemapTTOColour(i->random_color); i->random_colour = RemapTTOColour(i->random_colour);
} }
IncIndustryTypeCount(i->type); IncIndustryTypeCount(i->type);
@ -1004,7 +1004,7 @@ static bool LoadOldCompany(LoadgameState *ls, int num)
if (_savegame_type == SGT_TTO) { if (_savegame_type == SGT_TTO) {
/* adjust manager's face */ /* adjust manager's face */
if (HasBit(c->face, 27) && GB(c->face, 26, 1) == GB(c->face, 19, 1)) { if (HasBit(c->face, 27) && GB(c->face, 26, 1) == GB(c->face, 19, 1)) {
/* if face would be black in TTD, adjust tie color and thereby face color */ /* if face would be black in TTD, adjust tie colour and thereby face colour */
ClrBit(c->face, 27); ClrBit(c->face, 27);
} }
@ -1715,7 +1715,7 @@ static const OldChunks main_chunk[] = {
OCL_VAR ( OC_FILE_U8 | OC_VAR_U32, 1, &_cur_company_tick_index ), OCL_VAR ( OC_FILE_U8 | OC_VAR_U32, 1, &_cur_company_tick_index ),
OCL_NULL( 2 ), ///< Date stuff, calculated automatically OCL_NULL( 2 ), ///< Date stuff, calculated automatically
OCL_NULL( 8 ), ///< Company colors, calculated automatically OCL_NULL( 8 ), ///< Company colours, calculated automatically
OCL_VAR ( OC_UINT8, 1, &_economy.infl_amount ), OCL_VAR ( OC_UINT8, 1, &_economy.infl_amount ),
OCL_VAR ( OC_UINT8, 1, &_economy.infl_amount_pr ), OCL_VAR ( OC_UINT8, 1, &_economy.infl_amount_pr ),

View File

@ -1622,7 +1622,7 @@ static SaveOrLoadResult SaveFileToDisk(bool threaded)
AbortSaveLoad(); AbortSaveLoad();
if (_sl.excpt_uninit != NULL) _sl.excpt_uninit(); if (_sl.excpt_uninit != NULL) _sl.excpt_uninit();
/* Skip the "color" character */ /* Skip the "colour" character */
DEBUG(sl, 0, GetSaveLoadErrorString() + 3); DEBUG(sl, 0, GetSaveLoadErrorString() + 3);
if (threaded) { if (threaded) {
@ -1822,7 +1822,7 @@ SaveOrLoadResult SaveOrLoad(const char *filename, int mode, Subdirectory sb)
/* deinitialize compressor. */ /* deinitialize compressor. */
if (_sl.excpt_uninit != NULL) _sl.excpt_uninit(); if (_sl.excpt_uninit != NULL) _sl.excpt_uninit();
/* Skip the "color" character */ /* Skip the "colour" character */
DEBUG(sl, 0, GetSaveLoadErrorString() + 3); DEBUG(sl, 0, GetSaveLoadErrorString() + 3);
/* A saver/loader exception!! reinitialize all variables to prevent crash! */ /* A saver/loader exception!! reinitialize all variables to prevent crash! */

View File

@ -234,7 +234,7 @@ static bool MakePNGImage(const char *name, ScreenshotCallback *callb, void *user
if (pixelformat == 32) { if (pixelformat == 32) {
png_color_8 sig_bit; png_color_8 sig_bit;
/* Save exact color/alpha resolution */ /* Save exact colour/alpha resolution */
sig_bit.alpha = 0; sig_bit.alpha = 0;
sig_bit.blue = 8; sig_bit.blue = 8;
sig_bit.green = 8; sig_bit.green = 8;
@ -417,7 +417,7 @@ static bool MakePCXImage(const char *name, ScreenshotCallback *callb, void *user
free(buff); free(buff);
/* write 8-bit color palette */ /* write 8-bit colour palette */
if (fputc(12, f) == EOF) { if (fputc(12, f) == EOF) {
fclose(f); fclose(f);
return false; return false;

View File

@ -1370,7 +1370,7 @@ const SettingDesc _settings[] = {
SDT_CONDBOOL(GameSettings, economy.exclusive_rights, 79, SL_MAX_VERSION, 0, 0, true, STR_CONFIG_SETTING_ALLOW_EXCLUSIVE, NULL), SDT_CONDBOOL(GameSettings, economy.exclusive_rights, 79, SL_MAX_VERSION, 0, 0, true, STR_CONFIG_SETTING_ALLOW_EXCLUSIVE, NULL),
SDT_CONDBOOL(GameSettings, economy.give_money, 79, SL_MAX_VERSION, 0, 0, true, STR_CONFIG_SETTING_ALLOW_GIVE_MONEY, NULL), SDT_CONDBOOL(GameSettings, economy.give_money, 79, SL_MAX_VERSION, 0, 0, true, STR_CONFIG_SETTING_ALLOW_GIVE_MONEY, NULL),
SDT_VAR(GameSettings, game_creation.snow_line_height, SLE_UINT8, 0, 0, 7, 2, 13, 0, STR_CONFIG_SETTING_SNOWLINE_HEIGHT, NULL), SDT_VAR(GameSettings, game_creation.snow_line_height, SLE_UINT8, 0, 0, 7, 2, 13, 0, STR_CONFIG_SETTING_SNOWLINE_HEIGHT, NULL),
SDTC_VAR( gui.colored_news_year, SLE_INT32, 0,NC, 2000,MIN_YEAR,MAX_YEAR,1,STR_CONFIG_SETTING_COLORED_NEWS_YEAR, NULL), SDTC_VAR( gui.coloured_news_year, SLE_INT32, 0,NC, 2000,MIN_YEAR,MAX_YEAR,1,STR_CONFIG_SETTING_COLORED_NEWS_YEAR, NULL),
SDT_VAR(GameSettings, game_creation.starting_year, SLE_INT32, 0,NC, 1950,MIN_YEAR,MAX_YEAR,1,STR_CONFIG_SETTING_STARTING_YEAR, NULL), SDT_VAR(GameSettings, game_creation.starting_year, SLE_INT32, 0,NC, 1950,MIN_YEAR,MAX_YEAR,1,STR_CONFIG_SETTING_STARTING_YEAR, NULL),
SDT_CONDNULL( 4, 0, 104), SDT_CONDNULL( 4, 0, 104),
SDT_BOOL(GameSettings, economy.smooth_economy, 0, 0, true, STR_CONFIG_SETTING_SMOOTH_ECONOMY, NULL), SDT_BOOL(GameSettings, economy.smooth_economy, 0, 0, true, STR_CONFIG_SETTING_SMOOTH_ECONOMY, NULL),

View File

@ -886,7 +886,7 @@ void SettingEntry::DrawSetting(GameSettings *settings_ptr, const SettingDesc *sd
if ((sdb->flags & SGF_NO_NETWORK) && _networking) editable = false; if ((sdb->flags & SGF_NO_NETWORK) && _networking) editable = false;
if (sdb->cmd == SDT_BOOLX) { if (sdb->cmd == SDT_BOOLX) {
static const int _bool_ctabs[2][2] = {{9, 4}, {7, 6}}; static const Colours _bool_ctabs[2][2] = {{COLOUR_CREAM, COLOUR_RED}, {COLOUR_DARK_GREEN, COLOUR_GREEN}};
/* Draw checkbox for boolean-value either on/off */ /* Draw checkbox for boolean-value either on/off */
bool on = (*(bool*)var); bool on = (*(bool*)var);
@ -1047,7 +1047,7 @@ static SettingEntry _settings_ui[] = {
SettingEntry("gui.default_rail_type"), SettingEntry("gui.default_rail_type"),
SettingEntry("gui.always_build_infrastructure"), SettingEntry("gui.always_build_infrastructure"),
SettingEntry("gui.persistent_buildingtools"), SettingEntry("gui.persistent_buildingtools"),
SettingEntry("gui.colored_news_year"), SettingEntry("gui.coloured_news_year"),
}; };
/** Interface subpage */ /** Interface subpage */
static SettingsPage _settings_ui_page = {_settings_ui, lengthof(_settings_ui)}; static SettingsPage _settings_ui_page = {_settings_ui, lengthof(_settings_ui)};

View File

@ -70,7 +70,7 @@ struct GUISettings {
bool left_mouse_btn_scrolling; ///< left mouse button scroll bool left_mouse_btn_scrolling; ///< left mouse button scroll
bool pause_on_newgame; ///< whether to start new games paused or not bool pause_on_newgame; ///< whether to start new games paused or not
bool enable_signal_gui; ///< show the signal GUI when the signal button is pressed bool enable_signal_gui; ///< show the signal GUI when the signal button is pressed
Year colored_news_year; ///< when does newspaper become colored? Year coloured_news_year; ///< when does newspaper become coloured?
bool timetable_in_ticks; ///< whether to show the timetable in ticks rather than days bool timetable_in_ticks; ///< whether to show the timetable in ticks rather than days
bool quick_goto; ///< Allow quick access to 'goto button' in vehicle orders window bool quick_goto; ///< Allow quick access to 'goto button' in vehicle orders window
bool bridge_pillars; ///< show bridge pillars for high bridges bool bridge_pillars; ///< show bridge pillars for high bridges

View File

@ -942,7 +942,7 @@ CommandCost CmdRefitShip(TileIndex tile, uint32 flags, uint32 p1, uint32 p2, con
v->cargo.Truncate((v->cargo_type == new_cid) ? capacity : 0); v->cargo.Truncate((v->cargo_type == new_cid) ? capacity : 0);
v->cargo_type = new_cid; v->cargo_type = new_cid;
v->cargo_subtype = new_subtype; v->cargo_subtype = new_subtype;
v->colormap = PAL_NONE; // invalidate vehicle colour map v->colourmap = PAL_NONE; // invalidate vehicle colour map
InvalidateWindow(WC_VEHICLE_DETAILS, v->index); InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
InvalidateWindow(WC_VEHICLE_DEPOT, v->tile); InvalidateWindow(WC_VEHICLE_DEPOT, v->tile);
InvalidateWindowClassesData(WC_SHIPS_LIST, 0); InvalidateWindowClassesData(WC_SHIPS_LIST, 0);

View File

@ -50,20 +50,20 @@ static const Widget _smallmap_widgets[] = {
/* number of used industries */ /* number of used industries */
static int _smallmap_industry_count; static int _smallmap_industry_count;
/** Macro for ordinary entry of LegendAndColor */ /** Macro for ordinary entry of LegendAndColour */
#define MK(a, b) {a, b, INVALID_INDUSTRYTYPE, true, false, false} #define MK(a, b) {a, b, INVALID_INDUSTRYTYPE, true, false, false}
/** Macro for end of list marker in arrays of LegendAndColor */ /** Macro for end of list marker in arrays of LegendAndColour */
#define MKEND() {0, STR_NULL, INVALID_INDUSTRYTYPE, true, true, false} #define MKEND() {0, STR_NULL, INVALID_INDUSTRYTYPE, true, true, false}
/** Macro for break marker in arrays of LegendAndColor. /** Macro for break marker in arrays of LegendAndColour.
* It will have valid data, though */ * It will have valid data, though */
#define MS(a, b) {a, b, INVALID_INDUSTRYTYPE, true, false, true} #define MS(a, b) {a, b, INVALID_INDUSTRYTYPE, true, false, true}
/** Structure for holding relevant data for legends in small map */ /** Structure for holding relevant data for legends in small map */
struct LegendAndColour { struct LegendAndColour {
uint16 colour; ///< color of the item on the map uint16 colour; ///< colour of the item on the map
StringID legend; ///< string corresponding to the colored item StringID legend; ///< string corresponding to the coloured item
IndustryType type; ///< type of industry IndustryType type; ///< type of industry
bool show_on_map; ///< for filtering industries, if true is shown on map in color bool show_on_map; ///< for filtering industries, if true is shown on map in colour
bool end; ///< this is the end of the list bool end; ///< this is the end of the list
bool col_break; ///< perform a break and go one collumn further bool col_break; ///< perform a break and go one collumn further
}; };
@ -180,28 +180,28 @@ static const LegendAndColour * const _legend_table[] = {
_legend_land_owners, _legend_land_owners,
}; };
#define MKCOLOR(x) TO_LE32X(x) #define MKCOLOUR(x) TO_LE32X(x)
/** /**
* Height encodings; MAX_TILE_HEIGHT + 1 levels, from 0 to MAX_TILE_HEIGHT * Height encodings; MAX_TILE_HEIGHT + 1 levels, from 0 to MAX_TILE_HEIGHT
*/ */
static const uint32 _map_height_bits[] = { static const uint32 _map_height_bits[] = {
MKCOLOR(0x5A5A5A5A), MKCOLOUR(0x5A5A5A5A),
MKCOLOR(0x5A5B5A5B), MKCOLOUR(0x5A5B5A5B),
MKCOLOR(0x5B5B5B5B), MKCOLOUR(0x5B5B5B5B),
MKCOLOR(0x5B5C5B5C), MKCOLOUR(0x5B5C5B5C),
MKCOLOR(0x5C5C5C5C), MKCOLOUR(0x5C5C5C5C),
MKCOLOR(0x5C5D5C5D), MKCOLOUR(0x5C5D5C5D),
MKCOLOR(0x5D5D5D5D), MKCOLOUR(0x5D5D5D5D),
MKCOLOR(0x5D5E5D5E), MKCOLOUR(0x5D5E5D5E),
MKCOLOR(0x5E5E5E5E), MKCOLOUR(0x5E5E5E5E),
MKCOLOR(0x5E5F5E5F), MKCOLOUR(0x5E5F5E5F),
MKCOLOR(0x5F5F5F5F), MKCOLOUR(0x5F5F5F5F),
MKCOLOR(0x5F1F5F1F), MKCOLOUR(0x5F1F5F1F),
MKCOLOR(0x1F1F1F1F), MKCOLOUR(0x1F1F1F1F),
MKCOLOR(0x1F271F27), MKCOLOUR(0x1F271F27),
MKCOLOR(0x27272727), MKCOLOUR(0x27272727),
MKCOLOR(0x27272727), MKCOLOUR(0x27272727),
}; };
assert_compile(lengthof(_map_height_bits) == MAX_TILE_HEIGHT + 1); assert_compile(lengthof(_map_height_bits) == MAX_TILE_HEIGHT + 1);
@ -217,48 +217,48 @@ static inline uint32 ApplyMask(uint32 colour, const AndOr *mask)
static const AndOr _smallmap_contours_andor[] = { static const AndOr _smallmap_contours_andor[] = {
{MKCOLOR(0x00000000), MKCOLOR(0xFFFFFFFF)}, {MKCOLOUR(0x00000000), MKCOLOUR(0xFFFFFFFF)},
{MKCOLOR(0x000A0A00), MKCOLOR(0xFF0000FF)}, {MKCOLOUR(0x000A0A00), MKCOLOUR(0xFF0000FF)},
{MKCOLOR(0x00D7D700), MKCOLOR(0xFF0000FF)}, {MKCOLOUR(0x00D7D700), MKCOLOUR(0xFF0000FF)},
{MKCOLOR(0x00B5B500), MKCOLOR(0xFF0000FF)}, {MKCOLOUR(0x00B5B500), MKCOLOUR(0xFF0000FF)},
{MKCOLOR(0x00000000), MKCOLOR(0xFFFFFFFF)}, {MKCOLOUR(0x00000000), MKCOLOUR(0xFFFFFFFF)},
{MKCOLOR(0x98989898), MKCOLOR(0x00000000)}, {MKCOLOUR(0x98989898), MKCOLOUR(0x00000000)},
{MKCOLOR(0xCACACACA), MKCOLOR(0x00000000)}, {MKCOLOUR(0xCACACACA), MKCOLOUR(0x00000000)},
{MKCOLOR(0x00000000), MKCOLOR(0xFFFFFFFF)}, {MKCOLOUR(0x00000000), MKCOLOUR(0xFFFFFFFF)},
{MKCOLOR(0xB5B5B5B5), MKCOLOR(0x00000000)}, {MKCOLOUR(0xB5B5B5B5), MKCOLOUR(0x00000000)},
{MKCOLOR(0x00000000), MKCOLOR(0xFFFFFFFF)}, {MKCOLOUR(0x00000000), MKCOLOUR(0xFFFFFFFF)},
{MKCOLOR(0x00B5B500), MKCOLOR(0xFF0000FF)}, {MKCOLOUR(0x00B5B500), MKCOLOUR(0xFF0000FF)},
{MKCOLOR(0x000A0A00), MKCOLOR(0xFF0000FF)}, {MKCOLOUR(0x000A0A00), MKCOLOUR(0xFF0000FF)},
}; };
static const AndOr _smallmap_vehicles_andor[] = { static const AndOr _smallmap_vehicles_andor[] = {
{MKCOLOR(0x00000000), MKCOLOR(0xFFFFFFFF)}, {MKCOLOUR(0x00000000), MKCOLOUR(0xFFFFFFFF)},
{MKCOLOR(0x00D7D700), MKCOLOR(0xFF0000FF)}, {MKCOLOUR(0x00D7D700), MKCOLOUR(0xFF0000FF)},
{MKCOLOR(0x00D7D700), MKCOLOR(0xFF0000FF)}, {MKCOLOUR(0x00D7D700), MKCOLOUR(0xFF0000FF)},
{MKCOLOR(0x00B5B500), MKCOLOR(0xFF0000FF)}, {MKCOLOUR(0x00B5B500), MKCOLOUR(0xFF0000FF)},
{MKCOLOR(0x00000000), MKCOLOR(0xFFFFFFFF)}, {MKCOLOUR(0x00000000), MKCOLOUR(0xFFFFFFFF)},
{MKCOLOR(0x00D7D700), MKCOLOR(0xFF0000FF)}, {MKCOLOUR(0x00D7D700), MKCOLOUR(0xFF0000FF)},
{MKCOLOR(0xCACACACA), MKCOLOR(0x00000000)}, {MKCOLOUR(0xCACACACA), MKCOLOUR(0x00000000)},
{MKCOLOR(0x00000000), MKCOLOR(0xFFFFFFFF)}, {MKCOLOUR(0x00000000), MKCOLOUR(0xFFFFFFFF)},
{MKCOLOR(0xB5B5B5B5), MKCOLOR(0x00000000)}, {MKCOLOUR(0xB5B5B5B5), MKCOLOUR(0x00000000)},
{MKCOLOR(0x00000000), MKCOLOR(0xFFFFFFFF)}, {MKCOLOUR(0x00000000), MKCOLOUR(0xFFFFFFFF)},
{MKCOLOR(0x00B5B500), MKCOLOR(0xFF0000FF)}, {MKCOLOUR(0x00B5B500), MKCOLOUR(0xFF0000FF)},
{MKCOLOR(0x00D7D700), MKCOLOR(0xFF0000FF)}, {MKCOLOUR(0x00D7D700), MKCOLOUR(0xFF0000FF)},
}; };
static const AndOr _smallmap_vegetation_andor[] = { static const AndOr _smallmap_vegetation_andor[] = {
{MKCOLOR(0x00000000), MKCOLOR(0xFFFFFFFF)}, {MKCOLOUR(0x00000000), MKCOLOUR(0xFFFFFFFF)},
{MKCOLOR(0x00D7D700), MKCOLOR(0xFF0000FF)}, {MKCOLOUR(0x00D7D700), MKCOLOUR(0xFF0000FF)},
{MKCOLOR(0x00D7D700), MKCOLOR(0xFF0000FF)}, {MKCOLOUR(0x00D7D700), MKCOLOUR(0xFF0000FF)},
{MKCOLOR(0x00B5B500), MKCOLOR(0xFF0000FF)}, {MKCOLOUR(0x00B5B500), MKCOLOUR(0xFF0000FF)},
{MKCOLOR(0x00575700), MKCOLOR(0xFF0000FF)}, {MKCOLOUR(0x00575700), MKCOLOUR(0xFF0000FF)},
{MKCOLOR(0x00D7D700), MKCOLOR(0xFF0000FF)}, {MKCOLOUR(0x00D7D700), MKCOLOUR(0xFF0000FF)},
{MKCOLOR(0xCACACACA), MKCOLOR(0x00000000)}, {MKCOLOUR(0xCACACACA), MKCOLOUR(0x00000000)},
{MKCOLOR(0x00000000), MKCOLOR(0xFFFFFFFF)}, {MKCOLOUR(0x00000000), MKCOLOUR(0xFFFFFFFF)},
{MKCOLOR(0xB5B5B5B5), MKCOLOR(0x00000000)}, {MKCOLOUR(0xB5B5B5B5), MKCOLOUR(0x00000000)},
{MKCOLOR(0x00000000), MKCOLOR(0xFFFFFFFF)}, {MKCOLOUR(0x00000000), MKCOLOUR(0xFFFFFFFF)},
{MKCOLOR(0x00B5B500), MKCOLOR(0xFF0000FF)}, {MKCOLOUR(0x00B5B500), MKCOLOUR(0xFF0000FF)},
{MKCOLOR(0x00D7D700), MKCOLOR(0xFF0000FF)}, {MKCOLOUR(0x00D7D700), MKCOLOUR(0xFF0000FF)},
}; };
typedef uint32 GetSmallMapPixels(TileIndex tile); // typedef callthrough function typedef uint32 GetSmallMapPixels(TileIndex tile); // typedef callthrough function
@ -328,9 +328,9 @@ static inline TileType GetEffectiveTileType(TileIndex tile)
} }
/** /**
* Return the color a tile would be displayed with in the small map in mode "Contour". * Return the colour a tile would be displayed with in the small map in mode "Contour".
* @param tile The tile of which we would like to get the color. * @param tile The tile of which we would like to get the colour.
* @return The color of tile in the small map in mode "Contour" * @return The colour of tile in the small map in mode "Contour"
*/ */
static inline uint32 GetSmallMapContoursPixels(TileIndex tile) static inline uint32 GetSmallMapContoursPixels(TileIndex tile)
{ {
@ -341,46 +341,46 @@ static inline uint32 GetSmallMapContoursPixels(TileIndex tile)
} }
/** /**
* Return the color a tile would be displayed with in the small map in mode "Vehicles". * Return the colour a tile would be displayed with in the small map in mode "Vehicles".
* *
* @param tile The tile of which we would like to get the color. * @param tile The tile of which we would like to get the colour.
* @return The color of tile in the small map in mode "Vehicles" * @return The colour of tile in the small map in mode "Vehicles"
*/ */
static inline uint32 GetSmallMapVehiclesPixels(TileIndex tile) static inline uint32 GetSmallMapVehiclesPixels(TileIndex tile)
{ {
TileType t = GetEffectiveTileType(tile); TileType t = GetEffectiveTileType(tile);
return ApplyMask(MKCOLOR(0x54545454), &_smallmap_vehicles_andor[t]); return ApplyMask(MKCOLOUR(0x54545454), &_smallmap_vehicles_andor[t]);
} }
/** /**
* Return the color a tile would be displayed with in the small map in mode "Industries". * Return the colour a tile would be displayed with in the small map in mode "Industries".
* *
* @param tile The tile of which we would like to get the color. * @param tile The tile of which we would like to get the colour.
* @return The color of tile in the small map in mode "Industries" * @return The colour of tile in the small map in mode "Industries"
*/ */
static inline uint32 GetSmallMapIndustriesPixels(TileIndex tile) static inline uint32 GetSmallMapIndustriesPixels(TileIndex tile)
{ {
TileType t = GetEffectiveTileType(tile); TileType t = GetEffectiveTileType(tile);
if (t == MP_INDUSTRY) { if (t == MP_INDUSTRY) {
/* If industry is allowed to be seen, use its color on the map */ /* If industry is allowed to be seen, use its colour on the map */
if (_legend_from_industries[_industry_to_list_pos[GetIndustryByTile(tile)->type]].show_on_map) { if (_legend_from_industries[_industry_to_list_pos[GetIndustryByTile(tile)->type]].show_on_map) {
return GetIndustrySpec(GetIndustryByTile(tile)->type)->map_colour * 0x01010101; return GetIndustrySpec(GetIndustryByTile(tile)->type)->map_colour * 0x01010101;
} else { } else {
/* otherwise, return the color of the clear tiles, which will make it disappear */ /* otherwise, return the colour of the clear tiles, which will make it disappear */
return ApplyMask(MKCOLOR(0x54545454), &_smallmap_vehicles_andor[MP_CLEAR]); return ApplyMask(MKCOLOUR(0x54545454), &_smallmap_vehicles_andor[MP_CLEAR]);
} }
} }
return ApplyMask(MKCOLOR(0x54545454), &_smallmap_vehicles_andor[t]); return ApplyMask(MKCOLOUR(0x54545454), &_smallmap_vehicles_andor[t]);
} }
/** /**
* Return the color a tile would be displayed with in the small map in mode "Routes". * Return the colour a tile would be displayed with in the small map in mode "Routes".
* *
* @param tile The tile of which we would like to get the color. * @param tile The tile of which we would like to get the colour.
* @return The color of tile in the small map in mode "Routes" * @return The colour of tile in the small map in mode "Routes"
*/ */
static inline uint32 GetSmallMapRoutesPixels(TileIndex tile) static inline uint32 GetSmallMapRoutesPixels(TileIndex tile)
{ {
@ -389,30 +389,30 @@ static inline uint32 GetSmallMapRoutesPixels(TileIndex tile)
if (t == MP_STATION) { if (t == MP_STATION) {
switch (GetStationType(tile)) { switch (GetStationType(tile)) {
case STATION_RAIL: bits = MKCOLOR(0x56565656); break; case STATION_RAIL: bits = MKCOLOUR(0x56565656); break;
case STATION_AIRPORT: bits = MKCOLOR(0xB8B8B8B8); break; case STATION_AIRPORT: bits = MKCOLOUR(0xB8B8B8B8); break;
case STATION_TRUCK: bits = MKCOLOR(0xC2C2C2C2); break; case STATION_TRUCK: bits = MKCOLOUR(0xC2C2C2C2); break;
case STATION_BUS: bits = MKCOLOR(0xBFBFBFBF); break; case STATION_BUS: bits = MKCOLOUR(0xBFBFBFBF); break;
case STATION_DOCK: bits = MKCOLOR(0x98989898); break; case STATION_DOCK: bits = MKCOLOUR(0x98989898); break;
default: bits = MKCOLOR(0xFFFFFFFF); break; default: bits = MKCOLOUR(0xFFFFFFFF); break;
} }
} else { } else {
/* ground color */ /* ground colour */
bits = ApplyMask(MKCOLOR(0x54545454), &_smallmap_contours_andor[t]); bits = ApplyMask(MKCOLOUR(0x54545454), &_smallmap_contours_andor[t]);
} }
return bits; return bits;
} }
static const uint32 _vegetation_clear_bits[] = { static const uint32 _vegetation_clear_bits[] = {
MKCOLOR(0x54545454), ///< full grass MKCOLOUR(0x54545454), ///< full grass
MKCOLOR(0x52525252), ///< rough land MKCOLOUR(0x52525252), ///< rough land
MKCOLOR(0x0A0A0A0A), ///< rocks MKCOLOUR(0x0A0A0A0A), ///< rocks
MKCOLOR(0x25252525), ///< fields MKCOLOUR(0x25252525), ///< fields
MKCOLOR(0x98989898), ///< snow MKCOLOUR(0x98989898), ///< snow
MKCOLOR(0xC2C2C2C2), ///< desert MKCOLOUR(0xC2C2C2C2), ///< desert
MKCOLOR(0x54545454), ///< unused MKCOLOUR(0x54545454), ///< unused
MKCOLOR(0x54545454), ///< unused MKCOLOUR(0x54545454), ///< unused
}; };
static inline uint32 GetSmallMapVegetationPixels(TileIndex tile) static inline uint32 GetSmallMapVegetationPixels(TileIndex tile)
@ -423,26 +423,26 @@ static inline uint32 GetSmallMapVegetationPixels(TileIndex tile)
switch (t) { switch (t) {
case MP_CLEAR: case MP_CLEAR:
if (IsClearGround(tile, CLEAR_GRASS) && GetClearDensity(tile) < 3) { if (IsClearGround(tile, CLEAR_GRASS) && GetClearDensity(tile) < 3) {
bits = MKCOLOR(0x37373737); bits = MKCOLOUR(0x37373737);
} else { } else {
bits = _vegetation_clear_bits[GetClearGround(tile)]; bits = _vegetation_clear_bits[GetClearGround(tile)];
} }
break; break;
case MP_INDUSTRY: case MP_INDUSTRY:
bits = GetIndustrySpec(GetIndustryByTile(tile)->type)->check_proc == CHECK_FOREST ? MKCOLOR(0xD0D0D0D0) : MKCOLOR(0xB5B5B5B5); bits = GetIndustrySpec(GetIndustryByTile(tile)->type)->check_proc == CHECK_FOREST ? MKCOLOUR(0xD0D0D0D0) : MKCOLOUR(0xB5B5B5B5);
break; break;
case MP_TREES: case MP_TREES:
if (GetTreeGround(tile) == TREE_GROUND_SNOW_DESERT) { if (GetTreeGround(tile) == TREE_GROUND_SNOW_DESERT) {
bits = (_settings_game.game_creation.landscape == LT_ARCTIC) ? MKCOLOR(0x98575798) : MKCOLOR(0xC25757C2); bits = (_settings_game.game_creation.landscape == LT_ARCTIC) ? MKCOLOUR(0x98575798) : MKCOLOUR(0xC25757C2);
} else { } else {
bits = MKCOLOR(0x54575754); bits = MKCOLOUR(0x54575754);
} }
break; break;
default: default:
bits = ApplyMask(MKCOLOR(0x54545454), &_smallmap_vehicles_andor[t]); bits = ApplyMask(MKCOLOUR(0x54545454), &_smallmap_vehicles_andor[t]);
break; break;
} }
@ -450,13 +450,13 @@ static inline uint32 GetSmallMapVegetationPixels(TileIndex tile)
} }
static uint32 _owner_colors[OWNER_END + 1]; static uint32 _owner_colours[OWNER_END + 1];
/** /**
* Return the color a tile would be displayed with in the small map in mode "Owner". * Return the colour a tile would be displayed with in the small map in mode "Owner".
* *
* @param tile The tile of which we would like to get the color. * @param tile The tile of which we would like to get the colour.
* @return The color of tile in the small map in mode "Owner" * @return The colour of tile in the small map in mode "Owner"
*/ */
static inline uint32 GetSmallMapOwnerPixels(TileIndex tile) static inline uint32 GetSmallMapOwnerPixels(TileIndex tile)
{ {
@ -472,20 +472,20 @@ static inline uint32 GetSmallMapOwnerPixels(TileIndex tile)
*/ */
} }
return _owner_colors[o]; return _owner_colours[o];
} }
static const uint32 _smallmap_mask_left[3] = { static const uint32 _smallmap_mask_left[3] = {
MKCOLOR(0xFF000000), MKCOLOUR(0xFF000000),
MKCOLOR(0xFFFF0000), MKCOLOUR(0xFFFF0000),
MKCOLOR(0xFFFFFF00), MKCOLOUR(0xFFFFFF00),
}; };
static const uint32 _smallmap_mask_right[] = { static const uint32 _smallmap_mask_right[] = {
MKCOLOR(0x000000FF), MKCOLOUR(0x000000FF),
MKCOLOR(0x0000FFFF), MKCOLOUR(0x0000FFFF),
MKCOLOR(0x00FFFFFF), MKCOLOUR(0x00FFFFFF),
}; };
/* each tile has 4 x pixels and 1 y pixel */ /* each tile has 4 x pixels and 1 y pixel */
@ -499,7 +499,7 @@ static GetSmallMapPixels *_smallmap_draw_procs[] = {
GetSmallMapOwnerPixels, GetSmallMapOwnerPixels,
}; };
static const byte _vehicle_type_colors[6] = { static const byte _vehicle_type_colours[6] = {
184, 191, 152, 15, 215, 184 184, 191, 152, 15, 215, 184
}; };
@ -564,7 +564,7 @@ public:
* Basically, the small map is draw column of pixels by column of pixels. The pixels * Basically, the small map is draw column of pixels by column of pixels. The pixels
* are drawn directly into the screen buffer. The final map is drawn in multiple passes. * are drawn directly into the screen buffer. The final map is drawn in multiple passes.
* The passes are: * The passes are:
* <ol><li>The colors of tiles in the different modes.</li> * <ol><li>The colours of tiles in the different modes.</li>
* <li>Town names (optional)</li></ol> * <li>Town names (optional)</li></ol>
* *
* @param dpi pointer to pixel to write onto * @param dpi pointer to pixel to write onto
@ -592,15 +592,15 @@ public:
if (this->map_type == SMT_OWNER) { if (this->map_type == SMT_OWNER) {
const Company *c; const Company *c;
/* fill with some special colors */ /* fill with some special colours */
_owner_colors[OWNER_TOWN] = MKCOLOR(0xB4B4B4B4); _owner_colours[OWNER_TOWN] = MKCOLOUR(0xB4B4B4B4);
_owner_colors[OWNER_NONE] = MKCOLOR(0x54545454); _owner_colours[OWNER_NONE] = MKCOLOUR(0x54545454);
_owner_colors[OWNER_WATER] = MKCOLOR(0xCACACACA); _owner_colours[OWNER_WATER] = MKCOLOUR(0xCACACACA);
_owner_colors[OWNER_END] = MKCOLOR(0x20202020); /* industry */ _owner_colours[OWNER_END] = MKCOLOUR(0x20202020); /* industry */
/* now fill with the company colours */ /* now fill with the company colours */
FOR_ALL_COMPANIES(c) { FOR_ALL_COMPANIES(c) {
_owner_colors[c->index] = _owner_colours[c->index] =
_colour_gradient[c->colour][5] * 0x01010101; _colour_gradient[c->colour][5] * 0x01010101;
} }
} }
@ -675,7 +675,7 @@ public:
if (this->map_type == SMT_CONTOUR || this->map_type == SMT_VEHICLES) { if (this->map_type == SMT_CONTOUR || this->map_type == SMT_VEHICLES) {
Vehicle *v; Vehicle *v;
bool skip; bool skip;
byte color; byte colour;
FOR_ALL_VEHICLES(v) { FOR_ALL_VEHICLES(v) {
if (v->type != VEH_EFFECT && if (v->type != VEH_EFFECT &&
@ -709,12 +709,12 @@ public:
skip = true; skip = true;
} }
/* Calculate pointer to pixel and the color */ /* Calculate pointer to pixel and the colour */
color = (this->map_type == SMT_VEHICLES) ? _vehicle_type_colors[v->type] : 0xF; colour = (this->map_type == SMT_VEHICLES) ? _vehicle_type_colours[v->type] : 0xF;
/* And draw either one or two pixels depending on clipping */ /* And draw either one or two pixels depending on clipping */
blitter->SetPixel(dpi->dst_ptr, x, y, color); blitter->SetPixel(dpi->dst_ptr, x, y, colour);
if (!skip) blitter->SetPixel(dpi->dst_ptr, x + 1, y, color); if (!skip) blitter->SetPixel(dpi->dst_ptr, x + 1, y, colour);
} }
} }
} }
@ -855,19 +855,19 @@ public:
assert(tbl->type < NUM_INDUSTRYTYPES); assert(tbl->type < NUM_INDUSTRYTYPES);
SetDParam(1, _industry_counts[tbl->type]); SetDParam(1, _industry_counts[tbl->type]);
if (!tbl->show_on_map) { if (!tbl->show_on_map) {
/* Simply draw the string, not the black border of the legend color. /* Simply draw the string, not the black border of the legend colour.
* This will enforce the idea of the disabled item */ * This will enforce the idea of the disabled item */
DrawString(x + 11, y, STR_SMALLMAP_INDUSTRY, TC_GREY); DrawString(x + 11, y, STR_SMALLMAP_INDUSTRY, TC_GREY);
} else { } else {
DrawString(x + 11, y, STR_SMALLMAP_INDUSTRY, TC_BLACK); DrawString(x + 11, y, STR_SMALLMAP_INDUSTRY, TC_BLACK);
GfxFillRect(x, y + 1, x + 8, y + 5, 0); // outer border of the legend color GfxFillRect(x, y + 1, x + 8, y + 5, 0); // outer border of the legend colour
} }
} else { } else {
/* Anything that is not an industry is using normal process */ /* Anything that is not an industry is using normal process */
GfxFillRect(x, y + 1, x + 8, y + 5, 0); GfxFillRect(x, y + 1, x + 8, y + 5, 0);
DrawString(x + 11, y, tbl->legend, TC_FROMSTRING); DrawString(x + 11, y, tbl->legend, TC_FROMSTRING);
} }
GfxFillRect(x + 1, y + 2, x + 7, y + 4, tbl->colour); // legend color GfxFillRect(x + 1, y + 2, x + 7, y + 4, tbl->colour); // legend colour
y += 6; y += 6;
} }

View File

@ -7,8 +7,8 @@
#include "gfx_type.h" #include "gfx_type.h"
#define GENERAL_SPRITE_COLOR(color) ((color) + PALETTE_RECOLOR_START) #define GENERAL_SPRITE_COLOUR(colour) ((colour) + PALETTE_RECOLOUR_START)
#define COMPANY_SPRITE_COLOR(owner) (GENERAL_SPRITE_COLOR(_company_colours[owner])) #define COMPANY_SPRITE_COLOUR(owner) (GENERAL_SPRITE_COLOUR(_company_colours[owner]))
/** /**
* Whether a sprite comes from the original graphics files or a new grf file * Whether a sprite comes from the original graphics files or a new grf file

View File

@ -174,7 +174,7 @@ static void *ReadSprite(SpriteCache *sc, SpriteID id, SpriteType sprite_type)
int num = FioReadWord(); int num = FioReadWord();
byte type = FioReadByte(); byte type = FioReadByte();
/* Type 0xFF indicates either a colormap or some other non-sprite info */ /* Type 0xFF indicates either a colourmap or some other non-sprite info */
assert((type == 0xFF) == (sprite_type == ST_RECOLOUR)); assert((type == 0xFF) == (sprite_type == ST_RECOLOUR));
if (type == 0xFF) { if (type == 0xFF) {
/* "Normal" recolour sprites are ALWAYS 257 bytes. Then there is a small /* "Normal" recolour sprites are ALWAYS 257 bytes. Then there is a small

View File

@ -41,7 +41,7 @@ bool SpriteLoaderGrf::LoadSprite(SpriteLoader::Sprite *sprite, uint8 file_slot,
int num = FioReadWord(); int num = FioReadWord();
byte type = FioReadByte(); byte type = FioReadByte();
/* Type 0xFF indicates either a colormap or some other non-sprite info; we do not handle them here */ /* Type 0xFF indicates either a colourmap or some other non-sprite info; we do not handle them here */
if (type == 0xFF) return false; if (type == 0xFF) return false;
sprite->height = FioReadByte(); sprite->height = FioReadByte();

View File

@ -49,7 +49,7 @@ static bool LoadPNG(SpriteLoader::Sprite *sprite, const char *filename, uint32 i
png_byte header[8]; png_byte header[8];
png_structp png_ptr; png_structp png_ptr;
png_infop info_ptr, end_info; png_infop info_ptr, end_info;
uint bit_depth, color_type; uint bit_depth, colour_type;
uint i, pixelsize; uint i, pixelsize;
png_bytep row_pointer; png_bytep row_pointer;
SpriteLoader::CommonPixel *dst; SpriteLoader::CommonPixel *dst;
@ -106,9 +106,9 @@ static bool LoadPNG(SpriteLoader::Sprite *sprite, const char *filename, uint32 i
} }
bit_depth = png_get_bit_depth(png_ptr, info_ptr); bit_depth = png_get_bit_depth(png_ptr, info_ptr);
color_type = png_get_color_type(png_ptr, info_ptr); colour_type = png_get_color_type(png_ptr, info_ptr);
if (mask && (bit_depth != 8 || color_type != PNG_COLOR_TYPE_PALETTE)) { if (mask && (bit_depth != 8 || colour_type != PNG_COLOR_TYPE_PALETTE)) {
DEBUG(misc, 0, "Ignoring mask for SpriteID %d as it isn't a 8 bit palette image", id); DEBUG(misc, 0, "Ignoring mask for SpriteID %d as it isn't a 8 bit palette image", id);
return true; return true;
} }
@ -116,16 +116,16 @@ static bool LoadPNG(SpriteLoader::Sprite *sprite, const char *filename, uint32 i
if (!mask) { if (!mask) {
if (bit_depth == 16) png_set_strip_16(png_ptr); if (bit_depth == 16) png_set_strip_16(png_ptr);
if (color_type == PNG_COLOR_TYPE_PALETTE) { if (colour_type == PNG_COLOR_TYPE_PALETTE) {
png_set_palette_to_rgb(png_ptr); png_set_palette_to_rgb(png_ptr);
color_type = PNG_COLOR_TYPE_RGB; colour_type = PNG_COLOR_TYPE_RGB;
} }
if (color_type == PNG_COLOR_TYPE_GRAY || color_type == PNG_COLOR_TYPE_GRAY_ALPHA) { if (colour_type == PNG_COLOR_TYPE_GRAY || colour_type == PNG_COLOR_TYPE_GRAY_ALPHA) {
png_set_gray_to_rgb(png_ptr); png_set_gray_to_rgb(png_ptr);
color_type = PNG_COLOR_TYPE_RGB; colour_type = PNG_COLOR_TYPE_RGB;
} }
if (color_type == PNG_COLOR_TYPE_RGB) { if (colour_type == PNG_COLOR_TYPE_RGB) {
png_set_filler(png_ptr, 0xff, PNG_FILLER_AFTER); png_set_filler(png_ptr, 0xff, PNG_FILLER_AFTER);
} }
@ -151,7 +151,7 @@ static bool LoadPNG(SpriteLoader::Sprite *sprite, const char *filename, uint32 i
dst[x].r = 0; dst[x].r = 0;
dst[x].g = 0; dst[x].g = 0;
dst[x].b = 0; dst[x].b = 0;
/* Alpha channel is used from the original image (to allow transparency in remap colors) */ /* Alpha channel is used from the original image (to allow transparency in remap colours) */
dst[x].m = row_pointer[x * sizeof(uint8)]; dst[x].m = row_pointer[x * sizeof(uint8)];
} }
} else { } else {

View File

@ -2330,7 +2330,7 @@ static void DrawTile_Station(TileInfo *ti)
SpriteID palette; SpriteID palette;
if (IsValidCompanyID(owner)) { if (IsValidCompanyID(owner)) {
palette = COMPANY_SPRITE_COLOR(owner); palette = COMPANY_SPRITE_COLOUR(owner);
} else { } else {
/* Some stations are not owner by a company, namely oil rigs */ /* Some stations are not owner by a company, namely oil rigs */
palette = PALETTE_TO_GREY; palette = PALETTE_TO_GREY;
@ -2437,7 +2437,7 @@ static void DrawTile_Station(TileInfo *ti)
void StationPickerDrawSprite(int x, int y, StationType st, RailType railtype, RoadType roadtype, int image) void StationPickerDrawSprite(int x, int y, StationType st, RailType railtype, RoadType roadtype, int image)
{ {
int32 total_offset = 0; int32 total_offset = 0;
SpriteID pal = COMPANY_SPRITE_COLOR(_local_company); SpriteID pal = COMPANY_SPRITE_COLOUR(_local_company);
const DrawTileSprites *t = &_station_display_datas[st][image]; const DrawTileSprites *t = &_station_display_datas[st][image];
if (railtype != INVALID_RAILTYPE) { if (railtype != INVALID_RAILTYPE) {
@ -2446,7 +2446,7 @@ void StationPickerDrawSprite(int x, int y, StationType st, RailType railtype, Ro
} }
SpriteID img = t->ground.sprite; SpriteID img = t->ground.sprite;
DrawSprite(img + total_offset, HasBit(img, PALETTE_MODIFIER_COLOR) ? pal : PAL_NONE, x, y); DrawSprite(img + total_offset, HasBit(img, PALETTE_MODIFIER_COLOUR) ? pal : PAL_NONE, x, y);
if (roadtype == ROADTYPE_TRAM) { if (roadtype == ROADTYPE_TRAM) {
DrawSprite(SPR_TRAMWAY_TRAM + (t->ground.sprite == SPR_ROAD_PAVED_STRAIGHT_X ? 1 : 0), PAL_NONE, x, y); DrawSprite(SPR_TRAMWAY_TRAM + (t->ground.sprite == SPR_ROAD_PAVED_STRAIGHT_X ? 1 : 0), PAL_NONE, x, y);

View File

@ -1577,12 +1577,12 @@ void CheckForMissingGlyphsInLoadedLanguagePack()
* have to show the error. As we do not want the string to * have to show the error. As we do not want the string to
* be translated by the translators, we 'force' it into the * be translated by the translators, we 'force' it into the
* binary and 'load' it via a BindCString. To do this * binary and 'load' it via a BindCString. To do this
* properly we have to set the color of the string, * properly we have to set the colour of the string,
* otherwise we end up with a lot of artefacts. The color * otherwise we end up with a lot of artefacts. The colour
* 'character' might change in the future, so for safety * 'character' might change in the future, so for safety
* we just Utf8 Encode it into the string, which takes * we just Utf8 Encode it into the string, which takes
* exactly three characters, so it replaces the "XXX" with * exactly three characters, so it replaces the "XXX" with
* the color marker. * the colour marker.
*/ */
static char *err_str = strdup("XXXThe current font is missing some of the characters used in the texts for this language. Read the readme to see how to solve this."); static char *err_str = strdup("XXXThe current font is missing some of the characters used in the texts for this language. Read the readme to see how to solve this.");
Utf8Encode(err_str, SCC_YELLOW); Utf8Encode(err_str, SCC_YELLOW);
@ -1603,12 +1603,12 @@ void CheckForMissingGlyphsInLoadedLanguagePack()
* about it with a message. As we do not want the string to * about it with a message. As we do not want the string to
* be translated by the translators, we 'force' it into the * be translated by the translators, we 'force' it into the
* binary and 'load' it via a BindCString. To do this * binary and 'load' it via a BindCString. To do this
* properly we have to set the color of the string, * properly we have to set the colour of the string,
* otherwise we end up with a lot of artefacts. The color * otherwise we end up with a lot of artefacts. The colour
* 'character' might change in the future, so for safety * 'character' might change in the future, so for safety
* we just Utf8 Encode it into the string, which takes * we just Utf8 Encode it into the string, which takes
* exactly three characters, so it replaces the "XXX" with * exactly three characters, so it replaces the "XXX" with
* the color marker. * the colour marker.
*/ */
if (_dynlang.text_dir != TD_LTR) { if (_dynlang.text_dir != TD_LTR) {
static char *err_str = strdup("XXXThis version of OpenTTD does not support right-to-left languages. Recompile with icu enabled."); static char *err_str = strdup("XXXThis version of OpenTTD does not support right-to-left languages. Recompile with icu enabled.");

View File

@ -115,26 +115,26 @@ static const DrawBuildingsTileStruct _industry_draw_tile_data[NEW_INDUSTRYTILEOF
M( 0x81d, PAL_NONE, 0x81c, PAL_NONE, 0, 0, 16, 16, 7, 0), M( 0x81d, PAL_NONE, 0x81c, PAL_NONE, 0, 0, 16, 16, 7, 0),
M( 0x81d, PAL_NONE, 0x81c, PAL_NONE, 0, 0, 16, 16, 7, 0), M( 0x81d, PAL_NONE, 0x81c, PAL_NONE, 0, 0, 16, 16, 7, 0),
M( 0x81d, PAL_NONE, 0x81c, PAL_NONE, 0, 0, 16, 16, 7, 0), M( 0x81d, PAL_NONE, 0x81c, PAL_NONE, 0, 0, 16, 16, 7, 0),
M( 0xf54, PAL_NONE, 0x81e | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 1, 1, 14, 14, 4, 0), M( 0xf54, PAL_NONE, 0x81e | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 1, 1, 14, 14, 4, 0),
M( 0xf54, PAL_NONE, 0x81f | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 1, 1, 14, 14, 24, 0), M( 0xf54, PAL_NONE, 0x81f | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 1, 1, 14, 14, 24, 0),
M( 0xf54, PAL_NONE, 0x820 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 1, 1, 14, 14, 27, 0), M( 0xf54, PAL_NONE, 0x820 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 1, 1, 14, 14, 27, 0),
M( 0x58c, PAL_NONE, 0x820 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 1, 1, 14, 14, 27, 0), M( 0x58c, PAL_NONE, 0x820 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 1, 1, 14, 14, 27, 0),
M( 0xf54, PAL_NONE, 0x821 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 3, 3, 10, 9, 3, 0), M( 0xf54, PAL_NONE, 0x821 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 3, 3, 10, 9, 3, 0),
M( 0xf54, PAL_NONE, 0x822 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 3, 3, 10, 9, 63, 0), M( 0xf54, PAL_NONE, 0x822 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 3, 3, 10, 9, 63, 0),
M( 0xf54, PAL_NONE, 0x823 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 3, 3, 10, 9, 62, 0), M( 0xf54, PAL_NONE, 0x823 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 3, 3, 10, 9, 62, 0),
M( 0x58c, PAL_NONE, 0x823 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 3, 3, 10, 9, 62, 0), M( 0x58c, PAL_NONE, 0x823 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 3, 3, 10, 9, 62, 0),
M( 0xf54, PAL_NONE, 0x824 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 4, 4, 7, 7, 3, 0), M( 0xf54, PAL_NONE, 0x824 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 4, 4, 7, 7, 3, 0),
M( 0xf54, PAL_NONE, 0x825 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 4, 4, 7, 7, 72, 0), M( 0xf54, PAL_NONE, 0x825 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 4, 4, 7, 7, 72, 0),
M( 0xf54, PAL_NONE, 0x825 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 4, 4, 7, 7, 72, 0), M( 0xf54, PAL_NONE, 0x825 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 4, 4, 7, 7, 72, 0),
M( 0x58c, PAL_NONE, 0x826 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 4, 4, 7, 7, 80, 0), M( 0x58c, PAL_NONE, 0x826 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 4, 4, 7, 7, 80, 0),
M( 0xf54, PAL_NONE, 0x827 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 2, 0, 12, 16, 51, 0), M( 0xf54, PAL_NONE, 0x827 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 2, 0, 12, 16, 51, 0),
M( 0xf54, PAL_NONE, 0x828 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 2, 0, 12, 16, 51, 0), M( 0xf54, PAL_NONE, 0x828 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 2, 0, 12, 16, 51, 0),
M( 0xf54, PAL_NONE, 0x829 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 2, 0, 12, 16, 51, 0), M( 0xf54, PAL_NONE, 0x829 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 2, 0, 12, 16, 51, 0),
M( 0x58c, PAL_NONE, 0x829 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 2, 0, 12, 16, 51, 0), M( 0x58c, PAL_NONE, 0x829 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 2, 0, 12, 16, 51, 0),
M( 0xf54, PAL_NONE, 0x82a | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 26, 0), M( 0xf54, PAL_NONE, 0x82a | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 26, 0),
M( 0xf54, PAL_NONE, 0x82b | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 44, 0), M( 0xf54, PAL_NONE, 0x82b | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 44, 0),
M( 0xf54, PAL_NONE, 0x82c | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 46, 0), M( 0xf54, PAL_NONE, 0x82c | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 46, 0),
M( 0x58c, PAL_NONE, 0x82c | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 46, 0), M( 0x58c, PAL_NONE, 0x82c | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 46, 0),
M( 0xf54, PAL_NONE, 0x82d, PAL_NONE, 3, 1, 10, 13, 2, 0), M( 0xf54, PAL_NONE, 0x82d, PAL_NONE, 3, 1, 10, 13, 2, 0),
M( 0xf54, PAL_NONE, 0x82e, PAL_NONE, 3, 1, 10, 13, 11, 0), M( 0xf54, PAL_NONE, 0x82e, PAL_NONE, 3, 1, 10, 13, 11, 0),
M( 0xf54, PAL_NONE, 0x82f, PAL_NONE, 3, 1, 10, 13, 11, 0), M( 0xf54, PAL_NONE, 0x82f, PAL_NONE, 3, 1, 10, 13, 11, 0),
@ -175,18 +175,18 @@ static const DrawBuildingsTileStruct _industry_draw_tile_data[NEW_INDUSTRYTILEOF
M( 0x87d, PAL_NONE, 0x880, PAL_NONE, 0, 0, 16, 16, 20, 0), M( 0x87d, PAL_NONE, 0x880, PAL_NONE, 0, 0, 16, 16, 20, 0),
M( 0x87d, PAL_NONE, 0x87f, PAL_NONE, 0, 0, 16, 16, 20, 0), M( 0x87d, PAL_NONE, 0x87f, PAL_NONE, 0, 0, 16, 16, 20, 0),
M( 0x87d, PAL_NONE, 0x87e, PAL_NONE, 0, 0, 16, 16, 20, 0), M( 0x87d, PAL_NONE, 0x87e, PAL_NONE, 0, 0, 16, 16, 20, 0),
M( 0x83a, PAL_NONE, 0x83c | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 18, 0), M( 0x83a, PAL_NONE, 0x83c | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 18, 0),
M( 0x83a, PAL_NONE, 0x83c | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 18, 0), M( 0x83a, PAL_NONE, 0x83c | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 18, 0),
M( 0x83a, PAL_NONE, 0x83c | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 18, 0), M( 0x83a, PAL_NONE, 0x83c | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 18, 0),
M( 0x83a, PAL_NONE, 0x83c | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 18, 0), M( 0x83a, PAL_NONE, 0x83c | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 18, 0),
M( 0x83b, PAL_NONE, 0x83d | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 18, 0), M( 0x83b, PAL_NONE, 0x83d | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 18, 0),
M( 0x83b, PAL_NONE, 0x83d | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 18, 0), M( 0x83b, PAL_NONE, 0x83d | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 18, 0),
M( 0x83b, PAL_NONE, 0x83d | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 18, 0), M( 0x83b, PAL_NONE, 0x83d | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 18, 0),
M( 0x83b, PAL_NONE, 0x83d | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 18, 0), M( 0x83b, PAL_NONE, 0x83d | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 18, 0),
M( 0x7e6, PAL_NONE, 0x0, PAL_NONE, 0, 0, 1, 1, 0, 0), M( 0x7e6, PAL_NONE, 0x0, PAL_NONE, 0, 0, 1, 1, 0, 0),
M( 0x83e, PAL_NONE, 0x83f | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 18, 0), M( 0x83e, PAL_NONE, 0x83f | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 18, 0),
M( 0x83e, PAL_NONE, 0x83f | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 18, 0), M( 0x83e, PAL_NONE, 0x83f | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 18, 0),
M( 0x83e, PAL_NONE, 0x83f | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 18, 0), M( 0x83e, PAL_NONE, 0x83f | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 18, 0),
M( 0x7e6, PAL_NONE, 0x0, PAL_NONE, 0, 0, 1, 1, 0, 0), M( 0x7e6, PAL_NONE, 0x0, PAL_NONE, 0, 0, 1, 1, 0, 0),
M( 0x840, PAL_NONE, 0x841, PAL_NONE, 0, 0, 16, 16, 18, 0), M( 0x840, PAL_NONE, 0x841, PAL_NONE, 0, 0, 16, 16, 18, 0),
M( 0x840, PAL_NONE, 0x841, PAL_NONE, 0, 0, 16, 16, 18, 0), M( 0x840, PAL_NONE, 0x841, PAL_NONE, 0, 0, 16, 16, 18, 0),
@ -202,35 +202,35 @@ static const DrawBuildingsTileStruct _industry_draw_tile_data[NEW_INDUSTRYTILEOF
M( 0x7e6, PAL_NONE, 0x869, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x869, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x86d, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x86d, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x86d, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x86d, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x862 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0x866 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x862 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0x866 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x86a, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x86a, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x86e, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x86e, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x86e, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x86e, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x863 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0x867 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x863 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0x867 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x86b, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x86b, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x86f, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x86f, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x86f, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x86f, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x864 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0x868 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x864 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0x868 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x86c, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x86c, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x870, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x870, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x870, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x870, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x865 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 1, 1, 0, 0), M( 0x865 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 1, 1, 0, 0),
M( 0xf54, PAL_NONE, 0x871 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0xf54, PAL_NONE, 0x871 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0xf54, PAL_NONE, 0x875 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0xf54, PAL_NONE, 0x875 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0xf54, PAL_NONE, 0x875 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0xf54, PAL_NONE, 0x875 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0xf54, PAL_NONE, 0x879 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0xf54, PAL_NONE, 0x879 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0xf54, PAL_NONE, 0x872 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0xf54, PAL_NONE, 0x872 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0xf54, PAL_NONE, 0x876 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0xf54, PAL_NONE, 0x876 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0xf54, PAL_NONE, 0x876 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0xf54, PAL_NONE, 0x876 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0xf54, PAL_NONE, 0x87a | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0xf54, PAL_NONE, 0x87a | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0xf54, PAL_NONE, 0x873 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0xf54, PAL_NONE, 0x873 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0xf54, PAL_NONE, 0x877 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0xf54, PAL_NONE, 0x877 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0xf54, PAL_NONE, 0x877 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0xf54, PAL_NONE, 0x877 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0xf54, PAL_NONE, 0x87b | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0xf54, PAL_NONE, 0x87b | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0xf54, PAL_NONE, 0x874 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0xf54, PAL_NONE, 0x874 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0xf54, PAL_NONE, 0x878 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0xf54, PAL_NONE, 0x878 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0xf54, PAL_NONE, 0x878 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0xf54, PAL_NONE, 0x878 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0xf54, PAL_NONE, 0x87c | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0xf54, PAL_NONE, 0x87c | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0xf54, PAL_NONE, 0x7ea, PAL_NONE, 3, 2, 8, 8, 18, 0), M( 0xf54, PAL_NONE, 0x7ea, PAL_NONE, 3, 2, 8, 8, 18, 0),
M( 0xf54, PAL_NONE, 0x7eb, PAL_NONE, 3, 2, 8, 8, 37, 0), M( 0xf54, PAL_NONE, 0x7eb, PAL_NONE, 3, 2, 8, 8, 37, 0),
M( 0xf54, PAL_NONE, 0x7ec, PAL_NONE, 3, 2, 8, 8, 49, 0), M( 0xf54, PAL_NONE, 0x7ec, PAL_NONE, 3, 2, 8, 8, 49, 0),
@ -254,27 +254,27 @@ static const DrawBuildingsTileStruct _industry_draw_tile_data[NEW_INDUSTRYTILEOF
M( 0x7e6, PAL_NONE, 0x85c, PAL_NONE, 0, 0, 1, 1, 1, 0), M( 0x7e6, PAL_NONE, 0x85c, PAL_NONE, 0, 0, 1, 1, 1, 0),
M( 0x851, PAL_NONE, 0x852, PAL_NONE, 0, 0, 16, 16, 20, 0), M( 0x851, PAL_NONE, 0x852, PAL_NONE, 0, 0, 16, 16, 20, 0),
M( 0x851, PAL_NONE, 0x852, PAL_NONE, 0, 0, 16, 16, 20, 0), M( 0x851, PAL_NONE, 0x852, PAL_NONE, 0, 0, 16, 16, 20, 0),
M( 0x846 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0x847 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 20, 0), M( 0x846 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0x847 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 20, 0),
M( 0x7e6, PAL_NONE, 0x85d, PAL_NONE, 0, 0, 1, 1, 1, 0), M( 0x7e6, PAL_NONE, 0x85d, PAL_NONE, 0, 0, 1, 1, 1, 0),
M( 0x853, PAL_NONE, 0x854, PAL_NONE, 0, 0, 16, 16, 20, 0), M( 0x853, PAL_NONE, 0x854, PAL_NONE, 0, 0, 16, 16, 20, 0),
M( 0x853, PAL_NONE, 0x854, PAL_NONE, 0, 0, 16, 16, 20, 0), M( 0x853, PAL_NONE, 0x854, PAL_NONE, 0, 0, 16, 16, 20, 0),
M( 0x848 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0x849 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 20, 0), M( 0x848 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0x849 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 20, 0),
M( 0x7e6, PAL_NONE, 0x85e, PAL_NONE, 0, 0, 1, 1, 1, 0), M( 0x7e6, PAL_NONE, 0x85e, PAL_NONE, 0, 0, 1, 1, 1, 0),
M( 0x855, PAL_NONE, 0x856, PAL_NONE, 0, 0, 16, 16, 20, 0), M( 0x855, PAL_NONE, 0x856, PAL_NONE, 0, 0, 16, 16, 20, 0),
M( 0x855, PAL_NONE, 0x856, PAL_NONE, 0, 0, 16, 16, 20, 0), M( 0x855, PAL_NONE, 0x856, PAL_NONE, 0, 0, 16, 16, 20, 0),
M( 0x84a | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0x84b | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 20, 0), M( 0x84a | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0x84b | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 20, 0),
M( 0x7e6, PAL_NONE, 0x85f, PAL_NONE, 0, 0, 1, 1, 1, 0), M( 0x7e6, PAL_NONE, 0x85f, PAL_NONE, 0, 0, 1, 1, 1, 0),
M( 0x857, PAL_NONE, 0x0, PAL_NONE, 0, 0, 1, 1, 0, 0), M( 0x857, PAL_NONE, 0x0, PAL_NONE, 0, 0, 1, 1, 0, 0),
M( 0x857, PAL_NONE, 0x0, PAL_NONE, 0, 0, 1, 1, 0, 0), M( 0x857, PAL_NONE, 0x0, PAL_NONE, 0, 0, 1, 1, 0, 0),
M( 0x84c | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 1, 1, 0, 0), M( 0x84c | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 1, 1, 0, 0),
M( 0x7e6, PAL_NONE, 0x860, PAL_NONE, 0, 0, 1, 1, 1, 0), M( 0x7e6, PAL_NONE, 0x860, PAL_NONE, 0, 0, 1, 1, 1, 0),
M( 0x858, PAL_NONE, 0x859, PAL_NONE, 0, 0, 16, 16, 20, 0), M( 0x858, PAL_NONE, 0x859, PAL_NONE, 0, 0, 16, 16, 20, 0),
M( 0x858, PAL_NONE, 0x859, PAL_NONE, 0, 0, 16, 16, 20, 0), M( 0x858, PAL_NONE, 0x859, PAL_NONE, 0, 0, 16, 16, 20, 0),
M( 0x84d | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0x84e | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 20, 0), M( 0x84d | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0x84e | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 20, 0),
M( 0x7e6, PAL_NONE, 0x861, PAL_NONE, 0, 0, 1, 1, 1, 0), M( 0x7e6, PAL_NONE, 0x861, PAL_NONE, 0, 0, 1, 1, 1, 0),
M( 0x85a, PAL_NONE, 0x85b, PAL_NONE, 0, 0, 16, 16, 20, 0), M( 0x85a, PAL_NONE, 0x85b, PAL_NONE, 0, 0, 16, 16, 20, 0),
M( 0x85a, PAL_NONE, 0x85b, PAL_NONE, 0, 0, 16, 16, 20, 0), M( 0x85a, PAL_NONE, 0x85b, PAL_NONE, 0, 0, 16, 16, 20, 0),
M( 0x84f | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0x850 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 20, 0), M( 0x84f | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0x850 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 20, 0),
M( 0x7e6, PAL_NONE, 0x884, PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x7e6, PAL_NONE, 0x884, PAL_NONE, 0, 0, 16, 16, 25, 0),
M( 0x7e6, PAL_NONE, 0x884, PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x7e6, PAL_NONE, 0x884, PAL_NONE, 0, 0, 16, 16, 25, 0),
M( 0x7e6, PAL_NONE, 0x884, PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x7e6, PAL_NONE, 0x884, PAL_NONE, 0, 0, 16, 16, 25, 0),
@ -283,22 +283,22 @@ static const DrawBuildingsTileStruct _industry_draw_tile_data[NEW_INDUSTRYTILEOF
M( 0x7e6, PAL_NONE, 0x885, PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x7e6, PAL_NONE, 0x885, PAL_NONE, 0, 0, 16, 16, 25, 0),
M( 0x7e6, PAL_NONE, 0x885, PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x7e6, PAL_NONE, 0x885, PAL_NONE, 0, 0, 16, 16, 25, 0),
M( 0x887, PAL_NONE, 0x885, PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x887, PAL_NONE, 0x885, PAL_NONE, 0, 0, 16, 16, 25, 0),
M( 0x7e6, PAL_NONE, 0x88c | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x7e6, PAL_NONE, 0x88c | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 25, 0),
M( 0x7e6, PAL_NONE, 0x88d | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x7e6, PAL_NONE, 0x88d | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 25, 0),
M( 0x7e6, PAL_NONE, 0x88d | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x7e6, PAL_NONE, 0x88d | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 25, 0),
M( 0x7e6, PAL_NONE, 0x88e | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x7e6, PAL_NONE, 0x88e | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 25, 0),
M( 0x7e6, PAL_NONE, 0x88f | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x7e6, PAL_NONE, 0x88f | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 25, 0),
M( 0x7e6, PAL_NONE, 0x890 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x7e6, PAL_NONE, 0x890 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 25, 0),
M( 0x7e6, PAL_NONE, 0x890 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x7e6, PAL_NONE, 0x890 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 25, 0),
M( 0x7e6, PAL_NONE, 0x891 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x7e6, PAL_NONE, 0x891 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 25, 0),
M( 0x7e6, PAL_NONE, 0x892 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x7e6, PAL_NONE, 0x892 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 25, 0),
M( 0x7e6, PAL_NONE, 0x893 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x7e6, PAL_NONE, 0x893 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 25, 0),
M( 0x7e6, PAL_NONE, 0x893 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x7e6, PAL_NONE, 0x893 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 25, 0),
M( 0x7e6, PAL_NONE, 0x894 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x7e6, PAL_NONE, 0x894 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 25, 0),
M( 0x7e6, PAL_NONE, 0x895 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x7e6, PAL_NONE, 0x895 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 25, 0),
M( 0x7e6, PAL_NONE, 0x896 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x7e6, PAL_NONE, 0x896 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 25, 0),
M( 0x7e6, PAL_NONE, 0x896 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x7e6, PAL_NONE, 0x896 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 25, 0),
M( 0x7e6, PAL_NONE, 0x897 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x7e6, PAL_NONE, 0x897 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 25, 0),
M( 0x7e6, PAL_NONE, 0x898, PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x7e6, PAL_NONE, 0x898, PAL_NONE, 0, 0, 16, 16, 25, 0),
M( 0x7e6, PAL_NONE, 0x899, PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x7e6, PAL_NONE, 0x899, PAL_NONE, 0, 0, 16, 16, 25, 0),
M( 0x7e6, PAL_NONE, 0x899, PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x7e6, PAL_NONE, 0x899, PAL_NONE, 0, 0, 16, 16, 25, 0),
@ -515,34 +515,34 @@ static const DrawBuildingsTileStruct _industry_draw_tile_data[NEW_INDUSTRYTILEOF
M( 0x925, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x925, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 25, 0),
M( 0x925, PAL_NONE, 0x927, PAL_NONE, 0, 0, 16, 16, 30, 0), M( 0x925, PAL_NONE, 0x927, PAL_NONE, 0, 0, 16, 16, 30, 0),
M( 0x925, PAL_NONE, 0x927, PAL_NONE, 0, 0, 16, 16, 30, 0), M( 0x925, PAL_NONE, 0x927, PAL_NONE, 0, 0, 16, 16, 30, 0),
M( 0x11c6, PAL_NONE, 0x92b | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x11c6, PAL_NONE, 0x92b | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 25, 0),
M( 0x11c6, PAL_NONE, 0x92c | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x11c6, PAL_NONE, 0x92c | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 25, 0),
M( 0x11c6, PAL_NONE, 0x92c | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x11c6, PAL_NONE, 0x92c | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 25, 0),
M( 0x11c6, PAL_NONE, 0x92d | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x11c6, PAL_NONE, 0x92d | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 25, 0),
M( 0x11c6, PAL_NONE, 0x92e | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x11c6, PAL_NONE, 0x92e | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 25, 0),
M( 0x11c6, PAL_NONE, 0x92f | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x11c6, PAL_NONE, 0x92f | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 25, 0),
M( 0x11c6, PAL_NONE, 0x92f | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x11c6, PAL_NONE, 0x92f | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 25, 0),
M( 0x11c6, PAL_NONE, 0x930 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x11c6, PAL_NONE, 0x930 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 25, 0),
M( 0x11c6, PAL_NONE, 0x928 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x11c6, PAL_NONE, 0x928 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 25, 0),
M( 0x11c6, PAL_NONE, 0x929 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x11c6, PAL_NONE, 0x929 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 25, 0),
M( 0x11c6, PAL_NONE, 0x929 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x11c6, PAL_NONE, 0x929 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 25, 0),
M( 0x11c6, PAL_NONE, 0x92a | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 25, 0), M( 0x11c6, PAL_NONE, 0x92a | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 25, 0),
M( 0x7e6, PAL_NONE, 0x869, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x869, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x86d, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x86d, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x86d, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x86d, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x862 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0x866 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x862 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0x866 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x86a, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x86a, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x86e, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x86e, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x86e, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x86e, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x863 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0x867 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x863 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0x867 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x86b, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x86b, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x86f, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x86f, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x86f, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x86f, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x864 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0x868 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x864 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0x868 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x86c, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x86c, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x870, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x870, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x870, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x870, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x865 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 1, 1, 0, 0), M( 0x865 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 1, 1, 0, 0),
M( 0x7e6, PAL_NONE, 0x931, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x931, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x935, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x935, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x935, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x935, PAL_NONE, 0, 0, 16, 16, 50, 0),
@ -571,18 +571,18 @@ static const DrawBuildingsTileStruct _industry_draw_tile_data[NEW_INDUSTRYTILEOF
M( 0x7e6, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x1245 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x1245 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x1248 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x1248 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x1248 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x1248 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x124b | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x124b | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x1247 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x1247 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x124a | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x124a | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x124a | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x124a | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x124d | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x124d | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x1246 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x1246 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x1249 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x1249 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x1249 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x1249 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x7e6, PAL_NONE, 0x124c | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x7e6, PAL_NONE, 0x124c | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x81d, PAL_NONE, 0x124e, PAL_NONE, 0, 0, 16, 16, 10, 0), M( 0x81d, PAL_NONE, 0x124e, PAL_NONE, 0, 0, 16, 16, 10, 0),
M( 0x81d, PAL_NONE, 0x124f, PAL_NONE, 0, 0, 16, 16, 10, 0), M( 0x81d, PAL_NONE, 0x124f, PAL_NONE, 0, 0, 16, 16, 10, 0),
M( 0x81d, PAL_NONE, 0x1250, PAL_NONE, 0, 0, 16, 16, 10, 0), M( 0x81d, PAL_NONE, 0x1250, PAL_NONE, 0, 0, 16, 16, 10, 0),
@ -674,15 +674,15 @@ static const DrawBuildingsTileStruct _industry_draw_tile_data[NEW_INDUSTRYTILEOF
M( 0x1244, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x1244, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x1244, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x1244, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x1244, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x1244, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x1244, PAL_NONE, 0x1284 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x1244, PAL_NONE, 0x1284 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x1244, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x1244, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x1244, PAL_NONE, 0x1283 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x1244, PAL_NONE, 0x1283 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x1244, PAL_NONE, 0x1283 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x1244, PAL_NONE, 0x1283 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x1244, PAL_NONE, 0x1286 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x1244, PAL_NONE, 0x1286 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x1244, PAL_NONE, 0x1281 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x1244, PAL_NONE, 0x1281 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x1244, PAL_NONE, 0x1282 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x1244, PAL_NONE, 0x1282 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x1244, PAL_NONE, 0x1282 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x1244, PAL_NONE, 0x1282 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x1244, PAL_NONE, 0x1285 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x1244, PAL_NONE, 0x1285 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x1243, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x1243, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x1243, PAL_NONE, 0x1287, PALETTE_TO_RED, 0, 0, 16, 16, 50, 0), M( 0x1243, PAL_NONE, 0x1287, PALETTE_TO_RED, 0, 0, 16, 16, 50, 0),
M( 0x1243, PAL_NONE, 0x1287, PALETTE_TO_RED, 0, 0, 16, 16, 50, 0), M( 0x1243, PAL_NONE, 0x1287, PALETTE_TO_RED, 0, 0, 16, 16, 50, 0),
@ -711,38 +711,38 @@ static const DrawBuildingsTileStruct _industry_draw_tile_data[NEW_INDUSTRYTILEOF
M( 0xf8d, PAL_NONE, 0x129d, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0xf8d, PAL_NONE, 0x129d, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0xf8d, PAL_NONE, 0x129d, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0xf8d, PAL_NONE, 0x129d, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0xf8d, PAL_NONE, 0x129d, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0xf8d, PAL_NONE, 0x129d, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x12a0 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x12a0 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x12a0 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x12a0 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x12a0 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x12a0 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x12a0 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x12a0 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x12a1 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x12a1 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x12a1 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x12a1 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x12a1 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x12a1 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x12a1 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x12a1 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x12a2 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x12a2 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x12a2 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x12a2 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x12a2 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x12a2 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x12a2 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x12a2 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x12a3 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x12a3 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x12a3 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x12a3 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x12a3 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x12a3 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x12a3 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x12a3 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0xf8d, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0xf8d, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0xf8d, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0xf8d, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0xf8d, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0xf8d, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0xf8d, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0xf8d, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0xf8d, PAL_NONE, 0x12a4 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0xf8d, PAL_NONE, 0x12a4 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0xf8d, PAL_NONE, 0x12a4 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0xf8d, PAL_NONE, 0x12a4 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0xf8d, PAL_NONE, 0x12a4 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0xf8d, PAL_NONE, 0x12a4 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0xf8d, PAL_NONE, 0x12a4 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0xf8d, PAL_NONE, 0x12a4 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0xf8d, PAL_NONE, 0x12a6 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0xf8d, PAL_NONE, 0x12a6 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0xf8d, PAL_NONE, 0x12a6 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0xf8d, PAL_NONE, 0x12a6 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0xf8d, PAL_NONE, 0x12a6 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0xf8d, PAL_NONE, 0x12a6 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0xf8d, PAL_NONE, 0x12a6 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0xf8d, PAL_NONE, 0x12a6 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0xf8d, PAL_NONE, 0x12a5 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 1), M( 0xf8d, PAL_NONE, 0x12a5 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 1),
M( 0xf8d, PAL_NONE, 0x12a5 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 1), M( 0xf8d, PAL_NONE, 0x12a5 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 1),
M( 0xf8d, PAL_NONE, 0x12a5 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 1), M( 0xf8d, PAL_NONE, 0x12a5 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 1),
M( 0xf8d, PAL_NONE, 0x12a5 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 1), M( 0xf8d, PAL_NONE, 0x12a5 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 1),
}; };
#undef M #undef M

View File

@ -194,13 +194,13 @@ static const ExtraPaletteValues _extra_palette_values = {
}; };
#undef M #undef M
// Color table for colors in lang files (e.g. {BLACK}) // Colour table for colours in lang files (e.g. {BLACK})
struct StringColor { struct StringColour {
byte text; byte text;
byte shadow; byte shadow;
}; };
static const StringColor _string_colourmap[][17] = { static const StringColour _string_colourmap[][17] = {
{ /* DOS palette. */ { /* DOS palette. */
{ 150, 1 }, // TC_BLUE { 150, 1 }, // TC_BLUE
{ 12, 1 }, // TC_SILVER { 12, 1 }, // TC_SILVER

View File

@ -6,24 +6,24 @@
#define TILE_SEQ_END() { 0, 0, 0, 0, 0, 0, {0, 0} } #define TILE_SEQ_END() { 0, 0, 0, 0, 0, 0, {0, 0} }
static const DrawTileSeqStruct _road_depot_NE[] = { static const DrawTileSeqStruct _road_depot_NE[] = {
TILE_SEQ_LINE(0x584 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 15, 16, 1) TILE_SEQ_LINE(0x584 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 15, 16, 1)
TILE_SEQ_END() TILE_SEQ_END()
}; };
static const DrawTileSeqStruct _road_depot_SE[] = { static const DrawTileSeqStruct _road_depot_SE[] = {
TILE_SEQ_LINE(0x580 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 1, 16) TILE_SEQ_LINE(0x580 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 1, 16)
TILE_SEQ_LINE(0x581 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 15, 0, 1, 16) TILE_SEQ_LINE(0x581 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 15, 0, 1, 16)
TILE_SEQ_END() TILE_SEQ_END()
}; };
static const DrawTileSeqStruct _road_depot_SW[] = { static const DrawTileSeqStruct _road_depot_SW[] = {
TILE_SEQ_LINE(0x582 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 1) TILE_SEQ_LINE(0x582 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 1)
TILE_SEQ_LINE(0x583 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 15, 16, 1) TILE_SEQ_LINE(0x583 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 15, 16, 1)
TILE_SEQ_END() TILE_SEQ_END()
}; };
static const DrawTileSeqStruct _road_depot_NW[] = { static const DrawTileSeqStruct _road_depot_NW[] = {
TILE_SEQ_LINE(0x585 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 15, 0, 1, 16) TILE_SEQ_LINE(0x585 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 15, 0, 1, 16)
TILE_SEQ_END() TILE_SEQ_END()
}; };
@ -35,24 +35,24 @@ static const DrawTileSprites _road_depot[] = {
}; };
static const DrawTileSeqStruct _tram_depot_NE[] = { static const DrawTileSeqStruct _tram_depot_NE[] = {
TILE_SEQ_LINE((SPR_TRAMWAY_BASE + 0x35) | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 15, 16, 1) TILE_SEQ_LINE((SPR_TRAMWAY_BASE + 0x35) | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 15, 16, 1)
TILE_SEQ_END() TILE_SEQ_END()
}; };
static const DrawTileSeqStruct _tram_depot_SE[] = { static const DrawTileSeqStruct _tram_depot_SE[] = {
TILE_SEQ_LINE((SPR_TRAMWAY_BASE + 0x31) | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 1, 16) TILE_SEQ_LINE((SPR_TRAMWAY_BASE + 0x31) | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 1, 16)
TILE_SEQ_LINE((SPR_TRAMWAY_BASE + 0x32) | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 15, 0, 1, 16) TILE_SEQ_LINE((SPR_TRAMWAY_BASE + 0x32) | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 15, 0, 1, 16)
TILE_SEQ_END() TILE_SEQ_END()
}; };
static const DrawTileSeqStruct _tram_depot_SW[] = { static const DrawTileSeqStruct _tram_depot_SW[] = {
TILE_SEQ_LINE((SPR_TRAMWAY_BASE + 0x33) | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 1) TILE_SEQ_LINE((SPR_TRAMWAY_BASE + 0x33) | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 1)
TILE_SEQ_LINE((SPR_TRAMWAY_BASE + 0x34) | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 15, 16, 1) TILE_SEQ_LINE((SPR_TRAMWAY_BASE + 0x34) | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 15, 16, 1)
TILE_SEQ_END() TILE_SEQ_END()
}; };
static const DrawTileSeqStruct _tram_depot_NW[] = { static const DrawTileSeqStruct _tram_depot_NW[] = {
TILE_SEQ_LINE((SPR_TRAMWAY_BASE + 0x36) | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 15, 0, 1, 16) TILE_SEQ_LINE((SPR_TRAMWAY_BASE + 0x36) | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 15, 0, 1, 16)
TILE_SEQ_END() TILE_SEQ_END()
}; };

View File

@ -56,8 +56,8 @@ enum Sprites {
SPR_HALFTILE_SELECTION_DOWN = SPR_OPENTTD_BASE + 4, SPR_HALFTILE_SELECTION_DOWN = SPR_OPENTTD_BASE + 4,
SPR_HALFTILE_SELECTION_UP = SPR_OPENTTD_BASE + 8, SPR_HALFTILE_SELECTION_UP = SPR_OPENTTD_BASE + 8,
SPR_SQUARE = SPR_OPENTTD_BASE + 38, // colored square (used for newgrf compatibility) SPR_SQUARE = SPR_OPENTTD_BASE + 38, // coloured square (used for newgrf compatibility)
SPR_BLOT = SPR_OPENTTD_BASE + 39, // colored circle (mainly used as vehicle profit marker and for server compatibility) SPR_BLOT = SPR_OPENTTD_BASE + 39, // coloured circle (mainly used as vehicle profit marker and for server compatibility)
SPR_LOCK = SPR_OPENTTD_BASE + 40, // lock icon (for password protected servers) SPR_LOCK = SPR_OPENTTD_BASE + 40, // lock icon (for password protected servers)
SPR_BOX_EMPTY = SPR_OPENTTD_BASE + 41, SPR_BOX_EMPTY = SPR_OPENTTD_BASE + 41,
SPR_BOX_CHECKED = SPR_OPENTTD_BASE + 42, SPR_BOX_CHECKED = SPR_OPENTTD_BASE + 42,
@ -1401,24 +1401,24 @@ enum AnimCursors {
* <ul><li> SPRITE_WIDTH is the number of bits used for the actual sprite to be displayed. * <ul><li> SPRITE_WIDTH is the number of bits used for the actual sprite to be displayed.
* This always starts at bit 0.</li> * This always starts at bit 0.</li>
* <li> TRANSPARENT_BIT is the bit number which toggles sprite transparency</li> * <li> TRANSPARENT_BIT is the bit number which toggles sprite transparency</li>
* <li> RECOLOR_BIT toggles the recoloring system</li> * <li> RECOLOUR_BIT toggles the recolouring system</li>
* <li> PALETTE_SPRITE_WIDTH and PALETTE_SPRITE_START determine the position and number of * <li> PALETTE_SPRITE_WIDTH and PALETTE_SPRITE_START determine the position and number of
* bits used for the recoloring process. For transparency, it must be 0x322.</li></ul> * bits used for the recolouring process. For transparency, it must be 0x322.</li></ul>
*/ */
enum SpriteSetup { enum SpriteSetup {
TRANSPARENT_BIT = 31, ///< toggles transparency in the sprite TRANSPARENT_BIT = 31, ///< toggles transparency in the sprite
RECOLOR_BIT = 30, ///< toggles recoloring in the sprite RECOLOUR_BIT = 30, ///< toggles recolouring in the sprite
OFFSET_BIT = 29, OFFSET_BIT = 29,
OPAQUE_BIT = 28, OPAQUE_BIT = 28,
PALETTE_WIDTH = 24, ///< number of bits of the sprite containing the recolor palette PALETTE_WIDTH = 24, ///< number of bits of the sprite containing the recolour palette
SPRITE_WIDTH = 24, ///< number of bits for the sprite number SPRITE_WIDTH = 24, ///< number of bits for the sprite number
}; };
/** /**
* these masks change the colors of the palette for a sprite. * these masks change the colours of the palette for a sprite.
* Apart from this bit, a sprite number is needed to define * Apart from this bit, a sprite number is needed to define
* the palette used for recoloring. This palette is stored * the palette used for recolouring. This palette is stored
* in the bits marked by PALETTE_SPRITE_MASK. * in the bits marked by PALETTE_SPRITE_MASK.
* @note Do not modify this enum. Alter SpriteSetup instead * @note Do not modify this enum. Alter SpriteSetup instead
* @see SpriteSetup * @see SpriteSetup
@ -1429,8 +1429,8 @@ enum Modifiers {
SPRITE_MODIFIER_OPAQUE = OPAQUE_BIT, SPRITE_MODIFIER_OPAQUE = OPAQUE_BIT,
///when a sprite is to be displayed transparently, this bit needs to be set. ///when a sprite is to be displayed transparently, this bit needs to be set.
PALETTE_MODIFIER_TRANSPARENT = TRANSPARENT_BIT, PALETTE_MODIFIER_TRANSPARENT = TRANSPARENT_BIT,
///this bit is set when a recoloring process is in action ///this bit is set when a recolouring process is in action
PALETTE_MODIFIER_COLOR = RECOLOR_BIT, PALETTE_MODIFIER_COLOUR = RECOLOUR_BIT,
}; };
/** Masks needed for sprite operations. /** Masks needed for sprite operations.
@ -1443,18 +1443,18 @@ enum SpriteMasks {
SPRITE_MASK = MAX_SPRITES - 1, SPRITE_MASK = MAX_SPRITES - 1,
MAX_PALETTES = 1 << PALETTE_WIDTH, MAX_PALETTES = 1 << PALETTE_WIDTH,
///The mask for the auxiliary sprite (the one that takes care of recoloring) ///The mask for the auxiliary sprite (the one that takes care of recolouring)
PALETTE_MASK = MAX_PALETTES - 1, PALETTE_MASK = MAX_PALETTES - 1,
}; };
assert_compile( (1 << TRANSPARENT_BIT & SPRITE_MASK) == 0 ); assert_compile( (1 << TRANSPARENT_BIT & SPRITE_MASK) == 0 );
assert_compile( (1 << RECOLOR_BIT & SPRITE_MASK) == 0 ); assert_compile( (1 << RECOLOUR_BIT & SPRITE_MASK) == 0 );
assert_compile( !(TRANSPARENT_BIT == RECOLOR_BIT) ); assert_compile( !(TRANSPARENT_BIT == RECOLOUR_BIT) );
assert_compile( (1 << TRANSPARENT_BIT & PALETTE_MASK) == 0); assert_compile( (1 << TRANSPARENT_BIT & PALETTE_MASK) == 0);
assert_compile( (1 << RECOLOR_BIT & PALETTE_MASK) == 0 ); assert_compile( (1 << RECOLOUR_BIT & PALETTE_MASK) == 0 );
enum Recoloring { enum Recolouring {
PALETTE_RECOLOR_START = 0x307, PALETTE_RECOLOUR_START = 0x307,
}; };
@ -1471,10 +1471,10 @@ static const SpriteID PALETTE_SEL_TILE_RED = 0x304;
///This draws a blueish square (catchment areas for example) ///This draws a blueish square (catchment areas for example)
static const SpriteID PALETTE_SEL_TILE_BLUE = 0x305; static const SpriteID PALETTE_SEL_TILE_BLUE = 0x305;
//0x306 is a real sprite (the little dot you get when you try to raise/lower a corner of the map //0x306 is a real sprite (the little dot you get when you try to raise/lower a corner of the map
//here the color switches begin //here the colour switches begin
//use this if you add stuff to the value, so that the resulting color //use this if you add stuff to the value, so that the resulting colour
//is not a fixed value. //is not a fixed value.
//NOTE THAT THE SWITCH 0x8000 is NOT present in _TO_COLORS yet! //NOTE THAT THE SWITCH 0x8000 is NOT present in _TO_COLOURS yet!
enum PaletteSprites { enum PaletteSprites {
PALETTE_TO_DARK_BLUE = 0x307, PALETTE_TO_DARK_BLUE = 0x307,
PALETTE_TO_PALE_GREEN = 0x308, PALETTE_TO_PALE_GREEN = 0x308,
@ -1486,32 +1486,32 @@ enum PaletteSprites {
PALETTE_TO_DARK_GREEN = 0x30E, PALETTE_TO_DARK_GREEN = 0x30E,
PALETTE_TO_BLUE = 0x30F, PALETTE_TO_BLUE = 0x30F,
PALETTE_TO_CREAM = 0x310, PALETTE_TO_CREAM = 0x310,
//maybe don't use as company color because it doesn't display in the graphs? //maybe don't use as company colour because it doesn't display in the graphs?
PALETTE_TO_MAUVE = 0x311, PALETTE_TO_MAUVE = 0x311,
PALETTE_TO_PURPLE = 0x312, PALETTE_TO_PURPLE = 0x312,
PALETTE_TO_ORANGE = 0x313, PALETTE_TO_ORANGE = 0x313,
PALETTE_TO_BROWN = 0x314, PALETTE_TO_BROWN = 0x314,
PALETTE_TO_GREY = 0x315, PALETTE_TO_GREY = 0x315,
PALETTE_TO_WHITE = 0x316, PALETTE_TO_WHITE = 0x316,
//sets color to bare land stuff, for rail and road (and crossings) //sets colour to bare land stuff, for rail and road (and crossings)
PALETTE_TO_BARE_LAND = 0x317, PALETTE_TO_BARE_LAND = 0x317,
//XXX is 318-31A really not used? //XXX is 318-31A really not used?
PALETTE_TO_STRUCT_BLUE = 0x31B, PALETTE_TO_STRUCT_BLUE = 0x31B,
//structure color to something brownish (for the cantilever bridges for example) //structure colour to something brownish (for the cantilever bridges for example)
PALETTE_TO_STRUCT_BROWN = 0x31C, PALETTE_TO_STRUCT_BROWN = 0x31C,
PALETTE_TO_STRUCT_WHITE = 0x31D, PALETTE_TO_STRUCT_WHITE = 0x31D,
//sets bridge or structure to red, little concrete one and cantilever use this one for example //sets bridge or structure to red, little concrete one and cantilever use this one for example
PALETTE_TO_STRUCT_RED = 0x31E, PALETTE_TO_STRUCT_RED = 0x31E,
PALETTE_TO_STRUCT_GREEN = 0x31F, PALETTE_TO_STRUCT_GREEN = 0x31F,
PALETTE_TO_STRUCT_CONCRETE = 0x320, //Sets the suspension bridge to concrete, also other strucutures use it PALETTE_TO_STRUCT_CONCRETE = 0x320, //Sets the suspension bridge to concrete, also other strucutures use it
PALETTE_TO_STRUCT_YELLOW = 0x321, //Sets the bridge color to yellow (suspension and tubular) PALETTE_TO_STRUCT_YELLOW = 0x321, //Sets the bridge colour to yellow (suspension and tubular)
PALETTE_TO_TRANSPARENT = 0x322, //This sets the sprite to transparent PALETTE_TO_TRANSPARENT = 0x322, //This sets the sprite to transparent
//This is used for changing the tubular bridges to the silicon display, or some grayish color //This is used for changing the tubular bridges to the silicon display, or some grayish colour
PALETTE_TO_STRUCT_GREY = 0x323, PALETTE_TO_STRUCT_GREY = 0x323,
//XXX - const - PALETTE_CRASH = 0x324, //this changes stuff to the "crash color" //XXX - const - PALETTE_CRASH = 0x324, //this changes stuff to the "crash colour"
//XXX another place where structures are colored. //XXX another place where structures are coloured.
//I'm not sure which colors these are //I'm not sure which colours these are
PALETTE_59E = 0x59E, PALETTE_59E = 0x59E,
PALETTE_59F = 0x59F, PALETTE_59F = 0x59F,
}; };

File diff suppressed because it is too large Load Diff

View File

@ -7,24 +7,24 @@
static const DrawTileSeqStruct _depot_gfx_NE[] = { static const DrawTileSeqStruct _depot_gfx_NE[] = {
TILE_SEQ_LINE(SPR_RAIL_DEPOT_NE | (1 << PALETTE_MODIFIER_COLOR), 2, 13, 13, 1) TILE_SEQ_LINE(SPR_RAIL_DEPOT_NE | (1 << PALETTE_MODIFIER_COLOUR), 2, 13, 13, 1)
TILE_SEQ_END() TILE_SEQ_END()
}; };
static const DrawTileSeqStruct _depot_gfx_SE[] = { static const DrawTileSeqStruct _depot_gfx_SE[] = {
TILE_SEQ_LINE(SPR_RAIL_DEPOT_SE_1 | (1 << PALETTE_MODIFIER_COLOR), 2, 2, 1, 13) TILE_SEQ_LINE(SPR_RAIL_DEPOT_SE_1 | (1 << PALETTE_MODIFIER_COLOUR), 2, 2, 1, 13)
TILE_SEQ_LINE(SPR_RAIL_DEPOT_SE_2 | (1 << PALETTE_MODIFIER_COLOR), 13, 2, 1, 13) TILE_SEQ_LINE(SPR_RAIL_DEPOT_SE_2 | (1 << PALETTE_MODIFIER_COLOUR), 13, 2, 1, 13)
TILE_SEQ_END() TILE_SEQ_END()
}; };
static const DrawTileSeqStruct _depot_gfx_SW[] = { static const DrawTileSeqStruct _depot_gfx_SW[] = {
TILE_SEQ_LINE(SPR_RAIL_DEPOT_SW_1 | (1 << PALETTE_MODIFIER_COLOR), 2, 2, 13, 1) TILE_SEQ_LINE(SPR_RAIL_DEPOT_SW_1 | (1 << PALETTE_MODIFIER_COLOUR), 2, 2, 13, 1)
TILE_SEQ_LINE(SPR_RAIL_DEPOT_SW_2 | (1 << PALETTE_MODIFIER_COLOR), 2, 13, 13, 1) TILE_SEQ_LINE(SPR_RAIL_DEPOT_SW_2 | (1 << PALETTE_MODIFIER_COLOUR), 2, 13, 13, 1)
TILE_SEQ_END() TILE_SEQ_END()
}; };
static const DrawTileSeqStruct _depot_gfx_NW[] = { static const DrawTileSeqStruct _depot_gfx_NW[] = {
TILE_SEQ_LINE(SPR_RAIL_DEPOT_NW | (1 << PALETTE_MODIFIER_COLOR), 13, 2, 1, 13) TILE_SEQ_LINE(SPR_RAIL_DEPOT_NW | (1 << PALETTE_MODIFIER_COLOUR), 13, 2, 1, 13)
TILE_SEQ_END() TILE_SEQ_END()
}; };
@ -43,14 +43,14 @@ static const DrawTileSprites _depot_invisible_gfx_table[] = {
}; };
static const DrawTileSeqStruct _waypoint_gfx_X[] = { static const DrawTileSeqStruct _waypoint_gfx_X[] = {
TILE_SEQ_LINE((1 << PALETTE_MODIFIER_COLOR) | SPR_WAYPOINT_X_1, 0, 0, 16, 5) TILE_SEQ_LINE((1 << PALETTE_MODIFIER_COLOUR) | SPR_WAYPOINT_X_1, 0, 0, 16, 5)
TILE_SEQ_LINE((1 << PALETTE_MODIFIER_COLOR) | SPR_WAYPOINT_X_2, 0, 11, 16, 5) TILE_SEQ_LINE((1 << PALETTE_MODIFIER_COLOUR) | SPR_WAYPOINT_X_2, 0, 11, 16, 5)
TILE_SEQ_END() TILE_SEQ_END()
}; };
static const DrawTileSeqStruct _waypoint_gfx_Y[] = { static const DrawTileSeqStruct _waypoint_gfx_Y[] = {
TILE_SEQ_LINE((1 << PALETTE_MODIFIER_COLOR) | SPR_WAYPOINT_Y_1, 0, 0, 5, 16) TILE_SEQ_LINE((1 << PALETTE_MODIFIER_COLOUR) | SPR_WAYPOINT_Y_1, 0, 0, 5, 16)
TILE_SEQ_LINE((1 << PALETTE_MODIFIER_COLOR) | SPR_WAYPOINT_Y_2, 11, 0, 5, 16) TILE_SEQ_LINE((1 << PALETTE_MODIFIER_COLOUR) | SPR_WAYPOINT_Y_2, 11, 0, 5, 16)
TILE_SEQ_END() TILE_SEQ_END()
}; };

View File

@ -15,54 +15,54 @@ static const DrawTileSeqStruct _unmovable_display_nothing[] = {
}; };
static const DrawTileSeqStruct _unmovable_display_datas_8[] = { static const DrawTileSeqStruct _unmovable_display_datas_8[] = {
TILE_SEQ_LINE(20, SPR_MEDIUMHQ_NORTH_WALL | (1 << PALETTE_MODIFIER_COLOR)) TILE_SEQ_LINE(20, SPR_MEDIUMHQ_NORTH_WALL | (1 << PALETTE_MODIFIER_COLOUR))
TILE_SEQ_END() TILE_SEQ_END()
}; };
static const DrawTileSeqStruct _unmovable_display_datas_9[] = { static const DrawTileSeqStruct _unmovable_display_datas_9[] = {
TILE_SEQ_LINE(20, SPR_MEDIUMHQ_EAST_WALL | (1 << PALETTE_MODIFIER_COLOR)) TILE_SEQ_LINE(20, SPR_MEDIUMHQ_EAST_WALL | (1 << PALETTE_MODIFIER_COLOUR))
TILE_SEQ_END() TILE_SEQ_END()
}; };
static const DrawTileSeqStruct _unmovable_display_datas_10[] = { static const DrawTileSeqStruct _unmovable_display_datas_10[] = {
TILE_SEQ_LINE(20, SPR_MEDIUMHQ_WEST_WALL | (1 << PALETTE_MODIFIER_COLOR)) TILE_SEQ_LINE(20, SPR_MEDIUMHQ_WEST_WALL | (1 << PALETTE_MODIFIER_COLOUR))
TILE_SEQ_END() TILE_SEQ_END()
}; };
static const DrawTileSeqStruct _unmovable_display_datas_12[] = { static const DrawTileSeqStruct _unmovable_display_datas_12[] = {
TILE_SEQ_LINE(50, SPR_LARGEHQ_NORTH_BUILD | (1 << PALETTE_MODIFIER_COLOR)) TILE_SEQ_LINE(50, SPR_LARGEHQ_NORTH_BUILD | (1 << PALETTE_MODIFIER_COLOUR))
TILE_SEQ_END() TILE_SEQ_END()
}; };
static const DrawTileSeqStruct _unmovable_display_datas_13[] = { static const DrawTileSeqStruct _unmovable_display_datas_13[] = {
TILE_SEQ_LINE(50, SPR_LARGEHQ_EAST_BUILD | (1 << PALETTE_MODIFIER_COLOR)) TILE_SEQ_LINE(50, SPR_LARGEHQ_EAST_BUILD | (1 << PALETTE_MODIFIER_COLOUR))
TILE_SEQ_END() TILE_SEQ_END()
}; };
static const DrawTileSeqStruct _unmovable_display_datas_14[] = { static const DrawTileSeqStruct _unmovable_display_datas_14[] = {
TILE_SEQ_LINE(50, SPR_LARGEHQ_WEST_BUILD | (1 << PALETTE_MODIFIER_COLOR)) TILE_SEQ_LINE(50, SPR_LARGEHQ_WEST_BUILD | (1 << PALETTE_MODIFIER_COLOUR))
TILE_SEQ_END() TILE_SEQ_END()
}; };
static const DrawTileSeqStruct _unmovable_display_datas_16[] = { static const DrawTileSeqStruct _unmovable_display_datas_16[] = {
TILE_SEQ_LINE(60, SPR_HUGEHQ_NORTH_BUILD | (1 << PALETTE_MODIFIER_COLOR)) TILE_SEQ_LINE(60, SPR_HUGEHQ_NORTH_BUILD | (1 << PALETTE_MODIFIER_COLOUR))
TILE_SEQ_END() TILE_SEQ_END()
}; };
static const DrawTileSeqStruct _unmovable_display_datas_17[] = { static const DrawTileSeqStruct _unmovable_display_datas_17[] = {
TILE_SEQ_LINE(60, SPR_HUGEHQ_EAST_BUILD | (1 << PALETTE_MODIFIER_COLOR)) TILE_SEQ_LINE(60, SPR_HUGEHQ_EAST_BUILD | (1 << PALETTE_MODIFIER_COLOUR))
TILE_SEQ_END() TILE_SEQ_END()
}; };
static const DrawTileSeqStruct _unmovable_display_datas_18[] = { static const DrawTileSeqStruct _unmovable_display_datas_18[] = {
TILE_SEQ_LINE(60, SPR_HUGEHQ_WEST_BUILD | (1 << PALETTE_MODIFIER_COLOR)) TILE_SEQ_LINE(60, SPR_HUGEHQ_WEST_BUILD | (1 << PALETTE_MODIFIER_COLOUR))
TILE_SEQ_END() TILE_SEQ_END()
}; };
#undef TILE_SEQ_LINE #undef TILE_SEQ_LINE
#undef TILE_SEQ_END #undef TILE_SEQ_END
#define TILE_SPRITE_LINE(img, dtss) { {img | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE}, dtss }, #define TILE_SPRITE_LINE(img, dtss) { {img | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE}, dtss },
static const DrawTileSprites _unmovable_display_datas[] = { static const DrawTileSprites _unmovable_display_datas[] = {
TILE_SPRITE_LINE(SPR_TINYHQ_NORTH, _unmovable_display_nothing) TILE_SPRITE_LINE(SPR_TINYHQ_NORTH, _unmovable_display_nothing)

View File

@ -17,27 +17,27 @@ struct WaterDrawTileStruct {
static const WaterDrawTileStruct _shipdepot_display_seq_1[] = { static const WaterDrawTileStruct _shipdepot_display_seq_1[] = {
BEGIN(0xFDD), BEGIN(0xFDD),
{ 0, 15, 0, 16, 1, 0x14, 0xFE8 | (1 << PALETTE_MODIFIER_COLOR) }, { 0, 15, 0, 16, 1, 0x14, 0xFE8 | (1 << PALETTE_MODIFIER_COLOUR) },
END(0) END(0)
}; };
static const WaterDrawTileStruct _shipdepot_display_seq_2[] = { static const WaterDrawTileStruct _shipdepot_display_seq_2[] = {
BEGIN(0xFDD), BEGIN(0xFDD),
{ 0, 0, 0, 16, 1, 0x14, 0xFEA }, { 0, 0, 0, 16, 1, 0x14, 0xFEA },
{ 0, 15, 0, 16, 1, 0x14, 0xFE6 | (1 << PALETTE_MODIFIER_COLOR) }, { 0, 15, 0, 16, 1, 0x14, 0xFE6 | (1 << PALETTE_MODIFIER_COLOUR) },
END(0) END(0)
}; };
static const WaterDrawTileStruct _shipdepot_display_seq_3[] = { static const WaterDrawTileStruct _shipdepot_display_seq_3[] = {
BEGIN(0xFDD), BEGIN(0xFDD),
{ 15, 0, 0, 1, 0x10, 0x14, 0xFE9 | (1 << PALETTE_MODIFIER_COLOR) }, { 15, 0, 0, 1, 0x10, 0x14, 0xFE9 | (1 << PALETTE_MODIFIER_COLOUR) },
END(0) END(0)
}; };
static const WaterDrawTileStruct _shipdepot_display_seq_4[] = { static const WaterDrawTileStruct _shipdepot_display_seq_4[] = {
BEGIN(0xFDD), BEGIN(0xFDD),
{ 0, 0, 0, 1, 16, 0x14, 0xFEB }, { 0, 0, 0, 1, 16, 0x14, 0xFEB },
{ 15, 0, 0, 1, 16, 0x14, 0xFE7 | (1 << PALETTE_MODIFIER_COLOR) }, { 15, 0, 0, 1, 16, 0x14, 0xFE7 | (1 << PALETTE_MODIFIER_COLOUR) },
END(0) END(0)
}; };

View File

@ -27,8 +27,8 @@ void UpdateTextEffect(TextEffectID effect_id, StringID msg);
void RemoveTextEffect(TextEffectID effect_id); void RemoveTextEffect(TextEffectID effect_id);
/* misc_gui.cpp */ /* misc_gui.cpp */
TextEffectID ShowFillingPercent(int x, int y, int z, uint8 percent, StringID color); TextEffectID ShowFillingPercent(int x, int y, int z, uint8 percent, StringID colour);
void UpdateFillingPercent(TextEffectID te_id, uint8 percent, StringID color); void UpdateFillingPercent(TextEffectID te_id, uint8 percent, StringID colour);
void HideFillingPercent(TextEffectID *te_id); void HideFillingPercent(TextEffectID *te_id);
#endif /* TEXTEFF_HPP */ #endif /* TEXTEFF_HPP */

View File

@ -272,8 +272,8 @@ void TrainConsistChanged(Vehicle *v, bool same_length)
/* Cache wagon override sprite group. NULL is returned if there is none */ /* Cache wagon override sprite group. NULL is returned if there is none */
u->u.rail.cached_override = GetWagonOverrideSpriteSet(u->engine_type, u->cargo_type, u->u.rail.first_engine); u->u.rail.cached_override = GetWagonOverrideSpriteSet(u->engine_type, u->cargo_type, u->u.rail.first_engine);
/* Reset color map */ /* Reset colour map */
u->colormap = PAL_NONE; u->colourmap = PAL_NONE;
if (rvi_u->visual_effect != 0) { if (rvi_u->visual_effect != 0) {
u->u.rail.cached_vis_effect = rvi_u->visual_effect; u->u.rail.cached_vis_effect = rvi_u->visual_effect;

View File

@ -202,14 +202,14 @@ static void DrawTile_Unmovable(TileInfo *ti)
if (IsInvisibilitySet(TO_STRUCTURES)) break; if (IsInvisibilitySet(TO_STRUCTURES)) break;
AddSortableSpriteToDraw(SPR_STATUE_COMPANY, COMPANY_SPRITE_COLOR(GetTileOwner(ti->tile)), ti->x, ti->y, 16, 16, 25, ti->z, IsTransparencySet(TO_STRUCTURES)); AddSortableSpriteToDraw(SPR_STATUE_COMPANY, COMPANY_SPRITE_COLOUR(GetTileOwner(ti->tile)), ti->x, ti->y, 16, 16, 25, ti->z, IsTransparencySet(TO_STRUCTURES));
break; break;
case UNMOVABLE_OWNED_LAND: case UNMOVABLE_OWNED_LAND:
DrawClearLandTile(ti, 0); DrawClearLandTile(ti, 0);
AddSortableSpriteToDraw( AddSortableSpriteToDraw(
SPR_BOUGHT_LAND, COMPANY_SPRITE_COLOR(GetTileOwner(ti->tile)), SPR_BOUGHT_LAND, COMPANY_SPRITE_COLOUR(GetTileOwner(ti->tile)),
ti->x + TILE_SIZE / 2, ti->y + TILE_SIZE / 2, 1, 1, BB_HEIGHT_UNDER_BRIDGE, GetSlopeZ(ti->x + TILE_SIZE / 2, ti->y + TILE_SIZE / 2) ti->x + TILE_SIZE / 2, ti->y + TILE_SIZE / 2, 1, 1, BB_HEIGHT_UNDER_BRIDGE, GetSlopeZ(ti->x + TILE_SIZE / 2, ti->y + TILE_SIZE / 2)
); );
DrawBridgeMiddle(ti); DrawBridgeMiddle(ti);
@ -219,7 +219,7 @@ static void DrawTile_Unmovable(TileInfo *ti)
assert(IsCompanyHQ(ti->tile)); assert(IsCompanyHQ(ti->tile));
if (ti->tileh != SLOPE_FLAT) DrawFoundation(ti, FOUNDATION_LEVELED); if (ti->tileh != SLOPE_FLAT) DrawFoundation(ti, FOUNDATION_LEVELED);
SpriteID palette = COMPANY_SPRITE_COLOR(GetTileOwner(ti->tile)); SpriteID palette = COMPANY_SPRITE_COLOUR(GetTileOwner(ti->tile));
const DrawTileSprites *t = &_unmovable_display_datas[GetCompanyHQSize(ti->tile) << 2 | GetCompanyHQSection(ti->tile)]; const DrawTileSprites *t = &_unmovable_display_datas[GetCompanyHQSize(ti->tile) << 2 | GetCompanyHQSection(ti->tile)];
DrawGroundSprite(t->ground.sprite, palette); DrawGroundSprite(t->ground.sprite, palette);

View File

@ -211,7 +211,7 @@ Vehicle::Vehicle()
this->group_id = DEFAULT_GROUP; this->group_id = DEFAULT_GROUP;
this->fill_percent_te_id = INVALID_TE_ID; this->fill_percent_te_id = INVALID_TE_ID;
this->first = this; this->first = this;
this->colormap = PAL_NONE; this->colourmap = PAL_NONE;
} }
/** /**
@ -480,10 +480,10 @@ void ResetVehiclePosHash()
memset(_new_vehicle_position_hash, 0, sizeof(_new_vehicle_position_hash)); memset(_new_vehicle_position_hash, 0, sizeof(_new_vehicle_position_hash));
} }
void ResetVehicleColorMap() void ResetVehicleColourMap()
{ {
Vehicle *v; Vehicle *v;
FOR_ALL_VEHICLES(v) { v->colormap = PAL_NONE; } FOR_ALL_VEHICLES(v) { v->colourmap = PAL_NONE; }
} }
/** /**
@ -870,7 +870,7 @@ void CheckVehicle32Day(Vehicle *v)
uint16 callback = GetVehicleCallback(CBID_VEHICLE_32DAY_CALLBACK, 0, 0, v->engine_type, v); uint16 callback = GetVehicleCallback(CBID_VEHICLE_32DAY_CALLBACK, 0, 0, v->engine_type, v);
if (callback == CALLBACK_FAILED) return; if (callback == CALLBACK_FAILED) return;
if (HasBit(callback, 0)) TriggerVehicle(v, VEHICLE_TRIGGER_CALLBACK_32); // Trigger vehicle trigger 10 if (HasBit(callback, 0)) TriggerVehicle(v, VEHICLE_TRIGGER_CALLBACK_32); // Trigger vehicle trigger 10
if (HasBit(callback, 1)) v->colormap = PAL_NONE; // Update colormap via callback 2D if (HasBit(callback, 1)) v->colourmap = PAL_NONE; // Update colourmap via callback 2D
} }
void DecreaseVehicleValue(Vehicle *v) void DecreaseVehicleValue(Vehicle *v)
@ -1372,10 +1372,10 @@ CommandCost SendAllVehiclesToDepot(VehicleType type, uint32 flags, bool service,
/** /**
* Calculates how full a vehicle is. * Calculates how full a vehicle is.
* @param v The Vehicle to check. For trains, use the first engine. * @param v The Vehicle to check. For trains, use the first engine.
* @param color The string to show depending on if we are unloading or loading * @param colour The string to show depending on if we are unloading or loading
* @return A percentage of how full the Vehicle is. * @return A percentage of how full the Vehicle is.
*/ */
uint8 CalcPercentVehicleFilled(const Vehicle *v, StringID *color) uint8 CalcPercentVehicleFilled(const Vehicle *v, StringID *colour)
{ {
int count = 0; int count = 0;
int max = 0; int max = 0;
@ -1390,20 +1390,20 @@ uint8 CalcPercentVehicleFilled(const Vehicle *v, StringID *color)
for (; v != NULL; v = v->Next()) { for (; v != NULL; v = v->Next()) {
count += v->cargo.Count(); count += v->cargo.Count();
max += v->cargo_cap; max += v->cargo_cap;
if (v->cargo_cap != 0 && color != NULL) { if (v->cargo_cap != 0 && colour != NULL) {
unloading += HasBit(v->vehicle_flags, VF_CARGO_UNLOADING) ? 1 : 0; unloading += HasBit(v->vehicle_flags, VF_CARGO_UNLOADING) ? 1 : 0;
loading |= !(u->current_order.GetUnloadType() & OUFB_UNLOAD) && st->goods[v->cargo_type].days_since_pickup != 255; loading |= !(u->current_order.GetUnloadType() & OUFB_UNLOAD) && st->goods[v->cargo_type].days_since_pickup != 255;
cars++; cars++;
} }
} }
if (color != NULL) { if (colour != NULL) {
if (unloading == 0 && loading) { if (unloading == 0 && loading) {
*color = STR_PERCENT_UP; *colour = STR_PERCENT_UP;
} else if (cars == unloading || !loading) { } else if (cars == unloading || !loading) {
*color = STR_PERCENT_DOWN; *colour = STR_PERCENT_DOWN;
} else { } else {
*color = STR_PERCENT_UP_DOWN; *colour = STR_PERCENT_UP_DOWN;
} }
} }
@ -1908,7 +1908,7 @@ const Livery *GetEngineLivery(EngineID engine_type, CompanyID company, EngineID
static SpriteID GetEngineColourMap(EngineID engine_type, CompanyID company, EngineID parent_engine_type, const Vehicle *v) static SpriteID GetEngineColourMap(EngineID engine_type, CompanyID company, EngineID parent_engine_type, const Vehicle *v)
{ {
SpriteID map = (v != NULL) ? v->colormap : PAL_NONE; SpriteID map = (v != NULL) ? v->colourmap : PAL_NONE;
/* Return cached value if any */ /* Return cached value if any */
if (map != PAL_NONE) return map; if (map != PAL_NONE) return map;
@ -1916,7 +1916,7 @@ static SpriteID GetEngineColourMap(EngineID engine_type, CompanyID company, Engi
/* Check if we should use the colour map callback */ /* Check if we should use the colour map callback */
if (HasBit(EngInfo(engine_type)->callbackmask, CBM_VEHICLE_COLOUR_REMAP)) { if (HasBit(EngInfo(engine_type)->callbackmask, CBM_VEHICLE_COLOUR_REMAP)) {
uint16 callback = GetVehicleCallback(CBID_VEHICLE_COLOUR_MAPPING, 0, 0, engine_type, v); uint16 callback = GetVehicleCallback(CBID_VEHICLE_COLOUR_MAPPING, 0, 0, engine_type, v);
/* A return value of 0xC000 is stated to "use the default two-color /* A return value of 0xC000 is stated to "use the default two-colour
* maps" which happens to be the failure action too... */ * maps" which happens to be the failure action too... */
if (callback != CALLBACK_FAILED && callback != 0xC000) { if (callback != CALLBACK_FAILED && callback != 0xC000) {
map = GB(callback, 0, 14); map = GB(callback, 0, 14);
@ -1924,7 +1924,7 @@ static SpriteID GetEngineColourMap(EngineID engine_type, CompanyID company, Engi
* map else it's returned as-is. */ * map else it's returned as-is. */
if (!HasBit(callback, 14)) { if (!HasBit(callback, 14)) {
/* Update cache */ /* Update cache */
if (v != NULL) ((Vehicle*)v)->colormap = map; if (v != NULL) ((Vehicle*)v)->colourmap = map;
return map; return map;
} }
} }
@ -1932,7 +1932,7 @@ static SpriteID GetEngineColourMap(EngineID engine_type, CompanyID company, Engi
bool twocc = HasBit(EngInfo(engine_type)->misc_flags, EF_USES_2CC); bool twocc = HasBit(EngInfo(engine_type)->misc_flags, EF_USES_2CC);
if (map == PAL_NONE) map = twocc ? (SpriteID)SPR_2CCMAP_BASE : (SpriteID)PALETTE_RECOLOR_START; if (map == PAL_NONE) map = twocc ? (SpriteID)SPR_2CCMAP_BASE : (SpriteID)PALETTE_RECOLOUR_START;
const Livery *livery = GetEngineLivery(engine_type, company, parent_engine_type, v); const Livery *livery = GetEngineLivery(engine_type, company, parent_engine_type, v);
@ -1940,7 +1940,7 @@ static SpriteID GetEngineColourMap(EngineID engine_type, CompanyID company, Engi
if (twocc) map += livery->colour2 * 16; if (twocc) map += livery->colour2 * 16;
/* Update cache */ /* Update cache */
if (v != NULL) ((Vehicle*)v)->colormap = map; if (v != NULL) ((Vehicle*)v)->colourmap = map;
return map; return map;
} }

View File

@ -239,7 +239,7 @@ public:
Vehicle *next_new_hash; Vehicle *next_new_hash;
Vehicle **old_new_hash; Vehicle **old_new_hash;
SpriteID colormap; // NOSAVE: cached color mapping SpriteID colourmap; // NOSAVE: cached colour mapping
/* Related to age and service time */ /* Related to age and service time */
Year build_year; Year build_year;

View File

@ -32,12 +32,12 @@ void FindVehicleOnPosXY(int x, int y, void *data, VehicleFromPosProc *proc);
bool HasVehicleOnPos(TileIndex tile, void *data, VehicleFromPosProc *proc); bool HasVehicleOnPos(TileIndex tile, void *data, VehicleFromPosProc *proc);
bool HasVehicleOnPosXY(int x, int y, void *data, VehicleFromPosProc *proc); bool HasVehicleOnPosXY(int x, int y, void *data, VehicleFromPosProc *proc);
void CallVehicleTicks(); void CallVehicleTicks();
uint8 CalcPercentVehicleFilled(const Vehicle *v, StringID *color); uint8 CalcPercentVehicleFilled(const Vehicle *v, StringID *colour);
void InitializeTrains(); void InitializeTrains();
byte VehicleRandomBits(); byte VehicleRandomBits();
void ResetVehiclePosHash(); void ResetVehiclePosHash();
void ResetVehicleColorMap(); void ResetVehicleColourMap();
bool CanRefitTo(EngineID engine_type, CargoID cid_to); bool CanRefitTo(EngineID engine_type, CargoID cid_to);
CargoID FindFirstRefittableCargo(EngineID engine_type); CargoID FindFirstRefittableCargo(EngineID engine_type);

View File

@ -112,7 +112,7 @@ void DrawVehicleProfitButton(const Vehicle *v, int x, int y)
{ {
SpriteID pal; SpriteID pal;
/* draw profit-based colored icons */ /* draw profit-based coloured icons */
if (v->age <= DAYS_IN_YEAR * 2) { if (v->age <= DAYS_IN_YEAR * 2) {
pal = PALETTE_TO_GREY; pal = PALETTE_TO_GREY;
} else if (v->GetDisplayProfitLastYear() < 0) { } else if (v->GetDisplayProfitLastYear() < 0) {

View File

@ -48,8 +48,8 @@ Point _tile_fract_coords;
ZoomLevel _saved_scrollpos_zoom; ZoomLevel _saved_scrollpos_zoom;
struct StringSpriteToDraw { struct StringSpriteToDraw {
uint16 string; StringID string;
uint16 color; uint16 colour;
int32 x; int32 x;
int32 y; int32 y;
uint64 params[2]; uint64 params[2];
@ -733,7 +733,7 @@ void AddChildSpriteScreen(SpriteID image, SpriteID pal, int x, int y, bool trans
} }
/* Returns a StringSpriteToDraw */ /* Returns a StringSpriteToDraw */
void AddStringToDraw(int x, int y, StringID string, uint64 params_1, uint64 params_2, uint16 color, uint16 width) void AddStringToDraw(int x, int y, StringID string, uint64 params_1, uint64 params_2, uint16 colour, uint16 width)
{ {
StringSpriteToDraw *ss = _vd.string_sprites_to_draw.Append(); StringSpriteToDraw *ss = _vd.string_sprites_to_draw.Append();
ss->string = string; ss->string = string;
@ -742,7 +742,7 @@ void AddStringToDraw(int x, int y, StringID string, uint64 params_1, uint64 para
ss->params[0] = params_1; ss->params[0] = params_1;
ss->params[1] = params_2; ss->params[1] = params_2;
ss->width = width; ss->width = width;
ss->color = color; ss->colour = colour;
} }
@ -1440,7 +1440,7 @@ static void ViewportDrawStrings(DrawPixelInfo *dpi, const StringSpriteToDrawVect
* or if we are drawing a general text sign (STR_2806) */ * or if we are drawing a general text sign (STR_2806) */
if (!IsTransparencySet(TO_SIGNS) || ss->string == STR_2806) { if (!IsTransparencySet(TO_SIGNS) || ss->string == STR_2806) {
DrawFrameRect( DrawFrameRect(
x, y, x + w, bottom, ss->color, x, y, x + w, bottom, (Colours)ss->colour,
IsTransparencySet(TO_SIGNS) ? FR_TRANSPARENT : FR_NONE IsTransparencySet(TO_SIGNS) ? FR_TRANSPARENT : FR_NONE
); );
} }
@ -1449,11 +1449,11 @@ static void ViewportDrawStrings(DrawPixelInfo *dpi, const StringSpriteToDrawVect
SetDParam(0, ss->params[0]); SetDParam(0, ss->params[0]);
SetDParam(1, ss->params[1]); SetDParam(1, ss->params[1]);
/* if we didn't draw a rectangle, or if transparant building is on, /* if we didn't draw a rectangle, or if transparant building is on,
* draw the text in the color the rectangle would have */ * draw the text in the colour the rectangle would have */
if (IsTransparencySet(TO_SIGNS) && ss->string != STR_2806 && ss->width != 0) { if (IsTransparencySet(TO_SIGNS) && ss->string != STR_2806 && ss->width != 0) {
/* Real colors need the IS_PALETTE_COLOR flag /* Real colours need the IS_PALETTE_COLOUR flag
* otherwise colors from _string_colormap are assumed. */ * otherwise colours from _string_colourmap are assumed. */
colour = (TextColour)_colour_gradient[ss->color][6] | IS_PALETTE_COLOR; colour = (TextColour)_colour_gradient[ss->colour][6] | IS_PALETTE_COLOUR;
} else { } else {
colour = TC_BLACK; colour = TC_BLACK;
} }

View File

@ -36,7 +36,7 @@ void OffsetGroundSprite(int x, int y);
void DrawGroundSprite(SpriteID image, SpriteID pal, const SubSprite *sub = NULL); void DrawGroundSprite(SpriteID image, SpriteID pal, const SubSprite *sub = NULL);
void DrawGroundSpriteAt(SpriteID image, SpriteID pal, int32 x, int32 y, byte z, const SubSprite *sub = NULL); void DrawGroundSpriteAt(SpriteID image, SpriteID pal, int32 x, int32 y, byte z, const SubSprite *sub = NULL);
void AddSortableSpriteToDraw(SpriteID image, SpriteID pal, int x, int y, int w, int h, int dz, int z, bool transparent = false, int bb_offset_x = 0, int bb_offset_y = 0, int bb_offset_z = 0, const SubSprite *sub = NULL); void AddSortableSpriteToDraw(SpriteID image, SpriteID pal, int x, int y, int w, int h, int dz, int z, bool transparent = false, int bb_offset_x = 0, int bb_offset_y = 0, int bb_offset_z = 0, const SubSprite *sub = NULL);
void AddStringToDraw(int x, int y, StringID string, uint64 params_1, uint64 params_2, uint16 color = 0, uint16 width = 0); void AddStringToDraw(int x, int y, StringID string, uint64 params_1, uint64 params_2, uint16 colour = 0, uint16 width = 0);
void AddChildSpriteScreen(SpriteID image, SpriteID pal, int x, int y, bool transparent = false, const SubSprite *sub = NULL); void AddChildSpriteScreen(SpriteID image, SpriteID pal, int x, int y, bool transparent = false, const SubSprite *sub = NULL);

View File

@ -650,7 +650,7 @@ static void DrawTile_Water(TileInfo *ti)
case WATER_TILE_DEPOT: case WATER_TILE_DEPOT:
DrawWaterClassGround(ti); DrawWaterClassGround(ti);
DrawWaterStuff(ti, _shipdepot_display_seq[GetSection(ti->tile)], COMPANY_SPRITE_COLOR(GetTileOwner(ti->tile)), 0, false); DrawWaterStuff(ti, _shipdepot_display_seq[GetSection(ti->tile)], COMPANY_SPRITE_COLOUR(GetTileOwner(ti->tile)), 0, false);
break; break;
} }
} }
@ -663,7 +663,7 @@ void DrawShipDepotSprite(int x, int y, int image)
for (; wdts->delta_x != 0x80; wdts++) { for (; wdts->delta_x != 0x80; wdts++) {
Point pt = RemapCoords(wdts->delta_x, wdts->delta_y, wdts->delta_z); Point pt = RemapCoords(wdts->delta_x, wdts->delta_y, wdts->delta_z);
DrawSprite(wdts->image, COMPANY_SPRITE_COLOR(_local_company), x + pt.x, y + pt.y); DrawSprite(wdts->image, COMPANY_SPRITE_COLOUR(_local_company), x + pt.x, y + pt.y);
} }
} }

View File

@ -166,7 +166,7 @@ int GetWidgetFromPos(const Window *w, int x, int y)
* @param colour Colour table to use. @see _colour_gradient * @param colour Colour table to use. @see _colour_gradient
* @param flags Flags controlling how to draw the frame. @see FrameFlags * @param flags Flags controlling how to draw the frame. @see FrameFlags
*/ */
void DrawFrameRect(int left, int top, int right, int bottom, int colour, FrameFlags flags) void DrawFrameRect(int left, int top, int right, int bottom, Colours colour, FrameFlags flags)
{ {
uint dark = _colour_gradient[colour][3]; uint dark = _colour_gradient[colour][3];
uint medium_dark = _colour_gradient[colour][5]; uint medium_dark = _colour_gradient[colour][5];
@ -174,7 +174,7 @@ void DrawFrameRect(int left, int top, int right, int bottom, int colour, FrameFl
uint light = _colour_gradient[colour][7]; uint light = _colour_gradient[colour][7];
if (flags & FR_TRANSPARENT) { if (flags & FR_TRANSPARENT) {
GfxFillRect(left, top, right, bottom, PALETTE_TO_TRANSPARENT, FILLRECT_RECOLOR); GfxFillRect(left, top, right, bottom, PALETTE_TO_TRANSPARENT, FILLRECT_RECOLOUR);
} else { } else {
uint interior; uint interior;

View File

@ -630,7 +630,7 @@ void ChangeWindowOwner(Owner old_owner, Owner new_owner)
if (w->owner != old_owner) continue; if (w->owner != old_owner) continue;
switch (w->window_class) { switch (w->window_class) {
case WC_COMPANY_COLOR: case WC_COMPANY_COLOUR:
case WC_FINANCES: case WC_FINANCES:
case WC_STATION_LIST: case WC_STATION_LIST:
case WC_TRAINS_LIST: case WC_TRAINS_LIST:

View File

@ -19,7 +19,7 @@ int PositionMainToolbar(Window *w);
void InitWindowSystem(); void InitWindowSystem();
void UnInitWindowSystem(); void UnInitWindowSystem();
void ResetWindowSystem(); void ResetWindowSystem();
void SetupColorsAndInitialWindow(); void SetupColoursAndInitialWindow();
void InputLoop(); void InputLoop();
void InvalidateThisWindowData(Window *w, int data = 0); void InvalidateThisWindowData(Window *w, int data = 0);

Some files were not shown because too many files have changed in this diff Show More