diff options
author | Paul Gilbert | 2017-06-25 12:40:32 -0400 |
---|---|---|
committer | Paul Gilbert | 2017-06-25 12:40:32 -0400 |
commit | 90222f694ea80840fb777f5aa10c5eeaadf508ff (patch) | |
tree | cb5b760badc8fecc2c6dce369d9ca2681476c1e0 /engines/titanic | |
parent | 59243928e74196f2c896b654dfb20526249246d1 (diff) | |
download | scummvm-rg350-90222f694ea80840fb777f5aa10c5eeaadf508ff.tar.gz scummvm-rg350-90222f694ea80840fb777f5aa10c5eeaadf508ff.tar.bz2 scummvm-rg350-90222f694ea80840fb777f5aa10c5eeaadf508ff.zip |
TITANIC: Fix display of PET area titles
Diffstat (limited to 'engines/titanic')
-rw-r--r-- | engines/titanic/pet_control/pet_frame.cpp | 4 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_frame.h | 2 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_gfx_element.cpp | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/engines/titanic/pet_control/pet_frame.cpp b/engines/titanic/pet_control/pet_frame.cpp index de8466858e..bc8d87b8e4 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 9f28289964..824ee40695 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 3fdfd02f3a..829b9ae58e 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; |