mirror of
https://github.com/zeldaret/mm.git
synced 2026-07-28 15:17:23 -04:00
z_parameter: Main (#1157)
* main docs * formatting and bss issues * PR Suggestions * missed enums * better macros/enums * restrictions improvement, still wip * fix name, more common restriction patterns * more restrictions cleanup * rm comment
This commit is contained in:
+18
-16
@@ -7,12 +7,13 @@ void Setup_SetRegs(void) {
|
||||
XREG(11) = 0x14;
|
||||
XREG(12) = 0xE;
|
||||
XREG(13) = 0;
|
||||
XREG(31) = 0;
|
||||
R_A_BTN_Y_OFFSET = 0;
|
||||
R_MAGIC_CONSUME_TIMER_GIANTS_MASK = 80;
|
||||
XREG(43) = 0xFC54;
|
||||
|
||||
XREG(44) = 0xD7;
|
||||
XREG(45) = 0xDA;
|
||||
R_THREE_DAY_CLOCK_Y_POS = 64596;
|
||||
R_THREE_DAY_CLOCK_SUN_MOON_CUTOFF = 215;
|
||||
R_THREE_DAY_CLOCK_HOUR_DIGIT_CUTOFF = 218;
|
||||
|
||||
XREG(68) = 0x61;
|
||||
XREG(69) = 0x93;
|
||||
XREG(70) = 0x28;
|
||||
@@ -27,22 +28,23 @@ void Setup_SetRegs(void) {
|
||||
XREG(88) = 0x56;
|
||||
XREG(89) = 0x258;
|
||||
XREG(90) = 0x1C2;
|
||||
|
||||
R_STORY_FILL_SCREEN_ALPHA = 0;
|
||||
R_REVERSE_FLOOR_INDEX = 0;
|
||||
R_MINIMAP_DISABLED = false;
|
||||
|
||||
YREG(32) = 0x50;
|
||||
YREG(33) = 0x3C;
|
||||
YREG(34) = 0xDC;
|
||||
YREG(35) = 0x3C;
|
||||
YREG(36) = 0x50;
|
||||
YREG(37) = 0xA0;
|
||||
YREG(38) = 0xDC;
|
||||
YREG(39) = 0xA0;
|
||||
YREG(40) = 0x8E;
|
||||
YREG(41) = 0x6C;
|
||||
YREG(42) = 0xCC;
|
||||
YREG(43) = 0xB1;
|
||||
R_PICTO_FOCUS_BORDER_TOPLEFT_X = 80;
|
||||
R_PICTO_FOCUS_BORDER_TOPLEFT_Y = 60;
|
||||
R_PICTO_FOCUS_BORDER_TOPRIGHT_X = 220;
|
||||
R_PICTO_FOCUS_BORDER_TOPRIGHT_Y = 60;
|
||||
R_PICTO_FOCUS_BORDER_BOTTOMLEFT_X = 80;
|
||||
R_PICTO_FOCUS_BORDER_BOTTOMLEFT_Y = 160;
|
||||
R_PICTO_FOCUS_BORDER_BOTTOMRIGHT_X = 220;
|
||||
R_PICTO_FOCUS_BORDER_BOTTOMRIGHT_Y = 160;
|
||||
R_PICTO_FOCUS_ICON_X = 142;
|
||||
R_PICTO_FOCUS_ICON_Y = 108;
|
||||
R_PICTO_FOCUS_TEXT_X = 204;
|
||||
R_PICTO_FOCUS_TEXT_Y = 177;
|
||||
}
|
||||
|
||||
void Setup_InitImpl(SetupState* this) {
|
||||
|
||||
@@ -98,7 +98,7 @@ void KaleidoSetup_Update(PlayState* play) {
|
||||
(gSaveContext.magicState != MAGIC_STATE_FILL)) {
|
||||
if (!CHECK_EVENTINF(EVENTINF_17) && !(player->stateFlags1 & PLAYER_STATE1_20)) {
|
||||
if (!(play->actorCtx.flags & ACTORCTX_FLAG_1) &&
|
||||
!(play->actorCtx.flags & ACTORCTX_FLAG_2)) {
|
||||
!(play->actorCtx.flags & ACTORCTX_FLAG_PICTO_BOX_ON)) {
|
||||
if ((play->actorCtx.unk268 == 0) && CHECK_BTN_ALL(input->press.button, BTN_START)) {
|
||||
gSaveContext.prevHudVisibility = gSaveContext.hudVisibility;
|
||||
pauseCtx->itemDescriptionOn = false;
|
||||
|
||||
+15
-10
@@ -36,7 +36,7 @@ TexturePtr HeartDDTextures[] = {
|
||||
void LifeMeter_Init(PlayState* play) {
|
||||
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
||||
|
||||
interfaceCtx->unkTimer = 320;
|
||||
interfaceCtx->healthTimer = 320;
|
||||
|
||||
interfaceCtx->health = gSaveContext.save.playerData.health;
|
||||
|
||||
@@ -167,39 +167,44 @@ void LifeMeter_UpdateColors(PlayState* play) {
|
||||
sBeatingHeartsDDEnv[2] = (u8)(bFactor + 0) & 0xFF;
|
||||
}
|
||||
|
||||
// Unused
|
||||
s32 LifeMeter_SaveInterfaceHealth(PlayState* play) {
|
||||
gSaveContext.save.playerData.health = play->interfaceCtx.health;
|
||||
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
||||
|
||||
gSaveContext.save.playerData.health = interfaceCtx->health;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Unused
|
||||
s32 LifeMeter_IncreaseInterfaceHealth(PlayState* play) {
|
||||
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
||||
|
||||
interfaceCtx->unkTimer = 320;
|
||||
interfaceCtx->healthTimer = 320;
|
||||
interfaceCtx->health += 0x10;
|
||||
if (play->interfaceCtx.health >= gSaveContext.save.playerData.health) {
|
||||
play->interfaceCtx.health = gSaveContext.save.playerData.health;
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Unused
|
||||
s32 LifeMeter_DecreaseInterfaceHealth(PlayState* play) {
|
||||
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
||||
|
||||
if (interfaceCtx->unkTimer != 0) {
|
||||
interfaceCtx->unkTimer--;
|
||||
if (interfaceCtx->healthTimer != 0) {
|
||||
interfaceCtx->healthTimer--;
|
||||
} else {
|
||||
interfaceCtx->unkTimer = 320;
|
||||
interfaceCtx->healthTimer = 320;
|
||||
interfaceCtx->health -= 0x10;
|
||||
if (interfaceCtx->health <= 0) {
|
||||
interfaceCtx->health = 0;
|
||||
play->damagePlayer(play, -(((void)0, gSaveContext.save.playerData.health) + 1));
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
void LifeMeter_Draw(PlayState* play) {
|
||||
|
||||
@@ -322,9 +322,9 @@ void func_80151938(PlayState* play, u16 textId) {
|
||||
|
||||
if (interfaceCtx->unk_222 == 0) {
|
||||
if (textId != 0x1B93) {
|
||||
func_8011552C(play, 0x10);
|
||||
func_8011552C(play, DO_ACTION_NEXT);
|
||||
} else if (textId != 0xF8) {
|
||||
func_8011552C(play, 6);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
}
|
||||
}
|
||||
msgCtx->unk1203C = msgCtx->unk1203A;
|
||||
|
||||
+1282
-185
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -39,9 +39,9 @@
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_Destroy.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_801663C4.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_CompressI8ToI5.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_80166644.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_DecompressI5ToI8.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_801668B4.s")
|
||||
|
||||
|
||||
+24
-26
@@ -1,4 +1,3 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "global.h"
|
||||
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
@@ -543,15 +542,15 @@ ItemId func_8012364C(PlayState* play, Player* player, s32 arg2) {
|
||||
return item;
|
||||
}
|
||||
|
||||
if ((player->currentMask == PLAYER_MASK_BLAST) && (play->interfaceCtx.bButtonDoAction == 0x18)) {
|
||||
if ((player->currentMask == PLAYER_MASK_BLAST) && (play->interfaceCtx.bButtonDoAction == DO_ACTION_EXPLODE)) {
|
||||
return ITEM_F0;
|
||||
}
|
||||
|
||||
if ((player->currentMask == PLAYER_MASK_BREMEN) && (play->interfaceCtx.bButtonDoAction == 0x1A)) {
|
||||
if ((player->currentMask == PLAYER_MASK_BREMEN) && (play->interfaceCtx.bButtonDoAction == DO_ACTION_MARCH)) {
|
||||
return ITEM_F1;
|
||||
}
|
||||
|
||||
if ((player->currentMask == PLAYER_MASK_KAMARO) && (play->interfaceCtx.bButtonDoAction == 0x19)) {
|
||||
if ((player->currentMask == PLAYER_MASK_KAMARO) && (play->interfaceCtx.bButtonDoAction == DO_ACTION_DANCE)) {
|
||||
return ITEM_F2;
|
||||
}
|
||||
|
||||
@@ -725,17 +724,17 @@ u8 sPlayerStrengths[PLAYER_FORM_MAX] = {
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 flag;
|
||||
/* 0x02 */ u16 textId;
|
||||
} TextTriggerEntry; // size = 0x04
|
||||
/* 0x0 */ u8 flag;
|
||||
/* 0x2 */ u16 textId;
|
||||
} EnvHazardTextTriggerEntry; // size = 0x4
|
||||
|
||||
// These textIds are OoT remnants. The corresponding text entries are not present in this game, and so these don't point
|
||||
// to anything relevant.
|
||||
TextTriggerEntry sEnvironmentTextTriggers[] = {
|
||||
{ 1, 0x26FC },
|
||||
{ 2, 0x26FD },
|
||||
{ 0, 0 },
|
||||
{ 2, 0x26FD },
|
||||
EnvHazardTextTriggerEntry sEnvHazardTextTriggers[] = {
|
||||
{ ENV_HAZARD_TEXT_TRIGGER_HOTROOM, 0x26FC }, // PLAYER_ENV_HAZARD_HOTROOM - 1
|
||||
{ ENV_HAZARD_TEXT_TRIGGER_UNDERWATER, 0x26FD }, // PLAYER_ENV_HAZARD_UNDERWATER_FLOOR - 1
|
||||
{ 0, 0 }, // PLAYER_ENV_HAZARD_SWIMMING - 1
|
||||
{ ENV_HAZARD_TEXT_TRIGGER_UNDERWATER, 0x26FD }, // PLAYER_ENV_HAZARD_UNDERWATER_FREE - 1
|
||||
};
|
||||
|
||||
PlayerModelIndices gPlayerModelTypes[PLAYER_MODELGROUP_MAX] = {
|
||||
@@ -1451,37 +1450,36 @@ s32 func_801242B4(Player* player) {
|
||||
return (player->stateFlags1 & PLAYER_STATE1_8000000) && (player->currentBoots < PLAYER_BOOTS_ZORA_UNDERWATER);
|
||||
}
|
||||
|
||||
s32 Player_GetEnvTimerType(PlayState* play) {
|
||||
s32 Player_GetEnvironmentalHazard(PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
TextTriggerEntry* triggerEntry;
|
||||
s32 envTimerType;
|
||||
EnvHazardTextTriggerEntry* triggerEntry;
|
||||
s32 envHazard;
|
||||
|
||||
if (play->roomCtx.curRoom.unk2 == 3) { // Room is hot
|
||||
envTimerType = PLAYER_ENV_TIMER_HOTROOM - 1;
|
||||
envHazard = PLAYER_ENV_HAZARD_HOTROOM - 1;
|
||||
} else if ((player->transformation != PLAYER_FORM_ZORA) && (player->underwaterTimer > 80)) {
|
||||
envTimerType = PLAYER_ENV_TIMER_UNDERWATER_FREE - 1;
|
||||
envHazard = PLAYER_ENV_HAZARD_UNDERWATER_FREE - 1;
|
||||
} else if (player->stateFlags1 & PLAYER_STATE1_8000000) {
|
||||
if ((player->transformation == PLAYER_FORM_ZORA) && (player->currentBoots >= PLAYER_BOOTS_ZORA_UNDERWATER) &&
|
||||
(player->actor.bgCheckFlags & 1)) {
|
||||
envTimerType = PLAYER_ENV_TIMER_UNDERWATER_FLOOR - 1;
|
||||
envHazard = PLAYER_ENV_HAZARD_UNDERWATER_FLOOR - 1;
|
||||
} else {
|
||||
envTimerType = PLAYER_ENV_TIMER_SWIMMING - 1;
|
||||
envHazard = PLAYER_ENV_HAZARD_SWIMMING - 1;
|
||||
}
|
||||
} else {
|
||||
return PLAYER_ENV_TIMER_NONE;
|
||||
return PLAYER_ENV_HAZARD_NONE;
|
||||
}
|
||||
|
||||
// Trigger general textboxes under certain conditions, like "It's so hot in here!". Unused in MM
|
||||
triggerEntry = &sEnvironmentTextTriggers[envTimerType];
|
||||
triggerEntry = &sEnvHazardTextTriggers[envHazard];
|
||||
if (!Player_InCsMode(play)) {
|
||||
if ((triggerEntry->flag) && !(gSaveContext.textTriggerFlags & triggerEntry->flag) &&
|
||||
(envTimerType == (PLAYER_ENV_TIMER_HOTROOM - 1))) {
|
||||
if ((triggerEntry->flag) && !(gSaveContext.envHazardTextTriggerFlags & triggerEntry->flag) &&
|
||||
(envHazard == (PLAYER_ENV_HAZARD_HOTROOM - 1))) {
|
||||
Message_StartTextbox(play, triggerEntry->textId, NULL);
|
||||
gSaveContext.textTriggerFlags |= triggerEntry->flag;
|
||||
gSaveContext.envHazardTextTriggerFlags |= triggerEntry->flag;
|
||||
}
|
||||
}
|
||||
|
||||
return envTimerType + 1;
|
||||
return envHazard + 1;
|
||||
}
|
||||
|
||||
void func_80124420(Player* player);
|
||||
|
||||
@@ -468,10 +468,10 @@ void Sram_SaveEndOfCycle(PlayState* play) {
|
||||
|
||||
if (CUR_FORM == 0) {
|
||||
if ((STOLEN_ITEM_1 >= ITEM_SWORD_GILDED) || (STOLEN_ITEM_2 >= ITEM_SWORD_GILDED)) {
|
||||
BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) = ITEM_SWORD_GILDED;
|
||||
CUR_FORM_EQUIP(EQUIP_SLOT_B) = ITEM_SWORD_GILDED;
|
||||
SET_EQUIP_VALUE(EQUIP_TYPE_SWORD, EQUIP_VALUE_SWORD_GILDED);
|
||||
} else {
|
||||
BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) = ITEM_SWORD_KOKIRI;
|
||||
CUR_FORM_EQUIP(EQUIP_SLOT_B) = ITEM_SWORD_KOKIRI;
|
||||
}
|
||||
} else {
|
||||
if ((STOLEN_ITEM_1 >= ITEM_SWORD_GILDED) || (STOLEN_ITEM_2 >= ITEM_SWORD_GILDED)) {
|
||||
|
||||
@@ -215,7 +215,7 @@ void func_80953F9C(BgIngate* this, PlayState* play) {
|
||||
if (ActorCutscene_GetCurrentIndex() != -1) {
|
||||
Camera_ChangeSetting(mainCam, CAM_SET_NORMAL0);
|
||||
player->stateFlags1 |= PLAYER_STATE1_20;
|
||||
play->actorCtx.flags &= ~ACTORCTX_FLAG_2;
|
||||
play->actorCtx.flags &= ~ACTORCTX_FLAG_PICTO_BOX_ON;
|
||||
} else {
|
||||
Camera_ChangeSetting(mainCam, CAM_SET_BOAT_CRUISE);
|
||||
player->stateFlags1 &= ~PLAYER_STATE1_20;
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
* Description: Twinmold
|
||||
*/
|
||||
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "z_boss_02.h"
|
||||
#include "z64rumble.h"
|
||||
#include "z64shrink_window.h"
|
||||
|
||||
@@ -164,7 +164,7 @@ void DoorWarp1_Init(Actor* thisx, PlayState* play) {
|
||||
if ((play->sceneId == SCENE_MITURIN_BS) || (play->sceneId == SCENE_HAKUGIN_BS) ||
|
||||
(play->sceneId == SCENE_INISIE_BS) || (play->sceneId == SCENE_SEA_BS)) {
|
||||
Environment_StopTime();
|
||||
play->interfaceCtx.restrictions.unk_312 = 1;
|
||||
play->interfaceCtx.restrictions.songOfTime = 1;
|
||||
play->interfaceCtx.restrictions.songOfSoaring = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -801,7 +801,7 @@ void EnFsn_BeginInteraction(EnFsn* this, PlayState* play) {
|
||||
ActorCutscene_StartAndSetFlag(this->cutscene, &this->actor);
|
||||
this->cutsceneState = ENFSN_CUTSCENESTATE_PLAYING;
|
||||
if (Player_GetMask(play) == PLAYER_MASK_NONE) {
|
||||
func_8011552C(play, 16);
|
||||
func_8011552C(play, DO_ACTION_NEXT);
|
||||
if (EnFsn_HasItemsToSell()) {
|
||||
this->actionFunc = EnFsn_AskBuyOrSell;
|
||||
} else {
|
||||
@@ -880,7 +880,7 @@ void EnFsn_AskBuyOrSell(EnFsn* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
} else if (talkState == TEXT_STATE_CHOICE) {
|
||||
func_8011552C(play, 6);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
if (!EnFsn_TestEndInteraction(this, play, CONTROLLER1(&play->state)) && Message_ShouldAdvance(play)) {
|
||||
switch (play->msgCtx.choiceIndex) {
|
||||
case 0:
|
||||
@@ -1052,7 +1052,7 @@ void EnFsn_ResumeShoppingInteraction(EnFsn* this, PlayState* play) {
|
||||
} else if (this->actor.textId != 0x29D6) {
|
||||
this->actionFunc = EnFsn_AskCanBuyAterRunningOutOfItems;
|
||||
} else {
|
||||
func_8011552C(play, 6);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
this->stickLeftPrompt.isEnabled = false;
|
||||
this->stickRightPrompt.isEnabled = true;
|
||||
this->actionFunc = EnFsn_FaceShopkeeperSelling;
|
||||
@@ -1103,7 +1103,7 @@ void EnFsn_BrowseShelf(EnFsn* this, PlayState* play) {
|
||||
this->stickLeftPrompt.isEnabled = true;
|
||||
EnFsn_UpdateCursorPos(this, play);
|
||||
if (talkstate == TEXT_STATE_5) {
|
||||
func_8011552C(play, 6);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
if (!EnFsn_HasPlayerSelectedItem(this, play, CONTROLLER1(&play->state))) {
|
||||
EnFsn_CursorLeftRight(this);
|
||||
if (this->cursorIndex != prevCursorIdx) {
|
||||
@@ -1205,7 +1205,7 @@ void EnFsn_SelectItem(EnFsn* this, PlayState* play) {
|
||||
u8 talkState = Message_GetState(&play->msgCtx);
|
||||
|
||||
if (EnFsn_TakeItemOffShelf(this) && (talkState == TEXT_STATE_CHOICE)) {
|
||||
func_8011552C(play, 6);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
if (!EnFsn_TestCancelOption(this, play, CONTROLLER1(&play->state)) && Message_ShouldAdvance(play)) {
|
||||
switch (play->msgCtx.choiceIndex) {
|
||||
case 0:
|
||||
@@ -1325,7 +1325,7 @@ void EnFsn_FaceShopkeeperSelling(EnFsn* this, PlayState* play) {
|
||||
u8 cursorIndex;
|
||||
|
||||
if (talkState == TEXT_STATE_CHOICE) {
|
||||
func_8011552C(play, 6);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
if (!EnFsn_TestEndInteraction(this, play, CONTROLLER1(&play->state)) &&
|
||||
(!Message_ShouldAdvance(play) || !EnFsn_FacingShopkeeperDialogResult(this, play)) &&
|
||||
this->stickAccumX > 0) {
|
||||
@@ -1333,7 +1333,7 @@ void EnFsn_FaceShopkeeperSelling(EnFsn* this, PlayState* play) {
|
||||
if (cursorIndex != CURSOR_INVALID) {
|
||||
this->cursorIndex = cursorIndex;
|
||||
this->actionFunc = EnFsn_LookToShelf;
|
||||
func_8011552C(play, 6);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
this->stickRightPrompt.isEnabled = false;
|
||||
play_sound(NA_SE_SY_CURSOR);
|
||||
}
|
||||
|
||||
@@ -346,7 +346,7 @@ void EnKakasi_IdleStanding(EnKakasi* this, PlayState* play) {
|
||||
EnKakasi_SetupDialogue(this);
|
||||
return;
|
||||
}
|
||||
if (play->actorCtx.flags & ACTORCTX_FLAG_2) {
|
||||
if (play->actorCtx.flags & ACTORCTX_FLAG_PICTO_BOX_ON) {
|
||||
Actor_GetScreenPos(play, &this->picto.actor, &x, &y);
|
||||
if (this->picto.actor.projectedPos.z > -20.0f && x > 0 && x < SCREEN_WIDTH && y > 0 && y < SCREEN_HEIGHT &&
|
||||
this->animIndex != ENKAKASI_ANIM_SIDEWAYS_SHAKING) {
|
||||
|
||||
@@ -339,7 +339,7 @@ s32 EnOssan_TestCancelOption(EnOssan* this, PlayState* play, Input* input) {
|
||||
}
|
||||
|
||||
void EnOssan_SetupStartShopping(PlayState* play, EnOssan* this, u8 skipHello) {
|
||||
func_8011552C(play, 0x10);
|
||||
func_8011552C(play, DO_ACTION_NEXT);
|
||||
if (!skipHello) {
|
||||
EnOssan_SetupAction(this, EnOssan_Hello);
|
||||
} else {
|
||||
@@ -350,7 +350,7 @@ void EnOssan_SetupStartShopping(PlayState* play, EnOssan* this, u8 skipHello) {
|
||||
void EnOssan_StartShopping(PlayState* play, EnOssan* this) {
|
||||
EnOssan_SetupAction(this, EnOssan_FaceShopkeeper);
|
||||
func_80151938(play, 0x640);
|
||||
func_8011552C(play, 6);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
this->stickRightPrompt.isEnabled = true;
|
||||
this->stickLeftPrompt.isEnabled = true;
|
||||
}
|
||||
@@ -603,7 +603,7 @@ s32 EnOssan_FacingShopkeeperDialogResult(EnOssan* this, PlayState* play) {
|
||||
}
|
||||
EnOssan_SetupAction(this, EnOssan_TalkToShopkeeper);
|
||||
func_80151938(play, sTalkOptionTextIds[this->actor.params]);
|
||||
func_8011552C(play, 6);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
this->stickLeftPrompt.isEnabled = false;
|
||||
this->stickRightPrompt.isEnabled = false;
|
||||
return true;
|
||||
@@ -630,7 +630,7 @@ void EnOssan_FaceShopkeeper(EnOssan* this, PlayState* play) {
|
||||
this->cutsceneState = ENOSSAN_CUTSCENESTATE_WAITING;
|
||||
} else {
|
||||
if (talkState == TEXT_STATE_CHOICE) {
|
||||
func_8011552C(play, 6);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
if (!EnOssan_TestEndInteraction(this, play, CONTROLLER1(&play->state)) &&
|
||||
(!Message_ShouldAdvance(play) || !EnOssan_FacingShopkeeperDialogResult(this, play))) {
|
||||
if (this->stickAccumX < 0) {
|
||||
@@ -638,7 +638,7 @@ void EnOssan_FaceShopkeeper(EnOssan* this, PlayState* play) {
|
||||
if (cursorIndex != CURSOR_INVALID) {
|
||||
this->cursorIndex = cursorIndex;
|
||||
EnOssan_SetupAction(this, EnOssan_LookToLeftShelf);
|
||||
func_8011552C(play, 6);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
this->stickLeftPrompt.isEnabled = false;
|
||||
play_sound(NA_SE_SY_CURSOR);
|
||||
}
|
||||
@@ -647,7 +647,7 @@ void EnOssan_FaceShopkeeper(EnOssan* this, PlayState* play) {
|
||||
if (cursorIndex != CURSOR_INVALID) {
|
||||
this->cursorIndex = cursorIndex;
|
||||
EnOssan_SetupAction(this, EnOssan_LookToRightShelf);
|
||||
func_8011552C(play, 6);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
this->stickRightPrompt.isEnabled = false;
|
||||
play_sound(NA_SE_SY_CURSOR);
|
||||
}
|
||||
@@ -853,7 +853,7 @@ void EnOssan_BrowseLeftShelf(EnOssan* this, PlayState* play) {
|
||||
this->stickRightPrompt.isEnabled = true;
|
||||
EnOssan_UpdateCursorPos(play, this);
|
||||
if (talkState == TEXT_STATE_5) {
|
||||
func_8011552C(play, 6);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
if (!EnOssan_HasPlayerSelectedItem(play, this, CONTROLLER1(&play->state))) {
|
||||
if (this->moveHorizontal) {
|
||||
if (this->stickAccumX > 0) {
|
||||
@@ -911,7 +911,7 @@ void EnOssan_BrowseRightShelf(EnOssan* this, PlayState* play) {
|
||||
this->stickLeftPrompt.isEnabled = true;
|
||||
EnOssan_UpdateCursorPos(play, this);
|
||||
if (talkState == TEXT_STATE_5) {
|
||||
func_8011552C(play, 6);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
if (!EnOssan_HasPlayerSelectedItem(play, this, CONTROLLER1(&play->state))) {
|
||||
if (this->moveHorizontal != 0) {
|
||||
if (this->stickAccumX < 0) {
|
||||
@@ -1052,7 +1052,7 @@ void EnOssan_SelectItem(EnOssan* this, PlayState* play) {
|
||||
u8 talkState = Message_GetState(&play->msgCtx);
|
||||
|
||||
if (EnOssan_TakeItemOffShelf(this) && (talkState == TEXT_STATE_CHOICE)) {
|
||||
func_8011552C(play, 6);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
if (!EnOssan_TestCancelOption(this, play, CONTROLLER1(&play->state)) && Message_ShouldAdvance(play)) {
|
||||
switch (play->msgCtx.choiceIndex) {
|
||||
case 0:
|
||||
@@ -1119,7 +1119,7 @@ void EnOssan_ContinueShopping(EnOssan* this, PlayState* play) {
|
||||
EnGirlA* item;
|
||||
|
||||
if (talkState == TEXT_STATE_CHOICE) {
|
||||
func_8011552C(play, 6);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
if (Message_ShouldAdvance(play)) {
|
||||
EnOssan_ResetItemPosition(this);
|
||||
item = this->items[this->cursorIndex];
|
||||
|
||||
@@ -494,7 +494,7 @@ s32 EnSob1_TestCancelOption(EnSob1* this, PlayState* play, Input* input) {
|
||||
}
|
||||
|
||||
void EnSob1_SetupStartShopping(PlayState* play, EnSob1* this, u8 skipHello) {
|
||||
func_8011552C(play, 16);
|
||||
func_8011552C(play, DO_ACTION_NEXT);
|
||||
if (!skipHello) {
|
||||
EnSob1_SetupAction(this, EnSob1_Hello);
|
||||
} else {
|
||||
@@ -505,7 +505,7 @@ void EnSob1_SetupStartShopping(PlayState* play, EnSob1* this, u8 skipHello) {
|
||||
void EnSob1_StartShopping(PlayState* play, EnSob1* this) {
|
||||
EnSob1_SetupAction(this, EnSob1_FaceShopkeeper);
|
||||
func_80151938(play, sFacingShopkeeperTextIds[this->shopType]);
|
||||
func_8011552C(play, 6);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
this->stickLeftPrompt.isEnabled = false;
|
||||
this->stickRightPrompt.isEnabled = true;
|
||||
}
|
||||
@@ -514,7 +514,7 @@ void EnSob1_TalkToShopkeeper(PlayState* play, EnSob1* this) {
|
||||
EnSob1_SetupAction(this, EnSob1_TalkingToShopkeeper);
|
||||
this->talkOptionTextId = EnSob1_GetTalkOption(this, play);
|
||||
func_80151938(play, this->talkOptionTextId);
|
||||
func_8011552C(play, 6);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
this->stickLeftPrompt.isEnabled = false;
|
||||
this->stickRightPrompt.isEnabled = false;
|
||||
}
|
||||
@@ -680,7 +680,7 @@ void EnSob1_FaceShopkeeper(EnSob1* this, PlayState* play) {
|
||||
this->cutsceneState = ENSOB1_CUTSCENESTATE_WAITING;
|
||||
} else {
|
||||
if (talkState == TEXT_STATE_CHOICE) {
|
||||
func_8011552C(play, 6);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
if (!EnSob1_TestEndInteraction(this, play, CONTROLLER1(&play->state))) {
|
||||
if (!Message_ShouldAdvance(play) || !EnSob1_FacingShopkeeperDialogResult(this, play)) {
|
||||
if (this->stickAccumX > 0) {
|
||||
@@ -688,7 +688,7 @@ void EnSob1_FaceShopkeeper(EnSob1* this, PlayState* play) {
|
||||
if (cursorIndex != CURSOR_INVALID) {
|
||||
this->cursorIndex = cursorIndex;
|
||||
EnSob1_SetupAction(this, EnSob1_LookToShelf);
|
||||
func_8011552C(play, 6);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
this->stickRightPrompt.isEnabled = false;
|
||||
play_sound(NA_SE_SY_CURSOR);
|
||||
}
|
||||
@@ -933,7 +933,7 @@ void EnSob1_BrowseShelf(EnSob1* this, PlayState* play) {
|
||||
this->stickLeftPrompt.isEnabled = true;
|
||||
EnSob1_UpdateCursorPos(play, this);
|
||||
if (talkState == TEXT_STATE_5) {
|
||||
func_8011552C(play, 6);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
if (!EnSob1_HasPlayerSelectedItem(play, this, CONTROLLER1(&play->state))) {
|
||||
EnSob1_CursorLeftRight(play, this);
|
||||
cursorIndex = this->cursorIndex;
|
||||
@@ -1041,7 +1041,7 @@ void EnSob1_SelectItem(EnSob1* this, PlayState* play) {
|
||||
u8 talkState = Message_GetState(&play->msgCtx);
|
||||
|
||||
if (EnSob1_TakeItemOffShelf(this) && (talkState == TEXT_STATE_CHOICE)) {
|
||||
func_8011552C(play, 6);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
if (!EnSob1_TestCancelOption(this, play, CONTROLLER1(&play->state)) && Message_ShouldAdvance(play)) {
|
||||
switch (play->msgCtx.choiceIndex) {
|
||||
case 0:
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
* Description: Kafei
|
||||
*/
|
||||
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "z_en_test3.h"
|
||||
#include "objects/object_test3/object_test3.h"
|
||||
#include "overlays/actors/ovl_En_Door/z_en_door.h"
|
||||
|
||||
@@ -381,8 +381,8 @@ void func_80A42AB8(EnTest4* this, PlayState* play) {
|
||||
|
||||
if ((temp_a3 * temp_a2) <= 0) {
|
||||
gSaveContext.unk_3CA7 = 1;
|
||||
if (play->actorCtx.flags & ACTORCTX_FLAG_2) {
|
||||
play->actorCtx.flags &= ~ACTORCTX_FLAG_2;
|
||||
if (play->actorCtx.flags & ACTORCTX_FLAG_PICTO_BOX_ON) {
|
||||
play->actorCtx.flags &= ~ACTORCTX_FLAG_PICTO_BOX_ON;
|
||||
}
|
||||
|
||||
if (temp_a0 != CLOCK_TIME(6, 0)) {
|
||||
|
||||
@@ -253,7 +253,7 @@ s32 EnTrt_TestCancelOption(EnTrt* this, PlayState* play, Input* input) {
|
||||
}
|
||||
|
||||
void EnTrt_SetupStartShopping(PlayState* play, EnTrt* this, u8 skipHello) {
|
||||
func_8011552C(play, 0x10);
|
||||
func_8011552C(play, DO_ACTION_NEXT);
|
||||
if (!skipHello) {
|
||||
this->actionFunc = EnTrt_Hello;
|
||||
} else {
|
||||
@@ -263,7 +263,7 @@ void EnTrt_SetupStartShopping(PlayState* play, EnTrt* this, u8 skipHello) {
|
||||
|
||||
void EnTrt_StartShopping(PlayState* play, EnTrt* this) {
|
||||
func_80151938(play, 0x83E);
|
||||
func_8011552C(play, 6);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
this->stickLeftPrompt.isEnabled = false;
|
||||
this->stickRightPrompt.isEnabled = true;
|
||||
this->actionFunc = EnTrt_FaceShopkeeper;
|
||||
@@ -532,7 +532,7 @@ void EnTrt_FaceShopkeeper(EnTrt* this, PlayState* play) {
|
||||
ActorCutscene_SetIntentToPlay(this->cutscene);
|
||||
this->cutsceneState = ENTRT_CUTSCENESTATE_WAITING;
|
||||
} else if (talkState == TEXT_STATE_CHOICE) {
|
||||
func_8011552C(play, 6);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
if (!EnTrt_TestEndInteraction(this, play, CONTROLLER1(&play->state))) {
|
||||
if ((!Message_ShouldAdvance(play) || !EnTrt_FacingShopkeeperDialogResult(this, play)) &&
|
||||
(this->stickAccumX > 0)) {
|
||||
@@ -540,7 +540,7 @@ void EnTrt_FaceShopkeeper(EnTrt* this, PlayState* play) {
|
||||
if (cursorIndex != CURSOR_INVALID) {
|
||||
this->cursorIndex = cursorIndex;
|
||||
this->actionFunc = EnTrt_LookToShelf;
|
||||
func_8011552C(play, 6);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
this->stickRightPrompt.isEnabled = false;
|
||||
play_sound(NA_SE_SY_CURSOR);
|
||||
}
|
||||
@@ -634,7 +634,7 @@ void EnTrt_BrowseShelf(EnTrt* this, PlayState* play) {
|
||||
this->stickLeftPrompt.isEnabled = true;
|
||||
EnTrt_UpdateCursorPos(play, this);
|
||||
if (talkState == TEXT_STATE_5) {
|
||||
func_8011552C(play, 6);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
if (!EnTrt_HasPlayerSelectedItem(play, this, CONTROLLER1(&play->state))) {
|
||||
EnTrt_CursorLeftRight(play, this);
|
||||
if (this->cursorIndex != prevCursorIdx) {
|
||||
@@ -727,7 +727,7 @@ void EnTrt_SelectItem(EnTrt* this, PlayState* play) {
|
||||
|
||||
if (EnTrt_TakeItemOffShelf(this)) {
|
||||
if (talkState == TEXT_STATE_CHOICE) {
|
||||
func_8011552C(play, 6);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
if (!EnTrt_TestCancelOption(this, play, CONTROLLER1(&play->state)) && Message_ShouldAdvance(play)) {
|
||||
switch (play->msgCtx.choiceIndex) {
|
||||
case 0:
|
||||
@@ -896,7 +896,7 @@ void EnTrt_BeginInteraction(EnTrt* this, PlayState* play) {
|
||||
case 0x834:
|
||||
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_12_08) && !CHECK_WEEKEVENTREG(WEEKEVENTREG_84_40) &&
|
||||
!CHECK_WEEKEVENTREG(WEEKEVENTREG_16_10) && !CHECK_WEEKEVENTREG(WEEKEVENTREG_17_01)) {
|
||||
func_8011552C(play, 6);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
this->stickLeftPrompt.isEnabled = false;
|
||||
this->stickRightPrompt.isEnabled = true;
|
||||
this->actionFunc = EnTrt_Hello;
|
||||
@@ -905,7 +905,7 @@ void EnTrt_BeginInteraction(EnTrt* this, PlayState* play) {
|
||||
}
|
||||
break;
|
||||
case 0x83E:
|
||||
func_8011552C(play, 6);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
this->stickLeftPrompt.isEnabled = false;
|
||||
this->stickRightPrompt.isEnabled = true;
|
||||
this->actionFunc = EnTrt_FaceShopkeeper;
|
||||
@@ -1114,7 +1114,7 @@ void EnTrt_ContinueShopping(EnTrt* this, PlayState* play) {
|
||||
EnGirlA* item;
|
||||
|
||||
if (talkState == TEXT_STATE_CHOICE) {
|
||||
func_8011552C(play, 6);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
if (Message_ShouldAdvance(play)) {
|
||||
EnTrt_ResetItemPosition(this);
|
||||
item = this->items[this->cursorIndex];
|
||||
@@ -1427,7 +1427,7 @@ void EnTrt_TalkToShopkeeper(EnTrt* this, PlayState* play) {
|
||||
void EnTrt_SetupTalkToShopkeeper(PlayState* play, EnTrt* this) {
|
||||
this->actionFunc = EnTrt_TalkToShopkeeper;
|
||||
func_80151938(play, this->talkOptionTextId);
|
||||
func_8011552C(play, 6);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
this->stickLeftPrompt.isEnabled = false;
|
||||
this->stickRightPrompt.isEnabled = false;
|
||||
}
|
||||
|
||||
@@ -650,7 +650,7 @@ void KaleidoScope_UpdateQuestCursor(PlayState* play) {
|
||||
KaleidoScope_MoveCursorToSpecialPos(play, PAUSE_CURSOR_PAGE_LEFT);
|
||||
pauseCtx->mainState = PAUSE_MAIN_STATE_IDLE;
|
||||
if (interfaceCtx->unk_212 == 6) {
|
||||
func_8011552C(play, 0x15);
|
||||
func_8011552C(play, DO_ACTION_INFO);
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
@@ -834,7 +834,7 @@ void KaleidoScope_UpdateQuestCursor(PlayState* play) {
|
||||
pauseCtx->mainState = PAUSE_MAIN_STATE_IDLE_CURSOR_ON_SONG;
|
||||
|
||||
if (interfaceCtx->unk_212 != 6) {
|
||||
func_8011552C(play, 6);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
}
|
||||
|
||||
// Stop receiving input to play a song as mentioned above
|
||||
@@ -847,7 +847,7 @@ void KaleidoScope_UpdateQuestCursor(PlayState* play) {
|
||||
}
|
||||
} else {
|
||||
if (interfaceCtx->unk_212 != 6) {
|
||||
func_8011552C(play, 6);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
}
|
||||
if (gSaveContext.buttonStatus[EQUIP_SLOT_A] != BTN_DISABLED) {
|
||||
gSaveContext.buttonStatus[EQUIP_SLOT_A] = BTN_DISABLED;
|
||||
@@ -858,11 +858,11 @@ void KaleidoScope_UpdateQuestCursor(PlayState* play) {
|
||||
} else {
|
||||
if ((cursor == QUEST_BOMBERS_NOTEBOOK) && (pauseCtx->cursorItem[PAUSE_QUEST] != PAUSE_ITEM_NONE)) {
|
||||
if (interfaceCtx->unk_212 != 6) {
|
||||
func_8011552C(play, 6);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
}
|
||||
pauseCtx->cursorColorSet = PAUSE_CURSOR_COLOR_SET_BLUE;
|
||||
} else if (interfaceCtx->unk_212 == 6) {
|
||||
func_8011552C(play, 0x15);
|
||||
func_8011552C(play, DO_ACTION_INFO);
|
||||
}
|
||||
|
||||
if ((pauseCtx->cursorItem[PAUSE_QUEST] != PAUSE_ITEM_NONE) && (msgCtx->msgLength == 0)) {
|
||||
|
||||
@@ -894,10 +894,10 @@ void KaleidoScope_UpdateInventoryEditor(PlayState* play) {
|
||||
SET_EQUIP_VALUE(EQUIP_TYPE_SWORD, value);
|
||||
|
||||
if (value != 0) {
|
||||
BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) = value + (ITEM_SWORD_KOKIRI - 1);
|
||||
CUR_FORM_EQUIP(EQUIP_SLOT_B) = value + (ITEM_SWORD_KOKIRI - 1);
|
||||
gSaveContext.save.playerData.swordHealth = 100;
|
||||
} else {
|
||||
BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) = ITEM_NONE;
|
||||
CUR_FORM_EQUIP(EQUIP_SLOT_B) = ITEM_NONE;
|
||||
}
|
||||
|
||||
} else if (CHECK_BTN_ALL(input->press.button, BTN_CDOWN) ||
|
||||
@@ -909,7 +909,7 @@ void KaleidoScope_UpdateInventoryEditor(PlayState* play) {
|
||||
|
||||
SET_EQUIP_VALUE(EQUIP_TYPE_SWORD, value);
|
||||
|
||||
BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) = value + (ITEM_SWORD_KOKIRI - 1);
|
||||
CUR_FORM_EQUIP(EQUIP_SLOT_B) = value + (ITEM_SWORD_KOKIRI - 1);
|
||||
gSaveContext.save.playerData.swordHealth = 100;
|
||||
}
|
||||
|
||||
|
||||
@@ -566,8 +566,8 @@ void KaleidoScope_UpdateMaskCursor(PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
if ((Player_GetEnvTimerType(play) >= PLAYER_ENV_TIMER_UNDERWATER_FLOOR) &&
|
||||
(Player_GetEnvTimerType(play) <= PLAYER_ENV_TIMER_UNDERWATER_FREE) &&
|
||||
if ((Player_GetEnvironmentalHazard(play) >= PLAYER_ENV_HAZARD_UNDERWATER_FLOOR) &&
|
||||
(Player_GetEnvironmentalHazard(play) <= PLAYER_ENV_HAZARD_UNDERWATER_FREE) &&
|
||||
((cursorSlot == (SLOT_MASK_DEKU - NUM_ITEM_SLOTS)) ||
|
||||
(cursorSlot == (SLOT_MASK_GORON - NUM_ITEM_SLOTS)))) {
|
||||
play_sound(NA_SE_SY_ERROR);
|
||||
|
||||
@@ -548,7 +548,7 @@ void KaleidoScope_UpdateOpening(PlayState* play) {
|
||||
pauseCtx->mainState = PAUSE_MAIN_STATE_IDLE;
|
||||
pauseCtx->state++; // PAUSE_STATE_MAIN
|
||||
pauseCtx->alpha = 255;
|
||||
func_80115844(play, 3);
|
||||
func_80115844(play, DO_ACTION_RETURN);
|
||||
} else if (pauseCtx->switchPageTimer == 64) {
|
||||
pauseCtx->pageIndex = sPageSwitchNextPageIndex[pauseCtx->nextPageMode];
|
||||
pauseCtx->nextPageMode = (pauseCtx->pageIndex * 2) + 1;
|
||||
@@ -647,7 +647,7 @@ void KaleidoScope_Update(PlayState* play) {
|
||||
DmaMgr_SendRequest0(pauseCtx->iconItemLangSegment, SEGMENT_ROM_START(icon_item_jpn_static), size2);
|
||||
|
||||
pauseCtx->nameSegment = (void*)ALIGN16((uintptr_t)pauseCtx->iconItemLangSegment + size2);
|
||||
func_8011552C(play, 0x15);
|
||||
func_8011552C(play, DO_ACTION_INFO);
|
||||
if (((void)0, gSaveContext.worldMapArea) < 0x16) {
|
||||
func_8082192C(pauseCtx->nameSegment + 0x400, ((void)0, gSaveContext.worldMapArea));
|
||||
}
|
||||
@@ -693,7 +693,7 @@ void KaleidoScope_Update(PlayState* play) {
|
||||
case PAUSE_MAIN_STATE_IDLE:
|
||||
if (!pauseCtx->itemDescriptionOn &&
|
||||
(CHECK_BTN_ALL(input->press.button, BTN_START) || CHECK_BTN_ALL(input->press.button, BTN_B))) {
|
||||
func_8011552C(play, 0xA);
|
||||
func_8011552C(play, DO_ACTION_NONE);
|
||||
pauseCtx->state = PAUSE_STATE_UNPAUSE_SETUP;
|
||||
sPauseMenuVerticalOffset = -6240.0f;
|
||||
func_801A3AEC(0);
|
||||
@@ -727,7 +727,7 @@ void KaleidoScope_Update(PlayState* play) {
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_START) || CHECK_BTN_ALL(input->press.button, BTN_B)) {
|
||||
// Abort having the player play the song and close the pause menu
|
||||
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
|
||||
func_8011552C(play, 0xA);
|
||||
func_8011552C(play, DO_ACTION_NONE);
|
||||
pauseCtx->state = PAUSE_STATE_UNPAUSE_SETUP;
|
||||
sPauseMenuVerticalOffset = -6240.0f;
|
||||
func_801A3AEC(0);
|
||||
@@ -763,7 +763,7 @@ void KaleidoScope_Update(PlayState* play) {
|
||||
case PAUSE_MAIN_STATE_IDLE_CURSOR_ON_SONG:
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_START) || CHECK_BTN_ALL(input->press.button, BTN_B)) {
|
||||
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
|
||||
func_8011552C(play, 0xA);
|
||||
func_8011552C(play, DO_ACTION_NONE);
|
||||
pauseCtx->state = PAUSE_STATE_UNPAUSE_SETUP;
|
||||
sPauseMenuVerticalOffset = -6240.0f;
|
||||
func_801A3AEC(0);
|
||||
@@ -805,7 +805,7 @@ void KaleidoScope_Update(PlayState* play) {
|
||||
case PAUSE_SAVEPROMPT_STATE_1:
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_A) || CHECK_BTN_ALL(input->press.button, BTN_CUP)) {
|
||||
if (pauseCtx->promptChoice != PAUSE_PROMPT_YES) {
|
||||
func_8011552C(play, 0xA);
|
||||
func_8011552C(play, DO_ACTION_NONE);
|
||||
pauseCtx->savePromptState = PAUSE_SAVEPROMPT_STATE_2;
|
||||
} else {
|
||||
play_sound(NA_SE_SY_PIECE_OF_HEART);
|
||||
@@ -823,13 +823,13 @@ void KaleidoScope_Update(PlayState* play) {
|
||||
sDelayTimer = 90;
|
||||
}
|
||||
} else if (CHECK_BTN_ALL(input->press.button, BTN_START)) {
|
||||
func_8011552C(play, 0xA);
|
||||
func_8011552C(play, DO_ACTION_NONE);
|
||||
pauseCtx->savePromptState = PAUSE_SAVEPROMPT_STATE_3;
|
||||
sPauseMenuVerticalOffset = -6240.0f;
|
||||
D_8082B90C = pauseCtx->roll;
|
||||
func_801A3AEC(0);
|
||||
} else if (CHECK_BTN_ALL(input->press.button, BTN_B)) {
|
||||
func_8011552C(play, 0xA);
|
||||
func_8011552C(play, DO_ACTION_NONE);
|
||||
pauseCtx->savePromptState = PAUSE_SAVEPROMPT_STATE_2;
|
||||
D_8082B90C = pauseCtx->roll;
|
||||
}
|
||||
@@ -844,7 +844,7 @@ void KaleidoScope_Update(PlayState* play) {
|
||||
case PAUSE_SAVEPROMPT_STATE_5:
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_B) || CHECK_BTN_ALL(input->press.button, BTN_A) ||
|
||||
CHECK_BTN_ALL(input->press.button, BTN_START) || (--sDelayTimer == 0)) {
|
||||
func_8011552C(play, 0xA);
|
||||
func_8011552C(play, DO_ACTION_NONE);
|
||||
pauseCtx->savePromptState = PAUSE_SAVEPROMPT_STATE_3;
|
||||
sPauseMenuVerticalOffset = -6240.0f;
|
||||
D_8082B90C = pauseCtx->roll;
|
||||
@@ -886,7 +886,7 @@ void KaleidoScope_Update(PlayState* play) {
|
||||
pauseCtx->roll = -314.0f;
|
||||
pauseCtx->itemPageRoll = pauseCtx->mapPageRoll = pauseCtx->questPageRoll =
|
||||
pauseCtx->maskPageRoll = 0.0f;
|
||||
func_8011552C(play, 0x15);
|
||||
func_8011552C(play, DO_ACTION_INFO);
|
||||
gSaveContext.buttonStatus[EQUIP_SLOT_B] = D_801C6A98[pauseCtx->pageIndex + 1][0];
|
||||
gSaveContext.buttonStatus[EQUIP_SLOT_C_LEFT] = D_801C6A98[pauseCtx->pageIndex + 1][1];
|
||||
gSaveContext.buttonStatus[EQUIP_SLOT_C_DOWN] = D_801C6A98[pauseCtx->pageIndex + 1][1];
|
||||
@@ -901,10 +901,10 @@ void KaleidoScope_Update(PlayState* play) {
|
||||
break;
|
||||
|
||||
case PAUSE_SAVEPROMPT_STATE_6:
|
||||
if (interfaceCtx->unk_264 != 255) {
|
||||
interfaceCtx->unk_264 += 10;
|
||||
if (interfaceCtx->unk_264 >= 255) {
|
||||
interfaceCtx->unk_264 = 255;
|
||||
if (interfaceCtx->screenFillAlpha != 255) {
|
||||
interfaceCtx->screenFillAlpha += 10;
|
||||
if (interfaceCtx->screenFillAlpha >= 255) {
|
||||
interfaceCtx->screenFillAlpha = 255;
|
||||
pauseCtx->state = PAUSE_STATE_OFF;
|
||||
Game_SetFramerateDivisor(&play->state, 3);
|
||||
R_PAUSE_BG_PRERENDER_STATE = PAUSE_BG_PRERENDER_UNK4;
|
||||
@@ -1129,10 +1129,10 @@ void KaleidoScope_Update(PlayState* play) {
|
||||
break;
|
||||
|
||||
case PAUSE_STATE_GAMEOVER_10:
|
||||
if (interfaceCtx->unk_264 != 255) {
|
||||
interfaceCtx->unk_264 += 10;
|
||||
if (interfaceCtx->unk_264 >= 255) {
|
||||
interfaceCtx->unk_264 = 255;
|
||||
if (interfaceCtx->screenFillAlpha != 255) {
|
||||
interfaceCtx->screenFillAlpha += 10;
|
||||
if (interfaceCtx->screenFillAlpha >= 255) {
|
||||
interfaceCtx->screenFillAlpha = 255;
|
||||
|
||||
pauseCtx->state = PAUSE_STATE_OFF;
|
||||
Game_SetFramerateDivisor(&play->state, 3);
|
||||
@@ -1191,7 +1191,7 @@ void KaleidoScope_Update(PlayState* play) {
|
||||
DmaMgr_SendRequest0(pauseCtx->iconItemLangSegment, SEGMENT_ROM_START(icon_item_jpn_static), size2);
|
||||
|
||||
pauseCtx->nameSegment = (void*)ALIGN16((uintptr_t)pauseCtx->iconItemLangSegment + size2);
|
||||
func_8011552C(play, 0x16);
|
||||
func_8011552C(play, DO_ACTION_WARP);
|
||||
worldMapCursorPoint = pauseCtx->cursorPoint[PAUSE_WORLD_MAP];
|
||||
func_80821900(pauseCtx->nameSegment, worldMapCursorPoint);
|
||||
|
||||
@@ -1227,7 +1227,7 @@ void KaleidoScope_Update(PlayState* play) {
|
||||
|
||||
case PAUSE_STATE_OWLWARP_SELECT:
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_START) || CHECK_BTN_ALL(input->press.button, BTN_B)) {
|
||||
func_8011552C(play, 0xA);
|
||||
func_8011552C(play, DO_ACTION_NONE);
|
||||
pauseCtx->state = PAUSE_STATE_OWLWARP_6;
|
||||
sPauseMenuVerticalOffset = -6240.0f;
|
||||
func_801A3AEC(0);
|
||||
@@ -1247,7 +1247,7 @@ void KaleidoScope_Update(PlayState* play) {
|
||||
msgCtx->msgLength = 0;
|
||||
msgCtx->msgMode = 0;
|
||||
if (msgCtx->choiceIndex == 0) {
|
||||
func_8011552C(play, 0xA);
|
||||
func_8011552C(play, DO_ACTION_NONE);
|
||||
pauseCtx->state = PAUSE_STATE_OWLWARP_6;
|
||||
sPauseMenuVerticalOffset = -6240.0f;
|
||||
func_801A3AEC(0);
|
||||
@@ -1255,7 +1255,7 @@ void KaleidoScope_Update(PlayState* play) {
|
||||
play_sound(NA_SE_SY_DECIDE);
|
||||
} else {
|
||||
pauseCtx->state = PAUSE_STATE_OWLWARP_SELECT;
|
||||
func_8011552C(play, 0x16);
|
||||
func_8011552C(play, DO_ACTION_WARP);
|
||||
play_sound(NA_SE_SY_MESSAGE_PASS);
|
||||
}
|
||||
} else if (CHECK_BTN_ALL(input->press.button, BTN_B)) {
|
||||
@@ -1266,7 +1266,7 @@ void KaleidoScope_Update(PlayState* play) {
|
||||
} else if (CHECK_BTN_ALL(input->press.button, BTN_START)) {
|
||||
msgCtx->msgLength = 0;
|
||||
msgCtx->msgMode = 0;
|
||||
func_8011552C(play, 0xA);
|
||||
func_8011552C(play, DO_ACTION_NONE);
|
||||
pauseCtx->state = PAUSE_STATE_OWLWARP_6;
|
||||
sPauseMenuVerticalOffset = -6240.0f;
|
||||
func_801A3AEC(0);
|
||||
@@ -1346,8 +1346,8 @@ void KaleidoScope_Update(PlayState* play) {
|
||||
func_80143324(play, &play->skyboxCtx, play->skyboxId);
|
||||
|
||||
if ((msgCtx->msgMode != 0) && (msgCtx->currentTextId == 0xFF)) {
|
||||
func_80115844(play, 0x12);
|
||||
func_8011552C(play, 0x12);
|
||||
func_80115844(play, DO_ACTION_STOP);
|
||||
func_8011552C(play, DO_ACTION_STOP);
|
||||
Interface_SetHudVisibility(HUD_VISIBILITY_A_B_C);
|
||||
} else {
|
||||
interfaceCtx->unk_222 = interfaceCtx->unk_224 = 0;
|
||||
|
||||
Reference in New Issue
Block a user