diff --git a/engines/titanic/core/game_object.cpp b/engines/titanic/core/game_object.cpp index f99e2cc255a1..b4079f1c1990 100644 --- a/engines/titanic/core/game_object.cpp +++ b/engines/titanic/core/game_object.cpp @@ -248,7 +248,7 @@ Rect CGameObject::getBounds() const { return (_surface && _surface->hasFrame()) ? _bounds : Rect(); } -void CGameObject::viewChange() { +void CGameObject::freeSurface() { // Handle freeing the surfaces of objects when their view is left if (_surface) { _resource = _surface->_resourceKey.getString(); diff --git a/engines/titanic/core/game_object.h b/engines/titanic/core/game_object.h index 08f53f3a835b..34bdcc705754 100644 --- a/engines/titanic/core/game_object.h +++ b/engines/titanic/core/game_object.h @@ -576,9 +576,9 @@ class CGameObject : public CNamedItem { virtual Rect getBounds() const; /** - * Called when the view changes + * Free up any surface the object used */ - virtual void viewChange(); + virtual void freeSurface(); /** * Allows the item to draw itself diff --git a/engines/titanic/core/tree_item.h b/engines/titanic/core/tree_item.h index 498d2da4f4d1..8509e7d5fc59 100644 --- a/engines/titanic/core/tree_item.h +++ b/engines/titanic/core/tree_item.h @@ -155,9 +155,9 @@ class CTreeItem: public CMessageTarget { virtual Rect getBounds() const { return Rect(); } /** - * Called when the view changes + * Free up any surface the object used */ - virtual void viewChange() {} + virtual void freeSurface() {} /** * Get the parent for the given item diff --git a/engines/titanic/game_manager.cpp b/engines/titanic/game_manager.cpp index 040442a8b055..ed6f56decb00 100644 --- a/engines/titanic/game_manager.cpp +++ b/engines/titanic/game_manager.cpp @@ -265,7 +265,7 @@ void CGameManager::roomChange() { _trueTalkManager.clear(); for (CTreeItem *treeItem = _project; treeItem; treeItem = treeItem->scan(_project)) - treeItem->viewChange(); + treeItem->freeSurface(); markAllDirty(); }