Ticket #8165: cmi-untrap.diff

File cmi-untrap.diff, 2.0 KB (added by eriktorbjorn, 21 years ago)

Patch against a January 21 CVS snapshot

  • scummvm/scumm/actor.h

    diff -ur ScummVM-cvs20030121/scummvm/scumm/actor.h ScummVM-cvs20030121+hack/scummvm/scumm/actor.h
    old new  
    127127
    128128        void setBox(int box);
    129129        int updateActorDirection(bool is_walking);
    130         void adjustActorPos();
    131130
    132131public:
     132        void adjustActorPos();
    133133        AdjustBoxResult adjustXYToBeInBox(int dstX, int dstY, int pathfrom);
    134134
    135135        void setDirection(int direction);
  • scummvm/scumm/intern.h

    diff -ur ScummVM-cvs20030121/scummvm/scumm/intern.h ScummVM-cvs20030121+hack/scummvm/scumm/intern.h
    old new  
    416416        void o8_blastText();
    417417
    418418        void o8_cursorCommand();
     419        void o8_createBoxMatrix();
    419420        void o8_resourceRoutines();
    420421        void o8_roomOps();
    421422        void o8_actorOps();
  • scummvm/scumm/script_v8.cpp

    diff -ur ScummVM-cvs20030121/scummvm/scumm/script_v8.cpp ScummVM-cvs20030121+hack/scummvm/scumm/script_v8.cpp
    old new  
    249249                OPCODE(o6_pickupObject),
    250250                OPCODE(o6_setBoxFlags),
    251251                /* A8 */
    252                 OPCODE(o6_createBoxMatrix),
     252                OPCODE(o8_createBoxMatrix),
    253253                OPCODE(o6_invalid),
    254254                OPCODE(o8_resourceRoutines),
    255255                OPCODE(o8_roomOps),
     
    865865        _vars[VAR_USERPUT] = _userPut;
    866866}
    867867
     868void Scumm_v8::o8_createBoxMatrix()
     869{
     870        Actor *a;
     871
     872        createBoxMatrix();
     873
     874        // FIXME: Is this the right thing to do? In CMI, Guybrush gets trapped
     875        // in an invisible walkbox when room-9-2000 changes the walkbox flags,
     876        // and this is an attempt to set him right again.
     877        warning("o8_createBoxMatrix: Adjusting ego actor position");
     878        a = derefActorSafe(_vars[VAR_EGO], "o8_createBoxMatrix");
     879        if (a)
     880                a->adjustActorPos();
     881}
     882
    868883void Scumm_v8::o8_resourceRoutines()
    869884{
    870885        // TODO