summaryrefslogtreecommitdiff
path: root/src/code/z_message.c
diff options
context:
space:
mode:
authorengineer124 <engineer124engineer124@gmail.com>2022-10-05 13:54:29 -0400
committerengineer124 <engineer124engineer124@gmail.com>2022-10-05 13:54:29 -0400
commitabd997d27f4a4238bd75a34f38f2c7fce48856b7 (patch)
tree9e750de21f3ecf6490d20b1c7ff5e8108113270c /src/code/z_message.c
parentf85afc978f48f9a31253dd6be9c7817f02b1826c (diff)
parentf379012742c07f2e069b24d77e4f30a614f63080 (diff)
merge master
Diffstat (limited to 'src/code/z_message.c')
-rw-r--r--src/code/z_message.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/code/z_message.c b/src/code/z_message.c
index 94b0e4b91..0465513f4 100644
--- a/src/code/z_message.c
+++ b/src/code/z_message.c
@@ -256,34 +256,33 @@ void func_8014CCB4(PlayState* play, s16* decodedBufPos, s32* offset, f32* arg3)
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_8014D304.s")
-extern u16 D_801D0188[][9];
-extern s16 D_801D0250[];
+extern u16 D_801D0188[OWL_WARP_MAX][9];
+extern s16 D_801D0250[OWL_WARP_MAX];
void func_8014D62C(PlayState* play, s32* arg1, f32* arg2, s16* arg3) {
MessageContext* msgCtx = &play->msgCtx;
PauseContext* pauseCtx = &play->pauseCtx;
- s16 temp_s6;
+ s16 stringLimit;
s16 temp_s1 = *arg3;
s32 temp_s2 = *arg1;
f32 sp3C = *arg2;
- s16 phi_v0;
+ s16 owlWarpId;
s16 phi_s0;
- if ((func_8010A0A4(play) != 0) || (play->sceneId == SCENE_SECOM)) {
- phi_v0 = 0xA;
+ if (func_8010A0A4(play) || (play->sceneId == SCENE_SECOM)) {
+ owlWarpId = OWL_WARP_ENTRANCE;
} else {
- phi_v0 = pauseCtx->cursorPoint[PAUSE_WORLD_MAP];
+ owlWarpId = pauseCtx->cursorPoint[PAUSE_WORLD_MAP];
}
+ stringLimit = D_801D0250[owlWarpId];
- temp_s6 = D_801D0250[phi_v0];
-
- for (phi_s0 = 0; phi_s0 < temp_s6; phi_s0++, temp_s1++, temp_s2 += 0x80) {
- msgCtx->decodedBuffer.wchar[temp_s1] = D_801D0188[phi_v0][phi_s0];
- Font_LoadChar(play, D_801D0188[phi_v0][phi_s0], temp_s2);
+ for (phi_s0 = 0; phi_s0 < stringLimit; phi_s0++, temp_s1++, temp_s2 += 0x80) {
+ msgCtx->decodedBuffer.wchar[temp_s1] = D_801D0188[owlWarpId][phi_s0];
+ Font_LoadChar(play, D_801D0188[owlWarpId][phi_s0], temp_s2);
}
temp_s1--;
- sp3C += (temp_s6 - 1) * (16.0f * msgCtx->unk12098);
+ sp3C += (stringLimit - 1) * (16.0f * msgCtx->unk12098);
*arg3 = temp_s1;
*arg1 = temp_s2;