diff options
-rw-r--r-- | engines/access/amazon/amazon_scripts.cpp | 8 | ||||
-rw-r--r-- | engines/access/scripts.cpp | 100 | ||||
-rw-r--r-- | engines/access/scripts.h | 13 |
3 files changed, 111 insertions, 10 deletions
diff --git a/engines/access/amazon/amazon_scripts.cpp b/engines/access/amazon/amazon_scripts.cpp index 43532aa93c..5cf22106b7 100644 --- a/engines/access/amazon/amazon_scripts.cpp +++ b/engines/access/amazon/amazon_scripts.cpp @@ -472,8 +472,12 @@ void AmazonScripts::cmdCycleBack() { _vm->_screen->cyclePaletteBackwards(); } void AmazonScripts::cmdChapter() { - int chapter = _data->readByte(); - _game->startChapter(chapter); + if (_vm->isDemo()) { + cmdSetHelp(); + } else { + int chapter = _data->readByte(); + _game->startChapter(chapter); + } } void AmazonScripts::cmdSetHelp() { diff --git a/engines/access/scripts.cpp b/engines/access/scripts.cpp index 57af1a869c..053e824956 100644 --- a/engines/access/scripts.cpp +++ b/engines/access/scripts.cpp @@ -114,24 +114,24 @@ void Scripts::executeCommand(int commandIndex) { &Scripts::cmdJumpUse, &Scripts::cmdJumpTalk, &Scripts::cmdNull, &Scripts::cmdPrint, &Scripts::cmdRetPos, &Scripts::cmdAnim, &Scripts::cmdSetFlag, &Scripts::cmdCheckFlag, &Scripts::cmdGoto, - &Scripts::cmdSetInventory, &Scripts::cmdSetInventory, &Scripts::cmdCheckInventory, + &Scripts::cmdAddScore, &Scripts::cmdSetInventory, &Scripts::cmdCheckInventory, &Scripts::cmdSetTex, &Scripts::cmdNewRoom, &Scripts::cmdConverse, &Scripts::cmdCheckFrame, &Scripts::cmdCheckAnim, &Scripts::cmdSnd, &Scripts::cmdRetNeg, &Scripts::cmdRetPos, &Scripts::cmdCheckLoc, - &Scripts::cmdSetAnim, &Scripts::cmdDispInv, &Scripts::cmdSetTimer, + &Scripts::cmdSetAnim, &Scripts::cmdDispInv, &Scripts::cmdSetAbout, &Scripts::cmdSetTimer, &Scripts::cmdCheckTimer, &Scripts::cmdSetTravel, - &Scripts::cmdSetTravel, &Scripts::cmdSetVideo, &Scripts::cmdPlayVideo, + &Scripts::cmdJumpGoto, &Scripts::cmdSetVideo, &Scripts::cmdPlayVideo, &Scripts::cmdPlotImage, &Scripts::cmdSetDisplay, &Scripts::cmdSetBuffer, - &Scripts::cmdSetScroll, &Scripts::cmdVideoEnded, &Scripts::cmdVideoEnded, + &Scripts::cmdSetScroll, &Scripts::cmdSaveRect, &Scripts::cmdVideoEnded, &Scripts::cmdSetBufVid, &Scripts::cmdPlayBufVid, &Scripts::cmdRemoveLast, - &Scripts::cmdSpecial, &Scripts::cmdSpecial, &Scripts::cmdSpecial, + &Scripts::cmdDoTravel, &Scripts::cmdCheckAbout, &Scripts::cmdSpecial, &Scripts::cmdSetCycle, &Scripts::cmdCycle, &Scripts::cmdCharSpeak, &Scripts::cmdTexSpeak, &Scripts::cmdTexChoice, &Scripts::cmdWait, &Scripts::cmdSetConPos, &Scripts::cmdCheckVFrame, &Scripts::cmdJumpChoice, &Scripts::cmdReturnChoice, &Scripts::cmdClearBlock, &Scripts::cmdLoadSound, &Scripts::cmdFreeSound, &Scripts::cmdSetVideoSound, &Scripts::cmdPlayVideoSound, - &Scripts::CMDPUSHLOCATION, &Scripts::CMDPUSHLOCATION, &Scripts::CMDPUSHLOCATION, - &Scripts::CMDPUSHLOCATION, &Scripts::CMDPUSHLOCATION, &Scripts::cmdPlayerOff, + &Scripts::cmdPrintWatch, &Scripts::cmdDispAbout, &Scripts::CMDPUSHLOCATION, + &Scripts::cmdCheckTravel, &Scripts::cmdBlock, &Scripts::cmdPlayerOff, &Scripts::cmdPlayerOn, &Scripts::cmdDead, &Scripts::cmdFadeOut, &Scripts::cmdEndVideo }; @@ -263,6 +263,15 @@ void Scripts::cmdGoto() { searchForSequence(); } +void Scripts::cmdAddScore() { + if (_vm->isCD()) { + cmdSetInventory(); + return; + } + + _data->skip(1); +} + void Scripts::cmdSetInventory() { int itemId = _data->readByte(); int itemVal = _data->readByte(); @@ -400,6 +409,15 @@ void Scripts::cmdDispInv() { _vm->_inventory->newDisplayInv(); } +void Scripts::cmdSetAbout() { + if (_vm->isCD()) { + cmdSetTimer(); + return; + } + + error("TODO: DEMO - cmdSetAbout"); +} + void Scripts::cmdSetTimer() { int idx = _data->readUint16LE(); int val = _data->readUint16LE(); @@ -439,6 +457,14 @@ void Scripts::cmdCheckTimer() { } void Scripts::cmdSetTravel() { + if (_vm->isCD()) { + cmdJumpGoto(); + return; + } + error("TODO: DEMO - cmdSetTravel"); +} + +void Scripts::cmdJumpGoto() { if (_vm->_room->_selectCommand == 5) cmdGoto(); else @@ -486,6 +512,14 @@ void Scripts::cmdSetScroll() { _vm->_screen->_scrollY = 0; } +void Scripts::cmdSaveRect() { + if (_vm->isCD()) { + cmdVideoEnded(); + return; + } + error("TODO: DEMO - cmdSaveRect"); +} + void Scripts::cmdVideoEnded() { _vm->_events->pollEvents(); @@ -515,6 +549,22 @@ void Scripts::cmdRemoveLast() { --_vm->_numAnimTimers; } +void Scripts::cmdDoTravel() { + if (_vm->isCD()) { + cmdSpecial(); + return; + } + error("TODO: DEMO - cmdDoTravel"); +} + +void Scripts::cmdCheckAbout() { + if (_vm->isCD()) { + cmdSpecial(); + return; + } + error("TODO: DEMO - cmdCheckAbout"); +} + void Scripts::cmdSpecial() { _specialFunction = _data->readUint16LE(); int p1 = _data->readUint16LE(); @@ -774,7 +824,41 @@ void Scripts::cmdPlayVideoSound() { g_system->delayMillis(10); } -void Scripts::CMDPUSHLOCATION() { error("TODO CMDPUSHLOCATION"); } +void Scripts::cmdPrintWatch() { + if (_vm->isCD()) { + CMDPUSHLOCATION(); + return; + } + error("TODO: DEMO - cmdPrintWatch"); +} + +void Scripts::cmdDispAbout() { + if (_vm->isCD()) { + CMDPUSHLOCATION(); + return; + } + error("TODO: DEMO - cmdDispAbout"); +} + +void Scripts::CMDPUSHLOCATION() { + error("TODO CMDPUSHLOCATION"); +} + +void Scripts::cmdCheckTravel() { + if (_vm->isCD()) { + CMDPUSHLOCATION(); + return; + } + error("TODO: DEMO - cmdCheckTravel"); +} + +void Scripts::cmdBlock() { + if (_vm->isCD()) { + CMDPUSHLOCATION(); + return; + } + error("TODO: DEMO - cmdBlock"); +} void Scripts::cmdPlayerOff() { _vm->_player->_playerOff = true; diff --git a/engines/access/scripts.h b/engines/access/scripts.h index cc9eca3d04..320da73bbb 100644 --- a/engines/access/scripts.h +++ b/engines/access/scripts.h @@ -71,6 +71,7 @@ protected: */ void cmdGoto(); + void cmdAddScore(); void cmdSetInventory(); void cmdCheckInventory(); void cmdSetTex(); @@ -83,8 +84,10 @@ protected: void cmdCheckLoc(); void cmdSetAnim(); void cmdDispInv(); + void cmdSetAbout(); void cmdSetTimer(); void cmdCheckTimer(); + void cmdJumpGoto(); void cmdSetTravel(); void cmdSetVideo(); void cmdPlayVideo(); @@ -92,10 +95,13 @@ protected: void cmdSetDisplay(); void cmdSetBuffer(); void cmdSetScroll(); + void cmdSaveRect(); void cmdVideoEnded(); void cmdSetBufVid(); void cmdPlayBufVid(); void cmdRemoveLast(); + void cmdDoTravel(); + void cmdCheckAbout(); void cmdSpecial(); void cmdSetCycle(); void cmdCycle(); @@ -111,12 +117,19 @@ protected: void cmdLoadSound(); void cmdSetVideoSound(); void cmdPlayVideoSound(); + void cmdPrintWatch(); + void cmdDispAbout(); void CMDPUSHLOCATION(); + void cmdCheckTravel(); + void cmdBlock(); void cmdPlayerOff(); void cmdPlayerOn(); void cmdDead(); void cmdFadeOut(); void cmdEndVideo(); + void cmdHelp(); + void cmdCycleBack(); + void cmdSetHelp(); public: int _sequence; bool _endFlag; |