summaryrefslogtreecommitdiff
path: root/src/code/z_map_mark.c
diff options
context:
space:
mode:
authorRoman971 <32455037+Roman971@users.noreply.github.com>2023-07-10 21:03:01 +0200
committerGitHub <noreply@github.com>2023-07-10 15:03:01 -0400
commit232fdb75d88854d41d6cf0a132e0dd16b69b0f9f (patch)
tree65e4f3313257e1e00d1e9ce36110665ca98462e6 /src/code/z_map_mark.c
parentd307a3723313507726d5ebcfda0b5b9cef224d91 (diff)
Use intptr in most remaining code files (#1438)
* Use intptr in most remaining code files * Fix missing uintptr_t in actor * Use u8* casts for texture pointer arithmetic * Use bg + 1 instead of casting in Room_DrawBackground2D
Diffstat (limited to 'src/code/z_map_mark.c')
-rw-r--r--src/code/z_map_mark.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/code/z_map_mark.c b/src/code/z_map_mark.c
index e04d8a9d2..e84cbaaec 100644
--- a/src/code/z_map_mark.c
+++ b/src/code/z_map_mark.c
@@ -55,7 +55,7 @@ static MapMarkData** sLoadedMarkDataTable;
void MapMark_Init(PlayState* play) {
MapMarkDataOverlay* overlay = &sMapMarkDataOvl;
- u32 overlaySize = (u32)overlay->vramEnd - (u32)overlay->vramStart;
+ u32 overlaySize = (uintptr_t)overlay->vramEnd - (uintptr_t)overlay->vramStart;
overlay->loadedRamAddr = GameState_Alloc(&play->state, overlaySize, "../z_map_mark.c", 235);
LogUtils_CheckNullPointer("dlftbl->allocp", overlay->loadedRamAddr, "../z_map_mark.c", 236);
@@ -63,10 +63,11 @@ void MapMark_Init(PlayState* play) {
Overlay_Load(overlay->vromStart, overlay->vromEnd, overlay->vramStart, overlay->vramEnd, overlay->loadedRamAddr);
sLoadedMarkDataTable = gMapMarkDataTable;
- sLoadedMarkDataTable = (void*)(u32)(
- (overlay->vramTable != NULL)
- ? (void*)((u32)overlay->vramTable - (s32)((u32)overlay->vramStart - (u32)overlay->loadedRamAddr))
- : NULL);
+ sLoadedMarkDataTable =
+ (void*)(uintptr_t)((overlay->vramTable != NULL)
+ ? (void*)((uintptr_t)overlay->vramTable -
+ (intptr_t)((uintptr_t)overlay->vramStart - (uintptr_t)overlay->loadedRamAddr))
+ : NULL);
}
void MapMark_ClearPointers(PlayState* play) {