mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-27 04:10:30 +00:00
Pause doc: Prompt page and save prompt state (#2170)
* Pause doc: Prompt page and save prompt state * bss * `QUAD_PROMPT_` -> `PROMPT_QUAD_` * `QUAD_MAP_WORLD_`, `QUAD_MAP_` -> `WORLD_MAP_QUAD_` * `PAUSE_QUAD_CURSOR_` -> `PAUSE_CURSOR_QUAD_` * `PAUSE_SAVE_PROMPT_STATE_RETURN_TO_MENU_ALT` -> `_2` * bss * bss * add comments to help clarify save prompt vs prompt
This commit is contained in:
parent
d9af701b88
commit
64570e871f
@ -226,6 +226,10 @@
|
||||
#define R_TEXT_ADJUST_COLOR_2_B VREG(38)
|
||||
#define R_OCARINA_BUTTONS_YPOS(note) VREG(45 + (note))
|
||||
#define R_OCARINA_BUTTONS_YPOS_OFFSET VREG(51)
|
||||
#define R_KALEIDO_PROMPT_CURSOR_ALPHA_TIMER_BASE VREG(60)
|
||||
#define R_KALEIDO_PROMPT_CURSOR_ALPHA VREG(61)
|
||||
#define R_KALEIDO_PROMPT_CURSOR_ALPHA_STATE VREG(62)
|
||||
#define R_KALEIDO_PROMPT_CURSOR_ALPHA_TIMER VREG(63)
|
||||
#define R_ITEM_AMMO_X(i) VREG(64 + (i))
|
||||
#define R_ITEM_AMMO_Y(i) VREG(68 + (i))
|
||||
#define R_ITEM_ICON_WIDTH(i) VREG(76 + (i))
|
||||
|
@ -97,13 +97,24 @@ typedef enum PauseMainState {
|
||||
/* 9 */ PAUSE_MAIN_STATE_9
|
||||
} PauseMainState;
|
||||
|
||||
// Sub-states of PAUSE_STATE_SAVE_PROMPT
|
||||
typedef enum PauseSavePromptState {
|
||||
/* 0 */ PAUSE_SAVE_PROMPT_STATE_APPEARING,
|
||||
/* 1 */ PAUSE_SAVE_PROMPT_STATE_WAIT_CHOICE,
|
||||
/* 2 */ PAUSE_SAVE_PROMPT_STATE_CLOSING,
|
||||
/* 3 */ PAUSE_SAVE_PROMPT_STATE_RETURN_TO_MENU,
|
||||
/* 4 */ PAUSE_SAVE_PROMPT_STATE_SAVED,
|
||||
/* 5 */ PAUSE_SAVE_PROMPT_STATE_CLOSING_AFTER_SAVED,
|
||||
/* 6 */ PAUSE_SAVE_PROMPT_STATE_RETURN_TO_MENU_2 // unused
|
||||
} PauseSavePromptState;
|
||||
|
||||
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
|
||||
/* 0 */ PAUSE_CURSOR_QUAD_TL,
|
||||
/* 1 */ PAUSE_CURSOR_QUAD_TR,
|
||||
/* 2 */ PAUSE_CURSOR_QUAD_BL,
|
||||
/* 3 */ PAUSE_CURSOR_QUAD_BR,
|
||||
/* 4 */ PAUSE_CURSOR_QUAD_4,
|
||||
/* 5 */ PAUSE_CURSOR_QUAD_MAX
|
||||
} PauseCursorQuad;
|
||||
|
||||
typedef enum WorldMapPoint {
|
||||
@ -149,7 +160,7 @@ typedef struct PauseContext {
|
||||
/* 0x0160 */ char unk_160[0x04];
|
||||
/* 0x0164 */ Vtx* questVtx;
|
||||
/* 0x0168 */ Vtx* cursorVtx;
|
||||
/* 0x016C */ Vtx* saveVtx;
|
||||
/* 0x016C */ Vtx* promptPageVtx; // Used by both the pause menu save prompt and the gameover prompt
|
||||
/* 0x0170 */ char unk_170[0x24];
|
||||
/* 0x0194 */ struct OcarinaStaff* ocarinaStaff;
|
||||
/* 0x0198 */ char unk_198[0x20];
|
||||
@ -162,7 +173,7 @@ typedef struct PauseContext {
|
||||
/* 0x01E6 */ u16 nextPageMode; // During a page switch, indicates the page before switching and the direction to scroll in. Value is `(2 * prev pageIndex) + (scroll left ? 1 : 0)`
|
||||
/* 0x01E8 */ u16 pageIndex; // "kscp_pos"
|
||||
/* 0x01EA */ u16 pageSwitchTimer;
|
||||
/* 0x01EC */ u16 unk_1EC;
|
||||
/* 0x01EC */ u16 savePromptState;
|
||||
/* 0x01F0 */ f32 unk_1F0;
|
||||
/* 0x01F4 */ f32 unk_1F4;
|
||||
/* 0x01F8 */ f32 unk_1F8;
|
||||
|
@ -42,7 +42,7 @@
|
||||
*/
|
||||
#if PLATFORM_GC
|
||||
|
||||
#pragma increment_block_number "gc-eu:208 gc-eu-mq:208 gc-eu-mq-dbg:208 gc-jp:208 gc-jp-ce:208 gc-jp-mq:208 gc-us:208" \
|
||||
#pragma increment_block_number "gc-eu:208 gc-eu-mq:208 gc-eu-mq-dbg:192 gc-jp:208 gc-jp-ce:208 gc-jp-mq:208 gc-us:208" \
|
||||
"gc-us-mq:208"
|
||||
|
||||
#include "global.h"
|
||||
|
@ -647,10 +647,10 @@ void Regs_InitDataImpl(void) {
|
||||
VREG(57) = 255;
|
||||
VREG(58) = 255;
|
||||
VREG(59) = 255;
|
||||
VREG(60) = 20;
|
||||
VREG(61) = 100;
|
||||
VREG(62) = 0;
|
||||
VREG(63) = 10;
|
||||
R_KALEIDO_PROMPT_CURSOR_ALPHA_TIMER_BASE = 20;
|
||||
R_KALEIDO_PROMPT_CURSOR_ALPHA = 100;
|
||||
R_KALEIDO_PROMPT_CURSOR_ALPHA_STATE = 0;
|
||||
R_KALEIDO_PROMPT_CURSOR_ALPHA_TIMER = 10;
|
||||
R_ITEM_AMMO_X(1) = C_LEFT_BUTTON_X + 1;
|
||||
R_ITEM_AMMO_X(2) = C_DOWN_BUTTON_X + 1;
|
||||
R_ITEM_AMMO_X(3) = C_RIGHT_BUTTON_X + 1;
|
||||
|
@ -66,7 +66,7 @@ void KaleidoScopeCall_Update(PlayState* play) {
|
||||
|
||||
R_PAUSE_BG_PRERENDER_STATE = PAUSE_BG_PRERENDER_SETUP;
|
||||
pauseCtx->mainState = PAUSE_MAIN_STATE_IDLE;
|
||||
pauseCtx->unk_1EC = 0;
|
||||
pauseCtx->savePromptState = PAUSE_SAVE_PROMPT_STATE_APPEARING;
|
||||
pauseCtx->state = (pauseCtx->state & 0xFFFF) + 1; // PAUSE_STATE_WAIT_BG_PRERENDER
|
||||
}
|
||||
} else if (pauseCtx->state == PAUSE_STATE_8) {
|
||||
@ -77,7 +77,7 @@ void KaleidoScopeCall_Update(PlayState* play) {
|
||||
|
||||
R_PAUSE_BG_PRERENDER_STATE = PAUSE_BG_PRERENDER_SETUP;
|
||||
pauseCtx->mainState = PAUSE_MAIN_STATE_IDLE;
|
||||
pauseCtx->unk_1EC = 0;
|
||||
pauseCtx->savePromptState = PAUSE_SAVE_PROMPT_STATE_APPEARING;
|
||||
pauseCtx->state = (pauseCtx->state & 0xFFFF) + 1; // PAUSE_STATE_9
|
||||
} else if ((pauseCtx->state == PAUSE_STATE_WAIT_BG_PRERENDER) || (pauseCtx->state == PAUSE_STATE_9)) {
|
||||
PRINTF("PR_KAREIDOSCOPE_MODE=%d\n", R_PAUSE_BG_PRERENDER_STATE);
|
||||
|
@ -3392,7 +3392,7 @@ void Interface_Draw(PlayState* play) {
|
||||
gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATERGBA_PRIM, G_CC_MODULATERGBA_PRIM);
|
||||
gSPMatrix(OVERLAY_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
// PAUSE_QUAD_CURSOR_4
|
||||
// PAUSE_CURSOR_QUAD_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 +3403,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[PAUSE_QUAD_CURSOR_4 * 4], 4, 0);
|
||||
gSPVertex(OVERLAY_DISP++, &pauseCtx->cursorVtx[PAUSE_CURSOR_QUAD_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,7 +3416,7 @@ void Interface_Draw(PlayState* play) {
|
||||
|
||||
if ((pauseCtx->equipAnimAlpha > 0) && (pauseCtx->equipAnimAlpha < 255)) {
|
||||
svar1 = (pauseCtx->equipAnimAlpha / 8) / 2;
|
||||
// PAUSE_QUAD_CURSOR_4
|
||||
// PAUSE_CURSOR_QUAD_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] =
|
||||
@ -3427,7 +3427,7 @@ void Interface_Draw(PlayState* play) {
|
||||
pauseCtx->cursorVtx[16].v.ob[1] - svar1 * 2 - 32;
|
||||
}
|
||||
|
||||
gSPVertex(OVERLAY_DISP++, &pauseCtx->cursorVtx[PAUSE_QUAD_CURSOR_4 * 4], 4, 0);
|
||||
gSPVertex(OVERLAY_DISP++, &pauseCtx->cursorVtx[PAUSE_CURSOR_QUAD_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);
|
||||
|
@ -1395,7 +1395,7 @@ void func_80B3F3D8(void) {
|
||||
Sfx_PlaySfxCentered2(NA_SE_PL_SKIP);
|
||||
}
|
||||
|
||||
#pragma increment_block_number "gc-eu:64 gc-eu-mq:64 gc-jp:128 gc-jp-ce:128 gc-jp-mq:64 gc-us:128 gc-us-mq:64"
|
||||
#pragma increment_block_number "gc-eu:64 gc-eu-mq:64 gc-jp:64 gc-jp-ce:64 gc-jp-mq:64 gc-us:64 gc-us-mq:64"
|
||||
|
||||
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:136 gc-eu-mq:136 gc-jp:138 gc-jp-ce:138 gc-jp-mq:138 gc-us:138 gc-us-mq:138"
|
||||
#pragma increment_block_number "gc-eu:133 gc-eu-mq:133 gc-jp:135 gc-jp-ce:135 gc-jp-mq:135 gc-us:135 gc-us-mq:135"
|
||||
|
||||
#define FLAGS ACTOR_FLAG_4
|
||||
|
||||
|
@ -358,40 +358,40 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
|
||||
void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
static void* cloudTexs[] = {
|
||||
gWorldMapCloudSacredForestMeadowTex, // QUAD_MAP_WORLD_CLOUDS_SACRED_FOREST_MEADOW
|
||||
gWorldMapCloudHyruleFieldTex, // QUAD_MAP_WORLD_CLOUDS_HYRULE_FIELD
|
||||
gWorldMapCloudLonLonRanchTex, // QUAD_MAP_WORLD_CLOUDS_LON_LON_RANCH
|
||||
gWorldMapCloudMarketTex, // QUAD_MAP_WORLD_CLOUDS_MARKET
|
||||
gWorldMapCloudHyruleCastleTex, // QUAD_MAP_WORLD_CLOUDS_HYRULE_CASTLE
|
||||
gWorldMapCloudKakarikoVillageTex, // QUAD_MAP_WORLD_CLOUDS_KAKARIKO_VILLAGE
|
||||
gWorldMapCloudGraveyardTex, // QUAD_MAP_WORLD_CLOUDS_GRAVEYARD
|
||||
gWorldMapCloudDeathMountainTrailTex, // QUAD_MAP_WORLD_CLOUDS_DEATH_MOUNTAIN_TRAIL
|
||||
gWorldMapCloudGoronCityTex, // QUAD_MAP_WORLD_CLOUDS_GORON_CITY
|
||||
gWorldMapCloudZorasRiverTex, // QUAD_MAP_WORLD_CLOUDS_ZORAS_RIVER
|
||||
gWorldMapCloudZorasDomainTex, // QUAD_MAP_WORLD_CLOUDS_ZORAS_DOMAIN
|
||||
gWorldMapCloudZorasFountainTex, // QUAD_MAP_WORLD_CLOUDS_ZORAS_FOUNTAIN
|
||||
gWorldMapCloudGerudoValleyTex, // QUAD_MAP_WORLD_CLOUDS_GERUDO_VALLEY
|
||||
gWorldMapCloudGerudosFortressTex, // QUAD_MAP_WORLD_CLOUDS_GERUDOS_FORTRESS
|
||||
gWorldMapCloudDesertColossusTex, // QUAD_MAP_WORLD_CLOUDS_DESERT_COLOSSUS
|
||||
gWorldMapCloudLakeHyliaTex, // QUAD_MAP_WORLD_CLOUDS_LAKE_HYLIA
|
||||
gWorldMapCloudSacredForestMeadowTex, // WORLD_MAP_QUAD_CLOUDS_SACRED_FOREST_MEADOW
|
||||
gWorldMapCloudHyruleFieldTex, // WORLD_MAP_QUAD_CLOUDS_HYRULE_FIELD
|
||||
gWorldMapCloudLonLonRanchTex, // WORLD_MAP_QUAD_CLOUDS_LON_LON_RANCH
|
||||
gWorldMapCloudMarketTex, // WORLD_MAP_QUAD_CLOUDS_MARKET
|
||||
gWorldMapCloudHyruleCastleTex, // WORLD_MAP_QUAD_CLOUDS_HYRULE_CASTLE
|
||||
gWorldMapCloudKakarikoVillageTex, // WORLD_MAP_QUAD_CLOUDS_KAKARIKO_VILLAGE
|
||||
gWorldMapCloudGraveyardTex, // WORLD_MAP_QUAD_CLOUDS_GRAVEYARD
|
||||
gWorldMapCloudDeathMountainTrailTex, // WORLD_MAP_QUAD_CLOUDS_DEATH_MOUNTAIN_TRAIL
|
||||
gWorldMapCloudGoronCityTex, // WORLD_MAP_QUAD_CLOUDS_GORON_CITY
|
||||
gWorldMapCloudZorasRiverTex, // WORLD_MAP_QUAD_CLOUDS_ZORAS_RIVER
|
||||
gWorldMapCloudZorasDomainTex, // WORLD_MAP_QUAD_CLOUDS_ZORAS_DOMAIN
|
||||
gWorldMapCloudZorasFountainTex, // WORLD_MAP_QUAD_CLOUDS_ZORAS_FOUNTAIN
|
||||
gWorldMapCloudGerudoValleyTex, // WORLD_MAP_QUAD_CLOUDS_GERUDO_VALLEY
|
||||
gWorldMapCloudGerudosFortressTex, // WORLD_MAP_QUAD_CLOUDS_GERUDOS_FORTRESS
|
||||
gWorldMapCloudDesertColossusTex, // WORLD_MAP_QUAD_CLOUDS_DESERT_COLOSSUS
|
||||
gWorldMapCloudLakeHyliaTex, // WORLD_MAP_QUAD_CLOUDS_LAKE_HYLIA
|
||||
};
|
||||
static u16 cloudFlagNums[] = {
|
||||
WORLD_MAP_AREA_SACRED_FOREST_MEADOW, // QUAD_MAP_WORLD_CLOUDS_SACRED_FOREST_MEADOW
|
||||
WORLD_MAP_AREA_HYRULE_FIELD, // QUAD_MAP_WORLD_CLOUDS_HYRULE_FIELD
|
||||
WORLD_MAP_AREA_LON_LON_RANCH, // QUAD_MAP_WORLD_CLOUDS_LON_LON_RANCH
|
||||
WORLD_MAP_AREA_MARKET, // QUAD_MAP_WORLD_CLOUDS_MARKET
|
||||
WORLD_MAP_AREA_HYRULE_CASTLE, // QUAD_MAP_WORLD_CLOUDS_HYRULE_CASTLE
|
||||
WORLD_MAP_AREA_KAKARIKO_VILLAGE, // QUAD_MAP_WORLD_CLOUDS_KAKARIKO_VILLAGE
|
||||
WORLD_MAP_AREA_GRAVEYARD, // QUAD_MAP_WORLD_CLOUDS_GRAVEYARD
|
||||
WORLD_MAP_AREA_DEATH_MOUNTAIN_TRAIL, // QUAD_MAP_WORLD_CLOUDS_DEATH_MOUNTAIN_TRAIL
|
||||
WORLD_MAP_AREA_GORON_CITY, // QUAD_MAP_WORLD_CLOUDS_GORON_CITY
|
||||
WORLD_MAP_AREA_ZORAS_RIVER, // QUAD_MAP_WORLD_CLOUDS_ZORAS_RIVER
|
||||
WORLD_MAP_AREA_ZORAS_DOMAIN, // QUAD_MAP_WORLD_CLOUDS_ZORAS_DOMAIN
|
||||
WORLD_MAP_AREA_ZORAS_FOUNTAIN, // QUAD_MAP_WORLD_CLOUDS_ZORAS_FOUNTAIN
|
||||
WORLD_MAP_AREA_GERUDO_VALLEY, // QUAD_MAP_WORLD_CLOUDS_GERUDO_VALLEY
|
||||
WORLD_MAP_AREA_GERUDOS_FORTRESS, // QUAD_MAP_WORLD_CLOUDS_GERUDOS_FORTRESS
|
||||
WORLD_MAP_AREA_DESERT_COLOSSUS, // QUAD_MAP_WORLD_CLOUDS_DESERT_COLOSSUS
|
||||
WORLD_MAP_AREA_LAKE_HYLIA, // QUAD_MAP_WORLD_CLOUDS_LAKE_HYLIA
|
||||
WORLD_MAP_AREA_SACRED_FOREST_MEADOW, // WORLD_MAP_QUAD_CLOUDS_SACRED_FOREST_MEADOW
|
||||
WORLD_MAP_AREA_HYRULE_FIELD, // WORLD_MAP_QUAD_CLOUDS_HYRULE_FIELD
|
||||
WORLD_MAP_AREA_LON_LON_RANCH, // WORLD_MAP_QUAD_CLOUDS_LON_LON_RANCH
|
||||
WORLD_MAP_AREA_MARKET, // WORLD_MAP_QUAD_CLOUDS_MARKET
|
||||
WORLD_MAP_AREA_HYRULE_CASTLE, // WORLD_MAP_QUAD_CLOUDS_HYRULE_CASTLE
|
||||
WORLD_MAP_AREA_KAKARIKO_VILLAGE, // WORLD_MAP_QUAD_CLOUDS_KAKARIKO_VILLAGE
|
||||
WORLD_MAP_AREA_GRAVEYARD, // WORLD_MAP_QUAD_CLOUDS_GRAVEYARD
|
||||
WORLD_MAP_AREA_DEATH_MOUNTAIN_TRAIL, // WORLD_MAP_QUAD_CLOUDS_DEATH_MOUNTAIN_TRAIL
|
||||
WORLD_MAP_AREA_GORON_CITY, // WORLD_MAP_QUAD_CLOUDS_GORON_CITY
|
||||
WORLD_MAP_AREA_ZORAS_RIVER, // WORLD_MAP_QUAD_CLOUDS_ZORAS_RIVER
|
||||
WORLD_MAP_AREA_ZORAS_DOMAIN, // WORLD_MAP_QUAD_CLOUDS_ZORAS_DOMAIN
|
||||
WORLD_MAP_AREA_ZORAS_FOUNTAIN, // WORLD_MAP_QUAD_CLOUDS_ZORAS_FOUNTAIN
|
||||
WORLD_MAP_AREA_GERUDO_VALLEY, // WORLD_MAP_QUAD_CLOUDS_GERUDO_VALLEY
|
||||
WORLD_MAP_AREA_GERUDOS_FORTRESS, // WORLD_MAP_QUAD_CLOUDS_GERUDOS_FORTRESS
|
||||
WORLD_MAP_AREA_DESERT_COLOSSUS, // WORLD_MAP_QUAD_CLOUDS_DESERT_COLOSSUS
|
||||
WORLD_MAP_AREA_LAKE_HYLIA, // WORLD_MAP_QUAD_CLOUDS_LAKE_HYLIA
|
||||
};
|
||||
static s16 pointPulsePrimColor[] = { 0, 0, 255 };
|
||||
static s16 pointPrimColors[][3] = {
|
||||
@ -577,7 +577,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];
|
||||
PAGE_BG_QUADS + WORLD_MAP_QUAD_POINT_FIRST + pauseCtx->cursorPoint[PAUSE_WORLD_MAP];
|
||||
KaleidoScope_SetCursorPos(pauseCtx, pauseCtx->cursorSlot[PAUSE_MAP] * 4, pauseCtx->mapPageVtx);
|
||||
} else {
|
||||
pauseCtx->cursorItem[PAUSE_MAP] = gSaveContext.worldMapArea + 0x18;
|
||||
@ -593,7 +593,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];
|
||||
PAGE_BG_QUADS + WORLD_MAP_QUAD_POINT_FIRST + pauseCtx->cursorPoint[PAUSE_WORLD_MAP];
|
||||
KaleidoScope_SetCursorPos(pauseCtx, pauseCtx->cursorSlot[PAUSE_MAP] * 4, pauseCtx->mapPageVtx);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
@ -611,7 +611,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];
|
||||
PAGE_BG_QUADS + WORLD_MAP_QUAD_POINT_FIRST + pauseCtx->cursorPoint[PAUSE_WORLD_MAP];
|
||||
KaleidoScope_SetCursorPos(pauseCtx, pauseCtx->cursorSlot[PAUSE_MAP] * 4, pauseCtx->mapPageVtx);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
@ -754,7 +754,7 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetTextureFilter(POLY_OPA_DISP++, G_TF_POINT);
|
||||
|
||||
// Quad PAGE_BG_QUADS + QUAD_MAP_28
|
||||
// Quad PAGE_BG_QUADS + WORLD_MAP_QUAD_28
|
||||
|
||||
pauseCtx->mapPageVtx[172].v.ob[0] = pauseCtx->mapPageVtx[174].v.ob[0] =
|
||||
areaBoxPosX[((void)0, gSaveContext.worldMapArea)];
|
||||
@ -862,7 +862,7 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, pointPulseEnvColor[0], pointPulseEnvColor[1], pointPulseEnvColor[2], 0);
|
||||
}
|
||||
|
||||
gSPVertex(POLY_OPA_DISP++, &pauseCtx->mapPageVtx[(PAGE_BG_QUADS + QUAD_MAP_WORLD_POINT_FIRST + i) * 4], 4,
|
||||
gSPVertex(POLY_OPA_DISP++, &pauseCtx->mapPageVtx[(PAGE_BG_QUADS + WORLD_MAP_QUAD_POINT_FIRST + i) * 4], 4,
|
||||
0);
|
||||
|
||||
gSP1Quadrangle(POLY_OPA_DISP++, 0, 2, 3, 1, 0);
|
||||
@ -873,7 +873,7 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
KaleidoScope_DrawCursor(play, PAUSE_MAP);
|
||||
}
|
||||
|
||||
gSPVertex(POLY_OPA_DISP++, &pauseCtx->mapPageVtx[(PAGE_BG_QUADS + QUAD_MAP_TRADE_QUEST_MARKER) * 4], 16, 0);
|
||||
gSPVertex(POLY_OPA_DISP++, &pauseCtx->mapPageVtx[(PAGE_BG_QUADS + WORLD_MAP_QUAD_TRADE_QUEST_MARKER) * 4], 16, 0);
|
||||
|
||||
if (pauseCtx->tradeQuestMarker != TRADE_QUEST_MARKER_NONE) {
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "z_kaleido_scope.h"
|
||||
|
||||
static s16 D_8082A6E0[] = { 100, 255 };
|
||||
static s16 sKaleidoPromptCursorAlphaVals[] = { 100, 255 };
|
||||
|
||||
void KaleidoScope_UpdatePrompt(PlayState* play) {
|
||||
PauseContext* pauseCtx = &play->pauseCtx;
|
||||
@ -8,8 +8,10 @@ void KaleidoScope_UpdatePrompt(PlayState* play) {
|
||||
s8 stickAdjX = input->rel.stick_x;
|
||||
s16 step;
|
||||
|
||||
if (((pauseCtx->state == PAUSE_STATE_SAVE_PROMPT) && (pauseCtx->unk_1EC == 1)) ||
|
||||
if (((pauseCtx->state == PAUSE_STATE_SAVE_PROMPT) &&
|
||||
(pauseCtx->savePromptState == PAUSE_SAVE_PROMPT_STATE_WAIT_CHOICE)) ||
|
||||
(pauseCtx->state == PAUSE_STATE_14) || (pauseCtx->state == PAUSE_STATE_16)) {
|
||||
|
||||
if ((pauseCtx->promptChoice == 0) && (stickAdjX >= 30)) {
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
@ -20,18 +22,20 @@ void KaleidoScope_UpdatePrompt(PlayState* play) {
|
||||
pauseCtx->promptChoice = 0;
|
||||
}
|
||||
|
||||
step = ABS(VREG(61) - D_8082A6E0[VREG(62)]) / VREG(63);
|
||||
if (VREG(61) >= D_8082A6E0[VREG(62)]) {
|
||||
VREG(61) -= step;
|
||||
step = ABS(R_KALEIDO_PROMPT_CURSOR_ALPHA - sKaleidoPromptCursorAlphaVals[R_KALEIDO_PROMPT_CURSOR_ALPHA_STATE]) /
|
||||
R_KALEIDO_PROMPT_CURSOR_ALPHA_TIMER;
|
||||
if (R_KALEIDO_PROMPT_CURSOR_ALPHA >= sKaleidoPromptCursorAlphaVals[R_KALEIDO_PROMPT_CURSOR_ALPHA_STATE]) {
|
||||
R_KALEIDO_PROMPT_CURSOR_ALPHA -= step;
|
||||
} else {
|
||||
VREG(61) += step;
|
||||
R_KALEIDO_PROMPT_CURSOR_ALPHA += step;
|
||||
}
|
||||
|
||||
VREG(63)--;
|
||||
if (VREG(63) == 0) {
|
||||
VREG(61) = D_8082A6E0[VREG(62)];
|
||||
VREG(63) = VREG(60) + VREG(62);
|
||||
VREG(62) ^= 1;
|
||||
R_KALEIDO_PROMPT_CURSOR_ALPHA_TIMER--;
|
||||
if (R_KALEIDO_PROMPT_CURSOR_ALPHA_TIMER == 0) {
|
||||
R_KALEIDO_PROMPT_CURSOR_ALPHA = sKaleidoPromptCursorAlphaVals[R_KALEIDO_PROMPT_CURSOR_ALPHA_STATE];
|
||||
R_KALEIDO_PROMPT_CURSOR_ALPHA_TIMER =
|
||||
R_KALEIDO_PROMPT_CURSOR_ALPHA_TIMER_BASE + R_KALEIDO_PROMPT_CURSOR_ALPHA_STATE;
|
||||
R_KALEIDO_PROMPT_CURSOR_ALPHA_STATE ^= 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -16,13 +16,13 @@
|
||||
#include "terminal.h"
|
||||
|
||||
#if !PLATFORM_GC
|
||||
#define KALEIDO_COLOR_PROMPT_UNK_R 100
|
||||
#define KALEIDO_COLOR_PROMPT_UNK_G 100
|
||||
#define KALEIDO_COLOR_PROMPT_UNK_B 255
|
||||
#define KALEIDO_PROMPT_CURSOR_R 100
|
||||
#define KALEIDO_PROMPT_CURSOR_G 100
|
||||
#define KALEIDO_PROMPT_CURSOR_B 255
|
||||
#else
|
||||
#define KALEIDO_COLOR_PROMPT_UNK_R 100
|
||||
#define KALEIDO_COLOR_PROMPT_UNK_G 255
|
||||
#define KALEIDO_COLOR_PROMPT_UNK_B 100
|
||||
#define KALEIDO_PROMPT_CURSOR_R 100
|
||||
#define KALEIDO_PROMPT_CURSOR_G 255
|
||||
#define KALEIDO_PROMPT_CURSOR_B 100
|
||||
#endif
|
||||
|
||||
#if !PLATFORM_GC
|
||||
@ -44,12 +44,12 @@ typedef enum {
|
||||
/* 5 */ VTX_PAGE_PROMPT
|
||||
} VtxPageInit;
|
||||
|
||||
#define VTX_PAGE_ITEM_QUADS 0 // VTX_PAGE_ITEM
|
||||
#define VTX_PAGE_EQUIP_QUADS 0 // VTX_PAGE_EQUIP
|
||||
#define VTX_PAGE_MAP_DUNGEON_QUADS 17 // VTX_PAGE_MAP_DUNGEON
|
||||
#define VTX_PAGE_QUEST_QUADS 0 // VTX_PAGE_QUEST
|
||||
#define VTX_PAGE_MAP_WORLD_QUADS 32 // VTX_PAGE_MAP_WORLD
|
||||
#define VTX_PAGE_PROMPT_QUADS 5 // VTX_PAGE_PROMPT
|
||||
#define VTX_PAGE_ITEM_QUADS 0 // VTX_PAGE_ITEM
|
||||
#define VTX_PAGE_EQUIP_QUADS 0 // VTX_PAGE_EQUIP
|
||||
#define VTX_PAGE_MAP_DUNGEON_QUADS 17 // VTX_PAGE_MAP_DUNGEON
|
||||
#define VTX_PAGE_QUEST_QUADS 0 // VTX_PAGE_QUEST
|
||||
#define VTX_PAGE_MAP_WORLD_QUADS 32 // VTX_PAGE_MAP_WORLD
|
||||
#define VTX_PAGE_PROMPT_QUADS PROMPT_QUAD_MAX // VTX_PAGE_PROMPT
|
||||
|
||||
#if OOT_NTSC
|
||||
|
||||
@ -551,22 +551,22 @@ static void* sSavePromptBgQuadsTexs[] = {
|
||||
#endif
|
||||
|
||||
s16 gVtxPageMapWorldQuadsWidth[VTX_PAGE_MAP_WORLD_QUADS] = {
|
||||
32, // QUAD_MAP_WORLD_CLOUDS_SACRED_FOREST_MEADOW
|
||||
112, // QUAD_MAP_WORLD_CLOUDS_HYRULE_FIELD
|
||||
32, // QUAD_MAP_WORLD_CLOUDS_LON_LON_RANCH
|
||||
48, // QUAD_MAP_WORLD_CLOUDS_MARKET
|
||||
32, // QUAD_MAP_WORLD_CLOUDS_HYRULE_CASTLE
|
||||
32, // QUAD_MAP_WORLD_CLOUDS_KAKARIKO_VILLAGE
|
||||
32, // QUAD_MAP_WORLD_CLOUDS_GRAVEYARD
|
||||
48, // QUAD_MAP_WORLD_CLOUDS_DEATH_MOUNTAIN_TRAIL
|
||||
32, // QUAD_MAP_WORLD_CLOUDS_GORON_CITY
|
||||
64, // QUAD_MAP_WORLD_CLOUDS_ZORAS_RIVER
|
||||
32, // QUAD_MAP_WORLD_CLOUDS_ZORAS_DOMAIN
|
||||
48, // QUAD_MAP_WORLD_CLOUDS_ZORAS_FOUNTAIN
|
||||
48, // QUAD_MAP_WORLD_CLOUDS_GERUDO_VALLEY
|
||||
48, // QUAD_MAP_WORLD_CLOUDS_GERUDOS_FORTRESS
|
||||
48, // QUAD_MAP_WORLD_CLOUDS_DESERT_COLOSSUS
|
||||
64, // QUAD_MAP_WORLD_CLOUDS_LAKE_HYLIA
|
||||
32, // WORLD_MAP_QUAD_CLOUDS_SACRED_FOREST_MEADOW
|
||||
112, // WORLD_MAP_QUAD_CLOUDS_HYRULE_FIELD
|
||||
32, // WORLD_MAP_QUAD_CLOUDS_LON_LON_RANCH
|
||||
48, // WORLD_MAP_QUAD_CLOUDS_MARKET
|
||||
32, // WORLD_MAP_QUAD_CLOUDS_HYRULE_CASTLE
|
||||
32, // WORLD_MAP_QUAD_CLOUDS_KAKARIKO_VILLAGE
|
||||
32, // WORLD_MAP_QUAD_CLOUDS_GRAVEYARD
|
||||
48, // WORLD_MAP_QUAD_CLOUDS_DEATH_MOUNTAIN_TRAIL
|
||||
32, // WORLD_MAP_QUAD_CLOUDS_GORON_CITY
|
||||
64, // WORLD_MAP_QUAD_CLOUDS_ZORAS_RIVER
|
||||
32, // WORLD_MAP_QUAD_CLOUDS_ZORAS_DOMAIN
|
||||
48, // WORLD_MAP_QUAD_CLOUDS_ZORAS_FOUNTAIN
|
||||
48, // WORLD_MAP_QUAD_CLOUDS_GERUDO_VALLEY
|
||||
48, // WORLD_MAP_QUAD_CLOUDS_GERUDOS_FORTRESS
|
||||
48, // WORLD_MAP_QUAD_CLOUDS_DESERT_COLOSSUS
|
||||
64, // WORLD_MAP_QUAD_CLOUDS_LAKE_HYLIA
|
||||
8, // WORLD_MAP_POINT_HAUNTED_WASTELAND
|
||||
8, // WORLD_MAP_POINT_GERUDOS_FORTRESS
|
||||
8, // WORLD_MAP_POINT_GERUDO_VALLEY
|
||||
@ -579,29 +579,29 @@ s16 gVtxPageMapWorldQuadsWidth[VTX_PAGE_MAP_WORLD_QUADS] = {
|
||||
8, // WORLD_MAP_POINT_LOST_WOODS
|
||||
8, // WORLD_MAP_POINT_KOKIRI_FOREST
|
||||
8, // WORLD_MAP_POINT_ZORAS_DOMAIN
|
||||
8, // QUAD_MAP_28
|
||||
8, // QUAD_MAP_TRADE_QUEST_MARKER
|
||||
80, // QUAD_MAP_30
|
||||
64, // QUAD_MAP_31
|
||||
8, // WORLD_MAP_QUAD_28
|
||||
8, // WORLD_MAP_QUAD_TRADE_QUEST_MARKER
|
||||
80, // WORLD_MAP_QUAD_30
|
||||
64, // WORLD_MAP_QUAD_31
|
||||
};
|
||||
|
||||
s16 gVtxPageMapWorldQuadsHeight[VTX_PAGE_MAP_WORLD_QUADS] = {
|
||||
24, // QUAD_MAP_WORLD_CLOUDS_SACRED_FOREST_MEADOW
|
||||
72, // QUAD_MAP_WORLD_CLOUDS_HYRULE_FIELD
|
||||
13, // QUAD_MAP_WORLD_CLOUDS_LON_LON_RANCH
|
||||
22, // QUAD_MAP_WORLD_CLOUDS_MARKET
|
||||
19, // QUAD_MAP_WORLD_CLOUDS_HYRULE_CASTLE
|
||||
20, // QUAD_MAP_WORLD_CLOUDS_KAKARIKO_VILLAGE
|
||||
19, // QUAD_MAP_WORLD_CLOUDS_GRAVEYARD
|
||||
27, // QUAD_MAP_WORLD_CLOUDS_DEATH_MOUNTAIN_TRAIL
|
||||
14, // QUAD_MAP_WORLD_CLOUDS_GORON_CITY
|
||||
26, // QUAD_MAP_WORLD_CLOUDS_ZORAS_RIVER
|
||||
22, // QUAD_MAP_WORLD_CLOUDS_ZORAS_DOMAIN
|
||||
21, // QUAD_MAP_WORLD_CLOUDS_ZORAS_FOUNTAIN
|
||||
49, // QUAD_MAP_WORLD_CLOUDS_GERUDO_VALLEY
|
||||
32, // QUAD_MAP_WORLD_CLOUDS_GERUDOS_FORTRESS
|
||||
45, // QUAD_MAP_WORLD_CLOUDS_DESERT_COLOSSUS
|
||||
60, // QUAD_MAP_WORLD_CLOUDS_LAKE_HYLIA
|
||||
24, // WORLD_MAP_QUAD_CLOUDS_SACRED_FOREST_MEADOW
|
||||
72, // WORLD_MAP_QUAD_CLOUDS_HYRULE_FIELD
|
||||
13, // WORLD_MAP_QUAD_CLOUDS_LON_LON_RANCH
|
||||
22, // WORLD_MAP_QUAD_CLOUDS_MARKET
|
||||
19, // WORLD_MAP_QUAD_CLOUDS_HYRULE_CASTLE
|
||||
20, // WORLD_MAP_QUAD_CLOUDS_KAKARIKO_VILLAGE
|
||||
19, // WORLD_MAP_QUAD_CLOUDS_GRAVEYARD
|
||||
27, // WORLD_MAP_QUAD_CLOUDS_DEATH_MOUNTAIN_TRAIL
|
||||
14, // WORLD_MAP_QUAD_CLOUDS_GORON_CITY
|
||||
26, // WORLD_MAP_QUAD_CLOUDS_ZORAS_RIVER
|
||||
22, // WORLD_MAP_QUAD_CLOUDS_ZORAS_DOMAIN
|
||||
21, // WORLD_MAP_QUAD_CLOUDS_ZORAS_FOUNTAIN
|
||||
49, // WORLD_MAP_QUAD_CLOUDS_GERUDO_VALLEY
|
||||
32, // WORLD_MAP_QUAD_CLOUDS_GERUDOS_FORTRESS
|
||||
45, // WORLD_MAP_QUAD_CLOUDS_DESERT_COLOSSUS
|
||||
60, // WORLD_MAP_QUAD_CLOUDS_LAKE_HYLIA
|
||||
8, // WORLD_MAP_POINT_HAUNTED_WASTELAND
|
||||
8, // WORLD_MAP_POINT_GERUDOS_FORTRESS
|
||||
8, // WORLD_MAP_POINT_GERUDO_VALLEY
|
||||
@ -614,10 +614,10 @@ s16 gVtxPageMapWorldQuadsHeight[VTX_PAGE_MAP_WORLD_QUADS] = {
|
||||
8, // WORLD_MAP_POINT_LOST_WOODS
|
||||
8, // WORLD_MAP_POINT_KOKIRI_FOREST
|
||||
8, // WORLD_MAP_POINT_ZORAS_DOMAIN
|
||||
8, // QUAD_MAP_28
|
||||
16, // QUAD_MAP_TRADE_QUEST_MARKER
|
||||
32, // QUAD_MAP_30
|
||||
8, // QUAD_MAP_31
|
||||
8, // WORLD_MAP_QUAD_28
|
||||
16, // WORLD_MAP_QUAD_TRADE_QUEST_MARKER
|
||||
32, // WORLD_MAP_QUAD_30
|
||||
8, // WORLD_MAP_QUAD_31
|
||||
};
|
||||
|
||||
/**
|
||||
@ -867,10 +867,10 @@ u8 gAreaGsFlags[] = {
|
||||
};
|
||||
|
||||
static void* sCursorTexs[] = {
|
||||
gPauseMenuCursorTopLeftTex, // PAUSE_QUAD_CURSOR_TL
|
||||
gPauseMenuCursorTopRightTex, // PAUSE_QUAD_CURSOR_TR
|
||||
gPauseMenuCursorBottomLeftTex, // PAUSE_QUAD_CURSOR_BL
|
||||
gPauseMenuCursorBottomRightTex, // PAUSE_QUAD_CURSOR_BR
|
||||
gPauseMenuCursorTopLeftTex, // PAUSE_CURSOR_QUAD_TL
|
||||
gPauseMenuCursorTopRightTex, // PAUSE_CURSOR_QUAD_TR
|
||||
gPauseMenuCursorBottomLeftTex, // PAUSE_CURSOR_QUAD_BL
|
||||
gPauseMenuCursorBottomRightTex, // PAUSE_CURSOR_QUAD_BR
|
||||
};
|
||||
|
||||
static s16 sCursorColors[][3] = {
|
||||
@ -879,7 +879,7 @@ static s16 sCursorColors[][3] = {
|
||||
{ KALEIDO_COLOR_CURSOR_UNK_R, KALEIDO_COLOR_CURSOR_UNK_G, KALEIDO_COLOR_CURSOR_UNK_B },
|
||||
};
|
||||
|
||||
static void* sSavePromptTexs[] =
|
||||
static void* sSavePromptMessageTexs[] =
|
||||
LANGUAGE_ARRAY(gPauseSavePromptJPNTex, gPauseSavePromptENGTex, gPauseSavePromptGERTex, gPauseSavePromptFRATex);
|
||||
|
||||
static void* sSaveConfirmationTexs[] = LANGUAGE_ARRAY(gPauseSaveConfirmationJPNTex, gPauseSaveConfirmationENGTex,
|
||||
@ -1124,7 +1124,7 @@ 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
|
||||
// Draw PAUSE_CURSOR_QUAD_TL, PAUSE_CURSOR_QUAD_TR, PAUSE_CURSOR_QUAD_BL, PAUSE_CURSOR_QUAD_BR
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetCombineLERP(POLY_OPA_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0,
|
||||
@ -1511,27 +1511,31 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, gfxCtx, "../z_kaleido_scope_PAL.c", 1424);
|
||||
|
||||
if (IS_PAUSE_STATE_GAMEOVER(pauseCtx)) {
|
||||
POLY_OPA_DISP = KaleidoScope_DrawPageSections(POLY_OPA_DISP, pauseCtx->saveVtx, sGameOverTexs);
|
||||
POLY_OPA_DISP = KaleidoScope_DrawPageSections(POLY_OPA_DISP, pauseCtx->promptPageVtx, sGameOverTexs);
|
||||
} else { // PAUSE_STATE_SAVE_PROMPT
|
||||
POLY_OPA_DISP =
|
||||
KaleidoScope_DrawPageSections(POLY_OPA_DISP, pauseCtx->saveVtx, SAVE_TEXS(gSaveContext.language));
|
||||
KaleidoScope_DrawPageSections(POLY_OPA_DISP, pauseCtx->promptPageVtx, SAVE_TEXS(gSaveContext.language));
|
||||
}
|
||||
|
||||
gSPVertex(POLY_OPA_DISP++, &pauseCtx->saveVtx[60], 32, 0);
|
||||
//! @bug Loads 32 vertices, but there are only 20 to load
|
||||
gSPVertex(POLY_OPA_DISP++, &pauseCtx->promptPageVtx[PAGE_BG_QUADS * 4], 32, 0);
|
||||
|
||||
if (((pauseCtx->state == PAUSE_STATE_SAVE_PROMPT) && (pauseCtx->unk_1EC < 4)) ||
|
||||
if (((pauseCtx->state == PAUSE_STATE_SAVE_PROMPT) &&
|
||||
(pauseCtx->savePromptState < PAUSE_SAVE_PROMPT_STATE_SAVED)) ||
|
||||
(pauseCtx->state == PAUSE_STATE_14)) {
|
||||
POLY_OPA_DISP =
|
||||
KaleidoScope_QuadTextureIA8(POLY_OPA_DISP, sSavePromptTexs[gSaveContext.language], 152, 16, 0);
|
||||
POLY_OPA_DISP = KaleidoScope_QuadTextureIA8(POLY_OPA_DISP, sSavePromptMessageTexs[gSaveContext.language],
|
||||
152, 16, PROMPT_QUAD_MESSAGE * 4);
|
||||
|
||||
gDPSetCombineLERP(POLY_OPA_DISP++, 1, 0, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, 1, 0, PRIMITIVE, 0, TEXEL0,
|
||||
0, PRIMITIVE, 0);
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, KALEIDO_COLOR_PROMPT_UNK_R, KALEIDO_COLOR_PROMPT_UNK_G,
|
||||
KALEIDO_COLOR_PROMPT_UNK_B, VREG(61));
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, KALEIDO_PROMPT_CURSOR_R, KALEIDO_PROMPT_CURSOR_G,
|
||||
KALEIDO_PROMPT_CURSOR_B, R_KALEIDO_PROMPT_CURSOR_ALPHA);
|
||||
|
||||
if (pauseCtx->promptChoice == 0) {
|
||||
// PROMPT_QUAD_CURSOR_LEFT
|
||||
gSPDisplayList(POLY_OPA_DISP++, gPromptCursorLeftDL);
|
||||
} else {
|
||||
// PROMPT_QUAD_CURSOR_RIGHT
|
||||
gSPDisplayList(POLY_OPA_DISP++, gPromptCursorRightDL);
|
||||
}
|
||||
|
||||
@ -1539,29 +1543,32 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha);
|
||||
|
||||
POLY_OPA_DISP =
|
||||
KaleidoScope_QuadTextureIA8(POLY_OPA_DISP, sPromptChoiceTexs[gSaveContext.language][0], 48, 16, 12);
|
||||
POLY_OPA_DISP = KaleidoScope_QuadTextureIA8(POLY_OPA_DISP, sPromptChoiceTexs[gSaveContext.language][0], 48,
|
||||
16, PROMPT_QUAD_CHOICE_YES * 4);
|
||||
|
||||
POLY_OPA_DISP =
|
||||
KaleidoScope_QuadTextureIA8(POLY_OPA_DISP, sPromptChoiceTexs[gSaveContext.language][1], 48, 16, 16);
|
||||
} else if (((pauseCtx->state == PAUSE_STATE_SAVE_PROMPT) && (pauseCtx->unk_1EC >= 4)) ||
|
||||
POLY_OPA_DISP = KaleidoScope_QuadTextureIA8(POLY_OPA_DISP, sPromptChoiceTexs[gSaveContext.language][1], 48,
|
||||
16, PROMPT_QUAD_CHOICE_NO * 4);
|
||||
} else if (((pauseCtx->state == PAUSE_STATE_SAVE_PROMPT) &&
|
||||
(pauseCtx->savePromptState >= PAUSE_SAVE_PROMPT_STATE_SAVED)) ||
|
||||
pauseCtx->state == PAUSE_STATE_15) {
|
||||
#if PLATFORM_N64
|
||||
POLY_OPA_DISP =
|
||||
KaleidoScope_QuadTextureIA8(POLY_OPA_DISP, sSaveConfirmationTexs[gSaveContext.language], 152, 16, 0);
|
||||
POLY_OPA_DISP = KaleidoScope_QuadTextureIA8(POLY_OPA_DISP, sSaveConfirmationTexs[gSaveContext.language],
|
||||
152, 16, PROMPT_QUAD_MESSAGE * 4);
|
||||
#endif
|
||||
} else if (((pauseCtx->state == PAUSE_STATE_16) || (pauseCtx->state == PAUSE_STATE_17))) {
|
||||
POLY_OPA_DISP =
|
||||
KaleidoScope_QuadTextureIA8(POLY_OPA_DISP, sContinuePromptTexs[gSaveContext.language], 152, 16, 0);
|
||||
POLY_OPA_DISP = KaleidoScope_QuadTextureIA8(POLY_OPA_DISP, sContinuePromptTexs[gSaveContext.language], 152,
|
||||
16, PROMPT_QUAD_MESSAGE * 4);
|
||||
|
||||
gDPSetCombineLERP(POLY_OPA_DISP++, 1, 0, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, 1, 0, PRIMITIVE, 0, TEXEL0,
|
||||
0, PRIMITIVE, 0);
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, KALEIDO_COLOR_PROMPT_UNK_R, KALEIDO_COLOR_PROMPT_UNK_G,
|
||||
KALEIDO_COLOR_PROMPT_UNK_B, VREG(61));
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, KALEIDO_PROMPT_CURSOR_R, KALEIDO_PROMPT_CURSOR_G,
|
||||
KALEIDO_PROMPT_CURSOR_B, R_KALEIDO_PROMPT_CURSOR_ALPHA);
|
||||
|
||||
if (pauseCtx->promptChoice == 0) {
|
||||
// PROMPT_QUAD_CURSOR_LEFT
|
||||
gSPDisplayList(POLY_OPA_DISP++, gPromptCursorLeftDL);
|
||||
} else {
|
||||
// PROMPT_QUAD_CURSOR_RIGHT
|
||||
gSPDisplayList(POLY_OPA_DISP++, gPromptCursorRightDL);
|
||||
}
|
||||
|
||||
@ -1569,11 +1576,11 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha);
|
||||
|
||||
POLY_OPA_DISP =
|
||||
KaleidoScope_QuadTextureIA8(POLY_OPA_DISP, sPromptChoiceTexs[gSaveContext.language][0], 48, 16, 12);
|
||||
POLY_OPA_DISP = KaleidoScope_QuadTextureIA8(POLY_OPA_DISP, sPromptChoiceTexs[gSaveContext.language][0], 48,
|
||||
16, PROMPT_QUAD_CHOICE_YES * 4);
|
||||
|
||||
POLY_OPA_DISP =
|
||||
KaleidoScope_QuadTextureIA8(POLY_OPA_DISP, sPromptChoiceTexs[gSaveContext.language][1], 48, 16, 16);
|
||||
POLY_OPA_DISP = KaleidoScope_QuadTextureIA8(POLY_OPA_DISP, sPromptChoiceTexs[gSaveContext.language][1], 48,
|
||||
16, PROMPT_QUAD_CHOICE_NO * 4);
|
||||
}
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
@ -2188,22 +2195,22 @@ static s16 sVtxPageMapDungeonQuadsX[VTX_PAGE_MAP_DUNGEON_QUADS] = {
|
||||
};
|
||||
static s16 sVtxPageQuestQuadsX[CLAMP_MIN(VTX_PAGE_QUEST_QUADS, 1)] = { 0 };
|
||||
static s16 sVtxPageMapWorldQuadsX[VTX_PAGE_MAP_WORLD_QUADS] = {
|
||||
47, // QUAD_MAP_WORLD_CLOUDS_SACRED_FOREST_MEADOW
|
||||
-49, // QUAD_MAP_WORLD_CLOUDS_HYRULE_FIELD
|
||||
-17, // QUAD_MAP_WORLD_CLOUDS_LON_LON_RANCH
|
||||
-15, // QUAD_MAP_WORLD_CLOUDS_MARKET
|
||||
-9, // QUAD_MAP_WORLD_CLOUDS_HYRULE_CASTLE
|
||||
24, // QUAD_MAP_WORLD_CLOUDS_KAKARIKO_VILLAGE
|
||||
43, // QUAD_MAP_WORLD_CLOUDS_GRAVEYARD
|
||||
14, // QUAD_MAP_WORLD_CLOUDS_DEATH_MOUNTAIN_TRAIL
|
||||
9, // QUAD_MAP_WORLD_CLOUDS_GORON_CITY
|
||||
38, // QUAD_MAP_WORLD_CLOUDS_ZORAS_RIVER
|
||||
82, // QUAD_MAP_WORLD_CLOUDS_ZORAS_DOMAIN
|
||||
71, // QUAD_MAP_WORLD_CLOUDS_ZORAS_FOUNTAIN
|
||||
-76, // QUAD_MAP_WORLD_CLOUDS_GERUDO_VALLEY
|
||||
-87, // QUAD_MAP_WORLD_CLOUDS_GERUDOS_FORTRESS
|
||||
-108, // QUAD_MAP_WORLD_CLOUDS_DESERT_COLOSSUS
|
||||
-54, // QUAD_MAP_WORLD_CLOUDS_LAKE_HYLIA
|
||||
47, // WORLD_MAP_QUAD_CLOUDS_SACRED_FOREST_MEADOW
|
||||
-49, // WORLD_MAP_QUAD_CLOUDS_HYRULE_FIELD
|
||||
-17, // WORLD_MAP_QUAD_CLOUDS_LON_LON_RANCH
|
||||
-15, // WORLD_MAP_QUAD_CLOUDS_MARKET
|
||||
-9, // WORLD_MAP_QUAD_CLOUDS_HYRULE_CASTLE
|
||||
24, // WORLD_MAP_QUAD_CLOUDS_KAKARIKO_VILLAGE
|
||||
43, // WORLD_MAP_QUAD_CLOUDS_GRAVEYARD
|
||||
14, // WORLD_MAP_QUAD_CLOUDS_DEATH_MOUNTAIN_TRAIL
|
||||
9, // WORLD_MAP_QUAD_CLOUDS_GORON_CITY
|
||||
38, // WORLD_MAP_QUAD_CLOUDS_ZORAS_RIVER
|
||||
82, // WORLD_MAP_QUAD_CLOUDS_ZORAS_DOMAIN
|
||||
71, // WORLD_MAP_QUAD_CLOUDS_ZORAS_FOUNTAIN
|
||||
-76, // WORLD_MAP_QUAD_CLOUDS_GERUDO_VALLEY
|
||||
-87, // WORLD_MAP_QUAD_CLOUDS_GERUDOS_FORTRESS
|
||||
-108, // WORLD_MAP_QUAD_CLOUDS_DESERT_COLOSSUS
|
||||
-54, // WORLD_MAP_QUAD_CLOUDS_LAKE_HYLIA
|
||||
-93, // WORLD_MAP_POINT_HAUNTED_WASTELAND
|
||||
-67, // WORLD_MAP_POINT_GERUDOS_FORTRESS
|
||||
-56, // WORLD_MAP_POINT_GERUDO_VALLEY
|
||||
@ -2216,13 +2223,17 @@ static s16 sVtxPageMapWorldQuadsX[VTX_PAGE_MAP_WORLD_QUADS] = {
|
||||
58, // WORLD_MAP_POINT_LOST_WOODS
|
||||
74, // WORLD_MAP_POINT_KOKIRI_FOREST
|
||||
89, // WORLD_MAP_POINT_ZORAS_DOMAIN
|
||||
0, // QUAD_MAP_28
|
||||
-58, // QUAD_MAP_TRADE_QUEST_MARKER
|
||||
19, // QUAD_MAP_30
|
||||
28, // QUAD_MAP_31
|
||||
0, // WORLD_MAP_QUAD_28
|
||||
-58, // WORLD_MAP_QUAD_TRADE_QUEST_MARKER
|
||||
19, // WORLD_MAP_QUAD_30
|
||||
28, // WORLD_MAP_QUAD_31
|
||||
};
|
||||
static s16 sVtxPagePromptQuadsX[VTX_PAGE_PROMPT_QUADS] = {
|
||||
0xFFB4, 0xFFC6, 0x000A, 0xFFC6, 0x000A,
|
||||
-76, // PROMPT_QUAD_MESSAGE
|
||||
-58, // PROMPT_QUAD_CURSOR_LEFT
|
||||
10, // PROMPT_QUAD_CURSOR_RIGHT
|
||||
-58, // PROMPT_QUAD_CHOICE_YES
|
||||
10, // PROMPT_QUAD_CHOICE_NO
|
||||
};
|
||||
static s16 sVtxPageItemQuadsWidth[CLAMP_MIN(VTX_PAGE_ITEM_QUADS, 1)] = { 0 };
|
||||
static s16 sVtxPageEquipQuadsWidth[CLAMP_MIN(VTX_PAGE_EQUIP_QUADS, 1)] = { 0 };
|
||||
@ -2232,7 +2243,11 @@ static s16 sVtxPageMapDungeonQuadsWidth[VTX_PAGE_MAP_DUNGEON_QUADS] = {
|
||||
};
|
||||
static s16 sVtxPageQuestQuadsWidth[CLAMP_MIN(VTX_PAGE_QUEST_QUADS, 1)] = { 0 };
|
||||
static s16 sVtxPagePromptQuadsWidth[VTX_PAGE_PROMPT_QUADS] = {
|
||||
0x0098, 0x0030, 0x0030, 0x0030, 0x0030,
|
||||
152, // PROMPT_QUAD_MESSAGE
|
||||
48, // PROMPT_QUAD_CURSOR_LEFT
|
||||
48, // PROMPT_QUAD_CURSOR_RIGHT
|
||||
48, // PROMPT_QUAD_CHOICE_YES
|
||||
48, // PROMPT_QUAD_CHOICE_NO
|
||||
};
|
||||
static s16 sVtxPageItemQuadsY[CLAMP_MIN(VTX_PAGE_ITEM_QUADS, 1)] = { 0 };
|
||||
static s16 sVtxPageEquipQuadsY[CLAMP_MIN(VTX_PAGE_EQUIP_QUADS, 1)] = { 0 };
|
||||
@ -2242,22 +2257,22 @@ static s16 sVtxPageMapDungeonQuadsY[VTX_PAGE_MAP_DUNGEON_QUADS] = {
|
||||
};
|
||||
static s16 sVtxPageQuestQuadsY[CLAMP_MIN(VTX_PAGE_QUEST_QUADS, 1)] = { 0 };
|
||||
static s16 sVtxPageMapWorldQuadsY[VTX_PAGE_MAP_WORLD_QUADS] = {
|
||||
15, // QUAD_MAP_WORLD_CLOUDS_SACRED_FOREST_MEADOW
|
||||
40, // QUAD_MAP_WORLD_CLOUDS_HYRULE_FIELD
|
||||
11, // QUAD_MAP_WORLD_CLOUDS_LON_LON_RANCH
|
||||
45, // QUAD_MAP_WORLD_CLOUDS_MARKET
|
||||
52, // QUAD_MAP_WORLD_CLOUDS_HYRULE_CASTLE
|
||||
37, // QUAD_MAP_WORLD_CLOUDS_KAKARIKO_VILLAGE
|
||||
36, // QUAD_MAP_WORLD_CLOUDS_GRAVEYARD
|
||||
57, // QUAD_MAP_WORLD_CLOUDS_DEATH_MOUNTAIN_TRAIL
|
||||
54, // QUAD_MAP_WORLD_CLOUDS_GORON_CITY
|
||||
33, // QUAD_MAP_WORLD_CLOUDS_ZORAS_RIVER
|
||||
31, // QUAD_MAP_WORLD_CLOUDS_ZORAS_DOMAIN
|
||||
45, // QUAD_MAP_WORLD_CLOUDS_ZORAS_FOUNTAIN
|
||||
32, // QUAD_MAP_WORLD_CLOUDS_GERUDO_VALLEY
|
||||
42, // QUAD_MAP_WORLD_CLOUDS_GERUDOS_FORTRESS
|
||||
49, // QUAD_MAP_WORLD_CLOUDS_DESERT_COLOSSUS
|
||||
-10, // QUAD_MAP_WORLD_CLOUDS_LAKE_HYLIA
|
||||
15, // WORLD_MAP_QUAD_CLOUDS_SACRED_FOREST_MEADOW
|
||||
40, // WORLD_MAP_QUAD_CLOUDS_HYRULE_FIELD
|
||||
11, // WORLD_MAP_QUAD_CLOUDS_LON_LON_RANCH
|
||||
45, // WORLD_MAP_QUAD_CLOUDS_MARKET
|
||||
52, // WORLD_MAP_QUAD_CLOUDS_HYRULE_CASTLE
|
||||
37, // WORLD_MAP_QUAD_CLOUDS_KAKARIKO_VILLAGE
|
||||
36, // WORLD_MAP_QUAD_CLOUDS_GRAVEYARD
|
||||
57, // WORLD_MAP_QUAD_CLOUDS_DEATH_MOUNTAIN_TRAIL
|
||||
54, // WORLD_MAP_QUAD_CLOUDS_GORON_CITY
|
||||
33, // WORLD_MAP_QUAD_CLOUDS_ZORAS_RIVER
|
||||
31, // WORLD_MAP_QUAD_CLOUDS_ZORAS_DOMAIN
|
||||
45, // WORLD_MAP_QUAD_CLOUDS_ZORAS_FOUNTAIN
|
||||
32, // WORLD_MAP_QUAD_CLOUDS_GERUDO_VALLEY
|
||||
42, // WORLD_MAP_QUAD_CLOUDS_GERUDOS_FORTRESS
|
||||
49, // WORLD_MAP_QUAD_CLOUDS_DESERT_COLOSSUS
|
||||
-10, // WORLD_MAP_QUAD_CLOUDS_LAKE_HYLIA
|
||||
31, // WORLD_MAP_POINT_HAUNTED_WASTELAND
|
||||
27, // WORLD_MAP_POINT_GERUDOS_FORTRESS
|
||||
15, // WORLD_MAP_POINT_GERUDO_VALLEY
|
||||
@ -2270,13 +2285,17 @@ static s16 sVtxPageMapWorldQuadsY[VTX_PAGE_MAP_WORLD_QUADS] = {
|
||||
1, // WORLD_MAP_POINT_LOST_WOODS
|
||||
-9, // WORLD_MAP_POINT_KOKIRI_FOREST
|
||||
25, // WORLD_MAP_POINT_ZORAS_DOMAIN
|
||||
0, // QUAD_MAP_28
|
||||
1, // QUAD_MAP_TRADE_QUEST_MARKER
|
||||
-32, // QUAD_MAP_30
|
||||
-26, // QUAD_MAP_31
|
||||
0, // WORLD_MAP_QUAD_28
|
||||
1, // WORLD_MAP_QUAD_TRADE_QUEST_MARKER
|
||||
-32, // WORLD_MAP_QUAD_30
|
||||
-26, // WORLD_MAP_QUAD_31
|
||||
};
|
||||
static s16 sVtxPagePromptQuadsY[VTX_PAGE_PROMPT_QUADS] = {
|
||||
0x0024, 0x000A, 0x000A, 0xFFFA, 0xFFFA,
|
||||
36, // PROMPT_QUAD_MESSAGE
|
||||
10, // PROMPT_QUAD_CURSOR_LEFT
|
||||
10, // PROMPT_QUAD_CURSOR_RIGHT
|
||||
-6, // PROMPT_QUAD_CHOICE_YES
|
||||
-6, // PROMPT_QUAD_CHOICE_NO
|
||||
};
|
||||
static s16 sVtxPageItemQuadsHeight[CLAMP_MIN(VTX_PAGE_ITEM_QUADS, 1)] = { 0 };
|
||||
static s16 sVtxPageEquipQuadsHeight[CLAMP_MIN(VTX_PAGE_EQUIP_QUADS, 1)] = { 0 };
|
||||
@ -2286,7 +2305,11 @@ static s16 sVtxPageMapDungeonQuadsHeight[VTX_PAGE_MAP_DUNGEON_QUADS] = {
|
||||
};
|
||||
static s16 sVtxPageQuestQuadsHeight[CLAMP_MIN(VTX_PAGE_QUEST_QUADS, 1)] = { 0 };
|
||||
static s16 sVtxPagePromptQuadsHeight[VTX_PAGE_PROMPT_QUADS] = {
|
||||
0x0010, 0x0030, 0x0030, 0x0010, 0x0010,
|
||||
16, // PROMPT_QUAD_MESSAGE
|
||||
48, // PROMPT_QUAD_CURSOR_LEFT
|
||||
48, // PROMPT_QUAD_CURSOR_RIGHT
|
||||
16, // PROMPT_QUAD_CHOICE_YES
|
||||
16, // PROMPT_QUAD_CHOICE_NO
|
||||
};
|
||||
|
||||
static s16* sVtxPageQuadsX[] = {
|
||||
@ -2566,8 +2589,8 @@ s16 KaleidoScope_SetPageVertices(PlayState* play, Vtx* vtx, s16 vtxPage, s16 num
|
||||
sTradeQuestMarkerBobTimer--;
|
||||
}
|
||||
|
||||
j = bufIAfterPageSections + ((QUAD_MAP_WORLD_POINT_FIRST + pauseCtx->tradeQuestMarker) * 4);
|
||||
i = bufIAfterPageSections + (QUAD_MAP_TRADE_QUEST_MARKER * 4);
|
||||
j = bufIAfterPageSections + ((WORLD_MAP_QUAD_POINT_FIRST + pauseCtx->tradeQuestMarker) * 4);
|
||||
i = bufIAfterPageSections + (WORLD_MAP_QUAD_TRADE_QUEST_MARKER * 4);
|
||||
|
||||
vtx[i + 0].v.ob[0] = vtx[i + 2].v.ob[0] = vtx[j + 0].v.ob[0];
|
||||
|
||||
@ -2632,7 +2655,9 @@ void KaleidoScope_SetVertices(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
pauseCtx->offsetY = 0;
|
||||
|
||||
if ((pauseCtx->state == PAUSE_STATE_OPENING_1) || (pauseCtx->state >= PAUSE_STATE_CLOSING) ||
|
||||
((pauseCtx->state == PAUSE_STATE_SAVE_PROMPT) && ((pauseCtx->unk_1EC == 2) || (pauseCtx->unk_1EC == 5))) ||
|
||||
((pauseCtx->state == PAUSE_STATE_SAVE_PROMPT) &&
|
||||
((pauseCtx->savePromptState == PAUSE_SAVE_PROMPT_STATE_CLOSING) ||
|
||||
(pauseCtx->savePromptState == PAUSE_SAVE_PROMPT_STATE_CLOSING_AFTER_SAVED))) ||
|
||||
((pauseCtx->state >= PAUSE_STATE_8) && (pauseCtx->state <= PAUSE_STATE_13))) {
|
||||
pauseCtx->offsetY = 80;
|
||||
}
|
||||
@ -2698,9 +2723,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, PAUSE_QUAD_CURSOR_MAX * 4 * sizeof(Vtx));
|
||||
pauseCtx->cursorVtx = GRAPH_ALLOC(gfxCtx, PAUSE_CURSOR_QUAD_MAX * 4 * sizeof(Vtx));
|
||||
|
||||
for (i = 0; i < (PAUSE_QUAD_CURSOR_MAX * 4); i++) {
|
||||
for (i = 0; i < (PAUSE_CURSOR_QUAD_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;
|
||||
@ -2711,19 +2736,19 @@ void KaleidoScope_SetVertices(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
pauseCtx->cursorVtx[i].v.cn[3] = 255;
|
||||
}
|
||||
|
||||
// PAUSE_QUAD_CURSOR_TL
|
||||
// PAUSE_CURSOR_QUAD_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]
|
||||
// PAUSE_QUAD_CURSOR_TR
|
||||
// PAUSE_CURSOR_QUAD_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
|
||||
// PAUSE_CURSOR_QUAD_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
|
||||
// PAUSE_CURSOR_QUAD_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
|
||||
// PAUSE_CURSOR_QUAD_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] = 32 * (1 << 5);
|
||||
|
||||
@ -3041,8 +3066,8 @@ void KaleidoScope_SetVertices(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
|
||||
pauseCtx->infoPanelVtx = GRAPH_ALLOC(gfxCtx, 28 * sizeof(Vtx));
|
||||
|
||||
pauseCtx->saveVtx = GRAPH_ALLOC(gfxCtx, ((PAGE_BG_QUADS + VTX_PAGE_PROMPT_QUADS) * 4) * sizeof(Vtx));
|
||||
KaleidoScope_SetPageVertices(play, pauseCtx->saveVtx, VTX_PAGE_PROMPT, VTX_PAGE_PROMPT_QUADS);
|
||||
pauseCtx->promptPageVtx = GRAPH_ALLOC(gfxCtx, ((PAGE_BG_QUADS + VTX_PAGE_PROMPT_QUADS) * 4) * sizeof(Vtx));
|
||||
KaleidoScope_SetPageVertices(play, pauseCtx->promptPageVtx, VTX_PAGE_PROMPT, VTX_PAGE_PROMPT_QUADS);
|
||||
}
|
||||
|
||||
void KaleidoScope_DrawGameOver(PlayState* play) {
|
||||
@ -3256,27 +3281,27 @@ void KaleidoScope_UpdateCursorVtx(PlayState* play) {
|
||||
|
||||
// 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)
|
||||
// (see `KaleidoScope_SetCursorPos` and other `PAUSE_CURSOR_QUAD_TL` uses)
|
||||
|
||||
// PAUSE_QUAD_CURSOR_TL
|
||||
// PAUSE_CURSOR_QUAD_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] + tlOffsetY;
|
||||
pauseCtx->cursorVtx[2].v.ob[1] = pauseCtx->cursorVtx[3].v.ob[1] = pauseCtx->cursorVtx[0].v.ob[1] - 16;
|
||||
|
||||
// PAUSE_QUAD_CURSOR_TR
|
||||
// PAUSE_CURSOR_QUAD_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
|
||||
// PAUSE_CURSOR_QUAD_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] - bottomOffsetY;
|
||||
pauseCtx->cursorVtx[10].v.ob[1] = pauseCtx->cursorVtx[11].v.ob[1] = pauseCtx->cursorVtx[8].v.ob[1] - 16;
|
||||
|
||||
// PAUSE_QUAD_CURSOR_BR
|
||||
// PAUSE_CURSOR_QUAD_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] - bottomOffsetY;
|
||||
@ -3794,7 +3819,7 @@ void KaleidoScope_Update(PlayState* play) {
|
||||
gSaveContext.buttonStatus[4] = BTN_ENABLED;
|
||||
gSaveContext.hudVisibilityMode = HUD_VISIBILITY_NO_CHANGE;
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL);
|
||||
pauseCtx->unk_1EC = 0;
|
||||
pauseCtx->savePromptState = PAUSE_SAVE_PROMPT_STATE_APPEARING;
|
||||
pauseCtx->state = PAUSE_STATE_SAVE_PROMPT;
|
||||
}
|
||||
break;
|
||||
@ -3841,7 +3866,7 @@ void KaleidoScope_Update(PlayState* play) {
|
||||
gSaveContext.buttonStatus[4] = BTN_ENABLED;
|
||||
gSaveContext.hudVisibilityMode = HUD_VISIBILITY_NO_CHANGE;
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL);
|
||||
pauseCtx->unk_1EC = 0;
|
||||
pauseCtx->savePromptState = PAUSE_SAVE_PROMPT_STATE_APPEARING;
|
||||
pauseCtx->state = PAUSE_STATE_SAVE_PROMPT;
|
||||
} else if (pauseCtx->ocarinaStaff->state == pauseCtx->ocarinaSongIdx) {
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
@ -3891,7 +3916,7 @@ void KaleidoScope_Update(PlayState* play) {
|
||||
gSaveContext.buttonStatus[4] = BTN_ENABLED;
|
||||
gSaveContext.hudVisibilityMode = HUD_VISIBILITY_NO_CHANGE;
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL);
|
||||
pauseCtx->unk_1EC = 0;
|
||||
pauseCtx->savePromptState = PAUSE_SAVE_PROMPT_STATE_APPEARING;
|
||||
pauseCtx->state = PAUSE_STATE_SAVE_PROMPT;
|
||||
}
|
||||
break;
|
||||
@ -3906,18 +3931,18 @@ void KaleidoScope_Update(PlayState* play) {
|
||||
break;
|
||||
|
||||
case PAUSE_STATE_SAVE_PROMPT:
|
||||
switch (pauseCtx->unk_1EC) {
|
||||
case 0:
|
||||
switch (pauseCtx->savePromptState) {
|
||||
case PAUSE_SAVE_PROMPT_STATE_APPEARING:
|
||||
pauseCtx->unk_204 -= 314.0f / WREG(6);
|
||||
WREG(16) -= WREG(25) / WREG(6);
|
||||
WREG(17) -= WREG(26) / WREG(6);
|
||||
if (pauseCtx->unk_204 <= -628.0f) {
|
||||
pauseCtx->unk_204 = -628.0f;
|
||||
pauseCtx->unk_1EC = 1;
|
||||
pauseCtx->savePromptState = PAUSE_SAVE_PROMPT_STATE_WAIT_CHOICE;
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
case PAUSE_SAVE_PROMPT_STATE_WAIT_CHOICE:
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_A)) {
|
||||
if (pauseCtx->promptChoice != 0) {
|
||||
Interface_SetDoAction(play, DO_ACTION_NONE);
|
||||
@ -3925,7 +3950,7 @@ void KaleidoScope_Update(PlayState* play) {
|
||||
gSaveContext.buttonStatus[3] = BTN_ENABLED;
|
||||
gSaveContext.hudVisibilityMode = HUD_VISIBILITY_NO_CHANGE;
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL);
|
||||
pauseCtx->unk_1EC = 2;
|
||||
pauseCtx->savePromptState = PAUSE_SAVE_PROMPT_STATE_CLOSING;
|
||||
WREG(2) = -6240;
|
||||
YREG(8) = pauseCtx->unk_204;
|
||||
func_800F64E0(0);
|
||||
@ -3939,7 +3964,7 @@ void KaleidoScope_Update(PlayState* play) {
|
||||
Play_SaveSceneFlags(play);
|
||||
gSaveContext.save.info.playerData.savedSceneId = play->sceneId;
|
||||
Sram_WriteSave(&play->sramCtx);
|
||||
pauseCtx->unk_1EC = 4;
|
||||
pauseCtx->savePromptState = PAUSE_SAVE_PROMPT_STATE_SAVED;
|
||||
#if PLATFORM_N64
|
||||
D_8082B25C = 90;
|
||||
#else
|
||||
@ -3949,7 +3974,7 @@ void KaleidoScope_Update(PlayState* play) {
|
||||
} else if (CHECK_BTN_ALL(input->press.button, BTN_START) ||
|
||||
CHECK_BTN_ALL(input->press.button, BTN_B)) {
|
||||
Interface_SetDoAction(play, DO_ACTION_NONE);
|
||||
pauseCtx->unk_1EC = 2;
|
||||
pauseCtx->savePromptState = PAUSE_SAVE_PROMPT_STATE_CLOSING;
|
||||
WREG(2) = -6240;
|
||||
YREG(8) = pauseCtx->unk_204;
|
||||
func_800F64E0(0);
|
||||
@ -3963,7 +3988,7 @@ void KaleidoScope_Update(PlayState* play) {
|
||||
}
|
||||
break;
|
||||
|
||||
case 4:
|
||||
case PAUSE_SAVE_PROMPT_STATE_SAVED:
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_B) || CHECK_BTN_ALL(input->press.button, BTN_A) ||
|
||||
CHECK_BTN_ALL(input->press.button, BTN_START) || (--D_8082B25C == 0)) {
|
||||
Interface_SetDoAction(play, DO_ACTION_NONE);
|
||||
@ -3971,28 +3996,28 @@ void KaleidoScope_Update(PlayState* play) {
|
||||
gSaveContext.buttonStatus[3] = BTN_ENABLED;
|
||||
gSaveContext.hudVisibilityMode = HUD_VISIBILITY_NO_CHANGE;
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL);
|
||||
pauseCtx->unk_1EC = 5;
|
||||
pauseCtx->savePromptState = PAUSE_SAVE_PROMPT_STATE_CLOSING_AFTER_SAVED;
|
||||
WREG(2) = -6240;
|
||||
YREG(8) = pauseCtx->unk_204;
|
||||
func_800F64E0(0);
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
case 6:
|
||||
case PAUSE_SAVE_PROMPT_STATE_RETURN_TO_MENU:
|
||||
case PAUSE_SAVE_PROMPT_STATE_RETURN_TO_MENU_2:
|
||||
pauseCtx->unk_204 += 314.0f / WREG(6);
|
||||
WREG(16) += WREG(25) / WREG(6);
|
||||
WREG(17) += WREG(26) / WREG(6);
|
||||
if (pauseCtx->unk_204 >= -314.0f) {
|
||||
pauseCtx->state = PAUSE_STATE_MAIN;
|
||||
pauseCtx->unk_1EC = 0;
|
||||
pauseCtx->savePromptState = PAUSE_SAVE_PROMPT_STATE_APPEARING;
|
||||
pauseCtx->unk_1F4 = pauseCtx->unk_1F8 = pauseCtx->unk_1FC = pauseCtx->unk_200 = 0.0f;
|
||||
pauseCtx->unk_204 = -314.0f;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
case 5:
|
||||
case PAUSE_SAVE_PROMPT_STATE_CLOSING:
|
||||
case PAUSE_SAVE_PROMPT_STATE_CLOSING_AFTER_SAVED:
|
||||
if (pauseCtx->unk_204 != (YREG(8) + 160.0f)) {
|
||||
pauseCtx->unk_1F4 = pauseCtx->unk_1F8 = pauseCtx->unk_1FC = pauseCtx->unk_200 +=
|
||||
160.0f / WREG(6);
|
||||
|
@ -42,33 +42,42 @@ extern u8 gAreaGsFlags[];
|
||||
|
||||
// Clouds quads cover undiscovered areas.
|
||||
// Point quads are location markers. They can also be highlighted as a hint of where to go.
|
||||
typedef enum MapQuad {
|
||||
/* 0 */ QUAD_MAP_WORLD_CLOUDS_SACRED_FOREST_MEADOW,
|
||||
/* 1 */ QUAD_MAP_WORLD_CLOUDS_HYRULE_FIELD,
|
||||
/* 2 */ QUAD_MAP_WORLD_CLOUDS_LON_LON_RANCH,
|
||||
/* 3 */ QUAD_MAP_WORLD_CLOUDS_MARKET,
|
||||
/* 4 */ QUAD_MAP_WORLD_CLOUDS_HYRULE_CASTLE,
|
||||
/* 5 */ QUAD_MAP_WORLD_CLOUDS_KAKARIKO_VILLAGE,
|
||||
/* 6 */ QUAD_MAP_WORLD_CLOUDS_GRAVEYARD,
|
||||
/* 7 */ QUAD_MAP_WORLD_CLOUDS_DEATH_MOUNTAIN_TRAIL,
|
||||
/* 8 */ QUAD_MAP_WORLD_CLOUDS_GORON_CITY,
|
||||
/* 9 */ QUAD_MAP_WORLD_CLOUDS_ZORAS_RIVER,
|
||||
/* 10 */ QUAD_MAP_WORLD_CLOUDS_ZORAS_DOMAIN,
|
||||
/* 11 */ QUAD_MAP_WORLD_CLOUDS_ZORAS_FOUNTAIN,
|
||||
/* 12 */ QUAD_MAP_WORLD_CLOUDS_GERUDO_VALLEY,
|
||||
/* 13 */ QUAD_MAP_WORLD_CLOUDS_GERUDOS_FORTRESS,
|
||||
/* 14 */ QUAD_MAP_WORLD_CLOUDS_DESERT_COLOSSUS,
|
||||
/* 15 */ QUAD_MAP_WORLD_CLOUDS_LAKE_HYLIA,
|
||||
/* 16 */ QUAD_MAP_WORLD_POINT_FIRST,
|
||||
typedef enum WorldMapQuad {
|
||||
/* 0 */ WORLD_MAP_QUAD_CLOUDS_SACRED_FOREST_MEADOW,
|
||||
/* 1 */ WORLD_MAP_QUAD_CLOUDS_HYRULE_FIELD,
|
||||
/* 2 */ WORLD_MAP_QUAD_CLOUDS_LON_LON_RANCH,
|
||||
/* 3 */ WORLD_MAP_QUAD_CLOUDS_MARKET,
|
||||
/* 4 */ WORLD_MAP_QUAD_CLOUDS_HYRULE_CASTLE,
|
||||
/* 5 */ WORLD_MAP_QUAD_CLOUDS_KAKARIKO_VILLAGE,
|
||||
/* 6 */ WORLD_MAP_QUAD_CLOUDS_GRAVEYARD,
|
||||
/* 7 */ WORLD_MAP_QUAD_CLOUDS_DEATH_MOUNTAIN_TRAIL,
|
||||
/* 8 */ WORLD_MAP_QUAD_CLOUDS_GORON_CITY,
|
||||
/* 9 */ WORLD_MAP_QUAD_CLOUDS_ZORAS_RIVER,
|
||||
/* 10 */ WORLD_MAP_QUAD_CLOUDS_ZORAS_DOMAIN,
|
||||
/* 11 */ WORLD_MAP_QUAD_CLOUDS_ZORAS_FOUNTAIN,
|
||||
/* 12 */ WORLD_MAP_QUAD_CLOUDS_GERUDO_VALLEY,
|
||||
/* 13 */ WORLD_MAP_QUAD_CLOUDS_GERUDOS_FORTRESS,
|
||||
/* 14 */ WORLD_MAP_QUAD_CLOUDS_DESERT_COLOSSUS,
|
||||
/* 15 */ WORLD_MAP_QUAD_CLOUDS_LAKE_HYLIA,
|
||||
/* 16 */ WORLD_MAP_QUAD_POINT_FIRST,
|
||||
// 16 to 27 follows the `WorldMapPoint` enum
|
||||
/* 27 */ QUAD_MAP_WORLD_POINT_LAST = QUAD_MAP_WORLD_POINT_FIRST + WORLD_MAP_POINT_MAX - 1,
|
||||
/* 28 */ QUAD_MAP_28,
|
||||
/* 29 */ QUAD_MAP_TRADE_QUEST_MARKER,
|
||||
/* 30 */ QUAD_MAP_30,
|
||||
/* 31 */ QUAD_MAP_31,
|
||||
/* 32 */ QUAD_MAP_WORLD_IMAGE_FIRST,
|
||||
/* 46 */ QUAD_MAP_WORLD_IMAGE_LAST = QUAD_MAP_WORLD_IMAGE_FIRST + WORLD_MAP_IMAGE_FRAG_NUM - 1
|
||||
} MapQuad;
|
||||
/* 27 */ WORLD_MAP_QUAD_POINT_LAST = WORLD_MAP_QUAD_POINT_FIRST + WORLD_MAP_POINT_MAX - 1,
|
||||
/* 28 */ WORLD_MAP_QUAD_28,
|
||||
/* 29 */ WORLD_MAP_QUAD_TRADE_QUEST_MARKER,
|
||||
/* 30 */ WORLD_MAP_QUAD_30,
|
||||
/* 31 */ WORLD_MAP_QUAD_31,
|
||||
/* 32 */ WORLD_MAP_QUAD_IMAGE_FIRST,
|
||||
/* 46 */ WORLD_MAP_QUAD_IMAGE_LAST = WORLD_MAP_QUAD_IMAGE_FIRST + WORLD_MAP_IMAGE_FRAG_NUM - 1
|
||||
} WorldMapQuad;
|
||||
|
||||
typedef enum PromptQuad {
|
||||
/* 0 */ PROMPT_QUAD_MESSAGE,
|
||||
/* 1 */ PROMPT_QUAD_CURSOR_LEFT,
|
||||
/* 2 */ PROMPT_QUAD_CURSOR_RIGHT,
|
||||
/* 3 */ PROMPT_QUAD_CHOICE_YES,
|
||||
/* 4 */ PROMPT_QUAD_CHOICE_NO,
|
||||
/* 5 */ PROMPT_QUAD_MAX
|
||||
} PromptQuad;
|
||||
|
||||
void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx);
|
||||
s32 KaleidoScope_UpdateQuestStatusPoint(PauseContext* pauseCtx, s32 point);
|
||||
|
Loading…
Reference in New Issue
Block a user