aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/pet_control
diff options
context:
space:
mode:
authorPaul Gilbert2016-11-07 20:58:45 -0500
committerPaul Gilbert2016-11-07 20:58:45 -0500
commit90fed956f29dfda4e5ce210a76ca0c5bbfb70b28 (patch)
treed86ab7aa6b0ecac9cb54f14636bf6729cae3fb08 /engines/titanic/pet_control
parent8eb8e7366c5c68c3d44a7ce5234f4b7c8bf2015f (diff)
downloadscummvm-rg350-90fed956f29dfda4e5ce210a76ca0c5bbfb70b28.tar.gz
scummvm-rg350-90fed956f29dfda4e5ce210a76ca0c5bbfb70b28.tar.bz2
scummvm-rg350-90fed956f29dfda4e5ce210a76ca0c5bbfb70b28.zip
TITANIC: Fix highlighting correct PET icon after loading
Diffstat (limited to 'engines/titanic/pet_control')
-rw-r--r--engines/titanic/pet_control/pet_control.cpp6
-rw-r--r--engines/titanic/pet_control/pet_control.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/engines/titanic/pet_control/pet_control.cpp b/engines/titanic/pet_control/pet_control.cpp
index 3c3efe1419..2d44885a3e 100644
--- a/engines/titanic/pet_control/pet_control.cpp
+++ b/engines/titanic/pet_control/pet_control.cpp
@@ -155,7 +155,7 @@ void CPetControl::postLoad() {
if (!_remoteTargetName.empty() && root)
_remoteTarget = dynamic_cast<CGameObject *>(root->findByName(_remoteTargetName));
- setArea(_currentArea);
+ setArea(_currentArea, true);
loaded();
}
@@ -210,8 +210,8 @@ void CPetControl::resetActiveNPC() {
_activeNPCName = "";
}
-PetArea CPetControl::setArea(PetArea newArea) {
- if (newArea == _currentArea || !isAreaActive())
+PetArea CPetControl::setArea(PetArea newArea, bool forceChange) {
+ if ((!forceChange && newArea == _currentArea) || !isAreaActive())
return _currentArea;
// Signal the currently active area that it's being left
diff --git a/engines/titanic/pet_control/pet_control.h b/engines/titanic/pet_control/pet_control.h
index cdef505104..d6f426b507 100644
--- a/engines/titanic/pet_control/pet_control.h
+++ b/engines/titanic/pet_control/pet_control.h
@@ -181,7 +181,7 @@ public:
/**
* Sets the currently viewed area within the PET
*/
- PetArea setArea(PetArea newSection);
+ PetArea setArea(PetArea newSection, bool forceChange = false);
/**
* Hides the text cursor in the current section, if applicable