diff options
author | Travis Howell | 2005-11-15 04:54:18 +0000 |
---|---|---|
committer | Travis Howell | 2005-11-15 04:54:18 +0000 |
commit | 805a985e4f679214d1f417a383c0c82135c99b11 (patch) | |
tree | afd21cb5f9859488a325748547e0119c83dd35af /simon | |
parent | 749b0130a96c8af787737af1fbacc8b50350423f (diff) | |
download | scummvm-rg350-805a985e4f679214d1f417a383c0c82135c99b11.tar.gz scummvm-rg350-805a985e4f679214d1f417a383c0c82135c99b11.tar.bz2 scummvm-rg350-805a985e4f679214d1f417a383c0c82135c99b11.zip |
Correction to pathfinding in FF.
svn-id: r19597
Diffstat (limited to 'simon')
-rw-r--r-- | simon/sound.cpp | 3 | ||||
-rw-r--r-- | simon/vga.cpp | 9 |
2 files changed, 6 insertions, 6 deletions
diff --git a/simon/sound.cpp b/simon/sound.cpp index fd65e9f48a..fd6c5e1840 100644 --- a/simon/sound.cpp +++ b/simon/sound.cpp @@ -462,8 +462,7 @@ void Sound::playSoundData(byte *soundData, uint sound, uint pan, uint vol, bool return; } - // TODO: Use sound offsets - soundData += 8; + soundData += READ_LE_UINT32(soundData + sound * 4); int32 size = READ_LE_UINT32(soundData + 4); Common::MemoryReadStream stream(soundData, size); if (!loadWAVFromStream(stream, size, rate, flags)) { diff --git a/simon/vga.cpp b/simon/vga.cpp index a925896d44..43ff6d8d4a 100644 --- a/simon/vga.cpp +++ b/simon/vga.cpp @@ -1563,20 +1563,21 @@ void SimonEngine::vc48_setPathFinder() { if (getGameType() == GType_FF) { VgaSprite *vsp = find_cur_sprite(); - int x, y, y1, y2, ydiff, count = 0; + int x, x2, y, y1, y2, ydiff, count = 0; - while(vsp->x > readUint16Wrapper(p + 2)) { + while(vsp->x < readUint16Wrapper(p + 2)) { p += 2; count++; } y1 = readUint16Wrapper(p + 1); + x2 = readUint16Wrapper(p + 2); y2 = readUint16Wrapper(p + 3); - if (y2 != 9999) { + if (x2 != 9999) { ydiff = y2 - y1; if (ydiff < 0) { - ydiff = - ydiff; + ydiff = -ydiff; x = vsp->x & 7; ydiff *= x; ydiff /= 8; |