diff options
author | Eugene Sandulenko | 2014-04-26 12:23:37 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2014-04-26 12:23:37 +0300 |
commit | 04ca386e6808e66d97f60d66c45954699ec8ef26 (patch) | |
tree | 32b1bd704b7f2eb96fa6cc7524b4855b4af3f6e2 | |
parent | da23bd077243d80bef4c7cb759a5fe40a64eb76e (diff) | |
download | scummvm-rg350-04ca386e6808e66d97f60d66c45954699ec8ef26.tar.gz scummvm-rg350-04ca386e6808e66d97f60d66c45954699ec8ef26.tar.bz2 scummvm-rg350-04ca386e6808e66d97f60d66c45954699ec8ef26.zip |
FULLPIPE: Implement global_messageHandler_KickStucco()
-rw-r--r-- | engines/fullpipe/messagehandlers.cpp | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/engines/fullpipe/messagehandlers.cpp b/engines/fullpipe/messagehandlers.cpp index bc757bcb98..15aa78d342 100644 --- a/engines/fullpipe/messagehandlers.cpp +++ b/engines/fullpipe/messagehandlers.cpp @@ -34,12 +34,47 @@ namespace Fullpipe { void global_messageHandler_KickStucco() { - warning("STUB: global_messageHandler_KickStucco()"); + Movement *mov = g_fp->_aniMan->getMovementById(MV_MAN_HMRKICK); + int end = mov->_currMovement ? mov->_currMovement->_dynamicPhases.size() : mov->_dynamicPhases.size(); + bool flip = false; + + for (int i = 0; i < end; i++) { + ExCommand *ex = mov->getDynamicPhaseByIndex(i)->_exCommand; + + if (ex) + if (ex->_messageKind == 35) + if (ex->_messageNum == SND_CMN_015) { + if (flip) { + ex->_messageNum = SND_CMN_055; + } else { + ex->_messageNum = SND_CMN_054; + flip = true; + } + } + } + + mov = g_fp->_aniMan->getMovementById(MV_MAN_HMRKICK_COINLESS); + end = mov->_currMovement ? mov->_currMovement->_dynamicPhases.size() : mov->_dynamicPhases.size(); + flip = false; + + for (int i = 0; i < end; i++) { + ExCommand *ex = mov->getDynamicPhaseByIndex(i)->_exCommand; + + if (ex) + if (ex->_messageKind == 35) + if (ex->_messageNum == SND_CMN_015) { + if (flip) { + ex->_messageNum = SND_CMN_055; + } else { + ex->_messageNum = SND_CMN_054; + flip = true; + } + } + } } void global_messageHandler_KickMetal() { Movement *mov = g_fp->_aniMan->getMovementById(MV_MAN_HMRKICK); - int end = mov->_currMovement ? mov->_currMovement->_dynamicPhases.size() : mov->_dynamicPhases.size(); for (int i = 0; i < end; i++) { |