[Scummvm-git-logs] scummvm master -> 2cc4c7329cf949f69734083524595295bc8c8266
waltervn
walter at vanniftrik-it.nl
Mon Feb 20 17:29:41 CET 2017
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
2cc4c7329c ADL: Implement hires6 game loop hacks
Commit: 2cc4c7329cf949f69734083524595295bc8c8266
https://github.com/scummvm/scummvm/commit/2cc4c7329cf949f69734083524595295bc8c8266
Author: Walter van Niftrik (walter at scummvm.org)
Date: 2017-02-20T17:22:28+01:00
Commit Message:
ADL: Implement hires6 game loop hacks
Changed paths:
engines/adl/hires6.cpp
diff --git a/engines/adl/hires6.cpp b/engines/adl/hires6.cpp
index 03c9b1c..347a4f2 100644
--- a/engines/adl/hires6.cpp
+++ b/engines/adl/hires6.cpp
@@ -44,6 +44,7 @@ public:
private:
// AdlEngine
+ void gameLoop();
void setupOpcodeTables();
void runIntro();
void init();
@@ -67,6 +68,29 @@ private:
byte _currVerb, _currNoun;
};
+void HiRes6Engine::gameLoop() {
+ AdlEngine_v5::gameLoop();
+
+ // Variable 25 starts at 5 and counts down every 160 moves.
+ // When it reaches 0, the game ends. This variable determines
+ // what you see when you "LOOK SUNS".
+ // Variable 39 is used to advance the suns based on game events,
+ // so even a fast player will see the suns getting closer together
+ // as he progresses.
+ if (getVar(39) != 0) {
+ if (getVar(39) < getVar(25))
+ setVar(25, getVar(39));
+ setVar(39, 0);
+ }
+
+ if (getVar(25) != 0) {
+ if (getVar(25) > 5)
+ error("Variable 25 has unexpected value %d", getVar(25));
+ if ((6 - getVar(25)) * 160 == _state.moves)
+ setVar(25, getVar(25) - 1);
+ }
+}
+
typedef Common::Functor1Mem<ScriptEnv &, int, HiRes6Engine> OpcodeH6;
#define SetOpcodeTable(x) table = &x;
#define Opcode(x) table->push_back(new OpcodeH6(this, &HiRes6Engine::x))
More information about the Scummvm-git-logs
mailing list