summaryrefslogtreecommitdiff
path: root/newgrf.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-12-02 09:54:49 +0000
committerpeter1138 <peter1138@openttd.org>2006-12-02 09:54:49 +0000
commit6a4d8fdd33de84ef691caa29ea77c21ff2b8d6c4 (patch)
treecade1f6a922cf31544c6a8ab37bae8a09b9dc5e0 /newgrf.c
parent0d5b0eb4f7cba920fef7713c61bbcb08e4d817ee (diff)
downloadopenttd-6a4d8fdd33de84ef691caa29ea77c21ff2b8d6c4.tar.xz
(svn r7325) -Feature: Add support for action 5 type 0x0D, coast sprites.
Diffstat (limited to 'newgrf.c')
-rw-r--r--newgrf.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/newgrf.c b/newgrf.c
index 3ae0d2e4b..fc0688ae3 100644
--- a/newgrf.c
+++ b/newgrf.c
@@ -43,6 +43,7 @@
static int _skip_sprites; // XXX
static uint _file_index; // XXX
SpriteID _signal_base;
+SpriteID _coast_base;
static GRFFile *_cur_grffile;
GRFFile *_first_grffile;
@@ -2159,6 +2160,14 @@ static void GraphicsNew(byte *buf, int len)
replace = SPR_CANALS_BASE + 5;
break;
+ case 0x0D: /* Coast graphics */
+ if (num != 16) {
+ grfmsg(GMS_WARN, "GraphicsNews: Coast graphics sprite count must be 16, skipping.");
+ return;
+ }
+ _coast_base = _cur_spriteid;
+ break;
+
default:
grfmsg(GMS_NOTICE, "GraphicsNew: Custom graphics (type 0x%02X) sprite block of length %u (unimplemented, ignoring).\n",
type, num);
@@ -3326,6 +3335,7 @@ static void ResetNewGRFData(void)
_traininfo_vehicle_width = 29;
_have_2cc = false;
_signal_base = 0;
+ _coast_base = 0;
InitializeSoundPool();
InitializeSpriteGroupPool();