[Scummvm-git-logs] scummvm master -> cee6a336f2fca7c7c55184fbb6599507c737c9cd
sev-
sev at scummvm.org
Fri Dec 1 22:49:05 CET 2017
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
cee6a336f2 FULLPIPE: Fix bug #9673: Unable to move after loading a save from the title screen
Commit: cee6a336f2fca7c7c55184fbb6599507c737c9cd
https://github.com/scummvm/scummvm/commit/cee6a336f2fca7c7c55184fbb6599507c737c9cd
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-12-01T22:43:16+01:00
Commit Message:
FULLPIPE: Fix bug #9673: Unable to move after loading a save from the title screen
Changed paths:
engines/fullpipe/fullpipe.cpp
engines/fullpipe/fullpipe.h
engines/fullpipe/modal.h
diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp
index 6f8e642..f50593cc 100644
--- a/engines/fullpipe/fullpipe.cpp
+++ b/engines/fullpipe/fullpipe.cpp
@@ -230,6 +230,8 @@ bool FullpipeEngine::shouldQuit() {
}
Common::Error FullpipeEngine::loadGameState(int slot) {
+ deleteModalObject();
+
if (_gameLoader->readSavegame(getSavegameFile(slot)))
return Common::kNoError;
else
@@ -343,11 +345,7 @@ void FullpipeEngine::updateEvents() {
if (_modalObject->init(42)) {
_modalObject->update();
} else {
- _modalObject->saveload();
- BaseModalObject *obj = _modalObject->_parentObj;
- if (obj)
- delete _modalObject;
- _modalObject = obj;
+ deleteModalObject();
}
} else {
_gameLoader->updateSystems(42);
@@ -470,6 +468,18 @@ void FullpipeEngine::cleanup() {
stopAllSoundStreams();
}
+void FullpipeEngine::deleteModalObject() {
+ if (!_modalObject)
+ return;
+
+ _modalObject->saveload();
+ BaseModalObject *tmp = _modalObject->_parentObj;
+
+ delete _modalObject;
+
+ _modalObject = tmp;
+}
+
void FullpipeEngine::updateScreen() {
debugC(4, kDebugDrawing, "FullpipeEngine::updateScreen()");
@@ -484,12 +494,7 @@ void FullpipeEngine::updateScreen() {
if (_modalObject->init(42)) {
_modalObject->update();
} else {
- _modalObject->saveload();
- BaseModalObject *tmp = _modalObject->_parentObj;
-
- delete _modalObject;
-
- _modalObject = tmp;
+ deleteModalObject();
}
}
} else if (_currentScene) {
diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h
index cd7b120..2039989 100644
--- a/engines/fullpipe/fullpipe.h
+++ b/engines/fullpipe/fullpipe.h
@@ -225,6 +225,8 @@ public:
Common::Array<Common::Point> _arcadeKeys;
+ void deleteModalObject();
+
void initMap();
void updateMap(PreloadItem *pre);
void updateMapPiece(int mapId, int update);
diff --git a/engines/fullpipe/modal.h b/engines/fullpipe/modal.h
index 1bc576c..9f5e408 100644
--- a/engines/fullpipe/modal.h
+++ b/engines/fullpipe/modal.h
@@ -51,6 +51,7 @@ class BaseModalObject {
BaseModalObject() : _parentObj(0) { _objtype = kObjTypeDefault; }
virtual ~BaseModalObject() {}
+ void deleteObject();
virtual bool pollEvent() = 0;
virtual bool handleMessage(ExCommand *message) = 0;
More information about the Scummvm-git-logs
mailing list