Skip to content

Commit

Permalink
HOPKINS: Added lots of shouldQuit() checks to the loops in the script…
Browse files Browse the repository at this point in the history
… code
  • Loading branch information
dreammaster committed Oct 28, 2012
1 parent 2ec4221 commit e99a5c0
Show file tree
Hide file tree
Showing 5 changed files with 246 additions and 52 deletions.
11 changes: 10 additions & 1 deletion engines/hopkins/anim.cpp
Expand Up @@ -50,6 +50,9 @@ void AnimationManager::PLAY_ANM(const Common::String &filename, uint32 rate1, ui
size_t nbytes;
Common::File f;

if (_vm->shouldQuit())
return;

hasScreenCopy = false;
while (!_vm->shouldQuit()) {
LABEL_2:
Expand Down Expand Up @@ -263,8 +266,11 @@ void AnimationManager::PLAY_ANM2(const Common::String &filename, uint32 a2, uint
char v25;
Common::File f;

if (_vm->shouldQuit())
return;

v8 = 0;
while (1) {
while (!_vm->shouldQuit()) {
v17 = 0;
v16 = 0;
v19 = 0;
Expand Down Expand Up @@ -968,6 +974,9 @@ void AnimationManager::PLAY_SEQ(int a1, const Common::String &a2, uint32 a3, uin
int buf;
Common::File f;

if (_vm->shouldQuit())
return;

v7 = 0;
v14 = 0;
v13 = 0;
Expand Down
5 changes: 4 additions & 1 deletion engines/hopkins/graphics.cpp
Expand Up @@ -2326,7 +2326,10 @@ void GraphicsManager::OPTI_INI(const Common::String &file, int a2) {
} else {
v11 = 0;
do {
v6 = _vm->_scriptManager.Traduction(ptr + 20 * v2);
v6 = _vm->_scriptManager.Traduction(ptr + 20 * v2);
if (_vm->shouldQuit())
return;

if (v6 == 2)
v2 = _vm->_scriptManager.Control_Goto((ptr + 20 * v2));
if (v6 == 3)
Expand Down
3 changes: 3 additions & 0 deletions engines/hopkins/objects.cpp
Expand Up @@ -4204,6 +4204,9 @@ void ObjectsManager::OPTI_OBJET() {
v7 = 0;
do {
v5 = _vm->_scriptManager.Traduction(data + 20 * v0);
if (_vm->shouldQuit())
return;

if (v5 == 2)
v0 = _vm->_scriptManager.Control_Goto(data + 20 * v0);
if (v5 == 3)
Expand Down

0 comments on commit e99a5c0

Please sign in to comment.