1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-03 06:24:30 +00:00

Document elf_message scripting system (#1398)

* `cUpElfMsgs` -> `cUpMsgs`

Motivation:
ElfMessage is the name of the system that handles c-up messages from navi, but also messages from child/adult saria
so it would make sense to name this after the system name like "ElfMsg"
but "cUpElf" primarily reads like (to me) "c up navi" since the actor implementing navi is EnElf

I think it'd be better to clear that confusion between "navi" and "elfmsg system" by just not using "elf" in the name

* Standardize c-up navi messages ElfMessage data to be named after "CUp"

* -> "Navi"

* Make symbols in `elf_message_` segments static

* new docs

* change commands, format

* introduce navi file id

* use enum

* remove concat

* add clarifying comment for skip

* concat cmd type

* Hints -> QuestHint

* rename command header

* s -> g

* missed enum name

* singular

* missed one

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
This commit is contained in:
fig02 2022-10-15 13:24:13 -04:00 committed by GitHub
parent d42307561a
commit fd24ad6e67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 343 additions and 290 deletions

View file

@ -1267,7 +1267,7 @@ void func_80A05040(Actor* thisx, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE) && Message_ShouldAdvance(play)) {
switch (play->msgCtx.choiceIndex) {
case 0: // yes
Message_ContinueTextbox(play, ElfMessage_GetSariaText(play));
Message_ContinueTextbox(play, QuestHint_GetSariaTextId(play));
this->actor.update = func_80A05114;
break;
case 1: // no
@ -1301,7 +1301,7 @@ void func_80A05188(Actor* thisx, PlayState* play) {
func_80A04DE4(this, play);
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_ContinueTextbox(play, ElfMessage_GetSariaText(play));
Message_ContinueTextbox(play, QuestHint_GetSariaTextId(play));
this->actor.update = func_80A05114;
}
@ -1310,7 +1310,7 @@ void func_80A05188(Actor* thisx, PlayState* play) {
// ask to talk to navi
void func_80A05208(Actor* thisx, PlayState* play) {
s32 naviCUpText;
s32 naviTextId;
EnElf* this = (EnElf*)thisx;
func_80A04DE4(this, play);
@ -1318,10 +1318,10 @@ void func_80A05208(Actor* thisx, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE) && Message_ShouldAdvance(play)) {
switch (play->msgCtx.choiceIndex) {
case 0: // yes
naviCUpText = ElfMessage_GetCUpText(play);
naviTextId = QuestHint_GetNaviTextId(play);
if (naviCUpText != 0) {
Message_ContinueTextbox(play, naviCUpText);
if (naviTextId != 0) {
Message_ContinueTextbox(play, naviTextId);
} else {
Message_ContinueTextbox(play, 0x15F);
}
@ -1379,7 +1379,7 @@ void func_80A053F0(Actor* thisx, PlayState* play) {
if (player->naviTextId == 0) {
if (player->unk_664 == NULL) {
if (((gSaveContext.naviTimer >= 600) && (gSaveContext.naviTimer <= 3000)) || (nREG(89) != 0)) {
player->naviTextId = ElfMessage_GetCUpText(play);
player->naviTextId = QuestHint_GetNaviTextId(play);
if (player->naviTextId == 0x15F) {
player->naviTextId = 0;
@ -1395,7 +1395,7 @@ void func_80A053F0(Actor* thisx, PlayState* play) {
func_800F4524(&gSfxDefaultPos, NA_SE_VO_SK_LAUGH, 0x20);
thisx->focus.pos = thisx->world.pos;
if (thisx->textId == ElfMessage_GetCUpText(play)) {
if (thisx->textId == QuestHint_GetNaviTextId(play)) {
this->fairyFlags |= 0x80;
gSaveContext.naviTimer = 3001;
}