diff options
Diffstat (limited to 'engines/cryomni3d')
-rw-r--r-- | engines/cryomni3d/objects.cpp | 16 | ||||
-rw-r--r-- | engines/cryomni3d/objects.h | 8 | ||||
-rw-r--r-- | engines/cryomni3d/versailles/dialogs.cpp | 26 | ||||
-rw-r--r-- | engines/cryomni3d/versailles/engine.cpp | 20 | ||||
-rw-r--r-- | engines/cryomni3d/versailles/logic.cpp | 24 |
5 files changed, 47 insertions, 47 deletions
diff --git a/engines/cryomni3d/objects.cpp b/engines/cryomni3d/objects.cpp index 5963a1dd0e..1c06eb1ea1 100644 --- a/engines/cryomni3d/objects.cpp +++ b/engines/cryomni3d/objects.cpp @@ -66,9 +66,9 @@ void Inventory::remove(unsigned int position) { (*_changeCallback)(-1u); } -void Inventory::removeByCursorId(unsigned int cursorId) { +void Inventory::removeByIconID(unsigned int iconID) { for (iterator it = begin(); it != end(); it++) { - if ((*it) && (*it)->idCA() == cursorId) { + if ((*it) && (*it)->idCA() == iconID) { remove(it - begin()); return; } @@ -76,9 +76,9 @@ void Inventory::removeByCursorId(unsigned int cursorId) { // Don't bail out } -void Inventory::removeByNameId(unsigned int nameId) { +void Inventory::removeByNameID(unsigned int nameID) { for (iterator it = begin(); it != end(); it++) { - if ((*it) && (*it)->idOBJ() == nameId) { + if ((*it) && (*it)->idOBJ() == nameID) { remove(it - begin()); return; } @@ -86,18 +86,18 @@ void Inventory::removeByNameId(unsigned int nameId) { // Don't bail out } -bool Inventory::inInventoryByCursorId(unsigned int cursorId) const { +bool Inventory::inInventoryByIconID(unsigned int iconID) const { for (const_iterator it = begin(); it != end(); it++) { - if ((*it) && (*it)->idCA() == cursorId) { + if ((*it) && (*it)->idCA() == iconID) { return true; } } return false; } -bool Inventory::inInventoryByNameId(unsigned int nameId) const { +bool Inventory::inInventoryByNameID(unsigned int nameID) const { for (const_iterator it = begin(); it != end(); it++) { - if ((*it) && (*it)->idOBJ() == nameId) { + if ((*it) && (*it)->idOBJ() == nameID) { return true; } } diff --git a/engines/cryomni3d/objects.h b/engines/cryomni3d/objects.h index 03e6a5d0ac..c34f30d6c3 100644 --- a/engines/cryomni3d/objects.h +++ b/engines/cryomni3d/objects.h @@ -83,10 +83,10 @@ public: void clear(); void add(Object *); void remove(unsigned int position); - void removeByCursorId(unsigned int cursorId); - void removeByNameId(unsigned int nameId); - bool inInventoryByCursorId(unsigned int cursorId) const; - bool inInventoryByNameId(unsigned int nameId) const; + void removeByNameID(unsigned int nameID); + void removeByIconID(unsigned int iconID); + bool inInventoryByNameID(unsigned int nameID) const; + bool inInventoryByIconID(unsigned int iconID) const; Object *selectedObject() const { return _selectedObject; } void setSelectedObject(Object *obj) { _selectedObject = obj; } diff --git a/engines/cryomni3d/versailles/dialogs.cpp b/engines/cryomni3d/versailles/dialogs.cpp index f2d42530d0..a415101b71 100644 --- a/engines/cryomni3d/versailles/dialogs.cpp +++ b/engines/cryomni3d/versailles/dialogs.cpp @@ -26,10 +26,10 @@ namespace CryOmni3D { namespace Versailles { bool CryOmni3DEngine_Versailles::preprocessDialog(const Common::String &sequence) { - if (_inventory.inInventoryByNameId(96) && _inventory.inInventoryByNameId(98)) { + if (_inventory.inInventoryByNameID(96) && _inventory.inInventoryByNameID(98)) { _dialogsMan["{JOUEUR-TROUVE-TITRE-ET-PAMPHLET}"] = 'Y'; } - if (_inventory.inInventoryByNameId(126)) { + if (_inventory.inInventoryByNameID(126)) { _dialogsMan["{JOUEUR_POSSEDE_EPIGRAPHE}"] = 'Y'; } @@ -39,14 +39,14 @@ bool CryOmni3DEngine_Versailles::preprocessDialog(const Common::String &sequence _dialogsMan["{JOUEUR-VU-MEMORANDUM-DANS-LUSTRE-DU-SALON-DE-LA-GUERRE}"] = 'N'; if (_currentLevel == 5 && _gameVariables[GameVariables::kSeenMemorandum] && - !_inventory.inInventoryByNameId(140)) { + !_inventory.inInventoryByNameID(140)) { _dialogsMan["{JOUEUR-VU-MEMORANDUM-DANS-LUSTRE-DU-SALON-DE-LA-GUERRE}"] = 'Y'; } if (_currentLevel == 1 && _currentPlaceId == 1 && currentGameTime() == 3 && sequence.hasPrefix("13F_HUI") && _gameVariables[GameVariables::kWarnedIncomplete] == 0 && _dialogsMan["{JOUEUR-TROUVE-TITRE-ET-PAMPHLET}"] == 'Y' && - (!_inventory.inInventoryByNameId(96) || !_inventory.inInventoryByNameId(98))) { + (!_inventory.inInventoryByNameID(96) || !_inventory.inInventoryByNameID(98))) { displayMessageBoxWarp(18); _gameVariables[GameVariables::kWarnedIncomplete] = 1; return 0; @@ -54,7 +54,7 @@ bool CryOmni3DEngine_Versailles::preprocessDialog(const Common::String &sequence if (_currentLevel == 2 && _currentPlaceId == 11 && currentGameTime() == 4 && sequence.hasPrefix("24Z_BON") && _gameVariables[GameVariables::kWarnedIncomplete] == 0 && _dialogsMan["{JOUEUR-MONTRE-TITRE-FABLE-APPARU-SUR-ESQUISSE}"] == 'Y' && - (!_inventory.inInventoryByNameId(101) || !_inventory.inInventoryByNameId(103))) { + (!_inventory.inInventoryByNameID(101) || !_inventory.inInventoryByNameID(103))) { displayMessageBoxWarp(18); _gameVariables[GameVariables::kWarnedIncomplete] = 1; return 0; @@ -62,8 +62,8 @@ bool CryOmni3DEngine_Versailles::preprocessDialog(const Common::String &sequence if (_currentLevel == 3 && _currentPlaceId == 10 && currentGameTime() == 3 && sequence.hasPrefix("31O_SUIA") && _gameVariables[GameVariables::kWarnedIncomplete] == 0 && _dialogsMan["CROISSY-ACCEPTE-TEXTE"] == 'Y' && - (!_inventory.inInventoryByNameId(121) || !_inventory.inInventoryByNameId(119) || - !_inventory.inInventoryByNameId(115) || _gameVariables[GameVariables::kGotMedaillesSolution] == 0)) { + (!_inventory.inInventoryByNameID(121) || !_inventory.inInventoryByNameID(119) || + !_inventory.inInventoryByNameID(115) || _gameVariables[GameVariables::kGotMedaillesSolution] == 0)) { displayMessageBoxWarp(18); _gameVariables[GameVariables::kWarnedIncomplete] = 1; return 0; @@ -71,7 +71,7 @@ bool CryOmni3DEngine_Versailles::preprocessDialog(const Common::String &sequence if (_currentLevel == 4 && _currentPlaceId == 10 && currentGameTime() == 3 && sequence.hasPrefix("42C_BON") && _gameVariables[GameVariables::kWarnedIncomplete] == 0 && _dialogsMan["{JOUEUR-MONTRE-PAMPHLET-RELIGION}"] == 'Y' && - (!_inventory.inInventoryByNameId(127) || _gameVariables[GameVariables::kUsedPlanVauban1] == 0 || + (!_inventory.inInventoryByNameID(127) || _gameVariables[GameVariables::kUsedPlanVauban1] == 0 || _gameVariables[GameVariables::kUsedPlanVauban2] == 0)) { displayMessageBoxWarp(18); _gameVariables[GameVariables::kWarnedIncomplete] = 1; @@ -80,7 +80,7 @@ bool CryOmni3DEngine_Versailles::preprocessDialog(const Common::String &sequence if (_currentLevel == 5 && _currentPlaceId == 10 && currentGameTime() == 3 && sequence.hasPrefix("42C_BON") && _gameVariables[GameVariables::kWarnedIncomplete] == 0 && _dialogsMan["{JOUEUR-MONTRE-PAMPHLET-RELIGION}"] == 'Y' && - (!_inventory.inInventoryByNameId(127) || _gameVariables[GameVariables::kUsedPlanVauban1] == 0 || + (!_inventory.inInventoryByNameID(127) || _gameVariables[GameVariables::kUsedPlanVauban1] == 0 || _gameVariables[GameVariables::kUsedPlanVauban2] == 0)) { displayMessageBoxWarp(18); _gameVariables[GameVariables::kWarnedIncomplete] = 1; @@ -150,7 +150,7 @@ void CryOmni3DEngine_Versailles::postprocessDialog(const Common::String &sequenc if (sequence == "52A4_LAC" && _gameVariables[GameVariables::kStatePamphletReligion] != 3 && _dialogsMan["LACHAIZE-DIT-REFORME"] == 'Y' && _dialogsMan["LACHAIZE-DIT-DRAGONNADES"] == 'Y' && _dialogsMan["LACHAIZE-TROUVE-ECROUELLES"] == 'Y') { - _inventory.removeByNameId(125); + _inventory.removeByNameID(125); _gameVariables[GameVariables::kStatePamphletReligion] = 3; collectObject(125); _inventory.deselectObject(); @@ -235,9 +235,9 @@ void CryOmni3DEngine_Versailles::dialogShowHuissierShowPamphlet() { } void CryOmni3DEngine_Versailles::dialogShowMonseigneurSorts() { - _inventory.removeByNameId(105); + _inventory.removeByNameID(105); collectObject(106); - _gameVariables[GameVariables::kEsquissePainted] = 2; + _gameVariables[GameVariables::kSketchState] = 2; // Sketches sorted _inventory.deselectObject(); setGameTime(3, 2); _dialogsMan["MONSEIGNEUR-ATTEND-ESQUISSES"] = 'N'; @@ -292,7 +292,7 @@ void CryOmni3DEngine_Versailles::dialogShowBontempsGivesKey() { void CryOmni3DEngine_Versailles::dialogShowDuMaineLeaves() { playInGameVideo("62S_DUC1"); - _inventory.removeByNameId(144); + _inventory.removeByNameID(144); _inventory.deselectObject(); setPlaceState(19, 1); } diff --git a/engines/cryomni3d/versailles/engine.cpp b/engines/cryomni3d/versailles/engine.cpp index 5ea89f4f5e..bb01825551 100644 --- a/engines/cryomni3d/versailles/engine.cpp +++ b/engines/cryomni3d/versailles/engine.cpp @@ -502,25 +502,25 @@ void CryOmni3DEngine_Versailles::playTransitionEndLevel(int level) { break; case 2: video = "a3_vf.hns"; - _inventory.removeByNameId(96); - _inventory.removeByNameId(104); + _inventory.removeByNameID(96); + _inventory.removeByNameID(104); break; case 3: video = "a4_vf.hns"; break; case 4: video = "a5_vf.hns"; - _inventory.removeByNameId(101); - _inventory.removeByNameId(127); - _inventory.removeByNameId(129); - _inventory.removeByNameId(130); - _inventory.removeByNameId(131); - _inventory.removeByNameId(132); - _inventory.removeByNameId(126); + _inventory.removeByNameID(101); + _inventory.removeByNameID(127); + _inventory.removeByNameID(129); + _inventory.removeByNameID(130); + _inventory.removeByNameID(131); + _inventory.removeByNameID(132); + _inventory.removeByNameID(126); break; case 5: video = "a6_vf.hns"; - _inventory.removeByNameId(115); + _inventory.removeByNameID(115); break; case 6: video = "a7_vf.hns"; diff --git a/engines/cryomni3d/versailles/logic.cpp b/engines/cryomni3d/versailles/logic.cpp index 1144318ec0..5ebb514ae6 100644 --- a/engines/cryomni3d/versailles/logic.cpp +++ b/engines/cryomni3d/versailles/logic.cpp @@ -360,7 +360,7 @@ IMG_CB(31142b) { break; } if (fimg->_zoneUse) { - if (_gameVariables[GameVariables::kCollectScissors] || _inventory.inInventoryByNameId(94)) { + if (_gameVariables[GameVariables::kCollectScissors] || _inventory.inInventoryByNameID(94)) { // Empty drawer ZonFixedImage::CallbackFunctor *functor = new Common::Functor1Mem<ZonFixedImage *, void, CryOmni3DEngine_Versailles>(this, @@ -388,7 +388,7 @@ IMG_CB(31142c) { break; } if (fimg->_zoneUse) { - if (!_inventory.inInventoryByNameId(94) && !_gameVariables[GameVariables::kCollectScissors]) { + if (!_inventory.inInventoryByNameID(94) && !_gameVariables[GameVariables::kCollectScissors]) { collectObject(94, fimg); } _gameVariables[GameVariables::kCollectScissors] = 1; @@ -446,7 +446,7 @@ IMG_CB(31143b) { break; } if (fimg->_zoneUse) { - if (_inventory.inInventoryByNameId(96)) { + if (_inventory.inInventoryByNameID(96)) { // Empty drawer ZonFixedImage::CallbackFunctor *functor = new Common::Functor1Mem<ZonFixedImage *, void, CryOmni3DEngine_Versailles>(this, @@ -474,7 +474,7 @@ IMG_CB(31143c) { break; } if (fimg->_zoneUse) { - if (!_inventory.inInventoryByNameId(96)) { + if (!_inventory.inInventoryByNameID(96)) { collectObject(96, fimg); } // Display empty drawer @@ -516,7 +516,7 @@ IMG_CB(41202) { } HANDLE_QUESTION(1); if (fimg->_zoneUse) { - if (fimg->_currentZone == 2 && !_inventory.inInventoryByNameId(97)) { + if (fimg->_currentZone == 2 && !_inventory.inInventoryByNameID(97)) { // Open the jar ZonFixedImage::CallbackFunctor *functor = new Common::Functor1Mem<ZonFixedImage *, void, CryOmni3DEngine_Versailles>(this, @@ -549,7 +549,7 @@ IMG_CB(41202b) { break; } if (fimg->_zoneUse) { - if (!_inventory.inInventoryByNameId(97)) { + if (!_inventory.inInventoryByNameID(97)) { collectObject(97, fimg); } // Go back to jars closed @@ -584,7 +584,7 @@ IMG_CB(41801) { } } else if (fimg->_usedObject && fimg->_usedObject->idOBJ() == 94) { _gameVariables[GameVariables::kUsedScissors] = 1; - _inventory.removeByNameId(94); + _inventory.removeByNameID(94); open = true; } if (open) { @@ -633,7 +633,7 @@ IMG_CB(41801b) { break; } if (fimg->_zoneUse) { - if (!_inventory.inInventoryByNameId(100)) { + if (!_inventory.inInventoryByNameID(100)) { collectObject(100, fimg); } _gameVariables[GameVariables::kCollectedPaperInTrunk] = 1; @@ -736,7 +736,7 @@ IMG_CB(41802) { if (_nextPlaceId == -1u) { _nextPlaceId = _currentPlaceId; } - _inventory.removeByNameId(100); + _inventory.removeByNameID(100); // Revealed paper collectObject(98, fimg); _gameVariables[GameVariables::kGotRevealedPaper] = 1; @@ -783,7 +783,7 @@ IMG_CB(41802b) { if (_nextPlaceId == -1u) { _nextPlaceId = _currentPlaceId; } - _inventory.removeByNameId(100); + _inventory.removeByNameID(100); // Revealed paper collectObject(98, fimg); _gameVariables[GameVariables::kGotRevealedPaper] = 1; @@ -828,7 +828,7 @@ IMG_CB(41802c) { if (_nextPlaceId == -1u) { _nextPlaceId = _currentPlaceId; } - _inventory.removeByNameId(100); + _inventory.removeByNameID(100); // Revealed paper collectObject(98, fimg); _gameVariables[GameVariables::kGotRevealedPaper] = 1; @@ -863,7 +863,7 @@ IMG_CB(41802d) { if (_nextPlaceId == -1u) { _nextPlaceId = _currentPlaceId; } - _inventory.removeByNameId(100); + _inventory.removeByNameID(100); // Revealed paper collectObject(98, fimg); _gameVariables[GameVariables::kGotRevealedPaper] = 1; |