mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-19 08:25:35 +00:00
Basic start on freddemo (old version)
svn-id: r14685
This commit is contained in:
parent
e00f9f4a97
commit
4f51ae9988
@ -86,6 +86,7 @@ enum AkosOpcodes {
|
||||
AKC_Cmd3 = 0xC08B,
|
||||
AKC_Ignore3 = 0xC08C,
|
||||
AKC_Ignore2 = 0xC08D,
|
||||
AKC_Unk1 = 0xC08E,
|
||||
AKC_SkipStart = 0xC090,
|
||||
AKC_SkipE = 0xC090,
|
||||
AKC_SkipNE = 0xC091,
|
||||
@ -265,6 +266,9 @@ byte AkosRenderer::drawLimb(const CostumeData &cost, int limb) {
|
||||
if (_skipLimb)
|
||||
return 0;
|
||||
|
||||
if (_vm->_heversion >= 70 && cost.active[limb] == 8)
|
||||
return 0;
|
||||
|
||||
if (!cost.active[limb] || cost.stopped & (1 << limb))
|
||||
return 0;
|
||||
|
||||
@ -1289,6 +1293,7 @@ bool ScummEngine::akos_increaseAnim(Actor *a, int chan, const byte *aksq, const
|
||||
case AKC_Return:
|
||||
case AKC_EndSeq:
|
||||
case AKC_ComplexChan:
|
||||
case AKC_Unk1:
|
||||
break;
|
||||
|
||||
case AKC_Cmd3:
|
||||
@ -1317,7 +1322,7 @@ bool ScummEngine::akos_increaseAnim(Actor *a, int chan, const byte *aksq, const
|
||||
int code2 = aksq[curpos];
|
||||
if (code2 & 0x80)
|
||||
code2 = (code2 << 8) | aksq[curpos + 1];
|
||||
assert((code2 & 0xC000) != 0xC000 || code2 == AKC_ComplexChan || code2 == AKC_Return || code2 == AKC_EndSeq);
|
||||
assert((code2 & 0xC000) != 0xC000 || code2 == AKC_ComplexChan || code2 == AKC_Return || code2 == AKC_EndSeq || code2 == AKC_Unk1);
|
||||
|
||||
a->cost.curpos[chan] = curpos;
|
||||
|
||||
|
@ -1028,8 +1028,10 @@ void Gdi::drawBitmap(const byte *ptr, VirtScreen *vs, int x, int y, const int wi
|
||||
smap_ptr = _vm->findResource(MKID('SMAP'), ptr);
|
||||
|
||||
// newer Humongous titles use this
|
||||
// smap_ptr = _vm->findResource(MKID('BMAP'), ptr);
|
||||
// HACK Until BMAP support is added
|
||||
if (smap_ptr == NULL)
|
||||
smap_ptr = _vm->findResource(MKID('BMAP'), ptr);
|
||||
return;
|
||||
|
||||
assert(smap_ptr);
|
||||
|
||||
|
@ -1620,7 +1620,7 @@ void ScummEngine_v6::o6_resourceRoutines() {
|
||||
if (_heversion < 70)
|
||||
error("o6_resourceRoutines: default case %d", op);
|
||||
|
||||
warning("stub queueload resource 2, %d", pop());
|
||||
debug(1,"stub queueload resource 2, %d", pop());
|
||||
// QL_QueGlobForLoad(2, pop(), 1);
|
||||
break;
|
||||
}
|
||||
@ -1629,7 +1629,7 @@ void ScummEngine_v6::o6_resourceRoutines() {
|
||||
if (_heversion < 70)
|
||||
error("o6_resourceRoutines: default case %d", op);
|
||||
|
||||
warning("stub queueload resource 4, %d", pop());
|
||||
debug(1,"stub queueload resource 4, %d", pop());
|
||||
// QL_QueGlobForLoad(4, pop(), 1);
|
||||
break;
|
||||
}
|
||||
@ -1638,7 +1638,7 @@ void ScummEngine_v6::o6_resourceRoutines() {
|
||||
if (_heversion < 70)
|
||||
error("o6_resourceRoutines: default case %d", op);
|
||||
|
||||
warning("stub queueload resource 3, %d", pop());
|
||||
debug(1,"stub queueload resource 3, %d", pop());
|
||||
// QL_QueGlobForLoad(3, pop(), 1);
|
||||
break;
|
||||
}
|
||||
@ -1648,19 +1648,19 @@ void ScummEngine_v6::o6_resourceRoutines() {
|
||||
error("o6_resourceRoutines: default case %d", op);
|
||||
|
||||
resid = pop();
|
||||
warning("stub queueload resource 18, %d", resid);
|
||||
debug(1,"stub queueload resource 18, %d", resid);
|
||||
// QL_QueGlobForLoad(18, resid, 1);
|
||||
// QL_QueGlobForLoad(1, resid, 1);
|
||||
break;
|
||||
}
|
||||
case 233:
|
||||
resid = pop();
|
||||
warning("stub o6_resourceRoutines resource %d, 1", resid);
|
||||
debug(1,"stub o6_resourceRoutines resource %d, 1", resid);
|
||||
// foo(resid, 1);
|
||||
break;
|
||||
case 235:
|
||||
resid = pop();
|
||||
warning("stub o6_resourceRoutines resource %d, 0", resid);
|
||||
debug(1,"stub o6_resourceRoutines resource %d, 0", resid);
|
||||
// foo(resid, 0);
|
||||
break;
|
||||
default:
|
||||
|
@ -160,6 +160,7 @@ void Sound::playSound(int soundID, int offset) {
|
||||
int size = -1;
|
||||
int rate;
|
||||
byte flags = SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE;
|
||||
bool music = false;
|
||||
|
||||
debugC(DEBUG_SOUND, "playSound #%d (room %d)", soundID,
|
||||
_vm->getResourceRoomNr(rtSound, soundID));
|
||||
@ -189,20 +190,24 @@ void Sound::playSound(int soundID, int offset) {
|
||||
music_offs = musicFile.readUint32LE();
|
||||
size = musicFile.readUint32LE();
|
||||
|
||||
if (music_offs > total_size || (size + music_offs) > total_size)
|
||||
error("Bad music offsets");
|
||||
if (music_offs > total_size || (size + music_offs) > total_size) {
|
||||
warning("Bad music offsets");
|
||||
musicFile.close();
|
||||
return;
|
||||
}
|
||||
|
||||
musicFile.seek(music_offs, SEEK_SET);
|
||||
ptr = (byte *) calloc(size, 1);
|
||||
musicFile.read(ptr, size);
|
||||
musicFile.close();
|
||||
|
||||
_currentMusic = soundID;
|
||||
music = true;
|
||||
if (_vm->_heversion == 70) {
|
||||
// Allocate a sound buffer, copy the data into it, and play
|
||||
sound = (char *)malloc(size);
|
||||
memcpy(sound, ptr, size);
|
||||
free(ptr);
|
||||
_currentMusic = soundID;
|
||||
_vm->_mixer->stopHandle(_musicChannelHandle);
|
||||
_vm->_mixer->playRaw(&_musicChannelHandle, sound, size, 11025, flags, soundID);
|
||||
return;
|
||||
@ -251,7 +256,12 @@ void Sound::playSound(int soundID, int offset) {
|
||||
// Allocate a sound buffer, copy the data into it, and play
|
||||
sound = (char *)malloc(size);
|
||||
memcpy(sound, ptr + offset + 8, size);
|
||||
_vm->_mixer->playRaw(NULL, sound, size, rate, flags, soundID);
|
||||
|
||||
if (music == true) {
|
||||
_vm->_mixer->stopHandle(_musicChannelHandle);
|
||||
_vm->_mixer->playRaw(&_musicChannelHandle, sound, size, rate, flags, soundID);
|
||||
} else
|
||||
_vm->_mixer->playRaw(NULL, sound, size, rate, flags, soundID);
|
||||
}
|
||||
else if (READ_UINT32(ptr) == MKID('MRAW')) {
|
||||
// pcm music in 3DO humongous games
|
||||
|
Loading…
x
Reference in New Issue
Block a user