diff options
author | Travis Howell | 2004-01-02 13:21:13 +0000 |
---|---|---|
committer | Travis Howell | 2004-01-02 13:21:13 +0000 |
commit | bfd8549739a2c68b2589b1880341d547aabaf747 (patch) | |
tree | 06c6565f49bc3029ed2a42dff7d3a0afd95726c4 /scumm | |
parent | 750e18eab3beb692350cbe8e545646fc866f1090 (diff) | |
download | scummvm-rg350-bfd8549739a2c68b2589b1880341d547aabaf747.tar.gz scummvm-rg350-bfd8549739a2c68b2589b1880341d547aabaf747.tar.bz2 scummvm-rg350-bfd8549739a2c68b2589b1880341d547aabaf747.zip |
Add another HE games opcode and case.
svn-id: r12084
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/intern.h | 1 | ||||
-rw-r--r-- | scumm/script_v6.cpp | 42 |
2 files changed, 39 insertions, 4 deletions
diff --git a/scumm/intern.h b/scumm/intern.h index 3a6ea3b846..c17dee0f39 100644 --- a/scumm/intern.h +++ b/scumm/intern.h @@ -512,6 +512,7 @@ protected: void o6_closeFile(); void o6_deleteFile(); void o6_readFile(); + void o6_rename(); void o6_writeFile(); void o6_findAllObjects(); void o6_pickVarRandom(); diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp index ff02be71ab..f268f9c110 100644 --- a/scumm/script_v6.cpp +++ b/scumm/script_v6.cpp @@ -330,7 +330,7 @@ void ScummEngine_v6::setupOpcodes() { OPCODE(o6_writeFile), OPCODE(o6_findAllObjects), OPCODE(o6_deleteFile), - OPCODE(o6_invalid), + OPCODE(o6_rename), /* E0 */ OPCODE(o6_unknownE0), OPCODE(o6_unknownE1), @@ -1624,7 +1624,12 @@ void ScummEngine_v6::o6_roomOps() { else setPalette(a); break; - case 221: + case 220: // SO_DRAW_OBJECT_AT + a = pop(); + b = pop(); + warning("o6_roomops:180 (%d, %d): unimplemented", a, b); + break; + case 221: // SO_DRAW_OBJECT_IMAGE int len; len = resStrLen(_scriptPointer); _scriptPointer += len + 1; @@ -2935,8 +2940,6 @@ void ScummEngine_v6::o6_stampObject() { _objs[objnum].y_pos = y * 8; putState(object, state); drawObject(objnum, 0); - warning("o6_stampObject: (%d at (%d,%d) state %d)", object, x, y, state); - return; } @@ -3038,6 +3041,37 @@ void ScummEngine_v6::o6_deleteFile() { warning("stub o6_deleteFile(\"%s\")", filename + r); } +void ScummEngine_v6::o6_rename() { + int len, r1, r2; + byte filename[100],filename2[100]; + + _msgPtrToAdd = filename; + _messagePtr = _scriptPointer; + addMessageToStack(_messagePtr); + + len = resStrLen(_scriptPointer); + _scriptPointer += len + 1; + + for (r1 = strlen((char*)filename); r1 != 0; r1--) { + if (filename[r1 - 1] == '\\') + break; + } + + _msgPtrToAdd = filename2; + _messagePtr = _scriptPointer; + addMessageToStack(_messagePtr); + + len = resStrLen(_scriptPointer); + _scriptPointer += len + 1; + + for (r2 = strlen((char*)filename2); r2 != 0; r2--) { + if (filename2[r2 - 1] == '\\') + break; + } + + warning("stub o6_rename(\"%s\" to \"%s\")", filename + r1, filename2 + r2); +} + int ScummEngine_v6::readFileToArray(int slot, int32 size) { if (size == 0) size = _hFileTable[slot].size() - _hFileTable[slot].pos(); |