HE 7.0 fixes

o Stub for o7_startSound
 o graphics decoders
 o findResource was moved to ScummEngine and extended
 o 7.0+ titles use akos costumes, so fix that in launcher
 o more o6_resourceRoutines stubs

Now HE 7.0 games (first 320x200 windows ports) show intros and some are
playable to some extent.

svn-id: r14003
This commit is contained in:
Eugene Sandulenko 2004-06-23 01:36:57 +00:00
parent a350fcda0d
commit 2e0814514c
10 changed files with 182 additions and 23 deletions

View file

@ -2283,21 +2283,32 @@ const byte *ResourceIterator::findNext(uint32 tag) {
return result;
}
const byte *findResource(uint32 tag, const byte *searchin) {
const byte *ScummEngine::findResource(uint32 tag, const byte *searchin) {
uint32 curpos, totalsize, size;
// It seems that in HE games if searchin == NULL, it continues
// search from last position
assert(searchin);
debugC(DEBUG_RESOURCE, "findResource(%s, %lx)", tag2str(tag), searchin);
searchin += 4;
totalsize = READ_BE_UINT32(searchin);
curpos = 8;
searchin += 4;
if (!searchin) {
if (_heversion >= 70) {
searchin = _resourceLastSearchBuf;
totalsize = _resourceLastSearchSize;
curpos = 0;
} else {
assert(searchin);
return NULL;
}
} else {
searchin += 4;
_resourceLastSearchSize = totalsize = READ_BE_UINT32(searchin);
curpos = 8;
searchin += 4;
}
while (curpos < totalsize) {
if (READ_UINT32(searchin) == tag)
if (READ_UINT32(searchin) == tag) {
_resourceLastSearchBuf = searchin;
return searchin;
}
size = READ_BE_UINT32(searchin + 4);
if ((int32)size <= 0) {