snd_StrmFile OK

This commit is contained in:
robojumper
2025-05-26 00:32:45 +02:00
parent e75b8ecb55
commit 2ce5dc4bd9
3 changed files with 8 additions and 4 deletions
+1 -1
View File
@@ -1069,7 +1069,7 @@ config.libs = [
Object(NonMatching, "nw4r/snd/snd_SoundSystem.cpp"),
Object(NonMatching, "nw4r/snd/snd_SoundThread.cpp"),
Object(NonMatching, "nw4r/snd/snd_StrmChannel.cpp"),
Object(NonMatching, "nw4r/snd/snd_StrmFile.cpp"),
Object(Matching, "nw4r/snd/snd_StrmFile.cpp"),
Object(NonMatching, "nw4r/snd/snd_StrmPlayer.cpp"),
Object(NonMatching, "nw4r/snd/snd_StrmSound.cpp"),
Object(NonMatching, "nw4r/snd/snd_StrmSoundHandle.cpp"),
+1 -1
View File
@@ -222,7 +222,7 @@ namespace nw4r { namespace snd { namespace detail
/* base SoundThread::PlayerCallback */ // size 0x00c, offset 0x0a4
StrmFileReader::StrmInfo mStrmInfo; // size 0x040, offset 0x0b0
bool mSetupFlag; // size 0x001, offset 0x0f0
bool volatile mActiveFlag; // size 0x001, offset 0x0f1
bool mActiveFlag; // size 0x001, offset 0x0f1
bool mStartedFlag; // size 0x001, offset 0x0f2
bool mPreparedFlag; // size 0x001, offset 0x0f3
bool mTaskErrorFlag; // size 0x001, offset 0x0f4
+6 -2
View File
@@ -47,8 +47,12 @@ inline TDerived DynamicCast(TBase *ptr) {
// Derived type info
const detail::RuntimeTypeInfo *derivedTypeInfo = detail::GetTypeInfoFromPtr_(static_cast<TDerived>(NULL));
// Downcast if possible
if (ptr && ptr->GetRuntimeTypeInfo()->IsDerivedFrom(derivedTypeInfo)) {
return static_cast<TDerived>(ptr);
// NB Wii/1.6 used in SND seems to be very sensitive to the way this
// is structured while Wii/1.5 and below don't seem to care at all
if (ptr) {
if (ptr->GetRuntimeTypeInfo()->IsDerivedFrom(derivedTypeInfo)) {
return static_cast<TDerived>(ptr);
}
}
return NULL;