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

Various objects (#677)

* object_okuta

* object_crow

* object_wallmaster

* named wallmaster textures

* object_dodongo

* object_firefly

* object_fire
This commit is contained in:
gamestabled 2021-03-17 17:06:56 -04:00 committed by GitHub
parent 7b68e8b771
commit d3311f9a29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 237 additions and 178 deletions

View file

@ -1,4 +1,5 @@
#include "z_en_crow.h"
#include "objects/object_crow/object_crow.h"
#define FLAGS 0x00005005
@ -17,9 +18,6 @@ void EnCrow_Die(EnCrow* this, GlobalContext* globalCtx);
void EnCrow_TurnAway(EnCrow* this, GlobalContext* globalCtx);
void EnCrow_Damaged(EnCrow* this, GlobalContext* globalCtx);
extern FlexSkeletonHeader D_060010C0;
extern AnimationHeader D_060000F0;
static Vec3f sZeroVecAccel = { 0.0f, 0.0f, 0.0f };
const ActorInit En_Crow_InitVars = {
@ -113,7 +111,7 @@ void EnCrow_Init(Actor* thisx, GlobalContext* globalCtx) {
EnCrow* this = THIS;
Actor_ProcessInitChain(&this->actor, sInitChain);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_060010C0, &D_060000F0, this->jointTable, this->morphTable, 9);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gGuaySkel, &gGuayFlyAnim, this->jointTable, this->morphTable, 9);
Collider_InitJntSph(globalCtx, &this->collider);
Collider_SetJntSph(globalCtx, &this->collider, &this->actor, &sJntSphInit, this->colliderItems);
this->collider.elements[0].dim.worldSphere.radius = sJntSphInit.elements[0].dim.modelSphere.radius;
@ -152,7 +150,7 @@ void EnCrow_SetupDamaged(EnCrow* this, GlobalContext* globalCtx) {
this->actor.speedXZ *= Math_CosS(this->actor.world.rot.x);
this->actor.velocity.y = 0.0f;
Animation_Change(&this->skelAnime, &D_060000F0, 0.4f, 0.0f, 0.0f, ANIMMODE_LOOP_INTERP, -3.0f);
Animation_Change(&this->skelAnime, &gGuayFlyAnim, 0.4f, 0.0f, 0.0f, ANIMMODE_LOOP_INTERP, -3.0f);
scale = this->actor.scale.x * 100.0f;
this->actor.world.pos.y += 20.0f * scale;
this->actor.bgCheckFlags &= ~1;
@ -216,7 +214,7 @@ void EnCrow_SetupRespawn(EnCrow* this) {
this->collider.elements[0].dim.worldSphere.radius = sJntSphInit.elements[0].dim.modelSphere.radius;
}
Animation_PlayLoop(&this->skelAnime, &D_060000F0);
Animation_PlayLoop(&this->skelAnime, &gGuayFlyAnim);
Math_Vec3f_Copy(&this->actor.world.pos, &this->actor.home.pos);
this->actor.shape.rot.x = 0;
this->actor.shape.rot.z = 0;

View file

@ -1,6 +1,7 @@
#include "z_en_dodongo.h"
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
#include "overlays/actors/ovl_En_Bombf/z_en_bombf.h"
#include "objects/object_dodongo/object_dodongo.h"
#define FLAGS 0x00000015
@ -37,16 +38,6 @@ void EnDodongo_Stunned(EnDodongo* this, GlobalContext* globalCtx);
void EnDodongo_Death(EnDodongo* this, GlobalContext* globalCtx);
void EnDodongo_SweepTail(EnDodongo* this, GlobalContext* globalCtx);
extern SkeletonHeader D_06008318;
extern AnimationHeader D_06003B14;
extern AnimationHeader D_060042C4;
extern AnimationHeader D_06004C20;
extern AnimationHeader D_06008B1C;
extern AnimationHeader D_060028F0;
extern AnimationHeader D_06003088;
extern AnimationHeader D_060013C4;
extern AnimationHeader D_06001A44;
const ActorInit En_Dodongo_InitVars = {
ACTOR_EN_DODONGO,
ACTORCAT_ENEMY,
@ -327,7 +318,7 @@ void EnDodongo_Init(Actor* thisx, GlobalContext* globalCtx) {
this->bodyScale.x = this->bodyScale.y = this->bodyScale.z = 1.0f;
ActorShape_Init(&this->actor.shape, 0.0f, &ActorShadow_DrawCircle, 48.0f);
Actor_SetScale(&this->actor, 0.01875f);
SkelAnime_Init(globalCtx, &this->skelAnime, &D_06008318, &D_06004C20, this->jointTable, this->morphTable, 31);
SkelAnime_Init(globalCtx, &this->skelAnime, &gDodongoSkel, &gDodongoWaitAnim, this->jointTable, this->morphTable, 31);
this->actor.colChkInfo.health = 4;
this->actor.colChkInfo.mass = MASS_HEAVY;
this->actor.colChkInfo.damageTable = &sDamageTable;
@ -365,7 +356,7 @@ void EnDodongo_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
void EnDodongo_SetupIdle(EnDodongo* this) {
Animation_MorphToLoop(&this->skelAnime, &D_06004C20, -4.0f);
Animation_MorphToLoop(&this->skelAnime, &gDodongoWaitAnim, -4.0f);
this->actor.speedXZ = 0.0f;
this->timer = Rand_S16Offset(30, 50);
this->actionState = DODONGO_IDLE;
@ -373,9 +364,9 @@ void EnDodongo_SetupIdle(EnDodongo* this) {
}
void EnDodongo_SetupWalk(EnDodongo* this) {
f32 frames = Animation_GetLastFrame(&D_06008B1C);
f32 frames = Animation_GetLastFrame(&gDodongoWalkAnim);
Animation_Change(&this->skelAnime, &D_06008B1C, 0.0f, 0.0f, frames, ANIMMODE_LOOP, -4.0f);
Animation_Change(&this->skelAnime, &gDodongoWalkAnim, 0.0f, 0.0f, frames, ANIMMODE_LOOP, -4.0f);
this->actor.speedXZ = 1.5f;
this->timer = Rand_S16Offset(50, 70);
this->rightFootStep = true;
@ -384,21 +375,21 @@ void EnDodongo_SetupWalk(EnDodongo* this) {
}
void EnDodongo_SetupBreatheFire(EnDodongo* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &D_060028F0, -4.0f);
Animation_MorphToPlayOnce(&this->skelAnime, &gDodongoBreatheFireAnim, -4.0f);
this->actionState = DODONGO_BREATHE_FIRE;
this->actor.speedXZ = 0.0f;
EnDodongo_SetupAction(this, EnDodongo_BreatheFire);
}
void EnDodongo_SetupEndBreatheFire(EnDodongo* this) {
Animation_PlayOnce(&this->skelAnime, &D_06003088);
Animation_PlayOnce(&this->skelAnime, &gDodongoAfterBreatheFireAnim);
this->actionState = DODONGO_END_BREATHE_FIRE;
this->actor.speedXZ = 0.0f;
EnDodongo_SetupAction(this, EnDodongo_EndBreatheFire);
}
void EnDodongo_SetupSwallowBomb(EnDodongo* this) {
Animation_Change(&this->skelAnime, &D_060028F0, -1.0f, 35.0f, 0.0f, ANIMMODE_ONCE, -4.0f);
Animation_Change(&this->skelAnime, &gDodongoBreatheFireAnim, -1.0f, 35.0f, 0.0f, ANIMMODE_ONCE, -4.0f);
this->actionState = DODONGO_SWALLOW_BOMB;
this->timer = 25;
this->actor.speedXZ = 0.0f;
@ -406,7 +397,7 @@ void EnDodongo_SetupSwallowBomb(EnDodongo* this) {
}
void EnDodongo_SetupStunned(EnDodongo* this) {
Animation_Change(&this->skelAnime, &D_060028F0, 0.0f, 25.0f, 0.0f, ANIMMODE_ONCE, -4.0f);
Animation_Change(&this->skelAnime, &gDodongoBreatheFireAnim, 0.0f, 25.0f, 0.0f, ANIMMODE_ONCE, -4.0f);
this->actionState = DODONGO_STUNNED;
this->actor.speedXZ = 0.0f;
if (this->damageEffect == 0xF) {
@ -601,7 +592,7 @@ void EnDodongo_Walk(EnDodongo* this, GlobalContext* globalCtx) {
}
void EnDodongo_SetupSweepTail(EnDodongo* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &D_06001A44, -4.0f);
Animation_MorphToPlayOnce(&this->skelAnime, &gDodongoDamageAnim, -4.0f);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_J_DAMAGE);
this->actionState = DODONGO_SWEEP_TAIL;
this->timer = 0;
@ -630,9 +621,9 @@ void EnDodongo_SweepTail(EnDodongo* this, GlobalContext* globalCtx) {
this->tailSwipeSpeed = (0xFFFF - ABS(yawDiff2)) / 0xF;
if ((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y) >= 0) {
this->tailSwipeSpeed = -this->tailSwipeSpeed;
animation = &D_060042C4;
animation = &gDodongoSweepTailLeftAnim;
} else {
animation = &D_06003B14;
animation = &gDodongoSweepTailRightAnim;
}
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_J_TAIL);
Animation_PlayOnceSetSpeed(&this->skelAnime, animation, 2.0f);
@ -668,7 +659,7 @@ void EnDodongo_SweepTail(EnDodongo* this, GlobalContext* globalCtx) {
}
void EnDodongo_SetupDeath(EnDodongo* this, GlobalContext* globalCtx) {
Animation_MorphToPlayOnce(&this->skelAnime, &D_060013C4, -8.0f);
Animation_MorphToPlayOnce(&this->skelAnime, &gDodongoDieAnim, -8.0f);
this->timer = 0;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_J_DEAD);
this->actionState = DODONGO_DEATH;

View file

@ -5,6 +5,7 @@
*/
#include "z_en_firefly.h"
#include "objects/object_firefly/object_firefly.h"
#include "overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.h"
#define FLAGS 0x00005005
@ -117,10 +118,6 @@ static InitChainEntry sInitChain[] = {
ICHAIN_F32(targetArrowOffset, 4000, ICHAIN_STOP),
};
extern SkeletonHeader D_060018B8;
extern AnimationHeader D_0600017C;
extern Gfx D_06001678[];
void EnFirefly_Extinguish(EnFirefly* this) {
this->actor.params += 2;
this->collider.elements[0].info.toucher.effect = 0; // None
@ -146,7 +143,7 @@ void EnFirefly_Init(Actor* thisx, GlobalContext* globalCtx) {
Actor_ProcessInitChain(&this->actor, sInitChain);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 25.0f);
SkelAnime_Init(globalCtx, &this->skelAnime, &D_060018B8, &D_0600017C, this->jointTable, this->morphTable, 28);
SkelAnime_Init(globalCtx, &this->skelAnime, &gKeeseSkeleton, &gKeeseFlyAnim, this->jointTable, this->morphTable, 28);
Collider_InitJntSph(globalCtx, &this->collider);
Collider_SetJntSph(globalCtx, &this->collider, &this->actor, &sJntSphInit, this->colliderItems);
CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit);
@ -216,7 +213,7 @@ void EnFirefly_SetupFlyIdle(EnFirefly* this) {
void EnFirefly_SetupFall(EnFirefly* this) {
this->timer = 40;
this->actor.velocity.y = 0.0f;
Animation_Change(&this->skelAnime, &D_0600017C, 0.5f, 0.0f, 0.0f, ANIMMODE_LOOP_INTERP, -3.0f);
Animation_Change(&this->skelAnime, &gKeeseFlyAnim, 0.5f, 0.0f, 0.0f, ANIMMODE_LOOP_INTERP, -3.0f);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_FFLY_DEAD);
this->actor.flags |= 0x10;
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 40);
@ -752,7 +749,7 @@ void EnFirefly_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList
EnFirefly* this = THIS;
if (!this->onFire && (limbIndex == 27)) {
gSPDisplayList((*gfx)++, D_06001678);
gSPDisplayList((*gfx)++, gKeeseEyesDL);
} else {
if ((this->auraType == KEESE_AURA_FIRE) || (this->auraType == KEESE_AURA_ICE)) {
if ((limbIndex == 15) || (limbIndex == 21)) {

View file

@ -5,6 +5,7 @@
*/
#include "z_en_floormas.h"
#include "objects/object_wallmaster/object_wallmaster.h"
#define FLAGS 0x00000405
@ -120,21 +121,6 @@ static InitChainEntry sInitChain[] = {
ICHAIN_F32_DIV1000(gravity, -1000, ICHAIN_STOP),
};
extern Gfx D_06008688[];
extern FlexSkeletonHeader D_06008FB0;
extern AnimationHeader D_06009DB0;
extern AnimationHeader D_060039B0;
extern AnimationHeader D_06000EA4;
extern AnimationHeader D_06000590;
extern AnimationHeader D_060019CC;
extern AnimationHeader D_06009520;
extern AnimationHeader D_06002158;
extern AnimationHeader D_0600A054;
extern AnimationHeader D_060041F4;
extern AnimationHeader D_06009244;
void EnFloormas_Init(Actor* thisx, GlobalContext* globalCtx) {
EnFloormas* this = THIS;
GlobalContext* globalCtx2 = globalCtx;
@ -143,7 +129,7 @@ void EnFloormas_Init(Actor* thisx, GlobalContext* globalCtx) {
Actor_ProcessInitChain(&this->actor, sInitChain);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 50.0f);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06008FB0, &D_06009DB0, this->jointTable, this->morphTable, 25);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gWallmasterSkel, &gWallmasterWaitAnim, this->jointTable, this->morphTable, 25);
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit);
@ -208,19 +194,19 @@ void EnFloormas_MakeVulnerable(EnFloormas* this) {
}
void EnFloormas_SetupBigDecideAction(EnFloormas* this) {
Animation_PlayOnce(&this->skelAnime, &D_06009DB0);
Animation_PlayOnce(&this->skelAnime, &gWallmasterWaitAnim);
this->actionFunc = EnFloormas_BigDecideAction;
this->actor.speedXZ = 0.0f;
}
void EnFloormas_SetupStand(EnFloormas* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &D_0600A054, -3.0f);
Animation_MorphToPlayOnce(&this->skelAnime, &gWallmasterStandUpAnim, -3.0f);
this->actionFunc = EnFloormas_Stand;
}
void EnFloormas_SetupBigWalk(EnFloormas* this) {
if (this->actionFunc != EnFloormas_Run) {
Animation_PlayLoopSetSpeed(&this->skelAnime, &D_060041F4, 1.5f);
Animation_PlayLoopSetSpeed(&this->skelAnime, &gWallmasterWalkAnim, 1.5f);
} else {
this->skelAnime.playSpeed = 1.5f;
}
@ -231,7 +217,7 @@ void EnFloormas_SetupBigWalk(EnFloormas* this) {
}
void EnFloormas_SetupBigStopWalk(EnFloormas* this) {
Animation_PlayOnce(&this->skelAnime, &D_06009244);
Animation_PlayOnce(&this->skelAnime, &gWallmasterStopWalkAnim);
this->actionFunc = EnFloormas_BigStopWalk;
this->actor.speedXZ = 0.0f;
}
@ -247,9 +233,9 @@ void EnFloormas_SetupTurn(EnFloormas* this) {
s16 rotDelta = this->actionTarget - this->actor.shape.rot.y;
this->actor.speedXZ = 0.0f;
if (rotDelta > 0) {
Animation_MorphToPlayOnce(&this->skelAnime, &D_06002158, -3.0f);
Animation_MorphToPlayOnce(&this->skelAnime, &gFloormasterTurnAnim, -3.0f);
} else {
Animation_Change(&this->skelAnime, &D_06002158, -1.0f, Animation_GetLastFrame(&D_06002158), 0.0f, ANIMMODE_ONCE,
Animation_Change(&this->skelAnime, &gFloormasterTurnAnim, -1.0f, Animation_GetLastFrame(&gFloormasterTurnAnim), 0.0f, ANIMMODE_ONCE,
-3.0f);
}
@ -263,7 +249,7 @@ void EnFloormas_SetupTurn(EnFloormas* this) {
}
void EnFloormas_SetupHover(EnFloormas* this, GlobalContext* globalCtx) {
Animation_Change(&this->skelAnime, &D_06009520, 3.0f, 0, Animation_GetLastFrame(&D_06009520), ANIMMODE_ONCE, -3.0f);
Animation_Change(&this->skelAnime, &gWallmasterHoverAnim, 3.0f, 0, Animation_GetLastFrame(&gWallmasterHoverAnim), ANIMMODE_ONCE, -3.0f);
this->actor.speedXZ = 0.0f;
this->actor.gravity = 0.0f;
EnFloormas_MakeInvulnerable(this);
@ -280,7 +266,7 @@ void EnFloormas_SetupCharge(EnFloormas* this) {
}
void EnFloormas_SetupLand(EnFloormas* this) {
Animation_Change(&this->skelAnime, &D_060019CC, 1.0f, 41.0f, 42.0f, ANIMMODE_ONCE, 5.0f);
Animation_Change(&this->skelAnime, &gWallmasterJumpAnim, 1.0f, 41.0f, 42.0f, ANIMMODE_ONCE, 5.0f);
if ((this->actor.speedXZ < 0.0f) || (this->actionFunc != EnFloormas_Charge)) {
this->actionTimer = 30;
} else {
@ -302,7 +288,7 @@ void EnFloormas_SetupSplit(EnFloormas* this) {
this->actor.shape.rot.y = this->actor.parent->shape.rot.y + 0x5555;
this->actor.world.pos = this->actor.parent->world.pos;
this->actor.params = 0x10;
Animation_Change(&this->skelAnime, &D_060019CC, 1.0f, 41.0f, Animation_GetLastFrame(&D_060019CC), ANIMMODE_ONCE,
Animation_Change(&this->skelAnime, &gWallmasterJumpAnim, 1.0f, 41.0f, Animation_GetLastFrame(&gWallmasterJumpAnim), ANIMMODE_ONCE,
0.0f);
this->collider.dim.radius = sCylinderInit.dim.radius * 0.6f;
this->collider.dim.height = sCylinderInit.dim.height * 0.6f;
@ -315,14 +301,14 @@ void EnFloormas_SetupSplit(EnFloormas* this) {
}
void EnFloormas_SetupSmWalk(EnFloormas* this) {
Animation_PlayLoopSetSpeed(&this->skelAnime, &D_060041F4, 4.5f);
Animation_PlayLoopSetSpeed(&this->skelAnime, &gWallmasterWalkAnim, 4.5f);
this->actionFunc = EnFloormas_SmWalk;
this->actor.speedXZ = 5.0f;
}
void EnFloormas_SetupSmDecideAction(EnFloormas* this) {
if (this->actionFunc != EnFloormas_SmWalk) {
Animation_PlayLoopSetSpeed(&this->skelAnime, &D_060041F4, 4.5f);
Animation_PlayLoopSetSpeed(&this->skelAnime, &gWallmasterWalkAnim, 4.5f);
}
this->actionFunc = EnFloormas_SmDecideAction;
this->actor.speedXZ = 5.0f;
@ -343,13 +329,13 @@ void EnFloormas_SetupSmShrink(EnFloormas* this, GlobalContext* globalCtx) {
}
void EnFloormas_SetupSlaveJumpAtMaster(EnFloormas* this) {
Animation_Change(&this->skelAnime, &D_060019CC, 2.0f, 0.0f, 41.0f, ANIMMODE_ONCE, 0.0f);
Animation_Change(&this->skelAnime, &gWallmasterJumpAnim, 2.0f, 0.0f, 41.0f, ANIMMODE_ONCE, 0.0f);
this->actionFunc = EnFloormas_SmSlaveJumpAtMaster;
this->actor.speedXZ = 0.0f;
}
void EnFloormas_SetupJumpAtLink(EnFloormas* this) {
Animation_Change(&this->skelAnime, &D_060019CC, 2.0f, 0.0f, 41.0f, ANIMMODE_ONCE, 0.0f);
Animation_Change(&this->skelAnime, &gWallmasterJumpAnim, 2.0f, 0.0f, 41.0f, ANIMMODE_ONCE, 0.0f);
this->actionFunc = EnFloormas_JumpAtLink;
this->actor.speedXZ = 0.0f;
}
@ -358,7 +344,7 @@ void EnFloormas_SetupGrabLink(EnFloormas* this, Player* player) {
f32 yDelta;
f32 xzDelta;
Animation_Change(&this->skelAnime, &D_060019CC, 1.0f, 36.0f, 45.0f, ANIMMODE_ONCE, -3.0f);
Animation_Change(&this->skelAnime, &gWallmasterJumpAnim, 1.0f, 36.0f, 45.0f, ANIMMODE_ONCE, -3.0f);
this->actor.flags &= ~1;
this->actor.speedXZ = 0.0f;
this->actor.velocity.y = 0.0f;
@ -378,7 +364,7 @@ void EnFloormas_SetupGrabLink(EnFloormas* this, Player* player) {
}
void EnFloormas_SetupMerge(EnFloormas* this) {
Animation_PlayOnce(&this->skelAnime, &D_06009DB0);
Animation_PlayOnce(&this->skelAnime, &gWallmasterWaitAnim);
this->actionTimer = 0;
this->smActionTimer += 1500;
EnFloormas_MakeInvulnerable(this);
@ -402,7 +388,7 @@ void EnFloormas_SetupSmWait(EnFloormas* this) {
}
void EnFloormas_SetupTakeDamage(EnFloormas* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &D_06000590, -3.0f);
Animation_MorphToPlayOnce(&this->skelAnime, &gWallmasterDamageAnim, -3.0f);
if (this->collider.info.acHitInfo->toucher.dmgFlags & 0x1F824) {
this->actor.world.rot.y = this->collider.base.ac->world.rot.y;
} else {
@ -415,14 +401,14 @@ void EnFloormas_SetupTakeDamage(EnFloormas* this) {
}
void EnFloormas_SetupRecover(EnFloormas* this) {
Animation_PlayOnce(&this->skelAnime, &D_06000EA4);
Animation_PlayOnce(&this->skelAnime, &gWallmasterRecoverFromDamageAnim);
this->actor.velocity.y = this->actor.speedXZ = 0.0f;
this->actor.world.rot.y = this->actor.shape.rot.y;
this->actionFunc = EnFloormas_Recover;
}
void EnFloormas_SetupFreeze(EnFloormas* this) {
Animation_Change(&this->skelAnime, &D_060019CC, 1.5f, 0, 20.0f, ANIMMODE_ONCE, -3.0f);
Animation_Change(&this->skelAnime, &gWallmasterJumpAnim, 1.5f, 0, 20.0f, ANIMMODE_ONCE, -3.0f);
this->actor.speedXZ = 0.0f;
if (this->actor.colChkInfo.damageEffect == 4) {
Actor_SetColorFilter(&this->actor, -0x8000, 0xFF, 0, 0x50);
@ -659,7 +645,7 @@ void EnFloormas_Land(EnFloormas* this, GlobalContext* globalCtx) {
if (this->actionTimer == 0 && isOnGround) {
if (this->skelAnime.endFrame < 45.0f) {
this->skelAnime.endFrame = Animation_GetLastFrame(&D_060019CC);
this->skelAnime.endFrame = Animation_GetLastFrame(&gWallmasterJumpAnim);
} else if (this->actor.params == MERGE_MASTER) {
EnFloormas_SetupMerge(this);
} else {
@ -933,10 +919,10 @@ void EnFloormas_Merge(EnFloormas* this, GlobalContext* globalCtx) {
EnFloormas_SetupStand(this);
} else {
if (this->actionTimer == 0) {
Animation_PlayOnce(&this->skelAnime, &D_060039B0);
Animation_PlayOnce(&this->skelAnime, &gFloormasterTapFingerAnim);
this->actionTimer = 1;
} else {
Animation_PlayOnce(&this->skelAnime, &D_06009DB0);
Animation_PlayOnce(&this->skelAnime, &gWallmasterWaitAnim);
this->actionTimer = 0;
}
}
@ -1109,7 +1095,7 @@ void EnFloormas_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis
Matrix_RotateZ(DEGTORAD(15.0f), 1);
Matrix_Scale(2.0f, 2.0f, 2.0f, MTXMODE_APPLY);
gSPMatrix((*gfx)++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_floormas.c", 2299), G_MTX_LOAD);
gSPDisplayList((*gfx)++, D_06008688);
gSPDisplayList((*gfx)++, gWallmasterFingerDL);
Matrix_Pop();
}
}

View file

@ -1,4 +1,5 @@
#include "z_en_okuta.h"
#include "objects/object_okuta/object_okuta.h"
#define FLAGS 0x00000005
@ -32,15 +33,6 @@ const ActorInit En_Okuta_InitVars = {
(ActorFunc)EnOkuta_Draw,
};
extern AnimationHeader D_06000344;
extern AnimationHeader D_060008FC;
extern AnimationHeader D_06000AC0;
extern AnimationHeader D_06000DDC;
extern Gfx D_06003380[];
extern SkeletonHeader D_06003660;
extern AnimationHeader D_06003910;
extern AnimationHeader D_06003C64;
static ColliderCylinderInit sProjectileColliderInit = {
{
COLTYPE_NONE,
@ -134,7 +126,7 @@ void EnOkuta_Init(Actor* thisx, GlobalContext* globalCtx) {
this->numShots = (thisx->params >> 8) & 0xFF;
thisx->params &= 0xFF;
if (thisx->params == 0) {
SkelAnime_Init(globalCtx, &this->skelAnime, &D_06003660, &D_06003C64, this->jointTable, this->morphTable, 38);
SkelAnime_Init(globalCtx, &this->skelAnime, &gOctorokSkel, &gOctorokAppearAnim, this->jointTable, this->morphTable, 38);
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, thisx, &sOctorockColliderInit);
CollisionCheck_SetInfo(&thisx->colChkInfo, &sDamageTable, &sColChkInfoInit);
@ -215,24 +207,24 @@ void EnOkuta_SetupAppear(EnOkuta* this, GlobalContext* globalCtx) {
this->actor.draw = EnOkuta_Draw;
this->actor.shape.rot.y = this->actor.yawTowardsPlayer;
this->actor.flags |= 1;
Animation_PlayOnce(&this->skelAnime, &D_06003C64);
Animation_PlayOnce(&this->skelAnime, &gOctorokAppearAnim);
EnOkuta_SpawnBubbles(this, globalCtx);
this->actionFunc = EnOkuta_Appear;
}
void EnOkuta_SetupHide(EnOkuta* this) {
Animation_PlayOnce(&this->skelAnime, &D_06000AC0);
Animation_PlayOnce(&this->skelAnime, &gOctorokHideAnim);
this->actionFunc = EnOkuta_Hide;
}
void EnOkuta_SetupWaitToShoot(EnOkuta* this) {
Animation_PlayLoop(&this->skelAnime, &D_06000DDC);
Animation_PlayLoop(&this->skelAnime, &gOctorokFloatAnim);
this->timer = (this->actionFunc == EnOkuta_Shoot) ? 2 : 0;
this->actionFunc = EnOkuta_WaitToShoot;
}
void EnOkuta_SetupShoot(EnOkuta* this, GlobalContext* globalCtx) {
Animation_PlayOnce(&this->skelAnime, &D_06000344);
Animation_PlayOnce(&this->skelAnime, &gOctorokShootAnim);
if (this->actionFunc != EnOkuta_Shoot) {
this->timer = this->numShots;
}
@ -248,7 +240,7 @@ void EnOkuta_SetupShoot(EnOkuta* this, GlobalContext* globalCtx) {
}
void EnOkuta_SetupWaitToDie(EnOkuta* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &D_06003910, -5.0f);
Animation_MorphToPlayOnce(&this->skelAnime, &gOctorokHitAnim, -5.0f);
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 0xB);
this->collider.base.acFlags &= ~AC_HIT;
Actor_SetScale(&this->actor, 0.01f);
@ -257,7 +249,7 @@ void EnOkuta_SetupWaitToDie(EnOkuta* this) {
}
void EnOkuta_SetupDie(EnOkuta* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &D_060008FC, -3.0f);
Animation_MorphToPlayOnce(&this->skelAnime, &gOctorokDieAnim, -3.0f);
this->timer = 0;
this->actionFunc = EnOkuta_Die;
}
@ -507,7 +499,7 @@ void EnOkuta_ProjectileFly(EnOkuta* this, GlobalContext* globalCtx) {
pos.x = this->actor.world.pos.x;
pos.y = this->actor.world.pos.y + 11.0f;
pos.z = this->actor.world.pos.z;
EffectSsHahen_SpawnBurst(globalCtx, &pos, 6.0f, 0, 1, 2, 15, 7, 10, D_06003380);
EffectSsHahen_SpawnBurst(globalCtx, &pos, 6.0f, 0, 1, 2, 15, 7, 10, gOctorokProjectileDL);
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, NA_SE_EN_OCTAROCK_ROCK);
Actor_Kill(&this->actor);
}
@ -725,7 +717,7 @@ void EnOkuta_Draw(Actor* thisx, GlobalContext* globalCtx) {
Matrix_RotateZ(this->actor.home.rot.z * (M_PI / 0x8000), MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_okuta.c", 1657),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, D_06003380);
gSPDisplayList(POLY_OPA_DISP++, gOctorokProjectileDL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_okuta.c", 1662);
}

View file

@ -5,6 +5,7 @@
*/
#include "z_en_wallmas.h"
#include "objects/object_wallmaster/object_wallmaster.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#define FLAGS 0x00000015
@ -116,24 +117,12 @@ static InitChainEntry sInitChain[] = {
ICHAIN_F32_DIV1000(gravity, -1500, 0),
};
extern AnimationHeader D_06000EA4;
extern AnimationHeader D_06000590;
extern AnimationHeader D_0600299C;
extern FlexSkeletonHeader D_06008FB0;
extern AnimationHeader D_06009DB0;
extern AnimationHeader D_060019CC;
extern AnimationHeader D_06009520;
extern AnimationHeader D_06009244;
extern AnimationHeader D_060041F4;
extern AnimationHeader D_0600A054;
extern Gfx D_06008688[];
void EnWallmas_Init(Actor* thisx, GlobalContext* globalCtx) {
EnWallmas* this = THIS;
Actor_ProcessInitChain(thisx, sInitChain);
ActorShape_Init(&thisx->shape, 0, NULL, 0.5f);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06008FB0, &D_06009DB0, this->jointTable, this->morphTable, 25);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gWallmasterSkel, &gWallmasterWaitAnim, this->jointTable, this->morphTable, 25);
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, thisx, &sCylinderInit);
@ -176,9 +165,9 @@ void EnWallmas_TimerInit(EnWallmas* this, GlobalContext* globalCtx) {
void EnWallmas_SetupDrop(EnWallmas* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
AnimationHeader* objSegChangee = &D_0600299C;
AnimationHeader* objSegChangee = &gWallmasterLungeAnim;
Animation_Change(&this->skelAnime, objSegChangee, 0.0f, 20.0f, Animation_GetLastFrame(&D_0600299C), ANIMMODE_ONCE,
Animation_Change(&this->skelAnime, objSegChangee, 0.0f, 20.0f, Animation_GetLastFrame(&gWallmasterLungeAnim), ANIMMODE_ONCE,
0.0f);
this->yTarget = player->actor.world.pos.y;
@ -191,8 +180,8 @@ void EnWallmas_SetupDrop(EnWallmas* this, GlobalContext* globalCtx) {
}
void EnWallmas_SetupLand(EnWallmas* this, GlobalContext* globalCtx) {
AnimationHeader* objSegFrameCount = &D_060019CC;
AnimationHeader* objSegChangee = &D_060019CC;
AnimationHeader* objSegFrameCount = &gWallmasterJumpAnim;
AnimationHeader* objSegChangee = &gWallmasterJumpAnim;
Animation_Change(&this->skelAnime, objSegChangee, 1.0f, 41.0f, Animation_GetLastFrame(objSegFrameCount),
ANIMMODE_ONCE, -3.0f);
@ -203,24 +192,24 @@ void EnWallmas_SetupLand(EnWallmas* this, GlobalContext* globalCtx) {
}
void EnWallmas_SetupStand(EnWallmas* this) {
Animation_PlayOnce(&this->skelAnime, &D_0600A054);
Animation_PlayOnce(&this->skelAnime, &gWallmasterStandUpAnim);
this->actionFunc = EnWallmas_Stand;
}
void EnWallmas_SetupWalk(EnWallmas* this) {
Animation_PlayOnceSetSpeed(&this->skelAnime, &D_060041F4, 3.0f);
Animation_PlayOnceSetSpeed(&this->skelAnime, &gWallmasterWalkAnim, 3.0f);
this->actionFunc = EnWallmas_Walk;
this->actor.speedXZ = 3.0f;
}
void EnWallmas_SetupJumpToCeiling(EnWallmas* this) {
Animation_PlayOnce(&this->skelAnime, &D_06009244);
Animation_PlayOnce(&this->skelAnime, &gWallmasterStopWalkAnim);
this->actionFunc = EnWallmas_JumpToCeiling;
this->actor.speedXZ = 0.0f;
}
void EnWallmas_SetupReturnToCeiling(EnWallmas* this) {
AnimationHeader* objSegFrameCount = &D_060019CC;
AnimationHeader* objSegChangee = &D_060019CC;
AnimationHeader* objSegFrameCount = &gWallmasterJumpAnim;
AnimationHeader* objSegChangee = &gWallmasterJumpAnim;
this->timer = 0;
this->actor.speedXZ = 0.0f;
@ -232,7 +221,7 @@ void EnWallmas_SetupReturnToCeiling(EnWallmas* this) {
}
void EnWallmas_SetupTakeDamage(EnWallmas* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &D_06000590, -3.0f);
Animation_MorphToPlayOnce(&this->skelAnime, &gWallmasterDamageAnim, -3.0f);
if (this->collider.info.acHitInfo->toucher.dmgFlags & 0x0001F824) {
this->actor.world.rot.y = this->collider.base.ac->world.rot.y;
} else {
@ -246,7 +235,7 @@ void EnWallmas_SetupTakeDamage(EnWallmas* this) {
}
void EnWallmas_SetupCooldown(EnWallmas* this) {
Animation_PlayOnce(&this->skelAnime, &D_06000EA4);
Animation_PlayOnce(&this->skelAnime, &gWallmasterRecoverFromDamageAnim);
this->actor.speedXZ = 0.0f;
this->actor.velocity.y = 0.0f;
this->actor.world.rot.y = this->actor.shape.rot.y;
@ -266,7 +255,7 @@ void EnWallmas_SetupDie(EnWallmas* this, GlobalContext* globalCtx) {
}
void EnWallmas_SetupTakePlayer(EnWallmas* this, GlobalContext* globalCtx) {
Animation_MorphToPlayOnce(&this->skelAnime, &D_06009520, -5.0f);
Animation_MorphToPlayOnce(&this->skelAnime, &gWallmasterHoverAnim, -5.0f);
this->timer = -0x1e;
this->actionFunc = EnWallmas_TakePlayer;
this->actor.speedXZ = 0.0f;
@ -289,7 +278,7 @@ void EnWallmas_ProximityOrSwitchInit(EnWallmas* this) {
}
void EnWallmas_SetupStun(EnWallmas* this) {
Animation_Change(&this->skelAnime, &D_060019CC, 1.5f, 0, 20.0f, ANIMMODE_ONCE, -3.0f);
Animation_Change(&this->skelAnime, &gWallmasterJumpAnim, 1.5f, 0, 20.0f, ANIMMODE_ONCE, -3.0f);
this->actor.speedXZ = 0.0f;
if (this->actor.colChkInfo.damageEffect == 4) {
@ -644,7 +633,7 @@ void EnWallMas_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList
Matrix_Scale(2.0f, 2.0f, 2.0f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1489), G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, D_06008688);
gSPDisplayList(POLY_OPA_DISP++, gWallmasterFingerDL);
Matrix_Pop();

View file

@ -5,6 +5,7 @@
*/
#include "z_eff_ss_d_fire.h"
#include "objects/object_dodongo/object_dodongo.h"
#define rScale regs[0]
#define rTexIdx regs[1]
@ -26,8 +27,6 @@ EffectSsInit Effect_Ss_D_Fire_InitVars = {
EffectSsDFire_Init,
};
extern Gfx D_060098A0[];
u32 EffectSsDFire_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx) {
EffectSsDFireInitParams* initParams = (EffectSsDFireInitParams*)initParamsx;
s32 objBankIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_DODONGO);
@ -36,7 +35,7 @@ u32 EffectSsDFire_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void
this->pos = initParams->pos;
this->velocity = initParams->velocity;
this->accel = initParams->accel;
this->gfx = SEGMENTED_TO_VIRTUAL(D_060098A0);
this->gfx = SEGMENTED_TO_VIRTUAL(gDodongoFireDL);
this->life = initParams->life;
this->rScale = initParams->scale;
this->rScaleStep = initParams->scaleStep;
@ -57,7 +56,7 @@ u32 EffectSsDFire_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void
return 0;
}
static void* sTextures[] = { 0x060090A0, 0x060092A0, 0x060094A0, 0x060096A0 };
static void* sTextures[] = { gDodongoFire0Tex, gDodongoFire1Tex, gDodongoFire2Tex, gDodongoFire3Tex };
void EffectSsDFire_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;