Skip to content

Commit 8d27d45

Browse files
committed
Merge "Farore's Wind Textbox states Dungeon Name" (#2302)
2 parents cd86bed + 0c97aa4 commit 8d27d45

13 files changed

Lines changed: 14303 additions & 13941 deletions

File tree

ASM/build/asm_symbols.txt

Lines changed: 433 additions & 433 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ASM/build/bundle.o

1.44 KB
Binary file not shown.

ASM/build/c_symbols.txt

Lines changed: 416 additions & 415 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ASM/c/actor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ void Actor_BuildFlag(z64_actor_t* actor, xflag_t* flag, uint16_t actor_index, ui
4141
flag->scene = z64_game.scene_index;
4242
if (z64_game.scene_index == 0x3E) {
4343
flag->grotto.room = actor->room_index;
44-
flag->grotto.grotto_id = z64_file.grotto_id & 0x1F;
44+
flag->grotto.grotto_id = z64_file.respawn[RESPAWN_MODE_RETURN].data & 0x1F;
4545
flag->grotto.flag = actor_index;
4646
flag->grotto.subflag = subflag;
4747
} else {

ASM/c/debug.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ void draw_debug_menu(z64_disp_buf_t *db) {
171171

172172
// Shoutouts to OoTMM
173173
z64_Play_SetupRespawnPoint(&z64_game, 1, 0xDFF);
174-
z64_file.void_flag = 2;
174+
z64_file.respawn_flag = 2;
175175

176176
z64_game.scene_load_flag = 0x14;
177177
z64_game.fadeout_transition = 0x02;

ASM/c/get_items.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ override_key_t get_override_search_key(z64_actor_t *actor, uint8_t scene, uint8_
134134
};
135135
} else if (scene == 0x3E && actor->actor_id == 0x011A) {
136136
return (override_key_t){
137-
.scene = z64_file.grotto_id,
137+
.scene = z64_file.respawn[RESPAWN_MODE_RETURN].data,
138138
.type = OVR_GROTTO_SCRUB,
139139
.pad = 0,
140140
.flag = item_id,
@@ -763,7 +763,7 @@ bool Item00_KillActorIfFlagIsSet(z64_actor_t* actor) {
763763
flag.scene = z64_game.scene_index;
764764
if (z64_game.scene_index == 0x3E) {
765765
flag.grotto.room = actor->room_index;
766-
flag.grotto.grotto_id = z64_file.grotto_id & 0x1F;
766+
flag.grotto.grotto_id = z64_file.respawn[RESPAWN_MODE_RETURN].data & 0x1F;
767767
flag.grotto.flag = CURR_ACTOR_SPAWN_INDEX;
768768
flag.grotto.subflag = 0;
769769
} else {

ASM/c/message.c

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include "z64.h"
33
#include "stdbool.h"
44
#include "save.h"
5+
#include "dungeon_info.h"
56

67
// no support for kana since they're not part of the message charset
78
char FILENAME_ENCODING[256] = {
@@ -117,6 +118,96 @@ bool Message_Decode_Additional_Control_Codes(uint8_t currChar, uint32_t* pDecode
117118
(*pDecodedBufPos)--;
118119
return true;
119120
}
121+
case 0xF3: {
122+
// Farore's Wind destination
123+
switch (z64_file.respawn[RESPAWN_MODE_TOP].entranceIndex) {
124+
case 0x000:
125+
case 0x252: {
126+
// Deku Tree
127+
Message_AddString(msgCtx, pFont, pDecodedBufPos, pCharTexIdx, dungeons[0].name);
128+
break;
129+
}
130+
case 0x004:
131+
case 0x0C5: {
132+
// DC
133+
Message_AddString(msgCtx, pFont, pDecodedBufPos, pCharTexIdx, dungeons[1].name);
134+
break;
135+
}
136+
case 0x028:
137+
case 0x407: {
138+
// Jabu
139+
Message_AddString(msgCtx, pFont, pDecodedBufPos, pCharTexIdx, dungeons[2].name);
140+
break;
141+
}
142+
case 0x169:
143+
case 0x24E: {
144+
// Forest Temple
145+
Message_AddString(msgCtx, pFont, pDecodedBufPos, pCharTexIdx, dungeons[3].name);
146+
break;
147+
}
148+
case 0x165:
149+
case 0x175: {
150+
// Fire Temple
151+
Message_AddString(msgCtx, pFont, pDecodedBufPos, pCharTexIdx, dungeons[4].name);
152+
break;
153+
}
154+
case 0x010:
155+
case 0x423: {
156+
// Water Temple
157+
Message_AddString(msgCtx, pFont, pDecodedBufPos, pCharTexIdx, dungeons[5].name);
158+
break;
159+
}
160+
case 0x037:
161+
case 0x2B2: {
162+
// Shadow Temple
163+
Message_AddString(msgCtx, pFont, pDecodedBufPos, pCharTexIdx, dungeons[6].name);
164+
break;
165+
}
166+
case 0x082:
167+
case 0x2F5:
168+
case 0x3F0:
169+
case 0x3F4: {
170+
// Spirit Temple
171+
Message_AddString(msgCtx, pFont, pDecodedBufPos, pCharTexIdx, dungeons[7].name);
172+
break;
173+
}
174+
case 0x098: {
175+
// BotW
176+
Message_AddString(msgCtx, pFont, pDecodedBufPos, pCharTexIdx, dungeons[8].name);
177+
break;
178+
}
179+
case 0x088: {
180+
// Ice
181+
Message_AddString(msgCtx, pFont, pDecodedBufPos, pCharTexIdx, dungeons[9].name);
182+
break;
183+
}
184+
case 0x008: {
185+
// GTG
186+
Message_AddString(msgCtx, pFont, pDecodedBufPos, pCharTexIdx, dungeons[11].name);
187+
break;
188+
}
189+
case 0x41B:
190+
case 0x467:
191+
case 0x534:
192+
case 0x538:
193+
case 0x53C:
194+
case 0x540:
195+
case 0x544:
196+
case 0x548:
197+
case 0x54C: {
198+
// Ganon
199+
Message_AddString(msgCtx, pFont, pDecodedBufPos, pCharTexIdx, dungeons[12].name);
200+
break;
201+
}
202+
default: {
203+
// Vanilla text
204+
Message_AddString(msgCtx, pFont, pDecodedBufPos, pCharTexIdx, "the Warp Point");
205+
break;
206+
}
207+
}
208+
(*pDecodedBufPos)--;
209+
return true;
210+
}
120211
default: {
121212
return false;
122213
}

ASM/c/z64.h

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,30 @@ typedef struct {
564564
int16_t copyDestFileIndex; /* 0x1CA50 */
565565
} z64_FileChooseContext_t;
566566

567+
/**
568+
* The respawn mode names refer to the perceived player movement when respawning
569+
* "down": being on ground
570+
* "return": coming from the ground
571+
* "top": coming from the air
572+
*/
573+
typedef enum {
574+
/* 0x00 */ RESPAWN_MODE_DOWN, /* Normal Void Outs */
575+
/* 0x01 */ RESPAWN_MODE_RETURN, /* Grotto Returnpoints */
576+
/* 0x02 */ RESPAWN_MODE_TOP, /* Farore's Wind */
577+
/* 0x03 */ RESPAWN_MODE_MAX
578+
} RespawnMode;
579+
580+
typedef struct {
581+
/* 0x00 */ z64_xyzf_t pos;
582+
/* 0x0C */ int16_t yaw;
583+
/* 0x0E */ int16_t playerParams;
584+
/* 0x10 */ int16_t entranceIndex;
585+
/* 0x12 */ uint8_t roomIndex;
586+
/* 0x13 */ int8_t data;
587+
/* 0x14 */ uint32_t tempSwchFlags;
588+
/* 0x18 */ uint32_t tempCollectFlags;
589+
} RespawnData; // size = 0x1C
590+
567591
typedef struct {
568592
int32_t entrance_index; /* 0x0000 */
569593
int32_t link_age; /* 0x0004 */
@@ -737,18 +761,15 @@ typedef struct {
737761
char unk_0F_[0x0004]; /* 0x1358 */
738762
int32_t game_mode; /* 0x135C */
739763
uint32_t scene_setup_index; /* 0x1360 */
740-
int32_t void_flag; /* 0x1364 */
741-
z64_xyzf_t void_pos; /* 0x1368 */
742-
z64_angle_t void_yaw; /* 0x1374 */
743-
int16_t void_var; /* 0x1376 */
744-
int16_t void_entrance; /* 0x1378 */
745-
int8_t void_room_index; /* 0x137A */
746-
int8_t unk_10_; /* 0x137B */
747-
uint32_t temp_swch_flags; /* 0x137C */
748-
uint32_t temp_collect_flags; /* 0x1380 */
749-
char unk_11_[0x0013]; /* 0x1384 */
750-
uint8_t grotto_id; /* 0x1397 */
751-
char unk_12_[0x0030]; /* 0x1398 */
764+
int32_t respawn_flag; /* 0x1364 */
765+
RespawnData respawn[RESPAWN_MODE_MAX];/* 0x1368 */
766+
float entranceSpeed; /* 0x13BC */
767+
uint16_t entranceSound; /* 0x13C0 */
768+
char unk_10_[0x0001]; /* 0x13C2 */
769+
uint8_t retainWeatherMode; /* 0x13C3 */
770+
int16_t dogParams; /* 0x13C4 */
771+
uint8_t envHazardTextTriggerFlags;/* 0x13C6 */
772+
uint8_t showTitleCard; /* 0x13C7 */
752773
uint16_t nayrus_love_timer; /* 0x13C8 */
753774
char unk_13_[0x0004]; /* 0x13CA */
754775
int16_t timer_1_state; /* 0x13CE */

Messages.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
0xF0: ('silver_rupee', 1, lambda d: '<silver rupee count ' + "{:02x}".format(d) + '>' ),
6666
0xF1: ('key_count', 1, lambda d: '<key count ' + "{:02x}".format(d) + '>' ),
6767
0xF2: ('outgoing_item_filename', 0, lambda _: '<outgoing item filename>' ),
68+
0xF3: ('farores_wind_destination', 0, lambda _: '<farores_wind_destination>' ),
6869
}
6970

7071
# Maps unicode characters to corresponding bytes in OOTR's character set.
@@ -161,6 +162,7 @@
161162
(0x0038, "\x08\x13\x11You found the \x05\x41Megaton Hammer\x05\x40!\x01It's so heavy, you need to\x01use two hands to swing it!"),
162163
(0x0039, "\x08\x13\x0FYou found the \x05\x41Lens of Truth\x05\x40!\x01Mysterious things are hidden\x01everywhere!"),
163164
(0x003A, "\x08\x13\x08You found the \x05\x41Ocarina of Time\x05\x40!\x01It glows with a mystical light..."),
165+
(0x003B, "\x08You cast Farore's Wind!\x01\x1C\x05\x42Return to \xF3\x01Dispel the Warp Point\x01Exit\x05\x40"),
164166
(0x003C, "\x08\x13\x67You received the \x05\x41Fire\x01Medallion\x05\x40!\x01Darunia awakens as a Sage and\x01adds his power to yours!"),
165167
(0x003D, "\x08\x13\x68You received the \x05\x43Water\x01Medallion\x05\x40!\x01Ruto awakens as a Sage and\x01adds her power to yours!"),
166168
(0x003E, "\x08\x13\x66You received the \x05\x42Forest\x01Medallion\x05\x40!\x01Saria awakens as a Sage and\x01adds her power to yours!"),

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ issue. You should always Hard Reset to avoid this issue entirely.
139139
* The `Other` tab of the generator has been rearranged for better grouping of settings, and the `One Major Item per Dungeon` setting has been moved there since it was causing frequent failures with `Randomize Main Rule Settings`.
140140
* Biggoron's text after turning in the Eyedrops has been changed to avoid potential confusion.
141141
* Clarified the hint text for `HF Inside Fence Grotto`.
142+
* Farore's Wind now displays which dungeon it will warp Link to.
142143

143144
### 8.2
144145

0 commit comments

Comments
 (0)