From e82892cb4244ad3fed5e9a4b8189e2ce297c388f Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Fri, 2 Oct 2026 14:35:53 -0500 Subject: [PATCH 1/2] cleanup(AxAdpcmPlayer): rename VoiceInfo update sync flag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit unk_0x0C / getUnk_0x0C / setUnk_0x0C → mUpdateFlag / getUpdateFlag / setUpdateFlag Cross-thread voice sync: main sets 1, calc() promotes to 2, audio callback clears to 0. --- include/bannerSound/AxAdpcmPlayer.h | 6 +++--- src/bannerSound/AxAdpcmPlayer.cpp | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/bannerSound/AxAdpcmPlayer.h b/include/bannerSound/AxAdpcmPlayer.h index 66459314..d7d69374 100644 --- a/include/bannerSound/AxAdpcmPlayer.h +++ b/include/bannerSound/AxAdpcmPlayer.h @@ -16,12 +16,12 @@ public: AXVPB* getAXVPB() { return mpVPB; } u32 getState() { return mState; } u32 getUnk_0x08() { return unk_0x08; } - int getUnk_0x0C() { return unk_0x0C; } + int getUpdateFlag() { return mUpdateFlag; } void setAXVPB(AXVPB* newVal) { mpVPB = newVal; } void setState(u32 newVal) { mState = newVal; } void setUnk_0x08(u32 newVal) { unk_0x08 = newVal; } - void setUnk_0x0C(u32 newVal) { unk_0x0C = newVal; } + void setUpdateFlag(u32 newVal) { mUpdateFlag = newVal; } AXPBMIX* getMix() { return &mMix; } @@ -31,7 +31,7 @@ private: AXVPB* mpVPB; // 0x00 u32 mState; // 0x04 u32 unk_0x08; // 0x08 - int unk_0x0C; // 0x0c + int mUpdateFlag; // 0x0c AXPBMIX mMix; // 0x10 }; diff --git a/src/bannerSound/AxAdpcmPlayer.cpp b/src/bannerSound/AxAdpcmPlayer.cpp index 2265e8c3..75ae7c5c 100644 --- a/src/bannerSound/AxAdpcmPlayer.cpp +++ b/src/bannerSound/AxAdpcmPlayer.cpp @@ -53,7 +53,7 @@ void AudioFrameCallback() { for (i = 0; i < AX_VOICE_MAX; i++) { VoiceInfo* currVoice = &Voices[i]; - if (currVoice->getAXVPB() == NULL && currVoice->getUnk_0x0C() != 2) { + if (currVoice->getAXVPB() == NULL && currVoice->getUpdateFlag() != 2) { continue; } @@ -108,7 +108,7 @@ void AudioFrameCallback() { currVoice->setState(0); currVoice->setUnk_0x08(0); } - currVoice->setUnk_0x0C(0); + currVoice->setUpdateFlag(0); } return; } @@ -370,7 +370,7 @@ clean_up: } Voices[axVoiceBuf[i]->index].setAXVPB(axVoiceBuf[i]); Voices[axVoiceBuf[i]->index].setState(1); - Voices[axVoiceBuf[i]->index].setUnk_0x0C(1); + Voices[axVoiceBuf[i]->index].setUpdateFlag(1); } if (handle != NULL) { for (u32 i = 0; i < chanCount; i++) { @@ -397,7 +397,7 @@ bool AxAdpcmHandle::setVolume(f32 newVolume) { mix.vR = newVolume * mpVoices[i]->getMix()->vR; AXSetVoiceMix(mpVoices[i]->getAXVPB(), &mix); - mpVoices[i]->setUnk_0x0C(1); + mpVoices[i]->setUpdateFlag(1); a = true; } return a; @@ -416,7 +416,7 @@ void AxAdpcmSimplePlayer::stop(AxAdpcmHandle* handle) { } handle->getVoice(i)->setState(7); - handle->getVoice(i)->setUnk_0x0C(1); + handle->getVoice(i)->setUpdateFlag(1); if (handle->getVoice(i)->getUnk_0x08() != 0) { handle->getVoice(i)->setUnk_0x08(0); } @@ -440,8 +440,8 @@ void AxAdpcmSimplePlayer::setVolume(AxAdpcmHandle* handle, f32 volume) { void AxAdpcmSimplePlayer::calc() { for (int i = 0; i < AX_VOICE_MAX; i++) { - if (Voices[i].getUnk_0x0C() == 1) { - Voices[i].setUnk_0x0C(2); + if (Voices[i].getUpdateFlag() == 1) { + Voices[i].setUpdateFlag(2); } } } -- 2.49.1 From 2da1c58f2c1b14de0754929ddbc23394a011d7a5 Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Fri, 2 Oct 2026 14:36:01 -0500 Subject: [PATCH 2/2] cleanup(NWC24MsgObj): rename trailing unk_0xF4/F8/FC to pad (#919) Never read or written; sit after iconNew at end of NWC24MsgObjPrivate. --- libs/RevoEX/include/private/nwc24/NWC24MsgObj.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/RevoEX/include/private/nwc24/NWC24MsgObj.h b/libs/RevoEX/include/private/nwc24/NWC24MsgObj.h index dc0f521d..65ed6407 100644 --- a/libs/RevoEX/include/private/nwc24/NWC24MsgObj.h +++ b/libs/RevoEX/include/private/nwc24/NWC24MsgObj.h @@ -79,9 +79,9 @@ typedef struct NWC24MsgObjPrivate { u32 textSize; // 0xE4 u32 dwcId; // 0xEC u32 iconNew; // 0xF0 - u32 unk_0xF4; - u32 unk_0xF8; - u32 unk_0xFC; + u32 pad_0xF4; + u32 pad_0xF8; + u32 pad_0xFC; } NWC24MsgObjPrivate; #ifdef __cplusplus -- 2.49.1