animation struct documentation

This commit is contained in:
Banjo Kazooie
2023-03-12 23:11:39 -05:00
parent 7dd7a0b60c
commit af75d8b32d
293 changed files with 2031 additions and 1986 deletions

View File

@@ -89,7 +89,7 @@ void func_803867F4(void){
func_802BAFE4(4);
if(nodeProp_findPositionFromActorId(0x148, sp24)){
jiggySpawn(JIGGY_46_GV_ANCIENT_ONES, sp24);
__spawnQueue_add_4((GenMethod_4)func_802C4140, 0x4C, reinterpret_cast(s32, sp24[0]), reinterpret_cast(s32, sp24[1]), reinterpret_cast(s32, sp24[2]));
__spawnQueue_add_4((GenFunction_4)func_802C4140, 0x4C, reinterpret_cast(s32, sp24[0]), reinterpret_cast(s32, sp24[1]), reinterpret_cast(s32, sp24[2]));
}
}
@@ -183,10 +183,10 @@ void chAncientOne_update(Actor *this){
this->position_z += (sp38 & 2) ? 0xC : -0xC;
if(this->unkF4_8 != 1){
if(sp38 == 6){
__spawnQueue_add_4((GenMethod_4)func_802C4140, 0x4C, reinterpret_cast(s32, this->position_x), reinterpret_cast(s32, sp34), reinterpret_cast(s32, this->position_z));
__spawnQueue_add_4((GenFunction_4)func_802C4140, 0x4C, reinterpret_cast(s32, this->position_x), reinterpret_cast(s32, sp34), reinterpret_cast(s32, this->position_z));
}
if(sp38 == 4 && this->position_y < LOCAL_CH_ANCIENT_ONE(this)->unk1C - 600.0f){
__spawnQueue_add_4((GenMethod_4)func_802C4140, 0x11f, reinterpret_cast(s32, this->position_x), reinterpret_cast(s32, sp34), reinterpret_cast(s32, this->position_z));
__spawnQueue_add_4((GenFunction_4)func_802C4140, 0x11f, reinterpret_cast(s32, this->position_x), reinterpret_cast(s32, sp34), reinterpret_cast(s32, this->position_z));
}//L80386D80
}
if(LOCAL_CH_ANCIENT_ONE(this)->unk1C <= this->position_y){
@@ -226,7 +226,7 @@ Actor *chAncientOne_draw(ActorMarker *this_marker, Gfx **gfx, Mtx **mtx, Vtx **v
sp58 = (this->state == 3) ? 0 : 1;
func_8033A45C(3, sp58);
func_8033A45C(4, sp58);
func_80325888(this_marker, gfx, mtx, vtx);
actor_draw(this_marker, gfx, mtx, vtx);
if( !this->initialized && this_marker->unk14_21){
func_8034A1B4(func_80329934(), 5, sp4C);
func_8034A1B4(func_80329934(), 6, sp40);

View File

@@ -38,7 +38,7 @@ Actor *chBuriedPyramid_draw(ActorMarker *this_marker, Gfx **gfx, Mtx **mtx, Vtx
return func_80325340(this_marker, gfx, mtx, vtx);
}
else{
return func_80325888(this_marker, gfx, mtx, vtx);
return actor_draw(this_marker, gfx, mtx, vtx);
}
}

View File

@@ -41,30 +41,30 @@ void chGobi1_setState(Actor *this, s32 next_state){
GV_D_80391A40.unk1 = FALSE;
if(this->state == 1){
func_80335924(this->unk148, 0xd9, 0.5f, 4.0f);
skeletalAnim_set(this->unk148, 0xd9, 0.5f, 4.0f);
local->unk4 = randf2(2.0f, 10.0f);
}
if(this->state == 2){
func_80335924(this->unk148, 0xda, 1.0f, 5.0f);
skeletalAnim_set(this->unk148, 0xda, 1.0f, 5.0f);
local->unkC = 0.9f;
GV_D_80391A40.unk0 = TRUE;
}
if(this->state == 3){
func_8028F918(2);
func_80335924(this->unk148, 0xf7, 1.0f, 5.33f);
skeletalAnim_set(this->unk148, 0xf7, 1.0f, 5.33f);
local->unk14 = 0.01f;
GV_D_80391A40.unk1 = TRUE;
}
if(this->state == 4){
func_80335924(this->unk148, 0xf8, 0.7f, 0.71f);
skeletalAnim_set(this->unk148, 0xf8, 0.7f, 0.71f);
}
if(this->state == 6){
FUNC_8030E8B4(SFX_84_GOBI_CRYING, 0.9f, 20000, this->position, 1500, 2500);
func_80335924(this->unk148, 0x241, 0.2f, 0.5f);
skeletalAnim_set(this->unk148, 0x241, 0.2f, 0.5f);
}
}
@@ -74,7 +74,7 @@ Actor *chgobi1_draw(ActorMarker *this_marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
return this;
}
else{
return func_80325888(this_marker, gfx, mtx, vtx);
return actor_draw(this_marker, gfx, mtx, vtx);
}
}
@@ -171,7 +171,7 @@ void chGobi1_update(Actor *this){
}
if(this->state == 2){
if(func_80335794(this->unk148) > 0)
if(skeletalAnim_getLoopCount(this->unk148) > 0)
sp6C = 1;
}
@@ -197,7 +197,7 @@ void chGobi1_update(Actor *this){
}//L80387808
if(this->state == 3){
if(func_80335794(this->unk148) > 0)
if(skeletalAnim_getLoopCount(this->unk148) > 0)
sp6C = 4;
}//L80387830
@@ -221,7 +221,7 @@ void chGobi1_update(Actor *this){
}
if(this->state == 6){
if(func_80335794(this->unk148) > 0)
if(skeletalAnim_getLoopCount(this->unk148) > 0)
sp6C = 1;
}

View File

@@ -4,7 +4,7 @@
typedef struct {
u8 pad0[4];
Struct80s *unk4;
SkeletalAnimation *unk4;
BKModelBin *unk8;
}ActorLocal_Gobi2;
@@ -49,14 +49,14 @@ void GV_func_80387A00(ActorMarker *this_marker){
void func_80387A2C(ActorMarker *caller, enum asset_e text_id, s32 arg2){
timed_setStaticCameraToNode(0.0f, 0xC);
timedFunc_set_1(0.5f, (GenMethod_1) func_80387984, reinterpret_cast(s32, caller));
timedFunc_set_1(0.5f, (GenFunction_1) func_80387984, reinterpret_cast(s32, caller));
timed_playSfx(0.5f, SFX_2C_PULLING_NOISE, 0.9f, 32000);
timed_playSfx(1.8f, SFX_2C_PULLING_NOISE, 1.0f, 32000);
timed_playSfx(2.5f, SFX_2C_PULLING_NOISE, 1.1f, 32000);
timed_setStaticCameraToNode(3.0f, 0xd);
timedFunc_set_0(3.5f, __chGobi2_spawnJIggy);
timed_exitStaticCamera(6.0f);
timedFunc_set_1(6.0f, (GenMethod_1) GV_func_80387A00, reinterpret_cast(s32, caller));
timedFunc_set_1(6.0f, (GenFunction_1) GV_func_80387A00, reinterpret_cast(s32, caller));
func_80324E38(6.0f, 0);
}
@@ -73,14 +73,14 @@ void chGobi2_setState(Actor *this, s32 next_state){
if(next_state == 2){
this->marker->propPtr->unk8_3 = TRUE;
func_80335924(this->unk148, ASSET_F4_ANIM_GOBI_IDLE, 0.5f, 12.0f);
skeletalAnim_set(this->unk148, ASSET_F4_ANIM_GOBI_IDLE, 0.5f, 12.0f);
}
if(next_state == 3){
timedFunc_set_0(0.05f, GV_func_80387960);
timed_playSfx(0.05f, SFX_84_GOBI_CRYING, 1.1f, 32000);
func_80324E38(0.051f, 1);
timedFunc_set_1(0.06f, (GenMethod_1)func_803879D4, reinterpret_cast(s32, this->marker));
timedFunc_set_1(0.06f, (GenFunction_1)func_803879D4, reinterpret_cast(s32, this->marker));
timed_setStaticCameraToNode(0.86f, 0xb);
timed_playSfx(0.8f, SFX_4B_GULPING, 0.8f, 28000);
timed_playSfx(1.4f, SFX_4B_GULPING, 0.8f, 28000);
@@ -89,18 +89,18 @@ void chGobi2_setState(Actor *this, s32 next_state){
}//L80387C94
if(next_state == 4){
func_80335924(this->unk148, ASSET_FC_ANIM_GOBI_SPITTING, 0.2f, 3.0f);
func_80335924(local->unk4, ASSET_100_ANIM_GOBI_SPIT, 0.0f, 3.0f);
skeletalAnim_set(this->unk148, ASSET_FC_ANIM_GOBI_SPITTING, 0.2f, 3.0f);
skeletalAnim_set(local->unk4, ASSET_100_ANIM_GOBI_SPIT, 0.0f, 3.0f);
}
if(next_state == 5){
func_80335924(this->unk148, ASSET_FD_ANIM_GOBI2_GETTING_UP, 0.43f, 0.5f);
func_80335A8C(this->unk148, 2);
skeletalAnim_set(this->unk148, ASSET_FD_ANIM_GOBI2_GETTING_UP, 0.43f, 0.5f);
skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE);
}
if(next_state == 6){
func_80335924(this->unk148, ASSET_F8_ANIM_GOBI_RUNNING, 0.4f, 0.71f);
func_80335A8C(this->unk148, 1);
skeletalAnim_set(this->unk148, ASSET_F8_ANIM_GOBI_RUNNING, 0.4f, 0.71f);
skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP);
}
if(next_state == 7){
@@ -109,7 +109,7 @@ void chGobi2_setState(Actor *this, s32 next_state){
if(next_state == 8){
FUNC_8030E8B4(SFX_84_GOBI_CRYING, 0.9f, 20000, this->position, 1500, 2500);
func_80335924(this->unk148, ASSET_242_ANIM_GOBI_RELAXING, 0.2f, 0.5f);
skeletalAnim_set(this->unk148, ASSET_242_ANIM_GOBI_RELAXING, 0.2f, 0.5f);
}
this->state = next_state;
@@ -130,12 +130,12 @@ Actor *chGobi2_draw(ActorMarker *this_marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
sp3C[0] = this->pitch;
sp3C[1] = this->yaw;
sp3C[2] = this->roll;
func_8033A238(func_803356A0(this->unk148));
modelRender_preDraw((GenMethod_1)func_803253A0, (s32)this);
modelRender_setBoneTransformList(skeletalAnim_getBoneTransformList(this->unk148));
modelRender_preDraw((GenFunction_1)actor_predrawMethod, (s32)this);
modelRender_draw(gfx, mtx, this->position, sp3C, 1.0f, NULL, func_80330B1C(this_marker));
if(this->state == 4){
func_8033A238(func_803356A0(local->unk4));
modelRender_setBoneTransformList(skeletalAnim_getBoneTransformList(local->unk4));
modelRender_setDepthMode(MODEL_RENDER_DEPTH_COMPARE);
modelRender_draw(gfx, mtx, this->position, sp3C, 1.0f, NULL, local->unk8);
}
@@ -147,7 +147,7 @@ void __chGobi2_80387EFC(Actor *this){
ActorLocal_Gobi2 *local = (ActorLocal_Gobi2 *)&this->local;
chGobi2_setState(this, 0);
func_80335874(local->unk4);
skeletalAnim_free(local->unk4);
assetcache_release(local->unk8);
}
@@ -174,7 +174,7 @@ void chGobi2_update(Actor *this){
this->unk16C_4 = TRUE;
marker_setCollisionScripts(this->marker, __chGobi2_ow, NULL, NULL);
sp34->unk30 = __chGobi2_80387EFC;
local->unk4 = func_803358B4();
local->unk4 = skeletalAnim_new();
local->unk8 = (BKModelBin*) assetcache_get(ASSET_3F3_MODEL_GOBI_SPIT);
D_80391A50 = 0;
this->unk1C[0] = 0.0f;
@@ -211,14 +211,14 @@ void chGobi2_update(Actor *this){
}//L80388194
if(this->state == 4){
func_80335A94(local->unk4, sp2C, 1);
if(func_80335794(this->unk148) > 0){
skeletalAnim_update(local->unk4, sp2C, 1);
if(skeletalAnim_getLoopCount(this->unk148) > 0){
chGobi2_setState(this, 5);
}
}
if(this->state == 5){
if(func_80335794(this->unk148) > 0){
if(skeletalAnim_getLoopCount(this->unk148) > 0){
chGobi2_setState(this, 6);
}
}
@@ -228,7 +228,7 @@ void chGobi2_update(Actor *this){
}
if(this->state == 8){
if(func_80335794(this->unk148) > 0){
if(skeletalAnim_getLoopCount(this->unk148) > 0){
chGobi2_setState(this, 2);
}
}

View File

@@ -58,26 +58,26 @@ void chGobi3_setState(Actor *this, s32 next_state){
if(next_state == 2){
this->marker->propPtr->unk8_3 = TRUE;
func_80335924(this->unk148, ASSET_F4_ANIM_GOBI_IDLE, 0.5f, 12.0f);
skeletalAnim_set(this->unk148, ASSET_F4_ANIM_GOBI_IDLE, 0.5f, 12.0f);
}
if(next_state == 3){
func_80324E38(0.0f, 3);
timedFunc_set_1(0.02f, (GenMethod_1)__chGobi3_func_80388270, (s32)this);
timedFunc_set_1(0.02f, (GenFunction_1)__chGobi3_func_80388270, (s32)this);
timed_setStaticCameraToNode(0.1f, 0x12);
timed_playSfx(0.2f, SFX_4C_LIP_SMACK, 1.0f, 32000);
timedFunc_set_1(0.2f, (GenMethod_1)__chGobi3_spawnHoneyComb, (s32)this);
func_80335924(this->unk148, ASSET_FC_ANIM_GOBI_SPITTING, 0.2f, 1.0f);
timedFunc_set_1(0.2f, (GenFunction_1)__chGobi3_spawnHoneyComb, (s32)this);
skeletalAnim_set(this->unk148, ASSET_FC_ANIM_GOBI_SPITTING, 0.2f, 1.0f);
}
if(next_state == 5){
func_80335924(this->unk148, 0xd9, 0.5f, 4.0f);
skeletalAnim_set(this->unk148, 0xd9, 0.5f, 4.0f);
func_80311480(ASSET_A77_TEXT_GOBI3_DONE, 0xe, this->position, this->marker, __chGobi3_runaway, NULL);
}
if(next_state == 4){
this->marker->propPtr->unk8_3 = FALSE;
func_80335924(this->unk148, ASSET_F8_ANIM_GOBI_RUNNING, 0.3f, 0.71f);
skeletalAnim_set(this->unk148, ASSET_F8_ANIM_GOBI_RUNNING, 0.3f, 0.71f);
}
if(next_state == 6){
@@ -86,7 +86,7 @@ void chGobi3_setState(Actor *this, s32 next_state){
if(next_state == 7){
FUNC_8030E8B4(SFX_84_GOBI_CRYING, 0.9f, 20000, this->position, 1500, 2500);
func_80335924(this->unk148, ASSET_242_ANIM_GOBI_RELAXING, 0.2f, 0.5f);
skeletalAnim_set(this->unk148, ASSET_242_ANIM_GOBI_RELAXING, 0.2f, 0.5f);
}
this->state = next_state;
@@ -97,7 +97,7 @@ Actor *chGobi3_draw(ActorMarker *this_marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
if(this->state == 0 || this->state == 1) return this;
return func_80325888(this_marker, gfx, mtx, vtx);
return actor_draw(this_marker, gfx, mtx, vtx);
}
void chGobi3_ow(ActorMarker *this_marker, ActorMarker *other_marker){
@@ -138,7 +138,7 @@ void chGobi3_update(Actor *this){
}
if(this->state == 3){
if(func_80335794(this->unk148) > 0)
if(skeletalAnim_getLoopCount(this->unk148) > 0)
chGobi3_setState(this, 5);
}
@@ -149,7 +149,7 @@ void chGobi3_update(Actor *this){
}
if(this->state == 7){
if(func_80335794(this->unk148) > 0)
if(skeletalAnim_getLoopCount(this->unk148) > 0)
chGobi3_setState(this, 2);
}

View File

@@ -69,7 +69,7 @@ Actor *chGobiRock_draw(ActorMarker *this_marker, Gfx **gfx, Mtx **mtx, Vtx **vtx
sp3C[0] = this->pitch;
sp3C[1] = this->yaw;
sp3C[2] = this->roll;
modelRender_preDraw((GenMethod_1)func_803253A0, (s32) this);
modelRender_preDraw((GenFunction_1)actor_predrawMethod, (s32) this);
func_8033A450(func_80329934());
modelRender_draw(gfx, mtx, this->position, sp3C, 1.0f, NULL,func_80330B1C(this_marker));
func_8034A174(func_80329934(), 5, local->unk0);

View File

@@ -8,7 +8,7 @@ void chGobiRope_update(Actor *this);
/* .data */
ActorInfo chGobiRope = { MARKER_BD_GOBI_ROPE, ACTOR_12F_GOBI_ROPE, ASSET_3E3_MODEL_GOBI_ROPE,
0, NULL,
chGobiRope_update, func_80326224, func_80325888,
chGobiRope_update, func_80326224, actor_draw,
0, 0x533, 0.0f, 0
};
@@ -17,16 +17,16 @@ void chGobiRope_setState(Actor *this, s32 next_state){
this->state = next_state;
if(this->state == 1){
func_80335924(this->unk148, ASSET_DD_ANIM_GOBI_ROPE, 0.5f, 4.0f);
skeletalAnim_set(this->unk148, ASSET_DD_ANIM_GOBI_ROPE, 0.5f, 4.0f);
}
if(this->state == 2){
func_80335924(this->unk148, ASSET_DC_ANIM_GOBI_ROPE_PULLING, 1.0f, 5.0f);
skeletalAnim_set(this->unk148, ASSET_DC_ANIM_GOBI_ROPE_PULLING, 1.0f, 5.0f);
}
if(this->state == 3){
func_80335924(this->unk148, 0xF5, 0.1f, 1.0f);
func_80335A8C(this->unk148, 2);
skeletalAnim_set(this->unk148, 0xF5, 0.1f, 1.0f);
skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE);
}
if(this->state == 4){
@@ -65,11 +65,11 @@ void chGobiRope_update(Actor *this){
}
}//L80388AB4
if(this->state == 2){
if(func_80335794(this->unk148) > 0)
if(skeletalAnim_getLoopCount(this->unk148) > 0)
chGobiRope_setState(this, 1);
}
if(this->state == 3){
if(func_80335794(this->unk148) > 0)
if(skeletalAnim_getLoopCount(this->unk148) > 0)
chGobiRope_setState(this, 4);
}
}

View File

@@ -50,7 +50,7 @@ Actor *func_8038DA18(ActorMarker *this_marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
f32 sp38[3];
f32 sp2C[3];
this = func_80325888(this_marker, gfx, mtx, vtx);
this = actor_draw(this_marker, gfx, mtx, vtx);
if(!this_marker->unk14_21) return this;

View File

@@ -98,9 +98,9 @@ void __chMazeCtrl_setState(Actor *this, s32 next_state){
if(next_state == 3){
func_80324E38(0.0f, 3);
timedFunc_set_2(0.0f, (GenMethod_2)func_8025A6EC, COMUSIC_3E_SANDYBUTT_FAILURE, 0x7FFF);
timedFunc_set_2(1.0f, (GenMethod_2)__chMazeCtrl_markerSetState, reinterpret_cast(s32, this->marker), 6);
timedFunc_set_2(2.0f, (GenMethod_2)__chMazeCtrl_markerSetState, reinterpret_cast(s32, this->marker), 4);
timedFunc_set_2(0.0f, (GenFunction_2)func_8025A6EC, COMUSIC_3E_SANDYBUTT_FAILURE, 0x7FFF);
timedFunc_set_2(1.0f, (GenFunction_2)__chMazeCtrl_markerSetState, reinterpret_cast(s32, this->marker), 6);
timedFunc_set_2(2.0f, (GenFunction_2)__chMazeCtrl_markerSetState, reinterpret_cast(s32, this->marker), 4);
}//L8038F850
if(next_state == 4){

View File

@@ -20,13 +20,13 @@ ActorAnimationInfo chSarcophagusAnimations[] = {
ActorInfo chSarcophagus = { MARKER_A8_GV_MAZE_SARCOPHAGUS, ACTOR_11A_GV_MAZE_SARCOPHAGUS, ASSET_33D_MODEL_SARCOPHAGUS,
0x1, chSarcophagusAnimations,
chSarcophagus_update, func_80326224, func_80325888,
chSarcophagus_update, func_80326224, actor_draw,
2500, 0, 0.0f, 0
};
ActorInfo chSNSSarcophagus = { MARKER_23B_GV_SNS_SARCOPHAGUS, ACTOR_244_GV_SNS_SARCOPHAGUS, ASSET_33D_MODEL_SARCOPHAGUS,
0x1, chSarcophagusAnimations,
chSarcophagus_updateSNS, func_80326224, func_80325888,
chSarcophagus_updateSNS, func_80326224, actor_draw,
0, 0, 0.0f, 0
};

View File

@@ -14,7 +14,7 @@ ActorAnimationInfo chTootsAnimations[] = {
ActorInfo chToots = { MARKER_1F4_TOOTS, ACTOR_1E4_TOOTS, ASSET_434_MODEL_TOOTS,
0x1, chTootsAnimations,
chtoots_update, func_80326224, func_80325888,
chtoots_update, func_80326224, actor_draw,
2000, 0, 0.5f, 0
};

View File

@@ -18,18 +18,18 @@ ActorInfo chTrunker = {
void __chTrucker_setState(Actor *this, s32 next_state){
this->state = next_state;
if(this->state == 1){
func_80335924(this->unk148, ASSET_FE_ANIM_TRUCKER_SHORT, 0.1f, 2.5f);
skeletalAnim_set(this->unk148, ASSET_FE_ANIM_TRUCKER_SHORT, 0.1f, 2.5f);
}
if(this->state == 2){
func_80335924(this->unk148, ASSET_FF_ANIM_TRUCKER_GROW, 0.1f, 2.5f);
func_80335A8C(this->unk148, 2);
skeletalAnim_set(this->unk148, ASSET_FF_ANIM_TRUCKER_GROW, 0.1f, 2.5f);
skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE);
}
if(this->state == 3){
func_80335924(this->unk148, ASSET_FF_ANIM_TRUCKER_GROW, 0.0f, 2.5f);
func_80335A74(this->unk148, 0.999f);
func_80335A8C(this->unk148, 2);
skeletalAnim_set(this->unk148, ASSET_FF_ANIM_TRUCKER_GROW, 0.0f, 2.5f);
skeletalAnim_setProgress(this->unk148, 0.999f);
skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE);
}
}
@@ -40,7 +40,7 @@ Actor *chTrucker_draw(ActorMarker *this_marker, Gfx **gfx, Mtx **mtx, Vtx **vtx)
if(this->state == 0) return this;
this = func_80325888(this_marker, gfx, mtx, vtx);
this = actor_draw(this_marker, gfx, mtx, vtx);
sp38[0] = this->position_x - 150.0f;
sp38[1] = this->position_y + 2.0f;
sp38[2] = this->position_z - 170.0f;
@@ -82,7 +82,7 @@ void chTrucker_update(Actor *this){
sp28 = 2;
}
if(this->state == 2 && func_80335794(this->unk148) > 0){
if(this->state == 2 && skeletalAnim_getLoopCount(this->unk148) > 0){
sp28 = 3;
}