diff options
author | peter1138 <peter1138@openttd.org> | 2006-05-03 20:35:41 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2006-05-03 20:35:41 +0000 |
commit | 76411cef63faacc4428213e828b11f1f6abd1d9e (patch) | |
tree | c9f7992fc600efd538023379e91521d3a9ac21d3 /newgrf.c | |
parent | 6b01384faf48c19968ed1ccef1d3f4f487908794 (diff) | |
download | openttd-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.c | 18 |
1 files changed, 5 insertions, 13 deletions
@@ -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 = ∅ - 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 = ∅ - continue; - } + if (dts->ground_sprite == 0) continue; - dts->seq = NULL; - while (1) { + while (true) { DrawTileSeqStruct *dtss; // no relative bounding box support |