From e16b0e7289842cc8ebb98829d58fa72f46b815f2 Mon Sep 17 00:00:00 2001 From: robojumper Date: Sun, 25 May 2025 22:18:40 +0200 Subject: [PATCH] snd_DisposeCallbackManager OK --- config/SOUE01/splits.txt | 2 ++ config/SOUE01/symbols.txt | 8 ++++---- configure.py | 2 +- src/nw4r/snd/snd_DisposeCallbackManager.cpp | 5 ++--- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/config/SOUE01/splits.txt b/config/SOUE01/splits.txt index b1a17f9c..5bbbc519 100644 --- a/config/SOUE01/splits.txt +++ b/config/SOUE01/splits.txt @@ -2934,6 +2934,8 @@ nw4r/snd/snd_Channel.cpp: nw4r/snd/snd_DisposeCallbackManager.cpp: .text start:0x8046B7D0 end:0x8046BB5C align:16 + .sbss start:0x80576688 end:0x80576690 + .bss start:0x806593F8 end:0x80659410 nw4r/snd/snd_DvdSoundArchive.cpp: .text start:0x8046BB60 end:0x8046C1C8 align:16 diff --git a/config/SOUE01/symbols.txt b/config/SOUE01/symbols.txt index d9f4cf61..dad564e0 100644 --- a/config/SOUE01/symbols.txt +++ b/config/SOUE01/symbols.txt @@ -25193,7 +25193,7 @@ VoiceCallbackFunc__Q44nw4r3snd6detail7ChannelFPQ44nw4r3snd6detail5VoiceQ54nw4r3s AllocChannel__Q44nw4r3snd6detail7ChannelFiiiPFPQ44nw4r3snd6detail7ChannelQ54nw4r3snd6detail7Channel21ChannelCallbackStatusUl_vUl = .text:0x8046B5C0; // type:function size:0x1EC FreeChannel__Q44nw4r3snd6detail7ChannelFPQ44nw4r3snd6detail7Channel = .text:0x8046B7B0; // type:function size:0x18 GetInstance__Q44nw4r3snd6detail22DisposeCallbackManagerFv = .text:0x8046B7D0; // type:function size:0x8C -__dt__Q44nw4r3snd6detail22DisposeCallbackManagerFv = .text:0x8046B860; // type:function size:0x5C +__dt__Q44nw4r3snd6detail22DisposeCallbackManagerFv = .text:0x8046B860; // type:function size:0x5C scope:weak RegisterDisposeCallback__Q44nw4r3snd6detail22DisposeCallbackManagerFPQ44nw4r3snd6detail15DisposeCallback = .text:0x8046B8C0; // type:function size:0x30 UnregisterDisposeCallback__Q44nw4r3snd6detail22DisposeCallbackManagerFPQ44nw4r3snd6detail15DisposeCallback = .text:0x8046B8F0; // type:function size:0x4 Dispose__Q44nw4r3snd6detail22DisposeCallbackManagerFPvUlPv = .text:0x8046B900; // type:function size:0x12C @@ -42427,7 +42427,7 @@ lbl_80576670 = .sbss:0x80576670; // type:object size:0x4 data:4byte lbl_80576674 = .sbss:0x80576674; // type:object size:0x4 data:4byte lbl_80576678 = .sbss:0x80576678; // type:object size:0x8 data:4byte lbl_80576680 = .sbss:0x80576680; // type:object size:0x8 data:byte -lbl_80576688 = .sbss:0x80576688; // type:object size:0x8 data:byte +@GUARD@GetInstance__Q44nw4r3snd6detail22DisposeCallbackManagerFv@instance = .sbss:0x80576688; // type:object size:0x1 scope:weak data:byte lbl_80576690 = .sbss:0x80576690; // type:object size:0x8 data:byte lbl_80576698 = .sbss:0x80576698; // type:object size:0x4 data:4byte lbl_8057669C = .sbss:0x8057669C; // type:object size:0x1 data:byte @@ -51938,8 +51938,8 @@ lbl_80659390 = .bss:0x80659390; // type:object size:0xC lbl_8065939C = .bss:0x8065939C; // type:object size:0x2C data:4byte lbl_806593C8 = .bss:0x806593C8; // type:object size:0x10 lbl_806593D8 = .bss:0x806593D8; // type:object size:0x20 data:4byte -lbl_806593F8 = .bss:0x806593F8; // type:object size:0xC -lbl_80659404 = .bss:0x80659404; // type:object size:0xC data:4byte +@781 = .bss:0x806593F8; // type:object size:0xC scope:local +@LOCAL@GetInstance__Q44nw4r3snd6detail22DisposeCallbackManagerFv@instance = .bss:0x80659404; // type:object size:0xC scope:weak data:4byte lbl_80659410 = .bss:0x80659410; // type:object size:0x2D8 data:byte lbl_806596E8 = .bss:0x806596E8; // type:object size:0x20 data:2byte lbl_80659708 = .bss:0x80659708; // type:object size:0x18 diff --git a/configure.py b/configure.py index c7ae35d8..571e3191 100644 --- a/configure.py +++ b/configure.py @@ -1023,7 +1023,7 @@ config.libs = [ Object(NonMatching, "nw4r/snd/snd_BasicSound.cpp"), Object(Matching, "nw4r/snd/snd_BiquadFilterPreset.cpp"), Object(NonMatching, "nw4r/snd/snd_Channel.cpp"), - Object(NonMatching, "nw4r/snd/snd_DisposeCallbackManager.cpp"), + Object(Matching, "nw4r/snd/snd_DisposeCallbackManager.cpp"), Object(NonMatching, "nw4r/snd/snd_debug.cpp"), Object(NonMatching, "nw4r/snd/snd_DvdSoundArchive.cpp"), Object(NonMatching, "nw4r/snd/snd_EnvGenerator.cpp"), diff --git a/src/nw4r/snd/snd_DisposeCallbackManager.cpp b/src/nw4r/snd/snd_DisposeCallbackManager.cpp index 060bc6fc..d10c2a5b 100644 --- a/src/nw4r/snd/snd_DisposeCallbackManager.cpp +++ b/src/nw4r/snd/snd_DisposeCallbackManager.cpp @@ -55,8 +55,7 @@ void DisposeCallbackManager::Dispose(void *mem, u32 size, void *arg ATTR_UNUSED) { decltype(itr) curItr = itr++; - // the post-increment is in ketteiban - curItr++->InvalidateData(start, end); + curItr->InvalidateData(start, end); } } @@ -73,7 +72,7 @@ void DisposeCallbackManager::DisposeWave(void *mem, u32 size, { decltype(itr) curItr = itr++; - curItr++->InvalidateWaveData(start, end); + curItr->InvalidateWaveData(start, end); } }