mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-03 06:24:30 +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
|
@ -182,7 +182,8 @@ void ArrowFire_Fly(ArrowFire* this, GlobalContext* globalCtx) {
|
|||
void ArrowFire_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
ArrowFire* this = THIS;
|
||||
|
||||
if (globalCtx->msgCtx.msgMode == 0xD || globalCtx->msgCtx.msgMode == 0x11) {
|
||||
if (globalCtx->msgCtx.msgMode == MSGMODE_OCARINA_CORRECT_PLAYBACK ||
|
||||
globalCtx->msgCtx.msgMode == MSGMODE_SONG_PLAYED) {
|
||||
Actor_Kill(&this->actor);
|
||||
} else {
|
||||
this->actionFunc(this, globalCtx);
|
||||
|
|
|
@ -183,7 +183,8 @@ void ArrowIce_Fly(ArrowIce* this, GlobalContext* globalCtx) {
|
|||
void ArrowIce_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
ArrowIce* this = THIS;
|
||||
|
||||
if (globalCtx->msgCtx.msgMode == 0xD || globalCtx->msgCtx.msgMode == 0x11) {
|
||||
if (globalCtx->msgCtx.msgMode == MSGMODE_OCARINA_CORRECT_PLAYBACK ||
|
||||
globalCtx->msgCtx.msgMode == MSGMODE_SONG_PLAYED) {
|
||||
Actor_Kill(&this->actor);
|
||||
} else {
|
||||
this->actionFunc(this, globalCtx);
|
||||
|
|
|
@ -181,7 +181,8 @@ void ArrowLight_Fly(ArrowLight* this, GlobalContext* globalCtx) {
|
|||
void ArrowLight_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
ArrowLight* this = THIS;
|
||||
|
||||
if (globalCtx->msgCtx.msgMode == 0xD || globalCtx->msgCtx.msgMode == 0x11) {
|
||||
if (globalCtx->msgCtx.msgMode == MSGMODE_OCARINA_CORRECT_PLAYBACK ||
|
||||
globalCtx->msgCtx.msgMode == MSGMODE_SONG_PLAYED) {
|
||||
Actor_Kill(&this->actor);
|
||||
} else {
|
||||
this->actionFunc(this, globalCtx);
|
||||
|
|
|
@ -182,7 +182,7 @@ void BgDyYoseizo_Bob(BgDyYoseizo* this, GlobalContext* globalCtx) {
|
|||
|
||||
void BgDyYoseizo_CheckMagicAcquired(BgDyYoseizo* this, GlobalContext* globalCtx) {
|
||||
if (Flags_GetSwitch(globalCtx, 0x38)) {
|
||||
globalCtx->msgCtx.unk_E3EE = 4;
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
if (globalCtx->sceneNum == SCENE_DAIYOUSEI_IZUMI) {
|
||||
if (!gSaveContext.magicAcquired && (this->fountainType != FAIRY_UPGRADE_MAGIC)) {
|
||||
Actor_Kill(&this->actor);
|
||||
|
@ -204,7 +204,7 @@ void BgDyYoseizo_ChooseType(BgDyYoseizo* this, GlobalContext* globalCtx) {
|
|||
|
||||
func_8002DF54(globalCtx, &this->actor, 1);
|
||||
// "Mode"
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ もうど ☆☆☆☆☆ %d\n" VT_RST, globalCtx->msgCtx.unk_E3EE);
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ もうど ☆☆☆☆☆ %d\n" VT_RST, globalCtx->msgCtx.ocarinaMode);
|
||||
givingReward = false;
|
||||
|
||||
if (globalCtx->sceneNum != SCENE_DAIYOUSEI_IZUMI) {
|
||||
|
@ -376,8 +376,8 @@ void BgDyYoseizo_SetupGreetPlayer_NoReward(BgDyYoseizo* this, GlobalContext* glo
|
|||
}
|
||||
|
||||
this->actor.textId = 0xDB;
|
||||
this->dialogState = 5;
|
||||
func_8010B680(globalCtx, this->actor.textId, NULL);
|
||||
this->dialogState = TEXT_STATE_EVENT;
|
||||
Message_StartTextbox(globalCtx, this->actor.textId, NULL);
|
||||
BgDyYoseizo_SpawnParticles(this, globalCtx, 0);
|
||||
this->actionFunc = BgDyYoseizo_GreetPlayer_NoReward;
|
||||
}
|
||||
|
@ -392,8 +392,8 @@ void BgDyYoseizo_GreetPlayer_NoReward(BgDyYoseizo* this, GlobalContext* globalCt
|
|||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
if ((this->dialogState == func_8010BDBC(&globalCtx->msgCtx)) && (func_80106BC8(globalCtx) != 0)) {
|
||||
func_80106CCC(globalCtx);
|
||||
if ((this->dialogState == Message_GetState(&globalCtx->msgCtx)) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
Interface_ChangeAlpha(5);
|
||||
this->actionFunc = BgDyYoseizo_SetupHealPlayer_NoReward;
|
||||
}
|
||||
|
@ -483,8 +483,8 @@ void BgDyYoseizo_HealPlayer_NoReward(BgDyYoseizo* this, GlobalContext* globalCtx
|
|||
|
||||
if (this->healingTimer == 1) {
|
||||
this->actor.textId = 0xDA;
|
||||
this->dialogState = 5;
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
this->dialogState = TEXT_STATE_EVENT;
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
this->actionFunc = BgDyYoseizo_SayFarewell_NoReward;
|
||||
return;
|
||||
}
|
||||
|
@ -500,8 +500,8 @@ void BgDyYoseizo_SayFarewell_NoReward(BgDyYoseizo* this, GlobalContext* globalCt
|
|||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
if ((this->dialogState == func_8010BDBC(&globalCtx->msgCtx)) && (func_80106BC8(globalCtx) != 0)) {
|
||||
func_80106CCC(globalCtx);
|
||||
if ((this->dialogState == Message_GetState(&globalCtx->msgCtx)) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
this->mouthState = 0;
|
||||
this->actionFunc = BgDyYoseizo_SetupSpinShrink;
|
||||
func_8005B1A4(GET_ACTIVE_CAM(globalCtx));
|
||||
|
|
|
@ -88,7 +88,7 @@ void BgGanonOtyuka_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
void BgGanonOtyuka_Destroy(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
BgGanonOtyuka* this = THIS;
|
||||
GlobalContext* globalCtx = globalCtx2;
|
||||
|
||||
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
|
||||
osSyncPrintf(VT_FGCOL(GREEN));
|
||||
|
|
|
@ -74,7 +74,7 @@ void func_8087B7E8(BgHaka* this, GlobalContext* globalCtx) {
|
|||
this->dyna.unk_150 = 0.0f;
|
||||
player->stateFlags2 &= ~0x10;
|
||||
if (!Gameplay_InCsMode(globalCtx)) {
|
||||
func_8010B680(globalCtx, 0x5073, NULL);
|
||||
Message_StartTextbox(globalCtx, 0x5073, NULL);
|
||||
this->dyna.actor.params = 100;
|
||||
this->actionFunc = func_8087BAE4;
|
||||
}
|
||||
|
|
|
@ -132,7 +132,7 @@ void BgHakaShip_Move(BgHakaShip* this, GlobalContext* globalCtx) {
|
|||
if (distanceFromHome > 7600.0f && !Gameplay_InCsMode(globalCtx)) {
|
||||
this->counter = 40;
|
||||
this->dyna.actor.speedXZ = 0.0f;
|
||||
func_8010B680(globalCtx, 0x5071, NULL);
|
||||
Message_StartTextbox(globalCtx, 0x5071, NULL);
|
||||
this->actionFunc = BgHakaShip_SetupCrash;
|
||||
} else {
|
||||
Math_StepToF(&this->dyna.actor.speedXZ, 4.0f, 0.2f);
|
||||
|
|
|
@ -239,7 +239,7 @@ void BgMizuWater_ChangeWaterLevel(BgMizuWater* this, GlobalContext* globalCtx) {
|
|||
if (Math_StepToF(&this->actor.world.pos.y, this->targetY, 5.0f)) {
|
||||
globalCtx->roomCtx.unk_74[0] = 0;
|
||||
this->actionFunc = BgMizuWater_WaitForAction;
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
}
|
||||
BgMizuWater_SetWaterBoxesHeight(globalCtx->colCtx.colHeader->waterBoxes, this->actor.world.pos.y);
|
||||
break;
|
||||
|
|
|
@ -189,7 +189,8 @@ void func_808A3D58(BgMoriHineri* this, GlobalContext* globalCtx) {
|
|||
this->actionFunc = func_808A3E54;
|
||||
|
||||
mainCamChildIdx = globalCtx->cameraPtrs[MAIN_CAM]->childCamIdx;
|
||||
if ((mainCamChildIdx != SUBCAM_FREE) && (globalCtx->cameraPtrs[mainCamChildIdx]->setting == CAM_SET_CS_TWISTED_HALLWAY)) {
|
||||
if ((mainCamChildIdx != SUBCAM_FREE) &&
|
||||
(globalCtx->cameraPtrs[mainCamChildIdx]->setting == CAM_SET_CS_TWISTED_HALLWAY)) {
|
||||
OnePointCutscene_EndCutscene(globalCtx, mainCamChildIdx);
|
||||
}
|
||||
OnePointCutscene_Init(globalCtx, 3260, 40, &this->dyna.actor, MAIN_CAM);
|
||||
|
|
|
@ -241,9 +241,9 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
this->unk_3B0.y = 1086.0f;
|
||||
this->unk_3B0.z = -200.0f;
|
||||
if (this->unk_398 == 150) {
|
||||
func_8010B680(globalCtx, 0x70D3, NULL);
|
||||
Message_StartTextbox(globalCtx, 0x70D3, NULL);
|
||||
}
|
||||
if (this->unk_398 > 250 && (func_8010BDBC(&globalCtx->msgCtx) == 0)) {
|
||||
if (this->unk_398 > 250 && Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_NONE) {
|
||||
this->unk_39C = 2;
|
||||
this->unk_398 = 0;
|
||||
this->unk_410.x = 0.0f;
|
||||
|
@ -262,7 +262,7 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
player->actor.shape.rot.y = -0x5000;
|
||||
sZelda->actor.shape.rot.y = -0x5000;
|
||||
if (this->unk_398 == 60) {
|
||||
func_8010B680(globalCtx, 0x70D4, NULL);
|
||||
Message_StartTextbox(globalCtx, 0x70D4, NULL);
|
||||
}
|
||||
if (this->unk_398 == 40) {
|
||||
sZelda->unk_3C8 = 1;
|
||||
|
@ -284,7 +284,7 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
} else {
|
||||
this->unk_3B0.y = player->actor.world.pos.y + 47.0f + 7.0f;
|
||||
}
|
||||
if ((this->unk_398 > 170) && (func_8010BDBC(&globalCtx->msgCtx) == 0)) {
|
||||
if ((this->unk_398 > 170) && (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_NONE)) {
|
||||
this->unk_39C = 3;
|
||||
this->unk_398 = 0;
|
||||
this->unk_410.x = 0.0f;
|
||||
|
@ -331,7 +331,7 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
case 5:
|
||||
this->unk_339 = 4;
|
||||
if (this->actor.xzDistToPlayer < 500.0f) {
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
this->unk_39C = 10;
|
||||
this->unk_398 = 0;
|
||||
func_80064520(globalCtx, &globalCtx->csCtx);
|
||||
|
@ -825,7 +825,7 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
case 28:
|
||||
if (this->unk_398 == 5) {
|
||||
func_8010B680(globalCtx, 0x70D6, NULL);
|
||||
Message_StartTextbox(globalCtx, 0x70D6, NULL);
|
||||
}
|
||||
if (D_8090EB30 != NULL) {
|
||||
this->unk_3A4.x = D_8090EB30->world.pos.x - 20.0f;
|
||||
|
@ -834,7 +834,7 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
Math_ApproachF(&this->unk_3B0.x, D_8090EB30->world.pos.x, 0.2f, 50.0f);
|
||||
Math_ApproachF(&this->unk_3B0.y, D_8090EB30->world.pos.y, 0.2f, 50.0f);
|
||||
Math_ApproachF(&this->unk_3B0.z, D_8090EB30->world.pos.z, 0.2f, 50.0f);
|
||||
if ((this->unk_398 > 40) && (func_8010BDBC(&globalCtx->msgCtx) == 0)) {
|
||||
if ((this->unk_398 > 40) && (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_NONE)) {
|
||||
this->unk_39C = 29;
|
||||
this->unk_398 = 0;
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &object_ganon_anime3_Anim_0147E0, 0.0f);
|
||||
|
@ -1329,9 +1329,9 @@ void func_80900890(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
Math_ApproachZeroF(&this->unk_324, 1.0f, 5.0f);
|
||||
Math_ApproachF(&globalCtx->envCtx.unk_D8, 1.0f, 1.0f, 1.0f / 51);
|
||||
if (this->unk_1A2[1] == 80) {
|
||||
func_8010B680(globalCtx, 0x70D7, NULL);
|
||||
Message_StartTextbox(globalCtx, 0x70D7, NULL);
|
||||
}
|
||||
if ((this->unk_1A2[1] < 30) && (func_8010BDBC(&globalCtx->msgCtx) == 0)) {
|
||||
if ((this->unk_1A2[1] < 30) && (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_NONE)) {
|
||||
temp_v0 = Gameplay_GetCamera(globalCtx, MAIN_CAM);
|
||||
temp_v0->eye = this->unk_3A4;
|
||||
temp_v0->eyeNext = this->unk_3A4;
|
||||
|
@ -1558,9 +1558,9 @@ void func_8090120C(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
this->unk_3B0.y = sZelda->actor.world.pos.y + 40.0f;
|
||||
this->unk_3B0.z = sZelda->actor.world.pos.z;
|
||||
if (this->unk_398 == 10) {
|
||||
func_8010B680(globalCtx, 0x70D8, NULL);
|
||||
Message_StartTextbox(globalCtx, 0x70D8, NULL);
|
||||
}
|
||||
if ((this->unk_398 > 80) && (func_8010BDBC(&globalCtx->msgCtx) == 0)) {
|
||||
if ((this->unk_398 > 80) && (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_NONE)) {
|
||||
this->unk_39C = 4;
|
||||
this->unk_398 = 0;
|
||||
}
|
||||
|
@ -1741,7 +1741,7 @@ void func_8090120C(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
this->unk_39C = 9;
|
||||
this->unk_398 = 0;
|
||||
sZelda->unk_3C8 = 11;
|
||||
func_8010B680(globalCtx, 0x70D9, NULL);
|
||||
Message_StartTextbox(globalCtx, 0x70D9, NULL);
|
||||
this->unk_336 = 0;
|
||||
globalCtx->envCtx.unk_D8 = 0.0f;
|
||||
}
|
||||
|
|
|
@ -1035,7 +1035,7 @@ void BossGanondrof_Death(BossGanondrof* this, GlobalContext* globalCtx) {
|
|||
GND_BOSSROOM_CENTER_X, GND_BOSSROOM_CENTER_Y + 3.0f, GND_BOSSROOM_CENTER_Z, 0x4000,
|
||||
0, 0, FHGFIRE_WARP_DEATH);
|
||||
this->actor.child = &horseTemp->actor;
|
||||
func_8010B680(globalCtx, 0x108E, NULL);
|
||||
Message_StartTextbox(globalCtx, 0x108E, NULL);
|
||||
}
|
||||
|
||||
this->actor.shape.rot.y -= 0xC8;
|
||||
|
|
|
@ -1215,7 +1215,7 @@ void BossMo_IntroCs(BossMo* this, GlobalContext* globalCtx) {
|
|||
switch (this->csState) {
|
||||
case MO_INTRO_WAIT:
|
||||
if (this->timers[0] == 1) {
|
||||
func_8010B680(globalCtx, 0x403F, NULL);
|
||||
Message_StartTextbox(globalCtx, 0x403F, NULL);
|
||||
}
|
||||
if (((fabsf(player->actor.world.pos.z - 180.0f) < 40.0f) &&
|
||||
(fabsf(player->actor.world.pos.x - 180.0f) < 40.0f)) ||
|
||||
|
@ -1239,7 +1239,7 @@ void BossMo_IntroCs(BossMo* this, GlobalContext* globalCtx) {
|
|||
sMorphaTent1->work[MO_TENT_ACTION_STATE] = MO_TENT_READY;
|
||||
sMorphaTent1->timers[0] = 30000;
|
||||
Audio_QueueSeqCmd(0x103200FF);
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1518,11 +1518,11 @@ void BossTw_TwinrovaMergeCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
// fallthrough
|
||||
case 1:
|
||||
if (this->work[CS_TIMER_2] == 20) {
|
||||
func_8010B680(globalCtx, 0x6059, NULL);
|
||||
Message_StartTextbox(globalCtx, 0x6059, NULL);
|
||||
}
|
||||
|
||||
if (this->work[CS_TIMER_2] == 80) {
|
||||
func_8010B680(globalCtx, 0x605A, NULL);
|
||||
Message_StartTextbox(globalCtx, 0x605A, NULL);
|
||||
}
|
||||
|
||||
this->subCamAt.x = 0.0f;
|
||||
|
@ -1832,7 +1832,7 @@ void BossTw_TwinrovaIntroCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
updateCam = 1;
|
||||
|
||||
if (this->work[CS_TIMER_1] == 30) {
|
||||
func_8010B680(globalCtx, 0x6048, NULL);
|
||||
Message_StartTextbox(globalCtx, 0x6048, NULL);
|
||||
}
|
||||
|
||||
Math_ApproachF(&this->subCamUpdateRate, 0.01f, 1.0f, 0.0001f);
|
||||
|
@ -1910,7 +1910,7 @@ void BossTw_TwinrovaIntroCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
Math_ApproachF(&this->subCamUpdateRate, 1.0f, 1.0f, 0.02f);
|
||||
|
||||
if (this->work[CS_TIMER_1] == 30) {
|
||||
func_8010B680(globalCtx, 0x6049, NULL);
|
||||
Message_StartTextbox(globalCtx, 0x6049, NULL);
|
||||
}
|
||||
|
||||
if (this->work[CS_TIMER_1] > 80) {
|
||||
|
@ -2074,7 +2074,7 @@ void BossTw_TwinrovaIntroCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
Math_ApproachF(&this->subCamUpdateRate, 1.0f, 1.0f, 0.02f);
|
||||
|
||||
if (this->work[CS_TIMER_1] == 30) {
|
||||
func_8010B680(globalCtx, 0x604A, NULL);
|
||||
Message_StartTextbox(globalCtx, 0x604A, NULL);
|
||||
}
|
||||
|
||||
if (this->work[CS_TIMER_1] > 80) {
|
||||
|
@ -2531,7 +2531,7 @@ void BossTw_DeathCSMsgSfx(BossTw* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (msgId2 != 0) {
|
||||
func_8010B680(globalCtx, msgId2, NULL);
|
||||
Message_StartTextbox(globalCtx, msgId2, NULL);
|
||||
|
||||
if (sp35) {
|
||||
D_8094C876 = 10;
|
||||
|
@ -2541,7 +2541,7 @@ void BossTw_DeathCSMsgSfx(BossTw* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (msgId1 != 0) {
|
||||
func_8010B680(globalCtx, msgId1, NULL);
|
||||
Message_StartTextbox(globalCtx, msgId1, NULL);
|
||||
}
|
||||
|
||||
switch (kotakeAnim) {
|
||||
|
|
|
@ -850,7 +850,7 @@ s32 func_80986A5C(DemoIm* this, GlobalContext* globalCtx) {
|
|||
|
||||
s32 func_80986AD0(DemoIm* this, GlobalContext* globalCtx) {
|
||||
this->actor.flags |= 9;
|
||||
if (!func_8002F194(&this->actor, globalCtx)) {
|
||||
if (!Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->actor.textId = 0x708E;
|
||||
func_8002F2F4(&this->actor, globalCtx);
|
||||
} else {
|
||||
|
@ -860,7 +860,7 @@ s32 func_80986AD0(DemoIm* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80986B2C(GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 2) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
globalCtx->nextEntranceIndex = 0xCD;
|
||||
|
|
|
@ -868,9 +868,9 @@ void DemoKankyo_DrawWarpSparkles(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->unk_150[i].unk_18 * (0.018f * temp_f22), MTXMODE_APPLY);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, 255, 255, 255, 255);
|
||||
if (this->actor.params == DEMOKANKYO_WARP_OUT) {
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, sWarpSparkleEnvColors[globalCtx->msgCtx.unk_E3EC].r,
|
||||
sWarpSparkleEnvColors[globalCtx->msgCtx.unk_E3EC].g,
|
||||
sWarpSparkleEnvColors[globalCtx->msgCtx.unk_E3EC].b, 255);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, sWarpSparkleEnvColors[globalCtx->msgCtx.lastPlayedSong].r,
|
||||
sWarpSparkleEnvColors[globalCtx->msgCtx.lastPlayedSong].g,
|
||||
sWarpSparkleEnvColors[globalCtx->msgCtx.lastPlayedSong].b, 255);
|
||||
} else {
|
||||
s8 respawnData = gSaveContext.respawn[1].data;
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, sWarpSparkleEnvColors[respawnData].r,
|
||||
|
|
|
@ -573,13 +573,13 @@ void func_80999EE0(DoorWarp1* this, GlobalContext* globalCtx) {
|
|||
Gameplay_CameraSetAtEye(globalCtx, sRutoWarpSubCamId, &at, &eye);
|
||||
Gameplay_CameraSetFov(globalCtx, sRutoWarpSubCamId, 90.0f);
|
||||
this->rutoWarpState = WARP_BLUE_RUTO_STATE_TALKING;
|
||||
func_8010B680(globalCtx, 0x4022, NULL);
|
||||
Message_StartTextbox(globalCtx, 0x4022, NULL);
|
||||
DoorWarp1_SetupAction(this, func_80999FE4);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80999FE4(DoorWarp1* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 0) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_NONE) {
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_LINK_WARP, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
OnePointCutscene_Init(globalCtx, 0x25E9, 999, &this->actor, MAIN_CAM);
|
||||
Gameplay_CopyCamera(globalCtx, -1, sRutoWarpSubCamId);
|
||||
|
|
|
@ -151,7 +151,7 @@ void ElfMsg_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
ElfMsg* this = THIS;
|
||||
|
||||
if (!ElfMsg_KillCheck(this, globalCtx)) {
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
if (((this->actor.params >> 8) & 0x3F) != 0x3F) {
|
||||
Flags_SetSwitch(globalCtx, (this->actor.params >> 8) & 0x3F);
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@ s32 ElfMsg2_GetMessageId(ElfMsg2* this) {
|
|||
void ElfMsg2_WaitForTextClose(ElfMsg2* this, GlobalContext* globalCtx) {
|
||||
s32 switchFlag;
|
||||
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
if (this->actor.world.rot.z != 1) {
|
||||
Actor_Kill(&this->actor);
|
||||
switchFlag = (this->actor.params >> 8) & 0x3F;
|
||||
|
@ -122,7 +122,7 @@ void ElfMsg2_WaitForTextClose(ElfMsg2* this, GlobalContext* globalCtx) {
|
|||
* Runs while Navi text is not up.
|
||||
*/
|
||||
void ElfMsg2_WaitForTextRead(ElfMsg2* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
ElfMsg2_SetupAction(this, ElfMsg2_WaitForTextClose);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -106,13 +106,13 @@ s32 EnAni_SetText(EnAni* this, GlobalContext* globalCtx, u16 textId) {
|
|||
}
|
||||
|
||||
void func_809B04F0(EnAni* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
EnAni_SetupAction(this, func_809B064C);
|
||||
}
|
||||
}
|
||||
|
||||
void func_809B0524(EnAni* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
EnAni_SetupAction(this, func_809B07F8);
|
||||
}
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ void func_809B0558(EnAni* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_809B05F0(EnAni* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
EnAni_SetupAction(this, func_809B0558);
|
||||
}
|
||||
func_8002F434(&this->actor, globalCtx, GI_HEART_PIECE, 10000.0f, 200.0f);
|
||||
|
@ -153,7 +153,7 @@ void func_809B064C(EnAni* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
if (this->actor.textId == 0x5056) {
|
||||
EnAni_SetupAction(this, func_809B04F0);
|
||||
} else if (this->actor.textId == 0x5055) {
|
||||
|
@ -179,7 +179,7 @@ void func_809B07F8(EnAni* this, GlobalContext* globalCtx) {
|
|||
u16 textId;
|
||||
|
||||
yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
if (this->actor.textId == 0x5056) {
|
||||
EnAni_SetupAction(this, func_809B0524);
|
||||
} else if (this->actor.textId == 0x5055) {
|
||||
|
|
|
@ -170,7 +170,7 @@ s32 func_809B55EC(EnAttackNiw* this, GlobalContext* globalCtx) {
|
|||
s16 sp1C;
|
||||
|
||||
Actor_SetFocus(&this->actor, this->unk_2E4);
|
||||
func_8002F374(globalCtx, &this->actor, &sp1E, &sp1C);
|
||||
Actor_GetScreenPos(globalCtx, &this->actor, &sp1E, &sp1C);
|
||||
if ((this->actor.projectedPos.z < -20.0f) || (sp1E < 0) || (sp1E > SCREEN_WIDTH) || (sp1C < 0) ||
|
||||
(sp1C > SCREEN_HEIGHT)) {
|
||||
return 0;
|
||||
|
@ -205,7 +205,7 @@ void func_809B5670(EnAttackNiw* this, GlobalContext* globalCtx) {
|
|||
Math_ApproachF(&this->unk_2DC, 5000.0f, 1.0f, 100.0f);
|
||||
|
||||
Actor_SetFocus(&this->actor, this->unk_2E4);
|
||||
func_8002F374(globalCtx, &this->actor, &sp4E, &sp4C);
|
||||
Actor_GetScreenPos(globalCtx, &this->actor, &sp4E, &sp4C);
|
||||
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
this->unk_2D4 = this->actor.yawTowardsPlayer;
|
||||
|
|
|
@ -92,7 +92,7 @@ void EnBomBowMan_SetupWaitAsleep(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
|||
this->frameCount = (f32)Animation_GetLastFrame(&gChuGirlNoddingOffAnim);
|
||||
Animation_Change(&this->skelAnime, &gChuGirlNoddingOffAnim, 1.0f, 0.0f, this->frameCount, ANIMMODE_LOOP, -10.0f);
|
||||
this->actor.textId = 0xC0;
|
||||
this->dialogState = 5;
|
||||
this->dialogState = TEXT_STATE_EVENT;
|
||||
this->actionFunc = EnBomBowMan_WaitAsleep;
|
||||
}
|
||||
|
||||
|
@ -101,7 +101,7 @@ void EnBomBowMan_WaitAsleep(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
|||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->actionFunc = EnBomBowMan_TalkAsleep;
|
||||
} else {
|
||||
yawDiff = ABS((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y));
|
||||
|
@ -115,8 +115,8 @@ void EnBomBowMan_WaitAsleep(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
|||
void EnBomBowMan_TalkAsleep(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == this->dialogState) && (func_80106BC8(globalCtx) != 0)) {
|
||||
globalCtx->msgCtx.msgMode = 0x37;
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == this->dialogState) && Message_ShouldAdvance(globalCtx)) {
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_PAUSED;
|
||||
this->actionFunc = EnBomBowMan_WakeUp;
|
||||
}
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ void EnBomBowMan_BlinkAwake(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
|||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (frameCount == 30.0f) {
|
||||
this->dialogState = 5;
|
||||
this->dialogState = TEXT_STATE_EVENT;
|
||||
|
||||
// Check for beaten Dodongo's Cavern
|
||||
if ((gSaveContext.eventChkInf[2] & 0x20) || BREG(2)) {
|
||||
|
@ -142,7 +142,7 @@ void EnBomBowMan_BlinkAwake(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
|||
this->actor.textId = 0x7058;
|
||||
}
|
||||
}
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
|
||||
if ((this->eyeTextureIndex == 0) && (this->eyeMode == CHU_GIRL_EYES_BLINK_RAPIDLY) && (this->blinkTimer == 0)) {
|
||||
// Blink twice, then move on
|
||||
|
@ -157,8 +157,8 @@ void EnBomBowMan_BlinkAwake(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
|||
void EnBomBowMan_CheckBeatenDC(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == this->dialogState) && (func_80106BC8(globalCtx) != 0)) {
|
||||
func_80106CCC(globalCtx);
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == this->dialogState) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
this->frameCount = (f32)Animation_GetLastFrame(&gChuGirlLeanOverCounterAnim);
|
||||
Animation_Change(&this->skelAnime, &gChuGirlLeanOverCounterAnim, 1.0f, 0.0f, this->frameCount, ANIMMODE_LOOP,
|
||||
-10.0f);
|
||||
|
@ -170,8 +170,8 @@ void EnBomBowMan_CheckBeatenDC(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
|||
this->actionFunc = EnBomBowMan_WaitNotBeatenDC;
|
||||
} else {
|
||||
this->actor.textId = 0x18;
|
||||
this->dialogState = 4;
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
this->dialogState = TEXT_STATE_CHOICE;
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
this->actionFunc = EnBomBowlMan_HandlePlayChoice;
|
||||
}
|
||||
}
|
||||
|
@ -180,7 +180,7 @@ void EnBomBowMan_CheckBeatenDC(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
|||
void EnBomBowMan_WaitNotBeatenDC(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->actionFunc = EnBomBowMan_TalkNotBeatenDC;
|
||||
} else {
|
||||
func_8002F2CC(&this->actor, globalCtx, 120.0f);
|
||||
|
@ -190,8 +190,8 @@ void EnBomBowMan_WaitNotBeatenDC(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
|||
void EnBomBowMan_TalkNotBeatenDC(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == this->dialogState) && (func_80106BC8(globalCtx) != 0)) {
|
||||
func_80106CCC(globalCtx);
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == this->dialogState) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
this->actionFunc = EnBomBowMan_WaitNotBeatenDC;
|
||||
}
|
||||
}
|
||||
|
@ -206,10 +206,10 @@ void EnBomBowMan_SetupRunGame(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
|||
this->actor.textId = 0x1A;
|
||||
}
|
||||
|
||||
this->dialogState = 4;
|
||||
this->dialogState = TEXT_STATE_CHOICE;
|
||||
} else {
|
||||
this->actor.textId = 0x19;
|
||||
this->dialogState = 5;
|
||||
this->dialogState = TEXT_STATE_EVENT;
|
||||
}
|
||||
|
||||
this->actionFunc = EnBomBowMan_RunGame;
|
||||
|
@ -252,7 +252,7 @@ void EnBomBowMan_RunGame(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (this->gameResult != 0) { // won or lost
|
||||
this->actor.textId = 0x1A;
|
||||
this->dialogState = 4;
|
||||
this->dialogState = TEXT_STATE_CHOICE;
|
||||
this->minigamePlayStatus = 0;
|
||||
|
||||
if ((this->exItem != NULL) && (this->exItem->actor.update != NULL)) {
|
||||
|
@ -262,14 +262,14 @@ void EnBomBowMan_RunGame(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
|||
|
||||
globalCtx->bombchuBowlingStatus = 0;
|
||||
this->playingAgain = true;
|
||||
func_8010B680(globalCtx, this->actor.textId, NULL);
|
||||
Message_StartTextbox(globalCtx, this->actor.textId, NULL);
|
||||
|
||||
if (this->gameResult == 2) {
|
||||
func_8002DF54(globalCtx, NULL, 8);
|
||||
}
|
||||
this->actionFunc = EnBomBowlMan_HandlePlayChoice;
|
||||
} else {
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
if (this->minigamePlayStatus == 0) {
|
||||
this->actionFunc = EnBomBowlMan_HandlePlayChoice;
|
||||
} else {
|
||||
|
@ -288,8 +288,8 @@ void EnBomBowMan_RunGame(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
|||
void EnBomBowlMan_HandlePlayChoice(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == this->dialogState) && (func_80106BC8(globalCtx) != 0)) {
|
||||
func_80106CCC(globalCtx);
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == this->dialogState) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0: // Yes
|
||||
|
@ -302,13 +302,13 @@ void EnBomBowlMan_HandlePlayChoice(EnBomBowlMan* this, GlobalContext* globalCtx)
|
|||
|
||||
if (!this->startedPlaying && !this->playingAgain) {
|
||||
this->actor.textId = 0x19;
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
this->dialogState = 5;
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
this->dialogState = TEXT_STATE_EVENT;
|
||||
this->actionFunc = func_809C41FC;
|
||||
} else {
|
||||
this->actor.textId = 0x1B;
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
this->dialogState = 5;
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
this->dialogState = TEXT_STATE_EVENT;
|
||||
OnePointCutscene_Init(globalCtx, 8010, -99, NULL, MAIN_CAM);
|
||||
func_8002DF54(globalCtx, NULL, 8);
|
||||
this->actionFunc = EnBomBowMan_SetupChooseShowPrize;
|
||||
|
@ -316,8 +316,8 @@ void EnBomBowlMan_HandlePlayChoice(EnBomBowlMan* this, GlobalContext* globalCtx)
|
|||
} else {
|
||||
this->playingAgain = false;
|
||||
this->actor.textId = 0x85;
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
this->dialogState = 5;
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
this->dialogState = TEXT_STATE_EVENT;
|
||||
this->actionFunc = func_809C41FC;
|
||||
}
|
||||
break;
|
||||
|
@ -325,8 +325,8 @@ void EnBomBowlMan_HandlePlayChoice(EnBomBowlMan* this, GlobalContext* globalCtx)
|
|||
case 1: // No
|
||||
this->playingAgain = false;
|
||||
this->actor.textId = 0x2D;
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
this->dialogState = 5;
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
this->dialogState = TEXT_STATE_EVENT;
|
||||
this->actionFunc = func_809C41FC;
|
||||
}
|
||||
}
|
||||
|
@ -334,8 +334,8 @@ void EnBomBowlMan_HandlePlayChoice(EnBomBowlMan* this, GlobalContext* globalCtx)
|
|||
|
||||
void func_809C41FC(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == this->dialogState) && (func_80106BC8(globalCtx) != 0)) {
|
||||
func_80106CCC(globalCtx);
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == this->dialogState) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
|
||||
if (((this->actor.textId == 0x2D) || (this->actor.textId == 0x85)) && Flags_GetSwitch(globalCtx, 0x38)) {
|
||||
Flags_UnsetSwitch(globalCtx, 0x38);
|
||||
|
@ -343,8 +343,8 @@ void func_809C41FC(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (this->minigamePlayStatus == 1) {
|
||||
this->actor.textId = 0x1B;
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
this->dialogState = 5;
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
this->dialogState = TEXT_STATE_EVENT;
|
||||
OnePointCutscene_Init(globalCtx, 8010, -99, NULL, MAIN_CAM);
|
||||
func_8002DF54(globalCtx, NULL, 8);
|
||||
this->actionFunc = EnBomBowMan_SetupChooseShowPrize;
|
||||
|
@ -364,7 +364,7 @@ void EnBomBowMan_SetupChooseShowPrize(EnBomBowlMan* this, GlobalContext* globalC
|
|||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == this->dialogState) && (func_80106BC8(globalCtx) != 0)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == this->dialogState) && Message_ShouldAdvance(globalCtx)) {
|
||||
pos.x = 148.0f;
|
||||
pos.y = 40.0f;
|
||||
pos.z = 300.0f;
|
||||
|
@ -437,8 +437,8 @@ void EnBomBowMan_ChooseShowPrize(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
|||
this->bowlPit->start = 1;
|
||||
this->minigamePlayStatus = 2;
|
||||
this->actor.textId = 0x405A;
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
this->dialogState = 5;
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
this->dialogState = TEXT_STATE_EVENT;
|
||||
|
||||
// Cycle through prizes in order
|
||||
this->prizeSelect++;
|
||||
|
@ -452,8 +452,8 @@ void EnBomBowMan_ChooseShowPrize(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
|||
void EnBomBowlMan_BeginPlayGame(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == this->dialogState) && (func_80106BC8(globalCtx) != 0)) {
|
||||
func_80106CCC(globalCtx);
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == this->dialogState) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
func_8005B1A4(GET_ACTIVE_CAM(globalCtx));
|
||||
this->startedPlaying = true;
|
||||
|
||||
|
|
|
@ -105,8 +105,8 @@ void EnBomBowlPit_DetectHit(EnBomBowlPit* this, GlobalContext* globalCtx) {
|
|||
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->camId, &this->unk_180, &this->unk_18C);
|
||||
this->actor.textId = 0xF;
|
||||
func_8010B680(globalCtx, this->actor.textId, NULL);
|
||||
this->unk_154 = 5;
|
||||
Message_StartTextbox(globalCtx, this->actor.textId, NULL);
|
||||
this->unk_154 = TEXT_STATE_EVENT;
|
||||
func_80078884(NA_SE_EV_HIT_SOUND);
|
||||
func_8002DF54(globalCtx, NULL, 8);
|
||||
this->status = 1;
|
||||
|
@ -131,14 +131,14 @@ void EnBomBowlPit_CameraDollyIn(EnBomBowlPit* this, GlobalContext* globalCtx) {
|
|||
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->camId, &this->unk_180, &this->unk_18C);
|
||||
|
||||
if ((this->unk_154 == func_8010BDBC(&globalCtx->msgCtx)) && (func_80106BC8(globalCtx) != 0)) {
|
||||
func_80106CCC(globalCtx);
|
||||
if ((this->unk_154 == Message_GetState(&globalCtx->msgCtx)) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
}
|
||||
|
||||
if ((fabsf(this->unk_18C.x - this->unk_198.x) < 5.0f) && (fabsf(this->unk_18C.y - this->unk_198.y) < 5.0f) &&
|
||||
(fabsf(this->unk_18C.z - this->unk_198.z) < 5.0f) && (fabsf(this->unk_180.x - this->unk_1BC.x) < 5.0f) &&
|
||||
(fabsf(this->unk_180.y - this->unk_1BC.y) < 5.0f) && (fabsf(this->unk_180.z - this->unk_1BC.z) < 5.0f)) {
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
this->timer = 30;
|
||||
this->actionFunc = EnBomBowlPit_SpawnPrize;
|
||||
}
|
||||
|
@ -199,7 +199,7 @@ void EnBomBowlPit_WaitTillPrizeGiven(EnBomBowlPit* this, GlobalContext* globalCt
|
|||
}
|
||||
|
||||
void EnBomBowlPit_Reset(EnBomBowlPit* this, GlobalContext* globalCtx) {
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 6) && (func_80106BC8(globalCtx) != 0)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) {
|
||||
// "Normal termination"/"completion"
|
||||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 正常終了 ☆☆☆☆☆ \n" VT_RST);
|
||||
if (this->getItemId == GI_HEART_PIECE) {
|
||||
|
|
|
@ -303,11 +303,11 @@ void func_809C9700(EnBox* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (this->unk_1FB == ENBOX_STATE_1) {
|
||||
func_8010BD58(globalCtx, 1);
|
||||
func_8010BD58(globalCtx, OCARINA_ACTION_FREE_PLAY);
|
||||
this->unk_1FB = ENBOX_STATE_2;
|
||||
} else if (this->unk_1FB == ENBOX_STATE_2 && globalCtx->msgCtx.unk_E3EE == 4) {
|
||||
if ((globalCtx->msgCtx.unk_E3EC == 8 && this->type == ENBOX_TYPE_9) ||
|
||||
(globalCtx->msgCtx.unk_E3EC == 9 && this->type == ENBOX_TYPE_10)) {
|
||||
} else if (this->unk_1FB == ENBOX_STATE_2 && globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_04) {
|
||||
if ((globalCtx->msgCtx.lastPlayedSong == OCARINA_SONG_LULLABY && this->type == ENBOX_TYPE_9) ||
|
||||
(globalCtx->msgCtx.lastPlayedSong == OCARINA_SONG_SUNS && this->type == ENBOX_TYPE_10)) {
|
||||
this->dyna.actor.flags &= ~0x2000000;
|
||||
EnBox_SetupAction(this, EnBox_AppearInit);
|
||||
OnePointCutscene_Attention(globalCtx, &this->dyna.actor);
|
||||
|
@ -415,7 +415,7 @@ void EnBox_WaitOpen(EnBox* this, GlobalContext* globalCtx) {
|
|||
this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y,
|
||||
this->dyna.actor.world.pos.z, this->dyna.actor.shape.rot.x,
|
||||
this->dyna.actor.shape.rot.y, this->dyna.actor.shape.rot.z, 0xFFFF);
|
||||
func_800F5C64(NA_BGM_OPEN_TRE_BOX | 0x900);
|
||||
Audio_PlayFanfare(NA_BGM_OPEN_TRE_BOX | 0x900);
|
||||
}
|
||||
}
|
||||
osSyncPrintf("Actor_Environment_Tbox_On() %d\n", this->dyna.actor.params & 0x1F);
|
||||
|
|
|
@ -196,15 +196,15 @@ void func_809DF494(EnCow* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_809DF6BC(EnCow* this, GlobalContext* globalCtx) {
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && (func_80106BC8(globalCtx) != 0)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
this->actor.flags &= ~0x10000;
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
this->actionFunc = func_809DF96C;
|
||||
}
|
||||
}
|
||||
|
||||
void func_809DF730(EnCow* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
this->actor.flags &= ~0x10000;
|
||||
this->actionFunc = func_809DF96C;
|
||||
}
|
||||
|
@ -220,28 +220,28 @@ void func_809DF778(EnCow* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_809DF7D8(EnCow* this, GlobalContext* globalCtx) {
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && (func_80106BC8(globalCtx) != 0)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
this->actor.flags &= ~0x10000;
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
this->actionFunc = func_809DF778;
|
||||
func_8002F434(&this->actor, globalCtx, GI_MILK, 10000.0f, 100.0f);
|
||||
}
|
||||
}
|
||||
|
||||
void func_809DF870(EnCow* this, GlobalContext* globalCtx) {
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && (func_80106BC8(globalCtx) != 0)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
if (Inventory_HasEmptyBottle()) {
|
||||
func_8010B720(globalCtx, 0x2007);
|
||||
Message_ContinueTextbox(globalCtx, 0x2007);
|
||||
this->actionFunc = func_809DF7D8;
|
||||
} else {
|
||||
func_8010B720(globalCtx, 0x2013);
|
||||
Message_ContinueTextbox(globalCtx, 0x2013);
|
||||
this->actionFunc = func_809DF6BC;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_809DF8FC(EnCow* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->actionFunc = func_809DF870;
|
||||
} else {
|
||||
this->actor.flags |= 0x10000;
|
||||
|
@ -252,7 +252,7 @@ void func_809DF8FC(EnCow* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_809DF96C(EnCow* this, GlobalContext* globalCtx) {
|
||||
if ((globalCtx->msgCtx.unk_E3EE == 0) || (globalCtx->msgCtx.unk_E3EE == 4)) {
|
||||
if ((globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_00) || (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_04)) {
|
||||
if (DREG(53) != 0) {
|
||||
if (this->unk_276 & 4) {
|
||||
this->unk_276 &= ~0x4;
|
||||
|
|
|
@ -162,9 +162,9 @@ s32 EnCs_GetTalkState(EnCs* this, GlobalContext* globalCtx) {
|
|||
s32 pad2;
|
||||
s32 talkState = 1;
|
||||
|
||||
switch (func_8010BDBC(&globalCtx->msgCtx)) {
|
||||
case 4:
|
||||
if (func_80106BC8(globalCtx) != 0) {
|
||||
switch (Message_GetState(&globalCtx->msgCtx)) {
|
||||
case TEXT_STATE_CHOICE:
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
if (globalCtx->msgCtx.choiceIndex == 0) {
|
||||
this->actor.textId = 0x2026;
|
||||
EnCs_SetAnimFromIndex(this, 3, &this->currentAnimIndex);
|
||||
|
@ -176,8 +176,8 @@ s32 EnCs_GetTalkState(EnCs* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if (func_80106BC8(globalCtx)) {
|
||||
case TEXT_STATE_DONE:
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
if (this->actor.textId == 0x2026) {
|
||||
Player_UnsetMask(globalCtx);
|
||||
Item_Give(globalCtx, ITEM_SOLD_OUT);
|
||||
|
@ -190,11 +190,11 @@ s32 EnCs_GetTalkState(EnCs* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
case 5:
|
||||
case TEXT_STATE_NONE:
|
||||
case TEXT_STATE_DONE_HAS_NEXT:
|
||||
case TEXT_STATE_CLOSING:
|
||||
case TEXT_STATE_DONE_FADING:
|
||||
case TEXT_STATE_EVENT:
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -226,11 +226,11 @@ void EnCs_HandleTalking(EnCs* this, GlobalContext* globalCtx) {
|
|||
s16 sp28;
|
||||
|
||||
if (this->talkState == 2) {
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
this->talkState = 1;
|
||||
} else if (this->talkState == 1) {
|
||||
this->talkState = EnCs_GetTalkState(this, globalCtx);
|
||||
} else if (func_8002F194(&this->actor, globalCtx)) {
|
||||
} else if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
if ((this->actor.textId == 0x2022) || ((this->actor.textId != 0x2022) && (this->actor.textId != 0x2028))) {
|
||||
EnCs_SetAnimFromIndex(this, 3, &this->currentAnimIndex);
|
||||
}
|
||||
|
@ -245,7 +245,7 @@ void EnCs_HandleTalking(EnCs* this, GlobalContext* globalCtx) {
|
|||
|
||||
this->talkState = 1;
|
||||
} else {
|
||||
func_8002F374(globalCtx, &this->actor, &sp2A, &sp28);
|
||||
Actor_GetScreenPos(globalCtx, &this->actor, &sp2A, &sp28);
|
||||
|
||||
if ((sp2A >= 0) && (sp2A <= 320) && (sp28 >= 0) && (sp28 <= 240) &&
|
||||
(func_8002F2CC(&this->actor, globalCtx, 100.0f))) {
|
||||
|
|
|
@ -231,9 +231,9 @@ void EnDaiku_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
s32 EnDaiku_UpdateTalking(EnDaiku* this, GlobalContext* globalCtx) {
|
||||
s32 newTalkState = ENDAIKU_STATE_TALKING;
|
||||
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 6) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) {
|
||||
if (globalCtx->sceneNum == SCENE_GERUDOWAY) {
|
||||
if (func_80106BC8(globalCtx) != 0) {
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
if (this->actor.textId == 0x6007) {
|
||||
Flags_SetSwitch(globalCtx, this->startFightSwitchFlag);
|
||||
newTalkState = ENDAIKU_STATE_CAN_TALK;
|
||||
|
@ -243,7 +243,7 @@ s32 EnDaiku_UpdateTalking(EnDaiku* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
} else if (globalCtx->sceneNum == SCENE_TENT) {
|
||||
if (func_80106BC8(globalCtx) != 0) {
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
switch (this->actor.textId) {
|
||||
case 0x6061:
|
||||
gSaveContext.infTable[23] |= 0x40;
|
||||
|
@ -269,10 +269,10 @@ void EnDaiku_UpdateText(EnDaiku* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (this->talkState == ENDAIKU_STATE_TALKING) {
|
||||
this->talkState = EnDaiku_UpdateTalking(this, globalCtx);
|
||||
} else if (func_8002F194(&this->actor, globalCtx)) {
|
||||
} else if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->talkState = ENDAIKU_STATE_TALKING;
|
||||
} else {
|
||||
func_8002F374(globalCtx, &this->actor, &sp2E, &sp2C);
|
||||
Actor_GetScreenPos(globalCtx, &this->actor, &sp2E, &sp2C);
|
||||
if (sp2E >= 0 && sp2E <= 320 && sp2C >= 0 && sp2C <= 240 && this->talkState == ENDAIKU_STATE_CAN_TALK &&
|
||||
func_8002F2CC(&this->actor, globalCtx, 100.0f) == 1) {
|
||||
if (globalCtx->sceneNum == SCENE_GERUDOWAY) {
|
||||
|
@ -403,7 +403,7 @@ void EnDaiku_InitEscape(EnDaiku* this, GlobalContext* globalCtx) {
|
|||
Vec3s* pointPos;
|
||||
s32 exitLoop;
|
||||
|
||||
func_800F5C64(NA_BGM_APPEAR);
|
||||
Audio_PlayFanfare(NA_BGM_APPEAR);
|
||||
EnDaiku_Change(this, ENDAIKU_ANIM_RUN, &this->currentAnimIndex);
|
||||
this->stateFlags &= ~(ENDAIKU_STATEFLAG_1 | ENDAIKU_STATEFLAG_2);
|
||||
|
||||
|
|
|
@ -205,7 +205,7 @@ void EnDaikuKakariko_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
s32 EnDaikuKakariko_GetTalkState(EnDaikuKakariko* this, GlobalContext* globalCtx) {
|
||||
s32 talkState = 2;
|
||||
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 6) && (func_80106BC8(globalCtx))) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) {
|
||||
switch (this->actor.textId) {
|
||||
case 0x6061:
|
||||
gSaveContext.infTable[23] |= 0x40;
|
||||
|
@ -226,10 +226,10 @@ void EnDaikuKakariko_HandleTalking(EnDaikuKakariko* this, GlobalContext* globalC
|
|||
|
||||
if (this->talkState == 2) {
|
||||
this->talkState = EnDaikuKakariko_GetTalkState(this, globalCtx);
|
||||
} else if (func_8002F194(&this->actor, globalCtx)) {
|
||||
} else if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->talkState = 2;
|
||||
} else {
|
||||
func_8002F374(globalCtx, &this->actor, &sp26, &sp24);
|
||||
Actor_GetScreenPos(globalCtx, &this->actor, &sp26, &sp24);
|
||||
|
||||
if ((sp26 >= 0) && (sp26 <= 320) && (sp24 >= 0) && (sp24 <= 240) && (this->talkState == 0) &&
|
||||
(func_8002F2CC(&this->actor, globalCtx, 100.0f) == 1)) {
|
||||
|
|
|
@ -133,8 +133,8 @@ s32 EnDivingGame_HasMinigameFinished(EnDivingGame* this, GlobalContext* globalCt
|
|||
func_800F5B58();
|
||||
func_80078884(NA_SE_SY_FOUND);
|
||||
this->actor.textId = 0x71AD;
|
||||
func_8010B680(globalCtx, this->actor.textId, NULL);
|
||||
this->unk_292 = 5;
|
||||
Message_StartTextbox(globalCtx, this->actor.textId, NULL);
|
||||
this->unk_292 = TEXT_STATE_EVENT;
|
||||
this->allRupeesThrown = this->state = this->phase = this->unk_2A2 = this->grabbedRupeesCounter = 0;
|
||||
func_8002DF54(globalCtx, NULL, 8);
|
||||
this->actionFunc = func_809EE048;
|
||||
|
@ -157,10 +157,10 @@ s32 EnDivingGame_HasMinigameFinished(EnDivingGame* this, GlobalContext* globalCt
|
|||
this->extraWinCount++;
|
||||
}
|
||||
}
|
||||
func_8010B680(globalCtx, this->actor.textId, NULL);
|
||||
this->unk_292 = 5;
|
||||
Message_StartTextbox(globalCtx, this->actor.textId, NULL);
|
||||
this->unk_292 = TEXT_STATE_EVENT;
|
||||
func_800F5B58();
|
||||
func_800F5C64(NA_BGM_SMALL_ITEM_GET);
|
||||
Audio_PlayFanfare(NA_BGM_SMALL_ITEM_GET);
|
||||
func_8002DF54(globalCtx, NULL, 8);
|
||||
if (!(gSaveContext.eventChkInf[3] & 0x100)) {
|
||||
this->actionFunc = func_809EE96C;
|
||||
|
@ -185,8 +185,8 @@ void func_809EDCB0(EnDivingGame* this, GlobalContext* globalCtx) {
|
|||
void EnDivingGame_Talk(EnDivingGame* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (this->state != ENDIVINGGAME_STATE_PLAYING || !EnDivingGame_HasMinigameFinished(this, globalCtx)) {
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (this->unk_292 != 6) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
if (this->unk_292 != TEXT_STATE_DONE) {
|
||||
switch (this->state) {
|
||||
case ENDIVINGGAME_STATE_NOTPLAYING:
|
||||
func_8002DF54(globalCtx, NULL, 8);
|
||||
|
@ -203,11 +203,11 @@ void EnDivingGame_Talk(EnDivingGame* this, GlobalContext* globalCtx) {
|
|||
} else {
|
||||
if (Text_GetFaceReaction(globalCtx, 0x1D) != 0) {
|
||||
this->actor.textId = Text_GetFaceReaction(globalCtx, 0x1D);
|
||||
this->unk_292 = 6;
|
||||
this->unk_292 = TEXT_STATE_DONE;
|
||||
} else {
|
||||
switch (this->state) {
|
||||
case ENDIVINGGAME_STATE_NOTPLAYING:
|
||||
this->unk_292 = 4;
|
||||
this->unk_292 = TEXT_STATE_CHOICE;
|
||||
if (!(gSaveContext.eventChkInf[3] & 0x100)) {
|
||||
this->actor.textId = 0x4053;
|
||||
this->phase = ENDIVINGGAME_PHASE_1;
|
||||
|
@ -218,11 +218,11 @@ void EnDivingGame_Talk(EnDivingGame* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
case ENDIVINGGAME_STATE_AWARDPRIZE:
|
||||
this->actor.textId = 0x4056;
|
||||
this->unk_292 = 5;
|
||||
this->unk_292 = TEXT_STATE_EVENT;
|
||||
break;
|
||||
case ENDIVINGGAME_STATE_PLAYING:
|
||||
this->actor.textId = 0x405B;
|
||||
this->unk_292 = 5;
|
||||
this->unk_292 = TEXT_STATE_EVENT;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -233,8 +233,8 @@ void EnDivingGame_Talk(EnDivingGame* this, GlobalContext* globalCtx) {
|
|||
|
||||
void EnDivingGame_HandlePlayChoice(EnDivingGame* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (this->unk_292 == func_8010BDBC(&globalCtx->msgCtx) &&
|
||||
func_80106BC8(globalCtx)) { // Did player selected an answer?
|
||||
if (this->unk_292 == Message_GetState(&globalCtx->msgCtx) &&
|
||||
Message_ShouldAdvance(globalCtx)) { // Did player selected an answer?
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0: // Yes
|
||||
if (gSaveContext.rupees >= 20) {
|
||||
|
@ -251,11 +251,11 @@ void EnDivingGame_HandlePlayChoice(EnDivingGame* this, GlobalContext* globalCtx)
|
|||
break;
|
||||
}
|
||||
if (!(gSaveContext.eventChkInf[3] & 0x100) || this->actor.textId == 0x85 || this->actor.textId == 0x2D) {
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
this->unk_292 = 5;
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
this->unk_292 = TEXT_STATE_EVENT;
|
||||
this->actionFunc = func_809EE048;
|
||||
} else {
|
||||
globalCtx->msgCtx.msgMode = 0x37;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_PAUSED;
|
||||
func_8002DF54(globalCtx, NULL, 8);
|
||||
this->actionFunc = func_809EE0FC;
|
||||
}
|
||||
|
@ -265,13 +265,13 @@ void EnDivingGame_HandlePlayChoice(EnDivingGame* this, GlobalContext* globalCtx)
|
|||
// Waits for the message to close
|
||||
void func_809EE048(EnDivingGame* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (this->unk_292 == func_8010BDBC(&globalCtx->msgCtx) && func_80106BC8(globalCtx)) {
|
||||
if (this->unk_292 == Message_GetState(&globalCtx->msgCtx) && Message_ShouldAdvance(globalCtx)) {
|
||||
if (this->phase == ENDIVINGGAME_PHASE_ENDED) {
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
func_8002DF54(globalCtx, NULL, 7);
|
||||
this->actionFunc = func_809EDCB0;
|
||||
} else {
|
||||
globalCtx->msgCtx.msgMode = 0x37;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_PAUSED;
|
||||
func_8002DF54(globalCtx, NULL, 8);
|
||||
this->actionFunc = func_809EE0FC;
|
||||
}
|
||||
|
@ -400,8 +400,8 @@ void func_809EE780(EnDivingGame* this, GlobalContext* globalCtx) {
|
|||
Gameplay_ClearCamera(globalCtx, this->subCamId);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, 0, CAM_STAT_ACTIVE);
|
||||
this->actor.textId = 0x405A;
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
this->unk_292 = 5;
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
this->unk_292 = TEXT_STATE_EVENT;
|
||||
this->actionFunc = func_809EE800;
|
||||
}
|
||||
}
|
||||
|
@ -409,8 +409,8 @@ void func_809EE780(EnDivingGame* this, GlobalContext* globalCtx) {
|
|||
// EnDivingGame_TalkDuringMinigame
|
||||
void func_809EE800(EnDivingGame* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (this->unk_292 == func_8010BDBC(&globalCtx->msgCtx) && func_80106BC8(globalCtx)) {
|
||||
func_80106CCC(globalCtx);
|
||||
if (this->unk_292 == Message_GetState(&globalCtx->msgCtx) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
if (!(gSaveContext.eventChkInf[3] & 0x100)) {
|
||||
func_80088B34(BREG(2) + 50);
|
||||
} else {
|
||||
|
@ -419,7 +419,7 @@ void func_809EE800(EnDivingGame* this, GlobalContext* globalCtx) {
|
|||
func_800F5ACC(NA_BGM_MINI_GAME_2);
|
||||
func_8002DF54(globalCtx, NULL, 7);
|
||||
this->actor.textId = 0x405B;
|
||||
this->unk_292 = 5;
|
||||
this->unk_292 = TEXT_STATE_EVENT;
|
||||
this->state = ENDIVINGGAME_STATE_PLAYING;
|
||||
this->actionFunc = EnDivingGame_Talk;
|
||||
}
|
||||
|
@ -427,8 +427,8 @@ void func_809EE800(EnDivingGame* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_809EE8F0(EnDivingGame* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if ((this->unk_292 == func_8010BDBC(&globalCtx->msgCtx) && func_80106BC8(globalCtx))) {
|
||||
func_80106CCC(globalCtx);
|
||||
if ((this->unk_292 == Message_GetState(&globalCtx->msgCtx) && Message_ShouldAdvance(globalCtx))) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
this->actionFunc = EnDivingGame_Talk;
|
||||
} else {
|
||||
EnDivingGame_HasMinigameFinished(this, globalCtx);
|
||||
|
@ -438,11 +438,11 @@ void func_809EE8F0(EnDivingGame* this, GlobalContext* globalCtx) {
|
|||
// EnDivingGame_SayCongratsAndWait ? // EnDivingGame_PlayerWonPhase1
|
||||
void func_809EE96C(EnDivingGame* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if ((this->unk_292 == func_8010BDBC(&globalCtx->msgCtx) && func_80106BC8(globalCtx))) {
|
||||
func_80106CCC(globalCtx);
|
||||
if ((this->unk_292 == Message_GetState(&globalCtx->msgCtx) && Message_ShouldAdvance(globalCtx))) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
func_8002DF54(globalCtx, NULL, 7);
|
||||
this->actor.textId = 0x4056;
|
||||
this->unk_292 = 5;
|
||||
this->unk_292 = TEXT_STATE_EVENT;
|
||||
this->state = ENDIVINGGAME_STATE_AWARDPRIZE;
|
||||
this->actionFunc = EnDivingGame_Talk;
|
||||
}
|
||||
|
@ -450,8 +450,8 @@ void func_809EE96C(EnDivingGame* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_809EEA00(EnDivingGame* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if ((this->unk_292 == func_8010BDBC(&globalCtx->msgCtx) && func_80106BC8(globalCtx))) {
|
||||
func_80106CCC(globalCtx);
|
||||
if ((this->unk_292 == Message_GetState(&globalCtx->msgCtx) && Message_ShouldAdvance(globalCtx))) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
this->actor.parent = NULL;
|
||||
func_8002F434(&this->actor, globalCtx, GI_SCALE_SILVER, 90.0f, 10.0f);
|
||||
this->actionFunc = func_809EEA90;
|
||||
|
@ -470,7 +470,7 @@ void func_809EEA90(EnDivingGame* this, GlobalContext* globalCtx) {
|
|||
// Award the scale?
|
||||
void func_809EEAF8(EnDivingGame* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 6 && func_80106BC8(globalCtx)) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE && Message_ShouldAdvance(globalCtx)) {
|
||||
// "Successful completion"
|
||||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 正常終了 ☆☆☆☆☆ \n" VT_RST);
|
||||
this->allRupeesThrown = this->state = this->phase = this->unk_2A2 = this->grabbedRupeesCounter = 0;
|
||||
|
|
|
@ -324,7 +324,7 @@ void EnDns_SetupWait(EnDns* this, GlobalContext* globalCtx) {
|
|||
void EnDns_Wait(EnDns* this, GlobalContext* globalCtx) {
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 3, 2000, 0);
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->actionFunc = EnDns_Talk;
|
||||
} else {
|
||||
if ((this->collider.base.ocFlags1 & OC1_HIT) || this->actor.isTargeted) {
|
||||
|
@ -339,31 +339,31 @@ void EnDns_Wait(EnDns* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnDns_Talk(EnDns* this, GlobalContext* globalCtx) {
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 4) && (func_80106BC8(globalCtx))) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE) && Message_ShouldAdvance(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0: // OK
|
||||
switch (this->dnsItemEntry->purchaseableCheck(this)) {
|
||||
case 0:
|
||||
func_8010B720(globalCtx, 0x10A5);
|
||||
Message_ContinueTextbox(globalCtx, 0x10A5);
|
||||
this->actionFunc = func_809F008C;
|
||||
break;
|
||||
case 1:
|
||||
func_8010B720(globalCtx, 0x10A6);
|
||||
Message_ContinueTextbox(globalCtx, 0x10A6);
|
||||
this->actionFunc = func_809F008C;
|
||||
break;
|
||||
case 3:
|
||||
func_8010B720(globalCtx, 0x10DE);
|
||||
Message_ContinueTextbox(globalCtx, 0x10DE);
|
||||
this->actionFunc = func_809F008C;
|
||||
break;
|
||||
case 2:
|
||||
case 4:
|
||||
func_8010B720(globalCtx, 0x10A7);
|
||||
Message_ContinueTextbox(globalCtx, 0x10A7);
|
||||
this->actionFunc = func_809EFEE8;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 1: // No way
|
||||
func_8010B720(globalCtx, 0x10A4);
|
||||
Message_ContinueTextbox(globalCtx, 0x10A4);
|
||||
this->actionFunc = func_809F008C;
|
||||
}
|
||||
}
|
||||
|
@ -388,8 +388,8 @@ void func_809EFDD0(EnDns* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_809EFEE8(EnDns* 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);
|
||||
func_809EFDD0(this, globalCtx);
|
||||
this->actionFunc = func_809EFF50;
|
||||
}
|
||||
|
@ -408,7 +408,7 @@ void func_809EFF98(EnDns* this, GlobalContext* globalCtx) {
|
|||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (player->stateFlags1 & 0x400) {
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 6) && (func_80106BC8(globalCtx) != 0)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) {
|
||||
this->dnsItemEntry->setRupeesAndFlags(this);
|
||||
this->dropCollectible = 1;
|
||||
this->maintainCollider = 0;
|
||||
|
@ -427,7 +427,7 @@ void func_809EFF98(EnDns* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_809F008C(EnDns* this, GlobalContext* globalCtx) {
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 6) && (func_80106BC8(globalCtx) != 0)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) {
|
||||
this->maintainCollider = 0;
|
||||
this->actor.flags &= ~1;
|
||||
EnDns_Change(this, 1);
|
||||
|
|
|
@ -193,7 +193,7 @@ void EnDntJiji_Walk(EnDntJiji* this, GlobalContext* globalCtx) {
|
|||
this->getItemId = GI_STICK_UPGRADE_30;
|
||||
}
|
||||
this->actor.textId = 0x104D;
|
||||
func_8010B680(globalCtx, this->actor.textId, NULL);
|
||||
Message_StartTextbox(globalCtx, this->actor.textId, NULL);
|
||||
this->actor.speedXZ = 0.0f;
|
||||
this->unused = 5;
|
||||
this->actionFunc = EnDntJiji_Talk;
|
||||
|
@ -236,7 +236,7 @@ void EnDntJiji_Cower(EnDntJiji* this, GlobalContext* globalCtx) {
|
|||
SkelAnime_Update(&this->skelAnime);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 3, 0x1388, 0);
|
||||
if (frame >= this->endFrame) {
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->actionFunc = EnDntJiji_SetupTalk;
|
||||
} else {
|
||||
func_8002F2CC(&this->actor, globalCtx, 100.0f);
|
||||
|
@ -253,9 +253,9 @@ void EnDntJiji_SetupTalk(EnDntJiji* this, GlobalContext* globalCtx) {
|
|||
void EnDntJiji_Talk(EnDntJiji* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 3, 0x1388, 0);
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && func_80106BC8(globalCtx)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
func_8005B1A4(GET_ACTIVE_CAM(globalCtx));
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
func_8002DF54(globalCtx, NULL, 7);
|
||||
this->actor.parent = NULL;
|
||||
func_8002F434(&this->actor, globalCtx, this->getItemId, 400.0f, 200.0f);
|
||||
|
@ -274,7 +274,7 @@ void EnDntJiji_SetupGivePrize(EnDntJiji* this, GlobalContext* globalCtx) {
|
|||
|
||||
void EnDntJiji_GivePrize(EnDntJiji* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 6) && func_80106BC8(globalCtx)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) {
|
||||
if ((this->getItemId == GI_NUT_UPGRADE_30) || (this->getItemId == GI_NUT_UPGRADE_40)) {
|
||||
// "nut"
|
||||
osSyncPrintf("実 \n");
|
||||
|
|
|
@ -331,14 +331,14 @@ void EnDntNomal_SetupTargetTalk(EnDntNomal* this, GlobalContext* globalCtx) {
|
|||
this->endFrame = (f32)Animation_GetLastFrame(&gHintNutsTalkAnim);
|
||||
Animation_Change(&this->skelAnime, &gHintNutsTalkAnim, 1.0f, 0.0f, this->endFrame, ANIMMODE_LOOP, -10.0f);
|
||||
this->actor.textId = 0x10AF;
|
||||
func_8010B680(globalCtx, this->actor.textId, NULL);
|
||||
Message_StartTextbox(globalCtx, this->actor.textId, NULL);
|
||||
this->actionFunc = EnDntNomal_TargetTalk;
|
||||
}
|
||||
|
||||
void EnDntNomal_TargetTalk(EnDntNomal* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && func_80106BC8(globalCtx)) {
|
||||
func_80106CCC(globalCtx);
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
func_8005B1A4(GET_ACTIVE_CAM(globalCtx));
|
||||
GET_ACTIVE_CAM(globalCtx)->csId = 0;
|
||||
func_8002DF54(globalCtx, NULL, 8);
|
||||
|
@ -521,7 +521,7 @@ void EnDntNomal_StageCelebrate(EnDntNomal* this, GlobalContext* globalCtx) {
|
|||
f32 dx = this->targetPos.x - this->actor.world.pos.x;
|
||||
f32 dz = this->targetPos.z - this->actor.world.pos.z;
|
||||
|
||||
if ((fabsf(dx) < 10.0f) && (fabsf(dz) < 10.0f) && func_8010BDBC(&globalCtx->msgCtx)) {
|
||||
if ((fabsf(dx) < 10.0f) && (fabsf(dz) < 10.0f) && (Message_GetState(&globalCtx->msgCtx) != TEXT_STATE_NONE)) {
|
||||
this->action = DNT_ACTION_PRIZE;
|
||||
this->actionFunc = EnDntNomal_SetupStageDance;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
|
|
|
@ -228,7 +228,7 @@ void EnDoor_Idle(EnDoor* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnDoor_WaitForCheck(EnDoor* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->actionFunc = EnDoor_Check;
|
||||
} else {
|
||||
func_8002F2CC(&this->actor, globalCtx, DOOR_CHECK_RANGE);
|
||||
|
@ -236,7 +236,7 @@ void EnDoor_WaitForCheck(EnDoor* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnDoor_Check(EnDoor* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
this->actionFunc = EnDoor_WaitForCheck;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -103,11 +103,11 @@ u16 func_809FDC38(GlobalContext* globalCtx, Actor* actor) {
|
|||
}
|
||||
|
||||
s16 func_809FDCDC(GlobalContext* globalCtx, Actor* actor) {
|
||||
switch (func_8010BDBC(&globalCtx->msgCtx)) {
|
||||
case 0:
|
||||
case 1:
|
||||
switch (Message_GetState(&globalCtx->msgCtx)) {
|
||||
case TEXT_STATE_NONE:
|
||||
case TEXT_STATE_DONE_HAS_NEXT:
|
||||
break;
|
||||
case 2:
|
||||
case TEXT_STATE_CLOSING:
|
||||
switch (actor->textId) {
|
||||
case 0x301A:
|
||||
gSaveContext.infTable[0x11] |= 8;
|
||||
|
@ -120,18 +120,18 @@ s16 func_809FDCDC(GlobalContext* globalCtx, Actor* actor) {
|
|||
break;
|
||||
}
|
||||
return 0;
|
||||
case 3:
|
||||
case 4:
|
||||
case 5:
|
||||
case TEXT_STATE_DONE_FADING:
|
||||
case TEXT_STATE_CHOICE:
|
||||
case TEXT_STATE_EVENT:
|
||||
break;
|
||||
case 6:
|
||||
if (func_80106BC8(globalCtx)) {
|
||||
case TEXT_STATE_DONE:
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
return 3;
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
case 8:
|
||||
case 9:
|
||||
case TEXT_STATE_SONG_DEMO_DONE:
|
||||
case TEXT_STATE_8:
|
||||
case TEXT_STATE_9:
|
||||
break;
|
||||
}
|
||||
return 1;
|
||||
|
@ -298,7 +298,7 @@ void func_809FE3C0(EnDu* this, GlobalContext* globalCtx) {
|
|||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (player->stateFlags2 & 0x1000000) {
|
||||
func_8010BD88(globalCtx, 0x22);
|
||||
func_8010BD88(globalCtx, OCARINA_ACTION_CHECK_SARIA);
|
||||
player->stateFlags2 |= 0x2000000;
|
||||
player->unk_6A8 = &this->actor;
|
||||
EnDu_SetupAction(this, func_809FE4A4);
|
||||
|
@ -316,22 +316,22 @@ void func_809FE3C0(EnDu* this, GlobalContext* globalCtx) {
|
|||
void func_809FE4A4(EnDu* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (globalCtx->msgCtx.unk_E3EE == 4) {
|
||||
globalCtx->msgCtx.unk_E3EE = 0;
|
||||
if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_04) {
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_00;
|
||||
EnDu_SetupAction(this, func_809FE3C0);
|
||||
} else if (globalCtx->msgCtx.unk_E3EE >= 6) {
|
||||
} else if (globalCtx->msgCtx.ocarinaMode >= OCARINA_MODE_06) {
|
||||
globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(gGoronCityDaruniaWrongCs);
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
this->unk_1E8 = 1;
|
||||
EnDu_SetupAction(this, func_809FE890);
|
||||
globalCtx->msgCtx.unk_E3EE = 4;
|
||||
} else if (globalCtx->msgCtx.unk_E3EE == 3) {
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
} else if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_03) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(gGoronCityDaruniaCorrectCs);
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
this->unk_1E8 = 0;
|
||||
EnDu_SetupAction(this, func_809FE890);
|
||||
globalCtx->msgCtx.unk_E3EE = 4;
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
} else {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
}
|
||||
|
@ -343,7 +343,7 @@ void func_809FE638(EnDu* this, GlobalContext* globalCtx) {
|
|||
if (!(player->stateFlags1 & 0x20000000)) {
|
||||
OnePointCutscene_Init(globalCtx, 3330, -99, &this->actor, MAIN_CAM);
|
||||
player->actor.shape.rot.y = player->actor.world.rot.y = this->actor.world.rot.y + 0x7FFF;
|
||||
func_800F5C64(NA_BGM_APPEAR);
|
||||
Audio_PlayFanfare(NA_BGM_APPEAR);
|
||||
EnDu_SetupAction(this, func_809FE6CC);
|
||||
this->unk_1E2 = 0x32;
|
||||
}
|
||||
|
@ -360,7 +360,7 @@ void func_809FE6CC(EnDu* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
if (phi_v1 == 0) {
|
||||
this->actor.textId = 0x3039;
|
||||
func_8010B680(globalCtx, this->actor.textId, NULL);
|
||||
Message_StartTextbox(globalCtx, this->actor.textId, NULL);
|
||||
this->unk_1F4.unk_00 = 1;
|
||||
EnDu_SetupAction(this, func_809FE740);
|
||||
}
|
||||
|
@ -494,7 +494,7 @@ void func_809FEB08(EnDu* this, GlobalContext* globalCtx) {
|
|||
this->actor.textId = 0x301F;
|
||||
EnDu_SetupAction(this, func_809FE3C0);
|
||||
}
|
||||
func_8010B680(globalCtx, this->actor.textId, NULL);
|
||||
Message_StartTextbox(globalCtx, this->actor.textId, NULL);
|
||||
func_80034EC0(&this->skelAnime, sAnimations, 14);
|
||||
this->unk_1F4.unk_00 = 1;
|
||||
}
|
||||
|
|
|
@ -1257,14 +1257,14 @@ void func_80A05040(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
func_80A04DE4(this, globalCtx);
|
||||
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 4) && func_80106BC8(globalCtx)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE) && Message_ShouldAdvance(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0: // yes
|
||||
func_8010B720(globalCtx, ElfMessage_GetSariaText(globalCtx));
|
||||
Message_ContinueTextbox(globalCtx, ElfMessage_GetSariaText(globalCtx));
|
||||
this->actor.update = func_80A05114;
|
||||
break;
|
||||
case 1: // no
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
this->actor.update = func_80A053F0;
|
||||
func_80A01C38(this, 0);
|
||||
this->fairyFlags &= ~0x20;
|
||||
|
@ -1280,8 +1280,8 @@ void func_80A05114(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
func_80A04DE4(this, globalCtx);
|
||||
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && func_80106BC8(globalCtx)) {
|
||||
func_8010B720(globalCtx, 0xE3);
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_ContinueTextbox(globalCtx, 0xE3);
|
||||
this->actor.update = func_80A05040;
|
||||
}
|
||||
|
||||
|
@ -1293,8 +1293,8 @@ void func_80A05188(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
func_80A04DE4(this, globalCtx);
|
||||
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && func_80106BC8(globalCtx)) {
|
||||
func_8010B720(globalCtx, ElfMessage_GetSariaText(globalCtx));
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_ContinueTextbox(globalCtx, ElfMessage_GetSariaText(globalCtx));
|
||||
this->actor.update = func_80A05114;
|
||||
}
|
||||
|
||||
|
@ -1308,21 +1308,21 @@ void func_80A05208(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
func_80A04DE4(this, globalCtx);
|
||||
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 4) && func_80106BC8(globalCtx)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE) && Message_ShouldAdvance(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0: // yes
|
||||
naviCUpText = ElfMessage_GetCUpText(globalCtx);
|
||||
|
||||
if (naviCUpText != 0) {
|
||||
func_8010B720(globalCtx, naviCUpText);
|
||||
Message_ContinueTextbox(globalCtx, naviCUpText);
|
||||
} else {
|
||||
func_8010B720(globalCtx, 0x15F);
|
||||
Message_ContinueTextbox(globalCtx, 0x15F);
|
||||
}
|
||||
|
||||
this->actor.update = func_80A052F4;
|
||||
break;
|
||||
case 1: // no
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
this->actor.update = func_80A053F0;
|
||||
func_80A01C38(this, 0);
|
||||
this->fairyFlags &= ~0x20;
|
||||
|
@ -1339,22 +1339,22 @@ void func_80A052F4(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
func_80A04DE4(this, globalCtx);
|
||||
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4) {
|
||||
if (func_80106BC8(globalCtx)) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE) {
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
globalCtx->msgCtx.unk_E3F2 = 0xFF;
|
||||
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0: // yes
|
||||
this->actor.update = func_80A05188;
|
||||
func_8010B720(globalCtx, 0xE2);
|
||||
Message_ContinueTextbox(globalCtx, 0xE2);
|
||||
break;
|
||||
case 1: // no
|
||||
this->actor.update = func_80A05208;
|
||||
func_8010B720(globalCtx, 0xE1);
|
||||
Message_ContinueTextbox(globalCtx, 0xE1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if (func_8002F334(thisx, globalCtx)) {
|
||||
} else if (Actor_TextboxIsClosing(thisx, globalCtx)) {
|
||||
this->actor.update = func_80A053F0;
|
||||
func_80A01C38(this, 0);
|
||||
this->fairyFlags &= ~0x20;
|
||||
|
@ -1384,7 +1384,7 @@ void func_80A053F0(Actor* thisx, GlobalContext* globalCtx) {
|
|||
thisx->flags |= 0x10000;
|
||||
}
|
||||
|
||||
if (func_8002F194(thisx, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(thisx, globalCtx)) {
|
||||
func_800F4524(&D_801333D4, NA_SE_VO_SK_LAUGH, 0x20);
|
||||
thisx->focus.pos = thisx->world.pos;
|
||||
|
||||
|
|
|
@ -410,7 +410,7 @@ void EnExItem_TargetPrizeGive(EnExItem* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnExItem_TargetPrizeFinish(EnExItem* this, GlobalContext* globalCtx) {
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 6) && func_80106BC8(globalCtx)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) {
|
||||
// "Successful completion"
|
||||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 正常終了 ☆☆☆☆☆ \n" VT_RST);
|
||||
gSaveContext.itemGetInf[1] |= 0x2000;
|
||||
|
|
|
@ -196,10 +196,8 @@ static u8 sJumpOrder[] = {
|
|||
FROG_BLUE, FROG_YELLOW, FROG_RED, FROG_PURPLE, FROG_WHITE, FROG_BLUE, FROG_YELLOW, FROG_RED,
|
||||
};
|
||||
|
||||
// probably can be replaced with a message context enum at a later time
|
||||
// A, CDOWN, CRIGHT, CLEFT, CUP
|
||||
static u8 sOcarinaNotes[] = {
|
||||
0, 1, 2, 3, 4,
|
||||
OCARINA_NOTE_A, OCARINA_NOTE_C_DOWN, OCARINA_NOTE_C_RIGHT, OCARINA_NOTE_C_LEFT, OCARINA_NOTE_C_UP,
|
||||
};
|
||||
|
||||
void EnFr_OrientUnderwater(EnFr* this) {
|
||||
|
@ -602,12 +600,12 @@ void EnFr_Idle(EnFr* this, GlobalContext* globalCtx) {
|
|||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (player->stateFlags2 & 0x2000000) {
|
||||
if (globalCtx->msgCtx.unk_E3EE == 4) {
|
||||
globalCtx->msgCtx.unk_E3EE = 0;
|
||||
if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_04) {
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_00;
|
||||
}
|
||||
|
||||
OnePointCutscene_Init(globalCtx, 4110, ~0x62, &this->actor, MAIN_CAM);
|
||||
globalCtx->msgCtx.msgMode = 0x37;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_PAUSED;
|
||||
player->actor.world.pos.x = this->actor.world.pos.x; // x = 990.0f
|
||||
player->actor.world.pos.y = this->actor.world.pos.y; // y = 205.0f
|
||||
player->actor.world.pos.z = this->actor.world.pos.z; // z = -1220.0f
|
||||
|
@ -620,11 +618,11 @@ void EnFr_Idle(EnFr* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnFr_Activate(EnFr* this, GlobalContext* globalCtx) {
|
||||
if (globalCtx->msgCtx.msgMode == 0xC) {
|
||||
globalCtx->msgCtx.msgMode = 0x37;
|
||||
if (globalCtx->msgCtx.msgMode == MSGMODE_OCARINA_PLAYING) {
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_PAUSED;
|
||||
sEnFrPointers.flags = 1;
|
||||
this->actionFunc = EnFr_ActivateCheckFrogSong;
|
||||
} else if (globalCtx->msgCtx.msgMode == 0x37) { // Goes to Frogs 2 Song
|
||||
} else if (globalCtx->msgCtx.msgMode == MSGMODE_PAUSED) { // Goes to Frogs 2 Song
|
||||
sEnFrPointers.flags = 1;
|
||||
this->actionFunc = EnFr_ActivateCheckFrogSong;
|
||||
}
|
||||
|
@ -641,7 +639,7 @@ void EnFr_ActivateCheckFrogSong(EnFr* this, GlobalContext* globalCtx) {
|
|||
&& (gSaveContext.eventChkInf[13] & 0x40)) { // SoS
|
||||
this->actionFunc = EnFr_TalkBeforeFrogSong;
|
||||
this->songIndex = FROG_CHOIR_SONG;
|
||||
func_8010B680(globalCtx, 0x40AB, &this->actor);
|
||||
Message_StartTextbox(globalCtx, 0x40AB, &this->actor);
|
||||
} else {
|
||||
this->songIndex = FROG_ZL;
|
||||
this->actionFunc = func_80A1BE98;
|
||||
|
@ -662,49 +660,49 @@ void func_80A1BE98(EnFr* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
func_8010BD58(globalCtx, 0x30);
|
||||
func_8010BD58(globalCtx, OCARINA_ACTION_CHECK_NOWARP);
|
||||
this->actionFunc = EnFr_ListeningToOcarinaNotes;
|
||||
}
|
||||
|
||||
void EnFr_ListeningToOcarinaNotes(EnFr* this, GlobalContext* globalCtx) {
|
||||
this->songIndex = FROG_NO_SONG;
|
||||
switch (globalCtx->msgCtx.unk_E3EE) { // Ocarina Song played
|
||||
case 7:
|
||||
switch (globalCtx->msgCtx.ocarinaMode) { // Ocarina Song played
|
||||
case OCARINA_MODE_07:
|
||||
this->songIndex = FROG_ZL;
|
||||
break;
|
||||
case 6:
|
||||
case OCARINA_MODE_06:
|
||||
this->songIndex = FROG_EPONA;
|
||||
break;
|
||||
case 5:
|
||||
case OCARINA_MODE_05:
|
||||
this->songIndex = FROG_SARIA;
|
||||
break;
|
||||
case 8:
|
||||
case OCARINA_MODE_08:
|
||||
this->songIndex = FROG_SUNS;
|
||||
break;
|
||||
case 9:
|
||||
case OCARINA_MODE_09:
|
||||
this->songIndex = FROG_SOT;
|
||||
break;
|
||||
case 10:
|
||||
case OCARINA_MODE_0A:
|
||||
this->songIndex = FROG_STORMS;
|
||||
break;
|
||||
case 4:
|
||||
case OCARINA_MODE_04:
|
||||
EnFr_OcarinaMistake(this, globalCtx);
|
||||
break;
|
||||
case 1: // Ocarina note played, but no song played
|
||||
switch (globalCtx->msgCtx.unk_E410) { // Jumping frogs in open ocarina based on ocarina note played
|
||||
case 0:
|
||||
case OCARINA_MODE_01: // Ocarina note played, but no song played
|
||||
switch (globalCtx->msgCtx.lastOcaNoteIdx) { // Jumping frogs in open ocarina based on ocarina note played
|
||||
case OCARINA_NOTE_A:
|
||||
EnFr_SetupJumpingUp(this, FROG_BLUE);
|
||||
break;
|
||||
case 1:
|
||||
case OCARINA_NOTE_C_DOWN:
|
||||
EnFr_SetupJumpingUp(this, FROG_YELLOW);
|
||||
break;
|
||||
case 2:
|
||||
case OCARINA_NOTE_C_RIGHT:
|
||||
EnFr_SetupJumpingUp(this, FROG_RED);
|
||||
break;
|
||||
case 3:
|
||||
case OCARINA_NOTE_C_LEFT:
|
||||
EnFr_SetupJumpingUp(this, FROG_PURPLE);
|
||||
break;
|
||||
case 4:
|
||||
case OCARINA_NOTE_C_UP:
|
||||
EnFr_SetupJumpingUp(this, FROG_WHITE);
|
||||
break;
|
||||
}
|
||||
|
@ -755,8 +753,8 @@ void EnFr_ChildSongFirstTime(EnFr* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnFr_TalkBeforeFrogSong(EnFr* this, GlobalContext* globalCtx) {
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && (func_80106BC8(globalCtx))) {
|
||||
func_80106CCC(globalCtx);
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
this->frogSongTimer = 2;
|
||||
this->actionFunc = EnFr_SetupFrogSong;
|
||||
}
|
||||
|
@ -814,7 +812,7 @@ void EnFr_SetupFrogSong(EnFr* this, GlobalContext* globalCtx) {
|
|||
} else {
|
||||
this->frogSongTimer = 40;
|
||||
this->ocarinaNoteIndex = 0;
|
||||
func_8010BD58(globalCtx, 0x2F);
|
||||
func_8010BD58(globalCtx, OCARINA_ACTION_FROGS);
|
||||
this->ocarinaNote = EnFr_GetNextNoteFrogSong(this->ocarinaNoteIndex);
|
||||
EnFr_CheckOcarinaInputFrogSong(this->ocarinaNote);
|
||||
this->actionFunc = EnFr_ContinueFrogSong;
|
||||
|
@ -827,7 +825,7 @@ s32 EnFr_IsFrogSongComplete(EnFr* this, GlobalContext* globalCtx) {
|
|||
MessageContext* msgCtx = &globalCtx->msgCtx;
|
||||
u8 ocarinaNoteIndex;
|
||||
|
||||
if (this->ocarinaNote == (*msgCtx).unk_E410) { // required to match, possibly an array?
|
||||
if (this->ocarinaNote == (*msgCtx).lastOcaNoteIdx) { // required to match, possibly an array?
|
||||
this->ocarinaNoteIndex++;
|
||||
ocarinaNoteIndex = this->ocarinaNoteIndex;
|
||||
if (1) {}
|
||||
|
@ -846,10 +844,10 @@ s32 EnFr_IsFrogSongComplete(EnFr* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnFr_OcarinaMistake(EnFr* this, GlobalContext* globalCtx) {
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
this->reward = GI_NONE;
|
||||
func_80078884(NA_SE_SY_OCARINA_ERROR);
|
||||
func_800ED858(0);
|
||||
Audio_OcaSetInstrument(0);
|
||||
sEnFrPointers.flags = 12;
|
||||
EnFr_DeactivateButterfly();
|
||||
this->actionFunc = EnFr_Deactivate;
|
||||
|
@ -864,7 +862,7 @@ void EnFr_ContinueFrogSong(EnFr* this, GlobalContext* globalCtx) {
|
|||
EnFr_OcarinaMistake(this, globalCtx);
|
||||
} else {
|
||||
this->frogSongTimer--;
|
||||
if (globalCtx->msgCtx.msgMode == 0x32) {
|
||||
if (globalCtx->msgCtx.msgMode == MSGMODE_FROGS_PLAYING) {
|
||||
counter = 0;
|
||||
for (i = 0; i < ARRAY_COUNT(sEnFrPointers.frogs); i++) {
|
||||
frog = sEnFrPointers.frogs[i];
|
||||
|
@ -880,22 +878,22 @@ void EnFr_ContinueFrogSong(EnFr* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
if (globalCtx->msgCtx.msgMode == 0x33) {
|
||||
globalCtx->msgCtx.msgMode = 0x31;
|
||||
switch (globalCtx->msgCtx.unk_E410) {
|
||||
case 0:
|
||||
if (globalCtx->msgCtx.msgMode == MSGMODE_FROGS_WAITING) {
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_FROGS_START;
|
||||
switch (globalCtx->msgCtx.lastOcaNoteIdx) {
|
||||
case OCARINA_NOTE_A:
|
||||
EnFr_SetupJumpingUp(this, FROG_BLUE);
|
||||
break;
|
||||
case 1:
|
||||
case OCARINA_NOTE_C_DOWN:
|
||||
EnFr_SetupJumpingUp(this, FROG_YELLOW);
|
||||
break;
|
||||
case 2:
|
||||
case OCARINA_NOTE_C_RIGHT:
|
||||
EnFr_SetupJumpingUp(this, FROG_RED);
|
||||
break;
|
||||
case 3:
|
||||
case OCARINA_NOTE_C_LEFT:
|
||||
EnFr_SetupJumpingUp(this, FROG_PURPLE);
|
||||
break;
|
||||
case 4:
|
||||
case OCARINA_NOTE_C_UP:
|
||||
EnFr_SetupJumpingUp(this, FROG_WHITE);
|
||||
}
|
||||
if (EnFr_IsFrogSongComplete(this, globalCtx)) {
|
||||
|
@ -914,20 +912,20 @@ void EnFr_SetupReward(EnFr* this, GlobalContext* globalCtx, u8 unkCondition) {
|
|||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
}
|
||||
|
||||
func_800ED858(0);
|
||||
globalCtx->msgCtx.msgMode = 0x37;
|
||||
Audio_OcaSetInstrument(0);
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_PAUSED;
|
||||
this->actionFunc = EnFr_PrintTextBox;
|
||||
}
|
||||
|
||||
void EnFr_PrintTextBox(EnFr* this, GlobalContext* globalCtx) {
|
||||
func_8010B680(globalCtx, this->actor.textId, &this->actor);
|
||||
Message_StartTextbox(globalCtx, this->actor.textId, &this->actor);
|
||||
this->actionFunc = EnFr_TalkBeforeReward;
|
||||
}
|
||||
|
||||
void EnFr_TalkBeforeReward(EnFr* this, GlobalContext* globalCtx) {
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && func_80106BC8(globalCtx)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
this->frogSongTimer = 100;
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
this->actionFunc = EnFr_SetReward;
|
||||
}
|
||||
}
|
||||
|
@ -1000,7 +998,7 @@ void EnFr_Deactivate(EnFr* this, GlobalContext* globalCtx) {
|
|||
frogLoop2->isDeactivating = false;
|
||||
}
|
||||
|
||||
globalCtx->msgCtx.unk_E3EE = 4;
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EV_FROG_CRY_0);
|
||||
if (this->reward == GI_NONE) {
|
||||
this->actionFunc = EnFr_Idle;
|
||||
|
@ -1020,7 +1018,7 @@ void EnFr_GiveReward(EnFr* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnFr_SetIdle(EnFr* this, GlobalContext* globalCtx) {
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 6) && (func_80106BC8(globalCtx))) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) {
|
||||
this->actionFunc = EnFr_Idle;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ typedef struct EnFr {
|
|||
/* 0x037E */ u8 growingScaleIndex; // Target Scale Level 0-3 while growing (3 highest smooth)
|
||||
/* 0x037F */ u8 isGrowing; // While growing, the frog will switch between its larger size and its original size every frame
|
||||
/* 0x0380 */ u8 ocarinaNoteIndex; // Related to unk_381
|
||||
/* 0x0381 */ u8 ocarinaNote; // Ocarina Note to Play for Frogs 2. Related to globalCtx->msgCtx.unk_E410
|
||||
/* 0x0381 */ u8 ocarinaNote; // Ocarina Note to Play for Frogs 2
|
||||
/* 0x0382 */ u8 songIndex; // Song index 1-7 (6 songs + custom HP Song): 5 = sos, 6 = all songs
|
||||
/* 0x0383 */ u8 isJumpingToFrogSong; // Conditional:
|
||||
/* 0x0384 */ char unk_384[0x02];
|
||||
|
|
|
@ -105,8 +105,7 @@ void EnFu_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
s32 func_80A1D94C(EnFu* this, GlobalContext* globalCtx, u16 textID, EnFuActionFunc actionFunc) {
|
||||
s16 yawDiff;
|
||||
|
||||
// func_8002F194 returns 1 if actor flags & 0x100 is set and unsets it
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->actionFunc = actionFunc;
|
||||
return true;
|
||||
}
|
||||
|
@ -122,7 +121,7 @@ s32 func_80A1D94C(EnFu* this, GlobalContext* globalCtx, u16 textID, EnFuActionFu
|
|||
}
|
||||
|
||||
void func_80A1DA04(EnFu* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F334(&this->actor, globalCtx) != 0) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
this->behaviorFlags &= ~FU_WAIT;
|
||||
this->actionFunc = EnFu_WaitChild;
|
||||
|
||||
|
@ -154,13 +153,12 @@ void func_80A1DB60(EnFu* this, GlobalContext* globalCtx) {
|
|||
if (globalCtx->csCtx.state == CS_STATE_IDLE) {
|
||||
this->actionFunc = EnFu_WaitAdult;
|
||||
gSaveContext.eventChkInf[5] |= 0x800;
|
||||
globalCtx->msgCtx.unk_E3EE = 4;
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80A1DBA0(EnFu* this, GlobalContext* globalCtx) {
|
||||
// if dialog state is 2 set action to WaitAdult
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
this->actionFunc = EnFu_WaitAdult;
|
||||
}
|
||||
}
|
||||
|
@ -168,23 +166,23 @@ void func_80A1DBA0(EnFu* this, GlobalContext* globalCtx) {
|
|||
void func_80A1DBD4(EnFu* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (globalCtx->msgCtx.unk_E3EE >= 4) {
|
||||
if (globalCtx->msgCtx.ocarinaMode >= OCARINA_MODE_04) {
|
||||
this->actionFunc = EnFu_WaitAdult;
|
||||
globalCtx->msgCtx.unk_E3EE = 4;
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
this->actor.flags &= ~0x10000;
|
||||
} else if (globalCtx->msgCtx.unk_E3EE == 3) {
|
||||
} else if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_03) {
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
this->actionFunc = func_80A1DB60;
|
||||
this->actor.flags &= ~0x10000;
|
||||
globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(gSongOfStormsCs);
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
Item_Give(globalCtx, ITEM_SONG_STORMS);
|
||||
globalCtx->msgCtx.unk_E3EE = 0;
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_00;
|
||||
gSaveContext.eventChkInf[6] |= 0x20;
|
||||
} else if (globalCtx->msgCtx.unk_E3EE == 2) {
|
||||
} else if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_02) {
|
||||
player->stateFlags2 &= ~0x1000000;
|
||||
this->actionFunc = EnFu_WaitAdult;
|
||||
} else if (globalCtx->msgCtx.unk_E3EE == 1) {
|
||||
} else if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_01) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
}
|
||||
}
|
||||
|
@ -194,8 +192,8 @@ void EnFu_WaitForPlayback(EnFu* this, GlobalContext* globalCtx) {
|
|||
|
||||
player->stateFlags2 |= 0x800000;
|
||||
// if dialog state is 7, player has played back the song
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 7) {
|
||||
func_8010BD58(globalCtx, 0x1A);
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_SONG_DEMO_DONE) {
|
||||
func_8010BD58(globalCtx, OCARINA_ACTION_PLAYBACK_STORMS);
|
||||
this->actionFunc = func_80A1DBD4;
|
||||
}
|
||||
}
|
||||
|
@ -205,10 +203,10 @@ void EnFu_TeachSong(EnFu* this, GlobalContext* globalCtx) {
|
|||
|
||||
player->stateFlags2 |= 0x800000;
|
||||
// if dialog state is 2, start song demonstration
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 2) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
this->behaviorFlags &= ~FU_WAIT;
|
||||
func_800ED858(4); // seems to be related to setting instrument type
|
||||
func_8010BD58(globalCtx, 0xD); // play song demonstration, song 0xD = SoS
|
||||
Audio_OcaSetInstrument(4); // seems to be related to setting instrument type
|
||||
func_8010BD58(globalCtx, OCARINA_ACTION_TEACH_STORMS);
|
||||
this->actionFunc = EnFu_WaitForPlayback;
|
||||
}
|
||||
}
|
||||
|
@ -222,10 +220,10 @@ void EnFu_WaitAdult(EnFu* this, GlobalContext* globalCtx) {
|
|||
func_80A1D94C(this, globalCtx, 0x508E, func_80A1DBA0);
|
||||
} else if (player->stateFlags2 & 0x1000000) {
|
||||
this->actor.textId = 0x5035;
|
||||
func_8010B680(globalCtx, this->actor.textId, NULL);
|
||||
Message_StartTextbox(globalCtx, this->actor.textId, NULL);
|
||||
this->actionFunc = EnFu_TeachSong;
|
||||
this->behaviorFlags |= FU_WAIT;
|
||||
} else if (func_8002F194(&this->actor, globalCtx)) {
|
||||
} else if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->actionFunc = func_80A1DBA0;
|
||||
} else if (ABS(yawDiff) < 0x2301) {
|
||||
if (this->actor.xzDistToPlayer < 100.0f) {
|
||||
|
|
|
@ -56,7 +56,7 @@ static TearShape sTearShapes[] = {
|
|||
{ sTearSizesSmall, ARRAY_COUNT(sTearSizesSmall) },
|
||||
};
|
||||
|
||||
/// How much each joint is affected by backwards/forwards swaying motion
|
||||
// How much each joint is affected by backwards/forwards swaying motion
|
||||
static f32 sBackSwayCoefficients[GANON_MANT_NUM_JOINTS] = {
|
||||
0.0f, 1.0f, 0.5f, 0.25f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
|
||||
};
|
||||
|
@ -65,7 +65,7 @@ static f32 D_80A24DB4[] = {
|
|||
0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
|
||||
};
|
||||
|
||||
/// How much each joint is affected by sideways swaying motion, tends to 0
|
||||
// How much each joint is affected by sideways swaying motion, tends to 0
|
||||
static f32 sSideSwayCoefficients[GANON_MANT_NUM_JOINTS] = {
|
||||
0.0f, 1.0f, 0.9f, 0.8f, 0.7f, 0.6f, 0.5f, 0.4f, 0.3f, 0.2f, 0.1f, 0.0f,
|
||||
};
|
||||
|
|
|
@ -281,7 +281,7 @@ void func_80A2F83C(EnGb* this, GlobalContext* globalCtx) {
|
|||
return;
|
||||
}
|
||||
}
|
||||
if (func_8002F194(&this->dyna.actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->dyna.actor, globalCtx)) {
|
||||
switch (func_8002F368(globalCtx)) {
|
||||
case EXCH_ITEM_NONE:
|
||||
func_80A2F180(this);
|
||||
|
@ -304,7 +304,7 @@ void func_80A2F83C(EnGb* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A2F94C(EnGb* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 6 && func_80106BC8(globalCtx)) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE && Message_ShouldAdvance(globalCtx)) {
|
||||
if (!(gSaveContext.infTable[0xB] & 0x40)) {
|
||||
gSaveContext.infTable[0xB] |= 0x40;
|
||||
}
|
||||
|
@ -314,7 +314,7 @@ void func_80A2F94C(EnGb* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A2F9C0(EnGb* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 6 && func_80106BC8(globalCtx)) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE && Message_ShouldAdvance(globalCtx)) {
|
||||
if (!(gSaveContext.infTable[0xB] & 0x40)) {
|
||||
gSaveContext.infTable[0xB] |= 0x40;
|
||||
}
|
||||
|
@ -326,7 +326,7 @@ void func_80A2F9C0(EnGb* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A2FA50(EnGb* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 6 && func_80106BC8(globalCtx)) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE && Message_ShouldAdvance(globalCtx)) {
|
||||
if (!(gSaveContext.infTable[0xB] & 0x40)) {
|
||||
gSaveContext.infTable[0xB] |= 0x40;
|
||||
}
|
||||
|
@ -344,14 +344,14 @@ void func_80A2FA50(EnGb* this, GlobalContext* globalCtx) {
|
|||
|
||||
player->exchangeItemId = EXCH_ITEM_NONE;
|
||||
this->textId = 0x70F8;
|
||||
func_8010B720(globalCtx, this->textId);
|
||||
Message_ContinueTextbox(globalCtx, this->textId);
|
||||
this->actionFunc = func_80A2FB40;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_80A2FB40(EnGb* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 6 && func_80106BC8(globalCtx)) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE && Message_ShouldAdvance(globalCtx)) {
|
||||
func_8002F434(&this->dyna.actor, globalCtx, GI_BOTTLE, 100.0f, 10.0f);
|
||||
this->actionFunc = func_80A2FBB0;
|
||||
}
|
||||
|
@ -367,8 +367,8 @@ void func_80A2FBB0(EnGb* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A2FC0C(EnGb* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 6 && func_80106BC8(globalCtx)) {
|
||||
func_8002F194(&this->dyna.actor, globalCtx);
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE && Message_ShouldAdvance(globalCtx)) {
|
||||
Actor_ProcessTalkRequest(&this->dyna.actor, globalCtx);
|
||||
func_80A2F180(this);
|
||||
this->actionFunc = func_80A2F83C;
|
||||
}
|
||||
|
|
|
@ -184,7 +184,7 @@ void EnGe1_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
s32 EnGe1_SetTalkAction(EnGe1* this, GlobalContext* globalCtx, u16 textId, f32 arg3, EnGe1ActionFunc actionFunc) {
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->actionFunc = actionFunc;
|
||||
this->animFunc = EnGe1_StopFidget;
|
||||
this->stateFlags &= ~GE1_STATE_IDLE_ANIM;
|
||||
|
@ -248,7 +248,7 @@ void EnGe1_SpotPlayer(EnGe1* this, GlobalContext* globalCtx) {
|
|||
this->actionFunc = EnGe1_KickPlayer;
|
||||
func_8002DF54(globalCtx, &this->actor, 0x5F);
|
||||
func_80078884(NA_SE_SY_FOUND);
|
||||
func_8010B680(globalCtx, 0x6000, &this->actor);
|
||||
Message_StartTextbox(globalCtx, 0x6000, &this->actor);
|
||||
}
|
||||
|
||||
void EnGe1_WatchForPlayerFrontOnly(EnGe1* this, GlobalContext* globalCtx) {
|
||||
|
@ -268,7 +268,7 @@ void EnGe1_WatchForPlayerFrontOnly(EnGe1* this, GlobalContext* globalCtx) {
|
|||
void EnGe1_ChooseActionFromTextId(EnGe1* this, GlobalContext* globalCtx) {
|
||||
this->stateFlags |= GE1_STATE_TALKING;
|
||||
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
switch (this->actor.textId) {
|
||||
case 0x6001:
|
||||
this->actionFunc = EnGe1_SetNormalText;
|
||||
|
@ -335,14 +335,14 @@ void EnGe1_Open_GTGGuard(EnGe1* this, GlobalContext* globalCtx) {
|
|||
this->actionFunc = EnGe1_WaitTillOpened_GTGGuard;
|
||||
Flags_SetSwitch(globalCtx, (this->actor.params >> 8) & 0x3F);
|
||||
this->cutsceneTimer = 50;
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
} else if ((this->skelAnime.curFrame == 15.0f) || (this->skelAnime.curFrame == 19.0f)) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_IT_HAND_CLAP);
|
||||
}
|
||||
}
|
||||
|
||||
void EnGe1_SetupOpen_GTGGuard(EnGe1* this, GlobalContext* globalCtx) {
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && func_80106BC8(globalCtx)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
this->actionFunc = EnGe1_Open_GTGGuard;
|
||||
Animation_Change(&this->skelAnime, &gGerudoWhiteClapAnim, 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(&gGerudoWhiteClapAnim), ANIMMODE_ONCE, -3.0f);
|
||||
|
@ -353,7 +353,7 @@ void EnGe1_SetupOpen_GTGGuard(EnGe1* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnGe1_RefuseEntryTooPoor_GTGGuard(EnGe1* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 2) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
this->actionFunc = EnGe1_CheckForCard_GTGGuard;
|
||||
EnGe1_SetAnimationIdle(this);
|
||||
}
|
||||
|
@ -361,17 +361,17 @@ void EnGe1_RefuseEntryTooPoor_GTGGuard(EnGe1* this, GlobalContext* globalCtx) {
|
|||
|
||||
void EnGe1_OfferOpen_GTGGuard(EnGe1* this, GlobalContext* globalCtx) {
|
||||
this->stateFlags |= GE1_STATE_TALKING;
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 4) && func_80106BC8(globalCtx)) {
|
||||
func_80106CCC(globalCtx);
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0:
|
||||
if (gSaveContext.rupees < 10) {
|
||||
func_8010B720(globalCtx, 0x6016);
|
||||
Message_ContinueTextbox(globalCtx, 0x6016);
|
||||
this->actionFunc = EnGe1_RefuseEntryTooPoor_GTGGuard;
|
||||
} else {
|
||||
Rupees_ChangeBy(-10);
|
||||
func_8010B720(globalCtx, 0x6015);
|
||||
Message_ContinueTextbox(globalCtx, 0x6015);
|
||||
this->actionFunc = EnGe1_SetupOpen_GTGGuard;
|
||||
}
|
||||
break;
|
||||
|
@ -385,7 +385,7 @@ void EnGe1_OfferOpen_GTGGuard(EnGe1* this, GlobalContext* globalCtx) {
|
|||
|
||||
void EnGe1_RefuseOpenNoCard_GTGGuard(EnGe1* this, GlobalContext* globalCtx) {
|
||||
this->stateFlags |= GE1_STATE_TALKING;
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
this->actionFunc = EnGe1_CheckForCard_GTGGuard;
|
||||
EnGe1_SetAnimationIdle(this);
|
||||
}
|
||||
|
@ -406,8 +406,8 @@ void EnGe1_CheckForCard_GTGGuard(EnGe1* this, GlobalContext* globalCtx) {
|
|||
void EnGe1_WaitGateOpen_GateOp(EnGe1* this, GlobalContext* globalCtx) {
|
||||
this->stateFlags |= GE1_STATE_TALKING;
|
||||
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && func_80106BC8(globalCtx)) {
|
||||
func_80106CCC(globalCtx);
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
this->actionFunc = EnGe1_CheckGate_GateOp;
|
||||
EnGe1_SetAnimationIdle(this);
|
||||
}
|
||||
|
@ -428,7 +428,7 @@ void EnGe1_OpenGate_GateOp(EnGe1* this, GlobalContext* globalCtx) {
|
|||
this->actionFunc = EnGe1_WaitUntilGateOpened_GateOp;
|
||||
Flags_SetSwitch(globalCtx, (this->actor.params >> 8) & 0x3F);
|
||||
this->cutsceneTimer = 50;
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
} else if ((this->skelAnime.curFrame == 15.0f) || (this->skelAnime.curFrame == 19.0f)) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_IT_HAND_CLAP);
|
||||
}
|
||||
|
@ -437,7 +437,7 @@ void EnGe1_OpenGate_GateOp(EnGe1* this, GlobalContext* globalCtx) {
|
|||
void EnGe1_SetupOpenGate_GateOp(EnGe1* this, GlobalContext* globalCtx) {
|
||||
this->stateFlags |= GE1_STATE_TALKING;
|
||||
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && func_80106BC8(globalCtx)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
this->actionFunc = EnGe1_OpenGate_GateOp;
|
||||
Animation_Change(&this->skelAnime, &gGerudoWhiteClapAnim, 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(&gGerudoWhiteClapAnim), ANIMMODE_ONCE, -3.0f);
|
||||
|
@ -460,7 +460,7 @@ void EnGe1_CheckGate_GateOp(EnGe1* this, GlobalContext* globalCtx) {
|
|||
void EnGe1_Talk_GateGuard(EnGe1* this, GlobalContext* globalCtx) {
|
||||
this->stateFlags |= GE1_STATE_TALKING;
|
||||
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
this->actionFunc = EnGe1_GetReaction_GateGuard;
|
||||
EnGe1_SetAnimationIdle(this);
|
||||
}
|
||||
|
@ -486,7 +486,7 @@ void EnGe1_GetReaction_GateGuard(EnGe1* this, GlobalContext* globalCtx) {
|
|||
// Archery functions
|
||||
|
||||
void EnGe1_SetupWait_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
this->actionFunc = EnGe1_Wait_Archery;
|
||||
EnGe1_SetAnimationIdle(this);
|
||||
}
|
||||
|
@ -523,7 +523,7 @@ void EnGe1_WaitTillItemGiven_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
|||
void EnGe1_BeginGiveItem_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
||||
s32 getItemId;
|
||||
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
this->actor.flags &= ~0x10000;
|
||||
this->actionFunc = EnGe1_WaitTillItemGiven_Archery;
|
||||
}
|
||||
|
@ -549,7 +549,7 @@ void EnGe1_BeginGiveItem_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnGe1_TalkWinPrize_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->actionFunc = EnGe1_BeginGiveItem_Archery;
|
||||
this->actor.flags &= ~0x10000;
|
||||
} else {
|
||||
|
@ -558,8 +558,8 @@ void EnGe1_TalkWinPrize_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnGe1_TalkTooPoor_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && func_80106BC8(globalCtx)) {
|
||||
func_80106CCC(globalCtx);
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
this->actionFunc = EnGe1_Wait_Archery;
|
||||
EnGe1_SetAnimationIdle(this);
|
||||
}
|
||||
|
@ -572,13 +572,13 @@ void EnGe1_BeginGame_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
|||
Player* player = GET_PLAYER(globalCtx);
|
||||
Actor* horse;
|
||||
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 4) && func_80106BC8(globalCtx)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE) && Message_ShouldAdvance(globalCtx)) {
|
||||
this->actor.flags &= ~0x10000;
|
||||
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0:
|
||||
if (gSaveContext.rupees < 20) {
|
||||
func_8010B720(globalCtx, 0x85);
|
||||
Message_ContinueTextbox(globalCtx, 0x85);
|
||||
this->actionFunc = EnGe1_TalkTooPoor_Archery;
|
||||
} else {
|
||||
Rupees_ChangeBy(-20);
|
||||
|
@ -606,21 +606,21 @@ void EnGe1_BeginGame_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
|||
|
||||
case 1:
|
||||
this->actionFunc = EnGe1_Wait_Archery;
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EnGe1_TalkOfferPlay_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && func_80106BC8(globalCtx)) {
|
||||
func_8010B720(globalCtx, 0x6041);
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_ContinueTextbox(globalCtx, 0x6041);
|
||||
this->actionFunc = EnGe1_BeginGame_Archery;
|
||||
}
|
||||
}
|
||||
|
||||
void EnGe1_TalkNoPrize_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->actionFunc = EnGe1_TalkOfferPlay_Archery;
|
||||
} else {
|
||||
func_8002F2CC(&this->actor, globalCtx, 300.0f);
|
||||
|
@ -630,12 +630,11 @@ void EnGe1_TalkNoPrize_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
|||
void EnGe1_TalkAfterGame_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
||||
gSaveContext.eventInf[0] &= ~0x100;
|
||||
LOG_NUM("z_common_data.yabusame_total", gSaveContext.minigameScore, "../z_en_ge1.c", 1110);
|
||||
LOG_NUM("z_common_data.memory.information.room_inf[127][ 0 ]", gSaveContext.highScores[HS_HBA], "../z_en_ge1.c",
|
||||
1111);
|
||||
LOG_NUM("z_common_data.memory.information.room_inf[127][ 0 ]", HIGH_SCORE(HS_HBA), "../z_en_ge1.c", 1111);
|
||||
this->actor.flags |= 0x10000;
|
||||
|
||||
if (gSaveContext.highScores[HS_HBA] < gSaveContext.minigameScore) {
|
||||
gSaveContext.highScores[HS_HBA] = gSaveContext.minigameScore;
|
||||
if (HIGH_SCORE(HS_HBA) < gSaveContext.minigameScore) {
|
||||
HIGH_SCORE(HS_HBA) = gSaveContext.minigameScore;
|
||||
}
|
||||
|
||||
if (gSaveContext.minigameScore < 1000) {
|
||||
|
@ -660,7 +659,7 @@ void EnGe1_TalkAfterGame_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
|||
|
||||
void EnGe1_TalkNoHorse_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
||||
this->stateFlags |= GE1_STATE_TALKING;
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
this->actionFunc = EnGe1_Wait_Archery;
|
||||
EnGe1_SetAnimationIdle(this);
|
||||
}
|
||||
|
|
|
@ -422,7 +422,7 @@ void EnGe2_LookAtPlayer(EnGe2* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnGe2_SetActionAfterTalk(EnGe2* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
|
||||
switch (this->actor.params & 0xFF) {
|
||||
case GE2_TYPE_PATROLLING:
|
||||
|
@ -455,8 +455,8 @@ void EnGe2_WaitTillCardGiven(EnGe2* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnGe2_GiveCard(EnGe2* 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->actor.flags &= ~0x10000;
|
||||
this->actionFunc = EnGe2_WaitTillCardGiven;
|
||||
func_8002F434(&this->actor, globalCtx, GI_GERUDO_CARD, 10000.0f, 50.0f);
|
||||
|
@ -465,7 +465,7 @@ void EnGe2_GiveCard(EnGe2* this, GlobalContext* globalCtx) {
|
|||
|
||||
void EnGe2_ForceTalk(EnGe2* this, GlobalContext* globalCtx) {
|
||||
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->actionFunc = EnGe2_GiveCard;
|
||||
} else {
|
||||
this->actor.textId = 0x6004;
|
||||
|
@ -481,7 +481,7 @@ void EnGe2_SetupCapturePlayer(EnGe2* this, GlobalContext* globalCtx) {
|
|||
EnGe2_ChangeAction(this, GE2_ACTION_CAPTURETURN);
|
||||
func_8002DF54(globalCtx, &this->actor, 95);
|
||||
func_80078884(NA_SE_SY_FOUND);
|
||||
func_8010B680(globalCtx, 0x6000, &this->actor);
|
||||
Message_StartTextbox(globalCtx, 0x6000, &this->actor);
|
||||
}
|
||||
|
||||
void EnGe2_MaintainColliderAndSetAnimState(EnGe2* this, GlobalContext* globalCtx) {
|
||||
|
@ -518,7 +518,7 @@ void EnGe2_UpdateFriendly(Actor* thisx, GlobalContext* globalCtx) {
|
|||
EnGe2_MaintainColliderAndSetAnimState(this, globalCtx);
|
||||
this->actionFunc(this, globalCtx);
|
||||
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
if ((this->actor.params & 0xFF) == GE2_TYPE_PATROLLING) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
EnGe2_ChangeAction(this, GE2_ACTION_WAITLOOKATPLAYER);
|
||||
|
|
|
@ -126,7 +126,7 @@ void EnGe3_LookAtPlayer(EnGe3* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnGe3_Wait(EnGe3* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
this->actionFunc = EnGe3_WaitLookAtPlayer;
|
||||
this->actor.update = EnGe3_UpdateWhenNotTalking;
|
||||
this->actor.flags &= ~0x10000;
|
||||
|
@ -148,8 +148,8 @@ void EnGe3_WaitTillCardGiven(EnGe3* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnGe3_GiveCard(EnGe3* 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->actor.flags &= ~0x10000;
|
||||
this->actionFunc = EnGe3_WaitTillCardGiven;
|
||||
func_8002F434(&this->actor, globalCtx, GI_GERUDO_CARD, 10000.0f, 50.0f);
|
||||
|
@ -157,7 +157,7 @@ void EnGe3_GiveCard(EnGe3* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnGe3_ForceTalk(EnGe3* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->actionFunc = EnGe3_GiveCard;
|
||||
} else {
|
||||
if (!(this->unk_30C & 4)) {
|
||||
|
@ -205,7 +205,7 @@ void EnGe3_UpdateWhenNotTalking(Actor* thisx, GlobalContext* globalCtx) {
|
|||
EnGe3_UpdateCollision(this, globalCtx);
|
||||
this->actionFunc(this, globalCtx);
|
||||
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->actionFunc = EnGe3_Wait;
|
||||
this->actor.update = EnGe3_Update;
|
||||
} else {
|
||||
|
|
|
@ -916,7 +916,7 @@ void EnGeldB_SpinAttack(EnGeldB* this, GlobalContext* globalCtx) {
|
|||
func_8002F71C(globalCtx, &this->actor, 6.0f, this->actor.yawTowardsPlayer, 6.0f);
|
||||
this->spinAttackState = 2;
|
||||
func_8002DF54(globalCtx, &this->actor, 0x18);
|
||||
func_8010B680(globalCtx, 0x6003, &this->actor);
|
||||
Message_StartTextbox(globalCtx, 0x6003, &this->actor);
|
||||
this->timer = 30;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_TWINROBA_YOUNG_LAUGH);
|
||||
|
|
|
@ -176,7 +176,7 @@ void func_80A3DB04(EnGm* this, GlobalContext* globalCtx) {
|
|||
if (Flags_GetSwitch(globalCtx, this->actor.params)) {
|
||||
EnGm_SetTextID(this);
|
||||
this->actionFunc = func_80A3DC44;
|
||||
} else if (func_8002F194(&this->actor, globalCtx)) {
|
||||
} else if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->actionFunc = func_80A3DBF4;
|
||||
} else if ((this->collider.base.ocFlags1 & OC1_HIT) || (SQ(dx) + SQ(dz)) < SQ(100.0f)) {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
|
@ -185,7 +185,7 @@ void func_80A3DB04(EnGm* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A3DBF4(EnGm* this, GlobalContext* globalCtx) {
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 6) && func_80106BC8(globalCtx)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) {
|
||||
this->actionFunc = func_80A3DB04;
|
||||
}
|
||||
}
|
||||
|
@ -201,7 +201,7 @@ void func_80A3DC44(EnGm* this, GlobalContext* globalCtx) {
|
|||
dx = this->talkPos.x - player->actor.world.pos.x;
|
||||
dz = this->talkPos.z - player->actor.world.pos.z;
|
||||
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
switch (func_80A3D7C8()) {
|
||||
case 0:
|
||||
gSaveContext.infTable[11] |= 1;
|
||||
|
@ -225,23 +225,23 @@ void func_80A3DC44(EnGm* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A3DD7C(EnGm* this, GlobalContext* globalCtx) {
|
||||
u8 dialogState = func_8010BDBC(&globalCtx->msgCtx);
|
||||
u8 dialogState = Message_GetState(&globalCtx->msgCtx);
|
||||
|
||||
if ((dialogState == 6 || dialogState == 5) && func_80106BC8(globalCtx)) {
|
||||
if ((dialogState == TEXT_STATE_DONE || dialogState == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
this->actionFunc = func_80A3DC44;
|
||||
if (dialogState == 5) {
|
||||
globalCtx->msgCtx.msgMode = 0x36;
|
||||
globalCtx->msgCtx.unk_E3E7 = 4;
|
||||
if (dialogState == TEXT_STATE_EVENT) {
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
globalCtx->msgCtx.stateTimer = 4;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EnGm_ProcessChoiceIndex(EnGm* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4 && func_80106BC8(globalCtx)) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE && Message_ShouldAdvance(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0: // yes
|
||||
if (gSaveContext.rupees < 200) {
|
||||
func_8010B720(globalCtx, 0xC8);
|
||||
Message_ContinueTextbox(globalCtx, 0xC8);
|
||||
this->actionFunc = func_80A3DD7C;
|
||||
} else {
|
||||
func_8002F434(&this->actor, globalCtx, GI_SWORD_KNIFE, 415.0f, 10.0f);
|
||||
|
@ -249,7 +249,7 @@ void EnGm_ProcessChoiceIndex(EnGm* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
break;
|
||||
case 1: // no
|
||||
func_8010B720(globalCtx, 0x3050);
|
||||
Message_ContinueTextbox(globalCtx, 0x3050);
|
||||
this->actionFunc = func_80A3DD7C;
|
||||
break;
|
||||
}
|
||||
|
@ -266,7 +266,7 @@ void func_80A3DF00(EnGm* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A3DF60(EnGm* this, GlobalContext* globalCtx) {
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 6) && func_80106BC8(globalCtx)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) {
|
||||
Rupees_ChangeBy(-200);
|
||||
this->actionFunc = func_80A3DC44;
|
||||
}
|
||||
|
|
|
@ -202,9 +202,9 @@ s16 EnGo_SetFlagsGetStates(GlobalContext* globalCtx, Actor* thisx) {
|
|||
f32 yRange = fabsf(thisx->yDistToPlayer) + 1.0f;
|
||||
|
||||
xzRange = thisx->xzDistToPlayer + 1.0f;
|
||||
switch (func_8010BDBC(&globalCtx->msgCtx)) {
|
||||
switch (Message_GetState(&globalCtx->msgCtx)) {
|
||||
if (globalCtx) {}
|
||||
case 2:
|
||||
case TEXT_STATE_CLOSING:
|
||||
switch (thisx->textId) {
|
||||
case 0x3008:
|
||||
gSaveContext.infTable[14] |= 1;
|
||||
|
@ -256,8 +256,8 @@ s16 EnGo_SetFlagsGetStates(GlobalContext* globalCtx, Actor* thisx) {
|
|||
break;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (func_80106BC8(globalCtx)) {
|
||||
case TEXT_STATE_CHOICE:
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
switch (thisx->textId) {
|
||||
case 0x300A:
|
||||
if (globalCtx->msgCtx.choiceIndex == 0) {
|
||||
|
@ -269,7 +269,7 @@ s16 EnGo_SetFlagsGetStates(GlobalContext* globalCtx, Actor* thisx) {
|
|||
} else {
|
||||
thisx->textId = 0x300D;
|
||||
}
|
||||
func_8010B720(globalCtx, thisx->textId);
|
||||
Message_ContinueTextbox(globalCtx, thisx->textId);
|
||||
unkState = 1;
|
||||
break;
|
||||
case 0x3034:
|
||||
|
@ -284,7 +284,7 @@ s16 EnGo_SetFlagsGetStates(GlobalContext* globalCtx, Actor* thisx) {
|
|||
} else {
|
||||
thisx->textId = 0x3033;
|
||||
}
|
||||
func_8010B720(globalCtx, thisx->textId);
|
||||
Message_ContinueTextbox(globalCtx, thisx->textId);
|
||||
unkState = 1;
|
||||
break;
|
||||
case 0x3054:
|
||||
|
@ -293,7 +293,7 @@ s16 EnGo_SetFlagsGetStates(GlobalContext* globalCtx, Actor* thisx) {
|
|||
unkState = 2;
|
||||
} else {
|
||||
thisx->textId = 0x3056;
|
||||
func_8010B720(globalCtx, thisx->textId);
|
||||
Message_ContinueTextbox(globalCtx, thisx->textId);
|
||||
unkState = 1;
|
||||
}
|
||||
gSaveContext.infTable[11] |= 0x10;
|
||||
|
@ -301,15 +301,15 @@ s16 EnGo_SetFlagsGetStates(GlobalContext* globalCtx, Actor* thisx) {
|
|||
}
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (func_80106BC8(globalCtx)) {
|
||||
case TEXT_STATE_EVENT:
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
switch (thisx->textId) {
|
||||
case 0x3035:
|
||||
gSaveContext.infTable[16] |= 0x800;
|
||||
case 0x3032:
|
||||
case 0x3033:
|
||||
thisx->textId = 0x3034;
|
||||
func_8010B720(globalCtx, thisx->textId);
|
||||
Message_ContinueTextbox(globalCtx, thisx->textId);
|
||||
unkState = 1;
|
||||
break;
|
||||
default:
|
||||
|
@ -318,16 +318,16 @@ s16 EnGo_SetFlagsGetStates(GlobalContext* globalCtx, Actor* thisx) {
|
|||
}
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if (func_80106BC8(globalCtx)) {
|
||||
case TEXT_STATE_DONE:
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
unkState = 3;
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
case 1:
|
||||
case 3:
|
||||
case 7:
|
||||
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_9:
|
||||
break;
|
||||
}
|
||||
return unkState;
|
||||
|
@ -338,7 +338,7 @@ s32 func_80A3ED24(GlobalContext* globalCtx, EnGo* this, struct_80034A14_arg1* ar
|
|||
if (arg2->unk_00) {
|
||||
arg2->unk_00 = unkFunc2(globalCtx, &this->actor);
|
||||
return false;
|
||||
} else if (func_8002F194(&this->actor, globalCtx)) {
|
||||
} else if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
arg2->unk_00 = 1;
|
||||
return true;
|
||||
} else if (!func_8002F2CC(&this->actor, globalCtx, arg3)) {
|
||||
|
@ -865,20 +865,20 @@ void EnGo_BiggoronActionFunc(EnGo* this, GlobalContext* globalCtx) {
|
|||
this->unk_21E = 100;
|
||||
this->unk_1E0.unk_00 = 0;
|
||||
EnGo_SetupAction(this, EnGo_Eyedrops);
|
||||
globalCtx->msgCtx.msgMode = 0x37;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_PAUSED;
|
||||
gSaveContext.timer2State = 0;
|
||||
OnePointCutscene_Init(globalCtx, 4190, -99, &this->actor, MAIN_CAM);
|
||||
} else {
|
||||
this->unk_1E0.unk_00 = 0;
|
||||
EnGo_SetupAction(this, EnGo_GetItem);
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
EnGo_GetItem(this, globalCtx);
|
||||
}
|
||||
}
|
||||
} else if (((this->actor.params & 0xF0) == 0) && (this->unk_1E0.unk_00 == 2)) {
|
||||
EnGo_SetupAction(this, EnGo_GetItem);
|
||||
globalCtx->msgCtx.unk_E3E7 = 4;
|
||||
globalCtx->msgCtx.msgMode = 0x36;
|
||||
globalCtx->msgCtx.stateTimer = 4;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
} else {
|
||||
if ((DECR(this->unk_212) == 0) && !EnGo_IsCameraModified(this, globalCtx)) {
|
||||
EnGo_ReverseAnimation(this);
|
||||
|
@ -986,11 +986,11 @@ void func_80A40C78(EnGo* this, GlobalContext* globalCtx) {
|
|||
gSaveContext.bgsFlag = true;
|
||||
} else if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_PRESCRIPTION) {
|
||||
this->actor.textId = 0x3058;
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
this->unk_1E0.unk_00 = 1;
|
||||
} else if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_CLAIM_CHECK) {
|
||||
this->actor.textId = 0x305C;
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
this->unk_1E0.unk_00 = 1;
|
||||
Environment_ClearBgsDayCount();
|
||||
}
|
||||
|
@ -1000,7 +1000,7 @@ void func_80A40C78(EnGo* this, GlobalContext* globalCtx) {
|
|||
void EnGo_Eyedrops(EnGo* this, GlobalContext* globalCtx) {
|
||||
if (DECR(this->unk_21E) == 0) {
|
||||
this->actor.textId = 0x305A;
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
this->unk_1E0.unk_00 = 1;
|
||||
EnGo_SetupAction(this, func_80A40DCC);
|
||||
}
|
||||
|
@ -1010,7 +1010,7 @@ void func_80A40DCC(EnGo* this, GlobalContext* globalCtx) {
|
|||
if (this->unk_1E0.unk_00 == 2) {
|
||||
EnGo_ChangeAnimation(this, 1);
|
||||
this->skelAnime.curFrame = Animation_GetLastFrame(&gGoronAnim_004930);
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
EnGo_SetupAction(this, EnGo_GetItem);
|
||||
EnGo_GetItem(this, globalCtx);
|
||||
}
|
||||
|
|
|
@ -270,9 +270,10 @@ void EnGo2_GetItem(EnGo2* this, GlobalContext* globalCtx, s32 getItemId) {
|
|||
}
|
||||
|
||||
s32 EnGo2_GetDialogState(EnGo2* this, GlobalContext* globalCtx) {
|
||||
s16 dialogState = func_8010BDBC(&globalCtx->msgCtx);
|
||||
s16 dialogState = Message_GetState(&globalCtx->msgCtx);
|
||||
|
||||
if ((this->dialogState == 10) || (this->dialogState == 5) || (this->dialogState == 2) || (this->dialogState == 1)) {
|
||||
if ((this->dialogState == TEXT_STATE_AWAITING_NEXT) || (this->dialogState == TEXT_STATE_EVENT) ||
|
||||
(this->dialogState == TEXT_STATE_CLOSING) || (this->dialogState == TEXT_STATE_DONE_HAS_NEXT)) {
|
||||
if (dialogState != this->dialogState) {
|
||||
this->unk_20C++;
|
||||
}
|
||||
|
@ -318,16 +319,16 @@ u16 EnGo2_GetTextIdGoronCityRollingBig(GlobalContext* globalCtx, EnGo2* this) {
|
|||
s16 EnGo2_GetStateGoronCityRollingBig(GlobalContext* globalCtx, EnGo2* this) {
|
||||
s32 bombBagUpgrade;
|
||||
|
||||
switch (func_8010BDBC(&globalCtx->msgCtx)) {
|
||||
case 2:
|
||||
switch (Message_GetState(&globalCtx->msgCtx)) {
|
||||
case TEXT_STATE_CLOSING:
|
||||
return 2;
|
||||
case 5:
|
||||
if (func_80106BC8(globalCtx)) {
|
||||
case TEXT_STATE_EVENT:
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
if (this->actor.textId == 0x3012) {
|
||||
this->actionFunc = EnGo2_SetupGetItem;
|
||||
bombBagUpgrade = CUR_CAPACITY(UPG_BOMB_BAG) == 30 ? GI_BOMB_BAG_40 : GI_BOMB_BAG_30;
|
||||
EnGo2_GetItem(this, globalCtx, bombBagUpgrade);
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
gSaveContext.infTable[17] |= 0x4000;
|
||||
return 2;
|
||||
} else {
|
||||
|
@ -345,16 +346,16 @@ u16 EnGo2_GetTextIdGoronDmtBombFlower(GlobalContext* globalCtx, EnGo2* this) {
|
|||
|
||||
// DMT Goron by Bomb Flower Choice
|
||||
s16 EnGo2_GetStateGoronDmtBombFlower(GlobalContext* globalCtx, EnGo2* this) {
|
||||
switch (func_8010BDBC(&globalCtx->msgCtx)) {
|
||||
case 2:
|
||||
switch (Message_GetState(&globalCtx->msgCtx)) {
|
||||
case TEXT_STATE_CLOSING:
|
||||
if ((this->actor.textId == 0x300B) && (gSaveContext.infTable[14] & 0x800) == 0) {
|
||||
gSaveContext.infTable[14] |= 0x800;
|
||||
return 2;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
case 4:
|
||||
if (func_80106BC8(globalCtx)) {
|
||||
case TEXT_STATE_CHOICE:
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
// Ask question to DMT Goron by bomb flower
|
||||
if (this->actor.textId == 0x300A) {
|
||||
if (globalCtx->msgCtx.choiceIndex == 0) {
|
||||
|
@ -362,7 +363,7 @@ s16 EnGo2_GetStateGoronDmtBombFlower(GlobalContext* globalCtx, EnGo2* this) {
|
|||
} else {
|
||||
this->actor.textId = 0x300D;
|
||||
}
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
@ -380,7 +381,7 @@ u16 EnGo2_GetTextIdGoronDmtRollingSmall(GlobalContext* globalCtx, EnGo2* this) {
|
|||
}
|
||||
|
||||
s16 EnGo2_GetStateGoronDmtRollingSmall(GlobalContext* globalCtx, EnGo2* this) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 2) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
return 0;
|
||||
} else {
|
||||
return 1;
|
||||
|
@ -398,7 +399,7 @@ u16 EnGo2_GetTextIdGoronDmtDcEntrance(GlobalContext* globalCtx, EnGo2* this) {
|
|||
}
|
||||
|
||||
s16 EnGo2_GetStateGoronDmtDcEntrance(GlobalContext* globalCtx, EnGo2* this) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 2) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
if (this->actor.textId == 0x3008) {
|
||||
gSaveContext.infTable[14] |= 0x1;
|
||||
}
|
||||
|
@ -419,7 +420,7 @@ u16 EnGo2_GetTextIdGoronCityEntrance(GlobalContext* globalCtx, EnGo2* this) {
|
|||
}
|
||||
|
||||
s16 EnGo2_GetStateGoronCityEntrance(GlobalContext* globalCtx, EnGo2* this) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 2) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
if (this->actor.textId == 0x3014) {
|
||||
gSaveContext.infTable[15] |= 0x1;
|
||||
}
|
||||
|
@ -440,7 +441,7 @@ u16 EnGo2_GetTextIdGoronCityIsland(GlobalContext* globalCtx, EnGo2* this) {
|
|||
}
|
||||
|
||||
s16 EnGo2_GetStateGoronCityIsland(GlobalContext* globalCtx, EnGo2* this) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 2) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
if (this->actor.textId == 0x3016) {
|
||||
gSaveContext.infTable[15] |= 0x10;
|
||||
}
|
||||
|
@ -463,7 +464,7 @@ u16 EnGo2_GetTextIdGoronCityLowestFloor(GlobalContext* globalCtx, EnGo2* this) {
|
|||
}
|
||||
|
||||
s16 EnGo2_GetStateGoronCityLowestFloor(GlobalContext* globalCtx, EnGo2* this) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 2) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
if (this->actor.textId == 0x3018) {
|
||||
gSaveContext.infTable[15] |= 0x100;
|
||||
}
|
||||
|
@ -480,7 +481,7 @@ u16 EnGo2_GetTextIdGoronCityLink(GlobalContext* globalCtx, EnGo2* this) {
|
|||
return gSaveContext.infTable[16] & 0x4000 ? 0x3038 : 0x3037;
|
||||
} else if (gSaveContext.infTable[16] & 0x1000) {
|
||||
this->unk_20C = 0;
|
||||
this->dialogState = 0;
|
||||
this->dialogState = TEXT_STATE_NONE;
|
||||
return gSaveContext.infTable[16] & 0x400 ? 0x3033 : 0x3032;
|
||||
} else {
|
||||
return 0x3030;
|
||||
|
@ -489,7 +490,7 @@ u16 EnGo2_GetTextIdGoronCityLink(GlobalContext* globalCtx, EnGo2* this) {
|
|||
|
||||
s16 EnGo2_GetStateGoronCityLink(GlobalContext* globalCtx, EnGo2* this) {
|
||||
switch (EnGo2_GetDialogState(this, globalCtx)) {
|
||||
case 2:
|
||||
case TEXT_STATE_CLOSING:
|
||||
switch (this->actor.textId) {
|
||||
case 0x3036:
|
||||
EnGo2_GetItem(this, globalCtx, GI_TUNIC_GORON);
|
||||
|
@ -500,8 +501,8 @@ s16 EnGo2_GetStateGoronCityLink(GlobalContext* globalCtx, EnGo2* this) {
|
|||
default:
|
||||
return 0;
|
||||
}
|
||||
case 4:
|
||||
if (func_80106BC8(globalCtx)) {
|
||||
case TEXT_STATE_CHOICE:
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
if (this->actor.textId == 0x3034) {
|
||||
if (globalCtx->msgCtx.choiceIndex == 0) {
|
||||
this->actor.textId = gSaveContext.infTable[16] & 0x800 ? 0x3033 : 0x3035;
|
||||
|
@ -514,22 +515,22 @@ s16 EnGo2_GetStateGoronCityLink(GlobalContext* globalCtx, EnGo2* this) {
|
|||
Audio_StopSfxById(NA_SE_EN_GOLON_CRY);
|
||||
}
|
||||
}
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
this->unk_20C = 0;
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
return 1;
|
||||
case 5:
|
||||
if (func_80106BC8(globalCtx)) {
|
||||
case TEXT_STATE_EVENT:
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
switch (this->actor.textId) {
|
||||
case 0x3035:
|
||||
gSaveContext.infTable[16] |= 0x800;
|
||||
case 0x3032:
|
||||
case 0x3033:
|
||||
this->actor.textId = 0x3034;
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
return 1;
|
||||
default:
|
||||
return 2;
|
||||
|
@ -562,7 +563,7 @@ s16 EnGo2_GetStateGoronDmtBiggoron(GlobalContext* globalCtx, EnGo2* this) {
|
|||
u8 dialogState = this->dialogState;
|
||||
|
||||
switch (EnGo2_GetDialogState(this, globalCtx)) {
|
||||
case 6:
|
||||
case TEXT_STATE_DONE:
|
||||
if (this->actor.textId == 0x305E) {
|
||||
if (!gSaveContext.bgsFlag) {
|
||||
EnGo2_GetItem(this, globalCtx, GI_SWORD_BGS);
|
||||
|
@ -574,25 +575,25 @@ s16 EnGo2_GetStateGoronDmtBiggoron(GlobalContext* globalCtx, EnGo2* this) {
|
|||
} else {
|
||||
return 0;
|
||||
}
|
||||
case 3:
|
||||
case TEXT_STATE_DONE_FADING:
|
||||
switch (this->actor.textId) {
|
||||
case 0x305E:
|
||||
if (func_8002F368(globalCtx) != EXCH_ITEM_CLAIM_CHECK) {
|
||||
break;
|
||||
}
|
||||
case 0x3059:
|
||||
if (dialogState == 0) {
|
||||
if (dialogState == TEXT_STATE_NONE) {
|
||||
func_800F4524(&D_801333D4, NA_SE_EN_GOLON_WAKE_UP, 60);
|
||||
}
|
||||
case 0x3054:
|
||||
if (dialogState == 0) {
|
||||
if (dialogState == TEXT_STATE_NONE) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
case 4:
|
||||
if (func_80106BC8(globalCtx)) {
|
||||
case TEXT_STATE_CHOICE:
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
if ((this->actor.textId == 0x3054) || (this->actor.textId == 0x3055)) {
|
||||
if (globalCtx->msgCtx.choiceIndex == 0) {
|
||||
EnGo2_GetItem(this, globalCtx, GI_PRESCRIPTION);
|
||||
|
@ -600,15 +601,15 @@ s16 EnGo2_GetStateGoronDmtBiggoron(GlobalContext* globalCtx, EnGo2* this) {
|
|||
return 2;
|
||||
}
|
||||
this->actor.textId = 0x3056;
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (func_80106BC8(globalCtx)) {
|
||||
case TEXT_STATE_EVENT:
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
if (this->actor.textId == 0x3059) {
|
||||
globalCtx->msgCtx.msgMode = 0x37;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_PAUSED;
|
||||
this->actionFunc = EnGo2_BiggoronEyedrops;
|
||||
}
|
||||
return 2;
|
||||
|
@ -626,14 +627,14 @@ u16 EnGo2_GetTextIdGoronFireGeneric(GlobalContext* globalCtx, EnGo2* this) {
|
|||
}
|
||||
|
||||
s16 EnGo2_GetStateGoronFireGeneric(GlobalContext* globalCtx, EnGo2* this) {
|
||||
switch (func_8010BDBC(&globalCtx->msgCtx)) {
|
||||
case 2:
|
||||
switch (Message_GetState(&globalCtx->msgCtx)) {
|
||||
case TEXT_STATE_CLOSING:
|
||||
return 0;
|
||||
case 5:
|
||||
if (func_80106BC8(globalCtx)) {
|
||||
case TEXT_STATE_EVENT:
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
if (this->actor.textId == 0x3071) {
|
||||
this->actor.textId = EnGo2_GoronFireGenericGetTextId(this);
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
@ -647,7 +648,7 @@ u16 EnGo2_GetTextIdGoronCityStairwell(GlobalContext* globalCtx, EnGo2* this) {
|
|||
}
|
||||
|
||||
s16 EnGo2_GetStateGoronCityStairwell(GlobalContext* globalCtx, EnGo2* this) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 2) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
if (this->actor.textId == 0x300E) {
|
||||
gSaveContext.infTable[14] |= 0x8;
|
||||
}
|
||||
|
@ -663,7 +664,7 @@ u16 EnGo2_GetTextIdGoronMarketBazaar(GlobalContext* globalCtx, EnGo2* this) {
|
|||
}
|
||||
|
||||
s16 EnGo2_GetStateGoronMarketBazaar(GlobalContext* globalCtx, EnGo2* this) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 2) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
return 0;
|
||||
} else {
|
||||
return 1;
|
||||
|
@ -683,7 +684,7 @@ u16 EnGo2_GetTextIdGoronCityLostWoods(GlobalContext* globalCtx, EnGo2* this) {
|
|||
}
|
||||
|
||||
s16 EnGo2_GetStateGoronCityLostWoods(GlobalContext* globalCtx, EnGo2* this) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 2) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
if (this->actor.textId == 0x3024) {
|
||||
gSaveContext.infTable[14] |= 0x40;
|
||||
}
|
||||
|
@ -703,7 +704,7 @@ u16 EnGo2_GetTextIdGoronDmtFairyHint(GlobalContext* globalCtx, EnGo2* this) {
|
|||
}
|
||||
|
||||
s16 EnGo2_GetStateGoronDmtFairyHint(GlobalContext* globalCtx, EnGo2* this) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 2) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
return 0;
|
||||
} else {
|
||||
return 1;
|
||||
|
@ -791,7 +792,7 @@ s32 func_80A44790(EnGo2* this, GlobalContext* globalCtx) {
|
|||
} else if (((this->actor.params & 0x1F) == GORON_DMT_BIGGORON) && ((this->collider.base.ocFlags2 & 1) == 0)) {
|
||||
return false;
|
||||
} else {
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->unk_194.unk_00 = 1;
|
||||
return true;
|
||||
} else if (this->unk_194.unk_00 != 0) {
|
||||
|
@ -1756,7 +1757,7 @@ void EnGo2_SetupGetItem(EnGo2* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnGo2_SetGetItem(EnGo2* this, GlobalContext* globalCtx) {
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 6) && func_80106BC8(globalCtx)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) {
|
||||
this->unk_194.unk_00 = 0;
|
||||
switch (this->getItemId) {
|
||||
case GI_CLAIM_CHECK:
|
||||
|
@ -1803,7 +1804,7 @@ void EnGo2_BiggoronEyedrops(EnGo2* this, GlobalContext* globalCtx) {
|
|||
} else {
|
||||
func_800F4524(&D_801333D4, NA_SE_EN_GOLON_GOOD_BIG, 60);
|
||||
func_80034EC0(&this->skelAnime, sAnimations, 6);
|
||||
func_8010B720(globalCtx, 0x305A);
|
||||
Message_ContinueTextbox(globalCtx, 0x305A);
|
||||
this->eyeMouthTexState = 3;
|
||||
this->goronState++;
|
||||
func_800F483C(0x7F, 5);
|
||||
|
@ -1813,7 +1814,7 @@ void EnGo2_BiggoronEyedrops(EnGo2* this, GlobalContext* globalCtx) {
|
|||
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
|
||||
this->eyeMouthTexState = 0;
|
||||
}
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 2) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
func_80034EC0(&this->skelAnime, sAnimations, 1);
|
||||
this->actor.flags |= 1;
|
||||
this->unk_26E = 2;
|
||||
|
@ -1832,10 +1833,10 @@ void EnGo2_GoronLinkStopRolling(EnGo2* this, GlobalContext* globalCtx) {
|
|||
|
||||
switch (this->goronState) {
|
||||
case 0:
|
||||
if (func_8010BDBC(&globalCtx->msgCtx)) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) != TEXT_STATE_NONE) {
|
||||
return;
|
||||
} else {
|
||||
func_8010B680(globalCtx, 0x3031, NULL);
|
||||
Message_StartTextbox(globalCtx, 0x3031, NULL);
|
||||
player->actor.freezeTimer = 10;
|
||||
this->goronState++;
|
||||
}
|
||||
|
@ -1845,7 +1846,7 @@ void EnGo2_GoronLinkStopRolling(EnGo2* this, GlobalContext* globalCtx) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) != 2) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) != TEXT_STATE_CLOSING) {
|
||||
player->actor.freezeTimer = 10;
|
||||
} else {
|
||||
gSaveContext.infTable[16] |= 0x1000;
|
||||
|
@ -1862,9 +1863,9 @@ void EnGo2_GoronFireGenericAction(EnGo2* this, GlobalContext* globalCtx) {
|
|||
|
||||
switch (this->goronState) {
|
||||
case 0: // Wake up
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 2) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
EnGo2_GoronFireCamera(this, globalCtx);
|
||||
globalCtx->msgCtx.msgMode = 0x37;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_PAUSED;
|
||||
func_80034EC0(&this->skelAnime, sAnimations, 2);
|
||||
this->waypoint = 1;
|
||||
this->skelAnime.playSpeed = 2.0f;
|
||||
|
@ -1884,7 +1885,7 @@ void EnGo2_GoronFireGenericAction(EnGo2* this, GlobalContext* globalCtx) {
|
|||
player->actor.world.pos.z =
|
||||
(f32)((Math_CosS(this->actor.world.rot.y) * -30.0f) + this->actor.world.pos.z);
|
||||
func_8002DF54(globalCtx, &this->actor, 8);
|
||||
func_800F5C64(NA_BGM_APPEAR);
|
||||
Audio_PlayFanfare(NA_BGM_APPEAR);
|
||||
}
|
||||
break;
|
||||
case 2: // Walking away
|
||||
|
@ -1918,7 +1919,7 @@ void EnGo2_GoronFireGenericAction(EnGo2* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
}
|
||||
case 4: // Finalize walking away
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
EnGo2_GoronFireClearCamera(this, globalCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 7);
|
||||
Actor_Kill(&this->actor);
|
||||
|
|
|
@ -120,9 +120,9 @@ void EnGs_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
s32 func_80A4E3EC(EnGs* this, GlobalContext* globalCtx) {
|
||||
s32 ret = 2;
|
||||
switch (func_8010BDBC(&globalCtx->msgCtx)) {
|
||||
case 6:
|
||||
if (func_80106BC8(globalCtx)) {
|
||||
switch (Message_GetState(&globalCtx->msgCtx)) {
|
||||
case TEXT_STATE_DONE:
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
switch (this->actor.textId) {
|
||||
case 0x2054:
|
||||
this->actor.textId = (this->actor.params & 0xFF) + 0x400;
|
||||
|
@ -147,26 +147,28 @@ void func_80A4E470(EnGs* this, GlobalContext* globalCtx) {
|
|||
if (this->unk_19D == 0) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
if (player->stateFlags2 & 0x1000000) {
|
||||
func_8010BD58(globalCtx, 1);
|
||||
func_8010BD58(globalCtx, OCARINA_ACTION_FREE_PLAY);
|
||||
this->unk_19D |= 1;
|
||||
}
|
||||
|
||||
} else if (this->unk_19D & 1) {
|
||||
if (globalCtx->msgCtx.unk_E3EE == 4) {
|
||||
if ((globalCtx->msgCtx.unk_E3F2 == 6) || (globalCtx->msgCtx.unk_E3F2 == 7) ||
|
||||
(globalCtx->msgCtx.unk_E3F2 == 8) || (globalCtx->msgCtx.unk_E3F2 == 9) ||
|
||||
(globalCtx->msgCtx.unk_E3F2 == 10)) {
|
||||
if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_04) {
|
||||
if ((globalCtx->msgCtx.unk_E3F2 == OCARINA_SONG_SARIAS) ||
|
||||
(globalCtx->msgCtx.unk_E3F2 == OCARINA_SONG_EPONAS) ||
|
||||
(globalCtx->msgCtx.unk_E3F2 == OCARINA_SONG_LULLABY) ||
|
||||
(globalCtx->msgCtx.unk_E3F2 == OCARINA_SONG_SUNS) ||
|
||||
(globalCtx->msgCtx.unk_E3F2 == OCARINA_SONG_TIME)) {
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ELF, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y + 40.0f, this->actor.world.pos.z, 0, 0, 0, FAIRY_HEAL_TIMED);
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EV_BUTTERFRY_TO_FAIRY);
|
||||
} else if (globalCtx->msgCtx.unk_E3F2 == 11) {
|
||||
} else if (globalCtx->msgCtx.unk_E3F2 == OCARINA_SONG_STORMS) {
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ELF, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y + 40.0f, this->actor.world.pos.z, 0, 0, 0, FAIRY_HEAL_BIG);
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EV_BUTTERFRY_TO_FAIRY);
|
||||
}
|
||||
this->unk_19D = 0;
|
||||
Flags_SetSwitch(globalCtx, (this->actor.params >> 8) & 0x3F);
|
||||
} else if (globalCtx->msgCtx.unk_E3EE == 1) {
|
||||
} else if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_01) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
}
|
||||
}
|
||||
|
@ -178,14 +180,14 @@ void func_80A4E648(EnGs* this, GlobalContext* globalCtx) {
|
|||
s16 sp24;
|
||||
|
||||
if (this->unk_19C == 1) {
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
this->unk_19C = 2;
|
||||
} else if (this->unk_19C == 2) {
|
||||
this->unk_19C = func_80A4E3EC(this, globalCtx);
|
||||
} else if (func_8002F194(&this->actor, globalCtx)) {
|
||||
} else if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->unk_19C = 2;
|
||||
} else {
|
||||
func_8002F374(globalCtx, &this->actor, &sp26, &sp24);
|
||||
Actor_GetScreenPos(globalCtx, &this->actor, &sp26, &sp24);
|
||||
if ((sp26 >= 0) && (sp26 <= SCREEN_WIDTH) && (sp24 >= 0) && (sp24 <= SCREEN_HEIGHT) && (this->unk_19C != 3)) {
|
||||
if (func_8002F2CC(&this->actor, globalCtx, 40.0f) == 1) {
|
||||
if (Player_GetMask(globalCtx) == PLAYER_MASK_TRUTH) {
|
||||
|
@ -221,7 +223,7 @@ void func_80A4E910(EnGs* this, GlobalContext* globalCtx) {
|
|||
} else if ((this->unk_19F == 1) && (func_80A4E754(this, globalCtx, &this->unk_1E8, &this->unk_1EC, &this->unk_200,
|
||||
0.8f, 0.007f, 0.001f, 7, 0) == 0.0f)) {
|
||||
if (!Gameplay_InCsMode(globalCtx)) {
|
||||
func_8010B680(globalCtx, 0x71B1, NULL);
|
||||
Message_StartTextbox(globalCtx, 0x71B1, NULL);
|
||||
}
|
||||
this->unk_19C = 0;
|
||||
this->actionFunc = func_80A4F734;
|
||||
|
|
|
@ -130,7 +130,7 @@ void func_80A5046C(EnGuest* this) {
|
|||
}
|
||||
|
||||
void func_80A50518(EnGuest* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F194(&this->actor, globalCtx) != 0) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->actionFunc = func_80A5057C;
|
||||
} else if (this->actor.xzDistToPlayer < 100.0f) {
|
||||
func_8002F2CC(&this->actor, globalCtx, 100.0f);
|
||||
|
@ -138,10 +138,8 @@ void func_80A50518(EnGuest* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A5057C(EnGuest* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 6) {
|
||||
if (func_80106BC8(globalCtx) != 0) {
|
||||
this->actionFunc = func_80A50518;
|
||||
}
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) {
|
||||
this->actionFunc = func_80A50518;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -221,8 +221,8 @@ void EnHeishi1_SetupMoveToLink(EnHeishi1* this, GlobalContext* globalCtx) {
|
|||
Animation_Change(&this->skelAnime, &gEnHeishiWalkAnim, 3.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -3.0f);
|
||||
this->bodyTurnSpeed = 0.0f;
|
||||
this->moveSpeed = 0.0f;
|
||||
func_8010B680(globalCtx, 0x702D, &this->actor);
|
||||
Interface_SetDoAction(globalCtx, 0x12);
|
||||
Message_StartTextbox(globalCtx, 0x702D, &this->actor);
|
||||
Interface_SetDoAction(globalCtx, DO_ACTION_STOP);
|
||||
this->actionFunc = EnHeishi1_MoveToLink;
|
||||
}
|
||||
|
||||
|
@ -346,8 +346,8 @@ void EnHeishi1_Kick(EnHeishi1* this, GlobalContext* globalCtx) {
|
|||
SkelAnime_Update(&this->skelAnime);
|
||||
if (!this->loadStarted) {
|
||||
// if dialog state is 5 and textbox has been advanced, kick player out
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && (func_80106BC8(globalCtx))) {
|
||||
func_80106CCC(globalCtx);
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
if (!this->loadStarted) {
|
||||
gSaveContext.eventChkInf[4] |= 0x4000;
|
||||
globalCtx->nextEntranceIndex = 0x4FA;
|
||||
|
@ -372,7 +372,7 @@ void EnHeishi1_WaitNight(EnHeishi1* this, GlobalContext* globalCtx) {
|
|||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
if (this->actor.xzDistToPlayer < 100.0f) {
|
||||
func_8010B680(globalCtx, 0x702D, &this->actor);
|
||||
Message_StartTextbox(globalCtx, 0x702D, &this->actor);
|
||||
func_80078884(NA_SE_SY_FOUND);
|
||||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 発見! ☆☆☆☆☆ \n" VT_RST); // "Discovered!"
|
||||
func_8002DF54(globalCtx, &this->actor, 1);
|
||||
|
|
|
@ -188,26 +188,26 @@ void func_80A53278(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
if (Text_GetFaceReaction(globalCtx, 5) != 0) {
|
||||
this->actor.textId = Text_GetFaceReaction(globalCtx, 5);
|
||||
this->unk_30B = 1;
|
||||
this->unk_300 = 6;
|
||||
this->unk_300 = TEXT_STATE_DONE;
|
||||
this->actionFunc = func_80A5475C;
|
||||
} else if ((gSaveContext.eventChkInf[0] & 0x200) && (gSaveContext.eventChkInf[2] & 0x20) &&
|
||||
(gSaveContext.eventChkInf[3] & 0x80)) {
|
||||
// "Get all spiritual stones!"
|
||||
osSyncPrintf(VT_FGCOL(GREEN) " ☆☆☆☆☆ 全部の精霊石GET! ☆☆☆☆☆ \n" VT_RST);
|
||||
this->unk_300 = 6;
|
||||
this->unk_300 = TEXT_STATE_DONE;
|
||||
this->actor.textId = 0x7006;
|
||||
this->actionFunc = func_80A5475C;
|
||||
} else if (!IS_DAY) {
|
||||
// "Sleep early for children!"
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) " ☆☆☆☆☆ 子供ははやくネロ! ☆☆☆☆☆ \n" VT_RST);
|
||||
this->unk_300 = 6;
|
||||
this->unk_300 = TEXT_STATE_DONE;
|
||||
this->actor.textId = 0x7002;
|
||||
this->actionFunc = func_80A5475C;
|
||||
|
||||
} else if (this->unk_30C != 0) {
|
||||
// "Anything passes"
|
||||
osSyncPrintf(VT_FGCOL(BLUE) " ☆☆☆☆☆ なんでも通るよ ☆☆☆☆☆ \n" VT_RST);
|
||||
this->unk_300 = 6;
|
||||
this->unk_300 = TEXT_STATE_DONE;
|
||||
this->actor.textId = 0x7099;
|
||||
this->actionFunc = func_80A5475C;
|
||||
} else if (gSaveContext.eventChkInf[1] & 4) {
|
||||
|
@ -221,13 +221,13 @@ void func_80A53278(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
osSyncPrintf(VT_FGCOL(PURPLE) " ☆☆☆☆☆ 2回目袖の下開始! ☆☆☆☆☆ \n" VT_RST);
|
||||
this->actor.textId = 0x7072;
|
||||
}
|
||||
this->unk_300 = 4;
|
||||
this->unk_300 = TEXT_STATE_CHOICE;
|
||||
this->actionFunc = func_80A5475C;
|
||||
|
||||
} else {
|
||||
// "That's okay"
|
||||
osSyncPrintf(VT_FGCOL(CYAN) " ☆☆☆☆☆ それはとおらんよぉ ☆☆☆☆☆ \n" VT_RST);
|
||||
this->unk_300 = 6;
|
||||
this->unk_300 = TEXT_STATE_DONE;
|
||||
this->actor.textId = 0x7029;
|
||||
this->actionFunc = func_80A5475C;
|
||||
}
|
||||
|
@ -235,8 +235,8 @@ void func_80A53278(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80A5344C(EnHeishi2* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 4) && (func_80106BC8(globalCtx) != 0)) {
|
||||
this->unk_300 = 5;
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE) && Message_ShouldAdvance(globalCtx)) {
|
||||
this->unk_300 = TEXT_STATE_EVENT;
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0:
|
||||
if (gSaveContext.rupees >= 10) {
|
||||
|
@ -257,19 +257,16 @@ void func_80A5344C(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
default:
|
||||
break;
|
||||
}
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80A53538(EnHeishi2* this, GlobalContext* globalCtx) {
|
||||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (this->unk_300 == func_8010BDBC(&globalCtx->msgCtx)) {
|
||||
if (func_80106BC8(globalCtx) != 0) {
|
||||
func_8002DF54(globalCtx, NULL, 8);
|
||||
globalCtx->msgCtx.msgMode = 0x37;
|
||||
this->actionFunc = func_80A535BC;
|
||||
}
|
||||
if (this->unk_300 == Message_GetState(&globalCtx->msgCtx) && Message_ShouldAdvance(globalCtx)) {
|
||||
func_8002DF54(globalCtx, NULL, 8);
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_PAUSED;
|
||||
this->actionFunc = func_80A535BC;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -337,7 +334,7 @@ void func_80A53850(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
if ((this->unk_2F2[0] == 0) || (gate->unk_168 == 0)) {
|
||||
Gameplay_ClearCamera(globalCtx, this->cameraId);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_ACTIVE);
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
this->unk_30C = 1;
|
||||
func_8002DF54(globalCtx, NULL, 7);
|
||||
this->actionFunc = func_80A531E4;
|
||||
|
@ -364,24 +361,24 @@ void func_80A5399C(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
} else {
|
||||
this->actor.textId = 0x200B;
|
||||
}
|
||||
this->unk_300 = 4;
|
||||
this->unk_300 = TEXT_STATE_CHOICE;
|
||||
this->unk_30B = 1;
|
||||
var = 1;
|
||||
} else {
|
||||
this->actor.textId = 0x2016;
|
||||
this->unk_300 = 6;
|
||||
this->unk_300 = TEXT_STATE_DONE;
|
||||
var = 1;
|
||||
}
|
||||
} else {
|
||||
this->actor.textId = 0x2020;
|
||||
this->unk_300 = 5;
|
||||
this->unk_300 = TEXT_STATE_EVENT;
|
||||
this->unk_30E = 0;
|
||||
}
|
||||
if (Text_GetFaceReaction(globalCtx, 5) != 0) {
|
||||
if (var == 0) {
|
||||
this->actor.textId = Text_GetFaceReaction(globalCtx, 5);
|
||||
this->unk_30B = 1;
|
||||
this->unk_300 = 6;
|
||||
this->unk_300 = TEXT_STATE_DONE;
|
||||
this->unk_30E = 0;
|
||||
}
|
||||
}
|
||||
|
@ -405,13 +402,13 @@ void func_80A53AD4(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
} else {
|
||||
this->actor.textId = 0x200E;
|
||||
}
|
||||
this->unk_300 = 6;
|
||||
if (func_8002F194(&this->actor, globalCtx) != 0) {
|
||||
this->unk_300 = TEXT_STATE_DONE;
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
exchangeItemId = func_8002F368(globalCtx);
|
||||
if (exchangeItemId == EXCH_ITEM_LETTER_ZELDA) {
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
player->actor.textId = 0x2010;
|
||||
this->unk_300 = 5;
|
||||
this->unk_300 = TEXT_STATE_EVENT;
|
||||
this->actionFunc = func_80A53C0C;
|
||||
} else if (exchangeItemId != EXCH_ITEM_NONE) {
|
||||
player->actor.textId = 0x200F;
|
||||
|
@ -427,12 +424,10 @@ void func_80A53AD4(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80A53C0C(EnHeishi2* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (this->unk_300 == func_8010BDBC(&globalCtx->msgCtx)) {
|
||||
if (func_80106BC8(globalCtx) != 0) {
|
||||
func_8002DF54(globalCtx, 0, 8);
|
||||
globalCtx->msgCtx.msgMode = 0x37;
|
||||
this->actionFunc = func_80A53C90;
|
||||
}
|
||||
if ((this->unk_300 == Message_GetState(&globalCtx->msgCtx)) && Message_ShouldAdvance(globalCtx)) {
|
||||
func_8002DF54(globalCtx, 0, 8);
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_PAUSED;
|
||||
this->actionFunc = func_80A53C90;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -510,10 +505,10 @@ void func_80A53F30(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
if ((this->unk_30A != 2)) {
|
||||
if (this->unk_30A == 0) {
|
||||
this->actor.textId = 0x2015;
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
this->actionFunc = func_80A54038;
|
||||
} else {
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
func_8002DF54(globalCtx, NULL, 7);
|
||||
this->actionFunc = func_80A53908;
|
||||
}
|
||||
|
@ -521,7 +516,7 @@ void func_80A53F30(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
this->unk_30E = 0;
|
||||
this->actor.textId = 0x2021;
|
||||
Rupees_ChangeBy(15);
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
this->actionFunc = func_80A5427C;
|
||||
}
|
||||
}
|
||||
|
@ -529,23 +524,21 @@ void func_80A53F30(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80A54038(EnHeishi2* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 5) {
|
||||
if (func_80106BC8(globalCtx) != 0) {
|
||||
gSaveContext.infTable[7] |= 0x40;
|
||||
func_80106CCC(globalCtx);
|
||||
func_8002DF54(globalCtx, 0, 7);
|
||||
this->actionFunc = func_80A53908;
|
||||
}
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
gSaveContext.infTable[7] |= 0x40;
|
||||
Message_CloseTextbox(globalCtx);
|
||||
func_8002DF54(globalCtx, 0, 7);
|
||||
this->actionFunc = func_80A53908;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80A540C0(EnHeishi2* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
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:
|
||||
this->actor.textId = 0x2020;
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
Player_UnsetMask(globalCtx);
|
||||
gSaveContext.infTable[7] |= 0x80;
|
||||
gSaveContext.itemGetInf[3] |= 0x100;
|
||||
|
@ -562,8 +555,8 @@ void func_80A540C0(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
case 1:
|
||||
this->unk_30E = 1;
|
||||
this->actor.textId = 0x200C;
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
this->unk_300 = 5;
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
this->unk_300 = TEXT_STATE_EVENT;
|
||||
if (this->unk_30A == 0) {
|
||||
this->actionFunc = func_80A5427C;
|
||||
} else {
|
||||
|
@ -575,24 +568,24 @@ void func_80A540C0(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80A541FC(EnHeishi2* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && (func_80106BC8(globalCtx) != 0)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
this->actor.textId = 0x2021;
|
||||
Rupees_ChangeBy(15);
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
this->actionFunc = func_80A5427C;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80A5427C(EnHeishi2* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && (func_80106BC8(globalCtx) != 0)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
if (this->unk_30E == 0) {
|
||||
this->unk_30E = 0;
|
||||
this->unk_30A = this->unk_30E;
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
this->actionFunc = func_80A53908;
|
||||
} else {
|
||||
globalCtx->msgCtx.msgMode = 0x37;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_PAUSED;
|
||||
this->actionFunc = func_80A54320;
|
||||
}
|
||||
}
|
||||
|
@ -645,7 +638,7 @@ void func_80A544AC(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
Math_ApproachF(&this->unk_2E4, 3000.0f, 1.0f, 500.0f);
|
||||
this->actor.world.rot.z = this->actor.shape.rot.z;
|
||||
if (this->actor.shape.rot.z < -6000) {
|
||||
func_8010B680(globalCtx, 0x708F, NULL);
|
||||
Message_StartTextbox(globalCtx, 0x708F, NULL);
|
||||
this->actor.flags |= 0x10000;
|
||||
this->actionFunc = func_80A5455C;
|
||||
this->unk_2E4 = 0.0f;
|
||||
|
@ -658,9 +651,9 @@ void func_80A5455C(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
f32 rotY;
|
||||
EnBom* bomb;
|
||||
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && (func_80106BC8(globalCtx) != 0)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
func_8002DF54(globalCtx, NULL, 7);
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
|
||||
pos.x = Rand_CenteredFloat(20.0f) + this->unk_274.x;
|
||||
pos.y = Rand_CenteredFloat(20.0f) + (this->unk_274.y - 40.0f);
|
||||
|
@ -714,7 +707,7 @@ void func_80A5475C(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
if (this->type == 2) {
|
||||
if (this->unk_30E == 1) {
|
||||
this->actionFunc = func_80A5344C;
|
||||
|
@ -724,15 +717,15 @@ void func_80A5475C(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
return;
|
||||
}
|
||||
} else if (this->type == 5) {
|
||||
if (this->unk_300 == 6) {
|
||||
if (this->unk_300 == TEXT_STATE_DONE) {
|
||||
this->actionFunc = func_80A5399C;
|
||||
}
|
||||
|
||||
if (this->unk_300 == 5) {
|
||||
if (this->unk_300 == TEXT_STATE_EVENT) {
|
||||
this->actionFunc = func_80A54954;
|
||||
}
|
||||
|
||||
if (this->unk_300 == 4) {
|
||||
if (this->unk_300 == TEXT_STATE_CHOICE) {
|
||||
this->unk_309 = 1;
|
||||
func_80078884(NA_SE_SY_TRE_BOX_APPEAR);
|
||||
this->actionFunc = func_80A540C0;
|
||||
|
@ -758,15 +751,13 @@ void func_80A54954(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80A549E8(EnHeishi2* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (this->unk_300 == func_8010BDBC(&globalCtx->msgCtx)) {
|
||||
if (func_80106BC8(globalCtx) != 0) {
|
||||
func_80106CCC(globalCtx);
|
||||
if (this->type == 2) {
|
||||
this->actionFunc = func_80A531E4;
|
||||
}
|
||||
if (this->type == 5) {
|
||||
this->actionFunc = func_80A53908;
|
||||
}
|
||||
if (this->unk_300 == Message_GetState(&globalCtx->msgCtx) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
if (this->type == 2) {
|
||||
this->actionFunc = func_80A531E4;
|
||||
}
|
||||
if (this->type == 5) {
|
||||
this->actionFunc = func_80A53908;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -133,7 +133,7 @@ void EnHeishi3_StandSentinelInGrounds(EnHeishi3* this, GlobalContext* globalCtx)
|
|||
if ((this->actor.xzDistToPlayer < sightRange) &&
|
||||
(fabsf(player->actor.world.pos.y - this->actor.world.pos.y) < 100.0f) && (sPlayerCaught == 0)) {
|
||||
sPlayerCaught = 1;
|
||||
func_8010B680(globalCtx, 0x702D, &this->actor);
|
||||
Message_StartTextbox(globalCtx, 0x702D, &this->actor);
|
||||
func_80078884(NA_SE_SY_FOUND);
|
||||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 発見! ☆☆☆☆☆ \n" VT_RST); // "Discovered!"
|
||||
func_8002DF54(globalCtx, &this->actor, 1);
|
||||
|
@ -161,7 +161,7 @@ void EnHeishi3_StandSentinelInCastle(EnHeishi3* this, GlobalContext* globalCtx)
|
|||
}
|
||||
}
|
||||
sPlayerCaught = 1;
|
||||
func_8010B680(globalCtx, 0x702D, &this->actor);
|
||||
Message_StartTextbox(globalCtx, 0x702D, &this->actor);
|
||||
func_80078884(NA_SE_SY_FOUND);
|
||||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 発見! ☆☆☆☆☆ \n" VT_RST); // "Discovered!"
|
||||
func_8002DF54(globalCtx, &this->actor, 1);
|
||||
|
@ -202,7 +202,8 @@ void EnHeishi3_ResetAnimationToIdle(EnHeishi3* this, GlobalContext* globalCtx) {
|
|||
// This function initiates the respawn after the player gets caught.
|
||||
void func_80A55D00(EnHeishi3* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && (func_80106BC8(globalCtx) != 0) && (this->respawnFlag == 0)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx) &&
|
||||
(this->respawnFlag == 0)) {
|
||||
gSaveContext.eventChkInf[4] |= 0x4000;
|
||||
globalCtx->nextEntranceIndex = 0x47E; // Hyrule Castle from Guard Capture (outside)
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
|
|
|
@ -225,12 +225,12 @@ void func_80A5673C(EnHeishi4* this, GlobalContext* globalCtx) {
|
|||
Animation_Change(&this->skelAnime, &gEnHeishiDyingGuardAnim_00C444, 1.0f, 0.0f, (s16)frames, ANIMMODE_LOOP,
|
||||
-10.0f);
|
||||
this->actor.textId = 0x7007;
|
||||
this->unk_282 = 5;
|
||||
this->unk_282 = TEXT_STATE_EVENT;
|
||||
this->unk_284 = 1;
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) " ☆☆☆☆☆ デモ開始! ☆☆☆☆☆ \n" VT_RST);
|
||||
} else {
|
||||
this->actor.textId = 0x7008;
|
||||
this->unk_282 = 6;
|
||||
this->unk_282 = TEXT_STATE_DONE;
|
||||
osSyncPrintf(VT_FGCOL(BLUE) " ☆☆☆☆☆ 返事なし ☆☆☆☆☆ \n" VT_RST);
|
||||
}
|
||||
this->actionFunc = func_80A56874;
|
||||
|
@ -243,7 +243,7 @@ void func_80A56874(EnHeishi4* this, GlobalContext* globalCtx) {
|
|||
if (this->unk_284 != 0) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
}
|
||||
if (func_8002F194(&this->actor, globalCtx) != 0) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
if (this->unk_284 == 0) {
|
||||
this->actionFunc = func_80A5673C;
|
||||
|
||||
|
@ -265,13 +265,11 @@ void func_80A56900(EnHeishi4* this, GlobalContext* globalCtx) {
|
|||
void func_80A56994(EnHeishi4* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
func_80038290(globalCtx, &this->actor, &this->unk_260, &this->unk_266, this->actor.focus.pos);
|
||||
if (this->unk_282 == func_8010BDBC(&globalCtx->msgCtx)) {
|
||||
if (func_80106BC8(globalCtx) != 0) {
|
||||
func_80106CCC(globalCtx);
|
||||
gSaveContext.infTable[6] |= 0x1000;
|
||||
func_8002DF54(globalCtx, NULL, 8);
|
||||
this->actionFunc = func_80A56A50;
|
||||
}
|
||||
if ((this->unk_282 == Message_GetState(&globalCtx->msgCtx)) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
gSaveContext.infTable[6] |= 0x1000;
|
||||
func_8002DF54(globalCtx, NULL, 8);
|
||||
this->actionFunc = func_80A56A50;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -326,7 +324,7 @@ void func_80A56B40(EnHeishi4* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (func_8002F194(&this->actor, globalCtx) != 0) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
if ((this->type == HEISHI4_AT_KAKRIKO_ENTRANCE) || (this->type == HEISHI4_AT_IMPAS_HOUSE)) {
|
||||
this->unk_284 = 1;
|
||||
this->actionFunc = func_80A563BC;
|
||||
|
|
|
@ -372,7 +372,7 @@ void EnHintnuts_Run(EnHintnuts* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
this->actor.shape.rot.y = this->actor.world.rot.y + 0x8000;
|
||||
if (func_8002F194(&this->actor, globalCtx) != 0) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
EnHintnuts_SetupTalk(this);
|
||||
} else if (this->animFlagAndTimer == 0 && Actor_WorldDistXZToPoint(&this->actor, &this->actor.home.pos) < 20.0f &&
|
||||
fabsf(this->actor.world.pos.y - this->actor.home.pos.y) < 2.0f) {
|
||||
|
@ -391,7 +391,7 @@ void EnHintnuts_Run(EnHintnuts* this, GlobalContext* globalCtx) {
|
|||
void EnHintnuts_Talk(EnHintnuts* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 0x3, 0x400, 0x100);
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 5) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) {
|
||||
EnHintnuts_SetupLeave(this, globalCtx);
|
||||
}
|
||||
}
|
||||
|
@ -419,7 +419,7 @@ void EnHintnuts_Leave(EnHintnuts* this, GlobalContext* globalCtx) {
|
|||
Math_ScaledStepToS(&this->actor.shape.rot.y, temp_a1, 0x800);
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
if ((this->animFlagAndTimer == 0) || (this->actor.projectedPos.z < 0.0f)) {
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
if (this->actor.params == 3) {
|
||||
Flags_SetClear(globalCtx, this->actor.room);
|
||||
sPuzzleCounter = 3;
|
||||
|
|
|
@ -360,7 +360,7 @@ s32 EnHorseGameCheck_UpdateMalonRace(EnHorseGameCheckBase* base, GlobalContext*
|
|||
|
||||
if ((this->fenceCheck[i - 1] == 0) && !(this->raceFlags & MALONRACE_BROKE_RULE)) {
|
||||
this->raceFlags |= MALONRACE_BROKE_RULE;
|
||||
func_8010B680(globalCtx, 0x208C, NULL);
|
||||
Message_StartTextbox(globalCtx, 0x208C, NULL);
|
||||
this->result = 4;
|
||||
this->finishTimer = 30;
|
||||
}
|
||||
|
@ -371,7 +371,7 @@ s32 EnHorseGameCheck_UpdateMalonRace(EnHorseGameCheckBase* base, GlobalContext*
|
|||
AT_FINISH_LINE(player2->rideActor)) {
|
||||
if ((this->lapCount == 1) && (this->fenceCheck[15] == 0) && (player2->rideActor->prevPos.x < -200.0f)) {
|
||||
this->raceFlags |= MALONRACE_BROKE_RULE;
|
||||
func_8010B680(globalCtx, 0x208C, NULL);
|
||||
Message_StartTextbox(globalCtx, 0x208C, NULL);
|
||||
this->result = MALONRACE_FAILURE;
|
||||
this->finishTimer = 30;
|
||||
} else if (this->fenceCheck[15] == 1) {
|
||||
|
@ -384,15 +384,15 @@ s32 EnHorseGameCheck_UpdateMalonRace(EnHorseGameCheckBase* base, GlobalContext*
|
|||
} else if ((this->fenceCheck[7] == 1) && !(this->raceFlags & MALONRACE_SECOND_LAP)) {
|
||||
this->lapCount = 1;
|
||||
this->raceFlags |= MALONRACE_SECOND_LAP;
|
||||
func_8010B680(globalCtx, 0x208D, NULL);
|
||||
Message_StartTextbox(globalCtx, 0x208D, NULL);
|
||||
} else if (this->fenceCheck[7] == 0) {
|
||||
this->raceFlags |= MALONRACE_BROKE_RULE;
|
||||
func_8010B680(globalCtx, 0x208C, NULL);
|
||||
Message_StartTextbox(globalCtx, 0x208C, NULL);
|
||||
this->result = MALONRACE_FAILURE;
|
||||
this->finishTimer = 30;
|
||||
} else if (player2->rideActor->prevPos.x > 80.0f) {
|
||||
this->raceFlags |= MALONRACE_BROKE_RULE;
|
||||
func_8010B680(globalCtx, 0x208C, NULL);
|
||||
Message_StartTextbox(globalCtx, 0x208C, NULL);
|
||||
this->result = MALONRACE_FAILURE;
|
||||
this->finishTimer = 30;
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@ void EnHs_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
s32 func_80A6E53C(EnHs* this, GlobalContext* globalCtx, u16 textId, EnHsActionFunc actionFunc) {
|
||||
s16 yawDiff;
|
||||
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
func_80A6E3A0(this, actionFunc);
|
||||
return 1;
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ s32 func_80A6E53C(EnHs* this, GlobalContext* globalCtx, u16 textId, EnHsActionFu
|
|||
}
|
||||
|
||||
void func_80A6E5EC(EnHs* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
func_80A6E3A0(this, func_80A6E6B0);
|
||||
}
|
||||
|
||||
|
@ -127,7 +127,7 @@ void func_80A6E5EC(EnHs* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A6E630(EnHs* this, GlobalContext* globalCtx) {
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 6) && func_80106BC8(globalCtx)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) {
|
||||
func_80088AA0(180);
|
||||
func_80A6E3A0(this, func_80A6E6B0);
|
||||
gSaveContext.eventInf[1] &= ~1;
|
||||
|
@ -141,13 +141,13 @@ void func_80A6E6B0(EnHs* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A6E6D8(EnHs* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
func_80A6E3A0(this, func_80A6E9AC);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80A6E70C(EnHs* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
func_80A6E3A0(this, func_80A6E9AC);
|
||||
}
|
||||
}
|
||||
|
@ -164,14 +164,14 @@ void func_80A6E740(EnHs* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A6E7BC(EnHs* this, GlobalContext* globalCtx) {
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 4) && func_80106BC8(globalCtx)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE) && Message_ShouldAdvance(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0:
|
||||
func_80A6E3A0(this, func_80A6E740);
|
||||
func_8002F434(&this->actor, globalCtx, GI_ODD_MUSHROOM, 10000.0f, 50.0f);
|
||||
break;
|
||||
case 1:
|
||||
func_8010B720(globalCtx, 0x10B4);
|
||||
Message_ContinueTextbox(globalCtx, 0x10B4);
|
||||
func_80A6E3A0(this, func_80A6E70C);
|
||||
break;
|
||||
}
|
||||
|
@ -186,8 +186,8 @@ void func_80A6E7BC(EnHs* this, GlobalContext* globalCtx) {
|
|||
void func_80A6E8CC(EnHs* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && func_80106BC8(globalCtx)) {
|
||||
func_8010B720(globalCtx, 0x10B3);
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_ContinueTextbox(globalCtx, 0x10B3);
|
||||
func_80A6E3A0(this, func_80A6E7BC);
|
||||
Animation_Change(&this->skelAnime, &object_hs_Anim_000528, 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(&object_hs_Anim_000528), ANIMMODE_LOOP, 8.0f);
|
||||
|
@ -207,7 +207,7 @@ void func_80A6E9AC(EnHs* this, GlobalContext* globalCtx) {
|
|||
Player* player = GET_PLAYER(globalCtx);
|
||||
s16 yawDiff;
|
||||
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
if (func_8002F368(globalCtx) == 7) {
|
||||
player->actor.textId = 0x10B2;
|
||||
func_80A6E3A0(this, func_80A6E8CC);
|
||||
|
|
|
@ -75,7 +75,7 @@ void EnHs2_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
s32 func_80A6F0B4(EnHs2* this, GlobalContext* globalCtx, u16 textId, EnHs2ActionFunc actionFunc) {
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->actionFunc = actionFunc;
|
||||
return 1;
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ s32 func_80A6F0B4(EnHs2* this, GlobalContext* globalCtx, u16 textId, EnHs2Action
|
|||
}
|
||||
|
||||
void func_80A6F164(EnHs2* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
this->actionFunc = func_80A6F1A4;
|
||||
}
|
||||
this->unk_2A8 |= 0x1;
|
||||
|
|
|
@ -559,16 +559,16 @@ s16 func_80A70058(GlobalContext* globalCtx, Actor* thisx) {
|
|||
s16 beggarItems[] = { ITEM_BLUE_FIRE, ITEM_FISH, ITEM_BUG, ITEM_FAIRY };
|
||||
s16 beggarRewards[] = { 150, 100, 50, 25 };
|
||||
|
||||
switch (func_8010BDBC(&globalCtx->msgCtx)) {
|
||||
case 0:
|
||||
case 1:
|
||||
case 4:
|
||||
case 6:
|
||||
case 7:
|
||||
case 8:
|
||||
case 9:
|
||||
switch (Message_GetState(&globalCtx->msgCtx)) {
|
||||
case TEXT_STATE_NONE:
|
||||
case TEXT_STATE_DONE_HAS_NEXT:
|
||||
case TEXT_STATE_CHOICE:
|
||||
case TEXT_STATE_DONE:
|
||||
case TEXT_STATE_SONG_DEMO_DONE:
|
||||
case TEXT_STATE_8:
|
||||
case TEXT_STATE_9:
|
||||
return 1;
|
||||
case 3:
|
||||
case TEXT_STATE_DONE_FADING:
|
||||
switch (this->actor.textId) {
|
||||
case 0x709E:
|
||||
case 0x709F:
|
||||
|
@ -584,12 +584,12 @@ s16 func_80A70058(GlobalContext* globalCtx, Actor* thisx) {
|
|||
case 0x70F3:
|
||||
if (this->skelAnime.animation != &gObjOsAnim_33B4) {
|
||||
func_80034EC0(&this->skelAnime, sAnimationInfo, ENHY_ANIM_23);
|
||||
func_800F5C64(NA_BGM_ITEM_GET | 0x900);
|
||||
Audio_PlayFanfare(NA_BGM_ITEM_GET | 0x900);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return 1;
|
||||
case 2:
|
||||
case TEXT_STATE_CLOSING:
|
||||
switch (this->actor.textId) {
|
||||
case 0x70F0:
|
||||
case 0x70F1:
|
||||
|
@ -665,8 +665,8 @@ s16 func_80A70058(GlobalContext* globalCtx, Actor* thisx) {
|
|||
break;
|
||||
}
|
||||
return 0;
|
||||
case 5:
|
||||
if (!func_80106BC8(globalCtx)) {
|
||||
case TEXT_STATE_EVENT:
|
||||
if (!Message_ShouldAdvance(globalCtx)) {
|
||||
return 1;
|
||||
} else {
|
||||
return 2;
|
||||
|
@ -1057,7 +1057,7 @@ void func_80A714C4(EnHy* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A71530(EnHy* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 6 && func_80106BC8(globalCtx)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) {
|
||||
switch (this->unkGetItemId) {
|
||||
case GI_HEART_PIECE:
|
||||
gSaveContext.dogParams = 0;
|
||||
|
|
|
@ -210,7 +210,7 @@ s16 func_80A7924C(GlobalContext* globalCtx, Actor* thisx) {
|
|||
} else {
|
||||
this->actor.textId = 0x2034;
|
||||
}
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
gSaveContext.infTable[9] |= 0x400;
|
||||
break;
|
||||
case 0x2034:
|
||||
|
@ -220,7 +220,7 @@ s16 func_80A7924C(GlobalContext* globalCtx, Actor* thisx) {
|
|||
} else {
|
||||
this->actor.textId = 0x2035;
|
||||
}
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
break;
|
||||
case 0x2036:
|
||||
case 0x2037:
|
||||
|
@ -228,7 +228,7 @@ s16 func_80A7924C(GlobalContext* globalCtx, Actor* thisx) {
|
|||
sp18 = 2;
|
||||
} else {
|
||||
this->actor.textId = 0x201F;
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
}
|
||||
break;
|
||||
case 0x2038:
|
||||
|
@ -236,7 +236,7 @@ s16 func_80A7924C(GlobalContext* globalCtx, Actor* thisx) {
|
|||
sp18 = 2;
|
||||
} else {
|
||||
this->actor.textId = 0x2039;
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
gSaveContext.infTable[10] |= 4;
|
||||
}
|
||||
break;
|
||||
|
@ -244,7 +244,7 @@ s16 func_80A7924C(GlobalContext* globalCtx, Actor* thisx) {
|
|||
if (globalCtx->msgCtx.choiceIndex == 0 && gSaveContext.rupees >= 50) {
|
||||
sp18 = 2;
|
||||
} else {
|
||||
func_8010B720(globalCtx, this->actor.textId = 0x2039);
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId = 0x2039);
|
||||
gSaveContext.eventInf[0] &= ~0xF;
|
||||
gSaveContext.eventInf[0] &= ~0x20;
|
||||
gSaveContext.eventInf[0] &= ~0x40;
|
||||
|
@ -262,7 +262,7 @@ s16 func_80A7949C(GlobalContext* globalCtx, Actor* thisx) {
|
|||
if (thisx->textId == 0x2035) {
|
||||
Rupees_ChangeBy(-10);
|
||||
thisx->textId = 0x205C;
|
||||
func_8010B720(globalCtx, thisx->textId);
|
||||
Message_ContinueTextbox(globalCtx, thisx->textId);
|
||||
} else {
|
||||
phi_v1 = 2;
|
||||
}
|
||||
|
@ -272,30 +272,30 @@ s16 func_80A7949C(GlobalContext* globalCtx, Actor* thisx) {
|
|||
s16 func_80A79500(GlobalContext* globalCtx, Actor* thisx) {
|
||||
s16 sp1E = 1;
|
||||
|
||||
osSyncPrintf("message_check->(%d[%x])\n", func_8010BDBC(&globalCtx->msgCtx), thisx->textId);
|
||||
switch (func_8010BDBC(&globalCtx->msgCtx)) {
|
||||
case 0:
|
||||
case 1:
|
||||
osSyncPrintf("message_check->(%d[%x])\n", Message_GetState(&globalCtx->msgCtx), thisx->textId);
|
||||
switch (Message_GetState(&globalCtx->msgCtx)) {
|
||||
case TEXT_STATE_NONE:
|
||||
case TEXT_STATE_DONE_HAS_NEXT:
|
||||
break;
|
||||
case 2:
|
||||
case TEXT_STATE_CLOSING:
|
||||
sp1E = func_80A791CC(globalCtx, thisx);
|
||||
break;
|
||||
case 3:
|
||||
case TEXT_STATE_DONE_FADING:
|
||||
break;
|
||||
case 4:
|
||||
if (func_80106BC8(globalCtx) != 0) {
|
||||
case TEXT_STATE_CHOICE:
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
sp1E = func_80A7924C(globalCtx, thisx);
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (func_80106BC8(globalCtx) != 0) {
|
||||
case TEXT_STATE_EVENT:
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
sp1E = func_80A7949C(globalCtx, thisx);
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
case 7:
|
||||
case 8:
|
||||
case 9:
|
||||
case TEXT_STATE_DONE:
|
||||
case TEXT_STATE_SONG_DEMO_DONE:
|
||||
case TEXT_STATE_8:
|
||||
case TEXT_STATE_9:
|
||||
break;
|
||||
}
|
||||
return sp1E;
|
||||
|
@ -453,7 +453,7 @@ void func_80A79C78(EnIn* this, GlobalContext* globalCtx) {
|
|||
this->actor.shape.rot.y = Math_Vec3f_Yaw(&this->actor.world.pos, &sp3C);
|
||||
this->unk_308.unk_08 = zeroVec;
|
||||
this->unk_308.unk_0E = zeroVec;
|
||||
func_8010B680(globalCtx, 0x2025, NULL);
|
||||
Message_StartTextbox(globalCtx, 0x2025, NULL);
|
||||
this->unk_308.unk_00 = 1;
|
||||
player->actor.world.pos = this->actor.world.pos;
|
||||
player->actor.world.pos.x += 100.0f * Math_SinS(this->actor.shape.rot.y);
|
||||
|
@ -637,8 +637,8 @@ void func_80A7A4C8(EnIn* this, GlobalContext* globalCtx) {
|
|||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;
|
||||
gSaveContext.infTable[10] &= ~4;
|
||||
func_800775F0(NA_BGM_HORSE);
|
||||
globalCtx->msgCtx.unk_E3E7 = 0;
|
||||
globalCtx->msgCtx.msgMode = 0x36;
|
||||
globalCtx->msgCtx.stateTimer = 0;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
this->unk_308.unk_00 = 0;
|
||||
}
|
||||
}
|
||||
|
@ -659,8 +659,8 @@ void func_80A7A568(EnIn* this, GlobalContext* globalCtx) {
|
|||
} else if (this->unk_308.unk_00 == 2) {
|
||||
if (globalCtx->msgCtx.choiceIndex == 0) {
|
||||
if (gSaveContext.rupees < 50) {
|
||||
globalCtx->msgCtx.unk_E3E7 = 4;
|
||||
globalCtx->msgCtx.msgMode = 0x36;
|
||||
globalCtx->msgCtx.stateTimer = 4;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
this->unk_308.unk_00 = 0;
|
||||
return;
|
||||
}
|
||||
|
@ -682,9 +682,9 @@ void func_80A7A568(EnIn* this, GlobalContext* globalCtx) {
|
|||
phi_a3 = 0x20;
|
||||
}
|
||||
func_80A79BAC(this, globalCtx, phi_a2, phi_a3);
|
||||
globalCtx->msgCtx.unk_E3E7 = 0;
|
||||
globalCtx->msgCtx.stateTimer = 0;
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;
|
||||
globalCtx->msgCtx.msgMode = 0x36;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
this->unk_308.unk_00 = 0;
|
||||
}
|
||||
}
|
||||
|
@ -701,8 +701,8 @@ void func_80A7A770(EnIn* this, GlobalContext* globalCtx) {
|
|||
this->unk_308.unk_00 = 0;
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & 0xFFFF) | 0x20;
|
||||
if (!(gSaveContext.eventInf[0] & 0x40)) {
|
||||
globalCtx->msgCtx.unk_E3E7 = 4;
|
||||
globalCtx->msgCtx.msgMode = 0x36;
|
||||
globalCtx->msgCtx.stateTimer = 4;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -716,8 +716,8 @@ void func_80A7A848(EnIn* this, GlobalContext* globalCtx) {
|
|||
func_80A79BAC(this, globalCtx, 2, 0x26);
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0xF) | 2;
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;
|
||||
globalCtx->msgCtx.unk_E3E7 = 0;
|
||||
globalCtx->msgCtx.msgMode = 0x36;
|
||||
globalCtx->msgCtx.stateTimer = 0;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
}
|
||||
this->unk_308.unk_00 = 0;
|
||||
gSaveContext.eventInf[0] &= ~0x20;
|
||||
|
@ -741,8 +741,8 @@ void func_80A7A940(EnIn* this, GlobalContext* globalCtx) {
|
|||
func_80A79BAC(this, globalCtx, 2, 0x26);
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x000F) | 0x0002;
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;
|
||||
globalCtx->msgCtx.unk_E3E7 = 0;
|
||||
globalCtx->msgCtx.msgMode = 0x36;
|
||||
globalCtx->msgCtx.stateTimer = 0;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
this->unk_308.unk_00 = 0;
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & 0xFFFF) | 0x40;
|
||||
}
|
||||
|
@ -778,7 +778,7 @@ void func_80A7AA40(EnIn* this, GlobalContext* globalCtx) {
|
|||
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->camId, &sp30, &sp24);
|
||||
this->actor.textId = 0x203B;
|
||||
func_8010B680(globalCtx, this->actor.textId, NULL);
|
||||
Message_StartTextbox(globalCtx, this->actor.textId, NULL);
|
||||
this->unk_308.unk_00 = 1;
|
||||
this->unk_1FC = 0;
|
||||
globalCtx->csCtx.frames = 0;
|
||||
|
@ -808,11 +808,11 @@ void func_80A7ABD4(EnIn* this, GlobalContext* globalCtx) {
|
|||
if (this->unk_308.unk_00 == 2) {
|
||||
if (this->actor.textId == 0x203B) {
|
||||
this->actor.textId = 0x203C;
|
||||
func_8010B680(globalCtx, this->actor.textId, NULL);
|
||||
Message_StartTextbox(globalCtx, this->actor.textId, NULL);
|
||||
this->unk_308.unk_00 = 1;
|
||||
func_80A796EC(this, 3);
|
||||
} else {
|
||||
globalCtx->msgCtx.msgMode = 0x36;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
this->unk_308.unk_00 = 0;
|
||||
}
|
||||
}
|
||||
|
@ -866,8 +866,8 @@ void func_80A7AEF0(EnIn* this, GlobalContext* globalCtx) {
|
|||
globalCtx->fadeTransition = 5;
|
||||
this->actionFunc = func_80A7B018;
|
||||
} else if (this->unk_308.unk_00 == 2) {
|
||||
globalCtx->msgCtx.unk_E3E7 = 4;
|
||||
globalCtx->msgCtx.msgMode = 0x36;
|
||||
globalCtx->msgCtx.stateTimer = 4;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
this->unk_308.unk_00 = 0;
|
||||
}
|
||||
}
|
||||
|
@ -891,8 +891,8 @@ void func_80A7B024(EnIn* this, GlobalContext* globalCtx) {
|
|||
func_80A79BAC(this, globalCtx, 0, 0x26);
|
||||
gSaveContext.eventInf[0] = gSaveContext.eventInf[0] & ~0xF;
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;
|
||||
globalCtx->msgCtx.unk_E3E7 = 4;
|
||||
globalCtx->msgCtx.msgMode = 0x36;
|
||||
globalCtx->msgCtx.stateTimer = 4;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
this->unk_308.unk_00 = 0;
|
||||
}
|
||||
}
|
||||
|
@ -920,14 +920,14 @@ void EnIn_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (this->actionFunc != func_80A7A304) {
|
||||
func_80A79AB4(this, globalCtx);
|
||||
if (gSaveContext.timer2Value < 6 && gSaveContext.timer2State != 0 && this->unk_308.unk_00 == 0) {
|
||||
if (func_8002F194(&this->actor, globalCtx)) {}
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {}
|
||||
} else {
|
||||
func_800343CC(globalCtx, &this->actor, &this->unk_308.unk_00,
|
||||
((this->actor.targetMode == 6) ? 80.0f : 320.0f) + this->collider.dim.radius, func_80A79168,
|
||||
func_80A79500);
|
||||
if (this->unk_308.unk_00 != 0) {
|
||||
this->unk_1FA = this->unk_1F8;
|
||||
this->unk_1F8 = func_8010BDBC(&globalCtx->msgCtx);
|
||||
this->unk_1F8 = Message_GetState(&globalCtx->msgCtx);
|
||||
}
|
||||
}
|
||||
func_80A795C8(this, globalCtx);
|
||||
|
|
|
@ -82,7 +82,7 @@ void EnJs_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
u8 func_80A88F64(EnJs* this, GlobalContext* globalCtx, u16 textId) {
|
||||
s16 yawDiff;
|
||||
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
return 1;
|
||||
} else {
|
||||
this->actor.textId = textId;
|
||||
|
@ -103,14 +103,14 @@ void func_80A89008(EnJs* this) {
|
|||
}
|
||||
|
||||
void func_80A89078(EnJs* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
func_80A89008(this);
|
||||
this->actor.flags &= ~0x10000;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80A890C0(EnJs* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
En_Js_SetupAction(this, func_80A89078);
|
||||
} else {
|
||||
func_8002F2CC(&this->actor, globalCtx, 1000.0f);
|
||||
|
@ -118,7 +118,7 @@ void func_80A890C0(EnJs* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A8910C(EnJs* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
this->actor.textId = 0x6078;
|
||||
En_Js_SetupAction(this, func_80A890C0);
|
||||
this->actor.flags |= 0x10000;
|
||||
|
@ -135,11 +135,11 @@ void func_80A89160(EnJs* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A891C4(EnJs* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4 && func_80106BC8(globalCtx)) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE && Message_ShouldAdvance(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0: // yes
|
||||
if (gSaveContext.rupees < 200) {
|
||||
func_8010B720(globalCtx, 0x6075);
|
||||
Message_ContinueTextbox(globalCtx, 0x6075);
|
||||
func_80A89008(this);
|
||||
} else {
|
||||
Rupees_ChangeBy(-200);
|
||||
|
@ -147,7 +147,7 @@ void func_80A891C4(EnJs* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
break;
|
||||
case 1: // no
|
||||
func_8010B720(globalCtx, 0x6074);
|
||||
Message_ContinueTextbox(globalCtx, 0x6074);
|
||||
func_80A89008(this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -94,10 +94,9 @@ void func_80A8F28C(EnKakasi* this) {
|
|||
}
|
||||
|
||||
void func_80A8F320(EnKakasi* this, GlobalContext* globalCtx, s16 arg) {
|
||||
s16 phi_v0;
|
||||
s16 ocarinaNote = globalCtx->msgCtx.lastOcaNoteIdx;
|
||||
s16 currentFrame;
|
||||
|
||||
phi_v0 = globalCtx->msgCtx.unk_E410;
|
||||
if (arg != 0) {
|
||||
if (this->unk_19C[3] == 0) {
|
||||
this->unk_19C[3] = (s16)Rand_ZeroFloat(10.99f) + 30;
|
||||
|
@ -105,33 +104,33 @@ void func_80A8F320(EnKakasi* this, GlobalContext* globalCtx, s16 arg) {
|
|||
}
|
||||
|
||||
this->unk_19A = (s16)Rand_ZeroFloat(2.99f) + 5;
|
||||
phi_v0 = this->unk_1A6;
|
||||
ocarinaNote = this->unk_1A6;
|
||||
}
|
||||
switch (phi_v0) {
|
||||
case 0:
|
||||
switch (ocarinaNote) {
|
||||
case OCARINA_NOTE_A:
|
||||
this->unk_19A++;
|
||||
if (this->unk_1A4 == 0) {
|
||||
this->unk_1A4 = 1;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EV_KAKASHI_ROLL);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
case OCARINA_NOTE_C_DOWN:
|
||||
this->unk_19A++;
|
||||
this->unk_1B8 = 1.0f;
|
||||
break;
|
||||
case 2:
|
||||
case OCARINA_NOTE_C_RIGHT:
|
||||
this->unk_19A++;
|
||||
if (this->unk_1AC == 0) {
|
||||
this->unk_1AC = 0x1388;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
case OCARINA_NOTE_C_LEFT:
|
||||
this->unk_19A++;
|
||||
if (this->unk_1A8 == 0) {
|
||||
this->unk_1A8 = 0x1388;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
case OCARINA_NOTE_C_UP:
|
||||
this->unk_19A++;
|
||||
this->unk_1B8 = 2.0f;
|
||||
break;
|
||||
|
@ -178,18 +177,18 @@ void func_80A8F660(EnKakasi* this, GlobalContext* globalCtx) {
|
|||
Animation_Change(&this->skelanime, &object_ka_Anim_000214, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
|
||||
|
||||
this->actor.textId = 0x4076;
|
||||
this->unk_196 = 6;
|
||||
this->unk_196 = TEXT_STATE_DONE;
|
||||
if (!LINK_IS_ADULT) {
|
||||
this->unk_194 = false;
|
||||
if (gSaveContext.scarecrowCustomSongSet) {
|
||||
this->actor.textId = 0x407A;
|
||||
this->unk_196 = 5;
|
||||
this->unk_196 = TEXT_STATE_EVENT;
|
||||
}
|
||||
} else {
|
||||
this->unk_194 = true;
|
||||
if (gSaveContext.scarecrowCustomSongSet) {
|
||||
this->actor.textId = 0x4079;
|
||||
this->unk_196 = 5;
|
||||
this->unk_196 = TEXT_STATE_EVENT;
|
||||
}
|
||||
}
|
||||
this->actionFunc = func_80A8F75C;
|
||||
|
@ -201,8 +200,8 @@ void func_80A8F75C(EnKakasi* this, GlobalContext* globalCtx) {
|
|||
func_80A8F28C(this);
|
||||
SkelAnime_Update(&this->skelanime);
|
||||
this->camId = SUBCAM_NONE;
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (this->unk_196 == 5) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
if (this->unk_196 == TEXT_STATE_EVENT) {
|
||||
this->actionFunc = func_80A8F9C8;
|
||||
} else {
|
||||
this->actionFunc = func_80A8F660;
|
||||
|
@ -218,7 +217,7 @@ void func_80A8F75C(EnKakasi* this, GlobalContext* globalCtx) {
|
|||
if (player->stateFlags2 & 0x1000000) {
|
||||
this->camId = OnePointCutscene_Init(globalCtx, 2260, -99, &this->actor, MAIN_CAM);
|
||||
|
||||
func_8010BD58(globalCtx, 0x2A);
|
||||
func_8010BD58(globalCtx, OCARINA_ACTION_SCARECROW_LONG_RECORDING);
|
||||
this->unk_19A = 0;
|
||||
this->unk_1B8 = 0.0;
|
||||
player->stateFlags2 |= 0x800000;
|
||||
|
@ -238,22 +237,22 @@ void func_80A8F75C(EnKakasi* this, GlobalContext* globalCtx) {
|
|||
void func_80A8F8D0(EnKakasi* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (globalCtx->msgCtx.unk_E3EE == 4 && globalCtx->msgCtx.msgMode == 0) {
|
||||
if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_04 && globalCtx->msgCtx.msgMode == MSGMODE_NONE) {
|
||||
// "end?"
|
||||
osSyncPrintf(VT_FGCOL(BLUE) "☆☆☆☆☆ 終り? ☆☆☆☆☆ \n" VT_RST);
|
||||
|
||||
if (this->unk_19A != 0) {
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
this->actor.textId = 0x4077;
|
||||
this->unk_196 = 5;
|
||||
func_8010B680(globalCtx, this->actor.textId, NULL);
|
||||
this->unk_196 = TEXT_STATE_EVENT;
|
||||
Message_StartTextbox(globalCtx, this->actor.textId, NULL);
|
||||
this->actionFunc = func_80A8F9C8;
|
||||
} else {
|
||||
OnePointCutscene_EndCutscene(globalCtx, this->camId);
|
||||
this->camId = SUBCAM_NONE;
|
||||
this->actionFunc = func_80A8F660;
|
||||
}
|
||||
} else if (globalCtx->msgCtx.unk_E3EE == 1) {
|
||||
} else if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_01) {
|
||||
func_80A8F320(this, globalCtx, 0);
|
||||
player->stateFlags2 |= 0x800000;
|
||||
}
|
||||
|
@ -264,36 +263,36 @@ void func_80A8F9C8(EnKakasi* this, GlobalContext* globalCtx) {
|
|||
SkelAnime_Update(&this->skelanime);
|
||||
func_8002DF54(globalCtx, NULL, 8);
|
||||
|
||||
if (this->unk_196 == func_8010BDBC(&globalCtx->msgCtx) && (func_80106BC8(globalCtx) != 0)) {
|
||||
if (this->unk_196 == Message_GetState(&globalCtx->msgCtx) && Message_ShouldAdvance(globalCtx)) {
|
||||
|
||||
if (this->camId != SUBCAM_NONE) {
|
||||
func_8005B1A4(globalCtx->cameraPtrs[this->camId]);
|
||||
}
|
||||
this->camId = OnePointCutscene_Init(globalCtx, 2270, -99, &this->actor, MAIN_CAM);
|
||||
globalCtx->msgCtx.msgMode = 0x37;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_PAUSED;
|
||||
func_8002DF54(globalCtx, NULL, 8);
|
||||
func_8010BD58(globalCtx, 0x2B);
|
||||
func_8010BD58(globalCtx, OCARINA_ACTION_SCARECROW_LONG_PLAYBACK);
|
||||
this->actionFunc = func_80A8FAA4;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80A8FAA4(EnKakasi* this, GlobalContext* globalCtx) {
|
||||
if (globalCtx->msgCtx.unk_E3EE != 0xF) {
|
||||
if (globalCtx->msgCtx.ocarinaMode != OCARINA_MODE_0F) {
|
||||
func_80A8F320(this, globalCtx, 1);
|
||||
return;
|
||||
}
|
||||
|
||||
osSyncPrintf("game_play->message.msg_mode=%d\n", globalCtx->msgCtx.msgMode);
|
||||
|
||||
if (globalCtx->msgCtx.msgMode == 0) {
|
||||
if (globalCtx->msgCtx.msgMode == MSGMODE_NONE) {
|
||||
if (this->unk_194) {
|
||||
this->actor.textId = 0x4077;
|
||||
this->unk_196 = 5;
|
||||
func_8010B680(globalCtx, this->actor.textId, NULL);
|
||||
this->unk_196 = TEXT_STATE_EVENT;
|
||||
Message_StartTextbox(globalCtx, this->actor.textId, NULL);
|
||||
} else {
|
||||
this->actor.textId = 0x4078;
|
||||
this->unk_196 = 5;
|
||||
func_8010B680(globalCtx, this->actor.textId, NULL);
|
||||
this->unk_196 = TEXT_STATE_EVENT;
|
||||
Message_StartTextbox(globalCtx, this->actor.textId, NULL);
|
||||
}
|
||||
this->actionFunc = func_80A8FBB8;
|
||||
OnePointCutscene_EndCutscene(globalCtx, this->camId);
|
||||
|
@ -307,13 +306,11 @@ void func_80A8FBB8(EnKakasi* this, GlobalContext* globalCtx) {
|
|||
func_80A8F28C(this);
|
||||
SkelAnime_Update(&this->skelanime);
|
||||
|
||||
if (this->unk_196 == func_8010BDBC(&globalCtx->msgCtx)) {
|
||||
if (func_80106BC8(globalCtx) != 0) {
|
||||
func_8005B1A4(globalCtx->cameraPtrs[this->camId]);
|
||||
func_80106CCC(globalCtx);
|
||||
func_8002DF54(globalCtx, NULL, 7);
|
||||
this->actionFunc = func_80A8F660;
|
||||
}
|
||||
if (this->unk_196 == Message_GetState(&globalCtx->msgCtx) && Message_ShouldAdvance(globalCtx)) {
|
||||
func_8005B1A4(globalCtx->cameraPtrs[this->camId]);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
func_8002DF54(globalCtx, NULL, 7);
|
||||
this->actionFunc = func_80A8F660;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -140,12 +140,12 @@ void func_80A90264(EnKakasi2* this, GlobalContext* globalCtx) {
|
|||
(gSaveContext.eventChkInf[9] & 0x1000)) {
|
||||
|
||||
this->unk_194 = 0;
|
||||
if (globalCtx->msgCtx.unk_E3EE == 11) {
|
||||
if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_0B) {
|
||||
if (this->switchFlag >= 0) {
|
||||
Flags_SetSwitch(globalCtx, this->switchFlag);
|
||||
}
|
||||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ SAVE 終了 ☆☆☆☆☆ %d\n" VT_RST, this->switchFlag);
|
||||
globalCtx->msgCtx.unk_E3EE = 4;
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
this->actor.draw = func_80A90948;
|
||||
Collider_InitCylinder(globalCtx, &this->collider);
|
||||
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
|
||||
|
|
|
@ -98,9 +98,8 @@ void func_80A90E28(EnKakasi3* this) {
|
|||
|
||||
void func_80A90EBC(EnKakasi3* this, GlobalContext* globalCtx, s32 arg) {
|
||||
s16 currentFrame;
|
||||
s16 phi_v0;
|
||||
s16 ocarinaNote = globalCtx->msgCtx.lastOcaNoteIdx;
|
||||
|
||||
phi_v0 = globalCtx->msgCtx.unk_E410;
|
||||
if (arg != 0) {
|
||||
if (this->unk_19C[3] == 0) {
|
||||
this->unk_19C[3] = (s16)Rand_ZeroFloat(10.99f) + 30;
|
||||
|
@ -108,33 +107,33 @@ void func_80A90EBC(EnKakasi3* this, GlobalContext* globalCtx, s32 arg) {
|
|||
}
|
||||
|
||||
this->unk_19A = (s16)Rand_ZeroFloat(2.99f) + 5;
|
||||
phi_v0 = this->unk_1A6;
|
||||
ocarinaNote = this->unk_1A6;
|
||||
}
|
||||
switch (phi_v0) {
|
||||
case 0:
|
||||
switch (ocarinaNote) {
|
||||
case OCARINA_NOTE_A:
|
||||
this->unk_19A++;
|
||||
if (this->unk_1A4 == 0) {
|
||||
this->unk_1A4 = 1;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EV_KAKASHI_ROLL);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
case OCARINA_NOTE_C_DOWN:
|
||||
this->unk_19A++;
|
||||
this->unk_1B8 = 1.0f;
|
||||
break;
|
||||
case 2:
|
||||
case OCARINA_NOTE_C_RIGHT:
|
||||
this->unk_19A++;
|
||||
if (this->unk_1AE == 0x0) {
|
||||
this->unk_1AE = 0x1388;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
case OCARINA_NOTE_C_LEFT:
|
||||
this->unk_19A++;
|
||||
if (this->unk_1AA == 0x0) {
|
||||
this->unk_1AA = 0x1388;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
case OCARINA_NOTE_C_UP:
|
||||
this->unk_19A++;
|
||||
this->unk_1B8 = 2.0f;
|
||||
break;
|
||||
|
@ -186,14 +185,14 @@ void func_80A91284(EnKakasi3* this, GlobalContext* globalCtx) {
|
|||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
this->actor.textId = 0x40A1;
|
||||
this->dialogState = 6;
|
||||
this->dialogState = TEXT_STATE_DONE;
|
||||
this->unk_19A = 0;
|
||||
|
||||
if (!LINK_IS_ADULT) {
|
||||
this->unk_194 = false;
|
||||
if (gSaveContext.scarecrowSpawnSongSet) {
|
||||
this->actor.textId = 0x40A0;
|
||||
this->dialogState = 5;
|
||||
this->dialogState = TEXT_STATE_EVENT;
|
||||
this->unk_1A8 = 1;
|
||||
}
|
||||
} else {
|
||||
|
@ -215,7 +214,7 @@ void func_80A91348(EnKakasi3* this, GlobalContext* globalCtx) {
|
|||
func_80A90E28(this);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
this->camId = SUBCAM_NONE;
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
if (!this->unk_194) {
|
||||
if (this->unk_1A8 == 0) {
|
||||
this->actionFunc = func_80A91284;
|
||||
|
@ -236,10 +235,10 @@ void func_80A91348(EnKakasi3* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (player->stateFlags2 & 0x1000000) {
|
||||
this->camId = OnePointCutscene_Init(globalCtx, 2260, -99, &this->actor, MAIN_CAM);
|
||||
globalCtx->msgCtx.msgMode = 0x37;
|
||||
this->dialogState = 5;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_PAUSED;
|
||||
this->dialogState = TEXT_STATE_EVENT;
|
||||
this->unk_1B8 = 0.0f;
|
||||
func_8010B680(globalCtx, 0x40A4, NULL);
|
||||
Message_StartTextbox(globalCtx, 0x40A4, NULL);
|
||||
player->stateFlags2 |= 0x800000;
|
||||
this->actionFunc = func_80A915B8;
|
||||
return;
|
||||
|
@ -251,10 +250,10 @@ void func_80A91348(EnKakasi3* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (player->stateFlags2 & 0x1000000) {
|
||||
this->camId = OnePointCutscene_Init(globalCtx, 2260, -99, &this->actor, MAIN_CAM);
|
||||
globalCtx->msgCtx.msgMode = 0x37;
|
||||
this->dialogState = 5;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_PAUSED;
|
||||
this->dialogState = TEXT_STATE_EVENT;
|
||||
this->unk_1B8 = 0.0f;
|
||||
func_8010B680(globalCtx, 0x40A8, NULL);
|
||||
Message_StartTextbox(globalCtx, 0x40A8, NULL);
|
||||
player->stateFlags2 |= 0x800000;
|
||||
this->actionFunc = func_80A9187C;
|
||||
return;
|
||||
|
@ -270,10 +269,9 @@ void func_80A91348(EnKakasi3* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A915B8(EnKakasi3* this, GlobalContext* globalCtx) {
|
||||
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 5 && func_80106BC8(globalCtx)) {
|
||||
func_80106CCC(globalCtx);
|
||||
func_8010BD58(globalCtx, 0x2C);
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
func_8010BD58(globalCtx, OCARINA_ACTION_SCARECROW_RECORDING);
|
||||
this->actionFunc = func_80A91620;
|
||||
}
|
||||
}
|
||||
|
@ -281,8 +279,9 @@ void func_80A915B8(EnKakasi3* this, GlobalContext* globalCtx) {
|
|||
void func_80A91620(EnKakasi3* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if ((globalCtx->msgCtx.unk_E3EE == 4 || (globalCtx->msgCtx.unk_E3EE >= 5 && globalCtx->msgCtx.unk_E3EE < 11)) &&
|
||||
(globalCtx->msgCtx.msgMode == 0)) {
|
||||
if ((globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_04 ||
|
||||
(globalCtx->msgCtx.ocarinaMode >= OCARINA_MODE_05 && globalCtx->msgCtx.ocarinaMode < OCARINA_MODE_0B)) &&
|
||||
(globalCtx->msgCtx.msgMode == MSGMODE_NONE)) {
|
||||
|
||||
OnePointCutscene_EndCutscene(globalCtx, this->camId);
|
||||
if (globalCtx->cameraPtrs[this->camId] == NULL) {
|
||||
|
@ -295,15 +294,15 @@ void func_80A91620(EnKakasi3* this, GlobalContext* globalCtx) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (globalCtx->msgCtx.unk_E3EE == 3 && globalCtx->msgCtx.msgMode == 0) {
|
||||
this->dialogState = 5;
|
||||
func_8010B680(globalCtx, 0x40A5, NULL);
|
||||
if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_03 && globalCtx->msgCtx.msgMode == MSGMODE_NONE) {
|
||||
this->dialogState = TEXT_STATE_EVENT;
|
||||
Message_StartTextbox(globalCtx, 0x40A5, NULL);
|
||||
func_8002DF54(globalCtx, NULL, 8);
|
||||
this->actionFunc = func_80A91A90;
|
||||
return;
|
||||
}
|
||||
|
||||
if (globalCtx->msgCtx.unk_E3EE == 1) {
|
||||
if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_01) {
|
||||
func_80A90EBC(this, globalCtx, 0);
|
||||
player->stateFlags2 |= 0x800000;
|
||||
}
|
||||
|
@ -313,9 +312,9 @@ void func_80A91760(EnKakasi3* this, GlobalContext* globalCtx) {
|
|||
|
||||
func_80A90E28(this);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (this->dialogState == func_8010BDBC(&globalCtx->msgCtx) && func_80106BC8(globalCtx)) {
|
||||
globalCtx->msgCtx.msgMode = 0x37;
|
||||
func_8010BD58(globalCtx, 0x2D);
|
||||
if (this->dialogState == Message_GetState(&globalCtx->msgCtx) && Message_ShouldAdvance(globalCtx)) {
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_PAUSED;
|
||||
func_8010BD58(globalCtx, OCARINA_ACTION_SCARECROW_PLAYBACK);
|
||||
this->actionFunc = func_80A917FC;
|
||||
this->camId = OnePointCutscene_Init(globalCtx, 2280, -99, &this->actor, MAIN_CAM);
|
||||
}
|
||||
|
@ -323,21 +322,20 @@ void func_80A91760(EnKakasi3* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80A917FC(EnKakasi3* this, GlobalContext* globalCtx) {
|
||||
|
||||
if (globalCtx->msgCtx.unk_E3EE != 15) {
|
||||
if (globalCtx->msgCtx.ocarinaMode != OCARINA_MODE_0F) {
|
||||
func_80A90EBC(this, globalCtx, 1);
|
||||
} else {
|
||||
globalCtx->msgCtx.unk_E3EE = 4;
|
||||
func_80106CCC(globalCtx);
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
Message_CloseTextbox(globalCtx);
|
||||
OnePointCutscene_EndCutscene(globalCtx, this->camId);
|
||||
this->actionFunc = func_80A911F0;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80A9187C(EnKakasi3* this, GlobalContext* globalCtx) {
|
||||
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 5 && func_80106BC8(globalCtx)) {
|
||||
func_80106CCC(globalCtx);
|
||||
func_8010BD58(globalCtx, 0x28);
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
func_8010BD58(globalCtx, OCARINA_ACTION_CHECK_SCARECROW);
|
||||
this->actionFunc = func_80A918E4;
|
||||
}
|
||||
}
|
||||
|
@ -347,13 +345,14 @@ void func_80A918E4(EnKakasi3* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (BREG(3) != 0) {
|
||||
// "No way!"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ まさか! ☆☆☆☆☆ %d\n" VT_RST, globalCtx->msgCtx.unk_E3EE);
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ まさか! ☆☆☆☆☆ %d\n" VT_RST, globalCtx->msgCtx.ocarinaMode);
|
||||
}
|
||||
if ((globalCtx->msgCtx.unk_E3EE == 4 || (globalCtx->msgCtx.unk_E3EE >= 5 && globalCtx->msgCtx.unk_E3EE < 11)) &&
|
||||
globalCtx->msgCtx.msgMode == 0) {
|
||||
if ((globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_04 ||
|
||||
(globalCtx->msgCtx.ocarinaMode >= OCARINA_MODE_05 && globalCtx->msgCtx.ocarinaMode < OCARINA_MODE_0B)) &&
|
||||
globalCtx->msgCtx.msgMode == MSGMODE_NONE) {
|
||||
|
||||
func_8010B680(globalCtx, 0x40A6, NULL);
|
||||
this->dialogState = 5;
|
||||
Message_StartTextbox(globalCtx, 0x40A6, NULL);
|
||||
this->dialogState = TEXT_STATE_EVENT;
|
||||
OnePointCutscene_EndCutscene(globalCtx, this->camId);
|
||||
this->camId = SUBCAM_NONE;
|
||||
func_8002DF54(globalCtx, NULL, 8);
|
||||
|
@ -361,23 +360,23 @@ void func_80A918E4(EnKakasi3* this, GlobalContext* globalCtx) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (globalCtx->msgCtx.unk_E3EE == 3 && globalCtx->msgCtx.msgMode == 0) {
|
||||
globalCtx->msgCtx.unk_E3EE = 4;
|
||||
if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_03 && globalCtx->msgCtx.msgMode == MSGMODE_NONE) {
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
if (BREG(3) != 0) {
|
||||
osSyncPrintf("\n\n");
|
||||
// "With this, other guys are OK! That's it!"
|
||||
osSyncPrintf(VT_FGCOL(CYAN) "☆☆☆☆☆ これで、他の奴もOK!だ! ☆☆☆☆☆ %d\n" VT_RST,
|
||||
globalCtx->msgCtx.unk_E3EE);
|
||||
globalCtx->msgCtx.ocarinaMode);
|
||||
}
|
||||
this->unk_195 = true;
|
||||
func_8010B680(globalCtx, 0x40A7, NULL);
|
||||
this->dialogState = 5;
|
||||
Message_StartTextbox(globalCtx, 0x40A7, NULL);
|
||||
this->dialogState = TEXT_STATE_EVENT;
|
||||
func_8002DF54(globalCtx, NULL, 8);
|
||||
this->actionFunc = func_80A91A90;
|
||||
return;
|
||||
}
|
||||
|
||||
if (globalCtx->msgCtx.unk_E3EE == 1) {
|
||||
if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_01) {
|
||||
func_80A90EBC(this, globalCtx, 0);
|
||||
player->stateFlags2 |= 0x800000;
|
||||
}
|
||||
|
@ -388,7 +387,7 @@ void func_80A91A90(EnKakasi3* this, GlobalContext* globalCtx) {
|
|||
SkelAnime_Update(&this->skelAnime);
|
||||
func_8002DF54(globalCtx, NULL, 8);
|
||||
|
||||
if (this->dialogState == func_8010BDBC(&globalCtx->msgCtx) && func_80106BC8(globalCtx)) {
|
||||
if (this->dialogState == Message_GetState(&globalCtx->msgCtx) && Message_ShouldAdvance(globalCtx)) {
|
||||
if (this->unk_195) {
|
||||
if (!(gSaveContext.eventChkInf[9] & 0x1000)) {
|
||||
gSaveContext.eventChkInf[9] |= 0x1000;
|
||||
|
@ -400,8 +399,8 @@ void func_80A91A90(EnKakasi3* this, GlobalContext* globalCtx) {
|
|||
if (this->camId != SUBCAM_NONE) {
|
||||
func_8005B1A4(globalCtx->cameraPtrs[this->camId]);
|
||||
}
|
||||
func_80106CCC(globalCtx);
|
||||
globalCtx->msgCtx.unk_E3EE = 4;
|
||||
Message_CloseTextbox(globalCtx);
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
func_8002DF54(globalCtx, NULL, 7);
|
||||
this->actionFunc = func_80A911F0;
|
||||
}
|
||||
|
|
|
@ -234,7 +234,7 @@ void EnKanban_Message(EnKanban* this, GlobalContext* globalCtx) {
|
|||
if (!this->msgFlag) {
|
||||
if (this->msgTimer == 0) {
|
||||
if (ABS((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y)) < 0x2800) {
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->msgFlag = true;
|
||||
} else {
|
||||
func_8002F2CC(&this->actor, globalCtx, 68.0f);
|
||||
|
@ -244,7 +244,7 @@ void EnKanban_Message(EnKanban* this, GlobalContext* globalCtx) {
|
|||
this->msgTimer--;
|
||||
}
|
||||
} else {
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
this->msgFlag = false;
|
||||
this->msgTimer = 20;
|
||||
}
|
||||
|
@ -704,16 +704,17 @@ void EnKanban_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
}
|
||||
}
|
||||
osSyncPrintf(VT_FGCOL(GREEN));
|
||||
osSyncPrintf("OCARINA_MODE %d\n", globalCtx->msgCtx.unk_E3EE);
|
||||
osSyncPrintf("OCARINA_MODE %d\n", globalCtx->msgCtx.ocarinaMode);
|
||||
osSyncPrintf(VT_RST);
|
||||
switch (this->ocarinaFlag) {
|
||||
case 0:
|
||||
if (globalCtx->msgCtx.unk_E3EE == 1) {
|
||||
if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_01) {
|
||||
this->ocarinaFlag = 1;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if ((globalCtx->msgCtx.unk_E3EE == 4) && (globalCtx->msgCtx.unk_E3F2 == 8)) {
|
||||
if ((globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_04) &&
|
||||
(globalCtx->msgCtx.unk_E3F2 == OCARINA_SONG_LULLABY)) {
|
||||
this->actionState = ENKANBAN_REPAIR;
|
||||
this->bounceX = 1;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
|
|
|
@ -456,8 +456,8 @@ u16 func_80A97610(GlobalContext* globalCtx, Actor* thisx) {
|
|||
s16 func_80A97738(GlobalContext* globalCtx, Actor* thisx) {
|
||||
EnKo* this = THIS;
|
||||
|
||||
switch (func_8010BDBC(&globalCtx->msgCtx)) {
|
||||
case 2:
|
||||
switch (Message_GetState(&globalCtx->msgCtx)) {
|
||||
case TEXT_STATE_CLOSING:
|
||||
switch (this->actor.textId) {
|
||||
case 0x1005:
|
||||
gSaveContext.infTable[1] |= 0x4000;
|
||||
|
@ -496,7 +496,7 @@ s16 func_80A97738(GlobalContext* globalCtx, Actor* thisx) {
|
|||
return 1;
|
||||
}
|
||||
return 0;
|
||||
case 3:
|
||||
case TEXT_STATE_DONE_FADING:
|
||||
switch (this->actor.textId) {
|
||||
case 0x10B7:
|
||||
case 0x10B8:
|
||||
|
@ -507,22 +507,22 @@ s16 func_80A97738(GlobalContext* globalCtx, Actor* thisx) {
|
|||
}
|
||||
}
|
||||
return 1;
|
||||
case 4:
|
||||
if (func_80106BC8(globalCtx)) {
|
||||
case TEXT_STATE_CHOICE:
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
switch (this->actor.textId) {
|
||||
case 0x1035:
|
||||
this->actor.textId = (globalCtx->msgCtx.choiceIndex == 0) ? 0x1036 : 0x1037;
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
break;
|
||||
case 0x1038:
|
||||
this->actor.textId = (globalCtx->msgCtx.choiceIndex != 0)
|
||||
? (globalCtx->msgCtx.choiceIndex == 1) ? 0x103A : 0x103B
|
||||
: 0x1039;
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
break;
|
||||
case 0x103E:
|
||||
this->actor.textId = (globalCtx->msgCtx.choiceIndex == 0) ? 0x103F : 0x1040;
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
break;
|
||||
case 0x10B7:
|
||||
gSaveContext.infTable[11] |= 0x1000;
|
||||
|
@ -534,8 +534,8 @@ s16 func_80A97738(GlobalContext* globalCtx, Actor* thisx) {
|
|||
return 1;
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if (func_80106BC8(globalCtx) != 0) {
|
||||
case TEXT_STATE_DONE:
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
|
@ -1138,8 +1138,8 @@ void func_80A99384(EnKo* this, GlobalContext* globalCtx) {
|
|||
this->actionFunc = func_80A99438;
|
||||
} else if (ENKO_TYPE == ENKO_TYPE_CHILD_FADO && this->unk_1E8.unk_00 == 2) {
|
||||
this->actionFunc = func_80A99504;
|
||||
globalCtx->msgCtx.unk_E3E7 = 4;
|
||||
globalCtx->msgCtx.msgMode = 0x36;
|
||||
globalCtx->msgCtx.stateTimer = 4;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1147,8 +1147,8 @@ void func_80A99438(EnKo* this, GlobalContext* globalCtx) {
|
|||
if (ENKO_TYPE == ENKO_TYPE_CHILD_FADO && this->unk_1E8.unk_00 == 2) {
|
||||
func_80034EC0(&this->skelAnime, sOsAnimeTable, 6);
|
||||
this->actionFunc = func_80A99504;
|
||||
globalCtx->msgCtx.unk_E3E7 = 4;
|
||||
globalCtx->msgCtx.msgMode = 0x36;
|
||||
globalCtx->msgCtx.stateTimer = 4;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
} else if (this->unk_1E8.unk_00 == 0 || this->actor.textId != 0x10B9) {
|
||||
func_80034EC0(&this->skelAnime, sOsAnimeTable, 6);
|
||||
this->actionFunc = func_80A99384;
|
||||
|
@ -1167,7 +1167,7 @@ void func_80A99504(EnKo* this, GlobalContext* globalCtx) {
|
|||
void func_80A99560(EnKo* this, GlobalContext* globalCtx) {
|
||||
if (this->unk_1E8.unk_00 == 3) {
|
||||
this->actor.textId = 0x10B9;
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
this->unk_1E8.unk_00 = 1;
|
||||
gSaveContext.itemGetInf[3] |= 2;
|
||||
this->actionFunc = func_80A99384;
|
||||
|
|
|
@ -115,8 +115,8 @@ s16 func_80A9C6C0(GlobalContext* globalCtx, Actor* thisx) {
|
|||
EnKz* this = THIS;
|
||||
s16 ret = 1;
|
||||
|
||||
switch (func_8010BDBC(&globalCtx->msgCtx)) {
|
||||
case 6:
|
||||
switch (Message_GetState(&globalCtx->msgCtx)) {
|
||||
case TEXT_STATE_DONE:
|
||||
ret = 0;
|
||||
switch (this->actor.textId) {
|
||||
case 0x4012:
|
||||
|
@ -124,14 +124,14 @@ s16 func_80A9C6C0(GlobalContext* globalCtx, Actor* thisx) {
|
|||
ret = 2;
|
||||
break;
|
||||
case 0x401B:
|
||||
ret = func_80106BC8(globalCtx) == 0 ? 1 : 2;
|
||||
ret = !Message_ShouldAdvance(globalCtx) ? 1 : 2;
|
||||
break;
|
||||
case 0x401F:
|
||||
gSaveContext.infTable[19] |= 0x200;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
case TEXT_STATE_DONE_FADING:
|
||||
if (this->actor.textId != 0x4014) {
|
||||
if (this->actor.textId == 0x401B && !this->sfxPlayed) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
|
@ -143,8 +143,8 @@ s16 func_80A9C6C0(GlobalContext* globalCtx, Actor* thisx) {
|
|||
this->sfxPlayed = true;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (func_80106BC8(globalCtx) == 0) {
|
||||
case TEXT_STATE_CHOICE:
|
||||
if (!Message_ShouldAdvance(globalCtx)) {
|
||||
break;
|
||||
}
|
||||
if (this->actor.textId == 0x4014) {
|
||||
|
@ -153,21 +153,21 @@ s16 func_80A9C6C0(GlobalContext* globalCtx, Actor* thisx) {
|
|||
ret = 2;
|
||||
} else {
|
||||
this->actor.textId = 0x4016;
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (func_80106BC8(globalCtx) != 0) {
|
||||
case TEXT_STATE_EVENT:
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
ret = 2;
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
case 7:
|
||||
case 8:
|
||||
case 9:
|
||||
case TEXT_STATE_NONE:
|
||||
case TEXT_STATE_DONE_HAS_NEXT:
|
||||
case TEXT_STATE_CLOSING:
|
||||
case TEXT_STATE_SONG_DEMO_DONE:
|
||||
case TEXT_STATE_8:
|
||||
case TEXT_STATE_9:
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
|
@ -191,7 +191,7 @@ s32 func_80A9C95C(GlobalContext* globalCtx, EnKz* this, s16* arg2, f32 unkf, cal
|
|||
f32 xzDistToPlayer;
|
||||
f32 yaw;
|
||||
|
||||
if (func_8002F194(&this->actor, globalCtx) != 0) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
*arg2 = 1;
|
||||
return 1;
|
||||
}
|
||||
|
@ -210,7 +210,7 @@ s32 func_80A9C95C(GlobalContext* globalCtx, EnKz* this, s16* arg2, f32 unkf, cal
|
|||
|
||||
this->actor.flags |= 1;
|
||||
|
||||
func_8002F374(globalCtx, &this->actor, &sp32, &sp30);
|
||||
Actor_GetScreenPos(globalCtx, &this->actor, &sp32, &sp30);
|
||||
if (!((sp32 >= -30) && (sp32 < 361) && (sp30 >= -10) && (sp30 < 241))) {
|
||||
return 0;
|
||||
}
|
||||
|
@ -436,7 +436,7 @@ void EnKz_SetupGetItem(EnKz* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnKz_StartTimer(EnKz* this, GlobalContext* globalCtx) {
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 6) && (func_80106BC8(globalCtx))) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) {
|
||||
if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_FROG) {
|
||||
func_80088AA0(180); // start timer2 with 3 minutes
|
||||
gSaveContext.eventInf[1] &= ~1;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -85,8 +85,8 @@ u16 func_80AA19A0(GlobalContext* globalCtx, Actor* thisx) {
|
|||
s16 func_80AA1A38(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 0x2051:
|
||||
gSaveContext.infTable[8] |= 0x1000;
|
||||
|
@ -101,14 +101,14 @@ s16 func_80AA1A38(GlobalContext* globalCtx, Actor* thisx) {
|
|||
break;
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
case 1:
|
||||
case 3:
|
||||
case 4:
|
||||
case 5:
|
||||
case 6:
|
||||
case 7:
|
||||
case 9:
|
||||
case TEXT_STATE_NONE:
|
||||
case TEXT_STATE_DONE_HAS_NEXT:
|
||||
case TEXT_STATE_DONE_FADING:
|
||||
case TEXT_STATE_CHOICE:
|
||||
case TEXT_STATE_EVENT:
|
||||
case TEXT_STATE_DONE:
|
||||
case TEXT_STATE_SONG_DEMO_DONE:
|
||||
case TEXT_STATE_9:
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
|
@ -260,7 +260,7 @@ void func_80AA204C(EnMa2* this, GlobalContext* globalCtx) {
|
|||
if (player->stateFlags2 & 0x1000000) {
|
||||
player->unk_6A8 = &this->actor;
|
||||
player->stateFlags2 |= 0x2000000;
|
||||
func_8010BD58(globalCtx, 0x23);
|
||||
func_8010BD58(globalCtx, OCARINA_ACTION_CHECK_EPONA);
|
||||
this->actionFunc = func_80AA20E4;
|
||||
} else if (this->actor.xzDistToPlayer < 30.0f + (f32)this->collider.dim.radius) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
|
@ -270,15 +270,15 @@ void func_80AA204C(EnMa2* this, GlobalContext* globalCtx) {
|
|||
void func_80AA20E4(EnMa2* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (globalCtx->msgCtx.unk_E3EE >= 4) {
|
||||
if (globalCtx->msgCtx.ocarinaMode >= OCARINA_MODE_04) {
|
||||
this->actionFunc = func_80AA204C;
|
||||
globalCtx->msgCtx.unk_E3EE = 4;
|
||||
} else if (globalCtx->msgCtx.unk_E3EE == 3) {
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
} else if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_03) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
this->unk_208 = 0x1E;
|
||||
gSaveContext.infTable[8] |= 0x4000;
|
||||
this->actionFunc = func_80AA21C8;
|
||||
globalCtx->msgCtx.unk_E3EE = 4;
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
} else {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
}
|
||||
|
@ -292,7 +292,7 @@ void func_80AA21C8(EnMa2* this, GlobalContext* globalCtx) {
|
|||
} else {
|
||||
if (this->unk_1E0.unk_00 == 0) {
|
||||
this->actor.flags |= 0x10000;
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
} else {
|
||||
this->actor.flags &= ~0x10000;
|
||||
this->actionFunc = func_80AA2018;
|
||||
|
|
|
@ -106,9 +106,9 @@ u16 func_80AA2AA0(GlobalContext* globalCtx, Actor* thisx) {
|
|||
s16 func_80AA2BD4(GlobalContext* globalCtx, Actor* thisx) {
|
||||
s16 ret = 1;
|
||||
|
||||
switch (func_8010BDBC(&globalCtx->msgCtx)) {
|
||||
case 5:
|
||||
if (func_80106BC8(globalCtx) != 0) {
|
||||
switch (Message_GetState(&globalCtx->msgCtx)) {
|
||||
case TEXT_STATE_EVENT:
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
globalCtx->nextEntranceIndex = 0x157;
|
||||
gSaveContext.nextCutsceneIndex = 0xFFF0;
|
||||
globalCtx->fadeTransition = 0x26;
|
||||
|
@ -117,21 +117,21 @@ s16 func_80AA2BD4(GlobalContext* globalCtx, Actor* thisx) {
|
|||
gSaveContext.timer1State = 0xF;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (func_80106BC8(globalCtx) != 0) {
|
||||
case TEXT_STATE_CHOICE:
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
gSaveContext.infTable[11] |= 0x200;
|
||||
if (globalCtx->msgCtx.choiceIndex == 0) {
|
||||
if (gSaveContext.eventChkInf[1] & 0x4000) {
|
||||
func_8010B720(globalCtx, 0x2091);
|
||||
Message_ContinueTextbox(globalCtx, 0x2091);
|
||||
} else if (HIGH_SCORE(HS_HORSE_RACE) == 0) {
|
||||
func_8010B720(globalCtx, 0x2092);
|
||||
Message_ContinueTextbox(globalCtx, 0x2092);
|
||||
} else {
|
||||
func_8010B720(globalCtx, 0x2090);
|
||||
Message_ContinueTextbox(globalCtx, 0x2090);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
case TEXT_STATE_CLOSING:
|
||||
switch (thisx->textId) {
|
||||
case 0x2000:
|
||||
gSaveContext.infTable[11] |= 0x100;
|
||||
|
@ -161,13 +161,13 @@ s16 func_80AA2BD4(GlobalContext* globalCtx, Actor* thisx) {
|
|||
ret = 0;
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
case 1:
|
||||
case 3:
|
||||
case 6:
|
||||
case 7:
|
||||
case 8:
|
||||
case 9:
|
||||
case TEXT_STATE_NONE:
|
||||
case TEXT_STATE_DONE_HAS_NEXT:
|
||||
case TEXT_STATE_DONE_FADING:
|
||||
case TEXT_STATE_DONE:
|
||||
case TEXT_STATE_SONG_DEMO_DONE:
|
||||
case TEXT_STATE_8:
|
||||
case TEXT_STATE_9:
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
|
|
|
@ -333,9 +333,10 @@ void func_80AAAA24(EnMd* this) {
|
|||
}
|
||||
|
||||
s16 func_80AAAC78(EnMd* this, GlobalContext* globalCtx) {
|
||||
s16 dialogState = func_8010BDBC(&globalCtx->msgCtx);
|
||||
s16 dialogState = Message_GetState(&globalCtx->msgCtx);
|
||||
|
||||
if ((this->unk_209 == 10) || (this->unk_209 == 5) || (this->unk_209 == 2) || (this->unk_209 == 1)) {
|
||||
if ((this->unk_209 == TEXT_STATE_AWAITING_NEXT) || (this->unk_209 == TEXT_STATE_EVENT) ||
|
||||
(this->unk_209 == TEXT_STATE_CLOSING) || (this->unk_209 == TEXT_STATE_DONE_HAS_NEXT)) {
|
||||
if (this->unk_209 != dialogState) {
|
||||
this->unk_208++;
|
||||
}
|
||||
|
@ -353,7 +354,7 @@ u16 EnMd_GetTextKokiriForest(GlobalContext* globalCtx, EnMd* this) {
|
|||
}
|
||||
|
||||
this->unk_208 = 0;
|
||||
this->unk_209 = 0;
|
||||
this->unk_209 = TEXT_STATE_NONE;
|
||||
|
||||
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) {
|
||||
return 0x1045;
|
||||
|
@ -376,7 +377,7 @@ u16 EnMd_GetTextKokiriForest(GlobalContext* globalCtx, EnMd* this) {
|
|||
|
||||
u16 EnMd_GetTextKokiriHome(GlobalContext* globalCtx, EnMd* this) {
|
||||
this->unk_208 = 0;
|
||||
this->unk_209 = 0;
|
||||
this->unk_209 = TEXT_STATE_NONE;
|
||||
|
||||
if (gSaveContext.eventChkInf[4] & 1) {
|
||||
return 0x1028;
|
||||
|
@ -387,7 +388,7 @@ u16 EnMd_GetTextKokiriHome(GlobalContext* globalCtx, EnMd* this) {
|
|||
|
||||
u16 EnMd_GetTextLostWoods(GlobalContext* globalCtx, EnMd* this) {
|
||||
this->unk_208 = 0;
|
||||
this->unk_209 = 0;
|
||||
this->unk_209 = TEXT_STATE_NONE;
|
||||
|
||||
if (gSaveContext.eventChkInf[4] & 0x100) {
|
||||
if (gSaveContext.infTable[1] & 0x200) {
|
||||
|
@ -425,16 +426,16 @@ u16 EnMd_GetText(GlobalContext* globalCtx, Actor* thisx) {
|
|||
s16 func_80AAAF04(GlobalContext* globalCtx, Actor* thisx) {
|
||||
EnMd* this = THIS;
|
||||
switch (func_80AAAC78(this, globalCtx)) {
|
||||
case 0:
|
||||
case 1:
|
||||
case 3:
|
||||
case 4:
|
||||
case 6:
|
||||
case 7:
|
||||
case 8:
|
||||
case 9:
|
||||
case TEXT_STATE_NONE:
|
||||
case TEXT_STATE_DONE_HAS_NEXT:
|
||||
case TEXT_STATE_DONE_FADING:
|
||||
case TEXT_STATE_CHOICE:
|
||||
case TEXT_STATE_DONE:
|
||||
case TEXT_STATE_SONG_DEMO_DONE:
|
||||
case TEXT_STATE_8:
|
||||
case TEXT_STATE_9:
|
||||
return 1;
|
||||
case 2:
|
||||
case TEXT_STATE_CLOSING:
|
||||
switch (this->actor.textId) {
|
||||
case 0x1028:
|
||||
gSaveContext.eventChkInf[0] |= 0x8000;
|
||||
|
@ -454,8 +455,8 @@ s16 func_80AAAF04(GlobalContext* globalCtx, Actor* thisx) {
|
|||
return 2;
|
||||
}
|
||||
return 0;
|
||||
case 5:
|
||||
if (func_80106BC8(globalCtx) != 0) {
|
||||
case TEXT_STATE_EVENT:
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
return 2;
|
||||
}
|
||||
default:
|
||||
|
@ -695,7 +696,7 @@ void func_80AAB948(EnMd* this, GlobalContext* globalCtx) {
|
|||
if (this->unk_1E0.unk_00 == 2) {
|
||||
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && !(gSaveContext.eventChkInf[1] & 0x1000) &&
|
||||
(globalCtx->sceneNum == SCENE_SPOT04)) {
|
||||
globalCtx->msgCtx.msgMode = 0x37;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_PAUSED;
|
||||
}
|
||||
|
||||
if (globalCtx->sceneNum == SCENE_SPOT04) {
|
||||
|
@ -722,7 +723,7 @@ void func_80AAB948(EnMd* this, GlobalContext* globalCtx) {
|
|||
if (player->stateFlags2 & 0x1000000) {
|
||||
player->stateFlags2 |= 0x2000000;
|
||||
player->unk_6A8 = &this->actor;
|
||||
func_8010BD58(globalCtx, 0x22);
|
||||
func_8010BD58(globalCtx, OCARINA_ACTION_CHECK_SARIA);
|
||||
this->actionFunc = func_80AABC10;
|
||||
return;
|
||||
}
|
||||
|
@ -736,16 +737,16 @@ void func_80AAB948(EnMd* this, GlobalContext* globalCtx) {
|
|||
void func_80AABC10(EnMd* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (globalCtx->msgCtx.unk_E3EE >= 4) {
|
||||
if (globalCtx->msgCtx.ocarinaMode >= OCARINA_MODE_04) {
|
||||
this->actionFunc = func_80AAB948;
|
||||
globalCtx->msgCtx.unk_E3EE = 4;
|
||||
} else if (globalCtx->msgCtx.unk_E3EE == 3) {
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
} else if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_03) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
this->actor.textId = 0x1067;
|
||||
func_8002F2CC(&this->actor, globalCtx, this->collider.dim.radius + 30.0f);
|
||||
|
||||
this->actionFunc = func_80AAB948;
|
||||
globalCtx->msgCtx.unk_E3EE = 4;
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
} else {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
}
|
||||
|
@ -762,7 +763,7 @@ void func_80AABD0C(EnMd* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && !(gSaveContext.eventChkInf[1] & 0x1000) &&
|
||||
(globalCtx->sceneNum == SCENE_SPOT04)) {
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
gSaveContext.eventChkInf[1] |= 0x1000;
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
|
|
|
@ -82,7 +82,7 @@ void EnMk_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80AACA40(EnMk* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
this->actor.flags &= 0xFFFEFFFF;
|
||||
this->actionFunc = EnMk_Wait;
|
||||
}
|
||||
|
@ -102,14 +102,14 @@ void func_80AACA94(EnMk* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80AACB14(EnMk* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
this->actionFunc = func_80AACA94;
|
||||
func_8002F434(&this->actor, globalCtx, GI_EYEDROPS, 10000.0f, 50.0f);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80AACB6C(EnMk* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->actionFunc = func_80AACB14;
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,7 @@ void func_80AACBAC(EnMk* this, GlobalContext* globalCtx) {
|
|||
this->actor.shape.rot.y -= 0x800;
|
||||
} else {
|
||||
this->actionFunc = func_80AACB6C;
|
||||
func_8010B720(globalCtx, 0x4030);
|
||||
Message_ContinueTextbox(globalCtx, 0x4030);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -154,10 +154,10 @@ void func_80AACCA0(EnMk* this, GlobalContext* globalCtx) {
|
|||
void func_80AACD48(EnMk* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(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 = func_80AACCA0;
|
||||
globalCtx->msgCtx.msgMode = 0x37;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_PAUSED;
|
||||
player->exchangeItemId = EXCH_ITEM_NONE;
|
||||
this->timer = 16;
|
||||
Animation_Change(&this->skelAnime, &object_mk_Anim_000D88, 1.0f, 0.0f,
|
||||
|
@ -169,8 +169,8 @@ void func_80AACD48(EnMk* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80AACE2C(EnMk* this, GlobalContext* globalCtx) {
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && (func_80106BC8(globalCtx) != 0)) {
|
||||
func_8010B720(globalCtx, 0x4001);
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_ContinueTextbox(globalCtx, 0x4001);
|
||||
Animation_Change(&this->skelAnime, &object_mk_Anim_000AC0, 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(&object_mk_Anim_000AC0), ANIMMODE_ONCE, -4.0f);
|
||||
this->flags &= ~2;
|
||||
|
@ -181,8 +181,8 @@ void func_80AACE2C(EnMk* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80AACEE8(EnMk* this, GlobalContext* globalCtx) {
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && (func_80106BC8(globalCtx) != 0)) {
|
||||
func_8010B720(globalCtx, 0x4000);
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_ContinueTextbox(globalCtx, 0x4000);
|
||||
Animation_Change(&this->skelAnime, &object_mk_Anim_000AC0, 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(&object_mk_Anim_000AC0), ANIMMODE_LOOP, -4.0f);
|
||||
this->flags &= ~2;
|
||||
|
@ -203,7 +203,7 @@ void func_80AACFA0(EnMk* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80AAD014(EnMk* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F334(&this->actor, globalCtx) != 0) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
this->actionFunc = func_80AACFA0;
|
||||
func_8002F434(&this->actor, globalCtx, GI_HEART_PIECE, 10000.0f, 50.0f);
|
||||
}
|
||||
|
@ -217,7 +217,7 @@ void EnMk_Wait(EnMk* this, GlobalContext* globalCtx) {
|
|||
Player* player = GET_PLAYER(globalCtx);
|
||||
s32 playerExchangeItem;
|
||||
|
||||
if (func_8002F194(&this->actor, globalCtx) != 0) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
playerExchangeItem = func_8002F368(globalCtx);
|
||||
|
||||
if (this->actor.textId != 0x4018) {
|
||||
|
|
|
@ -225,14 +225,14 @@ s32 func_80AADAA0(EnMm* this, GlobalContext* globalCtx) {
|
|||
Player* player = GET_PLAYER(globalCtx);
|
||||
s32 sp1C = 1;
|
||||
|
||||
switch (func_8010BDBC(&globalCtx->msgCtx)) {
|
||||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
switch (Message_GetState(&globalCtx->msgCtx)) {
|
||||
case TEXT_STATE_NONE:
|
||||
case TEXT_STATE_DONE_HAS_NEXT:
|
||||
case TEXT_STATE_CLOSING:
|
||||
case TEXT_STATE_DONE_FADING:
|
||||
break;
|
||||
case 4:
|
||||
if (func_80106BC8(globalCtx)) {
|
||||
case TEXT_STATE_CHOICE:
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
if (globalCtx->msgCtx.choiceIndex == 0) {
|
||||
player->actor.textId = 0x202D;
|
||||
this->unk_254 &= ~1;
|
||||
|
@ -244,8 +244,8 @@ s32 func_80AADAA0(EnMm* this, GlobalContext* globalCtx) {
|
|||
sp1C = 2;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (func_80106BC8(globalCtx)) {
|
||||
case TEXT_STATE_EVENT:
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
Player_UnsetMask(globalCtx);
|
||||
Item_Give(globalCtx, ITEM_SOLD_OUT);
|
||||
gSaveContext.itemGetInf[3] |= 0x800;
|
||||
|
@ -254,8 +254,8 @@ s32 func_80AADAA0(EnMm* this, GlobalContext* globalCtx) {
|
|||
sp1C = 2;
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if (func_80106BC8(globalCtx)) {
|
||||
case TEXT_STATE_DONE:
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
if ((player->actor.textId == 0x202E) || (player->actor.textId == 0x202C)) {
|
||||
this->unk_254 |= 1;
|
||||
EnMm_ChangeAnimation(this, RM_ANIM_SIT_WAIT, &this->curAnimIndex);
|
||||
|
@ -294,12 +294,12 @@ void func_80AADCD0(EnMm* this, GlobalContext* globalCtx) {
|
|||
s16 sp24;
|
||||
|
||||
if (this->unk_1E0 == 2) {
|
||||
func_8010B720(globalCtx, player->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, player->actor.textId);
|
||||
this->unk_1E0 = 1;
|
||||
} else if (this->unk_1E0 == 1) {
|
||||
this->unk_1E0 = func_80AADAA0(this, globalCtx);
|
||||
} else {
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->unk_1E0 = 1;
|
||||
|
||||
if (this->curAnimIndex != 5) {
|
||||
|
@ -309,7 +309,7 @@ void func_80AADCD0(EnMm* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
func_8002F374(globalCtx, &this->actor, &sp26, &sp24);
|
||||
Actor_GetScreenPos(globalCtx, &this->actor, &sp26, &sp24);
|
||||
yawDiff = ABS((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y));
|
||||
|
||||
if ((sp26 >= 0) && (sp26 <= 0x140) && (sp24 >= 0) && (sp24 <= 0xF0) && (yawDiff <= 17152.0f) &&
|
||||
|
|
|
@ -176,7 +176,7 @@ void EnMm2_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
s32 func_80AAF224(EnMm2* this, GlobalContext* globalCtx, EnMm2ActionFunc actionFunc) {
|
||||
s16 yawDiff;
|
||||
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->actionFunc = actionFunc;
|
||||
return 1;
|
||||
}
|
||||
|
@ -202,7 +202,7 @@ void func_80AAF330(EnMm2* this, GlobalContext* globalCtx) {
|
|||
EnMm2_ChangeAnimation(this, 0, &this->previousAnimation);
|
||||
this->mouthTexIndex = RM2_MOUTH_OPEN;
|
||||
if (!(this->unk_1F4 & 2)) {
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
}
|
||||
gSaveContext.timer2State = 0;
|
||||
gSaveContext.eventInf[1] &= ~1;
|
||||
|
@ -215,15 +215,15 @@ void func_80AAF3C0(EnMm2* this, GlobalContext* globalCtx) {
|
|||
switch (this->actor.textId) {
|
||||
case 0x607D:
|
||||
case 0x607E:
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 4) && (func_80106BC8(globalCtx))) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE) && Message_ShouldAdvance(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0:
|
||||
func_8010B720(globalCtx, 0x607F);
|
||||
Message_ContinueTextbox(globalCtx, 0x607F);
|
||||
this->actor.textId = 0x607F;
|
||||
gSaveContext.eventInf[1] |= 1;
|
||||
break;
|
||||
case 1:
|
||||
func_8010B720(globalCtx, 0x6080);
|
||||
Message_ContinueTextbox(globalCtx, 0x6080);
|
||||
this->actor.textId = 0x6080;
|
||||
break;
|
||||
};
|
||||
|
@ -235,16 +235,16 @@ void func_80AAF3C0(EnMm2* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
return;
|
||||
case 0x6081:
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && (func_80106BC8(globalCtx))) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
this->unk_1F4 |= 4;
|
||||
HIGH_SCORE(HS_MARATHON) -= 1;
|
||||
func_8010B720(globalCtx, 0x607E);
|
||||
Message_ContinueTextbox(globalCtx, 0x607E);
|
||||
this->actor.textId = 0x607E;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
if (this->actor.textId == 0x607F) {
|
||||
func_80088AA0(0);
|
||||
this->actionFunc = func_80AAF57C;
|
||||
|
@ -266,7 +266,7 @@ void func_80AAF57C(EnMm2* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80AAF5EC(EnMm2* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && (func_80106BC8(globalCtx))) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
this->unk_1F4 &= ~1;
|
||||
EnMm2_ChangeAnimation(this, 3, &this->previousAnimation);
|
||||
this->actionFunc = func_80AAF330;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -109,18 +109,18 @@ u16 EnMu_GetFaceReaction(GlobalContext* globalCtx, Actor* thisx) {
|
|||
s16 EnMu_CheckDialogState(GlobalContext* globalCtx, Actor* thisx) {
|
||||
EnMu* this = THIS;
|
||||
|
||||
switch (func_8010BDBC(&globalCtx->msgCtx)) {
|
||||
case 0:
|
||||
case 1:
|
||||
case 3:
|
||||
case 4:
|
||||
case 5:
|
||||
case 6:
|
||||
case 7:
|
||||
case 8:
|
||||
case 9:
|
||||
switch (Message_GetState(&globalCtx->msgCtx)) {
|
||||
case TEXT_STATE_NONE:
|
||||
case TEXT_STATE_DONE_HAS_NEXT:
|
||||
case TEXT_STATE_DONE_FADING:
|
||||
case TEXT_STATE_CHOICE:
|
||||
case TEXT_STATE_EVENT:
|
||||
case TEXT_STATE_DONE:
|
||||
case TEXT_STATE_SONG_DEMO_DONE:
|
||||
case TEXT_STATE_8:
|
||||
case TEXT_STATE_9:
|
||||
return 1;
|
||||
case 2:
|
||||
case TEXT_STATE_CLOSING:
|
||||
EnMu_Interact(this, globalCtx);
|
||||
return 0;
|
||||
default:
|
||||
|
|
|
@ -1195,7 +1195,7 @@ void EnNb_SetupIdleCrawlspace(EnNb* this, s32 animFinished) {
|
|||
}
|
||||
|
||||
void func_80AB3838(EnNb* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->action = NB_IN_DIALOG;
|
||||
} else {
|
||||
this->actor.flags |= 9;
|
||||
|
@ -1225,7 +1225,7 @@ void EnNb_SetTextIdAsChild(EnNb* this, GlobalContext* globalCtx) {
|
|||
|
||||
textId = this->actor.textId;
|
||||
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 2) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
if (textId == 0x6025) {
|
||||
EnNb_SetupPathMovement(this, globalCtx);
|
||||
} else {
|
||||
|
@ -1235,7 +1235,7 @@ void EnNb_SetTextIdAsChild(EnNb* this, GlobalContext* globalCtx) {
|
|||
this->action = NB_IDLE_CRAWLSPACE;
|
||||
}
|
||||
this->actor.flags &= ~9;
|
||||
} else if ((func_8010BDBC(&globalCtx->msgCtx) == 4) && (func_80106BC8(globalCtx) != 0)) {
|
||||
} else if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE) && Message_ShouldAdvance(globalCtx)) {
|
||||
choiceIndex = globalCtx->msgCtx.choiceIndex;
|
||||
|
||||
if (textId == 0x601D) {
|
||||
|
@ -1269,7 +1269,7 @@ void EnNb_SetTextIdAsChild(EnNb* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1287,7 +1287,7 @@ void func_80AB3A7C(EnNb* this, GlobalContext* globalCtx, s32 animFinished) {
|
|||
}
|
||||
|
||||
void func_80AB3B04(EnNb* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->action = NB_ACTION_30;
|
||||
} else {
|
||||
this->actor.flags |= 9;
|
||||
|
@ -1302,7 +1302,7 @@ void func_80AB3B04(EnNb* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80AB3B7C(EnNb* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 2) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
this->action = NB_IDLE_AFTER_TALK;
|
||||
this->actor.flags &= ~9;
|
||||
}
|
||||
|
|
|
@ -114,7 +114,7 @@ void func_80AB9210(EnNiwGirl* this, GlobalContext* globalCtx) {
|
|||
// Find the X and Z distance between the girl and the cuckoo she is chasing
|
||||
xDistBetween = this->chasedEnNiw->actor.world.pos.x - this->actor.world.pos.x;
|
||||
zDistBetween = this->chasedEnNiw->actor.world.pos.z - this->actor.world.pos.z;
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) != 0) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) != TEXT_STATE_NONE) {
|
||||
this->chasedEnNiw->path = 0;
|
||||
}
|
||||
if (sqrtf(SQ(xDistBetween) + SQ(zDistBetween)) < 70.0f) {
|
||||
|
@ -169,16 +169,16 @@ void EnNiwGirl_Talk(EnNiwGirl* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80AB94D0(EnNiwGirl* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (func_8010BDBC(&globalCtx->msgCtx)) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) != TEXT_STATE_NONE) {
|
||||
this->chasedEnNiw->path = 0;
|
||||
}
|
||||
Math_ApproachZeroF(&this->actor.speedXZ, 0.8f, 0.2f);
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
if (this->actor.textId == 0x70EA) {
|
||||
this->unk_27A = 1;
|
||||
}
|
||||
} else {
|
||||
if ((this->jumpTimer == 0) && !func_8010BDBC(&globalCtx->msgCtx)) {
|
||||
if ((this->jumpTimer == 0) && Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_NONE) {
|
||||
this->jumpTimer = Rand_ZeroFloat(100.0f) + 250.0f;
|
||||
this->actionFunc = EnNiwGirl_Jump;
|
||||
} else {
|
||||
|
|
|
@ -193,7 +193,7 @@ void func_80AB9F24(EnNiwLady* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80ABA21C(EnNiwLady* this, GlobalContext* globalCtx) {
|
||||
this->actor.textId = sMissingCuccoTextIds[0];
|
||||
this->unk_262 = 6;
|
||||
this->unk_262 = TEXT_STATE_DONE;
|
||||
this->actionFunc = func_80ABA244;
|
||||
}
|
||||
|
||||
|
@ -226,7 +226,8 @@ void func_80ABA244(EnNiwLady* this, GlobalContext* globalCtx) {
|
|||
this->cuccosInPen = BREG(7) - 1;
|
||||
}
|
||||
phi_s1 = this->cuccosInPen;
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 0) || (func_8010BDBC(&globalCtx->msgCtx) == 6)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_NONE) ||
|
||||
(Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE)) {
|
||||
this->unk_26E = 101;
|
||||
}
|
||||
if (this->cuccosInPen >= 7) {
|
||||
|
@ -241,13 +242,13 @@ void func_80ABA244(EnNiwLady* this, GlobalContext* globalCtx) {
|
|||
this->actor.textId = sMissingCuccoTextIds[phi_s1];
|
||||
if (Text_GetFaceReaction(globalCtx, 8) != 0) {
|
||||
this->actor.textId = Text_GetFaceReaction(globalCtx, 8);
|
||||
this->unk_262 = 6;
|
||||
this->unk_262 = TEXT_STATE_DONE;
|
||||
}
|
||||
if ((this->unk_26C != 0) && (phi_s1 != 9)) {
|
||||
phi_s1 = 10;
|
||||
this->unk_26E = 11;
|
||||
}
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
osSyncPrintf("\n\n");
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ ねぇちゃん選択\t ☆☆☆☆ %d\n" VT_RST, phi_s1);
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ ねぇちゃんハート ☆☆☆☆ %d\n" VT_RST, this->unk_26C);
|
||||
|
@ -260,7 +261,7 @@ void func_80ABA244(EnNiwLady* this, GlobalContext* globalCtx) {
|
|||
if (this->actor.textId == 0x503C) {
|
||||
func_80078884(NA_SE_SY_ERROR);
|
||||
this->unk_26C = 2;
|
||||
this->unk_262 = 5;
|
||||
this->unk_262 = TEXT_STATE_EVENT;
|
||||
this->actionFunc = func_80ABA654;
|
||||
return;
|
||||
}
|
||||
|
@ -268,7 +269,7 @@ void func_80ABA244(EnNiwLady* this, GlobalContext* globalCtx) {
|
|||
if (phi_s1 == 7) {
|
||||
func_80078884(NA_SE_SY_TRE_BOX_APPEAR);
|
||||
this->unk_26C = 1;
|
||||
this->unk_262 = 5;
|
||||
this->unk_262 = TEXT_STATE_EVENT;
|
||||
this->unk_26A = this->cuccosInPen;
|
||||
osSyncPrintf(VT_FGCOL(CYAN) "☆☆☆☆☆ 柵内BIT変更前 ☆☆ %x\n" VT_RST, gSaveContext.infTable[25]);
|
||||
gSaveContext.infTable[25] &= 0x1FF;
|
||||
|
@ -295,8 +296,8 @@ void func_80ABA244(EnNiwLady* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80ABA654(EnNiwLady* this, GlobalContext* globalCtx) {
|
||||
if (this->unk_262 == func_8010BDBC(&globalCtx->msgCtx) && func_80106BC8(globalCtx) != 0) {
|
||||
func_80106CCC(globalCtx);
|
||||
if (this->unk_262 == Message_GetState(&globalCtx->msgCtx) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ ハート ☆☆☆☆☆ %d\n" VT_RST, this->unk_26C);
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ 爆弾 ☆☆☆☆☆ %d\n" VT_RST, this->unk_272);
|
||||
osSyncPrintf("\n\n");
|
||||
|
@ -323,7 +324,7 @@ static s16 sTradeItemTextIds[] = { 0x503E, 0x503F, 0x5047, 0x5040, 0x5042, 0x504
|
|||
void func_80ABA778(EnNiwLady* this, GlobalContext* globalCtx) {
|
||||
// "☆☆☆☆☆ Adult message check ☆☆☆☆☆"
|
||||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ アダルトメッセージチェック ☆☆☆☆☆ \n" VT_RST);
|
||||
this->unk_262 = 6;
|
||||
this->unk_262 = TEXT_STATE_DONE;
|
||||
this->unk_273 = 0;
|
||||
if (!(gSaveContext.itemGetInf[2] & 0x1000)) {
|
||||
if (this->unk_274 != 0) {
|
||||
|
@ -332,7 +333,7 @@ void func_80ABA778(EnNiwLady* this, GlobalContext* globalCtx) {
|
|||
this->unk_27A = 0;
|
||||
}
|
||||
this->unk_273 = 1;
|
||||
this->unk_262 = 4;
|
||||
this->unk_262 = TEXT_STATE_CHOICE;
|
||||
} else {
|
||||
this->unk_27A = 2;
|
||||
if (!(gSaveContext.itemGetInf[2] & 0x4000)) {
|
||||
|
@ -355,16 +356,17 @@ void func_80ABA878(EnNiwLady* this, GlobalContext* globalCtx) {
|
|||
Player* player = GET_PLAYER(globalCtx);
|
||||
s8 playerExchangeItemId;
|
||||
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 0) || (func_8010BDBC(&globalCtx->msgCtx) == 6)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_NONE) ||
|
||||
(Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE)) {
|
||||
this->unk_26E = 11;
|
||||
}
|
||||
if (func_8002F194(&this->actor, globalCtx) != 0) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
playerExchangeItemId = func_8002F368(globalCtx);
|
||||
if ((playerExchangeItemId == 6) && (gSaveContext.eventChkInf[6] & 0x400)) {
|
||||
func_80078884(NA_SE_SY_TRE_BOX_APPEAR);
|
||||
player->actor.textId = sTradeItemTextIds[5];
|
||||
this->unk_26E = this->unk_27A + 21;
|
||||
this->unk_262 = 4;
|
||||
this->unk_262 = TEXT_STATE_CHOICE;
|
||||
this->actionFunc = func_80ABAB08;
|
||||
} else if (playerExchangeItemId != 0) {
|
||||
player->actor.textId = sTradeItemTextIds[7];
|
||||
|
@ -380,10 +382,10 @@ void func_80ABA878(EnNiwLady* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80ABA9B8(EnNiwLady* this, GlobalContext* globalCtx) {
|
||||
if ((this->unk_262 == func_8010BDBC(&globalCtx->msgCtx)) && (func_80106BC8(globalCtx) != 0)) {
|
||||
if ((this->unk_262 == Message_GetState(&globalCtx->msgCtx)) && Message_ShouldAdvance(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0:
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
this->actor.parent = NULL;
|
||||
func_8002F434(&this->actor, globalCtx, GI_POCKET_EGG, 200.0f, 100.0f);
|
||||
this->actionFunc = func_80ABAC00;
|
||||
|
@ -391,8 +393,8 @@ void func_80ABA9B8(EnNiwLady* this, GlobalContext* globalCtx) {
|
|||
case 1:
|
||||
this->actor.textId = sTradeItemTextIds[3];
|
||||
this->unk_26E = this->unk_27A + 21;
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
this->unk_262 = 5;
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
this->unk_262 = TEXT_STATE_EVENT;
|
||||
this->actionFunc = func_80ABAA9C;
|
||||
break;
|
||||
}
|
||||
|
@ -401,28 +403,28 @@ void func_80ABA9B8(EnNiwLady* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80ABAA9C(EnNiwLady* this, GlobalContext* globalCtx) {
|
||||
this->unk_26E = 11;
|
||||
if ((this->unk_262 == func_8010BDBC(&globalCtx->msgCtx)) && (func_80106BC8(globalCtx) != 0)) {
|
||||
func_80106CCC(globalCtx);
|
||||
if ((this->unk_262 == Message_GetState(&globalCtx->msgCtx)) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
this->actionFunc = func_80ABA778;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80ABAB08(EnNiwLady* this, GlobalContext* globalCtx) {
|
||||
if ((this->unk_262 == func_8010BDBC(&globalCtx->msgCtx)) && (func_80106BC8(globalCtx) != 0)) {
|
||||
if ((this->unk_262 == Message_GetState(&globalCtx->msgCtx)) && Message_ShouldAdvance(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0:
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
this->actor.parent = NULL;
|
||||
func_8002F434(&this->actor, globalCtx, GI_COJIRO, 200.0f, 100.0f);
|
||||
this->actionFunc = func_80ABAC00;
|
||||
break;
|
||||
case 1:
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
this->unk_277 = 1;
|
||||
this->actor.textId = sTradeItemTextIds[8];
|
||||
this->unk_26E = this->unk_27A + 21;
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
this->unk_262 = 5;
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
this->unk_262 = TEXT_STATE_EVENT;
|
||||
this->actionFunc = func_80ABAA9C;
|
||||
break;
|
||||
}
|
||||
|
@ -444,7 +446,7 @@ void func_80ABAC00(EnNiwLady* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80ABAC84(EnNiwLady* this, GlobalContext* globalCtx) {
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) != 6) || (func_80106BC8(globalCtx) == 0)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) != TEXT_STATE_DONE) || !Message_ShouldAdvance(globalCtx)) {
|
||||
return;
|
||||
}
|
||||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 正常終了 ☆☆☆☆☆ \n" VT_RST);
|
||||
|
@ -457,14 +459,14 @@ void func_80ABAC84(EnNiwLady* this, GlobalContext* globalCtx) {
|
|||
this->actionFunc = func_80ABA778;
|
||||
} else {
|
||||
gSaveContext.itemGetInf[0] |= 0x1000;
|
||||
this->unk_262 = 6;
|
||||
this->unk_262 = TEXT_STATE_DONE;
|
||||
this->actionFunc = func_80ABA244;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80ABAD38(EnNiwLady* this, GlobalContext* globalCtx) {
|
||||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 通常メッセージチェック ☆☆☆☆☆ \n" VT_RST);
|
||||
this->unk_262 = 6;
|
||||
this->unk_262 = TEXT_STATE_DONE;
|
||||
this->actionFunc = func_80ABAD7C;
|
||||
}
|
||||
|
||||
|
@ -473,10 +475,11 @@ void func_80ABAD7C(EnNiwLady* this, GlobalContext* globalCtx) {
|
|||
if (Text_GetFaceReaction(globalCtx, 8) != 0) {
|
||||
this->actor.textId = Text_GetFaceReaction(globalCtx, 8);
|
||||
}
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 0) || (func_8010BDBC(&globalCtx->msgCtx) == 6)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_NONE) ||
|
||||
(Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE)) {
|
||||
this->unk_26E = 8;
|
||||
}
|
||||
if (func_8002F194(&this->actor, globalCtx) != 0) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->unk_274 = 1;
|
||||
this->unk_26E = this->unk_27A + 9;
|
||||
this->actionFunc = func_80ABAD38;
|
||||
|
|
|
@ -73,7 +73,7 @@ void EnOkarinaEffect_TriggerStorm(EnOkarinaEffect* this, GlobalContext* globalCt
|
|||
void EnOkarinaEffect_ManageStorm(EnOkarinaEffect* this, GlobalContext* globalCtx) {
|
||||
Flags_UnsetEnv(globalCtx, 5); // clear storms env flag
|
||||
if (((globalCtx->pauseCtx.state == 0) && (globalCtx->gameOverCtx.state == GAMEOVER_INACTIVE) &&
|
||||
(globalCtx->msgCtx.unk_E300 == 0) && (!FrameAdvance_IsEnabled(globalCtx)) &&
|
||||
(globalCtx->msgCtx.msgLength == 0) && (!FrameAdvance_IsEnabled(globalCtx)) &&
|
||||
((globalCtx->transitionMode == 0) || (gSaveContext.gameMode != 0))) ||
|
||||
(this->timer >= 250)) {
|
||||
if (globalCtx->envCtx.indoors || globalCtx->envCtx.unk_1F != 1) {
|
||||
|
|
|
@ -49,31 +49,31 @@ void EnOkarinaTag_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
// "Ocarina tag outbreak"
|
||||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ オカリナタグ発生 ☆☆☆☆☆ %x\n" VT_RST, this->actor.params);
|
||||
this->actor.flags &= ~1;
|
||||
this->unk_150 = (this->actor.params >> 0xA) & 0x3F;
|
||||
this->unk_152 = (this->actor.params >> 6) & 0xF;
|
||||
this->type = (this->actor.params >> 0xA) & 0x3F;
|
||||
this->ocarinaSong = (this->actor.params >> 6) & 0xF;
|
||||
this->switchFlag = this->actor.params & 0x3F;
|
||||
if (this->switchFlag == 0x3F) {
|
||||
this->switchFlag = -1;
|
||||
}
|
||||
if (this->unk_152 == 0xF) {
|
||||
this->unk_152 = 0;
|
||||
if (this->ocarinaSong == 0xF) {
|
||||
this->ocarinaSong = 0;
|
||||
this->unk_158 = 1;
|
||||
}
|
||||
this->actor.targetMode = 1;
|
||||
if (this->actor.world.rot.z > 0) {
|
||||
this->unk_15C = this->actor.world.rot.z * 40.0f;
|
||||
this->interactRange = this->actor.world.rot.z * 40.0f;
|
||||
}
|
||||
|
||||
// "Save information"
|
||||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ セーブ情報\t ☆☆☆☆☆ %d\n" VT_RST, this->switchFlag);
|
||||
// "Type index"
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ 種類インデックス ☆☆☆☆☆ %d\n" VT_RST, this->unk_150);
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ 種類インデックス ☆☆☆☆☆ %d\n" VT_RST, this->type);
|
||||
// "Correct answer information"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ 正解情報\t ☆☆☆☆☆ %d\n" VT_RST, this->unk_152);
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ 正解情報\t ☆☆☆☆☆ %d\n" VT_RST, this->ocarinaSong);
|
||||
// "Range information"
|
||||
osSyncPrintf(VT_FGCOL(CYAN) "☆☆☆☆☆ 範囲情報\t ☆☆☆☆☆ %d\n" VT_RST, this->actor.world.rot.z);
|
||||
// "Processing range information"
|
||||
osSyncPrintf(VT_FGCOL(CYAN) "☆☆☆☆☆ 処理範囲情報\t ☆☆☆☆☆ %f\n" VT_RST, this->unk_15C);
|
||||
osSyncPrintf(VT_FGCOL(CYAN) "☆☆☆☆☆ 処理範囲情報\t ☆☆☆☆☆ %f\n" VT_RST, this->interactRange);
|
||||
// "Hit?"
|
||||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 当り?\t\t ☆☆☆☆☆ %d\n" VT_RST, this->unk_158);
|
||||
osSyncPrintf("\n\n");
|
||||
|
@ -81,7 +81,7 @@ void EnOkarinaTag_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if ((this->switchFlag >= 0) && (Flags_GetSwitch(globalCtx, this->switchFlag))) {
|
||||
Actor_Kill(&this->actor);
|
||||
} else {
|
||||
switch (this->unk_150) {
|
||||
switch (this->type) {
|
||||
case 7:
|
||||
this->actionFunc = func_80ABEF2C;
|
||||
break;
|
||||
|
@ -108,29 +108,29 @@ void EnOkarinaTag_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80ABEF2C(EnOkarinaTag* this, GlobalContext* globalCtx) {
|
||||
Player* player;
|
||||
u16 unk_152;
|
||||
u16 ocarinaSong;
|
||||
|
||||
player = GET_PLAYER(globalCtx);
|
||||
this->unk_15A++;
|
||||
if ((this->switchFlag >= 0) && (Flags_GetSwitch(globalCtx, this->switchFlag))) {
|
||||
this->actor.flags &= ~1;
|
||||
} else {
|
||||
if ((this->unk_152 != 6) || (gSaveContext.scarecrowSpawnSongSet)) {
|
||||
if ((this->ocarinaSong != 6) || (gSaveContext.scarecrowSpawnSongSet)) {
|
||||
if (player->stateFlags2 & 0x1000000) {
|
||||
// "North! ! ! ! !"
|
||||
osSyncPrintf(VT_FGCOL(RED) "☆☆☆☆☆ 北!!!!! ☆☆☆☆☆ %f\n" VT_RST, this->actor.xzDistToPlayer);
|
||||
}
|
||||
if ((this->actor.xzDistToPlayer < (90.0f + this->unk_15C)) &&
|
||||
if ((this->actor.xzDistToPlayer < (90.0f + this->interactRange)) &&
|
||||
(fabsf(player->actor.world.pos.y - this->actor.world.pos.y) < 80.0f)) {
|
||||
if (player->stateFlags2 & 0x2000000) {
|
||||
unk_152 = this->unk_152;
|
||||
if (unk_152 == 6) {
|
||||
unk_152 = 0xA;
|
||||
ocarinaSong = this->ocarinaSong;
|
||||
if (ocarinaSong == 6) {
|
||||
ocarinaSong = 0xA;
|
||||
}
|
||||
player->stateFlags2 |= 0x800000;
|
||||
func_8010BD58(globalCtx, unk_152 + 0x22);
|
||||
func_8010BD58(globalCtx, ocarinaSong + OCARINA_ACTION_CHECK_SARIA);
|
||||
this->actionFunc = func_80ABF0CC;
|
||||
} else if ((this->actor.xzDistToPlayer < (50.0f + this->unk_15C) &&
|
||||
} else if ((this->actor.xzDistToPlayer < (50.0f + this->interactRange) &&
|
||||
((fabsf(player->actor.world.pos.y - this->actor.world.pos.y) < 40.0f)))) {
|
||||
this->unk_15A = 0;
|
||||
player->unk_6A8 = &this->actor;
|
||||
|
@ -143,41 +143,44 @@ void func_80ABEF2C(EnOkarinaTag* this, GlobalContext* globalCtx) {
|
|||
void func_80ABF0CC(EnOkarinaTag* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (globalCtx->msgCtx.unk_E3EE == 4) {
|
||||
if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_04) {
|
||||
this->actionFunc = func_80ABEF2C;
|
||||
} else {
|
||||
if (globalCtx->msgCtx.unk_E3EE == 3) {
|
||||
if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_03) {
|
||||
if (this->switchFlag >= 0) {
|
||||
Flags_SetSwitch(globalCtx, this->switchFlag);
|
||||
}
|
||||
if (globalCtx->sceneNum == SCENE_MIZUSIN) {
|
||||
globalCtx->msgCtx.msgMode = 0x37;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_PAUSED;
|
||||
}
|
||||
if ((globalCtx->sceneNum != SCENE_DAIYOUSEI_IZUMI) && (globalCtx->sceneNum != SCENE_YOUSEI_IZUMI_YOKO)) {
|
||||
globalCtx->msgCtx.unk_E3EE = 4;
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
}
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
this->actionFunc = func_80ABEF2C;
|
||||
return;
|
||||
}
|
||||
if (this->unk_158 != 0) {
|
||||
if ((globalCtx->msgCtx.unk_E3EE == 5) || (globalCtx->msgCtx.unk_E3EE == 6) ||
|
||||
(globalCtx->msgCtx.unk_E3EE == 7) || (globalCtx->msgCtx.unk_E3EE == 8) ||
|
||||
(globalCtx->msgCtx.unk_E3EE == 9) || (globalCtx->msgCtx.unk_E3EE == 10) ||
|
||||
(globalCtx->msgCtx.unk_E3EE == 13)) {
|
||||
if ((globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_05) ||
|
||||
(globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_06) ||
|
||||
(globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_07) ||
|
||||
(globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_08) ||
|
||||
(globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_09) ||
|
||||
(globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_0A) ||
|
||||
(globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_0D)) {
|
||||
if (this->switchFlag >= 0) {
|
||||
Flags_SetSwitch(globalCtx, this->switchFlag);
|
||||
}
|
||||
globalCtx->msgCtx.unk_E3EE = 4;
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
this->actionFunc = func_80ABEF2C;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if ((globalCtx->msgCtx.unk_E3EE >= 5) && (globalCtx->msgCtx.unk_E3EE < 0xE)) {
|
||||
globalCtx->msgCtx.unk_E3EE = 4;
|
||||
if ((globalCtx->msgCtx.ocarinaMode >= OCARINA_MODE_05) && (globalCtx->msgCtx.ocarinaMode < OCARINA_MODE_0E)) {
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
this->actionFunc = func_80ABEF2C;
|
||||
} else if (globalCtx->msgCtx.unk_E3EE == 1) {
|
||||
} else if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_01) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
}
|
||||
}
|
||||
|
@ -187,37 +190,37 @@ void func_80ABF28C(EnOkarinaTag* this, GlobalContext* globalCtx) {
|
|||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
this->unk_15A++;
|
||||
if ((this->unk_152 != 6) || (gSaveContext.scarecrowSpawnSongSet)) {
|
||||
if ((this->ocarinaSong != 6) || (gSaveContext.scarecrowSpawnSongSet)) {
|
||||
if ((this->switchFlag >= 0) && Flags_GetSwitch(globalCtx, this->switchFlag)) {
|
||||
this->actor.flags &= ~1;
|
||||
} else if (((this->unk_150 != 4) || !(gSaveContext.eventChkInf[4] & 0x800)) &&
|
||||
((this->unk_150 != 6) || !(gSaveContext.eventChkInf[1] & 0x2000)) &&
|
||||
(this->actor.xzDistToPlayer < (90.0f + this->unk_15C)) &&
|
||||
} else if (((this->type != 4) || !(gSaveContext.eventChkInf[4] & 0x800)) &&
|
||||
((this->type != 6) || !(gSaveContext.eventChkInf[1] & 0x2000)) &&
|
||||
(this->actor.xzDistToPlayer < (90.0f + this->interactRange)) &&
|
||||
(fabsf(player->actor.world.pos.y - this->actor.world.pos.y) < 80.0f)) {
|
||||
if (player->stateFlags2 & 0x1000000) {
|
||||
switch (this->unk_150) {
|
||||
switch (this->type) {
|
||||
case 1:
|
||||
func_8010BD58(globalCtx, 0x24);
|
||||
func_8010BD58(globalCtx, OCARINA_ACTION_CHECK_LULLABY);
|
||||
break;
|
||||
case 2:
|
||||
func_8010BD58(globalCtx, 0x27);
|
||||
func_8010BD58(globalCtx, OCARINA_ACTION_CHECK_STORMS);
|
||||
break;
|
||||
case 4:
|
||||
func_8010BD58(globalCtx, 0x26);
|
||||
func_8010BD58(globalCtx, OCARINA_ACTION_CHECK_TIME);
|
||||
break;
|
||||
case 6:
|
||||
func_8010BD58(globalCtx, 0x24);
|
||||
func_8010BD58(globalCtx, OCARINA_ACTION_CHECK_LULLABY);
|
||||
break;
|
||||
default:
|
||||
// "Ocarina Invisible-kun demo start check error source"
|
||||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ オカリナ透明君デモ開始チェックエラー原 ☆☆☆☆☆ %d\n" VT_RST,
|
||||
this->unk_150);
|
||||
this->type);
|
||||
Actor_Kill(&this->actor);
|
||||
break;
|
||||
}
|
||||
player->stateFlags2 |= 0x800000;
|
||||
this->actionFunc = func_80ABF4C8;
|
||||
} else if ((this->actor.xzDistToPlayer < (50.0f + this->unk_15C)) &&
|
||||
} else if ((this->actor.xzDistToPlayer < (50.0f + this->interactRange)) &&
|
||||
(fabsf(player->actor.world.pos.y - this->actor.world.pos.y) < 40.0f)) {
|
||||
this->unk_15A = 0;
|
||||
player->stateFlags2 |= 0x800000;
|
||||
|
@ -229,14 +232,14 @@ void func_80ABF28C(EnOkarinaTag* this, GlobalContext* globalCtx) {
|
|||
void func_80ABF4C8(EnOkarinaTag* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (globalCtx->msgCtx.unk_E3EE == 4) {
|
||||
if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_04) {
|
||||
this->actionFunc = func_80ABF28C;
|
||||
} else if (globalCtx->msgCtx.unk_E3EE == 3) {
|
||||
} else if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_03) {
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
if (this->switchFlag >= 0) {
|
||||
Flags_SetSwitch(globalCtx, this->switchFlag);
|
||||
}
|
||||
switch (this->unk_150) {
|
||||
switch (this->type) {
|
||||
case 1:
|
||||
Flags_SetSwitch(globalCtx, this->switchFlag);
|
||||
gSaveContext.eventChkInf[3] |= 0x200;
|
||||
|
@ -260,17 +263,17 @@ void func_80ABF4C8(EnOkarinaTag* this, GlobalContext* globalCtx) {
|
|||
default:
|
||||
break;
|
||||
}
|
||||
globalCtx->msgCtx.unk_E3EE = 4;
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
this->actionFunc = func_80ABF28C;
|
||||
} else {
|
||||
if (globalCtx->msgCtx.unk_E3EE >= 5) {
|
||||
if (globalCtx->msgCtx.unk_E3EE < 0xE) {
|
||||
globalCtx->msgCtx.unk_E3EE = 4;
|
||||
if (globalCtx->msgCtx.ocarinaMode >= OCARINA_MODE_05) {
|
||||
if (globalCtx->msgCtx.ocarinaMode < OCARINA_MODE_0E) {
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
this->actionFunc = func_80ABF28C;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (globalCtx->msgCtx.unk_E3EE == 1) {
|
||||
if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_01) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
}
|
||||
}
|
||||
|
@ -280,7 +283,7 @@ void func_80ABF708(EnOkarinaTag* this, GlobalContext* globalCtx) {
|
|||
s16 yawDiff;
|
||||
s16 yawDiffNew;
|
||||
|
||||
if (func_8002F194(&this->actor, globalCtx) != 0) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->actionFunc = func_80ABF7CC;
|
||||
} else {
|
||||
yawDiff = this->actor.yawTowardsPlayer - this->actor.world.rot.y;
|
||||
|
@ -300,10 +303,10 @@ void func_80ABF708(EnOkarinaTag* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80ABF7CC(EnOkarinaTag* this, GlobalContext* globalCtx) {
|
||||
// "Open sesame sesame!"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ 開けゴマゴマゴマ! ☆☆☆☆☆ %d\n" VT_RST, func_8010BDBC(&globalCtx->msgCtx));
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ 開けゴマゴマゴマ! ☆☆☆☆☆ %d\n" VT_RST, Message_GetState(&globalCtx->msgCtx));
|
||||
|
||||
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);
|
||||
if (!CHECK_QUEST_ITEM(QUEST_SONG_SUN)) {
|
||||
globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(&gSunSongGraveSunSongTeachCs);
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
|
|
|
@ -11,13 +11,13 @@ typedef void (*EnOkarinaTagActionFunc)(struct EnOkarinaTag*, GlobalContext*);
|
|||
typedef struct EnOkarinaTag {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ EnOkarinaTagActionFunc actionFunc;
|
||||
/* 0x0150 */ s16 unk_150;
|
||||
/* 0x0152 */ s16 unk_152;
|
||||
/* 0x0150 */ s16 type;
|
||||
/* 0x0152 */ s16 ocarinaSong;
|
||||
/* 0x0154 */ s16 switchFlag;
|
||||
/* 0x0156 */ char unk_156[0x2];
|
||||
/* 0x0158 */ s16 unk_158;
|
||||
/* 0x015A */ s16 unk_15A;
|
||||
/* 0x015C */ f32 unk_15C;
|
||||
/* 0x015C */ f32 interactRange;
|
||||
} EnOkarinaTag; // size = 0x0160
|
||||
|
||||
#endif
|
||||
|
|
|
@ -469,42 +469,42 @@ void EnOssan_UpdateShopOfferings(EnOssan* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnOssan_TalkDefaultShopkeeper(GlobalContext* globalCtx) {
|
||||
func_8010B720(globalCtx, 0x9E);
|
||||
Message_ContinueTextbox(globalCtx, 0x9E);
|
||||
}
|
||||
|
||||
void EnOssan_TalkKakarikoPotionShopkeeper(GlobalContext* globalCtx) {
|
||||
if (globalCtx->curSpawn == 0) {
|
||||
func_8010B720(globalCtx, 0x5046);
|
||||
Message_ContinueTextbox(globalCtx, 0x5046);
|
||||
} else {
|
||||
func_8010B720(globalCtx, 0x504E);
|
||||
Message_ContinueTextbox(globalCtx, 0x504E);
|
||||
}
|
||||
}
|
||||
|
||||
void EnOssan_TalkMarketPotionShopkeeper(GlobalContext* globalCtx) {
|
||||
func_8010B720(globalCtx, 0x504E);
|
||||
Message_ContinueTextbox(globalCtx, 0x504E);
|
||||
}
|
||||
|
||||
void EnOssan_TalkKokiriShopkeeper(GlobalContext* globalCtx) {
|
||||
func_8010B720(globalCtx, 0x10BA);
|
||||
Message_ContinueTextbox(globalCtx, 0x10BA);
|
||||
}
|
||||
|
||||
void EnOssan_TalkBazaarShopkeeper(GlobalContext* globalCtx) {
|
||||
if (globalCtx->curSpawn == 0) {
|
||||
func_8010B720(globalCtx, 0x9D);
|
||||
Message_ContinueTextbox(globalCtx, 0x9D);
|
||||
} else {
|
||||
func_8010B720(globalCtx, 0x9C);
|
||||
Message_ContinueTextbox(globalCtx, 0x9C);
|
||||
}
|
||||
}
|
||||
|
||||
void EnOssan_TalkBombchuShopkeeper(GlobalContext* globalCtx) {
|
||||
func_8010B720(globalCtx, 0x7076);
|
||||
Message_ContinueTextbox(globalCtx, 0x7076);
|
||||
}
|
||||
|
||||
void EnOssan_TalkZoraShopkeeper(GlobalContext* globalCtx) {
|
||||
if (LINK_AGE_IN_YEARS == YEARS_CHILD) {
|
||||
func_8010B720(globalCtx, 0x403A);
|
||||
Message_ContinueTextbox(globalCtx, 0x403A);
|
||||
} else {
|
||||
func_8010B720(globalCtx, 0x403B);
|
||||
Message_ContinueTextbox(globalCtx, 0x403B);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -512,16 +512,16 @@ void EnOssan_TalkZoraShopkeeper(GlobalContext* globalCtx) {
|
|||
void EnOssan_TalkGoronShopkeeper(GlobalContext* globalCtx) {
|
||||
if (LINK_AGE_IN_YEARS == YEARS_CHILD) {
|
||||
if (gSaveContext.eventChkInf[2] & 0x20) {
|
||||
func_8010B720(globalCtx, 0x3028);
|
||||
Message_ContinueTextbox(globalCtx, 0x3028);
|
||||
} else if (CUR_UPG_VALUE(UPG_STRENGTH) != 0) {
|
||||
func_8010B720(globalCtx, 0x302D);
|
||||
Message_ContinueTextbox(globalCtx, 0x302D);
|
||||
} else {
|
||||
func_8010B720(globalCtx, 0x300F);
|
||||
Message_ContinueTextbox(globalCtx, 0x300F);
|
||||
}
|
||||
} else if (!CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) {
|
||||
func_8010B720(globalCtx, 0x3057);
|
||||
Message_ContinueTextbox(globalCtx, 0x3057);
|
||||
} else {
|
||||
func_8010B720(globalCtx, 0x305B);
|
||||
Message_ContinueTextbox(globalCtx, 0x305B);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -531,14 +531,14 @@ void EnOssan_TalkHappyMaskShopkeeper(GlobalContext* globalCtx) {
|
|||
&& (gSaveContext.itemGetInf[3] & 0x200) // Sold Skull Mask
|
||||
&& (gSaveContext.itemGetInf[3] & 0x400) // Sold Spooky Mask
|
||||
&& (gSaveContext.itemGetInf[3] & 0x800)) { // Sold Bunny Hood
|
||||
func_8010B720(globalCtx, 0x70AE);
|
||||
Message_ContinueTextbox(globalCtx, 0x70AE);
|
||||
} else {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 1:
|
||||
func_8010B720(globalCtx, 0x70A4);
|
||||
Message_ContinueTextbox(globalCtx, 0x70A4);
|
||||
break;
|
||||
case 0:
|
||||
func_8010B720(globalCtx, 0x70A3);
|
||||
Message_ContinueTextbox(globalCtx, 0x70A3);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -640,7 +640,7 @@ void EnOssan_UpdateCursorPos(GlobalContext* globalCtx, EnOssan* this) {
|
|||
s16 x;
|
||||
s16 y;
|
||||
|
||||
func_8002F374(globalCtx, &this->shelfSlots[this->cursorIndex]->actor, &x, &y);
|
||||
Actor_GetScreenPos(globalCtx, &this->shelfSlots[this->cursorIndex]->actor, &x, &y);
|
||||
this->cursorX = x;
|
||||
this->cursorY = y;
|
||||
}
|
||||
|
@ -651,9 +651,9 @@ void EnOssan_EndInteraction(GlobalContext* globalCtx, EnOssan* this) {
|
|||
// "End of conversation!"
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) "%s[%d]:★★★ 会話終了!! ★★★" VT_RST "\n", "../z_en_oB1.c", 1337);
|
||||
YREG(31) = 0;
|
||||
func_8002F194(&this->actor, globalCtx);
|
||||
globalCtx->msgCtx.msgMode = 0x36;
|
||||
globalCtx->msgCtx.unk_E3E7 = 4;
|
||||
Actor_ProcessTalkRequest(&this->actor, globalCtx);
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
globalCtx->msgCtx.stateTimer = 4;
|
||||
player->stateFlags2 &= ~0x20000000;
|
||||
func_800BC490(globalCtx, 1);
|
||||
Interface_ChangeAlpha(50);
|
||||
|
@ -677,7 +677,7 @@ s32 EnOssan_TestEndInteraction(EnOssan* this, GlobalContext* globalCtx, Input* i
|
|||
s32 EnOssan_TestCancelOption(EnOssan* this, GlobalContext* globalCtx, Input* input) {
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_B)) {
|
||||
this->stateFlag = this->tempStateFlag;
|
||||
func_8010B720(globalCtx, this->shelfSlots[this->cursorIndex]->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->shelfSlots[this->cursorIndex]->actor.textId);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
@ -687,7 +687,7 @@ s32 EnOssan_TestCancelOption(EnOssan* this, GlobalContext* globalCtx, Input* inp
|
|||
void EnOssan_SetStateStartShopping(GlobalContext* globalCtx, EnOssan* this, u8 skipHelloState) {
|
||||
YREG(31) = 1;
|
||||
this->headRot = this->headTargetRot = 0;
|
||||
Interface_SetDoAction(globalCtx, 0x10);
|
||||
Interface_SetDoAction(globalCtx, DO_ACTION_NEXT);
|
||||
EnOssan_UpdateCameraDirection(this, globalCtx, 0);
|
||||
|
||||
if (!skipHelloState) {
|
||||
|
@ -704,15 +704,15 @@ void EnOssan_StartShopping(GlobalContext* globalCtx, EnOssan* this) {
|
|||
// if all masks have been sold, give the option to ask about the mask of truth
|
||||
if ((gSaveContext.itemGetInf[3] & 0x100) && (gSaveContext.itemGetInf[3] & 0x200) &&
|
||||
(gSaveContext.itemGetInf[3] & 0x400) && (gSaveContext.itemGetInf[3] & 0x800)) {
|
||||
func_8010B720(globalCtx, 0x70AD);
|
||||
Message_ContinueTextbox(globalCtx, 0x70AD);
|
||||
} else {
|
||||
func_8010B720(globalCtx, 0x70A2);
|
||||
Message_ContinueTextbox(globalCtx, 0x70A2);
|
||||
}
|
||||
} else {
|
||||
func_8010B720(globalCtx, 0x83);
|
||||
Message_ContinueTextbox(globalCtx, 0x83);
|
||||
}
|
||||
|
||||
Interface_SetDoAction(globalCtx, 6);
|
||||
Interface_SetDoAction(globalCtx, DO_ACTION_DECIDE);
|
||||
this->stickRightPrompt.isEnabled = true;
|
||||
this->stickLeftPrompt.isEnabled = true;
|
||||
EnOssan_UpdateCameraDirection(this, globalCtx, 0.0f);
|
||||
|
@ -721,7 +721,7 @@ void EnOssan_StartShopping(GlobalContext* globalCtx, EnOssan* this) {
|
|||
void EnOssan_ChooseTalkToOwner(GlobalContext* globalCtx, EnOssan* this) {
|
||||
this->stateFlag = OSSAN_STATE_TALKING_TO_SHOPKEEPER;
|
||||
sShopkeeperTalkOwner[this->actor.params](globalCtx);
|
||||
Interface_SetDoAction(globalCtx, 6);
|
||||
Interface_SetDoAction(globalCtx, DO_ACTION_DECIDE);
|
||||
this->stickLeftPrompt.isEnabled = false;
|
||||
this->stickRightPrompt.isEnabled = false;
|
||||
}
|
||||
|
@ -735,7 +735,7 @@ void EnOssan_SetLookToShopkeeperFromShelf(GlobalContext* globalCtx, EnOssan* thi
|
|||
void EnOssan_State_Idle(EnOssan* this, GlobalContext* globalCtx, Player* player) {
|
||||
this->headTargetRot = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
|
||||
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
// "Start conversation!!"
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) "★★★ 会話開始!! ★★★" VT_RST "\n");
|
||||
player->stateFlags2 |= 0x20000000;
|
||||
|
@ -858,7 +858,7 @@ void EnOssan_TryPaybackMask(EnOssan* this, GlobalContext* globalCtx) {
|
|||
s16 price = sMaskPaymentPrice[this->happyMaskShopState];
|
||||
|
||||
if (gSaveContext.rupees < price) {
|
||||
func_8010B720(globalCtx, 0x70A8);
|
||||
Message_ContinueTextbox(globalCtx, 0x70A8);
|
||||
this->happyMaskShopkeeperEyeIdx = 1;
|
||||
this->happyMaskShopState = OSSAN_HAPPY_STATE_ANGRY;
|
||||
} else {
|
||||
|
@ -866,7 +866,7 @@ void EnOssan_TryPaybackMask(EnOssan* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (this->happyMaskShopState == OSSAN_HAPPY_STATE_REQUEST_PAYMENT_BUNNY_HOOD) {
|
||||
gSaveContext.eventChkInf[8] |= 0x8000;
|
||||
func_8010B720(globalCtx, 0x70A9);
|
||||
Message_ContinueTextbox(globalCtx, 0x70A9);
|
||||
this->happyMaskShopState = OSSAN_HAPPY_STATE_ALL_MASKS_SOLD;
|
||||
return;
|
||||
}
|
||||
|
@ -879,17 +879,18 @@ void EnOssan_TryPaybackMask(EnOssan* this, GlobalContext* globalCtx) {
|
|||
gSaveContext.eventChkInf[8] |= 0x2000;
|
||||
}
|
||||
|
||||
func_8010B720(globalCtx, 0x70A7);
|
||||
Message_ContinueTextbox(globalCtx, 0x70A7);
|
||||
this->happyMaskShopState = OSSAN_HAPPY_STATE_NONE;
|
||||
}
|
||||
this->stateFlag = OSSAN_STATE_START_CONVERSATION;
|
||||
}
|
||||
|
||||
void EnOssan_State_StartConversation(EnOssan* this, GlobalContext* globalCtx, Player* player) {
|
||||
u8 dialogState = func_8010BDBC(&globalCtx->msgCtx);
|
||||
u8 dialogState = Message_GetState(&globalCtx->msgCtx);
|
||||
|
||||
if (this->actor.params == OSSAN_TYPE_MASK && dialogState == 4) {
|
||||
if (!EnOssan_TestEndInteraction(this, globalCtx, &globalCtx->state.input[0]) && func_80106BC8(globalCtx)) {
|
||||
if (this->actor.params == OSSAN_TYPE_MASK && dialogState == TEXT_STATE_CHOICE) {
|
||||
if (!EnOssan_TestEndInteraction(this, globalCtx, &globalCtx->state.input[0]) &&
|
||||
Message_ShouldAdvance(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0:
|
||||
EnOssan_StartShopping(globalCtx, this);
|
||||
|
@ -899,12 +900,12 @@ void EnOssan_State_StartConversation(EnOssan* this, GlobalContext* globalCtx, Pl
|
|||
break;
|
||||
}
|
||||
}
|
||||
} else if (dialogState == 5 && func_80106BC8(globalCtx)) {
|
||||
} else if (dialogState == TEXT_STATE_EVENT && Message_ShouldAdvance(globalCtx)) {
|
||||
func_80078884(NA_SE_SY_MESSAGE_PASS);
|
||||
|
||||
switch (this->happyMaskShopState) {
|
||||
case OSSAN_HAPPY_STATE_ALL_MASKS_SOLD:
|
||||
func_8010B720(globalCtx, 0x70AA);
|
||||
Message_ContinueTextbox(globalCtx, 0x70AA);
|
||||
this->stateFlag = OSSAN_STATE_LEND_MASK_OF_TRUTH;
|
||||
return;
|
||||
case OSSAN_HAPPY_STATE_BORROWED_FIRST_MASK:
|
||||
|
@ -949,9 +950,9 @@ s32 EnOssan_FacingShopkeeperDialogResult(EnOssan* this, GlobalContext* globalCtx
|
|||
void EnOssan_State_FacingShopkeeper(EnOssan* this, GlobalContext* globalCtx, Player* player) {
|
||||
u8 nextIndex;
|
||||
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 4) &&
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE) &&
|
||||
!EnOssan_TestEndInteraction(this, globalCtx, &globalCtx->state.input[0])) {
|
||||
if (func_80106BC8(globalCtx) && EnOssan_FacingShopkeeperDialogResult(this, globalCtx)) {
|
||||
if (Message_ShouldAdvance(globalCtx) && EnOssan_FacingShopkeeperDialogResult(this, globalCtx)) {
|
||||
func_80078884(NA_SE_SY_DECIDE);
|
||||
return;
|
||||
}
|
||||
|
@ -961,7 +962,7 @@ void EnOssan_State_FacingShopkeeper(EnOssan* this, GlobalContext* globalCtx, Pla
|
|||
if (nextIndex != CURSOR_INVALID) {
|
||||
this->cursorIndex = nextIndex;
|
||||
this->stateFlag = OSSAN_STATE_LOOK_SHELF_LEFT;
|
||||
Interface_SetDoAction(globalCtx, 6);
|
||||
Interface_SetDoAction(globalCtx, DO_ACTION_DECIDE);
|
||||
this->stickLeftPrompt.isEnabled = false;
|
||||
func_80078884(NA_SE_SY_CURSOR);
|
||||
}
|
||||
|
@ -970,7 +971,7 @@ void EnOssan_State_FacingShopkeeper(EnOssan* this, GlobalContext* globalCtx, Pla
|
|||
if (nextIndex != CURSOR_INVALID) {
|
||||
this->cursorIndex = nextIndex;
|
||||
this->stateFlag = OSSAN_STATE_LOOK_SHELF_RIGHT;
|
||||
Interface_SetDoAction(globalCtx, 6);
|
||||
Interface_SetDoAction(globalCtx, DO_ACTION_DECIDE);
|
||||
this->stickRightPrompt.isEnabled = false;
|
||||
func_80078884(NA_SE_SY_CURSOR);
|
||||
}
|
||||
|
@ -979,7 +980,7 @@ void EnOssan_State_FacingShopkeeper(EnOssan* this, GlobalContext* globalCtx, Pla
|
|||
}
|
||||
|
||||
void EnOssan_State_TalkingToShopkeeper(EnOssan* this, GlobalContext* globalCtx, Player* player) {
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && func_80106BC8(globalCtx)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
EnOssan_StartShopping(globalCtx, this);
|
||||
}
|
||||
}
|
||||
|
@ -997,7 +998,7 @@ void EnOssan_State_LookToLeftShelf(EnOssan* this, GlobalContext* globalCtx, Play
|
|||
EnOssan_UpdateCameraDirection(this, globalCtx, 30.0f);
|
||||
EnOssan_UpdateCursorPos(globalCtx, this);
|
||||
this->stateFlag = OSSAN_STATE_BROWSE_LEFT_SHELF;
|
||||
func_8010B720(globalCtx, this->shelfSlots[this->cursorIndex]->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->shelfSlots[this->cursorIndex]->actor.textId);
|
||||
} else {
|
||||
this->stickAccumX = 0;
|
||||
}
|
||||
|
@ -1016,7 +1017,7 @@ void EnOssan_State_LookToRightShelf(EnOssan* this, GlobalContext* globalCtx, Pla
|
|||
EnOssan_UpdateCameraDirection(this, globalCtx, -30.0f);
|
||||
EnOssan_UpdateCursorPos(globalCtx, this);
|
||||
this->stateFlag = OSSAN_STATE_BROWSE_RIGHT_SHELF;
|
||||
func_8010B720(globalCtx, this->shelfSlots[this->cursorIndex]->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->shelfSlots[this->cursorIndex]->actor.textId);
|
||||
} else {
|
||||
this->stickAccumX = 0;
|
||||
}
|
||||
|
@ -1113,10 +1114,10 @@ s32 EnOssan_HasPlayerSelectedItem(GlobalContext* globalCtx, EnOssan* this, Input
|
|||
if (EnOssan_TestEndInteraction(this, globalCtx, input)) {
|
||||
return true;
|
||||
}
|
||||
if (func_80106BC8(globalCtx)) {
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
if (selectedItem->actor.params != SI_SOLD_OUT && selectedItem->isInvisible == 0) {
|
||||
this->tempStateFlag = this->stateFlag;
|
||||
func_8010B720(globalCtx, this->shelfSlots[this->cursorIndex]->itemBuyPromptTextId);
|
||||
Message_ContinueTextbox(globalCtx, this->shelfSlots[this->cursorIndex]->itemBuyPromptTextId);
|
||||
this->stickLeftPrompt.isEnabled = false;
|
||||
this->stickRightPrompt.isEnabled = false;
|
||||
switch (selectedItem->actor.params) {
|
||||
|
@ -1189,7 +1190,7 @@ void EnOssan_State_BrowseLeftShelf(EnOssan* this, GlobalContext* globalCtx, Play
|
|||
this->drawCursor = 0xFF;
|
||||
this->stickRightPrompt.isEnabled = true;
|
||||
EnOssan_UpdateCursorPos(globalCtx, this);
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) &&
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) &&
|
||||
!EnOssan_HasPlayerSelectedItem(globalCtx, this, &globalCtx->state.input[0])) {
|
||||
if (this->moveHorizontal) {
|
||||
if (this->stickAccumX > 0) {
|
||||
|
@ -1224,7 +1225,7 @@ void EnOssan_State_BrowseLeftShelf(EnOssan* this, GlobalContext* globalCtx, Play
|
|||
}
|
||||
EnOssan_CursorUpDown(this);
|
||||
if (this->cursorIndex != prevIndex) {
|
||||
func_8010B720(globalCtx, this->shelfSlots[this->cursorIndex]->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->shelfSlots[this->cursorIndex]->actor.textId);
|
||||
func_80078884(NA_SE_SY_CURSOR);
|
||||
}
|
||||
}
|
||||
|
@ -1248,7 +1249,7 @@ void EnOssan_State_BrowseRightShelf(EnOssan* this, GlobalContext* globalCtx, Pla
|
|||
this->drawCursor = 0xFF;
|
||||
this->stickLeftPrompt.isEnabled = true;
|
||||
EnOssan_UpdateCursorPos(globalCtx, this);
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) &&
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) &&
|
||||
!EnOssan_HasPlayerSelectedItem(globalCtx, this, &globalCtx->state.input[0])) {
|
||||
if (this->moveHorizontal) {
|
||||
if (this->stickAccumX < 0) {
|
||||
|
@ -1283,7 +1284,7 @@ void EnOssan_State_BrowseRightShelf(EnOssan* this, GlobalContext* globalCtx, Pla
|
|||
}
|
||||
EnOssan_CursorUpDown(this);
|
||||
if (this->cursorIndex != prevIndex) {
|
||||
func_8010B720(globalCtx, this->shelfSlots[this->cursorIndex]->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->shelfSlots[this->cursorIndex]->actor.textId);
|
||||
func_80078884(NA_SE_SY_CURSOR);
|
||||
}
|
||||
}
|
||||
|
@ -1311,7 +1312,7 @@ void EnOssan_State_DisplayOnlyBombDialog(EnOssan* this, GlobalContext* globalCtx
|
|||
}
|
||||
EnOssan_UpdateCameraDirection(this, globalCtx, this->cameraFaceAngle);
|
||||
if (this->cameraFaceAngle == 0.0f) {
|
||||
func_8010B720(globalCtx, 0x3010);
|
||||
Message_ContinueTextbox(globalCtx, 0x3010);
|
||||
this->stateFlag = OSSAN_STATE_WAIT_FOR_DISPLAY_ONLY_BOMB_DIALOG;
|
||||
}
|
||||
}
|
||||
|
@ -1321,8 +1322,8 @@ void EnOssan_GiveItemWithFanfare(GlobalContext* globalCtx, EnOssan* this) {
|
|||
|
||||
osSyncPrintf("\n" VT_FGCOL(YELLOW) "初めて手にいれた!!" VT_RST "\n\n");
|
||||
func_8002F434(&this->actor, globalCtx, this->shelfSlots[this->cursorIndex]->getItemId, 120.0f, 120.0f);
|
||||
globalCtx->msgCtx.msgMode = 0x36;
|
||||
globalCtx->msgCtx.unk_E3E7 = 4;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
globalCtx->msgCtx.stateTimer = 4;
|
||||
player->stateFlags2 &= ~0x20000000;
|
||||
func_800BC490(globalCtx, 1);
|
||||
Interface_ChangeAlpha(50);
|
||||
|
@ -1333,12 +1334,12 @@ void EnOssan_GiveItemWithFanfare(GlobalContext* globalCtx, EnOssan* this) {
|
|||
}
|
||||
|
||||
void EnOssan_SetStateCantGetItem(GlobalContext* globalCtx, EnOssan* this, u16 textId) {
|
||||
func_8010B720(globalCtx, textId);
|
||||
Message_ContinueTextbox(globalCtx, textId);
|
||||
this->stateFlag = OSSAN_STATE_CANT_GET_ITEM;
|
||||
}
|
||||
|
||||
void EnOssan_SetStateQuickBuyDialog(GlobalContext* globalCtx, EnOssan* this, u16 textId) {
|
||||
func_8010B720(globalCtx, textId);
|
||||
Message_ContinueTextbox(globalCtx, textId);
|
||||
this->stateFlag = OSSAN_STATE_QUICK_BUY;
|
||||
}
|
||||
|
||||
|
@ -1387,7 +1388,7 @@ void EnOssan_HandleCanBuyLonLonMilk(GlobalContext* globalCtx, EnOssan* this) {
|
|||
|
||||
switch (item->canBuyFunc(globalCtx, item)) {
|
||||
case CANBUY_RESULT_SUCCESS_FANFARE:
|
||||
func_8010B720(globalCtx, 0x9C);
|
||||
Message_ContinueTextbox(globalCtx, 0x9C);
|
||||
this->stateFlag = OSSAN_STATE_GIVE_LON_LON_MILK;
|
||||
this->drawCursor = 0;
|
||||
break;
|
||||
|
@ -1484,15 +1485,15 @@ void EnOssan_State_ItemSelected(EnOssan* this, GlobalContext* globalCtx2, Player
|
|||
osSyncPrintf("%s[%d]:" VT_FGCOL(GREEN) "ズーム中!!" VT_RST "\n", "../z_en_oB1.c", 2654);
|
||||
return;
|
||||
}
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4 &&
|
||||
!EnOssan_TestCancelOption(this, globalCtx, &globalCtx->state.input[0]) && func_80106BC8(globalCtx)) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE &&
|
||||
!EnOssan_TestCancelOption(this, globalCtx, &globalCtx->state.input[0]) && Message_ShouldAdvance(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0:
|
||||
EnOssan_HandleCanBuyItem(globalCtx, this);
|
||||
break;
|
||||
case 1:
|
||||
this->stateFlag = this->tempStateFlag;
|
||||
func_8010B720(globalCtx, this->shelfSlots[this->cursorIndex]->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->shelfSlots[this->cursorIndex]->actor.textId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1505,15 +1506,15 @@ void EnOssan_State_SelectMilkBottle(EnOssan* this, GlobalContext* globalCtx2, Pl
|
|||
osSyncPrintf("%s[%d]:" VT_FGCOL(GREEN) "ズーム中!!" VT_RST "\n", "../z_en_oB1.c", 2693);
|
||||
return;
|
||||
}
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4 &&
|
||||
!EnOssan_TestCancelOption(this, globalCtx, &globalCtx->state.input[0]) && func_80106BC8(globalCtx)) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE &&
|
||||
!EnOssan_TestCancelOption(this, globalCtx, &globalCtx->state.input[0]) && Message_ShouldAdvance(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0:
|
||||
EnOssan_HandleCanBuyLonLonMilk(globalCtx, this);
|
||||
break;
|
||||
case 1:
|
||||
this->stateFlag = this->tempStateFlag;
|
||||
func_8010B720(globalCtx, this->shelfSlots[this->cursorIndex]->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->shelfSlots[this->cursorIndex]->actor.textId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1526,15 +1527,15 @@ void EnOssan_State_SelectWeirdEgg(EnOssan* this, GlobalContext* globalCtx2, Play
|
|||
osSyncPrintf("%s[%d]:" VT_FGCOL(GREEN) "ズーム中!!" VT_RST "\n", "../z_en_oB1.c", 2732);
|
||||
return;
|
||||
}
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4 &&
|
||||
!EnOssan_TestCancelOption(this, globalCtx, &globalCtx->state.input[0]) && func_80106BC8(globalCtx)) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE &&
|
||||
!EnOssan_TestCancelOption(this, globalCtx, &globalCtx->state.input[0]) && Message_ShouldAdvance(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0:
|
||||
EnOssan_HandleCanBuyWeirdEgg(globalCtx, this);
|
||||
break;
|
||||
case 1:
|
||||
this->stateFlag = this->tempStateFlag;
|
||||
func_8010B720(globalCtx, this->shelfSlots[this->cursorIndex]->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->shelfSlots[this->cursorIndex]->actor.textId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1545,9 +1546,9 @@ void EnOssan_State_SelectUnimplementedItem(EnOssan* this, GlobalContext* globalC
|
|||
osSyncPrintf("%s[%d]:" VT_FGCOL(GREEN) "ズーム中!!" VT_RST "\n", "../z_en_oB1.c", 2771);
|
||||
return;
|
||||
}
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 5 && func_80106BC8(globalCtx)) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT && Message_ShouldAdvance(globalCtx)) {
|
||||
this->stateFlag = this->tempStateFlag;
|
||||
func_8010B720(globalCtx, this->shelfSlots[this->cursorIndex]->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->shelfSlots[this->cursorIndex]->actor.textId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1561,35 +1562,36 @@ void EnOssan_State_SelectBombs(EnOssan* this, GlobalContext* globalCtx, Player*
|
|||
EnOssan_State_ItemSelected(this, globalCtx, player);
|
||||
return;
|
||||
}
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4 &&
|
||||
!EnOssan_TestCancelOption(this, globalCtx, &globalCtx->state.input[0]) && func_80106BC8(globalCtx)) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE &&
|
||||
!EnOssan_TestCancelOption(this, globalCtx, &globalCtx->state.input[0]) && Message_ShouldAdvance(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0:
|
||||
EnOssan_BuyGoronCityBombs(globalCtx, this);
|
||||
break;
|
||||
case 1:
|
||||
this->stateFlag = this->tempStateFlag;
|
||||
func_8010B720(globalCtx, this->shelfSlots[this->cursorIndex]->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->shelfSlots[this->cursorIndex]->actor.textId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EnOssan_State_SelectMaskItem(EnOssan* this, GlobalContext* globalCtx, Player* player) {
|
||||
u8 talkState = func_8010BDBC(&globalCtx->msgCtx);
|
||||
u8 talkState = Message_GetState(&globalCtx->msgCtx);
|
||||
EnGirlA* item = this->shelfSlots[this->cursorIndex];
|
||||
|
||||
if (!EnOssan_TakeItemOffShelf(this)) {
|
||||
osSyncPrintf("%s[%d]:" VT_FGCOL(GREEN) "ズーム中!!" VT_RST "\n", "../z_en_oB1.c", 2845);
|
||||
return;
|
||||
}
|
||||
if (talkState == 5) {
|
||||
if (func_80106BC8(globalCtx)) {
|
||||
if (talkState == TEXT_STATE_EVENT) {
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
this->stateFlag = this->tempStateFlag;
|
||||
func_8010B720(globalCtx, this->shelfSlots[this->cursorIndex]->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->shelfSlots[this->cursorIndex]->actor.textId);
|
||||
}
|
||||
} else if (talkState == 4 && !EnOssan_TestCancelOption(this, globalCtx, &globalCtx->state.input[0]) &&
|
||||
func_80106BC8(globalCtx)) {
|
||||
} else if (talkState == TEXT_STATE_CHOICE &&
|
||||
!EnOssan_TestCancelOption(this, globalCtx, &globalCtx->state.input[0]) &&
|
||||
Message_ShouldAdvance(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0:
|
||||
switch (item->actor.params) {
|
||||
|
@ -1618,29 +1620,29 @@ void EnOssan_State_SelectMaskItem(EnOssan* this, GlobalContext* globalCtx, Playe
|
|||
break;
|
||||
case 1:
|
||||
this->stateFlag = this->tempStateFlag;
|
||||
func_8010B720(globalCtx, this->shelfSlots[this->cursorIndex]->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->shelfSlots[this->cursorIndex]->actor.textId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EnOssan_State_CantGetItem(EnOssan* this, GlobalContext* globalCtx, Player* player) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 5 && func_80106BC8(globalCtx)) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT && Message_ShouldAdvance(globalCtx)) {
|
||||
this->stateFlag = this->tempStateFlag;
|
||||
func_8010B720(globalCtx, this->shelfSlots[this->cursorIndex]->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->shelfSlots[this->cursorIndex]->actor.textId);
|
||||
}
|
||||
}
|
||||
|
||||
void EnOssan_State_QuickBuyDialog(EnOssan* this, GlobalContext* globalCtx, Player* player) {
|
||||
EnGirlA* item;
|
||||
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 5 && func_80106BC8(globalCtx)) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT && Message_ShouldAdvance(globalCtx)) {
|
||||
this->shopItemSelectedTween = 0.0f;
|
||||
EnOssan_ResetItemPosition(this);
|
||||
item = this->shelfSlots[this->cursorIndex];
|
||||
item->updateStockedItemFunc(globalCtx, item);
|
||||
this->stateFlag = this->tempStateFlag;
|
||||
func_8010B720(globalCtx, this->shelfSlots[this->cursorIndex]->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->shelfSlots[this->cursorIndex]->actor.textId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1658,7 +1660,7 @@ void EnOssan_State_ItemPurchased(EnOssan* this, GlobalContext* globalCtx, Player
|
|||
EnGirlA* item;
|
||||
EnGirlA* itemTemp;
|
||||
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 6) && func_80106BC8(globalCtx)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) {
|
||||
if (this->actor.params == OSSAN_TYPE_MASK) {
|
||||
itemTemp = this->shelfSlots[this->cursorIndex];
|
||||
EnOssan_ResetItemPosition(this);
|
||||
|
@ -1666,7 +1668,7 @@ void EnOssan_State_ItemPurchased(EnOssan* this, GlobalContext* globalCtx, Player
|
|||
item->updateStockedItemFunc(globalCtx, item);
|
||||
if (itemTemp->actor.params == SI_MASK_OF_TRUTH && !(gSaveContext.itemGetInf[3] & 0x8000)) {
|
||||
gSaveContext.itemGetInf[3] |= 0x8000;
|
||||
func_8010B720(globalCtx, 0x70AB);
|
||||
Message_ContinueTextbox(globalCtx, 0x70AB);
|
||||
this->happyMaskShopState = OSSAN_HAPPY_STATE_BORROWED_FIRST_MASK;
|
||||
EnOssan_UpdateShopOfferings(this, globalCtx);
|
||||
this->stateFlag = OSSAN_STATE_START_CONVERSATION;
|
||||
|
@ -1679,16 +1681,16 @@ void EnOssan_State_ItemPurchased(EnOssan* this, GlobalContext* globalCtx, Player
|
|||
item = this->shelfSlots[this->cursorIndex];
|
||||
item->buyEventFunc(globalCtx, item);
|
||||
this->stateFlag = OSSAN_STATE_CONTINUE_SHOPPING_PROMPT;
|
||||
func_8010B720(globalCtx, 0x6B);
|
||||
Message_ContinueTextbox(globalCtx, 0x6B);
|
||||
}
|
||||
}
|
||||
|
||||
void EnOssan_State_ContinueShoppingPrompt(EnOssan* this, GlobalContext* globalCtx, Player* player) {
|
||||
EnGirlA* selectedItem;
|
||||
u8 talkState = func_8010BDBC(&globalCtx->msgCtx);
|
||||
u8 talkState = Message_GetState(&globalCtx->msgCtx);
|
||||
|
||||
if (talkState == 4) {
|
||||
if (func_80106BC8(globalCtx)) {
|
||||
if (talkState == TEXT_STATE_CHOICE) {
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
EnOssan_ResetItemPosition(this);
|
||||
selectedItem = this->shelfSlots[this->cursorIndex];
|
||||
selectedItem->updateStockedItemFunc(globalCtx, selectedItem);
|
||||
|
@ -1699,7 +1701,7 @@ void EnOssan_State_ContinueShoppingPrompt(EnOssan* this, GlobalContext* globalCt
|
|||
player->actor.shape.rot.y += 0x8000;
|
||||
player->stateFlags2 |= 0x20000000;
|
||||
func_800BC490(globalCtx, 2);
|
||||
func_8010B680(globalCtx, this->actor.textId, &this->actor);
|
||||
Message_StartTextbox(globalCtx, this->actor.textId, &this->actor);
|
||||
EnOssan_SetStateStartShopping(globalCtx, this, true);
|
||||
func_8002F298(&this->actor, globalCtx, 100.0f, -1);
|
||||
break;
|
||||
|
@ -1711,21 +1713,21 @@ void EnOssan_State_ContinueShoppingPrompt(EnOssan* this, GlobalContext* globalCt
|
|||
}
|
||||
}
|
||||
}
|
||||
} else if (talkState == 5 && func_80106BC8(globalCtx)) {
|
||||
} else if (talkState == TEXT_STATE_EVENT && Message_ShouldAdvance(globalCtx)) {
|
||||
EnOssan_ResetItemPosition(this);
|
||||
selectedItem = this->shelfSlots[this->cursorIndex];
|
||||
selectedItem->updateStockedItemFunc(globalCtx, selectedItem);
|
||||
player->actor.shape.rot.y += 0x8000;
|
||||
player->stateFlags2 |= 0x20000000;
|
||||
func_800BC490(globalCtx, 2);
|
||||
func_8010B680(globalCtx, this->actor.textId, &this->actor);
|
||||
Message_StartTextbox(globalCtx, this->actor.textId, &this->actor);
|
||||
EnOssan_SetStateStartShopping(globalCtx, this, true);
|
||||
func_8002F298(&this->actor, globalCtx, 100.0f, -1);
|
||||
}
|
||||
}
|
||||
|
||||
void EnOssan_State_WaitForDisplayOnlyBombDialog(EnOssan* this, GlobalContext* globalCtx, Player* player) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 5 && func_80106BC8(globalCtx)) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT && Message_ShouldAdvance(globalCtx)) {
|
||||
gSaveContext.infTable[15] |= 0x1000;
|
||||
EnOssan_StartShopping(globalCtx, this);
|
||||
}
|
||||
|
@ -1733,29 +1735,29 @@ void EnOssan_State_WaitForDisplayOnlyBombDialog(EnOssan* this, GlobalContext* gl
|
|||
|
||||
// Unreachable
|
||||
void EnOssan_State_21(EnOssan* this, GlobalContext* globalCtx, Player* player) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 1 && func_80106BC8(globalCtx)) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE_HAS_NEXT && Message_ShouldAdvance(globalCtx)) {
|
||||
this->stateFlag = OSSAN_STATE_22;
|
||||
func_8010B720(globalCtx, 0x3012);
|
||||
Message_ContinueTextbox(globalCtx, 0x3012);
|
||||
gSaveContext.infTable[15] |= 0x1000;
|
||||
}
|
||||
}
|
||||
|
||||
// Unreachable
|
||||
void EnOssan_State_22(EnOssan* this, GlobalContext* globalCtx, Player* player) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 5 && func_80106BC8(globalCtx)) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT && Message_ShouldAdvance(globalCtx)) {
|
||||
EnOssan_StartShopping(globalCtx, this);
|
||||
}
|
||||
}
|
||||
|
||||
void EnOssan_State_GiveLonLonMilk(EnOssan* this, GlobalContext* globalCtx, Player* player) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 5 && func_80106BC8(globalCtx)) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT && Message_ShouldAdvance(globalCtx)) {
|
||||
EnOssan_GiveItemWithFanfare(globalCtx, this);
|
||||
}
|
||||
}
|
||||
|
||||
// For giving Mask of Truth when you first sell all masks
|
||||
void EnOssan_State_LendMaskOfTruth(EnOssan* this, GlobalContext* globalCtx, Player* player) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 5 && func_80106BC8(globalCtx)) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT && Message_ShouldAdvance(globalCtx)) {
|
||||
gSaveContext.itemGetInf[2] |= 0x400;
|
||||
this->cursorIndex = 2;
|
||||
EnOssan_GiveItemWithFanfare(globalCtx, this);
|
||||
|
@ -1764,14 +1766,14 @@ void EnOssan_State_LendMaskOfTruth(EnOssan* this, GlobalContext* globalCtx, Play
|
|||
|
||||
// Hylian Shield discount dialog
|
||||
void EnOssan_SetStateGiveDiscountDialog(GlobalContext* globalCtx, EnOssan* this) {
|
||||
func_8010B720(globalCtx, 0x71B2);
|
||||
Message_ContinueTextbox(globalCtx, 0x71B2);
|
||||
this->stateFlag = OSSAN_STATE_DISCOUNT_DIALOG;
|
||||
}
|
||||
|
||||
void EnOssan_State_GiveDiscountDialog(EnOssan* this, GlobalContext* globalCtx, Player* player) {
|
||||
EnGirlA* selectedItem;
|
||||
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 6 && func_80106BC8(globalCtx)) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE && Message_ShouldAdvance(globalCtx)) {
|
||||
selectedItem = this->shelfSlots[this->cursorIndex];
|
||||
EnOssan_GiveItemWithFanfare(globalCtx, this);
|
||||
this->drawCursor = 0;
|
||||
|
|
|
@ -260,7 +260,7 @@ s32 EnOwl_CheckInitTalk(EnOwl* this, GlobalContext* globalCtx, u16 textId, f32 t
|
|||
s32 timer;
|
||||
f32 distCheck;
|
||||
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
if (this->actor.params == 0xFFF) {
|
||||
this->actionFlags |= 0x40;
|
||||
timer = -100;
|
||||
|
@ -287,7 +287,7 @@ s32 EnOwl_CheckInitTalk(EnOwl* this, GlobalContext* globalCtx, u16 textId, f32 t
|
|||
}
|
||||
|
||||
s32 func_80ACA558(EnOwl* this, GlobalContext* globalCtx, u16 textId) {
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
return true;
|
||||
} else {
|
||||
this->actor.textId = textId;
|
||||
|
@ -342,7 +342,7 @@ void func_80ACA71C(EnOwl* this) {
|
|||
void func_80ACA76C(EnOwl* this, GlobalContext* globalCtx) {
|
||||
func_8002DF54(globalCtx, &this->actor, 8);
|
||||
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
Audio_QueueSeqCmd(0x110000FF);
|
||||
func_80ACA62C(this, globalCtx);
|
||||
this->actor.flags &= ~0x10000;
|
||||
|
@ -352,7 +352,7 @@ void func_80ACA76C(EnOwl* this, GlobalContext* globalCtx) {
|
|||
void func_80ACA7E0(EnOwl* this, GlobalContext* globalCtx) {
|
||||
func_8002DF54(globalCtx, &this->actor, 8);
|
||||
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
Audio_QueueSeqCmd(0x110000FF);
|
||||
if ((this->unk_3EE & 0x3F) == 0) {
|
||||
func_80ACA62C(this, globalCtx);
|
||||
|
@ -366,13 +366,13 @@ void func_80ACA7E0(EnOwl* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnOwl_ConfirmKokiriMessage(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4 && func_80106BC8(globalCtx)) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE && Message_ShouldAdvance(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case OWL_REPEAT:
|
||||
func_8010B720(globalCtx, 0x2065);
|
||||
Message_ContinueTextbox(globalCtx, 0x2065);
|
||||
break;
|
||||
case OWL_OK:
|
||||
func_8010B720(globalCtx, 0x2067);
|
||||
Message_ContinueTextbox(globalCtx, 0x2067);
|
||||
this->actionFunc = func_80ACA76C;
|
||||
break;
|
||||
}
|
||||
|
@ -384,7 +384,7 @@ void EnOwl_WaitOutsideKokiri(EnOwl* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (EnOwl_CheckInitTalk(this, globalCtx, 0x2064, 360.0f, 0)) {
|
||||
// Sets BGM
|
||||
func_800F5C64(NA_BGM_OWL);
|
||||
Audio_PlayFanfare(NA_BGM_OWL);
|
||||
|
||||
this->actionFunc = EnOwl_ConfirmKokiriMessage;
|
||||
// spoke to owl by lost woods
|
||||
|
@ -393,14 +393,14 @@ void EnOwl_WaitOutsideKokiri(EnOwl* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80ACA998(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4 && func_80106BC8(globalCtx)) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE && Message_ShouldAdvance(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case OWL_REPEAT:
|
||||
func_8010B720(globalCtx, 0x2069);
|
||||
Message_ContinueTextbox(globalCtx, 0x2069);
|
||||
this->actionFunc = func_80ACAA54;
|
||||
break;
|
||||
case OWL_OK:
|
||||
func_8010B720(globalCtx, 0x206B);
|
||||
Message_ContinueTextbox(globalCtx, 0x206B);
|
||||
this->actionFunc = func_80ACA7E0;
|
||||
break;
|
||||
}
|
||||
|
@ -410,8 +410,8 @@ void func_80ACA998(EnOwl* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80ACAA54(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 5 && func_80106BC8(globalCtx)) {
|
||||
func_8010B720(globalCtx, 0x206A);
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_ContinueTextbox(globalCtx, 0x206A);
|
||||
this->actionFunc = func_80ACA998;
|
||||
this->actionFlags |= 2;
|
||||
func_80ACA71C(this);
|
||||
|
@ -419,8 +419,8 @@ void func_80ACAA54(EnOwl* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80ACAAC0(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 5 && func_80106BC8(globalCtx)) {
|
||||
func_8010B720(globalCtx, 0x2069);
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_ContinueTextbox(globalCtx, 0x2069);
|
||||
this->actionFunc = func_80ACAA54;
|
||||
this->actionFlags &= ~2;
|
||||
func_80ACA71C(this);
|
||||
|
@ -431,25 +431,25 @@ void EnOwl_WaitHyruleCastle(EnOwl* this, GlobalContext* globalCtx) {
|
|||
EnOwl_LookAtLink(this, globalCtx);
|
||||
|
||||
if (EnOwl_CheckInitTalk(this, globalCtx, 0x2068, 540.0f, 0)) {
|
||||
func_800F5C64(NA_BGM_OWL);
|
||||
Audio_PlayFanfare(NA_BGM_OWL);
|
||||
this->actionFunc = func_80ACAAC0;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80ACAB88(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4 && func_80106BC8(globalCtx)) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE && Message_ShouldAdvance(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case OWL_REPEAT:
|
||||
// obtained zelda's letter
|
||||
if (gSaveContext.eventChkInf[4] & 1) {
|
||||
func_8010B720(globalCtx, 0x206D);
|
||||
Message_ContinueTextbox(globalCtx, 0x206D);
|
||||
} else {
|
||||
func_8010B720(globalCtx, 0x206C);
|
||||
Message_ContinueTextbox(globalCtx, 0x206C);
|
||||
}
|
||||
this->actionFunc = func_80ACAC6C;
|
||||
break;
|
||||
case OWL_OK:
|
||||
func_8010B720(globalCtx, 0x206E);
|
||||
Message_ContinueTextbox(globalCtx, 0x206E);
|
||||
this->actionFunc = func_80ACA7E0;
|
||||
break;
|
||||
}
|
||||
|
@ -460,8 +460,8 @@ void func_80ACAB88(EnOwl* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80ACAC6C(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 5 && func_80106BC8(globalCtx)) {
|
||||
func_8010B720(globalCtx, 0x206A);
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_ContinueTextbox(globalCtx, 0x206A);
|
||||
this->actionFunc = func_80ACAB88;
|
||||
this->actionFlags |= 2;
|
||||
func_80ACA71C(this);
|
||||
|
@ -472,20 +472,20 @@ void EnOwl_WaitKakariko(EnOwl* this, GlobalContext* globalCtx) {
|
|||
EnOwl_LookAtLink(this, globalCtx);
|
||||
|
||||
if (EnOwl_CheckInitTalk(this, globalCtx, 0x206C, 480.0f, 0)) {
|
||||
func_800F5C64(NA_BGM_OWL);
|
||||
Audio_PlayFanfare(NA_BGM_OWL);
|
||||
this->actionFunc = func_80ACAC6C;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80ACAD34(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4 && func_80106BC8(globalCtx)) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE && Message_ShouldAdvance(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case OWL_REPEAT:
|
||||
func_8010B720(globalCtx, 0x206F);
|
||||
Message_ContinueTextbox(globalCtx, 0x206F);
|
||||
this->actionFunc = func_80ACADF0;
|
||||
break;
|
||||
case OWL_OK:
|
||||
func_8010B720(globalCtx, 0x2070);
|
||||
Message_ContinueTextbox(globalCtx, 0x2070);
|
||||
this->actionFunc = func_80ACA7E0;
|
||||
break;
|
||||
}
|
||||
|
@ -496,8 +496,8 @@ void func_80ACAD34(EnOwl* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80ACADF0(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 5 && func_80106BC8(globalCtx)) {
|
||||
func_8010B720(globalCtx, 0x206A);
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_ContinueTextbox(globalCtx, 0x206A);
|
||||
this->actionFunc = func_80ACAD34;
|
||||
this->actionFlags |= 2;
|
||||
func_80ACA71C(this);
|
||||
|
@ -508,20 +508,20 @@ void EnOwl_WaitGerudo(EnOwl* this, GlobalContext* globalCtx) {
|
|||
EnOwl_LookAtLink(this, globalCtx);
|
||||
|
||||
if (EnOwl_CheckInitTalk(this, globalCtx, 0x206F, 360.0f, 0)) {
|
||||
func_800F5C64(NA_BGM_OWL);
|
||||
Audio_PlayFanfare(NA_BGM_OWL);
|
||||
this->actionFunc = func_80ACADF0;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80ACAEB8(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4 && func_80106BC8(globalCtx)) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE && Message_ShouldAdvance(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case OWL_REPEAT:
|
||||
func_8010B720(globalCtx, 0x2071);
|
||||
Message_ContinueTextbox(globalCtx, 0x2071);
|
||||
this->actionFunc = func_80ACAF74;
|
||||
break;
|
||||
case OWL_OK:
|
||||
func_8010B720(globalCtx, 0x2072);
|
||||
Message_ContinueTextbox(globalCtx, 0x2072);
|
||||
this->actionFunc = func_80ACA7E0;
|
||||
break;
|
||||
}
|
||||
|
@ -532,8 +532,8 @@ void func_80ACAEB8(EnOwl* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80ACAF74(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 5 && func_80106BC8(globalCtx)) {
|
||||
func_8010B720(globalCtx, 0x206A);
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_ContinueTextbox(globalCtx, 0x206A);
|
||||
this->actionFunc = func_80ACAEB8;
|
||||
this->actionFlags |= 2;
|
||||
func_80ACA71C(this);
|
||||
|
@ -544,7 +544,7 @@ void EnOwl_WaitLakeHylia(EnOwl* this, GlobalContext* globalCtx) {
|
|||
EnOwl_LookAtLink(this, globalCtx);
|
||||
|
||||
if (EnOwl_CheckInitTalk(this, globalCtx, 0x2071, 360.0f, 0)) {
|
||||
func_800F5C64(NA_BGM_OWL);
|
||||
Audio_PlayFanfare(NA_BGM_OWL);
|
||||
this->actionFunc = func_80ACAF74;
|
||||
}
|
||||
}
|
||||
|
@ -552,7 +552,7 @@ void EnOwl_WaitLakeHylia(EnOwl* this, GlobalContext* globalCtx) {
|
|||
void func_80ACB03C(EnOwl* this, GlobalContext* globalCtx) {
|
||||
func_8002DF54(globalCtx, &this->actor, 8);
|
||||
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
Audio_QueueSeqCmd(0x110000FF);
|
||||
func_80ACA62C(this, globalCtx);
|
||||
this->actor.flags &= ~0x10000;
|
||||
|
@ -575,13 +575,13 @@ void EnOwl_WaitZoraRiver(EnOwl* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (EnOwl_CheckInitTalk(this, globalCtx, textId, 360.0f, 0)) {
|
||||
func_800F5C64(NA_BGM_OWL);
|
||||
Audio_PlayFanfare(NA_BGM_OWL);
|
||||
this->actionFunc = func_80ACB03C;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80ACB148(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
Audio_QueueSeqCmd(0x110000FF);
|
||||
func_80ACA5C8(this);
|
||||
this->actionFunc = func_80ACC30C;
|
||||
|
@ -595,13 +595,13 @@ void EnOwl_WaitHyliaShortcut(EnOwl* this, GlobalContext* globalCtx) {
|
|||
EnOwl_LookAtLink(this, globalCtx);
|
||||
if (func_80ACA558(this, globalCtx, textId)) {
|
||||
gSaveContext.infTable[25] |= 0x20;
|
||||
func_800F5C64(NA_BGM_OWL);
|
||||
Audio_PlayFanfare(NA_BGM_OWL);
|
||||
this->actionFunc = func_80ACB148;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80ACB22C(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
Audio_QueueSeqCmd(0x110000FF);
|
||||
func_80ACA5C8(this);
|
||||
this->actionFunc = func_80ACC30C;
|
||||
|
@ -609,7 +609,7 @@ void func_80ACB22C(EnOwl* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80ACB274(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
Audio_QueueSeqCmd(0x110000FF);
|
||||
this->actionFunc = EnOwl_WaitDeathMountainShortcut;
|
||||
}
|
||||
|
@ -620,26 +620,26 @@ void EnOwl_WaitDeathMountainShortcut(EnOwl* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (!gSaveContext.magicAcquired) {
|
||||
if (func_80ACA558(this, globalCtx, 0x3062)) {
|
||||
func_800F5C64(NA_BGM_OWL);
|
||||
Audio_PlayFanfare(NA_BGM_OWL);
|
||||
this->actionFunc = func_80ACB274;
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (func_80ACA558(this, globalCtx, 0x3063)) {
|
||||
func_800F5C64(NA_BGM_OWL);
|
||||
Audio_PlayFanfare(NA_BGM_OWL);
|
||||
this->actionFunc = func_80ACB22C;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_80ACB344(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4 && func_80106BC8(globalCtx)) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE && Message_ShouldAdvance(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case OWL_REPEAT:
|
||||
func_8010B720(globalCtx, 0x607A);
|
||||
Message_ContinueTextbox(globalCtx, 0x607A);
|
||||
break;
|
||||
case OWL_OK:
|
||||
func_8010B720(globalCtx, 0x607C);
|
||||
Message_ContinueTextbox(globalCtx, 0x607C);
|
||||
this->actionFunc = func_80ACA7E0;
|
||||
break;
|
||||
}
|
||||
|
@ -650,20 +650,20 @@ void func_80ACB3E0(EnOwl* this, GlobalContext* globalCtx) {
|
|||
EnOwl_LookAtLink(this, globalCtx);
|
||||
|
||||
if (EnOwl_CheckInitTalk(this, globalCtx, 0x6079, 360.0f, 2)) {
|
||||
func_800F5C64(NA_BGM_OWL);
|
||||
Audio_PlayFanfare(NA_BGM_OWL);
|
||||
this->actionFunc = func_80ACB344;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80ACB440(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4 && func_80106BC8(globalCtx)) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE && Message_ShouldAdvance(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case OWL_REPEAT:
|
||||
func_8010B720(globalCtx, 0x10C1);
|
||||
Message_ContinueTextbox(globalCtx, 0x10C1);
|
||||
this->actionFunc = func_80ACB4FC;
|
||||
break;
|
||||
case OWL_OK:
|
||||
func_8010B720(globalCtx, 0x10C3);
|
||||
Message_ContinueTextbox(globalCtx, 0x10C3);
|
||||
this->actionFunc = func_80ACA7E0;
|
||||
}
|
||||
|
||||
|
@ -673,8 +673,8 @@ void func_80ACB440(EnOwl* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80ACB4FC(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 5 && func_80106BC8(globalCtx)) {
|
||||
func_8010B720(globalCtx, 0x10C2);
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_ContinueTextbox(globalCtx, 0x10C2);
|
||||
this->actionFunc = func_80ACB440;
|
||||
this->actionFlags |= 2;
|
||||
func_80ACA71C(this);
|
||||
|
@ -685,20 +685,20 @@ void EnOwl_WaitLWPreSaria(EnOwl* this, GlobalContext* globalCtx) {
|
|||
EnOwl_LookAtLink(this, globalCtx);
|
||||
|
||||
if (EnOwl_CheckInitTalk(this, globalCtx, 0x10C0, 190.0f, 0)) {
|
||||
func_800F5C64(NA_BGM_OWL);
|
||||
Audio_PlayFanfare(NA_BGM_OWL);
|
||||
this->actionFunc = func_80ACB4FC;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80ACB5C4(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4 && func_80106BC8(globalCtx)) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE && Message_ShouldAdvance(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case OWL_REPEAT:
|
||||
func_8010B720(globalCtx, 0x10C5);
|
||||
Message_ContinueTextbox(globalCtx, 0x10C5);
|
||||
this->actionFunc = func_80ACB680;
|
||||
break;
|
||||
case OWL_OK:
|
||||
func_8010B720(globalCtx, 0x10C7);
|
||||
Message_ContinueTextbox(globalCtx, 0x10C7);
|
||||
this->actionFunc = func_80ACA7E0;
|
||||
break;
|
||||
}
|
||||
|
@ -709,8 +709,8 @@ void func_80ACB5C4(EnOwl* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80ACB680(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 5 && func_80106BC8(globalCtx)) {
|
||||
func_8010B720(globalCtx, 0x10C6);
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_ContinueTextbox(globalCtx, 0x10C6);
|
||||
this->actionFunc = func_80ACB5C4;
|
||||
this->actionFlags |= 2;
|
||||
func_80ACA71C(this);
|
||||
|
@ -721,7 +721,7 @@ void EnOwl_WaitLWPostSaria(EnOwl* this, GlobalContext* globalCtx) {
|
|||
EnOwl_LookAtLink(this, globalCtx);
|
||||
|
||||
if (EnOwl_CheckInitTalk(this, globalCtx, 0x10C4, 360.0f, 0)) {
|
||||
func_800F5C64(NA_BGM_OWL);
|
||||
Audio_PlayFanfare(NA_BGM_OWL);
|
||||
this->actionFunc = func_80ACB680;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -140,7 +140,7 @@ void EnPoDesert_WaitForPlayer(EnPoDesert* this, GlobalContext* globalCtx) {
|
|||
this->actor.shape.rot.y += 0x800;
|
||||
return;
|
||||
}
|
||||
func_8010B680(globalCtx, 0x600B, NULL);
|
||||
Message_StartTextbox(globalCtx, 0x600B, NULL);
|
||||
}
|
||||
EnPoDesert_SetupMoveToNextPoint(this);
|
||||
} else {
|
||||
|
|
|
@ -652,7 +652,7 @@ void func_80AD58D4(EnPoField* this, GlobalContext* globalCtx) {
|
|||
if (this->actionTimer != 0) {
|
||||
this->actionTimer--;
|
||||
}
|
||||
if (func_8002F194(&this->actor, globalCtx) != 0) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
EnPoField_SetupInteractWithSoul(this);
|
||||
return;
|
||||
}
|
||||
|
@ -697,8 +697,8 @@ void EnPoField_SoulInteract(EnPoField* this, GlobalContext* globalCtx) {
|
|||
} else {
|
||||
func_8002F974(&this->actor, NA_SE_EN_PO_BIG_CRY - SFX_FLAG);
|
||||
}
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4) {
|
||||
if (func_80106BC8(globalCtx) != 0) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE) {
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
Audio_StopSfxByPosAndId(&this->actor.projectedPos, NA_SE_EN_PO_BIG_CRY - SFX_FLAG);
|
||||
if (globalCtx->msgCtx.choiceIndex == 0) {
|
||||
if (Inventory_HasEmptyBottle()) {
|
||||
|
@ -719,10 +719,10 @@ void EnPoField_SoulInteract(EnPoField* this, GlobalContext* globalCtx) {
|
|||
this->actor.textId = 0x5007;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_PO_LAUGH);
|
||||
}
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
return;
|
||||
}
|
||||
} else if (func_8002F334(&this->actor, globalCtx) != 0) {
|
||||
} else if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
EnPoField_SetupSoulDisappear(this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -162,7 +162,7 @@ void EnPoRelay_CorrectY(EnPoRelay* this) {
|
|||
|
||||
void EnPoRelay_Idle(EnPoRelay* this, GlobalContext* globalCtx) {
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 0x100);
|
||||
if (func_8002F194(&this->actor, globalCtx) != 0) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->actor.flags &= ~0x10000;
|
||||
this->actionFunc = EnPoRelay_Talk;
|
||||
} else if (this->actor.xzDistToPlayer < 250.0f) {
|
||||
|
@ -175,7 +175,7 @@ void EnPoRelay_Idle(EnPoRelay* this, GlobalContext* globalCtx) {
|
|||
|
||||
void EnPoRelay_Talk(EnPoRelay* this, GlobalContext* globalCtx) {
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 0x100);
|
||||
if (func_8002F334(&this->actor, globalCtx) != 0) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
Actor_SetTextWithPrefix(globalCtx, &this->actor, 0x2F);
|
||||
this->textId = this->actor.textId;
|
||||
EnPoRelay_SetupRace(this);
|
||||
|
@ -257,7 +257,7 @@ void EnPoRelay_Race(EnPoRelay* this, GlobalContext* globalCtx) {
|
|||
|
||||
void EnPoRelay_EndRace(EnPoRelay* this, GlobalContext* globalCtx) {
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.y, -0x4000, 0x800);
|
||||
if (func_8002F194(&this->actor, globalCtx) != 0) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->actionFunc = EnPoRelay_Talk2;
|
||||
} else if (globalCtx->roomCtx.curRoom.num == 5) {
|
||||
Actor_Kill(&this->actor);
|
||||
|
@ -271,17 +271,17 @@ void EnPoRelay_EndRace(EnPoRelay* this, GlobalContext* globalCtx) {
|
|||
|
||||
void EnPoRelay_Talk2(EnPoRelay* this, GlobalContext* globalCtx) {
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 0x100);
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 5) {
|
||||
if (func_80106BC8(globalCtx) != 0) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) {
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
if (this->hookshotSlotFull != 0) {
|
||||
Actor_SetTextWithPrefix(globalCtx, &this->actor, 0x2E);
|
||||
} else {
|
||||
Actor_SetTextWithPrefix(globalCtx, &this->actor, 0x2D);
|
||||
}
|
||||
this->textId = this->actor.textId;
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
}
|
||||
} else if (func_8002F334(&this->actor, globalCtx) != 0) {
|
||||
} else if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
gSaveContext.timer1State = 0;
|
||||
this->actionTimer = 0;
|
||||
this->actionFunc = EnPoRelay_DisappearAndReward;
|
||||
|
|
|
@ -767,7 +767,7 @@ void func_80ADFE80(EnPoh* this, GlobalContext* globalCtx) {
|
|||
if (this->unk_198 != 0) {
|
||||
this->unk_198--;
|
||||
}
|
||||
if (func_8002F194(&this->actor, globalCtx) != 0) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
if (this->actor.params >= EN_POH_SHARP) {
|
||||
func_80ADE9BC(this);
|
||||
} else {
|
||||
|
@ -814,8 +814,8 @@ void EnPoh_TalkRegular(EnPoh* this, GlobalContext* globalCtx) {
|
|||
} else {
|
||||
func_8002F974(&this->actor, NA_SE_EN_PO_BIG_CRY - SFX_FLAG);
|
||||
}
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4) {
|
||||
if (func_80106BC8(globalCtx) != 0) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE) {
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
Audio_StopSfxByPosAndId(&this->actor.projectedPos, NA_SE_EN_PO_BIG_CRY - SFX_FLAG);
|
||||
if (globalCtx->msgCtx.choiceIndex == 0) {
|
||||
if (Inventory_HasEmptyBottle()) {
|
||||
|
@ -830,24 +830,24 @@ void EnPoh_TalkRegular(EnPoh* this, GlobalContext* globalCtx) {
|
|||
this->actor.textId = 0x5007;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_PO_LAUGH);
|
||||
}
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
}
|
||||
} else if (func_8002F334(&this->actor, globalCtx) != 0) {
|
||||
} else if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
func_80ADE950(this, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void EnPoh_TalkComposer(EnPoh* this, GlobalContext* globalCtx) {
|
||||
func_8002F974(&this->actor, NA_SE_EN_PO_BIG_CRY - SFX_FLAG);
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4) {
|
||||
if (func_80106BC8(globalCtx) != 0) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE) {
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
if (globalCtx->msgCtx.choiceIndex == 0) {
|
||||
if (!Flags_GetSwitch(globalCtx, 0xB) && !Flags_GetSwitch(globalCtx, 0xA)) {
|
||||
this->actor.textId = 0x5010;
|
||||
} else {
|
||||
this->actor.textId = 0x5014;
|
||||
}
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
} else {
|
||||
if (this->actor.params == EN_POH_SHARP) {
|
||||
Flags_SetSwitch(globalCtx, 0xB);
|
||||
|
@ -857,7 +857,7 @@ void EnPoh_TalkComposer(EnPoh* this, GlobalContext* globalCtx) {
|
|||
func_80ADE950(this, 1);
|
||||
}
|
||||
}
|
||||
} else if (func_8002F334(&this->actor, globalCtx) != 0) {
|
||||
} else if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
if (this->actor.textId == 0x5000) {
|
||||
Flags_SetSwitch(globalCtx, 9);
|
||||
}
|
||||
|
|
|
@ -314,13 +314,13 @@ void EnRr_SetupReleasePlayer(EnRr* this, GlobalContext* globalCtx) {
|
|||
player->actor.parent = NULL;
|
||||
switch (EnRr_GetMessage(shield, tunic)) {
|
||||
case RR_MESSAGE_SHIELD:
|
||||
func_8010B680(globalCtx, 0x305F, NULL);
|
||||
Message_StartTextbox(globalCtx, 0x305F, NULL);
|
||||
break;
|
||||
case RR_MESSAGE_TUNIC:
|
||||
func_8010B680(globalCtx, 0x3060, NULL);
|
||||
Message_StartTextbox(globalCtx, 0x3060, NULL);
|
||||
break;
|
||||
case RR_MESSAGE_TUNIC | RR_MESSAGE_SHIELD:
|
||||
func_8010B680(globalCtx, 0x3061, NULL);
|
||||
Message_StartTextbox(globalCtx, 0x3061, NULL);
|
||||
break;
|
||||
}
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) "%s[%d] : Rr_Catch_Cancel" VT_RST "\n", "../z_en_rr.c", 650);
|
||||
|
|
|
@ -333,11 +333,11 @@ Actor* func_80AEB124(GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
s32 func_80AEB174(GlobalContext* globalCtx) {
|
||||
return (func_8010BDBC(&globalCtx->msgCtx) == 5) && (func_80106BC8(globalCtx));
|
||||
return (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx);
|
||||
}
|
||||
|
||||
s32 func_80AEB1B4(GlobalContext* globalCtx) {
|
||||
return func_8010BDBC(&globalCtx->msgCtx) == 2;
|
||||
return Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING;
|
||||
}
|
||||
|
||||
void func_80AEB1D8(EnRu1* this) {
|
||||
|
@ -1493,7 +1493,7 @@ void func_80AEE050(EnRu1* this) {
|
|||
}
|
||||
|
||||
s32 func_80AEE264(EnRu1* this, GlobalContext* globalCtx) {
|
||||
if (!func_8002F194(&this->actor, globalCtx)) {
|
||||
if (!Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->actor.flags |= 9;
|
||||
if ((gSaveContext.infTable[20] & 8)) {
|
||||
this->actor.textId = 0x404E;
|
||||
|
@ -1537,7 +1537,7 @@ s32 func_80AEE394(EnRu1* this, GlobalContext* globalCtx) {
|
|||
floorBgId = this->actor.floorBgId; // necessary match, can't move this out of this block unfortunately
|
||||
dynaPolyActor = DynaPoly_GetActor(colCtx, floorBgId);
|
||||
if (dynaPolyActor != NULL && dynaPolyActor->actor.id == ACTOR_BG_BDAN_OBJECTS &&
|
||||
dynaPolyActor->actor.params == 0 && !Player_InCsMode(globalCtx) && globalCtx->msgCtx.unk_E300 == 0) {
|
||||
dynaPolyActor->actor.params == 0 && !Player_InCsMode(globalCtx) && globalCtx->msgCtx.msgLength == 0) {
|
||||
func_80AEE02C(this);
|
||||
globalCtx->csCtx.segment = &D_80AF10A4;
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
|
@ -1812,7 +1812,7 @@ s32 func_80AEF0BC(EnRu1* this, GlobalContext* globalCtx) {
|
|||
if (gSaveContext.infTable[20] & 4) {
|
||||
frameCount = Animation_GetLastFrame(&gRutoChildSitAnim);
|
||||
Animation_Change(&this->skelAnime, &gRutoChildSitAnim, 1.0f, 0, frameCount, ANIMMODE_ONCE, -8.0f);
|
||||
globalCtx->msgCtx.msgMode = 0x37;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_PAUSED;
|
||||
this->action = 26;
|
||||
this->actor.flags &= ~0x9;
|
||||
return true;
|
||||
|
@ -1828,7 +1828,7 @@ void func_80AEF170(EnRu1* this, GlobalContext* globalCtx, s32 cond) {
|
|||
|
||||
void func_80AEF188(EnRu1* this, GlobalContext* globalCtx) {
|
||||
if (func_80AEB174(globalCtx) && !func_80AEF0BC(this, globalCtx)) {
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
gSaveContext.infTable[20] |= 4;
|
||||
this->action = 24;
|
||||
}
|
||||
|
@ -1838,7 +1838,7 @@ void func_80AEF1F0(EnRu1* this, GlobalContext* globalCtx, UNK_TYPE arg2) {
|
|||
if (arg2 != 0) {
|
||||
Animation_Change(&this->skelAnime, &gRutoChildSittingAnim, 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(&gRutoChildSittingAnim), ANIMMODE_LOOP, 0.0f);
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
gSaveContext.infTable[20] |= 8;
|
||||
func_80AED6DC(this, globalCtx);
|
||||
func_8002F580(&this->actor, globalCtx);
|
||||
|
@ -2013,7 +2013,7 @@ void func_80AEF930(EnRu1* this, GlobalContext* globalCtx) {
|
|||
if (func_80AEB104(this) == 3) {
|
||||
this->actor.flags |= 9;
|
||||
this->actor.textId = 0x4048;
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
func_80AEF4A8(this, globalCtx);
|
||||
this->action = 43;
|
||||
this->drawConfig = 0;
|
||||
|
@ -2124,7 +2124,7 @@ void func_80AEFD38(EnRu1* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
s32 func_80AEFDC0(EnRu1* this, GlobalContext* globalCtx) {
|
||||
if (!func_8002F194(&this->actor, globalCtx)) {
|
||||
if (!Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->actor.flags |= 9;
|
||||
this->actor.textId = Text_GetFaceReaction(globalCtx, 0x1F);
|
||||
if (this->actor.textId == 0) {
|
||||
|
@ -2137,7 +2137,7 @@ s32 func_80AEFDC0(EnRu1* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
s32 func_80AEFE38(EnRu1* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 2) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
this->actor.flags &= ~0x9;
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -609,8 +609,8 @@ void func_80AF3744(EnRu2* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
void func_80AF37AC() {
|
||||
func_800F5C64(NA_BGM_APPEAR);
|
||||
void func_80AF37AC(void) {
|
||||
Audio_PlayFanfare(NA_BGM_APPEAR);
|
||||
}
|
||||
|
||||
void func_80AF37CC(EnRu2* this) {
|
||||
|
@ -652,7 +652,7 @@ void func_80AF390C(EnRu2* this, GlobalContext* globalCtx) {
|
|||
func_80AF37AC();
|
||||
} else if (*unk_2C4 > kREG(4) + 50.0f) {
|
||||
this->actor.textId = 0x403E;
|
||||
func_8010B680(globalCtx, this->actor.textId, NULL);
|
||||
Message_StartTextbox(globalCtx, this->actor.textId, NULL);
|
||||
this->action = 17;
|
||||
}
|
||||
}
|
||||
|
@ -666,10 +666,10 @@ void func_80AF39DC(EnRu2* this, GlobalContext* globalCtx) {
|
|||
s32 pad3;
|
||||
|
||||
msgCtx = &globalCtx->msgCtx;
|
||||
dialogState = func_8010BDBC(msgCtx);
|
||||
dialogState = Message_GetState(msgCtx);
|
||||
|
||||
if (dialogState == 3) {
|
||||
if (this->unk_2C3 != 3) {
|
||||
if (dialogState == TEXT_STATE_DONE_FADING) {
|
||||
if (this->unk_2C3 != TEXT_STATE_DONE_FADING) {
|
||||
// "I'm Komatsu!" (cinema scene dev)
|
||||
osSyncPrintf("おれが小松だ! \n");
|
||||
this->unk_2C2++;
|
||||
|
@ -686,7 +686,7 @@ void func_80AF39DC(EnRu2* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
this->unk_2C3 = dialogState;
|
||||
if (func_8010BDBC(msgCtx) == 2) {
|
||||
if (Message_GetState(msgCtx) == TEXT_STATE_CLOSING) {
|
||||
this->action = 18;
|
||||
func_8005B1A4(GET_ACTIVE_CAM(globalCtx));
|
||||
}
|
||||
|
@ -789,7 +789,7 @@ void EnRu2_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
this->unk_2C2 = 0;
|
||||
this->unk_2C3 = 3;
|
||||
this->unk_2C3 = TEXT_STATE_DONE_FADING;
|
||||
}
|
||||
|
||||
void func_80AF3F14(EnRu2* this, GlobalContext* globalCtx) {
|
||||
|
|
|
@ -100,9 +100,10 @@ static struct_80034EC0_Entry sAnimations[] = {
|
|||
};
|
||||
|
||||
s16 func_80AF5560(EnSa* this, GlobalContext* globalCtx) {
|
||||
s16 textState = func_8010BDBC(&globalCtx->msgCtx);
|
||||
s16 textState = Message_GetState(&globalCtx->msgCtx);
|
||||
|
||||
if (this->unk_209 == 10 || this->unk_209 == 5 || this->unk_209 == 2 || this->unk_209 == 1) {
|
||||
if (this->unk_209 == TEXT_STATE_AWAITING_NEXT || this->unk_209 == TEXT_STATE_EVENT ||
|
||||
this->unk_209 == TEXT_STATE_CLOSING || this->unk_209 == TEXT_STATE_DONE_HAS_NEXT) {
|
||||
if (textState != this->unk_209) {
|
||||
this->unk_208++;
|
||||
}
|
||||
|
@ -123,7 +124,7 @@ u16 func_80AF55E0(GlobalContext* globalCtx, Actor* thisx) {
|
|||
}
|
||||
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) {
|
||||
this->unk_208 = 0;
|
||||
this->unk_209 = 0;
|
||||
this->unk_209 = TEXT_STATE_NONE;
|
||||
if (gSaveContext.infTable[0] & 0x20) {
|
||||
return 0x1048;
|
||||
} else {
|
||||
|
@ -132,7 +133,7 @@ u16 func_80AF55E0(GlobalContext* globalCtx, Actor* thisx) {
|
|||
}
|
||||
if (gSaveContext.eventChkInf[0] & 4) {
|
||||
this->unk_208 = 0;
|
||||
this->unk_209 = 0;
|
||||
this->unk_209 = TEXT_STATE_NONE;
|
||||
if (gSaveContext.infTable[0] & 8) {
|
||||
return 0x1032;
|
||||
} else {
|
||||
|
@ -141,7 +142,7 @@ u16 func_80AF55E0(GlobalContext* globalCtx, Actor* thisx) {
|
|||
}
|
||||
if (gSaveContext.infTable[0] & 1) {
|
||||
this->unk_208 = 0;
|
||||
this->unk_209 = 0;
|
||||
this->unk_209 = TEXT_STATE_NONE;
|
||||
if (gSaveContext.infTable[0] & 2) {
|
||||
return 0x1003;
|
||||
} else {
|
||||
|
@ -156,7 +157,7 @@ s16 func_80AF56F4(GlobalContext* globalCtx, Actor* thisx) {
|
|||
EnSa* this = THIS;
|
||||
|
||||
switch (func_80AF5560(this, globalCtx)) {
|
||||
case 2:
|
||||
case TEXT_STATE_CLOSING:
|
||||
switch (this->actor.textId) {
|
||||
case 0x1002:
|
||||
gSaveContext.infTable[0] |= 2;
|
||||
|
@ -176,14 +177,14 @@ s16 func_80AF56F4(GlobalContext* globalCtx, Actor* thisx) {
|
|||
break;
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
case 1:
|
||||
case 3:
|
||||
case 4:
|
||||
case 5:
|
||||
case 7:
|
||||
case 8:
|
||||
case 9:
|
||||
case TEXT_STATE_NONE:
|
||||
case TEXT_STATE_DONE_HAS_NEXT:
|
||||
case TEXT_STATE_DONE_FADING:
|
||||
case TEXT_STATE_CHOICE:
|
||||
case TEXT_STATE_EVENT:
|
||||
case TEXT_STATE_SONG_DEMO_DONE:
|
||||
case TEXT_STATE_8:
|
||||
case TEXT_STATE_9:
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
|
|
|
@ -96,8 +96,8 @@ void func_80AFB768(EnSi* this, GlobalContext* globalCtx) {
|
|||
this->collider.base.ocFlags2 &= ~OC2_HIT_PLAYER;
|
||||
Item_Give(globalCtx, ITEM_SKULL_TOKEN);
|
||||
player->actor.freezeTimer = 10;
|
||||
func_8010B680(globalCtx, 0xB4, 0);
|
||||
func_800F5C64(NA_BGM_SMALL_ITEM_GET);
|
||||
Message_StartTextbox(globalCtx, 0xB4, NULL);
|
||||
Audio_PlayFanfare(NA_BGM_SMALL_ITEM_GET);
|
||||
this->actionFunc = func_80AFB950;
|
||||
} else {
|
||||
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||||
|
@ -118,8 +118,8 @@ void func_80AFB89C(EnSi* this, GlobalContext* globalCtx) {
|
|||
if ((this->actor.flags & 0x2000) != 0x2000) {
|
||||
Item_Give(globalCtx, ITEM_SKULL_TOKEN);
|
||||
player->actor.freezeTimer = 10;
|
||||
func_8010B680(globalCtx, 0xB4, 0);
|
||||
func_800F5C64(NA_BGM_SMALL_ITEM_GET);
|
||||
Message_StartTextbox(globalCtx, 0xB4, NULL);
|
||||
Audio_PlayFanfare(NA_BGM_SMALL_ITEM_GET);
|
||||
this->actionFunc = func_80AFB950;
|
||||
}
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ void func_80AFB89C(EnSi* this, GlobalContext* globalCtx) {
|
|||
void func_80AFB950(EnSi* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) != 2) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) != TEXT_STATE_CLOSING) {
|
||||
player->actor.freezeTimer = 10;
|
||||
} else {
|
||||
SET_GS_FLAGS((this->actor.params & 0x1F00) >> 8, this->actor.params & 0xFF);
|
||||
|
|
|
@ -662,7 +662,7 @@ void EnSkj_Fade(EnSkj* this, GlobalContext* globalCtx) {
|
|||
u32 alpha = this->alpha;
|
||||
|
||||
if (this->unk_2D6 == 2) {
|
||||
globalCtx->msgCtx.unk_E3EE = 0;
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_00;
|
||||
this->unk_2D6 = 0;
|
||||
}
|
||||
|
||||
|
@ -917,7 +917,7 @@ void EnSkj_WaitInRange(EnSkj* this, GlobalContext* globalCtx) {
|
|||
player->actor.world.pos.y = sSmallStumpSkullKid.skullkid->actor.world.pos.y;
|
||||
player->actor.world.pos.z = sSmallStumpSkullKid.skullkid->actor.world.pos.z;
|
||||
EnSkj_TurnPlayer(sSmallStumpSkullKid.skullkid, player);
|
||||
func_8010BD88(globalCtx, 0x22);
|
||||
func_8010BD88(globalCtx, OCARINA_ACTION_CHECK_SARIA);
|
||||
EnSkj_SetupWaitForSong(this);
|
||||
} else if (D_80B01EA0 != 0) {
|
||||
player->actor.world.pos.x = sSmallStumpSkullKid.skullkid->actor.world.pos.x;
|
||||
|
@ -960,54 +960,54 @@ void EnSkj_WaitForSong(EnSkj* this, GlobalContext* globalCtx) {
|
|||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
// Played a song thats not Saria's song
|
||||
if (!(gSaveContext.itemGetInf[1] & 0x40) &&
|
||||
((globalCtx->msgCtx.msgMode == 0xE) || (globalCtx->msgCtx.msgMode == 0xF))) {
|
||||
globalCtx->msgCtx.unk_E3EE = 4;
|
||||
func_80106CCC(globalCtx);
|
||||
if (!(gSaveContext.itemGetInf[1] & 0x40) && ((globalCtx->msgCtx.msgMode == MSGMODE_OCARINA_FAIL) ||
|
||||
(globalCtx->msgCtx.msgMode == MSGMODE_OCARINA_FAIL_NO_TEXT))) {
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
Message_CloseTextbox(globalCtx);
|
||||
player->unk_6A8 = &this->actor;
|
||||
func_8002F2CC(&this->actor, globalCtx, EnSkj_GetItemXzRange(this));
|
||||
EnSkj_SetupWrongSong(this);
|
||||
} else {
|
||||
if ((globalCtx->msgCtx.msgMode == 0xD) && (this->unk_2D6 == 0)) {
|
||||
if ((globalCtx->msgCtx.msgMode == MSGMODE_OCARINA_CORRECT_PLAYBACK) && (this->unk_2D6 == 0)) {
|
||||
this->unk_2D6 = 1;
|
||||
EnSkj_ChangeAnim(this, SKJ_ANIM_PLAY_FLUTE);
|
||||
} else if ((this->unk_2D6 != 0) && (globalCtx->msgCtx.msgMode == 0x1A)) {
|
||||
} else if ((this->unk_2D6 != 0) && (globalCtx->msgCtx.msgMode == MSGMODE_SONG_DEMONSTRATION_DONE)) {
|
||||
this->unk_2D6 = 0;
|
||||
EnSkj_ChangeAnim(this, SKJ_ANIM_WAIT);
|
||||
}
|
||||
if (globalCtx->msgCtx.unk_E3EE == 4) {
|
||||
globalCtx->msgCtx.unk_E3EE = 0;
|
||||
if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_04) {
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_00;
|
||||
this->unk_2D6 = 0;
|
||||
EnSkj_ChangeAnim(this, SKJ_ANIM_WAIT);
|
||||
EnSkj_SetupAction(this, SKJ_ACTION_SARIA_SONG_WAIT_IN_RANGE);
|
||||
} else if (globalCtx->msgCtx.unk_E3EE == 3) {
|
||||
} else if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_03) {
|
||||
if (!(gSaveContext.itemGetInf[1] & 0x40)) {
|
||||
// Saria's song has been played for the first titme
|
||||
globalCtx->msgCtx.unk_E3EE = 4;
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
player->unk_6A8 = &this->actor;
|
||||
func_8002F2CC(&this->actor, globalCtx, EnSkj_GetItemXzRange(this));
|
||||
this->textId = 0x10BB;
|
||||
EnSkj_SetupAfterSong(this);
|
||||
} else {
|
||||
globalCtx->msgCtx.unk_E3EE = 5;
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_05;
|
||||
}
|
||||
} else if (globalCtx->msgCtx.unk_E3EE == 2) {
|
||||
} else if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_02) {
|
||||
player->stateFlags2 &= ~0x1000000;
|
||||
Actor_Kill(&this->actor);
|
||||
} else if (globalCtx->msgCtx.unk_E3EE == 1) {
|
||||
} else if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_01) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
} else {
|
||||
if (globalCtx->msgCtx.unk_E3EE >= 5) {
|
||||
if (globalCtx->msgCtx.ocarinaMode >= OCARINA_MODE_05) {
|
||||
gSaveContext.sunsSongState = 0;
|
||||
if (gSaveContext.itemGetInf[1] & 0x40) {
|
||||
globalCtx->msgCtx.unk_E3EE = 4;
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
player->unk_6A8 = &this->actor;
|
||||
func_8002F2CC(&this->actor, globalCtx, EnSkj_GetItemXzRange(this));
|
||||
this->textId = 0x10BD;
|
||||
EnSkj_SetupAfterSong(this);
|
||||
} else {
|
||||
globalCtx->msgCtx.unk_E3EE = 4;
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
player->unk_6A8 = &this->actor;
|
||||
func_8002F2CC(&this->actor, globalCtx, EnSkj_GetItemXzRange(this));
|
||||
EnSkj_SetupWrongSong(this);
|
||||
|
@ -1038,7 +1038,7 @@ void EnSkj_SetupTalk(EnSkj* this) {
|
|||
void EnSkj_SariaSongTalk(EnSkj* this, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 6) && (func_80106BC8(globalCtx) != 0)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) {
|
||||
if (gSaveContext.itemGetInf[1] & 0x40) {
|
||||
EnSkj_SetupWaitInRange(this);
|
||||
} else {
|
||||
|
@ -1067,7 +1067,7 @@ void EnSkj_SetupPostSariasSong(EnSkj* this) {
|
|||
}
|
||||
|
||||
void EnSkj_ChangeModeAfterSong(EnSkj* this, GlobalContext* globalCtx) {
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 6) && (func_80106BC8(globalCtx) != 0)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) {
|
||||
gSaveContext.itemGetInf[1] |= 0x40;
|
||||
EnSkj_SetNaviId(this);
|
||||
EnSkj_SetupWaitInRange(this);
|
||||
|
@ -1079,10 +1079,10 @@ void EnSkj_SetupMaskTrade(EnSkj* this) {
|
|||
}
|
||||
|
||||
void EnSkj_StartMaskTrade(EnSkj* this, GlobalContext* globalCtx) {
|
||||
u8 sp1F = func_8010BDBC(&globalCtx->msgCtx);
|
||||
u8 sp1F = Message_GetState(&globalCtx->msgCtx);
|
||||
|
||||
func_8002DF54(globalCtx, &this->actor, 1);
|
||||
if ((sp1F == 6) && (func_80106BC8(globalCtx) != 0)) {
|
||||
if ((sp1F == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) {
|
||||
EnSkj_JumpFromStump(this);
|
||||
}
|
||||
}
|
||||
|
@ -1136,40 +1136,38 @@ void EnSkj_WalkToPlayer(EnSkj* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnSkj_SetupAskForMask(EnSkj* this, GlobalContext* globalCtx) {
|
||||
func_8010B680(globalCtx, 0x101C, &this->actor);
|
||||
Message_StartTextbox(globalCtx, 0x101C, &this->actor);
|
||||
EnSkj_ChangeAnim(this, SKJ_ANIM_WAIT);
|
||||
EnSkj_SetupAction(this, SKJ_ACTION_SARIA_SONG_ASK_FOR_MASK);
|
||||
}
|
||||
|
||||
void EnSkj_AskForMask(EnSkj* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4) {
|
||||
if (func_80106BC8(globalCtx) != 0) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0: // Yes
|
||||
EnSkj_SetupTakeMask(this, globalCtx);
|
||||
break;
|
||||
case 1: // No
|
||||
func_8010B720(globalCtx, 0x101D);
|
||||
EnSkj_SetupWaitForMaskTextClear(this);
|
||||
break;
|
||||
}
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE && Message_ShouldAdvance(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0: // Yes
|
||||
EnSkj_SetupTakeMask(this, globalCtx);
|
||||
break;
|
||||
case 1: // No
|
||||
Message_ContinueTextbox(globalCtx, 0x101D);
|
||||
EnSkj_SetupWaitForMaskTextClear(this);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EnSkj_SetupTakeMask(EnSkj* this, GlobalContext* globalCtx) {
|
||||
func_8010B720(globalCtx, 0x101E);
|
||||
Message_ContinueTextbox(globalCtx, 0x101E);
|
||||
EnSkj_SetupAction(this, SKJ_ACTION_SARIA_SONG_TAKE_MASK);
|
||||
}
|
||||
|
||||
void EnSkj_TakeMask(EnSkj* this, GlobalContext* globalCtx) {
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 6) && (func_80106BC8(globalCtx) != 0)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) {
|
||||
Rupees_ChangeBy(10);
|
||||
gSaveContext.itemGetInf[3] |= 0x200;
|
||||
EnSkj_SetNaviId(this);
|
||||
Player_UnsetMask(globalCtx);
|
||||
Item_Give(globalCtx, ITEM_SOLD_OUT);
|
||||
func_8010B720(globalCtx, 0x101F);
|
||||
Message_ContinueTextbox(globalCtx, 0x101F);
|
||||
EnSkj_SetupWaitForMaskTextClear(this);
|
||||
}
|
||||
}
|
||||
|
@ -1179,7 +1177,7 @@ void EnSkj_SetupWaitForMaskTextClear(EnSkj* this) {
|
|||
}
|
||||
|
||||
void EnSkj_WaitForMaskTextClear(EnSkj* this, GlobalContext* globalCtx) {
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 6) && (func_80106BC8(globalCtx) != 0)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) {
|
||||
func_8002DF54(globalCtx, &this->actor, 7);
|
||||
this->backfilpFlag = 1;
|
||||
EnSkj_Backflip(this);
|
||||
|
@ -1205,10 +1203,10 @@ void EnSkj_SetupWaitForTextClear(EnSkj* this) {
|
|||
}
|
||||
|
||||
void EnSkj_SariasSongWaitForTextClear(EnSkj* this, GlobalContext* globalCtx) {
|
||||
u8 state = func_8010BDBC(&globalCtx->msgCtx);
|
||||
u8 state = Message_GetState(&globalCtx->msgCtx);
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (state == 6 && func_80106BC8(globalCtx)) {
|
||||
if (state == TEXT_STATE_DONE && Message_ShouldAdvance(globalCtx)) {
|
||||
EnSkj_SetupWaitInRange(this);
|
||||
player->stateFlags2 |= 0x800000;
|
||||
player->unk_6A8 = (Actor*)sSmallStumpSkullKid.skullkid;
|
||||
|
@ -1295,7 +1293,7 @@ void EnSkj_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
s32 pad;
|
||||
EnSkj* this = THIS;
|
||||
|
||||
D_80B01EA0 = func_8002F194(&this->actor, globalCtx);
|
||||
D_80B01EA0 = Actor_ProcessTalkRequest(&this->actor, globalCtx);
|
||||
|
||||
this->timer++;
|
||||
|
||||
|
@ -1351,7 +1349,7 @@ void EnSkj_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void EnSkj_SariasSongShortStumpUpdate(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnSkj* this = THIS;
|
||||
|
||||
D_80B01EA0 = func_8002F194(&this->actor, globalCtx);
|
||||
D_80B01EA0 = Actor_ProcessTalkRequest(&this->actor, globalCtx);
|
||||
|
||||
if (BREG(0) != 0) {
|
||||
DebugDisplay_AddObject(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z,
|
||||
|
@ -1378,7 +1376,7 @@ void EnSkj_SetupWaitForOcarina(EnSkj* this, GlobalContext* globalCtx) {
|
|||
func_800F5BF0(4);
|
||||
EnSkj_TurnPlayer(this, player);
|
||||
player->unk_6A8 = &this->actor;
|
||||
func_8010B680(globalCtx, 0x10BE, &this->actor);
|
||||
Message_StartTextbox(globalCtx, 0x10BE, &this->actor);
|
||||
this->actionFunc = EnSkj_StartOcarinaMinigame;
|
||||
} else {
|
||||
this->actionFunc = EnSkj_WaitForOcarina;
|
||||
|
@ -1394,7 +1392,7 @@ void EnSkj_WaitForOcarina(EnSkj* this, GlobalContext* globalCtx) {
|
|||
func_800F5BF0(4);
|
||||
EnSkj_TurnPlayer(this, player);
|
||||
player->unk_6A8 = &this->actor;
|
||||
func_8010B680(globalCtx, 0x10BE, &this->actor);
|
||||
Message_StartTextbox(globalCtx, 0x10BE, &this->actor);
|
||||
this->actionFunc = EnSkj_StartOcarinaMinigame;
|
||||
} else if (EnSkj_RangeCheck(player, this)) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
|
@ -1402,13 +1400,13 @@ void EnSkj_WaitForOcarina(EnSkj* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnSkj_StartOcarinaMinigame(EnSkj* this, GlobalContext* globalCtx) {
|
||||
u8 dialogState = func_8010BDBC(&globalCtx->msgCtx);
|
||||
u8 dialogState = Message_GetState(&globalCtx->msgCtx);
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
EnSkj_TurnPlayer(this, player);
|
||||
|
||||
if (dialogState == 2) {
|
||||
func_8010BD58(globalCtx, 0x2E); // play song?
|
||||
if (dialogState == TEXT_STATE_CLOSING) {
|
||||
func_8010BD58(globalCtx, OCARINA_ACTION_MEMORY_GAME);
|
||||
if (sOcarinaMinigameSkullKids[SKULL_KID_LEFT].skullkid != NULL) {
|
||||
sOcarinaMinigameSkullKids[SKULL_KID_LEFT].skullkid->minigameState = SKULL_KID_OCARINA_PLAY_NOTES;
|
||||
}
|
||||
|
@ -1422,24 +1420,24 @@ void EnSkj_WaitForPlayback(EnSkj* this, GlobalContext* globalCtx) {
|
|||
|
||||
EnSkj_TurnPlayer(this, player);
|
||||
|
||||
if (globalCtx->msgCtx.unk_E3EE == 3) { // failed the game
|
||||
func_80106CCC(globalCtx);
|
||||
globalCtx->msgCtx.unk_E3EE = 4;
|
||||
if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_03) { // failed the game
|
||||
Message_CloseTextbox(globalCtx);
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
player->unk_6A8 = &this->actor;
|
||||
func_8002F2CC(&this->actor, globalCtx, 26.0f);
|
||||
this->textId = 0x102D;
|
||||
this->actionFunc = EnSkj_FailedMiniGame;
|
||||
} else if (globalCtx->msgCtx.unk_E3EE == 0xF) { // completed the game
|
||||
} else if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_0F) { // completed the game
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
func_80106CCC(globalCtx);
|
||||
globalCtx->msgCtx.unk_E3EE = 4;
|
||||
Message_CloseTextbox(globalCtx);
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
player->unk_6A8 = &this->actor;
|
||||
func_8002F2CC(&this->actor, globalCtx, 26.0f);
|
||||
this->textId = 0x10BF;
|
||||
this->actionFunc = EnSkj_WonOcarinaMiniGame;
|
||||
} else { // playing the game
|
||||
switch (globalCtx->msgCtx.msgMode) {
|
||||
case 0x2B:
|
||||
case MSGMODE_MEMORY_GAME_LEFT_SKULLKID_WAIT:
|
||||
if (sOcarinaMinigameSkullKids[SKULL_KID_LEFT].skullkid != NULL) {
|
||||
sOcarinaMinigameSkullKids[SKULL_KID_LEFT].skullkid->minigameState = SKULL_KID_OCRAINA_WAIT;
|
||||
}
|
||||
|
@ -1448,45 +1446,42 @@ void EnSkj_WaitForPlayback(EnSkj* this, GlobalContext* globalCtx) {
|
|||
sOcarinaMinigameSkullKids[SKULL_KID_RIGHT].skullkid->minigameState =
|
||||
SKULL_KID_OCARINA_PLAY_NOTES;
|
||||
}
|
||||
func_80106AA8(globalCtx);
|
||||
Message_UpdateOcarinaGame(globalCtx);
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x2D:
|
||||
case MSGMODE_MEMORY_GAME_RIGHT_SKULLKID_WAIT:
|
||||
if (sOcarinaMinigameSkullKids[SKULL_KID_RIGHT].skullkid != NULL) {
|
||||
sOcarinaMinigameSkullKids[SKULL_KID_RIGHT].skullkid->minigameState = SKULL_KID_OCRAINA_WAIT;
|
||||
}
|
||||
if (!Audio_IsSfxPlaying(NA_SE_SY_METRONOME)) {
|
||||
func_80106AA8(globalCtx);
|
||||
Message_UpdateOcarinaGame(globalCtx);
|
||||
this->songFailTimer = 160;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x2E:
|
||||
case MSGMODE_MEMORY_GAME_PLAYER_PLAYING:
|
||||
if (this->songFailTimer != 0) {
|
||||
this->songFailTimer--;
|
||||
} else { // took too long, game failed
|
||||
func_80078884(NA_SE_SY_OCARINA_ERROR);
|
||||
func_80106CCC(globalCtx);
|
||||
globalCtx->msgCtx.unk_E3EE = 4;
|
||||
Message_CloseTextbox(globalCtx);
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
player->unk_6A8 = &this->actor;
|
||||
func_8002F2CC(&this->actor, globalCtx, 26.0f);
|
||||
this->textId = 0x102D;
|
||||
this->actionFunc = EnSkj_FailedMiniGame;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x30:
|
||||
case MSGMODE_MEMORY_GAME_START_NEXT_ROUND:
|
||||
if (!Audio_IsSfxPlaying(NA_SE_SY_METRONOME)) {
|
||||
if (sOcarinaMinigameSkullKids[SKULL_KID_LEFT].skullkid != NULL) {
|
||||
sOcarinaMinigameSkullKids[SKULL_KID_LEFT].skullkid->minigameState =
|
||||
SKULL_KID_OCARINA_PLAY_NOTES;
|
||||
}
|
||||
this->songFailTimer = 160;
|
||||
func_800ED858(6); // related instrument sound (flute?)
|
||||
func_800ED93C(0xE, 1);
|
||||
globalCtx->msgCtx.msgMode = 0x2A;
|
||||
globalCtx->msgCtx.unk_E3E7 = 2;
|
||||
Audio_OcaSetInstrument(6); // related instrument sound (flute?)
|
||||
Audio_OcaSetSongPlayback(OCARINA_SONG_MEMORY_GAME + 1, 1);
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_MEMORY_GAME_LEFT_SKULLKID_PLAYING;
|
||||
globalCtx->msgCtx.stateTimer = 2;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -1502,20 +1497,20 @@ void EnSkj_FailedMiniGame(EnSkj* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnSkj_WaitForNextRound(EnSkj* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 6 && func_80106BC8(globalCtx)) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE && Message_ShouldAdvance(globalCtx)) {
|
||||
EnSkj_OfferNextRound(this, globalCtx);
|
||||
}
|
||||
}
|
||||
|
||||
void EnSkj_OfferNextRound(EnSkj* this, GlobalContext* globalCtx) {
|
||||
func_8010B720(globalCtx, 0x102E);
|
||||
Message_ContinueTextbox(globalCtx, 0x102E);
|
||||
this->actionFunc = EnSkj_WaitForOfferResponse;
|
||||
}
|
||||
|
||||
void EnSkj_WaitForOfferResponse(EnSkj* this, GlobalContext* globalCtx) {
|
||||
Player* player;
|
||||
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4 && func_80106BC8(globalCtx)) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE && Message_ShouldAdvance(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0: // yes
|
||||
player = GET_PLAYER(globalCtx);
|
||||
|
@ -1538,8 +1533,8 @@ void EnSkj_WonOcarinaMiniGame(EnSkj* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnSkj_WaitToGiveReward(EnSkj* this, GlobalContext* globalCtx) {
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 6) && (func_80106BC8(globalCtx))) {
|
||||
func_8002F434(&this->actor, globalCtx, sOcarinaGameRewards[gSaveContext.ocarinaGameReward], 26.0f, 26.0f);
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) {
|
||||
func_8002F434(&this->actor, globalCtx, sOcarinaGameRewards[gSaveContext.ocarinaGameRoundNum], 26.0f, 26.0f);
|
||||
this->actionFunc = EnSkj_GiveOcarinaGameReward;
|
||||
}
|
||||
}
|
||||
|
@ -1549,19 +1544,19 @@ void EnSkj_GiveOcarinaGameReward(EnSkj* this, GlobalContext* globalCtx) {
|
|||
this->actor.parent = NULL;
|
||||
this->actionFunc = EnSkj_FinishOcarinaGameRound;
|
||||
} else {
|
||||
func_8002F434(&this->actor, globalCtx, sOcarinaGameRewards[gSaveContext.ocarinaGameReward], 26.0f, 26.0f);
|
||||
func_8002F434(&this->actor, globalCtx, sOcarinaGameRewards[gSaveContext.ocarinaGameRoundNum], 26.0f, 26.0f);
|
||||
}
|
||||
}
|
||||
|
||||
void EnSkj_FinishOcarinaGameRound(EnSkj* this, GlobalContext* globalCtx) {
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 6) && (func_80106BC8(globalCtx))) {
|
||||
s32 ocarinaGameReward = gSaveContext.ocarinaGameReward;
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) {
|
||||
s32 ocarinaGameRoundNum = gSaveContext.ocarinaGameRoundNum;
|
||||
|
||||
if (gSaveContext.ocarinaGameReward < 3) {
|
||||
gSaveContext.ocarinaGameReward++;
|
||||
if (gSaveContext.ocarinaGameRoundNum < 3) {
|
||||
gSaveContext.ocarinaGameRoundNum++;
|
||||
}
|
||||
|
||||
if (ocarinaGameReward == 2) {
|
||||
if (ocarinaGameRoundNum == 2) {
|
||||
gSaveContext.itemGetInf[1] |= 0x80;
|
||||
this->actionFunc = EnSkj_CleanupOcarinaGame;
|
||||
} else {
|
||||
|
@ -1589,7 +1584,7 @@ void EnSkj_CleanupOcarinaGame(EnSkj* this, GlobalContext* globalCtx) {
|
|||
void EnSkj_OcarinaMinigameShortStumpUpdate(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnSkj* this = THIS;
|
||||
|
||||
D_80B01EA0 = func_8002F194(&this->actor, globalCtx);
|
||||
D_80B01EA0 = Actor_ProcessTalkRequest(&this->actor, globalCtx);
|
||||
this->timer++;
|
||||
|
||||
this->actor.focus.pos.x = 1230.0f;
|
||||
|
|
|
@ -657,14 +657,14 @@ void EnSsh_Wait(EnSsh* this, GlobalContext* globalCtx) {
|
|||
|
||||
void EnSsh_Talk(EnSsh* this, GlobalContext* globalCtx) {
|
||||
EnSsh_Bob(this, globalCtx);
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
this->actionFunc = EnSsh_Idle;
|
||||
}
|
||||
}
|
||||
|
||||
void EnSsh_Idle(EnSsh* this, GlobalContext* globalCtx) {
|
||||
if (1) {}
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->actionFunc = EnSsh_Talk;
|
||||
if (this->actor.params == ENSSH_FATHER) {
|
||||
gSaveContext.eventChkInf[9] |= 0x40;
|
||||
|
|
|
@ -209,7 +209,7 @@ void EnSth_LookAtPlayer(EnSth* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnSth_RewardObtainedTalk(EnSth* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
if (this->actor.params == 0) {
|
||||
EnSth_SetupAction(this, EnSth_ParentRewardObtainedWait);
|
||||
} else {
|
||||
|
@ -220,7 +220,7 @@ void EnSth_RewardObtainedTalk(EnSth* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnSth_ParentRewardObtainedWait(EnSth* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
EnSth_SetupAction(this, EnSth_RewardObtainedTalk);
|
||||
} else {
|
||||
this->actor.textId = 0x23;
|
||||
|
@ -264,8 +264,8 @@ void EnSth_GiveReward(EnSth* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnSth_RewardUnobtainedTalk(EnSth* this, GlobalContext* globalCtx) {
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && func_80106BC8(globalCtx)) {
|
||||
func_80106CCC(globalCtx);
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
EnSth_SetupAction(this, EnSth_GiveReward);
|
||||
EnSth_GivePlayerItem(this, globalCtx);
|
||||
}
|
||||
|
@ -273,7 +273,7 @@ void EnSth_RewardUnobtainedTalk(EnSth* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnSth_RewardUnobtainedWait(EnSth* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
EnSth_SetupAction(this, EnSth_RewardUnobtainedTalk);
|
||||
} else {
|
||||
if (this->actor.params == 0) {
|
||||
|
@ -289,7 +289,7 @@ void EnSth_RewardUnobtainedWait(EnSth* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnSth_ChildRewardObtainedWait(EnSth* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
EnSth_SetupAction(this, EnSth_RewardObtainedTalk);
|
||||
} else {
|
||||
if (gSaveContext.inventory.gsTokens < 50) {
|
||||
|
|
|
@ -149,7 +149,7 @@ static u16 sBgmList[] = {
|
|||
|
||||
static s16 sTextIds[] = { 0x2B, 0x2E, 0xC8, 0x2D };
|
||||
|
||||
static s16 sTextBoxCount[] = { 4, 5, 5, 5 };
|
||||
static s16 sTextBoxCount[] = { TEXT_STATE_CHOICE, TEXT_STATE_EVENT, TEXT_STATE_EVENT, TEXT_STATE_EVENT };
|
||||
|
||||
void EnSyatekiMan_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
|
@ -194,7 +194,7 @@ void EnSyatekiMan_SetupIdle(EnSyatekiMan* this, GlobalContext* globalCtx) {
|
|||
|
||||
void EnSyatekiMan_Idle(EnSyatekiMan* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->actionFunc = EnSyatekiMan_Talk;
|
||||
} else {
|
||||
func_8002F2CC(&this->actor, globalCtx, 100.0f);
|
||||
|
@ -208,7 +208,7 @@ void EnSyatekiMan_Talk(EnSyatekiMan* this, GlobalContext* globalCtx) {
|
|||
if (this->cameraHold) {
|
||||
globalCtx->shootingGalleryStatus = -2;
|
||||
}
|
||||
if ((this->numTextBox == func_8010BDBC(&globalCtx->msgCtx)) && func_80106BC8(globalCtx)) {
|
||||
if ((this->numTextBox == Message_GetState(&globalCtx->msgCtx)) && Message_ShouldAdvance(globalCtx)) {
|
||||
if (this->textIdx == SYATEKI_TEXT_CHOICE) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0:
|
||||
|
@ -229,9 +229,9 @@ void EnSyatekiMan_Talk(EnSyatekiMan* this, GlobalContext* globalCtx) {
|
|||
nextState = 2;
|
||||
break;
|
||||
}
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
} else {
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
}
|
||||
switch (nextState) {
|
||||
case 0:
|
||||
|
@ -252,13 +252,13 @@ void EnSyatekiMan_StopTalk(EnSyatekiMan* this, GlobalContext* globalCtx) {
|
|||
if (this->cameraHold) {
|
||||
globalCtx->shootingGalleryStatus = -2;
|
||||
}
|
||||
if ((this->numTextBox == func_8010BDBC(&globalCtx->msgCtx)) && func_80106BC8(globalCtx)) {
|
||||
if ((this->numTextBox == Message_GetState(&globalCtx->msgCtx)) && Message_ShouldAdvance(globalCtx)) {
|
||||
if (this->cameraHold) {
|
||||
OnePointCutscene_EndCutscene(globalCtx, this->csCam);
|
||||
this->csCam = SUBCAM_NONE;
|
||||
this->cameraHold = false;
|
||||
}
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
this->actionFunc = EnSyatekiMan_SetupIdle;
|
||||
}
|
||||
}
|
||||
|
@ -270,13 +270,13 @@ void EnSyatekiMan_StartGame(EnSyatekiMan* this, GlobalContext* globalCtx) {
|
|||
if (this->cameraHold) {
|
||||
globalCtx->shootingGalleryStatus = -2;
|
||||
}
|
||||
if ((this->numTextBox == func_8010BDBC(&globalCtx->msgCtx)) && func_80106BC8(globalCtx)) {
|
||||
if ((this->numTextBox == Message_GetState(&globalCtx->msgCtx)) && Message_ShouldAdvance(globalCtx)) {
|
||||
if (this->cameraHold) {
|
||||
OnePointCutscene_EndCutscene(globalCtx, this->csCam);
|
||||
this->csCam = SUBCAM_NONE;
|
||||
this->cameraHold = false;
|
||||
}
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
gallery = ((EnSyatekiItm*)this->actor.parent);
|
||||
if (gallery->actor.update != NULL) {
|
||||
gallery->signal = ENSYATEKI_START;
|
||||
|
@ -313,7 +313,7 @@ void EnSyatekiMan_WaitForGame(EnSyatekiMan* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
}
|
||||
globalCtx->shootingGalleryStatus = -2;
|
||||
func_8010B680(globalCtx, this->actor.textId, NULL);
|
||||
Message_StartTextbox(globalCtx, this->actor.textId, NULL);
|
||||
this->actionFunc = EnSyatekiMan_EndGame;
|
||||
}
|
||||
}
|
||||
|
@ -322,12 +322,12 @@ void EnSyatekiMan_EndGame(EnSyatekiMan* this, GlobalContext* globalCtx) {
|
|||
EnSyatekiItm* gallery;
|
||||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if ((this->numTextBox == func_8010BDBC(&globalCtx->msgCtx)) && func_80106BC8(globalCtx)) {
|
||||
if ((this->numTextBox == Message_GetState(&globalCtx->msgCtx)) && Message_ShouldAdvance(globalCtx)) {
|
||||
if (this->gameResult != SYATEKI_RESULT_FAILURE) {
|
||||
OnePointCutscene_EndCutscene(globalCtx, this->csCam);
|
||||
this->csCam = SUBCAM_NONE;
|
||||
}
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
gallery = ((EnSyatekiItm*)this->actor.parent);
|
||||
if (gallery->actor.update != NULL) {
|
||||
gallery->signal = ENSYATEKI_RESULTS;
|
||||
|
@ -382,7 +382,7 @@ void EnSyatekiMan_EndGame(EnSyatekiMan* this, GlobalContext* globalCtx) {
|
|||
this->cameraHold = true;
|
||||
this->actor.textId = sTextIds[this->textIdx];
|
||||
this->numTextBox = sTextBoxCount[this->textIdx];
|
||||
func_8010B680(globalCtx, this->actor.textId, NULL);
|
||||
Message_StartTextbox(globalCtx, this->actor.textId, NULL);
|
||||
this->actionFunc = EnSyatekiMan_Talk;
|
||||
}
|
||||
break;
|
||||
|
@ -402,7 +402,7 @@ void EnSyatekiMan_GivePrize(EnSyatekiMan* this, GlobalContext* globalCtx) {
|
|||
|
||||
void EnSyatekiMan_FinishPrize(EnSyatekiMan* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 6) && func_80106BC8(globalCtx)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) {
|
||||
// "Successful completion"
|
||||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 正常終了 ☆☆☆☆☆ \n" VT_RST);
|
||||
if (!LINK_IS_ADULT) {
|
||||
|
|
|
@ -502,7 +502,7 @@ void func_80B128F8(EnSyatekiNiw* this, GlobalContext* globalCtx) {
|
|||
s16 sp24;
|
||||
|
||||
Actor_SetFocus(&this->actor, this->unk_2D4);
|
||||
func_8002F374(globalCtx, &this->actor, &sp26, &sp24);
|
||||
Actor_GetScreenPos(globalCtx, &this->actor, &sp26, &sp24);
|
||||
if ((this->actor.projectedPos.z > 200.0f) && (this->actor.projectedPos.z < 800.0f) && (sp26 > 0) &&
|
||||
(sp26 < SCREEN_WIDTH) && (sp24 > 0) && (sp24 < SCREEN_HEIGHT)) {
|
||||
this->actor.speedXZ = 5.0f;
|
||||
|
@ -522,7 +522,7 @@ void func_80B129EC(EnSyatekiNiw* this, GlobalContext* globalCtx) {
|
|||
f32 tmpf2;
|
||||
|
||||
Actor_SetFocus(&this->actor, this->unk_2D4);
|
||||
func_8002F374(globalCtx, &this->actor, &sp2E, &sp2C);
|
||||
Actor_GetScreenPos(globalCtx, &this->actor, &sp2E, &sp2C);
|
||||
if ((this->unk_25E == 0) || (this->actor.projectedPos.z < -70.0f) || (sp2E < 0) || (sp2E > SCREEN_WIDTH) ||
|
||||
(sp2C < 0) || (sp2C > SCREEN_HEIGHT)) {
|
||||
Actor_Kill(&this->actor);
|
||||
|
|
|
@ -259,7 +259,7 @@ void EnTa_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
s32 func_80B142F4(EnTa* this, GlobalContext* globalCtx, u16 textId) {
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -274,13 +274,13 @@ s32 func_80B142F4(EnTa* this, GlobalContext* globalCtx, u16 textId) {
|
|||
}
|
||||
|
||||
void func_80B14398(EnTa* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
func_80B13AA0(this, func_80B14754, func_80B167FC);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80B143D4(EnTa* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
func_80B13AA0(this, func_80B146F8, func_80B167FC);
|
||||
}
|
||||
}
|
||||
|
@ -296,7 +296,7 @@ void func_80B14410(EnTa* this) {
|
|||
}
|
||||
|
||||
void func_80B1448C(EnTa* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
func_80B14410(this);
|
||||
}
|
||||
func_80B14248(this);
|
||||
|
@ -304,12 +304,12 @@ void func_80B1448C(EnTa* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80B144D8(EnTa* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
func_80B14410(this);
|
||||
this->unk_2B6 = 1;
|
||||
this->unk_2B0 = func_80B16700;
|
||||
}
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 6) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) {
|
||||
this->unk_2B4 = 1;
|
||||
func_80B13AA0(this, func_80B1448C, func_80B167C0);
|
||||
}
|
||||
|
@ -331,7 +331,7 @@ void func_80B14570(EnTa* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80B145F8(EnTa* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
func_80B13AA0(this, func_80B14634, func_80B167FC);
|
||||
}
|
||||
}
|
||||
|
@ -339,7 +339,7 @@ void func_80B145F8(EnTa* this, GlobalContext* globalCtx) {
|
|||
void func_80B14634(EnTa* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
s32 exchangeItemId = func_8002F368(globalCtx);
|
||||
|
||||
switch (exchangeItemId) {
|
||||
|
@ -362,7 +362,7 @@ void func_80B14634(EnTa* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80B146F8(EnTa* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
func_80B13AA0(this, func_80B143D4, func_80B167FC);
|
||||
}
|
||||
this->actor.textId = 0x204B;
|
||||
|
@ -372,7 +372,7 @@ void func_80B146F8(EnTa* this, GlobalContext* globalCtx) {
|
|||
void func_80B14754(EnTa* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (func_8002F194(&this->actor, globalCtx) != 0) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
s32 exchangeItemId = func_8002F368(globalCtx);
|
||||
|
||||
switch (exchangeItemId) {
|
||||
|
@ -450,7 +450,7 @@ void func_80B14A54(EnTa* this, GlobalContext* globalCtx) {
|
|||
func_80B14818(this, globalCtx);
|
||||
|
||||
if (this->unk_2CC == 20) {
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
}
|
||||
if (this->unk_2CC == 0) {
|
||||
this->unk_2CC = 5;
|
||||
|
@ -471,7 +471,7 @@ void func_80B14AF4(EnTa* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80B14B6C(EnTa* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 5) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) {
|
||||
OnePointCutscene_Init(globalCtx, 4175, -99, &this->actor, MAIN_CAM);
|
||||
func_80B13AA0(this, func_80B14AF4, func_80B167C0);
|
||||
this->unk_2CC = 5;
|
||||
|
@ -490,7 +490,7 @@ void func_80B14C18(EnTa* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80B14C60(EnTa* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
func_80B13AA0(this, func_80B14CAC, func_80B167C0);
|
||||
}
|
||||
this->unk_2E0 |= 1;
|
||||
|
@ -509,7 +509,7 @@ void func_80B14CAC(EnTa* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80B14D4C(EnTa* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
func_80B13AA0(this, func_80B14D98, func_80B167C0);
|
||||
}
|
||||
this->unk_2E0 |= 1;
|
||||
|
@ -574,8 +574,8 @@ void func_80B14FAC(EnTa* this, EnTaActionFunc arg1) {
|
|||
}
|
||||
|
||||
void func_80B15034(EnTa* 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);
|
||||
func_80B14F20(this, func_80B16504);
|
||||
func_80B13AAC(this, globalCtx);
|
||||
}
|
||||
|
@ -599,14 +599,14 @@ s32 func_80B150AC(EnTa* this, GlobalContext* globalCtx, s32 idx) {
|
|||
void func_80B15100(EnTa* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && (func_80106BC8(globalCtx) != 0)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
s32 unk_2CA;
|
||||
|
||||
Animation_Change(&this->skelAnime, &object_ta_Anim_00C48C, 1.0f,
|
||||
Animation_GetLastFrame(&object_ta_Anim_00C48C) - 1.0f,
|
||||
Animation_GetLastFrame(&object_ta_Anim_00C48C), ANIMMODE_ONCE, 10.0f);
|
||||
this->unk_2E0 &= ~0x10;
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
unk_2CA = this->unk_2CA;
|
||||
this->unk_25C = func_80B154FC;
|
||||
this->unk_2B8[unk_2CA]->actor.gravity = 0.1f;
|
||||
|
@ -627,7 +627,7 @@ void func_80B15100(EnTa* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80B15260(EnTa* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
this->unk_25C = func_80B15100;
|
||||
this->actor.flags &= ~0x10000;
|
||||
} else {
|
||||
|
@ -675,7 +675,7 @@ void func_80B153D4(EnTa* this, GlobalContext* globalCtx) {
|
|||
void func_80B15424(EnTa* this, GlobalContext* globalCtx) {
|
||||
func_80B15308(this);
|
||||
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && (func_80106BC8(globalCtx) != 0)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
globalCtx->nextEntranceIndex = 0x5E4;
|
||||
|
||||
if (gSaveContext.eventInf[0] & 0x100) {
|
||||
|
@ -715,7 +715,7 @@ void func_80B154FC(EnTa* this, GlobalContext* globalCtx) {
|
|||
case 1:
|
||||
gSaveContext.timer1State = 0;
|
||||
func_8002DF54(globalCtx, &this->actor, 1);
|
||||
func_8010B680(globalCtx, 0x2084, &this->actor);
|
||||
Message_StartTextbox(globalCtx, 0x2084, &this->actor);
|
||||
this->unk_25C = func_80B15424;
|
||||
Animation_Change(&this->skelAnime, &object_ta_Anim_00BF38, 1.0f, 8.0f, 29.0f, ANIMMODE_ONCE,
|
||||
-10.0f);
|
||||
|
@ -724,7 +724,7 @@ void func_80B154FC(EnTa* this, GlobalContext* globalCtx) {
|
|||
gSaveContext.eventInf[0] |= 0x100;
|
||||
Audio_QueueSeqCmd(NA_BGM_STOP);
|
||||
this->unk_2E0 &= ~0x200;
|
||||
func_800F5C64(NA_BGM_SMALL_ITEM_GET);
|
||||
Audio_PlayFanfare(NA_BGM_SMALL_ITEM_GET);
|
||||
return;
|
||||
case 2:
|
||||
this->actor.textId = 0x2083;
|
||||
|
@ -756,7 +756,7 @@ void func_80B154FC(EnTa* this, GlobalContext* globalCtx) {
|
|||
func_80078884(NA_SE_SY_FOUND);
|
||||
gSaveContext.timer1State = 0;
|
||||
func_8002DF54(globalCtx, &this->actor, 1);
|
||||
func_8010B680(globalCtx, 0x2081, &this->actor);
|
||||
Message_StartTextbox(globalCtx, 0x2081, &this->actor);
|
||||
this->unk_25C = func_80B15424;
|
||||
func_80B14E28(this, globalCtx);
|
||||
gSaveContext.eventInf[0] &= ~0x100;
|
||||
|
@ -821,11 +821,11 @@ void func_80B15AD4(EnTa* this, GlobalContext* globalCtx) {
|
|||
func_80088B34(0x1E);
|
||||
func_800F5ACC(NA_BGM_MINI_GAME_2);
|
||||
this->unk_2E0 |= 0x200;
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 1);
|
||||
}
|
||||
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && (func_80106BC8(globalCtx) != 0)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
this->unk_2E0 |= 0x20;
|
||||
}
|
||||
|
||||
|
@ -839,7 +839,7 @@ void func_80B15BF8(EnTa* this, GlobalContext* globalCtx) {
|
|||
Animation_Change(&this->skelAnime, &object_ta_Anim_00BF38, 1.0f, 0.0f, 1.0f, ANIMMODE_ONCE, 0.0f);
|
||||
this->unk_2CC = 5;
|
||||
}
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && (func_80106BC8(globalCtx) != 0)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
this->unk_2E0 |= 0x20;
|
||||
}
|
||||
this->unk_2E0 |= 1;
|
||||
|
@ -851,7 +851,7 @@ void func_80B15CC8(EnTa* this, GlobalContext* globalCtx) {
|
|||
this->unk_2E0 &= ~0x10;
|
||||
Animation_Change(&this->skelAnime, &object_ta_Anim_00BF38, -1.0f, 29.0f, 0.0f, ANIMMODE_ONCE, 10.0f);
|
||||
}
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && (func_80106BC8(globalCtx) != 0)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
this->unk_2E0 |= 0x20;
|
||||
}
|
||||
this->unk_2E0 |= 1;
|
||||
|
@ -861,12 +861,12 @@ void func_80B15D90(EnTa* this, GlobalContext* globalCtx) {
|
|||
func_80B13AA0(this, func_80B15CC8, func_80B16938);
|
||||
this->unk_2E0 &= ~0x10;
|
||||
Animation_Change(&this->skelAnime, &object_ta_Anim_00BF38, 1.0f, 8.0f, 29.0f, ANIMMODE_ONCE, -10.0f);
|
||||
func_8010B720(globalCtx, 0x2080);
|
||||
Message_ContinueTextbox(globalCtx, 0x2080);
|
||||
this->unk_2E0 &= ~0x20;
|
||||
}
|
||||
|
||||
void func_80B15E28(EnTa* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
func_80B14F20(this, func_80B16504);
|
||||
func_80B13AAC(this, globalCtx);
|
||||
}
|
||||
|
@ -890,8 +890,8 @@ void func_80B15E80(EnTa* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80B15F54(EnTa* 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->unk_2E0 &= ~0x2;
|
||||
func_80B13AA0(this, func_80B15E80, func_80B16938);
|
||||
func_8002F434(&this->actor, globalCtx, GI_MILK_BOTTLE, 10000.0f, 50.0f);
|
||||
|
@ -899,16 +899,16 @@ void func_80B15F54(EnTa* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80B15FE8(EnTa* 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:
|
||||
switch (func_80B14DD8()) {
|
||||
case 0:
|
||||
func_8010B720(globalCtx, 0x85);
|
||||
Message_ContinueTextbox(globalCtx, 0x85);
|
||||
func_80B13AA0(this, func_80B15034, func_80B16938);
|
||||
break;
|
||||
case 1:
|
||||
func_8010B720(globalCtx, 0x208A);
|
||||
Message_ContinueTextbox(globalCtx, 0x208A);
|
||||
func_80B13AA0(this, func_80B15E28, func_80B16938);
|
||||
break;
|
||||
case 2:
|
||||
|
@ -921,7 +921,7 @@ void func_80B15FE8(EnTa* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
case 1:
|
||||
if (gSaveContext.rupees < 10) {
|
||||
func_8010B720(globalCtx, 0x85);
|
||||
Message_ContinueTextbox(globalCtx, 0x85);
|
||||
func_80B13AA0(this, func_80B15034, func_80B16938);
|
||||
} else {
|
||||
Rupees_ChangeBy(-10);
|
||||
|
@ -949,23 +949,21 @@ void func_80B161C0(EnTa* this, GlobalContext* globalCtx) {
|
|||
price = 10;
|
||||
}
|
||||
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4) {
|
||||
if (func_80106BC8(globalCtx) != 0) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0:
|
||||
if (gSaveContext.rupees < price) {
|
||||
func_8010B720(globalCtx, 0x85);
|
||||
func_80B13AA0(this, func_80B15034, func_80B16938);
|
||||
} else {
|
||||
Rupees_ChangeBy(-price);
|
||||
func_80B15D90(this, globalCtx);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
func_80B14F20(this, func_80B16504);
|
||||
func_80B13AAC(this, globalCtx);
|
||||
break;
|
||||
}
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE && Message_ShouldAdvance(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0:
|
||||
if (gSaveContext.rupees < price) {
|
||||
Message_ContinueTextbox(globalCtx, 0x85);
|
||||
func_80B13AA0(this, func_80B15034, func_80B16938);
|
||||
} else {
|
||||
Rupees_ChangeBy(-price);
|
||||
func_80B15D90(this, globalCtx);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
func_80B14F20(this, func_80B16504);
|
||||
func_80B13AAC(this, globalCtx);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -975,8 +973,8 @@ void func_80B161C0(EnTa* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80B162E8(EnTa* this, GlobalContext* globalCtx) {
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 4) && (func_80106BC8(globalCtx) != 0)) {
|
||||
func_8010B720(globalCtx, 0x2087);
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_ContinueTextbox(globalCtx, 0x2087);
|
||||
func_80B13AA0(this, func_80B15F54, func_80B16938);
|
||||
}
|
||||
|
||||
|
@ -986,13 +984,13 @@ void func_80B162E8(EnTa* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80B16364(EnTa* this, GlobalContext* globalCtx) {
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && (func_80106BC8(globalCtx) != 0)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
gSaveContext.infTable[7] |= 0x4000;
|
||||
if (gSaveContext.itemGetInf[0] & 4) {
|
||||
func_8010B720(globalCtx, 0x208B);
|
||||
Message_ContinueTextbox(globalCtx, 0x208B);
|
||||
func_80B13AA0(this, func_80B15FE8, func_80B16938);
|
||||
} else {
|
||||
func_8010B720(globalCtx, 0x207F);
|
||||
Message_ContinueTextbox(globalCtx, 0x207F);
|
||||
func_80B13AA0(this, func_80B161C0, func_80B16938);
|
||||
}
|
||||
}
|
||||
|
@ -1003,14 +1001,14 @@ void func_80B16364(EnTa* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80B1642C(EnTa* this, GlobalContext* globalCtx) {
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && (func_80106BC8(globalCtx) != 0)) {
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
if (Inventory_HasEmptyBottle()) {
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
this->unk_2E0 |= 2;
|
||||
func_80B13AA0(this, func_80B15E80, func_80B16938);
|
||||
func_8002F434(&this->actor, globalCtx, GI_MILK, 10000.0f, 50.0f);
|
||||
} else {
|
||||
func_8010B720(globalCtx, 0x208A);
|
||||
Message_ContinueTextbox(globalCtx, 0x208A);
|
||||
func_80B13AA0(this, func_80B15E28, func_80B16938);
|
||||
}
|
||||
}
|
||||
|
@ -1047,7 +1045,7 @@ void func_80B16504(EnTa* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80B16608(EnTa* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
switch (this->actor.textId) {
|
||||
case 0x2085:
|
||||
this->unk_25C = func_80B161C0;
|
||||
|
|
|
@ -78,7 +78,7 @@ void func_80B176E0(EnTakaraMan* this, GlobalContext* globalCtx) {
|
|||
Animation_Change(&this->skelAnime, &object_ts_Anim_000498, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
|
||||
if (!this->unk_214) {
|
||||
this->actor.textId = 0x6D;
|
||||
this->dialogState = 4;
|
||||
this->dialogState = TEXT_STATE_CHOICE;
|
||||
}
|
||||
this->actionFunc = func_80B1778C;
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ void func_80B1778C(EnTakaraMan* this, GlobalContext* globalCtx) {
|
|||
s16 yawDiff;
|
||||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (func_8002F194(&this->actor, globalCtx) && this->dialogState != 6) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx) && this->dialogState != TEXT_STATE_DONE) {
|
||||
if (!this->unk_214) {
|
||||
this->actionFunc = func_80B17934;
|
||||
} else {
|
||||
|
@ -99,16 +99,16 @@ void func_80B1778C(EnTakaraMan* this, GlobalContext* globalCtx) {
|
|||
if (globalCtx->roomCtx.curRoom.num == 6 && !this->unk_21A) {
|
||||
this->actor.textId = 0x6E;
|
||||
this->unk_21A = 1;
|
||||
this->dialogState = 6;
|
||||
this->dialogState = TEXT_STATE_DONE;
|
||||
}
|
||||
|
||||
if (!this->unk_21A && this->unk_214) {
|
||||
if (Flags_GetSwitch(globalCtx, 0x32)) {
|
||||
this->actor.textId = 0x84;
|
||||
this->dialogState = 5;
|
||||
this->dialogState = TEXT_STATE_EVENT;
|
||||
} else {
|
||||
this->actor.textId = 0x704C;
|
||||
this->dialogState = 6;
|
||||
this->dialogState = TEXT_STATE_DONE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -129,29 +129,29 @@ void func_80B1778C(EnTakaraMan* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80B17934(EnTakaraMan* this, GlobalContext* globalCtx) {
|
||||
if (this->dialogState == func_8010BDBC(&globalCtx->msgCtx) && func_80106BC8(globalCtx)) {
|
||||
if (this->dialogState == Message_GetState(&globalCtx->msgCtx) && Message_ShouldAdvance(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0: // Yes
|
||||
if (gSaveContext.rupees >= 10) {
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
Rupees_ChangeBy(-10);
|
||||
this->unk_214 = 1;
|
||||
this->actor.parent = NULL;
|
||||
func_8002F434(&this->actor, globalCtx, GI_DOOR_KEY, 2000.0f, 1000.0f);
|
||||
this->actionFunc = func_80B17A6C;
|
||||
} else {
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
this->actor.textId = 0x85;
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
this->dialogState = 5;
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
this->dialogState = TEXT_STATE_EVENT;
|
||||
this->actionFunc = func_80B17B14;
|
||||
}
|
||||
break;
|
||||
case 1: // No
|
||||
func_80106CCC(globalCtx);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
this->actor.textId = 0x2D;
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
this->dialogState = 5;
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
this->dialogState = TEXT_STATE_EVENT;
|
||||
this->actionFunc = func_80B17B14;
|
||||
break;
|
||||
}
|
||||
|
@ -167,14 +167,14 @@ void func_80B17A6C(EnTakaraMan* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80B17AC4(EnTakaraMan* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 6 && func_80106BC8(globalCtx)) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE && Message_ShouldAdvance(globalCtx)) {
|
||||
this->actionFunc = func_80B176E0;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80B17B14(EnTakaraMan* this, GlobalContext* globalCtx) {
|
||||
if (this->dialogState == func_8010BDBC(&globalCtx->msgCtx) && func_80106BC8(globalCtx)) {
|
||||
func_80106CCC(globalCtx);
|
||||
if (this->dialogState == Message_GetState(&globalCtx->msgCtx) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
this->actionFunc = func_80B176E0;
|
||||
}
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue