1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-07 06:40:15 +00:00

Improve PHYSICAL/VIRTUAL macros and match Interface_LoadActionLabel (#371)

This commit is contained in:
Roman971 2020-09-01 03:06:44 +02:00 committed by GitHub
parent b4ac94a8fd
commit b8da64ee01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 22 additions and 133 deletions

View file

@ -107,7 +107,7 @@ void BgMjin_Draw(Actor* thisx, GlobalContext* globalCtx) {
if (thisx->params != 0) {
s32 objBankIndex = Object_GetIndex(&globalCtx->objectCtx, sObjectIDs[thisx->params - 1]);
if (objBankIndex >= 0) {
gSegments[6] = PHYSICAL_TO_VIRTUAL(globalCtx->objectCtx.status[objBankIndex].segment);
gSegments[6] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[objBankIndex].segment);
}
gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(&D_06000000));
dlist = D_06000330;

View file

@ -96,7 +96,7 @@ void func_80977F80(DemoGeff* this, GlobalContext* globalCtx) {
OPEN_DISPS(gfxCtx, "../z_demo_geff.c", 204);
gSPSegment(oGfxCtx->polyOpa.p++, 0x06, globalCtx->objectCtx.status[objBankIndex].segment);
gSegments[6] = PHYSICAL_TO_VIRTUAL(globalCtx->objectCtx.status[objBankIndex].segment);
gSegments[6] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[objBankIndex].segment);
// Necessary to match
if (!globalCtx) {}

View file

@ -86,7 +86,7 @@ void EnGuest_Update(Actor* thisx, GlobalContext* globalCtx) {
SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_060000F0, NULL, this->limbDrawTable, this->transitionDrawTable,
16);
gSegments[6] = PHYSICAL_TO_VIRTUAL(globalCtx->objectCtx.status[this->osAnimeBankIndex].segment);
gSegments[6] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[this->osAnimeBankIndex].segment);
SkelAnime_ChangeAnim(&this->skelAnime, &D_060042AC, 1.0f, 0.0f,
SkelAnime_GetFrameCount(&D_060042AC.genericHeader), 0, 0.0f);
@ -166,7 +166,7 @@ void func_80A505CC(Actor* thisx, GlobalContext* globalCtx) {
func_80034F54(globalCtx, this->unk_2CC, this->unk_2EC, 16);
gSegments[6] = PHYSICAL_TO_VIRTUAL(globalCtx->objectCtx.status[this->osAnimeBankIndex].segment);
gSegments[6] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[this->osAnimeBankIndex].segment);
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
Actor_SetHeight(&this->actor, 60.0f);

View file

@ -608,7 +608,7 @@ void EnZl2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
void func_80B4FCCC(EnZl2* this, GlobalContext* globalCtx) {
s32 unk_274 = this->unk_274;
gSegments[6] = PHYSICAL_TO_VIRTUAL(globalCtx->objectCtx.status[unk_274].segment);
gSegments[6] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[unk_274].segment);
}
void func_80B4FD00(EnZl2* this, AnimationHeader* animation, u8 arg2, f32 transitionRate, s32 arg4) {