Skip to content

Commit b44c888

Browse files
authored
Document JP func_80082BC8_837C8 and rename to draw_text_with_shadow (#719)
* Document and func_80082BC8_837C8 to draw_text_with_shadow * Document for real this time
1 parent 116260e commit b44c888

4 files changed

Lines changed: 12 additions & 8 deletions

File tree

src/menu.c

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3029,8 +3029,12 @@ void draw_menu_elements(s32 state, MenuElement *elems, f32 scale) {
30293029
sMenuGuiOpacity = 255;
30303030
}
30313031

3032+
/**
3033+
* Draw text with a drop shadow on a dialogue box.
3034+
* Note: dialogueBoxID is always -1, so the global dialogue box is always used.
3035+
*/
30323036
#if REGION == REGION_JP
3033-
void func_80082BC8_837C8(s32 dialogueBoxID, s32 xPos1, s32 yPos1, s32 xPos2, s32 yPos2, char *text,
3037+
void draw_text_with_shadow(s32 dialogueBoxID, s32 xPos1, s32 yPos1, s32 xPos2, s32 yPos2, char *text,
30343038
AlignmentFlags alignment, s32 textColour, s32 alpha) {
30353039
s32 opacity;
30363040
opacity = textColour & 0xFF;
@@ -6848,7 +6852,7 @@ void charselect_render_text(UNUSED s32 updateRate) {
68486852
yPos = 234;
68496853
}
68506854
#if REGION == REGION_JP
6851-
func_80082BC8_837C8(-1, SCREEN_WIDTH_HALF, yPos, 1, 3, "OK?", ALIGN_MIDDLE_CENTER,
6855+
draw_text_with_shadow(-1, SCREEN_WIDTH_HALF, yPos, 1, 3, "OK?", ALIGN_MIDDLE_CENTER,
68526856
COLOUR_RGBA32(255, 255, 255, 255), 0);
68536857
#else
68546858
draw_text(&sMenuCurrDisplayList, SCREEN_WIDTH_HALF, yPos, "OK?", ALIGN_MIDDLE_CENTER);
@@ -9456,7 +9460,7 @@ void trackmenu_setup_render(UNUSED s32 updateRate) {
94569460
regionOffset += 24;
94579461
}
94589462
#if REGION == REGION_JP
9459-
func_80082BC8_837C8(-1, SCREEN_WIDTH_HALF, regionOffset + 172, 1, 3, "OK?", ALIGN_MIDDLE_CENTER,
9463+
draw_text_with_shadow(-1, SCREEN_WIDTH_HALF, regionOffset + 172, 1, 3, "OK?", ALIGN_MIDDLE_CENTER,
94609464
COLOUR_RGBA32(255, 255, 255, 255), 0);
94619465
#else
94629466
draw_text(&sMenuCurrDisplayList, SCREEN_WIDTH_HALF, regionOffset + 172, "OK?", ALIGN_MIDDLE_CENTER);
@@ -9978,7 +9982,7 @@ void adventuretrack_render(UNUSED s32 updateRate, s32 arg1, s32 arg2) {
99789982
#endif
99799983
set_text_colour(255, 255, 255, 0, 255);
99809984
#if REGION == REGION_JP
9981-
func_80082BC8_837C8(-1, SCREEN_WIDTH_HALF, yOffset + 172, 1, 3, "OK?", ALIGN_MIDDLE_CENTER,
9985+
draw_text_with_shadow(-1, SCREEN_WIDTH_HALF, yOffset + 172, 1, 3, "OK?", ALIGN_MIDDLE_CENTER,
99829986
COLOUR_RGBA32(255, 255, 255, 255), 0);
99839987
#else
99849988
draw_text(&sMenuCurrDisplayList, SCREEN_WIDTH_HALF, yOffset + 172, "OK?", ALIGN_MIDDLE_CENTER);
@@ -11320,7 +11324,7 @@ void results_render(UNUSED s32 updateRate, f32 opacity) {
1132011324
time = offsetX;
1132111325
x2 = offsetX;
1132211326
#if REGION == REGION_JP
11323-
func_80082BC8_837C8(-1, time - 40, y2 + offsetY + 2, 2, 2, gRacePlacementsArray[spA0], ALIGN_MIDDLE_CENTER,
11327+
draw_text_with_shadow(-1, time - 40, y2 + offsetY + 2, 2, 2, gRacePlacementsArray[spA0], ALIGN_MIDDLE_CENTER,
1132411328
COLOUR_RGBA32(255, 255, 255, 255), 0);
1132511329
#else
1132611330
set_text_colour(0, 0, 0, 255, 255);

src/menu.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ void func_80084854(s32 updateRate);
740740
void func_80098774(s32);
741741
void postrace_viewport(UNUSED s32 updateRate);
742742

743-
void func_80082BC8_837C8(s32 dialogueBoxID, s32 xPos1, s32 yPos1, s32 xPos2,
743+
void draw_text_with_shadow(s32 dialogueBoxID, s32 xPos1, s32 yPos1, s32 xPos2,
744744
s32 yPos2, char *text, AlignmentFlags alignment, s32 textColour, s32 alpha);
745745

746746
typedef enum MenuTextures {

tools/python/score.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def contains_forbidden_func(self, string):
114114
MAP_FILE = DkrMapFile()
115115

116116
# Adding regional and other version functions here to ignore since we're only scoring US_1.0 for now.
117-
NOT_FUNCTION_NAMES = ['if', 'else', 'switch', 'while', 'for', 'dmacopy_internal', 'func_80082BC8_837C8', 'rumble_enable',
117+
NOT_FUNCTION_NAMES = ['if', 'else', 'switch', 'while', 'for', 'dmacopy_internal', 'draw_text_with_shadow', 'rumble_enable',
118118
'func_800C6464_C7064', 'func_800C663C_C723C', 'func_800C67F4_C73F4', 'func_800C6870_C7470',
119119
'func_800C68CC_C74CC', 'fontCreateDisplayList', 'func_800C7744_C8344', 'func_800C7804_C8404',
120120
'fontConvertString', 'func_800C78E0_C84E0']

ver/symbols/symbol_addrs.jpn.v79.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1324,7 +1324,7 @@ menu_number_render = 0x80081F14;
13241324
postrace_offsets = 0x80082164;
13251325
postrace_render = 0x8008225C;
13261326
draw_menu_elements = 0x800824FC;
1327-
func_80082BC8_837C8 = 0x80082BC8;
1327+
draw_text_with_shadow = 0x80082BC8;
13281328
trackmenu_set_records = 0x80082D78;
13291329
menu_missing_controller = 0x80082EB8;
13301330
menu_logos_screen_init = 0x80082F6C;

0 commit comments

Comments
 (0)