diff options
author | Paul Gilbert | 2012-11-18 20:58:53 +1100 |
---|---|---|
committer | Paul Gilbert | 2012-11-18 20:58:53 +1100 |
commit | c1bd7e26b0508dd99c1eda3eef645f142312bc83 (patch) | |
tree | 6d6482b7ff936f92432f64d797686d7037d1498c | |
parent | 25a311c65b1ea33c242d741971565c2d8b86768b (diff) | |
download | scummvm-rg350-c1bd7e26b0508dd99c1eda3eef645f142312bc83.tar.gz scummvm-rg350-c1bd7e26b0508dd99c1eda3eef645f142312bc83.tar.bz2 scummvm-rg350-c1bd7e26b0508dd99c1eda3eef645f142312bc83.zip |
HOPKINS: Bugfixes to actually play Breakout
-rw-r--r-- | engines/hopkins/computer.cpp | 16 | ||||
-rw-r--r-- | engines/hopkins/events.cpp | 2 |
2 files changed, 12 insertions, 6 deletions
diff --git a/engines/hopkins/computer.cpp b/engines/hopkins/computer.cpp index 673a04517e..2e24b1bbc6 100644 --- a/engines/hopkins/computer.cpp +++ b/engines/hopkins/computer.cpp @@ -580,7 +580,7 @@ void ComputerManager::GAMES() { _vm->_globals.vitesse = 1; _vm->_eventsManager.CHANGE_MOUSE(0); CASSESPR = g_PTRNUL; - _vm->_eventsManager.CASSE = 1; + _vm->_eventsManager.CASSE = true; _vm->_eventsManager.CASSE_SOURIS_ON(); CASSETAB = (int16 *)g_PTRNUL; NBBRIQUES = 0; @@ -613,7 +613,7 @@ void ComputerManager::GAMES() { _vm->_soundManager.DEL_SAMPLE(2); _vm->_soundManager.DEL_SAMPLE(3); _vm->_globals.vitesse = v2; - _vm->_eventsManager.CASSE = 0; + _vm->_eventsManager.CASSE = false; _vm->_eventsManager.CASSE_SOURIS_OFF(); setvideomode(); settextcolor(15); @@ -775,6 +775,7 @@ void ComputerManager::PLAY_BRIQUE() { while (!_vm->shouldQuit()) { while (!_vm->shouldQuit()) { + // Set up the racket and ball _vm->_eventsManager.MOUSE_OFF(); BALLE = Common::Point(RAQX + 14, 187); _vm->_objectsManager.SETYSPR(1, 187); @@ -782,6 +783,8 @@ void ComputerManager::PLAY_BRIQUE() { _vm->_graphicsManager.RESET_SEGMENT_VESA(); _vm->_eventsManager.VBL(); _vm->_graphicsManager.FADE_IN_CASSE(); + + // Wait for mouse press to start playing do { RAQX = _vm->_eventsManager.souris_x; if (_vm->_eventsManager.souris_x <= 4) @@ -792,16 +795,17 @@ void ComputerManager::PLAY_BRIQUE() { _vm->_objectsManager.SETXSPR(1, RAQX + 14); _vm->_objectsManager.SETYSPR(1, 187); _vm->_eventsManager.VBL(); - } while (_vm->_eventsManager.BMOUSE() != 1); + } while (!_vm->shouldQuit() && _vm->_eventsManager.BMOUSE() != 1); CASSESPEED = 1; BALLE = Common::Point(RAQX + 14, 187); BALLEHORI = RAQX > 135; BALLEVERTI = 0; - + + // Play loop do { - RAQX = _vm->_eventsManager.souris_x; - if ((int)_vm->_eventsManager.souris_x <= 4) + RAQX = _vm->_eventsManager.XMOUSE(); + if (_vm->_eventsManager.souris_x <= 4) RAQX = 5; if (RAQX > 282) RAQX = 282; diff --git a/engines/hopkins/events.cpp b/engines/hopkins/events.cpp index f91dceabde..911ffcf3e1 100644 --- a/engines/hopkins/events.cpp +++ b/engines/hopkins/events.cpp @@ -405,6 +405,8 @@ LABEL_54: checkForNextFrameCounter(); while (CASSE || _vm->_globals.iRegul != 1) { + checkForNextFrameCounter(); + if (CASSE != true) goto LABEL_63; if (lItCounter > 1) |