diff options
author | Strangerke | 2012-11-11 16:43:18 +0100 |
---|---|---|
committer | Strangerke | 2012-11-11 16:43:18 +0100 |
commit | 0e11fbbe537ccd3e4bd778a81966f60b25971780 (patch) | |
tree | 0e8758b09d3e9bee64c80b6c00d90e250526d00d | |
parent | 3e4c99fce71a6e92a848351427d1926ba5f2285e (diff) | |
download | scummvm-rg350-0e11fbbe537ccd3e4bd778a81966f60b25971780.tar.gz scummvm-rg350-0e11fbbe537ccd3e4bd778a81966f60b25971780.tar.bz2 scummvm-rg350-0e11fbbe537ccd3e4bd778a81966f60b25971780.zip |
HOPKINS: Implement JOUE_FIN()
Change two more variables to boolean
-rw-r--r-- | engines/hopkins/globals.cpp | 4 | ||||
-rw-r--r-- | engines/hopkins/globals.h | 4 | ||||
-rw-r--r-- | engines/hopkins/hopkins.cpp | 162 | ||||
-rw-r--r-- | engines/hopkins/hopkins.h | 1 | ||||
-rw-r--r-- | engines/hopkins/objects.cpp | 16 |
5 files changed, 174 insertions, 13 deletions
diff --git a/engines/hopkins/globals.cpp b/engines/hopkins/globals.cpp index ae39e8bb60..ae2c1d6d7e 100644 --- a/engines/hopkins/globals.cpp +++ b/engines/hopkins/globals.cpp @@ -171,8 +171,8 @@ Globals::Globals() { opt_txt = 0; opt_anm = 0; NBTRI = 0; - AFFLI = 0; - AFFIVBL = 0; + AFFLI = false; + AFFIVBL = false; NOT_VERIF = 0; PERSO_TYPE = 0; GOACTION = 0; diff --git a/engines/hopkins/globals.h b/engines/hopkins/globals.h index 04c8f3170d..06ddfc4ea5 100644 --- a/engines/hopkins/globals.h +++ b/engines/hopkins/globals.h @@ -422,8 +422,8 @@ public: int opt_music; int opt_txt; int NBTRI; - int AFFLI; - int AFFIVBL; + bool AFFLI; // CHECKME: Useless variable? + bool AFFIVBL; // CHECKME: Useless variable? int NOT_VERIF; bool CACHEFLAG; bool NOPARLE; diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp index 795226bd3a..826cd23ffb 100644 --- a/engines/hopkins/hopkins.cpp +++ b/engines/hopkins/hopkins.cpp @@ -1893,7 +1893,163 @@ void HopkinsEngine::BASED() { } void HopkinsEngine::JOUE_FIN() { - warning("STUB - JOUE_FIN()"); + warning("JOUE_FIN()"); + + _globals.PERSO = _globals.dos_free2(_globals.PERSO); + _dialogsManager.VIRE_INVENT = true; + _globals.DESACTIVE_INVENT = true; + _graphicsManager.ofscroll = 0; + _globals.PLAN_FLAG = false; + _globals.iRegul = 1; + _soundManager.WSOUND(26); + _globals.chemin = (int16 *)g_PTRNUL; + _globals.NOMARCHE = true; + _globals.SORTIE = 0; + _globals.AFFLI = false; + _globals.AFFIVBL = false; + _soundManager.CHARGE_SAMPLE(1, "SOUND90.WAV"); + _graphicsManager.LOAD_IMAGE("IM100"); + _animationManager.CHARGE_ANIM("ANIM100"); + _graphicsManager.VISU_ALL(); + _eventsManager.MOUSE_ON(); + _objectsManager.BOBANIM_OFF(7); + _objectsManager.BOBANIM_OFF(8); + _objectsManager.BOBANIM_OFF(9); + _graphicsManager.SETCOLOR3(252, 100, 100, 100); + _graphicsManager.SETCOLOR3(253, 100, 100, 100); + _graphicsManager.SETCOLOR3(251, 100, 100, 100); + _graphicsManager.SETCOLOR3(254, 0, 0, 0); + _eventsManager.CHANGE_MOUSE(0); + _globals.BPP_NOAFF = true; + + int cpt = 0; + do { + _eventsManager.VBL(); + ++cpt; + } while (cpt <= 4); + + _globals.BPP_NOAFF = false; + _graphicsManager.FADE_INW(); + _globals.iRegul = 1; + + do + _eventsManager.VBL(); + while (_objectsManager.BOBPOSI(6) != 54); + + _globals.NOPARLE = true; + _talkManager.PARLER_PERSO("GM4.PE2"); + _globals.DESACTIVE_INVENT = true; + _objectsManager.BOBANIM_OFF(6); + _objectsManager.BOBANIM_OFF(10); + _objectsManager.BOBANIM_ON(9); + _objectsManager.BOBANIM_ON(7); + + do + _eventsManager.VBL(); + while (_objectsManager.BOBPOSI(7) != 54); + + _soundManager.PLAY_SAMPLE2(1); + + do + _eventsManager.VBL(); + while (_objectsManager.BOBPOSI(7) != 65); + + _globals.NOPARLE = true; + _talkManager.PARLER_PERSO("DUELB4.PE2"); + _eventsManager.MOUSE_OFF(); + _globals.DESACTIVE_INVENT = true; + + do + _eventsManager.VBL(); + while (_objectsManager.BOBPOSI(7) != 72); + + _globals.NOPARLE = true; + _talkManager.PARLER_PERSO("DUELH1.PE2"); + + do + _eventsManager.VBL(); + while (_objectsManager.BOBPOSI(7) != 81); + + _globals.NOPARLE = true; + _talkManager.PARLER_PERSO("DUELB5.PE2"); + + do + _eventsManager.VBL(); + while (_objectsManager.BOBPOSI(7) != 120); + + _objectsManager.BOBANIM_OFF(7); + if (*((byte *)_globals.SAUVEGARDE + 135) == 1) { + _soundManager.SPECIAL_SOUND = 200; + _soundManager.VBL_MERDE = true; + _graphicsManager.FADE_LINUX = 2; + _animationManager.PLAY_ANM("BERM.ANM", 100, 24, 300); + _graphicsManager.FIN_VISU(); + _soundManager.DEL_SAMPLE(1); + _graphicsManager.LOAD_IMAGE("PLAN3"); + _graphicsManager.FADE_INW(); + _globals.lItCounter = 0; + if (!_eventsManager.ESC_KEY) { + do + _eventsManager.CONTROLE_MES(); + while (_globals.lItCounter < 2000 / _globals.vitesse && !_eventsManager.ESC_KEY); + } + _eventsManager.ESC_KEY = false; + _graphicsManager.FADE_OUTW(); + _globals.iRegul = 1; + _soundManager.SPECIAL_SOUND = 0; + _graphicsManager.FADE_LINUX = 2; + _animationManager.PLAY_ANM("JOUR2A.anm", 12, 12, 1000); + _soundManager.WSOUND(11); + _graphicsManager.DD_Lock(); + _graphicsManager.Cls_Video(); + _graphicsManager.DD_Unlock(); + _graphicsManager.Cls_Pal(); + _animationManager.PLAY_ANM("FF1a.anm", 18, 18, 9); + _animationManager.PLAY_ANM("FF1a.anm", 9, 18, 9); + _animationManager.PLAY_ANM("FF1a.anm", 9, 18, 18); + _animationManager.PLAY_ANM("FF1a.anm", 9, 18, 9); + _animationManager.PLAY_ANM("FF2a.anm", 24, 24, 100); + Credits(); + _globals.iRegul = 0; + _globals.SORTIE = 300; + _dialogsManager.VIRE_INVENT = false; + _globals.DESACTIVE_INVENT = false; + } else { + _soundManager.SPECIAL_SOUND = 200; + _soundManager.VBL_MERDE = true; + _animationManager.PLAY_ANM2("BERM.ANM", 100, 24, 300); + _objectsManager.BOBANIM_OFF(7); + _objectsManager.BOBANIM_ON(8); + _globals.NOPARLE = true; + _talkManager.PARLER_PERSO("GM5.PE2"); + _globals.DESACTIVE_INVENT = true; + + do + _eventsManager.VBL(); + while (_objectsManager.BOBPOSI(8) != 5); + + _soundManager.PLAY_SOUND2("SOUND41.WAV"); + + do + _eventsManager.VBL(); + while (_objectsManager.BOBPOSI(8) != 21); + + _graphicsManager.FADE_OUTW(); + _graphicsManager.FIN_VISU(); + _soundManager.DEL_SAMPLE(1); + _soundManager.WSOUND(16); + _globals.iRegul = 1; + _soundManager.SPECIAL_SOUND = 0; + _dialogsManager.VIRE_INVENT = false; + _globals.DESACTIVE_INVENT = false; + _animationManager.PLAY_ANM("JOUR4A.anm", 12, 12, 1000); + _globals.iRegul = 0; + _globals.SORTIE = 300; + } + _fileManager.CONSTRUIT_SYSTEM("PERSO.SPR"); + _globals.PERSO = _fileManager.CHARGE_FICHIER(_globals.NFICHIER); + _globals.PERSO_TYPE = 0; + _globals.iRegul = 0; } void HopkinsEngine::AVION() { @@ -2059,6 +2215,10 @@ int HopkinsEngine::PWBASE() { return result; } +void HopkinsEngine::Credits() { + warning("STUB - Credits()"); +} + void HopkinsEngine::OCEAN(int16 a1, Common::String a2, Common::String a3, int16 a4, int16 a5, int16 a6, int16 a7, int16 a8, int16 a9) { warning("STUB - OCEAN()"); } diff --git a/engines/hopkins/hopkins.h b/engines/hopkins/hopkins.h index 919b39e418..b6434cadc9 100644 --- a/engines/hopkins/hopkins.h +++ b/engines/hopkins/hopkins.h @@ -98,6 +98,7 @@ private: void AVION(); int PWBASE(); void OCEAN(int16 a1, Common::String a2, Common::String a3, int16 a4, int16 a5, int16 a6, int16 a7, int16 a8, int16 a9); + void Credits(); bool runLinuxDemo(); bool runLinuxFull(); diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp index e05b55f5e6..e2f0685d79 100644 --- a/engines/hopkins/objects.cpp +++ b/engines/hopkins/objects.cpp @@ -2633,8 +2633,8 @@ void ObjectsManager::PLAN_BETA() { _vm->_globals.NOMARCHE = false; sprite_ptr = g_PTRNUL; _vm->_globals.SORTIE = 0; - _vm->_globals.AFFLI = 0; - _vm->_globals.AFFIVBL = 0; + _vm->_globals.AFFLI = false; + _vm->_globals.AFFIVBL = false; _vm->_globals.NOT_VERIF = 1; _vm->_soundManager.WSOUND(31); _vm->_globals.iRegul = 1; @@ -2728,7 +2728,7 @@ void ObjectsManager::PLAN_BETA() { _vm->_globals.PLANY = YSPR(0); _vm->_globals.PLANI = 1; SPRITE_OFF(0); - _vm->_globals.AFFLI = 0; + _vm->_globals.AFFLI = false; sprite_ptr = _vm->_globals.LIBERE_FICHIER(sprite_ptr); CLEAR_ECRAN(); _vm->_globals.NOSPRECRAN = false; @@ -5579,8 +5579,8 @@ void ObjectsManager::PERSONAGE(const Common::String &s1, const Common::String &s _vm->_globals.chemin = (int16 *)g_PTRNUL; _vm->_globals.NOMARCHE = true; _vm->_globals.SORTIE = 0; - _vm->_globals.AFFLI = 0; - _vm->_globals.AFFIVBL = 0; + _vm->_globals.AFFLI = false; + _vm->_globals.AFFIVBL = false; if (!s1.empty()) _vm->_graphicsManager.LOAD_IMAGE(s1); if (!s2.empty()) @@ -5679,8 +5679,8 @@ void ObjectsManager::PERSONAGE2(const Common::String &s1, const Common::String & _vm->_graphicsManager.NOFADE = false; _vm->_globals.NOMARCHE = false; _vm->_globals.SORTIE = 0; - _vm->_globals.AFFLI = 0; - _vm->_globals.AFFIVBL = 0; + _vm->_globals.AFFLI = false; + _vm->_globals.AFFIVBL = false; _vm->_globals.NOT_VERIF = 1; _vm->_soundManager.WSOUND(v); _vm->_globals.iRegul = 1; @@ -5807,7 +5807,7 @@ LABEL_70: _vm->_graphicsManager.FADE_OUTW(); _vm->_graphicsManager.NOFADE = false; SPRITE_OFF(0); - _vm->_globals.AFFLI = 0; + _vm->_globals.AFFLI = false; if (DEUXPERSO == true) { SPRITE_OFF(1); DEUXPERSO = false; |