aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2014-01-26 16:27:32 +0200
committerEugene Sandulenko2014-01-26 16:53:08 +0200
commita32f56f9f23dfd7e17ad91ad77295f0707c2a8ba (patch)
tree5b5aa16a8e642ab211570dc08e1118dd5a011826
parent704eca2ddfc13867bd969ac64f7c458bbdea188c (diff)
downloadscummvm-rg350-a32f56f9f23dfd7e17ad91ad77295f0707c2a8ba.tar.gz
scummvm-rg350-a32f56f9f23dfd7e17ad91ad77295f0707c2a8ba.tar.bz2
scummvm-rg350-a32f56f9f23dfd7e17ad91ad77295f0707c2a8ba.zip
FULLPIPE: Implement lift_getButtonIdN()
-rw-r--r--engines/fullpipe/fullpipe.h1
-rw-r--r--engines/fullpipe/lift.cpp57
2 files changed, 58 insertions, 0 deletions
diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h
index c41cc92451..baf0380402 100644
--- a/engines/fullpipe/fullpipe.h
+++ b/engines/fullpipe/fullpipe.h
@@ -273,6 +273,7 @@ public:
int lift_getButtonIdP(int objid);
int lift_getButtonIdH(int objid);
+ 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);
diff --git a/engines/fullpipe/lift.cpp b/engines/fullpipe/lift.cpp
index 97f6547176..32d5f33872 100644
--- a/engines/fullpipe/lift.cpp
+++ b/engines/fullpipe/lift.cpp
@@ -102,6 +102,63 @@ int FullpipeEngine::lift_getButtonIdH(int objid) {
}
}
+int FullpipeEngine::lift_getButtonIdN(int objid) {
+ switch (objid) {
+ case ST_LBN_0H:
+ case ST_LBN_0N:
+ case ST_LBN_0P:
+ return ST_LBN_0N;
+
+ case ST_LBN_1H:
+ case ST_LBN_1N:
+ case ST_LBN_1P:
+ return ST_LBN_1N;
+
+ case ST_LBN_2H:
+ case ST_LBN_2N:
+ case ST_LBN_2P:
+ return ST_LBN_2N;
+
+ case ST_LBN_3H:
+ case ST_LBN_3N:
+ case ST_LBN_3P:
+ return ST_LBN_3N;
+
+ case ST_LBN_4H:
+ case ST_LBN_4N:
+ case ST_LBN_4P:
+ return ST_LBN_4N;
+
+ case ST_LBN_5H:
+ case ST_LBN_5N:
+ case ST_LBN_5P:
+ return ST_LBN_5N;
+
+ case ST_LBN_6H:
+ case ST_LBN_6N:
+ case ST_LBN_6P:
+ return ST_LBN_6N;
+
+ case ST_LBN_7H:
+ case ST_LBN_7N:
+ case ST_LBN_7P:
+ return ST_LBN_7N;
+
+ case ST_LBN_8H:
+ case ST_LBN_8N:
+ case ST_LBN_8P:
+ return ST_LBN_8N;
+
+ case ST_LBN_9H:
+ case ST_LBN_9N:
+ case ST_LBN_9P:
+ return ST_LBN_9N;
+
+ default:
+ return 0;
+ }
+}
+
void FullpipeEngine::lift_setButton(const char *name, int state) {
GameVar *var = g_fp->getGameLoaderGameVar()->getSubVarByName("OBJSTATES")->getSubVarByName(sO_LiftButtons);