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

dreammaster dreammaster at scummvm.org
Tue Nov 1 04:58:12 CET 2016


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:
bce75da07a TITANIC: Fix rendering PET glyphs when scrolled


Commit: bce75da07a8573160a53f9e9dd3855106982d6f3
    https://github.com/scummvm/scummvm/commit/bce75da07a8573160a53f9e9dd3855106982d6f3
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-10-31T23:57:54-04:00

Commit Message:
TITANIC: Fix rendering PET glyphs when scrolled

Changed paths:
    engines/titanic/pet_control/pet_glyphs.cpp
    engines/titanic/pet_control/pet_rooms.cpp



diff --git a/engines/titanic/pet_control/pet_glyphs.cpp b/engines/titanic/pet_control/pet_glyphs.cpp
index bd05342..5cc428b 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 fb92f26..7a0c23c 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() {





More information about the Scummvm-git-logs mailing list