diff --git a/part12-wgt/examples/wgt18.c b/part12-wgt/examples/wgt18.c index 10359ce..4dc53d9 100644 --- a/part12-wgt/examples/wgt18.c +++ b/part12-wgt/examples/wgt18.c @@ -86,7 +86,7 @@ void wgt18() /* copy the whole screen */ /* notice how we never use wnormscreen at all! */ - } while (1); + } while (but == 0); mdeinit(); wfreeblock (screen1); diff --git a/part12-wgt/examples/wgt19.c b/part12-wgt/examples/wgt19.c index 8ee962a..f0a6c71 100644 --- a/part12-wgt/examples/wgt19.c +++ b/part12-wgt/examples/wgt19.c @@ -88,15 +88,15 @@ void wgt19() wcopyscreen (0, 0, 160, 199, screen1, 0, 0, NULL); /* copy half the screen */ - if (mx == 0) /* Show the next sprite */ + if (but == 1) /* Show the next sprite */ { sp++; if (sp > 9) sp = 1; - //noclick (); + noclick (); } - } while (1); + } while (but != 2); msetbounds (0, 0, 319, 199); mdeinit (); /* Deinitialize the mouse handler */ diff --git a/part12-wgt/examples/wgt60.c b/part12-wgt/examples/wgt60.c index ea59a8b..766dc72 100644 --- a/part12-wgt/examples/wgt60.c +++ b/part12-wgt/examples/wgt60.c @@ -126,7 +126,7 @@ void wgt60() do { /* Now play the game */ looper (); - } while (1); /* Until the right mouse button is clicked */ + } while (but != 2); /* Until the right mouse button is clicked */ mdeinit(); deinitialize_sprites (); /* Deinit the sprite system */