diff options
author | Travis Howell | 2005-01-30 05:34:04 +0000 |
---|---|---|
committer | Travis Howell | 2005-01-30 05:34:04 +0000 |
commit | f23cf81ace8456ddf8a3d5aff223ffdaabe2680c (patch) | |
tree | bc798fd8d385d621211759f5f8e5c33bac3d20b4 | |
parent | 85f8b9bb93902d0e8b0b88335aff7c9b6961696f (diff) | |
download | scummvm-rg350-f23cf81ace8456ddf8a3d5aff223ffdaabe2680c.tar.gz scummvm-rg350-f23cf81ace8456ddf8a3d5aff223ffdaabe2680c.tar.bz2 scummvm-rg350-f23cf81ace8456ddf8a3d5aff223ffdaabe2680c.zip |
HE100 difference
svn-id: r16703
-rw-r--r-- | scumm/intern.h | 2 | ||||
-rw-r--r-- | scumm/script_v100he.cpp | 63 | ||||
-rw-r--r-- | scumm/sound.cpp | 2 |
3 files changed, 64 insertions, 3 deletions
diff --git a/scumm/intern.h b/scumm/intern.h index de77eb84cd..10c9671820 100644 --- a/scumm/intern.h +++ b/scumm/intern.h @@ -940,9 +940,11 @@ protected: void o100_quitPauseRestart(); void o100_cursorCommand(); void o100_wait(); + void o100_writeFile(); void o100_getResourceSize(); void o100_unknown27(); void o100_getPaletteData(); + void o100_readFile(); void o100_unknown25(); void o100_unknown29(); }; diff --git a/scumm/script_v100he.cpp b/scumm/script_v100he.cpp index 8dc314472a..8fa632a042 100644 --- a/scumm/script_v100he.cpp +++ b/scumm/script_v100he.cpp @@ -221,7 +221,7 @@ void ScummEngine_v100he::setupOpcodes() { OPCODE(o6_walkActorToObj), OPCODE(o6_walkActorTo), /* 90 */ - OPCODE(o72_writeFile), + OPCODE(o100_writeFile), OPCODE(o72_writeINI), OPCODE(o80_writeConfigFile), OPCODE(o6_abs), @@ -304,7 +304,7 @@ void ScummEngine_v100he::setupOpcodes() { OPCODE(o6_getRandomNumber), OPCODE(o6_getRandomNumberRange), OPCODE(o6_invalid), - OPCODE(o72_readFile), + OPCODE(o100_readFile), /* D4 */ OPCODE(o72_readINI), OPCODE(o80_readConfigFile), @@ -1525,6 +1525,31 @@ void ScummEngine_v100he::o100_wait() { o6_breakHere(); } +void ScummEngine_v100he::o100_writeFile() { + int16 resID = pop(); + int slot = pop(); + byte subOp = fetchScriptByte(); + + switch (subOp) { + case 5: + fetchScriptByte(); + writeFileFromArray(slot, resID); + break; + case 42: + _hFileTable[slot].writeUint16LE(resID); + break; + case 43: + _hFileTable[slot].writeUint32LE(resID); + break; + case 45: + _hFileTable[slot].writeByte(resID); + break; + default: + error("o100_writeFile: default case %d", subOp); + } + debug(1, "o100_writeFile: slot %d, subOp %d", slot, subOp); +} + void ScummEngine_v100he::o100_getResourceSize() { int size = 0, type; @@ -1714,6 +1739,40 @@ void ScummEngine_v100he::o100_getPaletteData() { debug(1,"o100_getPaletteData stub (%d)", subOp); } +void ScummEngine_v100he::o100_readFile() { + int slot, val; + int32 size; + byte subOp = fetchScriptByte(); + + switch (subOp) { + case 5: + fetchScriptByte(); + size = pop(); + slot = pop(); + val = readFileToArray(slot, size); + push(val); + break; + case 42: + slot = pop(); + val = _hFileTable[slot].readUint16LE(); + push(val); + break; + case 43: + slot = pop(); + val = _hFileTable[slot].readUint32LE(); + push(val); + break; + case 45: + slot = pop(); + val = _hFileTable[slot].readByte(); + push(val); + break; + default: + error("o100_readFile: default case %d", subOp); + } + debug(1, "o100_readFile: slot %d, subOp %d val %d", slot, subOp, val); +} + void ScummEngine_v100he::o100_unknown25() { int args[16]; diff --git a/scumm/sound.cpp b/scumm/sound.cpp index 427f411f9b..cadeb61098 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -277,7 +277,7 @@ void Sound::playSound(int soundID, int heOffset, int heChannel, int heFlags) { if (READ_UINT32(ptr) == MKID('SBNG')) { ptr += READ_BE_UINT32(ptr + 4); - warning("playSound: Skipped SBNG block"); + debug(2, "playSound: Skipped SBNG block"); } if (READ_UINT32(ptr) != MKID('SDAT')) { |