Use official macros for Physical Address conversion (#2511)

This commit is contained in:
fig02
2025-04-24 14:53:18 -04:00
committed by GitHub
parent de59ad3db7
commit 2341c44a6c
35 changed files with 85 additions and 88 deletions
+2 -2
View File
@@ -715,7 +715,7 @@ s32 Room_ProcessRoomRequest(PlayState* play, RoomContext* roomCtx) {
if (osRecvMesg(&roomCtx->loadQueue, NULL, OS_MESG_NOBLOCK) == 0) {
roomCtx->status = 0;
roomCtx->curRoom.segment = roomCtx->roomRequestAddr;
gSegments[3] = VIRTUAL_TO_PHYSICAL(roomCtx->curRoom.segment);
gSegments[3] = OS_K0_TO_PHYSICAL(roomCtx->curRoom.segment);
Scene_ExecuteCommands(play, roomCtx->curRoom.segment);
Player_SetBootData(play, GET_PLAYER(play));
@@ -730,7 +730,7 @@ s32 Room_ProcessRoomRequest(PlayState* play, RoomContext* roomCtx) {
void Room_Draw(PlayState* play, Room* room, u32 flags) {
if (room->segment != NULL) {
gSegments[3] = VIRTUAL_TO_PHYSICAL(room->segment);
gSegments[3] = OS_K0_TO_PHYSICAL(room->segment);
ASSERT(room->roomShape->base.type < ARRAY_COUNTU(sRoomDrawHandlers),
"this->ground_shape->polygon.type < number(Room_Draw_Proc)", "../z_room.c", 1125);
sRoomDrawHandlers[room->roomShape->base.type](play, room, flags);