diff options
author | frosch <frosch@openttd.org> | 2008-03-10 15:31:07 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2008-03-10 15:31:07 +0000 |
commit | 51bbf0c84fb9f34317b9f1d7e724ef8cd40aadee (patch) | |
tree | dabc1c126e63cbfd587b31683c64c701ea69e641 /src/newgrf_spritegroup.h | |
parent | 220b2a1ae1c020132eff593f4df796c04d8c3b72 (diff) | |
download | openttd-51bbf0c84fb9f34317b9f1d7e724ef8cd40aadee.tar.xz |
(svn r12352) -Fix: Some callback-results were treated as 8 bit, when they were 15 bit, and vice versa.
Var 0x7E procedure-results are always 15 bit.
Callbacks 0x2A, 0x2C, 0x36 (sometimes), 0x39 and 0x145 are 15 bit.
Non-varaction2-calculated callback-results are also affected by the 8bit masking.
Diffstat (limited to 'src/newgrf_spritegroup.h')
-rw-r--r-- | src/newgrf_spritegroup.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/newgrf_spritegroup.h b/src/newgrf_spritegroup.h index f6507b4d2..4a3baa0f4 100644 --- a/src/newgrf_spritegroup.h +++ b/src/newgrf_spritegroup.h @@ -198,6 +198,7 @@ struct ResolverObject { CallbackID callback; uint32 callback_param1; uint32 callback_param2; + bool procedure_call; ///< true if we are currently resolving a var 0x7E procedure result. byte trigger; uint32 last_value; @@ -254,6 +255,8 @@ struct ResolverObject { void (*SetTriggers)(const struct ResolverObject*, int); uint32 (*GetVariable)(const struct ResolverObject*, byte, byte, bool*); const SpriteGroup *(*ResolveReal)(const struct ResolverObject*, const SpriteGroup*); + + ResolverObject() : procedure_call(false) { } }; |