[Scummvm-cvs-logs] CVS: scummvm/scumm object.cpp,1.140,1.141
Max Horn
fingolfin at users.sourceforge.net
Fri Sep 19 12:34:17 CEST 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummex resource.cpp,1.4,1.5 scummex.cpp,1.3,1.4 sound.cpp,1.2,1.3
- Next message: [Scummvm-cvs-logs] CVS: scummvm/bs2 mouse.cpp,1.14,1.15 mouse.h,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv10364/scumm
Modified Files:
object.cpp
Log Message:
changed scumm/object.cpp for V1/V2 once again - this time it really should match the original behaviour
Index: object.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/object.cpp,v
retrieving revision 1.140
retrieving revision 1.141
diff -u -d -r1.140 -r1.141
--- object.cpp 14 Sep 2003 18:16:44 -0000 1.140
+++ object.cpp 19 Sep 2003 01:12:05 -0000 1.141
@@ -298,11 +298,17 @@
}
// Now compute the distance between the two points
- dist = getDist(x, y, x2, y2);
- // For V1/V2 games, distances are measured in "charactes" instead of pixels,
- // so we divide by 8, rounding up.
- if (_version <= 2)
- dist = (dist + 7) / 8;
+ x = ABS(x - x2);
+ y = ABS(y - y2);
+
+ // For V1/V2 games, distances are measured in the original "character"
+ // based coordinate system, instead of pixels. Otherwise various scripts
+ // will break.
+ if (_version <= 2) {
+ dist = MAX(x/8, y/2);
+ } else
+ dist = MAX(x, y);
+
return dist;
}
- Previous message: [Scummvm-cvs-logs] CVS: scummex resource.cpp,1.4,1.5 scummex.cpp,1.3,1.4 sound.cpp,1.2,1.3
- Next message: [Scummvm-cvs-logs] CVS: scummvm/bs2 mouse.cpp,1.14,1.15 mouse.h,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list