[Scummvm-cvs-logs] scummvm master -> 1b11f48a35b299633ad336fa6d9dcb723d16a92f

bluegr md5 at scummvm.org
Mon Dec 26 12:18:32 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:
1b11f48a35 DREAMWEB: Cleanup identifyOb()


Commit: 1b11f48a35b299633ad336fa6d9dcb723d16a92f
    https://github.com/scummvm/scummvm/commit/1b11f48a35b299633ad336fa6d9dcb723d16a92f
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-12-26T03:18:09-08:00

Commit Message:
DREAMWEB: Cleanup identifyOb()

Changed paths:
    engines/dreamweb/object.cpp



diff --git a/engines/dreamweb/object.cpp b/engines/dreamweb/object.cpp
index 9d5ea15..10138ac 100644
--- a/engines/dreamweb/object.cpp
+++ b/engines/dreamweb/object.cpp
@@ -343,25 +343,20 @@ void DreamGenContext::identifyOb() {
 		return;
 	}
 
-	ax = data.word(kMousex) - data.word(kMapadx);
-	bx = data.word(kMousey) - data.word(kMapady);
+	uint16 initialX = data.word(kMousex) - data.word(kMapadx);
+	uint16 initialY = data.word(kMousey) - data.word(kMapady);
 
-	if (ax >= 22 * 8 || bx >= 20 * 8) {
+	if (initialX >= 22 * 8 || initialY >= 20 * 8) {
 		blank();
 		return;
 	}
 
+	byte x = initialX & 0xFF;
+	byte y = initialY & 0xFF;
+
 	data.byte(kInmaparea) = 1;
-	ah = bl;
-	push(ax);
-	data.byte(kPointerspath) = findPathOfPoint(al, ah);
-	ax = pop();
-	push(ax);
-	data.byte(kPointerfirstpath) = findFirstPath(al, ah);
-	ax = pop();
-
-	byte x = al;
-	byte y = ah;
+	data.byte(kPointerspath) = findPathOfPoint(x, y);
+	data.byte(kPointerfirstpath) = findFirstPath(x, y);
 
 	if (checkIfEx(x, y) || checkIfFree(x, y) ||
 		checkIfPerson(x, y) || checkIfSet(x, y))






More information about the Scummvm-git-logs mailing list