summaryrefslogtreecommitdiff
path: root/src/code/z_room.c
diff options
context:
space:
mode:
authorKenix3 <kenixwhisperwind@gmail.com>2020-06-04 23:07:09 -0400
committerKenix3 <kenixwhisperwind@gmail.com>2020-06-04 23:07:09 -0400
commit5c97d35841f99bbb23dffa797475f16ec1e3403b (patch)
tree3807897f537f4a6ca0a2317332a401d0f35df249 /src/code/z_room.c
parent664182c2899ba341be31f4cd7364a74867ee422c (diff)
Added macros header
Additionally, updated code to use PHYSICAL_TO_VIRTUAL and ALIGN16 macros. Additionally, retyped gRspSegmentPhysAddrs back to u32 as in OOT. These get the straight return value of PHYSICAL_TO_VIRTUAL, so they are u32.
Diffstat (limited to 'src/code/z_room.c')
-rw-r--r--src/code/z_room.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/code/z_room.c b/src/code/z_room.c
index 5e8e6d42e..390783018 100644
--- a/src/code/z_room.c
+++ b/src/code/z_room.c
@@ -109,9 +109,8 @@ s32 Room_HandleLoadCallbacks(GlobalContext* ctxt, RoomContext* roomCtxt) {
{
roomCtxt->unk31 = 0;
roomCtxt->currRoom.segment = roomCtxt->activeRoomVram;
- // TODO: PHYSICAL_TO_VIRTUAL macro
// TODO: Segment number enum
- gRspSegmentPhysAddrs[3] = (void*)((u32)roomCtxt->activeRoomVram + 0x80000000);
+ gRspSegmentPhysAddrs[3] = PHYSICAL_TO_VIRTUAL(roomCtxt->activeRoomVram);
Scene_ProcessHeader(ctxt, (SceneCmd*)roomCtxt->currRoom.segment);
func_80123140(ctxt, (ActorPlayer*)ctxt->actorCtx.actorList[2].first);
@@ -135,9 +134,8 @@ s32 Room_HandleLoadCallbacks(GlobalContext* ctxt, RoomContext* roomCtxt) {
void Room_Draw(GlobalContext* ctxt, Room* room, u32 flags) {
if (room->segment != NULL) {
- // TODO: PHYSICAL_TO_VIRTUAL macro
// TODO: Segment number enum
- gRspSegmentPhysAddrs[3] = (void*)((u32)room->segment + 0x80000000);
+ gRspSegmentPhysAddrs[3] = PHYSICAL_TO_VIRTUAL(room->segment);
roomDrawFuncs[room->mesh->type0.type](ctxt, room, flags);
}
return;