mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-27 04:10:30 +00:00
parent
40372d72b7
commit
1332356e5c
@ -96,6 +96,15 @@ typedef enum PauseMainState {
|
||||
/* 9 */ PAUSE_MAIN_STATE_9
|
||||
} PauseMainState;
|
||||
|
||||
typedef enum PauseCursorQuad {
|
||||
/* 0 */ PAUSE_QUAD_CURSOR_TL,
|
||||
/* 1 */ PAUSE_QUAD_CURSOR_TR,
|
||||
/* 2 */ PAUSE_QUAD_CURSOR_BL,
|
||||
/* 3 */ PAUSE_QUAD_CURSOR_BR,
|
||||
/* 4 */ PAUSE_QUAD_CURSOR_4,
|
||||
/* 5 */ PAUSE_QUAD_CURSOR_MAX
|
||||
} PauseCursorQuad;
|
||||
|
||||
typedef enum WorldMapPoint {
|
||||
/* 0 */ WORLD_MAP_POINT_HAUNTED_WASTELAND,
|
||||
/* 1 */ WORLD_MAP_POINT_GERUDOS_FORTRESS,
|
||||
|
@ -3393,6 +3393,7 @@ void Interface_Draw(PlayState* play) {
|
||||
gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATERGBA_PRIM, G_CC_MODULATERGBA_PRIM);
|
||||
gSPMatrix(OVERLAY_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
|
||||
// PAUSE_QUAD_CURSOR_4
|
||||
pauseCtx->cursorVtx[16].v.ob[0] = pauseCtx->cursorVtx[18].v.ob[0] = pauseCtx->equipAnimX / 10;
|
||||
pauseCtx->cursorVtx[17].v.ob[0] = pauseCtx->cursorVtx[19].v.ob[0] =
|
||||
pauseCtx->cursorVtx[16].v.ob[0] + WREG(90) / 10;
|
||||
@ -3403,7 +3404,7 @@ void Interface_Draw(PlayState* play) {
|
||||
if (pauseCtx->equipTargetItem < 0xBF) {
|
||||
// Normal Equip (icon goes from the inventory slot to the C button when equipping it)
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, pauseCtx->equipAnimAlpha);
|
||||
gSPVertex(OVERLAY_DISP++, &pauseCtx->cursorVtx[16], 4, 0);
|
||||
gSPVertex(OVERLAY_DISP++, &pauseCtx->cursorVtx[PAUSE_QUAD_CURSOR_4 * 4], 4, 0);
|
||||
|
||||
gDPLoadTextureBlock(OVERLAY_DISP++, gItemIcons[pauseCtx->equipTargetItem], G_IM_FMT_RGBA, G_IM_SIZ_32b,
|
||||
ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
@ -3416,6 +3417,7 @@ void Interface_Draw(PlayState* play) {
|
||||
|
||||
if ((pauseCtx->equipAnimAlpha > 0) && (pauseCtx->equipAnimAlpha < 255)) {
|
||||
svar1 = (pauseCtx->equipAnimAlpha / 8) / 2;
|
||||
// PAUSE_QUAD_CURSOR_4
|
||||
pauseCtx->cursorVtx[16].v.ob[0] = pauseCtx->cursorVtx[18].v.ob[0] =
|
||||
pauseCtx->cursorVtx[16].v.ob[0] - svar1;
|
||||
pauseCtx->cursorVtx[17].v.ob[0] = pauseCtx->cursorVtx[19].v.ob[0] =
|
||||
@ -3426,7 +3428,7 @@ void Interface_Draw(PlayState* play) {
|
||||
pauseCtx->cursorVtx[16].v.ob[1] - svar1 * 2 - 32;
|
||||
}
|
||||
|
||||
gSPVertex(OVERLAY_DISP++, &pauseCtx->cursorVtx[16], 4, 0);
|
||||
gSPVertex(OVERLAY_DISP++, &pauseCtx->cursorVtx[PAUSE_QUAD_CURSOR_4 * 4], 4, 0);
|
||||
gDPLoadTextureBlock(OVERLAY_DISP++, gMagicArrowEquipEffectTex, G_IM_FMT_IA, G_IM_SIZ_8b, 32, 32, 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);
|
||||
|
@ -9,6 +9,8 @@
|
||||
#include "overlays/actors/ovl_En_Boom/z_en_boom.h"
|
||||
#include "assets/objects/gameplay_keep/gameplay_keep.h"
|
||||
|
||||
#pragma increment_block_number "gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_5)
|
||||
|
||||
#define GET_BODY(this) ((BossVa*)(this)->actor.parent)
|
||||
|
@ -1395,7 +1395,7 @@ void func_80B3F3D8(void) {
|
||||
Sfx_PlaySfxCentered2(NA_SE_PL_SKIP);
|
||||
}
|
||||
|
||||
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128"
|
||||
#pragma increment_block_number "gc-eu:128 gc-eu-mq:64 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128"
|
||||
|
||||
void EnXc_PlayDiveSFX(Vec3f* src, PlayState* play) {
|
||||
static Vec3f D_80B42DA0;
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include "cic6105.h"
|
||||
#endif
|
||||
|
||||
#pragma increment_block_number "gc-eu:145 gc-eu-mq:145 gc-jp:147 gc-jp-ce:147 gc-jp-mq:147 gc-us:147 gc-us-mq:147"
|
||||
#pragma increment_block_number "gc-eu:142 gc-eu-mq:142 gc-jp:144 gc-jp-ce:144 gc-jp-mq:144 gc-us:144 gc-us-mq:144"
|
||||
|
||||
#define FLAGS ACTOR_FLAG_4
|
||||
|
||||
|
@ -186,7 +186,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
pauseCtx->cursorSlot[pauseCtx->pageIndex] = sp216;
|
||||
}
|
||||
|
||||
KaleidoScope_SetCursorVtx(pauseCtx, sp216 * 4, pauseCtx->questVtx);
|
||||
KaleidoScope_SetCursorPos(pauseCtx, sp216 * 4, pauseCtx->questVtx);
|
||||
|
||||
if ((pauseCtx->state == PAUSE_STATE_MAIN) && (pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE) &&
|
||||
(pauseCtx->cursorSpecialPos == 0)) {
|
||||
@ -234,7 +234,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
pauseCtx->nameDisplayTimer = 0;
|
||||
pauseCtx->cursorSpecialPos = 0;
|
||||
sp216 = pauseCtx->cursorPoint[PAUSE_QUEST];
|
||||
KaleidoScope_SetCursorVtx(pauseCtx, sp216 * 4, pauseCtx->questVtx);
|
||||
KaleidoScope_SetCursorPos(pauseCtx, sp216 * 4, pauseCtx->questVtx);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
if (CHECK_QUEST_ITEM(pauseCtx->cursorPoint[PAUSE_QUEST])) {
|
||||
@ -252,7 +252,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
pauseCtx->nameDisplayTimer = 0;
|
||||
pauseCtx->cursorSpecialPos = 0;
|
||||
sp216 = pauseCtx->cursorPoint[PAUSE_QUEST];
|
||||
KaleidoScope_SetCursorVtx(pauseCtx, sp216 * 4, pauseCtx->questVtx);
|
||||
KaleidoScope_SetCursorPos(pauseCtx, sp216 * 4, pauseCtx->questVtx);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
if (CHECK_QUEST_ITEM(pauseCtx->cursorPoint[PAUSE_QUEST])) {
|
||||
@ -297,11 +297,11 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
pauseCtx->ocarinaStaff = AudioOcarina_GetPlaybackStaff();
|
||||
pauseCtx->ocarinaStaff->pos = 0;
|
||||
sp216 = pauseCtx->cursorSlot[PAUSE_QUEST];
|
||||
KaleidoScope_SetCursorVtx(pauseCtx, sp216 * 4, pauseCtx->questVtx);
|
||||
KaleidoScope_SetCursorPos(pauseCtx, sp216 * 4, pauseCtx->questVtx);
|
||||
}
|
||||
} else {
|
||||
sp216 = pauseCtx->cursorSlot[PAUSE_QUEST];
|
||||
KaleidoScope_SetCursorVtx(pauseCtx, sp216 * 4, pauseCtx->questVtx);
|
||||
KaleidoScope_SetCursorPos(pauseCtx, sp216 * 4, pauseCtx->questVtx);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -456,7 +456,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
KaleidoScope_SetCursorVtx(pauseCtx, cursorSlot * 4, pauseCtx->equipVtx);
|
||||
KaleidoScope_SetCursorPos(pauseCtx, cursorSlot * 4, pauseCtx->equipVtx);
|
||||
|
||||
if ((pauseCtx->cursorSpecialPos == 0) && (cursorItem != PAUSE_ITEM_NONE) &&
|
||||
(pauseCtx->state == PAUSE_STATE_MAIN) && (pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE) &&
|
||||
@ -502,7 +502,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
} else if ((pauseCtx->mainState == PAUSE_MAIN_STATE_7) && (pauseCtx->pageIndex == PAUSE_EQUIP)) {
|
||||
KaleidoScope_SetCursorVtx(pauseCtx, pauseCtx->cursorSlot[PAUSE_EQUIP] * 4, pauseCtx->equipVtx);
|
||||
KaleidoScope_SetCursorPos(pauseCtx, pauseCtx->cursorSlot[PAUSE_EQUIP] * 4, pauseCtx->equipVtx);
|
||||
pauseCtx->cursorColorSet = 8;
|
||||
|
||||
sEquipTimer--;
|
||||
|
@ -68,13 +68,13 @@ void KaleidoScope_DrawAmmoCount(PauseContext* pauseCtx, GraphicsContext* gfxCtx,
|
||||
CLOSE_DISPS(gfxCtx, "../z_kaleido_item.c", 116);
|
||||
}
|
||||
|
||||
void KaleidoScope_SetCursorVtx(PauseContext* pauseCtx, u16 index, Vtx* vtx) {
|
||||
void KaleidoScope_SetCursorPos(PauseContext* pauseCtx, u16 index, Vtx* vtx) {
|
||||
pauseCtx->cursorVtx[0].v.ob[0] = vtx[index].v.ob[0];
|
||||
pauseCtx->cursorVtx[0].v.ob[1] = vtx[index].v.ob[1];
|
||||
}
|
||||
|
||||
void KaleidoScope_SetItemCursorVtx(PauseContext* pauseCtx) {
|
||||
KaleidoScope_SetCursorVtx(pauseCtx, pauseCtx->cursorSlot[PAUSE_ITEM] * 4, pauseCtx->itemVtx);
|
||||
void KaleidoScope_SetItemCursorPos(PauseContext* pauseCtx) {
|
||||
KaleidoScope_SetCursorPos(pauseCtx, pauseCtx->cursorSlot[PAUSE_ITEM] * 4, pauseCtx->itemVtx);
|
||||
}
|
||||
|
||||
void KaleidoScope_DrawItemSelect(PlayState* play) {
|
||||
@ -334,7 +334,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
|
||||
|
||||
if (cursorItem != PAUSE_ITEM_NONE) {
|
||||
index = cursorSlot * 4; // required to match?
|
||||
KaleidoScope_SetCursorVtx(pauseCtx, index, pauseCtx->itemVtx);
|
||||
KaleidoScope_SetCursorPos(pauseCtx, index, pauseCtx->itemVtx);
|
||||
|
||||
if ((pauseCtx->debugState == 0) && (pauseCtx->state == PAUSE_STATE_MAIN) &&
|
||||
(pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE)) {
|
||||
@ -401,7 +401,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
|
||||
}
|
||||
} else if ((pauseCtx->mainState == PAUSE_MAIN_STATE_3) && (pauseCtx->pageIndex == PAUSE_ITEM)) {
|
||||
//! @bug cursorSlot is uninitialized
|
||||
KaleidoScope_SetCursorVtx(pauseCtx, cursorSlot * 4, pauseCtx->itemVtx);
|
||||
KaleidoScope_SetCursorPos(pauseCtx, cursorSlot * 4, pauseCtx->itemVtx);
|
||||
pauseCtx->cursorColorSet = 4;
|
||||
}
|
||||
|
||||
|
@ -150,7 +150,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
pauseCtx->cursorSlot[PAUSE_MAP] = pauseCtx->cursorPoint[PAUSE_MAP] = pauseCtx->dungeonMapSlot;
|
||||
pauseCtx->cursorX[PAUSE_MAP] = 0;
|
||||
j = 72 + (pauseCtx->cursorSlot[PAUSE_MAP] * 4);
|
||||
KaleidoScope_SetCursorVtx(pauseCtx, j, pauseCtx->mapPageVtx);
|
||||
KaleidoScope_SetCursorPos(pauseCtx, j, pauseCtx->mapPageVtx);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
@ -181,7 +181,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
|
||||
PRINTF("kscope->cursor_point====%d\n", pauseCtx->cursorPoint[PAUSE_MAP]);
|
||||
j = 72 + (pauseCtx->cursorSlot[PAUSE_MAP] * 4);
|
||||
KaleidoScope_SetCursorVtx(pauseCtx, j, pauseCtx->mapPageVtx);
|
||||
KaleidoScope_SetCursorPos(pauseCtx, j, pauseCtx->mapPageVtx);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
@ -203,7 +203,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
pauseCtx->cursorSlot[PAUSE_MAP] = pauseCtx->cursorPoint[PAUSE_MAP];
|
||||
|
||||
j = 72 + (pauseCtx->cursorSlot[PAUSE_MAP] * 4);
|
||||
KaleidoScope_SetCursorVtx(pauseCtx, j, pauseCtx->mapPageVtx);
|
||||
KaleidoScope_SetCursorPos(pauseCtx, j, pauseCtx->mapPageVtx);
|
||||
|
||||
if (pauseCtx->cursorX[PAUSE_MAP] == 0) {
|
||||
pauseCtx->mapPageVtx[j + 0].v.ob[0] = pauseCtx->mapPageVtx[j + 2].v.ob[0] =
|
||||
@ -578,7 +578,7 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
pauseCtx->cursorItem[PAUSE_MAP] = pauseCtx->cursorPoint[PAUSE_WORLD_MAP];
|
||||
pauseCtx->cursorSlot[PAUSE_MAP] =
|
||||
PAGE_BG_QUADS + QUAD_MAP_WORLD_POINT_FIRST + pauseCtx->cursorPoint[PAUSE_WORLD_MAP];
|
||||
KaleidoScope_SetCursorVtx(pauseCtx, pauseCtx->cursorSlot[PAUSE_MAP] * 4, pauseCtx->mapPageVtx);
|
||||
KaleidoScope_SetCursorPos(pauseCtx, pauseCtx->cursorSlot[PAUSE_MAP] * 4, pauseCtx->mapPageVtx);
|
||||
} else {
|
||||
pauseCtx->cursorItem[PAUSE_MAP] = gSaveContext.worldMapArea + 0x18;
|
||||
if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
|
||||
@ -594,7 +594,7 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
pauseCtx->cursorItem[PAUSE_MAP] = pauseCtx->cursorPoint[PAUSE_WORLD_MAP];
|
||||
pauseCtx->cursorSlot[PAUSE_MAP] =
|
||||
PAGE_BG_QUADS + QUAD_MAP_WORLD_POINT_FIRST + pauseCtx->cursorPoint[PAUSE_WORLD_MAP];
|
||||
KaleidoScope_SetCursorVtx(pauseCtx, pauseCtx->cursorSlot[PAUSE_MAP] * 4, pauseCtx->mapPageVtx);
|
||||
KaleidoScope_SetCursorPos(pauseCtx, pauseCtx->cursorSlot[PAUSE_MAP] * 4, pauseCtx->mapPageVtx);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
D_8082A6D4 = 0;
|
||||
@ -612,7 +612,7 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
pauseCtx->cursorItem[PAUSE_MAP] = pauseCtx->cursorPoint[PAUSE_WORLD_MAP];
|
||||
pauseCtx->cursorSlot[PAUSE_MAP] =
|
||||
PAGE_BG_QUADS + QUAD_MAP_WORLD_POINT_FIRST + pauseCtx->cursorPoint[PAUSE_WORLD_MAP];
|
||||
KaleidoScope_SetCursorVtx(pauseCtx, pauseCtx->cursorSlot[PAUSE_MAP] * 4, pauseCtx->mapPageVtx);
|
||||
KaleidoScope_SetCursorPos(pauseCtx, pauseCtx->cursorSlot[PAUSE_MAP] * 4, pauseCtx->mapPageVtx);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
D_8082A6D4 = 0;
|
||||
|
@ -867,10 +867,10 @@ u8 gAreaGsFlags[] = {
|
||||
};
|
||||
|
||||
static void* sCursorTexs[] = {
|
||||
gPauseMenuCursorTopLeftTex,
|
||||
gPauseMenuCursorTopRightTex,
|
||||
gPauseMenuCursorBottomLeftTex,
|
||||
gPauseMenuCursorBottomRightTex,
|
||||
gPauseMenuCursorTopLeftTex, // PAUSE_QUAD_CURSOR_TL
|
||||
gPauseMenuCursorTopRightTex, // PAUSE_QUAD_CURSOR_TR
|
||||
gPauseMenuCursorBottomLeftTex, // PAUSE_QUAD_CURSOR_BL
|
||||
gPauseMenuCursorBottomRightTex, // PAUSE_QUAD_CURSOR_BR
|
||||
};
|
||||
|
||||
static s16 sCursorColors[][3] = {
|
||||
@ -1124,6 +1124,8 @@ void KaleidoScope_DrawCursor(PlayState* play, u16 pageIndex) {
|
||||
|
||||
if (pauseCtx->pageIndex == pageIndex) {
|
||||
|
||||
// Draw PAUSE_QUAD_CURSOR_TL, PAUSE_QUAD_CURSOR_TR, PAUSE_QUAD_CURSOR_BL, PAUSE_QUAD_CURSOR_BR
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetCombineLERP(POLY_OPA_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0,
|
||||
PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0);
|
||||
@ -2706,9 +2708,9 @@ void KaleidoScope_SetVertices(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
pauseCtx->questPageVtx = GRAPH_ALLOC(gfxCtx, ((PAGE_BG_QUADS + VTX_PAGE_QUEST_QUADS) * 4) * sizeof(Vtx));
|
||||
KaleidoScope_SetPageVertices(play, pauseCtx->questPageVtx, VTX_PAGE_QUEST, VTX_PAGE_QUEST_QUADS);
|
||||
|
||||
pauseCtx->cursorVtx = GRAPH_ALLOC(gfxCtx, 20 * sizeof(Vtx));
|
||||
pauseCtx->cursorVtx = GRAPH_ALLOC(gfxCtx, PAUSE_QUAD_CURSOR_MAX * 4 * sizeof(Vtx));
|
||||
|
||||
for (i = 0; i < 20; i++) {
|
||||
for (i = 0; i < (PAUSE_QUAD_CURSOR_MAX * 4); i++) {
|
||||
pauseCtx->cursorVtx[i].v.ob[0] = pauseCtx->cursorVtx[i].v.ob[1] = pauseCtx->cursorVtx[i].v.ob[2] = 0;
|
||||
|
||||
pauseCtx->cursorVtx[i].v.flag = 0;
|
||||
@ -2719,15 +2721,21 @@ void KaleidoScope_SetVertices(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
pauseCtx->cursorVtx[i].v.cn[3] = 255;
|
||||
}
|
||||
|
||||
// PAUSE_QUAD_CURSOR_TL
|
||||
pauseCtx->cursorVtx[1].v.tc[0] = pauseCtx->cursorVtx[2].v.tc[1] = pauseCtx->cursorVtx[3].v.tc[0] =
|
||||
pauseCtx->cursorVtx[3].v.tc[1] = pauseCtx->cursorVtx[5].v.tc[0] = pauseCtx->cursorVtx[6].v.tc[1] =
|
||||
pauseCtx->cursorVtx[7].v.tc[0] = pauseCtx->cursorVtx[7].v.tc[1] = pauseCtx->cursorVtx[9].v.tc[0] =
|
||||
pauseCtx->cursorVtx[10].v.tc[1] = pauseCtx->cursorVtx[11].v.tc[0] = pauseCtx->cursorVtx[11].v.tc[1] =
|
||||
pauseCtx->cursorVtx[13].v.tc[0] = pauseCtx->cursorVtx[14].v.tc[1] =
|
||||
pauseCtx->cursorVtx[15].v.tc[0] = pauseCtx->cursorVtx[15].v.tc[1] = 0x200;
|
||||
|
||||
pauseCtx->cursorVtx[3].v.tc[1]
|
||||
// PAUSE_QUAD_CURSOR_TR
|
||||
= pauseCtx->cursorVtx[5].v.tc[0] = pauseCtx->cursorVtx[6].v.tc[1] = pauseCtx->cursorVtx[7].v.tc[0] =
|
||||
pauseCtx->cursorVtx[7].v.tc[1]
|
||||
// PAUSE_QUAD_CURSOR_BL
|
||||
= pauseCtx->cursorVtx[9].v.tc[0] = pauseCtx->cursorVtx[10].v.tc[1] = pauseCtx->cursorVtx[11].v.tc[0] =
|
||||
pauseCtx->cursorVtx[11].v.tc[1]
|
||||
// PAUSE_QUAD_CURSOR_BR
|
||||
= pauseCtx->cursorVtx[13].v.tc[0] = pauseCtx->cursorVtx[14].v.tc[1] = pauseCtx->cursorVtx[15].v.tc[0] =
|
||||
pauseCtx->cursorVtx[15].v.tc[1] = 16 * (1 << 5);
|
||||
// PAUSE_QUAD_CURSOR_4
|
||||
pauseCtx->cursorVtx[17].v.tc[0] = pauseCtx->cursorVtx[18].v.tc[1] = pauseCtx->cursorVtx[19].v.tc[0] =
|
||||
pauseCtx->cursorVtx[19].v.tc[1] = 0x400;
|
||||
pauseCtx->cursorVtx[19].v.tc[1] = 32 * (1 << 5);
|
||||
|
||||
pauseCtx->itemVtx = GRAPH_ALLOC(gfxCtx, 164 * sizeof(Vtx));
|
||||
|
||||
@ -3192,88 +3200,96 @@ void KaleidoScope_UpdateOpening(PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
void KaleidoScope_UpdateCursorSize(PlayState* play) {
|
||||
void KaleidoScope_UpdateCursorVtx(PlayState* play) {
|
||||
PauseContext* pauseCtx = &play->pauseCtx;
|
||||
s32 temp1;
|
||||
s32 temp2;
|
||||
s32 temp3;
|
||||
s32 temp4;
|
||||
s32 tlOffsetX;
|
||||
s32 tlOffsetY;
|
||||
s32 rightOffsetX;
|
||||
s32 bottomOffsetY;
|
||||
|
||||
if (pauseCtx->cursorSpecialPos == 0) {
|
||||
temp1 = -1;
|
||||
temp2 = 1;
|
||||
temp3 = 14;
|
||||
temp4 = 14;
|
||||
tlOffsetX = -1;
|
||||
tlOffsetY = 1;
|
||||
rightOffsetX = 14;
|
||||
bottomOffsetY = 14;
|
||||
if (pauseCtx->pageIndex == PAUSE_MAP) {
|
||||
if (!sInDungeonScene) {
|
||||
temp1 = -6;
|
||||
temp2 = 6;
|
||||
temp3 = 4;
|
||||
temp4 = 4;
|
||||
tlOffsetX = -6;
|
||||
tlOffsetY = 6;
|
||||
rightOffsetX = 4;
|
||||
bottomOffsetY = 4;
|
||||
} else if (pauseCtx->cursorSlot[pauseCtx->pageIndex] >= 3) {
|
||||
temp1 = -6;
|
||||
temp2 = 5;
|
||||
temp4 = 7;
|
||||
temp3 = 19;
|
||||
tlOffsetX = -6;
|
||||
tlOffsetY = 5;
|
||||
bottomOffsetY = 7;
|
||||
rightOffsetX = 19;
|
||||
} else {
|
||||
temp1 = -3;
|
||||
temp2 = 3;
|
||||
temp3 = 13;
|
||||
temp4 = 13;
|
||||
tlOffsetX = -3;
|
||||
tlOffsetY = 3;
|
||||
rightOffsetX = 13;
|
||||
bottomOffsetY = 13;
|
||||
}
|
||||
} else if (pauseCtx->pageIndex == PAUSE_QUEST) {
|
||||
temp1 = -4;
|
||||
temp2 = 4;
|
||||
temp3 = 12;
|
||||
temp4 = 12;
|
||||
tlOffsetX = -4;
|
||||
tlOffsetY = 4;
|
||||
rightOffsetX = 12;
|
||||
bottomOffsetY = 12;
|
||||
if (pauseCtx->cursorSlot[pauseCtx->pageIndex] == 0x18) {
|
||||
temp1 = -2;
|
||||
temp2 = 2;
|
||||
temp3 = 32;
|
||||
temp4 = 32;
|
||||
tlOffsetX = -2;
|
||||
tlOffsetY = 2;
|
||||
rightOffsetX = 32;
|
||||
bottomOffsetY = 32;
|
||||
} else if (pauseCtx->cursorSlot[pauseCtx->pageIndex] == 0x17) {
|
||||
temp1 = -4;
|
||||
temp2 = 4;
|
||||
temp4 = 13;
|
||||
temp3 = 34;
|
||||
tlOffsetX = -4;
|
||||
tlOffsetY = 4;
|
||||
bottomOffsetY = 13;
|
||||
rightOffsetX = 34;
|
||||
} else if (pauseCtx->cursorSlot[pauseCtx->pageIndex] < 6) {
|
||||
temp1 = -1;
|
||||
temp2 = 1;
|
||||
temp3 = 10;
|
||||
temp4 = 10;
|
||||
tlOffsetX = -1;
|
||||
tlOffsetY = 1;
|
||||
rightOffsetX = 10;
|
||||
bottomOffsetY = 10;
|
||||
} else if ((pauseCtx->cursorSlot[pauseCtx->pageIndex] >= 6) &&
|
||||
(pauseCtx->cursorSlot[pauseCtx->pageIndex] < 0x12)) {
|
||||
temp1 = -5;
|
||||
temp2 = 3;
|
||||
temp3 = 8;
|
||||
temp4 = 8;
|
||||
tlOffsetX = -5;
|
||||
tlOffsetY = 3;
|
||||
rightOffsetX = 8;
|
||||
bottomOffsetY = 8;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
temp1 = -4;
|
||||
temp2 = 4;
|
||||
temp3 = 16;
|
||||
temp4 = 16;
|
||||
tlOffsetX = -4;
|
||||
tlOffsetY = 4;
|
||||
rightOffsetX = 16;
|
||||
bottomOffsetY = 16;
|
||||
}
|
||||
|
||||
pauseCtx->cursorVtx[0].v.ob[0] = pauseCtx->cursorVtx[2].v.ob[0] = pauseCtx->cursorVtx[0].v.ob[0] + temp1;
|
||||
// Move the quads according to the offsets set above,
|
||||
// and the position of the cursor in `pauseCtx->cursorVtx[0].v.ob`
|
||||
// (see `KaleidoScope_SetCursorPos` and other `PAUSE_QUAD_CURSOR_TL` uses)
|
||||
|
||||
// PAUSE_QUAD_CURSOR_TL
|
||||
pauseCtx->cursorVtx[0].v.ob[0] = pauseCtx->cursorVtx[2].v.ob[0] = pauseCtx->cursorVtx[0].v.ob[0] + tlOffsetX;
|
||||
pauseCtx->cursorVtx[1].v.ob[0] = pauseCtx->cursorVtx[3].v.ob[0] = pauseCtx->cursorVtx[0].v.ob[0] + 16;
|
||||
pauseCtx->cursorVtx[0].v.ob[1] = pauseCtx->cursorVtx[1].v.ob[1] = pauseCtx->cursorVtx[0].v.ob[1] + temp2;
|
||||
pauseCtx->cursorVtx[0].v.ob[1] = pauseCtx->cursorVtx[1].v.ob[1] = pauseCtx->cursorVtx[0].v.ob[1] + tlOffsetY;
|
||||
pauseCtx->cursorVtx[2].v.ob[1] = pauseCtx->cursorVtx[3].v.ob[1] = pauseCtx->cursorVtx[0].v.ob[1] - 16;
|
||||
|
||||
pauseCtx->cursorVtx[4].v.ob[0] = pauseCtx->cursorVtx[6].v.ob[0] = pauseCtx->cursorVtx[0].v.ob[0] + temp3;
|
||||
// PAUSE_QUAD_CURSOR_TR
|
||||
pauseCtx->cursorVtx[4].v.ob[0] = pauseCtx->cursorVtx[6].v.ob[0] = pauseCtx->cursorVtx[0].v.ob[0] + rightOffsetX;
|
||||
pauseCtx->cursorVtx[5].v.ob[0] = pauseCtx->cursorVtx[7].v.ob[0] = pauseCtx->cursorVtx[4].v.ob[0] + 16;
|
||||
pauseCtx->cursorVtx[4].v.ob[1] = pauseCtx->cursorVtx[5].v.ob[1] = pauseCtx->cursorVtx[0].v.ob[1];
|
||||
pauseCtx->cursorVtx[6].v.ob[1] = pauseCtx->cursorVtx[7].v.ob[1] = pauseCtx->cursorVtx[4].v.ob[1] - 16;
|
||||
|
||||
// PAUSE_QUAD_CURSOR_BL
|
||||
pauseCtx->cursorVtx[8].v.ob[0] = pauseCtx->cursorVtx[10].v.ob[0] = pauseCtx->cursorVtx[0].v.ob[0];
|
||||
pauseCtx->cursorVtx[9].v.ob[0] = pauseCtx->cursorVtx[11].v.ob[0] = pauseCtx->cursorVtx[8].v.ob[0] + 16;
|
||||
pauseCtx->cursorVtx[8].v.ob[1] = pauseCtx->cursorVtx[9].v.ob[1] = pauseCtx->cursorVtx[0].v.ob[1] - temp4;
|
||||
pauseCtx->cursorVtx[8].v.ob[1] = pauseCtx->cursorVtx[9].v.ob[1] = pauseCtx->cursorVtx[0].v.ob[1] - bottomOffsetY;
|
||||
pauseCtx->cursorVtx[10].v.ob[1] = pauseCtx->cursorVtx[11].v.ob[1] = pauseCtx->cursorVtx[8].v.ob[1] - 16;
|
||||
|
||||
pauseCtx->cursorVtx[12].v.ob[0] = pauseCtx->cursorVtx[14].v.ob[0] = pauseCtx->cursorVtx[0].v.ob[0] + temp3;
|
||||
// PAUSE_QUAD_CURSOR_BR
|
||||
pauseCtx->cursorVtx[12].v.ob[0] = pauseCtx->cursorVtx[14].v.ob[0] = pauseCtx->cursorVtx[0].v.ob[0] + rightOffsetX;
|
||||
pauseCtx->cursorVtx[13].v.ob[0] = pauseCtx->cursorVtx[15].v.ob[0] = pauseCtx->cursorVtx[12].v.ob[0] + 16;
|
||||
pauseCtx->cursorVtx[12].v.ob[1] = pauseCtx->cursorVtx[13].v.ob[1] = pauseCtx->cursorVtx[0].v.ob[1] - temp4;
|
||||
pauseCtx->cursorVtx[12].v.ob[1] = pauseCtx->cursorVtx[13].v.ob[1] = pauseCtx->cursorVtx[0].v.ob[1] - bottomOffsetY;
|
||||
pauseCtx->cursorVtx[14].v.ob[1] = pauseCtx->cursorVtx[15].v.ob[1] = pauseCtx->cursorVtx[12].v.ob[1] - 16;
|
||||
}
|
||||
|
||||
@ -3352,11 +3368,11 @@ void KaleidoScope_Update(PlayState* play) {
|
||||
(pauseCtx->state == PAUSE_STATE_MAIN)) {
|
||||
pauseCtx->stickAdjX = input->rel.stick_x;
|
||||
pauseCtx->stickAdjY = input->rel.stick_y;
|
||||
KaleidoScope_UpdateCursorSize(play);
|
||||
KaleidoScope_UpdateCursorVtx(play);
|
||||
KaleidoScope_HandlePageToggles(pauseCtx, input);
|
||||
} else if ((pauseCtx->pageIndex == PAUSE_QUEST) &&
|
||||
((pauseCtx->mainState < PAUSE_MAIN_STATE_3) || (pauseCtx->mainState == PAUSE_MAIN_STATE_5))) {
|
||||
KaleidoScope_UpdateCursorSize(play);
|
||||
KaleidoScope_UpdateCursorVtx(play);
|
||||
}
|
||||
|
||||
if (pauseCtx->state == PAUSE_STATE_MAIN) {
|
||||
|
@ -75,7 +75,7 @@ s32 KaleidoScope_UpdateQuestStatusPoint(PauseContext* pauseCtx, s32 point);
|
||||
void KaleidoScope_DrawDebugEditor(PlayState* play);
|
||||
void KaleidoScope_DrawPlayerWork(PlayState* play);
|
||||
void KaleidoScope_DrawEquipment(PlayState* play);
|
||||
void KaleidoScope_SetCursorVtx(PauseContext* pauseCtx, u16 index, Vtx* vtx);
|
||||
void KaleidoScope_SetCursorPos(PauseContext* pauseCtx, u16 index, Vtx* vtx);
|
||||
void KaleidoScope_DrawItemSelect(PlayState* play);
|
||||
void KaleidoScope_UpdateItemEquip(PlayState* play);
|
||||
void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx);
|
||||
|
@ -3215,8 +3215,8 @@ KaleidoScope_DrawEquipmentImage = 0x80817BA0; // type:func
|
||||
KaleidoScope_DrawPlayerWork = 0x80817FE8; // type:func
|
||||
KaleidoScope_DrawEquipment = 0x8081818C; // type:func
|
||||
KaleidoScope_DrawAmmoCount = 0x80819670; // type:func
|
||||
KaleidoScope_SetCursorVtx = 0x80819BF4; // type:func
|
||||
KaleidoScope_SetItemCursorVtx = 0x80819C24; // type:func
|
||||
KaleidoScope_SetCursorPos = 0x80819BF4; // type:func
|
||||
KaleidoScope_SetItemCursorPos = 0x80819C24; // type:func
|
||||
KaleidoScope_DrawItemSelect = 0x80819C50; // type:func
|
||||
KaleidoScope_UpdateItemEquip = 0x8081AA60; // type:func
|
||||
KaleidoScope_DrawDungeonMap = 0x8081B660; // type:func
|
||||
@ -3245,7 +3245,7 @@ KaleidoScope_DrawGameOver = 0x8082536C; // type:func
|
||||
KaleidoScope_Draw = 0x80825A00; // type:func
|
||||
KaleidoScope_GrayOutTextureRGBA32 = 0x80825C1C; // type:func
|
||||
KaleidoScope_UpdateOpening = 0x80825CD0; // type:func
|
||||
KaleidoScope_UpdateCursorSize = 0x80825EC0; // type:func
|
||||
KaleidoScope_UpdateCursorVtx = 0x80825EC0; // type:func
|
||||
KaleidoScope_LoadDungeonMap = 0x80826204; // type:func
|
||||
KaleidoScope_UpdateDungeonMap = 0x808262A0; // type:func
|
||||
KaleidoScope_Update = 0x808263C0; // type:func
|
||||
|
Loading…
Reference in New Issue
Block a user