diff options
author | Max Horn | 2003-05-10 21:35:06 +0000 |
---|---|---|
committer | Max Horn | 2003-05-10 21:35:06 +0000 |
commit | e5fe73726a554d312f30682508d2474c8734b0ef (patch) | |
tree | ced5da3ef23fb4919b81af387e59593b8c3c5d47 /scumm | |
parent | 08a9a07c400ca734c3a2b001576947a7ba392d86 (diff) | |
download | scummvm-rg350-e5fe73726a554d312f30682508d2474c8734b0ef.tar.gz scummvm-rg350-e5fe73726a554d312f30682508d2474c8734b0ef.tar.bz2 scummvm-rg350-e5fe73726a554d312f30682508d2474c8734b0ef.zip |
cleaned up / fixed some V2 state stuff
svn-id: r7422
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/script_v2.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp index 33dc0a3ba4..a51e786bb1 100644 --- a/scumm/script_v2.cpp +++ b/scumm/script_v2.cpp @@ -433,7 +433,7 @@ void Scumm_v2::o2_setState08() { void Scumm_v2::o2_clearState08() { int obj = getVarOrDirectWord(0x80); - putState(obj, getState(obj) & 0xF7); + putState(obj, getState(obj) & ~0x08); removeObjectFromRoom(obj); clearDrawObjectQueue(); } @@ -678,10 +678,10 @@ void Scumm_v2::o2_drawObject() { h = od->height; i = _numLocalObjects; - do { + while (i--) { if (_objs[i].obj_nr && _objs[i].x_pos == x && _objs[i].y_pos == y && _objs[i].width == w && _objs[i].height == h) - putState(_objs[i].obj_nr, getState(_objs[i].obj_nr) & 0xF7); - } while (--i); + putState(_objs[i].obj_nr, getState(_objs[i].obj_nr) & ~0x08); + } putState(obj, getState(_objs[obj].obj_nr) | 0x08); } @@ -1083,8 +1083,7 @@ void Scumm_v2::o2_pickupObject() { addObjectToInventory(obj, _roomResource); removeObjectFromRoom(obj); putOwner(obj, VAR(VAR_EGO)); - putClass(obj, 32, 1); - putState(obj, 1); + putState(obj, getState(obj) | 0xA); clearDrawObjectQueue(); runHook(1); } |