mirror of
https://github.com/zeldaret/oot.git
synced 2024-12-03 16:26:17 +00:00
func_80034DD4
-> Actor_FadeInOut
https://github.com/zeldaret/oot/pull/2289#discussion_r1837267267
This commit is contained in:
parent
b11a9e9942
commit
318126a1b7
4 changed files with 12 additions and 12 deletions
|
@ -916,7 +916,7 @@ void func_80034BA0(struct PlayState* play, SkelAnime* skelAnime, OverrideLimbDra
|
|||
PostLimbDraw postLimbDraw, Actor* actor, s16 alpha);
|
||||
void func_80034CC4(struct PlayState* play, SkelAnime* skelAnime, OverrideLimbDraw overrideLimbDraw,
|
||||
PostLimbDraw postLimbDraw, Actor* actor, s16 alpha);
|
||||
s16 Actor_SmoothStep_Attention(Actor* actor, struct PlayState* play, s16 alpha, f32 threshold);
|
||||
s16 Actor_FadeInOut(Actor* actor, struct PlayState* play, s16 alpha, f32 radius);
|
||||
void func_80034F54(struct PlayState* play, s16* arg1, s16* arg2, s32 arg3);
|
||||
void Actor_Noop(Actor* actor, struct PlayState* play);
|
||||
|
||||
|
|
|
@ -4396,7 +4396,7 @@ void func_80034CC4(PlayState* play, SkelAnime* skelAnime, OverrideLimbDraw overr
|
|||
CLOSE_DISPS(play->state.gfxCtx, "../z_actor.c", 8904);
|
||||
}
|
||||
|
||||
s16 Actor_SmoothStep_Attention(Actor* actor, PlayState* play, s16 alpha, f32 threshold) {
|
||||
s16 Actor_FadeInOut(Actor* actor, PlayState* play, s16 alpha, f32 radius) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
f32 distance;
|
||||
|
||||
|
@ -4406,7 +4406,7 @@ s16 Actor_SmoothStep_Attention(Actor* actor, PlayState* play, s16 alpha, f32 thr
|
|||
distance = Math_Vec3f_DistXYZ(&actor->world.pos, &player->actor.world.pos);
|
||||
}
|
||||
|
||||
if (threshold < distance) {
|
||||
if (radius < distance) {
|
||||
actor->flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
|
||||
Math_SmoothStepToS(&alpha, 0, 6, 0x14, 1);
|
||||
} else {
|
||||
|
|
|
@ -650,15 +650,15 @@ u8 EnMd_SetMovedPos(EnMd* this, PlayState* play) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
void EnMd_SmoothStep_Attention(EnMd* this, PlayState* play) {
|
||||
f32 threshold;
|
||||
void EnMd_FadeInOut(EnMd* this, PlayState* play) {
|
||||
f32 radius;
|
||||
|
||||
if (play->sceneId != SCENE_MIDOS_HOUSE) {
|
||||
threshold = (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && !GET_EVENTCHKINF(EVENTCHKINF_1C) &&
|
||||
(play->sceneId == SCENE_KOKIRI_FOREST))
|
||||
? 100.0f
|
||||
: 400.0f;
|
||||
this->alpha = Actor_SmoothStep_Attention(&this->actor, play, this->alpha, threshold);
|
||||
radius = (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && !GET_EVENTCHKINF(EVENTCHKINF_1C) &&
|
||||
(play->sceneId == SCENE_KOKIRI_FOREST))
|
||||
? 100.0f
|
||||
: 400.0f;
|
||||
this->alpha = Actor_FadeInOut(&this->actor, play, this->alpha, radius);
|
||||
this->actor.shape.shadowAlpha = this->alpha;
|
||||
} else {
|
||||
this->alpha = 255;
|
||||
|
@ -844,7 +844,7 @@ void EnMd_Update(Actor* thisx, PlayState* play) {
|
|||
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
EnMd_UpdateEyes(this);
|
||||
EnMd_SmoothStep_Attention(this, play);
|
||||
EnMd_FadeInOut(this, play);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
EnMd_UpdateTalking(this, play);
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, UPDBGCHECKINFO_FLAG_2);
|
||||
|
|
|
@ -738,7 +738,7 @@ void EnSa_Update(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
if (this->actionFunc != func_80AF68E4) {
|
||||
this->alpha = Actor_SmoothStep_Attention(&this->actor, play, this->alpha, 400.0f);
|
||||
this->alpha = Actor_FadeInOut(&this->actor, play, this->alpha, 400.0f);
|
||||
} else {
|
||||
this->alpha = 255;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue