mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-06 06:10:21 +00:00
finished object_skb (#790)
* finished object_skb * neglected the limbs and dlists, so I added them * adding the textures * fixing some names * ....forgot to change the c file.... * hopefully fixed formatting issue
This commit is contained in:
parent
9dbebfa38f
commit
2ee1fd4668
4 changed files with 79 additions and 24 deletions
|
@ -1,5 +1,6 @@
|
|||
#include "z_en_skb.h"
|
||||
#include "overlays/actors/ovl_En_Encount1/z_en_encount1.h"
|
||||
#include "objects/object_skb/object_skb.h"
|
||||
|
||||
#define FLAGS 0x00000015
|
||||
|
||||
|
@ -28,13 +29,6 @@ void func_80AFD7B4(EnSkb* this, GlobalContext* globalCtx);
|
|||
void func_80AFD880(EnSkb* this, GlobalContext* globalCtx);
|
||||
void func_80AFD968(EnSkb* this, GlobalContext* globalCtx);
|
||||
|
||||
extern SkeletonHeader D_060041F8;
|
||||
extern AnimationHeader D_06001854;
|
||||
extern AnimationHeader D_060009DC;
|
||||
extern AnimationHeader D_06000D98;
|
||||
extern AnimationHeader D_060047E0;
|
||||
extern AnimationHeader D_06000460;
|
||||
|
||||
static ColliderJntSphElementInit sJntSphElementsInit[2] = {
|
||||
{
|
||||
{
|
||||
|
@ -160,7 +154,8 @@ void EnSkb_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actor.colChkInfo.mass = 0xFE;
|
||||
this->actor.colChkInfo.health = 2;
|
||||
this->actor.shape.yOffset = -8000.0f;
|
||||
SkelAnime_Init(globalCtx, &this->skelAnime, &D_060041F8, &D_06001854, this->jointTable, this->morphTable, 20);
|
||||
SkelAnime_Init(globalCtx, &this->skelAnime, &gStalchildSkel, &gStalchildUncurlingAnim, this->jointTable,
|
||||
this->morphTable, 20);
|
||||
this->actor.naviEnemyId = 0x55;
|
||||
|
||||
Collider_InitJntSph(globalCtx, &this->collider);
|
||||
|
@ -205,7 +200,7 @@ void func_80AFCD60(EnSkb* this) {
|
|||
}
|
||||
|
||||
void func_80AFCDF8(EnSkb* this) {
|
||||
Animation_PlayOnceSetSpeed(&this->skelAnime, &D_06001854, 1.0f);
|
||||
Animation_PlayOnceSetSpeed(&this->skelAnime, &gStalchildUncurlingAnim, 1.0f);
|
||||
this->unk_280 = 0;
|
||||
this->actor.flags &= ~1;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIVA_APPEAR);
|
||||
|
@ -230,7 +225,8 @@ void func_80AFCE5C(EnSkb* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80AFCF48(EnSkb* this) {
|
||||
Animation_Change(&this->skelAnime, &D_06001854, -1.0f, Animation_GetLastFrame(&D_06001854), 0.0f, 2, -4.0f);
|
||||
Animation_Change(&this->skelAnime, &gStalchildUncurlingAnim, -1.0f,
|
||||
Animation_GetLastFrame(&gStalchildUncurlingAnim), 0.0f, 2, -4.0f);
|
||||
this->unk_280 = 0;
|
||||
this->unk_281 = 0;
|
||||
this->actor.flags &= ~1;
|
||||
|
@ -251,7 +247,8 @@ void func_80AFCFF0(EnSkb* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80AFD0A4(EnSkb* this) {
|
||||
Animation_Change(&this->skelAnime, &D_060047E0, 0.96000004f, 0.0f, Animation_GetLastFrame(&D_060047E0), 0, -4.0f);
|
||||
Animation_Change(&this->skelAnime, &gStalchildWalkingAnim, 0.96000004f, 0.0f,
|
||||
Animation_GetLastFrame(&gStalchildWalkingAnim), 0, -4.0f);
|
||||
this->unk_280 = 4;
|
||||
this->unk_288 = 0;
|
||||
this->actor.speedXZ = this->actor.scale.y * 160.0f;
|
||||
|
@ -298,7 +295,8 @@ void EnSkb_Advance(EnSkb* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80AFD33C(EnSkb* this) {
|
||||
Animation_Change(&this->skelAnime, &D_06000460, 0.6f, 0.0f, Animation_GetLastFrame(&D_06000460), 3, 4.0f);
|
||||
Animation_Change(&this->skelAnime, &gStalchildAttackingAnim, 0.6f, 0.0f,
|
||||
Animation_GetLastFrame(&gStalchildAttackingAnim), 3, 4.0f);
|
||||
this->collider.base.atFlags &= ~4;
|
||||
this->unk_280 = 3;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
|
@ -324,7 +322,7 @@ void EnSkb_SetupAttack(EnSkb* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80AFD47C(EnSkb* this) {
|
||||
Animation_Change(&this->skelAnime, &D_06000460, -0.4f, this->skelAnime.curFrame - 1.0f, 0.0f, 3, 0.0f);
|
||||
Animation_Change(&this->skelAnime, &gStalchildAttackingAnim, -0.4f, this->skelAnime.curFrame - 1.0f, 0.0f, 3, 0.0f);
|
||||
this->collider.base.atFlags &= ~4;
|
||||
this->unk_280 = 5;
|
||||
this->unk_281 = 0;
|
||||
|
@ -366,7 +364,7 @@ void func_80AFD59C(EnSkb* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80AFD644(EnSkb* this) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &D_06000D98, -4.0f);
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gStalchildDamagedAnim, -4.0f);
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
this->actor.speedXZ = -4.0f;
|
||||
}
|
||||
|
@ -401,7 +399,7 @@ void func_80AFD6CC(EnSkb* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80AFD7B4(EnSkb* this, GlobalContext* globalCtx) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &D_060009DC, -4.0f);
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gStalchildDyingAnim, -4.0f);
|
||||
this->actor.shape.rot.y = this->actor.yawTowardsPlayer;
|
||||
this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue