[Scummvm-devel] Could this be the explanation for the CMI walkbox bugs?

torbjorn.e.andersson at tietoenator.com torbjorn.e.andersson at tietoenator.com
Mon Feb 3 23:46:02 CET 2003


I tried looking into the CMI walkbox problems. Specifically not being able
to pick up the cup in the cannibal village. From what I can see, when you
try to pick the cup up your actor tries to move to a spot which *should* be
inside a walkbox, but it still gets adjusted out of that box.

On a hunch, I added the following lines to the end of getBoxCoordinates():

        // CMI triggers some of these on some boxes. That can't be right...
        if (box->ul.x > box->ur.x) printf("ul.x > ur.x !!!\n");
        if (box->ll.x > box->lr.x) printf("ll.x > lr.x !!!\n");
        if (box->ul.y > box->ll.y) printf("ul.y > ll.y !!!\n");
        if (box->ur.y > box->lr.y) printf("ur.y > lr.y !!!\n");

And it turns out that CMI triggers some of these cases for some boxes.
Unless I'm making some boneheaded mistake, that means that what we think are
the upper/lower left/right corners of the box aren't always, and any code
that assumes they are will break badly.

Maybe the solution is as simple as fixing getBoxCoordinates() to assign the
appropriate coordinates to the appropriate corners...?

Torbjörn

-- 
TietoEnator Resource Management AB
Persona
Torbjörn Andersson
http://www.rm.tietoenator.com/
 




More information about the Scummvm-devel mailing list