diff options
author | Le Philousophe | 2019-03-21 07:58:24 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2019-06-01 22:43:48 +0200 |
commit | 7d6c3ee12bbef5a7b02f1782ba18840f381e2307 (patch) | |
tree | e764acffedd09daa8f41a8312a2aa8b4112f9de7 | |
parent | 9bfc24eee3f724fab4aadad17d6c4664682f7aa3 (diff) | |
download | scummvm-rg350-7d6c3ee12bbef5a7b02f1782ba18840f381e2307.tar.gz scummvm-rg350-7d6c3ee12bbef5a7b02f1782ba18840f381e2307.tar.bz2 scummvm-rg350-7d6c3ee12bbef5a7b02f1782ba18840f381e2307.zip |
CRYOMNI3D: Fix some comments and order of callback
-rw-r--r-- | engines/cryomni3d/versailles/data.cpp | 1 | ||||
-rw-r--r-- | engines/cryomni3d/versailles/engine.h | 2 | ||||
-rw-r--r-- | engines/cryomni3d/versailles/logic.cpp | 120 |
3 files changed, 61 insertions, 62 deletions
diff --git a/engines/cryomni3d/versailles/data.cpp b/engines/cryomni3d/versailles/data.cpp index 56c7fdae25..cd294d4f91 100644 --- a/engines/cryomni3d/versailles/data.cpp +++ b/engines/cryomni3d/versailles/data.cpp @@ -536,7 +536,6 @@ void CryOmni3DEngine_Versailles::initPlacesStates() { SET_PLACE_STATE(14, nullptr, FILTER_EVENT(1, 14), nullptr); } else if (_currentLevel == 2) { _placeStates.resize(15); - // TODO: implement functions SET_PLACE_STATE(1, nullptr, FILTER_EVENT(2, 1), "VS22"); SET_PLACE_STATE(2, nullptr, FILTER_EVENT(2, 2), "VS20"); SET_PLACE_STATE(3, nullptr, nullptr, "VS19"); diff --git a/engines/cryomni3d/versailles/engine.h b/engines/cryomni3d/versailles/engine.h index 189fe9bbb7..2c1c6e4541 100644 --- a/engines/cryomni3d/versailles/engine.h +++ b/engines/cryomni3d/versailles/engine.h @@ -116,7 +116,7 @@ struct GameVariables { kUnlockPetitePorte, kAlreadyCame31, kDrawerStatus, - kCurrentTime, + kCurrentTime, // OK kGotMedaillesSolution, kDrawerFurnitureStatus, kCollectePartition, diff --git a/engines/cryomni3d/versailles/logic.cpp b/engines/cryomni3d/versailles/logic.cpp index f898778004..8552c50a52 100644 --- a/engines/cryomni3d/versailles/logic.cpp +++ b/engines/cryomni3d/versailles/logic.cpp @@ -684,62 +684,6 @@ IMG_CB(32120c) { setGameTime(4, 2); } -IMG_CB(41202) { - fimg->load("10E_20.GIF"); - while (1) { - fimg->manage(); - if (fimg->_exit || fimg->_zoneLow) { - fimg->_exit = true; - break; - } - HANDLE_QUESTION(1); - if (fimg->_zoneUse) { - if (fimg->_currentZone == 2 && !_inventory.inInventoryByNameID(97)) { - // Open the jar - ZonFixedImage::CallbackFunctor *functor = - new Common::Functor1Mem<ZonFixedImage *, void, CryOmni3DEngine_Versailles>(this, - &CryOmni3DEngine_Versailles::img_41202b); - fimg->changeCallback(functor); - break; - } else { - displayMessageBox(kFixedimageMsgBoxParameters, fimg->surface(), 11, - fimg->getZoneCenter(fimg->_currentZone), - Common::Functor0Mem<void, ZonFixedImage>(fimg, &ZonFixedImage::manage)); - } - } - } -} - -IMG_CB(41202b) { - fimg->load("10E_21.GIF"); - while (1) { - fimg->manage(); - if (fimg->_exit) { - break; - } - HANDLE_QUESTION(1); - if (fimg->_zoneLow) { - // Go back to jars closed - ZonFixedImage::CallbackFunctor *functor = - new Common::Functor1Mem<ZonFixedImage *, void, CryOmni3DEngine_Versailles>(this, - &CryOmni3DEngine_Versailles::img_41202); - fimg->changeCallback(functor); - break; - } - if (fimg->_zoneUse) { - if (!_inventory.inInventoryByNameID(97)) { - collectObject(97, fimg); - } - // Go back to jars closed - ZonFixedImage::CallbackFunctor *functor = - new Common::Functor1Mem<ZonFixedImage *, void, CryOmni3DEngine_Versailles>(this, - &CryOmni3DEngine_Versailles::img_41202); - fimg->changeCallback(functor); - break; - } - } -} - IMG_CB(32201) { fimg->load("21E_41.GIF"); while (1) { @@ -819,6 +763,62 @@ IMG_CB(32204b) { } } +IMG_CB(41202) { + fimg->load("10E_20.GIF"); + while (1) { + fimg->manage(); + if (fimg->_exit || fimg->_zoneLow) { + fimg->_exit = true; + break; + } + HANDLE_QUESTION(1); + if (fimg->_zoneUse) { + if (fimg->_currentZone == 2 && !_inventory.inInventoryByNameID(97)) { + // Open the jar + ZonFixedImage::CallbackFunctor *functor = + new Common::Functor1Mem<ZonFixedImage *, void, CryOmni3DEngine_Versailles>(this, + &CryOmni3DEngine_Versailles::img_41202b); + fimg->changeCallback(functor); + break; + } else { + displayMessageBox(kFixedimageMsgBoxParameters, fimg->surface(), 11, + fimg->getZoneCenter(fimg->_currentZone), + Common::Functor0Mem<void, ZonFixedImage>(fimg, &ZonFixedImage::manage)); + } + } + } +} + +IMG_CB(41202b) { + fimg->load("10E_21.GIF"); + while (1) { + fimg->manage(); + if (fimg->_exit) { + break; + } + HANDLE_QUESTION(1); + if (fimg->_zoneLow) { + // Go back to jars closed + ZonFixedImage::CallbackFunctor *functor = + new Common::Functor1Mem<ZonFixedImage *, void, CryOmni3DEngine_Versailles>(this, + &CryOmni3DEngine_Versailles::img_41202); + fimg->changeCallback(functor); + break; + } + if (fimg->_zoneUse) { + if (!_inventory.inInventoryByNameID(97)) { + collectObject(97, fimg); + } + // Go back to jars closed + ZonFixedImage::CallbackFunctor *functor = + new Common::Functor1Mem<ZonFixedImage *, void, CryOmni3DEngine_Versailles>(this, + &CryOmni3DEngine_Versailles::img_41202); + fimg->changeCallback(functor); + break; + } + } +} + IMG_CB(41801) { fimg->load("12E2_10.GIF"); while (1) { @@ -999,7 +999,7 @@ IMG_CB(41802) { _gameVariables[GameVariables::kGotRevealedPaper] = 1; setGameTime(3, 1); } else if (objID == 96) { - // Pamphlet about arts + // Lampoon about arts playInGameVideo("PAP-BRUL"); // Force reload of the place if (_nextPlaceId == -1u) { @@ -1046,7 +1046,7 @@ IMG_CB(41802b) { _gameVariables[GameVariables::kGotRevealedPaper] = 1; setGameTime(3, 1); } else if (objID == 96) { - // Pamphlet about arts + // Lampoon about arts playInGameVideo("PAP-BRUL"); // Force reload of the place if (_nextPlaceId == -1u) { @@ -1091,7 +1091,7 @@ IMG_CB(41802c) { _gameVariables[GameVariables::kGotRevealedPaper] = 1; setGameTime(3, 1); } else if (objID == 96) { - // Pamphlet about arts + // Lampoon about arts playInGameVideo("PAP-BRUL"); // Force reload of the place if (_nextPlaceId == -1u) { @@ -1126,7 +1126,7 @@ IMG_CB(41802d) { _gameVariables[GameVariables::kGotRevealedPaper] = 1; setGameTime(3, 1); } else if (objID == 96) { - // Pamphlet about arts + // Lampoon about arts playInGameVideo("PAP-BRUL"); // Force reload of the place if (_nextPlaceId == -1u) { |