aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Brown2002-04-11 20:10:47 +0000
committerJames Brown2002-04-11 20:10:47 +0000
commit6e508eed2962fc29f16a4507d056a3c3483c3e6a (patch)
tree3cda95b932adcfbe3c7130a8b94dbb09c7d3fc43
parent7696081c54a6cac8152a227bd9d0bcc41999f261 (diff)
downloadscummvm-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.cpp3
-rw-r--r--script_v1.cpp5
-rw-r--r--sdl.cpp2
3 files changed, 6 insertions, 4 deletions
diff --git a/actor.cpp b/actor.cpp
index 93e9123719..b021475d50 100644
--- a/actor.cpp
+++ b/actor.cpp
@@ -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);
diff --git a/sdl.cpp b/sdl.cpp
index 429a1710c2..fe4ee9fe94 100644
--- a/sdl.cpp
+++ b/sdl.cpp
@@ -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);
}