1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-22 15:01:17 +00:00

Use macros for oGfxCtx accesses (#465)

* fix colliderinit typo

* fix initchain

* reloc

* add defines

* add defines

* missed some on merge

* rename gfxCtx and add comment

* remove space
This commit is contained in:
fig02 2020-10-29 17:31:09 -04:00 committed by GitHub
parent 92bb1fb210
commit 3c5fe66dcd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
195 changed files with 2236 additions and 2229 deletions

View file

@ -325,9 +325,9 @@ void ArmsHook_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_80090480(globalCtx, &this->collider, &this->hookInfo, &sp6C, &sp60);
func_80093D18(globalCtx->state.gfxCtx);
gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arms_hook.c", 895),
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arms_hook.c", 895),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(oGfxCtx->polyOpa.p++, D_0602B288);
gSPDisplayList(POLY_OPA_DISP++, D_0602B288);
Matrix_Translate(this->actor.posRot.pos.x, this->actor.posRot.pos.y, this->actor.posRot.pos.z, MTXMODE_NEW);
Math_Vec3f_Diff(&player->unk_3C8, &this->actor.posRot.pos, &sp78);
sp58 = SQ(sp78.x) + SQ(sp78.z);
@ -335,9 +335,9 @@ void ArmsHook_Draw(Actor* thisx, GlobalContext* globalCtx) {
Matrix_RotateY(Math_atan2f(sp78.x, sp78.z), MTXMODE_APPLY);
Matrix_RotateX(Math_atan2f(-sp78.y, sp5C), MTXMODE_APPLY);
Matrix_Scale(0.015f, 0.015f, sqrtf(SQ(sp78.y) + sp58) * 0.01f, MTXMODE_APPLY);
gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arms_hook.c", 910),
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arms_hook.c", 910),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(oGfxCtx->polyOpa.p++, D_0602AFF0);
gSPDisplayList(POLY_OPA_DISP++, D_0602AFF0);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_arms_hook.c", 913);
}