diff options
author | Matthew Hoops | 2010-05-25 03:46:28 +0000 |
---|---|---|
committer | Matthew Hoops | 2010-05-25 03:46:28 +0000 |
commit | 4a8841202a25d48df190d9479bda98026f9c14d5 (patch) | |
tree | 395d5b04c543a938f724146dfc46315563a19943 /engines/mohawk/riven_external.cpp | |
parent | ab540af9f815183fb3bb087e0a7dcab9e62cd847 (diff) | |
download | scummvm-rg350-4a8841202a25d48df190d9479bda98026f9c14d5.tar.gz scummvm-rg350-4a8841202a25d48df190d9479bda98026f9c14d5.tar.bz2 scummvm-rg350-4a8841202a25d48df190d9479bda98026f9c14d5.zip |
Implement *scpbtn and *_domecheck. The domes can now be opened/closed (not using the sliders).
svn-id: r49208
Diffstat (limited to 'engines/mohawk/riven_external.cpp')
-rw-r--r-- | engines/mohawk/riven_external.cpp | 47 |
1 files changed, 35 insertions, 12 deletions
diff --git a/engines/mohawk/riven_external.cpp b/engines/mohawk/riven_external.cpp index 8b1ff45a66..184761318f 100644 --- a/engines/mohawk/riven_external.cpp +++ b/engines/mohawk/riven_external.cpp @@ -213,16 +213,39 @@ void RivenExternal::runEndGame(uint16 video) { _vm->_gameOver = true; } +void RivenExternal::runDomeButtonMovie() { + // This command just plays the video of the button moving down and up. + _vm->_video->playMovieBlocking(2); +} + +void RivenExternal::runDomeCheck() { + // Check if we clicked while the golden frame was showing + + VideoHandle video = _vm->_video->findVideoHandle(1); + assert(video != NULL_VID_HANDLE); + + int32 curFrame = _vm->_video->getCurFrame(video); + int32 frameCount = _vm->_video->getFrameCount(video); + + // The final frame of the video is the 'golden' frame (double meaning: the + // frame that is the magic one is the one with the golden symbol) but we + // give a 3 frame leeway in either direction. + if (frameCount - curFrame < 3 || curFrame < 3) + *_vm->matchVarToString("domecheck") = 1; +} + // ------------------------------------------------------------------------------------ // aspit (Main Menu, Books, Setup) external commands // ------------------------------------------------------------------------------------ void RivenExternal::xastartupbtnhide(uint16 argc, uint16 *argv) { - // The original game hides the start/setup buttons depending on an ini entry. It's safe to ignore this command. + // The original game hides the start/setup buttons depending on an ini entry. + // It's safe to ignore this command. } void RivenExternal::xasetupcomplete(uint16 argc, uint16 *argv) { - // The original game sets an ini entry to disable the setup button and use the start button only. It's safe to ignore this part of the command. + // The original game sets an ini entry to disable the setup button and use the + // start button only. It's safe to ignore this part of the command. _vm->_sound->stopSound(); _vm->changeToCard(1); } @@ -627,11 +650,11 @@ void RivenExternal::xbisland190_slidermw(uint16 argc, uint16 *argv) { } void RivenExternal::xbscpbtn(uint16 argc, uint16 *argv) { - // TODO: Dome related + runDomeButtonMovie(); } void RivenExternal::xbisland_domecheck(uint16 argc, uint16 *argv) { - // TODO: Dome related + runDomeCheck(); } void RivenExternal::xvalvecontrol(uint16 argc, uint16 *argv) { @@ -723,11 +746,11 @@ void RivenExternal::xgisland25_slidermw(uint16 argc, uint16 *argv) { } void RivenExternal::xgscpbtn(uint16 argc, uint16 *argv) { - // TODO: Dome related + runDomeButtonMovie(); } void RivenExternal::xgisland1490_domecheck(uint16 argc, uint16 *argv) { - // TODO: Dome related + runDomeCheck(); } void RivenExternal::xgplateau3160_dopools(uint16 argc, uint16 *argv) { @@ -978,11 +1001,11 @@ void RivenExternal::xjdome25_slidermw(uint16 argc, uint16 *argv) { } void RivenExternal::xjscpbtn(uint16 argc, uint16 *argv) { - // TODO: Dome related + runDomeButtonMovie(); } void RivenExternal::xjisland3500_domecheck(uint16 argc, uint16 *argv) { - // TODO: Dome related + runDomeCheck(); } int RivenExternal::jspitElevatorLoop() { @@ -1258,11 +1281,11 @@ void RivenExternal::xpisland990_elevcombo(uint16 argc, uint16 *argv) { } void RivenExternal::xpscpbtn(uint16 argc, uint16 *argv) { - // TODO: Dome related + runDomeButtonMovie(); } void RivenExternal::xpisland290_domecheck(uint16 argc, uint16 *argv) { - // TODO: Dome related + runDomeCheck(); } void RivenExternal::xpisland25_opencard(uint16 argc, uint16 *argv) { @@ -1457,11 +1480,11 @@ void RivenExternal::xtakeit(uint16 argc, uint16 *argv) { } void RivenExternal::xtscpbtn(uint16 argc, uint16 *argv) { - // TODO: Dome related + runDomeButtonMovie(); } void RivenExternal::xtisland4990_domecheck(uint16 argc, uint16 *argv) { - // TODO: Dome related + runDomeCheck(); } void RivenExternal::xtisland5056_opencard(uint16 argc, uint16 *argv) { |