[Scummvm-cvs-logs] SF.net SVN: scummvm:[50914] scummvm/trunk/engines/m4
dreammaster at users.sourceforge.net
dreammaster at users.sourceforge.net
Thu Jul 15 14:37:46 CEST 2010
Revision: 50914
http://scummvm.svn.sourceforge.net/scummvm/?rev=50914&view=rev
Author: dreammaster
Date: 2010-07-15 12:37:46 +0000 (Thu, 15 Jul 2010)
Log Message:
-----------
Bugfixes to walking code. Rex can now walk about on-screen
Modified Paths:
--------------
scummvm/trunk/engines/m4/mads_player.cpp
scummvm/trunk/engines/m4/mads_scene.cpp
Modified: scummvm/trunk/engines/m4/mads_player.cpp
===================================================================
--- scummvm/trunk/engines/m4/mads_player.cpp 2010-07-15 10:51:11 UTC (rev 50913)
+++ scummvm/trunk/engines/m4/mads_player.cpp 2010-07-15 12:37:46 UTC (rev 50914)
@@ -503,14 +503,14 @@
if (_v8452C < _posDiff.x)
_v8452C += _posDiff.y;
if (_v8452C >= _posDiff.x) {
- if ((_posChange.y <= 0) || (_v844C0 != 0))
+ if ((_posChange.y > 0) || (_v844C0 != 0))
newPos.y += _yDirection;
--_posChange.y;
_v8452C -= _posDiff.x;
}
if (_v8452C < _posDiff.x) {
- if ((_posChange.x <= 0) || (_v844C0 != 0))
+ if ((_posChange.x > 0) || (_v844C0 != 0))
newPos.x += _xDirection;
--_posChange.x;
}
@@ -524,9 +524,11 @@
_v8452E += _v84530;
- } while ((_v8452E < var1) && !routeFlag && ((_posChange.x > 0) || (_posChange.y > 0)));
+ } while ((_v8452E < var1) && !routeFlag && ((_posChange.x > 0) || (_posChange.y > 0) || (_v844C0 != 0)));
}
+ _v8452E -= var1;
+
if (routeFlag)
moveComplete();
else {
@@ -696,7 +698,7 @@
else if (yDiff == 0)
majorDir = 3;
else {
- if ((scaleAmount >= xDiff) && ((xAmt33 / scaleAmount) >= 141))
+ if ((scaleAmount < xDiff) && ((xAmt33 / scaleAmount) >= 141))
majorDir = 3;
else if (yDiff <= xDiff)
majorDir = 2;
@@ -727,8 +729,8 @@
_posChange.x = xDiff;
_posChange.y = yDiff;
- scaleAmount = MAX(xDiff, yDiff);
- _v84530 = (scaleAmount == 0) ? 0 : _hypotenuse / scaleAmount;
+ int majorChange = MAX(xDiff, yDiff);
+ _v84530 = (majorChange == 0) ? 0 : _hypotenuse / majorChange;
if (_playerPos.x > _destPos.x)
_v8452C = MAX(_posChange.x, _posChange.y);
Modified: scummvm/trunk/engines/m4/mads_scene.cpp
===================================================================
--- scummvm/trunk/engines/m4/mads_scene.cpp 2010-07-15 10:51:11 UTC (rev 50913)
+++ scummvm/trunk/engines/m4/mads_scene.cpp 2010-07-15 12:37:46 UTC (rev 50914)
@@ -854,7 +854,9 @@
}
void MadsSceneResources::setRouteNode(int nodeIndex, const Common::Point &pt, M4Surface *depthSurface) {
- // TODO
+ _nodes[nodeIndex].pt = pt;
+
+ // TODO: Implement the rest of the logic of this method
}
/*--------------------------------------------------------------------------*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list