summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Longstaff <JordanLongstaff@users.noreply.github.com>2025-12-04 06:48:58 -0500
committerGitHub <noreply@github.com>2025-12-04 08:48:58 -0300
commit92be14f00e26dd4411e8a52c7ebe16c5713c3b10 (patch)
tree9637658026a49d1ac8e01493462904629311cd8f
parent64d2e009fb8270b939541374af48cf3033d6a0ef (diff)
Document `func_801514B0` (#1834)
* Document `func_801514B0` * Add transformation enum reference * Rename to ShowDescription * Format
-rw-r--r--include/z64message.h2
-rw-r--r--src/code/z_message.c14
-rw-r--r--src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_collect.c12
-rw-r--r--src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_item.c4
-rw-r--r--src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_map.c4
-rw-r--r--src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_mask.c4
-rw-r--r--tools/disasm/n64-us/functions.txt2
-rw-r--r--tools/sizes/code_functions.csv2
8 files changed, 24 insertions, 20 deletions
diff --git a/include/z64message.h b/include/z64message.h
index 76494b855..da4349d69 100644
--- a/include/z64message.h
+++ b/include/z64message.h
@@ -301,7 +301,7 @@ void Message_DrawItemIcon(struct PlayState* play, Gfx** gfxP);
void Message_HandleOcarina(struct PlayState* play);
void Message_LoadItemIcon(struct PlayState* play, u16 itemId, s16 arg2);
void Message_DecodeHeader(struct PlayState* play);
-void func_801514B0(struct PlayState* play, u16 arg1, u8 arg2);
+void Message_PauseMenu_ShowDescription(struct PlayState* play, u16 textId, u8 textBoxPos);
void Message_StartTextbox(struct PlayState* play, u16 textId, struct Actor* actor);
void Message_ContinueTextbox(struct PlayState* play, u16 textId);
void Message_DisplaySceneTitleCard(struct PlayState* play, u16 textId);
diff --git a/src/code/z_message.c b/src/code/z_message.c
index 20ce6279e..375491e82 100644
--- a/src/code/z_message.c
+++ b/src/code/z_message.c
@@ -3246,7 +3246,7 @@ void Message_OpenText(PlayState* play, u16 textId) {
}
}
-void func_801514B0(PlayState* play, u16 arg1, u8 arg2) {
+void Message_PauseMenu_ShowDescription(PlayState* play, u16 textId, u8 textBoxPos) {
MessageContext* msgCtx = &play->msgCtx;
Font* font = &msgCtx->font;
Player* player = GET_PLAYER(play);
@@ -3276,19 +3276,19 @@ void func_801514B0(PlayState* play, u16 arg1, u8 arg2) {
sCharTexScale = temp / msgCtx->textCharScale;
D_801F6B08 = temp / 1;
- if ((arg1 == 0x1709) && (player->transformation == 3)) {
- arg1 = 0x1705;
+ if ((textId == 0x1709) && (player->transformation == PLAYER_FORM_DEKU)) {
+ textId = 0x1705;
}
- msgCtx->currentTextId = arg1;
+ msgCtx->currentTextId = textId;
if (gSaveContext.options.language == LANGUAGE_JPN) {
- Message_FindMessage(play, arg1);
+ Message_FindMessage(play, textId);
msgCtx->msgLength = font->messageEnd;
DmaMgr_RequestSync(&font->msgBuf, SEGMENT_ROM_START(message_data_static) + font->messageStart,
font->messageEnd);
} else {
- Message_FindMessageNES(play, arg1);
+ Message_FindMessageNES(play, textId);
msgCtx->msgLength = font->messageEnd;
DmaMgr_RequestSync(&font->msgBuf, SEGMENT_ROM_START(message_data_static) + font->messageStart,
font->messageEnd);
@@ -3302,7 +3302,7 @@ void func_801514B0(PlayState* play, u16 arg1, u8 arg2) {
msgCtx->unk11F08 = font->msgBuf.wchar[msgCtx->msgBufPos];
msgCtx->unk11F18 = (msgCtx->unk11F08 & 0xF000) >> 0xC;
msgCtx->textBoxType = TEXTBOX_TYPE_9;
- msgCtx->textBoxPos = arg2;
+ msgCtx->textBoxPos = textBoxPos;
msgCtx->unk11F0C = msgCtx->unk11F08 & 0xF;
msgCtx->textUnskippable = true;
DmaMgr_RequestSync(msgCtx->textboxSegment, SEGMENT_ROM_START(message_static) + (D_801CFC78[0] * 0x1000), 0x1000);
diff --git a/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_collect.c b/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_collect.c
index b2a7f98a7..f10b8e695 100644
--- a/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_collect.c
+++ b/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_collect.c
@@ -856,15 +856,19 @@ void KaleidoScope_UpdateQuestCursor(PlayState* play) {
pauseCtx->itemDescriptionOn = true;
if (pauseCtx->cursorYIndex[PAUSE_QUEST] < 2) {
if (pauseCtx->cursorItem[PAUSE_QUEST] < ITEM_REMAINS_ODOLWA) {
- func_801514B0(play, 0x1737 + pauseCtx->cursorItem[PAUSE_QUEST], 1);
+ Message_PauseMenu_ShowDescription(
+ play, 0x1737 + pauseCtx->cursorItem[PAUSE_QUEST], 1);
} else {
- func_801514B0(play, 0x173B + pauseCtx->cursorItem[PAUSE_QUEST], 3);
+ Message_PauseMenu_ShowDescription(
+ play, 0x173B + pauseCtx->cursorItem[PAUSE_QUEST], 3);
}
} else {
if (pauseCtx->cursorItem[PAUSE_QUEST] < ITEM_REMAINS_ODOLWA) {
- func_801514B0(play, 0x1737 + pauseCtx->cursorItem[PAUSE_QUEST], 1);
+ Message_PauseMenu_ShowDescription(
+ play, 0x1737 + pauseCtx->cursorItem[PAUSE_QUEST], 1);
} else {
- func_801514B0(play, 0x173B + pauseCtx->cursorItem[PAUSE_QUEST], 1);
+ Message_PauseMenu_ShowDescription(
+ play, 0x173B + pauseCtx->cursorItem[PAUSE_QUEST], 1);
}
}
}
diff --git a/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_item.c b/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_item.c
index 33444442e..0cfa1a59e 100644
--- a/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_item.c
+++ b/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_item.c
@@ -681,9 +681,9 @@ void KaleidoScope_UpdateItemCursor(PlayState* play) {
// Give description on item through a message box
pauseCtx->itemDescriptionOn = true;
if (pauseCtx->cursorYIndex[PAUSE_ITEM] < 2) {
- func_801514B0(play, 0x1700 + pauseCtx->cursorItem[PAUSE_ITEM], 3);
+ Message_PauseMenu_ShowDescription(play, 0x1700 + pauseCtx->cursorItem[PAUSE_ITEM], 3);
} else {
- func_801514B0(play, 0x1700 + pauseCtx->cursorItem[PAUSE_ITEM], 1);
+ Message_PauseMenu_ShowDescription(play, 0x1700 + pauseCtx->cursorItem[PAUSE_ITEM], 1);
}
}
}
diff --git a/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_map.c b/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_map.c
index 6b0d42c59..1409e1560 100644
--- a/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_map.c
+++ b/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_map.c
@@ -458,11 +458,11 @@ void KaleidoScope_UpdateDungeonCursor(PlayState* play) {
if (CHECK_BTN_ALL(CONTROLLER1(&play->state)->press.button, BTN_A) && (msgCtx->msgLength == 0) &&
(pauseCtx->cursorPoint[PAUSE_MAP] == DUNGEON_STRAY_FAIRIES)) {
pauseCtx->itemDescriptionOn = true;
- func_801514B0(play, 0x17AF, 1);
+ Message_PauseMenu_ShowDescription(play, 0x17AF, 1);
} else if (CHECK_BTN_ALL(CONTROLLER1(&play->state)->press.button, BTN_A) && (msgCtx->msgLength == 0) &&
CHECK_DUNGEON_ITEM(pauseCtx->cursorPoint[PAUSE_MAP], gSaveContext.dungeonSceneSharedIndex)) {
pauseCtx->itemDescriptionOn = true;
- func_801514B0(play, 0x17AC + pauseCtx->cursorPoint[PAUSE_MAP], 1);
+ Message_PauseMenu_ShowDescription(play, 0x17AC + pauseCtx->cursorPoint[PAUSE_MAP], 1);
}
}
diff --git a/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_mask.c b/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_mask.c
index 66285ac16..349c2cc3b 100644
--- a/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_mask.c
+++ b/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_mask.c
@@ -603,9 +603,9 @@ void KaleidoScope_UpdateMaskCursor(PlayState* play) {
// Give description on item through a message box
pauseCtx->itemDescriptionOn = true;
if (pauseCtx->cursorYIndex[PAUSE_MASK] < 2) {
- func_801514B0(play, 0x1700 + pauseCtx->cursorItem[PAUSE_MASK], 3);
+ Message_PauseMenu_ShowDescription(play, 0x1700 + pauseCtx->cursorItem[PAUSE_MASK], 3);
} else {
- func_801514B0(play, 0x1700 + pauseCtx->cursorItem[PAUSE_MASK], 1);
+ Message_PauseMenu_ShowDescription(play, 0x1700 + pauseCtx->cursorItem[PAUSE_MASK], 1);
}
}
}
diff --git a/tools/disasm/n64-us/functions.txt b/tools/disasm/n64-us/functions.txt
index 775ec0736..72ac32155 100644
--- a/tools/disasm/n64-us/functions.txt
+++ b/tools/disasm/n64-us/functions.txt
@@ -2848,7 +2848,7 @@ Message_LoadOwlWarpText = 0x8014D62C; // type:func
Message_Decode = 0x8014D7B4; // type:func
func_80150A84 = 0x80150A84; // type:func
Message_OpenText = 0x80150D08; // type:func
-func_801514B0 = 0x801514B0; // type:func
+Message_PauseMenu_ShowDescription = 0x801514B0; // type:func
Message_StartTextbox = 0x801518B0; // type:func
Message_ContinueTextbox = 0x80151938; // type:func
Message_DisplaySceneTitleCard = 0x80151A68; // type:func
diff --git a/tools/sizes/code_functions.csv b/tools/sizes/code_functions.csv
index 910c7b00e..984d59dbc 100644
--- a/tools/sizes/code_functions.csv
+++ b/tools/sizes/code_functions.csv
@@ -2365,7 +2365,7 @@ asm/non_matchings/code/z_message/Message_LoadOwlWarpText.s,Message_LoadOwlWarpTe
asm/non_matchings/code/z_message/Message_Decode.s,Message_Decode,0x8014D7B4,0xCB4
asm/non_matchings/code/z_message/func_80150A84.s,func_80150A84,0x80150A84,0xA1
asm/non_matchings/code/z_message/Message_OpenText.s,Message_OpenText,0x80150D08,0x1EA
-asm/non_matchings/code/z_message/func_801514B0.s,func_801514B0,0x801514B0,0x100
+asm/non_matchings/code/z_message/Message_PauseMenu_ShowDescription.s,Message_PauseMenu_ShowDescription,0x801514B0,0x100
asm/non_matchings/code/z_message/Message_StartTextbox.s,Message_StartTextbox,0x801518B0,0x22
asm/non_matchings/code/z_message/Message_ContinueTextbox.s,Message_ContinueTextbox,0x80151938,0x4C
asm/non_matchings/code/z_message/Message_DisplaySceneTitleCard.s,Message_DisplaySceneTitleCard,0x80151A68,0x53