mirror of
https://github.com/zeldaret/oot.git
synced 2025-02-23 15:55:47 +00:00
Name a few more things, more KaleidoScope_DrawQuestStatus touches
This commit is contained in:
parent
5337eddf3a
commit
c143fe843a
8 changed files with 115 additions and 89 deletions
|
@ -154,7 +154,7 @@
|
|||
#define R_COMPASS_OFFSET_X VREG(16)
|
||||
#define R_COMPASS_OFFSET_Y VREG(17)
|
||||
#define R_MINIMAP_COLOR(i) VREG(18 + (i))
|
||||
#define R_PAUSE_SONG_NOTE_Y(ocarinaButtonIndex) VREG(21 + (ocarinaButtonIndex)) // VREG(21-25)
|
||||
#define R_PAUSE_SONG_OCA_BTN_Y(ocarinaBtnIndex) VREG(21 + (ocarinaBtnIndex)) // VREG(21-25)
|
||||
#define R_OCARINA_BUTTONS_XPOS VREG(28)
|
||||
#define R_OCARINA_BUTTONS_XPOS_OFFSET VREG(29)
|
||||
#define R_TEXT_ADJUST_COLOR_1_R VREG(33)
|
||||
|
@ -164,6 +164,7 @@
|
|||
#define R_TEXT_ADJUST_COLOR_2_G VREG(37)
|
||||
#define R_TEXT_ADJUST_COLOR_2_B VREG(38)
|
||||
#define R_OCARINA_BUTTONS_YPOS(note) VREG(45 + (note))
|
||||
#define R_OCARINA_BUTTONS_APPEAR_ALPHA_STEP VREG(50)
|
||||
#define R_OCARINA_BUTTONS_YPOS_OFFSET VREG(51)
|
||||
#define R_ITEM_AMMO_X(i) VREG(64 + (i))
|
||||
#define R_ITEM_AMMO_Y(i) VREG(68 + (i))
|
||||
|
|
|
@ -758,14 +758,14 @@ typedef enum {
|
|||
|
||||
typedef enum {
|
||||
/* 0 */ PAUSE_S6_0_IDLE_,
|
||||
/* 1 */ PAUSE_S6_1,
|
||||
/* 1 */ PAUSE_S6_1_SWITCH_PAGE_,
|
||||
/* 2 */ PAUSE_S6_2_PLAYBACK_SONG_,
|
||||
/* 3 */ PAUSE_S6_3,
|
||||
/* 4 */ PAUSE_S6_4_PLAYER_PLAYING_SONG_INIT_,
|
||||
/* 5 */ PAUSE_S6_5_PLAYER_PLAYING_SONG_,
|
||||
/* 6 */ PAUSE_S6_6,
|
||||
/* 6 */ PAUSE_S6_6_PLAYER_PLAYING_SONG_DONE_,
|
||||
/* 7 */ PAUSE_S6_7,
|
||||
/* 8 */ PAUSE_S6_8_PLAYBACK_SONG_READY_,
|
||||
/* 8 */ PAUSE_S6_8_IDLE_CURSOR_ON_SONG_,
|
||||
/* 9 */ PAUSE_S6_9_PLAYBACK_SONG_START_
|
||||
} PauseCtxUnk1E4;
|
||||
|
||||
|
@ -818,7 +818,7 @@ typedef struct {
|
|||
/* 0x01E4 */ u16 unk_1E4_ps6_;
|
||||
/* 0x01E6 */ u16 mode;
|
||||
/* 0x01E8 */ u16 pageIndex; // "kscp_pos"
|
||||
/* 0x01EA */ u16 unk_1EA;
|
||||
/* 0x01EA */ u16 unk_1EA_PageSwitchTimer__;
|
||||
/* 0x01EC */ u16 unk_1EC_ps7_;
|
||||
/* 0x01F0 */ f32 savePromptOffsetDepth_unk_1F0;
|
||||
/* 0x01F4 */ f32 rollRotPageItem;
|
||||
|
|
|
@ -526,11 +526,11 @@ void func_80111070(void) {
|
|||
R_MINIMAP_COLOR(2) = 255;
|
||||
}
|
||||
|
||||
R_PAUSE_SONG_NOTE_Y(OCARINA_BTN_A) = 0;
|
||||
R_PAUSE_SONG_NOTE_Y(OCARINA_BTN_C_DOWN) = 0;
|
||||
R_PAUSE_SONG_NOTE_Y(OCARINA_BTN_C_RIGHT) = 0;
|
||||
R_PAUSE_SONG_NOTE_Y(OCARINA_BTN_C_LEFT) = 0;
|
||||
R_PAUSE_SONG_NOTE_Y(OCARINA_BTN_C_UP) = 0;
|
||||
R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_A) = 0;
|
||||
R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_C_DOWN) = 0;
|
||||
R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_C_RIGHT) = 0;
|
||||
R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_C_LEFT) = 0;
|
||||
R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_C_UP) = 0;
|
||||
|
||||
VREG(26) = 0;
|
||||
VREG(27) = 0;
|
||||
|
@ -557,7 +557,7 @@ void func_80111070(void) {
|
|||
R_OCARINA_BUTTONS_YPOS(2) = 176;
|
||||
R_OCARINA_BUTTONS_YPOS(3) = 172;
|
||||
R_OCARINA_BUTTONS_YPOS(4) = 170;
|
||||
VREG(50) = 30;
|
||||
R_OCARINA_BUTTONS_APPEAR_ALPHA_STEP = 30;
|
||||
R_OCARINA_BUTTONS_YPOS_OFFSET = 0;
|
||||
VREG(52) = -16;
|
||||
VREG(53) = 230;
|
||||
|
|
|
@ -29,8 +29,9 @@ void KaleidoSetup_Update(PlayState* play) {
|
|||
R_PAUSE_CURSOR_LEFT_X = -175;
|
||||
R_PAUSE_CURSOR_RIGHT_X = 155;
|
||||
|
||||
pauseCtx->unk_1EA = 0;
|
||||
pauseCtx->unk_1E4_ps6_ = PAUSE_S6_1;
|
||||
pauseCtx->unk_1EA_PageSwitchTimer__ = 0;
|
||||
pauseCtx->unk_1E4_ps6_ =
|
||||
PAUSE_S6_1_SWITCH_PAGE_; // irrelevant? reset in PAUSE_STATE_1 by KaleidoScopeCall_Update
|
||||
|
||||
if (ZREG(48) == 0) {
|
||||
pauseCtx->eye.x = sKaleidoSetupEyeX0[pauseCtx->pageIndex];
|
||||
|
@ -69,7 +70,7 @@ void KaleidoSetup_Init(PlayState* play) {
|
|||
pauseCtx->state = PAUSE_STATE_0;
|
||||
pauseCtx->debugState = 0;
|
||||
pauseCtx->alpha = 0;
|
||||
pauseCtx->unk_1EA = 0;
|
||||
pauseCtx->unk_1EA_PageSwitchTimer__ = 0;
|
||||
pauseCtx->unk_1E4_ps6_ = PAUSE_S6_0_IDLE_;
|
||||
pauseCtx->mode = 0;
|
||||
pauseCtx->pageIndex = PAUSE_ITEM;
|
||||
|
|
|
@ -2914,7 +2914,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||
|
||||
if (1) {}
|
||||
if (sOcarinaButtonAlphaValues[i] != 255) {
|
||||
sOcarinaButtonAlphaValues[i] += VREG(50);
|
||||
sOcarinaButtonAlphaValues[i] += R_OCARINA_BUTTONS_APPEAR_ALPHA_STEP;
|
||||
if (sOcarinaButtonAlphaValues[i] >= 255) {
|
||||
sOcarinaButtonAlphaValues[i] = 255;
|
||||
}
|
||||
|
|
|
@ -49,9 +49,9 @@ void EnMag_Init(Actor* thisx, PlayState* play) {
|
|||
this->fadeOutAlphaStep = 10;
|
||||
|
||||
VREG(19) = 99;
|
||||
R_PAUSE_SONG_NOTE_Y(OCARINA_BTN_A) = 9;
|
||||
R_PAUSE_SONG_NOTE_Y(OCARINA_BTN_C_RIGHT) = 10;
|
||||
R_PAUSE_SONG_NOTE_Y(OCARINA_BTN_C_LEFT) = 8;
|
||||
R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_A) = 9;
|
||||
R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_C_RIGHT) = 10;
|
||||
R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_C_LEFT) = 8;
|
||||
|
||||
this->effectScroll = 0;
|
||||
this->unk_E30C = 0;
|
||||
|
|
|
@ -31,7 +31,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
static s16 sHpPrimState = 0;
|
||||
|
||||
static s16 sPlayedSongBtnsNum = 0;
|
||||
static s16 D_8082A120_playbackSongStartTimer_ = 0;
|
||||
static s16 sPlaybackSongStartDelayTimer = 0;
|
||||
static u8 sPlayedSongBtns[SONG_MAX_LENGTH] = { 0 };
|
||||
static s32 sUnused1 = 0;
|
||||
static void* sOcarinaBtnTextures[] = {
|
||||
|
@ -117,7 +117,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
|
||||
if ((!pauseCtx->unk_1E4_ps6_ /* PAUSE_S6_0_IDLE_ */ ||
|
||||
(pauseCtx->unk_1E4_ps6_ == PAUSE_S6_5_PLAYER_PLAYING_SONG_) ||
|
||||
(pauseCtx->unk_1E4_ps6_ == PAUSE_S6_8_PLAYBACK_SONG_READY_)) &&
|
||||
(pauseCtx->unk_1E4_ps6_ == PAUSE_S6_8_IDLE_CURSOR_ON_SONG_)) &&
|
||||
(pauseCtx->pageIndex == PAUSE_QUEST)) {
|
||||
|
||||
pauseCtx->cursorColorSet = 0;
|
||||
|
@ -242,10 +242,10 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
cursor = pauseCtx->cursorSlot[PAUSE_QUEST];
|
||||
pauseCtx->ocarinaSongIdx = gOcarinaSongItemMap[cursor - QUEST_SONG_MINUET];
|
||||
|
||||
D_8082A120_playbackSongStartTimer_ = 10;
|
||||
sPlaybackSongStartDelayTimer = 10;
|
||||
|
||||
for (i = 0; i < SONG_MAX_LENGTH; i++) {
|
||||
sPlayedSongBtns[i] = 0xFF;
|
||||
sPlayedSongBtns[i] = OCARINA_BTN_INVALID;
|
||||
sPlayedSongBtnsAlpha[i] = 0;
|
||||
}
|
||||
sPlayedSongBtnsNum = 0;
|
||||
|
@ -259,13 +259,13 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
pauseCtx->ocarinaStaff->pos = 0;
|
||||
pauseCtx->ocarinaStaff->state = 0xFF;
|
||||
|
||||
R_PAUSE_SONG_NOTE_Y(OCARINA_BTN_A) = -62;
|
||||
R_PAUSE_SONG_NOTE_Y(OCARINA_BTN_C_DOWN) = -56;
|
||||
R_PAUSE_SONG_NOTE_Y(OCARINA_BTN_C_RIGHT) = -49;
|
||||
R_PAUSE_SONG_NOTE_Y(OCARINA_BTN_C_LEFT) = -46;
|
||||
R_PAUSE_SONG_NOTE_Y(OCARINA_BTN_C_UP) = -41;
|
||||
R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_A) = -62;
|
||||
R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_C_DOWN) = -56;
|
||||
R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_C_RIGHT) = -49;
|
||||
R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_C_LEFT) = -46;
|
||||
R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_C_UP) = -41;
|
||||
|
||||
pauseCtx->unk_1E4_ps6_ = PAUSE_S6_8_PLAYBACK_SONG_READY_;
|
||||
pauseCtx->unk_1E4_ps6_ = PAUSE_S6_8_IDLE_CURSOR_ON_SONG_;
|
||||
|
||||
// Stop having the player play a song as done above
|
||||
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
|
||||
|
@ -278,13 +278,13 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
|
||||
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
|
||||
}
|
||||
} else if (pauseCtx->unk_1E4_ps6_ == PAUSE_S6_8_PLAYBACK_SONG_READY_) {
|
||||
} else if (pauseCtx->unk_1E4_ps6_ == PAUSE_S6_8_IDLE_CURSOR_ON_SONG_) {
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_A) && (cursor >= QUEST_SONG_MINUET) &&
|
||||
(cursor < QUEST_KOKIRI_EMERALD)) {
|
||||
|
||||
pauseCtx->unk_1E4_ps6_ = PAUSE_S6_9_PLAYBACK_SONG_START_;
|
||||
|
||||
D_8082A120_playbackSongStartTimer_ = 10;
|
||||
sPlaybackSongStartDelayTimer = 10;
|
||||
}
|
||||
}
|
||||
} else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
|
||||
|
@ -344,20 +344,22 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
}
|
||||
|
||||
} else if (pauseCtx->unk_1E4_ps6_ == PAUSE_S6_9_PLAYBACK_SONG_START_) {
|
||||
// After a short delay, start playing the selected song back to the player
|
||||
|
||||
pauseCtx->cursorColorSet = 8;
|
||||
|
||||
if (--D_8082A120_playbackSongStartTimer_ == 0) {
|
||||
if (--sPlaybackSongStartDelayTimer == 0) {
|
||||
for (i = 0; i < SONG_MAX_LENGTH; i++) {
|
||||
sPlayedSongBtns[i] = 0xFF;
|
||||
sPlayedSongBtns[i] = OCARINA_BTN_INVALID;
|
||||
sPlayedSongBtnsAlpha[i] = 0;
|
||||
}
|
||||
sPlayedSongBtnsNum = 0;
|
||||
|
||||
R_PAUSE_SONG_NOTE_Y(OCARINA_BTN_A) = -62;
|
||||
R_PAUSE_SONG_NOTE_Y(OCARINA_BTN_C_DOWN) = -56;
|
||||
R_PAUSE_SONG_NOTE_Y(OCARINA_BTN_C_RIGHT) = -49;
|
||||
R_PAUSE_SONG_NOTE_Y(OCARINA_BTN_C_LEFT) = -46;
|
||||
R_PAUSE_SONG_NOTE_Y(OCARINA_BTN_C_UP) = -41;
|
||||
R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_A) = -62;
|
||||
R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_C_DOWN) = -56;
|
||||
R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_C_RIGHT) = -49;
|
||||
R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_C_LEFT) = -46;
|
||||
R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_C_UP) = -41;
|
||||
|
||||
cursor = pauseCtx->cursorSlot[PAUSE_QUEST];
|
||||
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_DEFAULT);
|
||||
|
@ -564,14 +566,17 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
||||
|
||||
bufI += 4;
|
||||
|
||||
// Update cursor color
|
||||
if ((pauseCtx->cursorSpecialPos == 0) && (cursor >= QUEST_SONG_MINUET) && (cursor < QUEST_KOKIRI_EMERALD)) {
|
||||
if ((pauseCtx->unk_1E4_ps6_ < PAUSE_S6_3) /* PAUSE_S6_0_IDLE_, PAUSE_S6_1, PAUSE_S6_2_PLAYBACK_SONG_ */ ||
|
||||
(pauseCtx->unk_1E4_ps6_ == PAUSE_S6_5_PLAYER_PLAYING_SONG_) ||
|
||||
(pauseCtx->unk_1E4_ps6_ == PAUSE_S6_8_PLAYBACK_SONG_READY_)) {
|
||||
if ((pauseCtx->unk_1E4_ps6_ <
|
||||
PAUSE_S6_3) /* PAUSE_S6_0_IDLE_, PAUSE_S6_1_SWITCH_PAGE_, PAUSE_S6_2_PLAYBACK_SONG_ */
|
||||
|| (pauseCtx->unk_1E4_ps6_ == PAUSE_S6_5_PLAYER_PLAYING_SONG_) ||
|
||||
(pauseCtx->unk_1E4_ps6_ == PAUSE_S6_8_IDLE_CURSOR_ON_SONG_)) {
|
||||
if (pauseCtx->cursorItem[pauseCtx->pageIndex] != PAUSE_ITEM_NONE) {
|
||||
pauseCtx->cursorColorSet = 8;
|
||||
// PAUSE_S6_2_PLAYBACK_SONG_, PAUSE_S6_3, PAUSE_S6_4_PLAYER_PLAYING_SONG_INIT_,
|
||||
// PAUSE_S6_5_PLAYER_PLAYING_SONG_, PAUSE_S6_6
|
||||
// PAUSE_S6_5_PLAYER_PLAYING_SONG_, PAUSE_S6_6_PLAYER_PLAYING_SONG_DONE_
|
||||
if ((pauseCtx->unk_1E4_ps6_ >= PAUSE_S6_2_PLAYBACK_SONG_) &&
|
||||
(pauseCtx->unk_1E4_ps6_ < PAUSE_S6_7)) {
|
||||
pauseCtx->cursorColorSet = 0;
|
||||
|
@ -581,6 +586,8 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
}
|
||||
|
||||
if (pauseCtx->unk_1E4_ps6_ == PAUSE_S6_2_PLAYBACK_SONG_) {
|
||||
// Draw ocarina buttons as the song playback progresses
|
||||
|
||||
pauseCtx->ocarinaStaff = AudioOcarina_GetPlaybackStaff();
|
||||
|
||||
if (pauseCtx->ocarinaStaff->pos != 0) {
|
||||
|
@ -589,27 +596,27 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
sPlayedSongBtns[pauseCtx->ocarinaStaff->pos - 1] = pauseCtx->ocarinaStaff->buttonIndex;
|
||||
}
|
||||
|
||||
for (j = 0, i = 0; j < 8; j++, i += 4, bufI += 4) {
|
||||
if (sPlayedSongBtns[j] == 0xFF) {
|
||||
for (j = 0, i = 0; j < SONG_MAX_LENGTH; j++, i += 4, bufI += 4) {
|
||||
if (sPlayedSongBtns[j] == OCARINA_BTN_INVALID) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (sPlayedSongBtnsAlpha[j] != 255) {
|
||||
sPlayedSongBtnsAlpha[j] += VREG(50);
|
||||
sPlayedSongBtnsAlpha[j] += R_OCARINA_BUTTONS_APPEAR_ALPHA_STEP;
|
||||
if (sPlayedSongBtnsAlpha[j] >= 255) {
|
||||
sPlayedSongBtnsAlpha[j] = 255;
|
||||
}
|
||||
}
|
||||
|
||||
pauseCtx->questVtx[bufI + 0].v.ob[1] = pauseCtx->questVtx[bufI + 1].v.ob[1] =
|
||||
R_PAUSE_SONG_NOTE_Y(sPlayedSongBtns[j]);
|
||||
R_PAUSE_SONG_OCA_BTN_Y(sPlayedSongBtns[j]);
|
||||
|
||||
pauseCtx->questVtx[bufI + 2].v.ob[1] = pauseCtx->questVtx[bufI + 3].v.ob[1] =
|
||||
pauseCtx->questVtx[bufI + 0].v.ob[1] - 12;
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
|
||||
if (sPlayedSongBtns[j] == 0) {
|
||||
if (sPlayedSongBtns[j] == OCARINA_BTN_A) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 80, 255, 150, sPlayedSongBtnsAlpha[j]);
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 50, sPlayedSongBtnsAlpha[j]);
|
||||
|
@ -626,28 +633,33 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
}
|
||||
}
|
||||
} else if (((pauseCtx->unk_1E4_ps6_ >= PAUSE_S6_4_PLAYER_PLAYING_SONG_INIT_) &&
|
||||
(pauseCtx->unk_1E4_ps6_ <= PAUSE_S6_6)) /* PAUSE_S6_4_PLAYER_PLAYING_SONG_INIT_,
|
||||
PAUSE_S6_5_PLAYER_PLAYING_SONG_, PAUSE_S6_6 */
|
||||
|| (pauseCtx->unk_1E4_ps6_ == PAUSE_S6_8_PLAYBACK_SONG_READY_)) {
|
||||
(pauseCtx->unk_1E4_ps6_ <= PAUSE_S6_6_PLAYER_PLAYING_SONG_DONE_)
|
||||
/* PAUSE_S6_4_PLAYER_PLAYING_SONG_INIT_, PAUSE_S6_5_PLAYER_PLAYING_SONG_,
|
||||
PAUSE_S6_6_PLAYER_PLAYING_SONG_DONE_ */
|
||||
) ||
|
||||
(pauseCtx->unk_1E4_ps6_ == PAUSE_S6_8_IDLE_CURSOR_ON_SONG_)) {
|
||||
// Draw the buttons for playing a song
|
||||
|
||||
stepGreen = pauseCtx->ocarinaSongIdx;
|
||||
stepRed = gOcarinaSongButtons[stepGreen].numButtons;
|
||||
|
||||
for (j = bufI, i = 0; i < stepRed; i++, bufI += 4) {
|
||||
pauseCtx->questVtx[bufI + 0].v.ob[1] = pauseCtx->questVtx[bufI + 1].v.ob[1] =
|
||||
R_PAUSE_SONG_NOTE_Y(gOcarinaSongButtons[stepGreen].buttonsIndex[i]);
|
||||
R_PAUSE_SONG_OCA_BTN_Y(gOcarinaSongButtons[stepGreen].buttonsIndex[i]);
|
||||
|
||||
pauseCtx->questVtx[bufI + 2].v.ob[1] = pauseCtx->questVtx[bufI + 3].v.ob[1] =
|
||||
pauseCtx->questVtx[bufI + 0].v.ob[1] - 12;
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
|
||||
if (pauseCtx->unk_1E4_ps6_ == PAUSE_S6_8_PLAYBACK_SONG_READY_) {
|
||||
if (pauseCtx->unk_1E4_ps6_ == PAUSE_S6_8_IDLE_CURSOR_ON_SONG_) {
|
||||
if (gOcarinaSongButtons[stepGreen].buttonsIndex[i] == OCARINA_BTN_A) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 80, 255, 150, 200);
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 50, 200);
|
||||
}
|
||||
} else {
|
||||
// Gray out buttons during the player playing the song
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 150, 150, 150, 150);
|
||||
}
|
||||
|
||||
|
@ -663,7 +675,9 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
gSP1Quadrangle(POLY_OPA_DISP++, 0, 2, 3, 1, 0);
|
||||
}
|
||||
|
||||
if (pauseCtx->unk_1E4_ps6_ != PAUSE_S6_8_PLAYBACK_SONG_READY_) {
|
||||
if (pauseCtx->unk_1E4_ps6_ != PAUSE_S6_8_IDLE_CURSOR_ON_SONG_) {
|
||||
// Draw the buttons colored as the player plays the song
|
||||
|
||||
pauseCtx->ocarinaStaff = AudioOcarina_GetPlayingStaff();
|
||||
|
||||
if (pauseCtx->ocarinaStaff->pos != 0) {
|
||||
|
@ -671,7 +685,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
if ((pauseCtx->ocarinaStaff->buttonIndex >= OCARINA_BTN_A) &&
|
||||
(pauseCtx->ocarinaStaff->buttonIndex <= OCARINA_BTN_C_UP)) {
|
||||
sPlayedSongBtns[pauseCtx->ocarinaStaff->pos - 1] = pauseCtx->ocarinaStaff->buttonIndex;
|
||||
sPlayedSongBtns[pauseCtx->ocarinaStaff->pos] = 0xFF;
|
||||
sPlayedSongBtns[pauseCtx->ocarinaStaff->pos] = OCARINA_BTN_INVALID;
|
||||
sPlayedSongBtnsNum++;
|
||||
}
|
||||
}
|
||||
|
@ -679,26 +693,27 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
|
||||
bufI = j + 32;
|
||||
|
||||
for (i = 0; i < 8; i++, bufI += 4) {
|
||||
if (sPlayedSongBtns[i] == 0xFF) {
|
||||
for (i = 0; i < SONG_MAX_LENGTH; i++, bufI += 4) {
|
||||
if (sPlayedSongBtns[i] == OCARINA_BTN_INVALID) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (sPlayedSongBtnsAlpha[i] != 255) {
|
||||
sPlayedSongBtnsAlpha[i] += VREG(50);
|
||||
sPlayedSongBtnsAlpha[i] += R_OCARINA_BUTTONS_APPEAR_ALPHA_STEP;
|
||||
if (sPlayedSongBtnsAlpha[i] >= 255) {
|
||||
sPlayedSongBtnsAlpha[i] = 255;
|
||||
}
|
||||
}
|
||||
|
||||
pauseCtx->questVtx[bufI + 0].v.ob[1] = pauseCtx->questVtx[bufI + 1].v.ob[1] =
|
||||
R_PAUSE_SONG_NOTE_Y(sPlayedSongBtns[i]);
|
||||
R_PAUSE_SONG_OCA_BTN_Y(sPlayedSongBtns[i]);
|
||||
|
||||
pauseCtx->questVtx[bufI + 2].v.ob[1] = pauseCtx->questVtx[bufI + 3].v.ob[1] =
|
||||
pauseCtx->questVtx[bufI + 0].v.ob[1] - 12;
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
|
||||
if (sPlayedSongBtns[i] == 0) {
|
||||
if (sPlayedSongBtns[i] == OCARINA_BTN_A) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 80, 255, 150, sPlayedSongBtnsAlpha[i]);
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 50, sPlayedSongBtnsAlpha[i]);
|
||||
|
@ -716,8 +731,8 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
}
|
||||
|
||||
if (pauseCtx->unk_1E4_ps6_ == PAUSE_S6_4_PLAYER_PLAYING_SONG_INIT_) {
|
||||
for (i = 0; i < 8; i++) {
|
||||
sPlayedSongBtns[i] = 0xFF;
|
||||
for (i = 0; i < SONG_MAX_LENGTH; i++) {
|
||||
sPlayedSongBtns[i] = OCARINA_BTN_INVALID;
|
||||
sPlayedSongBtnsAlpha[i] = 0;
|
||||
}
|
||||
sPlayedSongBtnsNum = 0;
|
||||
|
@ -735,6 +750,8 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
}
|
||||
|
||||
if (CHECK_QUEST_ITEM(QUEST_SKULL_TOKEN)) {
|
||||
// Draw amount of gold skulltula tokens
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetCombineLERP(POLY_OPA_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0,
|
||||
PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0);
|
||||
|
@ -757,8 +774,10 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
|
||||
for (i = 0, j = 0; i < 2; i++) {
|
||||
if (i == 0) {
|
||||
// Text shadow
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0, 0, 0, pauseCtx->alpha);
|
||||
} else {
|
||||
// Text color
|
||||
if (gSaveContext.inventory.gsTokens == 100) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 200, 50, 50, pauseCtx->alpha);
|
||||
} else {
|
||||
|
@ -771,7 +790,8 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
|
||||
for (bufI = 0; bufI < ARRAY_COUNT(gsTokensDigits); bufI++, j += 4) {
|
||||
if ((bufI >= (ARRAY_COUNT(gsTokensDigits) - 1)) || (gsTokensDigits[bufI] != 0) || nextCursorPoint) {
|
||||
gDPLoadTextureBlock(POLY_OPA_DISP++, ((u8*)gCounterDigit0Tex + (8 * 16 * gsTokensDigits[bufI])),
|
||||
gDPLoadTextureBlock(POLY_OPA_DISP++,
|
||||
((u8*)gCounterDigit0Tex + (G_IM_SIZ_8b_BYTES * 8 * 16 * gsTokensDigits[bufI])),
|
||||
G_IM_FMT_I, G_IM_SIZ_8b, 8, 16, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
|
||||
|
|
|
@ -387,8 +387,8 @@ void KaleidoScope_SetDefaultCursor(PlayState* play) {
|
|||
}
|
||||
|
||||
void KaleidoScope_SwitchPage(PauseContext* pauseCtx, u8 pt) {
|
||||
pauseCtx->unk_1E4_ps6_ = PAUSE_S6_1;
|
||||
pauseCtx->unk_1EA = 0;
|
||||
pauseCtx->unk_1E4_ps6_ = PAUSE_S6_1_SWITCH_PAGE_;
|
||||
pauseCtx->unk_1EA_PageSwitchTimer__ = 0;
|
||||
|
||||
if (!pt) { // pt == 0, scroll left
|
||||
pauseCtx->mode = pauseCtx->pageIndex * 2 + 1;
|
||||
|
@ -458,11 +458,11 @@ void KaleidoScope_DrawCursor(PlayState* play, u16 pageIndex) {
|
|||
|
||||
temp = pauseCtx->unk_1E4_ps6_;
|
||||
|
||||
if ((((pauseCtx->unk_1E4_ps6_ == PAUSE_S6_0_IDLE_) || (temp == PAUSE_S6_8_PLAYBACK_SONG_READY_)) &&
|
||||
if ((((pauseCtx->unk_1E4_ps6_ == PAUSE_S6_0_IDLE_) || (temp == PAUSE_S6_8_IDLE_CURSOR_ON_SONG_)) &&
|
||||
(pauseCtx->state == PAUSE_STATE_6)) ||
|
||||
((pauseCtx->pageIndex == PAUSE_QUEST) &&
|
||||
((temp < PAUSE_S6_3) /* PAUSE_S6_0_IDLE_, PAUSE_S6_1, PAUSE_S6_2_PLAYBACK_SONG_ */ ||
|
||||
(temp == PAUSE_S6_5_PLAYER_PLAYING_SONG_) || (temp == PAUSE_S6_8_PLAYBACK_SONG_READY_)))) {
|
||||
((temp < PAUSE_S6_3) /* PAUSE_S6_0_IDLE_, PAUSE_S6_1_SWITCH_PAGE_, PAUSE_S6_2_PLAYBACK_SONG_ */ ||
|
||||
(temp == PAUSE_S6_5_PLAYER_PLAYING_SONG_) || (temp == PAUSE_S6_8_IDLE_CURSOR_ON_SONG_)))) {
|
||||
|
||||
if (pauseCtx->pageIndex == pageIndex) {
|
||||
s16 i;
|
||||
|
@ -1209,15 +1209,17 @@ void KaleidoScope_DrawInfoPanel(PlayState* play) {
|
|||
(pauseCtx->nameDisplayTimer < WREG(89)) &&
|
||||
(!pauseCtx->unk_1E4_ps6_ /* PAUSE_S6_0_IDLE_ */ || (pauseCtx->unk_1E4_ps6_ == PAUSE_S6_2_PLAYBACK_SONG_) ||
|
||||
((pauseCtx->unk_1E4_ps6_ >= PAUSE_S6_4_PLAYER_PLAYING_SONG_INIT_) &&
|
||||
(pauseCtx->unk_1E4_ps6_ <= PAUSE_S6_7)) /* PAUSE_S6_4_PLAYER_PLAYING_SONG_INIT_,
|
||||
PAUSE_S6_5_PLAYER_PLAYING_SONG_, PAUSE_S6_6, PAUSE_S6_7 */
|
||||
|| (pauseCtx->unk_1E4_ps6_ == PAUSE_S6_8_PLAYBACK_SONG_READY_)) &&
|
||||
(pauseCtx->unk_1E4_ps6_ <=
|
||||
PAUSE_S6_7)) /* PAUSE_S6_4_PLAYER_PLAYING_SONG_INIT_,
|
||||
PAUSE_S6_5_PLAYER_PLAYING_SONG_, PAUSE_S6_6_PLAYER_PLAYING_SONG_DONE_, PAUSE_S6_7 */
|
||||
|| (pauseCtx->unk_1E4_ps6_ == PAUSE_S6_8_IDLE_CURSOR_ON_SONG_)) &&
|
||||
(pauseCtx->cursorSpecialPos == 0)) {
|
||||
if (!pauseCtx->unk_1E4_ps6_ /* PAUSE_S6_0_IDLE_ */ || (pauseCtx->unk_1E4_ps6_ == PAUSE_S6_2_PLAYBACK_SONG_) ||
|
||||
((pauseCtx->unk_1E4_ps6_ >= PAUSE_S6_4_PLAYER_PLAYING_SONG_INIT_) &&
|
||||
(pauseCtx->unk_1E4_ps6_ <= PAUSE_S6_7)) /* PAUSE_S6_4_PLAYER_PLAYING_SONG_INIT_,
|
||||
PAUSE_S6_5_PLAYER_PLAYING_SONG_, PAUSE_S6_6, PAUSE_S6_7 */
|
||||
|| (pauseCtx->unk_1E4_ps6_ == PAUSE_S6_8_PLAYBACK_SONG_READY_)) {
|
||||
(pauseCtx->unk_1E4_ps6_ <=
|
||||
PAUSE_S6_7)) /* PAUSE_S6_4_PLAYER_PLAYING_SONG_INIT_,
|
||||
PAUSE_S6_5_PLAYER_PLAYING_SONG_, PAUSE_S6_6_PLAYER_PLAYING_SONG_DONE_, PAUSE_S6_7 */
|
||||
|| (pauseCtx->unk_1E4_ps6_ == PAUSE_S6_8_IDLE_CURSOR_ON_SONG_)) {
|
||||
pauseCtx->infoPanelVtx[16].v.ob[0] = pauseCtx->infoPanelVtx[18].v.ob[0] = -63;
|
||||
|
||||
pauseCtx->infoPanelVtx[17].v.ob[0] = pauseCtx->infoPanelVtx[19].v.ob[0] =
|
||||
|
@ -1277,9 +1279,10 @@ void KaleidoScope_DrawInfoPanel(PlayState* play) {
|
|||
KaleidoScope_DrawQuadTextureRGBA32(play->state.gfxCtx, gGoldSkulltulaIconTex, 24, 24, 0);
|
||||
}
|
||||
}
|
||||
} else if ((pauseCtx->unk_1E4_ps6_ < PAUSE_S6_3) /* PAUSE_S6_0_IDLE_, PAUSE_S6_1, PAUSE_S6_2_PLAYBACK_SONG_ */
|
||||
} else if ((pauseCtx->unk_1E4_ps6_ <
|
||||
PAUSE_S6_3) /* PAUSE_S6_0_IDLE_, PAUSE_S6_1_SWITCH_PAGE_, PAUSE_S6_2_PLAYBACK_SONG_ */
|
||||
|| (pauseCtx->unk_1E4_ps6_ == PAUSE_S6_7) ||
|
||||
(pauseCtx->unk_1E4_ps6_ == PAUSE_S6_8_PLAYBACK_SONG_READY_)) {
|
||||
(pauseCtx->unk_1E4_ps6_ == PAUSE_S6_8_IDLE_CURSOR_ON_SONG_)) {
|
||||
pauseCtx->infoPanelVtx[20].v.ob[1] = pauseCtx->infoPanelVtx[21].v.ob[1] = y;
|
||||
|
||||
pauseCtx->infoPanelVtx[22].v.ob[1] = pauseCtx->infoPanelVtx[23].v.ob[1] =
|
||||
|
@ -1479,7 +1482,7 @@ void KaleidoScope_UpdateNamePanel(PlayState* play) {
|
|||
} else if (pauseCtx->nameColorSet == 0) {
|
||||
if (((pauseCtx->pageIndex == PAUSE_QUEST) && (pauseCtx->cursorSlot[PAUSE_QUEST] >= QUEST_SONG_MINUET) &&
|
||||
(pauseCtx->cursorSlot[PAUSE_QUEST] < QUEST_KOKIRI_EMERALD) &&
|
||||
(pauseCtx->unk_1E4_ps6_ == PAUSE_S6_8_PLAYBACK_SONG_READY_)) ||
|
||||
(pauseCtx->unk_1E4_ps6_ == PAUSE_S6_8_IDLE_CURSOR_ON_SONG_)) ||
|
||||
(pauseCtx->pageIndex == PAUSE_ITEM) ||
|
||||
((pauseCtx->pageIndex == PAUSE_EQUIP) && (pauseCtx->cursorX[PAUSE_EQUIP] != 0))) {
|
||||
if (pauseCtx->namedItem != ITEM_SOLD_OUT) {
|
||||
|
@ -1510,7 +1513,7 @@ void KaleidoScope_UpdateSwitchPage_(PlayState* play, Input* input) {
|
|||
pauseCtx->eye.x += D_8082ABAC_pageSwitch_eye_dx_[mode];
|
||||
pauseCtx->eye.z += D_8082ABCC_pageSwitch_eye_dz_[mode];
|
||||
|
||||
if (pauseCtx->unk_1EA < 32) {
|
||||
if (pauseCtx->unk_1EA_PageSwitchTimer__ < 32) {
|
||||
R_PAUSE_CURSOR_LEFT_X -= WREG(25) / WREG(6);
|
||||
R_PAUSE_CURSOR_RIGHT_X -= WREG(26) / WREG(6);
|
||||
} else {
|
||||
|
@ -1518,10 +1521,10 @@ void KaleidoScope_UpdateSwitchPage_(PlayState* play, Input* input) {
|
|||
R_PAUSE_CURSOR_RIGHT_X += WREG(26) / WREG(6);
|
||||
}
|
||||
|
||||
pauseCtx->unk_1EA += 4;
|
||||
pauseCtx->unk_1EA_PageSwitchTimer__ += 4;
|
||||
|
||||
if (pauseCtx->unk_1EA == 64) {
|
||||
pauseCtx->unk_1EA = 0;
|
||||
if (pauseCtx->unk_1EA_PageSwitchTimer__ == 64) {
|
||||
pauseCtx->unk_1EA_PageSwitchTimer__ = 0;
|
||||
pauseCtx->pageIndex = D_8082ABEC_modeToNewPageIndex_[pauseCtx->mode];
|
||||
pauseCtx->unk_1E4_ps6_ = PAUSE_S6_0_IDLE_;
|
||||
}
|
||||
|
@ -2477,9 +2480,9 @@ void func_808265BC_switchPageToSave___(PlayState* play) {
|
|||
|
||||
pauseCtx->eye.x += D_8082ABAC_pageSwitch_eye_dx_[pauseCtx->mode] * ZREG(46);
|
||||
pauseCtx->eye.z += D_8082ABCC_pageSwitch_eye_dz_[pauseCtx->mode] * ZREG(46);
|
||||
pauseCtx->unk_1EA += 4 * ZREG(46);
|
||||
pauseCtx->unk_1EA_PageSwitchTimer__ += 4 * ZREG(46);
|
||||
|
||||
if (pauseCtx->unk_1EA == (64 * ZREG(47))) {
|
||||
if (pauseCtx->unk_1EA_PageSwitchTimer__ == (64 * ZREG(47))) {
|
||||
func_80084BF4(play, 1);
|
||||
gSaveContext.buttonStatus[0] = D_8082AB6C[pauseCtx->pageIndex][0];
|
||||
gSaveContext.buttonStatus[1] = D_8082AB6C[pauseCtx->pageIndex][1];
|
||||
|
@ -2491,7 +2494,7 @@ void func_808265BC_switchPageToSave___(PlayState* play) {
|
|||
pauseCtx->state++; // PAUSE_STATE_5 or PAUSE_STATE_6
|
||||
pauseCtx->alpha = 255;
|
||||
Interface_LoadActionLabelB(play, DO_ACTION_SAVE);
|
||||
} else if (pauseCtx->unk_1EA == 64) {
|
||||
} else if (pauseCtx->unk_1EA_PageSwitchTimer__ == 64) {
|
||||
pauseCtx->pageIndex = D_8082ABEC_modeToNewPageIndex_[pauseCtx->mode];
|
||||
pauseCtx->mode = (u16)(pauseCtx->pageIndex * 2) + 1;
|
||||
}
|
||||
|
@ -2647,14 +2650,15 @@ void KaleidoScope_Update(PlayState* play) {
|
|||
))) {
|
||||
|
||||
if ((!pauseCtx->unk_1E4_ps6_ /* PAUSE_S6_0_IDLE_ */ ||
|
||||
(pauseCtx->unk_1E4_ps6_ == PAUSE_S6_8_PLAYBACK_SONG_READY_)) &&
|
||||
(pauseCtx->unk_1E4_ps6_ == PAUSE_S6_8_IDLE_CURSOR_ON_SONG_)) &&
|
||||
(pauseCtx->state == PAUSE_STATE_6)) {
|
||||
pauseCtx->stickRelX = input->rel.stick_x;
|
||||
pauseCtx->stickRelY = input->rel.stick_y;
|
||||
KaleidoScope_UpdateCursorSize(play);
|
||||
KaleidoScope_HandlePageToggles(pauseCtx, input);
|
||||
} else if ((pauseCtx->pageIndex == PAUSE_QUEST) &&
|
||||
((pauseCtx->unk_1E4_ps6_ < PAUSE_S6_3) /* PAUSE_S6_0_IDLE_, PAUSE_S6_1, PAUSE_S6_2_PLAYBACK_SONG_ */
|
||||
((pauseCtx->unk_1E4_ps6_ <
|
||||
PAUSE_S6_3) /* PAUSE_S6_0_IDLE_, PAUSE_S6_1_SWITCH_PAGE_, PAUSE_S6_2_PLAYBACK_SONG_ */
|
||||
|| (pauseCtx->unk_1E4_ps6_ == PAUSE_S6_5_PLAYER_PLAYING_SONG_))) {
|
||||
KaleidoScope_UpdateCursorSize(play);
|
||||
}
|
||||
|
@ -3086,7 +3090,7 @@ void KaleidoScope_Update(PlayState* play) {
|
|||
}
|
||||
break;
|
||||
|
||||
case PAUSE_S6_1:
|
||||
case PAUSE_S6_1_SWITCH_PAGE_:
|
||||
KaleidoScope_UpdateSwitchPage_(play, &play->state.input[0]);
|
||||
break;
|
||||
|
||||
|
@ -3139,7 +3143,7 @@ void KaleidoScope_Update(PlayState* play) {
|
|||
|
||||
D_8082B258_sState66NextState_ = PAUSE_S6_0_IDLE_;
|
||||
D_8082B25C_sState66NextStateTimer_ = 30;
|
||||
pauseCtx->unk_1E4_ps6_ = PAUSE_S6_6;
|
||||
pauseCtx->unk_1E4_ps6_ = PAUSE_S6_6_PLAYER_PLAYING_SONG_DONE_;
|
||||
} else if (pauseCtx->ocarinaStaff->state == 0xFF) {
|
||||
// The player failed to play the song
|
||||
|
||||
|
@ -3148,11 +3152,11 @@ void KaleidoScope_Update(PlayState* play) {
|
|||
|
||||
D_8082B258_sState66NextState_ = PAUSE_S6_4_PLAYER_PLAYING_SONG_INIT_;
|
||||
D_8082B25C_sState66NextStateTimer_ = 20;
|
||||
pauseCtx->unk_1E4_ps6_ = PAUSE_S6_6;
|
||||
pauseCtx->unk_1E4_ps6_ = PAUSE_S6_6_PLAYER_PLAYING_SONG_DONE_;
|
||||
}
|
||||
break;
|
||||
|
||||
case PAUSE_S6_6:
|
||||
case PAUSE_S6_6_PLAYER_PLAYING_SONG_DONE_:
|
||||
D_8082B25C_sState66NextStateTimer_--;
|
||||
if (D_8082B25C_sState66NextStateTimer_ == 0) {
|
||||
pauseCtx->unk_1E4_ps6_ = D_8082B258_sState66NextState_;
|
||||
|
@ -3165,7 +3169,7 @@ void KaleidoScope_Update(PlayState* play) {
|
|||
case PAUSE_S6_7:
|
||||
break;
|
||||
|
||||
case PAUSE_S6_8_PLAYBACK_SONG_READY_:
|
||||
case PAUSE_S6_8_IDLE_CURSOR_ON_SONG_:
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_START)) {
|
||||
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
|
||||
Interface_SetDoAction(play, DO_ACTION_NONE);
|
||||
|
|
Loading…
Add table
Reference in a new issue