From 4c732d15c6162a34905cf215e71012ced3d412bc Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sat, 28 Aug 2004 04:14:33 +0000 Subject: [PATCH] Limit nukeArrays to only location thats requires it for now. svn-id: r14803 --- scumm/script.cpp | 10 ++++++---- scumm/script_v6he.cpp | 2 +- scumm/scumm.cpp | 2 +- scumm/scumm.h | 1 + 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/scumm/script.cpp b/scumm/script.cpp index a53053eb18a..bbec2d82807 100644 --- a/scumm/script.cpp +++ b/scumm/script.cpp @@ -349,12 +349,14 @@ void ScummEngine::updateScriptPtr() { /* Nuke arrays based on script */ void ScummEngine::nukeArrays(int script) { - //FIXME - return; - int i; - if (!(_features & GF_HUMONGOUS) || !script) + if (!script) + return; + + //FIXME Should be used all the time + // Limited to only location in puttmoon that requires it + if (!(_gameId == GID_PUTTMOON && _roomResource == 22)) return; for (i = 1; i < _numArray; i++) { diff --git a/scumm/script_v6he.cpp b/scumm/script_v6he.cpp index 55e9d4b447f..1bdf5ce8e21 100644 --- a/scumm/script_v6he.cpp +++ b/scumm/script_v6he.cpp @@ -1138,7 +1138,7 @@ void ScummEngine_v6he::o6_localizeArray() { int slot = pop(); if (slot < _numArray) { - _arraySlot[slot] = _currentScript; + _arraySlot[slot] = vm.slot[_currentScript].number; } else { warning("o6_localizeArray(%d): array slot out of range", slot); } diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp index 84c7cc12b4c..64c48e07a70 100644 --- a/scumm/scumm.cpp +++ b/scumm/scumm.cpp @@ -214,7 +214,7 @@ static const ScummGameSettings scumm_settings[] = { GF_NEW_OPCODES | GF_USE_KEY | GF_HUMONGOUS | GF_MULTIPLE_VERSIONS, 0, 0}, {"moondemo", "Putt-Putt Goes To The Moon (Demo)", GID_HEGAME, 6, 60, MDT_ADLIB | MDT_NATIVE, GF_NEW_OPCODES | GF_USE_KEY | GF_HUMONGOUS | GF_NEW_COSTUMES | GF_MULTIPLE_VERSIONS, 0, 0}, - {"puttmoon", "Putt-Putt Goes To The Moon", GID_HEGAME, 6, 60, MDT_ADLIB | MDT_NATIVE, + {"puttmoon", "Putt-Putt Goes To The Moon", GID_PUTTMOON, 6, 60, MDT_ADLIB | MDT_NATIVE, GF_NEW_OPCODES | GF_USE_KEY | GF_HUMONGOUS | GF_NEW_COSTUMES | GF_MULTIPLE_VERSIONS, 0, 0}, {"funpack", "Putt-Putt's Fun Pack", GID_FUNPACK, 6, 60, MDT_ADLIB | MDT_NATIVE, GF_NEW_OPCODES | GF_USE_KEY | GF_HUMONGOUS | GF_NEW_COSTUMES, 0, 0}, diff --git a/scumm/scumm.h b/scumm/scumm.h index b68608896e9..ec25ace1d4a 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -255,6 +255,7 @@ enum ScummGameId { GID_MONKEY_SEGA, GID_HEGAME, // Generic name for all HE games with default behaviour GID_PUTTDEMO, + GID_PUTTMOON, GID_FBEAR, GID_FUNPACK, GID_PAJAMA,