mirror of https://github.com/zeldaret/mm.git
Animation Cleanup: En_N* (#1504)
This commit is contained in:
parent
ebc36b2613
commit
28706d798d
|
|
@ -451,7 +451,7 @@ void Scene_CommandExitList(PlayState* play, SceneCmd* cmd) {
|
|||
void Scene_Command09(PlayState* play, SceneCmd* cmd) {
|
||||
}
|
||||
|
||||
// SceneTableEntry Header Command 0x15: Sound Settings=
|
||||
// SceneTableEntry Header Command 0x15: Sound Settings
|
||||
void Scene_CommandSoundSettings(PlayState* play, SceneCmd* cmd) {
|
||||
play->sequenceCtx.seqId = cmd->soundSettings.seqId;
|
||||
play->sequenceCtx.ambienceId = cmd->soundSettings.ambienceId;
|
||||
|
|
@ -467,7 +467,7 @@ void Scene_CommandEchoSetting(PlayState* play, SceneCmd* cmd) {
|
|||
play->roomCtx.curRoom.echo = cmd->echoSettings.echo;
|
||||
}
|
||||
|
||||
// SceneTableEntry Header Command 0x18: Alternate Header List=
|
||||
// SceneTableEntry Header Command 0x18: Alternate Header List
|
||||
void Scene_CommandAltHeaderList(PlayState* play, SceneCmd* cmd) {
|
||||
SceneCmd** altHeaderList;
|
||||
SceneCmd* altHeader;
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ void DmChar02_Destroy(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
void DmChar02_HandleCutscene(DmChar02* this, PlayState* play) {
|
||||
u8 shouldChangeAnimation = true;
|
||||
u8 changeAnim = true;
|
||||
s32 cueChannel;
|
||||
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_131)) {
|
||||
|
|
@ -110,7 +110,7 @@ void DmChar02_HandleCutscene(DmChar02* this, PlayState* play) {
|
|||
switch (play->csCtx.actorCues[cueChannel]->id) {
|
||||
default:
|
||||
this->animIndex = DMCHAR02_ANIM_HIT_GROUND;
|
||||
shouldChangeAnimation = false;
|
||||
changeAnim = false;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
|
|
@ -126,7 +126,7 @@ void DmChar02_HandleCutscene(DmChar02* this, PlayState* play) {
|
|||
break;
|
||||
}
|
||||
|
||||
if (shouldChangeAnimation) {
|
||||
if (changeAnim) {
|
||||
DmChar02_ChangeAnim(&this->skelAnime, &sAnimationInfo[this->animIndex], 0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -619,7 +619,7 @@ void func_808A1B48(DoorShutter* this, PlayState* play) {
|
|||
if (this->slidingDoor.dyna.actor.velocity.y > 20.0f) {
|
||||
this->slidingDoor.dyna.actor.floorHeight = this->slidingDoor.dyna.actor.home.pos.y;
|
||||
Actor_SpawnFloorDustRing(play, &this->slidingDoor.dyna.actor, &this->slidingDoor.dyna.actor.world.pos,
|
||||
45.0f, 10, 8.0f, 500, 10, 0);
|
||||
45.0f, 10, 8.0f, 500, 10, false);
|
||||
}
|
||||
Actor_PlaySfx(&this->slidingDoor.dyna.actor, NA_SE_EV_BIGWALL_BOUND);
|
||||
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ void EnAm_SpawnEffects(EnAm* this, PlayState* play) {
|
|||
EffectSsKirakira_SpawnSmall(play, &effectPos, &sVelocity, &sAccel, &D_808B1118, &D_808B111C);
|
||||
}
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_AMOS_WALK);
|
||||
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, 4.0f, 3, 8.0f, 300, 15, 0);
|
||||
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, 4.0f, 3, 8.0f, 300, 15, false);
|
||||
}
|
||||
|
||||
void func_808AFF9C(EnAm* this) {
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ void EnBaguo_EmergeFromUnderground(EnBaguo* this, PlayState* play) {
|
|||
this->actor.shape.rot.y = this->actor.world.rot.y;
|
||||
if ((play->gameplayFrames % 8) == 0) {
|
||||
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, this->actor.shape.shadowScale - 20.0f, 10,
|
||||
8.0f, 500, 10, 1);
|
||||
8.0f, 500, 10, true);
|
||||
}
|
||||
Math_ApproachF(&this->actor.shape.shadowScale, 50.0f, 0.3f, 5.0f);
|
||||
Math_ApproachF(&this->actor.shape.yOffset, 2700.0f, 100.0f, 500.0f);
|
||||
|
|
@ -205,7 +205,7 @@ void EnBaguo_Idle(EnBaguo* this, PlayState* play) {
|
|||
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 30, 300, 1000);
|
||||
if ((play->gameplayFrames % 8) == 0) {
|
||||
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos,
|
||||
this->actor.shape.shadowScale - 20.0f, 10, 8.0f, 500, 10, 1);
|
||||
this->actor.shape.shadowScale - 20.0f, 10, 8.0f, 500, 10, true);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_BAKUO_VOICE);
|
||||
}
|
||||
}
|
||||
|
|
@ -281,7 +281,7 @@ void EnBaguo_RetreatUnderground(EnBaguo* this, PlayState* play) {
|
|||
this->actor.shape.rot.y = this->actor.world.rot.y;
|
||||
if ((play->gameplayFrames % 8) == 0) {
|
||||
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, this->actor.shape.shadowScale - 20.0f, 10,
|
||||
8.0f, 500, 10, 1);
|
||||
8.0f, 500, 10, true);
|
||||
}
|
||||
|
||||
Math_ApproachF(&this->actor.shape.yOffset, -3000.0f, 100.0f, 500.0f);
|
||||
|
|
|
|||
|
|
@ -384,7 +384,7 @@ void EnBal_Fall(EnBal* this, PlayState* play) {
|
|||
} else if (this->timer == 30) {
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, TINGLE_ANIM_LAND);
|
||||
this->picto.actor.shape.rot = this->picto.actor.world.rot;
|
||||
Actor_SpawnFloorDustRing(play, &this->picto.actor, &worldPos, 10.0f, 30, 5.0f, 0, 0, 0);
|
||||
Actor_SpawnFloorDustRing(play, &this->picto.actor, &worldPos, 10.0f, 30, 5.0f, 0, 0, false);
|
||||
this->timer++;
|
||||
} else {
|
||||
if ((play->gameplayFrames % 2) != 0) {
|
||||
|
|
|
|||
|
|
@ -325,7 +325,7 @@ void EnBb_Down(EnBb* this, PlayState* play) {
|
|||
}
|
||||
|
||||
this->actor.bgCheckFlags &= ~BGCHECKFLAG_GROUND;
|
||||
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, 7.0f, 2, 2.0f, 0, 0, 0);
|
||||
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, 7.0f, 2, 2.0f, 0, 0, false);
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.y, BINANG_ADD(this->actor.yawTowardsPlayer, 0x8000), 0xBB8);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -392,7 +392,7 @@ void EnBbfall_Down(EnBbfall* this, PlayState* play) {
|
|||
}
|
||||
|
||||
this->actor.bgCheckFlags &= ~BGCHECKFLAG_GROUND;
|
||||
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, 7.0f, 2, 2.0f, 0, 0, 0);
|
||||
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, 7.0f, 2, 2.0f, 0, 0, false);
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.y, BINANG_ADD(this->actor.yawTowardsPlayer, 0x8000), 0xBB8);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -412,7 +412,7 @@ void func_808D1380(EnFloormas* this, PlayState* play) {
|
|||
this->actor.speed = 0.0f;
|
||||
this->actor.gravity = 0.0f;
|
||||
func_808D08D0(this);
|
||||
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, 15.0f, 6, 20.0f, 300, 100, 1);
|
||||
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, 15.0f, 6, 20.0f, 300, 100, true);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_FLOORMASTER_ATTACK);
|
||||
this->actionFunc = func_808D1458;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -539,8 +539,8 @@ void func_80B85FA8(EnKaizoku* this, PlayState* play) {
|
|||
this->picto.actor.world.pos.y = this->picto.actor.floorHeight;
|
||||
this->picto.actor.velocity.y = 0.0f;
|
||||
Player_SetCsActionWithHaltedActors(play, &this->picto.actor, PLAYER_CSACTION_4);
|
||||
Actor_SpawnFloorDustRing(play, &this->picto.actor, &this->leftFootPos, 3.0f, 2, 2.0f, 0, 0, 0);
|
||||
Actor_SpawnFloorDustRing(play, &this->picto.actor, &this->rightFootPos, 3.0f, 2, 2.0f, 0, 0, 0);
|
||||
Actor_SpawnFloorDustRing(play, &this->picto.actor, &this->leftFootPos, 3.0f, 2, 2.0f, 0, 0, false);
|
||||
Actor_SpawnFloorDustRing(play, &this->picto.actor, &this->rightFootPos, 3.0f, 2, 2.0f, 0, 0, false);
|
||||
Actor_PlaySfx(&this->picto.actor, NA_SE_EN_PIRATE_ONGND);
|
||||
}
|
||||
|
||||
|
|
@ -1405,8 +1405,8 @@ void func_80B88964(EnKaizoku* this, PlayState* play) {
|
|||
if (this->skelAnime.curFrame <= 8.0f) {
|
||||
this->picto.actor.shape.rot.y = this->picto.actor.world.rot.y = this->picto.actor.yawTowardsPlayer;
|
||||
} else if (Animation_OnFrame(&this->skelAnime, 13.0f)) {
|
||||
Actor_SpawnFloorDustRing(play, &this->picto.actor, &this->leftFootPos, 3.0f, 2, 2.0f, 0, 0, 0);
|
||||
Actor_SpawnFloorDustRing(play, &this->picto.actor, &this->rightFootPos, 3.0f, 2, 2.0f, 0, 0, 0);
|
||||
Actor_SpawnFloorDustRing(play, &this->picto.actor, &this->leftFootPos, 3.0f, 2, 2.0f, 0, 0, false);
|
||||
Actor_SpawnFloorDustRing(play, &this->picto.actor, &this->rightFootPos, 3.0f, 2, 2.0f, 0, 0, false);
|
||||
this->swordState = 1;
|
||||
this->picto.actor.speed = 10.0f;
|
||||
Actor_PlaySfx(&this->picto.actor, NA_SE_EN_PIRATE_ATTACK);
|
||||
|
|
|
|||
|
|
@ -1028,7 +1028,7 @@ void EnKakasi_DiggingAway(EnKakasi* this, PlayState* play) {
|
|||
|
||||
} else {
|
||||
Actor_SpawnFloorDustRing(play, &this->picto.actor, &this->picto.actor.world.pos,
|
||||
this->picto.actor.shape.shadowScale - 20.0f, 5, 4.0f, 200, 10, 1);
|
||||
this->picto.actor.shape.shadowScale - 20.0f, 5, 4.0f, 200, 10, true);
|
||||
Actor_PlaySfx(&this->picto.actor, NA_SE_EN_AKINDONUTS_HIDE);
|
||||
}
|
||||
}
|
||||
|
|
@ -1092,7 +1092,7 @@ void EnKakasi_RisingOutOfGround(EnKakasi* this, PlayState* play) {
|
|||
if (this->picto.actor.shape.yOffset < -10.0f) {
|
||||
if ((play->gameplayFrames % 8) == 0) {
|
||||
Actor_SpawnFloorDustRing(play, &this->picto.actor, &this->picto.actor.world.pos,
|
||||
this->picto.actor.shape.shadowScale - 20.0f, 10, 8.0f, 500, 10, 1);
|
||||
this->picto.actor.shape.shadowScale - 20.0f, 10, 8.0f, 500, 10, true);
|
||||
Actor_PlaySfx(&this->picto.actor, NA_SE_EN_AKINDONUTS_HIDE);
|
||||
}
|
||||
Math_ApproachF(&this->picto.actor.shape.yOffset, 0.0f, 0.5f, 200.0f);
|
||||
|
|
|
|||
|
|
@ -141,15 +141,6 @@ static ColliderCylinderInit sCylinderInit = {
|
|||
|
||||
static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, MASS_IMMOVABLE };
|
||||
|
||||
static AnimationInfoS sAnimationInfo[] = {
|
||||
{ &gNbIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // EN_NB_ANIM_0
|
||||
{ &gNbIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, // EN_NB_ANIM_1
|
||||
{ &gNbTalkAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // EN_NB_ANIM_TALK_ONCE
|
||||
{ &gNbTalkAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, // EN_NB_ANIM_TALK_LOOP
|
||||
{ &gNbAngryAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, // EN_NB_ANIM_ANGRY
|
||||
{ &gNbRelievedAnim, 1.0f, 0, -1, ANIMMODE_ONCE, -4 }, // EN_NB_ANIM_RELIEVED
|
||||
};
|
||||
|
||||
Actor* EnNb_FindActor(EnNb* this, PlayState* play, u8 actorCategory, s16 actorId) {
|
||||
Actor* thisx;
|
||||
Actor* actor = NULL;
|
||||
|
|
@ -181,25 +172,34 @@ void EnNb_UpdateSkelAnime(EnNb* this) {
|
|||
SkelAnime_Update(&this->skelAnime);
|
||||
}
|
||||
|
||||
static AnimationInfoS sAnimationInfo[EN_NB_ANIM_MAX] = {
|
||||
{ &gNbIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // EN_NB_ANIM_0
|
||||
{ &gNbIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, // EN_NB_ANIM_1
|
||||
{ &gNbTalkAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // EN_NB_ANIM_TALK_ONCE
|
||||
{ &gNbTalkAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, // EN_NB_ANIM_TALK_LOOP
|
||||
{ &gNbAngryAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, // EN_NB_ANIM_ANGRY
|
||||
{ &gNbRelievedAnim, 1.0f, 0, -1, ANIMMODE_ONCE, -4 }, // EN_NB_ANIM_RELIEVED
|
||||
};
|
||||
|
||||
s32 EnNb_ChangeAnim(EnNb* this, EnNbAnimation animIndex) {
|
||||
s32 shouldChange = false;
|
||||
s32 didAnimationChange = false;
|
||||
s32 changeAnim = false;
|
||||
s32 didAnimChange = false;
|
||||
|
||||
if ((animIndex == EN_NB_ANIM_0) || (animIndex == EN_NB_ANIM_1)) {
|
||||
if ((this->animIndex != EN_NB_ANIM_0) && (this->animIndex != EN_NB_ANIM_1)) {
|
||||
shouldChange = true;
|
||||
changeAnim = true;
|
||||
}
|
||||
} else if (animIndex != this->animIndex) {
|
||||
shouldChange = true;
|
||||
changeAnim = true;
|
||||
}
|
||||
|
||||
if (shouldChange) {
|
||||
if (changeAnim) {
|
||||
this->animIndex = animIndex;
|
||||
didAnimationChange = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, animIndex);
|
||||
didAnimChange = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, animIndex);
|
||||
this->animPlaySpeed = this->skelAnime.playSpeed;
|
||||
}
|
||||
|
||||
return didAnimationChange;
|
||||
return didAnimChange;
|
||||
}
|
||||
|
||||
void func_80BBFF24(EnNb* this, PlayState* play) {
|
||||
|
|
@ -301,6 +301,9 @@ s32 func_80BC00AC(Actor* thisx, PlayState* play) {
|
|||
this->behaviour++;
|
||||
ret = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
@ -333,14 +336,11 @@ s32 func_80BC01DC(Actor* thisx, PlayState* play) {
|
|||
|
||||
if (this->storyTimer == 20) {
|
||||
if (CHECK_EVENTINF(EVENTINF_42)) {
|
||||
// play->interfaceCtx.storyType = STORY_TYPE_MASK_FESTIVAL;
|
||||
play->interfaceCtx.storyType = 0;
|
||||
play->interfaceCtx.storyType = STORY_TYPE_MASK_FESTIVAL;
|
||||
} else {
|
||||
// play->interfaceCtx.storyType = STORY_TYPE_GIANTS_LEAVING;
|
||||
play->interfaceCtx.storyType = 1;
|
||||
play->interfaceCtx.storyType = STORY_TYPE_GIANTS_LEAVING;
|
||||
}
|
||||
// play->interfaceCtx.storyState = STORY_STATE_FADE_IN;
|
||||
play->interfaceCtx.storyState = 6;
|
||||
play->interfaceCtx.storyState = STORY_STATE_FADE_IN;
|
||||
R_STORY_FILL_SCREEN_ALPHA = 255;
|
||||
}
|
||||
|
||||
|
|
@ -350,15 +350,13 @@ s32 func_80BC01DC(Actor* thisx, PlayState* play) {
|
|||
break;
|
||||
|
||||
case ENNB_BEHAVIOUR_3:
|
||||
// play->interfaceCtx.storyState = STORY_STATE_SETUP_IDLE;
|
||||
play->interfaceCtx.storyState = 4;
|
||||
play->interfaceCtx.storyState = STORY_STATE_SETUP_IDLE;
|
||||
this->behaviour++;
|
||||
ret = true;
|
||||
break;
|
||||
|
||||
case ENNB_BEHAVIOUR_4:
|
||||
// play->interfaceCtx.storyState = STORY_STATE_FADE_OUT;
|
||||
play->interfaceCtx.storyState = 5;
|
||||
play->interfaceCtx.storyState = STORY_STATE_FADE_OUT;
|
||||
this->behaviour++;
|
||||
// fallthrough
|
||||
case ENNB_BEHAVIOUR_5:
|
||||
|
|
@ -377,6 +375,9 @@ s32 func_80BC01DC(Actor* thisx, PlayState* play) {
|
|||
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK_SLOW;
|
||||
SET_EVENTINF(EVENTINF_43);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
@ -527,8 +528,8 @@ s32 func_80BC0A18(EnNb* this, PlayState* play) {
|
|||
EnNb_ChangeAnim(this, EN_NB_ANIM_TALK_LOOP);
|
||||
break;
|
||||
|
||||
case 0x2904: // "You want to hear the carnival of time story? ..."
|
||||
case 0x290B: // "You want to hear the four giants story? ..."
|
||||
case 0x2904:
|
||||
case 0x290B:
|
||||
this->unk_18C = func_80BC08E0;
|
||||
this->unk_284 = 0;
|
||||
break;
|
||||
|
|
@ -538,7 +539,7 @@ s32 func_80BC0A18(EnNb* this, PlayState* play) {
|
|||
this->unk_284 = 0;
|
||||
break;
|
||||
|
||||
case 0x28CB: // "I told you I already ate!"
|
||||
case 0x28CB:
|
||||
EnNb_ChangeAnim(this, EN_NB_ANIM_ANGRY);
|
||||
break;
|
||||
|
||||
|
|
@ -550,6 +551,9 @@ s32 func_80BC0A18(EnNb* this, PlayState* play) {
|
|||
case 0x2912:
|
||||
EnNb_ChangeAnim(this, EN_NB_ANIM_TALK_LOOP);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -601,10 +605,6 @@ s32 EnNb_ProcessScheduleOutput(EnNb* this, PlayState* play, ScheduleOutput* sche
|
|||
this->unk_274 = 40.0f;
|
||||
|
||||
switch (scheduleOutput->result) {
|
||||
default:
|
||||
success = false;
|
||||
break;
|
||||
|
||||
case EN_NB_SCH_1:
|
||||
case EN_NB_SCH_3:
|
||||
case EN_NB_SCH_4:
|
||||
|
|
@ -614,6 +614,10 @@ s32 EnNb_ProcessScheduleOutput(EnNb* this, PlayState* play, ScheduleOutput* sche
|
|||
case EN_NB_SCH_2:
|
||||
success = func_80BC0B98(this, play, scheduleOutput);
|
||||
break;
|
||||
|
||||
default:
|
||||
success = false;
|
||||
break;
|
||||
}
|
||||
return success;
|
||||
}
|
||||
|
|
@ -706,7 +710,7 @@ void EnNb_Destroy(Actor* thisx, PlayState* play) {
|
|||
EnNb* this = THIS;
|
||||
|
||||
Collider_DestroyCylinder(play, &this->collider);
|
||||
play->interfaceCtx.storyState = 3;
|
||||
play->interfaceCtx.storyState = STORY_STATE_DESTROY;
|
||||
}
|
||||
|
||||
void EnNb_Update(Actor* thisx, PlayState* play) {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@ typedef enum EnNbAnimation {
|
|||
/* 2 */ EN_NB_ANIM_TALK_ONCE,
|
||||
/* 3 */ EN_NB_ANIM_TALK_LOOP,
|
||||
/* 4 */ EN_NB_ANIM_ANGRY,
|
||||
/* 5 */ EN_NB_ANIM_RELIEVED
|
||||
/* 5 */ EN_NB_ANIM_RELIEVED,
|
||||
/* 6 */ EN_NB_ANIM_MAX
|
||||
} EnNbAnimation;
|
||||
|
||||
typedef struct EnNb {
|
||||
|
|
|
|||
|
|
@ -203,16 +203,14 @@ void EnNeoReeba_ChooseAction(EnNeoReeba* this, PlayState* play) {
|
|||
|
||||
if ((distToPlayer > 200.0f) || (fabsf(this->actor.playerHeightRel) > 100.0f)) {
|
||||
EnNeoReeba_SetupSink(this);
|
||||
} else {
|
||||
if (this->actionTimer == 0) {
|
||||
if ((distToPlayer < 140.0f) && (fabsf(this->actor.playerHeightRel) < 100.0f)) {
|
||||
this->targetPos = player->actor.world.pos;
|
||||
this->targetPos.x += 10.0f * player->actor.speed * Math_SinS(player->actor.world.rot.y);
|
||||
this->targetPos.z += 10.0f * player->actor.speed * Math_CosS(player->actor.world.rot.y);
|
||||
EnNeoReeba_SetupMove(this);
|
||||
} else {
|
||||
EnNeoReeba_SetupReturnHome(this);
|
||||
}
|
||||
} else if (this->actionTimer == 0) {
|
||||
if ((distToPlayer < 140.0f) && (fabsf(this->actor.playerHeightRel) < 100.0f)) {
|
||||
this->targetPos = player->actor.world.pos;
|
||||
this->targetPos.x += 10.0f * player->actor.speed * Math_SinS(player->actor.world.rot.y);
|
||||
this->targetPos.z += 10.0f * player->actor.speed * Math_CosS(player->actor.world.rot.y);
|
||||
EnNeoReeba_SetupMove(this);
|
||||
} else {
|
||||
EnNeoReeba_SetupReturnHome(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -231,9 +229,9 @@ void EnNeoReeba_SetupSink(EnNeoReeba* this) {
|
|||
void EnNeoReeba_Sink(EnNeoReeba* this, PlayState* play) {
|
||||
if (Math_SmoothStepToF(&this->actor.shape.yOffset, -2000.0f, 0.5f, this->sinkRiseRate, 10.0f) == 0.0f) {
|
||||
EnNeoReeba_SetupWaitUnderground(this);
|
||||
} else if (play->gameplayFrames % 4 == 0) {
|
||||
} else if ((play->gameplayFrames % 4) == 0) {
|
||||
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, this->actor.shape.shadowScale, 1, 8.0f,
|
||||
500, 10, 1);
|
||||
500, 10, true);
|
||||
}
|
||||
|
||||
if (this->sinkRiseRate < 300.0f) {
|
||||
|
|
@ -257,7 +255,7 @@ void EnNeoReeba_RiseOutOfGround(EnNeoReeba* this, PlayState* play) {
|
|||
EnNeoReeba_SetupChooseAction(this);
|
||||
} else if (play->gameplayFrames % 4 == 0) {
|
||||
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, this->actor.shape.shadowScale, 1, 8.0f,
|
||||
500, 10, 1);
|
||||
500, 10, true);
|
||||
}
|
||||
|
||||
if (this->sinkRiseRate > 20.0f) {
|
||||
|
|
@ -280,7 +278,7 @@ void EnNeoReeba_Move(EnNeoReeba* this, PlayState* play) {
|
|||
f32 remainingDist = Math_Vec3f_StepToXZ(&this->actor.world.pos, &this->targetPos, this->actor.speed);
|
||||
|
||||
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, this->actor.shape.shadowScale, 1, 4.0f, 0xFA,
|
||||
0xA, 1);
|
||||
10, true);
|
||||
|
||||
if (remainingDist < 2.0f) {
|
||||
EnNeoReeba_SetupChooseAction(this);
|
||||
|
|
@ -432,7 +430,7 @@ void EnNeoReeba_DamageAnim(EnNeoReeba* this, PlayState* play) {
|
|||
}
|
||||
|
||||
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, this->actor.shape.shadowScale, 1, 4.0f,
|
||||
250, 10, 1);
|
||||
250, 10, true);
|
||||
this->actionTimer--;
|
||||
}
|
||||
}
|
||||
|
|
@ -516,6 +514,7 @@ void EnNeoReeba_HandleHit(EnNeoReeba* this, PlayState* play) {
|
|||
case EN_NEO_REEBA_DMGEFF_ELECTRIC_STUN:
|
||||
case EN_NEO_REEBA_DMGEFF_NONE:
|
||||
return;
|
||||
|
||||
default:
|
||||
if (this->stunTimer >= 2) {
|
||||
EnNeoReeba_SpawnIce(this, play);
|
||||
|
|
@ -542,7 +541,7 @@ void EnNeoReeba_HandleHit(EnNeoReeba* this, PlayState* play) {
|
|||
}
|
||||
this->drawEffectAlpha = 1.0f;
|
||||
this->drawEffectScale = 0.0f;
|
||||
/* fallthrough */
|
||||
// fallthrough
|
||||
case EN_NEO_REEBA_DMGEFF_NONE:
|
||||
case EN_NEO_REEBA_DMGEFF_SHATTER:
|
||||
if ((this->actor.colChkInfo.damageEffect == EN_NEO_REEBA_DMGEFF_SHATTER) ||
|
||||
|
|
@ -570,13 +569,15 @@ void EnNeoReeba_HandleHit(EnNeoReeba* this, PlayState* play) {
|
|||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA, 40);
|
||||
EnNeoReeba_SetupStun(this);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (((this->collider.base.ocFlags2 & OC2_HIT_PLAYER) || (this->collider.base.atFlags & AT_BOUNCED)) &&
|
||||
(this->actionFunc == EnNeoReeba_Move)) {
|
||||
EnNeoReeba_SetupBounce(this);
|
||||
}
|
||||
} else if (((this->collider.base.ocFlags2 & OC2_HIT_PLAYER) || (this->collider.base.atFlags & AT_BOUNCED)) &&
|
||||
(this->actionFunc == EnNeoReeba_Move)) {
|
||||
EnNeoReeba_SetupBounce(this);
|
||||
}
|
||||
|
||||
if ((this->actionFunc != EnNeoReeba_WaitUnderground) && (this->actionFunc != EnNeoReeba_Sink) &&
|
||||
(this->actionFunc != EnNeoReeba_RiseOutOfGround) && (this->actionFunc != EnNeoReeba_DamageAnim) &&
|
||||
(this->actionFunc != EnNeoReeba_PlayDeathEffects)) {
|
||||
|
|
@ -663,9 +664,9 @@ void EnNeoReeba_SpawnIce(EnNeoReeba* this, PlayState* play) {
|
|||
static Color_RGBA8 sIcePrimColor = { 170, 255, 255, 255 };
|
||||
static Color_RGBA8 sIceEnvColor = { 200, 200, 255, 255 };
|
||||
static Vec3f sIceAccel = { 0.0f, -1.0f, 0.0f };
|
||||
Vec3f iceVel;
|
||||
f32 xVel;
|
||||
f32 zVel;
|
||||
Vec3f iceVelocity;
|
||||
f32 xVelocity;
|
||||
f32 zVelocity;
|
||||
s32 i;
|
||||
s16 yaw;
|
||||
s32 j;
|
||||
|
|
@ -674,15 +675,15 @@ void EnNeoReeba_SpawnIce(EnNeoReeba* this, PlayState* play) {
|
|||
|
||||
for (i = 0; i < EN_NEO_REEBA_BODYPART_MAX; i++) {
|
||||
yaw = Math_Vec3f_Yaw(&this->actor.world.pos, &this->bodyPartsPos[i]);
|
||||
xVel = Math_SinS(yaw) * 3.0f;
|
||||
zVel = Math_CosS(yaw) * 3.0f;
|
||||
xVelocity = Math_SinS(yaw) * 3.0f;
|
||||
zVelocity = Math_CosS(yaw) * 3.0f;
|
||||
|
||||
for (j = 0; j < 4; j++) {
|
||||
iceVel.x = (Rand_Centered() * 3.0f) + xVel;
|
||||
iceVel.z = (Rand_Centered() * 3.0f) + zVel;
|
||||
iceVel.y = (Rand_ZeroOne() * 6.0f) + 4.0f;
|
||||
EffectSsEnIce_Spawn(play, &this->bodyPartsPos[i], 0.7f, &iceVel, &sIceAccel, &sIcePrimColor, &sIceEnvColor,
|
||||
30);
|
||||
iceVelocity.x = (Rand_Centered() * 3.0f) + xVelocity;
|
||||
iceVelocity.z = (Rand_Centered() * 3.0f) + zVelocity;
|
||||
iceVelocity.y = (Rand_ZeroOne() * 6.0f) + 4.0f;
|
||||
EffectSsEnIce_Spawn(play, &this->bodyPartsPos[i], 0.7f, &iceVelocity, &sIceAccel, &sIcePrimColor,
|
||||
&sIceEnvColor, 30);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ void EnNimotsu_Update(Actor* thisx, PlayState* play) {
|
|||
dustPosition.x = this->actor.world.pos.x + Rand_CenteredFloat(15.0f);
|
||||
dustPosition.y = this->actor.world.pos.y;
|
||||
dustPosition.z = this->actor.world.pos.z + Rand_CenteredFloat(15.0f);
|
||||
Actor_SpawnFloorDustRing(play, &this->actor, &dustPosition, 20.0f, 0, 2.0f, 0, 0, 0);
|
||||
Actor_SpawnFloorDustRing(play, &this->actor, &dustPosition, 20.0f, 0, 2.0f, 0, 0, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
void EnNiw_Init(Actor* thisx, PlayState* play);
|
||||
void EnNiw_Destroy(Actor* thisx, PlayState* play);
|
||||
void EnNiw_Update(Actor* thisx, PlayState* play);
|
||||
void EnNiw_Update(Actor* thisx, PlayState* play2);
|
||||
void EnNiw_Draw(Actor* thisx, PlayState* play);
|
||||
void EnNiw_SetupIdle(EnNiw* this);
|
||||
void EnNiw_Idle(EnNiw* this, PlayState* play);
|
||||
|
|
@ -31,7 +31,7 @@ void EnNiw_UpdateFeather(EnNiw* this, PlayState* play);
|
|||
void EnNiw_DrawFeathers(EnNiw* this, PlayState* play);
|
||||
void EnNiw_CheckRage(EnNiw* this, PlayState* play);
|
||||
void EnNiw_AnimateWingHead(EnNiw* this, PlayState* play, s16 animationState);
|
||||
void EnNiw_SpawnFeather(EnNiw* this, Vec3f* pos, Vec3f* vel, Vec3f* accel, f32 scale);
|
||||
void EnNiw_SpawnFeather(EnNiw* this, Vec3f* pos, Vec3f* velocity, Vec3f* accel, f32 scale);
|
||||
|
||||
s16 sCuccoStormActive = false;
|
||||
|
||||
|
|
@ -279,9 +279,9 @@ void EnNiw_SpawnAttackNiw(EnNiw* this, PlayState* play) {
|
|||
xView = play->view.at.x - play->view.eye.x;
|
||||
yView = play->view.at.y - play->view.eye.y;
|
||||
zView = play->view.at.z - play->view.eye.z;
|
||||
newNiwPos.x = ((Rand_ZeroOne() - 0.5f) * xView) + play->view.eye.x;
|
||||
newNiwPos.y = Rand_CenteredFloat(0.3f) + (play->view.eye.y + 50.0f + (yView * 0.5f));
|
||||
newNiwPos.z = ((Rand_ZeroOne() - 0.5f) * zView) + play->view.eye.z;
|
||||
newNiwPos.x = play->view.eye.x + ((Rand_ZeroOne() - 0.5f) * xView);
|
||||
newNiwPos.y = play->view.eye.y + 50.0f + (yView * 0.5f) + Rand_CenteredFloat(0.3f);
|
||||
newNiwPos.z = play->view.eye.z + ((Rand_ZeroOne() - 0.5f) * zView);
|
||||
attackNiw = Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_ATTACK_NIW, newNiwPos.x,
|
||||
newNiwPos.y, newNiwPos.z, 0, 0, 0, ATTACK_NIW_REGULAR);
|
||||
|
||||
|
|
@ -310,7 +310,7 @@ void EnNiw_UpdateRunning(EnNiw* this, PlayState* play, s32 isStormCucco) {
|
|||
this->runningDirectionTimer = 5;
|
||||
}
|
||||
|
||||
if (this->isRunningRight == false) {
|
||||
if (!this->isRunningRight) {
|
||||
runningDirection = runningAngles[isStormCucco];
|
||||
} else {
|
||||
runningDirection = -runningAngles[isStormCucco];
|
||||
|
|
@ -354,9 +354,9 @@ void EnNiw_Idle(EnNiw* this, PlayState* play) {
|
|||
this->actor.speed = 0.0f;
|
||||
this->actionFunc = EnNiw_Held;
|
||||
return;
|
||||
} else {
|
||||
Actor_OfferCarry(&this->actor, play);
|
||||
}
|
||||
|
||||
Actor_OfferCarry(&this->actor, play);
|
||||
} else { // NIW_TYPE_UNK1 || NIW_TYPE_HELD
|
||||
this->unkIdleTimer2 = 10;
|
||||
}
|
||||
|
|
@ -568,15 +568,9 @@ void EnNiw_Swimming(EnNiw* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void EnNiw_Trigger(EnNiw* this, PlayState* play) {
|
||||
s32 state;
|
||||
|
||||
// Possible Fake Match: the weird way this state is set
|
||||
if (1) {
|
||||
state = NIW_STATE_ANGRY1;
|
||||
}
|
||||
|
||||
this->cuccoStormTimer = 10;
|
||||
this->niwState = this->nextAnimIndex = state; // NIW_ANIM_HEAD_PECKING
|
||||
this->nextAnimIndex = NIW_ANIM_HEAD_PECKING;
|
||||
this->niwState = NIW_STATE_ANGRY1;
|
||||
this->actionFunc = EnNiw_Upset;
|
||||
}
|
||||
|
||||
|
|
@ -740,22 +734,20 @@ void EnNiw_CheckRage(EnNiw* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
void EnNiw_Update(Actor* thisx, PlayState* play) {
|
||||
void EnNiw_Update(Actor* thisx, PlayState* play2) {
|
||||
PlayState* play = play2;
|
||||
EnNiw* this = THIS;
|
||||
s8 pad0;
|
||||
s16 i;
|
||||
Player* player = GET_PLAYER(play);
|
||||
s16 pad1;
|
||||
s16 i;
|
||||
s16 featherCount;
|
||||
Vec3f pos;
|
||||
Vec3f vel;
|
||||
Vec3f velocity;
|
||||
Vec3f accel;
|
||||
s32 pad2[10];
|
||||
s32 pad[11];
|
||||
f32 featherScale;
|
||||
f32 viewAtToEyeNormY;
|
||||
f32 floorHeight;
|
||||
f32 dist = 20.0f;
|
||||
s32 pad3;
|
||||
|
||||
this->unusedCounter28C++;
|
||||
|
||||
|
|
@ -773,9 +765,9 @@ void EnNiw_Update(Actor* thisx, PlayState* play) {
|
|||
featherCount = 4;
|
||||
}
|
||||
for (i = 0; i < featherCount; i++) {
|
||||
pos.x = Rand_CenteredFloat(10.0f) + this->actor.world.pos.x;
|
||||
pos.y = Rand_CenteredFloat(10.0f) + (this->actor.world.pos.y + this->unk308);
|
||||
pos.z = Rand_CenteredFloat(10.0f) + this->actor.world.pos.z;
|
||||
pos.x = this->actor.world.pos.x + Rand_CenteredFloat(10.0f);
|
||||
pos.y = this->actor.world.pos.y + this->unk308 + Rand_CenteredFloat(10.0f);
|
||||
pos.z = this->actor.world.pos.z + Rand_CenteredFloat(10.0f);
|
||||
featherScale = Rand_ZeroFloat(6.0f) + 6.0f;
|
||||
|
||||
if ((this->unk29E == 2) && (this->unk308 != 0)) {
|
||||
|
|
@ -785,13 +777,13 @@ void EnNiw_Update(Actor* thisx, PlayState* play) {
|
|||
if (this->unk308 == 0) {
|
||||
featherScale = Rand_ZeroFloat(2.0f) + 2.0f;
|
||||
}
|
||||
vel.x = Rand_CenteredFloat(3.0f);
|
||||
vel.y = Rand_ZeroFloat(2.0f) * 0.5f + 2.0f;
|
||||
vel.z = Rand_CenteredFloat(3.0f);
|
||||
velocity.x = Rand_CenteredFloat(3.0f);
|
||||
velocity.y = Rand_ZeroFloat(2.0f) * 0.5f + 2.0f;
|
||||
velocity.z = Rand_CenteredFloat(3.0f);
|
||||
accel.z = accel.x = 0.0f;
|
||||
accel.y = -0.15f;
|
||||
|
||||
EnNiw_SpawnFeather(this, &pos, &vel, &accel, featherScale);
|
||||
EnNiw_SpawnFeather(this, &pos, &velocity, &accel, featherScale);
|
||||
}
|
||||
this->unk29E = 0;
|
||||
}
|
||||
|
|
@ -861,7 +853,7 @@ void EnNiw_Update(Actor* thisx, PlayState* play) {
|
|||
this->isStormActive = this->unusedCounter28C = this->unk292 = this->unk29E = this->unk298 = this->isRunningRight = this->nextAnimIndex = 0;
|
||||
// clang-format on
|
||||
|
||||
for (i = 0; i < 10; i++) {
|
||||
for (i = 0; i < ARRAY_COUNT(this->targetLimbRots); i++) {
|
||||
this->targetLimbRots[i] = 0.0f;
|
||||
}
|
||||
|
||||
|
|
@ -890,6 +882,7 @@ void EnNiw_Update(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
EnNiw_CheckRage(this, play);
|
||||
|
||||
if ((this->flutterSfxTimer == 0) && (this->niwState == NIW_STATE_HELD)) {
|
||||
this->flutterSfxTimer = 7;
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_CHICKEN_FLUTTER);
|
||||
|
|
@ -909,8 +902,6 @@ void EnNiw_Update(Actor* thisx, PlayState* play) {
|
|||
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||||
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
|
||||
|
||||
if (play) {}
|
||||
|
||||
if ((this->niwState != NIW_STATE_HELD) && (this->niwState != NIW_STATE_FALLING)) {
|
||||
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
|
||||
}
|
||||
|
|
@ -948,15 +939,15 @@ void EnNiw_Draw(Actor* thisx, PlayState* play) {
|
|||
EnNiw_DrawFeathers(this, play);
|
||||
}
|
||||
|
||||
void EnNiw_SpawnFeather(EnNiw* this, Vec3f* pos, Vec3f* vel, Vec3f* accel, f32 scale) {
|
||||
void EnNiw_SpawnFeather(EnNiw* this, Vec3f* pos, Vec3f* velocity, Vec3f* accel, f32 scale) {
|
||||
s16 i;
|
||||
EnNiwFeather* feather = &this->feathers[0];
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(this->feathers); i++, feather++) {
|
||||
if (feather->isEnabled == false) {
|
||||
if (!feather->isEnabled) {
|
||||
feather->isEnabled = true;
|
||||
feather->pos = *pos;
|
||||
feather->vel = *vel;
|
||||
feather->velocity = *velocity;
|
||||
feather->accel = *accel;
|
||||
feather->timer = 0;
|
||||
feather->scale = scale / 1000.0f;
|
||||
|
|
@ -975,18 +966,18 @@ void EnNiw_UpdateFeather(EnNiw* this, PlayState* play) {
|
|||
for (i = 0; i < ARRAY_COUNT(this->feathers); i++, feather++) {
|
||||
if (feather->isEnabled) {
|
||||
feather->timer++;
|
||||
feather->pos.x += feather->vel.x;
|
||||
feather->pos.y += feather->vel.y;
|
||||
feather->pos.z += feather->vel.z;
|
||||
feather->vel.x += feather->accel.x;
|
||||
feather->vel.y += feather->accel.y;
|
||||
feather->vel.z += feather->accel.z;
|
||||
feather->pos.x += feather->velocity.x;
|
||||
feather->pos.y += feather->velocity.y;
|
||||
feather->pos.z += feather->velocity.z;
|
||||
feather->velocity.x += feather->accel.x;
|
||||
feather->velocity.y += feather->accel.y;
|
||||
feather->velocity.z += feather->accel.z;
|
||||
if (feather->isEnabled == true) {
|
||||
feather->zRotStart++;
|
||||
Math_ApproachF(&feather->vel.x, 0.0f, 1.0f, featherVelocityGoal);
|
||||
Math_ApproachF(&feather->vel.z, 0.0f, 1.0f, featherVelocityGoal);
|
||||
if (feather->vel.y < -0.5f) {
|
||||
feather->vel.y = -0.5f;
|
||||
Math_ApproachF(&feather->velocity.x, 0.0f, 1.0f, featherVelocityGoal);
|
||||
Math_ApproachF(&feather->velocity.z, 0.0f, 1.0f, featherVelocityGoal);
|
||||
if (feather->velocity.y < -0.5f) {
|
||||
feather->velocity.y = -0.5f;
|
||||
}
|
||||
|
||||
feather->zRot = Math_SinS(feather->zRotStart * 0xBB8) * M_PI * 0.2f;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ typedef void (*EnNiwActionFunc)(struct EnNiw*, PlayState*);
|
|||
typedef struct {
|
||||
/* 0x00 */ u8 isEnabled;
|
||||
/* 0x04 */ Vec3f pos;
|
||||
/* 0x10 */ Vec3f vel;
|
||||
/* 0x10 */ Vec3f velocity;
|
||||
/* 0x1C */ Vec3f accel;
|
||||
/* 0x28 */ s16 life;
|
||||
/* 0x2A */ s16 zRotStart;
|
||||
|
|
@ -61,7 +61,7 @@ typedef struct EnNiw {
|
|||
/* 0x296 */ s16 unkToggle296;
|
||||
/* 0x298 */ s16 unk298;
|
||||
/* 0x29C */ s16 isRunningRight; // toggle (direction cucco is turning while running)
|
||||
/* 0x29C */ u16 nextAnimIndex;
|
||||
/* 0x29C */ s16 nextAnimIndex;
|
||||
/* 0x29E */ s16 unk29E; // three states 0/1/2
|
||||
/* 0x2A0 */ s16 isStormActive; // we have a data value shared between all cucco, this shouldn't need to exist
|
||||
/* 0x2A2 */ s16 niwType;
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ void EnNutsball_Update(Actor* thisx, PlayState* play2) {
|
|||
Vec3f worldPos;
|
||||
Vec3s worldRot;
|
||||
Vec3f spawnBurstPos;
|
||||
f32 spdXZ;
|
||||
f32 speedXZ;
|
||||
s32 bgId;
|
||||
CollisionPoly* poly;
|
||||
|
||||
|
|
@ -102,9 +102,9 @@ void EnNutsball_Update(Actor* thisx, PlayState* play2) {
|
|||
this->timer--;
|
||||
if (this->timer < 0) {
|
||||
this->actor.velocity.y += this->actor.gravity;
|
||||
spdXZ = sqrtf((this->actor.velocity.x * this->actor.velocity.x) +
|
||||
(this->actor.velocity.z * this->actor.velocity.z));
|
||||
this->actor.world.rot.x = Math_Atan2S_XY(spdXZ, this->actor.velocity.y);
|
||||
speedXZ = sqrtf((this->actor.velocity.x * this->actor.velocity.x) +
|
||||
(this->actor.velocity.z * this->actor.velocity.z));
|
||||
this->actor.world.rot.x = Math_Atan2S_XY(speedXZ, this->actor.velocity.y);
|
||||
}
|
||||
this->actor.home.rot.z += 0x2AA8;
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) || (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) ||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ void EnNwc_Turn(EnNwc* this, PlayState* play);
|
|||
void EnNwc_CheckForBreman(EnNwc* this, PlayState* play);
|
||||
|
||||
void EnNwc_DrawAdultBody(Actor* thisx, PlayState* play);
|
||||
s32 EnNwc_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx);
|
||||
EnHs* EnNwc_FindGrog(PlayState* play);
|
||||
|
||||
typedef enum EnNwcState {
|
||||
|
|
@ -53,10 +52,6 @@ ActorInit En_Nwc_InitVars = {
|
|||
/**/ EnNwc_Draw,
|
||||
};
|
||||
|
||||
Color_RGBA8 sPrimColor = { 255, 255, 255, 255 };
|
||||
|
||||
Color_RGBA8 sEnvColor = { 80, 80, 80, 255 };
|
||||
|
||||
void EnNwc_Init(Actor* thisx, PlayState* play) {
|
||||
s32 niwObjectSlot;
|
||||
EnNwc* this = THIS;
|
||||
|
|
@ -94,9 +89,11 @@ void EnNwc_Destroy(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
void EnNwc_SpawnDust(EnNwc* this, PlayState* play) {
|
||||
static Color_RGBA8 sPrimColor = { 255, 255, 255, 255 };
|
||||
static Color_RGBA8 sEnvColor = { 80, 80, 80, 255 };
|
||||
Vec3f pos;
|
||||
Vec3f vec5;
|
||||
Vec3f vel;
|
||||
Vec3f velocity;
|
||||
Vec3f accel;
|
||||
s16 yaw;
|
||||
s16 pitch;
|
||||
|
|
@ -110,17 +107,17 @@ void EnNwc_SpawnDust(EnNwc* this, PlayState* play) {
|
|||
vec5.z = this->actor.world.pos.z - 5.0f * Math_CosS(yaw) * Math_CosS(pitch);
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
vel.x = Rand_CenteredFloat(4.0f);
|
||||
vel.y = Rand_CenteredFloat(4.0f);
|
||||
vel.z = Rand_CenteredFloat(4.0f);
|
||||
accel.x = -vel.x * 0.1f;
|
||||
accel.y = -vel.y * 0.1f;
|
||||
accel.z = -vel.z * 0.1f;
|
||||
pos.x = vec5.x + vel.x;
|
||||
pos.y = vec5.y + vel.y;
|
||||
pos.z = vec5.z + vel.z;
|
||||
velocity.x = Rand_CenteredFloat(4.0f);
|
||||
velocity.y = Rand_CenteredFloat(4.0f);
|
||||
velocity.z = Rand_CenteredFloat(4.0f);
|
||||
accel.x = -velocity.x * 0.1f;
|
||||
accel.y = -velocity.y * 0.1f;
|
||||
accel.z = -velocity.z * 0.1f;
|
||||
pos.x = vec5.x + velocity.x;
|
||||
pos.y = vec5.y + velocity.y;
|
||||
pos.z = vec5.z + velocity.z;
|
||||
|
||||
func_800B0F80(play, &pos, &vel, &accel, &sPrimColor, &sEnvColor, 300, 30, 10);
|
||||
func_800B0F80(play, &pos, &velocity, &accel, &sPrimColor, &sEnvColor, 300, 30, 10);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -467,6 +464,7 @@ void EnNwc_Update(Actor* thisx, PlayState* play) {
|
|||
Actor_MoveWithGravity(&this->actor);
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 10.0f, 10.0f, 10.0f, UPDBGCHECKINFO_FLAG_1 | UPDBGCHECKINFO_FLAG_4);
|
||||
this->actionFunc(this, play);
|
||||
|
||||
if (this->hasGrownUp & 1) {
|
||||
this->actor.objectSlot = this->niwObjectSlot;
|
||||
this->actor.draw = EnNwc_DrawAdultBody;
|
||||
|
|
|
|||
|
|
@ -539,7 +539,7 @@ void func_80BAB374(EnSuttari* this, PlayState* play) {
|
|||
sp38.x = Rand_CenteredFloat(15.0f) + this->actor.world.pos.x;
|
||||
sp38.y = this->actor.world.pos.y;
|
||||
sp38.z = Rand_CenteredFloat(15.0f) + this->actor.world.pos.z;
|
||||
Actor_SpawnFloorDustRing(play, &this->actor, &sp38, 10.0f, 0, 2.0f, 0, 0, 0);
|
||||
Actor_SpawnFloorDustRing(play, &this->actor, &sp38, 10.0f, 0, 2.0f, 0, 0, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -331,7 +331,7 @@ void EnSyatekiWf_Run(EnSyatekiWf* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
|
||||
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, 10.0f, 3, 2.0f, 0, 0, 0);
|
||||
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, 10.0f, 3, 2.0f, 0, 0, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -714,7 +714,7 @@ void func_80895424(EnTite* this, PlayState* play) {
|
|||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->collider.base.acFlags |= AC_ON;
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, 20.0f, 11, 4.0f, 0, 0, 0);
|
||||
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, 20.0f, 11, 4.0f, 0, 0, false);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_EYEGOLE_ATTACK);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -643,7 +643,7 @@ void func_80AD4A78(EnTrt2* this, PlayState* play) {
|
|||
sp34.x = Rand_CenteredFloat(15.0f) + this->actor.world.pos.x;
|
||||
sp34.y = this->actor.world.pos.y;
|
||||
sp34.z = Rand_CenteredFloat(15.0f) + this->actor.world.pos.z;
|
||||
Actor_SpawnFloorDustRing(play, &this->actor, &sp34, 50.0f, 0, 2.0f, 0, 0, 0);
|
||||
Actor_SpawnFloorDustRing(play, &this->actor, &sp34, 50.0f, 0, 2.0f, 0, 0, false);
|
||||
}
|
||||
|
||||
s32 func_80AD4B08(PlayState* play) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue