From f7c768552a53f3f3733d9bade6667445aec004d3 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 26 Jan 2014 16:18:03 +0200 Subject: FULLPIPE: Implement lift_clickButton() --- engines/fullpipe/fullpipe.cpp | 2 ++ engines/fullpipe/fullpipe.h | 5 ++++- engines/fullpipe/lift.cpp | 9 +++++++-- engines/fullpipe/scenes/scene03.cpp | 2 +- engines/fullpipe/scenes/scene06.cpp | 2 +- engines/fullpipe/scenes/scene10.cpp | 2 +- engines/fullpipe/scenes/scene14.cpp | 2 +- engines/fullpipe/scenes/scene15.cpp | 2 +- engines/fullpipe/scenes/scene30.cpp | 2 +- engines/fullpipe/scenes/scene32.cpp | 2 +- engines/fullpipe/scenes/scene34.cpp | 2 +- engines/fullpipe/scenes/scene35.cpp | 2 +- engines/fullpipe/scenes/scene38.cpp | 2 +- 13 files changed, 23 insertions(+), 13 deletions(-) diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index 1c319d3660..578a40f492 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -82,6 +82,8 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) _modalObject = 0; + _lastLiftButton = 0; + _gameContinue = true; _needRestart = false; _flgPlayIntro = true; diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index 0fc69c2de3..2e071b11f6 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -269,13 +269,16 @@ public: void getAllInventory(); + StaticANIObject *_lastLiftButton; + int lift_getButtonIdP(int objid); void lift_setButton(const char *name, int state); void lift_sub5(Scene *sc, int qu1, int qu2); void lift_sub7(Scene *sc, int buttonId); void lift_exitSeq(ExCommand *ex); void lift_closedoorSeq(); - void lift_animation3(); + void lift_clickButton(); + void lift_walkAndGo(); void lift_goAnimation(); void lift_sub1(StaticANIObject *ani); void lift_startExitQueue(); diff --git a/engines/fullpipe/lift.cpp b/engines/fullpipe/lift.cpp index e5c566ebcf..c8434fabde 100644 --- a/engines/fullpipe/lift.cpp +++ b/engines/fullpipe/lift.cpp @@ -85,8 +85,13 @@ void FullpipeEngine::lift_closedoorSeq() { warning("STUB: FullpipeEngine::lift_closedoorSeq()"); } -void FullpipeEngine::lift_animation3() { - warning("STUB: FullpipeEngine::lift_animation3()"); +void FullpipeEngine::lift_walkAndGo() { + warning("STUB: FullpipeEngine::lift_walkAndGo()"); +} + +void FullpipeEngine::lift_clickButton() { + if (_lastLiftButton) + lift_walkAndGo(); } void FullpipeEngine::lift_goAnimation() { diff --git a/engines/fullpipe/scenes/scene03.cpp b/engines/fullpipe/scenes/scene03.cpp index 40e70e2ea5..c706dadc99 100644 --- a/engines/fullpipe/scenes/scene03.cpp +++ b/engines/fullpipe/scenes/scene03.cpp @@ -215,7 +215,7 @@ int sceneHandler03(ExCommand *ex) { break; case MSG_LIFT_CLICKBUTTON: - g_fp->lift_animation3(); + g_fp->lift_clickButton(); break; case MSG_SC3_HIDEDOMINO: diff --git a/engines/fullpipe/scenes/scene06.cpp b/engines/fullpipe/scenes/scene06.cpp index c352d27dd6..0c271519ec 100644 --- a/engines/fullpipe/scenes/scene06.cpp +++ b/engines/fullpipe/scenes/scene06.cpp @@ -590,7 +590,7 @@ int sceneHandler06(ExCommand *ex) { break; case MSG_LIFT_CLICKBUTTON: - g_fp->lift_animation3(); + g_fp->lift_clickButton(); break; case MSG_SPINHANDLE: diff --git a/engines/fullpipe/scenes/scene10.cpp b/engines/fullpipe/scenes/scene10.cpp index f8d16b2759..6836cd6f76 100644 --- a/engines/fullpipe/scenes/scene10.cpp +++ b/engines/fullpipe/scenes/scene10.cpp @@ -140,7 +140,7 @@ int sceneHandler10(ExCommand *ex) { break; case MSG_LIFT_CLICKBUTTON: - g_fp->lift_animation3(); + g_fp->lift_clickButton(); break; case MSG_SC10_LADDERTOBACK: diff --git a/engines/fullpipe/scenes/scene14.cpp b/engines/fullpipe/scenes/scene14.cpp index 4a09bc9cb6..e0618ee6a1 100644 --- a/engines/fullpipe/scenes/scene14.cpp +++ b/engines/fullpipe/scenes/scene14.cpp @@ -665,7 +665,7 @@ int sceneHandler14(ExCommand *cmd) { break; case MSG_LIFT_CLICKBUTTON: - g_fp->lift_animation3(); + g_fp->lift_clickButton(); break; case MSG_SC14_SHOWBALLGMAHIT: diff --git a/engines/fullpipe/scenes/scene15.cpp b/engines/fullpipe/scenes/scene15.cpp index 046e9c9adc..ece260de02 100644 --- a/engines/fullpipe/scenes/scene15.cpp +++ b/engines/fullpipe/scenes/scene15.cpp @@ -144,7 +144,7 @@ int sceneHandler15(ExCommand *cmd) { break; case MSG_LIFT_CLICKBUTTON: - g_fp->lift_animation3(); + g_fp->lift_clickButton(); break; case MSG_SC15_PULL: diff --git a/engines/fullpipe/scenes/scene30.cpp b/engines/fullpipe/scenes/scene30.cpp index 59cb83efcd..d115a70bc6 100644 --- a/engines/fullpipe/scenes/scene30.cpp +++ b/engines/fullpipe/scenes/scene30.cpp @@ -103,7 +103,7 @@ int sceneHandler30(ExCommand *cmd) { break; case MSG_LIFT_CLICKBUTTON: - g_fp->lift_animation3(); + g_fp->lift_clickButton(); break; case MSG_SC30_UPDATEPATH: diff --git a/engines/fullpipe/scenes/scene32.cpp b/engines/fullpipe/scenes/scene32.cpp index c93e888e51..87ecf220b8 100644 --- a/engines/fullpipe/scenes/scene32.cpp +++ b/engines/fullpipe/scenes/scene32.cpp @@ -291,7 +291,7 @@ int sceneHandler32(ExCommand *cmd) { break; case MSG_LIFT_CLICKBUTTON: - g_fp->lift_animation3(); + g_fp->lift_clickButton(); break; case MSG_SC33_TRYKUBIK: diff --git a/engines/fullpipe/scenes/scene34.cpp b/engines/fullpipe/scenes/scene34.cpp index 942a0abc6b..72a289a405 100644 --- a/engines/fullpipe/scenes/scene34.cpp +++ b/engines/fullpipe/scenes/scene34.cpp @@ -317,7 +317,7 @@ int sceneHandler34(ExCommand *cmd) { break; case MSG_LIFT_CLICKBUTTON: - g_fp->lift_animation3(); + g_fp->lift_clickButton(); break; case MSG_SC34_FROMCACTUS: diff --git a/engines/fullpipe/scenes/scene35.cpp b/engines/fullpipe/scenes/scene35.cpp index 290213c453..ac8ed714d6 100644 --- a/engines/fullpipe/scenes/scene35.cpp +++ b/engines/fullpipe/scenes/scene35.cpp @@ -168,7 +168,7 @@ int sceneHandler35(ExCommand *cmd) { break; case MSG_LIFT_CLICKBUTTON: - g_fp->lift_animation3(); + g_fp->lift_clickButton(); break; case MSG_SC35_STOPFLOW: diff --git a/engines/fullpipe/scenes/scene38.cpp b/engines/fullpipe/scenes/scene38.cpp index 198a88f25d..bf7c2a30aa 100644 --- a/engines/fullpipe/scenes/scene38.cpp +++ b/engines/fullpipe/scenes/scene38.cpp @@ -348,7 +348,7 @@ int sceneHandler38(ExCommand *cmd) { break; case MSG_LIFT_CLICKBUTTON: - g_fp->lift_animation3(); + g_fp->lift_clickButton(); break; case MSG_SC38_POINT: -- cgit v1.2.3