diff options
| author | Jordan Longstaff <JordanLongstaff@users.noreply.github.com> | 2025-12-04 06:48:58 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-04 08:48:58 -0300 |
| commit | 92be14f00e26dd4411e8a52c7ebe16c5713c3b10 (patch) | |
| tree | 9637658026a49d1ac8e01493462904629311cd8f /src | |
| parent | 64d2e009fb8270b939541374af48cf3033d6a0ef (diff) | |
Document `func_801514B0` (#1834)
* Document `func_801514B0`
* Add transformation enum reference
* Rename to ShowDescription
* Format
Diffstat (limited to 'src')
5 files changed, 21 insertions, 17 deletions
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); } } } |
