aboutsummaryrefslogtreecommitdiff
path: root/engines/agi/agi.h
diff options
context:
space:
mode:
authorMartin Kiewitz2016-02-16 03:18:10 +0100
committerMartin Kiewitz2016-02-16 03:18:10 +0100
commit562649c7c03a25fc2ea64cb9d1aa4e3f4938d9ea (patch)
treede034cdcc1c442bfc5a27808351c99a4b59359af /engines/agi/agi.h
parentd394dcf725fac4661eed883efe64144b78b35355 (diff)
downloadscummvm-rg350-562649c7c03a25fc2ea64cb9d1aa4e3f4938d9ea.tar.gz
scummvm-rg350-562649c7c03a25fc2ea64cb9d1aa4e3f4938d9ea.tar.bz2
scummvm-rg350-562649c7c03a25fc2ea64cb9d1aa4e3f4938d9ea.zip
AGI: Change how VM timer vars are handled
Instead of directly converting play time to VM timer vars, we only adjust VM timer vars according to play time seconds delta. This is needed for at least Mixed Up Mother Goose. The game sets the VM "second" variable to 0 and then uses it for syncing the text to the songs. We even adjust second calculation, so that the timing should always be the same and not depend on basically luck (seconds may wrap right after setting it, because internal cycles counter is not changed).
Diffstat (limited to 'engines/agi/agi.h')
-rw-r--r--engines/agi/agi.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/agi/agi.h b/engines/agi/agi.h
index fe70c4ebc2..c5db1dfc1d 100644
--- a/engines/agi/agi.h
+++ b/engines/agi/agi.h
@@ -870,6 +870,10 @@ private:
uint32 _getVarSecondsHeuristicLastInstructionCounter; /**< last time VM_VAR_SECONDS were read */
uint16 _getVarSecondsHeuristicCounter; /**< how many times heuristic was triggered */
+ uint32 _playTimeInSecondsAdjust; /**< milliseconds to adjust for calculating current play time in seconds, see setVarSecondsTrigger() */
+
+ void setVarSecondsTrigger(byte newSeconds);
+
public:
// Some submethods of testIfCode
void skipInstruction(byte op);