HOPKINS: Fix bug #6456 - RTL not working.

This commit is contained in:
Strangerke 2013-12-24 18:24:09 +01:00
parent 6957c5bce0
commit 28955963d4
5 changed files with 7 additions and 4 deletions

View File

@ -1781,7 +1781,7 @@ void GraphicsManager::initScreen(const Common::String &file, int mode, bool init
do {
int dataVal1 = _vm->_script->handleOpcode(ptr + 20 * dataOffset);
if (_vm->shouldQuit())
if (dataVal1 == -1 || _vm->shouldQuit())
return;
if (dataVal1 == 2)

View File

@ -1923,7 +1923,6 @@ void HopkinsEngine::bombExplosion() {
}
void HopkinsEngine::restoreSystem() {
quitGame();
_events->refreshEvents();
}
@ -2913,4 +2912,7 @@ bool HopkinsEngine::isUnderwaterSubScene() {
return (_globals->_curRoomNum >= 77) && (_globals->_curRoomNum <= 89);
}
bool HopkinsEngine::shouldQuit() {
return getEventManager()->shouldQuit() || getEventManager()->shouldRTL();
}
} // End of namespace Hopkins

View File

@ -168,6 +168,7 @@ public:
uint16 getVersion() const;
bool getIsDemo() const;
const Common::String &getTargetName() const;
bool shouldQuit();
int getRandomNumber(int maxNumber);
Common::String generateSaveName(int slotNumber);

View File

@ -2629,7 +2629,7 @@ void ObjectsManager::loadObjectIniFile() {
for (;;) {
int opcodeType = _vm->_script->handleOpcode(data + 20 * lastOpcodeResult);
if (_vm->shouldQuit())
if (opcodeType == -1 || _vm->shouldQuit())
return;
if (opcodeType == 2)

View File

@ -825,7 +825,7 @@ void TalkManager::handleAnswer(int zone, int verb) {
int lastOpcodeResult = 1;
do {
int opcodeType = _vm->_script->handleOpcode(ptr + 20 * lastOpcodeResult);
if (_vm->shouldQuit())
if (opcodeType == -1 || _vm->shouldQuit())
return;
if (opcodeType == 2)