Skip to content

Commit

Permalink
TITANIC: Rename viewChange to freeSurface
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Jun 11, 2017
1 parent 3be659b commit 6930f2b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion engines/titanic/core/game_object.cpp
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions engines/titanic/core/game_object.h
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions engines/titanic/core/tree_item.h
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion engines/titanic/game_manager.cpp
Expand Up @@ -265,7 +265,7 @@ void CGameManager::roomChange() {
_trueTalkManager.clear();

for (CTreeItem *treeItem = _project; treeItem; treeItem = treeItem->scan(_project))
treeItem->viewChange();
treeItem->freeSurface();

markAllDirty();
}
Expand Down

0 comments on commit 6930f2b

Please sign in to comment.