summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-05-06 22:55:21 +0000
committerpeter1138 <peter1138@openttd.org>2006-05-06 22:55:21 +0000
commit36e27af00cbd53c2b6d864c3b3c02dd480a94645 (patch)
tree6de8f5e5c1bec31c3b32e8408ca65e97ca559a80
parent8573da9d96e37587317148bf56dfc18ceba1d36d (diff)
downloadopenttd-36e27af00cbd53c2b6d864c3b3c02dd480a94645.tar.xz
(svn r4763) - Newstations: revert r4762, instead map bit the palette modifier from bit 14 to bit 31 on GRF load.
-rw-r--r--newgrf.c10
-rw-r--r--station_cmd.c1
2 files changed, 9 insertions, 2 deletions
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;
}
}
}
diff --git a/station_cmd.c b/station_cmd.c
index 350e4ab02..22c86c82a 100644
--- a/station_cmd.c
+++ b/station_cmd.c
@@ -2060,7 +2060,6 @@ static void DrawTile_Station(TileInfo *ti)
if ((byte)dtss->delta_z != 0x80) {
AddSortableSpriteToDraw(image, ti->x + dtss->delta_x, ti->y + dtss->delta_y, dtss->width, dtss->height, dtss->unk, ti->z + dtss->delta_z);
} else {
- MAKE_TRANSPARENT(image);
AddChildSpriteScreen(image, dtss->delta_x, dtss->delta_y);
}
}