diff options
author | Torbjörn Andersson | 2016-09-05 19:14:36 +0200 |
---|---|---|
committer | Torbjörn Andersson | 2016-09-05 19:14:36 +0200 |
commit | ef71f37a9c63039aa239393c476b96cbfe2b7d20 (patch) | |
tree | 53b3f7e2ccc950e0bf19e70ee6b990c165840081 /engines/macventure | |
parent | 623e4e2fdc4a122c85cefe16cfd6bb09ad1411da (diff) | |
download | scummvm-rg350-ef71f37a9c63039aa239393c476b96cbfe2b7d20.tar.gz scummvm-rg350-ef71f37a9c63039aa239393c476b96cbfe2b7d20.tar.bz2 scummvm-rg350-ef71f37a9c63039aa239393c476b96cbfe2b7d20.zip |
MACVENTURE: Implement opcode $cb (Get Current Day)
In Deja Vu, Pete's All Nite Gun Palace is closed if you play the
game on a Sunday. I'm guessing that's the only place where this
opcode is used
Diffstat (limited to 'engines/macventure')
-rw-r--r-- | engines/macventure/script.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/engines/macventure/script.cpp b/engines/macventure/script.cpp index 2a1ffcfa1a..77bbea1866 100644 --- a/engines/macventure/script.cpp +++ b/engines/macventure/script.cpp @@ -1061,8 +1061,14 @@ void ScriptEngine::opcaTIME(EngineState *state, EngineFrame *frame) { } void ScriptEngine::opcbDAY(EngineState *state, EngineFrame *frame) { - // Probaby irrelevant, so we push Day [9] - state->push(9); + TimeDate t; + g_system->getTimeAndDate(t); + + int weekday = 1 + t.tm_wday; + weekday = 1; + state->push(weekday); + + debugC(2, kMVDebugScript, "Current day of week: %d", weekday); } void ScriptEngine::opccCHLD(EngineState *state, EngineFrame *frame) { |