aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2006-11-05 07:42:23 +0000
committerTravis Howell2006-11-05 07:42:23 +0000
commit493af8f40b7b4c16ab4d74ea6a5d0b7d97dac767 (patch)
treefa459f4623957102d6b13a7daca9c8fde65efd9e
parent64817e38872684bd4133e4459a40c54dacedd612 (diff)
downloadscummvm-rg350-493af8f40b7b4c16ab4d74ea6a5d0b7d97dac767.tar.gz
scummvm-rg350-493af8f40b7b4c16ab4d74ea6a5d0b7d97dac767.tar.bz2
scummvm-rg350-493af8f40b7b4c16ab4d74ea6a5d0b7d97dac767.zip
Only read a single item, in doTable opcode
svn-id: r24624
-rw-r--r--engines/agos/script_e2.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/agos/script_e2.cpp b/engines/agos/script_e2.cpp
index 64df361a56..60158590fe 100644
--- a/engines/agos/script_e2.cpp
+++ b/engines/agos/script_e2.cpp
@@ -148,7 +148,9 @@ void AGOSEngine::oe2_drawItem() {
void AGOSEngine::oe2_doTable() {
// 143: start item sub
- SubRoom *r = (SubRoom *)findChildOfType(getNextItemPtr(), 1);
+ Item *i = getNextItemPtr();
+
+ SubRoom *r = (SubRoom *)findChildOfType(i, 1);
if (r != NULL) {
Subroutine *sub = getSubroutineByID(r->subroutine_id);
if (sub) {
@@ -158,7 +160,7 @@ void AGOSEngine::oe2_doTable() {
}
if (getGameType() == GType_ELVIRA2) {
- SubSuperRoom *sr = (SubSuperRoom *)findChildOfType(getNextItemPtr(), 4);
+ SubSuperRoom *sr = (SubSuperRoom *)findChildOfType(i, 4);
if (sr != NULL) {
Subroutine *sub = getSubroutineByID(sr->subroutine_id);
if (sub) {