[scummvm-devel] That pesky CMI walkbox problem... (fwd)
Torbj|rn Andersson
d91tan at Update.UU.SE
Mon Feb 10 23:43:03 CET 2003
After some detective work, I now think I know why Guybrush is put in
the wrong position the first time he enters the cannibal village. I'm
just not entirely sure how to fix it correctly.
In the case where Guybrush is placed correctly, the room is loaded
from script 873 (roomobj-53-873.dmp) with o6_loadRoomWithEgo(). This
is what that script does:
[001A] (65) if (ifClassOfIs(873,[22])) {
[002F] (89) setClsasOf?(873,[150])
[003F] (79) startScriptEx(0,329,[])
[0053] (66) } else {
[004F] (9E) loadRoomWithEgo(896,280,455)
[0064] (**) }
The loadRoomWithEgo() opcode provides startScene() with both actor
and object number, so in addition to loading the room it will place
Guybrush near some object. The entrance gate, I suppose.
In the other case, as you can see, the game will run script 329
instead. Here's what that script does:
[011B] (AC) initActor(1)
[0122] (AC) setActorDirection(135)
[0129] (A2) putActorAtObject(1,896)
[0134] (8D) actorFollowCamera(1)
If I understand this correctly, putActorAtObject() will put Guybrush
in the cannibal village, but it will do so without actually loading
the new room. It's actually actorFollowCamera() which will call
startScene().
So I think the proper solution is to make putActorAtObject() more
like loadRoomWithEgo(). But should that change be made only for V8
games, or is it just that none of the earlier games has used this
particular scripting idiom?
Torbjorn
More information about the Scummvm-devel
mailing list