diff options
author | Vincent Hamm | 2002-03-05 22:23:48 +0000 |
---|---|---|
committer | Vincent Hamm | 2002-03-05 22:23:48 +0000 |
commit | 720c41a25f8a302985898846f23dff441197c782 (patch) | |
tree | 49b219f2362a709347c20568d286967a355dc594 | |
parent | 0d46f4a2f2f8d96c1c5ec16350f3867a697686c6 (diff) | |
download | scummvm-rg350-720c41a25f8a302985898846f23dff441197c782.tar.gz scummvm-rg350-720c41a25f8a302985898846f23dff441197c782.tar.bz2 scummvm-rg350-720c41a25f8a302985898846f23dff441197c782.zip |
Fixed a few things with V7 and samnmax midi (still not working)
svn-id: r3655
-rw-r--r-- | resource.cpp | 60 | ||||
-rw-r--r-- | scumm.h | 12 |
2 files changed, 30 insertions, 42 deletions
diff --git a/resource.cpp b/resource.cpp index f3733b7580..c26b7bebcf 100644 --- a/resource.cpp +++ b/resource.cpp @@ -657,45 +657,45 @@ int Scumm::readSoundResource(int type, int index) { basetag = fileReadDwordLE(); total_size = fileReadDwordBE(); -#if defined(SAMNMAX) || defined(FULL_THROTTLE) - if (basetag == MKID('MIDI')) { - fileSeek(_fileHandle, -8, SEEK_CUR); - fileRead(_fileHandle,createResource(type, index, total_size+8), total_size+8); - return 1; - } -#else - best_pri = -1; - while (pos < total_size) { - tag = fileReadDword(); - size = fileReadDwordBE() + 8; - pos += size; + if (_gameId==GID_SAMNMAX) { + if (basetag == MKID('MIDI')) { + fileSeek(_fileHandle, -8, SEEK_CUR); + fileRead(_fileHandle,createResource(type, index, total_size+8), total_size+8); + return 1; + } + } else { + best_pri = -1; + while (pos < total_size) { + tag = fileReadDword(); + size = fileReadDwordBE() + 8; + pos += size; - switch(tag) { + switch(tag) { #ifdef USE_ADLIB - case MKID('ADL '): pri = 10; break; + case MKID('ADL '): pri = 10; break; #else - case MKID('ROL '): pri = 1; break; - case MKID('GMD '): pri = 2; break; + case MKID('ROL '): pri = 1; break; + case MKID('GMD '): pri = 2; break; #endif - default: pri = -1; - } + default: pri = -1; + } - if (pri > best_pri) { - best_pri = pri; - best_size = size; - best_offs = filePos(_fileHandle); + if (pri > best_pri) { + best_pri = pri; + best_size = size; + best_offs = filePos(_fileHandle); + } + + fileSeek(_fileHandle, size - 8, SEEK_CUR); } - fileSeek(_fileHandle, size - 8, SEEK_CUR); - } + if (best_pri != -1) { + fileSeek(_fileHandle, best_offs - 8, SEEK_SET); + fileRead(_fileHandle,createResource(type, index, best_size), best_size); + return 1; + } - if (best_pri != -1) { - fileSeek(_fileHandle, best_offs - 8, SEEK_SET); - fileRead(_fileHandle,createResource(type, index, best_size), best_size); - return 1; } - -#endif res.roomoffs[type][index] = 0xFFFFFFFF; return 0; } @@ -573,33 +573,21 @@ struct Actor { byte new_3; int8 layer; ActorWalkData walkdata; -//#if defined(FULL_THROTTLE) int16 animVariable[16]; -//#endif uint16 sound[8]; CostumeData cost; byte palette[64]; }; -#if defined(FULL_THROTTLE) struct CameraData { Point _cur; Point _dest; Point _accel; Point _last; - byte _follows; - bool _movingToActor; -}; -#else -struct CameraData { - Point _cur; - Point _dest; - Point _last; int _leftTrigger, _rightTrigger; byte _follows, _mode; bool _movingToActor; }; -#endif #define ARRAY_HDR_SIZE 6 struct ArrayHeader { |