summaryrefslogtreecommitdiff
path: root/src/code/z_map_exp.c
diff options
context:
space:
mode:
authorTharo <17233964+Thar0@users.noreply.github.com>2022-11-17 02:57:02 +0000
committerGitHub <noreply@github.com>2022-11-16 21:57:02 -0500
commit7ecafcfe7d357ff1cbcf49ce4d87a9efedae552e (patch)
treeba036ae7cdce859adb4e0f036fcc28284be22423 /src/code/z_map_exp.c
parent40639e698d0b4681d088194dc72a6a3b910e7d13 (diff)
More documentation for `z_std_dma.c` (#1415)
* More documentation for z_std_dma * uintptr casts for rom symbols in z64animation.h and z_kanfont.c * Format * Suggested changes, more defines for static texture sizes * PI Interface -> PI * Further suggested changes * Format * Comments about item_name and map_name texture assumptions
Diffstat (limited to 'src/code/z_map_exp.c')
-rw-r--r--src/code/z_map_exp.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/code/z_map_exp.c b/src/code/z_map_exp.c
index 3becb670f..298a360e8 100644
--- a/src/code/z_map_exp.c
+++ b/src/code/z_map_exp.c
@@ -130,10 +130,10 @@ void Map_InitData(PlayState* play, s16 room) {
osSyncPrintf("KKK=%d\n", extendedMapIndex);
osSyncPrintf(VT_RST);
sEntranceIconMapIndex = extendedMapIndex;
- DmaMgr_SendRequest1(interfaceCtx->mapSegment,
- (uintptr_t)_map_grand_staticSegmentRomStart +
- gMapData->owMinimapTexOffset[extendedMapIndex],
- gMapData->owMinimapTexSize[mapIndex], "../z_map_exp.c", 309);
+ DmaMgr_RequestSyncDebug(interfaceCtx->mapSegment,
+ (uintptr_t)_map_grand_staticSegmentRomStart +
+ gMapData->owMinimapTexOffset[extendedMapIndex],
+ gMapData->owMinimapTexSize[mapIndex], "../z_map_exp.c", 309);
interfaceCtx->unk_258 = mapIndex;
break;
case SCENE_YDAN:
@@ -159,10 +159,10 @@ void Map_InitData(PlayState* play, s16 room) {
osSyncPrintf("デクの樹ダンジョンMAP テクスチャDMA(%x) scene_id_offset=%d VREG(30)=%d\n", room,
mapIndex, VREG(30));
osSyncPrintf(VT_RST);
- DmaMgr_SendRequest1(play->interfaceCtx.mapSegment,
- (uintptr_t)_map_i_staticSegmentRomStart +
- ((gMapData->dgnMinimapTexIndexOffset[mapIndex] + room) * 0xFF0),
- 0xFF0, "../z_map_exp.c", 346);
+ DmaMgr_RequestSyncDebug(play->interfaceCtx.mapSegment,
+ (uintptr_t)_map_i_staticSegmentRomStart +
+ ((gMapData->dgnMinimapTexIndexOffset[mapIndex] + room) * MAP_I_TEX_SIZE),
+ MAP_I_TEX_SIZE, "../z_map_exp.c", 346);
R_COMPASS_OFFSET_X = gMapData->roomCompassOffsetX[mapIndex][room];
R_COMPASS_OFFSET_Y = gMapData->roomCompassOffsetY[mapIndex][room];
Map_SetFloorPalettesData(play, VREG(30));
@@ -385,13 +385,15 @@ void Minimap_Draw(PlayState* play) {
if (CHECK_DUNGEON_ITEM(DUNGEON_MAP, mapIndex)) {
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 100, 255, 255, interfaceCtx->minimapAlpha);
- gDPLoadTextureBlock_4b(OVERLAY_DISP++, interfaceCtx->mapSegment, G_IM_FMT_I, 96, 85, 0,
- G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK,
- G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
+ gDPLoadTextureBlock_4b(OVERLAY_DISP++, interfaceCtx->mapSegment, G_IM_FMT_I, MAP_I_TEX_WIDTH,
+ MAP_I_TEX_HEIGHT, 0, G_TX_NOMIRROR | G_TX_WRAP,
+ G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
+ G_TX_NOLOD);
gSPTextureRectangle(OVERLAY_DISP++, R_DGN_MINIMAP_X << 2, R_DGN_MINIMAP_Y << 2,
- (R_DGN_MINIMAP_X + 96) << 2, (R_DGN_MINIMAP_Y + 85) << 2, G_TX_RENDERTILE,
- 0, 0, 1 << 10, 1 << 10);
+ (R_DGN_MINIMAP_X + MAP_I_TEX_WIDTH) << 2,
+ (R_DGN_MINIMAP_Y + MAP_I_TEX_HEIGHT) << 2, G_TX_RENDERTILE, 0, 0, 1 << 10,
+ 1 << 10);
}
if (CHECK_DUNGEON_ITEM(DUNGEON_COMPASS, mapIndex)) {