[Scummvm-git-logs] scummvm master -> 90222f694ea80840fb777f5aa10c5eeaadf508ff

dreammaster dreammaster at scummvm.org
Sun Jun 25 18:40:44 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:
90222f694e TITANIC: Fix display of PET area titles


Commit: 90222f694ea80840fb777f5aa10c5eeaadf508ff
    https://github.com/scummvm/scummvm/commit/90222f694ea80840fb777f5aa10c5eeaadf508ff
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-06-25T12:40:32-04:00

Commit Message:
TITANIC: Fix display of PET area titles

Changed paths:
    engines/titanic/pet_control/pet_frame.cpp
    engines/titanic/pet_control/pet_frame.h
    engines/titanic/pet_control/pet_gfx_element.cpp


diff --git a/engines/titanic/pet_control/pet_frame.cpp b/engines/titanic/pet_control/pet_frame.cpp
index de84668..bc8d87b 100644
--- a/engines/titanic/pet_control/pet_frame.cpp
+++ b/engines/titanic/pet_control/pet_frame.cpp
@@ -56,9 +56,9 @@ bool CPetFrame::reset() {
 			_modeButtons[idx].reset(resName, _petControl, MODE_SELECTED);
 		}
 
-		for (uint idx = 0; idx < _petAreas.size(); ++idx) {
+		for (uint idx = 0; idx < 7; ++idx) {
 			CString resName = Common::String::format("3Pettitle%d", idx + 1);
-			_titles[idx].reset(resName, _petControl, MODE_UNSELECTED);
+			_titles[idx].setup(MODE_UNSELECTED, resName, _petControl);
 		}
 
 		for (int idx = 0; idx < TOTAL_GLYPHS; ++idx) {
diff --git a/engines/titanic/pet_control/pet_frame.h b/engines/titanic/pet_control/pet_frame.h
index 9f28289..824ee40 100644
--- a/engines/titanic/pet_control/pet_frame.h
+++ b/engines/titanic/pet_control/pet_frame.h
@@ -36,7 +36,7 @@ class CPetFrame : public CPetSection {
 private:
 	Common::Array<PetArea> _petAreas;
 	Common::Array<CPetGfxElement> _modeButtons;
-	CPetGfxElement _titles[6];
+	CPetGfxElement _titles[7];
 	CPetGfxElement _modeBackground;
 	CPetGfxElement _val2;
 	CPetGfxElement _val3;
diff --git a/engines/titanic/pet_control/pet_gfx_element.cpp b/engines/titanic/pet_control/pet_gfx_element.cpp
index 3fdfd02..829b9ae 100644
--- a/engines/titanic/pet_control/pet_gfx_element.cpp
+++ b/engines/titanic/pet_control/pet_gfx_element.cpp
@@ -54,9 +54,9 @@ void CPetGfxElement::reset(const CString &name, CPetControl *petControl, PetElem
 	if (classNum >= FIRST_CLASS && classNum <= THIRD_CLASS) {
 		numString = CString(classNum);
 	} else if (classNum == UNCHECKED) {
-		int stateC = petControl->getPriorClass();
-		if (stateC == 1)
-			numString = CString(stateC);
+		int priorClass = petControl->getPriorClass();
+		if (priorClass == 1)
+			numString = CString(priorClass);
 	}
 
 	CString resName = numString + name;





More information about the Scummvm-git-logs mailing list