diff options
author | Sven Hesse | 2007-04-05 13:37:20 +0000 |
---|---|---|
committer | Sven Hesse | 2007-04-05 13:37:20 +0000 |
commit | ec5a9eee3132c5e7ccc5338f426f0839bb9e0913 (patch) | |
tree | 0d12e8599143530241731872be276c45e8a8c7fd /engines/gob/inter_v1.cpp | |
parent | c5e7eaf7dbcc18f4d26532f64e6cbf3e8614fc18 (diff) | |
download | scummvm-rg350-ec5a9eee3132c5e7ccc5338f426f0839bb9e0913.tar.gz scummvm-rg350-ec5a9eee3132c5e7ccc5338f426f0839bb9e0913.tar.bz2 scummvm-rg350-ec5a9eee3132c5e7ccc5338f426f0839bb9e0913.zip |
- Minor cleanup
- Added Inter_v3 (for new opcode o3_getTotTextItemPart)
- Some fixes to let Gob3 start with the first screen
svn-id: r26383
Diffstat (limited to 'engines/gob/inter_v1.cpp')
-rw-r--r-- | engines/gob/inter_v1.cpp | 38 |
1 files changed, 33 insertions, 5 deletions
diff --git a/engines/gob/inter_v1.cpp b/engines/gob/inter_v1.cpp index 0eea277599..83d693c508 100644 --- a/engines/gob/inter_v1.cpp +++ b/engines/gob/inter_v1.cpp @@ -1120,28 +1120,56 @@ void Inter_v1::o1_freeFontToSprite() { bool Inter_v1::o1_callSub(OpFuncParams ¶ms) { byte *storedIP; - uint32 offset; + uint16 offset; + offset = load16(); storedIP = _vm->_global->_inter_execPtr; - offset = READ_LE_UINT16(_vm->_global->_inter_execPtr); debugC(5, kDebugGameFlow, "tot = \"%s\", offset = %d", _vm->_game->_curTotFile, offset); + if (offset < 128) { + warning("Inter_v1::o1_callSub(): Offset %d points into the header. " + "Skipping call", offset); + return false; + } + // Skipping the copy protection screen in Gobliiins if (!_vm->_copyProtection && (_vm->_features & GF_GOB1) && (offset == 3905) && !scumm_stricmp(_vm->_game->_curTotFile, _vm->_startTot)) { debugC(2, kDebugGameFlow, "Skipping copy protection screen"); - _vm->_global->_inter_execPtr += 2; return false; } // Skipping the copy protection screen in Gobliins 2 if (!_vm->_copyProtection && (_vm->_features & GF_GOB2) && (offset == 1746) && !scumm_stricmp(_vm->_game->_curTotFile, _vm->_startTot0)) { debugC(2, kDebugGameFlow, "Skipping copy protection screen"); - _vm->_global->_inter_execPtr += 2; return false; } + // TODO: DELETE ME! ---. +if (!_vm->_copyProtection && (_vm->_features & GF_GOB2) && (_vm->_platform == Common::kPlatformAmiga) && (offset == 1722) && !scumm_stricmp(_vm->_game->_curTotFile, "intro0.tot")) + return false; +if (!_vm->_copyProtection && (_vm->_features & GF_GOB2) && (offset == 361) && !scumm_stricmp(_vm->_game->_curTotFile, _vm->_startTot)) + return false; +if (!_vm->_copyProtection && (_vm->_features & GF_GOB2) && (offset == 348) && !scumm_stricmp(_vm->_game->_curTotFile, _vm->_startTot)) + return false; +if (!_vm->_copyProtection && (_vm->_features & GF_GOB2) && (offset == 1263) && !scumm_stricmp(_vm->_game->_curTotFile, "intro5.tot")) + return false; +if (!_vm->_copyProtection && (_vm->_features & GF_GOB2) && (offset == 1202) && !scumm_stricmp(_vm->_game->_curTotFile, "intro5.tot")) + return false; +if (!_vm->_copyProtection && (_vm->_features & GF_GOB2) && (offset == 2613) && !scumm_stricmp(_vm->_game->_curTotFile, "intro016.tot")) + return false; +if (!_vm->_copyProtection && (_vm->_features & GF_GOB2) && (offset == 2688) && !scumm_stricmp(_vm->_game->_curTotFile, "intro016.tot")) + return false; +if (!_vm->_copyProtection && (_vm->_features & GF_BARGON) && (offset == 5462) && !scumm_stricmp(_vm->_game->_curTotFile, "ecran0.tot")) + return false; +if (!_vm->_copyProtection && (_vm->_features & GF_BARGON) && (offset == 5451) && !scumm_stricmp(_vm->_game->_curTotFile, "ecran0.tot")) + return false; +if (!_vm->_copyProtection && (_vm->_features & GF_GOB3) && (offset == 1406) && !scumm_stricmp(_vm->_game->_curTotFile, "demo.tot")) + return false; +if (!_vm->_copyProtection && (_vm->_features & GF_GOB3) && (offset == 888) && !scumm_stricmp(_vm->_game->_curTotFile, "demo.tot")) + return false; + // TODO: DELETE ME! ---' _vm->_global->_inter_execPtr = _vm->_game->_totFileData + offset; @@ -1149,7 +1177,7 @@ bool Inter_v1::o1_callSub(OpFuncParams ¶ms) { return true; callSub(2); - _vm->_global->_inter_execPtr = storedIP + 2; + _vm->_global->_inter_execPtr = storedIP; return false; } |