diff options
author | Strangerke | 2014-08-17 11:16:31 +0200 |
---|---|---|
committer | Strangerke | 2014-08-17 11:16:31 +0200 |
commit | 3e61eb9cc3f233fabf34f54069a1a1209e257008 (patch) | |
tree | 72dc46d8a453538fef60145db0b9a57f0b32d8bc | |
parent | 1ab89400e52da33207a14051410fad01c257d14c (diff) | |
download | scummvm-rg350-3e61eb9cc3f233fabf34f54069a1a1209e257008.tar.gz scummvm-rg350-3e61eb9cc3f233fabf34f54069a1a1209e257008.tar.bz2 scummvm-rg350-3e61eb9cc3f233fabf34f54069a1a1209e257008.zip |
ACCESS: Implement some opcodes
-rw-r--r-- | engines/access/access.cpp | 6 | ||||
-rw-r--r-- | engines/access/access.h | 1 | ||||
-rw-r--r-- | engines/access/room.h | 3 | ||||
-rw-r--r-- | engines/access/scripts.cpp | 38 | ||||
-rw-r--r-- | engines/access/scripts.h | 8 |
5 files changed, 43 insertions, 13 deletions
diff --git a/engines/access/access.cpp b/engines/access/access.cpp index fde5ab8754..d2967c0377 100644 --- a/engines/access/access.cpp +++ b/engines/access/access.cpp @@ -84,6 +84,9 @@ AccessEngine::AccessEngine(OSystem *syst, const AccessGameDescription *gameDesc) Common::fill(&_help1[0], &_help1[366], 0); Common::fill(&_help2[0], &_help2[366], 0); Common::fill(&_help1[0], &_help3[366], 0); + _helpTbl[0] = _help1; + _helpTbl[1] = _help2; + _helpTbl[2] = _help3; _travel = 0; _ask = 0; _rScrollRow = 0; @@ -221,6 +224,9 @@ void AccessEngine::doEstablish(int v1, int v2) { _buffer2.copyBuffer(_screen); } + _room->setIconPalette(); + _screen->forceFadeIn(); + warning("TODO: doEstablish"); } diff --git a/engines/access/access.h b/engines/access/access.h index fa2d24ec44..37be9cfc36 100644 --- a/engines/access/access.h +++ b/engines/access/access.h @@ -163,6 +163,7 @@ public: byte _help1[366]; byte _help2[366]; byte _help3[366]; + byte *_helpTbl[3]; int _travel; int _ask; int _rScrollRow; diff --git a/engines/access/room.h b/engines/access/room.h index 3035561892..22dbd16411 100644 --- a/engines/access/room.h +++ b/engines/access/room.h @@ -120,8 +120,6 @@ protected: virtual void reloadRoom1() = 0; - virtual void setIconPalette() {} - virtual void doCommands(); virtual void roomMenu() = 0; @@ -159,6 +157,7 @@ public: void init4Quads(); + virtual void setIconPalette() {} void placeBubble(); void placeBubble1(); diff --git a/engines/access/scripts.cpp b/engines/access/scripts.cpp index a4d67c87f1..f781ec14d0 100644 --- a/engines/access/scripts.cpp +++ b/engines/access/scripts.cpp @@ -93,7 +93,7 @@ void Scripts::executeCommand(int commandIndex) { &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::CMDSETTIMER, &Scripts::CMDSETTIMER, &Scripts::CMDCHECKTIMER, &Scripts::cmdSetTravel, &Scripts::cmdSetTravel, &Scripts::CMDSETVID, &Scripts::CMDPLAYVID, &Scripts::cmdPlotImage, &Scripts::cmdSetDisplay, &Scripts::cmdSetBuffer, @@ -103,13 +103,13 @@ void Scripts::executeCommand(int commandIndex) { &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::cmdReturnChoice, &Scripts::cmdClearBlock, &Scripts::CMDLOADSOUND, &Scripts::CMDFREESOUND, &Scripts::CMDSETVIDSND, &Scripts::CMDPLAYVIDSND, &Scripts::CMDPUSHLOCATION, &Scripts::CMDPUSHLOCATION, &Scripts::CMDPUSHLOCATION, &Scripts::CMDPUSHLOCATION, &Scripts::CMDPUSHLOCATION, &Scripts::cmdPlayerOff, &Scripts::cmdPlayerOn, &Scripts::CMDDEAD, &Scripts::cmdFadeOut, &Scripts::CMDENDVID, &Scripts::CMDHELP, &Scripts::CMDCYCLEBACK, - &Scripts::CMDCHAPTER, &Scripts::CMDSETHELP, &Scripts::CMDCENTERPANEL, + &Scripts::CMDCHAPTER, &Scripts::cmdSetHelp, &Scripts::cmdCenterPanel, &Scripts::cmdMainPanel, &Scripts::CMDRETFLASH }; @@ -296,7 +296,10 @@ void Scripts::cmdSetAnim() { _vm->_animation->setAnimTimer(anim); } -void Scripts::CMDDISPINV() { error("TODO CMDDISPINV"); } +void Scripts::cmdDispInv() { + _vm->_inventory->newDisplayInv(); +} + void Scripts::CMDSETTIMER() { error("TODO CMDSETTIMER"); } void Scripts::CMDCHECKTIMER() { error("TODO CMDCHECKTIMER"); } @@ -388,7 +391,10 @@ void Scripts::cmdReturnChoice() { _data->seek(_choiceStart); } -void Scripts::CMDCLEARBLOCK() { error("TODO CMDCLEARBLOCK"); } +void Scripts::cmdClearBlock() { + _vm->_screen->restoreBlock(); +} + void Scripts::CMDLOADSOUND() { error("TODO CMDLOADSOUND"); } void Scripts::CMDFREESOUND() { error("TODO CMDFREESOUND"); } void Scripts::CMDSETVIDSND() { error("TODO CMDSETVIDSND"); } @@ -413,8 +419,26 @@ void Scripts::CMDENDVID() { error("TODO CMDENDVID"); } void Scripts::CMDHELP() { error("TODO CMDHELP"); } void Scripts::CMDCYCLEBACK() { error("TODO CMDCYCLEBACK"); } void Scripts::CMDCHAPTER() { error("TODO CMDCHAPTER"); } -void Scripts::CMDSETHELP() { error("TODO CMDSETHELP"); } -void Scripts::CMDCENTERPANEL() { error("TODO CMDCENTERPANEL"); } + +void Scripts::cmdSetHelp() { + int arrayId = (_data->readUint16LE() && 0xFF) - 1; + int helpId = _data->readUint16LE() && 0xFF; + + byte *help = _vm->_helpTbl[arrayId]; + help[helpId] = 1; + + if (_vm->_useItem == 0) { + _sequence = 11000; + searchForSequence(); + } +} + +void Scripts::cmdCenterPanel() { + if (_vm->_screen->_vesaMode) { + _vm->_screen->clearScreen(); + _vm->_screen->setPanel(3); + } +} void Scripts::cmdMainPanel() { if (_vm->_screen->_vesaMode) { diff --git a/engines/access/scripts.h b/engines/access/scripts.h index 78e54f56c6..4cf969e8c9 100644 --- a/engines/access/scripts.h +++ b/engines/access/scripts.h @@ -74,7 +74,7 @@ protected: void cmdRetNeg(); void cmdCheckLoc(); void cmdSetAnim(); - void CMDDISPINV(); + void cmdDispInv(); void CMDSETTIMER(); void CMDCHECKTIMER(); void cmdSetTravel(); @@ -99,7 +99,7 @@ protected: void CMDCHECKVFRAME(); void cmdJumpChoice(); void cmdReturnChoice(); - void CMDCLEARBLOCK(); + void cmdClearBlock(); void CMDLOADSOUND(); void CMDFREESOUND(); void CMDSETVIDSND(); @@ -113,8 +113,8 @@ protected: void CMDHELP(); void CMDCYCLEBACK(); void CMDCHAPTER(); - void CMDSETHELP(); - void CMDCENTERPANEL(); + void cmdSetHelp(); + void cmdCenterPanel(); void cmdMainPanel(); void CMDRETFLASH(); public: |