aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorTravis Howell2004-02-19 08:21:59 +0000
committerTravis Howell2004-02-19 08:21:59 +0000
commit429c86f4f3e47d522a9e5a14a305f16fe08e4e24 (patch)
tree808f23ed7eb7dd4ff2d13b6f2da7b904216b3572 /scumm
parente5c3d7329b2ce8a54d2476bb93e8272285801499 (diff)
downloadscummvm-rg350-429c86f4f3e47d522a9e5a14a305f16fe08e4e24.tar.gz
scummvm-rg350-429c86f4f3e47d522a9e5a14a305f16fe08e4e24.tar.bz2
scummvm-rg350-429c86f4f3e47d522a9e5a14a305f16fe08e4e24.zip
Fatty Bear games use positive size values in these opcodes.
svn-id: r12933
Diffstat (limited to 'scumm')
-rw-r--r--scumm/script_v6he.cpp8
1 files changed, 8 insertions, 0 deletions
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) {