aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe
diff options
context:
space:
mode:
authorEugene Sandulenko2014-04-26 12:18:53 +0300
committerEugene Sandulenko2014-04-26 12:18:53 +0300
commitda23bd077243d80bef4c7cb759a5fe40a64eb76e (patch)
tree6d6f625545a3ee15fba322aa35f92282efb72f76 /engines/fullpipe
parentc55398cd4bf07dc21b557339fe37cde61a2bcaa4 (diff)
downloadscummvm-rg350-da23bd077243d80bef4c7cb759a5fe40a64eb76e.tar.gz
scummvm-rg350-da23bd077243d80bef4c7cb759a5fe40a64eb76e.tar.bz2
scummvm-rg350-da23bd077243d80bef4c7cb759a5fe40a64eb76e.zip
FULLPIPE: Implement global_messageHandler_KickMetal()
Diffstat (limited to 'engines/fullpipe')
-rw-r--r--engines/fullpipe/constants.h5
-rw-r--r--engines/fullpipe/messagehandlers.cpp25
2 files changed, 29 insertions, 1 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index 8f3f587714..f76a12fb2b 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -43,6 +43,8 @@ namespace Fullpipe {
#define MV_LFT_OPEN 1048
#define MV_MAN_GOLADDER 451
#define MV_MAN_GOLADDER2 2844
+#define MV_MAN_HMRKICK 1028
+#define MV_MAN_HMRKICK_COINLESS 1445
#define MV_MAN_LIFTDOWN 1052
#define MV_MAN_LIFTUP 1051
#define MV_MAN_LOOKUP 4773
@@ -219,8 +221,11 @@ namespace Fullpipe {
#define SC_MAINMENU 4620
#define SC_MAP 5222
#define SC_TITLES 5166
+#define SND_CMN_015 3139
#define SND_CMN_031 3516
#define SND_CMN_032 3517
+#define SND_CMN_054 4762
+#define SND_CMN_055 4763
#define SND_CMN_060 4921
#define SND_CMN_061 4922
#define SND_CMN_070 5199
diff --git a/engines/fullpipe/messagehandlers.cpp b/engines/fullpipe/messagehandlers.cpp
index 17af2bf4fd..bc757bcb98 100644
--- a/engines/fullpipe/messagehandlers.cpp
+++ b/engines/fullpipe/messagehandlers.cpp
@@ -38,7 +38,30 @@ void global_messageHandler_KickStucco() {
}
void global_messageHandler_KickMetal() {
- warning("STUB: 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++) {
+ ExCommand *ex = mov->getDynamicPhaseByIndex(i)->_exCommand;
+
+ if (ex)
+ if (ex->_messageKind == 35)
+ if (ex->_messageNum == SND_CMN_054 || ex->_messageNum == SND_CMN_055)
+ ex->_messageNum = SND_CMN_015;
+ }
+
+ mov = g_fp->_aniMan->getMovementById(MV_MAN_HMRKICK_COINLESS);
+ end = mov->_currMovement ? mov->_currMovement->_dynamicPhases.size() : mov->_dynamicPhases.size();
+
+ for (int i = 0; i < end; i++) {
+ ExCommand *ex = mov->getDynamicPhaseByIndex(i)->_exCommand;
+
+ if (ex)
+ if (ex->_messageKind == 35)
+ if (ex->_messageNum == SND_CMN_054 || ex->_messageNum == SND_CMN_055)
+ ex->_messageNum = SND_CMN_015;
+ }
}
int global_messageHandler1(ExCommand *cmd) {