From 6930f2b648849ad2e00d25f1397cc9c3bba34045 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 11 Jun 2017 17:06:46 -0400 Subject: TITANIC: Rename viewChange to freeSurface --- engines/titanic/core/game_object.cpp | 2 +- engines/titanic/core/game_object.h | 4 ++-- engines/titanic/core/tree_item.h | 4 ++-- engines/titanic/game_manager.cpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/engines/titanic/core/game_object.cpp b/engines/titanic/core/game_object.cpp index f99e2cc255..b4079f1c19 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 08f53f3a83..34bdcc7057 100644 --- a/engines/titanic/core/game_object.h +++ b/engines/titanic/core/game_object.h @@ -576,9 +576,9 @@ public: 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 498d2da4f4..8509e7d5fc 100644 --- a/engines/titanic/core/tree_item.h +++ b/engines/titanic/core/tree_item.h @@ -155,9 +155,9 @@ public: 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 040442a8b0..ed6f56decb 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(); } -- cgit v1.2.3