diff options
author | Paul Gilbert | 2012-09-17 18:53:29 +1000 |
---|---|---|
committer | Paul Gilbert | 2012-09-17 18:53:29 +1000 |
commit | 044f9b83ec5964dc352174de43a6889d350a5e2e (patch) | |
tree | b4540c5be7e1411477f284e2d623862b264252de /engines | |
parent | df410953c98ff5ca4a3ef9626d0ae680186378ac (diff) | |
download | scummvm-rg350-044f9b83ec5964dc352174de43a6889d350a5e2e.tar.gz scummvm-rg350-044f9b83ec5964dc352174de43a6889d350a5e2e.tar.bz2 scummvm-rg350-044f9b83ec5964dc352174de43a6889d350a5e2e.zip |
HOPKINS: Bugfixes to the display of the starting menu
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hopkins/hopkins.cpp | 10 | ||||
-rw-r--r-- | engines/hopkins/menu.cpp | 16 | ||||
-rw-r--r-- | engines/hopkins/objects.cpp | 4 | ||||
-rw-r--r-- | engines/hopkins/objects.h | 6 |
4 files changed, 31 insertions, 5 deletions
diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp index 460ae1355e..65b31903ac 100644 --- a/engines/hopkins/hopkins.cpp +++ b/engines/hopkins/hopkins.cpp @@ -38,6 +38,8 @@ HopkinsEngine::HopkinsEngine(OSystem *syst, const HopkinsGameDescription *gameDe _gameDescription(gameDesc), _randomSource("Hopkins"), _animationManager() { g_vm = this; _animationManager.setParent(this); + _menuManager.setParent(this); + _objectsManager.setParent(this); _soundManager.setParent(this); } @@ -104,7 +106,8 @@ LABEL_13: if (!GLOBALS.SORTIE) { GLOBALS.SORTIE = _menuManager.MENU(); if (GLOBALS.SORTIE == -1) { - PUBQUIT(); + if (!g_system->getEventManager()->shouldQuit()) + PUBQUIT(); _globals.PERSO = _globals.dos_free2(_globals.PERSO); REST_SYSTEM(); } @@ -118,6 +121,9 @@ LABEL_13: for (;;) { for (;;) { for (;;) { + if (g_system->getEventManager()->shouldQuit()) + return Common::kNoError; + if (GLOBALS.SORTIE == 300) goto LABEL_13; if (GLOBALS.SORTIE == 18) @@ -868,7 +874,7 @@ void HopkinsEngine::PUBQUIT() { if (_eventsManager.BMOUSE() == 1) mouseClicked = true; - } while (!mouseClicked && g_system->getEventManager()->shouldQuit()); + } while (!mouseClicked && !g_system->getEventManager()->shouldQuit()); if ((unsigned int)(xp - 167) <= 302 && (unsigned int)(yp - 47) <= 387) { warning("Try to Connect..."); diff --git a/engines/hopkins/menu.cpp b/engines/hopkins/menu.cpp index 5aa54b9fa6..17ee630aa9 100644 --- a/engines/hopkins/menu.cpp +++ b/engines/hopkins/menu.cpp @@ -21,6 +21,7 @@ */ #include "common/scummsys.h" +#include "common/events.h" #include "hopkins/menu.h" #include "hopkins/files.h" #include "hopkins/hopkins.h" @@ -36,8 +37,7 @@ void MenuManager::setParent(HopkinsEngine *vm) { } int MenuManager::MENU() { - signed int v0; - byte *v1; + byte *v1 = NULL; signed int v2; int v3; int v4; @@ -50,7 +50,7 @@ int MenuManager::MENU() { signed int v12; v6 = 0; - for (;;) { + while (!g_system->getEventManager()->shouldQuit()) { _vm->_globals.FORET = 0; _vm->_eventsManager.CASSE = 0; _vm->_globals.DESACTIVE_INVENT = 1; @@ -96,6 +96,9 @@ int MenuManager::MENU() { v12 = 0; do { + if (g_system->getEventManager()->shouldQuit()) + return -1; + v2 = 0; v3 = _vm->_eventsManager.XMOUSE(); v4 = _vm->_eventsManager.YMOUSE(); @@ -210,6 +213,13 @@ int MenuManager::MENU() { _vm->INTRORUN(); continue; } + + if ( v2 == 5 ) { + AFFICHE_SPEED(v1, 230, 386, 14); + _vm->_eventsManager.VBL(); + _vm->_eventsManager.delay(200); + v6 = -1; + } break; } diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp index 441dc874b3..c464a0241f 100644 --- a/engines/hopkins/objects.cpp +++ b/engines/hopkins/objects.cpp @@ -31,6 +31,10 @@ namespace Hopkins { +void ObjectsManager::setParent(HopkinsEngine *vm) { + _vm = vm; +} + byte *ObjectsManager::CHANGE_OBJET(int objIndex) { byte *result = ObjectsManager::CAPTURE_OBJET(objIndex, 1); GLOBALS.Bufferobjet = result; diff --git a/engines/hopkins/objects.h b/engines/hopkins/objects.h index 8f97a5a7bc..7ebb93da9e 100644 --- a/engines/hopkins/objects.h +++ b/engines/hopkins/objects.h @@ -29,8 +29,14 @@ namespace Hopkins { +class HopkinsEngine; + class ObjectsManager { +private: + HopkinsEngine *_vm; public: + void setParent(HopkinsEngine *vm); + byte *CHANGE_OBJET(int objIndex); byte *CAPTURE_OBJET(int objIndex, int mode); |