Changeset - r11085:c87a330fb4c2
[Not reviewed]
master
0 102 0
rubidium - 16 years ago 2009-02-09 02:57:15
rubidium@openttd.org
(svn r15428) -Codechange: consistently use colour instead of having both color and colour.
102 files changed with 862 insertions and 862 deletions:
0 comments (0 inline, 0 general)
src/ai/ai_gui.cpp
Show inline comments
 
@@ -255,13 +255,13 @@ struct AISettingsWindow : public Window 
 
		int y = this->widget[AIS_WIDGET_BACKGROUND].top;
 
		for (; i < this->vscroll.pos + this->vscroll.cap && it != config->GetConfigList()->end(); i++, it++) {
 
			int current_value = config->GetSetting((*it).name);
 

	
 
			int x = 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 {
 
				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()) {
 
					x = DoDrawStringTruncated(it->labels->Find(current_value)->second, 28, y + 3, TC_ORANGE, this->width - 32);
 
				} else {
 
					SetDParam(0, current_value);
src/aircraft_cmd.cpp
Show inline comments
 
@@ -581,13 +581,13 @@ CommandCost CmdRefitAircraft(TileIndex t
 
		uint mail = IsCargoInClass(new_cid, CC_PASSENGERS) ? avi->mail_capacity : 0;
 
		u->cargo_cap = mail;
 
		v->cargo.Truncate(v->cargo_type == new_cid ? pass : 0);
 
		u->cargo.Truncate(v->cargo_type == new_cid ? mail : 0);
 
		v->cargo_type = new_cid;
 
		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_DEPOT, v->tile);
 
		InvalidateWindowClassesData(WC_AIRCRAFT_LIST, 0);
 
	}
 

	
 
	return cost;
src/blitter/32bpp_anim.cpp
Show inline comments
 
@@ -126,17 +126,17 @@ inline void Blitter_32bppAnim::Draw(cons
 
							src_n++;
 
						} while (--n != 0);
 
					}
 
					break;
 

	
 
				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:
 
					 *  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;
 
					if (src_px->a == 255) {
 
						src_px += n;
 
						do {
 
							*dst = MakeTransparent(*dst, 3, 4);
 
							*anim = remap[*anim];
 
@@ -209,17 +209,17 @@ void Blitter_32bppAnim::Draw(Blitter::Bl
 
		case BM_NORMAL:       Draw<BM_NORMAL>      (bp, zoom); return;
 
		case BM_COLOUR_REMAP: Draw<BM_COLOUR_REMAP>(bp, zoom); return;
 
		case BM_TRANSPARENT:  Draw<BM_TRANSPARENT> (bp, zoom); return;
 
	}
 
}
 

	
 
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) {
 
		/* This means our output is not to the screen, so we can't be doing any animation stuff, so use our parent DrawColorMappingRect() */
 
		Blitter_32bppOptimized::DrawColorMappingRect(dst, width, height, pal);
 
		/* 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::DrawColourMappingRect(dst, width, height, pal);
 
		return;
 
	}
 

	
 
	uint32 *udst = (uint32 *)dst;
 
	uint8 *anim;
 

	
 
@@ -249,56 +249,56 @@ void Blitter_32bppAnim::DrawColorMapping
 
			udst = udst - width + _screen.pitch;
 
			anim = anim - width + this->anim_buf_width;
 
		} while (--height);
 
		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;
 
	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;
 
	if (*dst == 0) {
 
		*dst = LookupColourInPalette(color);
 
		/* Set the color in the anim-buffer too, if we are rendering to the screen */
 
		*dst = LookupColourInPalette(colour);
 
		/* Set the colour in the anim-buffer too, if we are rendering to the screen */
 
		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) {
 
		/* 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;
 
	}
 

	
 
	uint32 color32 = LookupColourInPalette(color);
 
	uint32 colour32 = LookupColourInPalette(colour);
 
	uint8 *anim_line;
 

	
 
	anim_line = ((uint32 *)video - (uint32 *)_screen.dst_ptr) + this->anim_buf;
 

	
 
	do {
 
		uint32 *dst = (uint32 *)video;
 
		uint8 *anim = anim_line;
 

	
 
		for (int i = width; i > 0; i--) {
 
			*dst = color32;
 
			/* Set the color in the anim-buffer too */
 
			*anim = color;
 
			*dst = colour32;
 
			/* Set the colour in the anim-buffer too */
 
			*anim = colour;
 
			dst++;
 
			anim++;
 
		}
 
		video = (uint32 *)video + _screen.pitch;
 
		anim_line += this->anim_buf_width;
 
	} while (--height);
src/blitter/32bpp_anim.hpp
Show inline comments
 
@@ -19,16 +19,16 @@ public:
 
		anim_buf(NULL),
 
		anim_buf_width(0),
 
		anim_buf_height(0)
 
	{}
 

	
 
	/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
 
	/* virtual */ void DrawColorMappingRect(void *dst, int width, int height, int pal);
 
	/* virtual */ void SetPixel(void *video, int x, int y, uint8 color);
 
	/* virtual */ void SetPixelIfEmpty(void *video, int x, int y, uint8 color);
 
	/* virtual */ void DrawRect(void *video, int width, int height, uint8 color);
 
	/* virtual */ void DrawColourMappingRect(void *dst, int width, int height, int pal);
 
	/* virtual */ void SetPixel(void *video, int x, int y, uint8 colour);
 
	/* virtual */ void SetPixelIfEmpty(void *video, int x, int y, uint8 colour);
 
	/* 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 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 */ int BufferSize(int width, int height);
 
	/* virtual */ void PaletteAnimate(uint start, uint count);
 
	/* virtual */ Blitter::PaletteAnimation UsePaletteAnimation();
src/blitter/32bpp_base.cpp
Show inline comments
 
@@ -8,38 +8,38 @@
 

	
 
void *Blitter_32bppBase::MoveTo(const void *video, int x, int y)
 
{
 
	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;
 
	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 {
 
		uint32 *dst = (uint32 *)video;
 
		for (int i = width; i > 0; i--) {
 
			*dst = color32;
 
			*dst = colour32;
 
			dst++;
 
		}
 
		video = (uint32 *)video + _screen.pitch;
 
	} 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 dx;
 
	int stepx;
 
	int stepy;
 
	int frac;
 
@@ -57,34 +57,34 @@ void Blitter_32bppBase::DrawLine(void *v
 
		dx = -dx;
 
		stepx = -1;
 
	} else {
 
		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) {
 
		frac = dy - (dx / 2);
 
		while (x != x2) {
 
			if (frac >= 0) {
 
				y += stepy;
 
				frac -= dx;
 
			}
 
			x += stepx;
 
			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 {
 
		frac = dx - (dy / 2);
 
		while (y != y2) {
 
			if (frac >= 0) {
 
				x += stepx;
 
				frac -= dy;
 
			}
 
			y += stepy;
 
			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);
 
		}
 
	}
 
}
 

	
 
void Blitter_32bppBase::CopyFromBuffer(void *video, const void *src, int width, int height)
 
{
src/blitter/32bpp_base.hpp
Show inline comments
 
@@ -9,19 +9,19 @@
 
#include "../core/bitmath_func.hpp"
 

	
 
class Blitter_32bppBase : public Blitter {
 
public:
 
	/* virtual */ uint8 GetScreenDepth() { return 32; }
 
//	/* 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 */ void *MoveTo(const void *video, int x, int y);
 
	/* virtual */ void SetPixel(void *video, int x, int y, uint8 color);
 
	/* virtual */ void SetPixelIfEmpty(void *video, int x, int y, uint8 color);
 
	/* virtual */ void DrawRect(void *video, int width, int height, uint8 color);
 
	/* virtual */ void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 color);
 
	/* virtual */ void SetPixel(void *video, int x, int y, uint8 colour);
 
	/* virtual */ void SetPixelIfEmpty(void *video, int x, int y, uint8 colour);
 
	/* 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 colour);
 
	/* 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 CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch);
 
	/* virtual */ void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y);
 
	/* virtual */ int BufferSize(int width, int height);
 
	/* virtual */ void PaletteAnimate(uint start, uint count);
src/blitter/32bpp_optimized.cpp
Show inline comments
 
@@ -133,17 +133,17 @@ inline void Blitter_32bppOptimized::Draw
 
							src_n++;
 
						} while (--n != 0);
 
					}
 
					break;
 

	
 
				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:
 
					 *  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;
 
					if (src_px->a == 255) {
 
						src_px += n;
 
						do {
 
							*dst = MakeTransparent(*dst, 3, 4);
 
							dst++;
src/blitter/32bpp_simple.cpp
Show inline comments
 
@@ -36,17 +36,17 @@ void Blitter_32bppSimple::Draw(Blitter::
 
					} else {
 
						if (bp->remap[src->m] != 0) *dst = ComposeColourPA(this->LookupColourInPalette(bp->remap[src->m]), src->a, *dst);
 
					}
 
					break;
 

	
 
				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:
 
					 *  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);
 
					break;
 

	
 
				default:
 
					if (src->a != 0) *dst = ComposeColourRGBA(src->r, src->g, src->b, src->a, *dst);
 
					break;
 
@@ -54,13 +54,13 @@ void Blitter_32bppSimple::Draw(Blitter::
 
			dst++;
 
			src += ScaleByZoom(1, zoom);
 
		}
 
	}
 
}
 

	
 
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;
 

	
 
	if (pal == PALETTE_TO_TRANSPARENT) {
 
		do {
 
			for (int i = 0; i != width; i++) {
 
@@ -79,13 +79,13 @@ void Blitter_32bppSimple::DrawColorMappi
 
			}
 
			udst = udst - width + _screen.pitch;
 
		} while (--height);
 
		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 *dest_sprite;
 
	SpriteLoader::CommonPixel *dst;
 
@@ -99,15 +99,15 @@ Sprite *Blitter_32bppSimple::Encode(Spri
 
	dst = (SpriteLoader::CommonPixel *)dest_sprite->data;
 

	
 
	memcpy(dst, sprite->data, sprite->height * sprite->width * sizeof(SpriteLoader::CommonPixel));
 
	for (int i = 0; i < sprite->height * sprite->width; i++) {
 
		if (dst[i].m != 0) {
 
			/* Pre-convert the mapping channel to a RGB value */
 
			uint color = this->LookupColourInPalette(dst[i].m);
 
			dst[i].r = GB(color, 16, 8);
 
			dst[i].g = GB(color, 8,  8);
 
			dst[i].b = GB(color, 0,  8);
 
			uint colour = this->LookupColourInPalette(dst[i].m);
 
			dst[i].r = GB(colour, 16, 8);
 
			dst[i].g = GB(colour, 8,  8);
 
			dst[i].b = GB(colour, 0,  8);
 
		}
 
	}
 

	
 
	return dest_sprite;
 
}
src/blitter/32bpp_simple.hpp
Show inline comments
 
@@ -8,13 +8,13 @@
 
#include "32bpp_base.hpp"
 
#include "factory.hpp"
 

	
 
class Blitter_32bppSimple : public Blitter_32bppBase {
 
public:
 
	/* 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 */ const char *GetName() { return "32bpp-simple"; }
 
};
 

	
 
class FBlitter_32bppSimple: public BlitterFactory<FBlitter_32bppSimple> {
src/blitter/8bpp_base.cpp
Show inline comments
 
@@ -3,13 +3,13 @@
 
/** @file 8bpp_base.cpp Implementation of the base for all 8 bpp blitters. */
 

	
 
#include "../stdafx.h"
 
#include "../gfx_func.h"
 
#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;
 

	
 
	do {
 
		for (int i = 0; i != width; i++) *((uint8 *)dst + i) = ctab[((uint8 *)dst)[i]];
 
		dst = (uint8 *)dst + _screen.pitch;
 
@@ -18,32 +18,32 @@ void Blitter_8bppBase::DrawColorMappingR
 

	
 
void *Blitter_8bppBase::MoveTo(const void *video, int x, int y)
 
{
 
	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;
 
	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 {
 
		memset(video, color, width);
 
		memset(video, colour, width);
 
		video = (uint8 *)video + _screen.pitch;
 
	} 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 dx;
 
	int stepx;
 
	int stepy;
 
	int frac;
 
@@ -61,34 +61,34 @@ void Blitter_8bppBase::DrawLine(void *vi
 
		dx = -dx;
 
		stepx = -1;
 
	} else {
 
		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) {
 
		frac = dy - (dx / 2);
 
		while (x != x2) {
 
			if (frac >= 0) {
 
				y += stepy;
 
				frac -= dx;
 
			}
 
			x += stepx;
 
			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 {
 
		frac = dx - (dy / 2);
 
		while (y != y2) {
 
			if (frac >= 0) {
 
				x += stepx;
 
				frac -= dy;
 
			}
 
			y += stepy;
 
			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);
 
		}
 
	}
 
}
 

	
 
void Blitter_8bppBase::CopyFromBuffer(void *video, const void *src, int width, int height)
 
{
src/blitter/8bpp_base.hpp
Show inline comments
 
@@ -8,19 +8,19 @@
 
#include "base.hpp"
 

	
 
class Blitter_8bppBase : public Blitter {
 
public:
 
	/* virtual */ uint8 GetScreenDepth() { return 8; }
 
//	/* 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 */ void *MoveTo(const void *video, int x, int y);
 
	/* virtual */ void SetPixel(void *video, int x, int y, uint8 color);
 
	/* virtual */ void SetPixelIfEmpty(void *video, int x, int y, uint8 color);
 
	/* virtual */ void DrawRect(void *video, int width, int height, uint8 color);
 
	/* virtual */ void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 color);
 
	/* virtual */ void SetPixel(void *video, int x, int y, uint8 colour);
 
	/* virtual */ void SetPixelIfEmpty(void *video, int x, int y, uint8 colour);
 
	/* 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 colour);
 
	/* 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 CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch);
 
	/* virtual */ void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y);
 
	/* virtual */ int BufferSize(int width, int height);
 
	/* virtual */ void PaletteAnimate(uint start, uint count);
src/blitter/8bpp_debug.cpp
Show inline comments
 
@@ -41,14 +41,14 @@ Sprite *Blitter_8bppDebug::Encode(Sprite
 

	
 
	dest_sprite->height = sprite->height;
 
	dest_sprite->width  = sprite->width;
 
	dest_sprite->x_offs = sprite->x_offs;
 
	dest_sprite->y_offs = sprite->y_offs;
 

	
 
	/* Write a random color as sprite; this makes debugging really easy */
 
	uint color = InteractiveRandom() % 150 + 2;
 
	/* Write a random colour as sprite; this makes debugging really easy */
 
	uint colour = InteractiveRandom() % 150 + 2;
 
	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;
 
}
src/blitter/8bpp_optimized.cpp
Show inline comments
 
@@ -137,13 +137,13 @@ Sprite *Blitter_8bppOptimized::Encode(Sp
 
			const SpriteLoader::CommonPixel *src = &sprite->data[ScaleByZoom(y, i) * sprite->width];
 
			const SpriteLoader::CommonPixel *src_end = &src[sprite->width];
 

	
 
			for (int x = 0; x < scaled_width; x++) {
 
				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++) {
 
					if (src->m != 0) colour = src->m;
 
					/* Because of the scaling it might happen we read outside the buffer. Avoid that. */
 
					if (++src == src_end) break;
 
				}
 

	
src/blitter/8bpp_simple.cpp
Show inline comments
 
@@ -22,28 +22,28 @@ void Blitter_8bppSimple::Draw(Blitter::B
 
		dst_line += bp->pitch;
 

	
 
		src = src_line;
 
		src_line += bp->sprite_width * ScaleByZoom(1, zoom);
 

	
 
		for (int x = 0; x < bp->width; x++) {
 
			uint color = 0;
 
			uint colour = 0;
 

	
 
			switch (mode) {
 
				case BM_COLOUR_REMAP:
 
					color = bp->remap[*src];
 
					colour = bp->remap[*src];
 
					break;
 

	
 
				case BM_TRANSPARENT:
 
					if (*src != 0) color = bp->remap[*dst];
 
					if (*src != 0) colour = bp->remap[*dst];
 
					break;
 

	
 
				default:
 
					color = *src;
 
					colour = *src;
 
					break;
 
			}
 
			if (color != 0) *dst = color;
 
			if (colour != 0) *dst = colour;
 
			dst++;
 
			src += ScaleByZoom(1, zoom);
 
		}
 
	}
 
}
 

	
src/blitter/base.hpp
Show inline comments
 
@@ -51,21 +51,21 @@ public:
 
	/**
 
	 * Draw an image to the screen, given an amount of params defined above.
 
	 */
 
	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
 
	 *  and is looked-up in the palette to match a new color, which then is put
 
	 * 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 colour, which then is put
 
	 *  on the screen again.
 
	 * @param dst the destination pointer (video-buffer).
 
	 * @param width the width of the buffer.
 
	 * @param height the height of the buffer.
 
	 * @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.
 
	 */
 
	virtual Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator) = 0;
 

	
 
@@ -77,49 +77,49 @@ public:
 
	 * @param y How much you want to scroll to the bottom.
 
	 * @return A new destination pointer moved the the requested place.
 
	 */
 
	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 x The x 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 x The x 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 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 x The x coordinate from where the line starts.
 
	 * @param y The y coordinate from where the line starts.
 
	 * @param x2 The x coordinate to where the line 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_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.
 
	 * @param video The destionation pointer (video-buffer).
 
	 * @param src The buffer from which the data will be read.
 
	 * @param width The width of the buffer.
src/blitter/null.hpp
Show inline comments
 
@@ -9,19 +9,19 @@
 
#include "factory.hpp"
 

	
 
class Blitter_Null : public Blitter {
 
public:
 
	/* virtual */ uint8 GetScreenDepth() { return 0; }
 
	/* 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 */ void *MoveTo(const void *video, int x, int y) { return NULL; };
 
	/* virtual */ void SetPixel(void *video, int x, int y, uint8 color) {};
 
	/* virtual */ void SetPixelIfEmpty(void *video, int x, int y, uint8 color) {};
 
	/* virtual */ void DrawRect(void *video, int width, int height, uint8 color) {};
 
	/* virtual */ void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 color) {};
 
	/* virtual */ void SetPixel(void *video, int x, int y, uint8 colour) {};
 
	/* virtual */ void SetPixelIfEmpty(void *video, int x, int y, uint8 colour) {};
 
	/* 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 colour) {};
 
	/* 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 CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch) {};
 
	/* virtual */ void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y) {};
 
	/* virtual */ int BufferSize(int width, int height) { return 0; };
 
	/* virtual */ void PaletteAnimate(uint start, uint count) { };
src/bmp.cpp
Show inline comments
 
@@ -319,16 +319,16 @@ bool BmpReadHeader(BmpBuffer *buffer, Bm
 
	/* Only 4-bit and 8-bit rle compression is supported */
 
	if (info->compression > 2 || (info->compression > 0 && !(info->bpp == 4 || info->bpp == 8))) return false;
 

	
 
	if (info->bpp <= 8) {
 
		uint i;
 

	
 
		/* Reads number of colors if available in info header */
 
		/* Reads number of colours if available in info header */
 
		if (header_size >= 16) {
 
			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
 
		}
 
		if (info->palette_size == 0) info->palette_size = 1 << info->bpp;
 

	
 
		data->palette = CallocT<Colour>(info->palette_size);
 
		if (data->palette == NULL) return false;
src/bmp.h
Show inline comments
 
@@ -11,13 +11,13 @@ struct BmpInfo {
 
	uint32 offset;       ///< offset of bitmap data from .bmp file begining
 
	uint32 width;        ///< bitmap width
 
	uint32 height;       ///< bitmap height
 
	bool os2_bmp;        ///< true if OS/2 1.x or windows 2.x bitmap
 
	uint16 bpp;          ///< bits per pixel
 
	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 {
 
	Colour *palette;
 
	byte   *bitmap;
 
};
src/cheat_gui.cpp
Show inline comments
 
@@ -157,13 +157,13 @@ struct CheatWindow : Window {
 
					DrawArrowButtons(x + 20, y, COLOUR_YELLOW, clicked - (i * 2), true, true);
 

	
 
					switch (ce->str) {
 
						/* Display date for change date cheat */
 
						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:
 
							SetDParam(0, val + 1);
 
							GetString(buf, STR_CHEAT_CHANGE_COMPANY, lastof(buf));
 
							DrawCompanyIcon(_local_company, 60 + GetStringBoundingBox(buf).width, y + 2);
 
							break;
 

	
src/command.cpp
Show inline comments
 
@@ -101,13 +101,13 @@ DEF_COMMAND(CmdChangeServiceInt);
 
DEF_COMMAND(CmdRestoreOrderIndex);
 

	
 
DEF_COMMAND(CmdBuildIndustry);
 

	
 
DEF_COMMAND(CmdBuildCompanyHQ);
 
DEF_COMMAND(CmdSetCompanyManagerFace);
 
DEF_COMMAND(CmdSetCompanyColor);
 
DEF_COMMAND(CmdSetCompanyColour);
 

	
 
DEF_COMMAND(CmdIncreaseLoan);
 
DEF_COMMAND(CmdDecreaseLoan);
 

	
 
DEF_COMMAND(CmdWantEnginePreview);
 

	
 
@@ -249,13 +249,13 @@ static const Command _command_proc_table
 

	
 
	{CmdChangeServiceInt,                           0}, /* CMD_CHANGE_SERVICE_INT */
 

	
 
	{CmdBuildIndustry,                              0}, /* CMD_BUILD_INDUSTRY */
 
	{CmdBuildCompanyHQ,       CMD_NO_WATER | CMD_AUTO}, /* CMD_BUILD_COMPANY_HQ */
 
	{CmdSetCompanyManagerFace,                      0}, /* CMD_SET_COMPANY_MANAGER_FACE */
 
	{CmdSetCompanyColor,                            0}, /* CMD_SET_COMPANY_COLOR */
 
	{CmdSetCompanyColour,                           0}, /* CMD_SET_COMPANY_COLOUR */
 

	
 
	{CmdIncreaseLoan,                               0}, /* CMD_INCREASE_LOAN */
 
	{CmdDecreaseLoan,                               0}, /* CMD_DECREASE_LOAN */
 

	
 
	{CmdWantEnginePreview,                          0}, /* CMD_WANT_ENGINE_PREVIEW */
 

	
src/command_type.h
Show inline comments
 
@@ -199,13 +199,13 @@ enum {
 
	CMD_CHANGE_SERVICE_INT,           ///< change the server interval of a vehicle
 

	
 
	CMD_BUILD_INDUSTRY,               ///< build a new industry
 

	
 
	CMD_BUILD_COMPANY_HQ,             ///< build the company headquarter
 
	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_DECREASE_LOAN,                ///< decrease the loan from the bank
 

	
 
	CMD_WANT_ENGINE_PREVIEW,          ///< confirm the preview of an engine
 

	
src/company_cmd.cpp
Show inline comments
 
@@ -94,23 +94,23 @@ void SetLocalCompany(CompanyID new_compa
 
bool IsHumanCompany(CompanyID company)
 
{
 
	return !GetCompany(company)->is_ai;
 
}
 

	
 

	
 
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 */
 
	if (!IsValidCompanyID(company)) return _colour_gradient[COLOUR_WHITE][4] | IS_PALETTE_COLOR;
 
	return (_colour_gradient[_company_colours[company]][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_COLOUR;
 
}
 

	
 
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);
 
}
 

	
 
/**
 
 * Checks whether a company manager's face is a valid encoding.
 
 * Unused bits are not enforced to be 0.
 
 * @param cmf the fact to check
 
@@ -349,13 +349,13 @@ static Colours GenerateCompanyColour()
 
			if (_colour_sort[colours[j - 1]] < _colour_sort[colours[j]]) {
 
				Swap(colours[j - 1], colours[j]);
 
			}
 
		}
 
	};
 

	
 
	/* 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;
 
	FOR_ALL_COMPANIES(c) {
 
		Colours pcolour = (Colours)c->colour;
 

	
 
		for (uint i = 0; i < COLOUR_END; i++) {
 
			if (colours[i] == pcolour) {
 
@@ -371,13 +371,13 @@ static Colours GenerateCompanyColour()
 
			for (uint i = 1; i < COLOUR_END; i++) {
 
				if (colours[i - 1] == similar) Swap(colours[i - 1], colours[i]);
 
			}
 
		}
 
	}
 

	
 
	/* Return the first available color */
 
	/* Return the first available colour */
 
	for (uint i = 0; i < COLOUR_END; i++) {
 
		if (colours[i] != INVALID_COLOUR) return colours[i];
 
	}
 

	
 
	NOT_REACHED();
 
}
src/company_gui.cpp
Show inline comments
 
@@ -398,13 +398,13 @@ public:
 
	{
 
		return true;
 
	}
 

	
 
	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);
 
	}
 
};
 

	
 
struct SelectCompanyLiveryWindow : public Window {
 
private:
 
@@ -495,17 +495,17 @@ public:
 
				if (scheme != LS_DEFAULT) {
 
					DrawSprite(c->livery[scheme].in_use ? SPR_BOX_CHECKED : SPR_BOX_EMPTY, PAL_NONE, 2, y);
 
				}
 

	
 
				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);
 

	
 
				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);
 
				}
 

	
 
				y += 14;
 
			}
 
		}
 
@@ -567,13 +567,13 @@ public:
 
					if (scheme >= LS_END) return;
 
				}
 
				if (j >= LS_END) return;
 

	
 
				/* If clicking on the left edge, toggle using the livery */
 
				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) {
 
					ToggleBit(this->sel, j);
 
				} else {
 
					this->sel = 1 << j;
 
@@ -585,13 +585,13 @@ public:
 
	}
 

	
 
	virtual void OnDropdownSelect(int widget, int index)
 
	{
 
		for (LiveryScheme scheme = LS_DEFAULT; scheme < LS_END; 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);
 
			}
 
		}
 
	}
 

	
 
	virtual void OnInvalidateData(int data = 0)
 
	{
 
@@ -625,25 +625,25 @@ static const Widget _select_company_live
 
{   WWT_MATRIX, RESIZE_NONE,  COLOUR_GREY,   0, 399,  48,  48 + 1 * 14, (1 << 8) | 1,     STR_LIVERY_PANEL_TIP },
 
{ WIDGETS_END },
 
};
 

	
 
static const WindowDesc _select_company_livery_desc = {
 
	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,
 
	_select_company_livery_widgets,
 
};
 

	
 
/**
 
 * Draws the face of a 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 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);
 

	
 
	bool has_moustache   = !HasBit(ge, GENDER_FEMALE) && GetCompanyManagerFaceBits(cmf, CMFV_HAS_MOUSTACHE,   ge) != 0;
 
	bool has_tie_earring = !HasBit(ge, GENDER_FEMALE) || GetCompanyManagerFaceBits(cmf, CMFV_HAS_TIE_EARRING, ge) != 0;
 
	bool has_glasses     = GetCompanyManagerFaceBits(cmf, CMFV_HAS_GLASSES, ge) != 0;
 
@@ -659,13 +659,13 @@ void DrawCompanyManagerFace(CompanyManag
 
			case 1: pal = PALETTE_TO_BLUE;  break;
 
			case 2: pal = PALETTE_TO_GREEN; break;
 
		}
 
	}
 

	
 
	/* 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++) {
 
		switch (cmfv) {
 
			case CMFV_MOUSTACHE:   if (!has_moustache)   continue; break;
 
			case CMFV_LIPS:        /* FALL THROUGH */
 
			case CMFV_NOSE:        if (has_moustache)    continue; break;
 
@@ -1128,13 +1128,13 @@ static void DoSelectCompanyManagerFace(W
 
/* Names of the widgets. Keep them in the same order as in the widget array */
 
enum CompanyWindowWidgets {
 
	CW_WIDGET_CLOSEBOX = 0,
 
	CW_WIDGET_CAPTION,
 
	CW_WIDGET_FACE,
 
	CW_WIDGET_NEW_FACE,
 
	CW_WIDGET_COLOR_SCHEME,
 
	CW_WIDGET_COLOUR_SCHEME,
 
	CW_WIDGET_PRESIDENT_NAME,
 
	CW_WIDGET_COMPANY_NAME,
 
	CW_WIDGET_BUILD_VIEW_HQ,
 
	CW_WIDGET_RELOCATE_HQ,
 
	CW_WIDGET_BUY_SHARE,
 
	CW_WIDGET_SELL_SHARE,
 
@@ -1261,13 +1261,13 @@ struct CompanyWindow : Window
 
	virtual void OnPaint()
 
	{
 
		const Company *c = GetCompany((CompanyID)this->window_number);
 
		bool local = this->window_number == _local_company;
 

	
 
		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_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;
 
		if (local && c->location_of_HQ != INVALID_TILE) this->widget[CW_WIDGET_BUILD_VIEW_HQ].type = WWT_PUSHTXTBTN; //HQ is already built.
 
		this->SetWidgetDisabledState(CW_WIDGET_BUILD_VIEW_HQ, !local && c->location_of_HQ == INVALID_TILE);
 
		this->SetWidgetHiddenState(CW_WIDGET_RELOCATE_HQ,      !local || c->location_of_HQ == INVALID_TILE);
 
@@ -1318,13 +1318,13 @@ struct CompanyWindow : Window
 
		SetDParam(0, c->inaugurated_year);
 
		DrawString(110, 23, STR_7038_INAUGURATED, TC_FROMSTRING);
 

	
 
		/* "Colour scheme:" */
 
		DrawString(110, 43, STR_7006_COLOR_SCHEME, TC_FROMSTRING);
 
		/* 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:" */
 
		DrawCompanyVehiclesAmount((CompanyID)this->window_number);
 

	
 
		/* "Company value:" */
 
		SetDParam(0, CalculateCompanyValue(c));
 
@@ -1336,14 +1336,14 @@ struct CompanyWindow : Window
 

	
 
	virtual void OnClick(Point pt, int widget)
 
	{
 
		switch (widget) {
 
			case CW_WIDGET_NEW_FACE: DoSelectCompanyManagerFace(this, false); break;
 

	
 
			case CW_WIDGET_COLOR_SCHEME:
 
				if (BringWindowToFrontById(WC_COMPANY_COLOR, this->window_number)) break;
 
			case CW_WIDGET_COLOUR_SCHEME:
 
				if (BringWindowToFrontById(WC_COMPANY_COLOUR, this->window_number)) break;
 
				new SelectCompanyLiveryWindow(&_select_company_livery_desc, (CompanyID)this->window_number);
 
				break;
 

	
 
			case CW_WIDGET_PRESIDENT_NAME:
 
				this->query_widget = CW_WIDGET_PRESIDENT_NAME;
 
				SetDParam(0, this->window_number);
src/company_gui.h
Show inline comments
 
@@ -4,13 +4,13 @@
 

	
 
#ifndef COMPANY_GUI_H
 
#define COMPANY_GUI_H
 

	
 
#include "company_type.h"
 

	
 
uint16 GetDrawStringCompanyColor(CompanyID company);
 
uint16 GetDrawStringCompanyColour(CompanyID company);
 
void DrawCompanyIcon(CompanyID c, int x, int y);
 

	
 
void ShowCompanyStations(CompanyID company);
 
void ShowCompanyFinances(CompanyID company);
 
void ShowCompany(CompanyID company);
 

	
src/company_manager_face.h
Show inline comments
 
@@ -226,10 +226,10 @@ static inline SpriteID GetCompanyManager
 
{
 
	assert(_cmf_info[cmfv].valid_values[ge] != 0);
 

	
 
	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);
 

	
 
#endif /* COMPANY_MANAGER_FACE_H */
src/console.cpp
Show inline comments
 
@@ -76,22 +76,22 @@ void IConsoleFree()
 
/**
 
 * Handle the printing of text entered into the console or redirected there
 
 * by any other means. Text can be redirected to other clients in a network game
 
 * 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
 
 * 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.)
 
 */
 
void IConsolePrint(ConsoleColour color_code, const char *string)
 
void IConsolePrint(ConsoleColour colour_code, const char *string)
 
{
 
	char *str;
 
#ifdef ENABLE_NETWORK
 
	if (_redirect_console_to_client != INVALID_CLIENT_ID) {
 
		/* Redirect the string to the client */
 
		NetworkServerSendRcon(_redirect_console_to_client, color_code, string);
 
		NetworkServerSendRcon(_redirect_console_to_client, colour_code, string);
 
		return;
 
	}
 
#endif
 

	
 
	/* Create a copy of the string, strip if of colours and invalid
 
	 * characters and (when applicable) assign it to the console buffer */
 
@@ -105,30 +105,30 @@ void IConsolePrint(ConsoleColour color_c
 
		IConsoleWriteToLogFile(str);
 
		free(str); // free duplicated string since it's not used anymore
 
		return;
 
	}
 

	
 
	IConsoleWriteToLogFile(str);
 
	IConsoleGUIPrint(color_code, str);
 
	IConsoleGUIPrint(colour_code, str);
 
}
 

	
 
/**
 
 * Handle the printing of text entered into the console or redirected there
 
 * by any other means. Uses printf() style format, for more information look
 
 * at IConsolePrint()
 
 */
 
void CDECL IConsolePrintF(ConsoleColour color_code, const char *s, ...)
 
void CDECL IConsolePrintF(ConsoleColour colour_code, const char *s, ...)
 
{
 
	va_list va;
 
	char buf[ICON_MAX_STREAMSIZE];
 

	
 
	va_start(va, s);
 
	vsnprintf(buf, sizeof(buf), s, va);
 
	va_end(va);
 

	
 
	IConsolePrint(color_code, buf);
 
	IConsolePrint(colour_code, buf);
 
}
 

	
 
/**
 
 * It is possible to print debugging information to the console,
 
 * which is achieved by using this function. Can only be used by
 
 * debug() in debug.cpp. You need at least a level 2 (developer) for debugging
src/console_func.h
Show inline comments
 
@@ -13,14 +13,14 @@ extern IConsoleModes _iconsole_mode;
 
/* console functions */
 
void IConsoleInit();
 
void IConsoleFree();
 
void IConsoleClose();
 

	
 
/* console output */
 
void IConsolePrint(ConsoleColour color_code, const char *string);
 
void CDECL IConsolePrintF(ConsoleColour color_code, const char *s, ...);
 
void IConsolePrint(ConsoleColour colour_code, const char *string);
 
void CDECL IConsolePrintF(ConsoleColour colour_code, const char *s, ...);
 
void IConsoleDebug(const char *dbg, const char *string);
 
void IConsoleWarning(const char *string);
 
void IConsoleError(const char *string);
 

	
 
/* Parser */
 
void IConsoleCmdExec(const char *cmdstr);
src/console_gui.cpp
Show inline comments
 
@@ -434,14 +434,14 @@ static void IConsoleHistoryNavigate(int 
 
/**
 
 * Handle the printing of text entered into the console or redirected there
 
 * by any other means. Text can be redirected to other clients in a network game
 
 * 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
 
 * 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.)
 
 */
 
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));
 
}
src/console_internal.h
Show inline comments
 
@@ -131,9 +131,9 @@ void IConsoleVarProcAdd(const char *name
 

	
 
/* Supporting functions */
 
bool GetArgumentInteger(uint32 *value, const char *arg);
 

	
 
void IConsoleGUIInit();
 
void IConsoleGUIFree();
 
void IConsoleGUIPrint(ConsoleColour color_code, char *string);
 
void IConsoleGUIPrint(ConsoleColour colour_code, char *string);
 

	
 
#endif /* CONSOLE_INTERNAL_H */
src/economy.cpp
Show inline comments
 
@@ -356,13 +356,13 @@ void ChangeOwnershipOfCompanyItems(Owner
 
		FOR_ALL_VEHICLES(v) {
 
			if (v->owner == old_owner && IsCompanyBuildableVehicleType(v->type)) {
 
				if (new_owner == INVALID_OWNER) {
 
					if (v->Previous() == NULL) delete v;
 
				} else {
 
					v->owner = new_owner;
 
					v->colormap = PAL_NONE;
 
					v->colourmap = PAL_NONE;
 
					if (IsEngineCountable(v)) GetCompany(new_owner)->num_engines[v->engine_type]++;
 
					if (v->IsPrimaryVehicle()) v->unitnumber = unitidgen[v->type].NextID();
 
				}
 
			}
 
		}
 
	}
 
@@ -413,13 +413,13 @@ void ChangeOwnershipOfCompanyItems(Owner
 

	
 
	Sign *si;
 
	FOR_ALL_SIGNS(si) {
 
		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);
 

	
 
	_current_company = old;
 

	
 
	MarkWholeScreenDirty();
 
}
src/engine_gui.cpp
Show inline comments
 
@@ -195,13 +195,13 @@ void DrawNewsNewVehicleAvail(Window *w, 
 
	GfxFillRect(25, 56, w->width - 25, w->height - 2, 10);
 

	
 
	SetDParam(0, engine);
 
	DrawStringMultiCenter(w->width >> 1, 57, STR_NEW_VEHICLE_TYPE, w->width - 2);
 

	
 
	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);
 
}
 

	
 

	
 
/** Sort all items using qsort() and given 'CompareItems' function
 
 * @param el list to be sorted
src/genworld.cpp
Show inline comments
 
@@ -292,13 +292,13 @@ void GenerateWorld(GenerateWorldMode mod
 
	LoadStringWidthTable();
 

	
 
	/* Re-init the windowing system */
 
	ResetWindowSystem();
 

	
 
	/* Create toolbars */
 
	SetupColorsAndInitialWindow();
 
	SetupColoursAndInitialWindow();
 

	
 
	if (_gw.thread != NULL) {
 
		_gw.thread->Join();
 
		delete _gw.thread;
 
		_gw.thread = NULL;
 
	}
src/gfx.cpp
Show inline comments
 
@@ -94,17 +94,17 @@ void GfxScroll(int left, int top, int wi
 
 *
 
 * @pre dpi->zoom == ZOOM_LVL_NORMAL, right >= left, bottom >= top
 
 * @param left Minimum X (inclusive)
 
 * @param top Minimum Y (inclusive)
 
 * @param right Maximum X (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
 
 *         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_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)
 
{
 
	Blitter *blitter = BlitterFactoryBase::GetCurrentBlitter();
 
	const DrawPixelInfo *dpi = _cur_dpi;
 
	void *dst;
 
@@ -132,14 +132,14 @@ void GfxFillRect(int left, int top, int 
 

	
 
	switch (mode) {
 
		default: // FILLRECT_OPAQUE
 
			blitter->DrawRect(dst, right, bottom, (uint8)colour);
 
			break;
 

	
 
		case FILLRECT_RECOLOR:
 
			blitter->DrawColorMappingRect(dst, right, bottom, GB(colour, 0, PALETTE_WIDTH));
 
		case FILLRECT_RECOLOUR:
 
			blitter->DrawColourMappingRect(dst, right, bottom, GB(colour, 0, PALETTE_WIDTH));
 
			break;
 

	
 
		case FILLRECT_CHECKER: {
 
			byte bo = (oleft - left + dpi->left + otop - top + dpi->top) & 1;
 
			do {
 
				for (int i = (bo ^= 1); i < right; i += 2) blitter->SetPixel(dst, i, 0, (uint8)colour);
 
@@ -835,14 +835,14 @@ Dimension GetStringBoundingBox(const cha
 
 * @param y           Y position to draw character
 
 * @param real_colour Colour to use, see DoDrawString() for details
 
 */
 
void DrawCharCentered(WChar c, int x, int y, TextColour colour)
 
{
 
	FontSize size = FS_NORMAL;
 
	assert(colour & IS_PALETTE_COLOR);
 
	colour &= ~IS_PALETTE_COLOR;
 
	assert(colour & IS_PALETTE_COLOUR);
 
	colour &= ~IS_PALETTE_COLOUR;
 
	int w = GetCharacterWidth(size, c);
 

	
 
	_string_colourremap[1] = _string_colourmap[_use_palette][colour].text;
 
	_string_colourremap[2] = _string_colourmap[_use_palette][colour].shadow;
 
	_colour_remap_ptr = _string_colourremap;
 

	
 
@@ -905,14 +905,14 @@ static int ReallyDoDrawString(const char
 
		/* in "mode multiline", the available space have been verified. Not in regular one.
 
		 * So if the string cannot be drawn, return the original start to say so.*/
 
		if (x >= dpi->left + dpi->width || y >= dpi->top + dpi->height) return x;
 

	
 
		if (colour != TC_INVALID) { // the invalid colour flag test should not  really occur.  But better be safe
 
switch_colour:;
 
			if (colour & IS_PALETTE_COLOR) {
 
				_string_colourremap[1] = colour & ~IS_PALETTE_COLOR;
 
			if (colour & IS_PALETTE_COLOUR) {
 
				_string_colourremap[1] = colour & ~IS_PALETTE_COLOUR;
 
				_string_colourremap[2] = (_use_palette == PAL_DOS) ? 1 : 215;
 
			} else {
 
				_string_colourremap[1] = _string_colourmap[_use_palette][colour].text;
 
				_string_colourremap[2] = _string_colourmap[_use_palette][colour].shadow;
 
			}
 
			_colour_remap_ptr = _string_colourremap;
 
@@ -1108,14 +1108,14 @@ void GfxInitPalettes()
 

	
 
void DoPaletteAnimations()
 
{
 
	Blitter *blitter = BlitterFactoryBase::GetCurrentBlitter();
 
	const Colour *s;
 
	const ExtraPaletteValues *ev = &_extra_palette_values;
 
	/* Amount of colors to be rotated.
 
	 * A few more for the DOS palette, because the water colors are
 
	/* Amount of colours to be rotated.
 
	 * A few more for the DOS palette, because the water colours are
 
	 * 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;
 
	Colour old_val[PALETTE_ANIM_SIZE_DOS];
 
	const int oldval_size = colour_rotation_amount * sizeof(*old_val);
 
	const uint old_tc = _palette_animation_counter;
 
	uint i;
src/gfx_type.h
Show inline comments
 
@@ -7,13 +7,13 @@
 

	
 
#include "core/endian_type.hpp"
 
#include "core/enum_type.hpp"
 
#include "core/geometry_type.hpp"
 
#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 */
 
struct PalSpriteID {
 
	SpriteID sprite;  ///< The 'real' sprite
 
	SpriteID pal;     ///< The palette (use \c PAL_NONE) if not needed)
 
};
 
@@ -182,13 +182,13 @@ enum Colours {
 
	COLOUR_GREY,
 
	COLOUR_WHITE,
 
	COLOUR_END,
 
	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 {
 
	TC_FROMSTRING  = 0x00,
 
	TC_BLUE        = 0x00,
 
	TC_SILVER      = 0x01,
 
	TC_GOLD        = 0x02,
 
	TC_RED         = 0x03,
 
@@ -204,28 +204,28 @@ enum TextColour {
 
	TC_LIGHT_BLUE  = 0x0D,
 
	TC_GREY        = 0x0E,
 
	TC_DARK_BLUE   = 0x0F,
 
	TC_BLACK       = 0x10,
 
	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);
 

	
 
/** Defines a few values that are related to animations using palette changes */
 
enum PaletteAnimationSizes {
 
	PALETTE_ANIM_SIZE_WIN   = 28,   ///< number of animated colours in Windows palette
 
	PALETTE_ANIM_SIZE_DOS   = 38,   ///< number of animated colours in DOS palette
 
	PALETTE_ANIM_SIZE_START = 217,  ///< Index in  the _palettes array from which all animations are taking places (table/palettes.h)
 
};
 

	
 
/** Define the operation GfxFillRect performs */
 
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_RECOLOR, ///< Apply a recolor sprite to the screen content
 
	FILLRECT_RECOLOUR, ///< Apply a recolour sprite to the screen content
 
};
 

	
 
/** Palettes OpenTTD supports. */
 
enum PaletteType {
 
	PAL_DOS,        ///< Use the DOS palette.
 
	PAL_WINDOWS,    ///< Use the Windows palette.
src/graph_gui.cpp
Show inline comments
 
@@ -146,22 +146,22 @@ protected:
 
	uint16 x_values_start;
 
	uint16 x_values_increment;
 

	
 
	int gd_left, gd_top;  ///< Where to start drawing the graph, in pixels.
 
	uint gd_height;    ///< The height of the graph in pixels.
 
	StringID format_str_y_axis;
 
	byte colors[GRAPH_MAX_DATASETS];
 
	byte colours[GRAPH_MAX_DATASETS];
 
	OverflowSafeInt64 cost[GRAPH_MAX_DATASETS][24]; ///< last 2 years
 

	
 
	void DrawGraph() const
 
	{
 
		uint x, y;                       ///< Reused whenever x and y coordinates are needed.
 
		OverflowSafeInt64 highest_value; ///< Highest value to be drawn.
 
		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 */
 
		assert(GRAPH_MAX_DATASETS >= (int)NUM_CARGO && GRAPH_MAX_DATASETS >= (int)MAX_COMPANIES);
 
		assert(this->num_vert_lines > 0);
 

	
 
		byte grid_colour = _colour_gradient[COLOUR_GREY][4];
 

	
 
@@ -291,13 +291,13 @@ protected:
 
		/* draw lines and dots */
 
		for (int i = 0; i < this->num_dataset; i++) {
 
			if (!HasBit(this->excluded_data, i)) {
 
				/* Centre the dot between the grid lines. */
 
				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_y = INVALID_DATAPOINT_POS;
 

	
 
				for (int j = 0; j < this->num_on_x_axis; j++) {
 
					OverflowSafeInt64 datapoint = this->cost[i][j];
 

	
 
@@ -323,16 +323,16 @@ protected:
 
							datapoint >>= reduce_range;
 
						}
 

	
 
						y = this->gd_top + x_axis_offset - (x_axis_offset * datapoint) / (highest_value >> reduce_range);
 

	
 
						/* 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. */
 
						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_y = y;
 
					} else {
 
						prev_x = INVALID_DATAPOINT_POS;
 
						prev_y = INVALID_DATAPOINT_POS;
 
@@ -385,13 +385,13 @@ public:
 
		this->month = mo;
 

	
 
		int numd = 0;
 
		for (CompanyID k = COMPANY_FIRST; k < MAX_COMPANIES; k++) {
 
			if (IsValidCompanyID(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;) {
 
					this->cost[numd][i] = (j >= c->num_valid_stat_ent) ? INVALID_DATAPOINT : GetGraphData(c, j);
 
					i++;
 
				}
 
			}
 
			numd++;
 
@@ -673,25 +673,25 @@ struct PaymentRatesGraphWindow : BaseGra
 

	
 
			/* Only draw labels for widgets that exist. If the widget doesn't
 
			 * exist then the local company has used the climate cheat or
 
			 * changed the NewGRF configuration with this window open. */
 
			if (i + 3 < this->widget_count) {
 
				/* 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
 
				 * when the button is clicked */
 
				byte clk_dif = this->IsWidgetLowered(i + 3) ? 1 : 0;
 

	
 
				GfxFillRect(x + clk_dif, y + clk_dif, x + 8 + clk_dif, y + 5 + clk_dif, 0);
 
				GfxFillRect(x + 1 + clk_dif, y + 1 + clk_dif, x + 7 + clk_dif, y + 4 + clk_dif, cs->legend_colour);
 
				SetDParam(0, cs->name);
 
				DrawString(x + 14 + clk_dif, y + clk_dif, STR_7065, TC_FROMSTRING);
 
				y += 8;
 
			}
 

	
 
			this->colors[i] = cs->legend_colour;
 
			this->colours[i] = cs->legend_colour;
 
			for (uint j = 0; j != 20; j++) {
 
				this->cost[i][j] = GetTransportedGoodsIncome(10, 20, j * 4 + 4, c);
 
			}
 

	
 
			i++;
 
		}
 
@@ -899,13 +899,13 @@ public:
 

	
 
	virtual void OnPaint()
 
	{
 
		byte x;
 
		uint16 y = 27;
 
		int total_score = 0;
 
		int color_done, color_notdone;
 
		int colour_done, colour_notdone;
 

	
 
		/* Draw standard stuff */
 
		this->DrawWidgets();
 

	
 
		/* Check if the currently selected company is still active. */
 
		if (company == INVALID_COMPANY || !IsValidCompanyID(company)) {
 
@@ -956,15 +956,15 @@ public:
 
			}
 

	
 
			x = (i == company) ? 1 : 0;
 
			DrawCompanyIcon(i, (i % 8) * 37 + 13 + x, (i < 8 ? 0 : 13) + 16 + x);
 
		}
 

	
 
		/* The colors used to show how the progress is going */
 
		color_done = _colour_gradient[COLOUR_GREEN][4];
 
		color_notdone = _colour_gradient[COLOUR_RED][4];
 
		/* The colours used to show how the progress is going */
 
		colour_done = _colour_gradient[COLOUR_GREEN][4];
 
		colour_notdone = _colour_gradient[COLOUR_RED][4];
 

	
 
		/* Draw all the score parts */
 
		for (ScoreID i = SCORE_BEGIN; i < SCORE_END; i++) {
 
			int val    = _score_part[company][i];
 
			int needed = _score_info[i].needed;
 
			int score  = _score_info[i].score;
 
@@ -988,14 +988,14 @@ public:
 
			x = Clamp(val, 0, needed) * 50 / needed;
 

	
 
			/* SCORE_LOAN is inversed */
 
			if (val < 0 && i == SCORE_LOAN) x = 0;
 

	
 
			/* Draw the bar */
 
			if (x !=  0) GfxFillRect(112,     y - 2, 112 + x,  y + 10, color_done);
 
			if (x != 50) GfxFillRect(112 + x, y - 2, 112 + 50, y + 10, color_notdone);
 
			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, colour_notdone);
 

	
 
			/* Calculate the % */
 
			x = Clamp(val, 0, needed) * 100 / needed;
 

	
 
			/* SCORE_LOAN is inversed */
 
			if (val < 0 && i == SCORE_LOAN) x = 0;
src/gui.h
Show inline comments
 
@@ -64,13 +64,13 @@ void ShowSmallMap();
 
void ShowExtraViewPortWindow(TileIndex tile = INVALID_TILE);
 

	
 
void BuildFileList();
 
void SetFiosType(const byte fiostype);
 

	
 
/* FIOS_TYPE_FILE, FIOS_TYPE_OLDFILE etc. different colours */
 
extern const TextColour _fios_colors[];
 
extern const TextColour _fios_colours[];
 

	
 
/* bridge_gui.cpp */
 
void ShowBuildBridgeWindow(TileIndex start, TileIndex end, TransportType transport_type, byte bridge_type);
 

	
 
void ShowBuildIndustryWindow();
 
void ShowBuildTownWindow();
src/heightmap.cpp
Show inline comments
 
@@ -13,15 +13,15 @@
 
#include "fios.h"
 
#include "settings_type.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
 
 * 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)
 
{
 
	/* To avoid doubles and stuff, multiple it with a total of 65536 (16bits), then
 
	 *  divide by it to normalize the value to a byte again. */
 
	return ((red * 19595) + (green * 38470) + (blue * 7471)) / 65536;
 
@@ -123,13 +123,13 @@ static bool ReadHeightmapPNG(char *filen
 

	
 
	/* Allocate memory and read image, without alpha or 16-bit samples
 
	 * (result is either 8-bit indexed/grayscale or 24-bit RGB) */
 
	png_set_packing(png_ptr);
 
	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) */
 
	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);
 
		fclose(fp);
 
		png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
 
		return false;
 
@@ -348,13 +348,13 @@ static void GrayscaleToMapHeights(uint i
 
						break;
 
				}
 

	
 
				assert(img_row < img_height);
 
				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);
 
			}
 
			/* Only clear the tiles within the map area. */
 
			if (TileX(tile) != MapMaxX() && TileY(tile) != MapMaxY() &&
 
					(!_settings_game.construction.freeform_edges || (TileX(tile) != 0 && TileY(tile) != 0))) {
 
				MakeClear(tile, CLEAR_GRASS, 3);
src/industry.h
Show inline comments
 
@@ -114,13 +114,13 @@ struct Industry : PoolItem<Industry, Ind
 
	uint16 last_month_production[2];    ///< total units produced per cargo in the last full month
 
	uint16 last_month_transported[2];   ///< total units transported per cargo in the last full month
 
	uint16 counter;                     ///< used for animation and/or production (if available cargo)
 

	
 
	IndustryType type;                  ///< type of industry.
 
	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
 
	byte was_cargo_delivered;           ///< flag that indicate this has been the closest industry chosen for cargo delivery by a station. see DeliverGoodsToIndustry
 

	
 
	OwnerByte founder;                  ///< Founder of the industry
 
	Date construction_date;             ///< Date of the construction of the industry
 
	uint8 construction_type;            ///< Way the industry was constructed (@see IndustryConstructionType)
src/industry_cmd.cpp
Show inline comments
 
@@ -285,14 +285,14 @@ static void DrawTile_Industry(TileInfo *
 

	
 
	dits = &_industry_draw_tile_data[gfx << 2 | (indts->anim_state ?
 
			GetIndustryAnimationState(ti->tile) & INDUSTRY_COMPLETED :
 
			GetIndustryConstructionStage(ti->tile))];
 

	
 
	image = dits->ground.sprite;
 
	if (HasBit(image, PALETTE_MODIFIER_COLOR) && dits->ground.pal == PAL_NONE) {
 
		pal = GENERAL_SPRITE_COLOR(ind->random_color);
 
	if (HasBit(image, PALETTE_MODIFIER_COLOUR) && dits->ground.pal == PAL_NONE) {
 
		pal = GENERAL_SPRITE_COLOUR(ind->random_colour);
 
	} else {
 
		pal = dits->ground.pal;
 
	}
 

	
 
	/* DrawFoundation() modifes ti->z and ti->tileh */
 
	if (ti->tileh != SLOPE_FLAT) DrawFoundation(ti, FOUNDATION_LEVELED);
 
@@ -309,13 +309,13 @@ static void DrawTile_Industry(TileInfo *
 
	if (IsInvisibilitySet(TO_INDUSTRIES)) return;
 

	
 
	/* Add industry on top of the ground? */
 
	image = dits->building.sprite;
 
	if (image != 0) {
 
		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->y + dits->subtile_y,
 
			dits->width,
 
			dits->height,
 
			dits->dz,
 
			ti->z,
 
@@ -1485,13 +1485,13 @@ static void DoCreateNewIndustry(Industry
 
	}
 

	
 
	i->town = t;
 
	i->owner = owner;
 

	
 
	r = Random();
 
	i->random_color = GB(r, 0, 4);
 
	i->random_colour = GB(r, 0, 4);
 
	i->counter = GB(r, 4, 12);
 
	i->random = GB(r, 16, 16);
 
	i->produced_cargo_waiting[0] = 0;
 
	i->produced_cargo_waiting[1] = 0;
 
	i->incoming_cargo_waiting[0] = 0;
 
	i->incoming_cargo_waiting[1] = 0;
 
@@ -1509,13 +1509,13 @@ static void DoCreateNewIndustry(Industry
 
	i->last_month_production[0] = i->production_rate[0] * 8;
 
	i->last_month_production[1] = i->production_rate[1] * 8;
 
	i->founder = _current_company;
 

	
 
	if (HasBit(indspec->callback_flags, CBM_IND_DECIDE_COLOUR)) {
 
		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)) {
 
		for (j = 0; j < lengthof(i->accepts_cargo); j++) i->accepts_cargo[j] = CT_INVALID;
 
		for (j = 0; j < lengthof(i->accepts_cargo); j++) {
 
			uint16 res = GetIndustryCallback(CBID_INDUSTRY_INPUT_CARGO_TYPES, j, 0, i, type, INVALID_TILE);
src/main_gui.cpp
Show inline comments
 
@@ -363,16 +363,16 @@ struct MainWindow : Window
 
	}
 
};
 

	
 

	
 
void ShowSelectGameWindow();
 

	
 
void SetupColorsAndInitialWindow()
 
void SetupColoursAndInitialWindow()
 
{
 
	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);
 
		memcpy(_colour_gradient[i], b + 0xC6, sizeof(_colour_gradient[i]));
 
	}
 

	
 
	new MainWindow(_screen.width, _screen.height);
src/misc_cmd.cpp
Show inline comments
 
@@ -46,13 +46,13 @@ CommandCost CmdSetCompanyManagerFace(Til
 
 * @param flags operation to perform
 
 * @param p1 bitstuffed:
 
 * p1 bits 0-7 scheme to set
 
 * p1 bits 8-9 set in use state or first/second colour
 
 * @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
 

	
 
	Colours colour = (Colours)p2;
 

	
 
	LiveryScheme scheme = (LiveryScheme)GB(p1, 0, 8);
 
@@ -113,13 +113,13 @@ CommandCost CmdSetCompanyColor(TileIndex
 
				}
 
				break;
 

	
 
			default:
 
				break;
 
		}
 
		ResetVehicleColorMap();
 
		ResetVehicleColourMap();
 
		MarkWholeScreenDirty();
 
	}
 
	return CommandCost();
 
}
 

	
 
/** Increase the loan of your company.
src/misc_gui.cpp
Show inline comments
 
@@ -1364,14 +1364,14 @@ static const Widget _save_dialog_widgets
 
{ WWT_PUSHTXTBTN,     RESIZE_TB,  COLOUR_GREY,     0,   127,   168,   179, STR_4003_DELETE,  STR_400C_DELETE_THE_CURRENTLY_SELECTED},
 
{ WWT_PUSHTXTBTN,     RESIZE_TB,  COLOUR_GREY,   128,   244,   168,   179, STR_4002_SAVE,    STR_400D_SAVE_THE_CURRENT_GAME_USING},
 
{  WWT_RESIZEBOX,   RESIZE_LRTB,  COLOUR_GREY,   245,   256,   168,   179, 0x0,              STR_RESIZE_BUTTON},
 
{   WIDGETS_END},
 
};
 

	
 
/* Colors for fios types */
 
const TextColour _fios_colors[] = {
 
/* Colours for fios types */
 
const TextColour _fios_colours[] = {
 
	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
 
};
 

	
 
void BuildFileList()
 
{
 
@@ -1551,13 +1551,13 @@ public:
 
		this->DrawSortButtonState(_savegame_sort_order & SORT_BY_NAME ? SLWW_SORT_BYNAME : SLWW_SORT_BYDATE, _savegame_sort_order & SORT_DESCENDING ? SBS_DOWN : SBS_UP);
 

	
 
		y = widg->top + 1;
 
		for (uint pos = this->vscroll.pos; pos < _fios_items.Length(); 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;
 
			if (y >= this->vscroll.cap * 10 + widg->top + 1) break;
 
		}
 

	
 
		if (_saveload_mode == SLD_SAVE_GAME || _saveload_mode == SLD_SAVE_SCENARIO) {
 
			this->DrawEditBox(SLWW_SAVE_OSK_TITLE);
src/music_gui.cpp
Show inline comments
 
@@ -395,20 +395,20 @@ public:
 
		this->RaiseWidget(MW_INFO);
 
		this->DrawWidgets();
 

	
 
		GfxFillRect(187, 16, 200, 33, 0);
 

	
 
		for (i = 0; i != 8; i++) {
 
			int color = 0xD0;
 
			int colour = 0xD0;
 
			if (i > 4) {
 
				color = 0xBF;
 
				colour = 0xBF;
 
				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);
 

	
 
		if (_song_is_active == 0 || _music_wnd_cursong == 0) {
 
			str = STR_01E3;
src/network/network_chat_gui.cpp
Show inline comments
 
@@ -57,13 +57,13 @@ static inline uint GetChatMessageCount()
 

	
 
	return i;
 
}
 

	
 
/**
 
 * 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 message message itself in printf() style
 
 */
 
void CDECL NetworkAddChatMessage(TextColour colour, uint8 duration, const char *message, ...)
 
{
 
	char buf[DRAW_STRING_BUFFER];
 
@@ -93,13 +93,13 @@ void CDECL NetworkAddChatMessage(TextCol
 
	for (bufp = buf; lines != 0; lines--) {
 
		ChatMessage *cmsg = &_chatmsg_list[msg_count++];
 
		strecpy(cmsg->message, bufp, lastof(cmsg->message));
 

	
 
		/* The default colour for a message is company colour. Replace this with
 
		 * 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;
 

	
 
		bufp += strlen(bufp) + 1; // jump to 'next line' in the formatted string
 
	}
 

	
 
	_chatmessage_dirty = true;
 
@@ -229,13 +229,13 @@ void NetworkDrawChatMessage()
 
	/* Paint a half-transparent box behind the chat messages */
 
	GfxFillRect(
 
			_chatmsg_box.x,
 
			_screen.height - _chatmsg_box.y - count * NETWORK_CHAT_LINE_HEIGHT - 2,
 
			_chatmsg_box.x + _chatmsg_box.width - 1,
 
			_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 */
 
	for (uint y = NETWORK_CHAT_LINE_HEIGHT; count-- != 0; y += NETWORK_CHAT_LINE_HEIGHT) {
 
		DoDrawString(_chatmsg_list[count].message, _chatmsg_box.x + 3, _screen.height - _chatmsg_box.y - y + 1, _chatmsg_list[count].colour);
 
	}
src/network/network_client.cpp
Show inline comments
 
@@ -738,13 +738,13 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER
 
		/* Display message from somebody else */
 
		snprintf(name, sizeof(name), "%s", ci_to->client_name);
 
		ci = ci_to;
 
	}
 

	
 
	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;
 
}
 

	
 
DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_ERROR_QUIT)
 
{
 
	ClientID client_id = (ClientID)p->Recv_uint32();
 
@@ -813,16 +813,16 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER
 
}
 

	
 
DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_RCON)
 
{
 
	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));
 

	
 
	IConsolePrint(color_code, rcon_out);
 
	IConsolePrint(colour_code, rcon_out);
 

	
 
	return NETWORK_RECV_STATUS_OKAY;
 
}
 

	
 
DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_MOVE)
 
{
src/network/network_gui.cpp
Show inline comments
 
@@ -914,13 +914,13 @@ struct NetworkStartServerWindow : public
 
			if (item == this->map || (pos == 0 && this->map == NULL))
 
				GfxFillRect(11, y - 1, 258, y + 10, 155); // show highlighted item with a different colour
 

	
 
			if (pos == 0) {
 
				DrawString(14, y, STR_4010_GENERATE_RANDOM_NEW_GAME, TC_DARK_GREEN);
 
			} else {
 
				DoDrawString(item->title, 14, y, _fios_colors[item->type] );
 
				DoDrawString(item->title, 14, y, _fios_colours[item->type] );
 
			}
 
			y += NSSWND_ROWSIZE;
 

	
 
			if (y >= this->vscroll.cap * NSSWND_ROWSIZE + NSSWND_START) break;
 
		}
 
	}
src/network/network_internal.h
Show inline comments
 
@@ -145,13 +145,13 @@ struct CommandPacket : CommandContainer 
 
void NetworkAddCommandQueue(CommandPacket cp, NetworkClientSocket *cs = NULL);
 
void NetworkExecuteLocalCommandQueue();
 
void NetworkFreeLocalCommandQueue();
 

	
 
// from network.c
 
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);
 
uint NetworkCalculateLag(const NetworkClientSocket *cs);
 
byte NetworkGetCurrentLanguageIndex();
 
NetworkClientSocket *NetworkFindClientStateFromClientID(ClientID client_id);
 
StringID GetNetworkErrorMsg(NetworkErrorCode err);
 
bool NetworkFindName(char new_name[NETWORK_CLIENT_NAME_LENGTH]);
src/network/network_server.cpp
Show inline comments
 
@@ -569,17 +569,17 @@ DEF_SERVER_SEND_COMMAND(PACKET_SERVER_NE
 
	//
 

	
 
	Packet *p = NetworkSend_Init(PACKET_SERVER_NEWGAME);
 
	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);
 

	
 
	p->Send_uint16(color);
 
	p->Send_uint16(colour);
 
	p->Send_string(command);
 
	cs->Send_Packet(p);
 
}
 

	
 
DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_MOVE)(NetworkClientSocket *cs, ClientID client_id, CompanyID company_id)
 
{
 
@@ -1041,13 +1041,13 @@ void NetworkServerSendChat(NetworkAction
 
	case DESTTYPE_CLIENT:
 
		/* Are we sending to the server? */
 
		if ((ClientID)dest == CLIENT_ID_SERVER) {
 
			ci = NetworkFindClientInfoFromClientID(from_id);
 
			/* Display the text locally, and that is it */
 
			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 find the client to send the message to */
 
			FOR_ALL_CLIENT_SOCKETS(cs) {
 
				if (cs->client_id == (ClientID)dest) {
 
					SEND_COMMAND(PACKET_SERVER_CHAT)(cs, action, from_id, false, msg, data);
 
					break;
 
@@ -1058,13 +1058,13 @@ void NetworkServerSendChat(NetworkAction
 
		// Display the message locally (so you know you have sent it)
 
		if (from_id != (ClientID)dest) {
 
			if (from_id == CLIENT_ID_SERVER) {
 
				ci = NetworkFindClientInfoFromClientID(from_id);
 
				ci_to = NetworkFindClientInfoFromClientID((ClientID)dest);
 
				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 {
 
				FOR_ALL_CLIENT_SOCKETS(cs) {
 
					if (cs->client_id == from_id) {
 
						SEND_COMMAND(PACKET_SERVER_CHAT)(cs, action, (ClientID)dest, true, msg, data);
 
						break;
 
					}
 
@@ -1086,13 +1086,13 @@ void NetworkServerSendChat(NetworkAction
 
			}
 
		}
 

	
 
		ci = NetworkFindClientInfoFromClientID(from_id);
 
		ci_own = NetworkFindClientInfoFromClientID(CLIENT_ID_SERVER);
 
		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;
 
			ci_to = ci_own;
 
		}
 

	
 
		/* There is no such client */
 
		if (ci_to == NULL) break;
 
@@ -1101,13 +1101,13 @@ void NetworkServerSendChat(NetworkAction
 
		if (ci != NULL && show_local) {
 
			if (from_id == CLIENT_ID_SERVER) {
 
				char name[NETWORK_NAME_LENGTH];
 
				StringID str = IsValidCompanyID(ci_to->client_playas) ? STR_COMPANY_NAME : STR_NETWORK_SPECTATORS;
 
				SetDParam(0, ci_to->client_playas);
 
				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 {
 
				FOR_ALL_CLIENT_SOCKETS(cs) {
 
					if (cs->client_id == from_id) {
 
						SEND_COMMAND(PACKET_SERVER_CHAT)(cs, action, ci_to->client_id, true, msg, data);
 
					}
 
				}
 
@@ -1121,13 +1121,13 @@ void NetworkServerSendChat(NetworkAction
 
	case DESTTYPE_BROADCAST:
 
		FOR_ALL_CLIENT_SOCKETS(cs) {
 
			SEND_COMMAND(PACKET_SERVER_CHAT)(cs, action, from_id, false, msg, data);
 
		}
 
		ci = NetworkFindClientInfoFromClientID(from_id);
 
		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;
 
	}
 
}
 

	
 
DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_CHAT)
 
{
src/network/network_server.h
Show inline comments
 
@@ -9,13 +9,13 @@
 

	
 
DEF_SERVER_SEND_COMMAND(PACKET_SERVER_MAP);
 
DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_ERROR_QUIT)(NetworkClientSocket *cs, ClientID client_id, NetworkErrorCode errorno);
 
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_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);
 

	
 
bool NetworkServer_ReadPackets(NetworkClientSocket *cs);
 
void NetworkServer_Tick(bool send_frame);
 

	
 
#else /* ENABLE_NETWORK */
src/newgrf.cpp
Show inline comments
 
@@ -411,13 +411,13 @@ static void MapSpriteMappingRecolour(Pal
 
		ClrBit(grf_sprite->sprite, 14);
 
		SetBit(grf_sprite->sprite, PALETTE_MODIFIER_TRANSPARENT);
 
	}
 

	
 
	if (HasBit(grf_sprite->sprite, 15)) {
 
		ClrBit(grf_sprite->sprite, 15);
 
		SetBit(grf_sprite->sprite, PALETTE_MODIFIER_COLOR);
 
		SetBit(grf_sprite->sprite, PALETTE_MODIFIER_COLOUR);
 
	}
 
}
 

	
 
enum ChangeInfoResult {
 
	CIR_SUCCESS,    ///< Variable was parsed and read
 
	CIR_UNHANDLED,  ///< Variable was parsed but unread
 
@@ -2350,13 +2350,13 @@ static ChangeInfoResult IndustriesChange
 
				break;
 

	
 
			case 0x18: // Probability during gameplay
 
				indsp->appear_ingame[_settings_game.game_creation.landscape] = grf_load_byte(&buf);
 
				break;
 

	
 
			case 0x19: // Map color
 
			case 0x19: // Map colour
 
				indsp->map_colour = MapDOSColour(grf_load_byte(&buf));
 
				break;
 

	
 
			case 0x1A: // Special industry flags to define special behavior
 
				indsp->behaviour = (IndustryBehaviour)grf_load_dword(&buf);
 
				break;
 
@@ -4410,13 +4410,13 @@ static uint32 GetPatchVariable(uint8 par
 
				case 3: return 2;
 
				case 2: return 2;
 
				case 1: return 4;
 
			}
 

	
 

	
 
		/* 2CC colormap base sprite */
 
		/* 2CC colourmap base sprite */
 
		case 0x11: return SPR_2CCMAP_BASE;
 

	
 
		/* map size: format = -MABXYSS
 
		 * M  : the type of map
 
		 *       bit 0 : set   : squared map. Bit 1 is now not relevant
 
		 *               clear : rectangle map. Bit 1 will indicate the bigger edge of the map
src/newgrf_callbacks.h
Show inline comments
 
@@ -196,13 +196,13 @@ enum CallbackID {
 
	/** Called when a cargo type specified in property 20 is accepted. */
 
	CBID_HOUSE_WATCHED_CARGO_ACCEPTED    = 0x148, // 15 bit callback, not implemented
 

	
 
	/** Callback done for each tile of a station to check the slope. */
 
	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
 

	
 
	/** Customize the input cargo types of a newly build industry. */
 
	CBID_INDUSTRY_INPUT_CARGO_TYPES      = 0x14B, // 8 bit callback
 

	
 
	/** Customize the output cargo types of a newly build industry. */
src/newgrf_commons.h
Show inline comments
 
@@ -98,44 +98,44 @@ extern IndustryTileOverrideManager _indu
 

	
 
uint32 GetTerrainType(TileIndex tile);
 
TileIndex GetNearbyTile(byte parameter, 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 Not useable for OTTD internal spritelayouts from table/xxx_land.h as PALETTE_MODIFIER_TRANSPARENT is only set
 
 *       when to use the default palette.
 
 *
 
 * @param image The sprite to draw
 
 * @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
 
 */
 
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);
 
	} else {
 
		return PAL_NONE;
 
	}
 
}
 

	
 
/**
 
 * 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
 
 *       when to use the default palette.
 
 *
 
 * @param image The sprite to draw
 
 * @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
 
 */
 
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);
 
	} else {
 
		return PAL_NONE;
 
	}
 
}
 

	
src/newgrf_house.cpp
Show inline comments
 
@@ -370,13 +370,13 @@ uint16 GetHouseCallback(CallbackID callb
 
static void DrawTileLayout(const TileInfo *ti, const SpriteGroup *group, byte stage, HouseID house_id)
 
{
 
	const DrawTileSprites *dts = group->g.layout.dts;
 
	const DrawTileSeqStruct *dtss;
 

	
 
	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)) {
 
		uint16 callback = GetHouseCallback(CBID_HOUSE_COLOUR, 0, 0, house_id, GetTownByTile(ti->tile), ti->tile);
 
		if (callback != CALLBACK_FAILED) {
 
			/* If bit 14 is set, we should use a 2cc colour map, else use the callback value. */
 
			palette = HasBit(callback, 14) ? GB(callback, 0, 8) + SPR_2CCMAP_BASE : callback;
 
		}
src/newgrf_industries.cpp
Show inline comments
 
@@ -363,13 +363,13 @@ uint32 IndustryGetVariable(const Resolve
 
		case 0xA3: return GB(industry->last_month_transported[0], 8, 8);
 
		case 0xA4: return industry->last_month_transported[1];
 
		case 0xA5: return GB(industry->last_month_transported[0], 8, 8);
 

	
 
		case 0xA6: return industry->type;
 
		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 0xAA: return industry->counter;
 
		case 0xAB: return GB(industry->counter, 8, 8);
 
		case 0xAC: return industry->was_cargo_delivered;
 

	
 
		case 0xB0: return Clamp(industry->construction_date - DAYS_TILL_ORIGINAL_BASE_YEAR, 0, 65535); // Date when built since 1920 (in days)
src/newgrf_industrytiles.cpp
Show inline comments
 
@@ -160,13 +160,13 @@ static void NewIndustryTileResolver(Reso
 
	res->count           = 0;
 

	
 
	const IndustryTileSpec *its = GetIndustryTileSpec(gfx);
 
	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 DrawTileSeqStruct *dtss;
 

	
 
	SpriteID image = dts->ground.sprite;
 
	SpriteID pal   = dts->ground.pal;
 
@@ -176,13 +176,13 @@ static void IndustryDrawTileLayout(const
 
	if (GB(image, 0, SPRITE_WIDTH) != 0) {
 
		/* If the ground sprite is the default flat water sprite, draw also canal/river borders
 
		 * Do not do this if the tile's WaterClass is 'land'. */
 
		if (image == SPR_FLAT_WATER_TILE && IsIndustryTileOnWater(ti->tile)) {
 
			DrawWaterClassGround(ti);
 
		} else {
 
			DrawGroundSprite(image, GroundSpritePaletteTransform(image, pal, GENERAL_SPRITE_COLOR(rnd_color)));
 
			DrawGroundSprite(image, GroundSpritePaletteTransform(image, pal, GENERAL_SPRITE_COLOUR(rnd_colour)));
 
		}
 
	}
 

	
 
	foreach_draw_tile_seq(dtss, dts->seq) {
 
		if (GB(dtss->image.sprite, 0, SPRITE_WIDTH) == 0) continue;
 

	
 
@@ -191,13 +191,13 @@ static void IndustryDrawTileLayout(const
 

	
 
		/* Stop drawing sprite sequence once we meet a sprite that doesn't have to be opaque */
 
		if (IsInvisibilitySet(TO_INDUSTRIES) && !HasBit(image, SPRITE_MODIFIER_OPAQUE)) return;
 

	
 
		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) {
 
			AddSortableSpriteToDraw(
 
				image, pal,
 
				ti->x + dtss->delta_x, ti->y + dtss->delta_y,
 
				dtss->size_x, dtss->size_y,
 
@@ -249,13 +249,13 @@ bool DrawNewIndustryTile(TileInfo *ti, I
 
	if (group == NULL || group->type != SGT_TILELAYOUT) {
 
		return false;
 
	} else {
 
		/* Limit the building stage to the number of stages supplied. */
 
		byte stage = GetIndustryConstructionStage(ti->tile);
 
		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;
 
	}
 
}
 

	
 
extern bool IsSlopeRefused(Slope current, Slope refused);
 

	
src/newgrf_station.cpp
Show inline comments
 
@@ -777,13 +777,13 @@ bool DrawStationTile(int x, int y, RailT
 
	const StationSpec *statspec;
 
	const DrawTileSprites *sprites;
 
	const DrawTileSeqStruct *seq;
 
	const RailtypeInfo *rti = GetRailTypeInfo(railtype);
 
	SpriteID relocation;
 
	SpriteID image;
 
	SpriteID palette = COMPANY_SPRITE_COLOR(_local_company);
 
	SpriteID palette = COMPANY_SPRITE_COLOUR(_local_company);
 
	uint tile = 2;
 

	
 
	statspec = GetCustomStationSpec(sclass, station);
 
	if (statspec == NULL) return false;
 

	
 
	relocation = GetCustomStationRelocation(statspec, NULL, INVALID_TILE);
src/news_gui.cpp
Show inline comments
 
@@ -47,13 +47,13 @@ void DrawNewsNewVehicleAvail(Window *w, 
 

	
 
static void DrawNewsBankrupcy(Window *w, const NewsItem *ni)
 
{
 
	const CompanyNewsInformation *cni = (const CompanyNewsInformation*)ni->free_data;
 

	
 
	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);
 
	DrawStringMultiCenter(49, 148, STR_JUST_RAW_STRING, 94);
 

	
 
	switch (ni->subtype) {
 
		case NS_COMPANY_TROUBLE:
 
@@ -226,17 +226,17 @@ struct NewsWindow : Window {
 
					/* Back up transparency options to draw news view */
 
					TransparencyOptionBits to_backup = _transparency_opt;
 
					_transparency_opt = 0;
 
					this->DrawViewport();
 
					_transparency_opt = to_backup;
 

	
 
					/* Shade the viewport into gray, or color*/
 
					/* Shade the viewport into gray, or colour*/
 
					ViewPort *vp = this->viewport;
 
					GfxFillRect(vp->left - this->left, vp->top - this->top,
 
						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));
 
					DrawStringMultiCenter(this->width / 2, 20, this->ni->string_id, this->width - 4);
 
				}
 
				break;
 
@@ -494,14 +494,14 @@ void AddNewsItem(StringID string, NewsSu
 
	NewsItem *ni = new NewsItem;
 

	
 
	ni->string_id = string;
 
	ni->subtype = subtype;
 
	ni->flags = _news_subtype_data[subtype].flags;
 

	
 
	/* show this news message in color? */
 
	if (_cur_year >= _settings_client.gui.colored_news_year) ni->flags |= NF_INCOLOR;
 
	/* show this news message in colour? */
 
	if (_cur_year >= _settings_client.gui.coloured_news_year) ni->flags |= NF_INCOLOUR;
 

	
 
	ni->data_a = data_a;
 
	ni->data_b = data_b;
 
	ni->free_data = free_data;
 
	ni->date = _date;
 
	CopyOutDParam(ni->params, 0, lengthof(ni->params));
src/news_type.h
Show inline comments
 
@@ -65,20 +65,20 @@ enum NewsMode {
 
	NM_NORMAL   = 1, ///< Show a simple news message (height 170 pixels)
 
	NM_THIN     = 2, ///< Show a simple news message (height 130 pixels)
 
};
 

	
 
/**
 
 * Various OR-able news-item flags.
 
 * note: NF_INCOLOR is set automatically if needed
 
 * note: NF_INCOLOUR is set automatically if needed
 
 */
 
enum NewsFlag {
 
	NF_NONE      = 0,        ///< No flag is set.
 
	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_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
 
};
 
DECLARE_ENUM_AS_BIT_SET(NewsFlag);
 

	
 

	
 
/**
src/openttd.cpp
Show inline comments
 
@@ -335,13 +335,13 @@ static void LoadIntroGame()
 
	_game_mode = GM_MENU;
 

	
 
	ResetGRFConfig(false);
 

	
 
	/* Setup main window */
 
	ResetWindowSystem();
 
	SetupColorsAndInitialWindow();
 
	SetupColoursAndInitialWindow();
 

	
 
	/* Load the default opening screen savegame */
 
	if (SaveOrLoad("opntitle.dat", SL_LOAD, DATA_DIR) != SL_OK) {
 
		GenerateWorld(GW_EMPTY, 64, 64); // if failed loading, make empty world.
 
		WaitTillGeneratedWorld();
 
		SetLocalCompany(COMPANY_SPECTATOR);
 
@@ -808,13 +808,13 @@ static void StartScenario()
 
		return;
 
	}
 

	
 
	/* Reinitialize windows */
 
	ResetWindowSystem();
 

	
 
	SetupColorsAndInitialWindow();
 
	SetupColoursAndInitialWindow();
 

	
 
	ResetGRFConfig(true);
 

	
 
	/* Load game */
 
	if (SaveOrLoad(_file_to_saveload.name, _file_to_saveload.mode, SCENARIO_DIR) != SL_OK) {
 
		LoadIntroGame();
src/rail_cmd.cpp
Show inline comments
 
@@ -1880,13 +1880,13 @@ static void DrawSignals(TileIndex tile, 
 

	
 
static void DrawTile_Track(TileInfo *ti)
 
{
 
	const RailtypeInfo *rti = GetRailTypeInfo(GetRailType(ti->tile));
 
	SpriteID image;
 

	
 
	_drawtile_track_palette = COMPANY_SPRITE_COLOR(GetTileOwner(ti->tile));
 
	_drawtile_track_palette = COMPANY_SPRITE_COLOUR(GetTileOwner(ti->tile));
 

	
 
	if (IsPlainRailTile(ti->tile)) {
 
		TrackBits rails = GetTrackBits(ti->tile);
 

	
 
		DrawTrackBits(ti, rails);
 

	
 
@@ -2017,20 +2017,20 @@ default_waypoint:
 
	DrawBridgeMiddle(ti);
 
}
 

	
 

	
 
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);
 
	for (; dtss->image.sprite != 0; dtss++) {
 
		Point pt = RemapCoords(dtss->delta_x, dtss->delta_y, dtss->delta_z);
 
		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);
 
	}
 
}
 

	
 
void DrawTrainDepotSprite(int x, int y, int dir, RailType railtype)
 
{
 
	const DrawTileSprites *dts = &_depot_gfx_table[dir];
src/road_cmd.cpp
Show inline comments
 
@@ -1175,13 +1175,13 @@ static void DrawTile_Road(TileInfo *ti)
 
		}
 

	
 
		default:
 
		case ROAD_TILE_DEPOT: {
 
			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;
 
			if (HasTileRoadType(ti->tile, ROADTYPE_TRAM)) {
 
				dts =  &_tram_depot[GetRoadDepotDirection(ti->tile)];
 
			} else {
 
				dts =  &_road_depot[GetRoadDepotDirection(ti->tile)];
 
@@ -1193,13 +1193,13 @@ static void DrawTile_Road(TileInfo *ti)
 
			if (IsInvisibilitySet(TO_BUILDINGS)) break;
 

	
 
			for (const DrawTileSeqStruct *dtss = dts->seq; dtss->image.sprite != 0; dtss++) {
 
				SpriteID image = dtss->image.sprite;
 
				SpriteID pal;
 

	
 
				if (!IsTransparencySet(TO_BUILDINGS) && HasBit(image, PALETTE_MODIFIER_COLOR)) {
 
				if (!IsTransparencySet(TO_BUILDINGS) && HasBit(image, PALETTE_MODIFIER_COLOUR)) {
 
					pal = palette;
 
				} else {
 
					pal = PAL_NONE;
 
				}
 

	
 
				AddSortableSpriteToDraw(
 
@@ -1215,25 +1215,25 @@ static void DrawTile_Road(TileInfo *ti)
 
	}
 
	DrawBridgeMiddle(ti);
 
}
 

	
 
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];
 

	
 
	x += 33;
 
	y += 17;
 

	
 
	DrawSprite(dts->ground.sprite, PAL_NONE, x, y);
 

	
 
	for (const DrawTileSeqStruct *dtss = dts->seq; dtss->image.sprite != 0; dtss++) {
 
		Point pt = RemapCoords(dtss->delta_x, dtss->delta_y, dtss->delta_z);
 
		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);
 
	}
 
}
 

	
 
/** Updates cached nearest town for all road tiles
 
 * @param invalidate are we just invalidating cached data?
 
 * @pre invalidate == true implies _generating_world == true
src/roadveh_cmd.cpp
Show inline comments
 
@@ -145,13 +145,13 @@ void RoadVehUpdateCache(Vehicle *v)
 
		u->u.road.first_engine = (v == u) ? INVALID_ENGINE : v->engine_type;
 

	
 
		/* Update the length of the vehicle. */
 
		u->u.road.cached_veh_length = GetRoadVehLength(u);
 

	
 
		/* Invalidate the vehicle colour map */
 
		u->colormap = PAL_NONE;
 
		u->colourmap = PAL_NONE;
 
	}
 
}
 

	
 
/** Build a road vehicle.
 
 * @param tile tile of depot where road vehicle is built
 
 * @param flags operation to perform
src/saveload/afterload.cpp
Show inline comments
 
@@ -200,13 +200,13 @@ static inline RailType UpdateRailType(Ra
 
 * @return true if everything went according to plan, otherwise false.
 
 */
 
static bool InitializeWindowsAndCaches()
 
{
 
	/* Initialize windows */
 
	ResetWindowSystem();
 
	SetupColorsAndInitialWindow();
 
	SetupColoursAndInitialWindow();
 

	
 
	ResetViewportAfterLoadGame();
 

	
 
	/* Update coordinates of the signs. */
 
	UpdateAllStationVirtCoord();
 
	UpdateAllSignVirtCoords();
 
@@ -1751,11 +1751,11 @@ void ReloadNewGRFData()
 
	/* update station and waypoint graphics */
 
	AfterLoadWaypoints();
 
	AfterLoadStations();
 
	/* Check and update house and town values */
 
	UpdateHousesAndTowns();
 
	/* 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 */
 
	MarkWholeScreenDirty();
 
	CheckTrainsLengths();
 
}
src/saveload/company_sl.cpp
Show inline comments
 
@@ -15,13 +15,13 @@
 
 * Meaning of the bits in the old face (some bits are used in several times):
 
 * - 4 and 5: chin
 
 * - 6 to 9: eyebrows
 
 * - 10 to 13: nose
 
 * - 13 to 15: lips (also moustache for males)
 
 * - 16 to 19: hair
 
 * - 20 to 22: eye color
 
 * - 20 to 22: eye colour
 
 * - 20 to 27: tie, ear rings etc.
 
 * - 28 to 30: glasses
 
 * - 19, 26 and 27: race (bit 27 set and bit 19 equal to bit 26 = black, otherwise white)
 
 * - 31: gender (0 = male, 1 = female)
 
 *
 
 * @param face the face in the old format
src/saveload/industry_sl.cpp
Show inline comments
 
@@ -32,13 +32,13 @@ static const SaveLoad _industry_desc[] =
 
	    SLE_ARR(Industry, last_month_transported,     SLE_UINT16, 2),
 

	
 
	    SLE_VAR(Industry, counter,                    SLE_UINT16),
 

	
 
	    SLE_VAR(Industry, type,                       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_INT32,                 31, SL_MAX_VERSION),
 
	    SLE_VAR(Industry, was_cargo_delivered,        SLE_UINT8),
 

	
 
	SLE_CONDVAR(Industry, founder,                    SLE_UINT8,                 70, SL_MAX_VERSION),
 
	SLE_CONDVAR(Industry, construction_date,          SLE_INT32,                 70, SL_MAX_VERSION),
src/saveload/oldloader_sl.cpp
Show inline comments
 
@@ -850,13 +850,13 @@ static const OldChunks industry_chunk[] 
 
	OCL_SVAR( OC_UINT16, Industry, last_month_transported[0] ),
 
	OCL_SVAR( OC_UINT16, Industry, last_month_transported[1] ),
 

	
 
	OCL_SVAR(  OC_UINT8, Industry, type ),
 
	OCL_SVAR( OC_TTO | OC_FILE_U8 | OC_VAR_U16, Industry, counter ),
 
	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_UINT16, Industry, counter ),
 
	OCL_SVAR( OC_TTD | OC_UINT8, Industry, was_cargo_delivered ),
 

	
 
	OCL_CNULL( OC_TTD, 9 ), ///< Random junk at the end of this chunk
 

	
 
@@ -876,13 +876,13 @@ static bool LoadOldIndustry(LoadgameStat
 
			if (i->type == 0x0A) i->type = 0x12; // Iron Ore Mine has different ID
 

	
 
			YearMonthDay ymd;
 
			ConvertDateToYMD(_date, &ymd);
 
			i->last_prod_year = ymd.year;
 

	
 
			i->random_color = RemapTTOColour(i->random_color);
 
			i->random_colour = RemapTTOColour(i->random_colour);
 
		}
 

	
 
		IncIndustryTypeCount(i->type);
 
	} else {
 
		i->xy = INVALID_TILE;
 
	}
 
@@ -1001,13 +1001,13 @@ static bool LoadOldCompany(LoadgameState
 
		return true;
 
	}
 

	
 
	if (_savegame_type == SGT_TTO) {
 
		/* adjust manager's face */
 
		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);
 
		}
 

	
 
		/* Company name */
 
		if (_old_string_id == 0 || _old_string_id == 0x4C00) {
 
			_old_string_id = STR_SV_UNNAMED; // "Unnamed"
 
@@ -1712,13 +1712,13 @@ static const OldChunks main_chunk[] = {
 

	
 
	OCL_VAR (  OC_UINT8,    1, &_settings_game.locale.currency ),
 
	OCL_VAR (  OC_UINT8,    1, &_settings_game.locale.units ),
 
	OCL_VAR ( OC_FILE_U8 | OC_VAR_U32,    1, &_cur_company_tick_index ),
 

	
 
	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_pr ),
 
	OCL_VAR (  OC_UINT8,    1, &_economy.interest_rate ),
 
	OCL_NULL( 1 ), // available airports
 
	OCL_VAR (  OC_UINT8,    1, &_settings_game.vehicle.road_side ),
src/saveload/saveload.cpp
Show inline comments
 
@@ -1619,13 +1619,13 @@ static SaveOrLoadResult SaveFileToDisk(b
 
		return SL_OK;
 
	}
 
	catch (...) {
 
		AbortSaveLoad();
 
		if (_sl.excpt_uninit != NULL) _sl.excpt_uninit();
 

	
 
		/* Skip the "color" character */
 
		/* Skip the "colour" character */
 
		DEBUG(sl, 0, GetSaveLoadErrorString() + 3);
 

	
 
		if (threaded) {
 
			SetAsyncSaveFinish(SaveFileError);
 
		} else {
 
			SaveFileError();
 
@@ -1819,13 +1819,13 @@ SaveOrLoadResult SaveOrLoad(const char *
 
	catch (...) {
 
		AbortSaveLoad();
 

	
 
		/* deinitialize compressor. */
 
		if (_sl.excpt_uninit != NULL) _sl.excpt_uninit();
 

	
 
		/* Skip the "color" character */
 
		/* Skip the "colour" character */
 
		DEBUG(sl, 0, GetSaveLoadErrorString() + 3);
 

	
 
		/* A saver/loader exception!! reinitialize all variables to prevent crash! */
 
		return (mode == SL_LOAD) ? SL_REINIT : SL_ERROR;
 
	}
 
}
src/screenshot.cpp
Show inline comments
 
@@ -231,13 +231,13 @@ static bool MakePNGImage(const char *nam
 
	png_write_info(png_ptr, info_ptr);
 
	png_set_flush(png_ptr, 512);
 

	
 
	if (pixelformat == 32) {
 
		png_color_8 sig_bit;
 

	
 
		/* Save exact color/alpha resolution */
 
		/* Save exact colour/alpha resolution */
 
		sig_bit.alpha = 0;
 
		sig_bit.blue  = 8;
 
		sig_bit.green = 8;
 
		sig_bit.red   = 8;
 
		sig_bit.gray  = 8;
 
		png_set_sBIT(png_ptr, info_ptr, &sig_bit);
 
@@ -414,13 +414,13 @@ static bool MakePCXImage(const char *nam
 
			}
 
		}
 
	} while (y != h);
 

	
 
	free(buff);
 

	
 
	/* write 8-bit color palette */
 
	/* write 8-bit colour palette */
 
	if (fputc(12, f) == EOF) {
 
		fclose(f);
 
		return false;
 
	}
 

	
 
	/* Palette is word-aligned, copy it to a temporary byte array */
src/settings.cpp
Show inline comments
 
@@ -1367,13 +1367,13 @@ const SettingDesc _settings[] = {
 
	    SDT_BOOL(GameSettings, economy.multiple_industry_per_town,                                  0, 0, false,                    STR_CONFIG_SETTING_MULTIPINDTOWN,          NULL),
 
	    SDT_BOOL(GameSettings, economy.same_industry_close,                                         0, 0, false,                    STR_CONFIG_SETTING_SAMEINDCLOSE,           NULL),
 
	    SDT_BOOL(GameSettings, economy.bribe,                                                       0, 0,  true,                    STR_CONFIG_SETTING_BRIBE,                  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_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_CONDNULL(                                                            4,  0, 104),
 
	    SDT_BOOL(GameSettings, economy.smooth_economy,                                              0, 0,  true,                    STR_CONFIG_SETTING_SMOOTH_ECONOMY,         NULL),
 
	    SDT_BOOL(GameSettings, economy.allow_shares,                                                0, 0, false,                    STR_CONFIG_SETTING_ALLOW_SHARES,           NULL),
 
	 SDT_CONDVAR(GameSettings, economy.town_growth_rate,             SLE_UINT8, 54, SL_MAX_VERSION, 0, MS,    2,     0,       4, 0, STR_CONFIG_SETTING_TOWN_GROWTH,            NULL),
 
	 SDT_CONDVAR(GameSettings, economy.larger_towns,                 SLE_UINT8, 54, SL_MAX_VERSION, 0, D0,    4,     0,     255, 1, STR_CONFIG_SETTING_LARGER_TOWNS,           NULL),
src/settings_gui.cpp
Show inline comments
 
@@ -883,13 +883,13 @@ void SettingEntry::DrawSetting(GameSetti
 
	/* We do not allow changes of some items when we are a client in a networkgame */
 
	if (!(sd->save.conv & SLF_NETWORK_NO) && _networking && !_network_server) editable = false;
 
	if ((sdb->flags & SGF_NETWORK_ONLY) && !_networking) editable = false;
 
	if ((sdb->flags & SGF_NO_NETWORK) && _networking) editable = false;
 

	
 
	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 */
 
		bool on = (*(bool*)var);
 

	
 
		DrawFrameRect(x, y, x + 19, y + 8, _bool_ctabs[!!on][!!editable], on ? FR_LOWERED : FR_NONE);
 
		SetDParam(0, on ? STR_CONFIG_SETTING_ON : STR_CONFIG_SETTING_OFF);
 
	} else {
 
@@ -1044,13 +1044,13 @@ static SettingEntry _settings_ui[] = {
 
	SettingEntry("gui.advanced_vehicle_list"),
 
	SettingEntry("gui.timetable_in_ticks"),
 
	SettingEntry("gui.quick_goto"),
 
	SettingEntry("gui.default_rail_type"),
 
	SettingEntry("gui.always_build_infrastructure"),
 
	SettingEntry("gui.persistent_buildingtools"),
 
	SettingEntry("gui.colored_news_year"),
 
	SettingEntry("gui.coloured_news_year"),
 
};
 
/** Interface subpage */
 
static SettingsPage _settings_ui_page = {_settings_ui, lengthof(_settings_ui)};
 

	
 
static SettingEntry _settings_construction_signals[] = {
 
	SettingEntry("construction.signal_side"),
src/settings_type.h
Show inline comments
 
@@ -67,13 +67,13 @@ struct GUISettings {
 
	uint8  right_mouse_btn_emulation;        ///< should we emulate right mouse clicking?
 
	uint8  scrollwheel_scrolling;            ///< scrolling using the scroll wheel?
 
	uint8  scrollwheel_multiplier;           ///< how much 'wheel' per incoming event from the OS?
 
	bool   left_mouse_btn_scrolling;         ///< left mouse button scroll
 
	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
 
	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   quick_goto;                       ///< Allow quick access to 'goto button' in vehicle orders window
 
	bool   bridge_pillars;                   ///< show bridge pillars for high bridges
 
	bool   auto_euro;                        ///< automatically switch to euro in 2002
 
	byte   drag_signals_density;             ///< many signals density
 
	Year   semaphore_build_before;           ///< build semaphore signals automatically before this year
src/ship_cmd.cpp
Show inline comments
 
@@ -939,13 +939,13 @@ CommandCost CmdRefitShip(TileIndex tile,
 

	
 
	if (flags & DC_EXEC) {
 
		v->cargo_cap = capacity;
 
		v->cargo.Truncate((v->cargo_type == new_cid) ? capacity : 0);
 
		v->cargo_type = new_cid;
 
		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_DEPOT, v->tile);
 
		InvalidateWindowClassesData(WC_SHIPS_LIST, 0);
 
	}
 

	
 
	return cost;
src/smallmap_gui.cpp
Show inline comments
 
@@ -47,26 +47,26 @@ static const Widget _smallmap_widgets[] 
 
{  WIDGETS_END},
 
};
 

	
 
/* number of used industries */
 
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}
 
/** 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}
 
/** Macro for break marker in arrays of LegendAndColor.
 
/** Macro for break marker in arrays of LegendAndColour.
 
 * It will have valid data, though */
 
#define MS(a, b) {a, b, INVALID_INDUSTRYTYPE, true, false, true}
 

	
 
/** Structure for holding relevant data for legends in small map */
 
struct LegendAndColour {
 
	uint16 colour;     ///< color of the item on the map
 
	StringID legend;   ///< string corresponding to the colored item
 
	uint16 colour;     ///< colour of the item on the map
 
	StringID legend;   ///< string corresponding to the coloured item
 
	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 col_break;    ///< perform a break and go one collumn further
 
};
 

	
 
/** Legend text giving the colours to look for on the minimap */
 
static const LegendAndColour _legend_land_contours[] = {
 
@@ -177,34 +177,34 @@ static const LegendAndColour * const _le
 
	_legend_from_industries,
 
	_legend_routes,
 
	_legend_vegetation,
 
	_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
 
 */
 
static const uint32 _map_height_bits[] = {
 
	MKCOLOR(0x5A5A5A5A),
 
	MKCOLOR(0x5A5B5A5B),
 
	MKCOLOR(0x5B5B5B5B),
 
	MKCOLOR(0x5B5C5B5C),
 
	MKCOLOR(0x5C5C5C5C),
 
	MKCOLOR(0x5C5D5C5D),
 
	MKCOLOR(0x5D5D5D5D),
 
	MKCOLOR(0x5D5E5D5E),
 
	MKCOLOR(0x5E5E5E5E),
 
	MKCOLOR(0x5E5F5E5F),
 
	MKCOLOR(0x5F5F5F5F),
 
	MKCOLOR(0x5F1F5F1F),
 
	MKCOLOR(0x1F1F1F1F),
 
	MKCOLOR(0x1F271F27),
 
	MKCOLOR(0x27272727),
 
	MKCOLOR(0x27272727),
 
	MKCOLOUR(0x5A5A5A5A),
 
	MKCOLOUR(0x5A5B5A5B),
 
	MKCOLOUR(0x5B5B5B5B),
 
	MKCOLOUR(0x5B5C5B5C),
 
	MKCOLOUR(0x5C5C5C5C),
 
	MKCOLOUR(0x5C5D5C5D),
 
	MKCOLOUR(0x5D5D5D5D),
 
	MKCOLOUR(0x5D5E5D5E),
 
	MKCOLOUR(0x5E5E5E5E),
 
	MKCOLOUR(0x5E5F5E5F),
 
	MKCOLOUR(0x5F5F5F5F),
 
	MKCOLOUR(0x5F1F5F1F),
 
	MKCOLOUR(0x1F1F1F1F),
 
	MKCOLOUR(0x1F271F27),
 
	MKCOLOUR(0x27272727),
 
	MKCOLOUR(0x27272727),
 
};
 
assert_compile(lengthof(_map_height_bits) == MAX_TILE_HEIGHT + 1);
 

	
 
struct AndOr {
 
	uint32 mor;
 
	uint32 mand;
 
@@ -214,54 +214,54 @@ static inline uint32 ApplyMask(uint32 co
 
{
 
	return (colour & mask->mand) | mask->mor;
 
}
 

	
 

	
 
static const AndOr _smallmap_contours_andor[] = {
 
	{MKCOLOR(0x00000000), MKCOLOR(0xFFFFFFFF)},
 
	{MKCOLOR(0x000A0A00), MKCOLOR(0xFF0000FF)},
 
	{MKCOLOR(0x00D7D700), MKCOLOR(0xFF0000FF)},
 
	{MKCOLOR(0x00B5B500), MKCOLOR(0xFF0000FF)},
 
	{MKCOLOR(0x00000000), MKCOLOR(0xFFFFFFFF)},
 
	{MKCOLOR(0x98989898), MKCOLOR(0x00000000)},
 
	{MKCOLOR(0xCACACACA), MKCOLOR(0x00000000)},
 
	{MKCOLOR(0x00000000), MKCOLOR(0xFFFFFFFF)},
 
	{MKCOLOR(0xB5B5B5B5), MKCOLOR(0x00000000)},
 
	{MKCOLOR(0x00000000), MKCOLOR(0xFFFFFFFF)},
 
	{MKCOLOR(0x00B5B500), MKCOLOR(0xFF0000FF)},
 
	{MKCOLOR(0x000A0A00), MKCOLOR(0xFF0000FF)},
 
	{MKCOLOUR(0x00000000), MKCOLOUR(0xFFFFFFFF)},
 
	{MKCOLOUR(0x000A0A00), MKCOLOUR(0xFF0000FF)},
 
	{MKCOLOUR(0x00D7D700), MKCOLOUR(0xFF0000FF)},
 
	{MKCOLOUR(0x00B5B500), MKCOLOUR(0xFF0000FF)},
 
	{MKCOLOUR(0x00000000), MKCOLOUR(0xFFFFFFFF)},
 
	{MKCOLOUR(0x98989898), MKCOLOUR(0x00000000)},
 
	{MKCOLOUR(0xCACACACA), MKCOLOUR(0x00000000)},
 
	{MKCOLOUR(0x00000000), MKCOLOUR(0xFFFFFFFF)},
 
	{MKCOLOUR(0xB5B5B5B5), MKCOLOUR(0x00000000)},
 
	{MKCOLOUR(0x00000000), MKCOLOUR(0xFFFFFFFF)},
 
	{MKCOLOUR(0x00B5B500), MKCOLOUR(0xFF0000FF)},
 
	{MKCOLOUR(0x000A0A00), MKCOLOUR(0xFF0000FF)},
 
};
 

	
 
static const AndOr _smallmap_vehicles_andor[] = {
 
	{MKCOLOR(0x00000000), MKCOLOR(0xFFFFFFFF)},
 
	{MKCOLOR(0x00D7D700), MKCOLOR(0xFF0000FF)},
 
	{MKCOLOR(0x00D7D700), MKCOLOR(0xFF0000FF)},
 
	{MKCOLOR(0x00B5B500), MKCOLOR(0xFF0000FF)},
 
	{MKCOLOR(0x00000000), MKCOLOR(0xFFFFFFFF)},
 
	{MKCOLOR(0x00D7D700), MKCOLOR(0xFF0000FF)},
 
	{MKCOLOR(0xCACACACA), MKCOLOR(0x00000000)},
 
	{MKCOLOR(0x00000000), MKCOLOR(0xFFFFFFFF)},
 
	{MKCOLOR(0xB5B5B5B5), MKCOLOR(0x00000000)},
 
	{MKCOLOR(0x00000000), MKCOLOR(0xFFFFFFFF)},
 
	{MKCOLOR(0x00B5B500), MKCOLOR(0xFF0000FF)},
 
	{MKCOLOR(0x00D7D700), MKCOLOR(0xFF0000FF)},
 
	{MKCOLOUR(0x00000000), MKCOLOUR(0xFFFFFFFF)},
 
	{MKCOLOUR(0x00D7D700), MKCOLOUR(0xFF0000FF)},
 
	{MKCOLOUR(0x00D7D700), MKCOLOUR(0xFF0000FF)},
 
	{MKCOLOUR(0x00B5B500), MKCOLOUR(0xFF0000FF)},
 
	{MKCOLOUR(0x00000000), MKCOLOUR(0xFFFFFFFF)},
 
	{MKCOLOUR(0x00D7D700), MKCOLOUR(0xFF0000FF)},
 
	{MKCOLOUR(0xCACACACA), MKCOLOUR(0x00000000)},
 
	{MKCOLOUR(0x00000000), MKCOLOUR(0xFFFFFFFF)},
 
	{MKCOLOUR(0xB5B5B5B5), MKCOLOUR(0x00000000)},
 
	{MKCOLOUR(0x00000000), MKCOLOUR(0xFFFFFFFF)},
 
	{MKCOLOUR(0x00B5B500), MKCOLOUR(0xFF0000FF)},
 
	{MKCOLOUR(0x00D7D700), MKCOLOUR(0xFF0000FF)},
 
};
 

	
 
static const AndOr _smallmap_vegetation_andor[] = {
 
	{MKCOLOR(0x00000000), MKCOLOR(0xFFFFFFFF)},
 
	{MKCOLOR(0x00D7D700), MKCOLOR(0xFF0000FF)},
 
	{MKCOLOR(0x00D7D700), MKCOLOR(0xFF0000FF)},
 
	{MKCOLOR(0x00B5B500), MKCOLOR(0xFF0000FF)},
 
	{MKCOLOR(0x00575700), MKCOLOR(0xFF0000FF)},
 
	{MKCOLOR(0x00D7D700), MKCOLOR(0xFF0000FF)},
 
	{MKCOLOR(0xCACACACA), MKCOLOR(0x00000000)},
 
	{MKCOLOR(0x00000000), MKCOLOR(0xFFFFFFFF)},
 
	{MKCOLOR(0xB5B5B5B5), MKCOLOR(0x00000000)},
 
	{MKCOLOR(0x00000000), MKCOLOR(0xFFFFFFFF)},
 
	{MKCOLOR(0x00B5B500), MKCOLOR(0xFF0000FF)},
 
	{MKCOLOR(0x00D7D700), MKCOLOR(0xFF0000FF)},
 
	{MKCOLOUR(0x00000000), MKCOLOUR(0xFFFFFFFF)},
 
	{MKCOLOUR(0x00D7D700), MKCOLOUR(0xFF0000FF)},
 
	{MKCOLOUR(0x00D7D700), MKCOLOUR(0xFF0000FF)},
 
	{MKCOLOUR(0x00B5B500), MKCOLOUR(0xFF0000FF)},
 
	{MKCOLOUR(0x00575700), MKCOLOUR(0xFF0000FF)},
 
	{MKCOLOUR(0x00D7D700), MKCOLOUR(0xFF0000FF)},
 
	{MKCOLOUR(0xCACACACA), MKCOLOUR(0x00000000)},
 
	{MKCOLOUR(0x00000000), MKCOLOUR(0xFFFFFFFF)},
 
	{MKCOLOUR(0xB5B5B5B5), MKCOLOUR(0x00000000)},
 
	{MKCOLOUR(0x00000000), MKCOLOUR(0xFFFFFFFF)},
 
	{MKCOLOUR(0x00B5B500), MKCOLOUR(0xFF0000FF)},
 
	{MKCOLOUR(0x00D7D700), MKCOLOUR(0xFF0000FF)},
 
};
 

	
 
typedef uint32 GetSmallMapPixels(TileIndex tile); // typedef callthrough function
 

	
 
/**
 
 * Draws one column of the small map in a certain mode onto the screen buffer. This
 
@@ -325,141 +325,141 @@ static inline TileType GetEffectiveTileT
 
		}
 
	}
 
	return t;
 
}
 

	
 
/**
 
 * Return the color 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.
 
 * @return The color of tile 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 colour.
 
 * @return The colour of tile in the small map in mode "Contour"
 
 */
 
static inline uint32 GetSmallMapContoursPixels(TileIndex tile)
 
{
 
	TileType t = GetEffectiveTileType(tile);
 

	
 
	return
 
		ApplyMask(_map_height_bits[TileHeight(tile)], &_smallmap_contours_andor[t]);
 
}
 

	
 
/**
 
 * 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.
 
 * @return The color of tile in the small map in mode "Vehicles"
 
 * @param tile The tile of which we would like to get the colour.
 
 * @return The colour of tile in the small map in mode "Vehicles"
 
 */
 
static inline uint32 GetSmallMapVehiclesPixels(TileIndex 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.
 
 * @return The color of tile in the small map in mode "Industries"
 
 * @param tile The tile of which we would like to get the colour.
 
 * @return The colour of tile in the small map in mode "Industries"
 
 */
 
static inline uint32 GetSmallMapIndustriesPixels(TileIndex tile)
 
{
 
	TileType t = GetEffectiveTileType(tile);
 

	
 
	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) {
 
			return GetIndustrySpec(GetIndustryByTile(tile)->type)->map_colour * 0x01010101;
 
		} else {
 
			/* otherwise, return the color of the clear tiles, which will make it disappear */
 
			return ApplyMask(MKCOLOR(0x54545454), &_smallmap_vehicles_andor[MP_CLEAR]);
 
			/* otherwise, return the colour of the clear tiles, which will make it disappear */
 
			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.
 
 * @return The color of tile  in the small map in mode "Routes"
 
 * @param tile The tile of which we would like to get the colour.
 
 * @return The colour of tile  in the small map in mode "Routes"
 
 */
 
static inline uint32 GetSmallMapRoutesPixels(TileIndex tile)
 
{
 
	TileType t = GetEffectiveTileType(tile);
 
	uint32 bits;
 

	
 
	if (t == MP_STATION) {
 
		switch (GetStationType(tile)) {
 
			case STATION_RAIL:    bits = MKCOLOR(0x56565656); break;
 
			case STATION_AIRPORT: bits = MKCOLOR(0xB8B8B8B8); break;
 
			case STATION_TRUCK:   bits = MKCOLOR(0xC2C2C2C2); break;
 
			case STATION_BUS:     bits = MKCOLOR(0xBFBFBFBF); break;
 
			case STATION_DOCK:    bits = MKCOLOR(0x98989898); break;
 
			default:              bits = MKCOLOR(0xFFFFFFFF); break;
 
			case STATION_RAIL:    bits = MKCOLOUR(0x56565656); break;
 
			case STATION_AIRPORT: bits = MKCOLOUR(0xB8B8B8B8); break;
 
			case STATION_TRUCK:   bits = MKCOLOUR(0xC2C2C2C2); break;
 
			case STATION_BUS:     bits = MKCOLOUR(0xBFBFBFBF); break;
 
			case STATION_DOCK:    bits = MKCOLOUR(0x98989898); break;
 
			default:              bits = MKCOLOUR(0xFFFFFFFF); break;
 
		}
 
	} else {
 
		/* ground color */
 
		bits = ApplyMask(MKCOLOR(0x54545454), &_smallmap_contours_andor[t]);
 
		/* ground colour */
 
		bits = ApplyMask(MKCOLOUR(0x54545454), &_smallmap_contours_andor[t]);
 
	}
 
	return bits;
 
}
 

	
 

	
 
static const uint32 _vegetation_clear_bits[] = {
 
	MKCOLOR(0x54545454), ///< full grass
 
	MKCOLOR(0x52525252), ///< rough land
 
	MKCOLOR(0x0A0A0A0A), ///< rocks
 
	MKCOLOR(0x25252525), ///< fields
 
	MKCOLOR(0x98989898), ///< snow
 
	MKCOLOR(0xC2C2C2C2), ///< desert
 
	MKCOLOR(0x54545454), ///< unused
 
	MKCOLOR(0x54545454), ///< unused
 
	MKCOLOUR(0x54545454), ///< full grass
 
	MKCOLOUR(0x52525252), ///< rough land
 
	MKCOLOUR(0x0A0A0A0A), ///< rocks
 
	MKCOLOUR(0x25252525), ///< fields
 
	MKCOLOUR(0x98989898), ///< snow
 
	MKCOLOUR(0xC2C2C2C2), ///< desert
 
	MKCOLOUR(0x54545454), ///< unused
 
	MKCOLOUR(0x54545454), ///< unused
 
};
 

	
 
static inline uint32 GetSmallMapVegetationPixels(TileIndex tile)
 
{
 
	TileType t = GetEffectiveTileType(tile);
 
	uint32 bits;
 

	
 
	switch (t) {
 
		case MP_CLEAR:
 
			if (IsClearGround(tile, CLEAR_GRASS) && GetClearDensity(tile) < 3) {
 
				bits = MKCOLOR(0x37373737);
 
				bits = MKCOLOUR(0x37373737);
 
			} else {
 
				bits = _vegetation_clear_bits[GetClearGround(tile)];
 
			}
 
			break;
 

	
 
		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;
 

	
 
		case MP_TREES:
 
			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 {
 
				bits = MKCOLOR(0x54575754);
 
				bits = MKCOLOUR(0x54575754);
 
			}
 
			break;
 

	
 
		default:
 
			bits = ApplyMask(MKCOLOR(0x54545454), &_smallmap_vehicles_andor[t]);
 
			bits = ApplyMask(MKCOLOUR(0x54545454), &_smallmap_vehicles_andor[t]);
 
			break;
 
	}
 

	
 
	return bits;
 
}
 

	
 

	
 
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.
 
 * @return The color of tile in the small map in mode "Owner"
 
 * @param tile The tile of which we would like to get the colour.
 
 * @return The colour of tile in the small map in mode "Owner"
 
 */
 
static inline uint32 GetSmallMapOwnerPixels(TileIndex tile)
 
{
 
	Owner o;
 

	
 
	switch (GetTileType(tile)) {
 
@@ -469,26 +469,26 @@ static inline uint32 GetSmallMapOwnerPix
 
		/* FIXME: For MP_ROAD there are multiple owners.
 
		 * GetTileOwner returns the rail owner (level crossing) resp. the owner of ROADTYPE_ROAD (normal road),
 
		 * even if there are no ROADTYPE_ROAD bits on the tile.
 
		 */
 
	}
 

	
 
	return _owner_colors[o];
 
	return _owner_colours[o];
 
}
 

	
 

	
 
static const uint32 _smallmap_mask_left[3] = {
 
	MKCOLOR(0xFF000000),
 
	MKCOLOR(0xFFFF0000),
 
	MKCOLOR(0xFFFFFF00),
 
	MKCOLOUR(0xFF000000),
 
	MKCOLOUR(0xFFFF0000),
 
	MKCOLOUR(0xFFFFFF00),
 
};
 

	
 
static const uint32 _smallmap_mask_right[] = {
 
	MKCOLOR(0x000000FF),
 
	MKCOLOR(0x0000FFFF),
 
	MKCOLOR(0x00FFFFFF),
 
	MKCOLOUR(0x000000FF),
 
	MKCOLOUR(0x0000FFFF),
 
	MKCOLOUR(0x00FFFFFF),
 
};
 

	
 
/* each tile has 4 x pixels and 1 y pixel */
 

	
 
static GetSmallMapPixels *_smallmap_draw_procs[] = {
 
	GetSmallMapContoursPixels,
 
@@ -496,13 +496,13 @@ static GetSmallMapPixels *_smallmap_draw
 
	GetSmallMapIndustriesPixels,
 
	GetSmallMapRoutesPixels,
 
	GetSmallMapVegetationPixels,
 
	GetSmallMapOwnerPixels,
 
};
 

	
 
static const byte _vehicle_type_colors[6] = {
 
static const byte _vehicle_type_colours[6] = {
 
	184, 191, 152, 15, 215, 184
 
};
 

	
 

	
 
static void DrawVertMapIndicator(int x, int y, int x2, int y2)
 
{
 
@@ -561,13 +561,13 @@ public:
 
	/**
 
	 * Draws the small map.
 
	 *
 
	 * 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.
 
	 * 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>
 
	 *
 
	 * @param dpi pointer to pixel to write onto
 
	 * @param w pointer to Window struct
 
	 * @param type type of map requested (vegetation, owners, routes, etc)
 
	 * @param show_towns true if the town names should be displayed, false if not.
 
@@ -589,21 +589,21 @@ public:
 
		GfxFillRect(dpi->left, dpi->top, dpi->left + dpi->width - 1, dpi->top + dpi->height - 1, 0);
 

	
 
		/* setup owner table */
 
		if (this->map_type == SMT_OWNER) {
 
			const Company *c;
 

	
 
			/* fill with some special colors */
 
			_owner_colors[OWNER_TOWN] = MKCOLOR(0xB4B4B4B4);
 
			_owner_colors[OWNER_NONE] = MKCOLOR(0x54545454);
 
			_owner_colors[OWNER_WATER] = MKCOLOR(0xCACACACA);
 
			_owner_colors[OWNER_END]   = MKCOLOR(0x20202020); /* industry */
 
			/* fill with some special colours */
 
			_owner_colours[OWNER_TOWN] = MKCOLOUR(0xB4B4B4B4);
 
			_owner_colours[OWNER_NONE] = MKCOLOUR(0x54545454);
 
			_owner_colours[OWNER_WATER] = MKCOLOUR(0xCACACACA);
 
			_owner_colours[OWNER_END]   = MKCOLOUR(0x20202020); /* industry */
 

	
 
			/* now fill with the company colours */
 
			FOR_ALL_COMPANIES(c) {
 
				_owner_colors[c->index] =
 
				_owner_colours[c->index] =
 
					_colour_gradient[c->colour][5] * 0x01010101;
 
			}
 
		}
 

	
 
		tile_x = this->scroll_x / TILE_SIZE;
 
		tile_y = this->scroll_y / TILE_SIZE;
 
@@ -672,13 +672,13 @@ public:
 
		}
 

	
 
		/* draw vehicles? */
 
		if (this->map_type == SMT_CONTOUR || this->map_type == SMT_VEHICLES) {
 
			Vehicle *v;
 
			bool skip;
 
			byte color;
 
			byte colour;
 

	
 
			FOR_ALL_VEHICLES(v) {
 
				if (v->type != VEH_EFFECT &&
 
						(v->vehstatus & (VS_HIDDEN | VS_UNCLICKABLE)) == 0) {
 
					/* Remap into flat coordinates. */
 
					Point pt = RemapCoords(
 
@@ -706,18 +706,18 @@ public:
 
					} else if (x >= dpi->width - 1) {
 
						/* Check if we're at the very right edge, and if so draw only a single pixel */
 
						if (x != dpi->width - 1) continue;
 
						skip = true;
 
					}
 

	
 
					/* Calculate pointer to pixel and the color */
 
					color = (this->map_type == SMT_VEHICLES) ? _vehicle_type_colors[v->type] : 0xF;
 
					/* Calculate pointer to pixel and the colour */
 
					colour = (this->map_type == SMT_VEHICLES) ? _vehicle_type_colours[v->type] : 0xF;
 

	
 
					/* And draw either one or two pixels depending on clipping */
 
					blitter->SetPixel(dpi->dst_ptr, x, y, color);
 
					if (!skip) blitter->SetPixel(dpi->dst_ptr, x + 1, y, color);
 
					blitter->SetPixel(dpi->dst_ptr, x, y, colour);
 
					if (!skip) blitter->SetPixel(dpi->dst_ptr, x + 1, y, colour);
 
				}
 
			}
 
		}
 

	
 
		if (this->show_towns) {
 
			const Town *t;
 
@@ -852,25 +852,25 @@ public:
 
				/* Industry name must be formated, since it's not in tiny font in the specs.
 
				 * So, draw with a parameter and use the STR_SMALLMAP_INDUSTRY string, which is tiny font.*/
 
				SetDParam(0, tbl->legend);
 
				assert(tbl->type < NUM_INDUSTRYTYPES);
 
				SetDParam(1, _industry_counts[tbl->type]);
 
				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 */
 
					DrawString(x + 11, y, STR_SMALLMAP_INDUSTRY, TC_GREY);
 
				} else {
 
					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 {
 
				/* Anything that is not an industry is using normal process */
 
				GfxFillRect(x, y + 1, x + 8, y + 5, 0);
 
				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;
 
		}
 

	
 
		const Widget *wi = &this->widget[SM_WIDGET_MAP];
 
		if (!FillDrawPixelInfo(&new_dpi, wi->left + 1, wi->top + 1, wi->right - wi->left - 1, wi->bottom - wi->top - 1)) return;
src/sprite.h
Show inline comments
 
@@ -4,14 +4,14 @@
 

	
 
#ifndef SPRITE_H
 
#define SPRITE_H
 

	
 
#include "gfx_type.h"
 

	
 
#define GENERAL_SPRITE_COLOR(color) ((color) + PALETTE_RECOLOR_START)
 
#define COMPANY_SPRITE_COLOR(owner) (GENERAL_SPRITE_COLOR(_company_colours[owner]))
 
#define GENERAL_SPRITE_COLOUR(colour) ((colour) + PALETTE_RECOLOUR_START)
 
#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
 
 * (either supplied by OpenTTD or supplied by the user).
 
 *
 
 * @param sprite The sprite to check
src/spritecache.cpp
Show inline comments
 
@@ -171,13 +171,13 @@ static void *ReadSprite(SpriteCache *sc,
 
	FioSeekToFile(file_slot, file_pos);
 

	
 
	/* Read the size and type */
 
	int num  = FioReadWord();
 
	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));
 
	if (type == 0xFF) {
 
		/* "Normal" recolour sprites are ALWAYS 257 bytes. Then there is a small
 
		 * number of recolour sprites that are 17 bytes that only exist in DOS
 
		 * GRFs which are the same as 257 byte recolour sprites, but with the last
 
		 * 240 bytes zeroed.  */
src/spriteloader/grf.cpp
Show inline comments
 
@@ -38,13 +38,13 @@ bool SpriteLoaderGrf::LoadSprite(SpriteL
 
	FioSeekToFile(file_slot, file_pos);
 

	
 
	/* Read the size and type */
 
	int num = FioReadWord();
 
	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;
 

	
 
	sprite->height = FioReadByte();
 
	sprite->width  = FioReadWord();
 
	sprite->x_offs = FioReadWord();
 
	sprite->y_offs = FioReadWord();
src/spriteloader/png.cpp
Show inline comments
 
@@ -46,13 +46,13 @@ static bool OpenPNGFile(const char *file
 

	
 
static bool LoadPNG(SpriteLoader::Sprite *sprite, const char *filename, uint32 id, volatile bool mask)
 
{
 
	png_byte header[8];
 
	png_structp png_ptr;
 
	png_infop info_ptr, end_info;
 
	uint bit_depth, color_type;
 
	uint bit_depth, colour_type;
 
	uint i, pixelsize;
 
	png_bytep row_pointer;
 
	SpriteLoader::CommonPixel *dst;
 

	
 
	if (!OpenPNGFile(filename, id, mask)) return mask; // If mask is true, and file not found, continue true anyway, as it isn't a show-stopper
 

	
 
@@ -103,32 +103,32 @@ static bool LoadPNG(SpriteLoader::Sprite
 
		sprite->height = info_ptr->height;
 
		sprite->width  = info_ptr->width;
 
		sprite->data = CallocT<SpriteLoader::CommonPixel>(sprite->width * sprite->height);
 
	}
 

	
 
	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);
 
		return true;
 
	}
 

	
 
	if (!mask) {
 
		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);
 
			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);
 
			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);
 
		}
 

	
 
		pixelsize = sizeof(uint32);
 
	} else {
 
		pixelsize = sizeof(uint8);
 
@@ -148,13 +148,13 @@ static bool LoadPNG(SpriteLoader::Sprite
 
		for (uint x = 0; x < info_ptr->width; x++) {
 
			if (mask) {
 
				if (row_pointer[x * sizeof(uint8)] != 0) {
 
					dst[x].r = 0;
 
					dst[x].g = 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)];
 
				}
 
			} else {
 
				dst[x].r = row_pointer[x * sizeof(uint32) + 0];
 
				dst[x].g = row_pointer[x * sizeof(uint32) + 1];
 
				dst[x].b = row_pointer[x * sizeof(uint32) + 2];
src/station_cmd.cpp
Show inline comments
 
@@ -2327,13 +2327,13 @@ static void DrawTile_Station(TileInfo *t
 
	const Station *st = NULL;
 
	const StationSpec *statspec = NULL;
 
	Owner owner = GetTileOwner(ti->tile);
 

	
 
	SpriteID palette;
 
	if (IsValidCompanyID(owner)) {
 
		palette = COMPANY_SPRITE_COLOR(owner);
 
		palette = COMPANY_SPRITE_COLOUR(owner);
 
	} else {
 
		/* Some stations are not owner by a company, namely oil rigs */
 
		palette = PALETTE_TO_GREY;
 
	}
 

	
 
	/* don't show foundation for docks */
 
@@ -2434,22 +2434,22 @@ static void DrawTile_Station(TileInfo *t
 
	}
 
}
 

	
 
void StationPickerDrawSprite(int x, int y, StationType st, RailType railtype, RoadType roadtype, int image)
 
{
 
	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];
 

	
 
	if (railtype != INVALID_RAILTYPE) {
 
		const RailtypeInfo *rti = GetRailTypeInfo(railtype);
 
		total_offset = rti->total_offset;
 
	}
 

	
 
	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) {
 
		DrawSprite(SPR_TRAMWAY_TRAM + (t->ground.sprite == SPR_ROAD_PAVED_STRAIGHT_X ? 1 : 0), PAL_NONE, x, y);
 
	}
 

	
 
	const DrawTileSeqStruct *dtss;
src/strings.cpp
Show inline comments
 
@@ -1574,18 +1574,18 @@ void CheckForMissingGlyphsInLoadedLangua
 
						/*
 
						 * The character is printable, but not in the normal font.
 
						 * This is the case we were testing for. In this case we
 
						 * have to show the error. As we do not want the string to
 
						 * be translated by the translators, we 'force' it into the
 
						 * binary and 'load' it via a BindCString. To do this
 
						 * properly we have to set the color of the string,
 
						 * otherwise we end up with a lot of artefacts. The color
 
						 * properly we have to set the colour of the string,
 
						 * otherwise we end up with a lot of artefacts. The colour
 
						 * 'character' might change in the future, so for safety
 
						 * we just Utf8 Encode it into the string, which takes
 
						 * 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.");
 
						Utf8Encode(err_str, SCC_YELLOW);
 
						SetDParamStr(0, err_str);
 
						ShowErrorMessage(INVALID_STRING_ID, STR_JUST_RAW_STRING, 0, 0);
 
						return;
 
@@ -1600,18 +1600,18 @@ void CheckForMissingGlyphsInLoadedLangua
 
	/*
 
	 * For right-to-left languages we need the ICU library. If
 
	 * we do not have support for that library we warn the user
 
	 * about it with a message. As we do not want the string to
 
	 * be translated by the translators, we 'force' it into the
 
	 * binary and 'load' it via a BindCString. To do this
 
	 * properly we have to set the color of the string,
 
	 * otherwise we end up with a lot of artefacts. The color
 
	 * properly we have to set the colour of the string,
 
	 * otherwise we end up with a lot of artefacts. The colour
 
	 * 'character' might change in the future, so for safety
 
	 * we just Utf8 Encode it into the string, which takes
 
	 * exactly three characters, so it replaces the "XXX" with
 
	 * the color marker.
 
	 * the colour marker.
 
	 */
 
	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.");
 
		Utf8Encode(err_str, SCC_YELLOW);
 
		SetDParamStr(0, err_str);
 
		ShowErrorMessage(INVALID_STRING_ID, STR_JUST_RAW_STRING, 0, 0);
src/table/industry_land.h
Show inline comments
 
@@ -112,32 +112,32 @@ static const DrawBuildingsTileStruct _in
 
	M(     0x81d, PAL_NONE,      0x81a, PAL_NONE,  0,  0, 16, 16,  31, 0),
 
	M(     0x81d, PAL_NONE,      0x81b, PAL_NONE,  0,  0, 16, 16,  39, 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,     0x81f | (1 << PALETTE_MODIFIER_COLOR), 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(     0x58c, PAL_NONE,     0x820 | (1 << PALETTE_MODIFIER_COLOR), 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,     0x822 | (1 << PALETTE_MODIFIER_COLOR), 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(     0x58c, PAL_NONE,     0x823 | (1 << PALETTE_MODIFIER_COLOR), 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,     0x825 | (1 << PALETTE_MODIFIER_COLOR), 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(     0x58c, PAL_NONE,     0x826 | (1 << PALETTE_MODIFIER_COLOR), 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,     0x828 | (1 << PALETTE_MODIFIER_COLOR), 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(     0x58c, PAL_NONE,     0x829 | (1 << PALETTE_MODIFIER_COLOR), 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,     0x82b | (1 << PALETTE_MODIFIER_COLOR), 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(     0x58c, PAL_NONE,     0x82c | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE,  0,  0, 16, 16,  46, 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_COLOUR), PAL_NONE,  1,  1, 14, 14,  24, 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_COLOUR), PAL_NONE,  1,  1, 14, 14,  27, 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_COLOUR), PAL_NONE,  3,  3, 10,  9,  63, 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_COLOUR), PAL_NONE,  3,  3, 10,  9,  62, 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_COLOUR), 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_COLOUR), PAL_NONE,  4,  4,  7,  7,  80, 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_COLOUR), 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_COLOUR), PAL_NONE,  2,  0, 12, 16,  51, 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_COLOUR), PAL_NONE,  0,  0, 16, 16,  44, 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_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,      0x82e, PAL_NONE,  3,  1, 10, 13,  11, 0),
 
	M(     0xf54, PAL_NONE,      0x82f, PAL_NONE,  3,  1, 10, 13,  11, 0),
 
	M(     0x58c, PAL_NONE,      0x82f, PAL_NONE,  3,  1, 10, 13,  11, 0),
 
	M(     0xfdd, PAL_NONE,        0x0, PAL_NONE,  0,  0,  1,  1,   0, 0),
 
	M(     0xfdd, PAL_NONE,        0x0, PAL_NONE,  0,  0,  1,  1,   0, 0),
 
@@ -172,24 +172,24 @@ static const DrawBuildingsTileStruct _in
 
	M(     0x87d, PAL_NONE,      0x883, PAL_NONE,  0,  0, 16, 16,  20, 0),
 
	M(     0x87d, PAL_NONE,      0x882, PAL_NONE,  0,  0, 16, 16,  20, 0),
 
	M(     0x87d, PAL_NONE,      0x881, 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,      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_COLOR), 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_COLOR), 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_COLOR), 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_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_COLOUR), 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_COLOUR), 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_COLOUR), 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_COLOUR), PAL_NONE,  0,  0, 16, 16,  18, 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_COLOR), 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_COLOUR), 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(     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(     0x7e6, PAL_NONE,        0x0, PAL_NONE,  0,  0,  1,  1,   0, 0),
 
	M(     0x842, PAL_NONE,      0x843, PAL_NONE,  0,  0, 16, 16,  30, 0),
 
@@ -199,41 +199,41 @@ static const DrawBuildingsTileStruct _in
 
	M(     0x844, PAL_NONE,      0x845, PAL_NONE,  0,  0, 16, 16,  16, 0),
 
	M(     0x844, PAL_NONE,      0x845, PAL_NONE,  0,  0, 16, 16,  16, 0),
 
	M(     0x844, PAL_NONE,      0x845, PAL_NONE,  0,  0, 16, 16,  16, 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(    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,      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,      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,      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(     0xf54, PAL_NONE,     0x871 | (1 << PALETTE_MODIFIER_COLOR), 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_COLOR), 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,     0x872 | (1 << PALETTE_MODIFIER_COLOR), 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_COLOR), 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,     0x873 | (1 << PALETTE_MODIFIER_COLOR), 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_COLOR), 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,     0x874 | (1 << PALETTE_MODIFIER_COLOR), 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_COLOR), 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(    0x865 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE,        0x0, PAL_NONE,  0,  0,  1,  1,   0, 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_COLOUR), 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_COLOUR), 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_COLOUR), 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_COLOUR), 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_COLOUR), 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_COLOUR), 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_COLOUR), 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_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,      0x7eb, PAL_NONE,  3,  2,  8,  8,  37, 0),
 
	M(     0xf54, PAL_NONE,      0x7ec, PAL_NONE,  3,  2,  8,  8,  49, 0),
 
	M(     0x7e6, PAL_NONE,      0x7ec, PAL_NONE,  3,  2,  8,  8,  49, 0),
 
	M(     0x7e6, PAL_NONE,      0x7ec, PAL_NONE,  3,  2,  8,  8,  49, 0),
 
	M(     0x7e6, PAL_NONE,      0x7ed, PAL_NONE,  3,  2,  8,  8,  49, 0),
 
@@ -251,57 +251,57 @@ static const DrawBuildingsTileStruct _in
 
	M(     0xf54, PAL_NONE,      0x7f6, PAL_NONE,  2,  1, 11, 13,  12, 0),
 
	M(     0xf54, PAL_NONE,      0x7f7, PAL_NONE,  2,  1, 11, 13,  12, 0),
 
	M(     0x7e6, PAL_NONE,      0x7f7, PAL_NONE,  2,  1, 11, 13,  12, 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(    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(     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(     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(     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(     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(     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(     0x886, PAL_NONE,      0x884, 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(     0x7e6, PAL_NONE,     0x88c | (1 << PALETTE_MODIFIER_COLOR), 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_COLOR), 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,     0x88f | (1 << PALETTE_MODIFIER_COLOR), 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_COLOR), 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,     0x892 | (1 << PALETTE_MODIFIER_COLOR), 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_COLOR), 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,     0x895 | (1 << PALETTE_MODIFIER_COLOR), 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_COLOR), 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,     0x88c | (1 << PALETTE_MODIFIER_COLOUR), 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_COLOUR), 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_COLOUR), 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_COLOUR), 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_COLOUR), 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_COLOUR), 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_COLOUR), 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_COLOUR), 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,      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,      0x89a, PAL_NONE,  0,  0, 16, 16,  25, 0),
 
	M(     0x7e6, PAL_NONE,        0x0, PAL_NONE,  0,  0, 16, 16,  25, 0),
 
	M(     0x7e6, PAL_NONE,        0x0, PAL_NONE,  0,  0, 16, 16,  25, 0),
 
@@ -512,40 +512,40 @@ static const DrawBuildingsTileStruct _in
 
	M(     0x925, PAL_NONE,      0x926, PAL_NONE,  0,  0, 16, 16,  30, 0),
 
	M(     0x925, PAL_NONE,      0x926, PAL_NONE,  0,  0, 16, 16,  30, 0),
 
	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(    0x11c6, PAL_NONE,     0x92b | (1 << PALETTE_MODIFIER_COLOR), 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_COLOR), 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,     0x92e | (1 << PALETTE_MODIFIER_COLOR), 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_COLOR), 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,     0x928 | (1 << PALETTE_MODIFIER_COLOR), 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_COLOR), 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,     0x92b | (1 << PALETTE_MODIFIER_COLOUR), 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_COLOUR), 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_COLOUR), 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_COLOUR), 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_COLOUR), 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_COLOUR), 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,      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,      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,      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,      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,      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,      0x939, PAL_NONE,  0,  0, 16, 16,  50, 0),
 
	M(     0x7e6, PAL_NONE,      0x932, PAL_NONE,  0,  0, 16, 16,  50, 0),
 
	M(     0x7e6, PAL_NONE,      0x936, PAL_NONE,  0,  0, 16, 16,  50, 0),
 
@@ -568,24 +568,24 @@ static const DrawBuildingsTileStruct _in
 
	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(     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,     0x1248 | (1 << PALETTE_MODIFIER_COLOR), 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,     0x124b | (1 << PALETTE_MODIFIER_COLOR), 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,     0x124a | (1 << PALETTE_MODIFIER_COLOR), 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,     0x124d | (1 << PALETTE_MODIFIER_COLOR), 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,     0x1249 | (1 << PALETTE_MODIFIER_COLOR), 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,     0x124c | (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_COLOUR), 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_COLOUR), 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_COLOUR), 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_COLOUR), 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_COLOUR), 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_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,     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,     0x1251, PAL_NONE,  0,  0, 16, 16,  10, 0),
 
	M(     0x81d, PAL_NONE,     0x1252, PAL_NONE,  0,  0, 16, 16,  10, 0),
 
	M(     0x81d, PAL_NONE,     0x1252, PAL_NONE,  0,  0, 16, 16,  10, 0),
 
@@ -671,21 +671,21 @@ static const DrawBuildingsTileStruct _in
 
	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,     0x1283 | (1 << PALETTE_MODIFIER_COLOR), 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,     0x1286 | (1 << PALETTE_MODIFIER_COLOR), 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,     0x1282 | (1 << PALETTE_MODIFIER_COLOR), 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,     0x1285 | (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_COLOUR), 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_COLOUR), 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_COLOUR), 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,     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(    0x1244, PAL_NONE,        0x0, PAL_NONE,  0,  0, 16, 16,  50, 0),
 
	M(    0x1244, PAL_NONE,     0x1288, PALETTE_TO_RED,  0,  0, 16, 16,  50, 0),
 
@@ -708,44 +708,44 @@ static const DrawBuildingsTileStruct _in
 
	M(     0xf8d, PAL_NONE,     0x129c, PAL_NONE,  0,  0, 16, 16,  50, 2),
 
	M(     0xf8d, PAL_NONE,     0x129c, PAL_NONE,  0,  0, 16, 16,  50, 2),
 
	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_COLOR), 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_COLOR), 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_COLOR), 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_COLOR), 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_COLOR), 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_COLOR), 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_COLOR), 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_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_COLOUR), 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_COLOUR), 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_COLOUR), 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_COLOUR), 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_COLOUR), 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_COLOUR), 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_COLOUR), 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_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,     0x12a4 | (1 << PALETTE_MODIFIER_COLOR), 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_COLOR), 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,     0x12a6 | (1 << PALETTE_MODIFIER_COLOR), 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_COLOR), 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,     0x12a5 | (1 << PALETTE_MODIFIER_COLOR), 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_COLOR), 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,     0x12a4 | (1 << PALETTE_MODIFIER_COLOUR), 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_COLOUR), 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_COLOUR), 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_COLOUR), 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_COLOUR), 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_COLOUR), 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
 

	
 
/* this is ONLY used for Sugar Mine*/
 
static const DrawIndustryAnimationStruct _draw_industry_spec1[96] = {
 
	{  8,   4,   0,   0},
src/table/palettes.h
Show inline comments
 
@@ -191,19 +191,19 @@ static const ExtraPaletteValues _extra_p
 
	  M( 92, 164, 184), M( 92, 164, 184), M( 92, 164, 184), M( 92, 164, 184),
 
	  M( 92, 164, 184), M( 92, 164, 184), M( 92, 164, 184), M( 92, 164, 184),
 
	  M(116, 180, 196), M(148, 200, 216), M(180, 220, 232) }
 
};
 
#undef M
 

	
 
// Color table for colors in lang files (e.g. {BLACK})
 
struct StringColor {
 
// Colour table for colours in lang files (e.g. {BLACK})
 
struct StringColour {
 
	byte text;
 
	byte shadow;
 
};
 

	
 
static const StringColor _string_colourmap[][17] = {
 
static const StringColour _string_colourmap[][17] = {
 
	{ /* DOS palette. */
 
		{ 150,   1 }, // TC_BLUE
 
		{  12,   1 }, // TC_SILVER
 
		{ 189,   1 }, // TC_GOLD
 
		{ 184,   1 }, // TC_RED
 
		{ 174,   1 }, // TC_PURPLE
src/table/road_land.h
Show inline comments
 
@@ -3,59 +3,59 @@
 
/** @file road_land.h Sprite constructs for road depots. */
 

	
 
#define TILE_SEQ_LINE(img, pal, dx, dy, sx, sy) { dx, dy, 0, sx, sy, 20, {img, pal} },
 
#define TILE_SEQ_END() { 0, 0, 0, 0, 0, 0, {0, 0} }
 

	
 
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()
 
};
 

	
 
static const DrawTileSeqStruct _road_depot_SE[] = {
 
	TILE_SEQ_LINE(0x580 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 1, 16)
 
	TILE_SEQ_LINE(0x581 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 15, 0, 1, 16)
 
	TILE_SEQ_LINE(0x580 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 1, 16)
 
	TILE_SEQ_LINE(0x581 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 15, 0, 1, 16)
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _road_depot_SW[] = {
 
	TILE_SEQ_LINE(0x582 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 1)
 
	TILE_SEQ_LINE(0x583 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 15, 16, 1)
 
	TILE_SEQ_LINE(0x582 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 1)
 
	TILE_SEQ_LINE(0x583 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 15, 16, 1)
 
	TILE_SEQ_END()
 
};
 

	
 
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()
 
};
 

	
 
static const DrawTileSprites _road_depot[] = {
 
	{ {0xA4A, PAL_NONE}, _road_depot_NE },
 
	{ {0xA4A, PAL_NONE}, _road_depot_SE },
 
	{ {0xA4A, PAL_NONE}, _road_depot_SW },
 
	{ {0xA4A, PAL_NONE}, _road_depot_NW }
 
};
 

	
 
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()
 
};
 

	
 
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 + 0x32) | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 15, 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_COLOUR), PAL_NONE, 15, 0, 1, 16)
 
	TILE_SEQ_END()
 
};
 

	
 
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 + 0x34) | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 15, 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_COLOUR), PAL_NONE, 0, 15, 16, 1)
 
	TILE_SEQ_END()
 
};
 

	
 
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()
 
};
 

	
 
static const DrawTileSprites _tram_depot[] = {
 
	{ {0xA4A, PAL_NONE}, _tram_depot_NE },
 
	{ {0xA4A, PAL_NONE}, _tram_depot_SE },
src/table/sprites.h
Show inline comments
 
@@ -53,14 +53,14 @@ enum Sprites {
 

	
 
	/* Halftile-selection sprites */
 
	SPR_HALFTILE_SELECTION_FLAT = SPR_OPENTTD_BASE,
 
	SPR_HALFTILE_SELECTION_DOWN = SPR_OPENTTD_BASE + 4,
 
	SPR_HALFTILE_SELECTION_UP   = SPR_OPENTTD_BASE + 8,
 

	
 
	SPR_SQUARE             = SPR_OPENTTD_BASE + 38, // colored square (used for newgrf compatibility)
 
	SPR_BLOT               = SPR_OPENTTD_BASE + 39, // colored circle (mainly used as vehicle profit marker and for server compatibility)
 
	SPR_SQUARE             = SPR_OPENTTD_BASE + 38, // coloured square (used for newgrf 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_BOX_EMPTY          = SPR_OPENTTD_BASE + 41,
 
	SPR_BOX_CHECKED        = SPR_OPENTTD_BASE + 42,
 
	SPR_WARNING_SIGN       = SPR_OPENTTD_BASE + 43, // warning sign (shown if there are any newgrf errors)
 
	SPR_WINDOW_RESIZE      = SPR_OPENTTD_BASE + 44, // resize icon
 
	/* Arrow icons pointing in all 4 directions */
 
@@ -1398,66 +1398,66 @@ enum AnimCursors {
 
/**
 
 * Bitmask setup. For the graphics system, 32 bits are used to define
 
 * the sprite to be displayed. This variable contains various information:<p>
 
 * <ul><li> SPRITE_WIDTH is the number of bits used for the actual sprite to be displayed.
 
 * This always starts at bit 0.</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
 
 * 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 {
 
	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,
 
	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
 
};
 

	
 
/**
 
 * 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
 
 * 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.
 
 * @note Do not modify this enum. Alter SpriteSetup instead
 
 * @see SpriteSetup
 
 */
 
enum Modifiers {
 
	SPRITE_MODIFIER_USE_OFFSET    = OFFSET_BIT,
 
	/// Set when a sprite must not ever be displayed transparently
 
	SPRITE_MODIFIER_OPAQUE        = OPAQUE_BIT,
 
	///when a sprite is to be displayed transparently, this bit needs to be set.
 
	PALETTE_MODIFIER_TRANSPARENT  = TRANSPARENT_BIT,
 
	///this bit is set when a recoloring process is in action
 
	PALETTE_MODIFIER_COLOR        = RECOLOR_BIT,
 
	///this bit is set when a recolouring process is in action
 
	PALETTE_MODIFIER_COLOUR       = RECOLOUR_BIT,
 
};
 

	
 
/** Masks needed for sprite operations.
 
 * @note Do not modify this enum. Alter SpriteSetup instead
 
 * @see SpriteSetup */
 
enum SpriteMasks {
 
	///Maximum number of sprites that can be loaded at a given time.
 
	MAX_SPRITES = 1 << SPRITE_WIDTH,
 
	///The mask to for the main sprite
 
	SPRITE_MASK = MAX_SPRITES - 1,
 

	
 
	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,
 
};
 

	
 
assert_compile( (1 << TRANSPARENT_BIT & SPRITE_MASK) == 0 );
 
assert_compile( (1 << RECOLOR_BIT & SPRITE_MASK) == 0 );
 
assert_compile( !(TRANSPARENT_BIT == RECOLOR_BIT) );
 
assert_compile( (1 << RECOLOUR_BIT & SPRITE_MASK) == 0 );
 
assert_compile( !(TRANSPARENT_BIT == RECOLOUR_BIT) );
 
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 {
 
	PALETTE_RECOLOR_START       = 0x307,
 
enum Recolouring {
 
	PALETTE_RECOLOUR_START       = 0x307,
 
};
 

	
 

	
 
static const SpriteID PALETTE_CRASH = 0x324;
 
static const SpriteID PAL_NONE = 0;
 

	
 
@@ -1468,52 +1468,52 @@ static const SpriteID PAL_NONE = 0;
 
static const SpriteID PALETTE_TILE_RED_PULSATING  = 0x303;
 
	///makes a square red. is used when removing rails or other stuff
 
static const SpriteID PALETTE_SEL_TILE_RED        = 0x304;
 
	///This draws a blueish square (catchment areas for example)
 
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
 
	//here the color switches begin
 
	//use this if you add stuff to the value, so that the resulting color
 
	//here the colour switches begin
 
	//use this if you add stuff to the value, so that the resulting colour
 
	//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 {
 
	PALETTE_TO_DARK_BLUE        = 0x307,
 
	PALETTE_TO_PALE_GREEN       = 0x308,
 
	PALETTE_TO_PINK             = 0x309,
 
	PALETTE_TO_YELLOW           = 0x30A,
 
	PALETTE_TO_RED              = 0x30B,
 
	PALETTE_TO_LIGHT_BLUE       = 0x30C,
 
	PALETTE_TO_GREEN            = 0x30D,
 
	PALETTE_TO_DARK_GREEN       = 0x30E,
 
	PALETTE_TO_BLUE             = 0x30F,
 
	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_PURPLE           = 0x312,
 
	PALETTE_TO_ORANGE           = 0x313,
 
	PALETTE_TO_BROWN            = 0x314,
 
	PALETTE_TO_GREY             = 0x315,
 
	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,
 
	//XXX is 318-31A really not used?
 
	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_WHITE     = 0x31D,
 
	//sets bridge or structure to red, little concrete one and cantilever use this one for example
 
	PALETTE_TO_STRUCT_RED       = 0x31E,
 
	PALETTE_TO_STRUCT_GREEN     = 0x31F,
 
	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
 
	//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,
 

	
 
	//XXX - const - PALETTE_CRASH               = 0x324,  //this changes stuff to the "crash color"
 
	//XXX another place where structures are colored.
 
	//I'm not sure which colors these are
 
	//XXX - const - PALETTE_CRASH               = 0x324,  //this changes stuff to the "crash colour"
 
	//XXX another place where structures are coloured.
 
	//I'm not sure which colours these are
 
	PALETTE_59E                 = 0x59E,
 
	PALETTE_59F                 = 0x59F,
 
};
 

	
 
#endif /* SPRITES_H */
src/table/station_land.h
Show inline comments
 
@@ -30,142 +30,142 @@
 

	
 
static const DrawTileSeqStruct _station_display_nothing[] = {
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_0[] = {
 
	TILE_SEQ_LINE( 0,  0,  0, 16,  5,  2, SPR_RAIL_PLATFORM_X_REAR  | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0, 11,  0, 16,  5,  2, SPR_RAIL_PLATFORM_X_FRONT | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  0,  0, 16,  5,  2, SPR_RAIL_PLATFORM_X_REAR  | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE( 0, 11,  0, 16,  5,  2, SPR_RAIL_PLATFORM_X_FRONT | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_1[] = {
 
	TILE_SEQ_LINE( 0,  0,  0,  5, 16,  2, SPR_RAIL_PLATFORM_Y_REAR  | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(11,  0,  0,  5, 16,  2, SPR_RAIL_PLATFORM_Y_FRONT | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  0,  0,  5, 16,  2, SPR_RAIL_PLATFORM_Y_REAR  | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE(11,  0,  0,  5, 16,  2, SPR_RAIL_PLATFORM_Y_FRONT | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_2[] = {
 
	TILE_SEQ_LINE( 0,  0,  0, 16,  5,  2, SPR_RAIL_PLATFORM_BUILDING_X | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0, 11,  0, 16,  5,  2, SPR_RAIL_PLATFORM_X_FRONT    | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  0,  0, 16,  5,  2, SPR_RAIL_PLATFORM_BUILDING_X | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE( 0, 11,  0, 16,  5,  2, SPR_RAIL_PLATFORM_X_FRONT    | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_3[] = {
 
	TILE_SEQ_LINE( 0,  0,  0,  5, 16,  2, SPR_RAIL_PLATFORM_BUILDING_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(11,  0,  0,  5, 16,  2, SPR_RAIL_PLATFORM_Y_FRONT    | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  0,  0,  5, 16,  2, SPR_RAIL_PLATFORM_BUILDING_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE(11,  0,  0,  5, 16,  2, SPR_RAIL_PLATFORM_Y_FRONT    | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_4[] = {
 
	TILE_SEQ_LINE( 0,  0,  0, 16,  5,  7, SPR_RAIL_PLATFORM_PILLARS_X_REAR | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0, 11,  0, 16,  5,  2, SPR_RAIL_PLATFORM_X_FRONT        | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  0, 16, 16, 16, 10, SPR_RAIL_ROOF_STRUCTURE_X_TILE_A | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  0,  0, 16,  5,  7, SPR_RAIL_PLATFORM_PILLARS_X_REAR | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE( 0, 11,  0, 16,  5,  2, SPR_RAIL_PLATFORM_X_FRONT        | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE( 0,  0, 16, 16, 16, 10, SPR_RAIL_ROOF_STRUCTURE_X_TILE_A | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE_PAL( 0,  0, (byte)0x80, 0,  0,  0, SPR_RAIL_ROOF_GLASS_X_TILE_A     | (1 << PALETTE_MODIFIER_TRANSPARENT), PALETTE_TO_TRANSPARENT)
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_5[] = {
 
	TILE_SEQ_LINE( 0,  0,  0,  5, 16,  2, SPR_RAIL_PLATFORM_PILLARS_Y_REAR | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(11,  0,  0,  5, 16,  2, SPR_RAIL_PLATFORM_Y_FRONT        | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  0, 16, 16, 16, 10, SPR_RAIL_ROOF_STRUCTURE_Y_TILE_A | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  0,  0,  5, 16,  2, SPR_RAIL_PLATFORM_PILLARS_Y_REAR | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE(11,  0,  0,  5, 16,  2, SPR_RAIL_PLATFORM_Y_FRONT        | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE( 0,  0, 16, 16, 16, 10, SPR_RAIL_ROOF_STRUCTURE_Y_TILE_A | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE_PAL( 0,  0, (byte)0x80, 0,  0,  0, SPR_RAIL_ROOF_GLASS_Y_TILE_A     | (1 << PALETTE_MODIFIER_TRANSPARENT), PALETTE_TO_TRANSPARENT)
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_6[] = {
 
	TILE_SEQ_LINE( 0,  0,  0, 16,  5,  2, SPR_RAIL_PLATFORM_X_REAR          | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0, 11,  0, 16,  5,  2, SPR_RAIL_PLATFORM_PILLARS_X_FRONT | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  0, 16, 16, 16, 10, SPR_RAIL_ROOF_STRUCTURE_X_TILE_B  | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  0,  0, 16,  5,  2, SPR_RAIL_PLATFORM_X_REAR          | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE( 0, 11,  0, 16,  5,  2, SPR_RAIL_PLATFORM_PILLARS_X_FRONT | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE( 0,  0, 16, 16, 16, 10, SPR_RAIL_ROOF_STRUCTURE_X_TILE_B  | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE_PAL( 0,  0, (byte)0x80, 0,  0,  0, SPR_RAIL_ROOF_GLASS_X_TILE_B      | (1 << PALETTE_MODIFIER_TRANSPARENT), PALETTE_TO_TRANSPARENT)
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_7[] = {
 
	TILE_SEQ_LINE( 0,  0,  0,  5, 16,  2, SPR_RAIL_PLATFORM_Y_REAR          | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(11,  0,  0,  5, 16,  2, SPR_RAIL_PLATFORM_PILLARS_Y_FRONT | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  0, 16, 16, 16, 10, SPR_RAIL_ROOF_STRUCTURE_Y_TILE_B  | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  0,  0,  5, 16,  2, SPR_RAIL_PLATFORM_Y_REAR          | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE(11,  0,  0,  5, 16,  2, SPR_RAIL_PLATFORM_PILLARS_Y_FRONT | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE( 0,  0, 16, 16, 16, 10, SPR_RAIL_ROOF_STRUCTURE_Y_TILE_B  | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE_PAL( 0,  0, (byte)0x80, 0,  0,  0, SPR_RAIL_ROOF_GLASS_Y_TILE_B      | (1 << PALETTE_MODIFIER_TRANSPARENT), PALETTE_TO_TRANSPARENT)
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_9[] = {
 
	TILE_SEQ_LINE( 0,  0,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR)) // fences north
 
	TILE_SEQ_LINE( 0,  0,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR)) // fences north
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_10[] = {
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR)) // fences west
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR)) // fences west
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_21[] = {
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_22[] = {
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_23[] = {
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_24[] = {
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_25[] = {
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_26[] = {
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_27[] = {
 
	TILE_SEQ_LINE( 2,  0,  0, 11, 16, 40, SPR_AIRPORT_TERMINAL_A | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 2,  0,  0, 11, 16, 40, SPR_AIRPORT_TERMINAL_A | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_28[] = {
 
	TILE_SEQ_LINE( 3,  3,  0, 10, 10, 60, SPR_AIRPORT_TOWER | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 3,  3,  0, 10, 10, 60, SPR_AIRPORT_TOWER | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_29[] = {
 
	TILE_SEQ_LINE( 0,  1,  0, 14, 14, 30, SPR_AIRPORT_CONCOURSE | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  1,  0, 14, 14, 30, SPR_AIRPORT_CONCOURSE | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_30[] = {
 
	TILE_SEQ_LINE( 3,  3,  0, 10, 11, 35, SPR_AIRPORT_TERMINAL_B | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 3,  3,  0, 10, 11, 35, SPR_AIRPORT_TERMINAL_B | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_31[] = {
 
	TILE_SEQ_LINE( 0,  3,  0, 16, 11, 40, SPR_AIRPORT_TERMINAL_C | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  3,  0, 16, 11, 40, SPR_AIRPORT_TERMINAL_C | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_32[] = {
 
	TILE_SEQ_LINE(14,  0,  0,  2, 16, 28, SPR_AIRPORT_HANGAR_FRONT | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  0,  0,  2, 16, 28, SPR_AIRPORT_HANGAR_REAR | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(14,  0,  0,  2, 16, 28, SPR_AIRPORT_HANGAR_FRONT | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE( 0,  0,  0,  2, 16, 28, SPR_AIRPORT_HANGAR_REAR | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_33[] = {
 
	TILE_SEQ_LINE( 7, 11,  0,  3,  3, 14, SPR_AIRPORT_JETWAY_1)
 
	TILE_SEQ_LINE( 0,  0,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  0,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_34[] = {
 
	TILE_SEQ_LINE( 2,  7,  0,  3,  3, 14, SPR_AIRPORT_JETWAY_2)
 
	TILE_SEQ_END()
 
@@ -179,207 +179,207 @@ static const DrawTileSeqStruct _station_
 
static const DrawTileSeqStruct _station_display_datas_36[] = {
 
	TILE_SEQ_LINE( 0,  8,  0, 14,  3, 14, SPR_AIRPORT_PASSENGER_TUNNEL)
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_38[] = {
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_39[] = {
 
	TILE_SEQ_LINE( 7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_1)
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_40[] = {
 
	TILE_SEQ_LINE( 7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_2)
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_41[] = {
 
	TILE_SEQ_LINE( 7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_3)
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_42[] = {
 
	TILE_SEQ_LINE( 7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_4)
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_43[] = {
 
	TILE_SEQ_LINE( 7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_5)
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_44[] = {
 
	TILE_SEQ_LINE( 7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_6)
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_45[] = {
 
	TILE_SEQ_LINE( 7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_7)
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_46[] = {
 
	TILE_SEQ_LINE( 7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_8)
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_47[] = {
 
	TILE_SEQ_LINE( 7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_9)
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_48[] = {
 
	TILE_SEQ_LINE( 7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_A)
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_49[] = {
 
	TILE_SEQ_LINE( 7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_B)
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_50[] = {
 
	TILE_SEQ_LINE( 7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_C)
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_51[] = {
 
	TILE_SEQ_LINE( 7,  7,  0,  2,  2, 70, SPR_UNMOVABLE_TRANSMITTER)
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_54[] = {
 
	TILE_SEQ_LINE( 0,  0,  0, 15, 15, 30, SPR_AIRFIELD_TERM_C_BUILD | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  0,  0, 15, 15, 30, SPR_AIRFIELD_TERM_C_BUILD | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_55[] = {
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_58[] = {
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 4, 11,  0,  1,  1, 20, SPR_AIRFIELD_WIND_1 | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE( 4, 11,  0,  1,  1, 20, SPR_AIRFIELD_WIND_1 | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_59[] = {
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 4, 11,  0,  1,  1, 20, SPR_AIRFIELD_WIND_2 | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE( 4, 11,  0,  1,  1, 20, SPR_AIRFIELD_WIND_2 | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_60[] = {
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 4, 11,  0,  1,  1, 20, SPR_AIRFIELD_WIND_3 | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE( 4, 11,  0,  1,  1, 20, SPR_AIRFIELD_WIND_3 | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_61[] = {
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 4, 11,  0,  1,  1, 20, SPR_AIRFIELD_WIND_4 | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE( 4, 11,  0,  1,  1, 20, SPR_AIRFIELD_WIND_4 | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_62[] = {
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_63[] = {
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_64[] = {
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_65[] = {
 
	TILE_SEQ_LINE(14,  0,  0,  2, 16, 28, SPR_AIRFIELD_HANGAR_FRONT | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  0,  0,  2, 16, 28, SPR_AIRFIELD_HANGAR_REAR | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(14,  0,  0,  2, 16, 28, SPR_AIRFIELD_HANGAR_FRONT | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE( 0,  0,  0,  2, 16, 28, SPR_AIRFIELD_HANGAR_REAR | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_66[] = {
 
	TILE_SEQ_LINE( 0,  0,  0, 16, 16, 60, SPR_HELIPORT | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  0,  0, 16, 16, 60, SPR_HELIPORT | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_67[] = {
 
	TILE_SEQ_LINE( 0, 15,  0, 13,  1, 10, SPR_TRUCK_STOP_NE_BUILD_A | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(13,  0,  0,  3, 16, 10, SPR_TRUCK_STOP_NE_BUILD_B | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 2,  0,  0, 11,  1, 10, SPR_TRUCK_STOP_NE_BUILD_C | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0, 15,  0, 13,  1, 10, SPR_TRUCK_STOP_NE_BUILD_A | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE(13,  0,  0,  3, 16, 10, SPR_TRUCK_STOP_NE_BUILD_B | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE( 2,  0,  0, 11,  1, 10, SPR_TRUCK_STOP_NE_BUILD_C | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_68[] = {
 
	TILE_SEQ_LINE(15,  3,  0,  1, 13, 10, SPR_TRUCK_STOP_SE_BUILD_A | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  0,  0, 16,  3, 10, SPR_TRUCK_STOP_SE_BUILD_B | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  3,  0,  1, 11, 10, SPR_TRUCK_STOP_SE_BUILD_C | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(15,  3,  0,  1, 13, 10, SPR_TRUCK_STOP_SE_BUILD_A | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE( 0,  0,  0, 16,  3, 10, SPR_TRUCK_STOP_SE_BUILD_B | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE( 0,  3,  0,  1, 11, 10, SPR_TRUCK_STOP_SE_BUILD_C | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_69[] = {
 
	TILE_SEQ_LINE( 3,  0,  0, 13,  1, 10, SPR_TRUCK_STOP_SW_BUILD_A | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  0,  0,  3, 16, 10, SPR_TRUCK_STOP_SW_BUILD_B | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 3, 15,  0, 11,  1, 10, SPR_TRUCK_STOP_SW_BUILD_C | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 3,  0,  0, 13,  1, 10, SPR_TRUCK_STOP_SW_BUILD_A | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE( 0,  0,  0,  3, 16, 10, SPR_TRUCK_STOP_SW_BUILD_B | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE( 3, 15,  0, 11,  1, 10, SPR_TRUCK_STOP_SW_BUILD_C | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_70[] = {
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 13, 10, SPR_TRUCK_STOP_NW_BUILD_A | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0, 13,  0, 16,  3, 10, SPR_TRUCK_STOP_NW_BUILD_B | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(15,  2,  0,  1, 11, 10, SPR_TRUCK_STOP_NW_BUILD_C | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 13, 10, SPR_TRUCK_STOP_NW_BUILD_A | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE( 0, 13,  0, 16,  3, 10, SPR_TRUCK_STOP_NW_BUILD_B | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE(15,  2,  0,  1, 11, 10, SPR_TRUCK_STOP_NW_BUILD_C | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_71[] = {
 
	TILE_SEQ_LINE( 2,  0,  0, 11,  1, 10, SPR_BUS_STOP_NE_BUILD_A | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(13,  0,  0,  3, 16, 10, SPR_BUS_STOP_NE_BUILD_B | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0, 13,  0, 13,  3, 10, SPR_BUS_STOP_NE_BUILD_C | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 2,  0,  0, 11,  1, 10, SPR_BUS_STOP_NE_BUILD_A | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE(13,  0,  0,  3, 16, 10, SPR_BUS_STOP_NE_BUILD_B | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE( 0, 13,  0, 13,  3, 10, SPR_BUS_STOP_NE_BUILD_C | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_72[] = {
 
	TILE_SEQ_LINE( 0,  3,  0,  1, 11, 10, SPR_BUS_STOP_SE_BUILD_A | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  0,  0, 16,  3, 10, SPR_BUS_STOP_SE_BUILD_B | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(13,  3,  0,  3, 13, 10, SPR_BUS_STOP_SE_BUILD_C | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  3,  0,  1, 11, 10, SPR_BUS_STOP_SE_BUILD_A | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE( 0,  0,  0, 16,  3, 10, SPR_BUS_STOP_SE_BUILD_B | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE(13,  3,  0,  3, 13, 10, SPR_BUS_STOP_SE_BUILD_C | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_73[] = {
 
	TILE_SEQ_LINE( 3, 15,  0, 11,  1, 10, SPR_BUS_STOP_SW_BUILD_A | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  0,  0,  3, 16, 10, SPR_BUS_STOP_SW_BUILD_B | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 3,  0,  0, 13,  3, 10, SPR_BUS_STOP_SW_BUILD_C | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 3, 15,  0, 11,  1, 10, SPR_BUS_STOP_SW_BUILD_A | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE( 0,  0,  0,  3, 16, 10, SPR_BUS_STOP_SW_BUILD_B | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE( 3,  0,  0, 13,  3, 10, SPR_BUS_STOP_SW_BUILD_C | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_74[] = {
 
	TILE_SEQ_LINE(15,  2,  0,  1, 11, 10, SPR_BUS_STOP_NW_BUILD_A | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0, 13,  0, 16,  3, 10, SPR_BUS_STOP_NW_BUILD_B | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  0,  0,  3, 13, 10, SPR_BUS_STOP_NW_BUILD_C | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(15,  2,  0,  1, 11, 10, SPR_BUS_STOP_NW_BUILD_A | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE( 0, 13,  0, 16,  3, 10, SPR_BUS_STOP_NW_BUILD_B | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE( 0,  0,  0,  3, 13, 10, SPR_BUS_STOP_NW_BUILD_C | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSeqStruct _station_display_datas_76[] = {
 
	TILE_SEQ_LINE( 0,  4,  0, 16,  8,  8, SPR_DOCK_SLOPE_NE)
 
	TILE_SEQ_END()
 
@@ -416,230 +416,230 @@ static const DrawTileSeqStruct _station_
 
	TILE_SEQ_END()
 
};
 

	
 
// control tower with concrete underground and no fence
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_085[] = {
 
	TILE_SEQ_LINE( 3,  3,  0, 10, 10, 60, SPR_AIRPORT_TOWER | (1 << PALETTE_MODIFIER_COLOR))  // control tower
 
	TILE_SEQ_LINE( 3,  3,  0, 10, 10, 60, SPR_AIRPORT_TOWER | (1 << PALETTE_MODIFIER_COLOUR))  // control tower
 
	TILE_SEQ_END()
 
};
 

	
 
// new airportdepot, facing west
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_086[] = {
 
	TILE_SEQ_LINE(14, 0,  0,  2, 16, 28, SPR_AIRFIELD_HANGAR_FRONT | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0, 0,  0,  2, 16, 28, SPR_AIRFIELD_HANGAR_REAR | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(14, 0,  0,  2, 16, 28, SPR_AIRFIELD_HANGAR_FRONT | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE( 0, 0,  0,  2, 16, 28, SPR_AIRFIELD_HANGAR_REAR | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
// asphalt tile with fences in north
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_087[] = {
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
// end of runway
 
static const DrawTileSeqStruct _station_display_datas_088[] = {
 
	TILE_SEQ_LINE( 0,  0,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR)) // fences
 
	TILE_SEQ_LINE( 0,  0,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR)) // fences
 
	TILE_SEQ_END()
 
};
 

	
 
// runway tiles
 
static const DrawTileSeqStruct _station_display_datas_089[] = {
 
	TILE_SEQ_LINE( 0,  0,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR)) // fences
 
	TILE_SEQ_LINE( 0,  0,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR)) // fences
 
	TILE_SEQ_END()
 
};
 

	
 
// turning radar with concrete underground fences on south -- needs 12 tiles
 
// concrete underground
 
//BEGIN
 
static const DrawTileSeqStruct _station_display_datas_090[] = {
 
	TILE_SEQ_LINE( 7, 7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_1)   // turning radar
 
	TILE_SEQ_LINE(15, 0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))  //fences
 
	TILE_SEQ_LINE(15, 0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))  //fences
 
	TILE_SEQ_END()
 
};
 

	
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_091[] = {
 
	TILE_SEQ_LINE( 7, 7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_2)
 
	TILE_SEQ_LINE(15, 0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(15, 0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_092[] = {
 
	TILE_SEQ_LINE(7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_3)
 
	TILE_SEQ_LINE(15, 0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(15, 0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_093[] = {
 
	TILE_SEQ_LINE(7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_4)
 
	TILE_SEQ_LINE(15, 0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(15, 0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_094[] = {
 
	TILE_SEQ_LINE(7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_5)
 
	TILE_SEQ_LINE(15, 0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(15, 0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_095[] = {
 
	TILE_SEQ_LINE(7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_6)
 
	TILE_SEQ_LINE(15, 0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(15, 0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_096[] = {
 
	TILE_SEQ_LINE(7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_7)
 
	TILE_SEQ_LINE(15, 0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(15, 0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_097[] = {
 
	TILE_SEQ_LINE(7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_8)
 
	TILE_SEQ_LINE(15, 0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(15, 0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_098[] = {
 
	TILE_SEQ_LINE(7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_9)
 
	TILE_SEQ_LINE(15, 0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(15, 0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_099[] = {
 
	TILE_SEQ_LINE(7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_A)
 
	TILE_SEQ_LINE(15, 0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(15, 0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0100[] = {
 
	TILE_SEQ_LINE(7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_B)
 
	TILE_SEQ_LINE(15, 0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(15, 0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0101[] = {
 
	TILE_SEQ_LINE(7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_C)
 
	TILE_SEQ_LINE(15, 0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(15, 0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 
//END
 

	
 
// turning radar with concrete underground fences on north -- needs 12 tiles
 
// concrete underground
 
//BEGIN
 
static const DrawTileSeqStruct _station_display_datas_0102[] = {
 
	TILE_SEQ_LINE(7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_1)   // turning radar
 
	TILE_SEQ_LINE(0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0103[] = {
 
	TILE_SEQ_LINE(7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_2)
 
	TILE_SEQ_LINE(0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0104[] = {
 
	TILE_SEQ_LINE(7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_3)
 
	TILE_SEQ_LINE(0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0105[] = {
 
	TILE_SEQ_LINE(7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_4)
 
	TILE_SEQ_LINE(0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0106[] = {
 
	TILE_SEQ_LINE(7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_5)
 
	TILE_SEQ_LINE(0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0107[] = {
 
	TILE_SEQ_LINE(7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_6)
 
	TILE_SEQ_LINE(0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0108[] = {
 
	TILE_SEQ_LINE(7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_7)
 
	TILE_SEQ_LINE(0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0109[] = {
 
	TILE_SEQ_LINE(7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_8)
 
	TILE_SEQ_LINE(0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0110[] = {
 
	TILE_SEQ_LINE(7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_9)
 
	TILE_SEQ_LINE(0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0111[] = {
 
	TILE_SEQ_LINE(7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_A)
 
	TILE_SEQ_LINE(0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0112[] = {
 
	TILE_SEQ_LINE(7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_B)
 
	TILE_SEQ_LINE(0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0113[] = {
 
	TILE_SEQ_LINE(7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_C)
 
	TILE_SEQ_LINE(0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 
//END
 

	
 
// helipad for international airport
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0114[] = {
 
	TILE_SEQ_LINE(10,  6,  0,  0,  0,  0, SPR_AIRPORT_HELIPAD)
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR)) // fences bottom
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR)) // fences bottom
 
	TILE_SEQ_END()
 
};
 

	
 
// helipad for commuter airport
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0115[] = {
 
	TILE_SEQ_LINE(10,  6,  0,  0,  0,  0, SPR_AIRPORT_HELIPAD)
 
	TILE_SEQ_LINE( 0,  0,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR)) // fences left
 
	TILE_SEQ_LINE( 0,  0,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR)) // fences left
 
	TILE_SEQ_END()
 
};
 

	
 
// helipad for continental airport
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0116[] = {
 
@@ -647,332 +647,332 @@ static const DrawTileSeqStruct _station_
 
	TILE_SEQ_END()
 
};
 

	
 
// asphalt tile with fences in north and south
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0117[] = {
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
// runway tiles with 2 corner fences
 
static const DrawTileSeqStruct _station_display_datas_0118[] = {
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR)) // fences west
 
	TILE_SEQ_LINE( 0,  0,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR)) // fences north
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR)) // fences west
 
	TILE_SEQ_LINE( 0,  0,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR)) // fences north
 
	TILE_SEQ_END()
 
};
 

	
 
// runway tiles with 2 corner fences
 
static const DrawTileSeqStruct _station_display_datas_0119[] = {
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR)) // fences west
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR)) // fences south
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR)) // fences west
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR)) // fences south
 
	TILE_SEQ_END()
 
};
 

	
 
// runway tiles with 2 corner fences
 
static const DrawTileSeqStruct _station_display_datas_0120[] = {
 
	TILE_SEQ_LINE( 0,  0,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR)) // fences north
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR)) // fences east
 
	TILE_SEQ_LINE( 0,  0,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR)) // fences north
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR)) // fences east
 
	TILE_SEQ_END()
 
};
 

	
 
// runway tiles with 2 corner fences
 
static const DrawTileSeqStruct _station_display_datas_0121[] = {
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR)) // fences east
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR)) // fences south
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR)) // fences east
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR)) // fences south
 
	TILE_SEQ_END()
 
};
 

	
 
// ======== new 2x2 helidepot ========
 
// helipad tiles with 2 corner fences top+right
 
static const DrawTileSeqStruct _station_display_datas_0122[] = {
 
	TILE_SEQ_LINE(10,  6,  0,  0,  0,  0, SPR_AIRPORT_HELIPAD)
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR)) // fences east
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR)) // fences south
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR)) // fences east
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR)) // fences south
 
	TILE_SEQ_END()
 
};
 

	
 
// tarmac tiles with 2 corner fences bottom+right
 
static const DrawTileSeqStruct _station_display_datas_0123[] = {
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR)) // fences north
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR)) // fences south
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR)) // fences north
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR)) // fences south
 
	TILE_SEQ_END()
 
};
 

	
 
// helidepot office with concrete underground and no fence
 
// concrete underground, fences top + left
 
static const DrawTileSeqStruct _station_display_datas_0124[] = {
 
	TILE_SEQ_LINE( 0,  0,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR)) // fences left
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR)) // fences east
 
	TILE_SEQ_LINE( 3,  3,  0, 10, 10, 60, SPR_AIRPORT_HELIDEPOT_OFFICE | (1 << PALETTE_MODIFIER_COLOR))  // helidepot office
 
	TILE_SEQ_LINE( 0,  0,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR)) // fences left
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR)) // fences east
 
	TILE_SEQ_LINE( 3,  3,  0, 10, 10, 60, SPR_AIRPORT_HELIDEPOT_OFFICE | (1 << PALETTE_MODIFIER_COLOUR))  // helidepot office
 
	TILE_SEQ_END()
 
};
 

	
 
// N/S runway plain
 
static const DrawTileSeqStruct _station_display_datas_0125[] = {
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR)) // fences east
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR)) // fences east
 
	TILE_SEQ_END()
 
};
 

	
 
// N/S runway end
 
static const DrawTileSeqStruct _station_display_datas_0126[] = {
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR)) // fences east
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR)) // fences east
 
	TILE_SEQ_END()
 
};
 

	
 
// N/S runway plain
 
static const DrawTileSeqStruct _station_display_datas_0127[] = {
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR)) // fences bottom
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR)) // fences bottom
 
	TILE_SEQ_END()
 
};
 

	
 
// N/S runway end
 
static const DrawTileSeqStruct _station_display_datas_0128[] = {
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR)) // fences bottom
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR)) // fences bottom
 
	TILE_SEQ_END()
 
};
 

	
 
// West facing hangar
 
static const DrawTileSeqStruct _station_display_datas_0129[] = {
 
	TILE_SEQ_LINE(14,  0,  0,  2, 16, 28, SPR_NEWHANGAR_W | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  0,  0,  2, 16, 28, SPR_NEWHANGAR_W_WALL | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(14,  0,  0,  2, 16, 28, SPR_NEWHANGAR_W | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE( 0,  0,  0,  2, 16, 28, SPR_NEWHANGAR_W_WALL | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
// North facing hangar
 
static const DrawTileSeqStruct _station_display_datas_0130[] = {
 
	TILE_SEQ_LINE(14,  0,  0,  2, 16, 28, SPR_NEWHANGAR_N | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(14,  0,  0,  2, 16, 28, SPR_NEWHANGAR_N | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
// East facing hangar
 
static const DrawTileSeqStruct _station_display_datas_0131[] = {
 
	TILE_SEQ_LINE(14,  0,  0,  2, 16, 28, SPR_NEWHANGAR_E | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(14,  0,  0,  2, 16, 28, SPR_NEWHANGAR_E | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
// helipad for district airport NS
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0132[] = {
 
	TILE_SEQ_LINE(10,  6,  0,  0,  0,  0, SPR_AIRPORT_HELIPAD)
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR)) // fences bottom
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR)) // fences right
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR)) // fences bottom
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR)) // fences right
 
	TILE_SEQ_END()
 
};
 

	
 
// helipad for district airport NS
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0133[] = {
 
	TILE_SEQ_LINE(10,  6,  0,  0,  0,  0, SPR_AIRPORT_HELIPAD)
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR)) // fences south
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR)) // fences south
 
	TILE_SEQ_END()
 
};
 

	
 
// helidepot office with concrete underground and fence north
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0134[] = {
 
	TILE_SEQ_LINE( 0,  0,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR)) // fences north
 
	TILE_SEQ_LINE( 3,  3,  0, 10, 10, 60, SPR_AIRPORT_HELIDEPOT_OFFICE | (1 << PALETTE_MODIFIER_COLOR))  // helidepot office
 
	TILE_SEQ_LINE( 0,  0,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR)) // fences north
 
	TILE_SEQ_LINE( 3,  3,  0, 10, 10, 60, SPR_AIRPORT_HELIDEPOT_OFFICE | (1 << PALETTE_MODIFIER_COLOUR))  // helidepot office
 
	TILE_SEQ_END()
 
};
 

	
 
// helidepot office with concrete underground and fence east
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0135[] = {
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR)) // fences east
 
	TILE_SEQ_LINE( 3,  3,  0, 10, 10, 60, SPR_AIRPORT_HELIDEPOT_OFFICE | (1 << PALETTE_MODIFIER_COLOR))  // helidepot office
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR)) // fences east
 
	TILE_SEQ_LINE( 3,  3,  0, 10, 10, 60, SPR_AIRPORT_HELIDEPOT_OFFICE | (1 << PALETTE_MODIFIER_COLOUR))  // helidepot office
 
	TILE_SEQ_END()
 
};
 

	
 
// helidepot office with concrete underground and fence west
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0136[] = {
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR)) // fences west
 
	TILE_SEQ_LINE( 3,  3,  0, 10, 10, 60, SPR_AIRPORT_HELIDEPOT_OFFICE | (1 << PALETTE_MODIFIER_COLOR))  // helidepot office
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR)) // fences west
 
	TILE_SEQ_LINE( 3,  3,  0, 10, 10, 60, SPR_AIRPORT_HELIDEPOT_OFFICE | (1 << PALETTE_MODIFIER_COLOUR))  // helidepot office
 
	TILE_SEQ_END()
 
};
 

	
 
// helidepot office with concrete underground and fence south
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0137[] = {
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR)) // fences south
 
	TILE_SEQ_LINE( 3,  3,  0, 10, 10, 60, SPR_AIRPORT_HELIDEPOT_OFFICE | (1 << PALETTE_MODIFIER_COLOR))  // helidepot office
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR)) // fences south
 
	TILE_SEQ_LINE( 3,  3,  0, 10, 10, 60, SPR_AIRPORT_HELIDEPOT_OFFICE | (1 << PALETTE_MODIFIER_COLOUR))  // helidepot office
 
	TILE_SEQ_END()
 
};
 

	
 
// terminal with fence to east
 
static const DrawTileSeqStruct _station_display_datas_0138[] = {
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR)) // fences east
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR)) // fences east
 
	TILE_SEQ_END()
 
};
 

	
 
// terminal with fence to south
 
static const DrawTileSeqStruct _station_display_datas_0139[] = {
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR)) // fences south
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR)) // fences south
 
	TILE_SEQ_END()
 
};
 

	
 
// terminal with fence to north
 
static const DrawTileSeqStruct _station_display_datas_0140[] = {
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR)) // fences west
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR)) // fences west
 
	TILE_SEQ_END()
 
};
 

	
 
// concrete with fence to east
 
static const DrawTileSeqStruct _station_display_datas_0141[] = {
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR)) // fences east
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR)) // fences east
 
	TILE_SEQ_END()
 
};
 

	
 
// concrete with fence to south
 
static const DrawTileSeqStruct _station_display_datas_0142[] = {
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR)) // fences south
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR)) // fences south
 
	TILE_SEQ_END()
 
};
 

	
 
// helipad for district airport EW
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0143[] = {
 
	TILE_SEQ_LINE(10,  6,  0,  0,  0,  0, SPR_AIRPORT_HELIPAD)
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR)) // fences west
 
	TILE_SEQ_LINE( 0,  0,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR)) // fences north
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR)) // fences west
 
	TILE_SEQ_LINE( 0,  0,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR)) // fences north
 
	TILE_SEQ_END()
 
};
 

	
 
// helipad for district airport EW
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0144[] = {
 
	TILE_SEQ_LINE(10,  6,  0,  0,  0,  0, SPR_AIRPORT_HELIPAD)
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR)) // fences west
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR)) // fences west
 
	TILE_SEQ_END()
 
};
 

	
 
// turning radar with concrete underground fences on south -- needs 12 tiles
 
// concrete underground
 
//BEGIN
 
static const DrawTileSeqStruct _station_display_datas_0145[] = {
 
	TILE_SEQ_LINE( 7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_1)   // turning radar
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR)) // fences south
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR)) // fences south
 
	TILE_SEQ_END()
 
};
 

	
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0146[] = {
 
	TILE_SEQ_LINE( 7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_2)
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR)) // fences south
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR)) // fences south
 
	TILE_SEQ_END()
 
};
 

	
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0147[] = {
 
	TILE_SEQ_LINE( 7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_3)
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR)) // fences south
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR)) // fences south
 
	TILE_SEQ_END()
 
};
 

	
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0148[] = {
 
	TILE_SEQ_LINE( 7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_4)
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR)) // fences south
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR)) // fences south
 
	TILE_SEQ_END()
 
};
 

	
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0149[] = {
 
	TILE_SEQ_LINE( 7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_5)
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR)) // fences south
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR)) // fences south
 
	TILE_SEQ_END()
 
};
 

	
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0150[] = {
 
	TILE_SEQ_LINE( 7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_6)
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR)) // fences south
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR)) // fences south
 
	TILE_SEQ_END()
 
};
 

	
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0151[] = {
 
	TILE_SEQ_LINE( 7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_7)
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR)) // fences south
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR)) // fences south
 
	TILE_SEQ_END()
 
};
 

	
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0152[] = {
 
	TILE_SEQ_LINE( 7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_8)
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR)) // fences south
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR)) // fences south
 
	TILE_SEQ_END()
 
};
 

	
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0153[] = {
 
	TILE_SEQ_LINE( 7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_9)
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR)) // fences south
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR)) // fences south
 
	TILE_SEQ_END()
 
};
 

	
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0154[] = {
 
	TILE_SEQ_LINE( 7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_A)
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR)) // fences south
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR)) // fences south
 
	TILE_SEQ_END()
 
};
 

	
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0155[] = {
 
	TILE_SEQ_LINE( 7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_B)
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR)) // fences south
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR)) // fences south
 
	TILE_SEQ_END()
 
};
 

	
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0156[] = {
 
	TILE_SEQ_LINE( 7,  7,  0,  2,  2,  8, SPR_AIRPORT_RADAR_C)
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR)) // fences south
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR)) // fences south
 
	TILE_SEQ_END()
 
};
 
//END
 

	
 
// helipad for helistation
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0157[] = {
 
	TILE_SEQ_LINE( 0,  1,  2,  0,  0,  0, SPR_NEWHELIPAD)
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR)) // fences west
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR)) // fences south
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR)) // fences west
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR)) // fences south
 
	TILE_SEQ_END()
 
};
 

	
 
// helipad for helistation
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0158[] = {
 
	TILE_SEQ_LINE( 0,  1,  2,  0,  0,  0, SPR_NEWHELIPAD)
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR)) // fences west
 
	TILE_SEQ_LINE( 0,  0,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR)) // fences north
 
	TILE_SEQ_LINE(15,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR)) // fences west
 
	TILE_SEQ_LINE( 0,  0,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR)) // fences north
 
	TILE_SEQ_END()
 
};
 

	
 
// helipad for helistation
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0159[] = {
 
	TILE_SEQ_LINE( 0,  1,  2,  0,  0,  0, SPR_NEWHELIPAD)
 
	TILE_SEQ_LINE( 0,  0,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR)) // fences north
 
	TILE_SEQ_LINE( 0,  0,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR)) // fences north
 
	TILE_SEQ_END()
 
};
 

	
 
// helidepot office with concrete underground - no fence
 
static const DrawTileSeqStruct _station_display_datas_0160[] = {
 
	TILE_SEQ_LINE( 3,  3,  0, 10, 10, 60, SPR_AIRPORT_HELIDEPOT_OFFICE | (1 << PALETTE_MODIFIER_COLOR))  // helidepot office
 
	TILE_SEQ_LINE( 3,  3,  0, 10, 10, 60, SPR_AIRPORT_HELIDEPOT_OFFICE | (1 << PALETTE_MODIFIER_COLOUR))  // helidepot office
 
	TILE_SEQ_END()
 
};
 

	
 
// concrete underground
 
static const DrawTileSeqStruct _station_display_datas_0161[] = {
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOR)) // fences east
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOR)) // fences south
 
	TILE_SEQ_LINE( 0,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1 << PALETTE_MODIFIER_COLOUR)) // fences east
 
	TILE_SEQ_LINE( 0, 15,  0, 16,  1,  6, SPR_AIRPORT_FENCE_X | (1 << PALETTE_MODIFIER_COLOUR)) // fences south
 
	TILE_SEQ_END()
 
};
 

	
 
// half grass half SPR_AIRPORT_APRON
 
static const DrawTileSeqStruct _station_display_datas_0162[] = {
 
	TILE_SEQ_LINE(0,  0,  0,  0,  0,  0, SPR_GRASS_LEFT)
 
@@ -984,35 +984,35 @@ static const DrawTileSeqStruct _station_
 
	TILE_SEQ_LINE(0,  0,  0,  0,  0,  0, SPR_GRASS_RIGHT)
 
	TILE_SEQ_END()
 
};
 

	
 
// drive-through truck stop X
 
static const DrawTileSeqStruct _station_display_datas_0168[] = {
 
	TILE_SEQ_LINE( 0,  0,  0,  16,  3, 16, SPR_TRUCK_STOP_DT_X_W | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0, 13,  0,  16,  3, 16, SPR_TRUCK_STOP_DT_X_E | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  0,  0,  16,  3, 16, SPR_TRUCK_STOP_DT_X_W | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE( 0, 13,  0,  16,  3, 16, SPR_TRUCK_STOP_DT_X_E | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
// drive-through truck stop Y
 
static const DrawTileSeqStruct _station_display_datas_0169[] = {
 
	TILE_SEQ_LINE(13,  0,  0,  3, 16, 16, SPR_TRUCK_STOP_DT_Y_W | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  0,  0,  3, 16, 16, SPR_TRUCK_STOP_DT_Y_E | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(13,  0,  0,  3, 16, 16, SPR_TRUCK_STOP_DT_Y_W | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE( 0,  0,  0,  3, 16, 16, SPR_TRUCK_STOP_DT_Y_E | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
// drive-through bus stop X
 
static const DrawTileSeqStruct _station_display_datas_0170[] = {
 
	TILE_SEQ_LINE( 0,  0,  0,  16,  3, 16, SPR_BUS_STOP_DT_X_W | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0, 13,  0,  16,  3, 16, SPR_BUS_STOP_DT_X_E | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  0,  0,  16,  3, 16, SPR_BUS_STOP_DT_X_W | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE( 0, 13,  0,  16,  3, 16, SPR_BUS_STOP_DT_X_E | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
// drive-through bus stop Y
 
static const DrawTileSeqStruct _station_display_datas_0171[] = {
 
	TILE_SEQ_LINE(13,  0,  0,  3,  16, 16, SPR_BUS_STOP_DT_Y_W | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE( 0,  0,  0,  3,  16, 16, SPR_BUS_STOP_DT_Y_E | (1 << PALETTE_MODIFIER_COLOR))
 
	TILE_SEQ_LINE(13,  0,  0,  3,  16, 16, SPR_BUS_STOP_DT_Y_W | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_LINE( 0,  0,  0,  3,  16, 16, SPR_BUS_STOP_DT_Y_E | (1 << PALETTE_MODIFIER_COLOUR))
 
	TILE_SEQ_END()
 
};
 

	
 
#undef TILE_SEQ_END
 
#undef TILE_SEQ_LINE
 
#undef TILE_SEQ_LINE_PAL
 
@@ -1079,13 +1079,13 @@ static const DrawTileSprites _station_di
 
	TILE_SPRITE_LINE(SPR_FLAT_GRASS_TILE,            _station_display_datas_48)
 
	TILE_SPRITE_LINE(SPR_FLAT_GRASS_TILE,            _station_display_datas_49)
 
	TILE_SPRITE_LINE(SPR_FLAT_GRASS_TILE,            _station_display_datas_50)
 
	TILE_SPRITE_LINE(SPR_FLAT_GRASS_TILE,            _station_display_datas_51)
 
	TILE_SPRITE_LINE(SPR_AIRFIELD_TERM_A,            _station_display_nothing)
 
	TILE_SPRITE_LINE(SPR_AIRFIELD_TERM_B,            _station_display_nothing)
 
	TILE_SPRITE_LINE(SPR_AIRFIELD_TERM_C_GROUND | (1 << PALETTE_MODIFIER_COLOR), _station_display_datas_54)
 
	TILE_SPRITE_LINE(SPR_AIRFIELD_TERM_C_GROUND | (1 << PALETTE_MODIFIER_COLOUR), _station_display_datas_54)
 
	TILE_SPRITE_LINE(SPR_AIRFIELD_APRON_A,           _station_display_datas_55)
 
	TILE_SPRITE_LINE(SPR_AIRFIELD_APRON_B,           _station_display_nothing)
 
	TILE_SPRITE_LINE(SPR_AIRFIELD_APRON_C,           _station_display_nothing)
 
	TILE_SPRITE_LINE(SPR_AIRFIELD_APRON_D,           _station_display_datas_58)
 
	TILE_SPRITE_LINE(SPR_AIRFIELD_APRON_D,           _station_display_datas_59)
 
	TILE_SPRITE_LINE(SPR_AIRFIELD_APRON_D,           _station_display_datas_60)
 
@@ -1180,25 +1180,25 @@ static const DrawTileSprites _station_di
 
	TILE_SPRITE_LINE(SPR_FLAT_GRASS_TILE,            _station_display_datas_59)
 
	TILE_SPRITE_LINE(SPR_FLAT_GRASS_TILE,            _station_display_datas_60)
 
	TILE_SPRITE_LINE(SPR_FLAT_GRASS_TILE,            _station_display_datas_61)
 
};
 

	
 
static const DrawTileSprites _station_display_datas_truck[] = {
 
	TILE_SPRITE_LINE(SPR_TRUCK_STOP_NE_GROUND | (1 << PALETTE_MODIFIER_COLOR), _station_display_datas_67)
 
	TILE_SPRITE_LINE(SPR_TRUCK_STOP_SE_GROUND | (1 << PALETTE_MODIFIER_COLOR), _station_display_datas_68)
 
	TILE_SPRITE_LINE(SPR_TRUCK_STOP_SW_GROUND | (1 << PALETTE_MODIFIER_COLOR), _station_display_datas_69)
 
	TILE_SPRITE_LINE(SPR_TRUCK_STOP_NW_GROUND | (1 << PALETTE_MODIFIER_COLOR), _station_display_datas_70)
 
	TILE_SPRITE_LINE(SPR_TRUCK_STOP_NE_GROUND | (1 << PALETTE_MODIFIER_COLOUR), _station_display_datas_67)
 
	TILE_SPRITE_LINE(SPR_TRUCK_STOP_SE_GROUND | (1 << PALETTE_MODIFIER_COLOUR), _station_display_datas_68)
 
	TILE_SPRITE_LINE(SPR_TRUCK_STOP_SW_GROUND | (1 << PALETTE_MODIFIER_COLOUR), _station_display_datas_69)
 
	TILE_SPRITE_LINE(SPR_TRUCK_STOP_NW_GROUND | (1 << PALETTE_MODIFIER_COLOUR), _station_display_datas_70)
 
	TILE_SPRITE_LINE(SPR_ROAD_PAVED_STRAIGHT_X,      _station_display_datas_0168)
 
	TILE_SPRITE_LINE(SPR_ROAD_PAVED_STRAIGHT_Y,      _station_display_datas_0169)
 
};
 

	
 
static const DrawTileSprites _station_display_datas_bus[] = {
 
	TILE_SPRITE_LINE(SPR_BUS_STOP_NE_GROUND   | (1 << PALETTE_MODIFIER_COLOR), _station_display_datas_71)
 
	TILE_SPRITE_LINE(SPR_BUS_STOP_SE_GROUND   | (1 << PALETTE_MODIFIER_COLOR), _station_display_datas_72)
 
	TILE_SPRITE_LINE(SPR_BUS_STOP_SW_GROUND   | (1 << PALETTE_MODIFIER_COLOR), _station_display_datas_73)
 
	TILE_SPRITE_LINE(SPR_BUS_STOP_NW_GROUND   | (1 << PALETTE_MODIFIER_COLOR), _station_display_datas_74)
 
	TILE_SPRITE_LINE(SPR_BUS_STOP_NE_GROUND   | (1 << PALETTE_MODIFIER_COLOUR), _station_display_datas_71)
 
	TILE_SPRITE_LINE(SPR_BUS_STOP_SE_GROUND   | (1 << PALETTE_MODIFIER_COLOUR), _station_display_datas_72)
 
	TILE_SPRITE_LINE(SPR_BUS_STOP_SW_GROUND   | (1 << PALETTE_MODIFIER_COLOUR), _station_display_datas_73)
 
	TILE_SPRITE_LINE(SPR_BUS_STOP_NW_GROUND   | (1 << PALETTE_MODIFIER_COLOUR), _station_display_datas_74)
 
	TILE_SPRITE_LINE(SPR_ROAD_PAVED_STRAIGHT_X,      _station_display_datas_0170)
 
	TILE_SPRITE_LINE(SPR_ROAD_PAVED_STRAIGHT_Y,      _station_display_datas_0171)
 
};
 

	
 
static const DrawTileSprites _station_display_datas_oilrig[] = {
 
	TILE_SPRITE_LINE(SPR_FLAT_WATER_TILE,            _station_display_nothing)
src/table/track_land.h
Show inline comments
 
@@ -4,30 +4,30 @@
 

	
 
#define TILE_SEQ_LINE(img, dx, dy, sx, sy) { dx, dy, 0, sx, sy, 23, {img, PAL_NONE} },
 
#define TILE_SEQ_END() { (byte)0x80, 0, 0, 0, 0, 0, {0, 0} }
 

	
 

	
 
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()
 
};
 

	
 
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_2 | (1 << PALETTE_MODIFIER_COLOR), 13, 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_COLOUR), 13, 2, 1, 13)
 
	TILE_SEQ_END()
 
};
 

	
 
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_2 | (1 << PALETTE_MODIFIER_COLOR), 2, 13, 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_COLOUR), 2, 13, 13, 1)
 
	TILE_SEQ_END()
 
};
 

	
 
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()
 
};
 

	
 
static const DrawTileSprites _depot_gfx_table[] = {
 
	{ {SPR_FLAT_GRASS_TILE, PAL_NONE}, _depot_gfx_NE },
 
	{ {SPR_RAIL_TRACK_Y,    PAL_NONE}, _depot_gfx_SE },
 
@@ -40,20 +40,20 @@ static const DrawTileSprites _depot_invi
 
	{ {SPR_RAIL_TRACK_Y, PAL_NONE}, _depot_gfx_SE },
 
	{ {SPR_RAIL_TRACK_X, PAL_NONE}, _depot_gfx_SW },
 
	{ {SPR_RAIL_TRACK_Y, PAL_NONE}, _depot_gfx_NW }
 
};
 

	
 
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_COLOR) | SPR_WAYPOINT_X_2,  0, 11,  16,  5)
 
	TILE_SEQ_LINE((1 << PALETTE_MODIFIER_COLOUR) | SPR_WAYPOINT_X_1,  0,  0,  16,  5)
 
	TILE_SEQ_LINE((1 << PALETTE_MODIFIER_COLOUR) | SPR_WAYPOINT_X_2,  0, 11,  16,  5)
 
	TILE_SEQ_END()
 
};
 

	
 
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_COLOR) | SPR_WAYPOINT_Y_2,  11,  0, 5, 16)
 
	TILE_SEQ_LINE((1 << PALETTE_MODIFIER_COLOUR) | SPR_WAYPOINT_Y_1,   0,  0, 5, 16)
 
	TILE_SEQ_LINE((1 << PALETTE_MODIFIER_COLOUR) | SPR_WAYPOINT_Y_2,  11,  0, 5, 16)
 
	TILE_SEQ_END()
 
};
 

	
 
static const DrawTileSprites _waypoint_gfx_table[] = {
 
	{ {SPR_RAIL_TRACK_X, PAL_NONE}, _waypoint_gfx_X },
 
	{ {SPR_RAIL_TRACK_Y, PAL_NONE}, _waypoint_gfx_Y }
src/table/unmovable_land.h
Show inline comments
 
@@ -12,60 +12,60 @@ static const DrawTileSeqStruct _draw_til
 

	
 
static const DrawTileSeqStruct _unmovable_display_nothing[] = {
 
	TILE_SEQ_END()
 
};
 

	
 
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()
 
};
 

	
 
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()
 
};
 

	
 
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()
 
};
 

	
 
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()
 
};
 

	
 
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()
 
};
 

	
 
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()
 
};
 

	
 
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()
 
};
 

	
 
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()
 
};
 

	
 
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()
 
};
 

	
 
#undef TILE_SEQ_LINE
 
#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[] = {
 
	TILE_SPRITE_LINE(SPR_TINYHQ_NORTH,         _unmovable_display_nothing)
 
	TILE_SPRITE_LINE(SPR_TINYHQ_EAST,          _unmovable_display_nothing)
 
	TILE_SPRITE_LINE(SPR_TINYHQ_WEST,          _unmovable_display_nothing)
 
	TILE_SPRITE_LINE(SPR_TINYHQ_SOUTH,         _unmovable_display_nothing)
src/table/water_land.h
Show inline comments
 
@@ -14,33 +14,33 @@ struct WaterDrawTileStruct {
 

	
 
#define BEGIN(image) { 0, 0, 0, 0, 0, 0, image }
 
#define END(y) { 0x80, y, 0, 0, 0, 0, 0 }
 

	
 
static const WaterDrawTileStruct _shipdepot_display_seq_1[] = {
 
	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)
 
};
 

	
 
static const WaterDrawTileStruct _shipdepot_display_seq_2[] = {
 
	BEGIN(0xFDD),
 
	{ 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)
 
};
 

	
 
static const WaterDrawTileStruct _shipdepot_display_seq_3[] = {
 
	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)
 
};
 

	
 
static const WaterDrawTileStruct _shipdepot_display_seq_4[] = {
 
	BEGIN(0xFDD),
 
	{  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)
 
};
 

	
 
static const WaterDrawTileStruct * const _shipdepot_display_seq[] = {
 
	_shipdepot_display_seq_1,
 
	_shipdepot_display_seq_2,
src/texteff.hpp
Show inline comments
 
@@ -24,11 +24,11 @@ TextEffectID AddTextEffect(StringID msg,
 
void InitTextEffects();
 
void DrawTextEffects(DrawPixelInfo *dpi);
 
void UpdateTextEffect(TextEffectID effect_id, StringID msg);
 
void RemoveTextEffect(TextEffectID effect_id);
 

	
 
/* misc_gui.cpp */
 
TextEffectID ShowFillingPercent(int x, int y, int z, uint8 percent, StringID color);
 
void UpdateFillingPercent(TextEffectID te_id, uint8 percent, StringID color);
 
TextEffectID ShowFillingPercent(int x, int y, int z, uint8 percent, StringID colour);
 
void UpdateFillingPercent(TextEffectID te_id, uint8 percent, StringID colour);
 
void HideFillingPercent(TextEffectID *te_id);
 

	
 
#endif /* TEXTEFF_HPP */
src/train_cmd.cpp
Show inline comments
 
@@ -269,14 +269,14 @@ void TrainConsistChanged(Vehicle *v, boo
 

	
 
		if (!HasBit(EngInfo(u->engine_type)->misc_flags, EF_RAIL_TILTS)) train_can_tilt = false;
 

	
 
		/* 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);
 

	
 
		/* Reset color map */
 
		u->colormap = PAL_NONE;
 
		/* Reset colour map */
 
		u->colourmap = PAL_NONE;
 

	
 
		if (rvi_u->visual_effect != 0) {
 
			u->u.rail.cached_vis_effect = rvi_u->visual_effect;
 
		} else {
 
			if (IsTrainWagon(u) || IsArticulatedPart(u)) {
 
				/* Wagons and articulated parts have no effect by default */
src/unmovable_cmd.cpp
Show inline comments
 
@@ -199,30 +199,30 @@ static void DrawTile_Unmovable(TileInfo 
 
			if (ti->tileh != SLOPE_FLAT) DrawFoundation(ti, GetFoundation_Unmovable(ti->tile, ti->tileh));
 

	
 
			DrawGroundSprite(SPR_CONCRETE_GROUND, PAL_NONE);
 

	
 
			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;
 

	
 
		case UNMOVABLE_OWNED_LAND:
 
			DrawClearLandTile(ti, 0);
 

	
 
			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)
 
			);
 
			DrawBridgeMiddle(ti);
 
			break;
 

	
 
		case UNMOVABLE_HQ:{
 
			assert(IsCompanyHQ(ti->tile));
 
			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)];
 
			DrawGroundSprite(t->ground.sprite, palette);
 

	
 
			if (IsInvisibilitySet(TO_STRUCTURES)) break;
 

	
src/vehicle.cpp
Show inline comments
 
@@ -208,13 +208,13 @@ Vehicle::Vehicle()
 
{
 
	this->type               = VEH_INVALID;
 
	this->left_coord         = INVALID_COORD;
 
	this->group_id           = DEFAULT_GROUP;
 
	this->fill_percent_te_id = INVALID_TE_ID;
 
	this->first              = this;
 
	this->colormap           = PAL_NONE;
 
	this->colourmap           = PAL_NONE;
 
}
 

	
 
/**
 
 * Get a value for a vehicle's random_bits.
 
 * @return A random value from 0 to 255.
 
 */
 
@@ -477,16 +477,16 @@ void ResetVehiclePosHash()
 
	Vehicle *v;
 
	FOR_ALL_VEHICLES(v) { v->old_new_hash = NULL; }
 
	memset(_vehicle_position_hash, 0, sizeof(_vehicle_position_hash));
 
	memset(_new_vehicle_position_hash, 0, sizeof(_new_vehicle_position_hash));
 
}
 

	
 
void ResetVehicleColorMap()
 
void ResetVehicleColourMap()
 
{
 
	Vehicle *v;
 
	FOR_ALL_VEHICLES(v) { v->colormap = PAL_NONE; }
 
	FOR_ALL_VEHICLES(v) { v->colourmap = PAL_NONE; }
 
}
 

	
 
/**
 
 * List of vehicles that should check for autoreplace this tick.
 
 * Mapping of vehicle -> leave depot immediatelly after autoreplace.
 
 */
 
@@ -867,13 +867,13 @@ void CheckVehicle32Day(Vehicle *v)
 
{
 
	if ((v->day_counter & 0x1F) != 0) return;
 

	
 
	uint16 callback = GetVehicleCallback(CBID_VEHICLE_32DAY_CALLBACK, 0, 0, v->engine_type, v);
 
	if (callback == CALLBACK_FAILED) return;
 
	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)
 
{
 
	v->value -= v->value >> 8;
 
	InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
 
@@ -1369,16 +1369,16 @@ CommandCost SendAllVehiclesToDepot(Vehic
 
	return (flags & DC_EXEC) ? CommandCost() : CMD_ERROR;
 
}
 

	
 
/**
 
 * Calculates how full a vehicle is.
 
 * @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.
 
 */
 
uint8 CalcPercentVehicleFilled(const Vehicle *v, StringID *color)
 
uint8 CalcPercentVehicleFilled(const Vehicle *v, StringID *colour)
 
{
 
	int count = 0;
 
	int max = 0;
 
	int cars = 0;
 
	int unloading = 0;
 
	bool loading = false;
 
@@ -1387,26 +1387,26 @@ uint8 CalcPercentVehicleFilled(const Veh
 
	const Station *st = v->last_station_visited != INVALID_STATION ? GetStation(v->last_station_visited) : NULL;
 

	
 
	/* Count up max and used */
 
	for (; v != NULL; v = v->Next()) {
 
		count += v->cargo.Count();
 
		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;
 
			loading |= !(u->current_order.GetUnloadType() & OUFB_UNLOAD) && st->goods[v->cargo_type].days_since_pickup != 255;
 
			cars++;
 
		}
 
	}
 

	
 
	if (color != NULL) {
 
	if (colour != NULL) {
 
		if (unloading == 0 && loading) {
 
			*color = STR_PERCENT_UP;
 
			*colour = STR_PERCENT_UP;
 
		} else if (cars == unloading || !loading) {
 
			*color = STR_PERCENT_DOWN;
 
			*colour = STR_PERCENT_DOWN;
 
		} else {
 
			*color = STR_PERCENT_UP_DOWN;
 
			*colour = STR_PERCENT_UP_DOWN;
 
		}
 
	}
 

	
 
	/* Train without capacity */
 
	if (max == 0) return 100;
 

	
 
@@ -1905,45 +1905,45 @@ const Livery *GetEngineLivery(EngineID e
 
	return &c->livery[scheme];
 
}
 

	
 

	
 
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 */
 
	if (map != PAL_NONE) return map;
 

	
 
	/* Check if we should use the colour map callback */
 
	if (HasBit(EngInfo(engine_type)->callbackmask, CBM_VEHICLE_COLOUR_REMAP)) {
 
		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... */
 
		if (callback != CALLBACK_FAILED && callback != 0xC000) {
 
			map = GB(callback, 0, 14);
 
			/* If bit 14 is set, then the company colours are applied to the
 
			 * map else it's returned as-is. */
 
			if (!HasBit(callback, 14)) {
 
				/* Update cache */
 
				if (v != NULL) ((Vehicle*)v)->colormap = map;
 
				if (v != NULL) ((Vehicle*)v)->colourmap = map;
 
				return map;
 
			}
 
		}
 
	}
 

	
 
	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);
 

	
 
	map += livery->colour1;
 
	if (twocc) map += livery->colour2 * 16;
 

	
 
	/* Update cache */
 
	if (v != NULL) ((Vehicle*)v)->colormap = map;
 
	if (v != NULL) ((Vehicle*)v)->colourmap = map;
 
	return map;
 
}
 

	
 
SpriteID GetEnginePalette(EngineID engine_type, CompanyID company)
 
{
 
	return GetEngineColourMap(engine_type, company, INVALID_ENGINE, NULL);
src/vehicle_base.h
Show inline comments
 
@@ -236,13 +236,13 @@ public:
 
	int32 right_coord;
 
	int32 bottom_coord;
 
	Vehicle *next_hash;
 
	Vehicle *next_new_hash;
 
	Vehicle **old_new_hash;
 

	
 
	SpriteID colormap; // NOSAVE: cached color mapping
 
	SpriteID colourmap; // NOSAVE: cached colour mapping
 

	
 
	/* Related to age and service time */
 
	Year build_year;
 
	Date age;     // Age in days
 
	Date max_age; // Maximum age
 
	Date date_of_last_service;
src/vehicle_func.h
Show inline comments
 
@@ -29,18 +29,18 @@ uint CountVehiclesInChain(const Vehicle 
 
bool IsEngineCountable(const Vehicle *v);
 
void FindVehicleOnPos(TileIndex tile, void *data, VehicleFromPosProc *proc);
 
void FindVehicleOnPosXY(int x, int y, void *data, VehicleFromPosProc *proc);
 
bool HasVehicleOnPos(TileIndex tile, void *data, VehicleFromPosProc *proc);
 
bool HasVehicleOnPosXY(int x, int y, void *data, VehicleFromPosProc *proc);
 
void CallVehicleTicks();
 
uint8 CalcPercentVehicleFilled(const Vehicle *v, StringID *color);
 
uint8 CalcPercentVehicleFilled(const Vehicle *v, StringID *colour);
 

	
 
void InitializeTrains();
 
byte VehicleRandomBits();
 
void ResetVehiclePosHash();
 
void ResetVehicleColorMap();
 
void ResetVehicleColourMap();
 

	
 
bool CanRefitTo(EngineID engine_type, CargoID cid_to);
 
CargoID FindFirstRefittableCargo(EngineID engine_type);
 
CommandCost GetRefitCost(EngineID engine_type);
 

	
 
void ViewportAddVehicles(DrawPixelInfo *dpi);
src/vehicle_gui.cpp
Show inline comments
 
@@ -109,13 +109,13 @@ void DepotSortList(VehicleList *list)
 

	
 
/** draw the vehicle profit button in the vehicle list window. */
 
void DrawVehicleProfitButton(const Vehicle *v, int x, int y)
 
{
 
	SpriteID pal;
 

	
 
	/* draw profit-based colored icons */
 
	/* draw profit-based coloured icons */
 
	if (v->age <= DAYS_IN_YEAR * 2) {
 
		pal = PALETTE_TO_GREY;
 
	} else if (v->GetDisplayProfitLastYear() < 0) {
 
		pal = PALETTE_TO_RED;
 
	} else if (v->GetDisplayProfitLastYear() < 10000) {
 
		pal = PALETTE_TO_YELLOW;
src/viewport.cpp
Show inline comments
 
@@ -45,14 +45,14 @@
 

	
 
PlaceProc *_place_proc;
 
Point _tile_fract_coords;
 
ZoomLevel _saved_scrollpos_zoom;
 

	
 
struct StringSpriteToDraw {
 
	uint16 string;
 
	uint16 color;
 
	StringID string;
 
	uint16 colour;
 
	int32 x;
 
	int32 y;
 
	uint64 params[2];
 
	uint16 width;
 
};
 

	
 
@@ -730,22 +730,22 @@ void AddChildSpriteScreen(SpriteID image
 
	if (_vd.last_foundation_child[0] == _vd.last_child) _vd.last_foundation_child[0] = &cs->next;
 
	if (_vd.last_foundation_child[1] == _vd.last_child) _vd.last_foundation_child[1] = &cs->next;
 
	_vd.last_child = &cs->next;
 
}
 

	
 
/* 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();
 
	ss->string = string;
 
	ss->x = x;
 
	ss->y = y;
 
	ss->params[0] = params_1;
 
	ss->params[1] = params_2;
 
	ss->width = width;
 
	ss->color = color;
 
	ss->colour = colour;
 
}
 

	
 

	
 
/**
 
 * Draws sprites between ground sprite and everything above.
 
 *
 
@@ -1437,26 +1437,26 @@ static void ViewportDrawStrings(DrawPixe
 
			}
 

	
 
		/* Draw the rectangle if 'tranparent station signs' is off,
 
		 * or if we are drawing a general text sign (STR_2806) */
 
			if (!IsTransparencySet(TO_SIGNS) || ss->string == STR_2806) {
 
				DrawFrameRect(
 
					x, y, x + w, bottom, ss->color,
 
					x, y, x + w, bottom, (Colours)ss->colour,
 
					IsTransparencySet(TO_SIGNS) ? FR_TRANSPARENT : FR_NONE
 
				);
 
			}
 
		}
 

	
 
		SetDParam(0, ss->params[0]);
 
		SetDParam(1, ss->params[1]);
 
		/* 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) {
 
			/* Real colors need the IS_PALETTE_COLOR flag
 
			 * otherwise colors from _string_colormap are assumed. */
 
			colour = (TextColour)_colour_gradient[ss->color][6] | IS_PALETTE_COLOR;
 
			/* Real colours need the IS_PALETTE_COLOUR flag
 
			 * otherwise colours from _string_colourmap are assumed. */
 
			colour = (TextColour)_colour_gradient[ss->colour][6] | IS_PALETTE_COLOUR;
 
		} else {
 
			colour = TC_BLACK;
 
		}
 
		DrawString(
 
			UnScaleByZoom(ss->x, zoom), UnScaleByZoom(ss->y, zoom) - (ss->width & 0x8000 ? 2 : 0),
 
			ss->string, colour
src/viewport_func.h
Show inline comments
 
@@ -33,13 +33,13 @@ static inline void MaxZoomInOut(int how,
 

	
 
void OffsetGroundSprite(int x, int y);
 

	
 
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 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 StartSpriteCombine();
 
void EndSpriteCombine();
 

	
src/water_cmd.cpp
Show inline comments
 
@@ -647,26 +647,26 @@ static void DrawTile_Water(TileInfo *ti)
 
			const WaterDrawTileStruct *t = _shiplift_display_seq[GetSection(ti->tile)];
 
			DrawWaterStuff(ti, t, 0, ti->z > t[3].delta_y ? 24 : 0, true);
 
		} break;
 

	
 
		case WATER_TILE_DEPOT:
 
			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;
 
	}
 
}
 

	
 
void DrawShipDepotSprite(int x, int y, int image)
 
{
 
	const WaterDrawTileStruct *wdts = _shipdepot_display_seq[image];
 

	
 
	DrawSprite(wdts++->image, PAL_NONE, x, y);
 

	
 
	for (; wdts->delta_x != 0x80; wdts++) {
 
		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);
 
	}
 
}
 

	
 

	
 
static uint GetSlopeZ_Water(TileIndex tile, uint x, uint y)
 
{
src/widget.cpp
Show inline comments
 
@@ -163,21 +163,21 @@ int GetWidgetFromPos(const Window *w, in
 
 * @param top    Top edge of the frame
 
 * @param right  Right edge of the frame
 
 * @param bottom Bottom edge of the frame
 
 * @param colour Colour table to use. @see _colour_gradient
 
 * @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 medium_dark  = _colour_gradient[colour][5];
 
	uint medium_light = _colour_gradient[colour][6];
 
	uint light        = _colour_gradient[colour][7];
 

	
 
	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 {
 
		uint interior;
 

	
 
		if (flags & FR_LOWERED) {
 
			GfxFillRect(left,     top,     left,  bottom,     dark);
 
			GfxFillRect(left + 1, top,     right, top,        dark);
src/window.cpp
Show inline comments
 
@@ -627,13 +627,13 @@ void ChangeWindowOwner(Owner old_owner, 
 
{
 
	Window *w;
 
	FOR_ALL_WINDOWS_FROM_BACK(w) {
 
		if (w->owner != old_owner) continue;
 

	
 
		switch (w->window_class) {
 
			case WC_COMPANY_COLOR:
 
			case WC_COMPANY_COLOUR:
 
			case WC_FINANCES:
 
			case WC_STATION_LIST:
 
			case WC_TRAINS_LIST:
 
			case WC_ROADVEH_LIST:
 
			case WC_SHIPS_LIST:
 
			case WC_AIRCRAFT_LIST:
src/window_func.h
Show inline comments
 
@@ -16,13 +16,13 @@ void ChangeWindowOwner(Owner old_owner, 
 
void ResizeWindow(Window *w, int x, int y);
 
int PositionMainToolbar(Window *w);
 

	
 
void InitWindowSystem();
 
void UnInitWindowSystem();
 
void ResetWindowSystem();
 
void SetupColorsAndInitialWindow();
 
void SetupColoursAndInitialWindow();
 
void InputLoop();
 

	
 
void InvalidateThisWindowData(Window *w, int data = 0);
 
void InvalidateWindowData(WindowClass cls, WindowNumber number, int data = 0);
 
void InvalidateWindowClassesData(WindowClass cls, int data = 0);
 

	
src/window_gui.h
Show inline comments
 
@@ -18,20 +18,20 @@
 
 * Flags to describe the look of the frame
 
 */
 
enum FrameFlags {
 
	FR_NONE         =  0,
 
	FR_TRANSPARENT  =  1 << 0,  ///< Makes the background transparent if set
 
	FR_BORDERONLY   =  1 << 4,  ///< Draw border only, no background
 
	FR_LOWERED      =  1 << 5,  ///< If set the frame is lowered and the background color brighter (ie. buttons when pressed)
 
	FR_DARKENED     =  1 << 6,  ///< If set the background is darker, allows for lowered frames with normal background color when used with FR_LOWERED (ie. dropdown boxes)
 
	FR_LOWERED      =  1 << 5,  ///< If set the frame is lowered and the background colour brighter (ie. buttons when pressed)
 
	FR_DARKENED     =  1 << 6,  ///< If set the background is darker, allows for lowered frames with normal background colour when used with FR_LOWERED (ie. dropdown boxes)
 
};
 

	
 
DECLARE_ENUM_AS_BIT_SET(FrameFlags);
 

	
 
/* wiget.cpp */
 
void DrawFrameRect(int left, int top, int right, int bottom, int color, FrameFlags flags);
 
void DrawFrameRect(int left, int top, int right, int bottom, Colours colour, FrameFlags flags);
 

	
 
/**
 
 * High level window description
 
 */
 
struct WindowDesc {
 
	int16 left;             ///< Prefered x position of left edge of the window, @see WindowDefaultPosition()
src/window_type.h
Show inline comments
 
@@ -37,13 +37,13 @@ enum WindowClass {
 
	WC_BUILD_STATION,
 
	WC_BUS_STATION,
 
	WC_TRUCK_STATION,
 
	WC_BUILD_DEPOT,
 
	WC_COMPANY,
 
	WC_FINANCES,
 
	WC_COMPANY_COLOR,
 
	WC_COMPANY_COLOUR,
 
	WC_QUERY_STRING,
 
	WC_SAVELOAD,
 
	WC_SELECT_GAME,
 
	WC_TOOLBAR_MENU,
 
	WC_INCOME_GRAPH,
 
	WC_OPERATING_PROFIT,
0 comments (0 inline, 0 general)