1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-03 06:24:30 +00:00

this -> thisx cleanup (#325)

This commit is contained in:
fig02 2020-08-15 18:26:13 -04:00 committed by GitHub
parent c9729e638d
commit 117b1f6a5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -43,16 +43,15 @@ void MagicDark_Init(Actor* thisx, GlobalContext* globalCtx) {
this->unk_15C = 0.6f; this->unk_15C = 0.6f;
} }
this->actor.posRot.pos = player->actor.posRot.pos; thisx->posRot.pos = player->actor.posRot.pos;
Actor_SetScale(&this->actor, 0.0f); Actor_SetScale(&this->actor, 0.0f);
this->actor.room = -1; thisx->room = -1;
if (gSaveContext.nayrusLoveTimer != 0) { if (gSaveContext.nayrusLoveTimer != 0) {
this->actor.update = func_80B874E4; thisx->update = func_80B874E4;
this->actor.draw = func_80B87A18; thisx->draw = func_80B87A18;
this->actor.scale.x = this->actor.scale.z = this->unk_15C * 1.6f; thisx->scale.x = thisx->scale.z = this->unk_15C * 1.6f;
// THIS needed below to match thisx->scale.y = this->unk_15C * 0.8f;
this->actor.scale.y = THIS->unk_15C * 0.8f;
this->unk_14C = 0; this->unk_14C = 0;
this->unk_14E = 0; this->unk_14E = 0;
} else { } else {
@ -79,20 +78,19 @@ void MagicDark_Update(Actor* thisx, GlobalContext* globalCtx) {
func_8002F974(&this->actor, NA_SE_PL_MAGIC_SOUL_BALL - SFX_FLAG); func_8002F974(&this->actor, NA_SE_PL_MAGIC_SOUL_BALL - SFX_FLAG);
if (this->unk_14C < 35) { if (this->unk_14C < 35) {
func_80B8772C(globalCtx, this->unk_14C * (1 / 45.0f)); func_80B8772C(globalCtx, this->unk_14C * (1 / 45.0f));
Math_SmoothScaleMaxMinF(&this->actor.scale.x, this->unk_15C * (1 / 12.000001f), 0.05f, 0.01f, 0.0001f); Math_SmoothScaleMaxMinF(&thisx->scale.x, this->unk_15C * (1 / 12.000001f), 0.05f, 0.01f, 0.0001f);
Actor_SetScale(&this->actor, this->actor.scale.x); Actor_SetScale(&this->actor, thisx->scale.x);
} else if (this->unk_14C < 55) { } else if (this->unk_14C < 55) {
Actor_SetScale(&this->actor, this->actor.scale.x * 0.9f); Actor_SetScale(&this->actor, thisx->scale.x * 0.9f);
Math_SmoothScaleMaxMinF(&this->unk_154, player->unk_90C, 0.5f, 3.0f, 1.0f); Math_SmoothScaleMaxMinF(&this->unk_154, player->unk_90C, 0.5f, 3.0f, 1.0f);
if (this->unk_14C >= 49) { if (this->unk_14C >= 49) {
func_80B8772C(globalCtx, (54 - this->unk_14C) * 0.2f); func_80B8772C(globalCtx, (54 - this->unk_14C) * 0.2f);
} }
} else { } else {
this->actor.update = func_80B874E4; thisx->update = func_80B874E4;
this->actor.draw = func_80B87A18; thisx->draw = func_80B87A18;
this->actor.scale.x = this->actor.scale.z = this->unk_15C * 1.6f; thisx->scale.x = thisx->scale.z = this->unk_15C * 1.6f;
// THIS needed below to match thisx->scale.y = this->unk_15C * 0.8f;
this->actor.scale.y = THIS->unk_15C * 0.8f;
this->unk_14C = 0; this->unk_14C = 0;
this->unk_14E = 0; this->unk_14E = 0;
} }