summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-08-28 17:30:55 +0000
committerrubidium <rubidium@openttd.org>2010-08-28 17:30:55 +0000
commit1ec1f1ef374b70b0e057d806f1310b7aeadce50c (patch)
treed6f6372fa139e30557ab074379f979c7776e27ae /src/saveload
parent34da98f2b14e63c7042f44271d0b452fcd970737 (diff)
downloadopenttd-1ec1f1ef374b70b0e057d806f1310b7aeadce50c.tar.xz
(svn r20648) -Codechange: implement the NewGRF override manager for objects
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/object_sl.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/saveload/object_sl.cpp b/src/saveload/object_sl.cpp
index db1ab1e41..0e36100c3 100644
--- a/src/saveload/object_sl.cpp
+++ b/src/saveload/object_sl.cpp
@@ -13,6 +13,7 @@
#include "../object_base.h"
#include "saveload.h"
+#include "newgrf_sl.h"
static const SaveLoad _object_desc[] = {
SLE_VAR(Object, location.tile, SLE_UINT32),
@@ -52,6 +53,17 @@ static void Ptrs_OBJS()
}
}
+static void Save_OBID()
+{
+ Save_NewGRFMapping(_object_mngr);
+}
+
+static void Load_OBID()
+{
+ Load_NewGRFMapping(_object_mngr);
+}
+
extern const ChunkHandler _object_chunk_handlers[] = {
+ { 'OBID', Save_OBID, Load_OBID, NULL, NULL, CH_ARRAY },
{ 'OBJS', Save_OBJS, Load_OBJS, Ptrs_OBJS, NULL, CH_ARRAY | CH_LAST},
};