aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2014-01-26 16:33:19 +0200
committerEugene Sandulenko2014-01-26 16:53:08 +0200
commit05ab84924776d49ffee786a21e98cd95fd096e06 (patch)
tree6f3d958781dfcfd117ddff8a1df70938a9a21df4 /engines
parenta32f56f9f23dfd7e17ad91ad77295f0707c2a8ba (diff)
downloadscummvm-rg350-05ab84924776d49ffee786a21e98cd95fd096e06.tar.gz
scummvm-rg350-05ab84924776d49ffee786a21e98cd95fd096e06.tar.bz2
scummvm-rg350-05ab84924776d49ffee786a21e98cd95fd096e06.zip
FULLPIPE: Implement lift_setButtonStatics()
Diffstat (limited to 'engines')
-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() {