aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/modal.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2016-12-07 18:38:55 +0100
committerEugene Sandulenko2016-12-07 18:38:55 +0100
commit000a68cf7900ee2388c6d3b53fd6ca62a6c53ae3 (patch)
tree15419f67e906f8d400c2b6cad89c48dcdc3c2af8 /engines/fullpipe/modal.cpp
parent95c94780a44441dab888622e4e9790be7b1ad0eb (diff)
downloadscummvm-rg350-000a68cf7900ee2388c6d3b53fd6ca62a6c53ae3.tar.gz
scummvm-rg350-000a68cf7900ee2388c6d3b53fd6ca62a6c53ae3.tar.bz2
scummvm-rg350-000a68cf7900ee2388c6d3b53fd6ca62a6c53ae3.zip
FULLPIPE: Implement ModalMap::isSceneEnabled()
Diffstat (limited to 'engines/fullpipe/modal.cpp')
-rw-r--r--engines/fullpipe/modal.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index 862fb94bf4..34cdfbf4ff 100644
--- a/engines/fullpipe/modal.cpp
+++ b/engines/fullpipe/modal.cpp
@@ -395,7 +395,7 @@ void ModalMap::initMap() {
pic->_flags &= 0xfffb;
}
- pic = getScenePicture();
+ pic = getScenePicture(g_fp->_currentScene->_sceneId);
Common::Point point;
Common::Point point2;
@@ -438,10 +438,10 @@ void ModalMap::initMap() {
g_fp->setArcadeOverlay(PIC_CSR_MAP);
}
-PictureObject *ModalMap::getScenePicture() {
+PictureObject *ModalMap::getScenePicture(int sceneId) {
int picId = 0;
- switch (g_fp->_currentScene->_sceneId) {
+ switch (sceneId) {
case SC_1:
picId = PIC_MAP_S01;
break;
@@ -653,7 +653,17 @@ PictureObject *ModalMap::getSceneHPicture(PictureObject *obj) {
}
bool ModalMap::isSceneEnabled(int sceneId) {
- warning("STUB: ModalMap::isSceneEnabled()");
+ int id = getScenePicture(sceneId)->_id;
+
+ for (int i = 0; i < 200; i++) {
+ int mapPic = g_fp->_mapTable[i] >> 16;
+ if (!mapPic)
+ return false;
+
+ if (mapPic == id)
+ return (g_fp->_mapTable[i] & 0xffff) == 1;
+ }
+
return false;
}