mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-12 19:04:38 +00:00
Merge commit '8456e4be8a
' into doc_pause_menu
This commit is contained in:
commit
0561d05c44
6 changed files with 44 additions and 29 deletions
|
@ -610,11 +610,11 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
}
|
||||
|
||||
if (pauseCtx->state == PAUSE_STATE_MAIN) {
|
||||
bufI += (QUAD_QUEST_SONG_NOTE_A1 - QUEST_HEART_PIECE) * 4;
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
||||
|
||||
bufI += (QUAD_QUEST_SONG_NOTE_A1 - QUEST_HEART_PIECE) * 4;
|
||||
|
||||
// Update cursor color
|
||||
if ((pauseCtx->cursorSpecialPos == 0) && (cursor >= QUEST_SONG_MINUET) && (cursor < QUEST_KOKIRI_EMERALD)) {
|
||||
if ((pauseCtx->mainState < PAUSE_MAIN_STATE_3) /* PAUSE_MAIN_STATE_IDLE, PAUSE_MAIN_STATE_SWITCHING_PAGE,
|
||||
|
@ -641,7 +641,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
pauseCtx->ocarinaStaff = AudioOcarina_GetPlaybackStaff();
|
||||
|
||||
if (pauseCtx->ocarinaStaff->pos != 0) {
|
||||
if (sPlayedSongBtnsNum + 1 == pauseCtx->ocarinaStaff->pos) {
|
||||
if (sPlayedSongBtnsNum == (pauseCtx->ocarinaStaff->pos-1)) {
|
||||
sPlayedSongBtnsNum++;
|
||||
sPlayedSongBtns[pauseCtx->ocarinaStaff->pos - 1] = pauseCtx->ocarinaStaff->buttonIndex;
|
||||
}
|
||||
|
@ -841,10 +841,10 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
}
|
||||
|
||||
// Variable reused as a flag indicating all digits onwards should be displayed
|
||||
nextCursorPoint = false;
|
||||
cursorItem = false;
|
||||
|
||||
for (bufI = 0; bufI < ARRAY_COUNT(gsTokensDigits); bufI++, j += 4) {
|
||||
if ((bufI >= (ARRAY_COUNT(gsTokensDigits) - 1)) || (gsTokensDigits[bufI] != 0) || nextCursorPoint) {
|
||||
if ((bufI >= (ARRAY_COUNT(gsTokensDigits) - 1)) || (gsTokensDigits[bufI] != 0) || cursorItem) {
|
||||
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,
|
||||
|
@ -852,7 +852,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
|
||||
gSP1Quadrangle(POLY_OPA_DISP++, j, j + 2, j + 3, j + 1, 0);
|
||||
|
||||
nextCursorPoint = true;
|
||||
cursorItem = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,8 +58,6 @@ static u8 sEquipmentItemOffsets[] = {
|
|||
ITEM_BOOTS_HOVER - ITEM_SWORD_KOKIRI, // EQUIP_VALUE_BOOTS_HOVER
|
||||
};
|
||||
|
||||
static s16 sEquipTimer = 0;
|
||||
|
||||
void KaleidoScope_DrawEquipmentImage(PlayState* play, void* source, u32 width, u32 height) {
|
||||
PauseContext* pauseCtx = &play->pauseCtx;
|
||||
u8* curTexture;
|
||||
|
@ -161,6 +159,7 @@ void KaleidoScope_DrawPlayerWork(PlayState* play) {
|
|||
void KaleidoScope_ProcessPlayerPreRender(PlayState* play);
|
||||
|
||||
void KaleidoScope_DrawEquipment(PlayState* play) {
|
||||
static s16 sEquipTimer = 0;
|
||||
PauseContext* pauseCtx = &play->pauseCtx;
|
||||
Input* input = &play->state.input[0];
|
||||
u16 i;
|
||||
|
@ -501,8 +500,8 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
|
|||
|
||||
cursorSlot = pauseCtx->cursorPoint[PAUSE_EQUIP];
|
||||
|
||||
pauseCtx->cursorItem[PAUSE_EQUIP] = cursorItem;
|
||||
pauseCtx->cursorSlot[PAUSE_EQUIP] = cursorSlot;
|
||||
pauseCtx->cursorItem[PAUSE_EQUIP] = cursorItem;
|
||||
|
||||
PRINTF("kscope->select_name[Display_Equipment] = %d\n", pauseCtx->cursorItem[PAUSE_EQUIP]);
|
||||
|
||||
|
@ -637,8 +636,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
|
|||
|
||||
if (LINK_AGE_IN_YEARS == YEARS_CHILD) {
|
||||
point = CUR_UPG_VALUE(sChildUpgrades[i]);
|
||||
if (1) {}
|
||||
if ((point != 0) && (CUR_UPG_VALUE(sChildUpgrades[i]) != 0)) {
|
||||
if (((u32)point != 0) && (CUR_UPG_VALUE(sChildUpgrades[i]) != 0)) {
|
||||
KaleidoScope_DrawQuadTextureRGBA32(play->state.gfxCtx,
|
||||
gItemIcons[sChildUpgradeItemBases[i] + point - 1], ITEM_ICON_WIDTH,
|
||||
ITEM_ICON_HEIGHT, 0);
|
||||
|
@ -705,7 +703,5 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
|
|||
Gfx_SetupDL_42Opa(play->state.gfxCtx);
|
||||
KaleidoScope_DrawEquipmentImage(play, pauseCtx->playerSegment, PAUSE_EQUIP_PLAYER_WIDTH, PAUSE_EQUIP_PLAYER_HEIGHT);
|
||||
|
||||
if (gUpgradeMasks[0]) {}
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx, "../z_kaleido_equipment.c", 609);
|
||||
}
|
||||
|
|
|
@ -162,6 +162,10 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
|
|||
pauseCtx->stickAdjX = 40;
|
||||
}
|
||||
|
||||
#if !OOT_DEBUG
|
||||
if (&gSaveContext) {}
|
||||
#endif
|
||||
|
||||
if (ABS(pauseCtx->stickAdjX) > 30) {
|
||||
cursorPoint = pauseCtx->cursorPoint[PAUSE_ITEM];
|
||||
cursorX = pauseCtx->cursorX[PAUSE_ITEM];
|
||||
|
@ -169,9 +173,11 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
|
|||
|
||||
PRINTF("now=%d ccc=%d\n", cursorPoint, cursorItem);
|
||||
|
||||
#if OOT_DEBUG
|
||||
// Seems necessary to match
|
||||
if (pauseCtx->cursorX[PAUSE_ITEM]) {}
|
||||
if (gSaveContext.save.info.inventory.items[pauseCtx->cursorPoint[PAUSE_ITEM]]) {}
|
||||
#endif
|
||||
|
||||
while (moveCursorResult == 0) {
|
||||
// input says move left
|
||||
|
|
|
@ -647,7 +647,7 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
|
||||
if (HREG(15) == 0) {
|
||||
if (!OOT_DEBUG || (HREG(15) == 0)) {
|
||||
gDPSetTextureFilter(POLY_OPA_DISP++, G_TF_POINT);
|
||||
|
||||
gDPLoadTLUT_pal256(POLY_OPA_DISP++, gWorldMapImageTLUT);
|
||||
|
@ -696,11 +696,13 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
POLY_OPA_DISP = gfx;
|
||||
}
|
||||
|
||||
#if OOT_DEBUG
|
||||
if (HREG(15) == 2) {
|
||||
HREG(15) = 1;
|
||||
HREG(14) = 6100;
|
||||
HREG(13) = 5300;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (ZREG(38) == 0) {
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
|
|
|
@ -764,6 +764,8 @@ Gfx* KaleidoScope_QuadTextureIA8(Gfx* gfx, void* texture, s16 width, s16 height,
|
|||
|
||||
void KaleidoScope_OverridePalIndexCI4(u8* texture, s32 size, s32 targetIndex, s32 newIndex) {
|
||||
s32 i;
|
||||
s32 index1;
|
||||
s32 index2;
|
||||
|
||||
targetIndex &= 0xF;
|
||||
newIndex &= 0xF;
|
||||
|
@ -773,9 +775,6 @@ void KaleidoScope_OverridePalIndexCI4(u8* texture, s32 size, s32 targetIndex, s3
|
|||
}
|
||||
|
||||
for (i = 0; i < size; i++) {
|
||||
s32 index1;
|
||||
s32 index2;
|
||||
|
||||
index1 = index2 = texture[i];
|
||||
|
||||
index1 = (index1 >> 4) & 0xF;
|
||||
|
@ -880,7 +879,9 @@ void KaleidoScope_SwitchPage(PauseContext* pauseCtx, u8 pt) {
|
|||
|
||||
void KaleidoScope_HandlePageToggles(PauseContext* pauseCtx, Input* input) {
|
||||
if ((pauseCtx->debugState == 0) && CHECK_BTN_ALL(input->press.button, BTN_L)) {
|
||||
#if OOT_DEBUG
|
||||
pauseCtx->debugState = 1;
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -917,22 +918,22 @@ void KaleidoScope_HandlePageToggles(PauseContext* pauseCtx, Input* input) {
|
|||
|
||||
void KaleidoScope_DrawCursor(PlayState* play, u16 pageIndex) {
|
||||
PauseContext* pauseCtx = &play->pauseCtx;
|
||||
u16 temp;
|
||||
s32 pad;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_kaleido_scope_PAL.c", 955);
|
||||
|
||||
temp = pauseCtx->mainState; // fake?
|
||||
|
||||
if ((((pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE) || (temp == PAUSE_MAIN_STATE_IDLE_CURSOR_ON_SONG)) &&
|
||||
if (((((u32)pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE) ||
|
||||
(pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE_CURSOR_ON_SONG)) &&
|
||||
(pauseCtx->state == PAUSE_STATE_MAIN)) ||
|
||||
((pauseCtx->pageIndex == PAUSE_QUEST) &&
|
||||
((temp < PAUSE_MAIN_STATE_3) /* PAUSE_MAIN_STATE_IDLE, PAUSE_MAIN_STATE_SWITCHING_PAGE,
|
||||
PAUSE_MAIN_STATE_SONG_PLAYBACK */
|
||||
|| (temp == PAUSE_MAIN_STATE_SONG_PROMPT) || (temp == PAUSE_MAIN_STATE_IDLE_CURSOR_ON_SONG)))) {
|
||||
((pauseCtx->mainState < PAUSE_MAIN_STATE_3) /* PAUSE_MAIN_STATE_IDLE, PAUSE_MAIN_STATE_SWITCHING_PAGE,
|
||||
PAUSE_MAIN_STATE_SONG_PLAYBACK */
|
||||
|| (pauseCtx->mainState == PAUSE_MAIN_STATE_SONG_PROMPT) ||
|
||||
(pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE_CURSOR_ON_SONG)))) {
|
||||
s16 i;
|
||||
s16 j;
|
||||
|
||||
if (pauseCtx->pageIndex == pageIndex) {
|
||||
s16 i;
|
||||
s16 j;
|
||||
|
||||
// Draw PAUSE_QUAD_CURSOR_TL, PAUSE_QUAD_CURSOR_TR, PAUSE_QUAD_CURSOR_BL, PAUSE_QUAD_CURSOR_BR
|
||||
|
||||
|
@ -1743,6 +1744,7 @@ void KaleidoScope_DrawInfoPanel(PlayState* play) {
|
|||
ITEM_NAME_TEX_HEIGHT, 0);
|
||||
}
|
||||
|
||||
#if OOT_DEBUG
|
||||
if (pauseCtx->pageIndex == PAUSE_MAP) {
|
||||
if (YREG(7) != 0) {
|
||||
PRINTF(VT_FGCOL(YELLOW));
|
||||
|
@ -1755,6 +1757,7 @@ void KaleidoScope_DrawInfoPanel(PlayState* play) {
|
|||
gAreaGsFlags[D_8082AE30[pauseCtx->cursorPoint[PAUSE_WORLD_MAP]]]);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((pauseCtx->pageIndex == PAUSE_MAP) && !sInDungeonScene) {
|
||||
if (GET_GS_FLAGS(D_8082AE30[pauseCtx->cursorPoint[PAUSE_WORLD_MAP]]) ==
|
||||
|
@ -2693,7 +2696,6 @@ void KaleidoScope_SetVertices(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
PauseContext* pauseCtx = &play->pauseCtx;
|
||||
s16 vtx_x_;
|
||||
s16 i;
|
||||
s16 quadWidth;
|
||||
s16 j;
|
||||
s16 k;
|
||||
s16 vtx_y;
|
||||
|
@ -3102,7 +3104,7 @@ void KaleidoScope_SetVertices(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
pauseCtx->questVtx = GRAPH_ALLOC(gfxCtx, QUAD_QUEST_MAX * 4 * sizeof(Vtx));
|
||||
|
||||
for (k = 0, j = 0; j < QUAD_QUEST_MAX; j++, k += 4) {
|
||||
quadWidth = sQuestQuadsSize[j];
|
||||
s16 quadWidth = sQuestQuadsSize[j];
|
||||
|
||||
if ((j < QUEST_SONG_MINUET) || (j >= QUAD_QUEST_SKULL_TOKENS_DIGIT1_SHADOW)) {
|
||||
pauseCtx->questVtx[k + 0].v.ob[0] = pauseCtx->questVtx[k + 2].v.ob[0] = sQuestQuadsX[j];
|
||||
|
@ -4134,6 +4136,9 @@ void KaleidoScope_Update(PlayState* play) {
|
|||
pauseCtx->rollRotSavePrompt_ = -434.0f;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -129,7 +129,13 @@ void PauseMapMark_DrawForDungeon(PlayState* play) {
|
|||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
|
||||
Matrix_Push();
|
||||
Matrix_Translate(GREG(92) + markPoint->x, GREG(93) + markPoint->y, 0.0f, MTXMODE_APPLY);
|
||||
|
||||
#if OOT_DEBUG
|
||||
Matrix_Translate(markPoint->x + GREG(92), markPoint->y + GREG(93), 0.0f, MTXMODE_APPLY);
|
||||
#else
|
||||
Matrix_Translate(markPoint->x, markPoint->y, 0.0f, MTXMODE_APPLY);
|
||||
#endif
|
||||
|
||||
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_lmap_mark.c", 272),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue