[Scummvm-cvs-logs] CVS: scummvm/saga actor.cpp,1.62,1.63
Andrew Kurushin
h00ligan at users.sourceforge.net
Wed Dec 29 14:32:10 CET 2004
Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14972
Modified Files:
actor.cpp
Log Message:
- some update
Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/actor.cpp,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- actor.cpp 29 Dec 2004 22:00:47 -0000 1.62
+++ actor.cpp 29 Dec 2004 22:31:21 -0000 1.63
@@ -154,6 +154,7 @@
actor->actionDirection = ActorTable[i].actionDirection;
actor->frameNumber = 0;
actor->targetObject = ID_NOTHING;
+ actor->actorFlags = 0;
actor->location.x = ActorTable[i].x;
actor->location.y = ActorTable[i].y;
@@ -950,7 +951,7 @@
_vm->_scene->setDoorState(2, 0);
_vm->_scene->setDoorState(3, 0xff);
}
- if (actorId == 2002)
+ if (actorId == 0x2002)
debug("eah");
if (_vm->_scene->getMode() == SCENE_MODE_ISO) {
//todo: it
@@ -1045,39 +1046,39 @@
}
- pointBest = pointTo;
- actor->walkStepsCount = 0;
- findActorPath(actor, pointFrom, pointTo);
+ pointBest = pointTo;
+ actor->walkStepsCount = 0;
+ findActorPath(actor, pointFrom, pointTo);
- if (extraStartNode) {
- actor->walkStepIndex = 0;
- } else {
- actor->walkStepIndex = 2;
- }
+ if (extraStartNode) {
+ actor->walkStepIndex = 0;
+ } else {
+ actor->walkStepIndex = 2;
+ }
- if (extraEndNode) {
- actor->walkPath[actor->walkStepsCount - 2] = pointTo.x / (ACTOR_LMULT * 2);
- actor->walkPath[actor->walkStepsCount - 1] = pointTo.y / ACTOR_LMULT;
- }
+ if (extraEndNode) {
+ actor->walkPath[actor->walkStepsCount - 2] = pointTo.x / (ACTOR_LMULT * 2);
+ actor->walkPath[actor->walkStepsCount - 1] = pointTo.y / ACTOR_LMULT;
+ }
- pointBest.x = actor->walkPath[actor->walkStepsCount - 2] * 2;
- pointBest.y = actor->walkPath[actor->walkStepsCount - 1];
+ pointBest.x = actor->walkPath[actor->walkStepsCount - 2] * 2;
+ pointBest.y = actor->walkPath[actor->walkStepsCount - 1];
- pointFrom.x &= ~1;
- delta.x = ABS(pointFrom.x - pointTo.x);
- delta.y = ABS(pointFrom.y - pointTo.y);
+ pointFrom.x &= ~1;
+ delta.x = ABS(pointFrom.x - pointTo.x);
+ delta.y = ABS(pointFrom.y - pointTo.y);
- bestDelta.x = ABS(pointBest.x - pointTo.x);
- bestDelta.y = ABS(pointBest.y - pointTo.y);
+ bestDelta.x = ABS(pointBest.x - pointTo.x);
+ bestDelta.y = ABS(pointBest.y - pointTo.y);
- if (delta.x + delta.y <= bestDelta.x + bestDelta.y) {
- if (actor->flags & kFollower)
- actor->actorFlags |= kActorNoFollow;
- }
+ if (delta.x + delta.y <= bestDelta.x + bestDelta.y) {
+ if (actor->flags & kFollower)
+ actor->actorFlags |= kActorNoFollow;
+ }
- if (pointBest == pointFrom) {
- actor->walkStepsCount = 0;
- }
+ if (pointBest == pointFrom) {
+ actor->walkStepsCount = 0;
+ }
} else {
actor->walkPath[0] = pointTo.x / 2;
actor->walkPath[1] = pointTo.y;
@@ -1100,8 +1101,7 @@
}
}
- return false;
-
+ return true;
}
void Actor::actorSpeech(uint16 actorId, const char **strings, int stringsCount, uint16 sampleResourceId, int speechFlags) {
More information about the Scummvm-git-logs
mailing list