[Scummvm-git-logs] scummvm master -> eaab1f0472ea98294f7716d233d795fe4845cb8f

dreammaster dreammaster at scummvm.org
Sat Aug 12 17:07:34 CEST 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
eaab1f0472 TITANIC: Fix duplication of RealLife icons when passenger class changes


Commit: eaab1f0472ea98294f7716d233d795fe4845cb8f
    https://github.com/scummvm/scummvm/commit/eaab1f0472ea98294f7716d233d795fe4845cb8f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-08-12T11:07:25-04:00

Commit Message:
TITANIC: Fix duplication of RealLife icons when passenger class changes

Changed paths:
    engines/titanic/core/game_object.cpp
    engines/titanic/pet_control/pet_control.cpp
    engines/titanic/pet_control/pet_control.h


diff --git a/engines/titanic/core/game_object.cpp b/engines/titanic/core/game_object.cpp
index 1519a2d..5805092 100644
--- a/engines/titanic/core/game_object.cpp
+++ b/engines/titanic/core/game_object.cpp
@@ -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();
 	}
 }
 
diff --git a/engines/titanic/pet_control/pet_control.cpp b/engines/titanic/pet_control/pet_control.cpp
index 94430c6..a62377b 100644
--- a/engines/titanic/pet_control/pet_control.cpp
+++ b/engines/titanic/pet_control/pet_control.cpp
@@ -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() {
diff --git a/engines/titanic/pet_control/pet_control.h b/engines/titanic/pet_control/pet_control.h
index a6915e6..35556e0 100644
--- a/engines/titanic/pet_control/pet_control.h
+++ b/engines/titanic/pet_control/pet_control.h
@@ -148,9 +148,9 @@ public:
 	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





More information about the Scummvm-git-logs mailing list