diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/fullpipe/modal.cpp | 18 | ||||
-rw-r--r-- | engines/fullpipe/modal.h | 2 |
2 files changed, 15 insertions, 5 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; } diff --git a/engines/fullpipe/modal.h b/engines/fullpipe/modal.h index 4b26721fee..ebbe1f1935 100644 --- a/engines/fullpipe/modal.h +++ b/engines/fullpipe/modal.h @@ -119,7 +119,7 @@ class ModalMap : public BaseModalObject { void initMap(); private: - PictureObject *getScenePicture(); + PictureObject *getScenePicture(int sceneId); PictureObject *getSceneHPicture(PictureObject *obj); bool checkScenePass(PreloadItem *item); bool isSceneEnabled(int sceneId); |