aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/pet_control
diff options
context:
space:
mode:
authorPaul Gilbert2016-10-31 23:57:54 -0400
committerPaul Gilbert2016-10-31 23:57:54 -0400
commitbce75da07a8573160a53f9e9dd3855106982d6f3 (patch)
tree943f791f00bee5bfb7acc55a9118a33f33ab4414 /engines/titanic/pet_control
parent11cc62f4039dedd084ca3e4bb3888337133c15fb (diff)
downloadscummvm-rg350-bce75da07a8573160a53f9e9dd3855106982d6f3.tar.gz
scummvm-rg350-bce75da07a8573160a53f9e9dd3855106982d6f3.tar.bz2
scummvm-rg350-bce75da07a8573160a53f9e9dd3855106982d6f3.zip
TITANIC: Fix rendering PET glyphs when scrolled
Diffstat (limited to 'engines/titanic/pet_control')
-rw-r--r--engines/titanic/pet_control/pet_glyphs.cpp6
-rw-r--r--engines/titanic/pet_control/pet_rooms.cpp3
2 files changed, 5 insertions, 4 deletions
diff --git a/engines/titanic/pet_control/pet_glyphs.cpp b/engines/titanic/pet_control/pet_glyphs.cpp
index bd05342095..5cc428b104 100644
--- a/engines/titanic/pet_control/pet_glyphs.cpp
+++ b/engines/titanic/pet_control/pet_glyphs.cpp
@@ -101,9 +101,9 @@ void CPetGlyphs::setup(int numVisible, CPetSection *owner) {
int buttonsLeft = numVisible * 70 + 21;
_scrollLeft.setBounds(Rect(0, 0, 31, 15));
- _scrollLeft.translate(buttonsLeft, 373);
+ _scrollLeft.translate(buttonsLeft + 7, 373);
_scrollRight.setBounds(Rect(0, 0, 31, 15));
- _scrollRight.translate(buttonsLeft, 413);
+ _scrollRight.translate(buttonsLeft + 7, 413);
}
void CPetGlyphs::reset() {
@@ -155,7 +155,7 @@ void CPetGlyphs::draw(CScreenManager *screenManager) {
int itemIndex = getItemIndex(index);
if (itemIndex >= 0 && itemIndex < listSize) {
- Point pt = getPosition(itemIndex);
+ Point pt = getPosition(index);
CPetGlyph *glyph = getGlyph(itemIndex);
if (glyph)
diff --git a/engines/titanic/pet_control/pet_rooms.cpp b/engines/titanic/pet_control/pet_rooms.cpp
index fb92f2692d..7a0c23c9b9 100644
--- a/engines/titanic/pet_control/pet_rooms.cpp
+++ b/engines/titanic/pet_control/pet_rooms.cpp
@@ -165,7 +165,8 @@ void CPetRooms::enter(PetArea oldArea) {
}
void CPetRooms::enterRoom(CRoomItem *room) {
-
+ if (room)
+ resetHighlight();
}
CPetText *CPetRooms::getText() {