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:
parent
27ba989511
commit
7937be87e4
1 changed files with 12 additions and 7 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue