mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-09 20:34:12 +00:00
SCUMM: HE (Sound): Revert some warning fixes as they broke createSound()
I guess those warnings will have to be fixed in a different way...
This commit is contained in:
parent
ce7f42238b
commit
081ab64940
@ -1544,13 +1544,8 @@ void SoundHE::createSound(int baseSound, int sound) {
|
||||
_vm->_res->lock(rtSound, baseSound);
|
||||
_vm->_res->lock(rtSound, sound);
|
||||
|
||||
const byte *baseSndPtrConst = _vm->getResourceAddress(rtSound, baseSound);
|
||||
const byte *sndPtrConst = _vm->getResourceAddress(rtSound, sound);
|
||||
|
||||
// The whole point of this create sound mechanism is to MODIFY
|
||||
// these buffers, hence the deliberate non-const cast!
|
||||
baseSndPtr = const_cast<byte *>(baseSndPtrConst);
|
||||
sndPtr = const_cast<byte *>(sndPtrConst);
|
||||
baseSndPtr = (byte *)_vm->getResourceAddress(rtSound, baseSound);
|
||||
sndPtr = (byte *)_vm->getResourceAddress(rtSound, sound);
|
||||
|
||||
channel = hsFindSoundChannel(baseSound);
|
||||
|
||||
@ -1558,10 +1553,10 @@ void SoundHE::createSound(int baseSound, int sound) {
|
||||
|
||||
if (!sndIsWav) {
|
||||
// For non-WAV files we have to deal with sound variables (i.e. skip them :-) )
|
||||
baseSndSbngPtr = ((ScummEngine_v71he *)_vm)->heFindResource(MKTAG('S', 'B', 'N', 'G'), baseSndPtr);
|
||||
baseSndSbngPtr = (byte *)((ScummEngine_v71he *)_vm)->heFindResource(MKTAG('S', 'B', 'N', 'G'), baseSndPtr);
|
||||
|
||||
if (baseSndSbngPtr != nullptr) {
|
||||
sndSbngPtr = ((ScummEngine_v71he *)_vm)->heFindResource(MKTAG('S', 'B', 'N', 'G'), sndPtr);
|
||||
sndSbngPtr = (byte *)((ScummEngine_v71he *)_vm)->heFindResource(MKTAG('S', 'B', 'N', 'G'), sndPtr);
|
||||
|
||||
if (sndSbngPtr != nullptr) {
|
||||
if (channel != -1 && (_heChannel[channel].codeOffset > 0)) {
|
||||
@ -1595,11 +1590,11 @@ void SoundHE::createSound(int baseSound, int sound) {
|
||||
|
||||
// Find where the actual sound data is located...
|
||||
if (sndIsWav) {
|
||||
baseSndPtr = const_cast<byte *>(findWavBlock(MKTAG('d', 'a', 't', 'a'), baseSndPtrConst));
|
||||
baseSndPtr = (byte *)findWavBlock(MKTAG('d', 'a', 't', 'a'), baseSndPtr);
|
||||
if (baseSndPtr == nullptr)
|
||||
error("SoundHE::createSound(): Bad format for sound %d, couldn't find data tag", baseSound);
|
||||
|
||||
sndPtr = const_cast<byte *>(findWavBlock(MKTAG('d', 'a', 't', 'a'), sndPtrConst));
|
||||
sndPtr = (byte *)findWavBlock(MKTAG('d', 'a', 't', 'a'), sndPtr);
|
||||
if (sndPtr == nullptr)
|
||||
error("SoundHE::createSound(): Bad format for sound %d, couldn't find data tag", sound);
|
||||
|
||||
@ -1609,11 +1604,11 @@ void SoundHE::createSound(int baseSound, int sound) {
|
||||
|
||||
sndSize = READ_LE_UINT32(sndPtr + sizeof(uint32)) - 8;
|
||||
} else {
|
||||
baseSndPtr = ((ScummEngine_v71he *)_vm)->heFindResource(MKTAG('S', 'D', 'A', 'T'), baseSndPtr);
|
||||
baseSndPtr = (byte *)((ScummEngine_v71he *)_vm)->heFindResource(MKTAG('S', 'D', 'A', 'T'), baseSndPtr);
|
||||
if (baseSndPtr == nullptr)
|
||||
error("SoundHE::createSound(): Bad format for sound %d, couldn't find SDAT tag", baseSound);
|
||||
|
||||
sndPtr = ((ScummEngine_v71he *)_vm)->heFindResource(MKTAG('S', 'D', 'A', 'T'), sndPtr);
|
||||
sndPtr = (byte *)((ScummEngine_v71he *)_vm)->heFindResource(MKTAG('S', 'D', 'A', 'T'), sndPtr);
|
||||
if (sndPtr == nullptr)
|
||||
error("SoundHE::createSound(): Bad format for sound %d, couldn't find SDAT tag", sound);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user