aboutsummaryrefslogtreecommitdiff
path: root/engines/agos
diff options
context:
space:
mode:
authorTravis Howell2007-06-10 11:08:12 +0000
committerTravis Howell2007-06-10 11:08:12 +0000
commit79c30552ca53f40252273f3344f3c6c07bd14b40 (patch)
tree6eb5f8e2dfb44fe3bdccee69c554fa7b5712b81c /engines/agos
parentddd1869b13d76c88e8774ac0d4eb6f6aa0d3b2f5 (diff)
downloadscummvm-rg350-79c30552ca53f40252273f3344f3c6c07bd14b40.tar.gz
scummvm-rg350-79c30552ca53f40252273f3344f3c6c07bd14b40.tar.bz2
scummvm-rg350-79c30552ca53f40252273f3344f3c6c07bd14b40.zip
Don't call getNextItemPtr(), when the result is simply ignored.
svn-id: r27305
Diffstat (limited to 'engines/agos')
-rw-r--r--engines/agos/items.cpp6
-rw-r--r--engines/agos/script_pp.cpp6
2 files changed, 5 insertions, 7 deletions
diff --git a/engines/agos/items.cpp b/engines/agos/items.cpp
index 165af6f797..a911bee5a5 100644
--- a/engines/agos/items.cpp
+++ b/engines/agos/items.cpp
@@ -391,10 +391,8 @@ int AGOSEngine::wordMatch(Item *item, int16 a, int16 n) {
}
Item *AGOSEngine::derefItem(uint item) {
- if (item >= _itemArraySize) {
- debug(1, "derefItem: invalid item %d", item);
- return 0;
- }
+ if (item >= _itemArraySize)
+ error("derefItem: invalid item %d", item);
return _itemArrayPtr[item];
}
diff --git a/engines/agos/script_pp.cpp b/engines/agos/script_pp.cpp
index d55935d135..a7bda53e48 100644
--- a/engines/agos/script_pp.cpp
+++ b/engines/agos/script_pp.cpp
@@ -297,7 +297,7 @@ void AGOSEngine_PuzzlePack::executeOpcode(int opcode) {
void AGOSEngine_PuzzlePack::opp_iconifyWindow() {
// 30
- getNextItemPtr();
+ getNextWord();
if (_clockStopped != 0)
_gameTime += time(NULL) - _clockStopped;
_clockStopped = 0;
@@ -308,7 +308,7 @@ void AGOSEngine_PuzzlePack::opp_restoreOopsPosition() {
// 32: restore oops position
uint i;
- getNextItemPtr();
+ getNextWord();
if (_oopsValid) {
for (i = 0; i < _numVars; i++) {
@@ -328,7 +328,7 @@ void AGOSEngine_PuzzlePack::opp_restoreOopsPosition() {
void AGOSEngine_PuzzlePack::opp_loadMouseImage() {
// 38: load mouse image
- getNextItemPtr();
+ getNextWord();
getVarOrByte();
loadMouseImage();
}