summaryrefslogtreecommitdiff
path: root/src/code/z_message.c
diff options
context:
space:
mode:
authorpetrie911 <petrie911@users.noreply.github.com>2022-10-09 12:28:47 -0500
committerpetrie911 <petrie911@users.noreply.github.com>2022-10-09 12:28:47 -0500
commit01bcdd939cdca378f030ea5ae792dbaa27588dec (patch)
tree11b3f9b46b50dbc98e46c96d1a2ef1675084a5c2 /src/code/z_message.c
parentb7b4b09e4d329cdf71480d799f6dd3a237bb809a (diff)
parente75b0c51f5a0856e03d7c5fd2e16171a982c4e53 (diff)
Merge remote-tracking branch 'upstream/master' into Aliens
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 94f1e5992..de3a81c73 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;