Permalink
Browse files

FULLPIPE: Fix bug #9673: Unable to move after loading a save from the…

… title screen
  • Loading branch information...
sev- committed Dec 1, 2017
1 parent a08ebc2 commit 6bf5b1ae7966959295511d80fa8d125adbc3d654
Showing with 19 additions and 11 deletions.
  1. +16 −11 engines/fullpipe/fullpipe.cpp
  2. +2 −0 engines/fullpipe/fullpipe.h
  3. +1 −0 engines/fullpipe/modal.h
@@ -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) {
@@ -225,6 +225,8 @@ class FullpipeEngine : public ::Engine {
Common::Array<Common::Point> _arcadeKeys;
void deleteModalObject();
void initMap();
void updateMap(PreloadItem *pre);
void updateMapPiece(int mapId, int update);
View
@@ -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;

0 comments on commit 6bf5b1a

Please sign in to comment.