diff --git a/configure.py b/configure.py index 2554881c..8ce07d5c 100644 --- a/configure.py +++ b/configure.py @@ -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"), diff --git a/include/nw4r/snd/snd_StrmPlayer.h b/include/nw4r/snd/snd_StrmPlayer.h index 96742e28..aee8101e 100644 --- a/include/nw4r/snd/snd_StrmPlayer.h +++ b/include/nw4r/snd/snd_StrmPlayer.h @@ -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 diff --git a/include/nw4r/ut/ut_RuntimeTypeInfo.h b/include/nw4r/ut/ut_RuntimeTypeInfo.h index 12bf7cc4..289ed170 100644 --- a/include/nw4r/ut/ut_RuntimeTypeInfo.h +++ b/include/nw4r/ut/ut_RuntimeTypeInfo.h @@ -47,8 +47,12 @@ inline TDerived DynamicCast(TBase *ptr) { // Derived type info const detail::RuntimeTypeInfo *derivedTypeInfo = detail::GetTypeInfoFromPtr_(static_cast(NULL)); // Downcast if possible - if (ptr && ptr->GetRuntimeTypeInfo()->IsDerivedFrom(derivedTypeInfo)) { - return static_cast(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(ptr); + } } return NULL;