aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMax Horn2006-10-19 00:06:59 +0000
committerMax Horn2006-10-19 00:06:59 +0000
commit5148dbb3fb30303a562cd36e87d3ac805c69673e (patch)
treee16e1edc95b1a23697a1d20e3ce489646ed26309 /engines
parent38d6a4d8d437a7049fe3b5a3cf838d594a49e3e5 (diff)
downloadscummvm-rg350-5148dbb3fb30303a562cd36e87d3ac805c69673e.tar.gz
scummvm-rg350-5148dbb3fb30303a562cd36e87d3ac805c69673e.tar.bz2
scummvm-rg350-5148dbb3fb30303a562cd36e87d3ac805c69673e.zip
cleanup
svn-id: r24383
Diffstat (limited to 'engines')
-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;