diff options
author | Max Horn | 2002-12-23 18:30:12 +0000 |
---|---|---|
committer | Max Horn | 2002-12-23 18:30:12 +0000 |
commit | 654ed3ff6cca3d40705110acc2f5ef1c5e4695c7 (patch) | |
tree | 15d718a1001357f572cecc94885af3656261254c /scumm/string.cpp | |
parent | b8240b253c8ede87d4148b26fafe5474c638c871 (diff) | |
download | scummvm-rg350-654ed3ff6cca3d40705110acc2f5ef1c5e4695c7.tar.gz scummvm-rg350-654ed3ff6cca3d40705110acc2f5ef1c5e4695c7.tar.bz2 scummvm-rg350-654ed3ff6cca3d40705110acc2f5ef1c5e4695c7.zip |
more V8 work
svn-id: r6074
Diffstat (limited to 'scumm/string.cpp')
-rw-r--r-- | scumm/string.cpp | 40 |
1 files changed, 32 insertions, 8 deletions
diff --git a/scumm/string.cpp b/scumm/string.cpp index 8fcf6ea879..baa48f53f4 100644 --- a/scumm/string.cpp +++ b/scumm/string.cpp @@ -945,6 +945,10 @@ byte *Scumm::addMessageToStack(byte *msg) if (chr != 1 && chr != 2 && chr != 3 && chr != 8) { ptr[num++] = *msg++; // and some commands are followed by parameters to the functions below ptr[num++] = *msg++; // these are numbers of names, strings, verbs, variables, etc + if (_features & GF_AFTER_V8) { + ptr[num++] = *msg++; + ptr[num++] = *msg++; + } } } } @@ -961,20 +965,40 @@ byte *Scumm::addMessageToStack(byte *msg) chr = ptr[num++]; switch (chr) { case 4: - addIntToStack(READ_LE_UINT16(ptr + num)); - num += 2; + if (_features & GF_AFTER_V8) { + addIntToStack(READ_LE_UINT32(ptr + num)); + num += 4; + } else { + addIntToStack(READ_LE_UINT16(ptr + num)); + num += 2; + } break; case 5: - addVerbToStack(READ_LE_UINT16(ptr + num)); - num += 2; + if (_features & GF_AFTER_V8) { + addVerbToStack(READ_LE_UINT32(ptr + num)); + num += 4; + } else { + addVerbToStack(READ_LE_UINT16(ptr + num)); + num += 2; + } break; case 6: - addNameToStack(READ_LE_UINT16(ptr + num)); - num += 2; + if (_features & GF_AFTER_V8) { + addNameToStack(READ_LE_UINT32(ptr + num)); + num += 4; + } else { + addNameToStack(READ_LE_UINT16(ptr + num)); + num += 2; + } break; case 7: - addStringToStack(READ_LE_UINT16(ptr + num)); - num += 2; + if (_features & GF_AFTER_V8) { + addStringToStack(READ_LE_UINT32(ptr + num)); + num += 4; + } else { + addStringToStack(READ_LE_UINT16(ptr + num)); + num += 2; + } break; case 3: case 9: |