diff options
author | Max Horn | 2003-05-04 17:39:25 +0000 |
---|---|---|
committer | Max Horn | 2003-05-04 17:39:25 +0000 |
commit | 5b08534324ce1a708d22bf1e6e415990614a2108 (patch) | |
tree | 1e6178fea59e0f6b892543fbe6ac9ead9c2656a4 /scumm/script_v2.cpp | |
parent | 83db6265202e077f8a7007ab604e7d5829b8cc11 (diff) | |
download | scummvm-rg350-5b08534324ce1a708d22bf1e6e415990614a2108.tar.gz scummvm-rg350-5b08534324ce1a708d22bf1e6e415990614a2108.tar.bz2 scummvm-rg350-5b08534324ce1a708d22bf1e6e415990614a2108.zip |
cleanup / fixes
svn-id: r7323
Diffstat (limited to 'scumm/script_v2.cpp')
-rw-r--r-- | scumm/script_v2.cpp | 41 |
1 files changed, 19 insertions, 22 deletions
diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp index 6d3e61313e..280a83ab91 100644 --- a/scumm/script_v2.cpp +++ b/scumm/script_v2.cpp @@ -225,7 +225,7 @@ void Scumm_v2::setupOpcodes() { /* 98 */ OPCODE(o2_restart), OPCODE(o2_doSentence), - OPCODE(o2_assignVarWord), + OPCODE(o5_move), OPCODE(o2_setBitVar), /* 9C */ OPCODE(o5_startSound), @@ -250,7 +250,7 @@ void Scumm_v2::setupOpcodes() { /* AC */ OPCODE(o2_drawSentence), OPCODE(o5_putActorInRoom), - OPCODE(o2_waitForSentence), + OPCODE(o2_waitForMessage), OPCODE(o2_ifNotState04), /* B0 */ OPCODE(o2_matrixOps), @@ -458,14 +458,9 @@ void Scumm_v2::o2_clearState01() { clearStateCommon(0x01); } -void Scumm_v2::o2_assignVarByteIndirect() { - getResultPosIndirect(); - setResult(fetchScriptByte()); -} - void Scumm_v2::o2_assignVarWordIndirect() { getResultPosIndirect(); - setResult(fetchScriptWord()); + setResult(getVarOrDirectWord(0x80)); } void Scumm_v2::o2_assignVarByte() { @@ -473,11 +468,6 @@ void Scumm_v2::o2_assignVarByte() { setResult(fetchScriptByte()); } -void Scumm_v2::o2_assignVarWord() { - getResultPos(); - setResult(fetchScriptWord()); -} - void Scumm_v2::o2_setObjY() { int obj = getVarOrDirectWord(0x80); int y = fetchScriptByte(); @@ -599,6 +589,22 @@ void Scumm_v2::o2_waitForActor() { } } +void Scumm_v2::o2_waitForMessage() { + + if (_vars[VAR_HAVE_MSG]) { + _scriptPointer--; + o5_breakHere(); + } +} + +void Scumm_v2::o2_waitForSentence() { + if (_sentenceNum && !isScriptInUse(2)) + return; + + _scriptPointer--; + o5_breakHere(); +} + void Scumm_v2::o2_actorSet() { int act = getVarOrDirectByte(0x80); int arg = getVarOrDirectByte(0x40); @@ -637,15 +643,6 @@ void Scumm_v2::o2_actorSet() { } } -void Scumm_v2::o2_waitForSentence() { - if (_sentenceNum) - if (!isScriptInUse(2)) - return; - - _scriptPointer--; - o5_breakHere(); -} - void Scumm_v2::o2_restart() { warning("o2_restart NYI"); } |