mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-23 07:21:19 +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
|
@ -119,8 +119,9 @@ u16 EnMa1_GetText(GlobalContext* globalCtx, Actor* thisx) {
|
|||
|
||||
s16 func_80AA0778(GlobalContext* globalCtx, Actor* thisx) {
|
||||
s16 ret = 1;
|
||||
switch (func_8010BDBC(&globalCtx->msgCtx)) {
|
||||
case 2:
|
||||
|
||||
switch (Message_GetState(&globalCtx->msgCtx)) {
|
||||
case TEXT_STATE_CLOSING:
|
||||
switch (thisx->textId) {
|
||||
case 0x2041:
|
||||
gSaveContext.infTable[8] |= 0x10;
|
||||
|
@ -150,23 +151,23 @@ s16 func_80AA0778(GlobalContext* globalCtx, Actor* thisx) {
|
|||
break;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
case 5:
|
||||
if (func_80106BC8(globalCtx) != 0) {
|
||||
case TEXT_STATE_CHOICE:
|
||||
case TEXT_STATE_EVENT:
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
ret = 2;
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if (func_80106BC8(globalCtx) != 0) {
|
||||
case TEXT_STATE_DONE:
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
ret = 3;
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
case 1:
|
||||
case 3:
|
||||
case 7:
|
||||
case 8:
|
||||
case 9:
|
||||
case TEXT_STATE_NONE:
|
||||
case TEXT_STATE_DONE_HAS_NEXT:
|
||||
case TEXT_STATE_DONE_FADING:
|
||||
case TEXT_STATE_SONG_DEMO_DONE:
|
||||
case TEXT_STATE_8:
|
||||
case TEXT_STATE_9:
|
||||
ret = 1;
|
||||
break;
|
||||
}
|
||||
|
@ -305,8 +306,8 @@ void func_80AA0D88(EnMa1* this, GlobalContext* globalCtx) {
|
|||
} else if (!(gSaveContext.eventChkInf[1] & 0x10) || CHECK_QUEST_ITEM(QUEST_SONG_EPONA)) {
|
||||
if (this->unk_1E8.unk_00 == 2) {
|
||||
this->actionFunc = func_80AA0EA0;
|
||||
globalCtx->msgCtx.unk_E3E7 = 4;
|
||||
globalCtx->msgCtx.msgMode = 0x36;
|
||||
globalCtx->msgCtx.stateTimer = 4;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -325,7 +326,7 @@ void func_80AA0EFC(EnMa1* this, GlobalContext* globalCtx) {
|
|||
this->unk_1E8.unk_00 = 0;
|
||||
this->actionFunc = func_80AA0D88;
|
||||
gSaveContext.eventChkInf[1] |= 4;
|
||||
globalCtx->msgCtx.msgMode = 0x36;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -347,7 +348,7 @@ void func_80AA0F44(EnMa1* this, GlobalContext* globalCtx) {
|
|||
player->stateFlags2 |= 0x2000000;
|
||||
player->unk_6A8 = &this->actor;
|
||||
this->actor.textId = 0x2061;
|
||||
func_8010B680(globalCtx, this->actor.textId, NULL);
|
||||
Message_StartTextbox(globalCtx, this->actor.textId, NULL);
|
||||
this->unk_1E8.unk_00 = 1;
|
||||
this->actor.flags |= 0x10000;
|
||||
this->actionFunc = func_80AA106C;
|
||||
|
@ -360,8 +361,8 @@ void func_80AA0F44(EnMa1* this, GlobalContext* globalCtx) {
|
|||
void func_80AA106C(EnMa1* this, GlobalContext* globalCtx) {
|
||||
GET_PLAYER(globalCtx)->stateFlags2 |= 0x800000;
|
||||
if (this->unk_1E8.unk_00 == 2) {
|
||||
func_800ED858(2);
|
||||
func_8010BD58(globalCtx, 9);
|
||||
Audio_OcaSetInstrument(2);
|
||||
func_8010BD58(globalCtx, OCARINA_ACTION_TEACH_EPONA);
|
||||
this->actor.flags &= ~0x10000;
|
||||
this->actionFunc = func_80AA10EC;
|
||||
}
|
||||
|
@ -369,15 +370,15 @@ void func_80AA106C(EnMa1* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80AA10EC(EnMa1* this, GlobalContext* globalCtx) {
|
||||
GET_PLAYER(globalCtx)->stateFlags2 |= 0x800000;
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 7) {
|
||||
func_8010BD58(globalCtx, 0x16);
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_SONG_DEMO_DONE) {
|
||||
func_8010BD58(globalCtx, OCARINA_ACTION_PLAYBACK_EPONA);
|
||||
this->actionFunc = func_80AA1150;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80AA1150(EnMa1* this, GlobalContext* globalCtx) {
|
||||
GET_PLAYER(globalCtx)->stateFlags2 |= 0x800000;
|
||||
if (globalCtx->msgCtx.unk_E3EE == 3) {
|
||||
if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_03) {
|
||||
globalCtx->nextEntranceIndex = 0x157;
|
||||
gSaveContext.nextCutsceneIndex = 0xFFF1;
|
||||
globalCtx->fadeTransition = 42;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue