summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDragorn421 <Dragorn421@users.noreply.github.com>2024-09-07 10:14:08 +0200
committerGitHub <noreply@github.com>2024-09-07 17:14:08 +0900
commit3a9ebfbbad15294c1546074c4b64da0289e8a334 (patch)
treeb390eb0c6e1dcc2765b2387b420e8bec996edf3d /src
parent87c304afcb6a7e6d06728d953df182ed43393842 (diff)
Pause doc: World map points (#2141)
* Pause doc: World map points * bss * `WORLD_MAP_POINT_HYLIA_LAKESIDE` -> `_LAKE_HYLIA`
Diffstat (limited to 'src')
-rw-r--r--src/code/fault_gc.c2
-rw-r--r--src/code/z_camera.c2
-rw-r--r--src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c4
-rw-r--r--src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c2
-rw-r--r--src/overlays/actors/ovl_Fishing/z_fishing.c2
-rw-r--r--src/overlays/misc/ovl_kaleido_scope/z_kaleido_map.c100
-rw-r--r--src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.c292
-rw-r--r--src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.h30
8 files changed, 285 insertions, 149 deletions
diff --git a/src/code/fault_gc.c b/src/code/fault_gc.c
index ffed05048..857cc4b88 100644
--- a/src/code/fault_gc.c
+++ b/src/code/fault_gc.c
@@ -42,7 +42,7 @@
*/
#if PLATFORM_GC
-#pragma increment_block_number "gc-eu:224 gc-eu-mq:224 gc-eu-mq-dbg:224 gc-jp:224 gc-jp-ce:224 gc-jp-mq:224 gc-us:224" \
+#pragma increment_block_number "gc-eu:224 gc-eu-mq:224 gc-eu-mq-dbg:208 gc-jp:224 gc-jp-ce:224 gc-jp-mq:224 gc-us:224" \
"gc-us-mq:224"
#include "global.h"
diff --git a/src/code/z_camera.c b/src/code/z_camera.c
index 7cb7e712c..41210ff4e 100644
--- a/src/code/z_camera.c
+++ b/src/code/z_camera.c
@@ -4,7 +4,7 @@
#include "terminal.h"
#include "overlays/actors/ovl_En_Horse/z_en_horse.h"
-#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0"
+#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192"
s16 Camera_RequestSettingImpl(Camera* camera, s16 requestedSetting, s16 flags);
s32 Camera_RequestModeImpl(Camera* camera, s16 requestedMode, u8 forceModeChange);
diff --git a/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c b/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c
index 1ac2d871e..9798fe510 100644
--- a/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c
+++ b/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c
@@ -100,13 +100,13 @@ static ColliderCylinderInit sLightBallCylinderInit = {
static u8 D_808E4C58[] = { 0, 12, 10, 12, 14, 16, 12, 14, 16, 12, 14, 16, 12, 14, 16, 10, 16, 14 };
static Vec3f sZeroVec = { 0.0f, 0.0f, 0.0f };
-#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128"
+#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0"
static EnGanonMant* sCape;
// TODO: There's probably a way to match BSS ordering with less padding by spreading the variables out and moving
// data around. It would be easier if we had more options for controlling BSS ordering in debug.
-#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128"
+#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192"
static s32 sSeed1;
static s32 sSeed2;
diff --git a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c
index bfc625d69..cf483fddf 100644
--- a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c
+++ b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c
@@ -10,7 +10,7 @@
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "terminal.h"
-#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 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:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128"
#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5)
diff --git a/src/overlays/actors/ovl_Fishing/z_fishing.c b/src/overlays/actors/ovl_Fishing/z_fishing.c
index 1a2e28f3e..48ea1fc01 100644
--- a/src/overlays/actors/ovl_Fishing/z_fishing.c
+++ b/src/overlays/actors/ovl_Fishing/z_fishing.c
@@ -14,7 +14,7 @@
#include "cic6105.h"
#endif
-#pragma increment_block_number "gc-eu:153 gc-eu-mq:153 gc-jp:155 gc-jp-ce:155 gc-jp-mq:155 gc-us:155 gc-us-mq:155"
+#pragma increment_block_number "gc-eu:147 gc-eu-mq:147 gc-jp:149 gc-jp-ce:149 gc-jp-mq:149 gc-us:149 gc-us-mq:149"
#define FLAGS ACTOR_FLAG_4
diff --git a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map.c b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map.c
index 74324b901..c9e176b66 100644
--- a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map.c
+++ b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map.c
@@ -358,32 +358,40 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
static void* cloudTexs[] = {
- gWorldMapCloudSacredForestMeadowTex, gWorldMapCloudHyruleFieldTex,
- gWorldMapCloudLonLonRanchTex, gWorldMapCloudMarketTex,
- gWorldMapCloudHyruleCastleTex, gWorldMapCloudKakarikoVillageTex,
- gWorldMapCloudGraveyardTex, gWorldMapCloudDeathMountainTrailTex,
- gWorldMapCloudGoronCityTex, gWorldMapCloudZorasRiverTex,
- gWorldMapCloudZorasDomainTex, gWorldMapCloudZorasFountainTex,
- gWorldMapCloudGerudoValleyTex, gWorldMapCloudGerudosFortressTex,
- gWorldMapCloudDesertColossusTex, gWorldMapCloudLakeHyliaTex,
+ 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
};
static u16 cloudFlagNums[] = {
- WORLD_MAP_AREA_SACRED_FOREST_MEADOW,
- WORLD_MAP_AREA_HYRULE_FIELD,
- WORLD_MAP_AREA_LON_LON_RANCH,
- WORLD_MAP_AREA_MARKET,
- WORLD_MAP_AREA_HYRULE_CASTLE,
- WORLD_MAP_AREA_KAKARIKO_VILLAGE,
- WORLD_MAP_AREA_GRAVEYARD,
- WORLD_MAP_AREA_DEATH_MOUNTAIN_TRAIL,
- WORLD_MAP_AREA_GORON_CITY,
- WORLD_MAP_AREA_ZORAS_RIVER,
- WORLD_MAP_AREA_ZORAS_DOMAIN,
- WORLD_MAP_AREA_ZORAS_FOUNTAIN,
- WORLD_MAP_AREA_GERUDO_VALLEY,
- WORLD_MAP_AREA_GERUDOS_FORTRESS,
- WORLD_MAP_AREA_DESERT_COLOSSUS,
- WORLD_MAP_AREA_LAKE_HYLIA,
+ 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
};
static s16 pointPulsePrimColor[] = { 0, 0, 255 };
static s16 pointPrimColors[][3] = {
@@ -544,12 +552,13 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
do {
pauseCtx->cursorPoint[PAUSE_WORLD_MAP]++;
- if (pauseCtx->cursorPoint[PAUSE_WORLD_MAP] > 11) {
- pauseCtx->cursorPoint[PAUSE_WORLD_MAP] = 11;
+ if (pauseCtx->cursorPoint[PAUSE_WORLD_MAP] >= WORLD_MAP_POINT_MAX) {
+ pauseCtx->cursorPoint[PAUSE_WORLD_MAP] = WORLD_MAP_POINT_MAX - 1;
KaleidoScope_MoveCursorToSpecialPos(play, PAUSE_CURSOR_PAGE_RIGHT);
break;
}
- } while (pauseCtx->worldMapPoints[pauseCtx->cursorPoint[PAUSE_WORLD_MAP]] == 0);
+ } while (pauseCtx->worldMapPoints[pauseCtx->cursorPoint[PAUSE_WORLD_MAP]] ==
+ WORLD_MAP_POINT_STATE_HIDE);
} else if (pauseCtx->stickAdjX < -30) {
D_8082A6D4 = 0;
@@ -560,13 +569,15 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
KaleidoScope_MoveCursorToSpecialPos(play, PAUSE_CURSOR_PAGE_LEFT);
break;
}
- } while (pauseCtx->worldMapPoints[pauseCtx->cursorPoint[PAUSE_WORLD_MAP]] == 0);
+ } while (pauseCtx->worldMapPoints[pauseCtx->cursorPoint[PAUSE_WORLD_MAP]] ==
+ WORLD_MAP_POINT_STATE_HIDE);
} else {
D_8082A6D4++;
}
pauseCtx->cursorItem[PAUSE_MAP] = pauseCtx->cursorPoint[PAUSE_WORLD_MAP];
- pauseCtx->cursorSlot[PAUSE_MAP] = pauseCtx->cursorPoint[PAUSE_WORLD_MAP] + 0x1F;
+ 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);
} else {
pauseCtx->cursorItem[PAUSE_MAP] = gSaveContext.worldMapArea + 0x18;
@@ -575,12 +586,14 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
pauseCtx->cursorPoint[PAUSE_WORLD_MAP] = 0;
pauseCtx->cursorSpecialPos = 0;
- while (pauseCtx->worldMapPoints[pauseCtx->cursorPoint[PAUSE_WORLD_MAP]] == 0) {
+ while (pauseCtx->worldMapPoints[pauseCtx->cursorPoint[PAUSE_WORLD_MAP]] ==
+ WORLD_MAP_POINT_STATE_HIDE) {
pauseCtx->cursorPoint[PAUSE_WORLD_MAP]++;
}
pauseCtx->cursorItem[PAUSE_MAP] = pauseCtx->cursorPoint[PAUSE_WORLD_MAP];
- pauseCtx->cursorSlot[PAUSE_MAP] = pauseCtx->cursorPoint[PAUSE_WORLD_MAP] + 0x1F;
+ 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);
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
@@ -588,15 +601,17 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
}
} else {
if (pauseCtx->stickAdjX < -30) {
- pauseCtx->cursorPoint[PAUSE_WORLD_MAP] = 11;
+ pauseCtx->cursorPoint[PAUSE_WORLD_MAP] = WORLD_MAP_POINT_MAX - 1;
pauseCtx->cursorSpecialPos = 0;
- while (pauseCtx->worldMapPoints[pauseCtx->cursorPoint[PAUSE_WORLD_MAP]] == 0) {
+ while (pauseCtx->worldMapPoints[pauseCtx->cursorPoint[PAUSE_WORLD_MAP]] ==
+ WORLD_MAP_POINT_STATE_HIDE) {
pauseCtx->cursorPoint[PAUSE_WORLD_MAP]--;
}
pauseCtx->cursorItem[PAUSE_MAP] = pauseCtx->cursorPoint[PAUSE_WORLD_MAP];
- pauseCtx->cursorSlot[PAUSE_MAP] = pauseCtx->cursorPoint[PAUSE_WORLD_MAP] + 0x1F;
+ 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);
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
@@ -605,7 +620,7 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
}
}
- if (pauseCtx->worldMapPoints[pauseCtx->cursorPoint[PAUSE_WORLD_MAP]] == 0) {
+ if (pauseCtx->worldMapPoints[pauseCtx->cursorPoint[PAUSE_WORLD_MAP]] == WORLD_MAP_POINT_STATE_HIDE) {
pauseCtx->cursorItem[PAUSE_MAP] = PAUSE_ITEM_NONE;
}
@@ -720,7 +735,7 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 235, 235, 235, pauseCtx->alpha);
for (k = 0; k < 15; k += 8) {
- gSPVertex(POLY_OPA_DISP++, &pauseCtx->mapPageVtx[60 + k * 4], 32, 0);
+ gSPVertex(POLY_OPA_DISP++, &pauseCtx->mapPageVtx[(PAGE_BG_QUADS + k) * 4], 32, 0);
for (j = i = 0; i < 8; i++, j += 4) {
if (!(gSaveContext.save.info.worldMapAreaData & gBitFlags[cloudFlagNums[k + i]])) {
@@ -739,6 +754,8 @@ 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
+
pauseCtx->mapPageVtx[172].v.ob[0] = pauseCtx->mapPageVtx[174].v.ob[0] =
areaBoxPosX[((void)0, gSaveContext.worldMapArea)];
@@ -831,21 +848,22 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
gDPLoadTextureBlock(POLY_OPA_DISP++, gWorldMapDotTex, G_IM_FMT_IA, G_IM_SIZ_8b, 8, 8, 0, G_TX_WRAP | G_TX_NOMIRROR,
G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
- for (j = i = 0; i < 12; i++, t++, j += 4) {
- if (pauseCtx->worldMapPoints[i] != 0) {
+ for (j = i = 0; i < WORLD_MAP_POINT_MAX; i++, t++, j += 4) {
+ if (pauseCtx->worldMapPoints[i] != WORLD_MAP_POINT_STATE_HIDE) {
gDPPipeSync(POLY_OPA_DISP++);
- if (pauseCtx->worldMapPoints[i] == 1) {
+ if (pauseCtx->worldMapPoints[i] == WORLD_MAP_POINT_STATE_SHOW) {
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, pointPrimColors[0][0], pointPrimColors[0][1],
pointPrimColors[0][2], pauseCtx->alpha);
gDPSetEnvColor(POLY_OPA_DISP++, pointEnvColors[0][0], pointEnvColors[0][1], pointEnvColors[0][2], 0);
- } else {
+ } else { // WORLD_MAP_POINT_STATE_HIGHLIGHT
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, pointPulsePrimColor[0], pointPulsePrimColor[1],
pointPulsePrimColor[2], pauseCtx->alpha);
gDPSetEnvColor(POLY_OPA_DISP++, pointPulseEnvColor[0], pointPulseEnvColor[1], pointPulseEnvColor[2], 0);
}
- gSPVertex(POLY_OPA_DISP++, &pauseCtx->mapPageVtx[124 + i * 4], 4, 0);
+ gSPVertex(POLY_OPA_DISP++, &pauseCtx->mapPageVtx[(PAGE_BG_QUADS + QUAD_MAP_WORLD_POINT_FIRST + i) * 4], 4,
+ 0);
gSP1Quadrangle(POLY_OPA_DISP++, 0, 2, 3, 1, 0);
}
diff --git a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.c b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.c
index 936400e1c..98c965368 100644
--- a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.c
+++ b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.c
@@ -541,11 +541,73 @@ static void* sSavePromptBgQuadsTexs[] = {
#endif
s16 gVtxPageMapWorldQuadsWidth[VTX_PAGE_MAP_WORLD_QUADS] = {
- 32, 112, 32, 48, 32, 32, 32, 48, 32, 64, 32, 48, 48, 48, 48, 64, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 80, 64,
+ 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
+ 8, // WORLD_MAP_POINT_HAUNTED_WASTELAND
+ 8, // WORLD_MAP_POINT_GERUDOS_FORTRESS
+ 8, // WORLD_MAP_POINT_GERUDO_VALLEY
+ 8, // WORLD_MAP_POINT_LAKE_HYLIA
+ 8, // WORLD_MAP_POINT_LON_LON_RANCH
+ 8, // WORLD_MAP_POINT_MARKET
+ 8, // WORLD_MAP_POINT_HYRULE_FIELD
+ 8, // WORLD_MAP_POINT_DEATH_MOUNTAIN
+ 8, // WORLD_MAP_POINT_KAKARIKO_VILLAGE
+ 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_29
+ 80, // QUAD_MAP_30
+ 64, // QUAD_MAP_31
};
s16 gVtxPageMapWorldQuadsHeight[VTX_PAGE_MAP_WORLD_QUADS] = {
- 24, 72, 13, 22, 19, 20, 19, 27, 14, 26, 22, 21, 49, 32, 45, 60, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 16, 32, 8,
+ 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
+ 8, // WORLD_MAP_POINT_HAUNTED_WASTELAND
+ 8, // WORLD_MAP_POINT_GERUDOS_FORTRESS
+ 8, // WORLD_MAP_POINT_GERUDO_VALLEY
+ 8, // WORLD_MAP_POINT_LAKE_HYLIA
+ 8, // WORLD_MAP_POINT_LON_LON_RANCH
+ 8, // WORLD_MAP_POINT_MARKET
+ 8, // WORLD_MAP_POINT_HYRULE_FIELD
+ 8, // WORLD_MAP_POINT_DEATH_MOUNTAIN
+ 8, // WORLD_MAP_POINT_KAKARIKO_VILLAGE
+ 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_29
+ 32, // QUAD_MAP_30
+ 8, // QUAD_MAP_31
};
/**
@@ -1963,48 +2025,50 @@ void KaleidoScope_DrawInfoPanel(PlayState* play) {
void KaleidoScope_UpdateNamePanel(PlayState* play) {
PauseContext* pauseCtx = &play->pauseCtx;
- u16 sp2A;
+ u16 texIndex;
if ((pauseCtx->namedItem != pauseCtx->cursorItem[pauseCtx->pageIndex]) ||
((pauseCtx->pageIndex == PAUSE_MAP) && (pauseCtx->cursorSpecialPos != 0))) {
pauseCtx->namedItem = pauseCtx->cursorItem[pauseCtx->pageIndex];
- sp2A = pauseCtx->namedItem;
+ texIndex = pauseCtx->namedItem;
osCreateMesgQueue(&pauseCtx->loadQueue, &pauseCtx->loadMsg, 1);
if (pauseCtx->namedItem != PAUSE_ITEM_NONE) {
if ((pauseCtx->pageIndex == PAUSE_MAP) && !sInDungeonScene) {
+ // `texIndex` is a `WorldMapPoint` enum value
+
if (gSaveContext.language) { // != LANGUAGE_JPN for NTSC versions, LANGUAGE_ENG for PAL versions
- sp2A += 12;
+ texIndex += WORLD_MAP_POINT_MAX;
}
#if OOT_PAL
if (gSaveContext.language == LANGUAGE_FRA) {
- sp2A += 12;
+ texIndex += WORLD_MAP_POINT_MAX;
}
#endif
DMA_REQUEST_SYNC(pauseCtx->nameSegment,
- (uintptr_t)_map_name_staticSegmentRomStart + (sp2A * MAP_NAME_TEX1_SIZE),
+ (uintptr_t)_map_name_staticSegmentRomStart + (texIndex * MAP_NAME_TEX1_SIZE),
MAP_NAME_TEX1_SIZE, "../z_kaleido_scope_PAL.c", 2093);
} else {
PRINTF("zoom_name=%d\n", pauseCtx->namedItem);
if (gSaveContext.language) { // != LANGUAGE_JPN for NTSC versions, LANGUAGE_ENG for PAL versions
- sp2A += 123;
+ texIndex += 123;
}
#if OOT_PAL
if (gSaveContext.language == LANGUAGE_FRA) {
- sp2A += 123;
+ texIndex += 123;
}
#endif
- PRINTF("J_N=%d point=%d\n", gSaveContext.language, sp2A);
+ PRINTF("J_N=%d point=%d\n", gSaveContext.language, texIndex);
DMA_REQUEST_SYNC(pauseCtx->nameSegment,
- (uintptr_t)_item_name_staticSegmentRomStart + (sp2A * ITEM_NAME_TEX_SIZE),
+ (uintptr_t)_item_name_staticSegmentRomStart + (texIndex * ITEM_NAME_TEX_SIZE),
ITEM_NAME_TEX_SIZE, "../z_kaleido_scope_PAL.c", 2120);
}
@@ -2112,9 +2176,38 @@ 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] = {
- 0x002F, 0xFFCF, 0xFFEF, 0xFFF1, 0xFFF7, 0x0018, 0x002B, 0x000E, 0x0009, 0x0026, 0x0052,
- 0x0047, 0xFFB4, 0xFFA9, 0xFF94, 0xFFCA, 0xFFA3, 0xFFBD, 0xFFC8, 0xFFDF, 0xFFF6, 0x0001,
- 0x000E, 0x0018, 0x0023, 0x003A, 0x004A, 0x0059, 0x0000, 0xFFC6, 0x0013, 0x001C,
+ 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
+ -93, // WORLD_MAP_POINT_HAUNTED_WASTELAND
+ -67, // WORLD_MAP_POINT_GERUDOS_FORTRESS
+ -56, // WORLD_MAP_POINT_GERUDO_VALLEY
+ -33, // WORLD_MAP_POINT_LAKE_HYLIA
+ -10, // WORLD_MAP_POINT_LON_LON_RANCH
+ 1, // WORLD_MAP_POINT_MARKET
+ 14, // WORLD_MAP_POINT_HYRULE_FIELD
+ 24, // WORLD_MAP_POINT_DEATH_MOUNTAIN
+ 35, // WORLD_MAP_POINT_KAKARIKO_VILLAGE
+ 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_29
+ 19, // QUAD_MAP_30
+ 28, // QUAD_MAP_31
};
static s16 sVtxPagePromptQuadsX[VTX_PAGE_PROMPT_QUADS] = {
0xFFB4, 0xFFC6, 0x000A, 0xFFC6, 0x000A,
@@ -2137,9 +2230,38 @@ 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] = {
- 0x000F, 0x0028, 0x000B, 0x002D, 0x0034, 0x0025, 0x0024, 0x0039, 0x0036, 0x0021, 0x001F,
- 0x002D, 0x0020, 0x002A, 0x0031, 0xFFF6, 0x001F, 0x001B, 0x000F, 0xFFCF, 0x0008, 0x0026,
- 0x0007, 0x002F, 0x001E, 0x0001, 0xFFF7, 0x0019, 0x0000, 0x0001, 0xFFE0, 0xFFE6,
+ 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
+ 31, // WORLD_MAP_POINT_HAUNTED_WASTELAND
+ 27, // WORLD_MAP_POINT_GERUDOS_FORTRESS
+ 15, // WORLD_MAP_POINT_GERUDO_VALLEY
+ -49, // WORLD_MAP_POINT_LAKE_HYLIA
+ 8, // WORLD_MAP_POINT_LON_LON_RANCH
+ 38, // WORLD_MAP_POINT_MARKET
+ 7, // WORLD_MAP_POINT_HYRULE_FIELD
+ 47, // WORLD_MAP_POINT_DEATH_MOUNTAIN
+ 30, // WORLD_MAP_POINT_KAKARIKO_VILLAGE
+ 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_29
+ -32, // QUAD_MAP_30
+ -26, // QUAD_MAP_31
};
static s16 sVtxPagePromptQuadsY[VTX_PAGE_PROMPT_QUADS] = {
0x0024, 0x000A, 0x000A, 0xFFFA, 0xFFFA,
@@ -3397,198 +3519,164 @@ void KaleidoScope_Update(PlayState* play) {
KaleidoScope_DrawPlayerWork(play);
KaleidoScope_SetupPlayerPreRender(play);
+ // World map points
+
for (i = 0; i < ARRAY_COUNT(pauseCtx->worldMapPoints); i++) {
- pauseCtx->worldMapPoints[i] = 0;
+ pauseCtx->worldMapPoints[i] = WORLD_MAP_POINT_STATE_HIDE;
}
if (CHECK_QUEST_ITEM(QUEST_GERUDOS_CARD)) {
- pauseCtx->worldMapPoints[0] = 2;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_HAUNTED_WASTELAND] = WORLD_MAP_POINT_STATE_HIGHLIGHT;
}
-
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT)) {
- pauseCtx->worldMapPoints[0] = 1;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_HAUNTED_WASTELAND] = WORLD_MAP_POINT_STATE_SHOW;
}
if (INV_CONTENT(ITEM_LONGSHOT) == ITEM_LONGSHOT) {
- pauseCtx->worldMapPoints[1] = 2;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_GERUDOS_FORTRESS] = WORLD_MAP_POINT_STATE_HIGHLIGHT;
}
-
if (CHECK_QUEST_ITEM(QUEST_GERUDOS_CARD)) {
- pauseCtx->worldMapPoints[1] = 1;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_GERUDOS_FORTRESS] = WORLD_MAP_POINT_STATE_SHOW;
}
if (GET_EVENTCHKINF(EVENTCHKINF_B2)) {
- pauseCtx->worldMapPoints[2] = 1;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_GERUDO_VALLEY] = WORLD_MAP_POINT_STATE_SHOW;
}
-
if (INV_CONTENT(ITEM_LONGSHOT) == ITEM_LONGSHOT) {
- pauseCtx->worldMapPoints[2] = 2;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_GERUDO_VALLEY] = WORLD_MAP_POINT_STATE_HIGHLIGHT;
}
-
if (CHECK_QUEST_ITEM(QUEST_GERUDOS_CARD)) {
- pauseCtx->worldMapPoints[2] = 1;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_GERUDO_VALLEY] = WORLD_MAP_POINT_STATE_SHOW;
}
if (CUR_UPG_VALUE(UPG_SCALE)) {
- pauseCtx->worldMapPoints[3] = 1;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_LAKE_HYLIA] = WORLD_MAP_POINT_STATE_SHOW;
}
-
if (CHECK_OWNED_EQUIP(EQUIP_TYPE_BOOTS, EQUIP_INV_BOOTS_IRON)) {
- pauseCtx->worldMapPoints[3] = 2;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_LAKE_HYLIA] = WORLD_MAP_POINT_STATE_HIGHLIGHT;
}
-
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_WATER)) {
- pauseCtx->worldMapPoints[3] = 1;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_LAKE_HYLIA] = WORLD_MAP_POINT_STATE_SHOW;
}
if (GET_EVENTCHKINF(EVENTCHKINF_09)) {
- pauseCtx->worldMapPoints[4] = 1;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_LON_LON_RANCH] = WORLD_MAP_POINT_STATE_SHOW;
}
-
if (INV_CONTENT(ITEM_OCARINA_FAIRY) != ITEM_NONE) {
- pauseCtx->worldMapPoints[4] = 2;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_LON_LON_RANCH] = WORLD_MAP_POINT_STATE_HIGHLIGHT;
}
-
if (CHECK_QUEST_ITEM(QUEST_SONG_EPONA)) {
- pauseCtx->worldMapPoints[4] = 1;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_LON_LON_RANCH] = WORLD_MAP_POINT_STATE_SHOW;
}
-
if (GET_EVENTCHKINF(EVENTCHKINF_TALON_WOKEN_IN_KAKARIKO)) {
- pauseCtx->worldMapPoints[4] = 2;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_LON_LON_RANCH] = WORLD_MAP_POINT_STATE_HIGHLIGHT;
}
-
if (GET_EVENTCHKINF(EVENTCHKINF_EPONA_OBTAINED)) {
- pauseCtx->worldMapPoints[4] = 1;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_LON_LON_RANCH] = WORLD_MAP_POINT_STATE_SHOW;
}
if (GET_EVENTCHKINF(EVENTCHKINF_09)) {
- pauseCtx->worldMapPoints[5] = 2;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_MARKET] = WORLD_MAP_POINT_STATE_HIGHLIGHT;
}
-
if (GET_EVENTCHKINF(EVENTCHKINF_40)) {
- pauseCtx->worldMapPoints[5] = 1;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_MARKET] = WORLD_MAP_POINT_STATE_SHOW;
}
-
if (INV_CONTENT(ITEM_OCARINA_OF_TIME) == ITEM_OCARINA_OF_TIME) {
- pauseCtx->worldMapPoints[5] = 2;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_MARKET] = WORLD_MAP_POINT_STATE_HIGHLIGHT;
}
-
if (GET_EVENTCHKINF(EVENTCHKINF_45)) {
- pauseCtx->worldMapPoints[5] = 1;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_MARKET] = WORLD_MAP_POINT_STATE_SHOW;
}
-
if (INV_CONTENT(ITEM_ARROW_LIGHT) == ITEM_ARROW_LIGHT) {
- pauseCtx->worldMapPoints[5] = 2;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_MARKET] = WORLD_MAP_POINT_STATE_HIGHLIGHT;
}
if (GET_EVENTCHKINF(EVENTCHKINF_09)) {
- pauseCtx->worldMapPoints[6] = 1;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_HYRULE_FIELD] = WORLD_MAP_POINT_STATE_SHOW;
}
if (GET_EVENTCHKINF(EVENTCHKINF_40)) {
- pauseCtx->worldMapPoints[7] = 2;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_DEATH_MOUNTAIN] = WORLD_MAP_POINT_STATE_HIGHLIGHT;
}
-
if (GET_EVENTCHKINF(EVENTCHKINF_25)) {
- pauseCtx->worldMapPoints[7] = 1;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_DEATH_MOUNTAIN] = WORLD_MAP_POINT_STATE_SHOW;
}
-
if (INV_CONTENT(ITEM_HOOKSHOT) == ITEM_HOOKSHOT) {
- pauseCtx->worldMapPoints[7] = 2;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_DEATH_MOUNTAIN] = WORLD_MAP_POINT_STATE_HIGHLIGHT;
}
-
if (GET_EVENTCHKINF(EVENTCHKINF_49)) {
- pauseCtx->worldMapPoints[7] = 1;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_DEATH_MOUNTAIN] = WORLD_MAP_POINT_STATE_SHOW;
}
if (gBitFlags[WORLD_MAP_AREA_KAKARIKO_VILLAGE] & gSaveContext.save.info.worldMapAreaData) {
- pauseCtx->worldMapPoints[8] = 1;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_KAKARIKO_VILLAGE] = WORLD_MAP_POINT_STATE_SHOW;
}
-
if (CHECK_QUEST_ITEM(QUEST_SONG_LULLABY)) {
- pauseCtx->worldMapPoints[8] = 2;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_KAKARIKO_VILLAGE] = WORLD_MAP_POINT_STATE_HIGHLIGHT;
}
-
if (CHECK_QUEST_ITEM(QUEST_SONG_SUN)) {
- pauseCtx->worldMapPoints[8] = 1;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_KAKARIKO_VILLAGE] = WORLD_MAP_POINT_STATE_SHOW;
}
-
if (GET_EVENTCHKINF(EVENTCHKINF_45)) {
- pauseCtx->worldMapPoints[8] = 2;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_KAKARIKO_VILLAGE] = WORLD_MAP_POINT_STATE_HIGHLIGHT;
}
-
if (INV_CONTENT(ITEM_HOOKSHOT) == ITEM_HOOKSHOT) {
- pauseCtx->worldMapPoints[8] = 1;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_KAKARIKO_VILLAGE] = WORLD_MAP_POINT_STATE_SHOW;
}
-
if (CHECK_QUEST_ITEM(QUEST_SONG_STORMS)) {
- pauseCtx->worldMapPoints[8] = 2;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_KAKARIKO_VILLAGE] = WORLD_MAP_POINT_STATE_HIGHLIGHT;
}
-
if (GET_EVENTCHKINF(EVENTCHKINF_67)) {
- pauseCtx->worldMapPoints[8] = 1;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_KAKARIKO_VILLAGE] = WORLD_MAP_POINT_STATE_SHOW;
}
-
if (GET_EVENTCHKINF(EVENTCHKINF_AA)) {
- pauseCtx->worldMapPoints[8] = 2;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_KAKARIKO_VILLAGE] = WORLD_MAP_POINT_STATE_HIGHLIGHT;
}
-
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW)) {
- pauseCtx->worldMapPoints[8] = 1;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_KAKARIKO_VILLAGE] = WORLD_MAP_POINT_STATE_SHOW;
}
if (gBitFlags[WORLD_MAP_AREA_LOST_WOODS] & gSaveContext.save.info.worldMapAreaData) {
- pauseCtx->worldMapPoints[9] = 1;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_LOST_WOODS] = WORLD_MAP_POINT_STATE_SHOW;
}
-
if (GET_EVENTCHKINF(EVENTCHKINF_0F)) {
- pauseCtx->worldMapPoints[9] = 2;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_LOST_WOODS] = WORLD_MAP_POINT_STATE_HIGHLIGHT;
}
-
if (CHECK_QUEST_ITEM(QUEST_SONG_SARIA)) {
- pauseCtx->worldMapPoints[9] = 1;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_LOST_WOODS] = WORLD_MAP_POINT_STATE_SHOW;
}
-
if (INV_CONTENT(ITEM_HOOKSHOT) == ITEM_HOOKSHOT) {
- pauseCtx->worldMapPoints[9] = 2;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_LOST_WOODS] = WORLD_MAP_POINT_STATE_HIGHLIGHT;
}
-
if (GET_EVENTCHKINF(EVENTCHKINF_48)) {
- pauseCtx->worldMapPoints[9] = 1;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_LOST_WOODS] = WORLD_MAP_POINT_STATE_SHOW;
}
- pauseCtx->worldMapPoints[10] = 2;
-
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_KOKIRI_FOREST] = WORLD_MAP_POINT_STATE_HIGHLIGHT;
if (GET_EVENTCHKINF(EVENTCHKINF_09)) {
- pauseCtx->worldMapPoints[10] = 1;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_KOKIRI_FOREST] = WORLD_MAP_POINT_STATE_SHOW;
}
-
if (GET_EVENTCHKINF(EVENTCHKINF_6E)) {
- pauseCtx->worldMapPoints[10] = 2;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_KOKIRI_FOREST] = WORLD_MAP_POINT_STATE_HIGHLIGHT;
}
-
if (GET_EVENTCHKINF(EVENTCHKINF_0F)) {
- pauseCtx->worldMapPoints[10] = 1;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_KOKIRI_FOREST] = WORLD_MAP_POINT_STATE_SHOW;
}
if (CHECK_QUEST_ITEM(QUEST_SONG_LULLABY)) {
- pauseCtx->worldMapPoints[11] = 1;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_ZORAS_DOMAIN] = WORLD_MAP_POINT_STATE_SHOW;
}
-
if (GET_EVENTCHKINF(EVENTCHKINF_25)) {
- pauseCtx->worldMapPoints[11] = 2;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_ZORAS_DOMAIN] = WORLD_MAP_POINT_STATE_HIGHLIGHT;
}
-
if (GET_EVENTCHKINF(EVENTCHKINF_37)) {
- pauseCtx->worldMapPoints[11] = 1;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_ZORAS_DOMAIN] = WORLD_MAP_POINT_STATE_SHOW;
}
-
if (INV_CONTENT(ITEM_HOOKSHOT) == ITEM_HOOKSHOT) {
- pauseCtx->worldMapPoints[11] = 2;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_ZORAS_DOMAIN] = WORLD_MAP_POINT_STATE_HIGHLIGHT;
}
-
if (CHECK_OWNED_EQUIP(EQUIP_TYPE_BOOTS, EQUIP_INV_BOOTS_IRON)) {
- pauseCtx->worldMapPoints[11] = 1;
+ pauseCtx->worldMapPoints[WORLD_MAP_POINT_ZORAS_DOMAIN] = WORLD_MAP_POINT_STATE_SHOW;
}
pauseCtx->tradeQuestLocation = 0xFF;
diff --git a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.h b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.h
index 3c3794e70..1ada2645a 100644
--- a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.h
+++ b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.h
@@ -40,6 +40,36 @@ extern u8 gAreaGsFlags[];
#define WORLD_MAP_IMAGE_FRAG_HEIGHT ((TMEM_SIZE / 2) / (WORLD_MAP_IMAGE_WIDTH * G_IM_SIZ_8b_BYTES))
#define WORLD_MAP_IMAGE_FRAG_NUM (((WORLD_MAP_IMAGE_HEIGHT - 1) / WORLD_MAP_IMAGE_FRAG_HEIGHT) + 1)
+// 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,
+ // 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_29,
+ /* 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;
+
void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx);
s32 KaleidoScope_UpdateQuestStatusPoint(PauseContext* pauseCtx, s32 point);
void KaleidoScope_DrawDebugEditor(PlayState* play);