[Scummvm-git-logs] scummvm master -> 7e1dc617c4bd23707bce447fcfe66ad51be745c5
sev-
sev at scummvm.org
Wed Dec 7 20:25:03 CET 2016
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
000a68cf79 FULLPIPE: Implement ModalMap::isSceneEnabled()
7e1dc617c4 FULLPIPE: Implement isSaveAllowed()
Commit: 000a68cf7900ee2388c6d3b53fd6ca62a6c53ae3
https://github.com/scummvm/scummvm/commit/000a68cf7900ee2388c6d3b53fd6ca62a6c53ae3
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-12-07T18:38:55+01:00
Commit Message:
FULLPIPE: Implement ModalMap::isSceneEnabled()
Changed paths:
engines/fullpipe/modal.cpp
engines/fullpipe/modal.h
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index 862fb94..34cdfbf 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 4b26721..ebbe1f1 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);
Commit: 7e1dc617c4bd23707bce447fcfe66ad51be745c5
https://github.com/scummvm/scummvm/commit/7e1dc617c4bd23707bce447fcfe66ad51be745c5
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-12-07T19:03:08+01:00
Commit Message:
FULLPIPE: Implement isSaveAllowed()
Changed paths:
engines/fullpipe/fullpipe.cpp
engines/fullpipe/fullpipe.h
diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp
index 8a9b323..162dff3 100644
--- a/engines/fullpipe/fullpipe.cpp
+++ b/engines/fullpipe/fullpipe.cpp
@@ -603,5 +603,19 @@ void FullpipeEngine::disableSaves(ExCommand *ex) {
}
}
+bool FullpipeEngine::isSaveAllowed() {
+ if (!g_fp->_isSaveAllowed)
+ return false;
+
+ bool allowed = true;
+
+ for (Common::Array<MessageQueue *>::iterator s = g_fp->_globalMessageQueueList->begin(); s != g_fp->_globalMessageQueueList->end(); ++s) {
+ if (!(*s)->_isFinished && ((*s)->getFlags() & 1))
+ allowed = false;
+ }
+
+ return allowed;
+}
+
} // End of namespace Fullpipe
diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h
index f6a8e00..41769ba 100644
--- a/engines/fullpipe/fullpipe.h
+++ b/engines/fullpipe/fullpipe.h
@@ -235,6 +235,7 @@ public:
void enableSaves() { _isSaveAllowed = true; }
void disableSaves(ExCommand *ex);
+ bool isSaveAllowed();
void initObjectStates();
void setLevelStates();
More information about the Scummvm-git-logs
mailing list