summaryrefslogtreecommitdiff
path: root/src/newgrf_spritegroup.h
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-05-14 12:36:31 +0000
committerfrosch <frosch@openttd.org>2011-05-14 12:36:31 +0000
commit930d0c97021d9ec9d3acf37d916b236de0c1ca3a (patch)
treec12567d08146c12154d7325a51b01bebeb344efb /src/newgrf_spritegroup.h
parenta63b22991d4df2862009efc745dd2e7adb4e395d (diff)
downloadopenttd-930d0c97021d9ec9d3acf37d916b236de0c1ca3a.tar.xz
(svn r22452) -Fix (r18708): Zero register 0x100 as specified before resolving custom station foundations.
Diffstat (limited to 'src/newgrf_spritegroup.h')
-rw-r--r--src/newgrf_spritegroup.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/newgrf_spritegroup.h b/src/newgrf_spritegroup.h
index da4d5e5df..2541195d9 100644
--- a/src/newgrf_spritegroup.h
+++ b/src/newgrf_spritegroup.h
@@ -35,6 +35,17 @@ static inline uint32 GetRegister(uint i)
return _temp_store.Get(i);
}
+/**
+ * Clears the value of a so-called newgrf "register".
+ * @param i index of the register
+ * @pre i < 0x110
+ */
+static inline void ClearRegister(uint i)
+{
+ extern TemporaryStorageArray<int32, 0x110> _temp_store;
+ _temp_store.Store(i, 0);
+}
+
/* List of different sprite group types */
enum SpriteGroupType {
SGT_REAL,