mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-22 15:01:17 +00:00
z_message_PAL, message_data_static and surrounding doc (#996)
* Initial progress on z_message_PAL, very messy * Fix merge * Some more progress * Fix merge * More z_message_PAL * Small progress * More small progress * message_data_static files OK * Prepare z_message_tables * Matched another function, small updates * Attempt to use asm-processor static-symbols branch * Refactor text id declarations * Begin large text codes parser function * Fix merge * Refactor done * Build OK, add color and highscore names * Remove encoded text headers and automatically encode during build * Fix kanfont * Various cleanups * DISP macros * Another match aside data * Further progress * Small improvements * Deduplicate magic values for text control codes, small improvements * Tiny progress * Minor cleanups * Clean up z_message_PAL comment * Progress on large functions * Further progress on large functions * Changes to mkldscript to link .data in the .rodata section * data OK * Few improvements * Use gDPLoadTextureBlock macros where appropriate * rm z_message_tables, progress on large functions * 2 more matches * Improvements * Small progress * More progress on big function * progress * match func_80107980 * match Message_Update * match func_8010BED8 * done * Progress on remaining large functions * Small progress on largest function * Another match, extract text and move to assets, improve text build system * Small nonmatchings improvements * docs wip * Largest function maybe equivalent * Fix merge * Document do_action values, largest function is almost instruction-matching * Rename NAVI do_action to NONE, as that appears to be how that value is used in practice * Fix merge * one match * Last function is instruction-matching * Fix * Improvements thanks to engineer124 * Stack matched thanks to petrie911, now just a/v/low t regalloc issues, some cleanup * More variables labeled, use text state enum everywhere * More labels and names * Fix * Actor_IsTalking -> Actor_TalkRequested * Match func_8010C39C and remove unused asm * More docs * Mostly ocarina related docs * All msgModes named * Fix assetclean * Cleanup * Extraction fixes and headers * Suggestions * Review suggestions * Change text extraction again, only extract if the headers do not already exist * Fix * Use ast for charmap, fix assetclean for real this time * Review suggestions * BGM ids and ran formatter * Review comments * rename include_readonly to include_data_with_rodata * Remove leading 0s in number directives * Review suggestions for message_data_static * textbox pos enum comments, rename several enum names from Message to TextBox Co-authored-by: Thar0 <maximilianc64@gmail.com> Co-authored-by: Zelllll <56516451+Zelllll@users.noreply.github.com> Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain> Co-authored-by: Roman971 <romanlasnier@hotmail.com>
This commit is contained in:
parent
03636166b3
commit
a497f33bda
216 changed files with 7052 additions and 16801 deletions
|
@ -53,7 +53,7 @@ void EnDs_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnDs_Talk(EnDs* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F334(&this->actor, globalCtx) != 0) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
this->actionFunc = EnDs_Wait;
|
||||
this->actor.flags &= ~0x10000;
|
||||
}
|
||||
|
@ -61,15 +61,15 @@ void EnDs_Talk(EnDs* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnDs_TalkNoEmptyBottle(EnDs* this, GlobalContext* globalCtx) {
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && (func_80106BC8(globalCtx) != 0)) {
|
||||
func_80106CCC(globalCtx);
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
this->actionFunc = EnDs_Wait;
|
||||
}
|
||||
this->unk_1E8 |= 1;
|
||||
}
|
||||
|
||||
void EnDs_TalkAfterGiveOddPotion(EnDs* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F194(&this->actor, globalCtx) != 0) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->actionFunc = EnDs_Talk;
|
||||
} else {
|
||||
this->actor.flags |= 0x10000;
|
||||
|
@ -78,7 +78,7 @@ void EnDs_TalkAfterGiveOddPotion(EnDs* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnDs_DisplayOddPotionText(EnDs* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F334(&this->actor, globalCtx) != 0) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
this->actor.textId = 0x504F;
|
||||
this->actionFunc = EnDs_TalkAfterGiveOddPotion;
|
||||
this->actor.flags &= ~0x100;
|
||||
|
@ -97,8 +97,8 @@ void EnDs_GiveOddPotion(EnDs* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnDs_TalkAfterBrewOddPotion(EnDs* this, GlobalContext* globalCtx) {
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && (func_80106BC8(globalCtx) != 0)) {
|
||||
func_80106CCC(globalCtx);
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
this->actionFunc = EnDs_GiveOddPotion;
|
||||
func_8002F434(&this->actor, globalCtx, GI_ODD_POTION, 10000.0f, 50.0f);
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ void EnDs_BrewOddPotion3(EnDs* this, GlobalContext* globalCtx) {
|
|||
this->brewTimer -= 1;
|
||||
} else {
|
||||
this->actionFunc = EnDs_TalkAfterBrewOddPotion;
|
||||
func_8010B720(globalCtx, 0x504D);
|
||||
Message_ContinueTextbox(globalCtx, 0x504D);
|
||||
}
|
||||
|
||||
Math_StepToF(&this->unk_1E4, 0, 0.03f);
|
||||
|
@ -141,17 +141,17 @@ void EnDs_BrewOddPotion1(EnDs* this, GlobalContext* globalCtx) {
|
|||
void EnDs_OfferOddPotion(EnDs* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 4) && (func_80106BC8(globalCtx) != 0)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE) && Message_ShouldAdvance(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0: // yes
|
||||
this->actionFunc = EnDs_BrewOddPotion1;
|
||||
this->brewTimer = 60;
|
||||
Flags_SetSwitch(globalCtx, 0x3F);
|
||||
globalCtx->msgCtx.msgMode = 0x37;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_PAUSED;
|
||||
player->exchangeItemId = EXCH_ITEM_NONE;
|
||||
break;
|
||||
case 1: // no
|
||||
func_8010B720(globalCtx, 0x504C);
|
||||
Message_ContinueTextbox(globalCtx, 0x504C);
|
||||
this->actionFunc = EnDs_Talk;
|
||||
}
|
||||
}
|
||||
|
@ -177,15 +177,15 @@ void EnDs_GiveBluePotion(EnDs* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnDs_OfferBluePotion(EnDs* this, GlobalContext* globalCtx) {
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 4) && (func_80106BC8(globalCtx) != 0)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE) && Message_ShouldAdvance(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0: // yes
|
||||
switch (EnDs_CheckRupeesAndBottle()) {
|
||||
case 0: // have less than 100 rupees
|
||||
func_8010B720(globalCtx, 0x500E);
|
||||
Message_ContinueTextbox(globalCtx, 0x500E);
|
||||
break;
|
||||
case 1: // have 100 rupees but no empty bottle
|
||||
func_8010B720(globalCtx, 0x96);
|
||||
Message_ContinueTextbox(globalCtx, 0x96);
|
||||
this->actionFunc = EnDs_TalkNoEmptyBottle;
|
||||
return;
|
||||
case 2: // have 100 rupees and empty bottle
|
||||
|
@ -197,7 +197,7 @@ void EnDs_OfferBluePotion(EnDs* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
break;
|
||||
case 1: // no
|
||||
func_8010B720(globalCtx, 0x500D);
|
||||
Message_ContinueTextbox(globalCtx, 0x500D);
|
||||
}
|
||||
this->actionFunc = EnDs_Talk;
|
||||
}
|
||||
|
@ -207,7 +207,7 @@ void EnDs_Wait(EnDs* this, GlobalContext* globalCtx) {
|
|||
Player* player = GET_PLAYER(globalCtx);
|
||||
s16 yawDiff;
|
||||
|
||||
if (func_8002F194(&this->actor, globalCtx) != 0) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
if (func_8002F368(globalCtx) == EXCH_ITEM_ODD_MUSHROOM) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
player->actor.textId = 0x504A;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue