From 429c86f4f3e47d522a9e5a14a305f16fe08e4e24 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Thu, 19 Feb 2004 08:21:59 +0000 Subject: Fatty Bear games use positive size values in these opcodes. svn-id: r12933 --- scumm/script_v6he.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'scumm/script_v6he.cpp') diff --git a/scumm/script_v6he.cpp b/scumm/script_v6he.cpp index f8ed2965df..79290d53f0 100644 --- a/scumm/script_v6he.cpp +++ b/scumm/script_v6he.cpp @@ -1031,6 +1031,10 @@ void ScummEngine_v6he::o6_readFile() { int32 size = pop(); int slot = pop(); + // Fatty Bear uses positive values + if (_gameId == GID_FBEAR) + size = -size; + if (size == -2) { push(_hFileTable[slot].readUint16LE()); } else if (size == -1) { @@ -1053,6 +1057,10 @@ void ScummEngine_v6he::o6_writeFile() { int16 resID = pop(); int slot = pop(); + // Fatty Bear uses positive values + if (_gameId == GID_FBEAR) + size = -size; + if (size == -2) { _hFileTable[slot].writeUint16LE(resID); } else if (size == -1) { -- cgit v1.2.3