Ticket #8219: dig-camera-hack.diff

File dig-camera-hack.diff, 2.6 KB (added by eriktorbjorn, 22 years ago)

Patch against a May 5 CVS (trunk) snapshot

  • scummvm/scumm/gfx.cpp

    diff -ur ScummVM-cvs20030505/scummvm/scumm/gfx.cpp ScummVM-cvs20030505+hack/scummvm/scumm/gfx.cpp
    old new  
    19581958                clampCameraPos(&camera._cur);
    19591959
    19601960                camera._dest = camera._cur;
     1961                _vars[VAR_CAMERA_DEST_X] = camera._dest.x;
     1962                _vars[VAR_CAMERA_DEST_Y] = camera._dest.y;
    19611963
    19621964                assert(camera._cur.x >= (_realWidth / 2) && camera._cur.y >= (_realHeight / 2));
    19631965
     
    19961998                int ax, ay;
    19971999
    19982000                camera._follows = a->number;
     2001                _vars[VAR_CAMERA_FOLLOWED_ACTOR] = a->number;
    19992002
    20002003                if (!a->isInCurrentRoom()) {
    20012004                        startScene(a->getRoom(), 0, 0);
     
    20722075                }
    20732076
    20742077                if (camera._movingToActor) {
    2075                         camera._dest.x = a->x;
    2076                         camera._dest.y = a->y;
     2078                        _vars[VAR_CAMERA_DEST_X] = camera._dest.x = a->x;
     2079                        _vars[VAR_CAMERA_DEST_Y] = camera._dest.y = a->y;
    20772080                }
    20782081
    20792082                assert(camera._cur.x >= (_realWidth / 2) && camera._cur.y >= (_realHeight / 2));
     
    21312134                        _vars[VAR_CAMERA_POS_X] = camera._cur.x;
    21322135                        _vars[VAR_CAMERA_POS_Y] = camera._cur.y;
    21332136
    2134                         _vars[VAR_CAMERA_DEST_X] = camera._dest.x;
    2135 
    2136                         _vars[VAR_CAMERA_DEST_Y] = camera._dest.y;
    2137 
    2138                         _vars[VAR_CAMERA_FOLLOWED_ACTOR] = camera._follows;
    2139 
    21402137                        if (_vars[VAR_SCROLL_SCRIPT])
    21412138                                runScript(_vars[VAR_SCROLL_SCRIPT], 0, 0, 0);
    21422139                }
     
    22522249void Scumm::panCameraTo(int x, int y) {
    22532250        if (_features & GF_AFTER_V7) {
    22542251
    2255                 camera._follows = 0;
    2256                 camera._dest.x = x;
    2257                 camera._dest.y = y;
     2252                _vars[VAR_CAMERA_FOLLOWED_ACTOR] = camera._follows = 0;
     2253                _vars[VAR_CAMERA_DEST_X] = camera._dest.x = x;
     2254                _vars[VAR_CAMERA_DEST_Y] = camera._dest.y = y;
    22582255        } else {
    22592256
    22602257                camera._dest.x = x;
  • scummvm/scumm/script_v5.cpp

    diff -ur ScummVM-cvs20030505/scummvm/scumm/script_v5.cpp ScummVM-cvs20030505+hack/scummvm/scumm/script_v5.cpp
    old new  
    13481348        startScene(a->room, a, obj);
    13491349        _vars[VAR_WALKTO_OBJ] = 0;
    13501350
    1351         camera._dest.x = camera._cur.x = a->x;
     1351        // FIXME: Can this be removed?
     1352        camera._cur.x = a->x;
     1353
    13521354        setCameraAt(a->x, a->y);
    13531355        setCameraFollows(a);
    13541356
  • scummvm/scumm/script_v6.cpp

    diff -ur ScummVM-cvs20030505/scummvm/scumm/script_v6.cpp ScummVM-cvs20030505+hack/scummvm/scumm/script_v6.cpp
    old new  
    953953                int x, y;
    954954
    955955                camera._follows = 0;
     956                _vars[VAR_CAMERA_FOLLOWED_ACTOR] = 0;
    956957
    957958                y = pop();
    958959                x = pop();