mirror of https://github.com/zeldaret/mm.git
`map_static_name` docs (#1298)
* map static docs * adjust comment * improve comments * PR Suggestions * map point * adjust comments
This commit is contained in:
parent
0c4f2524d8
commit
0f572acbda
|
@ -1,20 +1,29 @@
|
|||
<Root>
|
||||
<!-- Map Point Names. Must be ia4 128x16 and continguous with `ItemId` starting from `ITEM_MAP_POINT_GREAT_BAY` -->
|
||||
<File Name="map_name_static.unarchive">
|
||||
<Blob Name="map_name_static_Blob_000000" Size="0x0400" Offset="0x0" />
|
||||
<Blob Name="map_name_static_Blob_000400" Size="0x0400" Offset="0x400" />
|
||||
<Blob Name="map_name_static_Blob_000800" Size="0x0400" Offset="0x800" />
|
||||
<Blob Name="map_name_static_Blob_000C00" Size="0x0400" Offset="0xC00" />
|
||||
<Blob Name="map_name_static_Blob_001000" Size="0x0400" Offset="0x1000" />
|
||||
<Blob Name="map_name_static_Blob_001400" Size="0x0400" Offset="0x1400" />
|
||||
<Blob Name="map_name_static_Blob_001800" Size="0x0400" Offset="0x1800" />
|
||||
<Blob Name="map_name_static_Blob_001C00" Size="0x0400" Offset="0x1C00" />
|
||||
<Blob Name="map_name_static_Blob_002000" Size="0x0400" Offset="0x2000" />
|
||||
<Blob Name="map_name_static_Blob_002400" Size="0x0400" Offset="0x2400" />
|
||||
<Blob Name="map_name_static_Blob_002800" Size="0x0400" Offset="0x2800" />
|
||||
<Blob Name="map_name_static_Blob_002C00" Size="0x0400" Offset="0x2C00" />
|
||||
<Blob Name="map_name_static_Blob_003000" Size="0x0400" Offset="0x3000" />
|
||||
<Blob Name="map_name_static_Blob_003400" Size="0x0400" Offset="0x3400" />
|
||||
<Blob Name="map_name_static_Blob_003800" Size="0x0400" Offset="0x3800" />
|
||||
<Blob Name="map_name_static_Blob_003C00" Size="0x0400" Offset="0x3C00" />
|
||||
<!-- First entries must be continguous with `RegionId` -->
|
||||
<Texture Name="gMapPointGreatBayENGTex" OutName="map_point_great_bay_eng" Format="ia4" Width="128" Height="16" Offset="0x0" /> <!-- ITEM_MAP_POINT_GREAT_BAY -->
|
||||
<Texture Name="gMapPointZoraHallENGTex" OutName="map_point_zora_hall_eng" Format="ia4" Width="128" Height="16" Offset="0x400" /> <!-- ITEM_MAP_POINT_ZORA_HALL -->
|
||||
<Texture Name="gMapPointRomaniRanchENGTex" OutName="map_point_romani_ranch_eng" Format="ia4" Width="128" Height="16" Offset="0x800" /> <!-- ITEM_MAP_POINT_ROMANI_RANCH -->
|
||||
<Texture Name="gMapPointDekuPalaceENGTex" OutName="map_point_deku_palace_eng" Format="ia4" Width="128" Height="16" Offset="0xC00" /> <!-- ITEM_MAP_POINT_DEKU_PALACE -->
|
||||
<!-- Reused for both region and owl warp map point -->
|
||||
<Texture Name="gMapPointWoodfallENGTex" OutName="map_point_woodfall_eng" Format="ia4" Width="128" Height="16" Offset="0x1000" /> <!-- ITEM_MAP_POINT_WOODFALL -->
|
||||
<!-- Reused for both region and owl warp map point -->
|
||||
<Texture Name="gMapPointClockTownENGTex" OutName="map_point_clock_town_eng" Format="ia4" Width="128" Height="16" Offset="0x1400" /> <!-- ITEM_MAP_POINT_CLOCK_TOWN -->
|
||||
<!-- Reused for both region and owl warp map point -->
|
||||
<Texture Name="gMapPointSnowheadENGTex" OutName="map_point_snowhead_eng" Format="ia4" Width="128" Height="16" Offset="0x1800" /> <!-- ITEM_MAP_POINT_SNOWHEAD -->
|
||||
<Texture Name="gMapPointIkanaGraveyardENGTex" OutName="map_point_ikana_graveyard_eng" Format="ia4" Width="128" Height="16" Offset="0x1C00" /> <!-- ITEM_MAP_POINT_IKANA_GRAVEYARD -->
|
||||
<!-- Reused for both region and owl warp map point -->
|
||||
<Texture Name="gMapPointIkanaCanyonENGTex" OutName="map_point_ikana_canyon_eng" Format="ia4" Width="128" Height="16" Offset="0x2000" /> <!-- ITEM_MAP_POINT_IKANA_CANYON -->
|
||||
<Texture Name="gMapPointGoronVillageENGTex" OutName="map_point_goron_village_eng" Format="ia4" Width="128" Height="16" Offset="0x2400" /> <!-- ITEM_MAP_POINT_GORON_VILLAGE -->
|
||||
<!-- Reused for both region and owl warp map point -->
|
||||
<Texture Name="gMapPointStoneTowerENGTex" OutName="map_point_stone_tower_eng" Format="ia4" Width="128" Height="16" Offset="0x2800" /> <!-- ITEM_MAP_POINT_STONE_TOWER -->
|
||||
|
||||
<!-- Unique Owl Warp Map Points -->
|
||||
<Texture Name="gMapPointGreatBayCoastENGTex" OutName="map_point_great_bay_coast_eng" Format="ia4" Width="128" Height="16" Offset="0x2C00" /> <!-- ITEM_MAP_POINT_GREAT_BAY_COAST -->
|
||||
<Texture Name="gMapPointSouthernSwampENGTex" OutName="map_point_southern_swamp_eng" Format="ia4" Width="128" Height="16" Offset="0x3000" /> <!-- ITEM_MAP_POINT_SOUTHERN_SWAMP -->
|
||||
<Texture Name="gMapPointMountainVillageENGTex" OutName="map_point_mountain_village_eng" Format="ia4" Width="128" Height="16" Offset="0x3400" /> <!-- ITEM_MAP_POINT_MOUNTAIN_VILLAGE -->
|
||||
<Texture Name="gMapPointMilkRoadENGTex" OutName="map_point_milk_road_eng" Format="ia4" Width="128" Height="16" Offset="0x3800" /> <!-- ITEM_MAP_POINT_MILK_ROAD -->
|
||||
<Texture Name="gMapPointZoraCapeENGTex" OutName="map_point_zora_cape_eng" Format="ia4" Width="128" Height="16" Offset="0x3C00" /> <!-- ITEM_MAP_POINT_ZORA_CAPE -->
|
||||
</File>
|
||||
</Root>
|
||||
|
|
|
@ -308,6 +308,24 @@ typedef enum ItemId {
|
|||
/* 0xA1 */ ITEM_GOLD_DUST_2,
|
||||
/* 0xA2 */ ITEM_HYLIAN_LOACH_2,
|
||||
/* 0xA3 */ ITEM_SEAHORSE_CAUGHT,
|
||||
// First entries of `MAP_POINT` must be continguous with `RegionId`
|
||||
/* 0xA4 */ ITEM_MAP_POINT_GREAT_BAY,
|
||||
/* 0xA5 */ ITEM_MAP_POINT_ZORA_HALL,
|
||||
/* 0xA6 */ ITEM_MAP_POINT_ROMANI_RANCH,
|
||||
/* 0xA7 */ ITEM_MAP_POINT_DEKU_PALACE,
|
||||
/* 0xA8 */ ITEM_MAP_POINT_WOODFALL,
|
||||
/* 0xA9 */ ITEM_MAP_POINT_CLOCK_TOWN,
|
||||
/* 0xAA */ ITEM_MAP_POINT_SNOWHEAD,
|
||||
/* 0xAB */ ITEM_MAP_POINT_IKANA_GRAVEYARD,
|
||||
/* 0xAC */ ITEM_MAP_POINT_IKANA_CANYON,
|
||||
/* 0xAD */ ITEM_MAP_POINT_GORON_VILLAGE,
|
||||
/* 0xAE */ ITEM_MAP_POINT_STONE_TOWER,
|
||||
// Remaining map points are unique to owl warps
|
||||
/* 0xAF */ ITEM_MAP_POINT_GREAT_BAY_COAST,
|
||||
/* 0xBO */ ITEM_MAP_POINT_SOUTHERN_SWAMP,
|
||||
/* 0xB1 */ ITEM_MAP_POINT_MOUNTAIN_VILLAGE,
|
||||
/* 0xB2 */ ITEM_MAP_POINT_MILK_ROAD,
|
||||
/* 0xB3 */ ITEM_MAP_POINT_ZORA_CAPE,
|
||||
/* 0xF0 */ ITEM_F0 = 0xF0, // PLAYER_MASK_BLAST
|
||||
/* 0xF1 */ ITEM_F1, // PLAYER_MASK_BREMEN
|
||||
/* 0xF2 */ ITEM_F2, // PLAYER_MASK_KAMARO
|
||||
|
|
|
@ -559,6 +559,7 @@ typedef union {
|
|||
|
||||
// Sets cursor point options on the world map
|
||||
typedef enum {
|
||||
/* -1 */ REGION_NONE = -1,
|
||||
/* 0x0 */ REGION_GREAT_BAY,
|
||||
/* 0x1 */ REGION_ZORA_HALL,
|
||||
/* 0x2 */ REGION_ROMANI_RANCH,
|
||||
|
|
|
@ -764,8 +764,8 @@ void KaleidoScope_DrawWorldMap(PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
// Find the regionId that player is currently in
|
||||
// Loop over regionId (n) and regionIdIndex (j)
|
||||
// Find the region that player is currently in
|
||||
// Loop over region (n) and regionIndex (j)
|
||||
while (true) {
|
||||
if ((gSceneIdsPerRegion[n][j] == 0xFFFF)) {
|
||||
n++;
|
||||
|
@ -824,16 +824,16 @@ void KaleidoScope_DrawWorldMap(PlayState* play) {
|
|||
}
|
||||
|
||||
u16 sOwlWarpPauseItems[] = {
|
||||
0xAF, // OWL_WARP_GREAT_BAY_COAST
|
||||
0xB3, // OWL_WARP_ZORA_CAPE
|
||||
0xAA, // OWL_WARP_SNOWHEAD
|
||||
0xB1, // OWL_WARP_MOUNTAIN_VILLAGE
|
||||
0xA9, // OWL_WARP_CLOCK_TOWN
|
||||
0xB2, // OWL_WARP_MILK_ROAD
|
||||
0xA8, // OWL_WARP_WOODFALL
|
||||
0xB0, // OWL_WARP_SOUTHERN_SWAMP
|
||||
0xAC, // OWL_WARP_IKANA_CANYON
|
||||
0xAE, // OWL_WARP_STONE_TOWER
|
||||
ITEM_MAP_POINT_GREAT_BAY_COAST, // OWL_WARP_GREAT_BAY_COAST
|
||||
ITEM_MAP_POINT_ZORA_CAPE, // OWL_WARP_ZORA_CAPE
|
||||
ITEM_MAP_POINT_SNOWHEAD, // OWL_WARP_SNOWHEAD
|
||||
ITEM_MAP_POINT_MOUNTAIN_VILLAGE, // OWL_WARP_MOUNTAIN_VILLAGE
|
||||
ITEM_MAP_POINT_CLOCK_TOWN, // OWL_WARP_CLOCK_TOWN
|
||||
ITEM_MAP_POINT_MILK_ROAD, // OWL_WARP_MILK_ROAD
|
||||
ITEM_MAP_POINT_WOODFALL, // OWL_WARP_WOODFALL
|
||||
ITEM_MAP_POINT_SOUTHERN_SWAMP, // OWL_WARP_SOUTHERN_SWAMP
|
||||
ITEM_MAP_POINT_IKANA_CANYON, // OWL_WARP_IKANA_CANYON
|
||||
ITEM_MAP_POINT_STONE_TOWER, // OWL_WARP_STONE_TOWER
|
||||
};
|
||||
|
||||
void KaleidoScope_UpdateWorldMapCursor(PlayState* play) {
|
||||
|
@ -874,7 +874,7 @@ void KaleidoScope_UpdateWorldMapCursor(PlayState* play) {
|
|||
|
||||
while (true) {
|
||||
pauseCtx->cursorPoint[PAUSE_WORLD_MAP]--;
|
||||
if (pauseCtx->cursorPoint[PAUSE_WORLD_MAP] < REGION_GREAT_BAY) {
|
||||
if (pauseCtx->cursorPoint[PAUSE_WORLD_MAP] <= REGION_NONE) {
|
||||
KaleidoScope_MoveCursorToSpecialPos(play, PAUSE_CURSOR_PAGE_LEFT);
|
||||
pauseCtx->cursorItem[PAUSE_MAP] = PAUSE_ITEM_NONE;
|
||||
break;
|
||||
|
@ -896,13 +896,13 @@ void KaleidoScope_UpdateWorldMapCursor(PlayState* play) {
|
|||
pauseCtx->cursorItem[PAUSE_MAP] = PAUSE_ITEM_NONE;
|
||||
if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
|
||||
if (pauseCtx->stickAdjX > 30) {
|
||||
pauseCtx->cursorPoint[PAUSE_WORLD_MAP] = -1;
|
||||
pauseCtx->cursorPoint[PAUSE_WORLD_MAP] = REGION_NONE;
|
||||
pauseCtx->cursorSpecialPos = 0;
|
||||
pauseCtx->cursorShrinkRate = 4.0f;
|
||||
|
||||
while (true) {
|
||||
pauseCtx->cursorPoint[PAUSE_WORLD_MAP]++;
|
||||
if (pauseCtx->cursorPoint[PAUSE_WORLD_MAP] > REGION_STONE_TOWER) {
|
||||
if (pauseCtx->cursorPoint[PAUSE_WORLD_MAP] >= REGION_MAX) {
|
||||
KaleidoScope_MoveCursorToSpecialPos(play, PAUSE_CURSOR_PAGE_RIGHT);
|
||||
pauseCtx->cursorItem[PAUSE_MAP] = PAUSE_ITEM_NONE;
|
||||
break;
|
||||
|
@ -921,13 +921,13 @@ void KaleidoScope_UpdateWorldMapCursor(PlayState* play) {
|
|||
sStickAdjTimer = 0;
|
||||
}
|
||||
} else if (pauseCtx->stickAdjX < -30) {
|
||||
pauseCtx->cursorPoint[PAUSE_WORLD_MAP] = 11;
|
||||
pauseCtx->cursorPoint[PAUSE_WORLD_MAP] = REGION_MAX;
|
||||
pauseCtx->cursorSpecialPos = 0;
|
||||
pauseCtx->cursorShrinkRate = 4.0f;
|
||||
|
||||
while (true) {
|
||||
pauseCtx->cursorPoint[PAUSE_WORLD_MAP]--;
|
||||
if (pauseCtx->cursorPoint[PAUSE_WORLD_MAP] < 0) {
|
||||
if (pauseCtx->cursorPoint[PAUSE_WORLD_MAP] <= REGION_NONE) {
|
||||
KaleidoScope_MoveCursorToSpecialPos(play, PAUSE_CURSOR_PAGE_LEFT);
|
||||
pauseCtx->cursorItem[PAUSE_MAP] = PAUSE_ITEM_NONE;
|
||||
break;
|
||||
|
@ -979,8 +979,9 @@ void KaleidoScope_UpdateWorldMapCursor(PlayState* play) {
|
|||
sStickAdjTimer++;
|
||||
}
|
||||
|
||||
//! TODO: Is the `0xA4` here related to `0xA3` being the last recored item in the `ItemId` enum?
|
||||
pauseCtx->cursorItem[PAUSE_MAP] = sOwlWarpPauseItems[pauseCtx->cursorPoint[PAUSE_WORLD_MAP]] - 0xA4;
|
||||
// Offset from `ITEM_MAP_POINT_GREAT_BAY` is to get the correct ordering in `map_name_static`
|
||||
pauseCtx->cursorItem[PAUSE_MAP] =
|
||||
sOwlWarpPauseItems[pauseCtx->cursorPoint[PAUSE_WORLD_MAP]] - ITEM_MAP_POINT_GREAT_BAY;
|
||||
// Used as cursor vtxIndex
|
||||
pauseCtx->cursorSlot[PAUSE_MAP] = 31 + pauseCtx->cursorPoint[PAUSE_WORLD_MAP];
|
||||
|
||||
|
|
|
@ -246,6 +246,7 @@ void Kaleido_LoadMapNameStatic(void* segment, u32 texIndex) {
|
|||
CmpDma_LoadFile(SEGMENT_ROM_START(map_name_static), texIndex, segment, 0x400);
|
||||
}
|
||||
|
||||
//! note: nothing from `map_name_static` is of size `0xA00` in US 1.0
|
||||
void Kaleido_LoadMapNameStaticLarge(void* segment, u32 texIndex) {
|
||||
CmpDma_LoadFile(SEGMENT_ROM_START(map_name_static), texIndex, segment, 0xA00);
|
||||
}
|
||||
|
@ -2890,7 +2891,9 @@ void KaleidoScope_Update(PlayState* play) {
|
|||
|
||||
pauseCtx->nameSegment = (void*)ALIGN16((uintptr_t)pauseCtx->iconItemLangSegment + size2);
|
||||
func_8011552C(play, DO_ACTION_INFO);
|
||||
if (((void)0, gSaveContext.worldMapArea) < 0x16) {
|
||||
|
||||
//! note: `worldMapArea` never set to a value other than 0
|
||||
if (((void)0, gSaveContext.worldMapArea) < 22) {
|
||||
Kaleido_LoadMapNameStaticLarge(pauseCtx->nameSegment + 0x400, ((void)0, gSaveContext.worldMapArea));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue