Merge branch 'master' into banjo-kazooie-var_renames
This commit is contained in:
@@ -4,15 +4,15 @@
|
||||
|
||||
extern void __spawnQueue_add_2(void (*)(s32, s32), s32, s32);
|
||||
|
||||
Actor *func_802D6F48(ActorMarker *this, Gfx **gdl, Mtx **mptr, Vtx **arg3);
|
||||
void func_802D6EA0(Actor *this);
|
||||
Actor *chBadShad_draw(ActorMarker *this, Gfx **gdl, Mtx **mptr, Vtx **arg3);
|
||||
void chBadShad_update(Actor *this);
|
||||
void func_802D729C(Actor *actor, f32 arg1);
|
||||
|
||||
/* .data */
|
||||
ActorInfo D_80367A50 = {
|
||||
ActorInfo chBadShad = {
|
||||
0x9B, 0x108, 0x3BF,
|
||||
0x1, NULL,
|
||||
func_802D6EA0, func_80326224, func_802D6F48,
|
||||
chBadShad_update, func_80326224, chBadShad_draw,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
@@ -21,13 +21,14 @@ f32 D_8037DE10[3];
|
||||
f32 D_8037DE20[3];
|
||||
|
||||
/* .code */
|
||||
void func_802D6EA0(Actor *this){
|
||||
void chBadShad_update(Actor *this){
|
||||
s32 iVar1;
|
||||
if(!this->initialized){
|
||||
this->initialized = 1;
|
||||
this->marker->collidable = 0;
|
||||
}
|
||||
if(!this->despawn_flag && this->unk1C_x < (f32)(func_8023DB5C() - 1) ){
|
||||
//unlink
|
||||
if(this->unk104){
|
||||
marker_getActor(this->unk104)->unk104 = 0;
|
||||
}
|
||||
@@ -35,7 +36,7 @@ void func_802D6EA0(Actor *this){
|
||||
}
|
||||
}
|
||||
|
||||
Actor *func_802D6F48(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
||||
Actor *chBadShad_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
||||
f32 sp44[3];
|
||||
f32 sp40;
|
||||
Actor *this = marker_getActorAndRotation(marker, sp44);
|
||||
@@ -85,10 +86,10 @@ f32 func_802D7038(Actor *this) {
|
||||
}
|
||||
|
||||
void func_802D7124(Actor *actor, f32 arg1) {
|
||||
f32 sp1C[3];
|
||||
f32 vp[3];
|
||||
|
||||
viewport_getPosition(&sp1C);
|
||||
if ((actor->position[0] - sp1C[0]) * (actor->position[0] - sp1C[0]) + (actor->position[2] - sp1C[2]) * (actor->position[2] - sp1C[2]) < 12250000.0f) {
|
||||
viewport_get_position_vec3f(&vp);
|
||||
if ((actor->position[0] - vp[0]) * (actor->position[0] - vp[0]) + (actor->position[2] - vp[2]) * (actor->position[2] - vp[2]) < 12250000.0f) {
|
||||
func_802D729C(actor, arg1);
|
||||
}
|
||||
}
|
||||
@@ -111,7 +112,7 @@ void func_802D71A0(s32 this, s32 arg1){
|
||||
sp2C[0] = (s32) D_8037DE10[0];
|
||||
sp2C[1] = (s32) D_8037DE10[1];
|
||||
sp2C[2] = (s32) D_8037DE10[2];
|
||||
sp3C = func_803056FC(0x108, sp2C, (s32)sp38->yaw);
|
||||
sp3C = spawn_actor(0x108, sp2C, (s32)sp38->yaw);
|
||||
if(sp3C){
|
||||
marker_getActor(marker)->unk104 = sp3C->marker;
|
||||
sp3C->unk104 = marker;
|
||||
|
@@ -23,7 +23,7 @@ void func_802CE7E0(ActorMarker *marker, ActorMarker *other){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
FUNC_8030E8B4(SFX_11_WOOD_BREAKING_1, 1.0f, 28000, actor->position, 300, 3000);
|
||||
FUNC_8030E8B4(SFX_D_EGGSHELL_BREAKING, 1.0f, 28000, actor->position, 300, 3000);
|
||||
func_80328A84(actor, 2);
|
||||
subaddie_set_state(actor, 2);
|
||||
actor_playAnimationOnce(actor);
|
||||
marker->collidable = FALSE;
|
||||
actor->unk138_27 = 3;
|
||||
@@ -72,8 +72,8 @@ void func_802CE8D4(Actor *this){
|
||||
sfxsource_setSfxId(this->unk44_31, SFX_67_BEEHIVE_CLONK);
|
||||
sfxsource_setSampleRate(this->unk44_31, 12000);
|
||||
func_8030DBB4(this->unk44_31, (animctrl_getAnimTimer(this->animctrl) + 0.9) - 0.4);
|
||||
func_8030DF68(this->unk44_31, this->position);
|
||||
func_8030DEB4(this->unk44_31, 300.0f, 1500.0f);
|
||||
sfxsource_set_position(this->unk44_31, this->position);
|
||||
sfxsource_set_fade_distances(this->unk44_31, 300.0f, 1500.0f);
|
||||
func_8030DD14(this->unk44_31, 3);
|
||||
func_8030E2C4(this->unk44_31);
|
||||
}
|
||||
|
@@ -52,19 +52,19 @@ void func_802C5EB8(Actor *this){
|
||||
}
|
||||
else{
|
||||
if(func_80329530(this, 1200) && func_803292E0(this)){
|
||||
func_80328A84(this, 8);
|
||||
subaddie_set_state(this, 8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_802C5F44(Actor *this){
|
||||
if(!func_80329530(this, 1200) || !func_803292E0(this)){
|
||||
func_80328B8C(this, 1, 0.16f, 1);
|
||||
subaddie_set_state_with_direction(this, 1, 0.16f, 1);
|
||||
}
|
||||
}
|
||||
|
||||
void func_802C5F94(Actor *this){
|
||||
func_80328A84(this, 2);
|
||||
subaddie_set_state(this, 2);
|
||||
func_802C5E80(this);
|
||||
func_80328CEC(this, (s32)this->yaw_ideal, 135, 175);
|
||||
this->unk38_31 = 150;
|
||||
@@ -87,14 +87,14 @@ void func_802C60AC(ActorMarker *marker, ActorMarker *other_marker){
|
||||
&& func_803294F0(actor, 80, func_80329784(actor))
|
||||
){
|
||||
animctrl_setPlaybackType(actor->animctrl, ANIMCTRL_ONCE);
|
||||
func_80328A84(actor, 5);
|
||||
subaddie_set_state(actor, 5);
|
||||
func_8030E58C(SFX_1E_HITTING_AN_ENEMY_2, 1.0f);
|
||||
}
|
||||
}
|
||||
|
||||
void func_802C6150(ActorMarker *marker, ActorMarker *other_marker){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
func_80328AC8(actor, 0xC);
|
||||
subaddie_set_state_forward(actor, 0xC);
|
||||
func_8030E878(SFX_2B_BULL_MOO_1, randf2(1.28f, 1.37f), 32000, actor->position, 0.0f, 2000.0f);
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ void func_802C61C0(ActorMarker *marker, ActorMarker *other_marker){
|
||||
&& actor->state != 0xe
|
||||
&& actor->state != 0xf
|
||||
){
|
||||
func_80328AC8(actor, 0xd);
|
||||
subaddie_set_state_forward(actor, 0xd);
|
||||
FUNC_8030E8B4(SFX_143_BULL_DAMAGE, 1.0f, 16000, actor->position, 0, 2000);
|
||||
FUNC_8030E8B4(SFX_143_BULL_DAMAGE, 1.0f, 16000, actor->position, 0, 2000);
|
||||
}
|
||||
@@ -147,7 +147,7 @@ void func_802C6240(Actor *this){
|
||||
func_802C5FF8(this);
|
||||
if( func_8032863C(this->animctrl, 0.65f, 0.99f) >= 2
|
||||
&& !func_80328A2C(this, 0.0f, -1, 0.45f)
|
||||
&& func_80328BD4(this, 2, 0.0f, -1, 0.58f)
|
||||
&& subaddie_maybe_set_state_position_direction(this, 2, 0.0f, -1, 0.58f)
|
||||
){
|
||||
func_80328CEC(this, (s32)this->yaw, 10, 45);
|
||||
func_802C5E80(this);
|
||||
@@ -165,11 +165,11 @@ void func_802C6240(Actor *this){
|
||||
func_80328CEC(this, (s32)this->yaw_ideal, 10, 20);
|
||||
|
||||
if(!(func_8023DB5C() & 0x7))
|
||||
func_80328BD4(this, 1, 0.16f, 1, 0.02f);
|
||||
subaddie_maybe_set_state_position_direction(this, 1, 0.16f, 1, 0.02f);
|
||||
|
||||
if( !(func_8023DB5C() & 0xf)
|
||||
&& func_80329078(this, (s32)this->yaw_ideal, 150)
|
||||
&& func_80328B38(this, 3, 0.13f)
|
||||
&& subaddie_maybe_set_state(this, 3, 0.13f)
|
||||
){
|
||||
this->unk28 = randf2(7.1f, 8.4f);
|
||||
}
|
||||
@@ -181,17 +181,17 @@ void func_802C6240(Actor *this){
|
||||
this->yaw_ideal = func_80329784(this);
|
||||
func_80328FB0(this, 4.0f);
|
||||
if(func_80329480(this))
|
||||
func_80328A84(this, 6);
|
||||
subaddie_set_state(this, 6);
|
||||
break;
|
||||
|
||||
case 0x3: //L802C6620
|
||||
func_80328FB0(this, 3.0f);
|
||||
if(! func_80329030(this, 0) && func_80329480(this)){
|
||||
func_80328CEC(this, (s32)this->yaw, 120, 180);
|
||||
func_80328A84(this, 2);
|
||||
subaddie_set_state(this, 2);
|
||||
func_802C5E80(this);
|
||||
}
|
||||
if(!(func_8023DB5C() & 0xf) && func_80328B38(this, 2, 0.08f))
|
||||
if(!(func_8023DB5C() & 0xf) && subaddie_maybe_set_state(this, 2, 0.08f))
|
||||
func_802C5E80(this);
|
||||
func_802C5EB8(this);
|
||||
break;
|
||||
@@ -200,7 +200,7 @@ void func_802C6240(Actor *this){
|
||||
animctrl_setDuration(this->animctrl, D_80366010[6].duration - (3 - this->unk10_12)*0.1085);
|
||||
this->yaw_ideal = (f32)func_80329784(this);
|
||||
if(!func_803294B4(this, 0x21)){
|
||||
func_80328A84(this, 8);
|
||||
subaddie_set_state(this, 8);
|
||||
}
|
||||
func_802C5F44(this);
|
||||
if(actor_animationIsAt(this, 0.35f) && func_8028EE84() != BSWATERGROUP_2_UNDERWATER){
|
||||
@@ -211,7 +211,7 @@ void func_802C6240(Actor *this){
|
||||
func_802C5F94(this);
|
||||
|
||||
if(this->unk10_12 == 0 || (this->unk10_12 < 3 && func_80329530(this, 300))){
|
||||
func_80328A84(this, 9);
|
||||
subaddie_set_state(this, 9);
|
||||
this->unk28 = 13.0f;
|
||||
}
|
||||
break;
|
||||
@@ -232,7 +232,7 @@ void func_802C6240(Actor *this){
|
||||
if(func_80329530(this, 320)){
|
||||
if(func_80329078(this, (s32)this->yaw_ideal,200)){
|
||||
animctrl_setPlaybackType(this->animctrl, ANIMCTRL_ONCE);
|
||||
func_80328A84(this, 4);
|
||||
subaddie_set_state(this, 4);
|
||||
this->unk28 += 5.7;
|
||||
tmp_a0 = this->unk44_31;
|
||||
if(this->unk44_31 == 0){
|
||||
@@ -261,7 +261,7 @@ void func_802C6240(Actor *this){
|
||||
func_80329878(this, func_80329530(this, 250)? 0.8: 1.2);
|
||||
if(0.0f == this->unk28){
|
||||
animctrl_setPlaybackType(this->animctrl, ANIMCTRL_LOOP);
|
||||
func_80328B8C(this, 1, 0.65f, 1);
|
||||
subaddie_set_state_with_direction(this, 1, 0.65f, 1);
|
||||
func_8030DA44(this->unk44_31);
|
||||
this->unk44_31 = 0;
|
||||
func_8030E484(SFX_19_BANJO_LANDING_08);
|
||||
@@ -282,7 +282,7 @@ void func_802C6240(Actor *this){
|
||||
case 0xc: //L802C6BDC
|
||||
actor_playAnimationOnce(this);
|
||||
if(actor_animationIsAt(this, 0.95f)){
|
||||
func_80328B8C(this, 1, 0.65f, 1);
|
||||
subaddie_set_state_with_direction(this, 1, 0.65f, 1);
|
||||
actor_loopAnimation(this);
|
||||
}
|
||||
break;
|
||||
@@ -290,7 +290,7 @@ void func_802C6240(Actor *this){
|
||||
case 0xd: //L802C6C28
|
||||
actor_playAnimationOnce(this);
|
||||
if(actor_animationIsAt(this, 0.95f)){
|
||||
func_80328B8C(this, 0xe, 0.99f, 1);
|
||||
subaddie_set_state_with_direction(this, 0xe, 0.99f, 1);
|
||||
this->unk60 = 4.0f;
|
||||
}
|
||||
break;
|
||||
@@ -300,7 +300,7 @@ void func_802C6240(Actor *this){
|
||||
this->unk60 -= time_getDelta();
|
||||
if(this->unk60 <= 0.0f){
|
||||
this->unk166 = 0x63;
|
||||
func_80328AC8(this, 0xF);
|
||||
subaddie_set_state_forward(this, 0xF);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -308,7 +308,7 @@ void func_802C6240(Actor *this){
|
||||
case 0xf: //L802C6CD4
|
||||
actor_playAnimationOnce(this);
|
||||
if(actor_animationIsAt(this, 0.95f)){
|
||||
func_80328B8C(this, 1, 0.65f, 1);
|
||||
subaddie_set_state_with_direction(this, 1, 0.65f, 1);
|
||||
actor_loopAnimation(this);
|
||||
}
|
||||
break;
|
||||
|
@@ -13,6 +13,10 @@ BKAnimationList *model_getAnimationList(BKModelBin *arg0);
|
||||
extern void func_8034BB08(s32);
|
||||
extern void func_803458E4(f32[4], f32[4], f32[4], f32);
|
||||
|
||||
#define CH_BOTTLES_BONUS_PUZZLE_HEIGHT (4)
|
||||
#define CH_BOTTLES_BONUS_PUZZLE_WIDTH (5)
|
||||
#define CH_BOTTLES_BONUS_PUZZLE_PIECE_COUNT (CH_BOTTLES_BONUS_PUZZLE_HEIGHT * CH_BOTTLES_BONUS_PUZZLE_WIDTH)
|
||||
|
||||
/* .extern symbols??? */
|
||||
extern u8 D_8037DCC0[7];
|
||||
extern u8 D_8037DCC7;
|
||||
@@ -46,7 +50,7 @@ typedef struct{
|
||||
|
||||
extern void item_set(enum item_e, s32);
|
||||
extern void actor_postdrawMethod(ActorMarker *);
|
||||
extern void func_8024CE60(f32, f32);
|
||||
extern void viewport_set_near_far(f32, f32);
|
||||
|
||||
Actor *chBottlesBonus_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void chBottlesBonus_update(Actor *this);
|
||||
@@ -74,7 +78,7 @@ ActorAnimationInfo chBottlesBonusAnimations[] ={
|
||||
|
||||
f32 D_80368250 = 0.999388993f;
|
||||
|
||||
s32 D_80368254[20] = {
|
||||
s32 D_80368254[CH_BOTTLES_BONUS_PUZZLE_PIECE_COUNT] = {
|
||||
0x3C, 0x3D, 0x3F, 0x40,
|
||||
0x42, 0x41, 0x43, 0x3A,
|
||||
0x32, 0x30, 0x2E, 0x3E,
|
||||
@@ -106,37 +110,37 @@ Struct_core2_560F0_1 *D_8037DEB8;
|
||||
Struct_core2_560F0_1 *D_8037DEBC;
|
||||
Struct_core2_560F0_1 *D_8037DEC0;
|
||||
Struct_core2_560F0_1 *D_8037DEC4;
|
||||
f32 D_8037DEC8[20];
|
||||
f32 D_8037DF18[20];
|
||||
f32 D_8037DEC8[CH_BOTTLES_BONUS_PUZZLE_PIECE_COUNT];
|
||||
f32 D_8037DF18[CH_BOTTLES_BONUS_PUZZLE_PIECE_COUNT];
|
||||
s32 chBottleBonusPuzzleIndex;
|
||||
f32 D_8037DF70[3];
|
||||
f32 D_8037DF80[3];
|
||||
s32 D_8037DF90[20];
|
||||
s32 D_8037DF90[CH_BOTTLES_BONUS_PUZZLE_PIECE_COUNT];
|
||||
|
||||
/* .code */
|
||||
void chBottlesBonus_func_802DD080(Gfx **gfx, Mtx **mtx) {
|
||||
f32 sp24[3];
|
||||
f32 sp18[3];
|
||||
f32 vp_position[3];
|
||||
f32 vp_rotation[3];
|
||||
|
||||
func_8024E258();
|
||||
func_8024CE60(50.0f, 2000.0f);
|
||||
viewport_set_near_far(50.0f, 2000.0f);
|
||||
if (getGameMode() == GAME_MODE_A_SNS_PICTURE) {
|
||||
sp18[0] = 0.0f;
|
||||
sp18[1] = 0.0f;
|
||||
sp18[2] = 0.0f;
|
||||
sp24[0] = 0.0f;
|
||||
sp24[1] = 0.0f;
|
||||
sp24[2] = 400.0f;
|
||||
vp_rotation[0] = 0.0f;
|
||||
vp_rotation[1] = 0.0f;
|
||||
vp_rotation[2] = 0.0f;
|
||||
vp_position[0] = 0.0f;
|
||||
vp_position[1] = 0.0f;
|
||||
vp_position[2] = 400.0f;
|
||||
} else {
|
||||
sp24[0] = 248.4125;
|
||||
sp24[1] = 328.9;
|
||||
sp24[2] = -186.4;
|
||||
sp18[0] = 0.0f;
|
||||
sp18[1] = 270.0f;
|
||||
sp18[2] = 0.0f;
|
||||
vp_position[0] = 248.4125;
|
||||
vp_position[1] = 328.9;
|
||||
vp_position[2] = -186.4;
|
||||
vp_rotation[0] = 0.0f;
|
||||
vp_rotation[1] = 270.0f;
|
||||
vp_rotation[2] = 0.0f;
|
||||
}
|
||||
viewport_setPosition(sp24);
|
||||
viewport_setRotation(sp18);
|
||||
viewport_set_position_vec3f(vp_position);
|
||||
viewport_set_rotation_vec3f(vp_rotation);
|
||||
viewport_update();
|
||||
func_8024C904(gfx, mtx);
|
||||
}
|
||||
@@ -153,7 +157,7 @@ Actor *chBottlesBonus_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx)
|
||||
void *sp50;
|
||||
|
||||
sp6C = marker_getActor(marker);
|
||||
sp50 = func_8030C704();
|
||||
sp50 = func_8030C704(); //grabs frame as texture?
|
||||
if ((sp50 == NULL) || (getGameMode() != GAME_MODE_8_BOTTLES_BONUS))
|
||||
return sp6C;
|
||||
|
||||
@@ -287,18 +291,18 @@ void chBottlesBonus_func_802DD8AC(BoneTransformList *arg0, s32 arg1) {
|
||||
spD0 = func_8033DDB8();
|
||||
if (D_8037DEB0 == 0) {
|
||||
D_8037DEB0 = 1;
|
||||
for(i = 0; i < 20; i++){
|
||||
for(i = 0; i < CH_BOTTLES_BONUS_PUZZLE_PIECE_COUNT; i++){
|
||||
func_8033A57C(arg0, D_80368254[i], D_8037DEC4[i].unkC);
|
||||
boneTransformList_getBoneScale(arg0, D_80368254[i], D_8037DEC4[i].unk1C);
|
||||
chBottlesBonus_func_802DD778(arg0, i, D_8037DEC4[i].unk0);
|
||||
chBottlesBonusCursor_func_802DF460(i + 20, chBottlesBonusMarker, D_8037DEC4[i].unk0);
|
||||
chBottlesBonusCursor_func_802DF460(i + CH_BOTTLES_BONUS_PUZZLE_PIECE_COUNT, chBottlesBonusMarker, D_8037DEC4[i].unk0);
|
||||
}
|
||||
}
|
||||
|
||||
if((actor->state == 4 || actor->state == 5)){
|
||||
if (D_8037DEB4 == 0) {
|
||||
D_8037DEB4 = 1;
|
||||
for(i = 0; i < 20; i++){
|
||||
for(i = 0; i < CH_BOTTLES_BONUS_PUZZLE_PIECE_COUNT; i++){
|
||||
func_8033A57C(arg0, D_80368254[i], D_8037DEB8[i].unkC);
|
||||
boneTransformList_getBoneScale(arg0, D_80368254[i], D_8037DEB8[i].unk1C);
|
||||
chBottlesBonus_func_802DD778(arg0, i, D_8037DEB8[i].unk0);
|
||||
@@ -315,7 +319,7 @@ void chBottlesBonus_func_802DD8AC(BoneTransformList *arg0, s32 arg1) {
|
||||
}
|
||||
}
|
||||
|
||||
for(i = 0; i < 20; i++){
|
||||
for(i = 0; i < CH_BOTTLES_BONUS_PUZZLE_PIECE_COUNT; i++){
|
||||
spD8[0] = 1.0f;
|
||||
spD8[1] = 1.0f;
|
||||
spD8[2] = 1.0f;
|
||||
@@ -466,18 +470,18 @@ void chBottlesBonus_update(Actor *this) {
|
||||
func_8034CF74(local, 0, D_8037DEAC, 0xF0);
|
||||
}
|
||||
func_8028746C(this->animctrl, chBottlesBonus_func_802DD8AC);
|
||||
for(phi_s0 = 0; phi_s0 < 0x14; phi_s0++){
|
||||
for(phi_s0 = 0; phi_s0 < CH_BOTTLES_BONUS_PUZZLE_PIECE_COUNT; phi_s0++){
|
||||
func_8034DFB0(func_8034C2C4(this->marker, phi_s0 + 0x190), D_803682B4, D_803682A4, 0.0f);
|
||||
}
|
||||
D_8037DEB8 = (Struct_core2_560F0_1 *) malloc(0x14*sizeof(Struct_core2_560F0_1));
|
||||
D_8037DEBC = (Struct_core2_560F0_1 *) malloc(0x14*sizeof(Struct_core2_560F0_1));
|
||||
D_8037DEC0 = (Struct_core2_560F0_1 *) malloc(0x14*sizeof(Struct_core2_560F0_1));
|
||||
D_8037DEC4 = (Struct_core2_560F0_1 *) malloc(0x14*sizeof(Struct_core2_560F0_1));
|
||||
D_8037DEB8 = (Struct_core2_560F0_1 *) malloc(CH_BOTTLES_BONUS_PUZZLE_PIECE_COUNT*sizeof(Struct_core2_560F0_1));
|
||||
D_8037DEBC = (Struct_core2_560F0_1 *) malloc(CH_BOTTLES_BONUS_PUZZLE_PIECE_COUNT*sizeof(Struct_core2_560F0_1));
|
||||
D_8037DEC0 = (Struct_core2_560F0_1 *) malloc(CH_BOTTLES_BONUS_PUZZLE_PIECE_COUNT*sizeof(Struct_core2_560F0_1));
|
||||
D_8037DEC4 = (Struct_core2_560F0_1 *) malloc(CH_BOTTLES_BONUS_PUZZLE_PIECE_COUNT*sizeof(Struct_core2_560F0_1));
|
||||
}
|
||||
func_8034CF90(local, D_8037DEAC, 0xF0);
|
||||
sp48 = chBottlesBonusCursor_func_802E06B4() - 1;
|
||||
cursor_state = chBottlesBonusCursor_getState();
|
||||
for(phi_s0_2 = 0; phi_s0_2 < 0x14; phi_s0_2++){
|
||||
for(phi_s0_2 = 0; phi_s0_2 < CH_BOTTLES_BONUS_PUZZLE_PIECE_COUNT; phi_s0_2++){
|
||||
sp40 = D_8037DF90[phi_s0_2];
|
||||
temp_v0_2 = func_8034C2C4(this->marker, phi_s0_2 + 0x190);
|
||||
if ((phi_s0_2 == sp48) && (cursor_state == 1) && !chBottlesBonusCursor_func_802E0538(phi_s0_2)) {
|
||||
@@ -501,12 +505,12 @@ void chBottlesBonus_update(Actor *this) {
|
||||
this->unk60 += sp50;
|
||||
switch(this->state){
|
||||
case 1:
|
||||
if ((this->unk60 > 2.0) && gctransition_8030BD98()) {
|
||||
if ((this->unk60 > 2.0) && gctransition_done()) {
|
||||
this->unk60 = 0.0f;
|
||||
func_8025A6EC(COMUSIC_98_BBONUS_PIECES_SHUFFLE, -1);
|
||||
comusic_8025AB44(COMUSIC_95_BBONUS_A, 0, 2000);
|
||||
func_8025AABC(COMUSIC_95_BBONUS_A);
|
||||
func_80328B8C(this, 2, 0.0f, 1);
|
||||
subaddie_set_state_with_direction(this, 2, 0.0f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
}
|
||||
break;
|
||||
@@ -535,7 +539,7 @@ void chBottlesBonus_update(Actor *this) {
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
case 5: //lose
|
||||
break;
|
||||
}//L802DE9A0
|
||||
}
|
||||
@@ -550,7 +554,7 @@ void __chBottlesBonus_spawn(void){
|
||||
}
|
||||
}
|
||||
|
||||
void chBottlesBonus_Spawn(s32 arg0, s32 arg1){
|
||||
void chBottlesBonus_spawn(s32 arg0, s32 arg1){
|
||||
if(chBottlesBonusMarker == NULL){
|
||||
__spawnQueue_add_0(__chBottlesBonus_spawn);
|
||||
}
|
||||
@@ -579,7 +583,7 @@ s32 chBottlesBonus_getState(void){
|
||||
return actor->state;
|
||||
}
|
||||
|
||||
f32 *chBottlesBonus_func_802DEAF8(s32 arg0){
|
||||
f32 *chBottlesBonus_get_piece_distance_vec4f(s32 arg0){ //returns distance vector of puzzle piece id
|
||||
return D_8037DEBC[arg0].unkC;
|
||||
}
|
||||
|
||||
|
@@ -7,7 +7,7 @@
|
||||
#endif
|
||||
|
||||
extern s16 D_803A5D00[2][0xF660]; //framebuffer
|
||||
extern u8 D_8037DCC8[]; //bottels bonus flags???
|
||||
extern u8 D_8037DCC8; //bottles bonus flags???
|
||||
|
||||
|
||||
extern void ml_vec3f_assign(f32[3], f32, f32, f32);
|
||||
@@ -60,10 +60,9 @@ ActorInfo D_80368418 = {
|
||||
};
|
||||
|
||||
/* .bss */
|
||||
ActorMarker *chBottlesBonusSursorMarker;
|
||||
f32 D_8037E068[20][2];
|
||||
Struct_core2_584D0_0 D_8037E248[20];
|
||||
u8 pad_8037E478[0x140];
|
||||
ActorMarker *chBottlesBonusCursorMarker;
|
||||
f32 D_8037E068[60][2];
|
||||
Struct_core2_584D0_0 D_8037E248[20]; //puzzle pieces
|
||||
s32 D_8037E5B8;
|
||||
struct {
|
||||
s32 unk0;
|
||||
@@ -124,7 +123,7 @@ bool chBottlesBonusCursor_checkPuzzleCompletion(void) {
|
||||
for(i = 0; i < 20 && D_8037E5C0.is_completed != 0; i++){
|
||||
if((D_8037E248[i].state != 3)
|
||||
|| (i != D_8037E248[i].piece_id)
|
||||
|| !vec4f_isAlmostZero(chBottlesBonus_func_802DEAF8(i))
|
||||
|| !vec4f_isAlmostZero(chBottlesBonus_get_piece_distance_vec4f(i))
|
||||
) {
|
||||
D_8037E5C0.is_completed = FALSE;
|
||||
}
|
||||
@@ -132,10 +131,10 @@ bool chBottlesBonusCursor_checkPuzzleCompletion(void) {
|
||||
|
||||
if (D_8037E5C0.is_completed) {
|
||||
item_set(ITEM_6_HOURGLASS, FALSE);
|
||||
timedFunc_set_3(0.25f, comusic_8025AB44, COMUSIC_94_BBONUS, 0, 2000);
|
||||
timedFunc_set_2(0.3f, func_8025A6EC, COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 22000);
|
||||
timedFunc_set_0(1.5f, chBottlesBonusCursor_func_802DF99C);
|
||||
timedFunc_set_0(1.0f, chBottlesBonus_completedPuzzle);
|
||||
timedFunc_set_3(0.25f, (GenFunction_3)comusic_8025AB44, COMUSIC_94_BBONUS, 0, 2000);
|
||||
timedFunc_set_2(0.3f, (GenFunction_2)func_8025A6EC, COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 22000);
|
||||
timedFunc_set_0(1.5f, (GenFunction_0)chBottlesBonusCursor_func_802DF99C);
|
||||
timedFunc_set_0(1.0f, (GenFunction_0)chBottlesBonus_completedPuzzle);
|
||||
}
|
||||
return D_8037E5C0.is_completed;
|
||||
}
|
||||
@@ -145,9 +144,9 @@ void chBottlesBonusCursor_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx) {
|
||||
Actor *this;
|
||||
f32 sp3C;
|
||||
|
||||
this = marker_getActorAndRotation(chBottlesBonusSursorMarker, &rotation);
|
||||
this = marker_getActorAndRotation(chBottlesBonusCursorMarker, rotation);
|
||||
modelRender_preDraw((GenFunction_1)actor_predrawMethod, (s32)this);
|
||||
modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)chBottlesBonusSursorMarker);
|
||||
modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)chBottlesBonusCursorMarker);
|
||||
modelRender_setDepthMode(MODEL_RENDER_DEPTH_FULL);
|
||||
actor_setOpacity(this, 0xB9);
|
||||
func_8024E030(this->position, D_8037E5C0.unk18);
|
||||
@@ -157,7 +156,7 @@ void chBottlesBonusCursor_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx) {
|
||||
(s32)sp3C, (s32)sp3C,
|
||||
D_803A5D00[func_8024BDA0()]
|
||||
);
|
||||
modelRender_draw(gfx, mtx, this->position, rotation, this->scale, NULL, func_80330B1C(chBottlesBonusSursorMarker));
|
||||
modelRender_draw(gfx, mtx, this->position, rotation, this->scale, NULL, func_80330B1C(chBottlesBonusCursorMarker));
|
||||
func_8024E030(this->position, D_8037E5C0.unk10);
|
||||
if (this->state == 1) {
|
||||
D_8037E5C0.unk10[0] -= 24.0f;
|
||||
@@ -170,8 +169,8 @@ void chBottlesBonusCursor_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx) {
|
||||
|
||||
ActorMarker *chBottlesBonusCursor_spawn(void){
|
||||
Actor *this = func_8032813C(0x2B4, D_80368400, 0);
|
||||
chBottlesBonusSursorMarker = this->marker;
|
||||
return chBottlesBonusSursorMarker;
|
||||
chBottlesBonusCursorMarker = this->marker;
|
||||
return chBottlesBonusCursorMarker;
|
||||
}
|
||||
|
||||
void chBottlesBonusCursor_func_802DF928(s32 indx) {
|
||||
@@ -197,7 +196,7 @@ void chBottlesBonusCursor_freeMethod(Actor *this) {
|
||||
gameFile_load(func_8034BAFC());
|
||||
func_80347AA8();
|
||||
}
|
||||
chBottlesBonusSursorMarker = 0;
|
||||
chBottlesBonusCursorMarker = 0;
|
||||
}
|
||||
|
||||
void chBottlesBonusCursor_update(Actor *this) {
|
||||
@@ -225,8 +224,8 @@ void chBottlesBonusCursor_update(Actor *this) {
|
||||
D_8037E5B8 = -1;
|
||||
D_8037E5C0.prev_button = sp5C->button;
|
||||
D_8037E5C0.is_completed = 0;
|
||||
timedFunc_set_2(3.0f, func_8025A6EC, COMUSIC_94_BBONUS, 0x5DC0);
|
||||
timedFunc_set_1(3.0f, func_8025AABC, COMUSIC_94_BBONUS);
|
||||
timedFunc_set_2(3.0f, (GenFunction_2)func_8025A6EC, COMUSIC_94_BBONUS, 0x5DC0);
|
||||
timedFunc_set_1(3.0f, (GenFunction_1)func_8025AABC, COMUSIC_94_BBONUS);
|
||||
for(i = 0; i < 20; i++){
|
||||
bzero(&D_8037E248[i], sizeof(Struct_core2_584D0_0));
|
||||
D_8037E068[40 + i][0] = D_8037E068[40 + i][1] = 0.0f;
|
||||
@@ -275,7 +274,7 @@ void chBottlesBonusCursor_update(Actor *this) {
|
||||
chBottlesBonusCursor_func_802DF928(D_8037E5C0.unk0);
|
||||
chBottlesBonus_func_802DEA74(D_8037E5C0.unk0);
|
||||
func_8030E58C(SFX_12D_CAMERA_ZOOM_CLOSEST, 0.9f);
|
||||
func_80328B8C(this, 3, 0.0f, 1);
|
||||
subaddie_set_state_with_direction(this, 3, 0.0f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
}
|
||||
if((sp5C->button & R_CBUTTONS) && !(D_8037E5C0.prev_button & R_CBUTTONS)){
|
||||
@@ -283,7 +282,7 @@ void chBottlesBonusCursor_update(Actor *this) {
|
||||
chBottlesBonusCursor_func_802DF928(D_8037E5C0.unk0);
|
||||
chBottlesBonus_func_802DEA74(D_8037E5C0.unk0);
|
||||
func_8030E58C(SFX_12D_CAMERA_ZOOM_CLOSEST, 1.0f);
|
||||
func_80328B8C(this, 4, 0.0f, 1);
|
||||
subaddie_set_state_with_direction(this, 4, 0.0f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
}
|
||||
}
|
||||
@@ -303,7 +302,7 @@ void chBottlesBonusCursor_update(Actor *this) {
|
||||
chBottlesBonusCursor_func_802DF928(D_8037E5C0.unk0);
|
||||
chBottlesBonusCursor_func_802DF928(D_8037E5C0.unk0);
|
||||
func_8025A6EC(COMUSIC_96_BBONUS_PICKUP_PIECE, -1);
|
||||
func_80328B8C(this, 2, 0.0f, 1);
|
||||
subaddie_set_state_with_direction(this, 2, 0.0f, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -312,7 +311,7 @@ void chBottlesBonusCursor_update(Actor *this) {
|
||||
) {
|
||||
if (D_8037E248[D_8037E5B8 - 41].state == 3) {
|
||||
if( D_8037E5B8 - 41 != D_8037E248[D_8037E5B8 - 41].piece_id
|
||||
|| !vec4f_isAlmostZero(chBottlesBonus_func_802DEAF8(D_8037E5B8 - 41))
|
||||
|| !vec4f_isAlmostZero(chBottlesBonus_get_piece_distance_vec4f(D_8037E5B8 - 41))
|
||||
) {
|
||||
D_8037E5C0.unk0 = D_8037E5B8 - 41;
|
||||
chBottlesBonus_func_802DEA50(D_8037E5C0.unk0);
|
||||
@@ -320,7 +319,7 @@ void chBottlesBonusCursor_update(Actor *this) {
|
||||
held_piece->state = 2;
|
||||
chBottlesBonusCursor_func_802DF928(D_8037E5C0.unk0);
|
||||
func_8030E484(SFX_112_TINKER_ATTENTION);
|
||||
func_80328B8C(this, 2, 0.0f, 1);
|
||||
subaddie_set_state_with_direction(this, 2, 0.0f, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -330,7 +329,7 @@ void chBottlesBonusCursor_update(Actor *this) {
|
||||
case 2://L802E029C
|
||||
if((sp5C->button & B_BUTTON) && !(D_8037E5C0.prev_button & B_BUTTON)){
|
||||
held_piece->state = 0;
|
||||
func_80328B8C(this, 5, 0.0f, 1);
|
||||
subaddie_set_state_with_direction(this, 5, 0.0f, 1);
|
||||
func_8025A6EC(COMUISC_97_BBONUS_DROP_PIECE, -1);
|
||||
chBottlesBonus_func_802DEA50(D_8037E5C0.unk0);
|
||||
D_8037E5C0.unk0 = -1;
|
||||
@@ -341,64 +340,71 @@ void chBottlesBonusCursor_update(Actor *this) {
|
||||
if ((D_8037E5B8 >= 21) && (D_8037E5B8 < 41)) {
|
||||
held_piece->state = 3;
|
||||
held_piece->piece_id = D_8037E5B8 - 21;
|
||||
if ((D_8037E5C0.unk0 == held_piece->piece_id) && vec4f_isAlmostZero(chBottlesBonus_func_802DEAF8(D_8037E5C0.unk0))) {
|
||||
if ((D_8037E5C0.unk0 == held_piece->piece_id) && vec4f_isAlmostZero(chBottlesBonus_get_piece_distance_vec4f(D_8037E5C0.unk0))) {
|
||||
//placed correctly
|
||||
sp44 = COMUSIC_2B_DING_B;
|
||||
func_80328B8C(this, 6, 0.0f, 1);
|
||||
subaddie_set_state_with_direction(this, 6, 0.0f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
} else {
|
||||
//placed incorrectly
|
||||
sp44 = COMUSIC_2C_BUZZER;
|
||||
func_80328B8C(this, 1, 0.0f, 1);
|
||||
subaddie_set_state_with_direction(this, 1, 0.0f, 1);
|
||||
}
|
||||
|
||||
if (chBottlesBonusCursor_checkPuzzleCompletion()) {
|
||||
func_80328B8C(this, 8, 0.0f, 1);
|
||||
subaddie_set_state_with_direction(this, 8, 0.0f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
}
|
||||
|
||||
timedFunc_set_2(0.25f, func_8025A6EC, sp44, 26000);
|
||||
timedFunc_set_2(0.25f, (GenFunction_2)func_8025A6EC, sp44, 26000);
|
||||
chBottlesBonus_func_802DEA50(D_8037E5C0.unk0);
|
||||
D_8037E5C0.unk0 = -1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
//rotate CCW
|
||||
case 3://L802E0420
|
||||
if (animctrl_isStopped(this->animctrl) ) {
|
||||
func_80328B8C(this, 2, 0.0f, 1);
|
||||
subaddie_set_state_with_direction(this, 2, 0.0f, 1);
|
||||
actor_loopAnimation(this);
|
||||
}
|
||||
break;
|
||||
|
||||
//rotate CW
|
||||
case 4://L802E0450
|
||||
if (animctrl_isStopped(this->animctrl) ) {
|
||||
func_80328B8C(this, 2, 0.0f, 1);
|
||||
subaddie_set_state_with_direction(this, 2, 0.0f, 1);
|
||||
actor_loopAnimation(this);
|
||||
}
|
||||
break;
|
||||
|
||||
case 7://L802E0480
|
||||
if (animctrl_isStopped(this->animctrl) ) {
|
||||
func_80328B8C(this, 2, 0.0f, 1);
|
||||
subaddie_set_state_with_direction(this, 2, 0.0f, 1);
|
||||
actor_loopAnimation(this);
|
||||
}
|
||||
break;
|
||||
|
||||
case 5://L802E04B0
|
||||
func_80328B8C(this, 1, 0.0f, 1);
|
||||
subaddie_set_state_with_direction(this, 1, 0.0f, 1);
|
||||
break;
|
||||
|
||||
//placing correct piece
|
||||
case 6://L802E04CC
|
||||
if (actor_animationIsAt(this, 0.5f) != 0) {
|
||||
FUNC_8030E624(SFX_6C_LOCKUP_CLOSING, 1.0f, 24000);
|
||||
}
|
||||
if (animctrl_isStopped(this->animctrl) != 0) {
|
||||
func_80328B8C(this, 1, 0.0f, 1);
|
||||
subaddie_set_state_with_direction(this, 1, 0.0f, 1);
|
||||
actor_loopAnimation(this);
|
||||
}
|
||||
break;
|
||||
|
||||
//puzzle complete
|
||||
case 8://L802E0510
|
||||
break;
|
||||
|
||||
case 9://L802E0510
|
||||
break;
|
||||
}
|
||||
@@ -413,7 +419,7 @@ s32 chBottlesBonusCursor_func_802E0538(s32 indx){
|
||||
s32 chBottlesBonusCursor_getState(void){
|
||||
Actor *this;
|
||||
|
||||
this = marker_getActor(chBottlesBonusSursorMarker);
|
||||
this = marker_getActor(chBottlesBonusCursorMarker);
|
||||
return this->state;
|
||||
}
|
||||
|
||||
@@ -423,13 +429,13 @@ s32 chBottlesBonusCursor_func_802E0588(s32 indx){
|
||||
|
||||
f32 *chBottlesBonusCursor_func_802E05AC(s32 indx) {
|
||||
if (indx == D_8037E5C0.unk0) {
|
||||
D_8037E5F8[0] = D_8036840C[0] + marker_getActor(chBottlesBonusSursorMarker)->position[0];
|
||||
D_8037E5F8[1] = D_8036840C[1] + marker_getActor(chBottlesBonusSursorMarker)->position[1];
|
||||
D_8037E5F8[2] = D_8036840C[2] + marker_getActor(chBottlesBonusSursorMarker)->position[2];
|
||||
D_8037E5F8[0] = D_8036840C[0] + marker_getActor(chBottlesBonusCursorMarker)->position[0];
|
||||
D_8037E5F8[1] = D_8036840C[1] + marker_getActor(chBottlesBonusCursorMarker)->position[1];
|
||||
D_8037E5F8[2] = D_8036840C[2] + marker_getActor(chBottlesBonusCursorMarker)->position[2];
|
||||
} else {
|
||||
ml_vec3f_assign(&D_8037E5F8, 0, 0, 0);
|
||||
ml_vec3f_assign(D_8037E5F8, 0, 0, 0);
|
||||
}
|
||||
return &D_8037E5F8;
|
||||
return D_8037E5F8;
|
||||
}
|
||||
|
||||
f32 *chBottlesBonusCursor_func_802E0664(s32 indx){
|
||||
@@ -451,7 +457,7 @@ bool chBottlesBonusCursor_isPuzzleCompleted(void){
|
||||
void chBottlesBonusCursor_lose(void){
|
||||
Actor *this;
|
||||
|
||||
this = marker_getActor(chBottlesBonusSursorMarker);
|
||||
func_80328B8C(this, 9, 0.0f, 1);
|
||||
this = marker_getActor(chBottlesBonusCursorMarker);
|
||||
subaddie_set_state_with_direction(this, 9, 0.0f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
}
|
||||
|
@@ -68,7 +68,7 @@ void func_802D77D4(Actor *this) {
|
||||
case 1:
|
||||
func_802D76E0(this, sp30);
|
||||
ml_vec3f_copy(local->unk0, sp30);
|
||||
func_80328A84(this, 2);
|
||||
subaddie_set_state(this, 2);
|
||||
return;
|
||||
|
||||
case 2:
|
||||
|
@@ -88,11 +88,11 @@ void func_802CDAC4(Actor *this){
|
||||
f32 sp1C[3];
|
||||
|
||||
camera_setType(1);
|
||||
viewport_setPosition(this->position);
|
||||
viewport_set_position_vec3f(this->position);
|
||||
sp1C[0] = this->pitch;
|
||||
sp1C[1] = this->yaw;
|
||||
sp1C[2] = 0.0f;
|
||||
viewport_setRotation(sp1C);
|
||||
viewport_set_rotation_vec3f(sp1C);
|
||||
}
|
||||
|
||||
void func_802CDB18(Actor *this){
|
||||
|
@@ -47,7 +47,7 @@ void chCollectible_setState(Actor *arg0, s32 next_state){
|
||||
actor_collisionOn(arg0);
|
||||
break;
|
||||
}
|
||||
func_80328A84(arg0, next_state);
|
||||
subaddie_set_state(arg0, next_state);
|
||||
}
|
||||
|
||||
void func_802D8C98(Actor *this, s32 arg1) {
|
||||
|
@@ -50,14 +50,14 @@ void __chCrab_802CB078(Actor *this) {
|
||||
&& ( (this->modelCacheIndex == ACTOR_F2_BLACK_SNIPPET) || func_803292E0(this))
|
||||
) {
|
||||
this->unk28 = 0.0f;
|
||||
func_80328A84(this, 3U);
|
||||
subaddie_set_state(this, 3U);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void __chCrab_802CB140(Actor *this) {
|
||||
func_80328A84(this, 2U);
|
||||
subaddie_set_state(this, 2U);
|
||||
__chCrab_802CB040(this);
|
||||
func_80328CEC(this, (s32) this->yaw_ideal, 135, 175);
|
||||
this->unk38_31 = 150;
|
||||
@@ -70,7 +70,7 @@ void __chCrab_touch(ActorMarker *marker, ActorMarker *other){
|
||||
if ((this->state == 4) && func_803294F0(this, 80, func_80329784(this))) {
|
||||
FUNC_8030E8B4(SFX_1E_HITTING_AN_ENEMY_2, 1.0f, 28000, this->position, 950, 1900);
|
||||
__chCrab_802CB140(this);
|
||||
func_80328A84(this, 1);
|
||||
subaddie_set_state(this, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ void __chCrab_ow(ActorMarker *marker, ActorMarker *other) {
|
||||
|
||||
this = marker_getActor(marker);
|
||||
this->unk60 = 3.0f;
|
||||
func_80328A84(this, 6);
|
||||
subaddie_set_state(this, 6);
|
||||
actor_playAnimationOnce(this);
|
||||
if (marker->unk14_20 == MARKER_13_SNIPPET) {
|
||||
FUNC_8030E8B4(SFX_6E_VILE_EGH, 2.0f, 26000, this->position, 950, 1900);
|
||||
@@ -140,7 +140,7 @@ void __chCrab_spawn_mutant_crab_jiggy(void) {
|
||||
sp1C[0] = 13814.0f;
|
||||
sp1C[1] = 3812.0f;
|
||||
sp1C[2] = 0.0f;
|
||||
jiggySpawn(JIGGY_16_CC_SNIPPETS, sp1C);
|
||||
jiggy_spawn(JIGGY_16_CC_SNIPPETS, sp1C);
|
||||
}
|
||||
|
||||
void __chCrab_mutantTextCallback(ActorMarker *caller, enum asset_e text_id, s32 model_id){
|
||||
@@ -292,14 +292,14 @@ void chCrab_update(Actor *this) {
|
||||
}
|
||||
if (levelSpecificFlags_get(0xE)) {
|
||||
if ((this->state != 8) && (this->state != 9)) {
|
||||
func_80328B8C(this, (this->unk138_24) ? 8 : 9, 0.0f, 1);
|
||||
subaddie_set_state_with_direction(this, (this->unk138_24) ? 8 : 9, 0.0f, 1);
|
||||
this->unk138_24 = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
switch(this->state){
|
||||
case 1: //L802CBE30
|
||||
if (func_80328B38(this, 2, 0.03f)) {
|
||||
if (subaddie_maybe_set_state(this, 2, 0.03f)) {
|
||||
__chCrab_802CB040(this);
|
||||
}
|
||||
__chCrab_802CB078(this);
|
||||
@@ -307,7 +307,7 @@ void chCrab_update(Actor *this) {
|
||||
|
||||
case 9: //L802CBE6C
|
||||
if (!levelSpecificFlags_get(0xE)) {
|
||||
func_80328B8C(this, 3, 0.0f, 1);
|
||||
subaddie_set_state_with_direction(this, 3, 0.0f, 1);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -318,7 +318,7 @@ void chCrab_update(Actor *this) {
|
||||
) {
|
||||
func_80328CEC(this, (s32) this->yaw, 90, 150);
|
||||
}
|
||||
func_80328BD4(this, 1, 0.0f, 1, 0.0075f);
|
||||
subaddie_maybe_set_state_position_direction(this, 1, 0.0f, 1, 0.0075f);
|
||||
__chCrab_802CB078(this);
|
||||
break;
|
||||
|
||||
@@ -326,7 +326,7 @@ void chCrab_update(Actor *this) {
|
||||
this->yaw_ideal = (f32) func_80329784(this);
|
||||
func_80328FB0(this, 4.0f);
|
||||
if (func_80329480(this)) {
|
||||
func_80328A84(this, 4);
|
||||
subaddie_set_state(this, 4);
|
||||
this->unk28 = 12.0f;
|
||||
}
|
||||
break;
|
||||
@@ -335,10 +335,10 @@ void chCrab_update(Actor *this) {
|
||||
this->yaw_ideal = func_80329784(this) + 90.0;
|
||||
func_80328FB0(this, 4.0f);
|
||||
if (func_80329480(this)) {
|
||||
func_80328A84(this, 9);
|
||||
subaddie_set_state(this, 9);
|
||||
this->unk28 = 12.0f;
|
||||
} else if (!levelSpecificFlags_get(0xE)) {
|
||||
func_80328B8C(this, 3, 0.0f, 1);
|
||||
subaddie_set_state_with_direction(this, 3, 0.0f, 1);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -355,7 +355,7 @@ void chCrab_update(Actor *this) {
|
||||
case 5: //L802CC0AC
|
||||
this->unk60 = MAX(0.0, this->unk60 - sp30);
|
||||
if (this->unk60 == 0.0f) {
|
||||
func_80328A84(this, 7);
|
||||
subaddie_set_state(this, 7);
|
||||
actor_playAnimationOnce(this);
|
||||
if (this->marker->unk14_20 == 0x16B) {
|
||||
this->marker->unk14_20 = MARKER_13_SNIPPET;
|
||||
@@ -371,7 +371,7 @@ void chCrab_update(Actor *this) {
|
||||
if (this->unk60 == 0.0f) {
|
||||
func_80326310(this);
|
||||
} else {
|
||||
func_80328A84(this, 5);
|
||||
subaddie_set_state(this, 5);
|
||||
actor_loopAnimation(this);
|
||||
}
|
||||
}
|
||||
@@ -379,7 +379,7 @@ void chCrab_update(Actor *this) {
|
||||
|
||||
case 7: //L802CC1E8
|
||||
if (animctrl_isStopped(this->animctrl)) {
|
||||
func_80328A84(this, 1);
|
||||
subaddie_set_state(this, 1);
|
||||
actor_loopAnimation(this);
|
||||
}
|
||||
break;
|
||||
|
@@ -4,13 +4,15 @@
|
||||
|
||||
#include "core2/modelRender.h"
|
||||
|
||||
#include "../gc/zoombox.h"
|
||||
#include "../code_C9E70.h"
|
||||
|
||||
#ifndef ABS
|
||||
#define ABS(d) ((d) >= 0) ? (d) : -(d)
|
||||
#endif
|
||||
|
||||
void func_8031FBF8(void);
|
||||
void func_8031FBA0(void);
|
||||
void func_803184C8(gczoombox_t *, f32, s32, s32, f32, s32, s32);
|
||||
|
||||
Actor *func_802C4360(ActorMarker *, Gfx **, Mtx **, Vtx **);
|
||||
Actor *func_802C4464(ActorMarker *, Gfx **, Mtx **, Vtx **);
|
||||
@@ -77,10 +79,21 @@ ActorInfo D_80365F00 = { 0xE6, 0x197, 0x532, 0x1, D_80365ED0, func_802C4C14, fun
|
||||
|
||||
|
||||
/* .bss */
|
||||
// Remove this when this memory region is properly symbolized
|
||||
u8 unk_8037DCB0[0x8037DCE0 - 0x8037DCB0];
|
||||
|
||||
extern u8 D_8037DCCE[0x12];
|
||||
s32 D_8037DCB0;
|
||||
u32 D_8037DCB4;
|
||||
struct FF_StorageStruct* D_8037DCB8;
|
||||
s32 D_8037DCBC;
|
||||
u8 D_8037DCC0[7];
|
||||
u8 D_8037DCC7;
|
||||
u8 D_8037DCC8;
|
||||
u8 D_8037DCC9;
|
||||
u8 D_8037DCCA;
|
||||
u8 D_8037DCCB;
|
||||
u8 D_8037DCCC;
|
||||
u8 D_8037DCCD;
|
||||
u8 D_8037DCCE[3];
|
||||
s32 pad_8037DCD4;
|
||||
s32 pad_8037DCD8;
|
||||
|
||||
struct {
|
||||
u8 *unk0;
|
||||
@@ -88,8 +101,8 @@ struct {
|
||||
} D_8037DCE0;
|
||||
s32 D_8037DCE8;
|
||||
s32 D_8037DCEC;
|
||||
gczoombox_t *chGameSelectTopZoombox;
|
||||
gczoombox_t *chGameSelectBottomZoombox;
|
||||
GcZoombox *chGameSelectTopZoombox;
|
||||
GcZoombox *chGameSelectBottomZoombox;
|
||||
f32 D_8037DCF8[2][3];
|
||||
f32 D_8037DD10[2][3];
|
||||
s32 D_8037DD28;
|
||||
@@ -229,7 +242,7 @@ void func_802C4768(s32 gamenum){
|
||||
sp20[0] = D_8037DD48;\
|
||||
sp20[1] = D_8037DD68;
|
||||
func_8031877C(chGameSelectBottomZoombox);
|
||||
func_80318284(chGameSelectBottomZoombox, 2, sp20);
|
||||
gczoombox_setStrings(chGameSelectBottomZoombox, 2, sp20);
|
||||
gczoombox_maximize(chGameSelectBottomZoombox);
|
||||
gczoombox_resolve_minimize(chGameSelectBottomZoombox);
|
||||
}
|
||||
@@ -315,7 +328,7 @@ void func_802C4C14(Actor *this){
|
||||
func_802C7478(this);
|
||||
if(!sp80){
|
||||
if(this->state != 1){
|
||||
func_80328A84(this, 1);
|
||||
subaddie_set_state(this, 1);
|
||||
}
|
||||
}
|
||||
else{//L802C4D24
|
||||
@@ -373,7 +386,7 @@ void func_802C4C14(Actor *this){
|
||||
}
|
||||
}
|
||||
func_802C4768(sp84);
|
||||
func_80328A84(this, 2);
|
||||
subaddie_set_state(this, 2);
|
||||
break;
|
||||
case 5://L802C5040
|
||||
if(D_8037DD2C == 0 &&
|
||||
@@ -383,9 +396,9 @@ void func_802C4C14(Actor *this){
|
||||
func_802C4AC8(sp84);
|
||||
func_8025A6EC(COMUSIC_2B_DING_B, 22000);
|
||||
}
|
||||
func_80328A84(this, 2);
|
||||
subaddie_set_state(this, 2);
|
||||
func_8031877C(chGameSelectTopZoombox);
|
||||
func_80318284(chGameSelectTopZoombox, 2, &D_8037DCE0);
|
||||
gczoombox_setStrings(chGameSelectTopZoombox, 2, &D_8037DCE0);
|
||||
D_8037DD34 = 0.0f;
|
||||
}
|
||||
break;
|
||||
@@ -417,7 +430,7 @@ void func_802C4C14(Actor *this){
|
||||
func_8031877C(chGameSelectTopZoombox);
|
||||
func_803183A4(chGameSelectTopZoombox, (&D_80365DFC)[func_8031B5B0()]);
|
||||
D_8037DD2C = 1;
|
||||
func_80328A84(this, 5);
|
||||
subaddie_set_state(this, 5);
|
||||
}
|
||||
else{//L802C5240
|
||||
func_8025A6EC(COMUSIC_2C_BUZZER, 22000);
|
||||
@@ -445,16 +458,16 @@ void func_802C4C14(Actor *this){
|
||||
func_8030E540(SFX_8F_SNOWBALL_FLYING);
|
||||
break;
|
||||
}//L802C5394
|
||||
func_80328A84(this, 4);
|
||||
subaddie_set_state(this, 4);
|
||||
levelSpecificFlags_set(sp84 + 0x35, 1);
|
||||
}
|
||||
else{//L802C53B4
|
||||
func_8030E484(SFX_3EA_UNKNOWN);
|
||||
func_80328A84(this, 3);
|
||||
subaddie_set_state(this, 3);
|
||||
}
|
||||
}else{//L802C53D0
|
||||
func_8030E510(SFX_4F_BANJO_WAHOO, 28000);
|
||||
func_80328A84(this, 3);
|
||||
subaddie_set_state(this, 3);
|
||||
}//L802C53E8
|
||||
if(sp84 == 0)
|
||||
func_802C75A0(this, 2);
|
||||
@@ -511,7 +524,7 @@ void func_802C4C14(Actor *this){
|
||||
D_8037DD34 += sp50;
|
||||
if(20.0 < D_8037DD34){
|
||||
func_8031877C(chGameSelectTopZoombox);
|
||||
func_80318284(chGameSelectTopZoombox, 2, &D_8037DCE0);
|
||||
gczoombox_setStrings(chGameSelectTopZoombox, 2, &D_8037DCE0);
|
||||
D_8037DD34 = 0.0f;
|
||||
}
|
||||
}
|
||||
@@ -545,14 +558,14 @@ void func_802C5740(Actor * this){
|
||||
if(!this->initialized){
|
||||
gameFile_8033CE40();
|
||||
if(chGameSelectBottomZoombox == NULL){
|
||||
chGameSelectBottomZoombox = gczoombox_new(0xA0, TALK_PIC_C_BANJO_2, 2, 0, NULL);
|
||||
chGameSelectBottomZoombox = gczoombox_new(0xA0, ZOOMBOX_SPRITE_C_BANJO_2, 2, 0, NULL);
|
||||
gczoombox_open(chGameSelectBottomZoombox);
|
||||
func_803184C8(chGameSelectBottomZoombox, 30.0f, 5, 2, 0.4f, 0, 0);
|
||||
}//L802C57FC
|
||||
|
||||
if(chGameSelectTopZoombox == NULL){
|
||||
chGameSelectTopZoombox = gczoombox_new(0xA, TALK_PIC_D_KAZOOIE_1, 2, 1, func_802C44D0);
|
||||
func_80318284(chGameSelectTopZoombox, 2, &D_8037DCE0);
|
||||
chGameSelectTopZoombox = gczoombox_new(0xA, ZOOMBOX_SPRITE_D_KAZOOIE_1, 2, 1, func_802C44D0);
|
||||
gczoombox_setStrings(chGameSelectTopZoombox, 2, &D_8037DCE0);
|
||||
gczoombox_open(chGameSelectTopZoombox);
|
||||
gczoombox_maximize(chGameSelectTopZoombox);
|
||||
}//L802C5860
|
||||
|
@@ -76,7 +76,7 @@ void func_8035B1CC(ActorMarker *this_marker, ActorMarker *other_marker){
|
||||
sp30 = this->scale;
|
||||
func_8030E878(SFX_121_AWAWAU, 1.3f, 32000, this->position, this->scale*400.0f, this->scale*1800.0f);
|
||||
func_8030E878(SFX_30_MAGIC_POOF, 1.0f, 32000, this->position, this->scale*400.0f, this->scale*1800.0f);
|
||||
func_80328B8C(this, 6, 0.01f, 1);
|
||||
subaddie_set_state_with_direction(this, 6, 0.01f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
actor_collisionOff(this);
|
||||
func_80326310(this);
|
||||
@@ -88,7 +88,7 @@ void func_8035B2C4(ActorMarker *this_marker, ActorMarker *other_marker){
|
||||
f32 sp30 = this->scale;
|
||||
func_8030E878(SFX_121_AWAWAU, 1.3f, 32000, this->position, this->scale*400.0f, this->scale*1800.0f);
|
||||
func_8030E878(SFX_30_MAGIC_POOF, 1.0f, 32000, this->position, this->scale*400.0f, this->scale*1800.0f);
|
||||
func_80328B8C(this, 6, 0.01f, 1);
|
||||
subaddie_set_state_with_direction(this, 6, 0.01f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
actor_collisionOff(this);
|
||||
func_8035AFE0(sp30, this->position, 8, ASSET_700_SPRITE_DUST, D_80372C6C);
|
||||
@@ -160,21 +160,21 @@ void func_8035B56C(Actor *this){
|
||||
void func_8035B674(Actor *this){
|
||||
ActorLocal_Core2_D4050 *local = (ActorLocal_Core2_D4050 *)&this->local;
|
||||
|
||||
func_80328B8C(this, 1, 0.01f, 1);
|
||||
subaddie_set_state_with_direction(this, 1, 0.01f, 1);
|
||||
actor_loopAnimation(this);
|
||||
local->unk0 = randf2(1.0f, 4.5f);
|
||||
|
||||
}
|
||||
|
||||
void func_8035B6CC(Actor *this){
|
||||
func_80328B8C(this, 2, 0.01f, 1);
|
||||
subaddie_set_state_with_direction(this, 2, 0.01f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
this->unk28 = 1.0f;
|
||||
func_8030E878(0x3F4, randf2(1.0f, 1.2f), 32000, this->position, this->scale*400.0f, this->scale*1800.0f);
|
||||
}
|
||||
|
||||
void func_8035B75C(Actor *this){
|
||||
func_80328B8C(this, 3, 0.01f, 1);
|
||||
subaddie_set_state_with_direction(this, 3, 0.01f, 1);
|
||||
actor_loopAnimation(this);
|
||||
this->unk28 = func_803203FC(UNKFLAGS1_C1_IN_FINAL_CHARACTER_PARADE) ? 0.0 : 12.0;
|
||||
func_8030E878(0x3F4, randf2(1.0f, 1.2f), 32000, this->position, this->scale*400.0f, this->scale*1800.0f);
|
||||
@@ -183,7 +183,7 @@ void func_8035B75C(Actor *this){
|
||||
void func_8035B824(Actor *this){
|
||||
ActorLocal_Core2_D4050 *local = (ActorLocal_Core2_D4050 *)&this->local;
|
||||
|
||||
func_80328B8C(this, 4, 0.01f, 1);
|
||||
subaddie_set_state_with_direction(this, 4, 0.01f, 1);
|
||||
actor_loopAnimation(this);
|
||||
func_80328CEC(this, (s32)this->yaw_ideal, 0xA, 0x1E);
|
||||
this->unk28 = 4.0f;
|
||||
@@ -193,7 +193,7 @@ void func_8035B824(Actor *this){
|
||||
}
|
||||
|
||||
void func_8035B8A8(Actor *this){
|
||||
func_80328B8C(this, 5, 0.01f, 1);
|
||||
subaddie_set_state_with_direction(this, 5, 0.01f, 1);
|
||||
actor_loopAnimation(this);
|
||||
func_80328CEC(this, (s32)this->yaw_ideal, 0xE1, 0x87);
|
||||
}
|
||||
@@ -314,12 +314,12 @@ void func_8035BD48(Actor *this){
|
||||
marker_despawn(this->marker);
|
||||
}
|
||||
else{//L8035BE04
|
||||
func_80328B8C(this, 1, 0.01f, 1);
|
||||
subaddie_set_state_with_direction(this, 1, 0.01f, 1);
|
||||
actor_setOpacity(this, 0);
|
||||
}
|
||||
}
|
||||
else{//L8035BE2C
|
||||
func_80328B8C(this, 3, 0.01f, 1);
|
||||
subaddie_set_state_with_direction(this, 3, 0.01f, 1);
|
||||
actor_setOpacity(this, 0xff);
|
||||
}
|
||||
}//L8035BE50
|
||||
@@ -331,7 +331,7 @@ void func_8035BD48(Actor *this){
|
||||
marker_despawn(this->marker);
|
||||
}
|
||||
else if(mapSpecificFlags_getClear(3)){
|
||||
func_80328B8C(this, 3, 0.01f, 1);
|
||||
subaddie_set_state_with_direction(this, 3, 0.01f, 1);
|
||||
}
|
||||
break;
|
||||
case 3: //L8035BECC
|
||||
@@ -360,7 +360,7 @@ void func_8035BD48(Actor *this){
|
||||
marker_despawn(this->marker);
|
||||
}
|
||||
else{
|
||||
func_80328B8C(this, 1, 0.01f, 1);
|
||||
subaddie_set_state_with_direction(this, 1, 0.01f, 1);
|
||||
timedFunc_set_2(randf2(5.0f, 10.0f), mapSpecificFlags_set, 3, TRUE);
|
||||
}
|
||||
}
|
||||
|
@@ -56,7 +56,7 @@ void chgloop_update(Actor *this){
|
||||
case 2://L802D14DC
|
||||
actor_loopAnimation(this);
|
||||
if(this->unk54 != 0.0f)
|
||||
func_80328A84(this, 4);
|
||||
subaddie_set_state(this, 4);
|
||||
|
||||
if( !mapSpecificFlags_get(2)
|
||||
&& func_80329530(this, 350)
|
||||
@@ -69,7 +69,7 @@ void chgloop_update(Actor *this){
|
||||
case 4://L802D1558
|
||||
actor_playAnimationOnce(this);
|
||||
if(this->unk54 == 0.0f)
|
||||
func_80328A84(this, 2);
|
||||
subaddie_set_state(this, 2);
|
||||
|
||||
if(actor_animationIsAt(this, 0.6f)){
|
||||
if(this->marker->unk14_21){
|
||||
|
@@ -3,9 +3,9 @@
|
||||
#include "variables.h"
|
||||
#include "core2/particle.h"
|
||||
|
||||
|
||||
Actor *func_8035ECA0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void func_8035F138(Actor *this);
|
||||
BKModelBin *func_803257B4(ActorMarker *marker);
|
||||
extern void actor_postdrawMethod(ActorMarker *);
|
||||
extern f32 func_80257204(f32, f32, f32, f32);
|
||||
|
||||
@@ -97,14 +97,14 @@ void func_8035EE48(Actor *this){
|
||||
}
|
||||
|
||||
void func_8035EE80(Actor *this){
|
||||
func_80328A84(this, 3);
|
||||
subaddie_set_state(this, 3);
|
||||
actor_loopAnimation(this);
|
||||
this->unk28 = 10.5f;
|
||||
func_8035EE48(this);
|
||||
}
|
||||
|
||||
void func_8035EEC0(Actor *this){
|
||||
func_80328A84(this, 4);
|
||||
subaddie_set_state(this, 4);
|
||||
actor_loopAnimation(this);
|
||||
this->unk28 = 9.0f;
|
||||
func_8035EE48(this);
|
||||
@@ -130,7 +130,7 @@ void func_8035EF9C(ActorMarker *marker, ActorMarker *other_marker) {
|
||||
this = marker_getActor(marker);
|
||||
local = (ActorLocal_core2_D7D10 *)&this->local;
|
||||
this->velocity[2] = 0.0f;
|
||||
func_80328B8C(this, 7, 0.02f, 1);
|
||||
subaddie_set_state_with_direction(this, 7, 0.02f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
local->unk0 = 2;
|
||||
actor_collisionOff(this);
|
||||
@@ -149,7 +149,7 @@ void func_8035F048(ActorMarker *marker, ActorMarker *other_marker) {
|
||||
FUNC_8030E8B4(SFX_F9_GRUNTLING_NOISE_1, 1.2f, 22000, this->position, 1750, 3500);
|
||||
FUNC_8030E8B4(SFX_1D_HITTING_AN_ENEMY_1, 0.9f, 22000, this->position, 1750, 3500);
|
||||
this->velocity[2] = 0.0f;
|
||||
func_80328B8C(this, 6, 0.02f, 1);
|
||||
subaddie_set_state_with_direction(this, 6, 0.02f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
local->unk0 = 2;
|
||||
func_8035EE48(this);
|
||||
@@ -199,7 +199,7 @@ void func_8035F138(Actor *this) {
|
||||
}
|
||||
animctrl_setAnimTimer(this->animctrl, 0.0f);
|
||||
if (func_80329530(this, (s32) (this->scale * 650.0f)) && func_803292E0(this)) {
|
||||
func_80328A84(this, 2U);
|
||||
subaddie_set_state(this, 2U);
|
||||
actor_playAnimationOnce(this);
|
||||
this->unk1C[1] = 1.0f;
|
||||
this->unk44_31 = func_8030ED2C(SFX_2C_PULLING_NOISE, 3);
|
||||
@@ -251,7 +251,7 @@ void func_8035F138(Actor *this) {
|
||||
}
|
||||
this->unk38_31 -= sp2C;
|
||||
if (func_8035ED60(this)) {
|
||||
func_80328B8C(this, 5, 0.99f, 0);
|
||||
subaddie_set_state_with_direction(this, 5, 0.99f, 0);
|
||||
actor_playAnimationOnce(this);
|
||||
this->unk28 = 0.0f;
|
||||
this->unk1C[1] = 1.9f;
|
||||
@@ -275,7 +275,7 @@ void func_8035F138(Actor *this) {
|
||||
func_8030DBB4(this->unk44_31, this->unk1C[1]);
|
||||
}
|
||||
if (animctrl_getAnimTimer(this->animctrl) <= 0.02) {
|
||||
func_80328B8C(this, 1, 0.02f, 1);
|
||||
subaddie_set_state_with_direction(this, 1, 0.02f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
this->unk28 = 0.0f;
|
||||
func_8035EE48(this);
|
||||
|
@@ -232,20 +232,20 @@ void __chicecube_die(ActorMarker *marker, ActorMarker *other_marker){
|
||||
}
|
||||
|
||||
void func_8035A998(Actor *this){
|
||||
func_80328B8C(this, 1, 0.0001f, 1);
|
||||
subaddie_set_state_with_direction(this, 1, 0.0001f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
this->unk38_31 = 0;
|
||||
}
|
||||
|
||||
void func_8035A9E0(Actor *this){
|
||||
func_80328B8C(this, 3, animctrl_getAnimTimer(this->animctrl), 1);
|
||||
subaddie_set_state_with_direction(this, 3, animctrl_getAnimTimer(this->animctrl), 1);
|
||||
actor_loopAnimation(this);
|
||||
this->unk38_31 = 1;
|
||||
this->unk28 = 0.0f;
|
||||
}
|
||||
|
||||
void func_8035AA40(Actor *this){
|
||||
func_80328B8C(this, 5, 0.9999f, 0);
|
||||
subaddie_set_state_with_direction(this, 5, 0.9999f, 0);
|
||||
actor_playAnimationOnce(this);
|
||||
this->unk38_31 = 1;
|
||||
}
|
||||
@@ -305,7 +305,7 @@ void chicecube_update(Actor *this){
|
||||
if( func_80359DF4(this, 900)
|
||||
|| (this->unkF4_8 == 2 && func_803203FC(UNKFLAGS1_C1_IN_FINAL_CHARACTER_PARADE))
|
||||
){
|
||||
func_80328B8C(this, 2, 0.0001f, 1);
|
||||
subaddie_set_state_with_direction(this, 2, 0.0001f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
this->unk38_31 = 0x1;
|
||||
}
|
||||
@@ -330,7 +330,7 @@ void chicecube_update(Actor *this){
|
||||
}
|
||||
func_8035A694(this);
|
||||
if(!func_80359DF4(this, 1300)){
|
||||
func_80328B8C(this, 4, animctrl_getAnimTimer(this->animctrl), 1);
|
||||
subaddie_set_state_with_direction(this, 4, animctrl_getAnimTimer(this->animctrl), 1);
|
||||
actor_loopAnimation(this);
|
||||
this->unk38_31 = 1;
|
||||
}
|
||||
|
@@ -142,7 +142,7 @@ void chjiggy_update(Actor *this){
|
||||
marker_despawn(this->marker);
|
||||
}
|
||||
else{
|
||||
func_80328A84(this, 2);
|
||||
subaddie_set_state(this, 2);
|
||||
switch(chjiggy_getJiggyId(this)){
|
||||
case JIGGY_17_CC_CLANKER_RAISED: //L802C7EF8
|
||||
case JIGGY_49_CCW_EYRIE:// L802C7EF8
|
||||
|
@@ -81,15 +81,15 @@ void chJigsawDance_setState(Actor * this, u32 arg1){
|
||||
switch(arg1){
|
||||
case 3:
|
||||
if(this->state == 1){
|
||||
func_80328A84(this, 2);
|
||||
subaddie_set_state(this, 2);
|
||||
animctrl_setPlaybackType(this->animctrl, ANIMCTRL_ONCE);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
func_80328A84(this, 3);
|
||||
subaddie_set_state(this, 3);
|
||||
break;
|
||||
case 1:
|
||||
func_80328A84(this, 4);
|
||||
subaddie_set_state(this, 4);
|
||||
break;
|
||||
case 4:
|
||||
player_getPosition(this->position);
|
||||
@@ -100,7 +100,7 @@ void chJigsawDance_setState(Actor * this, u32 arg1){
|
||||
animctrl_start(this->animctrl, "chjigsawdance.c", 0x97);
|
||||
break;
|
||||
case 5:
|
||||
func_80328A84(this, 5);
|
||||
subaddie_set_state(this, 5);
|
||||
this->marker->propPtr->unk8_4 = 0;
|
||||
break;
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern void func_80328B8C(Actor *, s32, f32 , s32);
|
||||
extern void subaddie_set_state_with_direction(Actor *, s32, f32 , s32);
|
||||
extern f32 func_80309B24(f32*);
|
||||
extern void func_80329904(ActorMarker*, s32, f32*);
|
||||
extern void func_80326310(Actor *);
|
||||
@@ -50,7 +50,7 @@ void __chJinjo_802CDBA8(ActorMarker *this, ActorMarker *other){
|
||||
func_80311480(__chJinjo_getMeetDialogId(actorPtr->marker->unk14_20), 4, 0, 0, 0, 0);
|
||||
fileProgressFlag_set(FILEPROG_E_JINJO_TEXT, 1);
|
||||
}
|
||||
func_80328B8C(actorPtr, 6, 0.0f , -1);
|
||||
subaddie_set_state_with_direction(actorPtr, 6, 0.0f , -1);
|
||||
if(func_803463D4(ITEM_12_JINJOS, 1 << (this->unk14_20 + 6) ) == 0x1f)
|
||||
localPtr->unk4 = 1;
|
||||
actor_loopAnimation(actorPtr);
|
||||
@@ -128,9 +128,9 @@ void chJinjo_update(Actor * this){
|
||||
case 1:
|
||||
if(randf() < 0.015){
|
||||
if(sp60){
|
||||
func_80328B8C(this, 3, 0.0f, -1);
|
||||
subaddie_set_state_with_direction(this, 3, 0.0f, -1);
|
||||
}else{
|
||||
func_80328B8C(this, 2, 0.0f, -1);
|
||||
subaddie_set_state_with_direction(this, 2, 0.0f, -1);
|
||||
}
|
||||
actor_playAnimationOnce(this);
|
||||
}//L802CDF24
|
||||
@@ -139,13 +139,13 @@ void chJinjo_update(Actor * this){
|
||||
case 2: /* 46FA0 802CDF30 3C053F7D */
|
||||
case 3:
|
||||
if(actor_animationIsAt(this, 0.99f)){
|
||||
func_80328B8C(this, 1, 0.0f, -1);
|
||||
subaddie_set_state_with_direction(this, 1, 0.0f, -1);
|
||||
}
|
||||
break;
|
||||
|
||||
case 4: /* 46FD8 802CDF68 3C053F7D */
|
||||
if(actor_animationIsAt(this, 0.99f)){
|
||||
func_80328B8C(this, 1, 0.0f, -1);
|
||||
subaddie_set_state_with_direction(this, 1, 0.0f, -1);
|
||||
}else{//L802CDF9C
|
||||
tmp_f0 = this->yaw;
|
||||
if(sp66 >= 0){
|
||||
@@ -165,14 +165,14 @@ void chJinjo_update(Actor * this){
|
||||
case 6:/* 47094 802CE024 02002025 */
|
||||
__chJinjo_802CDC9C(this, sp66);
|
||||
if(actor_animationIsAt(this, 0.0f) && --(local->unk0) == 0){
|
||||
func_80328B8C(this, 7, 0.0f, -1);
|
||||
subaddie_set_state_with_direction(this, 7, 0.0f, -1);
|
||||
actor_playAnimationOnce(this);
|
||||
if(local->unk4){
|
||||
sp40[0] = this->position_x;
|
||||
sp40[1] = this->position_y;
|
||||
sp40[2] = this->position_z;
|
||||
sp40[1] += 50.0f;
|
||||
jiggySpawn(10*level_get()-9, sp40);
|
||||
jiggy_spawn(10*level_get()-9, sp40);
|
||||
}//L802CE0CC
|
||||
func_8024BD08(0);
|
||||
func_8032BB88(this, 0, 4000);
|
||||
@@ -270,14 +270,14 @@ void chJinjo_update(Actor * this){
|
||||
|
||||
if(sp50){
|
||||
if(actor_animationIsAt(this, 0.96f) || actor_animationIsAt(this, 0.99f)){
|
||||
func_80328B8C(this, 8, 0.0f, -1);
|
||||
subaddie_set_state_with_direction(this, 8, 0.0f, -1);
|
||||
actor_playAnimationOnce(this);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}//L802CE5F0
|
||||
if(this->state < 4 && !(((sp66 >= 0)? sp66: -sp66) <= 0x1000)){
|
||||
func_80328B8C(this, 4, 0.0f, -1);
|
||||
subaddie_set_state_with_direction(this, 4, 0.0f, -1);
|
||||
actor_playAnimationOnce(this);
|
||||
}//L802CE630
|
||||
if(!func_803114B0()){
|
||||
|
@@ -117,9 +117,9 @@ void func_802D9530(Actor *this){
|
||||
Actor *other = subaddie_getLinkedActor(this);
|
||||
if(this->unk100 && other){
|
||||
if(this->unk100->unk14_20 == 0xB8)
|
||||
func_80328B8C(other, 3, 0.0001f, 1);
|
||||
subaddie_set_state_with_direction(other, 3, 0.0001f, 1);
|
||||
}
|
||||
func_80328B8C(this, 4, 0.0001f, 1);
|
||||
subaddie_set_state_with_direction(this, 4, 0.0001f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
this->unk44_31 = func_8030D90C();
|
||||
sfxsource_setSfxId(this->unk44_31, SFX_3F9_UNKNOWN);
|
||||
@@ -131,7 +131,7 @@ void func_802D9530(Actor *this){
|
||||
|
||||
void func_802D9600(Actor * this){
|
||||
animctrl_setSmoothTransition(this->animctrl, 0);
|
||||
func_80328B8C(this, 1, 0.0001f, 1);
|
||||
subaddie_set_state_with_direction(this, 1, 0.0001f, 1);
|
||||
this->marker->propPtr->unk8_3 = 0;
|
||||
}
|
||||
|
||||
@@ -232,11 +232,11 @@ int func_802D997C(Actor *this){
|
||||
void func_802D9ADC(Actor *this){
|
||||
Actor *other = subaddie_getLinkedActor(this);
|
||||
if(this->unk100 && other && this->unk100->unk14_20 == 0xB8){
|
||||
func_80328B8C(other, 2, 0.0001f, 1);
|
||||
subaddie_set_state_with_direction(other, 2, 0.0001f, 1);
|
||||
}
|
||||
this->marker->propPtr->unk8_3 = 1;
|
||||
animctrl_setSmoothTransition(this->animctrl, TRUE);
|
||||
func_80328B8C(this, 2, 0.0001f, 1);
|
||||
subaddie_set_state_with_direction(this, 2, 0.0001f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
this->unk44_31 = func_8030D90C();
|
||||
sfxsource_setSfxId(this->unk44_31, SFX_3F9_UNKNOWN);
|
||||
@@ -248,14 +248,14 @@ void func_802D9ADC(Actor *this){
|
||||
}
|
||||
|
||||
void func_802D9BD8(Actor *this){
|
||||
func_80328A84(this, 5);
|
||||
subaddie_set_state(this, 5);
|
||||
func_802D9658(this);
|
||||
func_8028F94C(2, this->position);
|
||||
func_802D997C(this);
|
||||
}
|
||||
|
||||
void func_802D9C1C(Actor *this){
|
||||
func_80328B8C(this, 3, 0.0001f, 1);
|
||||
subaddie_set_state_with_direction(this, 3, 0.0001f, 1);
|
||||
actor_loopAnimation(this);
|
||||
}
|
||||
|
||||
@@ -310,7 +310,7 @@ void func_802D9D60(Actor *this){
|
||||
if(this->unk100){
|
||||
other = subaddie_getLinkedActor(this);
|
||||
if(other && this->unk100->unk14_20 == 0xB8){
|
||||
func_80328A84(other, 1);
|
||||
subaddie_set_state(other, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -79,7 +79,7 @@ void func_802DA740(Actor *this){
|
||||
break;
|
||||
case 2: //L802DA7C4
|
||||
if(actor_animationIsAt(this, 0.9999f)){
|
||||
func_80328B8C(this, 1, 0.0001f, 1);
|
||||
subaddie_set_state_with_direction(this, 1, 0.0001f, 1);
|
||||
}
|
||||
else{
|
||||
if(local->unk0 && actor_animationIsAt(this, 0.05f)){
|
||||
@@ -89,7 +89,7 @@ void func_802DA740(Actor *this){
|
||||
break;
|
||||
case 3: //L802DA838
|
||||
if(actor_animationIsAt(this, 0.9999f)){
|
||||
func_80328B8C(this, 1, 0.0001f, 1);
|
||||
subaddie_set_state_with_direction(this, 1, 0.0001f, 1);
|
||||
}
|
||||
else if(local->unk0){
|
||||
if(actor_animationIsAt(this, 0.3f)){
|
||||
|
@@ -23,7 +23,7 @@ ActorInfo D_80368174 = {
|
||||
};
|
||||
|
||||
/* .bss */
|
||||
ActorMarker *D_8037DE90;
|
||||
ActorMarker *chOverlayNoController_marker;
|
||||
|
||||
/* .code */
|
||||
Actor *chOverlayNoController_draw(ActorMarker *marker, Gfx **gdl, Mtx **mptr, Vtx **vptr){
|
||||
@@ -40,8 +40,8 @@ Actor *chOverlayNoController_draw(ActorMarker *marker, Gfx **gdl, Mtx **mptr, Vt
|
||||
func_8024E258();
|
||||
{sp58[0] = 0.0f; sp58[1] = 0.0f; sp58[2] = 1312.5f;};
|
||||
{sp4C[0] = 0.0f; sp4C[1] = 0.0f; sp4C[2] = 0.0f;};
|
||||
viewport_setPosition(sp58);
|
||||
viewport_setRotation(sp4C);
|
||||
viewport_set_position_vec3f(sp58);
|
||||
viewport_set_rotation_vec3f(sp4C);
|
||||
viewport_update();
|
||||
func_8024C904(gdl, mptr);
|
||||
{sp40[0] = 0.0f; sp40[1] = 0.0f; sp40[2] = 0.0f;};
|
||||
@@ -53,7 +53,7 @@ Actor *chOverlayNoController_draw(ActorMarker *marker, Gfx **gdl, Mtx **mptr, Vt
|
||||
}
|
||||
|
||||
void chOverlayNoController_freeMethod(Actor *this){
|
||||
D_8037DE90 = NULL;
|
||||
chOverlayNoController_marker = NULL;
|
||||
}
|
||||
|
||||
void chOverlayNoController_update(Actor *this) {
|
||||
@@ -61,24 +61,24 @@ void chOverlayNoController_update(Actor *this) {
|
||||
this->initialized = TRUE;
|
||||
this->depth_mode = MODEL_RENDER_DEPTH_NONE;
|
||||
actor_collisionOff(this);
|
||||
func_80328B8C(this, 1, 0.0f, 1);
|
||||
subaddie_set_state_with_direction(this, 1, 0.0f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
marker_setFreeMethod(this->marker, chOverlayNoController_freeMethod);
|
||||
}
|
||||
if (animctrl_isStopped(this->animctrl) != 0) {
|
||||
func_80328B8C(this, 2, 0.0f, 1);
|
||||
subaddie_set_state_with_direction(this, 2, 0.0f, 1);
|
||||
actor_loopAnimation(this);
|
||||
}
|
||||
}
|
||||
|
||||
void __chOverlayNoController_spawn(void){
|
||||
if(D_8037DE90 == NULL){
|
||||
D_8037DE90 = func_8032813C(ACTOR_1DF_NO_CONTROLLER_OVERLAY, D_80368168, 0)->marker;
|
||||
if(chOverlayNoController_marker == NULL){
|
||||
chOverlayNoController_marker = func_8032813C(ACTOR_1DF_NO_CONTROLLER_OVERLAY, D_80368168, 0)->marker;
|
||||
}
|
||||
}
|
||||
|
||||
void chOverlayNoController_spawn(s32 arg0, s32 arg1){
|
||||
if(D_8037DE90 == NULL){
|
||||
if(chOverlayNoController_marker == NULL){
|
||||
__spawnQueue_add_0(__chOverlayNoController_spawn);
|
||||
}
|
||||
}
|
||||
@@ -86,7 +86,7 @@ void chOverlayNoController_spawn(s32 arg0, s32 arg1){
|
||||
void chOverlayNoController_func_802DD040(s32 arg0, s32 arg1) {
|
||||
ActorMarker *temp_a0;
|
||||
|
||||
temp_a0 = D_8037DE90;
|
||||
temp_a0 = chOverlayNoController_marker;
|
||||
if (temp_a0 != 0) {
|
||||
func_80326310(marker_getActor(temp_a0));
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern void func_80328B8C(Actor *, s32, f32, s32);
|
||||
extern void subaddie_set_state_with_direction(Actor *, s32, f32, s32);
|
||||
extern void actor_predrawMethod(Actor *);
|
||||
extern void actor_postdrawMethod(ActorMarker *);
|
||||
extern Actor *func_8032813C(enum actor_e id, f32[3], s32);
|
||||
@@ -50,8 +50,8 @@ Actor *chOverlayPressStart_draw(ActorMarker *marker, Gfx **gdl, Mtx **mptr, Vtx
|
||||
func_8024E258();
|
||||
{sp58[0] = 0.0f; sp58[1] = 0.0f; sp58[2] = 1312.5f;};
|
||||
{sp4C[0] = 0.0f; sp4C[1] = 0.0f; sp4C[2] = 0.0f;};
|
||||
viewport_setPosition(sp58);
|
||||
viewport_setRotation(sp4C);
|
||||
viewport_set_position_vec3f(sp58);
|
||||
viewport_set_rotation_vec3f(sp4C);
|
||||
viewport_update();
|
||||
func_8024C904(gdl, mptr);
|
||||
{sp40[0] = 0.0f; sp40[1] = 0.0f; sp40[2] = 0.0f;};
|
||||
@@ -72,13 +72,13 @@ void chOverlayPressStart_update(Actor *this){
|
||||
this->initialized = 1;
|
||||
this->depth_mode = MODEL_RENDER_DEPTH_NONE;
|
||||
actor_collisionOff(this);
|
||||
func_80328B8C(this, 1, 0.0f, 1);
|
||||
subaddie_set_state_with_direction(this, 1, 0.0f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
marker_setFreeMethod(this->marker, chOverlayPressStart_func_802DCC78);
|
||||
}
|
||||
|
||||
if(animctrl_isStopped(this->animctrl)){
|
||||
func_80328B8C(this, 2, 0.0f, 1);
|
||||
subaddie_set_state_with_direction(this, 2, 0.0f, 1);
|
||||
actor_loopAnimation(this);
|
||||
}
|
||||
}
|
||||
|
@@ -36,13 +36,13 @@ void chShrapnel_func_802D0A38(Actor *this){
|
||||
else{
|
||||
if(func_80329530(this, 600) && func_803292E0(this)){
|
||||
this->unk28 = 0.0f;
|
||||
func_80328B8C(this, 2, 0.0f, 1);
|
||||
subaddie_set_state_with_direction(this, 2, 0.0f, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void chShrapnel_func_802D0AB8(Actor *this) {
|
||||
func_80328B8C(this, 1, 0.0f, 0);
|
||||
subaddie_set_state_with_direction(this, 1, 0.0f, 0);
|
||||
chShrapnel_func_802D0A00(this);
|
||||
func_80328CEC(this, (s32) this->yaw_ideal, 0x87, 0xAF);
|
||||
this->unk38_31 = 0x1E;
|
||||
@@ -85,12 +85,12 @@ void chShrapnel_emitSmoke(Actor *this) {
|
||||
func_802EFB84(temp_v0, 2.0f, 3.0f);
|
||||
particleEmitter_setParticleSpawnPositionRange(temp_v0, -75.0f, 25.0f, -75.0f, 75.0f, 75.0f, 75.0f);
|
||||
particleEmitter_setParticleVelocityRange(temp_v0, -70.0f, 50.0f, -70.0f, 70.0f, 100.0f, 70.0f);
|
||||
particleEmitter_setRGB(temp_v0, &D_803673F8);
|
||||
particleEmitter_setRGB(temp_v0, D_803673F8);
|
||||
particleEmitter_setParticleLifeTimeRange(temp_v0, 3.0f, 4.0f);
|
||||
particleEmitter_emitN(temp_v0, 6);
|
||||
}
|
||||
|
||||
void chShrapnel_emitBodyParts(Actor *this, enum model_e model_id, s32 n) {
|
||||
void chShrapnel_emitBodyParts(Actor *this, enum asset_e model_id, s32 n) {
|
||||
ParticleEmitter *temp_v0;
|
||||
|
||||
temp_v0 = partEmitMgr_newEmitter(n);
|
||||
@@ -167,7 +167,7 @@ void chshrapnel_update(Actor *this) {
|
||||
func_80328FB0(this, 4.0f);
|
||||
if (func_80329480(this)) {
|
||||
if (250.0 > ABS(player_position[1] - this->unk1C[1])) {
|
||||
func_80328A84(this, 3);
|
||||
subaddie_set_state(this, 3);
|
||||
actor_loopAnimation(this);
|
||||
FUNC_8030E8B4(SFX_C4_TWINKLY_MUNCHER_GRR, 0.6f, 32750, this->position, 1250, 2500);
|
||||
this->unk28 = 4.0f;
|
||||
|
405
src/core2/ch/snacker.c
Normal file
405
src/core2/ch/snacker.c
Normal file
@@ -0,0 +1,405 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include "snacker.h"
|
||||
|
||||
extern f32 ml_distanceSquared_vec3f(f32 [3], f32 [3]);
|
||||
extern f32 func_80309B24(f32[3]);
|
||||
extern void func_80328FF0(Actor *, f32);
|
||||
extern void mapSpecificFlags_setN(s32, s32, s32);
|
||||
|
||||
typedef enum {
|
||||
CH_SNACKER_OPA_0_APPEAR,
|
||||
CH_SNACKER_OPA_1_ACTIVE,
|
||||
CH_SNACKER_OPA_2_FADE
|
||||
} ChSnackerOpacityState;
|
||||
|
||||
typedef enum {
|
||||
CH_SNACKER_STATE_1 = 1,
|
||||
CH_SNACKER_STATE_2,
|
||||
CH_SNACKER_STATE_3,
|
||||
CH_SNACKER_STATE_4,
|
||||
CH_SNACKER_STATE_5_EATING,
|
||||
CH_SNACKER_STATE_6,
|
||||
CH_SNACKER_STATE_7,
|
||||
CH_SNACKER_STATE_8_HURT,
|
||||
CH_SNACKER_STATE_9_DEAD
|
||||
} ChSnackerState;
|
||||
|
||||
typedef struct {
|
||||
s32 ctl; //ChSnackerControl
|
||||
s32 opa; //opacity
|
||||
f32 unk8;
|
||||
}ChSnackerLocal;
|
||||
|
||||
void chsnacker_update(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorAnimationInfo sChSnackerAnimations[] ={
|
||||
{0x000, 0.0f},
|
||||
{ASSET_78_ANIM_SNACKER_SWIMMING, 2.0f},
|
||||
{ASSET_78_ANIM_SNACKER_SWIMMING, 1.0f},
|
||||
{ASSET_78_ANIM_SNACKER_SWIMMING, 0.4f},
|
||||
{ASSET_78_ANIM_SNACKER_SWIMMING, 0.4f},
|
||||
{ASSET_154_ANIM_SNACKER_EATING, 1.1f},
|
||||
{ASSET_78_ANIM_SNACKER_SWIMMING, 0.4f},
|
||||
{ASSET_78_ANIM_SNACKER_SWIMMING, 1.0f},
|
||||
{ASSET_273_ANIM_SNACKER_HURT, 0.53f},
|
||||
{ASSET_274_ANIM_SNACKER_DIE, 1.09f}
|
||||
};
|
||||
|
||||
ActorInfo gChSnacker = {
|
||||
MARKER_14_SNACKER, ACTOR_68_SNACKER, ASSET_3B0_SNACKER,
|
||||
0x1, sChSnackerAnimations,
|
||||
chsnacker_update, func_80326224, actor_draw,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
/* .bss */
|
||||
ActorMarker *s_chSnacker_marker;
|
||||
f32 s_chSnacker_spawnTimer;
|
||||
f32 s_chSnacker_respawnDelay_s;
|
||||
s32 s_chSnacker_inRbb;
|
||||
s32 D_8037E630;
|
||||
|
||||
/* .code */
|
||||
void func_802E0CD0(Actor *this){
|
||||
this->unk28 = 4.0f;
|
||||
}
|
||||
|
||||
static void __chsnacker_start_dialog(Actor *this) {
|
||||
ChSnackerLocal *local = (ChSnackerLocal *)&this->local;
|
||||
s32 text_index;
|
||||
|
||||
if (this->unk38_31 != 0) {
|
||||
this->unk38_31--;
|
||||
}
|
||||
else{
|
||||
this->unk28 = 0.0f;
|
||||
if (level_get() == LEVEL_2_TREASURE_TROVE_COVE) {
|
||||
text_index = mapSpecificFlags_getN(8, 3);
|
||||
if( !this->unk138_24 ) {
|
||||
if(text_index < 4) {
|
||||
if(func_80311480(0xA1B + text_index, 0, NULL, NULL, NULL, NULL)){
|
||||
text_index++;
|
||||
mapSpecificFlags_setN(8, text_index, 3);
|
||||
this->unk138_24 = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
subaddie_set_state_with_direction(this, 3, 0.0f, -1);
|
||||
}
|
||||
}
|
||||
|
||||
bool func_802E0DC0(f32 snacker_position[3]){
|
||||
f32 player_position[3];
|
||||
f32 pad0;
|
||||
|
||||
player_getPosition(player_position);
|
||||
return (4000000.0f < ml_distanceSquared_vec3f(player_position, snacker_position))
|
||||
|| ( (snacker_position[1] - func_80309724(snacker_position) < 70.0f) && (func_80309B24(snacker_position) - snacker_position[1] < 70.0f));
|
||||
}
|
||||
|
||||
void func_802E0E88(Actor *this){
|
||||
this->unk28 = 2.0f;
|
||||
subaddie_set_state_with_direction(this, 5, 0.0f, -1);
|
||||
actor_playAnimationOnce(this);
|
||||
}
|
||||
|
||||
void func_802E0EC8(void){
|
||||
Actor *this;
|
||||
ChSnackerLocal *local;
|
||||
|
||||
this = marker_getActor(s_chSnacker_marker);
|
||||
local = (ChSnackerLocal *)&this->local;
|
||||
|
||||
actor_collisionOff(this);
|
||||
s_chSnacker_marker->propPtr->unk8_3 = FALSE;
|
||||
if(local->ctl != CH_SNACKER_OPA_2_FADE){
|
||||
func_8032BB88(this, -1, 750);
|
||||
comusic_8025AB44(COMUSIC_34_SNACKER_DANGER, 0, 750);
|
||||
func_8025AABC(COMUSIC_34_SNACKER_DANGER);
|
||||
local->ctl = CH_SNACKER_OPA_2_FADE;
|
||||
}
|
||||
}
|
||||
|
||||
static void __chsnacker_die(ActorMarker *marker, ActorMarker *other){
|
||||
Actor *this;
|
||||
|
||||
this = marker_getActor(marker);
|
||||
actor_collisionOff(this);
|
||||
FUNC_8030E8B4(SFX_179_GRUNTY_DAMAGE, 0.6f, 32750, this->position, 300, 3000);
|
||||
subaddie_set_state_with_direction(this, CH_SNACKER_STATE_9_DEAD, 0.0f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
}
|
||||
|
||||
void func_802E0FC4(Actor *this){
|
||||
s_chSnacker_marker = NULL;
|
||||
D_8037E630 = this->unk166;
|
||||
if(func_8025AD7C(COMUSIC_34_SNACKER_DANGER)){
|
||||
func_8025AABC(COMUSIC_34_SNACKER_DANGER);
|
||||
func_8025A7DC(COMUSIC_34_SNACKER_DANGER);
|
||||
}
|
||||
}
|
||||
|
||||
void func_802E1010(ActorMarker *marker, ActorMarker *other){
|
||||
Actor *this;
|
||||
|
||||
this = marker_getActor(marker);
|
||||
subaddie_set_state_with_direction(this, 8, 0.0f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
}
|
||||
|
||||
static void __chsnacker_ow(ActorMarker *marker, ActorMarker *other){
|
||||
Actor *this;
|
||||
|
||||
this = marker_getActor(marker);
|
||||
if(level_get() == LEVEL_2_TREASURE_TROVE_COVE && !func_8028F22C()){
|
||||
func_80311480(0xA29, 0, NULL, NULL, NULL, NULL);
|
||||
}//L802E10A4
|
||||
|
||||
if(this->state == 4){
|
||||
if(func_803294F0(this, 80, func_80329784(this))){
|
||||
func_802E0E88(this);
|
||||
}
|
||||
}//L802E10E0
|
||||
}
|
||||
|
||||
f32 func_802E10F0(f32 arg0) {
|
||||
if ((arg0 >= 180.0f) && (arg0 < 330.0f)) {
|
||||
return 330.0f;
|
||||
}
|
||||
if ((arg0 < 180.0f) && (arg0 > 30.0f)) {
|
||||
return 30.0f;
|
||||
}
|
||||
return arg0;
|
||||
}
|
||||
|
||||
void chsnacker_update(Actor *this) {
|
||||
f32 dt;
|
||||
ChSnackerLocal *local;
|
||||
SnackerCtlState controller_state;
|
||||
f32 player_position[3];
|
||||
f32 sp44;
|
||||
f32 sp40;
|
||||
s32 tmp;
|
||||
|
||||
dt = time_getDelta();
|
||||
local = (ChSnackerLocal *)&this->local;
|
||||
|
||||
if (!this->initialized) {
|
||||
this->initialized = TRUE;
|
||||
this->marker->propPtr->unk8_3 = TRUE;
|
||||
this->unk138_25 = TRUE;
|
||||
this->unk154 = 0x085E0000;
|
||||
marker_setCollisionScripts(this->marker, __chsnacker_ow, func_802E1010, __chsnacker_die);
|
||||
}
|
||||
_player_getPosition(player_position);
|
||||
controller_state = snackerctl_get_state();
|
||||
|
||||
if(func_802E0DC0(this->position) || ((controller_state != SNACKER_CTL_STATE_1_RBB) && (controller_state != SNACKER_CTL_STATE_2_TTC))) {
|
||||
local->unk8 = MIN(3.5, local->unk8 + dt);
|
||||
if (local->unk8 == 3.5) {
|
||||
func_802E0EC8();
|
||||
}
|
||||
} else {
|
||||
local->unk8 = 0.0f;
|
||||
}
|
||||
|
||||
switch(this->state){
|
||||
case 1: //802E12C8
|
||||
if (subaddie_maybe_set_state_position_direction(this, 2, 0.0f, 1, 0.03f) != 0) {
|
||||
func_802E0CD0(this);
|
||||
}
|
||||
__chsnacker_start_dialog(this);
|
||||
break;
|
||||
|
||||
case 2: //802E130C
|
||||
func_80328FB0(this, 3.0f);
|
||||
func_80328FF0(this, 3.0f);
|
||||
func_8032CA80(this, (s_chSnacker_inRbb) ? 15 : 9);
|
||||
if (func_80329480(this) != 0) {
|
||||
func_80328CEC(this, (s32) this->yaw, 0x5A, 0x96);
|
||||
}
|
||||
subaddie_maybe_set_state_position_direction(this, 1, 0.0f, 1, 0.0075f);
|
||||
__chsnacker_start_dialog(this);
|
||||
break;
|
||||
|
||||
case 3: //802E13AC
|
||||
func_803297FC(this, &sp44, &sp40);
|
||||
this->yaw_ideal = sp40;
|
||||
this->unk6C = func_802E10F0(sp44);
|
||||
func_80328FB0(this, 4.0f);
|
||||
func_80328FF0(this, 3.0f);
|
||||
if (func_80329480(this)) {
|
||||
subaddie_set_state_with_direction(this, 4, 0.0f, 1);
|
||||
this->unk28 = 9.0f;
|
||||
}
|
||||
break;
|
||||
|
||||
case 4: //802E1424
|
||||
func_803297FC(this, &sp44, &sp40);
|
||||
this->yaw_ideal = sp40;
|
||||
this->unk6C = func_802E10F0(sp44);
|
||||
func_80328FB0(this, this->unk28 / 2);
|
||||
func_80328FF0(this, this->unk28 / 2);
|
||||
this->unk28 = MIN(50.0, this->unk28 + dt);
|
||||
func_8032CA80(this, (s_chSnacker_inRbb) ? 15 : 9);
|
||||
break;
|
||||
|
||||
case CH_SNACKER_STATE_5_EATING: //802E14F8
|
||||
if (actor_animationIsAt(this, 0.25f)) {
|
||||
FUNC_8030E8B4(SFX_6D_CROC_BITE, 1.0f, 28000, this->position, 300, 3000);
|
||||
}
|
||||
if (actor_animationIsAt(this, 0.99f)) {
|
||||
func_802E0CD0(this);
|
||||
func_80328CEC(this, (s32) this->yaw_ideal, 0x87, 0xAF);
|
||||
this->unk38_31 = 0x78;
|
||||
subaddie_set_state_with_direction(this, 2, 0.0f, 1);
|
||||
actor_loopAnimation(this);
|
||||
}
|
||||
func_8032CA80(this, (s_chSnacker_inRbb) ? 15 : 9);
|
||||
break;
|
||||
|
||||
case CH_SNACKER_STATE_8_HURT: //802E15BC
|
||||
if (animctrl_isStopped(this->animctrl)) {
|
||||
func_802E0CD0(this);
|
||||
subaddie_set_state_with_direction(this, 2, 0.0f, 1);
|
||||
actor_loopAnimation(this);
|
||||
}
|
||||
break;
|
||||
|
||||
case CH_SNACKER_STATE_9_DEAD: //802E15FC
|
||||
if (animctrl_isStopped(this->animctrl)) {
|
||||
s_chSnacker_respawnDelay_s = 60.0f;
|
||||
D_8037E630 = 0x63;
|
||||
func_802E0EC8();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}//L802E1630
|
||||
|
||||
local = (ChSnackerLocal *)&this->local;
|
||||
switch(local->ctl){
|
||||
case CH_SNACKER_OPA_0_APPEAR:
|
||||
local->opa = MIN(0xFF, local->opa + 8);
|
||||
if(local->opa >= 0x81){
|
||||
this->marker->collidable = TRUE;
|
||||
}
|
||||
if (local->opa == 0xFF) {
|
||||
local->ctl = CH_SNACKER_OPA_1_ACTIVE;
|
||||
}
|
||||
break;
|
||||
|
||||
case CH_SNACKER_OPA_1_ACTIVE:
|
||||
break;
|
||||
|
||||
case CH_SNACKER_OPA_2_FADE:
|
||||
local->opa = MAX(0, local->opa - 8);
|
||||
if(local->opa < 0x80){
|
||||
this->marker->collidable = FALSE;
|
||||
}
|
||||
if (local->opa == 0) {
|
||||
marker_despawn(this->marker);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
actor_setOpacity(this, local->opa);
|
||||
this->depth_mode = (255.0 == local->opa) ? MODEL_RENDER_DEPTH_FULL : MODEL_RENDER_DEPTH_COMPARE;
|
||||
}
|
||||
|
||||
void chSnacker_initialize(void){
|
||||
s_chSnacker_spawnTimer = 0.0f;
|
||||
s_chSnacker_respawnDelay_s = 1.0f;
|
||||
s_chSnacker_marker = NULL;
|
||||
s_chSnacker_inRbb = (level_get() == LEVEL_9_RUSTY_BUCKET_BAY);
|
||||
D_8037E630 = 0x63;
|
||||
}
|
||||
|
||||
void chSnacker_spawn(void) {
|
||||
Actor *snacker;
|
||||
f32 spawn_position[3];
|
||||
f32 spawn_angle_rad;
|
||||
ChSnackerLocal *local;
|
||||
s32 pad;
|
||||
f32 sp38[3];
|
||||
f32 sp2C[3];
|
||||
f32 sp20[3];
|
||||
|
||||
|
||||
_player_getPosition(spawn_position);
|
||||
if (func_803203FC(UNKFLAGS1_C1_IN_FINAL_CHARACTER_PARADE) != 0) {
|
||||
nodeprop_getPosition(func_80304CAC(0x3CB, spawn_position), spawn_position);
|
||||
}
|
||||
else{
|
||||
spawn_angle_rad = randf2(0.0f, 3.28f);
|
||||
spawn_position[0] += 1000.0 * cosf(spawn_angle_rad);
|
||||
spawn_position[2] += 1000.0 * sinf(spawn_angle_rad);
|
||||
|
||||
sp38[0] = spawn_position[0];
|
||||
sp38[1] = spawn_position[1];
|
||||
sp38[2] = spawn_position[2];
|
||||
sp38[1] += 1000.0f;
|
||||
|
||||
sp2C[0] = spawn_position[0];
|
||||
sp2C[1] = spawn_position[1];
|
||||
sp2C[2] = spawn_position[2];
|
||||
sp2C[1] -= 1000.0f;
|
||||
|
||||
|
||||
if (func_80309B48(sp38, sp2C, sp20, 0xF800FF0F)) {
|
||||
spawn_position[1] = sp2C[1] - 60.0f;
|
||||
}
|
||||
else{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
snacker = func_8032813C(ACTOR_68_SNACKER, spawn_position, 0);
|
||||
s_chSnacker_marker = snacker->marker;
|
||||
|
||||
local = (ChSnackerLocal *)&snacker->local;
|
||||
snacker->unk166 = (s8) D_8037E630;
|
||||
local->ctl = CH_SNACKER_OPA_0_APPEAR;
|
||||
local->opa = 0;
|
||||
local->unk8 = 0.0f;
|
||||
marker_setFreeMethod(s_chSnacker_marker, func_802E0FC4);
|
||||
if (func_8032CA80(snacker, s_chSnacker_inRbb ? 0x10 : 0xC)) {
|
||||
marker_despawn(s_chSnacker_marker);
|
||||
return;
|
||||
}
|
||||
if (func_803203FC(UNKFLAGS1_C1_IN_FINAL_CHARACTER_PARADE) == 0) {
|
||||
func_8032BB88(snacker, 5000, 750);
|
||||
func_8024BD08(0);
|
||||
func_8025A6EC(COMUSIC_34_SNACKER_DANGER, 0);
|
||||
comusic_8025AB44(COMUSIC_34_SNACKER_DANGER, 0x7FFF, 750);
|
||||
func_8024BD08(1);
|
||||
}
|
||||
s_chSnacker_spawnTimer = 0.0f;
|
||||
func_8032CA80(snacker, s_chSnacker_inRbb ? 15 : 9);
|
||||
}
|
||||
|
||||
void chsnacker_setControlState(SnackerCtlState control_state) {
|
||||
f32 dt;
|
||||
|
||||
dt = time_getDelta();
|
||||
|
||||
if( getGameMode() == GAME_MODE_A_SNS_PICTURE
|
||||
|| getGameMode() == GAME_MODE_5_UNKNOWN
|
||||
|| getGameMode() == GAME_MODE_6_FILE_PLAYBACK
|
||||
){
|
||||
return;
|
||||
}
|
||||
|
||||
if ((s_chSnacker_marker == NULL)) {
|
||||
s_chSnacker_spawnTimer += dt;
|
||||
if ((s_chSnacker_respawnDelay_s < s_chSnacker_spawnTimer) && (control_state != SNACKER_CTL_STATE_0_INACTIVE)) {
|
||||
__spawnQueue_add_0(chSnacker_spawn);
|
||||
s_chSnacker_respawnDelay_s = 1.0f;
|
||||
}
|
||||
}
|
||||
}
|
12
src/core2/ch/snacker.h
Normal file
12
src/core2/ch/snacker.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#ifndef __BANJO_KAZOOIE_CORE2_CH_SNACKER_H__
|
||||
#define __BANJO_KAZOOIE_CORE2_CH_SNACKER_H__
|
||||
|
||||
#include "prop.h" // for ActorInfo
|
||||
#include "../snackerctl.h" //for SnackerCtlState
|
||||
|
||||
extern ActorInfo gChSnacker;
|
||||
|
||||
void chSnacker_initialize(void);
|
||||
void chsnacker_setControlState(SnackerCtlState nextState);
|
||||
|
||||
#endif // __BANJO_KAZOOIE_CORE2_CH_SNACKER_H__
|
@@ -3,8 +3,9 @@
|
||||
#include "variables.h"
|
||||
|
||||
extern void func_80329904(ActorMarker *, s32, f32 *);
|
||||
extern int func_80320C94(f32 (*)[3], f32(*)[3], f32, s32, s32, u32);
|
||||
extern f32 func_8033229C(ActorMarker *);
|
||||
extern BKCollisionTri *func_80320C94(f32[3], f32[3], f32, f32[3], s32, u32);
|
||||
|
||||
|
||||
typedef struct{
|
||||
s32 unk0;
|
||||
@@ -70,7 +71,7 @@ void __chSnowball_collisionCallback(Actor *this, bool water_collision) {
|
||||
func_8030E878(SFX_F_SMALL_WATER_SPLASH, randf2(0.8f, 1.2f), 32000, this->position, 1250.0f, 2500.0f);
|
||||
actor_collisionOff(this);
|
||||
func_80326310(this);
|
||||
func_80328A84(this, 2U);
|
||||
subaddie_set_state(this, 2U);
|
||||
}
|
||||
else{
|
||||
func_8030E878(SFX_2F_ORANGE_SPLAT, 1.0f, 32000, this->position, 1250.0f, 2500.0f);
|
||||
|
@@ -4,7 +4,7 @@
|
||||
|
||||
extern int func_802592C4(f32[3], f32[3], f32);
|
||||
extern void func_802EFA20(ParticleEmitter *, f32, f32);
|
||||
extern void func_80328B8C(Actor *, s32, f32, s32);
|
||||
extern void subaddie_set_state_with_direction(Actor *, s32, f32, s32);
|
||||
extern void func_80328FB0(Actor *, f32);
|
||||
extern void func_803300C0(ActorMarker *, void *);
|
||||
|
||||
@@ -133,13 +133,13 @@ void __chSnowman_spawnSnowballParticles(f32 position[3], s32 count){
|
||||
|
||||
void __chSnowman_enterIdle(Actor *this){
|
||||
ActorLocal_chSirSlush *local = (ActorLocal_chSirSlush *) &this->local;
|
||||
func_80328B8C(this, CHSNOWMAN_STATE_1_IDLE, 0.01f, 1);
|
||||
subaddie_set_state_with_direction(this, CHSNOWMAN_STATE_1_IDLE, 0.01f, 1);
|
||||
actor_loopAnimation(this);
|
||||
local->unk4 = 0.4f;
|
||||
}
|
||||
|
||||
void __chSnowman_enterDeath(Actor *this){
|
||||
func_80328B8C(this, CHSNOWMAN_STATE_3_DIE, 0.01f, 1);
|
||||
subaddie_set_state_with_direction(this, CHSNOWMAN_STATE_3_DIE, 0.01f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
}
|
||||
|
||||
@@ -272,7 +272,7 @@ void chSnowman_update(Actor *this){
|
||||
&& func_8028EE84() != BSWATERGROUP_2_UNDERWATER
|
||||
&& !__chSnowman_CCW_playerInProtectedZone()
|
||||
){
|
||||
func_80328B8C(this, CHSNOWMAN_STATE_2_ATTACK, 0.01f, 1);
|
||||
subaddie_set_state_with_direction(this, CHSNOWMAN_STATE_2_ATTACK, 0.01f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
}
|
||||
}
|
||||
|
@@ -27,7 +27,7 @@ void chSnowmanHat_update(Actor *this){
|
||||
this->pitch -= 360.0f;
|
||||
|
||||
if(this->position_y <= func_80309724(this->position)){
|
||||
func_80328A84(this, 2);
|
||||
subaddie_set_state(this, 2);
|
||||
FUNC_8030E8B4(SFX_1D_HITTING_AN_ENEMY_1, 1.0f, 32750, this->position, 2250, 4500);
|
||||
}
|
||||
break;
|
||||
|
@@ -60,8 +60,8 @@ void func_802D05A0(Actor *this, s32 next_state){
|
||||
sfxsource_setSfxId(local->unk0, D_80367340[(s32)this->yaw].unk0);
|
||||
func_8030DD14(local->unk0, 3);
|
||||
func_8030DFF0(local->unk0, 1);
|
||||
func_8030DF68(local->unk0, this->position);
|
||||
func_8030DEB4(local->unk0, D_80367340[(s32)this->yaw].unk4*this->scale, D_80367340[(s32)this->yaw].unk6*this->scale);
|
||||
sfxsource_set_position(local->unk0, this->position);
|
||||
sfxsource_set_fade_distances(local->unk0, D_80367340[(s32)this->yaw].unk4*this->scale, D_80367340[(s32)this->yaw].unk6*this->scale);
|
||||
func_8030DFB4(local->unk0, 1);
|
||||
func_802D0500(this);
|
||||
if(-1.0f != D_80367340[(s32)this->yaw].unkC)
|
||||
|
@@ -52,7 +52,7 @@ void __chTermite_updateWalkSFX(Actor *this) {
|
||||
f32 sp24[3];
|
||||
f32 sp20;
|
||||
|
||||
viewport_getPosition(&sp24);
|
||||
viewport_get_position_vec3f(&sp24);
|
||||
sp20 = ml_map_f( (300.0f - sp24[0])*(300.0f - sp24[0]) + (this->position[1] - sp24[1])*(this->position[1] - sp24[1]) + (-858.0f - sp24[2])*(-858.0f - sp24[2])
|
||||
, 7617600.0f, 8236900.0f
|
||||
, 8000.0f, 1000.0f
|
||||
@@ -121,7 +121,7 @@ void __chTermite_ow(ActorMarker *marker, ActorMarker *other_marker){
|
||||
Actor *this;
|
||||
|
||||
this = marker_getActor(marker);
|
||||
func_80328AC8(this, 6);
|
||||
subaddie_set_state_forward(this, 6);
|
||||
}
|
||||
|
||||
void __chTermite_die(ActorMarker *marker, ActorMarker *other_marker){
|
||||
@@ -187,7 +187,7 @@ void chTermite_update(Actor *this) {
|
||||
}
|
||||
switch (this->state) {
|
||||
case 1:
|
||||
if (func_80328BD4(this, 2, 0.0f, 1, 0.06f)) {
|
||||
if (subaddie_maybe_set_state_position_direction(this, 2, 0.0f, 1, 0.06f)) {
|
||||
__chTermite_updateRandomRotationSpeed(this);
|
||||
__chTermite_updateRandomSpeed(this);
|
||||
this->unk28 = 0.0f;
|
||||
@@ -222,11 +222,11 @@ void chTermite_update(Actor *this) {
|
||||
}
|
||||
__chTermite_updateAnimationSpeed(this);
|
||||
func_80329030(this, 0);
|
||||
func_80328BD4(this, 1, 0.0f, 1, 0.047f);
|
||||
subaddie_maybe_set_state_position_direction(this, 1, 0.0f, 1, 0.047f);
|
||||
return;
|
||||
case 6:
|
||||
if (actor_animationIsAt(this, 0.95f) != 0) {
|
||||
func_80328AC8(this, 1);
|
||||
subaddie_set_state_forward(this, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@@ -67,7 +67,7 @@ void chtrainers_update(Actor *this){
|
||||
this->velocity[0] = this->yaw;
|
||||
this->velocity[1] = 0.0f;
|
||||
this->unk10_12 = !func_803203FC(UNKFLAGS1_1F_IN_CHARACTER_PARADE) && !func_803203FC(0x1);
|
||||
func_80328A84(this, 0);
|
||||
subaddie_set_state(this, 0);
|
||||
}
|
||||
|
||||
if(!func_803203FC(0xF) && ability_isUnlocked(ABILITY_11_TURBO_TALON)){
|
||||
@@ -92,14 +92,14 @@ void chtrainers_update(Actor *this){
|
||||
case 1://L802CA630
|
||||
this->velocity[2] -= time_getDelta();
|
||||
if(this->velocity[2] <= 0.0f){
|
||||
func_80328A84(this, 2);
|
||||
subaddie_set_state(this, 2);
|
||||
}
|
||||
break;
|
||||
|
||||
case 2://L802CA670
|
||||
if(player_stateTimer_get(STATE_TIMER_3_TURBO_TALON) == 0.0f){
|
||||
this->velocity[2] = 1.0f;
|
||||
func_80328A84(this, 3);
|
||||
subaddie_set_state(this, 3);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -107,7 +107,7 @@ void chtrainers_update(Actor *this){
|
||||
this->velocity[2] -= time_getDelta();
|
||||
if(this->velocity[2] <= 0.0f){
|
||||
this->unk10_12 = 1;
|
||||
func_80328A84(this, 0);
|
||||
subaddie_set_state(this, 0);
|
||||
}
|
||||
break;
|
||||
}//L802CA6F8
|
||||
@@ -122,7 +122,7 @@ f32 chtrainers_getDuration(Actor *this){
|
||||
}
|
||||
|
||||
void chtrainers_pickup(Actor *this){
|
||||
func_80328A84(this, 1);
|
||||
subaddie_set_state(this, 1);
|
||||
this->velocity[2] = 1.0f;
|
||||
this->unk10_12 = 0;
|
||||
}
|
||||
|
@@ -42,7 +42,7 @@ void chwadingboots_update(Actor *this){
|
||||
this->initialized = TRUE;
|
||||
this->velocity[0] = this->yaw;
|
||||
this->unk10_12 = !func_803203FC(UNKFLAGS1_1F_IN_CHARACTER_PARADE) && !func_803203FC(0x1);
|
||||
func_80328A84(this, 0);
|
||||
subaddie_set_state(this, 0);
|
||||
}
|
||||
|
||||
if(!func_803203FC(0x10) && ability_isUnlocked(ABILITY_E_WADING_BOOTS)){
|
||||
@@ -78,14 +78,14 @@ void chwadingboots_update(Actor *this){
|
||||
case 1://L802D6D34
|
||||
this->velocity[1] -= time_getDelta();
|
||||
if(this->velocity[1] <= 0.0f){
|
||||
func_80328A84(this, 2);
|
||||
subaddie_set_state(this, 2);
|
||||
}
|
||||
break;
|
||||
|
||||
case 2://L802D6D74
|
||||
if(player_stateTimer_get(STATE_TIMER_2_LONGLEG) == 0.0f){
|
||||
this->velocity[1] = 1.5f;
|
||||
func_80328A84(this, 3);
|
||||
subaddie_set_state(this, 3);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -93,7 +93,7 @@ void chwadingboots_update(Actor *this){
|
||||
this->velocity[1] -= time_getDelta();
|
||||
if(this->velocity[1] <= 0.0f){
|
||||
this->unk10_12 = 1;
|
||||
func_80328A84(this, 0);
|
||||
subaddie_set_state(this, 0);
|
||||
}
|
||||
break;
|
||||
}//L802D6DFC
|
||||
@@ -108,7 +108,7 @@ f32 chwadingboots_802D6E4C(Actor *this){
|
||||
}
|
||||
|
||||
void chwadingboots_802D6E54(Actor *this){
|
||||
func_80328A84(this, 1);
|
||||
subaddie_set_state(this, 1);
|
||||
this->velocity[1] = 1.5f;
|
||||
this->unk10_12 = 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user