Skip to content

Commit

Permalink
MORTEVIELLE: Added extra quit checks to event loops
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster authored and Strangerke committed Apr 6, 2012
1 parent 418a78a commit ece9de0
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions engines/mortevielle/actions.cpp
Expand Up @@ -1053,6 +1053,8 @@ void taller() {
tou = '\0';
do {
mov_mouse(f, tou);
CHECK_QUIT;

/* if keypressed then read(kbd,tou);*/
read_pos_mouse(x, y, c);
x = x * (3 - res);
Expand Down
2 changes: 2 additions & 0 deletions engines/mortevielle/alert.cpp
Expand Up @@ -195,6 +195,8 @@ int do_alert(Common::String str_, int n) {
do {
dumi = '\377';
mov_mouse(dum, dumi);
CHECK_QUIT0;

cx = x_s;
cy = y_s;
test = (cy > 95) && (cy < 105);
Expand Down
2 changes: 2 additions & 0 deletions engines/mortevielle/mor2.cpp
Expand Up @@ -628,6 +628,8 @@ void tfleche() {

do {
mov_mouse(qust, touch);
CHECK_QUIT;

if (g_vm->getMouseClick())
rect = (x_s < 256 * res) && (y_s < 176) && (y_s > 12);
tinke();
Expand Down
1 change: 1 addition & 0 deletions engines/mortevielle/mortevielle.h
Expand Up @@ -85,6 +85,7 @@ class MortevielleEngine : public Engine {
extern MortevielleEngine *g_vm;

#define CHECK_QUIT if (g_vm->shouldQuit()) { return; }
#define CHECK_QUIT0 if (g_vm->shouldQuit()) { return 0; }

} // End of namespace Mortevielle

Expand Down
2 changes: 2 additions & 0 deletions engines/mortevielle/ques.cpp
Expand Up @@ -109,6 +109,8 @@ namespace Mortevielle {
g_vm->setMouseClick(false);
tesok = false;
mov_mouse(func, key);
CHECK_QUIT0;

k = 1;
while (coor[k].etat && ! dans_rect(coor[k])) k = k + 1;
if (coor[k].etat) {
Expand Down

0 comments on commit ece9de0

Please sign in to comment.