summaryrefslogtreecommitdiff
path: root/src/code/z_message_nes.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_nes.c
parentb7b4b09e4d329cdf71480d799f6dd3a237bb809a (diff)
parente75b0c51f5a0856e03d7c5fd2e16171a982c4e53 (diff)
Merge remote-tracking branch 'upstream/master' into Aliens
Diffstat (limited to 'src/code/z_message_nes.c')
-rw-r--r--src/code/z_message_nes.c66
1 files changed, 39 insertions, 27 deletions
diff --git a/src/code/z_message_nes.c b/src/code/z_message_nes.c
index fef293b46..fb8dbfcbf 100644
--- a/src/code/z_message_nes.c
+++ b/src/code/z_message_nes.c
@@ -17,31 +17,43 @@ u8 D_801D06F0[4][8] = { { "rupee(s)" }, //EN
// rupeesTextLength
u8 D_801D0710[4] = {8,8,5,8};
-//TextArea
-char D_801D0714[11][16] = {
- "Great Bay Coast",
- "Zora Cape",
- "Snowhead",
- "Mountain Village",
- "Clock Town",
- "Milk Road",
- "Woodfall",
- "Southern Swamp",
- "Ikana Canyon",
- "Stone Tower",
- "Entrance"
- };
-
-//TextAreaLength
-s16 D_801D07C4[11] = {15,9,8,16,10,9,8,14,12,11,8};
+// sOwlWarpText
+char D_801D0714[OWL_WARP_MAX][16] = {
+ "Great Bay Coast", // OWL_WARP_GREAT_BAY_COAST
+ "Zora Cape", // OWL_WARP_ZORA_CAPE
+ "Snowhead", // OWL_WARP_SNOWHEAD
+ "Mountain Village", // OWL_WARP_MOUNTAIN_VILLAGE
+ "Clock Town", // OWL_WARP_CLOCK_TOWN
+ "Milk Road", // OWL_WARP_MILK_ROAD
+ "Woodfall", // OWL_WARP_WOODFALL
+ "Southern Swamp", // OWL_WARP_SOUTHERN_SWAMP
+ "Ikana Canyon", // OWL_WARP_IKANA_CANYON
+ "Stone Tower", // OWL_WARP_STONE_TOWER
+ "Entrance", // OWL_WARP_ENTRANCE
+};
+
+// sOwlWarpTextLength
+s16 D_801D07C4[OWL_WARP_MAX] = {
+ 15, // OWL_WARP_GREAT_BAY_COAST
+ 9, // OWL_WARP_ZORA_CAPE
+ 8, // OWL_WARP_SNOWHEAD
+ 16, // OWL_WARP_MOUNTAIN_VILLAGE
+ 10, // OWL_WARP_CLOCK_TOWN
+ 9, // OWL_WARP_MILK_ROAD
+ 8, // OWL_WARP_WOODFALL
+ 14, // OWL_WARP_SOUTHERN_SWAMP
+ 12, // OWL_WARP_IKANA_CANYON
+ 11, // OWL_WARP_STONE_TOWER
+ 8, // OWL_WARP_ENTRANCE
+};
#endif
extern f32 D_801D0470[159];
extern u8 D_801D06F0[4][8];
extern u8 D_801D0710[4];
-extern u8 D_801D0714[11][16];
-extern s16 D_801D07C4[11];
+extern u8 D_801D0714[OWL_WARP_MAX][16];
+extern s16 D_801D07C4[OWL_WARP_MAX];
void Message_FindMessageNES(PlayState* play, u16 textId) {
MessageContext* msgCtx = &play->msgCtx;
@@ -244,28 +256,28 @@ void Message_LoadTimeNES(PlayState* play, u8 arg1, s32* offset, f32* arg3, s16*
*arg3 = f;
}
-void Message_LoadAreaTextNES(PlayState* play, s32* offset, f32* arg2, s16* decodedBufPos) {
+void Message_LoadOwlWarpTextNES(PlayState* play, s32* offset, f32* arg2, s16* decodedBufPos) {
MessageContext* msgCtx = &play->msgCtx;
s16 p = *decodedBufPos;
s32 o = *offset;
f32 f = *arg2;
s16 i;
u8 currentChar;
- s16 currentArea;
+ s16 owlWarpId;
s16 stringLimit;
- if ((func_8010A0A4(play) != 0) || (play->sceneId == SCENE_SECOM)) {
- currentArea = 10;
+ if (func_8010A0A4(play) || (play->sceneId == SCENE_SECOM)) {
+ owlWarpId = OWL_WARP_ENTRANCE;
} else {
- currentArea = play->pauseCtx.cursorPoint[PAUSE_WORLD_MAP];
+ owlWarpId = play->pauseCtx.cursorPoint[PAUSE_WORLD_MAP];
}
- stringLimit = D_801D07C4[currentArea];
+ stringLimit = D_801D07C4[owlWarpId];
for (i = 0; i < stringLimit; i++) {
- msgCtx->decodedBuffer.schar[p] = D_801D0714[currentArea][i];
+ msgCtx->decodedBuffer.schar[p] = D_801D0714[owlWarpId][i];
currentChar = msgCtx->decodedBuffer.schar[p];
if (currentChar != ' ') {
- Font_LoadCharNES(play, D_801D0714[currentArea][i], o);
+ Font_LoadCharNES(play, D_801D0714[owlWarpId][i], o);
o += FONT_CHAR_TEX_SIZE;
}
currentChar = msgCtx->decodedBuffer.schar[p];