Merge branch 'master' into 'master'

BGS Functions Documentation

See merge request banjo.decomp/banjo-kazooie!79
This commit is contained in:
Banjo Kazooie
2024-09-26 23:51:37 +00:00
3 changed files with 92 additions and 92 deletions

View File

@@ -3,7 +3,7 @@
#include "variables.h" #include "variables.h"
void timed_exitStaticCamera(f32); void timed_exitStaticCamera(f32);
void BGS_func_803888E4(Actor *this, s32 arg1); void chTiptup_setState(Actor *this, s32 arg1);
typedef struct{ typedef struct{
u32 unk0; u32 unk0;
@@ -17,15 +17,15 @@ typedef struct ch_bgs_2270_s{
u8 unkA; u8 unkA;
u8 unkB; u8 unkB;
f32 unkC; f32 unkC;
} ActorLocal_BGS_2270; } ActorLocal_Tiptup;
void func_80389080(Actor *this); void chTiptup_update(Actor *this);
Actor *actor_draw(ActorMarker *, Gfx **, Mtx **, Vtx **); Actor *actor_draw(ActorMarker *, Gfx **, Mtx **, Vtx **);
ActorInfo D_80390830 = { ActorInfo chTiptup = {
MARKER_19A_TIPTUP, ACTOR_27A_TIPTUP, ASSET_3F8_MODEL_TIPTUP, MARKER_19A_TIPTUP, ACTOR_27A_TIPTUP, ASSET_3F8_MODEL_TIPTUP,
0, NULL, 0, NULL,
func_80389080, NULL, actor_draw, chTiptup_update, NULL, actor_draw,
0, 0, 2.5f, 0 0, 0, 2.5f, 0
}; };
s16 D_80390854[] = {0, 0xC78, 0xC7A, 0xC7C}; //see again texts s16 D_80390854[] = {0, 0xC78, 0xC7A, 0xC7C}; //see again texts
@@ -34,20 +34,20 @@ u8 D_80390864[] = {3, 3, 5, 7}; //chchoirgame_sequence_length
f32 D_80390868[3] = {0.0f, 100.0f, -1020.0f}; //chchoirgame_jiggy_position f32 D_80390868[3] = {0.0f, 100.0f, -1020.0f}; //chchoirgame_jiggy_position
void BGS_func_80388660(ActorMarker *this){ void BGS_func_80388660(ActorMarker *this){
BGS_func_803888E4(marker_getActor(this), 6); chTiptup_setState(marker_getActor(this), 6);
} }
void BGS_func_8038868C(void){ void chTiptup_jiggySpawn(void){
jiggy_spawn(JIGGY_27_BGS_TIPTUP, D_80390868); jiggy_spawn(JIGGY_27_BGS_TIPTUP, D_80390868); //spawn jiggy after minigame
} }
void func_803886B4(ActorMarker *this, s32 arg1){ void chTiptup_activatePattern(ActorMarker *this, s32 arg1){
Actor *thisActor; Actor *thisActor;
ActorLocal_BGS_2270 *actLocalPtr; ActorLocal_Tiptup *actLocalPtr;
Struct_BGS_2270_0s *tmpPtr; Struct_BGS_2270_0s *tmpPtr;
thisActor = marker_getActor(this); thisActor = marker_getActor(this);
actLocalPtr = (ActorLocal_BGS_2270 *)&thisActor->local; actLocalPtr = (ActorLocal_Tiptup *)&thisActor->local;
actLocalPtr->unkB = arg1; actLocalPtr->unkB = arg1;
if(arg1){ if(arg1){
tmpPtr = vector_pushBackNew(&actLocalPtr->unk4); tmpPtr = vector_pushBackNew(&actLocalPtr->unk4);
@@ -55,59 +55,59 @@ void func_803886B4(ActorMarker *this, s32 arg1){
} }
} }
void func_803886F4(ActorMarker *this){ void chTiptup_activateTimer(ActorMarker *this){
Actor *thisActor; Actor *thisActor;
thisActor = marker_getActor(this); thisActor = marker_getActor(this);
item_set(ITEM_6_HOURGLASS, 1); item_set(ITEM_6_HOURGLASS, 1);
item_set(ITEM_0_HOURGLASS_TIMER, 30*60-1); item_set(ITEM_0_HOURGLASS_TIMER, 30*60-1);
BGS_func_803888E4(thisActor, 5); chTiptup_setState(thisActor, 5);
} }
void func_8038873C(void){ void chTiptup_sfxCorrectHit(void){
func_8025A6EC(COMUSIC_2B_DING_B, 28000); func_8025A6EC(COMUSIC_2B_DING_B, 28000);
} }
void BGS_func_80388760(void){ void chTiptup_sfxIncorrectHit(void){
func_8025A6EC(COMUSIC_2C_BUZZER, 28000); func_8025A6EC(COMUSIC_2C_BUZZER, 28000);
} }
void func_80388784(ActorMarker *this, enum asset_e text_id, s32 arg2){ void chTiptup_textEvent(ActorMarker *this, enum asset_e text_id, s32 arg2){
Actor *thisActor; Actor *thisActor;
thisActor = marker_getActor(this); thisActor = marker_getActor(this);
switch(text_id){ switch(text_id){
case 0xc72: case 0xc72:
case 0xc74: case 0xc74:
BGS_func_803888E4(thisActor, 3); chTiptup_setState(thisActor, 3);
break; break;
case 0xc78: case 0xc78:
case 0xc7a: case 0xc7a:
case 0xc7c: case 0xc7c:
BGS_func_803888E4(thisActor, 4); chTiptup_setState(thisActor, 4);
break; break;
case 0xc77: case 0xc77:
case 0xc79: case 0xc79:
func_80324E38(0.0f, 0); func_80324E38(0.0f, 0);
BGS_func_803888E4(thisActor, 3); chTiptup_setState(thisActor, 3);
break; break;
case 0xc7b: case 0xc7b:
timedFunc_set_0(0.0f, BGS_func_8038868C); timedFunc_set_0(0.0f, chTiptup_jiggySpawn);
timed_exitStaticCamera(2.5f); timed_exitStaticCamera(2.5f);
func_80324E38(2.5f, 0); func_80324E38(2.5f, 0);
break; break;
} }
} }
void func_80388848(ActorMarker *this){ void chTiptup_correctHit(ActorMarker *this){
Actor *thisActor; Actor *thisActor;
ActorLocal_BGS_2270 *unqPtr; ActorLocal_Tiptup *unqPtr;
s32 sp1C; s32 sp1C;
thisActor = marker_getActor(this); thisActor = marker_getActor(this);
unqPtr = (ActorLocal_BGS_2270 *)&thisActor->local; unqPtr = (ActorLocal_Tiptup *)&thisActor->local;
sp1C = vector_size(unqPtr->unk4); sp1C = vector_size(unqPtr->unk4);
func_8038873C(); chTiptup_sfxCorrectHit();
if(sp1C != ++unqPtr->unk0) if(sp1C != ++unqPtr->unk0)
return; return;
@@ -121,8 +121,8 @@ void func_80388848(ActorMarker *this){
} }
} }
void BGS_func_803888E4(Actor *this, s32 arg1){ void chTiptup_setState(Actor *this, s32 arg1){
ActorLocal_BGS_2270 *unqPtr; ActorLocal_Tiptup *unqPtr;
f32 sp54; f32 sp54;
f32 tmpf; f32 tmpf;
@@ -132,7 +132,7 @@ void BGS_func_803888E4(Actor *this, s32 arg1){
s32 rand2; s32 rand2;
Struct_BGS_2270_0s *s1; Struct_BGS_2270_0s *s1;
unqPtr = (ActorLocal_BGS_2270 *)&this->local; unqPtr = (ActorLocal_Tiptup *)&this->local;
this->state = arg1; this->state = arg1;
unqPtr->unkC = 0.0f; unqPtr->unkC = 0.0f;
if(this->state == 1){ if(this->state == 1){
@@ -145,14 +145,14 @@ void BGS_func_803888E4(Actor *this, s32 arg1){
if(!this->is_first_encounter){ if(!this->is_first_encounter){
this->is_first_encounter = TRUE; this->is_first_encounter = TRUE;
if(unqPtr->unkA == 0){ if(unqPtr->unkA == 0){
func_80311480(0xc72, 0xe, this->position, this->marker, func_80388784, 0); func_80311480(0xc72, 0xe, this->position, this->marker, chTiptup_textEvent, 0);
}else{ }else{
func_80311480(0xc74, 0xf, this->position, this->marker, func_80388784, 0); func_80311480(0xc74, 0xf, this->position, this->marker, chTiptup_textEvent, 0);
} }
} }
else{ else{
func_80311480(D_80390854[unqPtr->unkA], 0xf, this->position, this->marker, func_80388784, 0); func_80311480(D_80390854[unqPtr->unkA], 0xf, this->position, this->marker, chTiptup_textEvent, 0);
} }
} }
if(this->state == 3){ if(this->state == 3){
@@ -167,19 +167,19 @@ void BGS_func_803888E4(Actor *this, s32 arg1){
for(; i < D_80390864[unqPtr->unkA]; i++){ for(; i < D_80390864[unqPtr->unkA]; i++){
tmpf += randf2(1.0f, 1.5f); tmpf += randf2(1.0f, 1.5f);
while((rand2 = randi2(1,7)) == prev_member); while((rand2 = randi2(1,7)) == prev_member);
timedFunc_set_2(tmpf, (GenFunction_2) func_803886B4, reinterpret_cast(s32, this->marker), rand2); timedFunc_set_2(tmpf, (GenFunction_2) chTiptup_activatePattern, reinterpret_cast(s32, this->marker), rand2);
timedFunc_set_2(tmpf + 0.1, (GenFunction_2)func_803886B4, reinterpret_cast(s32, this->marker), 0); timedFunc_set_2(tmpf + 0.1, (GenFunction_2)chTiptup_activatePattern, reinterpret_cast(s32, this->marker), 0);
prev_member = rand2; prev_member = rand2;
}//L80388B7C }//L80388B7C
timed_exitStaticCamera(tmpf += 2.5); timed_exitStaticCamera(tmpf += 2.5);
if(!unqPtr->unkA && !volatileFlag_get(VOLATILE_FLAG_2_FF_IN_MINIGAME)){ if(!unqPtr->unkA && !volatileFlag_get(VOLATILE_FLAG_2_FF_IN_MINIGAME)){
func_80324DBC(tmpf + 0.5, 0xc73, 0xe, this->position, this->marker, func_80388784, 0); func_80324DBC(tmpf + 0.5, 0xc73, 0xe, this->position, this->marker, chTiptup_textEvent, 0);
unqPtr->unkA = 1; unqPtr->unkA = 1;
} }
func_80324E38(sp54 = tmpf + 0.6, 0); func_80324E38(sp54 = tmpf + 0.6, 0);
if(volatileFlag_get(VOLATILE_FLAG_2_FF_IN_MINIGAME)){ if(volatileFlag_get(VOLATILE_FLAG_2_FF_IN_MINIGAME)){
timedFunc_set_1(sp54, (GenFunction_1)func_803886F4, reinterpret_cast(s32, this->marker)); timedFunc_set_1(sp54, (GenFunction_1)chTiptup_activateTimer, reinterpret_cast(s32, this->marker));
}else{ }else{
this->state = 0x05; this->state = 0x05;
} }
@@ -194,8 +194,8 @@ void BGS_func_803888E4(Actor *this, s32 arg1){
for(j = 0; j < vector_size(unqPtr->unk4); j++){ for(j = 0; j < vector_size(unqPtr->unk4); j++){
s1 = (Struct_BGS_2270_0s *)vector_at(unqPtr->unk4,j); s1 = (Struct_BGS_2270_0s *)vector_at(unqPtr->unk4,j);
tmpf += randf2(1.0f, 1.5f); tmpf += randf2(1.0f, 1.5f);
timedFunc_set_2(tmpf, (GenFunction_2)func_803886B4, reinterpret_cast(s32, this->marker), s1->unk0); timedFunc_set_2(tmpf, (GenFunction_2)chTiptup_activatePattern, reinterpret_cast(s32, this->marker), s1->unk0);
timedFunc_set_2(tmpf + 0.1, (GenFunction_2)func_803886B4, reinterpret_cast(s32, this->marker), 0); timedFunc_set_2(tmpf + 0.1, (GenFunction_2)chTiptup_activatePattern, reinterpret_cast(s32, this->marker), 0);
} }
timed_exitStaticCamera(tmpf += 2.5); timed_exitStaticCamera(tmpf += 2.5);
func_80324E38(tmpf + 0.6,0); func_80324E38(tmpf + 0.6,0);
@@ -208,7 +208,7 @@ void BGS_func_803888E4(Actor *this, s32 arg1){
} }
func_80324E38(0.5f, 3); func_80324E38(0.5f, 3);
timed_setStaticCameraToNode(1.5f, 1); timed_setStaticCameraToNode(1.5f, 1);
func_80324DBC(2.0f, D_8039085C[unqPtr->unkA++], 0xF, this->position, this->marker, func_80388784, 0); func_80324DBC(2.0f, D_8039085C[unqPtr->unkA++], 0xF, this->position, this->marker, chTiptup_textEvent, 0);
} }
} }
@@ -218,31 +218,31 @@ void func_80388E44(ActorMarker *arg0, ActorMarker *arg1){
s32 func_80388E70(ActorMarker *this){ s32 func_80388E70(ActorMarker *this){
Actor *ptr; Actor *ptr;
ActorLocal_BGS_2270 *local; ActorLocal_Tiptup *local;
ptr = marker_getActor(this); ptr = marker_getActor(this);
local = (ActorLocal_BGS_2270 *)&ptr->local; local = (ActorLocal_Tiptup *)&ptr->local;
return local->unkB; return local->unkB;
} }
void func_80388E94(ActorMarker *this, s32 arg1){ void chTiptup_choirHitReaction(ActorMarker *this, s32 arg1){
Actor * thisActor; Actor * thisActor;
ActorLocal_BGS_2270 *unqPtr; ActorLocal_Tiptup *unqPtr;
Struct_BGS_2270_0s * tmp; Struct_BGS_2270_0s * tmp;
thisActor = marker_getActor(this); thisActor = marker_getActor(this);
unqPtr = (ActorLocal_BGS_2270 *)&thisActor->local; unqPtr = (ActorLocal_Tiptup *)&thisActor->local;
if((s32)unqPtr->unk0 >= (s32) vector_size(unqPtr->unk4)){ if((s32)unqPtr->unk0 >= (s32) vector_size(unqPtr->unk4)){
if(!mapSpecificFlags_get(0) && func_80311480(0xc76, 0, 0, 0, 0, 0)) if(!mapSpecificFlags_get(0) && func_80311480(0xc76, 0, 0, 0, 0, 0))
mapSpecificFlags_set(0,1); mapSpecificFlags_set(0,1);
}else{ }else{
tmp = (Struct_BGS_2270_0s *)vector_at(unqPtr->unk4, unqPtr->unk0); tmp = (Struct_BGS_2270_0s *)vector_at(unqPtr->unk4, unqPtr->unk0);
if(arg1 == tmp->unk0){ if(arg1 == tmp->unk0){
timedFunc_set_1(0.5f, (GenFunction_1)func_80388848, reinterpret_cast(s32, thisActor->marker)); timedFunc_set_1(0.5f, (GenFunction_1)chTiptup_correctHit, reinterpret_cast(s32, thisActor->marker));
} }
else{ else{
func_8028F55C(1, thisActor->marker); func_8028F55C(1, thisActor->marker);
timedFunc_set_0(0.5f, BGS_func_80388760); timedFunc_set_0(0.5f, chTiptup_sfxIncorrectHit);
if(!mapSpecificFlags_get(1) && !volatileFlag_get(VOLATILE_FLAG_2_FF_IN_MINIGAME) && func_80311480(0xc75, 0, NULL, NULL, NULL, NULL)) if(!mapSpecificFlags_get(1) && !volatileFlag_get(VOLATILE_FLAG_2_FF_IN_MINIGAME) && func_80311480(0xc75, 0, NULL, NULL, NULL, NULL))
mapSpecificFlags_set(1,TRUE); mapSpecificFlags_set(1,TRUE);
} }
@@ -250,19 +250,19 @@ void func_80388E94(ActorMarker *this, s32 arg1){
} }
void func_80388FC0(Actor *this){ void func_80388FC0(Actor *this){
ActorLocal_BGS_2270 *local; ActorLocal_Tiptup *local;
local = (ActorLocal_BGS_2270 *)&this->local; local = (ActorLocal_Tiptup *)&this->local;
fileProgressFlag_setN(0, local->unkA, 2); fileProgressFlag_setN(0, local->unkA, 2);
vector_free(local->unk4); vector_free(local->unk4);
} }
void func_80388FFC(ActorMarker *this, s32 *arg1, f32* arg2){ void func_80388FFC(ActorMarker *this, s32 *arg1, f32* arg2){
Actor *thisActor; Actor *thisActor;
ActorLocal_BGS_2270 *localPtr; ActorLocal_Tiptup *localPtr;
thisActor = marker_getActor(this); thisActor = marker_getActor(this);
localPtr = (ActorLocal_BGS_2270 *)&thisActor->local; localPtr = (ActorLocal_Tiptup *)&thisActor->local;
*arg2 = 0.52 + (f64)localPtr->unk9 * 0.12; *arg2 = 0.52 + (f64)localPtr->unk9 * 0.12;
localPtr->unk9++; localPtr->unk9++;
@@ -270,15 +270,15 @@ void func_80388FFC(ActorMarker *this, s32 *arg1, f32* arg2){
} }
void func_80389080(Actor *this){ void chTiptup_update(Actor *this){
f32 player_position[3]; f32 player_position[3];
ActorLocal_BGS_2270 *unqPtr; ActorLocal_Tiptup *unqPtr;
f32 sp3C; f32 sp3C;
f32 sp38; f32 sp38;
f32 sp34; f32 sp34;
f32 sp30; f32 sp30;
unqPtr = (ActorLocal_BGS_2270 *)&this->local; unqPtr = (ActorLocal_Tiptup *)&this->local;
sp3C = time_getDelta(); sp3C = time_getDelta();
if(!this->volatile_initialized){ if(!this->volatile_initialized){
this->volatile_initialized = TRUE; this->volatile_initialized = TRUE;
@@ -296,7 +296,7 @@ void func_80389080(Actor *this){
unqPtr->unkA = 3; unqPtr->unkA = 3;
this->position_y = this->position_y - 300.0f; this->position_y = this->position_y - 300.0f;
} }
BGS_func_803888E4(this, 1); chTiptup_setState(this, 1);
if(jiggyscore_isSpawned(JIGGY_27_BGS_TIPTUP) && !volatileFlag_get(VOLATILE_FLAG_2_FF_IN_MINIGAME) && !volatileFlag_get(VOLATILE_FLAG_1)) if(jiggyscore_isSpawned(JIGGY_27_BGS_TIPTUP) && !volatileFlag_get(VOLATILE_FLAG_2_FF_IN_MINIGAME) && !volatileFlag_get(VOLATILE_FLAG_1))
marker_despawn(this->marker); marker_despawn(this->marker);
} }
@@ -315,12 +315,12 @@ void func_80389080(Actor *this){
if(volatileFlag_get(VOLATILE_FLAG_2_FF_IN_MINIGAME)){ if(volatileFlag_get(VOLATILE_FLAG_2_FF_IN_MINIGAME)){
if(volatileFlag_get(VOLATILE_FLAG_3)){ if(volatileFlag_get(VOLATILE_FLAG_3)){
func_80324E38(0.0f,0); func_80324E38(0.0f,0);
BGS_func_803888E4(this, 3); chTiptup_setState(this, 3);
} }
} }
else{ else{
if(ml_distance_vec3f(this->position, player_position) < 300.0f && player_getTransformation() == TRANSFORM_1_BANJO && !jiggyscore_isSpawned(JIGGY_27_BGS_TIPTUP)){ if(ml_distance_vec3f(this->position, player_position) < 300.0f && player_getTransformation() == TRANSFORM_1_BANJO && !jiggyscore_isSpawned(JIGGY_27_BGS_TIPTUP)){
BGS_func_803888E4(this, 2); chTiptup_setState(this, 2);
} }
} }
} }
@@ -334,7 +334,7 @@ void func_80389080(Actor *this){
} //L80389370 } //L80389370
else{ else{
if(ml_distance_vec3f(this->position, player_position) >= 300.0f) if(ml_distance_vec3f(this->position, player_position) >= 300.0f)
BGS_func_803888E4(this, 1); chTiptup_setState(this, 1);
} }
}//L803893A0 }//L803893A0
if(this->state == 6){ if(this->state == 6){

View File

@@ -7,31 +7,31 @@ typedef struct{
ActorMarker *tiptup_marker; //tiptup_marker ActorMarker *tiptup_marker; //tiptup_marker
f32 unk8; f32 unk8;
s32 unkC; s32 unkC;
}ActorLocal_BGS_3030; }ActorLocal_ChoirTurtle;
void func_80389668(Actor *this); void chChoirTurtle_update(Actor *this);
Actor *BGS_func_80389610(ActorMarker *marker, Gfx **, Mtx **, Vtx**); Actor *chChoirTurtle_draw(ActorMarker *marker, Gfx **, Mtx **, Vtx**);
/* .data */ /* .data */
ActorInfo D_80390880 = { MARKER_19B_CHOIR_TURTLE_YELLOW, ACTOR_27B_CHOIR_TURTLE_YELLOW, ASSET_3F9_MODEL_CHOIR_TURTLE, 0, NULL, func_80389668, NULL, BGS_func_80389610, 0, 0, 1.5f, 0}; ActorInfo chChoirTurtleYellow = { MARKER_19B_CHOIR_TURTLE_YELLOW, ACTOR_27B_CHOIR_TURTLE_YELLOW, ASSET_3F9_MODEL_CHOIR_TURTLE, 0, NULL, chChoirTurtle_update, NULL, chChoirTurtle_draw, 0, 0, 1.5f, 0};
ActorInfo D_803908A4 = { MARKER_19C_CHOIR_TURTLE_CYAN, ACTOR_27C_CHOIR_TURTLE_CYAN, ASSET_3F9_MODEL_CHOIR_TURTLE, 0, NULL, func_80389668, NULL, BGS_func_80389610, 0, 0, 1.5f, 0}; ActorInfo chChoirTurtleCyan = { MARKER_19C_CHOIR_TURTLE_CYAN, ACTOR_27C_CHOIR_TURTLE_CYAN, ASSET_3F9_MODEL_CHOIR_TURTLE, 0, NULL, chChoirTurtle_update, NULL, chChoirTurtle_draw, 0, 0, 1.5f, 0};
ActorInfo D_803908C8 = { MARKER_19D_CHOIR_TURTLE_BLUE, ACTOR_27D_CHOIR_TURTLE_BLUE, ASSET_3F9_MODEL_CHOIR_TURTLE, 0, NULL, func_80389668, NULL, BGS_func_80389610, 0, 0, 1.5f, 0}; ActorInfo chChoirTurtleBlue = { MARKER_19D_CHOIR_TURTLE_BLUE, ACTOR_27D_CHOIR_TURTLE_BLUE, ASSET_3F9_MODEL_CHOIR_TURTLE, 0, NULL, chChoirTurtle_update, NULL, chChoirTurtle_draw, 0, 0, 1.5f, 0};
ActorInfo D_803908EC = { MARKER_19E_CHOIR_TURTLE_RED, ACTOR_27E_CHOIR_TURTLE_RED, ASSET_3F9_MODEL_CHOIR_TURTLE, 0, NULL, func_80389668, NULL, BGS_func_80389610, 0, 0, 1.5f, 0}; ActorInfo chChoirTurtleRed = { MARKER_19E_CHOIR_TURTLE_RED, ACTOR_27E_CHOIR_TURTLE_RED, ASSET_3F9_MODEL_CHOIR_TURTLE, 0, NULL, chChoirTurtle_update, NULL, chChoirTurtle_draw, 0, 0, 1.5f, 0};
ActorInfo D_80390910 = { MARKER_19F_CHOIR_TURTLE_PINK, ACTOR_27F_CHOIR_TURTLE_PINK, ASSET_3F9_MODEL_CHOIR_TURTLE, 0, NULL, func_80389668, NULL, BGS_func_80389610, 0, 0, 1.5f, 0}; ActorInfo chChoirTurtlePink = { MARKER_19F_CHOIR_TURTLE_PINK, ACTOR_27F_CHOIR_TURTLE_PINK, ASSET_3F9_MODEL_CHOIR_TURTLE, 0, NULL, chChoirTurtle_update, NULL, chChoirTurtle_draw, 0, 0, 1.5f, 0};
ActorInfo D_80390934 = { MARKER_1A0_CHOIR_TURTLE_PURPLE, ACTOR_280_CHOIR_TURTLE_PURPLE, ASSET_3F9_MODEL_CHOIR_TURTLE, 0, NULL, func_80389668, NULL, BGS_func_80389610, 0, 0, 1.5f, 0}; ActorInfo chChoirTurtlePurple = { MARKER_1A0_CHOIR_TURTLE_PURPLE, ACTOR_280_CHOIR_TURTLE_PURPLE, ASSET_3F9_MODEL_CHOIR_TURTLE, 0, NULL, chChoirTurtle_update, NULL, chChoirTurtle_draw, 0, 0, 1.5f, 0};
/* .code */ /* .code */
void func_80389420(ActorMarker *marker) { void chChoirTurtle_returnState(ActorMarker *marker) {
Actor *this; Actor *this;
this = marker_getActor(marker); this = marker_getActor(marker);
func_8030E878(SFX_C5_TWINKLY_POP, randf2(1.0f, 1.2f), 25000, this->position, 500.0f, 3000.0f); func_8030E878(SFX_C5_TWINKLY_POP, randf2(1.0f, 1.2f), 25000, this->position, 500.0f, 3000.0f);
} }
void func_80389488(Actor *this, s32 next_state) { void chChoirTurtle_setState(Actor *this, s32 next_state) {
ActorLocal_BGS_3030 *local; ActorLocal_ChoirTurtle *local;
local = (ActorLocal_BGS_3030 *)&this->local; local = (ActorLocal_ChoirTurtle *)&this->local;
if (next_state == 1) { if (next_state == 1) {
skeletalAnim_set(this->unk148, ASSET_12D_ANIM_CHOIR_TURTLE_IDLE, 0.2f, randf2(2.0f, 2.5f)); skeletalAnim_set(this->unk148, ASSET_12D_ANIM_CHOIR_TURTLE_IDLE, 0.2f, randf2(2.0f, 2.5f));
skeletalAnim_setProgress(this->unk148, randf2(0.0f, 1.0f)); skeletalAnim_setProgress(this->unk148, randf2(0.0f, 1.0f));
@@ -43,9 +43,9 @@ void func_80389488(Actor *this, s32 next_state) {
if (next_state == 3) { if (next_state == 3) {
func_8030E6A4(SFX_86_TIPTUP_CHORUS_AH, local->unk8, 0x7FFF); func_8030E6A4(SFX_86_TIPTUP_CHORUS_AH, local->unk8, 0x7FFF);
skeletalAnim_set(this->unk148, ASSET_12F_ANIM_CHOIR_TURTLE_HURT, 0.1f, 1.75f); skeletalAnim_set(this->unk148, ASSET_12F_ANIM_CHOIR_TURTLE_HURT, 0.1f, 1.75f);
skeletalAnim_setCallback_1(this->unk148, 0.9f, (GenFunction_1)func_80389420, (s32)this->marker); skeletalAnim_setCallback_1(this->unk148, 0.9f, (GenFunction_1)chChoirTurtle_returnState, (s32)this->marker);
if (local->tiptup_marker != NULL) { if (local->tiptup_marker != NULL) {
func_80388E94(local->tiptup_marker, local->unk0); chTiptup_choirHitReaction(local->tiptup_marker, local->unk0);
} }
} }
this->state = next_state; this->state = next_state;
@@ -56,21 +56,21 @@ void func_803895D0(ActorMarker *marker, ActorMarker *other_marker){
this = marker_getActor(marker); this = marker_getActor(marker);
if(this->state != 3){ if(this->state != 3){
func_80389488(this, 3); chChoirTurtle_setState(this, 3);
} }
} }
Actor *BGS_func_80389610(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) { Actor *chChoirTurtle_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) {
func_8033A45C(4, marker->id - 0x19A); func_8033A45C(4, marker->id - 0x19A);
return actor_draw(marker, gfx, mtx, vtx); return actor_draw(marker, gfx, mtx, vtx);
} }
void func_80389668(Actor *this) { void chChoirTurtle_update(Actor *this) {
ActorLocal_BGS_3030 *local; ActorLocal_ChoirTurtle *local;
f32 sp30; f32 sp30;
Actor *tiptup; Actor *tiptup;
local = (ActorLocal_BGS_3030 *)&this->local; local = (ActorLocal_ChoirTurtle *)&this->local;
if (!this->volatile_initialized) { if (!this->volatile_initialized) {
this->volatile_initialized = TRUE; this->volatile_initialized = TRUE;
this->marker->propPtr->unk8_3 = TRUE; this->marker->propPtr->unk8_3 = TRUE;
@@ -79,7 +79,7 @@ void func_80389668(Actor *this) {
local->unkC = 0; local->unkC = 0;
local->tiptup_marker = NULL; local->tiptup_marker = NULL;
local->unk8 = 1.0f; local->unk8 = 1.0f;
func_80389488(this, 1); chChoirTurtle_setState(this, 1);
if (jiggyscore_isSpawned(JIGGY_27_BGS_TIPTUP) && !volatileFlag_get(VOLATILE_FLAG_2_FF_IN_MINIGAME) && !volatileFlag_get(VOLATILE_FLAG_1)) { if (jiggyscore_isSpawned(JIGGY_27_BGS_TIPTUP) && !volatileFlag_get(VOLATILE_FLAG_2_FF_IN_MINIGAME) && !volatileFlag_get(VOLATILE_FLAG_1)) {
marker_despawn(this->marker); marker_despawn(this->marker);
} }
@@ -96,10 +96,10 @@ void func_80389668(Actor *this) {
} }
if (this->state == 1) { if (this->state == 1) {
if (local->tiptup_marker != NULL && (func_80388E70(local->tiptup_marker) == local->unk0)) { if (local->tiptup_marker != NULL && (func_80388E70(local->tiptup_marker) == local->unk0)) {
func_80389488(this, 2); chChoirTurtle_setState(this, 2);
} }
} }
if (((this->state == 2) || (this->state == 3)) && (skeletalAnim_getLoopCount(this->unk148) > 0)) { if (((this->state == 2) || (this->state == 3)) && (skeletalAnim_getLoopCount(this->unk148) > 0)) {
func_80389488(this, 1); chChoirTurtle_setState(this, 1);
} }
} }

View File

@@ -22,13 +22,13 @@ extern ActorInfo BGS_D_80390AE0;
extern ActorInfo D_80390960; extern ActorInfo D_80390960;
extern ActorInfo D_80390A40; extern ActorInfo D_80390A40;
extern ActorInfo D_80390A70; extern ActorInfo D_80390A70;
extern ActorInfo D_80390830; extern ActorInfo chTiptup;
extern ActorInfo D_80390880; extern ActorInfo chChoirTurtleYellow;
extern ActorInfo D_803908A4; extern ActorInfo chChoirTurtleCyan;
extern ActorInfo D_803908C8; extern ActorInfo chChoirTurtleBlue;
extern ActorInfo D_803908EC; extern ActorInfo chChoirTurtleRed;
extern ActorInfo D_80390910; extern ActorInfo chChoirTurtlePink;
extern ActorInfo D_80390934; extern ActorInfo chChoirTurtlePurple;
extern ActorInfo D_80390DA8; extern ActorInfo D_80390DA8;
extern ActorInfo D_80390D70; extern ActorInfo D_80390D70;
extern ActorInfo D_80390BD8; extern ActorInfo D_80390BD8;
@@ -53,13 +53,13 @@ void BGS_func_8038F1E0(void){//bgs_updateSpawnableActors
spawnableActorList_add(&D_80390960, actor_new, ACTOR_FLAG_NONE); spawnableActorList_add(&D_80390960, actor_new, ACTOR_FLAG_NONE);
spawnableActorList_add(&D_80390A40, actor_new, ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_7); //yumblie spawnableActorList_add(&D_80390A40, actor_new, ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_7); //yumblie
spawnableActorList_add(&D_80390A70, actor_new, ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_1); //mr. vile spawnableActorList_add(&D_80390A70, actor_new, ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_1); //mr. vile
spawnableActorList_add(&D_80390830, actor_new, ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_3 ); //tiptup spawnableActorList_add(&chTiptup, actor_new, ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_3 ); //tiptup
spawnableActorList_add(&D_80390880, actor_new, ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_3 ); //tiptup_chiorMember spawnableActorList_add(&chChoirTurtleYellow, actor_new, ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_3 ); //tiptup_chiorMember
spawnableActorList_add(&D_803908A4, actor_new, ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_3 ); //tiptup_chiorMember spawnableActorList_add(&chChoirTurtleCyan, actor_new, ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_3 ); //tiptup_chiorMember
spawnableActorList_add(&D_803908C8, actor_new, ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_3 ); //tiptup_chiorMember spawnableActorList_add(&chChoirTurtleBlue, actor_new, ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_3 ); //tiptup_chiorMember
spawnableActorList_add(&D_803908EC, actor_new, ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_3 ); //tiptup_chiorMember spawnableActorList_add(&chChoirTurtleRed, actor_new, ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_3 ); //tiptup_chiorMember
spawnableActorList_add(&D_80390910, actor_new, ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_3 ); //tiptup_chiorMember spawnableActorList_add(&chChoirTurtlePink, actor_new, ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_3 ); //tiptup_chiorMember
spawnableActorList_add(&D_80390934, actor_new, ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_3 ); //tiptup_chiorMember spawnableActorList_add(&chChoirTurtlePurple, actor_new, ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_3 ); //tiptup_chiorMember
spawnableActorList_add(&D_80390DA8, actor_new, ACTOR_FLAG_UNKNOWN_14); //leafboat spawnableActorList_add(&D_80390DA8, actor_new, ACTOR_FLAG_UNKNOWN_14); //leafboat
spawnableActorList_add(&D_80390D70, actor_new, ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_7); //bigAlligator spawnableActorList_add(&D_80390D70, actor_new, ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_7); //bigAlligator
spawnableActorList_add(&D_80390BD8, actor_new, ACTOR_FLAG_UNKNOWN_3); //green_jiggy_switch spawnableActorList_add(&D_80390BD8, actor_new, ACTOR_FLAG_UNKNOWN_3); //green_jiggy_switch