1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-12-29 00:06:33 +00:00

Reorganize z_std_dma.c unused strings (#2121)

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
This commit is contained in:
cadmic 2024-09-03 23:54:22 -07:00 committed by GitHub
parent 27ba989511
commit 7937be87e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -347,15 +347,8 @@ const char* DmaMgr_GetFileName(uintptr_t vrom) {
return ret;
#elif PLATFORM_N64
return "??";
// Unused strings
(void)"";
(void)"kanji";
(void)"";
(void)"link_animetion";
#elif PLATFORM_GC
return "";
// Unused strings
(void)"";
#endif
}
@ -373,6 +366,9 @@ void DmaMgr_ProcessRequest(DmaRequest* req) {
#if OOT_DEBUG
// Get the filename (for debugging)
filename = DmaMgr_GetFileName(vrom);
#elif PLATFORM_GC
// An unused empty string is defined in .rodata of GameCube retail builds, suggesting it was used near here.
filename = "";
#endif
// Iterate through the DMA data table until the region containing the vrom address for this request is found
@ -381,6 +377,15 @@ void DmaMgr_ProcessRequest(DmaRequest* req) {
if (vrom >= iter->file.vromStart && vrom < iter->file.vromEnd) {
// Found the region this request falls into
#if PLATFORM_N64
// Based on the MM Debug ROM, these strings are part of the condition for the empty if statement below,
// as `... && DmaMgr_StrCmp("", "kanji") != 0 && DmaMgr_StrCmp("", "link_animetion") != 0`
(void)"";
(void)"kanji";
(void)"";
(void)"link_animetion";
#endif
if (0) {
// The string is defined in .rodata of debug builds but not used, suggesting a debug print is here
// but was optimized out in some way.