aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/modal.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2016-12-07 11:00:03 +0100
committerEugene Sandulenko2016-12-07 12:05:42 +0100
commita998a1b580f4285c5b0d8693db7ce472d5c0eea5 (patch)
treedb5257b983771117e1b1ccd76cf62f2b4bf5cddf /engines/fullpipe/modal.cpp
parentc77407042fd0e7e6247db3f77cbb518b28bec8f5 (diff)
downloadscummvm-rg350-a998a1b580f4285c5b0d8693db7ce472d5c0eea5.tar.gz
scummvm-rg350-a998a1b580f4285c5b0d8693db7ce472d5c0eea5.tar.bz2
scummvm-rg350-a998a1b580f4285c5b0d8693db7ce472d5c0eea5.zip
FULLPIPE: Implement ModalMap::checkScenePass()
Diffstat (limited to 'engines/fullpipe/modal.cpp')
-rw-r--r--engines/fullpipe/modal.cpp67
1 files changed, 67 insertions, 0 deletions
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index d1bda9dd40..862fb94bf4 100644
--- a/engines/fullpipe/modal.cpp
+++ b/engines/fullpipe/modal.cpp
@@ -30,6 +30,7 @@
#include "fullpipe/modal.h"
#include "fullpipe/constants.h"
+#include "fullpipe/objectnames.h"
#include "graphics/palette.h"
#include "video/avi_decoder.h"
@@ -651,6 +652,72 @@ PictureObject *ModalMap::getSceneHPicture(PictureObject *obj) {
}
}
+bool ModalMap::isSceneEnabled(int sceneId) {
+ warning("STUB: ModalMap::isSceneEnabled()");
+ return false;
+}
+
+bool ModalMap::checkScenePass(PreloadItem *item) {
+ bool res = true;
+
+ switch (item->preloadId1) {
+ case SC_13:
+ if (!isSceneEnabled(SC_14))
+ res = false;
+ break;
+
+ case SC_27:
+ if (item->sceneId == SC_25) {
+ item->param = TrubaRight;
+ } else {
+ res = false;
+ }
+ break;
+
+ case SC_25:
+ if (g_fp->getObjectState(sO_Board_25) != g_fp->getObjectEnumState(sO_Board_25, sO_NearDudesStairs)) {
+ res = false;
+ }
+ }
+
+ switch (item->sceneId) {
+ case SC_13:
+ if (isSceneEnabled(SC_14)) {
+ item->param = TrubaLeft;
+ break;
+ }
+ item->param = TrubaUp;
+ break;
+
+ case SC_27:
+ res = false;
+ break;
+
+ case SC_25:
+ if (g_fp->getObjectState(sO_Pool) != g_fp->getObjectEnumState(sO_Pool, sO_Empty)) {
+ if (g_fp->getObjectState(sO_Pool) != g_fp->getObjectEnumState(sO_Pool, sO_HalfFull))
+ res = false;
+ }
+ break;
+
+ case SC_29:
+ if (isSceneEnabled(SC_30)) {
+ item->param = TrubaLeft;
+ break;
+ }
+ item->param = TrubaUp;
+ break;
+ }
+
+ if ((item->sceneId != SC_37 && item->preloadId1 != SC_37)
+ || (g_fp->getObjectState(sO_Jawcrucnher) != g_fp->getObjectEnumState(sO_Jawcrucnher, sO_WithoutCarpet))) {
+ return res;
+ } else {
+ res = false;
+ }
+ return res;
+}
+
void FullpipeEngine::openMap() {
if (!_modalObject) {
ModalMap *map = new ModalMap;