diff options
-rw-r--r-- | engines/cryomni3d/versailles/engine.cpp | 3 | ||||
-rw-r--r-- | engines/cryomni3d/versailles/engine.h | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/engines/cryomni3d/versailles/engine.cpp b/engines/cryomni3d/versailles/engine.cpp index b9795c28e3..cdb3f634f4 100644 --- a/engines/cryomni3d/versailles/engine.cpp +++ b/engines/cryomni3d/versailles/engine.cpp @@ -1326,9 +1326,8 @@ void CryOmni3DEngine_Versailles::animateCursor(const Object *obj) { g_system->showMouse(cursorWasVisible); } -void CryOmni3DEngine_Versailles::collectObject(unsigned int nameID, const ZonFixedImage *fimg, +void CryOmni3DEngine_Versailles::collectObject(Object *obj, const ZonFixedImage *fimg, bool showObject) { - Object *obj = _objects.findObjectByNameID(nameID); _inventory.add(obj); Object::ViewCallback cb = obj->viewCallback(); if (showObject && cb) { diff --git a/engines/cryomni3d/versailles/engine.h b/engines/cryomni3d/versailles/engine.h index e38e57c6a8..efc9941032 100644 --- a/engines/cryomni3d/versailles/engine.h +++ b/engines/cryomni3d/versailles/engine.h @@ -306,8 +306,10 @@ private: bool loadGame(bool visit, unsigned int saveNum); void animateCursor(const Object *object); - void collectObject(unsigned int nameID, const ZonFixedImage *fimg = nullptr, + void collectObject(Object *object, const ZonFixedImage *fimg = nullptr, bool showObject = true); + void collectObject(unsigned int nameID, const ZonFixedImage *fimg = nullptr, + bool showObject = true) { collectObject(_objects.findObjectByNameID(nameID), fimg, showObject); } typedef void (CryOmni3DEngine_Versailles::*DisplayObjectHook)(Graphics::ManagedSurface &surface); void displayObject(const Common::String &imgName, DisplayObjectHook hook = nullptr); |