diff options
Diffstat (limited to 'simon/vga.cpp')
-rw-r--r-- | simon/vga.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/simon/vga.cpp b/simon/vga.cpp index 71ded468ef..bca0b8069f 100644 --- a/simon/vga.cpp +++ b/simon/vga.cpp @@ -114,7 +114,7 @@ void SimonEngine::setupVgaOpcodes() { &SimonEngine::vc79_computePosNum, &SimonEngine::vc80_setOverlayImage, &SimonEngine::vc81_setRandom, - &SimonEngine::vc82_pathUnk3, + &SimonEngine::vc82_getPathValue, &SimonEngine::vc83_playSoundLoop, &SimonEngine::vc84_stopSoundLoop, }; @@ -2163,11 +2163,18 @@ void SimonEngine::vc81_setRandom() { writeVariable(var, _rnd.getRandomNumber(value - 1)); } -void SimonEngine::vc82_pathUnk3() { - // Set var to path position - int var = vc_read_next_word(); +void SimonEngine::vc82_getPathValue() { + uint8 val; + + uint16 var = vc_read_next_word(); + + if (vc_get_bit(88) == true) { + val = _pathValues1[_GPVCount1++]; + } else { + val = _pathValues[_GPVCount++]; + } - debug(0, "STUB: vc82_pathUnk3: var %d", var); + writeVariable(var, val); } void SimonEngine::vc83_playSoundLoop() { |