summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-05-01 18:57:43 +0000
committerpeter1138 <peter1138@openttd.org>2006-05-01 18:57:43 +0000
commit6ed002db532b3b23d6f3b3974cb1fe7eed430f9f (patch)
tree4d79db6065c52c24de51571afc02f51eab69e6da
parent6942f235ccb74bcbf3d994377867d3b4f07d00df (diff)
downloadopenttd-6ed002db532b3b23d6f3b3974cb1fe7eed430f9f.tar.xz
(svn r4652) - NewGRF: support loading of foundation and canal graphics from NewGRF files via action 5
-rw-r--r--newgrf.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/newgrf.c b/newgrf.c
index 7b2afb323..e52848941 100644
--- a/newgrf.c
+++ b/newgrf.c
@@ -1915,6 +1915,22 @@ static void GraphicsNew(byte *buf, int len)
replace = SPR_ELRAIL_BASE + 3;
break;
+ case 0x06: /* Foundations */
+ if (num != 74) {
+ grfmsg(GMS_WARN, "GraphicsNews: Foundation graphics sprite count must be 74, skipping.");
+ return;
+ }
+ replace = SPR_SLOPES_BASE;
+ break;
+
+ case 0x08: /* Canal graphics */
+ if (num != 65) {
+ grfmsg(GMS_WARN, "GraphicsNews: Canal graphics sprite count must be 65, skipping.");
+ return;
+ }
+ replace = SPR_CANALS_BASE + 5;
+ break;
+
default:
grfmsg(GMS_NOTICE, "GraphicsNew: Custom graphics (type 0x%02X) sprite block of length %u (unimplemented, ignoring).\n",
type, num);