diff options
author | Le Philousophe | 2019-03-09 23:29:27 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2019-06-01 22:43:48 +0200 |
commit | 49c90c74a607e755342e4b41729381cd2ea17cc2 (patch) | |
tree | 313cf96e1f618190bb5ee6eb190f29f241f09980 | |
parent | 4ceb3e4b079cd9df9fc28267c900e51fdcef5ff0 (diff) | |
download | scummvm-rg350-49c90c74a607e755342e4b41729381cd2ea17cc2.tar.gz scummvm-rg350-49c90c74a607e755342e4b41729381cd2ea17cc2.tar.bz2 scummvm-rg350-49c90c74a607e755342e4b41729381cd2ea17cc2.zip |
CRYOMNI3D: Add a function to deselect object
In original Versailles game, there is such a function used to determine if an
object has just been deselected. We don't need it in this engine for now
but who knows that will may come handy.
-rw-r--r-- | engines/cryomni3d/objects.h | 1 | ||||
-rw-r--r-- | engines/cryomni3d/versailles/dialogs.cpp | 14 |
2 files changed, 8 insertions, 7 deletions
diff --git a/engines/cryomni3d/objects.h b/engines/cryomni3d/objects.h index 917233c02f..03e6a5d0ac 100644 --- a/engines/cryomni3d/objects.h +++ b/engines/cryomni3d/objects.h @@ -90,6 +90,7 @@ public: Object *selectedObject() const { return _selectedObject; } void setSelectedObject(Object *obj) { _selectedObject = obj; } + void deselectObject() { _selectedObject = nullptr; } private: Object *_selectedObject; diff --git a/engines/cryomni3d/versailles/dialogs.cpp b/engines/cryomni3d/versailles/dialogs.cpp index ff5a9ff38b..f2d42530d0 100644 --- a/engines/cryomni3d/versailles/dialogs.cpp +++ b/engines/cryomni3d/versailles/dialogs.cpp @@ -153,7 +153,7 @@ void CryOmni3DEngine_Versailles::postprocessDialog(const Common::String &sequenc _inventory.removeByNameId(125); _gameVariables[GameVariables::kStatePamphletReligion] = 3; collectObject(125); - _inventory.setSelectedObject(nullptr); + _inventory.deselectObject(); } } } @@ -231,14 +231,14 @@ void CryOmni3DEngine_Versailles::dialogShowBontempsShowThird() { void CryOmni3DEngine_Versailles::dialogShowHuissierShowPamphlet() { collectObject(101); - _inventory.setSelectedObject(nullptr); + _inventory.deselectObject(); } void CryOmni3DEngine_Versailles::dialogShowMonseigneurSorts() { _inventory.removeByNameId(105); collectObject(106); _gameVariables[GameVariables::kEsquissePainted] = 2; - _inventory.setSelectedObject(nullptr); + _inventory.deselectObject(); setGameTime(3, 2); _dialogsMan["MONSEIGNEUR-ATTEND-ESQUISSES"] = 'N'; } @@ -270,7 +270,7 @@ void CryOmni3DEngine_Versailles::dialogShowCroissyLeave() { void CryOmni3DEngine_Versailles::dialogShowMaintenonGives() { collectObject(125); - _inventory.setSelectedObject(nullptr); + _inventory.deselectObject(); } void CryOmni3DEngine_Versailles::dialogShowLaChaizeGivesBack() { @@ -287,13 +287,13 @@ void CryOmni3DEngine_Versailles::dialogShowLaChaizeGivesPamphlet() { void CryOmni3DEngine_Versailles::dialogShowBontempsGivesKey() { collectObject(140); - _inventory.setSelectedObject(nullptr); + _inventory.deselectObject(); } void CryOmni3DEngine_Versailles::dialogShowDuMaineLeaves() { playInGameVideo("62S_DUC1"); _inventory.removeByNameId(144); - _inventory.setSelectedObject(nullptr); + _inventory.deselectObject(); setPlaceState(19, 1); } @@ -306,7 +306,7 @@ void CryOmni3DEngine_Versailles::dialogShowEndOfGame() { void CryOmni3DEngine_Versailles::dialogShowLeBrunGives() { collectObject(107); - _inventory.setSelectedObject(nullptr); + _inventory.deselectObject(); } void CryOmni3DEngine_Versailles::dialogShowLeBrunLeave() { |