diff options
author | athrxx | 2011-08-21 20:26:07 +0200 |
---|---|---|
committer | Johannes Schickel | 2011-12-26 16:18:14 +0100 |
commit | 2448d885e4e331a22e1e468277142155a5ddda87 (patch) | |
tree | 98584a9a40a940da8cfd2b21bbc68e9b24d2a925 /engines/kyra/script_eob.cpp | |
parent | c35de374dfe545ffc5044a00a247c5814e3b250e (diff) | |
download | scummvm-rg350-2448d885e4e331a22e1e468277142155a5ddda87.tar.gz scummvm-rg350-2448d885e4e331a22e1e468277142155a5ddda87.tar.bz2 scummvm-rg350-2448d885e4e331a22e1e468277142155a5ddda87.zip |
KYRA: (EOB) - complete EOBII playability
- fixed temp data generation, block data loading, some spell issues, etc.
- both EOB I and II should now be completable
- one big issue remaining (AdLib driver gets swamped with monster sounds which causes heavy lags in some levels)
Diffstat (limited to 'engines/kyra/script_eob.cpp')
-rw-r--r-- | engines/kyra/script_eob.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/engines/kyra/script_eob.cpp b/engines/kyra/script_eob.cpp index 1dbb02414f..6522731751 100644 --- a/engines/kyra/script_eob.cpp +++ b/engines/kyra/script_eob.cpp @@ -89,8 +89,8 @@ void EobCoreEngine::updateScriptTimers() { EobInfProcessor::EobInfProcessor(EobCoreEngine *engine, Screen_Eob *screen) : _vm(engine), _screen(screen), _commandMin(engine->game() == GI_EOB1 ? -27 : -31) { -#define Opcode(x) _opcodes.push_back(new InfProc(this, &EobInfProcessor::x)) -#define OpcodeAlt(x) if (_vm->game() == GI_EOB1) Opcode(x##_v1); else Opcode(x##_v2); +#define Opcode(x) _opcodes.push_back(new InfOpcode(new InfProc(this, &EobInfProcessor::x), #x)) +#define OpcodeAlt(x) if (_vm->game() == GI_EOB1) { Opcode(x##_v1); } else { Opcode(x##_v2); } Opcode(oeob_setWallType); Opcode(oeob_toggleWallState); Opcode(oeob_openDoor); @@ -157,8 +157,10 @@ EobInfProcessor::~EobInfProcessor() { delete[] _flagTable; delete[] _stack; delete[] _scriptData; - for (Common::Array<const InfProc*>::const_iterator a = _opcodes.begin(); a != _opcodes.end(); ++a) + for (Common::Array<const InfOpcode*>::const_iterator a = _opcodes.begin(); a != _opcodes.end(); ++a) { + delete (*a)->proc; delete *a; + } _opcodes.clear(); } @@ -196,7 +198,8 @@ void EobInfProcessor::run(int func, int sub) { int8 cmd = *pos++; if (cmd <= _commandMin || cmd >= 0) continue; - pos += (*_opcodes[-(cmd + 1)])(pos); + debugC(5, kDebugLevelScript, "[0x%.08X] EobInfProcessor::%s()", (uint32)(pos - _scriptData), _opcodes[-(cmd + 1)]->desc.c_str()); + pos += (*_opcodes[-(cmd + 1)]->proc)(pos); } while (!_abortScript && !_abortAfterSubroutine); } |