[Scummvm-cvs-logs] scummvm master -> 681af21e2f7133d98af48345a3747f7574f555c3
tramboi
bertrand_augereau at yahoo.fr
Wed Aug 17 04:49:28 CEST 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:
681af21e2f DREAMWEB: Arithmetic bugfix in door open/close range detection
Commit: 681af21e2f7133d98af48345a3747f7574f555c3
https://github.com/scummvm/scummvm/commit/681af21e2f7133d98af48345a3747f7574f555c3
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-08-16T21:46:34-07:00
Commit Message:
DREAMWEB: Arithmetic bugfix in door open/close range detection
Changed paths:
engines/dreamweb/sprite.cpp
diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp
index 2ecdac3..2fb52ab 100644
--- a/engines/dreamweb/sprite.cpp
+++ b/engines/dreamweb/sprite.cpp
@@ -338,20 +338,18 @@ void DreamGenContext::dodoor() {
void DreamGenContext::dodoor(Sprite *sprite, ObjData *objData) {
uint8 ryanx = data.byte(kRyanx);
uint8 ryany = data.byte(kRyany);
- int8 deltax = ryanx - sprite->x;
- int8 deltay = ryany - sprite->y;
if (ryanx < sprite->x) {
- if (deltax < (int8)data.byte(kDoorcheck1))
+ if (ryanx < sprite->x + (int8)data.byte(kDoorcheck1))
goto shutdoor;
} else {
- if (deltax >= data.byte(kDoorcheck2))
+ if (ryanx >= sprite->x + data.byte(kDoorcheck2))
goto shutdoor;
}
if (ryany < sprite->y) {
- if (deltay < (int8)data.byte(kDoorcheck3))
+ if (ryany < sprite->y + (int8)data.byte(kDoorcheck3))
goto shutdoor;
} else {
- if (deltay >= data.byte(kDoorcheck4))
+ if (ryany >= sprite->y + data.byte(kDoorcheck4))
goto shutdoor;
}
//opendoor:
More information about the Scummvm-git-logs
mailing list