aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/scumm/object.cpp5
-rw-r--r--engines/scumm/script_v2.cpp2
-rw-r--r--engines/scumm/verbs.cpp3
3 files changed, 4 insertions, 6 deletions
diff --git a/engines/scumm/object.cpp b/engines/scumm/object.cpp
index e474719e3e..c5228add31 100644
--- a/engines/scumm/object.cpp
+++ b/engines/scumm/object.cpp
@@ -161,9 +161,8 @@ void ScummEngine::clearOwnerOf(int obj) {
if (getOwner(obj) == OF_OWNER_ROOM) {
for (i = 0; i < _numLocalObjects; i++) {
- if (_objs[i].obj_nr == obj) {
- if (!_objs[i].fl_object_index)
- return;
+ if (_objs[i].obj_nr == obj && _objs[i].fl_object_index) {
+ // Removing an flObject from a room means we can nuke it
_res->nukeResource(rtFlObject, _objs[i].fl_object_index);
_objs[i].obj_nr = 0;
_objs[i].fl_object_index = 0;
diff --git a/engines/scumm/script_v2.cpp b/engines/scumm/script_v2.cpp
index 675626645b..8224ad5f36 100644
--- a/engines/scumm/script_v2.cpp
+++ b/engines/scumm/script_v2.cpp
@@ -1345,7 +1345,7 @@ void ScummEngine_v2::o2_lights() {
if (c == 0) {
if (_game.id == GID_MANIAC && _game.version == 1 && !(_game.platform == Common::kPlatformNES)) {
// Convert older light mode values into
- // equivalent values.of later games
+ // equivalent values of later games.
// 0 Darkness
// 1 Flashlight
// 2 Lighted area
diff --git a/engines/scumm/verbs.cpp b/engines/scumm/verbs.cpp
index 3bd1d664cd..8272795e6b 100644
--- a/engines/scumm/verbs.cpp
+++ b/engines/scumm/verbs.cpp
@@ -814,7 +814,6 @@ void ScummEngine::drawVerbBitmap(int verb, int x, int y) {
int imgw, imgh;
int i, tmp;
byte *obim;
- const ImageHeader *imhd;
uint32 size;
if ((vs = findVirtScreen(y)) == NULL)
@@ -841,7 +840,7 @@ void ScummEngine::drawVerbBitmap(int verb, int x, int y) {
imgh = (*(obim + size + 17)) / 8;
imptr = getObjectImage(obim, 1);
} else {
- imhd = (const ImageHeader *)findResourceData(MKID_BE('IMHD'), obim);
+ const ImageHeader *imhd = (const ImageHeader *)findResourceData(MKID_BE('IMHD'), obim);
if (_game.version >= 7) {
imgw = READ_LE_UINT16(&imhd->v7.width) / 8;
imgh = READ_LE_UINT16(&imhd->v7.height) / 8;