mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-22 06:52:03 +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
|
@ -108,7 +108,7 @@ void EnMs_Wait(EnMs* this, GlobalContext* globalCtx) {
|
|||
yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
|
||||
EnMs_SetOfferText(this, globalCtx);
|
||||
|
||||
if (func_8002F194(&this->actor, globalCtx)) { // if talk is initiated
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) { // if talk is initiated
|
||||
this->actionFunc = EnMs_Talk;
|
||||
} else if ((this->actor.xzDistToPlayer < 90.0f) && (ABS(yawDiff) < 0x2000)) { // talk range
|
||||
func_8002F2CC(&this->actor, globalCtx, 90.0f);
|
||||
|
@ -118,23 +118,23 @@ void EnMs_Wait(EnMs* this, GlobalContext* globalCtx) {
|
|||
void EnMs_Talk(EnMs* this, GlobalContext* globalCtx) {
|
||||
u8 dialogState;
|
||||
|
||||
dialogState = func_8010BDBC(&globalCtx->msgCtx);
|
||||
if (dialogState != 4) {
|
||||
if ((dialogState == 6) && (func_80106BC8(globalCtx) != 0)) { // advanced final textbox
|
||||
dialogState = Message_GetState(&globalCtx->msgCtx);
|
||||
if (dialogState != TEXT_STATE_CHOICE) {
|
||||
if ((dialogState == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) { // advanced final textbox
|
||||
this->actionFunc = EnMs_Wait;
|
||||
}
|
||||
} else if (func_80106BC8(globalCtx) != 0) {
|
||||
} else if (Message_ShouldAdvance(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0: // yes
|
||||
if (gSaveContext.rupees < sPrices[BEANS_BOUGHT]) {
|
||||
func_8010B720(globalCtx, 0x4069); // not enough rupees text
|
||||
Message_ContinueTextbox(globalCtx, 0x4069); // not enough rupees text
|
||||
return;
|
||||
}
|
||||
func_8002F434(&this->actor, globalCtx, GI_BEAN, 90.0f, 10.0f);
|
||||
this->actionFunc = EnMs_Sell;
|
||||
return;
|
||||
case 1: // no
|
||||
func_8010B720(globalCtx, 0x4068);
|
||||
Message_ContinueTextbox(globalCtx, 0x4068);
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
@ -153,8 +153,8 @@ void EnMs_Sell(EnMs* this, GlobalContext* globalCtx) {
|
|||
|
||||
void EnMs_TalkAfterPurchase(EnMs* this, GlobalContext* globalCtx) {
|
||||
// if dialog state is 6 and player responded to textbox
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx)) == 6 && (func_80106BC8(globalCtx) != 0)) {
|
||||
func_8010B720(globalCtx, 0x406C);
|
||||
if ((Message_GetState(&globalCtx->msgCtx)) == TEXT_STATE_DONE && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_ContinueTextbox(globalCtx, 0x406C);
|
||||
this->actionFunc = EnMs_Talk;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue