(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.
This commit is contained in:
frosch
2008-03-10 15:31:07 +00:00
parent 220b2a1ae1
commit 51bbf0c84f
3 changed files with 47 additions and 19 deletions

View File

@@ -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) { }
};