diff --git a/include/JSystem/JAudio2/JASGadget.h b/include/JSystem/JAudio2/JASGadget.h index 718ce02069..53eaefb6a4 100644 --- a/include/JSystem/JAudio2/JASGadget.h +++ b/include/JSystem/JAudio2/JASGadget.h @@ -4,6 +4,12 @@ #include "JSystem/JUtility/JUTAssert.h" #include +#ifdef __MWERKS__ +#define JAS_GLOBAL_INSTANCE_INIT +#else +#define JAS_GLOBAL_INSTANCE_INIT {} +#endif + /** * @ingroup jsystem-jaudio * diff --git a/src/Z2AudioCS/SpkSystem.cpp b/src/Z2AudioCS/SpkSystem.cpp index 9e245f7503..ebb4c71ff6 100644 --- a/src/Z2AudioCS/SpkSystem.cpp +++ b/src/Z2AudioCS/SpkSystem.cpp @@ -7,8 +7,8 @@ #include "JSystem/JAudio2/JASHeapCtrl.h" #include "JSystem/JKernel/JKRHeap.h" -template<> SpkSystem* JASGlobalInstance::sInstance; -template<> SpkSoundHolder* JASGlobalInstance::sInstance; +template<> SpkSystem* JASGlobalInstance::sInstance JAS_GLOBAL_INSTANCE_INIT; +template<> SpkSoundHolder* JASGlobalInstance::sInstance JAS_GLOBAL_INSTANCE_INIT; const static s32 cConfigVolumeMax = 15; diff --git a/src/m_Do/m_Do_main.cpp b/src/m_Do/m_Do_main.cpp index 632c374ef1..901b8c980b 100644 --- a/src/m_Do/m_Do_main.cpp +++ b/src/m_Do/m_Do_main.cpp @@ -939,70 +939,75 @@ bool JKRHeap::dump_sort() { } template<> -Z2WolfHowlMgr* JASGlobalInstance::sInstance; +Z2WolfHowlMgr* JASGlobalInstance::sInstance JAS_GLOBAL_INSTANCE_INIT; template<> -Z2EnvSeMgr* JASGlobalInstance::sInstance; +Z2EnvSeMgr* JASGlobalInstance::sInstance JAS_GLOBAL_INSTANCE_INIT; template<> -Z2FxLineMgr* JASGlobalInstance::sInstance; +Z2FxLineMgr* JASGlobalInstance::sInstance JAS_GLOBAL_INSTANCE_INIT; template<> -Z2Audience* JASGlobalInstance::sInstance; +Z2Audience* JASGlobalInstance::sInstance JAS_GLOBAL_INSTANCE_INIT; template<> -Z2SoundObjMgr* JASGlobalInstance::sInstance; +Z2SoundObjMgr* JASGlobalInstance::sInstance JAS_GLOBAL_INSTANCE_INIT; template<> -Z2SoundInfo* JASGlobalInstance::sInstance; +Z2SoundInfo* JASGlobalInstance::sInstance JAS_GLOBAL_INSTANCE_INIT; template<> -JAUSoundInfo* JASGlobalInstance::sInstance; +JAUSoundInfo* JASGlobalInstance::sInstance JAS_GLOBAL_INSTANCE_INIT; template<> -JAUSoundNameTable* JASGlobalInstance::sInstance; +JAUSoundNameTable* JASGlobalInstance::sInstance JAS_GLOBAL_INSTANCE_INIT; template<> -JAUSoundTable* JASGlobalInstance::sInstance; +JAUSoundTable* JASGlobalInstance::sInstance JAS_GLOBAL_INSTANCE_INIT; template<> -JAISoundInfo* JASGlobalInstance::sInstance; +JAISoundInfo* JASGlobalInstance::sInstance JAS_GLOBAL_INSTANCE_INIT; template<> -Z2SoundMgr* JASGlobalInstance::sInstance; +Z2SoundMgr* JASGlobalInstance::sInstance JAS_GLOBAL_INSTANCE_INIT; template<> -JAIStreamMgr* JASGlobalInstance::sInstance; +JAIStreamMgr* JASGlobalInstance::sInstance JAS_GLOBAL_INSTANCE_INIT; template<> -JAISeqMgr* JASGlobalInstance::sInstance; +JAISeqMgr* JASGlobalInstance::sInstance JAS_GLOBAL_INSTANCE_INIT; template<> -JAISeMgr* JASGlobalInstance::sInstance; +JAISeMgr* JASGlobalInstance::sInstance JAS_GLOBAL_INSTANCE_INIT; template<> -Z2SpeechMgr2* JASGlobalInstance::sInstance; +Z2SpeechMgr2* JASGlobalInstance::sInstance JAS_GLOBAL_INSTANCE_INIT; template<> -Z2SoundStarter* JASGlobalInstance::sInstance; +Z2SoundStarter* JASGlobalInstance::sInstance JAS_GLOBAL_INSTANCE_INIT; template<> -JAISoundStarter* JASGlobalInstance::sInstance; +JAISoundStarter* JASGlobalInstance::sInstance JAS_GLOBAL_INSTANCE_INIT; template<> -Z2StatusMgr* JASGlobalInstance::sInstance; +Z2StatusMgr* JASGlobalInstance::sInstance JAS_GLOBAL_INSTANCE_INIT; template<> -Z2SceneMgr* JASGlobalInstance::sInstance; +Z2SceneMgr* JASGlobalInstance::sInstance JAS_GLOBAL_INSTANCE_INIT; template<> -Z2SeqMgr* JASGlobalInstance::sInstance; +Z2SeqMgr* JASGlobalInstance::sInstance JAS_GLOBAL_INSTANCE_INIT; template<> -Z2SeMgr* JASGlobalInstance::sInstance; +Z2SeMgr* JASGlobalInstance::sInstance JAS_GLOBAL_INSTANCE_INIT; template<> -JASAudioThread* JASGlobalInstance::sInstance; +JASAudioThread* JASGlobalInstance::sInstance JAS_GLOBAL_INSTANCE_INIT; template<> -JASDefaultBankTable* JASGlobalInstance::sInstance; +JASDefaultBankTable* JASGlobalInstance::sInstance JAS_GLOBAL_INSTANCE_INIT; + +#ifndef __MWERKS__ +template<> +JAUSectionHeap* JASGlobalInstance::sInstance JAS_GLOBAL_INSTANCE_INIT; +#endif