[Scummvm-cvs-logs] scummvm master -> fb66ae3698f75ccfd7ac541b85e1646596fca968

wjp wjp at usecode.org
Tue Dec 13 10:45:38 CET 2011


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:
fb66ae3698 DREAMWEB: Fix regression in selecSlot


Commit: fb66ae3698f75ccfd7ac541b85e1646596fca968
    https://github.com/scummvm/scummvm/commit/fb66ae3698f75ccfd7ac541b85e1646596fca968
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2011-12-13T01:45:07-08:00

Commit Message:
DREAMWEB: Fix regression in selecSlot

Changed paths:
    engines/dreamweb/stubs.cpp



diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 6dc74b7..a7d6584 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -4488,15 +4488,12 @@ void DreamGenContext::selectSlot() {
 		data.byte(kLoadingorsave)--;
 
 	oldToNames();
-	uint16 y = data.word(kMousey) - (kOpsy + 4);
-	byte currentSlot = (byte)-1;
-
-	do {
-		currentSlot++;
-		y -= 11;
-	} while (y >= 11);
+	int y = data.word(kMousey) - (kOpsy + 4);
+	if (y < 11)
+		data.byte(kCurrentslot) = 0;
+	else
+		data.byte(kCurrentslot) = y / 11;
 
-	data.byte(kCurrentslot) = currentSlot;
 	delPointer();
 	showOpBox();
 	showSlots();






More information about the Scummvm-git-logs mailing list