mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-04 06:54:33 +00:00
figure out a whole bunch of world map stuff
This commit is contained in:
parent
6c77a9f825
commit
8c871e74ff
9 changed files with 835 additions and 429 deletions
|
@ -12,21 +12,21 @@
|
|||
<Texture Name="gWorldMapAreaBox7Tex" OutName="world_map_area_box_7" Format="ia4" Width="96" Height="59" Offset="0x7848"/>
|
||||
<Texture Name="gWorldMapAreaBox8Tex" OutName="world_map_area_box_8" Format="ia4" Width="16" Height="16" Offset="0x8358"/>
|
||||
<Texture Name="gWorldMapArrowTex" OutName="world_map_arrow" Format="ia8" Width="8" Height="8" Offset="0x83D8"/>
|
||||
<Texture Name="gWorldMapCloud1Tex" OutName="world_map_cloud_1" Format="i4" Width="64" Height="60" Offset="0x8418"/>
|
||||
<Texture Name="gWorldMapCloud2Tex" OutName="world_map_cloud_2" Format="i4" Width="48" Height="45" Offset="0x8B98"/>
|
||||
<Texture Name="gWorldMapCloud3Tex" OutName="world_map_cloud_3" Format="i4" Width="48" Height="32" Offset="0x8FD0"/>
|
||||
<Texture Name="gWorldMapCloud4Tex" OutName="world_map_cloud_4" Format="i4" Width="48" Height="49" Offset="0x92D0"/>
|
||||
<Texture Name="gWorldMapCloud5Tex" OutName="world_map_cloud_5" Format="i4" Width="48" Height="21" Offset="0x9768"/>
|
||||
<Texture Name="gWorldMapCloud6Tex" OutName="world_map_cloud_6" Format="i4" Width="32" Height="22" Offset="0x9960"/>
|
||||
<Texture Name="gWorldMapCloud7Tex" OutName="world_map_cloud_7" Format="i4" Width="64" Height="26" Offset="0x9AC0"/>
|
||||
<Texture Name="gWorldMapCloud8Tex" OutName="world_map_cloud_8" Format="i4" Width="32" Height="14" Offset="0x9E00"/>
|
||||
<Texture Name="gWorldMapCloud9Tex" OutName="world_map_cloud_9" Format="i4" Width="48" Height="27" Offset="0x9EE0"/>
|
||||
<Texture Name="gWorldMapCloud10Tex" OutName="world_map_cloud_10" Format="i4" Width="32" Height="19" Offset="0xA168"/>
|
||||
<Texture Name="gWorldMapCloud11Tex" OutName="world_map_cloud_11" Format="i4" Width="32" Height="20" Offset="0xA298"/>
|
||||
<Texture Name="gWorldMapCloud12Tex" OutName="world_map_cloud_12" Format="i4" Width="32" Height="19" Offset="0xA3D8"/>
|
||||
<Texture Name="gWorldMapCloud13Tex" OutName="world_map_cloud_13" Format="i4" Width="48" Height="22" Offset="0xA508"/>
|
||||
<Texture Name="gWorldMapCloud14Tex" OutName="world_map_cloud_14" Format="i4" Width="32" Height="13" Offset="0xA718"/>
|
||||
<Texture Name="gWorldMapCloud15Tex" OutName="world_map_cloud_15" Format="i4" Width="112" Height="72" Offset="0xA7E8"/>
|
||||
<Texture Name="gWorldMapCloud16Tex" OutName="world_map_cloud_16" Format="i4" Width="32" Height="24" Offset="0xB7A8"/>
|
||||
<Texture Name="gWorldMapCloudLakeHyliaTex" OutName="world_map_cloud_lake_hylia" Format="i4" Width="64" Height="60" Offset="0x8418"/>
|
||||
<Texture Name="gWorldMapCloudDesertColossusTex" OutName="world_map_cloud_desert_colossus" Format="i4" Width="48" Height="45" Offset="0x8B98"/>
|
||||
<Texture Name="gWorldMapCloudGerudosFortressTex" OutName="world_map_cloud_gerudos_fortress" Format="i4" Width="48" Height="32" Offset="0x8FD0"/>
|
||||
<Texture Name="gWorldMapCloudGerudoValleyTex" OutName="world_map_cloud_gerudo_valley" Format="i4" Width="48" Height="49" Offset="0x92D0"/>
|
||||
<Texture Name="gWorldMapCloudZorasFountainTex" OutName="world_map_cloud_zoras_fountain" Format="i4" Width="48" Height="21" Offset="0x9768"/>
|
||||
<Texture Name="gWorldMapCloudZorasDomainTex" OutName="world_map_cloud_zoras_domain" Format="i4" Width="32" Height="22" Offset="0x9960"/>
|
||||
<Texture Name="gWorldMapCloudZorasRiverTex" OutName="world_map_cloud_zoras_river" Format="i4" Width="64" Height="26" Offset="0x9AC0"/>
|
||||
<Texture Name="gWorldMapCloudGoronCityTex" OutName="world_map_cloud_goron_city" Format="i4" Width="32" Height="14" Offset="0x9E00"/>
|
||||
<Texture Name="gWorldMapCloudDeathMountainTrailTex" OutName="world_map_cloud_death_mountain_trail" Format="i4" Width="48" Height="27" Offset="0x9EE0"/>
|
||||
<Texture Name="gWorldMapCloudGraveyardTex" OutName="world_map_cloud_graveyard" Format="i4" Width="32" Height="19" Offset="0xA168"/>
|
||||
<Texture Name="gWorldMapCloudKakarikoVillageTex" OutName="world_map_cloud_kakariko_village" Format="i4" Width="32" Height="20" Offset="0xA298"/>
|
||||
<Texture Name="gWorldMapCloudHyruleCastleTex" OutName="world_map_cloud_hyrule_castle" Format="i4" Width="32" Height="19" Offset="0xA3D8"/>
|
||||
<Texture Name="gWorldMapCloudMarketTex" OutName="world_map_cloud_market" Format="i4" Width="48" Height="22" Offset="0xA508"/>
|
||||
<Texture Name="gWorldMapCloudLonLonRanchTex" OutName="world_map_cloud_lon_lon_ranch" Format="i4" Width="32" Height="13" Offset="0xA718"/>
|
||||
<Texture Name="gWorldMapCloudHyruleFieldTex" OutName="world_map_cloud_hyrule_field" Format="i4" Width="112" Height="72" Offset="0xA7E8"/>
|
||||
<Texture Name="gWorldMapCloudSacredForestMeadowTex" OutName="world_map_cloud_sacred_forest_meadow" Format="i4" Width="32" Height="24" Offset="0xB7A8"/>
|
||||
</File>
|
||||
</Root>
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
<Root>
|
||||
<File Name="map_name_static" Segment="11">
|
||||
|
||||
<!-- Place names for each world map point -->
|
||||
|
||||
<Texture Name="gHauntedWastelandPointNameENGTex" OutName="haunted_wasteland_point_name_eng" Format="ia4" Width="128" Height="16" Offset="0x0"/>
|
||||
<Texture Name="gGerudosFortressPointNameENGTex" OutName="gerudos_fortress_point_name_eng" Format="ia4" Width="128" Height="16" Offset="0x400"/>
|
||||
<Texture Name="gGerudoValleyPointNameENGTex" OutName="gerudo_valley_point_name_eng" Format="ia4" Width="128" Height="16" Offset="0x800"/>
|
||||
|
@ -12,6 +15,7 @@
|
|||
<Texture Name="gLostWoodsPointNameENGTex" OutName="lost_woods_point_name_eng" Format="ia4" Width="128" Height="16" Offset="0x2400"/>
|
||||
<Texture Name="gKokiriForestPointNameENGTex" OutName="kokiri_forest_point_name_eng" Format="ia4" Width="128" Height="16" Offset="0x2800"/>
|
||||
<Texture Name="gZorasDomainPointNameENGTex" OutName="zoras_domain_point_name_eng" Format="ia4" Width="128" Height="16" Offset="0x2c00"/>
|
||||
|
||||
<Texture Name="gHauntedWastelandPointNameGERTex" OutName="haunted_wasteland_point_name_ger" Format="ia4" Width="128" Height="16" Offset="0x3000"/>
|
||||
<Texture Name="gGerudosFortressPointNameGERTex" OutName="gerudos_fortress_point_name_ger" Format="ia4" Width="128" Height="16" Offset="0x3400"/>
|
||||
<Texture Name="gGerudoValleyPointNameGERTex" OutName="gerudo_valley_point_name_ger" Format="ia4" Width="128" Height="16" Offset="0x3800"/>
|
||||
|
@ -24,6 +28,7 @@
|
|||
<Texture Name="gLostWoodsPointNameGERTex" OutName="lost_woods_point_name_ger" Format="ia4" Width="128" Height="16" Offset="0x5400"/>
|
||||
<Texture Name="gKokiriForestPointNameGERTex" OutName="kokiri_forest_point_name_ger" Format="ia4" Width="128" Height="16" Offset="0x5800"/>
|
||||
<Texture Name="gZorasDomainPointNameGERTex" OutName="zoras_domain_point_name_ger" Format="ia4" Width="128" Height="16" Offset="0x5c00"/>
|
||||
|
||||
<Texture Name="gHauntedWastelandPointNameFRATex" OutName="haunted_wasteland_point_name_fra" Format="ia4" Width="128" Height="16" Offset="0x6000"/>
|
||||
<Texture Name="gGerudosFortressPointNameFRATex" OutName="gerudos_fortress_point_name_fra" Format="ia4" Width="128" Height="16" Offset="0x6400"/>
|
||||
<Texture Name="gGerudoValleyPointNameFRATex" OutName="gerudo_valley_point_name_fra" Format="ia4" Width="128" Height="16" Offset="0x6800"/>
|
||||
|
@ -36,6 +41,9 @@
|
|||
<Texture Name="gLostWoodsPointNameFRATex" OutName="lost_woods_point_name_fra" Format="ia4" Width="128" Height="16" Offset="0x8400"/>
|
||||
<Texture Name="gKokiriForestPointNameFRATex" OutName="kokiri_forest_point_name_fra" Format="ia4" Width="128" Height="16" Offset="0x8800"/>
|
||||
<Texture Name="gZorasDomainPointNameFRATex" OutName="zoras_domain_point_name_fra" Format="ia4" Width="128" Height="16" Offset="0x8c00"/>
|
||||
|
||||
<!-- Place names for each world map area -->
|
||||
|
||||
<Texture Name="gHyruleFieldPositionNameENGTex" OutName="hyrule_field_position_name_eng" Format="ia8" Width="80" Height="32" Offset="0x9000"/>
|
||||
<Texture Name="gKakarikoVillagePositionNameENGTex" OutName="kakariko_village_position_name_eng" Format="ia8" Width="80" Height="32" Offset="0x9a00"/>
|
||||
<Texture Name="gGraveyardPositionNameENGTex" OutName="graveyard_position_name_eng" Format="ia8" Width="80" Height="32" Offset="0xa400"/>
|
||||
|
@ -58,6 +66,7 @@
|
|||
<Texture Name="gLonLonRanchPositionNameENGTex" OutName="lon_lon_ranch_position_name_eng" Format="ia8" Width="80" Height="32" Offset="0x14e00"/>
|
||||
<Texture Name="gQuestionMarkPositionNameENGTex" OutName="question_mark_position_name_eng" Format="ia8" Width="80" Height="32" Offset="0x15800"/>
|
||||
<Texture Name="gGanonsCastlePositionNameENGTex" OutName="ganons_castle_position_name_eng" Format="ia8" Width="80" Height="32" Offset="0x16200"/>
|
||||
|
||||
<Texture Name="gHyruleFieldPositionNameGERTex" OutName="hyrule_field_position_name_ger" Format="ia8" Width="80" Height="32" Offset="0x16c00"/>
|
||||
<Texture Name="gKakarikoVillagePositionNameGERTex" OutName="kakariko_village_position_name_ger" Format="ia8" Width="80" Height="32" Offset="0x17600"/>
|
||||
<Texture Name="gGraveyardPositionNameGERTex" OutName="graveyard_position_name_ger" Format="ia8" Width="80" Height="32" Offset="0x18000"/>
|
||||
|
@ -80,6 +89,7 @@
|
|||
<Texture Name="gLonLonRanchPositionNameGERTex" OutName="lon_lon_ranch_position_name_ger" Format="ia8" Width="80" Height="32" Offset="0x22a00"/>
|
||||
<Texture Name="gQuestionMarkPositionNameGERTex" OutName="question_mark_position_name_ger" Format="ia8" Width="80" Height="32" Offset="0x23400"/>
|
||||
<Texture Name="gGanonsCastlePositionNameGERTex" OutName="ganons_castle_position_name_ger" Format="ia8" Width="80" Height="32" Offset="0x23e00"/>
|
||||
|
||||
<Texture Name="gHyruleFieldPositionNameFRATex" OutName="hyrule_field_position_name_fra" Format="ia8" Width="80" Height="32" Offset="0x24800"/>
|
||||
<Texture Name="gKakarikoVillagePositionNameFRATex" OutName="kakariko_village_position_name_fra" Format="ia8" Width="80" Height="32" Offset="0x25200"/>
|
||||
<Texture Name="gGraveyardPositionNameFRATex" OutName="graveyard_position_name_fra" Format="ia8" Width="80" Height="32" Offset="0x25c00"/>
|
||||
|
@ -102,5 +112,6 @@
|
|||
<Texture Name="gLonLonRanchPositionNameFRATex" OutName="lon_lon_ranch_position_name_fra" Format="ia8" Width="80" Height="32" Offset="0x30600"/>
|
||||
<Texture Name="gQuestionMarkPositionNameFRATex" OutName="question_mark_position_name_fra" Format="ia8" Width="80" Height="32" Offset="0x31000"/>
|
||||
<Texture Name="gGanonsCastlePositionNameFRATex" OutName="ganons_castle_position_name_fra" Format="ia8" Width="80" Height="32" Offset="0x31a00"/>
|
||||
|
||||
</File>
|
||||
</Root>
|
||||
|
|
|
@ -751,6 +751,7 @@ typedef enum {
|
|||
#define PAUSE_EQUIP_PLAYER_WIDTH 64
|
||||
#define PAUSE_EQUIP_PLAYER_HEIGHT 112
|
||||
#define PAUSE_EQUIP_PLAYER_FRAG_HEIGHT (TMEM_SIZE / (PAUSE_EQUIP_PLAYER_WIDTH * G_IM_SIZ_16b_BYTES))
|
||||
#define PAUSE_EQUIP_PLAYER_FRAG_NUM (((PAUSE_EQUIP_PLAYER_HEIGHT - 1) / PAUSE_EQUIP_PLAYER_FRAG_HEIGHT) + 1)
|
||||
|
||||
#define PAUSE_EQUIP_BUFFER_SIZE sizeof(u16[PAUSE_EQUIP_PLAYER_HEIGHT][PAUSE_EQUIP_PLAYER_WIDTH])
|
||||
#define PAUSE_PLAYER_SEGMENT_GAMEPLAY_KEEP_BUFFER_SIZE 0x5000
|
||||
|
@ -822,6 +823,30 @@ typedef enum {
|
|||
/* 5 */ PAUSE_QUAD_CURSOR_MAX
|
||||
} PauseCursorQuad;
|
||||
|
||||
typedef enum{
|
||||
/* 0 */ WORLD_MAP_POINT_HAUNTED_WASTELAND,
|
||||
/* 1 */ WORLD_MAP_POINT_GERUDOS_FORTRESS,
|
||||
/* 2 */ WORLD_MAP_POINT_GERUDO_VALLEY,
|
||||
/* 3 */ WORLD_MAP_POINT_HYLIA_LAKESIDE,
|
||||
/* 4 */ WORLD_MAP_POINT_LON_LON_RANCH,
|
||||
/* 5 */ WORLD_MAP_POINT_MARKET,
|
||||
/* 6 */ WORLD_MAP_POINT_HYRULE_FIELD,
|
||||
/* 7 */ WORLD_MAP_POINT_DEATH_MOUNTAIN,
|
||||
/* 8 */ WORLD_MAP_POINT_KAKARIKO_VILLAGE,
|
||||
/* 9 */ WORLD_MAP_POINT_LOST_WOODS,
|
||||
/* 10 */ WORLD_MAP_POINT_KOKIRI_FOREST,
|
||||
/* 11 */ WORLD_MAP_POINT_ZORAS_DOMAIN,
|
||||
/* 12 */ WORLD_MAP_POINT_MAX
|
||||
} WorldMapPoint;
|
||||
|
||||
#define TRADE_QUEST_LOCATION_NONE 0xFF
|
||||
|
||||
typedef enum{
|
||||
/* 0 */ WORLD_MAP_POINT_STATE_HIDE,
|
||||
/* 1 */ WORLD_MAP_POINT_STATE_SHOW,
|
||||
/* 2 */ WORLD_MAP_POINT_STATE_HIGHLIGHT
|
||||
} WorldMapPointState;
|
||||
|
||||
typedef struct {
|
||||
/* 0x0000 */ View view;
|
||||
/* 0x0128 */ u8* iconItemSegment;
|
||||
|
@ -887,7 +912,7 @@ typedef struct {
|
|||
/* 0x0260 */ s16 cursorColorSet; // 0 = white; 4 = yellow; 8 = green
|
||||
/* 0x0262 */ s16 promptChoice; // save/continue choice: 0 = yes; 4 = no
|
||||
/* 0x0264 */ s16 ocarinaSongIdx;
|
||||
/* 0x0266 */ u8 worldMapPoints[20]; // 0 = hidden; 1 = displayed; 2 = highlighted
|
||||
/* 0x0266 */ u8 worldMapPoints[20]; // indices: `WorldMapPoint` enum, values: `WorldMapPointState` enum
|
||||
/* 0x027A */ u8 tradeQuestLocation;
|
||||
/* 0x027C */ SkelAnime playerSkelAnime;
|
||||
} PauseContext; // size = 0x2C0
|
||||
|
|
|
@ -99,6 +99,32 @@ typedef struct {
|
|||
/* 0x24 */ s32 tempCollectFlags;
|
||||
} FaroresWindData; // size = 0x28
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ WORLD_MAP_AREA_HYRULE_FIELD, // hyrule field / default / unset ?
|
||||
/* 1 */ WORLD_MAP_AREA_KAKARIKO_VILLAGE,
|
||||
/* 2 */ WORLD_MAP_AREA_GRAVEYARD,
|
||||
/* 3 */ WORLD_MAP_AREA_ZORAS_RIVER,
|
||||
/* 4 */ WORLD_MAP_AREA_KOKIRI_FOREST,
|
||||
/* 5 */ WORLD_MAP_AREA_SACRED_FOREST_MEADOW,
|
||||
/* 6 */ WORLD_MAP_AREA_LAKE_HYLIA,
|
||||
/* 7 */ WORLD_MAP_AREA_ZORAS_DOMAIN,
|
||||
/* 8 */ WORLD_MAP_AREA_ZORAS_FOUNTAIN,
|
||||
/* 9 */ WORLD_MAP_AREA_GERUDO_VALLEY,
|
||||
/* 10 */ WORLD_MAP_AREA_LOST_WOODS,
|
||||
/* 11 */ WORLD_MAP_AREA_DESERT_COLOSSUS,
|
||||
/* 12 */ WORLD_MAP_AREA_GERUDOS_FORTRESS,
|
||||
/* 13 */ WORLD_MAP_AREA_HAUNTED_WASTELAND,
|
||||
/* 14 */ WORLD_MAP_AREA_MARKET,
|
||||
/* 15 */ WORLD_MAP_AREA_HYRULE_CASTLE,
|
||||
/* 16 */ WORLD_MAP_AREA_DEATH_MOUNTAIN_TRAIL,
|
||||
/* 17 */ WORLD_MAP_AREA_DEATH_MOUNTAIN_CRATER,
|
||||
/* 18 */ WORLD_MAP_AREA_GORON_CITY,
|
||||
/* 19 */ WORLD_MAP_AREA_LON_LON_RANCH,
|
||||
/* 20 */ WORLD_MAP_AREA_20, // hakasitarelay and a lon lon ranch cutscene, gQuestionMarkPositionNameENGTex
|
||||
/* 21 */ WORLD_MAP_AREA_GANONS_CASTLE,
|
||||
/* 22 */ WORLD_MAP_AREA_MAX // grottos and fairy's/great fairy's fountains (scenes with varying locations)
|
||||
} WorldMapArea;
|
||||
|
||||
typedef struct {
|
||||
/* 0x0000 */ s32 entranceIndex; // start of `save` substruct, originally called "memory"
|
||||
/* 0x0004 */ s32 linkAge; // 0: Adult; 1: Child (see enum `LinkAge`)
|
||||
|
|
|
@ -1424,7 +1424,7 @@ void Play_InitScene(PlayState* this, s32 spawn) {
|
|||
TransitionActor_InitContext(&this->state, &this->transiActorCtx);
|
||||
func_80096FD4(this, &this->roomCtx.curRoom);
|
||||
R_SCENE_CAM_TYPE = SCENE_CAM_TYPE_DEFAULT;
|
||||
gSaveContext.worldMapArea = 0;
|
||||
gSaveContext.worldMapArea = WORLD_MAP_AREA_HYRULE_FIELD;
|
||||
Scene_ExecuteCommands(this, this->sceneSegment);
|
||||
Play_InitEnvironment(this, this->skyboxId);
|
||||
}
|
||||
|
|
|
@ -454,7 +454,7 @@ void Scene_CommandMiscSettings(PlayState* play, SceneCmd* cmd) {
|
|||
|
||||
if ((play->sceneId == SCENE_SHOP1) || (play->sceneId == SCENE_SYATEKIJYOU)) {
|
||||
if (LINK_AGE_IN_YEARS == YEARS_ADULT) {
|
||||
gSaveContext.worldMapArea = 1;
|
||||
gSaveContext.worldMapArea = WORLD_MAP_AREA_KAKARIKO_VILLAGE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -144,7 +144,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
pauseCtx->cursorSpecialPos = 0;
|
||||
pauseCtx->cursorSlot[PAUSE_MAP] = pauseCtx->cursorPoint[PAUSE_MAP] = pauseCtx->dungeonMapSlot;
|
||||
pauseCtx->cursorX[PAUSE_MAP] = 0;
|
||||
j = 72 + (pauseCtx->cursorSlot[PAUSE_MAP] * 4);
|
||||
j = (PAGE_BG_QUADS + 3 + pauseCtx->cursorSlot[PAUSE_MAP]) * 4;
|
||||
KaleidoScope_SetCursorPos(pauseCtx, j, pauseCtx->mapPageVtx);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
|
@ -175,7 +175,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
}
|
||||
|
||||
osSyncPrintf("kscope->cursor_point====%d\n", pauseCtx->cursorPoint[PAUSE_MAP]);
|
||||
j = 72 + (pauseCtx->cursorSlot[PAUSE_MAP] * 4);
|
||||
j = (PAGE_BG_QUADS + 3 + pauseCtx->cursorSlot[PAUSE_MAP]) * 4;
|
||||
KaleidoScope_SetCursorPos(pauseCtx, j, pauseCtx->mapPageVtx);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
|
@ -197,7 +197,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
|
||||
pauseCtx->cursorSlot[PAUSE_MAP] = pauseCtx->cursorPoint[PAUSE_MAP];
|
||||
|
||||
j = 72 + (pauseCtx->cursorSlot[PAUSE_MAP] * 4);
|
||||
j = (PAGE_BG_QUADS + 3 + pauseCtx->cursorSlot[PAUSE_MAP]) * 4;
|
||||
KaleidoScope_SetCursorPos(pauseCtx, j, pauseCtx->mapPageVtx);
|
||||
|
||||
if (pauseCtx->cursorX[PAUSE_MAP] == 0) {
|
||||
|
@ -216,7 +216,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha);
|
||||
gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
||||
|
||||
gSPVertex(POLY_OPA_DISP++, &pauseCtx->mapPageVtx[68], 16, 0);
|
||||
gSPVertex(POLY_OPA_DISP++, &pauseCtx->mapPageVtx[(PAGE_BG_QUADS + 2) * 4], 16, 0);
|
||||
|
||||
gDPLoadTextureBlock(POLY_OPA_DISP++, dungeonTitleTexs[gSaveContext.mapIndex], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 16, 0,
|
||||
G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
|
||||
|
@ -241,7 +241,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 200, pauseCtx->alpha);
|
||||
|
||||
gSPVertex(POLY_OPA_DISP++, &pauseCtx->mapPageVtx[84], 32, 0);
|
||||
gSPVertex(POLY_OPA_DISP++, &pauseCtx->mapPageVtx[(PAGE_BG_QUADS + 6) * 4], 32, 0);
|
||||
|
||||
for (i = j = 0; i < 8; i++, j += 4) {
|
||||
if ((gSaveContext.sceneFlags[gSaveContext.mapIndex].floors & gBitFlags[i]) ||
|
||||
|
@ -268,18 +268,26 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
|
||||
gSP1Quadrangle(POLY_OPA_DISP++, j, j + 2, j + 3, j + 1, 0);
|
||||
|
||||
pauseCtx->mapPageVtx[124].v.ob[0] = pauseCtx->mapPageVtx[126].v.ob[0] = pauseCtx->mapPageVtx[124].v.ob[0] + 2;
|
||||
pauseCtx->mapPageVtx[125].v.ob[0] = pauseCtx->mapPageVtx[127].v.ob[0] = pauseCtx->mapPageVtx[124].v.ob[0] + 19;
|
||||
pauseCtx->mapPageVtx[124].v.ob[1] = pauseCtx->mapPageVtx[125].v.ob[1] = pauseCtx->mapPageVtx[124].v.ob[1] - 2;
|
||||
pauseCtx->mapPageVtx[126].v.ob[1] = pauseCtx->mapPageVtx[127].v.ob[1] = pauseCtx->mapPageVtx[124].v.ob[1] - 19;
|
||||
// Quad PAGE_BG_QUADS + 16
|
||||
pauseCtx->mapPageVtx[31 * 4 + 0].v.ob[0] = pauseCtx->mapPageVtx[31 * 4 + 2].v.ob[0] =
|
||||
pauseCtx->mapPageVtx[31 * 4 + 0].v.ob[0] + 2;
|
||||
pauseCtx->mapPageVtx[31 * 4 + 1].v.ob[0] = pauseCtx->mapPageVtx[31 * 4 + 3].v.ob[0] =
|
||||
pauseCtx->mapPageVtx[31 * 4 + 0].v.ob[0] + 19;
|
||||
pauseCtx->mapPageVtx[31 * 4 + 0].v.ob[1] = pauseCtx->mapPageVtx[31 * 4 + 1].v.ob[1] =
|
||||
pauseCtx->mapPageVtx[31 * 4 + 0].v.ob[1] - 2;
|
||||
pauseCtx->mapPageVtx[31 * 4 + 2].v.ob[1] = pauseCtx->mapPageVtx[31 * 4 + 3].v.ob[1] =
|
||||
pauseCtx->mapPageVtx[31 * 4 + 0].v.ob[1] - 19;
|
||||
|
||||
gSPVertex(POLY_OPA_DISP++, &pauseCtx->mapPageVtx[116], 12, 0);
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha);
|
||||
|
||||
pauseCtx->mapPageVtx[116].v.ob[1] = pauseCtx->mapPageVtx[117].v.ob[1] = pauseCtx->offsetY - (VREG(30) * 14) + 49;
|
||||
pauseCtx->mapPageVtx[118].v.ob[1] = pauseCtx->mapPageVtx[119].v.ob[1] = pauseCtx->mapPageVtx[116].v.ob[1] - 16;
|
||||
// Quad PAGE_BG_QUADS + 14
|
||||
pauseCtx->mapPageVtx[29 * 4 + 0].v.ob[1] = pauseCtx->mapPageVtx[29 * 4 + 1].v.ob[1] =
|
||||
pauseCtx->offsetY - (VREG(30) * 14) + 49;
|
||||
pauseCtx->mapPageVtx[29 * 4 + 2].v.ob[1] = pauseCtx->mapPageVtx[29 * 4 + 3].v.ob[1] =
|
||||
pauseCtx->mapPageVtx[29 * 4 + 0].v.ob[1] - 16;
|
||||
|
||||
gDPLoadTextureBlock(POLY_OPA_DISP++, gDungeonMapLinkHeadTex, G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 16, 0,
|
||||
G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
|
||||
|
@ -289,9 +297,12 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
|
||||
if (CHECK_DUNGEON_ITEM(DUNGEON_COMPASS, gSaveContext.mapIndex) &&
|
||||
(gMapData->skullFloorIconY[gSaveContext.mapIndex] != -99)) {
|
||||
pauseCtx->mapPageVtx[120].v.ob[1] = pauseCtx->mapPageVtx[121].v.ob[1] =
|
||||
|
||||
// Quad PAGE_BG_QUADS + 15
|
||||
pauseCtx->mapPageVtx[30 * 4 + 0].v.ob[1] = pauseCtx->mapPageVtx[30 * 4 + 1].v.ob[1] =
|
||||
gMapData->skullFloorIconY[gSaveContext.mapIndex] + pauseCtx->offsetY;
|
||||
pauseCtx->mapPageVtx[122].v.ob[1] = pauseCtx->mapPageVtx[123].v.ob[1] = pauseCtx->mapPageVtx[120].v.ob[1] - 16;
|
||||
pauseCtx->mapPageVtx[30 * 4 + 2].v.ob[1] = pauseCtx->mapPageVtx[30 * 4 + 3].v.ob[1] =
|
||||
pauseCtx->mapPageVtx[30 * 4 + 0].v.ob[1] - 16;
|
||||
|
||||
gDPLoadTextureBlock(POLY_OPA_DISP++, gDungeonMapSkullTex, G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 16, 0,
|
||||
G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
|
||||
|
@ -332,7 +343,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
gDPLoadTLUT_pal16(POLY_OPA_DISP++, 0, interfaceCtx->mapPalette);
|
||||
gDPSetTextureLUT(POLY_OPA_DISP++, G_TT_RGBA16);
|
||||
|
||||
gSPVertex(POLY_OPA_DISP++, &pauseCtx->mapPageVtx[60], 8, 0);
|
||||
gSPVertex(POLY_OPA_DISP++, &pauseCtx->mapPageVtx[(PAGE_BG_QUADS + 0) * 4], 8, 0);
|
||||
|
||||
gDPLoadTextureBlock_4b(POLY_OPA_DISP++, interfaceCtx->mapSegment, G_IM_FMT_CI, 48, 85, 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);
|
||||
|
@ -353,13 +364,40 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
|
||||
void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
static void* cloudTexs[] = {
|
||||
gWorldMapCloud16Tex, gWorldMapCloud15Tex, gWorldMapCloud14Tex, gWorldMapCloud13Tex,
|
||||
gWorldMapCloud12Tex, gWorldMapCloud11Tex, gWorldMapCloud10Tex, gWorldMapCloud9Tex,
|
||||
gWorldMapCloud8Tex, gWorldMapCloud7Tex, gWorldMapCloud6Tex, gWorldMapCloud5Tex,
|
||||
gWorldMapCloud4Tex, gWorldMapCloud3Tex, gWorldMapCloud2Tex, gWorldMapCloud1Tex,
|
||||
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[] = {
|
||||
0x05, 0x00, 0x13, 0x0E, 0x0F, 0x01, 0x02, 0x10, 0x12, 0x03, 0x07, 0x08, 0x09, 0x0C, 0x0B, 0x06,
|
||||
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] = {
|
||||
|
@ -375,23 +413,124 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
static s16 pointPulseTimer = 20;
|
||||
static s16 D_8082A5B8[] = { 64, 64, 64, 28 };
|
||||
static s16 areaBoxPosX[] = {
|
||||
-41, 19, 44, 40, 49, 51, -49, 83, 80, -67, 50, -109, -76, -86, -10, -6, 19, 24, 11, -17, 37, -6,
|
||||
-41, // WORLD_MAP_AREA_HYRULE_FIELD
|
||||
19, // WORLD_MAP_AREA_KAKARIKO_VILLAGE
|
||||
44, // WORLD_MAP_AREA_GRAVEYARD
|
||||
40, // WORLD_MAP_AREA_ZORAS_RIVER
|
||||
49, // WORLD_MAP_AREA_KOKIRI_FOREST
|
||||
51, // WORLD_MAP_AREA_SACRED_FOREST_MEADOW
|
||||
-49, // WORLD_MAP_AREA_LAKE_HYLIA
|
||||
83, // WORLD_MAP_AREA_ZORAS_DOMAIN
|
||||
80, // WORLD_MAP_AREA_ZORAS_FOUNTAIN
|
||||
-67, // WORLD_MAP_AREA_GERUDO_VALLEY
|
||||
50, // WORLD_MAP_AREA_LOST_WOODS
|
||||
-109, // WORLD_MAP_AREA_DESERT_COLOSSUS
|
||||
-76, // WORLD_MAP_AREA_GERUDOS_FORTRESS
|
||||
-86, // WORLD_MAP_AREA_HAUNTED_WASTELAND
|
||||
-10, // WORLD_MAP_AREA_MARKET
|
||||
-6, // WORLD_MAP_AREA_HYRULE_CASTLE
|
||||
19, // WORLD_MAP_AREA_DEATH_MOUNTAIN_TRAIL
|
||||
24, // WORLD_MAP_AREA_DEATH_MOUNTAIN_CRATER
|
||||
11, // WORLD_MAP_AREA_GORON_CITY
|
||||
-17, // WORLD_MAP_AREA_LON_LON_RANCH
|
||||
37, // WORLD_MAP_AREA_20
|
||||
-6, // WORLD_MAP_AREA_GANONS_CASTLE
|
||||
};
|
||||
static s16 areaBoxWidths[] = {
|
||||
96, 32, 32, 48, 48, 32, 48, 32, 32, 32, 16, 32, 32, 16, 32, 32, 32, 32, 32, 32, 16, 32,
|
||||
96, // WORLD_MAP_AREA_HYRULE_FIELD
|
||||
32, // WORLD_MAP_AREA_KAKARIKO_VILLAGE
|
||||
32, // WORLD_MAP_AREA_GRAVEYARD
|
||||
48, // WORLD_MAP_AREA_ZORAS_RIVER
|
||||
48, // WORLD_MAP_AREA_KOKIRI_FOREST
|
||||
32, // WORLD_MAP_AREA_SACRED_FOREST_MEADOW
|
||||
48, // WORLD_MAP_AREA_LAKE_HYLIA
|
||||
32, // WORLD_MAP_AREA_ZORAS_DOMAIN
|
||||
32, // WORLD_MAP_AREA_ZORAS_FOUNTAIN
|
||||
32, // WORLD_MAP_AREA_GERUDO_VALLEY
|
||||
16, // WORLD_MAP_AREA_LOST_WOODS
|
||||
32, // WORLD_MAP_AREA_DESERT_COLOSSUS
|
||||
32, // WORLD_MAP_AREA_GERUDOS_FORTRESS
|
||||
16, // WORLD_MAP_AREA_HAUNTED_WASTELAND
|
||||
32, // WORLD_MAP_AREA_MARKET
|
||||
32, // WORLD_MAP_AREA_HYRULE_CASTLE
|
||||
32, // WORLD_MAP_AREA_DEATH_MOUNTAIN_TRAIL
|
||||
32, // WORLD_MAP_AREA_DEATH_MOUNTAIN_CRATER
|
||||
32, // WORLD_MAP_AREA_GORON_CITY
|
||||
32, // WORLD_MAP_AREA_LON_LON_RANCH
|
||||
16, // WORLD_MAP_AREA_20
|
||||
32, // WORLD_MAP_AREA_GANONS_CASTLE
|
||||
};
|
||||
static s16 areaBoxPosY[] = {
|
||||
30, 36, 35, 26, 7, 11, -31, 30, 38, 23, 2, 42, 40, 32, 38, 50, 57, 58, 56, 12, 36, 50,
|
||||
30, // WORLD_MAP_AREA_HYRULE_FIELD
|
||||
36, // WORLD_MAP_AREA_KAKARIKO_VILLAGE
|
||||
35, // WORLD_MAP_AREA_GRAVEYARD
|
||||
26, // WORLD_MAP_AREA_ZORAS_RIVER
|
||||
7, // WORLD_MAP_AREA_KOKIRI_FOREST
|
||||
11, // WORLD_MAP_AREA_SACRED_FOREST_MEADOW
|
||||
-31, // WORLD_MAP_AREA_LAKE_HYLIA
|
||||
30, // WORLD_MAP_AREA_ZORAS_DOMAIN
|
||||
38, // WORLD_MAP_AREA_ZORAS_FOUNTAIN
|
||||
23, // WORLD_MAP_AREA_GERUDO_VALLEY
|
||||
2, // WORLD_MAP_AREA_LOST_WOODS
|
||||
42, // WORLD_MAP_AREA_DESERT_COLOSSUS
|
||||
40, // WORLD_MAP_AREA_GERUDOS_FORTRESS
|
||||
32, // WORLD_MAP_AREA_HAUNTED_WASTELAND
|
||||
38, // WORLD_MAP_AREA_MARKET
|
||||
50, // WORLD_MAP_AREA_HYRULE_CASTLE
|
||||
57, // WORLD_MAP_AREA_DEATH_MOUNTAIN_TRAIL
|
||||
58, // WORLD_MAP_AREA_DEATH_MOUNTAIN_CRATER
|
||||
56, // WORLD_MAP_AREA_GORON_CITY
|
||||
12, // WORLD_MAP_AREA_LON_LON_RANCH
|
||||
36, // WORLD_MAP_AREA_20
|
||||
50, // WORLD_MAP_AREA_GANONS_CASTLE
|
||||
};
|
||||
static s16 areaBoxHeights[] = {
|
||||
59, 19, 13, 19, 38, 17, 38, 17, 13, 26, 16, 26, 26, 16, 19, 17, 26, 13, 17, 17, 16, 17,
|
||||
59, // WORLD_MAP_AREA_HYRULE_FIELD
|
||||
19, // WORLD_MAP_AREA_KAKARIKO_VILLAGE
|
||||
13, // WORLD_MAP_AREA_GRAVEYARD
|
||||
19, // WORLD_MAP_AREA_ZORAS_RIVER
|
||||
38, // WORLD_MAP_AREA_KOKIRI_FOREST
|
||||
17, // WORLD_MAP_AREA_SACRED_FOREST_MEADOW
|
||||
38, // WORLD_MAP_AREA_LAKE_HYLIA
|
||||
17, // WORLD_MAP_AREA_ZORAS_DOMAIN
|
||||
13, // WORLD_MAP_AREA_ZORAS_FOUNTAIN
|
||||
26, // WORLD_MAP_AREA_GERUDO_VALLEY
|
||||
16, // WORLD_MAP_AREA_LOST_WOODS
|
||||
26, // WORLD_MAP_AREA_DESERT_COLOSSUS
|
||||
26, // WORLD_MAP_AREA_GERUDOS_FORTRESS
|
||||
16, // WORLD_MAP_AREA_HAUNTED_WASTELAND
|
||||
19, // WORLD_MAP_AREA_MARKET
|
||||
17, // WORLD_MAP_AREA_HYRULE_CASTLE
|
||||
26, // WORLD_MAP_AREA_DEATH_MOUNTAIN_TRAIL
|
||||
13, // WORLD_MAP_AREA_DEATH_MOUNTAIN_CRATER
|
||||
17, // WORLD_MAP_AREA_GORON_CITY
|
||||
17, // WORLD_MAP_AREA_LON_LON_RANCH
|
||||
16, // WORLD_MAP_AREA_20
|
||||
17, // WORLD_MAP_AREA_GANONS_CASTLE
|
||||
};
|
||||
static void* areaBoxTexs[] = {
|
||||
gWorldMapAreaBox7Tex, gWorldMapAreaBox1Tex, gWorldMapAreaBox4Tex, gWorldMapAreaBox6Tex, gWorldMapAreaBox2Tex,
|
||||
gWorldMapAreaBox3Tex, gWorldMapAreaBox2Tex, gWorldMapAreaBox3Tex, gWorldMapAreaBox4Tex, gWorldMapAreaBox5Tex,
|
||||
gWorldMapAreaBox8Tex, gWorldMapAreaBox5Tex, gWorldMapAreaBox5Tex, gWorldMapAreaBox8Tex, gWorldMapAreaBox1Tex,
|
||||
gWorldMapAreaBox3Tex, gWorldMapAreaBox5Tex, gWorldMapAreaBox4Tex, gWorldMapAreaBox3Tex, gWorldMapAreaBox3Tex,
|
||||
gWorldMapAreaBox8Tex, gWorldMapAreaBox3Tex,
|
||||
gWorldMapAreaBox7Tex, // WORLD_MAP_AREA_HYRULE_FIELD
|
||||
gWorldMapAreaBox1Tex, // WORLD_MAP_AREA_KAKARIKO_VILLAGE
|
||||
gWorldMapAreaBox4Tex, // WORLD_MAP_AREA_GRAVEYARD
|
||||
gWorldMapAreaBox6Tex, // WORLD_MAP_AREA_ZORAS_RIVER
|
||||
gWorldMapAreaBox2Tex, // WORLD_MAP_AREA_KOKIRI_FOREST
|
||||
gWorldMapAreaBox3Tex, // WORLD_MAP_AREA_SACRED_FOREST_MEADOW
|
||||
gWorldMapAreaBox2Tex, // WORLD_MAP_AREA_LAKE_HYLIA
|
||||
gWorldMapAreaBox3Tex, // WORLD_MAP_AREA_ZORAS_DOMAIN
|
||||
gWorldMapAreaBox4Tex, // WORLD_MAP_AREA_ZORAS_FOUNTAIN
|
||||
gWorldMapAreaBox5Tex, // WORLD_MAP_AREA_GERUDO_VALLEY
|
||||
gWorldMapAreaBox8Tex, // WORLD_MAP_AREA_LOST_WOODS
|
||||
gWorldMapAreaBox5Tex, // WORLD_MAP_AREA_DESERT_COLOSSUS
|
||||
gWorldMapAreaBox5Tex, // WORLD_MAP_AREA_GERUDOS_FORTRESS
|
||||
gWorldMapAreaBox8Tex, // WORLD_MAP_AREA_HAUNTED_WASTELAND
|
||||
gWorldMapAreaBox1Tex, // WORLD_MAP_AREA_MARKET
|
||||
gWorldMapAreaBox3Tex, // WORLD_MAP_AREA_HYRULE_CASTLE
|
||||
gWorldMapAreaBox5Tex, // WORLD_MAP_AREA_DEATH_MOUNTAIN_TRAIL
|
||||
gWorldMapAreaBox4Tex, // WORLD_MAP_AREA_DEATH_MOUNTAIN_CRATER
|
||||
gWorldMapAreaBox3Tex, // WORLD_MAP_AREA_GORON_CITY
|
||||
gWorldMapAreaBox3Tex, // WORLD_MAP_AREA_LON_LON_RANCH
|
||||
gWorldMapAreaBox8Tex, // WORLD_MAP_AREA_20
|
||||
gWorldMapAreaBox3Tex, // WORLD_MAP_AREA_GANONS_CASTLE
|
||||
};
|
||||
static void* currentPosTitleTexs[] = {
|
||||
gPauseCurrentPositionENGTex,
|
||||
|
@ -422,12 +561,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;
|
||||
|
||||
|
@ -438,27 +578,37 @@ 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_SetCursorPos(pauseCtx, pauseCtx->cursorSlot[PAUSE_MAP] * 4, pauseCtx->mapPageVtx);
|
||||
} else {
|
||||
|
||||
//! @bug This causes a weird DMA request in `KaleidoScope_UpdateNamePanel`, either for unintended data or
|
||||
//! outside the intended segment.
|
||||
// This isn't a visual issue in practice because drawing the texture loaded in
|
||||
// `KaleidoScope_UpdateNamePanel` is only done under `cursorSpecialPos == 0`.
|
||||
pauseCtx->cursorItem[PAUSE_MAP] = gSaveContext.worldMapArea + 0x18;
|
||||
|
||||
if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
|
||||
if (pauseCtx->stickAdjX > 30) {
|
||||
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_SetCursorPos(pauseCtx, pauseCtx->cursorSlot[PAUSE_MAP] * 4, pauseCtx->mapPageVtx);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
|
@ -466,15 +616,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_SetCursorPos(pauseCtx, pauseCtx->cursorSlot[PAUSE_MAP] * 4, pauseCtx->mapPageVtx);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
|
@ -483,7 +635,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;
|
||||
}
|
||||
|
||||
|
@ -502,29 +654,32 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
gDPSetTextureLUT(POLY_OPA_DISP++, G_TT_RGBA16);
|
||||
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha);
|
||||
gSPVertex(POLY_OPA_DISP++, &pauseCtx->mapPageVtx[188], 32, 0);
|
||||
gSPVertex(POLY_OPA_DISP++, &pauseCtx->mapPageVtx[(PAGE_BG_QUADS + QUAD_MAP_WORLD_IMAGE_FIRST) * 4], 32, 0);
|
||||
|
||||
for (j = t = i = 0; i < 8; i++, t++, j += 4) {
|
||||
gDPLoadTextureBlock(POLY_OPA_DISP++, (u8*)gWorldMapImageTex + t * 216 * 9, G_IM_FMT_CI, G_IM_SIZ_8b, 216, 9,
|
||||
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);
|
||||
gDPLoadTextureBlock(
|
||||
POLY_OPA_DISP++, (u8*)gWorldMapImageTex + t * WORLD_MAP_IMAGE_WIDTH * WORLD_MAP_IMAGE_FRAG_HEIGHT,
|
||||
G_IM_FMT_CI, G_IM_SIZ_8b, WORLD_MAP_IMAGE_WIDTH, WORLD_MAP_IMAGE_FRAG_HEIGHT, 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);
|
||||
|
||||
gSP1Quadrangle(POLY_OPA_DISP++, j, j + 2, j + 3, j + 1, 0);
|
||||
}
|
||||
|
||||
gSPVertex(POLY_OPA_DISP++, &pauseCtx->mapPageVtx[220], 28, 0);
|
||||
gSPVertex(POLY_OPA_DISP++, &pauseCtx->mapPageVtx[(PAGE_BG_QUADS + QUAD_MAP_WORLD_IMAGE_FIRST + 8) * 4], 28, 0);
|
||||
|
||||
for (j = i = 0; i < 6; i++, t++, j += 4) {
|
||||
gDPLoadTextureBlock(POLY_OPA_DISP++, (u8*)gWorldMapImageTex + t * 216 * 9, G_IM_FMT_CI, G_IM_SIZ_8b, 216, 9,
|
||||
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);
|
||||
gDPLoadTextureBlock(
|
||||
POLY_OPA_DISP++, (u8*)gWorldMapImageTex + t * WORLD_MAP_IMAGE_WIDTH * WORLD_MAP_IMAGE_FRAG_HEIGHT,
|
||||
G_IM_FMT_CI, G_IM_SIZ_8b, WORLD_MAP_IMAGE_WIDTH, WORLD_MAP_IMAGE_FRAG_HEIGHT, 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);
|
||||
|
||||
gSP1Quadrangle(POLY_OPA_DISP++, j, j + 2, j + 3, j + 1, 0);
|
||||
}
|
||||
|
||||
gDPLoadTextureBlock(POLY_OPA_DISP++, (u8*)gWorldMapImageTex + t * 216 * 9, G_IM_FMT_CI, G_IM_SIZ_8b, 216, 2, 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);
|
||||
gDPLoadTextureBlock(
|
||||
POLY_OPA_DISP++, (u8*)gWorldMapImageTex + t * WORLD_MAP_IMAGE_WIDTH * WORLD_MAP_IMAGE_FRAG_HEIGHT,
|
||||
G_IM_FMT_CI, G_IM_SIZ_8b, WORLD_MAP_IMAGE_WIDTH, WORLD_MAP_IMAGE_HEIGHT % WORLD_MAP_IMAGE_FRAG_HEIGHT, 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);
|
||||
|
||||
gSP1Quadrangle(POLY_OPA_DISP++, j, j + 2, j + 3, j + 1, 0);
|
||||
} else if (HREG(15) == 1) {
|
||||
|
@ -532,8 +687,9 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
|
||||
gSPLoadUcodeL(gfx++, gspS2DEX2d_fifo);
|
||||
|
||||
Room_DrawBackground2D(&gfx, gWorldMapImageTex, gWorldMapImageTLUT, 216, 128, G_IM_FMT_CI, G_IM_SIZ_8b,
|
||||
G_TT_RGBA16, 256, HREG(13) / 100.0f, HREG(14) / 100.0f);
|
||||
Room_DrawBackground2D(&gfx, gWorldMapImageTex, gWorldMapImageTLUT, WORLD_MAP_IMAGE_WIDTH,
|
||||
WORLD_MAP_IMAGE_HEIGHT, G_IM_FMT_CI, G_IM_SIZ_8b, G_TT_RGBA16, 256, HREG(13) / 100.0f,
|
||||
HREG(14) / 100.0f);
|
||||
|
||||
gSPLoadUcode(gfx++, SysUcode_GetUCode(), SysUcode_GetUCodeData());
|
||||
|
||||
|
@ -557,13 +713,12 @@ 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[15 * 4 + k * 4], 32, 0);
|
||||
|
||||
for (j = i = 0; i < 8; i++, j += 4) {
|
||||
if (!(gSaveContext.worldMapAreaData & gBitFlags[cloudFlagNums[k + i]])) {
|
||||
gDPLoadTextureBlock_4b(POLY_OPA_DISP++, cloudTexs[k + i], G_IM_FMT_I,
|
||||
D_8082AAEC_width_MAP_PAGE_VTX_NOT_IN_DUNGEON_SCENE_[k + i],
|
||||
D_8082AB2C_height_MAP_PAGE_VTX_NOT_IN_DUNGEON_SCENE_[k + i], 0,
|
||||
gVtxPageMapWorldQuadsWidth[k + i], gVtxPageMapWorldQuadsHeight[k + i], 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);
|
||||
|
||||
|
@ -573,29 +728,31 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
if (gSaveContext.worldMapArea < 22) {
|
||||
if (gSaveContext.worldMapArea < WORLD_MAP_AREA_MAX) {
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetTextureFilter(POLY_OPA_DISP++, G_TF_POINT);
|
||||
|
||||
pauseCtx->mapPageVtx[172].v.ob[0] = pauseCtx->mapPageVtx[174].v.ob[0] =
|
||||
// Quad PAGE_BG_QUADS + QUAD_MAP_28
|
||||
|
||||
pauseCtx->mapPageVtx[43 * 4 + 0].v.ob[0] = pauseCtx->mapPageVtx[43 * 4 + 2].v.ob[0] =
|
||||
areaBoxPosX[((void)0, gSaveContext.worldMapArea)];
|
||||
|
||||
pauseCtx->mapPageVtx[173].v.ob[0] = pauseCtx->mapPageVtx[175].v.ob[0] =
|
||||
pauseCtx->mapPageVtx[172].v.ob[0] + areaBoxWidths[((void)0, gSaveContext.worldMapArea)];
|
||||
pauseCtx->mapPageVtx[43 * 4 + 1].v.ob[0] = pauseCtx->mapPageVtx[43 * 4 + 3].v.ob[0] =
|
||||
pauseCtx->mapPageVtx[43 * 4 + 0].v.ob[0] + areaBoxWidths[((void)0, gSaveContext.worldMapArea)];
|
||||
|
||||
pauseCtx->mapPageVtx[172].v.ob[1] = pauseCtx->mapPageVtx[173].v.ob[1] =
|
||||
pauseCtx->mapPageVtx[43 * 4 + 0].v.ob[1] = pauseCtx->mapPageVtx[43 * 4 + 1].v.ob[1] =
|
||||
areaBoxPosY[((void)0, gSaveContext.worldMapArea)] + pauseCtx->offsetY;
|
||||
|
||||
pauseCtx->mapPageVtx[174].v.ob[1] = pauseCtx->mapPageVtx[175].v.ob[1] =
|
||||
pauseCtx->mapPageVtx[172].v.ob[1] - areaBoxHeights[((void)0, gSaveContext.worldMapArea)];
|
||||
pauseCtx->mapPageVtx[43 * 4 + 2].v.ob[1] = pauseCtx->mapPageVtx[43 * 4 + 3].v.ob[1] =
|
||||
pauseCtx->mapPageVtx[43 * 4 + 0].v.ob[1] - areaBoxHeights[((void)0, gSaveContext.worldMapArea)];
|
||||
|
||||
pauseCtx->mapPageVtx[173].v.tc[0] = pauseCtx->mapPageVtx[175].v.tc[0] =
|
||||
pauseCtx->mapPageVtx[43 * 4 + 1].v.tc[0] = pauseCtx->mapPageVtx[43 * 4 + 3].v.tc[0] =
|
||||
areaBoxWidths[((void)0, gSaveContext.worldMapArea)] << 5;
|
||||
|
||||
pauseCtx->mapPageVtx[174].v.tc[1] = pauseCtx->mapPageVtx[175].v.tc[1] =
|
||||
pauseCtx->mapPageVtx[43 * 4 + 2].v.tc[1] = pauseCtx->mapPageVtx[43 * 4 + 3].v.tc[1] =
|
||||
areaBoxHeights[((void)0, gSaveContext.worldMapArea)] << 5;
|
||||
|
||||
gSPVertex(POLY_OPA_DISP++, &pauseCtx->mapPageVtx[172], 4, 0);
|
||||
gSPVertex(POLY_OPA_DISP++, &pauseCtx->mapPageVtx[(PAGE_BG_QUADS + QUAD_MAP_28) * 4], 4, 0);
|
||||
|
||||
gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 100, 255, 255, pauseCtx->alpha);
|
||||
|
@ -669,21 +826,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);
|
||||
}
|
||||
|
@ -693,9 +851,9 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
KaleidoScope_DrawCursor(play, PAUSE_MAP);
|
||||
}
|
||||
|
||||
gSPVertex(POLY_OPA_DISP++, &pauseCtx->mapPageVtx[176], 16, 0);
|
||||
gSPVertex(POLY_OPA_DISP++, &pauseCtx->mapPageVtx[(PAGE_BG_QUADS + QUAD_MAP_29) * 4], 16, 0);
|
||||
|
||||
if (pauseCtx->tradeQuestLocation != 0xFF) {
|
||||
if (pauseCtx->tradeQuestLocation != TRADE_QUEST_LOCATION_NONE) {
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, pointPulsePrimColor[0], 0, pauseCtx->alpha);
|
||||
|
@ -707,7 +865,7 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
gSP1Quadrangle(POLY_OPA_DISP++, 0, 2, 3, 1, 0);
|
||||
}
|
||||
|
||||
if (gSaveContext.worldMapArea < 22) {
|
||||
if (gSaveContext.worldMapArea < WORLD_MAP_AREA_MAX) {
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetCombineLERP(POLY_OPA_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0,
|
||||
PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0);
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
#include "global.h"
|
||||
|
||||
extern u8 gAmmoItems[];
|
||||
extern s16 D_8082AAEC_width_MAP_PAGE_VTX_NOT_IN_DUNGEON_SCENE_[];
|
||||
extern s16 D_8082AB2C_height_MAP_PAGE_VTX_NOT_IN_DUNGEON_SCENE_[];
|
||||
extern s16 gVtxPageMapWorldQuadsWidth[];
|
||||
extern s16 gVtxPageMapWorldQuadsHeight[];
|
||||
extern u8 gSlotAgeReqs[];
|
||||
extern u8 gEquipAgeReqs[EQUIP_TYPE_MAX][4];
|
||||
extern u8 gItemAgeReqs[];
|
||||
|
@ -23,6 +23,14 @@ extern u8 gAreaGsFlags[];
|
|||
#define CHECK_AGE_REQ_ITEM(item) \
|
||||
((gItemAgeReqs[item] == AGE_REQ_NONE) || (gItemAgeReqs[item] == ((void)0, gSaveContext.linkAge)))
|
||||
|
||||
#define PAGE_BG_COLS 3
|
||||
#define PAGE_BG_ROWS 5
|
||||
#define PAGE_BG_QUADS (PAGE_BG_COLS * PAGE_BG_ROWS)
|
||||
#define PAGE_BG_QUAD_WIDTH 80
|
||||
#define PAGE_BG_QUAD_HEIGHT 32
|
||||
#define PAGE_BG_QUAD_TEX_WIDTH 80
|
||||
#define PAGE_BG_QUAD_TEX_HEIGHT 32
|
||||
|
||||
typedef enum {
|
||||
// 0 to 24 matches the `QuestItem` enum
|
||||
// Notes showing the correct song
|
||||
|
@ -86,12 +94,44 @@ typedef enum {
|
|||
/* 19 */ QUAD_EQUIP_SELECTED_BOOTS,
|
||||
// Player prerender
|
||||
/* 20 */ QUAD_EQUIP_PLAYER_FIRST,
|
||||
/* 23 */ QUAD_EQUIP_PLAYER_LAST =
|
||||
QUAD_EQUIP_PLAYER_FIRST + (((PAUSE_EQUIP_PLAYER_HEIGHT - 1) / PAUSE_EQUIP_PLAYER_FRAG_HEIGHT) + 1) - 1,
|
||||
/* 23 */ QUAD_EQUIP_PLAYER_LAST = QUAD_EQUIP_PLAYER_FIRST + PAUSE_EQUIP_PLAYER_FRAG_NUM - 1,
|
||||
// 24..27 are unused, probably meant for player prerender
|
||||
/* 28 */ QUAD_EQUIP_MAX = QUAD_EQUIP_PLAYER_LAST + 4 + 1
|
||||
} EquipQuad;
|
||||
|
||||
#define WORLD_MAP_IMAGE_WIDTH 216
|
||||
#define WORLD_MAP_IMAGE_HEIGHT 128
|
||||
#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)
|
||||
|
||||
typedef enum {
|
||||
/* 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);
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue