diff options
| author | robojumper <robojumper@gmail.com> | 2025-07-26 22:33:49 +0200 |
|---|---|---|
| committer | robojumper <robojumper@gmail.com> | 2025-09-13 11:16:20 +0200 |
| commit | b8ba5a956c4c9c3f75b8cbb16ccc1ffcb7299570 (patch) | |
| tree | edf3bf1d39fe2a7bf5561da5e7c8263925f717fa /include/egg | |
| parent | 1be399e999307d9bd3fdffaf03618edefd5fdc84 (diff) | |
AudioSystem names from BBA, cleanup
Diffstat (limited to 'include/egg')
| -rw-r--r-- | include/egg/audio/eggAudioMgr.h | 2 | ||||
| -rw-r--r-- | include/egg/audio/eggAudioSystem.h | 29 |
2 files changed, 18 insertions, 13 deletions
diff --git a/include/egg/audio/eggAudioMgr.h b/include/egg/audio/eggAudioMgr.h index ffc6e9a4..e2a064b2 100644 --- a/include/egg/audio/eggAudioMgr.h +++ b/include/egg/audio/eggAudioMgr.h @@ -14,7 +14,7 @@ public: virtual StartResult detail_SetupSound(nw4r::snd::SoundHandle *pHandle, u32 id, bool hold, const StartInfo *pStartInfo) override { if (AudioSystem::sInstanse != nullptr && - (AudioSystem::sInstanse->field0x08NotZero() || AudioSystem::sInstanse->field0x04NotZero())) { + (AudioSystem::sInstanse->isShuttingDown() || AudioSystem::sInstanse->isResetting())) { return START_ERR_USER; } return nw4r::snd::SoundArchivePlayer::detail_SetupSound(pHandle, id, hold, pStartInfo); diff --git a/include/egg/audio/eggAudioSystem.h b/include/egg/audio/eggAudioSystem.h index 69791333..80f4ea73 100644 --- a/include/egg/audio/eggAudioSystem.h +++ b/include/egg/audio/eggAudioSystem.h @@ -10,29 +10,34 @@ public: AudioSystem(); ~AudioSystem(); - void fn_804B7270(s32 frame); - void fn_804B7370(); - void fn_804B73D0(s32 frame); + void reset(s32 ms); + void recoverReset(); + void shutdown(s32 ms); void calc(); - bool isField0x04Eq2() { - return field_0x04 == 2; + // Non-official inline names + bool isReset() { + return mResetStatus == 2; } - bool field0x08NotZero() { - return field_0x08 != 0; + bool isShutdown() { + return mShutdownStatus == 2; } - bool field0x04NotZero() { - return field_0x04 != 0; + bool isShuttingDown() { + return mShutdownStatus != 0; + } + + bool isResetting() { + return mResetStatus != 0; } static AudioSystem *sInstanse; ///< sic private: - f32 field_0x00; - s32 field_0x04; - s32 field_0x08; + /* 0x00 */ f32 mSavedMasterVolume; + /* 0x04 */ s32 mResetStatus; + /* 0x08 */ s32 mShutdownStatus; }; } // namespace EGG |
