implemented some sam&max specific features,
fixed some bugs svn-id: r3486
This commit is contained in:
parent
27e55e52a9
commit
b9facc7de4
11 changed files with 411 additions and 106 deletions
15
resource.cpp
15
resource.cpp
|
@ -492,7 +492,7 @@ int Scumm::loadResource(int type, int index) {
|
|||
}
|
||||
|
||||
int Scumm::readSoundResource(int type, int index) {
|
||||
uint32 resStart, size, tag, size2;
|
||||
uint32 resStart, size, tag, size2, basetag;
|
||||
byte *ptr;
|
||||
int i;
|
||||
|
||||
|
@ -500,9 +500,16 @@ int Scumm::readSoundResource(int type, int index) {
|
|||
|
||||
resStart = 0;
|
||||
|
||||
fileReadDwordLE();
|
||||
basetag = fileReadDwordLE();
|
||||
size = fileReadDwordBE();
|
||||
|
||||
#ifdef SAMNMAX
|
||||
if (basetag == MKID('MIDI')) {
|
||||
fileSeek(_fileHandle, -8, SEEK_CUR);
|
||||
fileRead(_fileHandle,createResource(type, index, size+8), size+8);
|
||||
return 1;
|
||||
}
|
||||
#else
|
||||
while (size>resStart) {
|
||||
tag = fileReadDword();
|
||||
size2 = fileReadDwordBE();
|
||||
|
@ -520,7 +527,7 @@ int Scumm::readSoundResource(int type, int index) {
|
|||
|
||||
fileSeek(_fileHandle, size2, SEEK_CUR);
|
||||
}
|
||||
|
||||
#endif
|
||||
res.roomoffs[type][index] = 0xFFFFFFFF;
|
||||
return 0;
|
||||
}
|
||||
|
@ -627,6 +634,8 @@ void Scumm::nukeResource(int type, int index) {
|
|||
byte *findResource(uint32 tag, byte *searchin, int index) {
|
||||
uint32 maxsize,curpos,totalsize,size;
|
||||
|
||||
assert(searchin);
|
||||
|
||||
searchin += 4;
|
||||
totalsize = READ_BE_UINT32_UNALIGNED(searchin);
|
||||
curpos = 8;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue