mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-10 08:50:23 +00:00
Macros: PLAYER
-> GET_PLAYER(globalCtx)
, ACTIVE_CAM
-> GET_ACTIVE_CAM(globalCtx)
(#921)
* PLAYER -> GET_PLAYER(globalCtx) * ACTIVE_CAM -> GET_ACTIVE_CAM(globalCtx) * PR Suggestions * formatter * Add brackets * remove from actorfixer.py * Bring back actorfixer.py change
This commit is contained in:
parent
f8498478c4
commit
1117783731
281 changed files with 1013 additions and 979 deletions
|
@ -39,7 +39,7 @@ static Color_RGBA8 D_80B88B10[] = { { 50, 100, 150, 200 }, { 255, 200, 150, 100
|
|||
|
||||
void MagicDark_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
MagicDark* this = THIS;
|
||||
Player* player = PLAYER;
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (!LINK_IS_ADULT) {
|
||||
this->scale = 0.4f;
|
||||
|
@ -73,7 +73,7 @@ void MagicDark_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void MagicDark_DiamondUpdate(Actor* thisx, GlobalContext* globalCtx) {
|
||||
MagicDark* this = THIS;
|
||||
u8 phi_a0;
|
||||
Player* player = PLAYER;
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
s16 pad;
|
||||
s16 nayrusLoveTimer = gSaveContext.nayrusLoveTimer;
|
||||
s32 msgMode = globalCtx->msgCtx.msgMode;
|
||||
|
@ -124,7 +124,7 @@ void MagicDark_DiamondUpdate(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
thisx->world.rot.y += 0x3E8;
|
||||
thisx->shape.rot.y = thisx->world.rot.y + Camera_GetCamDirYaw(ACTIVE_CAM);
|
||||
thisx->shape.rot.y = thisx->world.rot.y + Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx));
|
||||
this->timer++;
|
||||
gSaveContext.nayrusLoveTimer = nayrusLoveTimer + 1;
|
||||
|
||||
|
@ -168,7 +168,7 @@ void MagicDark_DimLighting(GlobalContext* globalCtx, f32 intensity) {
|
|||
void MagicDark_OrbUpdate(Actor* thisx, GlobalContext* globalCtx) {
|
||||
MagicDark* this = THIS;
|
||||
s32 pad;
|
||||
Player* player = PLAYER;
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
func_8002F974(&this->actor, NA_SE_PL_MAGIC_SOUL_BALL - SFX_FLAG);
|
||||
if (this->timer < 35) {
|
||||
|
@ -203,7 +203,7 @@ void MagicDark_DiamondDraw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
func_80093D84(globalCtx->state.gfxCtx);
|
||||
|
||||
{
|
||||
Player* player = PLAYER;
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
f32 heightDiff;
|
||||
|
||||
this->actor.world.pos.x = player->bodyPartsPos[0].x;
|
||||
|
@ -234,7 +234,7 @@ void MagicDark_DiamondDraw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void MagicDark_OrbDraw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
MagicDark* this = THIS;
|
||||
Vec3f pos;
|
||||
Player* player = PLAYER;
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
s32 pad;
|
||||
f32 sp6C = globalCtx->state.frames & 0x1F;
|
||||
|
||||
|
@ -252,11 +252,11 @@ void MagicDark_OrbDraw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
return;
|
||||
}
|
||||
|
||||
pos.x -= (this->actor.scale.x * 300.0f * Math_SinS(Camera_GetCamDirYaw(ACTIVE_CAM)) *
|
||||
Math_CosS(Camera_GetCamDirPitch(ACTIVE_CAM)));
|
||||
pos.y -= (this->actor.scale.x * 300.0f * Math_SinS(Camera_GetCamDirPitch(ACTIVE_CAM)));
|
||||
pos.z -= (this->actor.scale.x * 300.0f * Math_CosS(Camera_GetCamDirYaw(ACTIVE_CAM)) *
|
||||
Math_CosS(Camera_GetCamDirPitch(ACTIVE_CAM)));
|
||||
pos.x -= (this->actor.scale.x * 300.0f * Math_SinS(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx))) *
|
||||
Math_CosS(Camera_GetCamDirPitch(GET_ACTIVE_CAM(globalCtx))));
|
||||
pos.y -= (this->actor.scale.x * 300.0f * Math_SinS(Camera_GetCamDirPitch(GET_ACTIVE_CAM(globalCtx))));
|
||||
pos.z -= (this->actor.scale.x * 300.0f * Math_CosS(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx))) *
|
||||
Math_CosS(Camera_GetCamDirPitch(GET_ACTIVE_CAM(globalCtx))));
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_magic_dark.c", 619);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue