aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/fullpipe/fullpipe.h2
-rw-r--r--engines/fullpipe/lift.cpp15
-rw-r--r--engines/fullpipe/scenes/scene38.cpp2
3 files changed, 15 insertions, 4 deletions
diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h
index baf0380402..09160db65f 100644
--- a/engines/fullpipe/fullpipe.h
+++ b/engines/fullpipe/fullpipe.h
@@ -276,7 +276,7 @@ public:
int lift_getButtonIdN(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_setButtonStatics(Scene *sc, int buttonId);
void lift_exitSeq(ExCommand *ex);
void lift_closedoorSeq();
void lift_clickButton();
diff --git a/engines/fullpipe/lift.cpp b/engines/fullpipe/lift.cpp
index 32d5f33872..81d7d2dc1c 100644
--- a/engines/fullpipe/lift.cpp
+++ b/engines/fullpipe/lift.cpp
@@ -25,6 +25,8 @@
#include "fullpipe/objects.h"
#include "fullpipe/objectnames.h"
#include "fullpipe/constants.h"
+#include "fullpipe/scene.h"
+#include "fullpipe/statics.h"
namespace Fullpipe {
@@ -209,8 +211,17 @@ bool FullpipeEngine::lift_checkButton(const char *varname) {
return false;
}
-void FullpipeEngine::lift_sub7(Scene *sc, int buttonId) {
- warning("STUB: lift_sub7()");
+void FullpipeEngine::lift_setButtonStatics(Scene *sc, int buttonId) {
+ for (uint i = 0; i < sc->_staticANIObjectList1.size(); i++) {
+ StaticANIObject *ani = (StaticANIObject *)sc->_staticANIObjectList1[i];
+
+ if (ani->_id == ANI_LIFTBUTTON) {
+ int id = lift_getButtonIdN(ani->_statics->_staticsId);
+
+ if (id == buttonId)
+ ani->_statics = ani->getStaticsById(id);
+ }
+ }
}
diff --git a/engines/fullpipe/scenes/scene38.cpp b/engines/fullpipe/scenes/scene38.cpp
index bf7c2a30aa..2c863f6c34 100644
--- a/engines/fullpipe/scenes/scene38.cpp
+++ b/engines/fullpipe/scenes/scene38.cpp
@@ -83,7 +83,7 @@ void scene38_initScene(Scene *sc) {
}
g_fp->lift_sub5(sc, QU_SC38_ENTERLIFT, QU_SC38_EXITLIFT);
- g_fp->lift_sub7(sc, ST_LBN_0N);
+ g_fp->lift_setButtonStatics(sc, ST_LBN_0N);
}
void sceneHandler38_tryTakeBottle() {