mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
z_parameter
This commit is contained in:
+1
-1
@@ -817,7 +817,7 @@ void Player_UpdateBottleHeld(PlayState* play, Player* player, ItemId itemId, Pla
|
||||
void Player_Untarget(Player* player);
|
||||
void func_80123DC0(Player* player);
|
||||
void func_80123E90(PlayState* play, Actor* actor);
|
||||
s32 func_80123F2C(PlayState* play, s32 ammo);
|
||||
s32 Player_SetBButtonAmmo(PlayState* play, s32 ammo);
|
||||
s32 Player_IsBurningStickInRange(PlayState* play, Vec3f* pos, f32 xzRange, f32 yRange);
|
||||
u8 Player_GetStrength(void);
|
||||
s32 Player_GetMask(PlayState* play);
|
||||
|
||||
@@ -21,6 +21,11 @@
|
||||
|
||||
#define ARRAY_COUNT_2D(arr) (ARRAY_COUNT(arr) * ARRAY_COUNT(arr[0]))
|
||||
|
||||
#define KSEG0 0x80000000 // 0x80000000 - 0x9FFFFFFF Physical memory, cached, unmapped
|
||||
|
||||
#define RDRAM_CACHED KSEG0
|
||||
|
||||
#define PHYSICAL_TO_VIRTUAL(addr) ((uintptr_t)(addr) + RDRAM_CACHED)
|
||||
#define SEGMENTED_TO_K0(addr) (void*)((gSegments[SEGMENT_NUMBER(addr)] + K0BASE) + SEGMENT_OFFSET(addr))
|
||||
|
||||
#define GET_ACTIVE_CAM(play) ((play)->cameraPtrs[(play)->activeCamId])
|
||||
|
||||
+1
-1
@@ -136,7 +136,7 @@ extern RegEditor* gRegEditor;
|
||||
#define R_A_BTN_COLOR(i) XREG(22 + i)
|
||||
#define R_A_BTN_Y_OFFSET XREG(31)
|
||||
#define R_MAGIC_CONSUME_TIMER_GIANTS_MASK XREG(41)
|
||||
#define R_THREE_DAY_CLOCK_Y_POS XREG(43)
|
||||
#define R_THREE_DAY_CLOCK_Y_POS XREG(43) // TODO: Test
|
||||
#define R_THREE_DAY_CLOCK_SUN_MOON_CUTOFF XREG(44)
|
||||
#define R_THREE_DAY_CLOCK_HOUR_DIGIT_CUTOFF XREG(45)
|
||||
#define R_PAUSE_DBG_MAP_CLOUD_ON XREG(50)
|
||||
|
||||
+19
-1
@@ -167,6 +167,24 @@ typedef enum {
|
||||
/* 0x02 */ KALEID_OVL_MAX
|
||||
} KaleidoMgrOverlayType;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ TexturePtr timg;
|
||||
/* 0x04 */ TexturePtr tlut;
|
||||
/* 0x08 */ u16 width;
|
||||
/* 0x0A */ u16 height;
|
||||
/* 0x0C */ u8 fmt;
|
||||
/* 0x0D */ u8 siz;
|
||||
/* 0x0E */ u16 tt;
|
||||
/* 0x10 */ u16 unk_10;
|
||||
/* 0x14 */ f32 x;
|
||||
/* 0x18 */ f32 y;
|
||||
/* 0x1C */ f32 xScale;
|
||||
/* 0x20 */ f32 yScale;
|
||||
/* 0x24 */ u32 flags;
|
||||
} PreRenderParams; // size = 0x28
|
||||
|
||||
struct PlayState;
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 seqId;
|
||||
/* 0x1 */ u8 ambienceId;
|
||||
@@ -242,7 +260,7 @@ typedef struct PlayState {
|
||||
/* 0x18876 */ s16 worldCoverAlpha;
|
||||
/* 0x18878 */ s16 bgCoverAlpha;
|
||||
/* 0x1887A */ u16 nextEntrance;
|
||||
/* 0x1887C */ s8 unk_1887C; // shootingGalleryStatus?
|
||||
/* 0x1887C */ s8 bButtonAmmoPlusOne;
|
||||
/* 0x1887D */ s8 unk_1887D;
|
||||
/* 0x1887E */ s8 unk_1887E;
|
||||
/* 0x1887F */ u8 transitionType; // fadeTransition
|
||||
|
||||
+11
-8
@@ -64,7 +64,10 @@ typedef enum {
|
||||
/* 0x27 */ DO_ACTION_POUND,
|
||||
/* 0x28 */ DO_ACTION_HOOK,
|
||||
/* 0x29 */ DO_ACTION_SHOOT,
|
||||
/* 0x2A */ DO_ACTION_MAX
|
||||
/* 0x2A */ DO_ACTION_MAX,
|
||||
/* 0x2A */ TATL_STATE_2A = DO_ACTION_MAX,
|
||||
/* 0x2B */ TATL_STATE_2B,
|
||||
/* 0x2C */ TATL_STATE_2C
|
||||
} DoAction;
|
||||
|
||||
typedef enum {
|
||||
@@ -138,10 +141,10 @@ typedef struct {
|
||||
/* 0x1FC */ OSMesg loadMsg;
|
||||
/* 0x200 */ Viewport viewport;
|
||||
/* 0x210 */ s16 aButtonState;
|
||||
/* 0x212 */ u16 unk_212;
|
||||
/* 0x212 */ u16 aButtonHorseDoAction; // TODO: Confirm. Only seems to be used for Epona and "DO_ACTION_FASTER". Also Kaleido?
|
||||
/* 0x214 */ u16 aButtonDoAction;
|
||||
/* 0x218 */ f32 aButtonRoll;
|
||||
/* 0x21C */ s16 unk_21C;
|
||||
/* 0x21C */ s16 bButtonDoActionActive;
|
||||
/* 0x21E */ s16 bButtonDoAction;
|
||||
/* 0x220 */ s16 tatlCalling;
|
||||
/* 0x222 */ s16 unk_222;
|
||||
@@ -243,16 +246,16 @@ u8 Item_CheckObtainability(u8 item);
|
||||
void Inventory_DeleteItem(s16 item, s16 slot);
|
||||
void Inventory_UnequipItem(s16 item);
|
||||
s32 Inventory_ReplaceItem(struct PlayState* play, u8 oldItem, u8 newItem);
|
||||
void Inventory_UpdateDeitySwordEquip(struct PlayState* play);
|
||||
void Inventory_UpdateDeitySwordEquip(struct PlayState* play) ;
|
||||
s32 Inventory_HasEmptyBottle(void);
|
||||
s32 Inventory_HasItemInBottle(u8 item);
|
||||
void Inventory_UpdateBottleItem(struct PlayState* play, u8 item, u8 btn);
|
||||
s32 Inventory_ConsumeFairy(struct PlayState* play);
|
||||
void Inventory_UpdateItem(struct PlayState* play, s16 slot, s16 item);
|
||||
void func_8011552C(struct PlayState* play, u16 arg1);
|
||||
void func_801155B4(struct PlayState* play, s16 arg1);
|
||||
void func_80115764(struct PlayState* play, UNK_TYPE arg1);
|
||||
void func_80115844(struct PlayState* play, s16 doAction);
|
||||
void Interface_SetAButtonDoAction(struct PlayState* play, u16 aButtonDoAction);
|
||||
void Interface_SetBButtonDoAction(struct PlayState* play, s16 bButtonDoAction);
|
||||
void Interface_SetTatlCall(struct PlayState* play, u16 tatlCallState);
|
||||
void Interface_LoadBButtonDoActionLabel(struct PlayState* play, s16 bButtonDoAction);
|
||||
s32 Health_ChangeBy(struct PlayState* play, s16 healthChange);
|
||||
void Health_GiveHearts(s16 hearts);
|
||||
void Rupees_ChangeBy(s16 rupeeChange);
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "z64item.h"
|
||||
#include "z64math.h"
|
||||
#include "unk.h"
|
||||
#include "z64item.h"
|
||||
|
||||
struct GameState;
|
||||
struct PlayState;
|
||||
|
||||
@@ -104,8 +104,8 @@ void func_8016FF90(PreRender* this, Gfx** gfxp, void* buf, void* bufSave, s32 en
|
||||
|
||||
gDPSetScissor(gfx++, G_SC_NON_INTERLACE, 0, 0, this->width, this->height);
|
||||
|
||||
Prerender_DrawBackground2D(&gfx, buf, 0, this->width, this->height, G_IM_FMT_RGBA, G_IM_SIZ_16b, G_TT_NONE, 0, 0.0f,
|
||||
0.0f, 1.0f, 1.0f, BG2D_FLAGS_1 | BG2D_FLAGS_2 | BG2D_FLAGS_LOAD_S2DEX2);
|
||||
Prerender_DrawBackground2D(&gfx, buf, NULL, this->width, this->height, G_IM_FMT_RGBA, G_IM_SIZ_16b, G_TT_NONE, 0,
|
||||
0.0f, 0.0f, 1.0f, 1.0f, 0xB);
|
||||
gDPPipeSync(gfx++);
|
||||
gDPSetColorImage(gfx++, G_IM_FMT_RGBA, G_IM_SIZ_16b, this->width, this->fbuf);
|
||||
|
||||
|
||||
@@ -478,8 +478,8 @@ s32 Inventory_GetBtnBItem(PlayState* play) {
|
||||
} else if (gSaveContext.bButtonStatus == BTN_DISABLED) {
|
||||
return ITEM_NONE;
|
||||
} else if (CUR_FORM_EQUIP(EQUIP_SLOT_B) == ITEM_NONE) {
|
||||
if (play->interfaceCtx.unk_21C != 0) {
|
||||
if (play->interfaceCtx.bButtonDoAction != 0) {
|
||||
if (play->interfaceCtx.bButtonDoActionActive) {
|
||||
if (play->interfaceCtx.bButtonDoAction != DO_ACTION_ATTACK) {
|
||||
return play->interfaceCtx.bButtonDoAction;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
void Setup_SetRegs(void) {
|
||||
XREG(2) = 0;
|
||||
XREG(10) = 0x1A;
|
||||
XREG(11) = 0x14;
|
||||
XREG(12) = 0xE;
|
||||
XREG(10) = 26;
|
||||
XREG(11) = 20;
|
||||
XREG(12) = 14;
|
||||
XREG(13) = 0;
|
||||
R_A_BTN_Y_OFFSET = 0;
|
||||
R_MAGIC_CONSUME_TIMER_GIANTS_MASK = 80;
|
||||
|
||||
@@ -93,8 +93,8 @@ void KaleidoSetup_Update(PlayState* play) {
|
||||
(play->gameOverCtx.state == GAMEOVER_INACTIVE)) {
|
||||
if ((play->transitionTrigger == TRANS_TRIGGER_OFF) && (play->transitionMode == TRANS_MODE_OFF)) {
|
||||
if ((gSaveContext.save.cutsceneIndex < 0xFFF0) && (gSaveContext.nextCutsceneIndex < 0xFFF0)) {
|
||||
if (!Play_InCsMode(play) || ((msgCtx->msgMode != MSGMODE_NONE) && (msgCtx->currentTextId == 0xFF))) {
|
||||
if ((play->unk_1887C < 2) && (gSaveContext.magicState != MAGIC_STATE_STEP_CAPACITY) &&
|
||||
if (!Play_InCsMode(play) || ((msgCtx->msgMode != 0) && (msgCtx->currentTextId == 0xFF))) {
|
||||
if ((play->bButtonAmmoPlusOne < 2) && (gSaveContext.magicState != MAGIC_STATE_STEP_CAPACITY) &&
|
||||
(gSaveContext.magicState != MAGIC_STATE_FILL)) {
|
||||
if (!CHECK_EVENTINF(EVENTINF_17) && !(player->stateFlags1 & PLAYER_STATE1_20)) {
|
||||
if (!(play->actorCtx.flags & ACTORCTX_FLAG_1) &&
|
||||
|
||||
+11
-11
@@ -1245,7 +1245,7 @@ void Message_DrawTextDefault(PlayState* play, Gfx** gfxP) {
|
||||
msgCtx->stateTimer = msgCtx->decodedBuffer.wchar[++i];
|
||||
Font_LoadMessageBoxEndIcon(&play->msgCtx.font, 1);
|
||||
if (play->csCtx.state == CS_STATE_IDLE) {
|
||||
func_8011552C(play, DO_ACTION_RETURN);
|
||||
Interface_SetAButtonDoAction(play, DO_ACTION_RETURN);
|
||||
}
|
||||
}
|
||||
*gfxP = gfx;
|
||||
@@ -1258,7 +1258,7 @@ void Message_DrawTextDefault(PlayState* play, Gfx** gfxP) {
|
||||
msgCtx->stateTimer = msgCtx->decodedBuffer.wchar[++i];
|
||||
Font_LoadMessageBoxEndIcon(&play->msgCtx.font, 1);
|
||||
if (play->csCtx.state == CS_STATE_IDLE) {
|
||||
func_8011552C(play, DO_ACTION_RETURN);
|
||||
Interface_SetAButtonDoAction(play, DO_ACTION_RETURN);
|
||||
}
|
||||
}
|
||||
*gfxP = gfx;
|
||||
@@ -1416,7 +1416,7 @@ void Message_DrawTextDefault(PlayState* play, Gfx** gfxP) {
|
||||
Font_LoadMessageBoxEndIcon(font, 0);
|
||||
}
|
||||
if (play->csCtx.state == CS_STATE_IDLE) {
|
||||
func_8011552C(play, DO_ACTION_RETURN);
|
||||
Interface_SetAButtonDoAction(play, DO_ACTION_RETURN);
|
||||
}
|
||||
} else {
|
||||
Audio_PlaySfx(NA_SE_NONE);
|
||||
@@ -3106,7 +3106,7 @@ void Message_OpenText(PlayState* play, u16 textId) {
|
||||
}
|
||||
|
||||
if (textId == 0xFF) {
|
||||
func_80115844(play, DO_ACTION_STOP);
|
||||
Interface_LoadBButtonDoActionLabel(play, DO_ACTION_STOP);
|
||||
play->msgCtx.hudVisibility = gSaveContext.hudVisibility;
|
||||
Interface_SetHudVisibility(HUD_VISIBILITY_A_B_C);
|
||||
gSaveContext.save.unk_06 = 20;
|
||||
@@ -3337,9 +3337,9 @@ void Message_ContinueTextbox(PlayState* play, u16 textId) {
|
||||
|
||||
if (interfaceCtx->unk_222 == 0) {
|
||||
if (textId != 0x1B93) {
|
||||
func_8011552C(play, DO_ACTION_NEXT);
|
||||
Interface_SetAButtonDoAction(play, DO_ACTION_NEXT);
|
||||
} else if (textId != 0xF8) {
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
Interface_SetAButtonDoAction(play, DO_ACTION_DECIDE);
|
||||
}
|
||||
}
|
||||
msgCtx->textboxColorAlphaCurrent = msgCtx->textboxColorAlphaTarget;
|
||||
@@ -3566,7 +3566,7 @@ void Message_DisplayOcarinaStaffImpl(PlayState* play, u16 ocarinaAction) {
|
||||
msgCtx->textboxColorAlphaCurrent = msgCtx->textboxColorAlphaTarget;
|
||||
|
||||
if (!noStop) {
|
||||
func_80115844(play, DO_ACTION_STOP);
|
||||
Interface_LoadBButtonDoActionLabel(play, DO_ACTION_STOP);
|
||||
noStop = gSaveContext.hudVisibility;
|
||||
Interface_SetHudVisibility(HUD_VISIBILITY_B_ALT);
|
||||
gSaveContext.hudVisibility = noStop;
|
||||
@@ -5405,9 +5405,9 @@ void Message_Update(PlayState* play) {
|
||||
msgCtx->msgMode = MSGMODE_TEXT_NEXT_MSG;
|
||||
if (!pauseCtx->itemDescriptionOn) {
|
||||
if (msgCtx->currentTextId == 0xFF) {
|
||||
func_8011552C(play, DO_ACTION_STOP);
|
||||
Interface_SetAButtonDoAction(play, DO_ACTION_STOP);
|
||||
} else if (msgCtx->currentTextId != 0xF8) {
|
||||
func_8011552C(play, DO_ACTION_NEXT);
|
||||
Interface_SetAButtonDoAction(play, DO_ACTION_NEXT);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -5698,7 +5698,7 @@ void Message_Update(PlayState* play) {
|
||||
Message_CloseTextbox(play);
|
||||
play->msgCtx.ocarinaMode = OCARINA_MODE_END;
|
||||
gSaveContext.prevHudVisibility = HUD_VISIBILITY_A_B;
|
||||
func_80115844(play, DO_ACTION_STOP);
|
||||
Interface_LoadBButtonDoActionLabel(play, DO_ACTION_STOP);
|
||||
GameState_SetFramerateDivisor(&play->state, 2);
|
||||
if (ShrinkWindow_Letterbox_GetSizeTarget() != 0) {
|
||||
ShrinkWindow_Letterbox_SetSizeTarget(0);
|
||||
@@ -5759,7 +5759,7 @@ void Message_Update(PlayState* play) {
|
||||
XREG(31) = 0;
|
||||
|
||||
if (pauseCtx->itemDescriptionOn) {
|
||||
func_8011552C(play, DO_ACTION_INFO);
|
||||
Interface_SetAButtonDoAction(play, DO_ACTION_INFO);
|
||||
pauseCtx->itemDescriptionOn = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -590,7 +590,7 @@ void Message_DrawTextNES(PlayState* play, Gfx** gfxP, u16 textDrawPos) {
|
||||
msgCtx->stateTimer = stateTimerHi;
|
||||
Font_LoadMessageBoxEndIcon(font, 1);
|
||||
if (play->csCtx.state == CS_STATE_IDLE) {
|
||||
func_8011552C(play, DO_ACTION_RETURN);
|
||||
Interface_SetAButtonDoAction(play, DO_ACTION_RETURN);
|
||||
}
|
||||
}
|
||||
*gfxP = gfx;
|
||||
@@ -605,7 +605,7 @@ void Message_DrawTextNES(PlayState* play, Gfx** gfxP, u16 textDrawPos) {
|
||||
msgCtx->stateTimer = stateTimerHi;
|
||||
Font_LoadMessageBoxEndIcon(font, 1);
|
||||
if (play->csCtx.state == CS_STATE_IDLE) {
|
||||
func_8011552C(play, DO_ACTION_RETURN);
|
||||
Interface_SetAButtonDoAction(play, DO_ACTION_RETURN);
|
||||
}
|
||||
}
|
||||
*gfxP = gfx;
|
||||
@@ -785,7 +785,7 @@ void Message_DrawTextNES(PlayState* play, Gfx** gfxP, u16 textDrawPos) {
|
||||
Font_LoadMessageBoxEndIcon(font, 0);
|
||||
}
|
||||
if (play->csCtx.state == CS_STATE_IDLE) {
|
||||
func_8011552C(play, DO_ACTION_RETURN);
|
||||
Interface_SetAButtonDoAction(play, DO_ACTION_RETURN);
|
||||
}
|
||||
} else {
|
||||
Audio_PlaySfx(NA_SE_NONE);
|
||||
|
||||
+145
-47
@@ -171,6 +171,7 @@ s16 D_801BF9BC[] = {
|
||||
s16 D_801BF9C4[] = { 0x9E, 0x9B };
|
||||
s16 D_801BF9C8[] = { 0x17, 0x16 };
|
||||
f32 D_801BF9CC[] = { -380.0f, -350.0f };
|
||||
|
||||
s16 D_801BF9D4[] = {
|
||||
0xA7, // EQUIP_SLOT_B
|
||||
0xE3, // EQUIP_SLOT_C_LEFT
|
||||
@@ -1317,7 +1318,7 @@ void Interface_UpdateHudAlphas(PlayState* play, s16 dimmingAlpha) {
|
||||
}
|
||||
|
||||
if ((gSaveContext.buttonStatus[EQUIP_SLOT_B] == BTN_DISABLED) ||
|
||||
(gSaveContext.bButtonStatus == ITEM_NONE)) {
|
||||
(gSaveContext.bButtonStatus == BTN_DISABLED)) {
|
||||
if (interfaceCtx->bAlpha != 70) {
|
||||
interfaceCtx->bAlpha = 70;
|
||||
}
|
||||
@@ -2185,7 +2186,7 @@ void Interface_UpdateButtonsPart1(PlayState* play) {
|
||||
if (gSaveContext.save.cutsceneIndex < 0xFFF0) {
|
||||
gSaveContext.hudVisibilityForceButtonAlphasByStatus = false;
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_800000) || CHECK_WEEKEVENTREG(WEEKEVENTREG_08_01) ||
|
||||
(!CHECK_EVENTINF(EVENTINF_41) && (play->unk_1887C >= 2))) {
|
||||
(!(CHECK_EVENTINF(EVENTINF_41)) && (play->bButtonAmmoPlusOne >= 2))) {
|
||||
// Riding Epona OR Honey & Darling minigame OR Horseback balloon minigame OR related to swamp boat
|
||||
// (non-minigame?)
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_800000) && (player->currentMask == PLAYER_MASK_BLAST) &&
|
||||
@@ -2237,7 +2238,7 @@ void Interface_UpdateButtonsPart1(PlayState* play) {
|
||||
} else {
|
||||
BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) = ITEM_BOW;
|
||||
|
||||
if (play->unk_1887C >= 2) {
|
||||
if (play->bButtonAmmoPlusOne >= 2) {
|
||||
Interface_LoadItemIconImpl(play, EQUIP_SLOT_B);
|
||||
} else if (gSaveContext.save.saveInfo.inventory.items[SLOT_BOW] == ITEM_NONE) {
|
||||
BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) = ITEM_NONE;
|
||||
@@ -2263,7 +2264,7 @@ void Interface_UpdateButtonsPart1(PlayState* play) {
|
||||
} else if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_82_08) &&
|
||||
(gSaveContext.minigameStatus == MINIGAME_STATUS_ACTIVE)) {
|
||||
Interface_SetHudVisibility(HUD_VISIBILITY_B);
|
||||
} else if (play->unk_1887C >= 2) {
|
||||
} else if (play->bButtonAmmoPlusOne >= 2) {
|
||||
Interface_SetHudVisibility(HUD_VISIBILITY_B);
|
||||
} else if (CHECK_WEEKEVENTREG(WEEKEVENTREG_08_01)) {
|
||||
gSaveContext.buttonStatus[EQUIP_SLOT_C_LEFT] = BTN_DISABLED;
|
||||
@@ -2294,7 +2295,7 @@ void Interface_UpdateButtonsPart1(PlayState* play) {
|
||||
BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) = ITEM_BOW;
|
||||
}
|
||||
|
||||
if (play->unk_1887C >= 2) {
|
||||
if (play->bButtonAmmoPlusOne >= 2) {
|
||||
Interface_LoadItemIconImpl(play, EQUIP_SLOT_B);
|
||||
} else if (gSaveContext.save.saveInfo.inventory.items[SLOT_BOW] == ITEM_NONE) {
|
||||
BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) = ITEM_NONE;
|
||||
@@ -2320,7 +2321,7 @@ void Interface_UpdateButtonsPart1(PlayState* play) {
|
||||
Interface_SetHudVisibility(HUD_VISIBILITY_A_B_MINIMAP);
|
||||
} else if (gSaveContext.minigameStatus == MINIGAME_STATUS_ACTIVE) {
|
||||
Interface_SetHudVisibility(HUD_VISIBILITY_B);
|
||||
} else if (play->unk_1887C >= 2) {
|
||||
} else if (play->bButtonAmmoPlusOne >= 2) {
|
||||
Interface_SetHudVisibility(HUD_VISIBILITY_B);
|
||||
} else if (CHECK_WEEKEVENTREG(WEEKEVENTREG_08_01)) {
|
||||
gSaveContext.buttonStatus[EQUIP_SLOT_C_LEFT] = BTN_DISABLED;
|
||||
@@ -2364,7 +2365,7 @@ void Interface_UpdateButtonsPart1(PlayState* play) {
|
||||
Message_CloseTextbox(play);
|
||||
if (play->msgCtx.choiceIndex != 0) {
|
||||
Audio_PlaySfx_MessageCancel();
|
||||
func_80115844(play, DO_ACTION_STOP);
|
||||
Interface_LoadBButtonDoActionLabel(play, DO_ACTION_STOP);
|
||||
Interface_SetHudVisibility(HUD_VISIBILITY_A_B);
|
||||
sPictoState = PICTO_BOX_STATE_LENS;
|
||||
REMOVE_QUEST_ITEM(QUEST_PICTOGRAPH);
|
||||
@@ -2403,7 +2404,7 @@ void Interface_UpdateButtonsPart1(PlayState* play) {
|
||||
} else if (play->actorCtx.flags & ACTORCTX_FLAG_PICTO_BOX_ON) {
|
||||
// Related to pictograph
|
||||
if (!CHECK_QUEST_ITEM(QUEST_PICTOGRAPH)) {
|
||||
func_80115844(play, DO_ACTION_STOP);
|
||||
Interface_LoadBButtonDoActionLabel(play, DO_ACTION_STOP);
|
||||
Interface_SetHudVisibility(HUD_VISIBILITY_A_B);
|
||||
sPictoState = PICTO_BOX_STATE_LENS;
|
||||
} else {
|
||||
@@ -2469,9 +2470,16 @@ void Interface_InitMinigame(PlayState* play) {
|
||||
interfaceCtx->minigameAmmo = 20;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_parameter/Interface_LoadItemIconImpl.s")
|
||||
void Interface_LoadItemIconImpl(PlayState* play, u8 btn) {
|
||||
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_parameter/Interface_LoadItemIcon.s")
|
||||
CmpDma_LoadFile(SEGMENT_ROM_START(icon_item_static_yar), GET_CUR_FORM_BTN_ITEM(btn),
|
||||
&interfaceCtx->iconItemSegment[(u32)btn * 0x1000], 0x1000);
|
||||
}
|
||||
|
||||
void Interface_LoadItemIcon(PlayState* play, u8 btn) {
|
||||
Interface_LoadItemIconImpl(play, btn);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param play PlayState
|
||||
@@ -3145,7 +3153,7 @@ void Inventory_UpdateDeitySwordEquip(PlayState* play) {
|
||||
u8 btn;
|
||||
|
||||
if (CUR_FORM == PLAYER_FORM_FIERCE_DEITY) {
|
||||
interfaceCtx->unk_21C = 0;
|
||||
interfaceCtx->bButtonDoActionActive = false;
|
||||
interfaceCtx->bButtonDoAction = 0;
|
||||
|
||||
// Is simply checking if (GET_PLAYER_FORM == PLAYER_FORM_FIERCE_DEITY)
|
||||
@@ -3244,23 +3252,113 @@ void Inventory_UpdateItem(PlayState* play, s16 slot, s16 item) {
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_parameter/func_801153C8.s")
|
||||
void Interface_MemSetZeroed(u32* buf, s32 count) {
|
||||
s32 i;
|
||||
|
||||
TexturePtr sDoActionTextures[] = {
|
||||
gDoActionAttackENGTex,
|
||||
gDoActionCheckENGTex,
|
||||
};
|
||||
for (i = 0; i != count; i++) {
|
||||
buf[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80115428(InterfaceContext* interfaceCtx, u16 doAction, s16 loadOffset);
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_parameter/func_80115428.s")
|
||||
void Interface_LoadAButtonDoActionLabel(InterfaceContext* interfaceCtx, u16 action, s16 loadOffset) {
|
||||
static TexturePtr sDoActionTextures[] = {
|
||||
gDoActionAttackENGTex,
|
||||
gDoActionCheckENGTex,
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_parameter/func_8011552C.s")
|
||||
if (action >= DO_ACTION_MAX) {
|
||||
action = DO_ACTION_NONE;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_parameter/func_801155B4.s")
|
||||
if (action != DO_ACTION_NONE) {
|
||||
osCreateMesgQueue(&interfaceCtx->loadQueue, &interfaceCtx->loadMsg, 1);
|
||||
DmaMgr_SendRequestImpl(&interfaceCtx->dmaRequest,
|
||||
(u32)interfaceCtx->doActionSegment + (loadOffset * DO_ACTION_TEX_SIZE),
|
||||
(u32)SEGMENT_ROM_START(do_action_static) + (action * DO_ACTION_TEX_SIZE),
|
||||
DO_ACTION_TEX_SIZE, 0, &interfaceCtx->loadQueue, 0);
|
||||
osRecvMesg(&interfaceCtx->loadQueue, NULL, OS_MESG_BLOCK);
|
||||
} else {
|
||||
gSegments[0x09] = PHYSICAL_TO_VIRTUAL(interfaceCtx->doActionSegment);
|
||||
Interface_MemSetZeroed(Lib_SegmentedToVirtual(sDoActionTextures[loadOffset]), 0x60);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_parameter/func_80115764.s")
|
||||
void Interface_SetAButtonDoAction(PlayState* play, u16 aButtonDoAction) {
|
||||
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
||||
PauseContext* pauseCtx = &play->pauseCtx;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_parameter/func_80115844.s")
|
||||
if (interfaceCtx->aButtonDoAction != aButtonDoAction) {
|
||||
interfaceCtx->aButtonDoAction = aButtonDoAction;
|
||||
interfaceCtx->aButtonState = A_BTN_STATE_1;
|
||||
interfaceCtx->aButtonRoll = 0.0f;
|
||||
Interface_LoadAButtonDoActionLabel(interfaceCtx, aButtonDoAction, 1);
|
||||
if (pauseCtx->state != PAUSE_STATE_OFF) {
|
||||
interfaceCtx->aButtonState = A_BTN_STATE_3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Interface_SetBButtonDoAction(PlayState* play, s16 bButtonDoAction) {
|
||||
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
||||
|
||||
if (((BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) >= ITEM_SWORD_KOKIRI) &&
|
||||
(BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) <= ITEM_SWORD_GILDED)) ||
|
||||
(BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) == ITEM_NONE) ||
|
||||
(BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) == ITEM_DEKU_NUT)) {
|
||||
if ((CUR_FORM == PLAYER_FORM_DEKU) && !gSaveContext.save.saveInfo.playerData.isMagicAcquired) {
|
||||
interfaceCtx->bButtonDoAction = 0xFD;
|
||||
} else {
|
||||
interfaceCtx->bButtonDoAction = bButtonDoAction;
|
||||
if (interfaceCtx->bButtonDoAction != DO_ACTION_NONE) {
|
||||
osCreateMesgQueue(&interfaceCtx->loadQueue, &interfaceCtx->loadMsg, 1);
|
||||
DmaMgr_SendRequestImpl(&interfaceCtx->dmaRequest, interfaceCtx->doActionSegment + 0x600,
|
||||
(bButtonDoAction * 0x180) + SEGMENT_ROM_START(do_action_static), 0x180, 0,
|
||||
&interfaceCtx->loadQueue, NULL);
|
||||
osRecvMesg(&interfaceCtx->loadQueue, NULL, OS_MESG_BLOCK);
|
||||
}
|
||||
|
||||
interfaceCtx->bButtonDoActionActive = true;
|
||||
}
|
||||
} else {
|
||||
interfaceCtx->bButtonDoActionActive = false;
|
||||
interfaceCtx->bButtonDoAction = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void Interface_SetTatlCall(PlayState* play, u16 tatlCallState) {
|
||||
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
||||
|
||||
if (((tatlCallState == TATL_STATE_2A) || (tatlCallState == TATL_STATE_2B)) && !interfaceCtx->tatlCalling &&
|
||||
(play->csCtx.state == CS_STATE_IDLE)) {
|
||||
if (tatlCallState == TATL_STATE_2B) {
|
||||
Audio_PlaySfx(NA_SE_VO_NAVY_CALL);
|
||||
}
|
||||
if (tatlCallState == TATL_STATE_2A) {
|
||||
Audio_PlaySfx_AtPosWithReverb(&gSfxDefaultPos, NA_SE_VO_NA_HELLO_2, 0x20);
|
||||
}
|
||||
interfaceCtx->tatlCalling = true;
|
||||
sCUpInvisible = 0;
|
||||
sCUpTimer = 10;
|
||||
} else if (tatlCallState == TATL_STATE_2C) {
|
||||
if (interfaceCtx->tatlCalling) {
|
||||
interfaceCtx->tatlCalling = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Interface_LoadBButtonDoActionLabel(PlayState* play, s16 bButtonDoAction) {
|
||||
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
||||
|
||||
interfaceCtx->unk_224 = bButtonDoAction;
|
||||
|
||||
osCreateMesgQueue(&play->interfaceCtx.loadQueue, &play->interfaceCtx.loadMsg, 1);
|
||||
DmaMgr_SendRequestImpl(&interfaceCtx->dmaRequest, interfaceCtx->doActionSegment + 0x480,
|
||||
(bButtonDoAction * 0x180) + SEGMENT_ROM_START(do_action_static), 0x180, 0,
|
||||
&interfaceCtx->loadQueue, NULL);
|
||||
osRecvMesg(&interfaceCtx->loadQueue, NULL, OS_MESG_BLOCK);
|
||||
|
||||
interfaceCtx->unk_222 = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return false if player is out of health
|
||||
@@ -3701,8 +3799,8 @@ void Magic_Update(PlayState* play) {
|
||||
gSaveContext.magicState = MAGIC_STATE_CONSUME_GORON_ZORA;
|
||||
// fallthrough
|
||||
case MAGIC_STATE_CONSUME_GORON_ZORA:
|
||||
if ((play->pauseCtx.state == PAUSE_STATE_OFF) && (play->pauseCtx.debugEditor == 0) &&
|
||||
(msgCtx->msgMode == MSGMODE_NONE) && (play->gameOverCtx.state == GAMEOVER_INACTIVE) &&
|
||||
if ((play->pauseCtx.state == PAUSE_STATE_OFF) && (play->pauseCtx.debugEditor == DEBUG_EDITOR_NONE) &&
|
||||
(msgCtx->msgMode == 0) && (play->gameOverCtx.state == GAMEOVER_INACTIVE) &&
|
||||
(play->transitionTrigger == TRANS_TRIGGER_OFF) && (play->transitionMode == TRANS_MODE_OFF)) {
|
||||
if (!Play_InCsMode(play)) {
|
||||
interfaceCtx->magicConsumptionTimer--;
|
||||
@@ -4033,8 +4131,8 @@ void Interface_DrawAmmoCount(PlayState* play, s16 button, s16 alpha) {
|
||||
|
||||
if ((button == EQUIP_SLOT_B) && (gSaveContext.minigameStatus == MINIGAME_STATUS_ACTIVE)) {
|
||||
ammo = play->interfaceCtx.minigameAmmo;
|
||||
} else if ((button == EQUIP_SLOT_B) && (play->unk_1887C > 1)) {
|
||||
ammo = play->unk_1887C - 1;
|
||||
} else if ((button == EQUIP_SLOT_B) && (play->bButtonAmmoPlusOne > 1)) {
|
||||
ammo = play->bButtonAmmoPlusOne - 1;
|
||||
} else if (((i == ITEM_BOW) && (AMMO(i) == CUR_CAPACITY(UPG_QUIVER))) ||
|
||||
((i == ITEM_BOMB) && (AMMO(i) == CUR_CAPACITY(UPG_BOMB_BAG))) ||
|
||||
((i == ITEM_DEKU_STICK) && (AMMO(i) == CUR_CAPACITY(UPG_DEKU_STICKS))) ||
|
||||
@@ -4086,8 +4184,8 @@ void Interface_DrawBButtonIcons(PlayState* play) {
|
||||
|
||||
Interface_DrawAmmoCount(play, EQUIP_SLOT_B, interfaceCtx->bAlpha);
|
||||
}
|
||||
} else if ((!interfaceCtx->unk_21C && (interfaceCtx->unk_222 == 0)) ||
|
||||
((interfaceCtx->unk_21C &&
|
||||
} else if ((!interfaceCtx->bButtonDoActionActive && (interfaceCtx->unk_222 == 0)) ||
|
||||
((interfaceCtx->bButtonDoActionActive &&
|
||||
((BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) < ITEM_SWORD_KOKIRI) ||
|
||||
(BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) > ITEM_SWORD_GILDED)) &&
|
||||
BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) != ITEM_NONE) &&
|
||||
@@ -4096,7 +4194,7 @@ void Interface_DrawBButtonIcons(PlayState* play) {
|
||||
if (BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) != ITEM_NONE) {
|
||||
Interface_DrawItemIconTexture(play, interfaceCtx->iconItemSegment, EQUIP_SLOT_B);
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_800000) || CHECK_WEEKEVENTREG(WEEKEVENTREG_08_01) ||
|
||||
(play->unk_1887C >= 2)) {
|
||||
(play->bButtonAmmoPlusOne >= 2)) {
|
||||
gDPPipeSync(OVERLAY_DISP++);
|
||||
gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE,
|
||||
0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0);
|
||||
@@ -4105,8 +4203,8 @@ void Interface_DrawBButtonIcons(PlayState* play) {
|
||||
(play->sceneId != SCENE_BOWLING) &&
|
||||
((gSaveContext.minigameStatus != MINIGAME_STATUS_ACTIVE) ||
|
||||
(gSaveContext.save.entrance != ENTRANCE(ROMANI_RANCH, 0))) &&
|
||||
((gSaveContext.minigameStatus != MINIGAME_STATUS_ACTIVE) || !CHECK_EVENTINF(EVENTINF_35)) &&
|
||||
(!CHECK_WEEKEVENTREG(WEEKEVENTREG_31_80) || (play->unk_1887C != 100))) {
|
||||
((gSaveContext.minigameStatus != MINIGAME_STATUS_ACTIVE) || !(CHECK_EVENTINF(EVENTINF_35))) &&
|
||||
(!CHECK_WEEKEVENTREG(WEEKEVENTREG_31_80) || (play->bButtonAmmoPlusOne != 100))) {
|
||||
Interface_DrawAmmoCount(play, EQUIP_SLOT_B, interfaceCtx->bAlpha);
|
||||
}
|
||||
}
|
||||
@@ -4263,9 +4361,9 @@ void Interface_DrawAButton(PlayState* play) {
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
static s16 sMagicArrowEffectsR[] = { 255, 100, 255 };
|
||||
static s16 sMagicArrowEffectsG[] = { 0, 100, 255 };
|
||||
static s16 sMagicArrowEffectsB[] = { 0, 255, 100 };
|
||||
static s16 sMagicArrowEffectsR[] = { 255, 100, 255 }; // magicArrowEffectsR
|
||||
static s16 sMagicArrowEffectsG[] = { 0, 100, 255 }; // magicArrowEffectsG
|
||||
static s16 sMagicArrowEffectsB[] = { 0, 255, 100 }; // magicArrowEffectsB
|
||||
|
||||
void Interface_DrawPauseMenuEquippingIcons(PlayState* play) {
|
||||
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
||||
@@ -5571,9 +5669,9 @@ void Interface_DrawTimers(PlayState* play) {
|
||||
if (interfaceCtx->magicAlpha != 255) {
|
||||
gSaveContext.timerY[sTimerId] = 22;
|
||||
} else if (gSaveContext.save.saveInfo.playerData.healthCapacity > 0xA0) {
|
||||
gSaveContext.timerY[sTimerId] = 54;
|
||||
gSaveContext.timerY[sTimerId] = 54; // two rows of hearts
|
||||
} else {
|
||||
gSaveContext.timerY[sTimerId] = 46;
|
||||
gSaveContext.timerY[sTimerId] = 46; // one row of hearts
|
||||
}
|
||||
|
||||
if ((interfaceCtx->minigameState == MINIGAME_STATE_COUNTDOWN_GO) ||
|
||||
@@ -5629,9 +5727,9 @@ void Interface_DrawTimers(PlayState* play) {
|
||||
} else {
|
||||
gSaveContext.timerX[sTimerId] = 26;
|
||||
if (gSaveContext.save.saveInfo.playerData.healthCapacity > 0xA0) {
|
||||
gSaveContext.timerY[sTimerId] = 54;
|
||||
gSaveContext.timerY[sTimerId] = 54; // two rows of hearts
|
||||
} else {
|
||||
gSaveContext.timerY[sTimerId] = 46;
|
||||
gSaveContext.timerY[sTimerId] = 46; // one row of hearts
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6025,7 +6123,7 @@ void Interface_DrawMinigameIcons(PlayState* play) {
|
||||
|
||||
if ((play->pauseCtx.state == PAUSE_STATE_OFF) && (play->pauseCtx.debugEditor == DEBUG_EDITOR_NONE)) {
|
||||
// Carrots rendering if the action corresponds to riding a horse
|
||||
if (interfaceCtx->unk_212 == DO_ACTION_FASTER) {
|
||||
if (interfaceCtx->aButtonHorseDoAction == DO_ACTION_FASTER) {
|
||||
// Load Carrot Icon
|
||||
gDPLoadTextureBlock(OVERLAY_DISP++, gCarrotIconTex, G_IM_FMT_RGBA, G_IM_SIZ_32b, 16, 16, 0,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK,
|
||||
@@ -6229,7 +6327,7 @@ void Interface_Draw(PlayState* play) {
|
||||
sRupeeCounterIconPrimColors[CUR_UPG_VALUE(UPG_WALLET)].b, interfaceCtx->magicAlpha);
|
||||
gDPSetEnvColor(OVERLAY_DISP++, sRupeeCounterIconEnvColors[CUR_UPG_VALUE(UPG_WALLET)].r,
|
||||
sRupeeCounterIconEnvColors[CUR_UPG_VALUE(UPG_WALLET)].g,
|
||||
sRupeeCounterIconEnvColors[CUR_UPG_VALUE(UPG_WALLET)].b, 255);
|
||||
sRupeeCounterIconEnvColors[CUR_UPG_VALUE(4)].b, 255);
|
||||
OVERLAY_DISP =
|
||||
Gfx_DrawTexRectIA8(OVERLAY_DISP, gRupeeCounterIconTex, 16, 16, 26, 206, 16, 16, 1 << 10, 1 << 10);
|
||||
|
||||
@@ -6815,7 +6913,7 @@ void Interface_Update(PlayState* play) {
|
||||
|
||||
// Update minigame State
|
||||
if ((play->pauseCtx.state == PAUSE_STATE_OFF) && (play->pauseCtx.debugEditor == DEBUG_EDITOR_NONE)) {
|
||||
if ((u32)interfaceCtx->minigameState != MINIGAME_STATE_NONE) {
|
||||
if (interfaceCtx->minigameState) { // != MINIGAME_STATE_NONE
|
||||
switch (interfaceCtx->minigameState) {
|
||||
case MINIGAME_STATE_COUNTDOWN_SETUP_3:
|
||||
case MINIGAME_STATE_COUNTDOWN_SETUP_2:
|
||||
@@ -6885,12 +6983,12 @@ void Interface_Update(PlayState* play) {
|
||||
if (interfaceCtx->aButtonRoll >= 0.0f) {
|
||||
interfaceCtx->aButtonRoll = 0.0f;
|
||||
interfaceCtx->aButtonState = A_BTN_STATE_0;
|
||||
interfaceCtx->unk_212 = interfaceCtx->aButtonDoAction;
|
||||
aButtonDoAction = interfaceCtx->unk_212;
|
||||
interfaceCtx->aButtonHorseDoAction = interfaceCtx->aButtonDoAction;
|
||||
aButtonDoAction = interfaceCtx->aButtonHorseDoAction;
|
||||
if ((aButtonDoAction == DO_ACTION_MAX) || (aButtonDoAction == DO_ACTION_MAX + 1)) {
|
||||
aButtonDoAction = DO_ACTION_NONE;
|
||||
}
|
||||
func_80115428(&play->interfaceCtx, aButtonDoAction, 0);
|
||||
Interface_LoadAButtonDoActionLabel(&play->interfaceCtx, aButtonDoAction, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -6907,13 +7005,13 @@ void Interface_Update(PlayState* play) {
|
||||
if (interfaceCtx->aButtonRoll >= 0.0f) {
|
||||
interfaceCtx->aButtonRoll = 0.0f;
|
||||
interfaceCtx->aButtonState = A_BTN_STATE_0;
|
||||
interfaceCtx->unk_212 = interfaceCtx->aButtonDoAction;
|
||||
aButtonDoAction = interfaceCtx->unk_212;
|
||||
interfaceCtx->aButtonHorseDoAction = interfaceCtx->aButtonDoAction;
|
||||
aButtonDoAction = interfaceCtx->aButtonHorseDoAction;
|
||||
if ((aButtonDoAction == DO_ACTION_MAX) || (aButtonDoAction == DO_ACTION_MAX + 1)) {
|
||||
aButtonDoAction = DO_ACTION_NONE;
|
||||
}
|
||||
|
||||
func_80115428(&play->interfaceCtx, aButtonDoAction, 0);
|
||||
Interface_LoadAButtonDoActionLabel(&play->interfaceCtx, aButtonDoAction, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -1362,8 +1362,8 @@ s32 func_80123F14(PlayState* play) {
|
||||
return player->stateFlags1 & PLAYER_STATE1_800000;
|
||||
}
|
||||
|
||||
s32 func_80123F2C(PlayState* play, s32 ammo) {
|
||||
play->unk_1887C = ammo + 1;
|
||||
s32 Player_SetBButtonAmmo(PlayState* play, s32 ammo) {
|
||||
play->bButtonAmmoPlusOne = ammo + 1;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ s32 func_80953DA8(BgIngate* this, PlayState* play) {
|
||||
SET_EVENTINF(EVENTINF_41);
|
||||
}
|
||||
Camera_ChangeSetting(mainCam, CAM_SET_BOAT_CRUISE);
|
||||
play->unk_1887C = 0x63;
|
||||
play->bButtonAmmoPlusOne = 99;
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -143,7 +143,7 @@ void func_80953E38(PlayState* play) {
|
||||
CLEAR_EVENTINF(EVENTINF_41);
|
||||
}
|
||||
|
||||
play->unk_1887C = -1;
|
||||
play->bButtonAmmoPlusOne = -1;
|
||||
}
|
||||
|
||||
void func_80953EA4(BgIngate* this, PlayState* play) {
|
||||
|
||||
@@ -721,10 +721,10 @@ void func_80C02704(EnBomjimb* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
u16 D_80C03230[] = {
|
||||
0x0721, 0x0722, 0x0723, 0x0724, 0x072C,
|
||||
};
|
||||
void func_80C02740(EnBomjimb* this, PlayState* play) {
|
||||
static u16 D_80C03230[] = {
|
||||
0x0721, 0x0722, 0x0723, 0x0724, 0x072C,
|
||||
};
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
func_80C012E0(this);
|
||||
|
||||
@@ -825,7 +825,7 @@ void EnFsn_BeginInteraction(EnFsn* this, PlayState* play) {
|
||||
CutsceneManager_StartWithPlayerCsAndSetFlag(this->csId, &this->actor);
|
||||
this->cutsceneState = ENFSN_CUTSCENESTATE_PLAYING;
|
||||
if (Player_GetMask(play) == PLAYER_MASK_NONE) {
|
||||
func_8011552C(play, DO_ACTION_NEXT);
|
||||
Interface_SetAButtonDoAction(play, DO_ACTION_NEXT);
|
||||
if (EnFsn_HasItemsToSell()) {
|
||||
this->actionFunc = EnFsn_AskBuyOrSell;
|
||||
} else {
|
||||
@@ -916,7 +916,7 @@ void EnFsn_AskBuyOrSell(EnFsn* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
} else if (talkState == TEXT_STATE_CHOICE) {
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
Interface_SetAButtonDoAction(play, DO_ACTION_DECIDE);
|
||||
if (!EnFsn_TestEndInteraction(this, play, CONTROLLER1(&play->state)) && Message_ShouldAdvance(play)) {
|
||||
switch (play->msgCtx.choiceIndex) {
|
||||
case 0:
|
||||
@@ -1100,7 +1100,7 @@ void EnFsn_ResumeShoppingInteraction(EnFsn* this, PlayState* play) {
|
||||
} else if (this->actor.textId != 0x29D6) {
|
||||
this->actionFunc = EnFsn_AskCanBuyAterRunningOutOfItems;
|
||||
} else {
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
Interface_SetAButtonDoAction(play, DO_ACTION_DECIDE);
|
||||
this->stickLeftPrompt.isEnabled = false;
|
||||
this->stickRightPrompt.isEnabled = true;
|
||||
this->actionFunc = EnFsn_FaceShopkeeperSelling;
|
||||
@@ -1151,7 +1151,7 @@ void EnFsn_BrowseShelf(EnFsn* this, PlayState* play) {
|
||||
this->stickLeftPrompt.isEnabled = true;
|
||||
EnFsn_UpdateCursorPos(this, play);
|
||||
if (talkstate == TEXT_STATE_5) {
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
Interface_SetAButtonDoAction(play, DO_ACTION_DECIDE);
|
||||
if (!EnFsn_HasPlayerSelectedItem(this, play, CONTROLLER1(&play->state))) {
|
||||
EnFsn_CursorLeftRight(this);
|
||||
if (this->cursorIndex != prevCursorIdx) {
|
||||
@@ -1259,7 +1259,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, DO_ACTION_DECIDE);
|
||||
Interface_SetAButtonDoAction(play, DO_ACTION_DECIDE);
|
||||
if (!EnFsn_TestCancelOption(this, play, CONTROLLER1(&play->state)) && Message_ShouldAdvance(play)) {
|
||||
switch (play->msgCtx.choiceIndex) {
|
||||
case 0:
|
||||
@@ -1392,7 +1392,7 @@ void EnFsn_FaceShopkeeperSelling(EnFsn* this, PlayState* play) {
|
||||
u8 cursorIndex;
|
||||
|
||||
if (talkState == TEXT_STATE_CHOICE) {
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
Interface_SetAButtonDoAction(play, DO_ACTION_DECIDE);
|
||||
if (!EnFsn_TestEndInteraction(this, play, CONTROLLER1(&play->state)) &&
|
||||
(!Message_ShouldAdvance(play) || !EnFsn_FacingShopkeeperDialogResult(this, play)) &&
|
||||
this->stickAccumX > 0) {
|
||||
@@ -1400,7 +1400,7 @@ void EnFsn_FaceShopkeeperSelling(EnFsn* this, PlayState* play) {
|
||||
if (cursorIndex != CURSOR_INVALID) {
|
||||
this->cursorIndex = cursorIndex;
|
||||
this->actionFunc = EnFsn_LookToShelf;
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
Interface_SetAButtonDoAction(play, DO_ACTION_DECIDE);
|
||||
this->stickRightPrompt.isEnabled = false;
|
||||
Audio_PlaySfx(NA_SE_SY_CURSOR);
|
||||
}
|
||||
|
||||
@@ -4017,8 +4017,8 @@ void func_80886C00(EnHorse* this, PlayState* play) {
|
||||
|
||||
if (((this->action == ENHORSE_ACTION_MOUNTED_WALK) || (this->action == ENHORSE_ACTION_MOUNTED_TROT) ||
|
||||
(this->action == ENHORSE_ACTION_MOUNTED_GALLOP)) &&
|
||||
(CHECK_BTN_ALL(input->press.button, BTN_A) || (AudioVoice_GetWord() == VOICE_WORD_ID_HIYA)) &&
|
||||
(play->interfaceCtx.unk_212 == 8) && !(this->stateFlags & ENHORSE_BOOST) &&
|
||||
(CHECK_BTN_ALL(input->press.button, BTN_A) || (AudioVoice_GetWord() == 5)) &&
|
||||
(play->interfaceCtx.aButtonHorseDoAction == DO_ACTION_FASTER) && !(this->stateFlags & ENHORSE_BOOST) &&
|
||||
!(this->stateFlags & ENHORSE_FLAG_8) && !(this->stateFlags & ENHORSE_FLAG_9)) {
|
||||
if (this->numBoosts > 0) {
|
||||
Rumble_Request(0.0f, 180, 20, 100);
|
||||
|
||||
@@ -343,7 +343,7 @@ s32 EnOssan_TestCancelOption(EnOssan* this, PlayState* play, Input* input) {
|
||||
}
|
||||
|
||||
void EnOssan_SetupStartShopping(PlayState* play, EnOssan* this, u8 skipHello) {
|
||||
func_8011552C(play, DO_ACTION_NEXT);
|
||||
Interface_SetAButtonDoAction(play, DO_ACTION_NEXT);
|
||||
if (!skipHello) {
|
||||
EnOssan_SetupAction(this, EnOssan_Hello);
|
||||
} else {
|
||||
@@ -354,7 +354,7 @@ void EnOssan_SetupStartShopping(PlayState* play, EnOssan* this, u8 skipHello) {
|
||||
void EnOssan_StartShopping(PlayState* play, EnOssan* this) {
|
||||
EnOssan_SetupAction(this, EnOssan_FaceShopkeeper);
|
||||
Message_ContinueTextbox(play, 0x640);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
Interface_SetAButtonDoAction(play, DO_ACTION_DECIDE);
|
||||
this->stickRightPrompt.isEnabled = true;
|
||||
this->stickLeftPrompt.isEnabled = true;
|
||||
}
|
||||
@@ -612,7 +612,7 @@ s32 EnOssan_FacingShopkeeperDialogResult(EnOssan* this, PlayState* play) {
|
||||
}
|
||||
EnOssan_SetupAction(this, EnOssan_TalkToShopkeeper);
|
||||
Message_ContinueTextbox(play, sTalkOptionTextIds[this->actor.params]);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
Interface_SetAButtonDoAction(play, DO_ACTION_DECIDE);
|
||||
this->stickLeftPrompt.isEnabled = false;
|
||||
this->stickRightPrompt.isEnabled = false;
|
||||
return true;
|
||||
@@ -642,7 +642,7 @@ void EnOssan_FaceShopkeeper(EnOssan* this, PlayState* play) {
|
||||
this->cutsceneState = ENOSSAN_CUTSCENESTATE_WAITING;
|
||||
} else {
|
||||
if (talkState == TEXT_STATE_CHOICE) {
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
Interface_SetAButtonDoAction(play, DO_ACTION_DECIDE);
|
||||
if (!EnOssan_TestEndInteraction(this, play, CONTROLLER1(&play->state)) &&
|
||||
(!Message_ShouldAdvance(play) || !EnOssan_FacingShopkeeperDialogResult(this, play))) {
|
||||
if (this->stickAccumX < 0) {
|
||||
@@ -650,7 +650,7 @@ void EnOssan_FaceShopkeeper(EnOssan* this, PlayState* play) {
|
||||
if (cursorIndex != CURSOR_INVALID) {
|
||||
this->cursorIndex = cursorIndex;
|
||||
EnOssan_SetupAction(this, EnOssan_LookToLeftShelf);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
Interface_SetAButtonDoAction(play, DO_ACTION_DECIDE);
|
||||
this->stickLeftPrompt.isEnabled = false;
|
||||
Audio_PlaySfx(NA_SE_SY_CURSOR);
|
||||
}
|
||||
@@ -659,7 +659,7 @@ void EnOssan_FaceShopkeeper(EnOssan* this, PlayState* play) {
|
||||
if (cursorIndex != CURSOR_INVALID) {
|
||||
this->cursorIndex = cursorIndex;
|
||||
EnOssan_SetupAction(this, EnOssan_LookToRightShelf);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
Interface_SetAButtonDoAction(play, DO_ACTION_DECIDE);
|
||||
this->stickRightPrompt.isEnabled = false;
|
||||
Audio_PlaySfx(NA_SE_SY_CURSOR);
|
||||
}
|
||||
@@ -865,7 +865,7 @@ void EnOssan_BrowseLeftShelf(EnOssan* this, PlayState* play) {
|
||||
this->stickRightPrompt.isEnabled = true;
|
||||
EnOssan_UpdateCursorPos(play, this);
|
||||
if (talkState == TEXT_STATE_5) {
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
Interface_SetAButtonDoAction(play, DO_ACTION_DECIDE);
|
||||
if (!EnOssan_HasPlayerSelectedItem(play, this, CONTROLLER1(&play->state))) {
|
||||
if (this->moveHorizontal) {
|
||||
if (this->stickAccumX > 0) {
|
||||
@@ -923,7 +923,7 @@ void EnOssan_BrowseRightShelf(EnOssan* this, PlayState* play) {
|
||||
this->stickLeftPrompt.isEnabled = true;
|
||||
EnOssan_UpdateCursorPos(play, this);
|
||||
if (talkState == TEXT_STATE_5) {
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
Interface_SetAButtonDoAction(play, DO_ACTION_DECIDE);
|
||||
if (!EnOssan_HasPlayerSelectedItem(play, this, CONTROLLER1(&play->state))) {
|
||||
if (this->moveHorizontal != 0) {
|
||||
if (this->stickAccumX < 0) {
|
||||
@@ -1073,7 +1073,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, DO_ACTION_DECIDE);
|
||||
Interface_SetAButtonDoAction(play, DO_ACTION_DECIDE);
|
||||
if (!EnOssan_TestCancelOption(this, play, CONTROLLER1(&play->state)) && Message_ShouldAdvance(play)) {
|
||||
switch (play->msgCtx.choiceIndex) {
|
||||
case 0:
|
||||
@@ -1144,7 +1144,7 @@ void EnOssan_ContinueShopping(EnOssan* this, PlayState* play) {
|
||||
EnGirlA* item;
|
||||
|
||||
if (talkState == TEXT_STATE_CHOICE) {
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
Interface_SetAButtonDoAction(play, DO_ACTION_DECIDE);
|
||||
if (Message_ShouldAdvance(play)) {
|
||||
EnOssan_ResetItemPosition(this);
|
||||
item = this->items[this->cursorIndex];
|
||||
|
||||
@@ -500,7 +500,7 @@ s32 EnSob1_TestCancelOption(EnSob1* this, PlayState* play, Input* input) {
|
||||
}
|
||||
|
||||
void EnSob1_SetupStartShopping(PlayState* play, EnSob1* this, u8 skipHello) {
|
||||
func_8011552C(play, DO_ACTION_NEXT);
|
||||
Interface_SetAButtonDoAction(play, DO_ACTION_NEXT);
|
||||
if (!skipHello) {
|
||||
EnSob1_SetupAction(this, EnSob1_Hello);
|
||||
} else {
|
||||
@@ -511,7 +511,7 @@ void EnSob1_SetupStartShopping(PlayState* play, EnSob1* this, u8 skipHello) {
|
||||
void EnSob1_StartShopping(PlayState* play, EnSob1* this) {
|
||||
EnSob1_SetupAction(this, EnSob1_FaceShopkeeper);
|
||||
Message_ContinueTextbox(play, sFacingShopkeeperTextIds[this->shopType]);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
Interface_SetAButtonDoAction(play, DO_ACTION_DECIDE);
|
||||
this->stickLeftPrompt.isEnabled = false;
|
||||
this->stickRightPrompt.isEnabled = true;
|
||||
}
|
||||
@@ -520,7 +520,7 @@ void EnSob1_TalkToShopkeeper(PlayState* play, EnSob1* this) {
|
||||
EnSob1_SetupAction(this, EnSob1_TalkingToShopkeeper);
|
||||
this->talkOptionTextId = EnSob1_GetTalkOption(this, play);
|
||||
Message_ContinueTextbox(play, this->talkOptionTextId);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
Interface_SetAButtonDoAction(play, DO_ACTION_DECIDE);
|
||||
this->stickLeftPrompt.isEnabled = false;
|
||||
this->stickRightPrompt.isEnabled = false;
|
||||
}
|
||||
@@ -687,7 +687,7 @@ void EnSob1_FaceShopkeeper(EnSob1* this, PlayState* play) {
|
||||
this->cutsceneState = ENSOB1_CUTSCENESTATE_WAITING;
|
||||
} else {
|
||||
if (talkState == TEXT_STATE_CHOICE) {
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
Interface_SetAButtonDoAction(play, DO_ACTION_DECIDE);
|
||||
if (!EnSob1_TestEndInteraction(this, play, CONTROLLER1(&play->state))) {
|
||||
if (!Message_ShouldAdvance(play) || !EnSob1_FacingShopkeeperDialogResult(this, play)) {
|
||||
if (this->stickAccumX > 0) {
|
||||
@@ -695,7 +695,7 @@ void EnSob1_FaceShopkeeper(EnSob1* this, PlayState* play) {
|
||||
if (cursorIndex != CURSOR_INVALID) {
|
||||
this->cursorIndex = cursorIndex;
|
||||
EnSob1_SetupAction(this, EnSob1_LookToShelf);
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
Interface_SetAButtonDoAction(play, DO_ACTION_DECIDE);
|
||||
this->stickRightPrompt.isEnabled = false;
|
||||
Audio_PlaySfx(NA_SE_SY_CURSOR);
|
||||
}
|
||||
@@ -940,7 +940,7 @@ void EnSob1_BrowseShelf(EnSob1* this, PlayState* play) {
|
||||
this->stickLeftPrompt.isEnabled = true;
|
||||
EnSob1_UpdateCursorPos(play, this);
|
||||
if (talkState == TEXT_STATE_5) {
|
||||
func_8011552C(play, DO_ACTION_DECIDE);
|
||||
Interface_SetAButtonDoAction(play, DO_ACTION_DECIDE);
|
||||
if (!EnSob1_HasPlayerSelectedItem(play, this, CONTROLLER1(&play->state))) {
|
||||
EnSob1_CursorLeftRight(play, this);
|
||||
cursorIndex = this->cursorIndex;
|
||||
@@ -1060,7 +1060,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, DO_ACTION_DECIDE);
|
||||
Interface_SetAButtonDoAction(play, DO_ACTION_DECIDE);
|
||||
if (!EnSob1_TestCancelOption(this, play, CONTROLLER1(&play->state)) && Message_ShouldAdvance(play)) {
|
||||
switch (play->msgCtx.choiceIndex) {
|
||||
case 0:
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user