diff options
author | Strangerke | 2011-10-01 11:10:49 +0200 |
---|---|---|
committer | Strangerke | 2011-10-01 11:10:49 +0200 |
commit | 3ac1240b6a710b3a1e7394398adaa5958a838a6e (patch) | |
tree | b2cb3cbc688837f65b24ec45503c8109eb9e246e | |
parent | 9bb978486b102dc751922c6d5f4e729e264c2887 (diff) | |
download | scummvm-rg350-3ac1240b6a710b3a1e7394398adaa5958a838a6e.tar.gz scummvm-rg350-3ac1240b6a710b3a1e7394398adaa5958a838a6e.tar.bz2 scummvm-rg350-3ac1240b6a710b3a1e7394398adaa5958a838a6e.zip |
CGE: Translate (and clarify) polish comments. Add a couple of doxygen comments
Thanks Aquadran for the initial translation of Polish comments
-rw-r--r-- | engines/cge/snail.cpp | 202 |
1 files changed, 109 insertions, 93 deletions
diff --git a/engines/cge/snail.cpp b/engines/cge/snail.cpp index 74bc6acdf8..34adeb3a8e 100644 --- a/engines/cge/snail.cpp +++ b/engines/cge/snail.cpp @@ -162,7 +162,7 @@ void CommandHandler::runCommand() { switch (tailCmd->_commandType) { case kCmdLabel: break; - case kCmdPause : + case kCmdPause: _timerExpiry = g_system->getMillis() + tailCmd->_val * kCommandFrameDelay; if (_vm->_talk) _textDelay = true; @@ -375,6 +375,11 @@ bool CommandHandler::idle() { return (_head == _tail); } +/** + * Handles mini-Games logic + * @param com Command + * @param num mini game number + */ void CGEEngine::snGame(Sprite *spr, int num) { debugC(1, kCGEDebugEngine, "CGEEngine::snGame(spr, %d)", num); @@ -402,66 +407,65 @@ void CGEEngine::snGame(Sprite *spr, int num) { if (hand && Stage > kDressed) ++hand; if (i >= 0 || (dup[i] == spr && newRandom(3) == 0)) { - _commandHandler->addCommand(kCmdSeq, -1, 3, dup[0]); // yes - _commandHandler->addCommand(kCmdSeq, -1, 3, dup[1]); // yes - _commandHandler->addCommand(kCmdSeq, -1, 3, dup[2]); // yes - _commandHandler->addCommand(kCmdTNext, -1, 0, dup[0]); // reset Take - _commandHandler->addCommand(kCmdTNext, -1, 0, dup[1]); // reset Take - _commandHandler->addCommand(kCmdTNext, -1, 0, dup[2]); // reset Take - _commandHandler->addCommand(kCmdNNext, -1, 0, dup[0]); // reset Near - _commandHandler->addCommand(kCmdPause, -1, 72, NULL); // little rest - _commandHandler->addCommand(kCmdSay, 1, 16009, NULL); // hura - _commandHandler->addCommand(kCmdSay, buref, 16010, NULL); // siadaj - _commandHandler->addCommand(kCmdSay, 1, 16011, NULL); // postoj‘ + _commandHandler->addCommand(kCmdSeq, -1, 3, dup[0]); // Yes + _commandHandler->addCommand(kCmdSeq, -1, 3, dup[1]); // Yes + _commandHandler->addCommand(kCmdSeq, -1, 3, dup[2]); // Yes + _commandHandler->addCommand(kCmdTNext, -1, 0, dup[0]); // Reset Take + _commandHandler->addCommand(kCmdTNext, -1, 0, dup[1]); // Reset Take + _commandHandler->addCommand(kCmdTNext, -1, 0, dup[2]); // Reset Take + _commandHandler->addCommand(kCmdNNext, -1, 0, dup[0]); // Reset Near + _commandHandler->addCommand(kCmdPause, -1, 72, NULL); // Pause the game for 72/80 second + _commandHandler->addCommand(kCmdSay, 1, 16009, NULL); // Say "I win.." + _commandHandler->addCommand(kCmdSay, buref, 16010, NULL); // Say "Go Sit..." + _commandHandler->addCommand(kCmdSay, 1, 16011, NULL); // Say "I prefer not" if (hand) { - _commandHandler->addCommand(kCmdSend, 16060 + hand, 16, NULL); // dawaj r‘k‘ - _commandHandler->addCommand(kCmdSeq, buref, 4, NULL); // zdejmowanie - _commandHandler->addCommand(kCmdSeq, 16060 + hand, 1, NULL); // ruch - _commandHandler->addCommand(kCmdSound, 16060 + hand, 16002, NULL); // szelest - _commandHandler->addCommand(kCmdWait, 16060 + hand, 3, NULL); // podniesie - _commandHandler->addCommand(kCmdSwap, buref, buref + 100, NULL); // rozdziana - _commandHandler->addCommand(kCmdSeq, 16016, Stage, NULL); // rožnie kupa - _commandHandler->addCommand(kCmdSend, 16060 + hand, -1, NULL); // chowaj r‘k‘ - _commandHandler->addCommand(kCmdWait, 16060 + hand, -1, NULL); // r‘ka zamar’a + _commandHandler->addCommand(kCmdSend, 16060 + hand, 16, NULL); // Give hand + _commandHandler->addCommand(kCmdSeq, buref, 4, NULL); // Take off + _commandHandler->addCommand(kCmdSeq, 16060 + hand, 1, NULL); // start one of the Bartender animations + _commandHandler->addCommand(kCmdSound, 16060 + hand, 16002, NULL); // Play tear sound + _commandHandler->addCommand(kCmdWait, 16060 + hand, 3, NULL); // Take up + _commandHandler->addCommand(kCmdSwap, buref, buref + 100, NULL); // Open hand + _commandHandler->addCommand(kCmdSeq, 16016, Stage, NULL); // Start Belongings animation + _commandHandler->addCommand(kCmdSend, 16060 + hand, -1, NULL); // Hide hand + _commandHandler->addCommand(kCmdWait, 16060 + hand, -1, NULL); // Stop moving hand } else { - _commandHandler->addCommand(kCmdSeq, buref, 4, NULL); // zdejmowanie - _commandHandler->addCommand(kCmdSound, 16060 + hand, 16002, NULL); // szelest - _commandHandler->addCommand(kCmdWait, buref, -1, NULL); // zdejmie - _commandHandler->addCommand(kCmdSwap, buref, buref + 100, NULL); // rozdziana - _commandHandler->addCommand(kCmdSeq, 16016, Stage, NULL); // rožnie kupa + _commandHandler->addCommand(kCmdSeq, buref, 4, NULL); // Take off + _commandHandler->addCommand(kCmdSound, 16060 + hand, 16002, NULL); // Play tear sound + _commandHandler->addCommand(kCmdWait, buref, -1, NULL); // Will take off + _commandHandler->addCommand(kCmdSwap, buref, buref + 100, NULL); // Open hand + _commandHandler->addCommand(kCmdSeq, 16016, Stage, NULL); // Start Belongings animation } - //SNPOST(SNSEQ, buref+100, 0, NULL); // reset - _commandHandler->addCommand(kCmdPause, -1, 72, NULL); // chwilk‘... - _commandHandler->addCommand(kCmdSeq, -1, 0, dup[1]); // odstaw Go + _commandHandler->addCommand(kCmdPause, -1, 72, NULL); // Pause the game for 72/80 second + _commandHandler->addCommand(kCmdSeq, -1, 0, dup[1]); // Get away (Him) _commandHandler->addCommand(kCmdSetXY, -1, 203 + kScrWidth * 49, dup[1]); _commandHandler->addCommand(kCmdSetZ, -1, 7, dup[1]); - _commandHandler->addCommand(kCmdSeq, -1, 0, dup[2]); // odstaw J† + _commandHandler->addCommand(kCmdSeq, -1, 0, dup[2]); // Get Away (Her) _commandHandler->addCommand(kCmdSetXY, -1, 182 + kScrWidth * 62, dup[2]); _commandHandler->addCommand(kCmdSetZ, -1, 9, dup[2]); _game = 0; return; } else { - _commandHandler->addCommand(kCmdSeq, -1, 2, dup[0]); // no - _commandHandler->addCommand(kCmdSeq, -1, 2, dup[1]); // no - _commandHandler->addCommand(kCmdSeq, -1, 2, dup[2]); // no - _commandHandler->addCommand(kCmdPause, -1, 72, NULL); // 1 sec + _commandHandler->addCommand(kCmdSeq, -1, 2, dup[0]); // reset animation sequence + _commandHandler->addCommand(kCmdSeq, -1, 2, dup[1]); // reset animation sequence + _commandHandler->addCommand(kCmdSeq, -1, 2, dup[2]); // reset animation sequence + _commandHandler->addCommand(kCmdPause, -1, 72, NULL); // Pause the game for 72/80 second } } - _commandHandler->addCommand(kCmdWalk, 198, 134, NULL); // na miejsce - _commandHandler->addCommand(kCmdWait, 1, -1, NULL); // stoi - _commandHandler->addCommand(kCmdCover, 1, 16101, NULL); // ch’op do bicia - _commandHandler->addCommand(kCmdSeq, 16101, 1, NULL); // wystaw - _commandHandler->addCommand(kCmdWait, 16101, 5, NULL); // czekaj - _commandHandler->addCommand(kCmdPause, 16101, 24, NULL); // czekaj chwil‘ - _commandHandler->addCommand(kCmdSeq, 16040, 1, NULL); // plask - _commandHandler->addCommand(kCmdSound, 16101, 16001, NULL); // plask! - _commandHandler->addCommand(kCmdPause, 16101, 24, NULL); // czekaj chwil‘ - _commandHandler->addCommand(kCmdSeq, 16040, 0, NULL); // schowaj plask - _commandHandler->addCommand(kCmdWait, 16101, -1, NULL); // stoi + _commandHandler->addCommand(kCmdWalk, 198, 134, NULL); // Go to place + _commandHandler->addCommand(kCmdWait, 1, -1, NULL); // Stop moving + _commandHandler->addCommand(kCmdCover, 1, 16101, NULL); // Man to beat + _commandHandler->addCommand(kCmdSeq, 16101, 1, NULL); // Start Chief animation (16dupnia) + _commandHandler->addCommand(kCmdWait, 16101, 5, NULL); // wait + _commandHandler->addCommand(kCmdPause, 16101, 24, NULL); // Pause the game for 24/80 second + _commandHandler->addCommand(kCmdSeq, 16040, 1, NULL); // Start Slap animation (16plask) + _commandHandler->addCommand(kCmdSound, 16101, 16001, NULL); // Play "Slap" sound + _commandHandler->addCommand(kCmdPause, 16101, 24, NULL); // Pause the game for 24/80 second + _commandHandler->addCommand(kCmdSeq, 16040, 0, NULL); // Reset animation sequence + _commandHandler->addCommand(kCmdWait, 16101, -1, NULL); // stay _commandHandler->addCommand(kCmdUncover, 1, 16101, NULL); // SDS if (!_game) { - _commandHandler->addCommand(kCmdSay, buref, 16008, NULL); // zgadnij! + _commandHandler->addCommand(kCmdSay, buref, 16008, NULL); // say "Guess!" _game = true; } } @@ -495,19 +499,19 @@ void CGEEngine::snGame(Sprite *spr, int num) { bool hit = (_sprK1->_seqPtr + _sprK2->_seqPtr + _sprK3->_seqPtr == 15); if (hit) { if (spr->_ref == 1) { - _commandHandler->addCommand(kCmdSay, 1, 20003, NULL); // hura! - _commandHandler->addCommand(kCmdSeq, 20011, 2, NULL); // kamera won - _commandHandler->addCommand(kCmdSend, 20701, -1, NULL); // k1 won - _commandHandler->addCommand(kCmdSend, 20702, -1, NULL); // k2 won - _commandHandler->addCommand(kCmdSend, 20703, -1, NULL); // k3 won - _commandHandler->addCommand(kCmdSend, 20700, -1, NULL); // tv won - _commandHandler->addCommand(kCmdKeep, 20007, 0, NULL); // do kieszeni - _commandHandler->addCommand(kCmdSend, 20006, 20, NULL); // bilon - _commandHandler->addCommand(kCmdSound, 20006, 20002, NULL); // bilon! - _commandHandler->addCommand(kCmdSay, 20002, 20004, NULL); - _commandHandler->addCommand(kCmdSend, 20010, 20, NULL); // papier - _commandHandler->addCommand(kCmdSound, 20010, 20003, NULL); // papier! - _commandHandler->addCommand(kCmdSay, 20001, 20005, NULL); + _commandHandler->addCommand(kCmdSay, 1, 20003, NULL); // hurray! + _commandHandler->addCommand(kCmdSeq, 20011, 2, NULL); // Camera away + _commandHandler->addCommand(kCmdSend, 20701, -1, NULL); // move dice1 to scene -1 + _commandHandler->addCommand(kCmdSend, 20702, -1, NULL); // move dice2 to scene -1 + _commandHandler->addCommand(kCmdSend, 20703, -1, NULL); // move dice3 to scene -1 + _commandHandler->addCommand(kCmdSend, 20700, -1, NULL); // move TV to scene -1 + _commandHandler->addCommand(kCmdKeep, 20007, 0, NULL); // to pocket + _commandHandler->addCommand(kCmdSend, 20006, 20, NULL); // Move Coin to scene 20 + _commandHandler->addCommand(kCmdSound, 20006, 20002, NULL); // Play Coin sound + _commandHandler->addCommand(kCmdSay, 20002, 20004, NULL); // Say "Luck guy..." + _commandHandler->addCommand(kCmdSend, 20010, 20, NULL); // Move Paper to scene 20 + _commandHandler->addCommand(kCmdSound, 20010, 20003, NULL); // Play "ksh" sound! (fx20003.wav) + _commandHandler->addCommand(kCmdSay, 20001, 20005, NULL); // Say "Congratulations" _game = false; return; } else @@ -517,12 +521,14 @@ void CGEEngine::snGame(Sprite *spr, int num) { if (_gameCase2Cpt < 100) { switch (_gameCase2Cpt) { case 15: + // Give hint about ALTered dice _commandHandler->addCommand(kCmdSay, 20003, 20021, NULL); break; case 30: case 45: case 60: case 75: + // Tell to use ALT key _commandHandler->addCommand(kCmdSay, 20003, 20022, NULL); break; } @@ -531,48 +537,48 @@ void CGEEngine::snGame(Sprite *spr, int num) { switch (spr->_ref) { case 1: - _commandHandler->addCommand(kCmdSay, 20001, 20011, NULL); // zapro - _commandHandler->addCommand(kCmdSeq, 20001, 1, NULL); // rzuŤ - _commandHandler->addCommand(kCmdWait, 20001, 1, NULL); // czekaj - _commandHandler->addCommand(kCmdSetZ, 20700, 2, NULL); // skryj k - _commandHandler->addCommand(kCmdHide, 20007, 1, NULL); // skryj k - _commandHandler->addCommand(kCmdWait, 20001, 16, NULL); // czekaj - _commandHandler->addCommand(kCmdSeq, 20007, 1, NULL); // lec† - _commandHandler->addCommand(kCmdHide, 20007, 0, NULL); // poka§ - _commandHandler->addCommand(kCmdSound, 20007, 20001, NULL); // grzech - _commandHandler->addCommand(kCmdWait, 20007, -1, NULL); // koniec + _commandHandler->addCommand(kCmdSay, 20001, 20011, NULL); // Say "It'a my turn" + _commandHandler->addCommand(kCmdSeq, 20001, 1, NULL); // Throw diceŤ + _commandHandler->addCommand(kCmdWait, 20001, 1, NULL); // wait + _commandHandler->addCommand(kCmdSetZ, 20700, 2, NULL); // hide dice + _commandHandler->addCommand(kCmdHide, 20007, 1, NULL); // hide dice + _commandHandler->addCommand(kCmdWait, 20001, 16, NULL); // wait + _commandHandler->addCommand(kCmdSeq, 20007, 1, NULL); // Start dice animation (20kosci) + _commandHandler->addCommand(kCmdHide, 20007, 0, NULL); // unhide + _commandHandler->addCommand(kCmdSound, 20007, 20001, NULL); // Play Dice sound + _commandHandler->addCommand(kCmdWait, 20007, -1, NULL); // the end _commandHandler->addCommand(kCmdGame, 20001, 2, NULL); // again! break; case 20001: - _commandHandler->addCommand(kCmdSay, 20002, 20012, NULL); // zapro - _commandHandler->addCommand(kCmdSeq, 20002, 1, NULL); // rzuŤ - _commandHandler->addCommand(kCmdWait, 20002, 3, NULL); // czekaj - _commandHandler->addCommand(kCmdSetZ, 20700, 2, NULL); // skryj k - _commandHandler->addCommand(kCmdHide, 20007, 1, NULL); // skryj k - _commandHandler->addCommand(kCmdWait, 20002, 10, NULL); // czekaj - _commandHandler->addCommand(kCmdSeq, 20007, 2, NULL); // lec† - _commandHandler->addCommand(kCmdHide, 20007, 0, NULL); // poka§ - _commandHandler->addCommand(kCmdSound, 20007, 20001, NULL); // grzech - _commandHandler->addCommand(kCmdWait, 20007, -1, NULL); // koniec + _commandHandler->addCommand(kCmdSay, 20002, 20012, NULL); // Say "Now it's mine" + _commandHandler->addCommand(kCmdSeq, 20002, 1, NULL); // Throw diceŤ + _commandHandler->addCommand(kCmdWait, 20002, 3, NULL); // wait + _commandHandler->addCommand(kCmdSetZ, 20700, 2, NULL); // hide dice + _commandHandler->addCommand(kCmdHide, 20007, 1, NULL); // hide dice + _commandHandler->addCommand(kCmdWait, 20002, 10, NULL); // wait + _commandHandler->addCommand(kCmdSeq, 20007, 2, NULL); // Start dice animation (20kosci) + _commandHandler->addCommand(kCmdHide, 20007, 0, NULL); // unhide + _commandHandler->addCommand(kCmdSound, 20007, 20001, NULL); // Play Dice sound + _commandHandler->addCommand(kCmdWait, 20007, -1, NULL); // the end _commandHandler->addCommand(kCmdGame, 20002, 2, NULL); // again! break; case 20002: - _commandHandler->addCommand(kCmdSay, 20002, 20010, NULL); // zapro - _commandHandler->addCommand(kCmdWalk, 20005, -1, NULL); // do stol - _commandHandler->addCommand(kCmdWait, 1, -1, NULL); // stoi - _commandHandler->addCommand(kCmdCover, 1, 20101, NULL); // grasol - _commandHandler->addCommand(kCmdSeq, 20101, 1, NULL); // rzuŤ - _commandHandler->addCommand(kCmdWait, 20101, 5, NULL); // czekaj - _commandHandler->addCommand(kCmdSetZ, 20700, 2, NULL); // skryj k - _commandHandler->addCommand(kCmdHide, 20007, 1, NULL); // skryj k - _commandHandler->addCommand(kCmdWait, 20101, 15, NULL); // czekaj - _commandHandler->addCommand(kCmdSeq, 20007, 1, NULL); // lec† - _commandHandler->addCommand(kCmdHide, 20007, 0, NULL); // poka§ - _commandHandler->addCommand(kCmdSound, 20007, 20001, NULL); // grzech - _commandHandler->addCommand(kCmdWait, 20101, -1, NULL); // koniec - _commandHandler->addCommand(kCmdUncover, 1, 20101, NULL); // SDS + _commandHandler->addCommand(kCmdSay, 20002, 20010, NULL); // "Roll the bones!" + _commandHandler->addCommand(kCmdWalk, 20005, -1, NULL); // Walk to table + _commandHandler->addCommand(kCmdWait, 1, -1, NULL); // Wait + _commandHandler->addCommand(kCmdCover, 1, 20101, NULL); // grasol ?? + _commandHandler->addCommand(kCmdSeq, 20101, 1, NULL); // Start Chief animation (20solgra)Ť + _commandHandler->addCommand(kCmdWait, 20101, 5, NULL); // Wait + _commandHandler->addCommand(kCmdSetZ, 20700, 2, NULL); // Hide dice + _commandHandler->addCommand(kCmdHide, 20007, 1, NULL); // Hide dice + _commandHandler->addCommand(kCmdWait, 20101, 15, NULL); // wait + _commandHandler->addCommand(kCmdSeq, 20007, 1, NULL); // Start dice animation (20kosci) + _commandHandler->addCommand(kCmdHide, 20007, 0, NULL); // Unhide + _commandHandler->addCommand(kCmdSound, 20007, 20001, NULL); // Play Dice sound + _commandHandler->addCommand(kCmdWait, 20101, -1, NULL); // the end + _commandHandler->addCommand(kCmdUncover, 1, 20101, NULL); // SDS ?? _commandHandler->addCommand(kCmdGame, 1, 2, NULL); // again! break; } @@ -593,6 +599,11 @@ void CGEEngine::contractSprite(Sprite *spr) { _vga->_spareQ->append(_vga->_showQ->remove(spr)); } +/** + * Check if an item is in the inventory, and returns its position + * @param spr Sprite pointer + * @return -1 if not found, else index. + */ int CGEEngine::findPocket(Sprite *spr) { debugC(1, kCGEDebugEngine, "CGEEngine::findPocket(spr)"); @@ -1038,6 +1049,11 @@ void CGEEngine::snKill(Sprite *spr) { } } +/** + * Play a FX sound + * @param spr Sprite pointer + * @param wav FX index + */ void CGEEngine::snSound(Sprite *spr, int wav) { debugC(1, kCGEDebugEngine, "CGEEngine::snSound(spr, %d)", wav); |