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.
This commit is contained in:
Kenix3
2020-06-04 23:07:09 -04:00
parent 664182c289
commit 5c97d35841
8 changed files with 31 additions and 27 deletions
+1 -2
View File
@@ -215,9 +215,8 @@ void Actor_SetScale(Actor* actor, f32 scale) {
}
void Actor_SetObjectSegment(GlobalContext* ctxt, Actor* actor) {
// TODO: PHYSICAL_TO_VIRTUAL macro
// TODO: Segment number enum
gRspSegmentPhysAddrs[6] = (void*)((u32)ctxt->sceneContext.objects[actor->objBankIndex].vramAddr + 0x80000000);
gRspSegmentPhysAddrs[6] = PHYSICAL_TO_VIRTUAL(ctxt->sceneContext.objects[actor->objBankIndex].vramAddr);
}
#ifdef NON_MATCHING