From fdece88a10a934f64cd8c955f97bcdd7df8b0c6e Mon Sep 17 00:00:00 2001 From: Cuyler36 Date: Tue, 4 Apr 2023 13:30:28 -0400 Subject: [PATCH] Fix time.c bss offsets but unlink until later --- config/rel_slices.yml | 10 +++++----- config/symbols.yml | 1 + include/libu64/gfxprint.h | 2 +- rel/m_time.c | 6 +++--- src/libu64/gfxprint.c | 2 +- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/config/rel_slices.yml b/config/rel_slices.yml index 48c1843d..066ff86b 100644 --- a/config/rel_slices.yml +++ b/config/rel_slices.yml @@ -2,11 +2,11 @@ sys_vimgr.c: .text: [0x803703F8, 0x80370418] m_room_type/mRmTp_FtrItemNo2FtrIdx.c: .text: [0x803E7878, 0x803E78BC] -m_time.c: - .text: [0x803F33DC, 0x803F3E58] - .rodata: [0x806433B0, 0x806433D8] - .data: [0x8065E378, 0x8065E438] - .bss: [0x81294008, 0x81294018] +#m_time.c: # unlinked until function callers that reorder local static variables are implemented. +# .text: [0x803F33DC, 0x803F3E58] +# .rodata: [0x806433B0, 0x806433D8] +# .data: [0x8065E378, 0x8065E438] +# .bss: [0x8129F410, 0x8129F420] #m_skin_matrix.c: # .text: [0x803f1528, 0x803f1bb4] # .rodata: [0x80643310, 0x80643318] diff --git a/config/symbols.yml b/config/symbols.yml index df674919..31e4b4bc 100644 --- a/config/symbols.yml +++ b/config/symbols.yml @@ -52479,6 +52479,7 @@ global: 0x8129F408: S_tdemo_frame 0x8129F40C: S_titledemo_to_play 0x8129F410: debug_disp + 0x8129F414: l_renew_is 0x8129F420: S_watch_my_step 0x8129F450: S_navigate 0x8129F45C: S_mybell_conf diff --git a/include/libu64/gfxprint.h b/include/libu64/gfxprint.h index f3bf988d..f23f4e13 100644 --- a/include/libu64/gfxprint.h +++ b/include/libu64/gfxprint.h @@ -45,7 +45,7 @@ typedef struct gfxprint_obj { } gfxprint_t; /* Default gfxprint flag values set in game_ct func, default value is 0x40 (GFXPRINT_FLAG_HIGHRES on) */ -static u8 __gfxprint_default_flags; +extern u8 __gfxprint_default_flags; extern u16 gfxprint_moji_tlut[]; extern u8 gfxprint_font[]; diff --git a/rel/m_time.c b/rel/m_time.c index 3b43229c..cd2616fb 100644 --- a/rel/m_time.c +++ b/rel/m_time.c @@ -9,6 +9,9 @@ #include "m_kabu_manager.h" #include "zurumode.h" +static int debug_disp; +static u8 l_renew_is; + const lbRTC_time_c mTM_rtcTime_clear_code = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, @@ -119,9 +122,6 @@ static mTM_calendar_term_t mTM_calender[mTM_TERM_NUM] = { } }; -static u8 l_renew_is; -static int debug_disp; - /** * Get the index of the current term based on the current date and climate. * diff --git a/src/libu64/gfxprint.c b/src/libu64/gfxprint.c index abaff4b5..5fd75d6a 100644 --- a/src/libu64/gfxprint.c +++ b/src/libu64/gfxprint.c @@ -3,7 +3,7 @@ #include "libultra/libultra.h" #include "libc64/aprintf.h" -static u8 __gfxprint_default_flags; +u8 __gfxprint_default_flags; static void gfxprint_setup(gfxprint_t* this) { int i;