Skip to content

Commit

Permalink
TITANIC: Fix duplication of RealLife icons when passenger class changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Aug 12, 2017
1 parent 3cfb5bc commit eaab1f0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion engines/titanic/core/game_object.cpp
Expand Up @@ -1354,7 +1354,7 @@ void CGameObject::setPassengerClass(PassengerClass newClass) {
// Setup the PET again, so the new class's PET background can take effect
CPetControl *petControl = getPetControl();
if (petControl)
petControl->setup();
petControl->reset();
}
}

Expand Down
18 changes: 9 additions & 9 deletions engines/titanic/pet_control/pet_control.cpp
Expand Up @@ -82,15 +82,15 @@ void CPetControl::load(SimpleFile *file) {
CGameObject::load(file);
}

void CPetControl::setup() {
_conversations.setup(this);
_rooms.setup(this);
_remote.setup(this);
_inventory.setup(this);
_starfield.setup(this);
_realLife.setup(this);
_translation.setup(this);
_frame.setup(this);
void CPetControl::reset() {
_conversations.reset();
_rooms.reset();
_remote.reset();
_inventory.reset();
_starfield.reset();
_realLife.reset();
_translation.reset();
_frame.reset();
}

bool CPetControl::isValid() {
Expand Down
4 changes: 2 additions & 2 deletions engines/titanic/pet_control/pet_control.h
Expand Up @@ -148,9 +148,9 @@ class CPetControl : public CGameObject {
virtual Rect getBounds() const;

/**
* Setups the sections within the PET
* Resets the PET, including all the sections within it
*/
void setup();
void reset();

/**
* Called after loading a game has finished
Expand Down

0 comments on commit eaab1f0

Please sign in to comment.