diff options
author | James Brown | 2002-04-11 20:10:47 +0000 |
---|---|---|
committer | James Brown | 2002-04-11 20:10:47 +0000 |
commit | 6e508eed2962fc29f16a4507d056a3c3483c3e6a (patch) | |
tree | 3cda95b932adcfbe3c7130a8b94dbb09c7d3fc43 | |
parent | 7696081c54a6cac8152a227bd9d0bcc41999f261 (diff) | |
download | scummvm-rg350-6e508eed2962fc29f16a4507d056a3c3483c3e6a.tar.gz scummvm-rg350-6e508eed2962fc29f16a4507d056a3c3483c3e6a.tar.bz2 scummvm-rg350-6e508eed2962fc29f16a4507d056a3c3483c3e6a.zip |
Fix anti-aliasing crash and a Zak crash. Note there are still AA
artifacts left on screen. Anyone want to fix this? :)
svn-id: r3909
-rw-r--r-- | actor.cpp | 3 | ||||
-rw-r--r-- | script_v1.cpp | 5 | ||||
-rw-r--r-- | sdl.cpp | 2 |
3 files changed, 6 insertions, 4 deletions
@@ -480,6 +480,9 @@ void Scumm::putActor(Actor * a, int x, int y, byte room) int Scumm::getActorXYPos(Actor * a) { + if (!a) + return -1; + if (a->room != _currentRoom) return -1; _xPos = a->x; diff --git a/script_v1.cpp b/script_v1.cpp index 286f55e947..1d92459a0c 100644 --- a/script_v1.cpp +++ b/script_v1.cpp @@ -2702,11 +2702,10 @@ void Scumm::o5_pickupObjectOld() return; if (whereIsObject(obj) == WIO_INVENTORY) /* Don't take an */ - return; /* object twice */ + return; /* object twice */ // warning("adding %d from %d to inventoryOld", obj, _currentRoom); - addObjectToInventory(obj, _currentRoom); - // warning("added to inventoryOld"); + addObjectToInventory(obj, _currentRoom); removeObjectFromRoom(obj); putOwner(obj, _vars[VAR_EGO]); putClass(obj, 32, 1); @@ -485,7 +485,7 @@ void updateScreen2xSaI(Scumm *s) SDL_Rect *dr; int i; - for (i = 0; i <= numDirtyRects; i++) { + for (i = 0; i < numDirtyRects; i++) { dr = &dirtyRects[i]; Draw2xSaI(dr, s->_videoMode); } |