summaryrefslogtreecommitdiff
path: root/newgrf.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-05-03 20:35:41 +0000
committerpeter1138 <peter1138@openttd.org>2006-05-03 20:35:41 +0000
commit76411cef63faacc4428213e828b11f1f6abd1d9e (patch)
treec9f7992fc600efd538023379e91521d3a9ac21d3 /newgrf.c
parent6b01384faf48c19968ed1ccef1d3f4f487908794 (diff)
downloadopenttd-76411cef63faacc4428213e828b11f1f6abd1d9e.tar.xz
(svn r4719) - Newstations: instead of drawing nothing, fall back to the default sprite layout if a station layout specifies so.
Diffstat (limited to 'newgrf.c')
-rw-r--r--newgrf.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/newgrf.c b/newgrf.c
index 0bb3e94e7..62b0e6464 100644
--- a/newgrf.c
+++ b/newgrf.c
@@ -810,12 +810,9 @@ static bool StationChangeInfo(uint stid, int numinfo, int prop, byte **bufp, int
uint seq_count = 0;
PalSpriteID ground_sprite;
+ dts->seq = NULL;
ground_sprite = grf_load_dword(&buf);
- if (ground_sprite == 0) {
- static const DrawTileSeqStruct empty = {0x80, 0, 0, 0, 0, 0, 0};
- dts->seq = &empty;
- continue;
- }
+ if (ground_sprite == 0) continue;
if (HASBIT(ground_sprite, 31)) {
// Bit 31 indicates that we should use a custom sprite.
@@ -825,7 +822,6 @@ static bool StationChangeInfo(uint stid, int numinfo, int prop, byte **bufp, int
dts->ground_sprite = ground_sprite;
}
- dts->seq = NULL;
while (buf < *bufp + len) {
DrawTileSeqStruct *dtss;
@@ -861,15 +857,11 @@ static bool StationChangeInfo(uint stid, int numinfo, int prop, byte **bufp, int
DrawTileSeqStruct const *sdtss = sdts->seq;
int seq_count = 0;
+ dts->seq = NULL;
dts->ground_sprite = sdts->ground_sprite;
- if (dts->ground_sprite == 0) {
- static const DrawTileSeqStruct empty = {0x80, 0, 0, 0, 0, 0, 0};
- dts->seq = &empty;
- continue;
- }
+ if (dts->ground_sprite == 0) continue;
- dts->seq = NULL;
- while (1) {
+ while (true) {
DrawTileSeqStruct *dtss;
// no relative bounding box support