aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb
diff options
context:
space:
mode:
authorFilippos Karapetis2011-12-26 13:18:09 +0200
committerFilippos Karapetis2011-12-26 13:18:09 +0200
commit1b11f48a35b299633ad336fa6d9dcb723d16a92f (patch)
tree73db1af8dd8656b5d5b68ea5032ade5894a8f4af /engines/dreamweb
parent70b988634096afe0698132a824febd88a6a6b911 (diff)
downloadscummvm-rg350-1b11f48a35b299633ad336fa6d9dcb723d16a92f.tar.gz
scummvm-rg350-1b11f48a35b299633ad336fa6d9dcb723d16a92f.tar.bz2
scummvm-rg350-1b11f48a35b299633ad336fa6d9dcb723d16a92f.zip
DREAMWEB: Cleanup identifyOb()
Diffstat (limited to 'engines/dreamweb')
-rw-r--r--engines/dreamweb/object.cpp21
1 files changed, 8 insertions, 13 deletions
diff --git a/engines/dreamweb/object.cpp b/engines/dreamweb/object.cpp
index 9d5ea15fa3..10138acb78 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))