aboutsummaryrefslogtreecommitdiff
path: root/engines/hopkins
diff options
context:
space:
mode:
authorStrangerke2013-12-24 18:24:09 +0100
committerStrangerke2013-12-24 18:24:48 +0100
commit28955963d4bcd71e1ae829a3a6690e135b17c2c1 (patch)
tree030e31e1a3f2865431dae5d15ade1cce702bad2c /engines/hopkins
parent6957c5bce08d6221170407b03ededbc0421130d2 (diff)
downloadscummvm-rg350-28955963d4bcd71e1ae829a3a6690e135b17c2c1.tar.gz
scummvm-rg350-28955963d4bcd71e1ae829a3a6690e135b17c2c1.tar.bz2
scummvm-rg350-28955963d4bcd71e1ae829a3a6690e135b17c2c1.zip
HOPKINS: Fix bug #6456 - RTL not working.
Diffstat (limited to 'engines/hopkins')
-rw-r--r--engines/hopkins/graphics.cpp2
-rw-r--r--engines/hopkins/hopkins.cpp4
-rw-r--r--engines/hopkins/hopkins.h1
-rw-r--r--engines/hopkins/objects.cpp2
-rw-r--r--engines/hopkins/talk.cpp2
5 files changed, 7 insertions, 4 deletions
diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp
index 05b8296b86..a64e81fcc9 100644
--- a/engines/hopkins/graphics.cpp
+++ b/engines/hopkins/graphics.cpp
@@ -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)
diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp
index adf7580e6b..f557723fe6 100644
--- a/engines/hopkins/hopkins.cpp
+++ b/engines/hopkins/hopkins.cpp
@@ -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
diff --git a/engines/hopkins/hopkins.h b/engines/hopkins/hopkins.h
index b7c6a9b5a9..7961607db7 100644
--- a/engines/hopkins/hopkins.h
+++ b/engines/hopkins/hopkins.h
@@ -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);
diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp
index f2f547557f..347a6aabe8 100644
--- a/engines/hopkins/objects.cpp
+++ b/engines/hopkins/objects.cpp
@@ -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)
diff --git a/engines/hopkins/talk.cpp b/engines/hopkins/talk.cpp
index d218dd27b5..c80ea15554 100644
--- a/engines/hopkins/talk.cpp
+++ b/engines/hopkins/talk.cpp
@@ -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)