From ec1edb127a3480e4ae6f6227487fbf50e0206805 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Sat, 6 May 2006 22:55:21 +0000 Subject: (svn r4763) - Newstations: revert r4762, instead map bit the palette modifier from bit 14 to bit 31 on GRF load. --- newgrf.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'newgrf.c') diff --git a/newgrf.c b/newgrf.c index 47192c214..d1dec9a22 100644 --- a/newgrf.c +++ b/newgrf.c @@ -854,7 +854,15 @@ static bool StationChangeInfo(uint stid, int numinfo, int prop, byte **bufp, int dtss->width = grf_load_byte(&buf); dtss->height = grf_load_byte(&buf); dtss->unk = grf_load_byte(&buf); - dtss->image = grf_load_dword(&buf) - 0x42d; + dtss->image = grf_load_dword(&buf); + + /* Remap the colour map bit from 14 to 31 */ + if (HASBIT(dtss->image, 14)) { + CLRBIT(dtss->image, 14); + SETBIT(dtss->image, 31); + } + + dtss->image -= 0x42D; } } } -- cgit v1.2.3-70-g09d2