[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.398,1.399
kirben
kirben at users.sourceforge.net
Mon Jan 16 19:08:05 CET 2006
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5671/scumm
Modified Files:
actor.cpp
Log Message:
Fix actor selection in spyfox.
Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.398
retrieving revision 1.399
diff -u -d -r1.398 -r1.399
--- actor.cpp 14 Jan 2006 10:09:50 -0000 1.398
+++ actor.cpp 17 Jan 2006 03:07:00 -0000 1.399
@@ -1316,22 +1316,20 @@
#ifndef DISABLE_HE
int ScummEngine_v70he::getActorFromPos(int x, int y) {
- int i;
- int result = 0;
+ int curActor, i;
if (!testGfxAnyUsageBits(x / 8))
return 0;
+ curActor = 0;
for (i = 1; i < _numActors; i++) {
if (testGfxUsageBit(x / 8, i) && !getClass(i, kObjectClassUntouchable)
- && y >= _actors[i]._top && y <= _actors[i]._bottom && _actors[i]._pos.y > _actors[result]._pos.y) {
- if (_version > 2 || i != VAR(VAR_EGO)) {
- result = i;
- }
- }
+ && y >= _actors[i]._top && y <= _actors[i]._bottom
+ && (_actors[i]._pos.y > _actors[curActor]._pos.y || curActor == 0))
+ curActor = i;
}
- return result;
+ return curActor;
}
#endif
More information about the Scummvm-git-logs
mailing list