Changeset - r17609:46318fd6504a
[Not reviewed]
master
0 5 0
frosch - 13 years ago 2011-04-29 20:47:36
frosch@openttd.org
(svn r22383) -Codechange: Rename PALETTE_TO_STRUCT_GREY to PALETTE_NEWSPAPER as it does not belong to the other PALETTE_TO_STRUCT_xxx recolourings.
5 files changed with 7 insertions and 7 deletions:
0 comments (0 inline, 0 general)
src/blitter/32bpp_anim.cpp
Show inline comments
 
@@ -232,13 +232,13 @@ void Blitter_32bppAnim::DrawColourMappin
 
			}
 
			udst = udst - width + _screen.pitch;
 
			anim = anim - width + this->anim_buf_width;
 
		} while (--height);
 
		return;
 
	}
 
	if (pal == PALETTE_TO_STRUCT_GREY) {
 
	if (pal == PALETTE_NEWSPAPER) {
 
		do {
 
			for (int i = 0; i != width; i++) {
 
				*udst = MakeGrey(*udst);
 
				*anim = 0;
 
				udst++;
 
				anim++;
src/blitter/32bpp_simple.cpp
Show inline comments
 
@@ -74,13 +74,13 @@ void Blitter_32bppSimple::DrawColourMapp
 
				udst++;
 
			}
 
			udst = udst - width + _screen.pitch;
 
		} while (--height);
 
		return;
 
	}
 
	if (pal == PALETTE_TO_STRUCT_GREY) {
 
	if (pal == PALETTE_NEWSPAPER) {
 
		do {
 
			for (int i = 0; i != width; i++) {
 
				*udst = MakeGrey(*udst);
 
				udst++;
 
			}
 
			udst = udst - width + _screen.pitch;
src/news_gui.cpp
Show inline comments
 
@@ -408,13 +408,13 @@ struct NewsWindow : Window {
 
				DrawStringMultiLine(r.left + 2, r.right - 2, r.top, r.bottom, this->ni->string_id, TC_FROMSTRING, SA_CENTER);
 
				break;
 

	
 
			case NTW_MGR_FACE: {
 
				const CompanyNewsInformation *cni = (const CompanyNewsInformation*)this->ni->free_data;
 
				DrawCompanyManagerFace(cni->face, cni->colour, r.left, r.top);
 
				GfxFillRect(r.left + 1, r.top, r.left + 1 + 91, r.top + 118, PALETTE_TO_STRUCT_GREY, FILLRECT_RECOLOUR);
 
				GfxFillRect(r.left + 1, r.top, r.left + 1 + 91, r.top + 118, PALETTE_NEWSPAPER, FILLRECT_RECOLOUR);
 
				break;
 
			}
 
			case NTW_MGR_NAME: {
 
				const CompanyNewsInformation *cni = (const CompanyNewsInformation*)this->ni->free_data;
 
				SetDParamStr(0, cni->president_name);
 
				DrawStringMultiLine(r.left, r.right, r.top, r.bottom, STR_JUST_RAW_STRING, TC_FROMSTRING, SA_CENTER);
 
@@ -434,13 +434,13 @@ struct NewsWindow : Window {
 
				break;
 

	
 
			case NTW_VEH_SPR: {
 
				assert(this->ni->reftype1 == NR_ENGINE);
 
				EngineID engine = this->ni->ref1;
 
				DrawVehicleEngine(r.left, r.right, (r.left + r.right) / 2, (r.top + r.bottom) / 2, engine, GetEnginePalette(engine, _local_company));
 
				GfxFillRect(r.left, r.top, r.right, r.bottom, PALETTE_TO_STRUCT_GREY, FILLRECT_RECOLOUR);
 
				GfxFillRect(r.left, r.top, r.right, r.bottom, PALETTE_NEWSPAPER, FILLRECT_RECOLOUR);
 
				break;
 
			}
 
			case NTW_VEH_INFO: {
 
				assert(this->ni->reftype1 == NR_ENGINE);
 
				EngineID engine = this->ni->ref1;
 
				DrawStringMultiLine(r.left, r.right, r.top, r.bottom, GetEngineInfoString(engine), TC_FROMSTRING, SA_CENTER);
src/table/sprites.h
Show inline comments
 
@@ -1552,14 +1552,14 @@ static const PaletteID PALETTE_TO_STRUCT
 
/* sets bridge or structure to red, little concrete one and cantilever use this one for example */
 
static const PaletteID PALETTE_TO_STRUCT_RED       = 0x31E;
 
static const PaletteID PALETTE_TO_STRUCT_GREEN     = 0x31F;
 
static const PaletteID PALETTE_TO_STRUCT_CONCRETE  = 0x320; // Sets the suspension bridge to concrete, also other strucutures use it
 
static const PaletteID PALETTE_TO_STRUCT_YELLOW    = 0x321; // Sets the bridge colour to yellow (suspension and tubular)
 
static const PaletteID 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 colour */
 
static const PaletteID PALETTE_TO_STRUCT_GREY      = 0x323;
 

	
 
static const PaletteID PALETTE_NEWSPAPER           = 0x323; ///< Recolour sprite for newspaper-greying.
 
static const PaletteID PALETTE_CRASH               = 0x324;
 

	
 
/* Two recolourings only used by the church */
 
static const PaletteID PALETTE_CHURCH_RED          = 0x59E;
 
static const PaletteID PALETTE_CHURCH_CREAM        = 0x59F;
 

	
src/widget.cpp
Show inline comments
 
@@ -1794,13 +1794,13 @@ void NWidgetViewport::Draw(const Window 
 
		w->DrawViewport();
 
	}
 

	
 
	/* Optionally shade the viewport. */
 
	if (this->disp_flags & (ND_SHADE_GREY | ND_SHADE_DIMMED)) {
 
		GfxFillRect(this->pos_x, this->pos_y, this->pos_x + this->current_x - 1, this->pos_y + this->current_y - 1,
 
				(this->disp_flags & ND_SHADE_DIMMED) ? PALETTE_TO_TRANSPARENT : PALETTE_TO_STRUCT_GREY, FILLRECT_RECOLOUR);
 
				(this->disp_flags & ND_SHADE_DIMMED) ? PALETTE_TO_TRANSPARENT : PALETTE_NEWSPAPER, FILLRECT_RECOLOUR);
 
	}
 
}
 

	
 
/**
 
 * Initialize the viewport of the window.
 
 * @param w            Window owning the viewport.
0 comments (0 inline, 0 general)