Merge branch 'master' into banjo-kazooie-var_renames
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "variables.h"
|
||||
#include "core2/yaw.h"
|
||||
#include "core2/ba/anim.h"
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
void func_80293D48(f32,f32);
|
||||
|
||||
@@ -22,7 +23,7 @@ s16 D_8036497C[3] = {
|
||||
|
||||
/* .bss */
|
||||
f32 D_8037D290;
|
||||
u8 D_8037D294;
|
||||
u8 bsant_substate;
|
||||
s32 D_8037D298;
|
||||
|
||||
/* .code */
|
||||
@@ -41,10 +42,10 @@ void func_8029E48C(void){
|
||||
f32 sp1C = func_8029B30C();
|
||||
|
||||
if(func_8029B300() == 0){
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
}
|
||||
else{
|
||||
func_80297970(ml_interpolate_f(sp1C, D_80364960, D_80364964));
|
||||
baphysics_set_target_horizontal_velocity(ml_interpolate_f(sp1C, D_80364960, D_80364964));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,8 +80,8 @@ int bsant_inSet(s32 move_indx){
|
||||
void bsant_idle_init(void){
|
||||
func_8029E554();
|
||||
baanim_playForDuration_loopSmooth(ASSET_5E_ANIM_BSANT_IDLE, 1.2f);
|
||||
func_8029C7F4(1,YAW_STATE_1_DEFAULT,1,2);
|
||||
func_80297970(0.0f);
|
||||
func_8029C7F4(1,YAW_STATE_1_DEFAULT,1,BA_PHYSICS_NORMAL);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
pitch_setAngVel(1000.0f, 12.0f);
|
||||
roll_setAngularVelocity(1000.0f, 12.0f);
|
||||
miscflag_set(3);
|
||||
@@ -96,7 +97,7 @@ void bsant_idle_update(void){
|
||||
new_state = BS_38_ANT_FALL;
|
||||
|
||||
if(func_80294F78())
|
||||
new_state = func_802926C0();
|
||||
new_state = badrone_look();
|
||||
|
||||
if(func_8029B300() > 0)
|
||||
new_state = BS_ANT_WALK;
|
||||
@@ -115,7 +116,7 @@ void bsant_idle_end(void){
|
||||
void bsant_walk_init(void){
|
||||
func_8029E554();
|
||||
baanim_playForDuration_loopSmooth(ASSET_5F_ANIM_BSANT_WALK, 0.8f);
|
||||
func_8029C7F4(2,YAW_STATE_1_DEFAULT,1,2);
|
||||
func_8029C7F4(2, YAW_STATE_1_DEFAULT,1, BA_PHYSICS_NORMAL);
|
||||
baanim_setVelocityMapRanges(D_80364960, D_80364964, D_80364968, D_8036496C);
|
||||
func_802900B4();
|
||||
}
|
||||
@@ -133,7 +134,7 @@ void bsant_walk_update(void){
|
||||
if(animctrl_isAt(aCtrl, 0.2781f))
|
||||
func_8029E448(1);
|
||||
|
||||
if(func_8029B300() == 0 && func_80297C04(1.0f))
|
||||
if(func_8029B300() == 0 && baphysics_is_slower_than(1.0f))
|
||||
sp1C = BS_35_ANT_IDLE;
|
||||
|
||||
if(func_8028B094())
|
||||
@@ -161,16 +162,16 @@ void bsant_jump_init(void){
|
||||
animctrl_setSubRange(aCtrl, 0.0f, 0.4423f);
|
||||
animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE);
|
||||
animctrl_start(aCtrl, "bsant.c", 0x17c);
|
||||
func_8029C7F4(1,YAW_STATE_1_DEFAULT,3,6);
|
||||
func_8029C7F4(1, YAW_STATE_1_DEFAULT, 3, BA_PHYSICS_AIRBORN);
|
||||
if(func_8029B2E8() != 0.0f)
|
||||
yaw_setIdeal(func_8029B33C());
|
||||
func_8029797C(yaw_getIdeal());
|
||||
baphysics_set_target_yaw(yaw_getIdeal());
|
||||
func_8029E48C();
|
||||
func_802979AC(yaw_getIdeal(), func_80297A64());
|
||||
player_setYVelocity(D_80364970);
|
||||
gravity_set(D_80364974);
|
||||
baphysics_set_horizontal_velocity(yaw_getIdeal(), baphysics_get_target_horizontal_velocity());
|
||||
baphysics_set_vertical_velocity(D_80364970);
|
||||
baphysics_set_gravity(D_80364974);
|
||||
func_8029E3E0();
|
||||
D_8037D294 = 0;
|
||||
bsant_substate = 0;
|
||||
}
|
||||
|
||||
void bsant_jump_update(void){
|
||||
@@ -180,31 +181,31 @@ void bsant_jump_update(void){
|
||||
f32 sp1C[3];
|
||||
|
||||
func_8029E48C();
|
||||
_get_velocity(sp1C);
|
||||
baphysics_get_velocity(sp1C);
|
||||
|
||||
if(button_released(BUTTON_A) && 0.0f < sp1C[1])
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
|
||||
switch(D_8037D294){
|
||||
switch(bsant_substate){
|
||||
case 0://L8029EA88
|
||||
if(animctrl_isStopped(aCtrl)){
|
||||
animctrl_setDuration(aCtrl, 5.0f);
|
||||
baanim_setEnd(0.5026f);
|
||||
D_8037D294 = 1;
|
||||
bsant_substate = 1;
|
||||
}
|
||||
break;
|
||||
case 1://L8029EABC
|
||||
if(func_8028B254(0x82)){
|
||||
animctrl_setDuration(aCtrl, 1.0f);
|
||||
baanim_setEnd(1.0f);
|
||||
D_8037D294 = 2;
|
||||
bsant_substate = 2;
|
||||
}
|
||||
break;
|
||||
case 2://L8029EAF4
|
||||
func_80299628(0);
|
||||
if(func_8028B2E8()){
|
||||
func_8029C5E8();
|
||||
D_8037D294 = 3;
|
||||
bsant_substate = 3;
|
||||
}
|
||||
break;
|
||||
case 3://L8029EB24
|
||||
@@ -213,7 +214,7 @@ void bsant_jump_update(void){
|
||||
break;
|
||||
}//L8029EB38
|
||||
if(func_8028B2E8()){
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
if(func_8029B300() > 0)
|
||||
sp2C = BS_ANT_WALK;
|
||||
|
||||
@@ -225,7 +226,7 @@ void bsant_jump_update(void){
|
||||
}
|
||||
|
||||
void bsant_jump_end(void){
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
func_8029E4EC();
|
||||
}
|
||||
|
||||
@@ -239,8 +240,8 @@ void bsant_fall_init(void){
|
||||
animctrl_setStart(aCtrl, 0.4423f);
|
||||
animctrl_setPlaybackType(aCtrl, ANIMCTRL_STOPPED);
|
||||
animctrl_start(aCtrl, "bsant.c", 0x208);
|
||||
func_8029C7F4(1,YAW_STATE_1_DEFAULT,3,6);
|
||||
D_8037D294 = 0;
|
||||
func_8029C7F4(1, YAW_STATE_1_DEFAULT, 3, BA_PHYSICS_AIRBORN);
|
||||
bsant_substate = 0;
|
||||
}
|
||||
|
||||
void bsant_fall_update(void){
|
||||
@@ -252,13 +253,13 @@ void bsant_fall_update(void){
|
||||
if(D_8037D298)
|
||||
func_8029E48C();
|
||||
|
||||
_get_velocity(sp1C);
|
||||
switch(D_8037D294){
|
||||
baphysics_get_velocity(sp1C);
|
||||
switch(bsant_substate){
|
||||
case 0:
|
||||
if(func_8028B254(0x5A)){
|
||||
animctrl_setDuration(aCtrl, 2.0f);
|
||||
baanim_setEnd(1.0f);
|
||||
D_8037D294 = 1;
|
||||
bsant_substate = 1;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
@@ -266,7 +267,7 @@ void bsant_fall_update(void){
|
||||
}
|
||||
if(func_8028B2E8()){
|
||||
if(miscflag_isTrue(0x19))
|
||||
sp2C = func_80292738();
|
||||
sp2C = badrone_transform();
|
||||
else
|
||||
sp2C = BS_35_ANT_IDLE;
|
||||
}
|
||||
@@ -300,15 +301,15 @@ static void __bsant_recoil_init(int take_damage){
|
||||
func_80257F18(sp20, sp2C, &sp38);
|
||||
yaw_setIdeal(mlNormalizeAngle(sp38 + 180.0f));
|
||||
yaw_applyIdeal();
|
||||
func_80297970(200.0f);
|
||||
func_8029797C(sp38);
|
||||
func_802979AC(sp38, func_80297A64());
|
||||
func_8029C7F4(1,YAW_STATE_1_DEFAULT,2,3);
|
||||
player_setYVelocity(510.0f);
|
||||
gravity_set(-1200.0f);
|
||||
baphysics_set_target_horizontal_velocity(200.0f);
|
||||
baphysics_set_target_yaw(sp38);
|
||||
baphysics_set_horizontal_velocity(sp38, baphysics_get_target_horizontal_velocity());
|
||||
func_8029C7F4(1, YAW_STATE_1_DEFAULT, 2, BA_PHYSICS_LOCKED_ROTATION);
|
||||
baphysics_set_vertical_velocity(510.0f);
|
||||
baphysics_set_gravity(-1200.0f);
|
||||
baMarker_collisionOff();
|
||||
func_80292E48();
|
||||
D_8037D294 = 0;
|
||||
bsant_substate = 0;
|
||||
}
|
||||
|
||||
static void __bsant_recoil_update(void){
|
||||
@@ -317,11 +318,11 @@ static void __bsant_recoil_update(void){
|
||||
if(baanim_isAt(0.5f))
|
||||
func_80292EA4();
|
||||
|
||||
switch(D_8037D294){
|
||||
switch(bsant_substate){
|
||||
case 0:
|
||||
if(func_8028B254(0x5a)){
|
||||
baanim_setEnd(1.0f);
|
||||
D_8037D294 = 1;
|
||||
bsant_substate = 1;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
@@ -336,7 +337,7 @@ static void __bsant_recoil_update(void){
|
||||
|
||||
static void __bsant_recoil_end(void){
|
||||
func_80297CA8();
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
baMarker_collisionOn();
|
||||
func_80292EA4();
|
||||
func_8029E4EC();
|
||||
@@ -387,17 +388,17 @@ void bsant_die_init(void){
|
||||
D_8037D290 = 250.0f;
|
||||
yaw_setIdeal(mlNormalizeAngle(sp38 + 180.0f));
|
||||
yaw_applyIdeal();
|
||||
func_80297970(D_8037D290);
|
||||
func_8029797C(sp38);
|
||||
func_802979AC(sp38, func_80297A64());
|
||||
func_8029C7F4(1,YAW_STATE_1_DEFAULT,2,3);
|
||||
player_setYVelocity(510.0f);
|
||||
gravity_set(-1200.0f);
|
||||
baphysics_set_target_horizontal_velocity(D_8037D290);
|
||||
baphysics_set_target_yaw(sp38);
|
||||
baphysics_set_horizontal_velocity(sp38, baphysics_get_target_horizontal_velocity());
|
||||
func_8029C7F4(1, YAW_STATE_1_DEFAULT, 2, BA_PHYSICS_LOCKED_ROTATION);
|
||||
baphysics_set_vertical_velocity(510.0f);
|
||||
baphysics_set_gravity(-1200.0f);
|
||||
pitch_setAngVel(1000.0f, 12.0f);
|
||||
func_802914CC(0xd);
|
||||
ncDynamicCamD_func_802BF2C0(30.0f);
|
||||
func_8029C984();
|
||||
D_8037D294 = 0;
|
||||
bsant_substate = 0;
|
||||
baMarker_collisionOff();
|
||||
func_80292E48();
|
||||
func_8029E3C0(0, 2.9f);
|
||||
@@ -406,22 +407,22 @@ void bsant_die_init(void){
|
||||
void bsant_die_update(void){
|
||||
AnimCtrl *aCtrl = baanim_getAnimCtrlPtr();
|
||||
|
||||
func_80297970(D_8037D290);
|
||||
baphysics_set_target_horizontal_velocity(D_8037D290);
|
||||
func_80299628(0);
|
||||
switch(D_8037D294){
|
||||
switch(bsant_substate){
|
||||
case 0://L8029F270
|
||||
if(func_8028B2E8()){
|
||||
baanim_setEnd(1.0f);
|
||||
FUNC_8030E624(SFX_1F_HITTING_AN_ENEMY_3, 0.8f, 18000);
|
||||
FUNC_8030E624(SFX_39_BANJO_AYE_2, 1.8f, 18000);
|
||||
D_8037D290 = 0.0f;
|
||||
D_8037D294 = 1;
|
||||
bsant_substate = 1;
|
||||
}
|
||||
break;
|
||||
case 1://L8029F2C0
|
||||
if(animctrl_isAt(aCtrl, 0.72f)){
|
||||
D_8037D290 = 0.0f;
|
||||
D_8037D294 = 2;
|
||||
bsant_substate = 2;
|
||||
}
|
||||
break;
|
||||
case 2://L8029F2F0
|
||||
@@ -440,7 +441,7 @@ void bsant_die_update(void){
|
||||
|
||||
void bsant_die_end(void){
|
||||
func_8024BD08(0);
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
pitch_setIdeal(0.0f);
|
||||
roll_setIdeal(0.0f);
|
||||
func_80291548();
|
||||
@@ -450,8 +451,8 @@ void bsant_die_end(void){
|
||||
void func_8029F398(void){
|
||||
func_8029E554();
|
||||
baanim_playForDuration_loopSmooth(ASSET_5E_ANIM_BSANT_IDLE, 2.0f);
|
||||
func_8029C7F4(1,YAW_STATE_1_DEFAULT,3,2);
|
||||
func_80297970(0.0f);
|
||||
func_8029C7F4(1, YAW_STATE_1_DEFAULT, 3, BA_PHYSICS_NORMAL);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
func_8029C674();
|
||||
func_802B3A50();
|
||||
}
|
||||
|
@@ -1,15 +1,11 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
void func_8029797C(f32);
|
||||
f32 func_80297A64(void);
|
||||
void func_80297970(f32);
|
||||
f32 func_80297A7C(void);
|
||||
|
||||
s32 func_8029E2E0(s32, f32);
|
||||
void func_80292864(f32, f32);
|
||||
void func_802979AC(f32, f32);
|
||||
void func_8029E3C0(s32, f32);
|
||||
|
||||
|
||||
@@ -36,15 +32,15 @@ void func_8029F4F0(void){
|
||||
|
||||
switch(D_8037D2A4){
|
||||
case 0:
|
||||
tmp_f = (func_80297A7C() + 180.0f);
|
||||
tmp_f = (baphysics_get_target_yaw() + 180.0f);
|
||||
func_80292864(tmp_f - 70.0f, 20.0f);
|
||||
break;
|
||||
case 1:
|
||||
tmp_f = (func_80297A7C() + 180.0f);
|
||||
tmp_f = (baphysics_get_target_yaw() + 180.0f);
|
||||
func_80292864(tmp_f - 10.0f, 20.0f);
|
||||
break;
|
||||
case 2:
|
||||
tmp_f = (func_80297A7C() + 180.0f);
|
||||
tmp_f = (baphysics_get_target_yaw() + 180.0f);
|
||||
func_80292864(tmp_f + 50.0f, 20.0f);
|
||||
break;
|
||||
}
|
||||
@@ -73,10 +69,10 @@ void bsbarge_init(void){
|
||||
animctrl_setPlaybackType(plyrMvmnt, ANIMCTRL_ONCE);
|
||||
animctrl_start(plyrMvmnt, "bsbbarge.c", 0x98);
|
||||
D_8037D2A4 = 0;
|
||||
func_8029C7F4(1,1,3,3);
|
||||
func_8029797C(yaw_getIdeal());
|
||||
func_80297970(func_80297A64()*0.3);
|
||||
func_802979AC(yaw_getIdeal(), func_80297A64());
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_LOCKED_ROTATION);
|
||||
baphysics_set_target_yaw(yaw_getIdeal());
|
||||
baphysics_set_target_horizontal_velocity(baphysics_get_target_horizontal_velocity()*0.3);
|
||||
baphysics_set_horizontal_velocity(yaw_getIdeal(), baphysics_get_target_horizontal_velocity());
|
||||
func_8029E070(1);
|
||||
D_8037D2A6 = 0;
|
||||
D_8037D2A5 = 0;
|
||||
@@ -127,15 +123,15 @@ void bsbarge_update(void){
|
||||
|
||||
animctrl_setDuration(plyrMvmnt, 1.0f);
|
||||
baanim_setEnd(0.565f);
|
||||
func_80297970(D_8037D2A0);
|
||||
func_802979AC(yaw_getIdeal(), func_80297A64());
|
||||
baphysics_set_target_horizontal_velocity(D_8037D2A0);
|
||||
baphysics_set_horizontal_velocity(yaw_getIdeal(), baphysics_get_target_horizontal_velocity());
|
||||
func_8030E760(SFX_2_CLAW_SWIPE, 0.558f, 22000);
|
||||
D_8037D2A5 = 2;
|
||||
func_8029F4F0();
|
||||
D_8037D2A6 = 1;
|
||||
break;
|
||||
case 2:
|
||||
func_80297970(D_8037D2A0);
|
||||
baphysics_set_target_horizontal_velocity(D_8037D2A0);
|
||||
if(animctrl_isStopped(plyrMvmnt)){
|
||||
animctrl_setDuration(plyrMvmnt, 2.0f);
|
||||
baanim_setEnd(0.6f);
|
||||
@@ -149,7 +145,7 @@ void bsbarge_update(void){
|
||||
if(miscflag_isFalse(0xC) || func_8029E384(0)){
|
||||
D_8037D2A0 -= 80.0f;
|
||||
}
|
||||
func_80297970(D_8037D2A0);
|
||||
baphysics_set_target_horizontal_velocity(D_8037D2A0);
|
||||
if(D_8037D2A0 < 200.0f){
|
||||
animctrl_setDuration(plyrMvmnt, 1.5f);
|
||||
baanim_setEnd(1.0f);
|
||||
@@ -164,7 +160,7 @@ void bsbarge_update(void){
|
||||
D_8037D2A0 = 0.0f;
|
||||
D_8037D2A6 = 0;
|
||||
}
|
||||
func_80297970(D_8037D2A0);
|
||||
baphysics_set_target_horizontal_velocity(D_8037D2A0);
|
||||
if(animctrl_isAt(plyrMvmnt, 0.9193f))
|
||||
sp24 = BS_20_LANDING;
|
||||
break;
|
||||
|
@@ -2,6 +2,8 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
/* .bss */
|
||||
u8 D_8037D2E0;
|
||||
u8 D_8037D2E1;
|
||||
@@ -9,9 +11,9 @@ u8 D_8037D2E1;
|
||||
/* .code */
|
||||
void bseggass_init(void){
|
||||
baanim_playForDuration_onceSmooth(ASSET_2B_ANIM_BSEGGASS, 1.0f);
|
||||
func_8029C7F4(1,3,1,3);
|
||||
func_8029C7F4(1,3,1, BA_PHYSICS_LOCKED_ROTATION);
|
||||
yaw_setVelocityBounded(350.0f, 14.0f);
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
func_8029E058(1);
|
||||
D_8037D2E0 = (D_8037D2E1 = 1);
|
||||
func_802952A8(5,0);
|
||||
@@ -60,6 +62,6 @@ void bseggass_update(void) {
|
||||
|
||||
void bseggass_end(void){
|
||||
func_802952A8(5, 1);
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
func_8029E058(0);
|
||||
}
|
||||
|
@@ -2,6 +2,8 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
void yaw_setVelocityBounded(f32, f32);
|
||||
void animctrl_start(AnimCtrl *, char*, s32);
|
||||
|
||||
@@ -12,9 +14,9 @@ u8 D_8037D2F1;
|
||||
/* .code */
|
||||
void bsegghead_init(void){
|
||||
baanim_playForDuration_onceSmooth(ASSET_2A_ANIM_BSEGGHEAD, 1.0f);
|
||||
func_8029C7F4(1,3,1,3);
|
||||
func_8029C7F4(1,3,1, BA_PHYSICS_LOCKED_ROTATION);
|
||||
yaw_setVelocityBounded(350.0f, 14.0f);
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
func_8029E070(1);
|
||||
D_8037D2F0 = (D_8037D2F1 = 1);
|
||||
func_802952A8(2,0);
|
||||
@@ -68,6 +70,6 @@ void bsegghead_update(void) {
|
||||
|
||||
void bsegghead_end(void){
|
||||
func_802952A8(2, 1);
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
func_8029E070(0);
|
||||
}
|
||||
|
@@ -2,6 +2,7 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
f32 func_802A2858(void);
|
||||
|
||||
@@ -19,15 +20,15 @@ u8 D_8037D30C;
|
||||
|
||||
void bsbflap_init(void) {
|
||||
baanim_playForDuration_onceSmooth(ASSET_18_ANIM_BSBFLAP_ENTER, 0.3f);
|
||||
func_8029C7F4(1, 1, 1, 2);
|
||||
func_8029C7F4(1, 1, 1, BA_PHYSICS_NORMAL);
|
||||
if (func_8029B2E8() != 0.0f) {
|
||||
yaw_setIdeal(func_8029B33C());
|
||||
}
|
||||
func_8029797C(yaw_getIdeal());
|
||||
baphysics_set_target_yaw(yaw_getIdeal());
|
||||
func_802B6FA8();
|
||||
func_802979AC(yaw_getIdeal(), func_80297A64());
|
||||
player_setYVelocity(0.0f);
|
||||
gravity_set(D_80364A14);
|
||||
baphysics_set_horizontal_velocity(yaw_getIdeal(), baphysics_get_target_horizontal_velocity());
|
||||
baphysics_set_vertical_velocity(0.0f);
|
||||
baphysics_set_gravity(D_80364A14);
|
||||
func_8029E070(1);
|
||||
miscflag_set(MISC_FLAG_12_HAS_FLAPPED);
|
||||
func_8029E3C0(0, 2.5f);
|
||||
@@ -109,7 +110,7 @@ void bsbflap_update(void){
|
||||
func_802B6FA8();
|
||||
switch(D_8037D300){
|
||||
case 0:
|
||||
func_80293350();
|
||||
bafalldamage_start();
|
||||
func_802A2900();
|
||||
func_802A298C();
|
||||
if(animctrl_isAt(sp18, 0.9f)){
|
||||
@@ -119,14 +120,14 @@ void bsbflap_update(void){
|
||||
animctrl_setPlaybackType(sp18, ANIMCTRL_LOOP);
|
||||
animctrl_setStart(sp18, 0.0f);
|
||||
animctrl_start(sp18, "bsbflap.c", 0xe1);
|
||||
player_setYVelocity(D_80364A10);
|
||||
gravity_set(D_80364A14);
|
||||
func_80297BF8(D_80364A18);
|
||||
baphysics_set_vertical_velocity(D_80364A10);
|
||||
baphysics_set_gravity(D_80364A14);
|
||||
baphysics_set_terminal_velocity(D_80364A18);
|
||||
D_8037D300 = 1;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
func_80293350();
|
||||
bafalldamage_start();
|
||||
func_802A2900();
|
||||
func_802A2810();
|
||||
func_802A28CC();
|
||||
@@ -136,7 +137,7 @@ void bsbflap_update(void){
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
func_80293350();
|
||||
bafalldamage_start();
|
||||
func_802A2900();
|
||||
func_802A2810();
|
||||
func_802A28CC();
|
||||
@@ -144,27 +145,27 @@ void bsbflap_update(void){
|
||||
if(D_8037D301 == 4)
|
||||
D_8037D300 = 3;
|
||||
if(button_released(BUTTON_A)){
|
||||
gravity_reset();
|
||||
func_80297B94();
|
||||
baphysics_reset_gravity();
|
||||
baphysics_reset_terminal_velocity();
|
||||
animctrl_setDuration(sp18, 1.0f);
|
||||
D_8037D300 = 4;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
func_80293350();
|
||||
bafalldamage_start();
|
||||
func_802A2900();
|
||||
func_802A2810();
|
||||
func_802A28CC();
|
||||
func_802A298C();
|
||||
if(button_released(BUTTON_A)){
|
||||
gravity_reset();
|
||||
func_80297B94();
|
||||
baphysics_reset_gravity();
|
||||
baphysics_reset_terminal_velocity();
|
||||
animctrl_setDuration(sp18, 1.0f);
|
||||
func_80293240(2);
|
||||
bafalldamage_set_state(2);
|
||||
D_8037D300 = 4;
|
||||
}
|
||||
else{
|
||||
func_80297970(func_80297A64() * 0.35);
|
||||
baphysics_set_target_horizontal_velocity(baphysics_get_target_horizontal_velocity() * 0.35);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
@@ -192,8 +193,8 @@ void bsbflap_update(void){
|
||||
|
||||
void bsbflap_end(void) {
|
||||
ability_use(1);
|
||||
gravity_reset();
|
||||
func_80297B94();
|
||||
baphysics_reset_gravity();
|
||||
baphysics_reset_terminal_velocity();
|
||||
func_8029E090(0, 0.2f);
|
||||
func_8030DA44(D_8037D30C);
|
||||
}
|
||||
|
@@ -1,6 +1,7 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
/* .data */
|
||||
const f32 D_80364A20 = 920.0f;
|
||||
@@ -18,9 +19,9 @@ void _bsbflip_802A2D60(void){
|
||||
f32 sp1C;
|
||||
sp1C = func_8029B30C();
|
||||
if(!func_8029B300())
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
else
|
||||
func_80297970(ml_interpolate_f(sp1C, D_80364A2C, D_80364A30));
|
||||
baphysics_set_target_horizontal_velocity(ml_interpolate_f(sp1C, D_80364A2C, D_80364A30));
|
||||
}
|
||||
|
||||
void _bsbflip_802A2DC0(void){
|
||||
@@ -33,10 +34,10 @@ void _bsbflip_802A2DC0(void){
|
||||
animctrl_setStart(aCtrl, 0.8566f);
|
||||
animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE);
|
||||
animctrl_start(aCtrl, "bsbflip.c", 0x69); //nice
|
||||
func_802978DC(3);
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_type(BA_PHYSICS_LOCKED_ROTATION);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
ml_vec3f_clear(sp20);
|
||||
func_80297A0C(sp20);
|
||||
baphysics_set_velocity(sp20);
|
||||
func_8029C5E8();
|
||||
}
|
||||
|
||||
@@ -50,7 +51,7 @@ void bsbflip_init(void){
|
||||
animctrl_setStart(aCtrl, 0.0f);
|
||||
animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE);
|
||||
animctrl_start(aCtrl, "bsbflip.c", 0x80);
|
||||
func_8029C7F4(1,1,2,3);
|
||||
func_8029C7F4(1,1,2, BA_PHYSICS_LOCKED_ROTATION);
|
||||
func_8029B324(0, 0.03f);
|
||||
func_8029B324(1, 1.0f);
|
||||
func_8029E070(1);
|
||||
@@ -79,17 +80,17 @@ void bsbflip_update(void){
|
||||
yaw_setIdeal(func_8029B33C());
|
||||
}
|
||||
yaw_rotateTimed(1.0f);
|
||||
func_802978DC(6);
|
||||
func_8029797C(yaw_getIdeal());
|
||||
func_80297970(200.0f);
|
||||
func_802979AC(yaw_getIdeal(), func_80297A64());
|
||||
baphysics_set_type(BA_PHYSICS_AIRBORN);
|
||||
baphysics_set_target_yaw(yaw_getIdeal());
|
||||
baphysics_set_target_horizontal_velocity(200.0f);
|
||||
baphysics_set_horizontal_velocity(yaw_getIdeal(), baphysics_get_target_horizontal_velocity());
|
||||
}else{//L802A3098
|
||||
func_802978DC(6);
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_type(BA_PHYSICS_AIRBORN);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
}
|
||||
player_setYVelocity(D_80364A20);
|
||||
gravity_set(D_80364A24);
|
||||
func_80297BF8(D_80364A28);
|
||||
baphysics_set_vertical_velocity(D_80364A20);
|
||||
baphysics_set_gravity(D_80364A24);
|
||||
baphysics_set_terminal_velocity(D_80364A28);
|
||||
animctrl_setDuration(aCtrl, 1.9f);
|
||||
func_8030E4E4(SFX_33_BANJO_AHOO);
|
||||
D_8037D310 = 1;
|
||||
@@ -120,7 +121,7 @@ void bsbflip_update(void){
|
||||
animctrl_setDuration(aCtrl, 0.8f);
|
||||
animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE);
|
||||
animctrl_start(aCtrl, "bsbflip.c", 0xee);
|
||||
func_80297B94();
|
||||
baphysics_reset_terminal_velocity();
|
||||
D_8037D310 = 3;
|
||||
}//L802A320C
|
||||
if(func_8028B2E8()){
|
||||
@@ -160,8 +161,8 @@ void bsbflip_update(void){
|
||||
|
||||
void bsbflip_end(void){
|
||||
ability_use(2);
|
||||
gravity_reset();
|
||||
func_80297B94();
|
||||
baphysics_reset_gravity();
|
||||
baphysics_reset_terminal_velocity();
|
||||
func_8029E070(0);
|
||||
func_8029B0C0();
|
||||
}
|
||||
|
@@ -1,6 +1,7 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
extern void func_8028FDC8(f32);
|
||||
extern void baModel_setYDisplacement(f32);
|
||||
@@ -35,7 +36,7 @@ int func_802A3350(void){
|
||||
void func_802A339C(f32 arg0[3], f32 arg1[3], f32 arg2){
|
||||
func_8024C5A8(arg0);
|
||||
ml_vec3f_scale(arg0, arg2);
|
||||
viewport_getRotation(arg1);
|
||||
viewport_get_rotation_vec3f(arg1);
|
||||
}
|
||||
|
||||
void func_802A33D8(void){
|
||||
@@ -60,8 +61,8 @@ void func_802A3430(void){
|
||||
|
||||
void func_802A34C8(void){
|
||||
if(!bsbfly_inSet(bs_getNextState())){
|
||||
gravity_reset();
|
||||
func_80297B94();
|
||||
baphysics_reset_gravity();
|
||||
baphysics_reset_terminal_velocity();
|
||||
func_8029E070(0);
|
||||
baModel_setYDisplacement(0.0f);
|
||||
func_8029CB84();
|
||||
@@ -134,14 +135,14 @@ int func_802A37F8(void){
|
||||
|
||||
void bsbfly_enter_init(void){
|
||||
baanim_playForDuration_onceSmooth(ASSET_45_ANIM_BSBFLY_ENTER, 1.4f);
|
||||
func_8029C7F4(1,1,3,6);
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_AIRBORN);
|
||||
if(func_8029B2E8() != 0.0f)
|
||||
yaw_setIdeal(func_8029B33C());
|
||||
|
||||
func_8029797C(yaw_getIdeal());
|
||||
func_80297A0C(0);
|
||||
func_80297970(0.0f);
|
||||
gravity_set(-1200.0f);
|
||||
baphysics_set_target_yaw(yaw_getIdeal());
|
||||
baphysics_set_velocity(0);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
baphysics_set_gravity(-1200.0f);
|
||||
func_8029E070(1);
|
||||
func_80299BD4();
|
||||
D_8037D344 = 0;
|
||||
@@ -156,14 +157,14 @@ void bsbfly_enter_update(void){
|
||||
case 0:
|
||||
if(animctrl_isAt(aCtrl, 0.2416f)){
|
||||
animctrl_setDuration(aCtrl, 2.4f);
|
||||
player_setYVelocity(1600.0f);
|
||||
baphysics_set_vertical_velocity(1600.0f);
|
||||
func_8030E58C(SFX_C_TAKING_FLIGHT_LIFTOFF, 0.7f);
|
||||
D_8037D344 = 1;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
func_802A36D0();
|
||||
if(_get_vertVelocity() < 0.0f)
|
||||
if(baphysics_get_vertical_velocity() < 0.0f)
|
||||
sp1C = BS_24_FLY;
|
||||
break;
|
||||
}
|
||||
@@ -178,18 +179,18 @@ void bsbfly_enter_end(void){
|
||||
|
||||
void bsbfly_init(void){
|
||||
baanim_playForDuration_loopSmooth(ASSET_38_ANIM_BSBFLY, 0.62f);
|
||||
func_8029C7F4(1,1,3,3);
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_LOCKED_ROTATION);
|
||||
if(miscflag_isTrue(9)){
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
}else{
|
||||
func_80297970(600.0f);
|
||||
baphysics_set_target_horizontal_velocity(600.0f);
|
||||
}
|
||||
|
||||
func_802979AC(yaw_getIdeal(), func_80297A64());
|
||||
func_8029797C(yaw_getIdeal());
|
||||
baphysics_set_horizontal_velocity(yaw_getIdeal(), baphysics_get_target_horizontal_velocity());
|
||||
baphysics_set_target_yaw(yaw_getIdeal());
|
||||
func_8029E070(1);
|
||||
gravity_set(-300.0f);
|
||||
func_80297BF8(-99.9f);
|
||||
baphysics_set_gravity(-300.0f);
|
||||
baphysics_set_terminal_velocity(-99.9f);
|
||||
func_802914CC(4);
|
||||
func_802A3430();
|
||||
D_8037D320 = 1.0f;
|
||||
@@ -247,7 +248,7 @@ void bsbfly_update(void){
|
||||
pitch_setIdeal(sp34);
|
||||
func_802A3404();
|
||||
if(sp30){
|
||||
player_setYVelocity(sp30 * 400.0);
|
||||
baphysics_set_vertical_velocity(sp30 * 400.0);
|
||||
}
|
||||
if(!sp30){
|
||||
animctrl_setDuration(aCtrl, 0.62f);
|
||||
@@ -259,19 +260,19 @@ void bsbfly_update(void){
|
||||
if(animctrl_isAt(aCtrl, 0.1358f)){
|
||||
func_8030EBC8(SFX_2_CLAW_SWIPE, 0.6f, 0.7f, 0x2710, 0x2ee0);
|
||||
}
|
||||
gravity_set(-300.0f);
|
||||
baphysics_set_gravity(-300.0f);
|
||||
if(miscflag_isTrue(9)){
|
||||
func_80297BF8(0.0f);
|
||||
func_80297A0C(0);
|
||||
baphysics_set_terminal_velocity(0.0f);
|
||||
baphysics_set_velocity(0);
|
||||
sp38 = 0.0f;
|
||||
}
|
||||
else if(sp3C <= 80.0f){
|
||||
func_80297BF8(ml_map_f(sp3C, 60.0f, 80.0f, -99.9f, -1000.33));
|
||||
gravity_set(ml_map_f(sp3C, 60.0f, 80.0f, -300.0f, -700.0f));
|
||||
baphysics_set_terminal_velocity(ml_map_f(sp3C, 60.0f, 80.0f, -99.9f, -1000.33));
|
||||
baphysics_set_gravity(ml_map_f(sp3C, 60.0f, 80.0f, -300.0f, -700.0f));
|
||||
sp38 = ml_map_f(sp3C, 60.0f, 80.0f, 600.0f, 60.0f);
|
||||
}
|
||||
else{
|
||||
func_80297BF8(ml_map_f(sp3C, 300.0f, 310.0f, -399.99f, -99.9f));
|
||||
baphysics_set_terminal_velocity(ml_map_f(sp3C, 300.0f, 310.0f, -399.99f, -99.9f));
|
||||
sp38 = ml_map_f(sp3C, 300.0f, 340.0f, 0.0f, 600.0f);
|
||||
}//L802A3E18
|
||||
|
||||
@@ -281,8 +282,8 @@ void bsbfly_update(void){
|
||||
if(sp4C != NULL && -1.0 < sp40[1])
|
||||
sp38 = 0.0f;
|
||||
|
||||
func_8029797C(yaw_get());
|
||||
func_80297970(sp38);
|
||||
baphysics_set_target_yaw(yaw_get());
|
||||
baphysics_set_target_horizontal_velocity(sp38);
|
||||
|
||||
if(should_beak_bust())
|
||||
sp54 = BS_F_BBUSTER;
|
||||
@@ -321,12 +322,12 @@ int bsbfly_bombHitboxActive(void){
|
||||
void func_802A3F9C(void){
|
||||
f32 sp1C[3];
|
||||
baanim_playForDuration_once(ASSET_43_ANIM_BSBFLY_BEAKBOMB_START, 1.0f);
|
||||
func_8029C7F4(1,1,3,7);
|
||||
func_8029C7F4(1,1,3,BA_PHYSICS_FREEZE);
|
||||
func_802A339C(D_8037D338, sp1C, 4200.0f);
|
||||
yaw_setIdeal(sp1C[1] + 180.0f);
|
||||
pitch_setIdeal(sp1C[0]);
|
||||
roll_setIdeal(0.0f);
|
||||
func_80297A0C(D_8037D338);
|
||||
baphysics_set_velocity(D_8037D338);
|
||||
pitch_setIdeal(sp1C[0]);
|
||||
func_8029E070(1);
|
||||
func_802914CC(4);
|
||||
@@ -375,7 +376,7 @@ void func_802A411C(void) {
|
||||
switch (D_8037D344) {
|
||||
case 0:
|
||||
if (animctrl_isAt(sp58, 0.6905f)) {
|
||||
func_802978DC(8);
|
||||
baphysics_set_type(BA_PHYSICS_UNK8);
|
||||
func_802914CC(5);
|
||||
ncDynamicCam5_func_802BF590(&D_8037D338);
|
||||
animctrl_setDuration(sp58, 0.05f);
|
||||
@@ -453,15 +454,15 @@ void func_802A4430(void){
|
||||
animctrl_setDuration(plyr_animctrl, 0.38f);
|
||||
animctrl_setPlaybackType(plyr_animctrl, ANIMCTRL_LOOP);
|
||||
animctrl_start(plyr_animctrl, "bsbfly.c", 0x38a);
|
||||
func_8029C7F4(1, 1, 3, 3);
|
||||
func_8029C7F4(1, 1, 3, BA_PHYSICS_LOCKED_ROTATION);
|
||||
func_8029E070(1);
|
||||
func_802A3430();
|
||||
func_80293D74();
|
||||
func_80294378(1);
|
||||
roll_setIdeal(0.0f);
|
||||
pitch_setIdeal(0.0f);
|
||||
gravity_reset();
|
||||
func_80297B94();
|
||||
baphysics_reset_gravity();
|
||||
baphysics_reset_terminal_velocity();
|
||||
baModel_setYDisplacement(0.0f);
|
||||
func_80299CF4(SFX_31_BANJO_OHHWAAOOO, 1.0f, 0x7fff);
|
||||
func_80299D2C(SFX_61_CARTOONY_FALL, 1.0f, 0x7fff);
|
||||
@@ -472,7 +473,7 @@ void func_802A4430(void){
|
||||
void func_802A4548(void){
|
||||
s32 next_state = 0;
|
||||
f32 sp20[3];
|
||||
_get_velocity(sp20);
|
||||
baphysics_get_velocity(sp20);
|
||||
switch(D_8037D344){
|
||||
case 0://L802A457C
|
||||
if(func_8028B254(0x5A)){
|
||||
@@ -528,7 +529,7 @@ void func_802A46C8(void) {
|
||||
|
||||
void bsbfly_beakbomb_crash_init(void) {
|
||||
baanim_playForDuration_once(ASSET_3E_ANIM_BSBFLY_BEAKBOMB_CRASH, 1.4f);
|
||||
func_8029C7F4(1, 1, 3, 3);
|
||||
func_8029C7F4(1, 1, 3, BA_PHYSICS_LOCKED_ROTATION);
|
||||
func_8029E070(1);
|
||||
FUNC_8030E624(SFX_1F_HITTING_AN_ENEMY_3, 0.8f, 32750);
|
||||
func_80299CF4(SFX_36_BANJO_DOH, 1.0f, 28000);
|
||||
@@ -552,7 +553,7 @@ void func_802A47E0(void) {
|
||||
func_80299CF4(SFX_38_BANJO_AYE_1, 1.0f, 22000);
|
||||
}
|
||||
if (animctrl_isAt(sp1C, 0.92f)) {
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
}
|
||||
if (animctrl_getAnimTimer(sp1C) < 0.8) {
|
||||
func_802929F8();
|
||||
@@ -639,17 +640,17 @@ void func_802A4A78(s32 arg0) {
|
||||
func_80257F18(sp30, sp3C, &sp28);
|
||||
yaw_setIdeal(mlNormalizeAngle(sp28 + 180.0f));
|
||||
yaw_applyIdeal();
|
||||
func_80297970(sp20);
|
||||
func_8029797C(sp28);
|
||||
func_802979AC(sp28, func_80297A64());
|
||||
baphysics_set_target_horizontal_velocity(sp20);
|
||||
baphysics_set_target_yaw(sp28);
|
||||
baphysics_set_horizontal_velocity(sp28, baphysics_get_target_horizontal_velocity());
|
||||
if ((arg0 == 1) && (map_get() == MAP_90_GL_BATTLEMENTS)) {
|
||||
yaw_setIdeal(mlNormalizeAngle(sp28));
|
||||
yaw_applyIdeal();
|
||||
}
|
||||
func_8029C7F4(1, 1, 2, 3);
|
||||
player_setYVelocity(800.0f);
|
||||
gravity_set(sp2C);
|
||||
func_80297BF8(-4000.0f);
|
||||
func_8029C7F4(1, 1, 2, BA_PHYSICS_LOCKED_ROTATION);
|
||||
baphysics_set_vertical_velocity(800.0f);
|
||||
baphysics_set_gravity(sp2C);
|
||||
baphysics_set_terminal_velocity(-4000.0f);
|
||||
func_8029E070(1);
|
||||
func_802914CC(4);
|
||||
ncDynamicCam4_func_802BFE50(12.0f, 10000.0f, 800.0f);
|
||||
@@ -671,7 +672,7 @@ void func_802A4C34(s32 arg0) {
|
||||
}
|
||||
|
||||
void func_802A4C88(s32 arg0) {
|
||||
func_80297B3C();
|
||||
baphysics_reset();
|
||||
baMarker_collisionOn();
|
||||
func_80297CA8();
|
||||
func_8029E070(0);
|
||||
@@ -716,16 +717,16 @@ void func_802A4D90(void) {
|
||||
func_80257F18(sp1C, player_position, &sp34);
|
||||
yaw_setIdeal(mlNormalizeAngle(sp34 + 180.0f));
|
||||
yaw_applyIdeal();
|
||||
func_80297970(1300.0f);
|
||||
func_8029797C(sp34);
|
||||
func_802979AC(sp34, func_80297A64());
|
||||
baphysics_set_target_horizontal_velocity(1300.0f);
|
||||
baphysics_set_target_yaw(sp34);
|
||||
baphysics_set_horizontal_velocity(sp34, baphysics_get_target_horizontal_velocity());
|
||||
if (map_get() == MAP_90_GL_BATTLEMENTS) {
|
||||
yaw_setIdeal(mlNormalizeAngle(sp34));
|
||||
yaw_applyIdeal();
|
||||
}
|
||||
func_8029C7F4(1, 1, 2, 3);
|
||||
player_setYVelocity(400.0f);
|
||||
gravity_set(-1800.0f);
|
||||
func_8029C7F4(1, 1, 2, BA_PHYSICS_LOCKED_ROTATION);
|
||||
baphysics_set_vertical_velocity(400.0f);
|
||||
baphysics_set_gravity(-1800.0f);
|
||||
baMarker_collisionOff();
|
||||
func_802914CC(4);
|
||||
ncDynamicCam4_func_802BFE50(12.0f, 10000.0f, 800.0f);
|
||||
@@ -748,14 +749,14 @@ void func_802A4EC8(void) {
|
||||
}
|
||||
|
||||
void func_802A4F44(void){
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
baMarker_collisionOn();
|
||||
func_802A34C8();
|
||||
}
|
||||
|
||||
void func_802A4F74(void) {
|
||||
baanim_playForDuration_loopSmooth(ASSET_38_ANIM_BSBFLY, 0.62f);
|
||||
func_8029C7F4(1, 1, 3, 7);
|
||||
func_8029C7F4(1, 1, 3, BA_PHYSICS_FREEZE);
|
||||
func_8029E070(1);
|
||||
func_802914CC(4);
|
||||
func_802A3430();
|
||||
@@ -808,15 +809,15 @@ void func_802A50F8(void){
|
||||
|
||||
void func_802A5120(void){
|
||||
baanim_playForDuration_loop(ASSET_68_ANIM_BSJUMP_TUMBLE, 0.35f);
|
||||
func_8029C7F4(1,1,3,6);
|
||||
func_80297970(0.0f);
|
||||
func_80297A0C(0);
|
||||
player_setYVelocity(2000.0f);
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_AIRBORN);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
baphysics_set_velocity(0);
|
||||
baphysics_set_vertical_velocity(2000.0f);
|
||||
func_80299CF4(SFX_63_BANJO_UWAAAAOOH, 1.0f, 32000);
|
||||
}
|
||||
|
||||
void func_802A5190(void){
|
||||
player_setYVelocity(2000.0f);
|
||||
baphysics_set_vertical_velocity(2000.0f);
|
||||
bs_setState(0);
|
||||
}
|
||||
|
||||
|
@@ -4,6 +4,7 @@
|
||||
#include "core2/ba/model.h"
|
||||
#include "core2/statetimer.h"
|
||||
#include "core2/ba/anim.h"
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
|
||||
/* .data */
|
||||
@@ -39,9 +40,9 @@ void func_802A5208(int arg0){
|
||||
void func_802A524C(void){
|
||||
f32 sp1C = func_8029B30C();
|
||||
if(!func_8029B300())
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
else
|
||||
func_80297970(ml_interpolate_f(sp1C, D_80364A40, D_80364A44));
|
||||
baphysics_set_target_horizontal_velocity(ml_interpolate_f(sp1C, D_80364A40, D_80364A44));
|
||||
}
|
||||
|
||||
int bslongleg_inSet(s32 move_indx){
|
||||
@@ -125,8 +126,8 @@ void bsblongleg_enter_init(void){
|
||||
__bsblongleg_enterFromTrot();
|
||||
else
|
||||
__bsblongleg_enter();
|
||||
func_8029C7F4(1,1,3,2);
|
||||
func_80297970(0.0f);
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_NORMAL);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
func_802A5374();
|
||||
func_80299BD4();
|
||||
}
|
||||
@@ -156,8 +157,8 @@ void bsblongleg_enter_end(void){
|
||||
|
||||
void bsblongleg_stand_enter(void){
|
||||
baanim_playForDuration_loopSmooth(ASSET_41_ANIM_BSLONGLEG_IDLE, 1.0f);
|
||||
func_8029C7F4(1,1,1,2);
|
||||
func_80297970(0.0f);
|
||||
func_8029C7F4(1,1,1, BA_PHYSICS_NORMAL);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
baModel_setDirection(PLAYER_MODEL_DIR_KAZOOIE);
|
||||
func_802A5374();
|
||||
}
|
||||
@@ -167,7 +168,7 @@ void bsblongleg_stand_update(void){
|
||||
func_802A531C();
|
||||
func_80299594(1, 0.5f);
|
||||
if(func_80294F78())
|
||||
next_state = func_802926C0();
|
||||
next_state = badrone_look();
|
||||
|
||||
if(button_pressed(BUTTON_B))
|
||||
stateTimer_clear(STATE_TIMER_2_LONGLEG);
|
||||
@@ -202,7 +203,7 @@ void bsblongleg_walk_init(void){
|
||||
animctrl_setIndex(aCtrl, ASSET_42_ANIM_BSLONGLEG_WALK);
|
||||
animctrl_setPlaybackType(aCtrl, ANIMCTRL_LOOP);
|
||||
animctrl_start(aCtrl, "bsblongleg.c", 0x1a1);
|
||||
func_8029C7F4(2,1,1,2);
|
||||
func_8029C7F4(2,1,1, BA_PHYSICS_NORMAL);
|
||||
baanim_setVelocityMapRanges(D_80364A40, D_80364A44, D_80364A48, D_80364A4C);
|
||||
}
|
||||
|
||||
@@ -220,10 +221,10 @@ void bsblongleg_walk_update(void){
|
||||
func_802A5208(1);
|
||||
|
||||
func_802A524C();
|
||||
if(button_pressed(BUTTON_B) && func_80297A64() == 0.0f)
|
||||
if(button_pressed(BUTTON_B) && baphysics_get_target_horizontal_velocity() == 0.0f)
|
||||
stateTimer_clear(STATE_TIMER_2_LONGLEG);
|
||||
|
||||
if(!func_8029B300() && func_80297C04(1.0f))
|
||||
if(!func_8029B300() && baphysics_is_slower_than(1.0f))
|
||||
next_state = BS_26_LONGLEG_IDLE;
|
||||
|
||||
if(player_shouldSlideTrot())
|
||||
@@ -273,7 +274,7 @@ void bsblongleg_exit_init(void){
|
||||
func_802A5AB0();
|
||||
baanim_setUpdateType(BAANIM_UPDATE_1_NORMAL);
|
||||
func_8029957C(2);
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
D_8037D361 = func_8030D90C();
|
||||
sfxsource_setSfxId(D_8037D361, SFX_2C_PULLING_NOISE);
|
||||
func_8030E04C(D_8037D361, 1.4f, 0.4f, -1.2f);
|
||||
@@ -322,14 +323,14 @@ void bsblongleg_jump_init(void){
|
||||
animctrl_setSubRange(aCtrl, 0.0f, 0.42f);
|
||||
animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE);
|
||||
animctrl_start(aCtrl, "bsblongleg.c", 0x27F);
|
||||
func_8029C7F4(1,1,3,6);
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_AIRBORN);
|
||||
if(func_8029B2E8() != 0.0f)
|
||||
yaw_setIdeal(func_8029B33C());
|
||||
func_8029797C(yaw_getIdeal());
|
||||
baphysics_set_target_yaw(yaw_getIdeal());
|
||||
func_802A524C();
|
||||
func_802979AC(yaw_getIdeal(), func_80297A64());
|
||||
player_setYVelocity(D_80364A50);
|
||||
gravity_set(D_80364A54);
|
||||
baphysics_set_horizontal_velocity(yaw_getIdeal(), baphysics_get_target_horizontal_velocity());
|
||||
baphysics_set_vertical_velocity(D_80364A50);
|
||||
baphysics_set_gravity(D_80364A54);
|
||||
func_8030E58C(SFX_48_KAZOOIE_RUUH, 0.9f);
|
||||
D_8037D360 = 0;
|
||||
}
|
||||
@@ -342,9 +343,9 @@ void bsblongleg_jump_update(void){
|
||||
|
||||
func_802A531C();
|
||||
func_802A524C();
|
||||
_get_velocity(&sp34);
|
||||
baphysics_get_velocity(sp34);
|
||||
if(button_released(BUTTON_A) && 0.0f < sp34[1])
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
|
||||
sp30 = player_getYPosition() - func_80294438();
|
||||
switch(D_8037D360){
|
||||
@@ -400,7 +401,7 @@ void bsblongleg_jump_update(void){
|
||||
}
|
||||
|
||||
void bsblongleg_jump_end(void){
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
func_802A5404();
|
||||
}
|
||||
|
||||
@@ -412,14 +413,14 @@ void bsblongleg_slide_init(void){
|
||||
animctrl_setPlaybackType(aCtrl, ANIMCTRL_STOPPED);
|
||||
animctrl_setStart(aCtrl, 0.0865f);
|
||||
animctrl_start(aCtrl, "bsblongleg.c", 0x339);
|
||||
func_8029C7F4(1,1,3,3);
|
||||
func_8029797C(yaw_getIdeal());
|
||||
func_802979AC(yaw_getIdeal(), func_80297A64());
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_LOCKED_ROTATION);
|
||||
baphysics_set_target_yaw(yaw_getIdeal());
|
||||
baphysics_set_horizontal_velocity(yaw_getIdeal(), baphysics_get_target_horizontal_velocity());
|
||||
func_8029E070(1);
|
||||
func_8029E064(1);
|
||||
pitch_setAngVel(1000.0f, 12.0f);
|
||||
roll_setAngularVelocity(1000.0f, 12.0f);
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
func_80299AAC();
|
||||
D_8037D358 = 1.0f;
|
||||
}
|
||||
@@ -437,8 +438,8 @@ void bsblongleg_slide_update(void){
|
||||
func_80294480(sp30);
|
||||
func_8025801C(sp30, &sp2C);
|
||||
func_80299594(1, 0.5f);
|
||||
func_80297970(ml_map_f(pitch_getIdeal(), 20.0f, 60.0f, 550.0f, 700.0f));
|
||||
func_8029797C(sp2C);
|
||||
baphysics_set_target_horizontal_velocity(ml_map_f(pitch_getIdeal(), 20.0f, 60.0f, 550.0f, 700.0f));
|
||||
baphysics_set_target_yaw(sp2C);
|
||||
func_8029C22C();
|
||||
}else{//L802A6304
|
||||
sp3C = BS_26_LONGLEG_IDLE;
|
||||
@@ -463,8 +464,8 @@ void func_802A6388(f32 arg0){
|
||||
|
||||
void func_802A6394(void){
|
||||
baanim_playForDuration_loopSmooth(ASSET_41_ANIM_BSLONGLEG_IDLE, 1.0f);
|
||||
func_8029C7F4(1,1,3,2);
|
||||
func_80297970(0.0f);
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_NORMAL);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
func_802A5374();
|
||||
baModel_setDirection(PLAYER_MODEL_DIR_KAZOOIE);
|
||||
func_8029C674();
|
||||
|
@@ -3,6 +3,8 @@
|
||||
#include "variables.h"
|
||||
#include "core2/yaw.h"
|
||||
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
void baModel_80292048(s32, f32, f32, f32);
|
||||
void animctrl_start(AnimCtrl *, char *, s32);
|
||||
|
||||
@@ -34,15 +36,15 @@ void bsbpeck_init(void){
|
||||
case BS_57_BOMB_END:
|
||||
break;
|
||||
}
|
||||
if(func_80293234() == 1)
|
||||
func_80293240(2);
|
||||
if(bafalldamage_get_state() == 1)
|
||||
bafalldamage_set_state(2);
|
||||
|
||||
baanim_playForDuration_onceSmooth(ASSET_1A_ANIM_BSBPECK, 0.2f);
|
||||
func_8029C7F4(1,YAW_STATE_3_BOUNDED, 1, 6);
|
||||
func_8029C7F4(1,YAW_STATE_3_BOUNDED, 1, BA_PHYSICS_AIRBORN);
|
||||
yaw_setVelocityBounded(1200.0f, 10.0f);
|
||||
func_8029E070(1);
|
||||
gravity_set(D_80364A60);
|
||||
player_setYVelocity(D_80364A64);
|
||||
baphysics_set_gravity(D_80364A60);
|
||||
baphysics_set_vertical_velocity(D_80364A64);
|
||||
baModel_80292048(1, -38.0f, 0.0f, 105.0f);
|
||||
baModel_80292048(0, -38.0f, 0.0f, -7.0f);
|
||||
baMarker_8028D638(0x23, 0x2A);
|
||||
@@ -66,7 +68,7 @@ void func_802A664C(void){
|
||||
}
|
||||
miscflag_set(MISC_FLAG_5_HAS_PECKED);
|
||||
func_8030E58C(SFX_42_KAZOOIE_RAH, sp1C);
|
||||
player_setYVelocity(D_80364A64);
|
||||
baphysics_set_vertical_velocity(D_80364A64);
|
||||
D_8037D375++;
|
||||
}
|
||||
|
||||
@@ -76,7 +78,7 @@ void bsbpeck_update(void){
|
||||
|
||||
func_802B6FA8();
|
||||
if(D_8037D377){
|
||||
func_80297970(func_80297A64() * 0.1);
|
||||
baphysics_set_target_horizontal_velocity(baphysics_get_target_horizontal_velocity() * 0.1);
|
||||
}
|
||||
|
||||
switch(D_8037D374){
|
||||
@@ -134,5 +136,5 @@ void bsbpeck_end(void){
|
||||
baModel_80292048(0, 0.0f, 0.0f, 0.0f);
|
||||
baMarker_8028D638(0, 0);
|
||||
func_8029E070(0);
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
}
|
||||
|
@@ -1,6 +1,8 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"s
|
||||
#include "variables.h"
|
||||
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
/* .data */
|
||||
const f32 D_80364A70 = 1250.0f;
|
||||
@@ -21,14 +23,14 @@ void bsbshock_charge_init(void){
|
||||
animctrl_setSubRange(aCtrl, 0.0f, 0.1061f);
|
||||
animctrl_setPlaybackType(aCtrl,1);
|
||||
animctrl_start(aCtrl, "bsbshock.c", 0x61);
|
||||
func_8029C7F4(1,1,3,6);
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_AIRBORN);
|
||||
|
||||
if(func_8029B2E8() != 0.0f)
|
||||
yaw_setIdeal(func_8029B33C());
|
||||
|
||||
func_8029797C(yaw_getIdeal());
|
||||
baphysics_set_target_yaw(yaw_getIdeal());
|
||||
func_802B6FA8();
|
||||
func_802979AC(yaw_getIdeal(), func_80297A64());
|
||||
baphysics_set_horizontal_velocity(yaw_getIdeal(), baphysics_get_target_horizontal_velocity());
|
||||
func_8029E064(1);
|
||||
func_8029E070(1);
|
||||
func_80299BD4();
|
||||
@@ -55,9 +57,9 @@ void bsbshock_charge_update(void){
|
||||
func_8029C348();
|
||||
}
|
||||
func_802B6FA8();
|
||||
_get_velocity(sp1C);
|
||||
baphysics_get_velocity(sp1C);
|
||||
if(button_released(BUTTON_A) && 0.0f < sp1C[1]){
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
}
|
||||
|
||||
switch(D_8037D381){
|
||||
@@ -89,7 +91,7 @@ void bsbshock_charge_update(void){
|
||||
D_8037D380 = 0;
|
||||
}//L802A6CF4
|
||||
if(func_8028B2E8())
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
}
|
||||
else{//L802A6D18
|
||||
if(should_feathery_flap())
|
||||
@@ -102,7 +104,7 @@ void bsbshock_charge_update(void){
|
||||
sp2C = BS_BSHOCK_JUMP;
|
||||
|
||||
if(animctrl_isAt(aCtrl, 0.5551f)){
|
||||
player_setYVelocity(180.0f);
|
||||
baphysics_set_vertical_velocity(180.0f);
|
||||
baModel_80292158(0.0f);
|
||||
func_80298528(50.0f);
|
||||
}
|
||||
@@ -132,16 +134,16 @@ void bsbshock_init(void){
|
||||
animctrl_setSubRange(aCtrl, 0.0f, 1.0f);
|
||||
animctrl_setPlaybackType(aCtrl,1);
|
||||
animctrl_start(aCtrl, "bsbshock.c", 0x13a);
|
||||
func_8029C7F4(1,1,3,6);
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_AIRBORN);
|
||||
|
||||
if(func_8029B2E8() != 0.0f)
|
||||
yaw_setIdeal(func_8029B33C());
|
||||
|
||||
func_8029797C(yaw_getIdeal());
|
||||
baphysics_set_target_yaw(yaw_getIdeal());
|
||||
func_802B6FA8();
|
||||
func_802979AC(yaw_getIdeal(), func_80297A64());
|
||||
player_setYVelocity(D_80364A70);
|
||||
gravity_set(D_80364A74);
|
||||
baphysics_set_horizontal_velocity(yaw_getIdeal(), baphysics_get_target_horizontal_velocity());
|
||||
baphysics_set_vertical_velocity(D_80364A70);
|
||||
baphysics_set_gravity(D_80364A74);
|
||||
func_8030E484(SFX_E_SHOCKSPRING_BOING);
|
||||
func_8029E064(1);
|
||||
func_8029E070(1);
|
||||
@@ -157,12 +159,12 @@ void bsbshock_update(void){
|
||||
AnimCtrl * aCtrl = baanim_getAnimCtrlPtr();
|
||||
|
||||
func_802B6FA8();
|
||||
_get_velocity(sp20);
|
||||
baphysics_get_velocity(sp20);
|
||||
if(animctrl_isAt(aCtrl, 0.7f))
|
||||
func_8030E484(SFX_53_BANJO_HUIII);
|
||||
|
||||
if(button_released(BUTTON_A) && 0.0f < sp20[1])
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
|
||||
if(D_8037D381 == 0){
|
||||
func_8029C348();
|
||||
@@ -186,7 +188,7 @@ void bsbshock_update(void){
|
||||
|
||||
void bsbshock_end(void){
|
||||
if(bs_getNextState() != BS_11_BPECK)
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
|
||||
func_8029E064(0);
|
||||
func_8029E070(0);
|
||||
|
@@ -3,6 +3,8 @@
|
||||
#include "variables.h"
|
||||
|
||||
#include "core2/ba/model.h"
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
|
||||
extern f32 func_8029494C(void);
|
||||
extern f32 func_8029B2D0(void);
|
||||
@@ -17,12 +19,12 @@ u8 D_8037D396;
|
||||
f32 D_8037D398;
|
||||
|
||||
void func_802A7140() {
|
||||
func_8029C7F4(1, 3, 3, 9);
|
||||
func_8029C7F4(1, 3, 3, BA_PHYSICS_NO_GRAVITY);
|
||||
}
|
||||
|
||||
f32 func_802A716C() {
|
||||
f32 sp24[3];
|
||||
_get_velocity(sp24);
|
||||
baphysics_get_velocity(sp24);
|
||||
ml_map_f(gu_sqrtf((sp24[0] * sp24[0]) + (sp24[1] * sp24[1]) + (sp24[2] * sp24[2])), 50.0f, 200.0f, 0.0f, 1.0f);
|
||||
}
|
||||
|
||||
@@ -71,14 +73,14 @@ void func_802A744C(void) {
|
||||
func_8035644C(FILEPROG_AC_DIVE_OILY_WATER);
|
||||
}
|
||||
roll_setAngularVelocity(30.0f, 0.9f);
|
||||
gravity_set(0.0f);
|
||||
func_80297BF8(-399.99f);
|
||||
baphysics_set_gravity(0.0f);
|
||||
baphysics_set_terminal_velocity(-399.99f);
|
||||
func_8029B324(0, 0.03f);
|
||||
func_8029B324(1, 1.0f);
|
||||
func_8029E070(1);
|
||||
func_80294378(3);
|
||||
baModel_setYDisplacement(60.0f);
|
||||
func_80297B64(2.0f);
|
||||
baphysics_set_acceleration(2.0f);
|
||||
}
|
||||
|
||||
|
||||
@@ -102,8 +104,8 @@ void func_802A75B0(void) {
|
||||
if (!bsbswim_inSet(bs_getNextState())) {
|
||||
pitch_setIdeal(0.0f);
|
||||
roll_setIdeal(0.0f);
|
||||
func_80297B94();
|
||||
gravity_reset();
|
||||
baphysics_reset_terminal_velocity();
|
||||
baphysics_reset_gravity();
|
||||
func_8029B0C0();
|
||||
func_8029E070(0);
|
||||
func_80294378(1);
|
||||
@@ -114,9 +116,9 @@ void func_802A75B0(void) {
|
||||
void func_802A762C() {
|
||||
baanim_playForDuration_loopSmooth(0x70, 2.0f);
|
||||
func_802A7140();
|
||||
func_80297930(0);
|
||||
baphysics_set_target_velocity(0);
|
||||
func_802A744C();
|
||||
func_80297B64(0.4f);
|
||||
baphysics_set_acceleration(0.4f);
|
||||
}
|
||||
|
||||
void func_802A7674() {
|
||||
@@ -126,7 +128,7 @@ void func_802A7674() {
|
||||
func_802A7304();
|
||||
|
||||
if (func_80294F78()) {
|
||||
state_id = func_802926C0();
|
||||
state_id = badrone_look();
|
||||
}
|
||||
if (button_held(BUTTON_A)) {
|
||||
state_id = BS_39_DIVE_A;
|
||||
@@ -162,7 +164,7 @@ void func_802A7738(void) {
|
||||
func_802A7140();
|
||||
func_802A744C();
|
||||
D_8037D390 = 0.0f;
|
||||
func_80297B64(1.0f);
|
||||
baphysics_set_acceleration(1.0f);
|
||||
func_802906A4(2);
|
||||
}
|
||||
|
||||
@@ -174,8 +176,8 @@ void func_802A77D8(void) {
|
||||
sp34 = pitch_get();
|
||||
sp30 = yaw_get();
|
||||
func_80256E24(sp24, sp34, sp30, 0.0f, 0.0f, D_8037D390);
|
||||
func_80297930(sp24);
|
||||
func_80297A0C(sp24);
|
||||
baphysics_set_target_velocity(sp24);
|
||||
baphysics_set_velocity(sp24);
|
||||
}
|
||||
|
||||
void func_802A7838(void) {
|
||||
@@ -237,7 +239,7 @@ void func_802A7A54() {
|
||||
func_802A7140();
|
||||
func_802A744C();
|
||||
D_8037D390 = 120.0f;
|
||||
func_80297B64(2.0f);
|
||||
baphysics_set_acceleration(2.0f);
|
||||
func_802906A4(2);
|
||||
}
|
||||
|
||||
@@ -291,10 +293,10 @@ void func_802A7BD0(void) {
|
||||
func_80257F18(sp24, sp30, &sp3C);
|
||||
yaw_setIdeal(mlNormalizeAngle(sp3C));
|
||||
yaw_applyIdeal();
|
||||
func_80297970(func_802987D4());
|
||||
func_8029797C(sp3C);
|
||||
func_802979AC(sp3C, func_80297A64());
|
||||
func_8029C7F4(1, 1, 2, 3);
|
||||
baphysics_set_target_horizontal_velocity(func_802987D4());
|
||||
baphysics_set_target_yaw(sp3C);
|
||||
baphysics_set_horizontal_velocity(sp3C, baphysics_get_target_horizontal_velocity());
|
||||
func_8029C7F4(1, 1, 2, BA_PHYSICS_LOCKED_ROTATION);
|
||||
baMarker_collisionOff();
|
||||
func_80292E48();
|
||||
func_802A744C();
|
||||
@@ -333,7 +335,7 @@ void bsSwim_dive_init(void) {
|
||||
baanim_playForDuration_once(ASSET_3C_ANIM_BSSWIM_DIVE_ENTER, 1.0f);
|
||||
func_802A7140();
|
||||
yaw_setVelocityBounded(500.0f, 5.0f);
|
||||
func_80297930(0);
|
||||
baphysics_set_target_velocity(0);
|
||||
func_802A744C();
|
||||
pitch_setAngVel(200.0f, 2.5f);
|
||||
func_80299BD4();
|
||||
@@ -357,7 +359,7 @@ void func_802A7E2C(void) {
|
||||
sp34 = pitch_get();
|
||||
sp30 = yaw_get();
|
||||
func_80256E24(sp24, sp34, sp30, 0.0f, 0.0f, 800.0f);
|
||||
func_80297A0C(sp24);
|
||||
baphysics_set_velocity(sp24);
|
||||
func_8029E3C0(1, 0.8f);
|
||||
D_8037D396 = TRUE;
|
||||
}
|
||||
@@ -394,9 +396,9 @@ void func_802A7F6C(void) {
|
||||
baanim_playForDuration_loopSmooth(ASSET_B9_ANIM_BSSWIM_DIE, 0.7f);
|
||||
func_802A7140();
|
||||
func_802A744C();
|
||||
func_80297B64(1.0f);
|
||||
func_80297930(0);
|
||||
func_80297A0C(0);
|
||||
baphysics_set_acceleration(1.0f);
|
||||
baphysics_set_target_velocity(0);
|
||||
baphysics_set_velocity(0);
|
||||
pitch_setIdeal(275.0f);
|
||||
roll_setIdeal(0.0f);
|
||||
D_8037D396 = 0;
|
||||
@@ -415,8 +417,8 @@ void func_802A8098(void) {
|
||||
|
||||
next_state = 0;
|
||||
func_80256E24(sp40, -90.0f, 0.0f, 0.0f, 0.0f, 100.0f);
|
||||
func_80297930(sp40);
|
||||
func_80297A0C(sp40);
|
||||
baphysics_set_target_velocity(sp40);
|
||||
baphysics_set_velocity(sp40);
|
||||
func_8029E22C(1);
|
||||
if( func_8029E284(1, 0.2f)
|
||||
|| func_8029E284(1, 0.8f)
|
||||
@@ -437,7 +439,7 @@ void func_802A8098(void) {
|
||||
next_state = BS_2D_SWIM_IDLE;
|
||||
}
|
||||
if (func_8029E314(1, 1.55f)) {
|
||||
player_setYVelocity(-50.0f);
|
||||
baphysics_set_vertical_velocity(-50.0f);
|
||||
}
|
||||
if (func_8029E284(1, 1.9f)) {
|
||||
func_802914CC(0xD);
|
||||
@@ -487,8 +489,8 @@ void func_802A8330(void) {
|
||||
void func_802A83C0(void) {
|
||||
baanim_playForDuration_loopSmooth(0x70, 2.0f);
|
||||
func_802A7140();
|
||||
func_80297930(0);
|
||||
func_80297B64(0.4f);
|
||||
baphysics_set_target_velocity(0);
|
||||
baphysics_set_acceleration(0.4f);
|
||||
func_802A744C();
|
||||
func_802A8330();
|
||||
}
|
||||
@@ -535,10 +537,10 @@ void func_802A846C(void) {
|
||||
animctrl_start(temp_s0, "bsbswim.c", 0x41E);
|
||||
}
|
||||
D_8037D398 = ml_map_f(sp28, 40.0f, 1000.0f, -300.0f, -1200.0f);
|
||||
player_setYVelocity(D_8037D398);
|
||||
func_8029C7F4(1, 3, 3, 9);
|
||||
baphysics_set_vertical_velocity(D_8037D398);
|
||||
func_8029C7F4(1, 3, 3, BA_PHYSICS_NO_GRAVITY);
|
||||
func_802A744C();
|
||||
func_802978DC(6);
|
||||
baphysics_set_type(BA_PHYSICS_AIRBORN);
|
||||
}
|
||||
|
||||
void func_802A85EC(void) {
|
||||
@@ -554,7 +556,7 @@ void func_802A85EC(void) {
|
||||
particleEmitter_emitN(sp34, 1);
|
||||
if (D_8037D398 < 0.0f) {
|
||||
D_8037D398 += ml_max_f(mlAbsF(D_8037D398) * 0.1, 50.0f);
|
||||
player_setYVelocity(D_8037D398);
|
||||
baphysics_set_vertical_velocity(D_8037D398);
|
||||
}
|
||||
if (func_8028B2E8()) {
|
||||
next_state = BS_2D_SWIM_IDLE;
|
||||
@@ -562,7 +564,7 @@ void func_802A85EC(void) {
|
||||
if (!player_inWater()) {
|
||||
next_state = BS_1_IDLE;
|
||||
}
|
||||
if (_get_vertVelocity() >= 0.0f) {
|
||||
if (baphysics_get_vertical_velocity() >= 0.0f) {
|
||||
next_state = BS_2D_SWIM_IDLE;
|
||||
}
|
||||
bs_setState(next_state);
|
||||
|
@@ -3,8 +3,9 @@
|
||||
#include "variables.h"
|
||||
|
||||
#include "core2/ba/model.h"
|
||||
#include "core2/statetimer.h"
|
||||
#include "core2/ba/anim.h"
|
||||
#include "core2/ba/physics.h"
|
||||
#include "core2/statetimer.h"
|
||||
|
||||
/* .data */
|
||||
f32 D_80364A90 = 30.0f;
|
||||
@@ -42,7 +43,7 @@ void func_802A880C(s32 arg0){
|
||||
void func_802A8850(void){
|
||||
if( button_pressed(BUTTON_B)
|
||||
&& stateTimer_isActive(STATE_TIMER_3_TURBO_TALON)
|
||||
&& func_80297A64() == 0.0f
|
||||
&& baphysics_get_target_horizontal_velocity() == 0.0f
|
||||
){
|
||||
stateTimer_clear(STATE_TIMER_3_TURBO_TALON);
|
||||
}
|
||||
@@ -90,10 +91,10 @@ f32 func_802A8984(void){
|
||||
void func_802A89D4(void){
|
||||
f32 sp24 = func_8029B30C();
|
||||
if(!func_8029B300()){
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
}
|
||||
else{
|
||||
func_80297970(ml_interpolate_f(sp24, func_802A8900(), func_802A88B0()));
|
||||
baphysics_set_target_horizontal_velocity(ml_interpolate_f(sp24, func_802A8900(), func_802A88B0()));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -190,7 +191,7 @@ enum bs_e func_802A8D84(enum bs_e arg0){
|
||||
arg0 = BS_16_BTROT_WALK;
|
||||
|
||||
if(func_80294F78())
|
||||
arg0 = func_802926C0();
|
||||
arg0 = badrone_look();
|
||||
|
||||
if(func_8028B094())
|
||||
arg0 = BS_71_BTROT_FALL;
|
||||
@@ -213,8 +214,8 @@ enum bs_e func_802A8D84(enum bs_e arg0){
|
||||
void bsbtrot_enter_init(void){
|
||||
func_802A8AD8();
|
||||
baanim_playForDuration_onceSmooth(ASSET_16_ANIM_BSBTROT_ENTER, 1.0f);
|
||||
func_8029C7F4(1,1,2,2);
|
||||
func_80297970(0.0f);
|
||||
func_8029C7F4(1,1,2, BA_PHYSICS_NORMAL);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
func_802A8A40();
|
||||
func_80299BD4();
|
||||
func_802952A8(0,0);
|
||||
@@ -242,8 +243,8 @@ void bsbtrot_enter_end(void){
|
||||
|
||||
void bsbtrot_stand_init(void){
|
||||
baanim_playForDuration_loopSmooth(ASSET_26_ANIM_BSBTROT_IDLE, 1.2f);
|
||||
func_8029C7F4(1,1,1,2);
|
||||
func_80297970(0.0f);
|
||||
func_8029C7F4(1,1,1, BA_PHYSICS_NORMAL);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
func_802A8A40();
|
||||
}
|
||||
|
||||
@@ -272,7 +273,7 @@ void func_802A9054(void){
|
||||
f32 tmp = 1.0f;
|
||||
baanim_setVelocityMapRanges(func_802A8900(), func_802A88B0(), func_802A8984(), func_802A8934());
|
||||
if(func_8028B394()){
|
||||
tmp = ml_map_f(func_80297AF0(), 0.0f, 1.0f, 0.6f, 0.9f);
|
||||
tmp = ml_map_f(baphysics_get_horizontal_velocity_percentage(), 0.0f, 1.0f, 0.6f, 0.9f);
|
||||
baanim_scaleDuration(tmp);
|
||||
}
|
||||
else{
|
||||
@@ -282,7 +283,7 @@ void func_802A9054(void){
|
||||
|
||||
void bsbtrot_walk_init(void){
|
||||
baanim_playForDuration_loopSmooth(func_802A9030(), 0.53f);
|
||||
func_8029C7F4(2,1,1,2);
|
||||
func_8029C7F4(2,1,1, BA_PHYSICS_NORMAL);
|
||||
func_802A8A40();
|
||||
func_802A9054();
|
||||
}
|
||||
@@ -312,7 +313,7 @@ void bsbtrot_walk_update(void){
|
||||
if(animctrl_isAt(aCtrl, 0.2115f) || animctrl_isAt(aCtrl, 0.7115f))
|
||||
func_802A87C0();
|
||||
}
|
||||
if(!func_8029B300() && func_80297C04(1.0f))
|
||||
if(!func_8029B300() && baphysics_is_slower_than(1.0f))
|
||||
sp1C = BS_15_BTROT_IDLE;
|
||||
|
||||
if(func_8028B094())
|
||||
@@ -355,15 +356,15 @@ void bsbtrot_jump_init(void){
|
||||
baanim_setUpdateType(BAANIM_UPDATE_1_NORMAL);
|
||||
yaw_setUpdateState(1);
|
||||
func_8029957C(3);
|
||||
func_802978DC(6);
|
||||
baphysics_set_type(BA_PHYSICS_AIRBORN);
|
||||
if(func_8029B2E8() != 0.0f)
|
||||
yaw_setIdeal(func_8029B33C());
|
||||
|
||||
func_8029797C(yaw_getIdeal());
|
||||
baphysics_set_target_yaw(yaw_getIdeal());
|
||||
func_802A89D4();
|
||||
func_802979AC(yaw_getIdeal(), func_80297A64());
|
||||
player_setYVelocity(D_80364ABC);
|
||||
gravity_set(D_80364AC0);
|
||||
baphysics_set_horizontal_velocity(yaw_getIdeal(), baphysics_get_target_horizontal_velocity());
|
||||
baphysics_set_vertical_velocity(D_80364ABC);
|
||||
baphysics_set_gravity(D_80364AC0);
|
||||
func_8030E484(SFX_48_KAZOOIE_RUUH);
|
||||
D_8037D3A4 = 0;
|
||||
}
|
||||
@@ -377,13 +378,13 @@ void bsbtrot_jump_update(void){
|
||||
func_802A87C0();
|
||||
|
||||
if(miscflag_isTrue(0xF))
|
||||
func_802978A4();
|
||||
baphysics_reset_horizontal_velocity();
|
||||
else
|
||||
func_802A89D4();
|
||||
|
||||
_get_velocity(sp1C);
|
||||
baphysics_get_velocity(sp1C);
|
||||
if(button_released(BUTTON_A) && 0.0f < sp1C[1])
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
|
||||
switch(D_8037D3A4){
|
||||
case 0://L802A9530
|
||||
@@ -411,13 +412,13 @@ void bsbtrot_jump_update(void){
|
||||
animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE);
|
||||
func_8029957C(1);
|
||||
D_8037D3A4 = 3;
|
||||
if(220.0f < func_80297A64())
|
||||
if(220.0f < baphysics_get_target_horizontal_velocity())
|
||||
func_80299AAC();
|
||||
func_8029C22C();
|
||||
}
|
||||
break;
|
||||
case 3://L802A9660
|
||||
if(220.0f < func_80297A64())
|
||||
if(220.0f < baphysics_get_target_horizontal_velocity())
|
||||
func_80299AAC();
|
||||
func_802A9320();
|
||||
func_80299628(1);
|
||||
@@ -430,7 +431,7 @@ void bsbtrot_jump_update(void){
|
||||
func_8029C22C();
|
||||
break;
|
||||
case 4://L802A96F0
|
||||
if(220.0f < func_80297A64())
|
||||
if(220.0f < baphysics_get_target_horizontal_velocity())
|
||||
func_80299AAC();
|
||||
|
||||
func_802A9320();
|
||||
@@ -444,7 +445,7 @@ void bsbtrot_jump_update(void){
|
||||
func_8029C22C();
|
||||
break;
|
||||
case 5://L802A9780
|
||||
if(220.0f < func_80297A64())
|
||||
if(220.0f < baphysics_get_target_horizontal_velocity())
|
||||
func_80299AAC();
|
||||
func_802A9320();
|
||||
func_80299628(1);
|
||||
@@ -474,14 +475,14 @@ void bsbtrot_jump_update(void){
|
||||
}
|
||||
|
||||
void bsbtrot_jump_end(void){
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
func_802A8BB0();
|
||||
}
|
||||
|
||||
void bsbtrot_exit_init(void){
|
||||
baanim_playForDuration_onceSmooth(ASSET_7_ANIM_BSBTROT_EXIT, 0.6f);
|
||||
baanim_setUpdateType(BAANIM_UPDATE_1_NORMAL);
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
}
|
||||
|
||||
void bsbtrot_exit_update(void){
|
||||
@@ -504,14 +505,14 @@ void bsbtrot_slide_init(void){
|
||||
animctrl_setPlaybackType(aCtrl, ANIMCTRL_STOPPED);
|
||||
animctrl_start(aCtrl, "bsbtrot.c", 0x382);
|
||||
func_802A8A40();
|
||||
func_8029C7F4(1,1,3,3);
|
||||
func_8029797C(yaw_getIdeal());
|
||||
func_802979AC(yaw_getIdeal(), func_80297A64());
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_LOCKED_ROTATION);
|
||||
baphysics_set_target_yaw(yaw_getIdeal());
|
||||
baphysics_set_horizontal_velocity(yaw_getIdeal(), baphysics_get_target_horizontal_velocity());
|
||||
func_8029E070(1);
|
||||
func_8029E064(1);
|
||||
pitch_setAngVel(1000.0f, 12.0f);
|
||||
roll_setAngularVelocity(1000.0f, 12.0f);
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
func_80299AAC();
|
||||
D_8037D3A0 = 1.0f;
|
||||
}
|
||||
@@ -530,8 +531,8 @@ void bsbtrot_slide_update(void){
|
||||
func_80294480(sp30);
|
||||
func_8025801C(sp30, &sp2C);
|
||||
func_80299628(1);
|
||||
func_80297970(ml_map_f(pitch_getIdeal(), 20.0f, 60.0f, 550.0f, 700.0f));
|
||||
func_8029797C(sp2C);
|
||||
baphysics_set_target_horizontal_velocity(ml_map_f(pitch_getIdeal(), 20.0f, 60.0f, 550.0f, 700.0f));
|
||||
baphysics_set_target_yaw(sp2C);
|
||||
func_8029C22C();
|
||||
}else{
|
||||
sp3C = BS_15_BTROT_IDLE;
|
||||
@@ -572,10 +573,10 @@ void bsbtrot_fall_init(void){
|
||||
animctrl_setPlaybackType(aCtrl, ANIMCTRL_STOPPED);
|
||||
animctrl_start(aCtrl, "bsbtrot.c", 0x400);
|
||||
func_802A8A40();
|
||||
func_8029C7F4(1,1,3,6);
|
||||
func_8029797C(yaw_getIdeal());
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_AIRBORN);
|
||||
baphysics_set_target_yaw(yaw_getIdeal());
|
||||
func_802A89D4();
|
||||
func_802979AC(yaw_getIdeal(), func_80297A64());
|
||||
baphysics_set_horizontal_velocity(yaw_getIdeal(), baphysics_get_target_horizontal_velocity());
|
||||
D_8037D3A4 = 0;
|
||||
}
|
||||
|
||||
@@ -588,11 +589,11 @@ void bsbtrot_fall_update(void){
|
||||
func_802A87C0();
|
||||
|
||||
if(miscflag_isTrue(0xf))
|
||||
func_802978A4();
|
||||
baphysics_reset_horizontal_velocity();
|
||||
else
|
||||
func_802A89D4();
|
||||
|
||||
_get_velocity(sp1C);
|
||||
baphysics_get_velocity(sp1C);
|
||||
switch (D_8037D3A4){
|
||||
case 0://L802A9D90
|
||||
if(func_8028B254(0x8C)){
|
||||
@@ -610,7 +611,7 @@ void bsbtrot_fall_update(void){
|
||||
animctrl_setDuration(aCtrl, 0.9f);
|
||||
animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE);
|
||||
func_8029957C(1);
|
||||
if(220.0f < func_80297A64()){
|
||||
if(220.0f < baphysics_get_target_horizontal_velocity()){
|
||||
func_80299AAC();
|
||||
}
|
||||
func_8029C22C();
|
||||
@@ -618,7 +619,7 @@ void bsbtrot_fall_update(void){
|
||||
}
|
||||
break;
|
||||
case 2://L802A9E78
|
||||
if(220.0f < func_80297A64())
|
||||
if(220.0f < baphysics_get_target_horizontal_velocity())
|
||||
func_80299AAC();
|
||||
|
||||
func_802A9320();
|
||||
@@ -632,7 +633,7 @@ void bsbtrot_fall_update(void){
|
||||
func_8029C22C();
|
||||
break;
|
||||
case 3://L802A9F08
|
||||
if(220.0f < func_80297A64())
|
||||
if(220.0f < baphysics_get_target_horizontal_velocity())
|
||||
func_80299AAC();
|
||||
|
||||
func_802A9320();
|
||||
@@ -646,7 +647,7 @@ void bsbtrot_fall_update(void){
|
||||
func_8029C22C();
|
||||
break;
|
||||
case 4://802A9F98
|
||||
if(220.0f < func_80297A64())
|
||||
if(220.0f < baphysics_get_target_horizontal_velocity())
|
||||
func_80299AAC();
|
||||
|
||||
func_802A9320();
|
||||
@@ -679,8 +680,8 @@ void bsbtrot_fall_end(void){
|
||||
|
||||
void bsbtrot_unk79_init(void){
|
||||
baanim_playForDuration_loopSmooth(ASSET_26_ANIM_BSBTROT_IDLE, 1.2f);
|
||||
func_8029C7F4(1,1,3,2);
|
||||
func_80297970(0.0f);
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_NORMAL);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
func_802A8A40();
|
||||
baModel_setDirection(PLAYER_MODEL_DIR_KAZOOIE);
|
||||
func_8029C674();
|
||||
@@ -715,14 +716,14 @@ void bsbtrot_ow_init(void){
|
||||
func_80257F18(sp24, sp30, &sp3C);
|
||||
yaw_setIdeal(mlNormalizeAngle(sp3C + 180.0f));\
|
||||
yaw_applyIdeal();
|
||||
func_80297970(func_802987D4());
|
||||
func_8029797C(sp3C);
|
||||
func_802979AC(sp3C, func_80297A64());
|
||||
func_8029C7F4(1,1,2,3);
|
||||
baphysics_set_target_horizontal_velocity(func_802987D4());
|
||||
baphysics_set_target_yaw(sp3C);
|
||||
baphysics_set_horizontal_velocity(sp3C, baphysics_get_target_horizontal_velocity());
|
||||
func_8029C7F4(1,1,2, BA_PHYSICS_LOCKED_ROTATION);
|
||||
if(func_802987B4() == 2)
|
||||
func_802978DC(6);
|
||||
player_setYVelocity(func_802987C4());
|
||||
gravity_set(func_802987E4());
|
||||
baphysics_set_type(BA_PHYSICS_AIRBORN);
|
||||
baphysics_set_vertical_velocity(func_802987C4());
|
||||
baphysics_set_gravity(func_802987E4());
|
||||
baMarker_collisionOff();
|
||||
func_80292E48();
|
||||
}
|
||||
@@ -749,7 +750,7 @@ void bsbtrot_ow_update(void){
|
||||
|
||||
void bsbtrot_ow_end(void){
|
||||
func_80297CA8();
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
baMarker_collisionOn();
|
||||
func_80292EA4();
|
||||
func_802A8BB0();
|
||||
|
@@ -3,6 +3,7 @@
|
||||
#include "variables.h"
|
||||
|
||||
#include "core2/ba/anim.h"
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
const f32 D_80364AD0 = 80.0f;
|
||||
const f32 D_80364AD4 = 425.0f;
|
||||
@@ -19,9 +20,9 @@ u8 D_8037D3B4;
|
||||
void func_802AA400(void){
|
||||
f32 sp1C = func_8029B30C();
|
||||
if(!func_8029B300()){
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
}else{
|
||||
func_80297970(ml_interpolate_f(sp1C, D_80364AD0, D_80364AD4));
|
||||
baphysics_set_target_horizontal_velocity(ml_interpolate_f(sp1C, D_80364AD0, D_80364AD4));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,8 +80,8 @@ void func_802AA58C(enum bs_e *arg0){
|
||||
|
||||
void bsbwhirl_enter_init(void){
|
||||
baanim_playForDuration_onceSmooth(ASSET_22_ANIM_BSWHIRL_EXIT, 0.5f);
|
||||
func_8029C7F4(1,1,1,2);
|
||||
func_80297970(0.0f);
|
||||
func_8029C7F4(1,1,1, BA_PHYSICS_NORMAL);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
func_8029B324(0, 0.03f);
|
||||
func_8029B324(1, 1.0f);
|
||||
func_8029E070(1);
|
||||
@@ -107,8 +108,8 @@ void bsbwhirl_enter_end(void){
|
||||
|
||||
void bsbwhirl_stand_init(void){
|
||||
baanim_playForDuration_loopSmooth(ASSET_23_ANIM_BSWONDERWING_IDLE, 1.0f);
|
||||
func_8029C7F4(1,1,1,2);
|
||||
func_80297970(0.0f);
|
||||
func_8029C7F4(1,1,1, BA_PHYSICS_NORMAL);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
}
|
||||
|
||||
void bsbwhirl_stand_update(void){
|
||||
@@ -134,8 +135,7 @@ void bsbwhirl_stand_end(void){
|
||||
void bsbwhirl_walk_init(void){
|
||||
baanim_playForDuration_loopSmooth(ASSET_11_ANIM_BSWHIRL_WALK, 0.53f);
|
||||
baanim_setVelocityMapRanges(D_80364AD0, D_80364AD4, D_80364AD8, D_80364ADC);
|
||||
func_8029C7F4(2,1,1,2);
|
||||
|
||||
func_8029C7F4(2,1,1, BA_PHYSICS_NORMAL);
|
||||
}
|
||||
|
||||
void bsbwhirl_walk_update(void){
|
||||
@@ -145,7 +145,7 @@ void bsbwhirl_walk_update(void){
|
||||
func_8029AD28(0.97f, 3);
|
||||
func_802AA400();
|
||||
|
||||
if(!func_8029B300() && func_80297C04(1.0f))
|
||||
if(!func_8029B300() && baphysics_is_slower_than(1.0f))
|
||||
sp1C = BS_1B_WONDERWING_IDLE;
|
||||
|
||||
if(button_released(BUTTON_Z))
|
||||
@@ -180,15 +180,15 @@ void bsbwhirl_jump_init(void){
|
||||
animctrl_setSubRange(aCtrl, 0.0f, 0.4495f);
|
||||
animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE);
|
||||
animctrl_start(aCtrl, "bsbwhirl.c", 0x181);
|
||||
func_8029C7F4(1,1,3,6);
|
||||
func_8029C7F4(1,1,3,BA_PHYSICS_AIRBORN);
|
||||
if(func_8029B2E8() != 0.0f)
|
||||
yaw_setIdeal(func_8029B33C());
|
||||
|
||||
func_8029797C(yaw_getIdeal());
|
||||
baphysics_set_target_yaw(yaw_getIdeal());
|
||||
func_802AA400();
|
||||
func_802979AC(yaw_getIdeal(), func_80297A64());
|
||||
player_setYVelocity(D_80364AE0);
|
||||
gravity_set(D_80364AE4);
|
||||
baphysics_set_horizontal_velocity(yaw_getIdeal(), baphysics_get_target_horizontal_velocity());
|
||||
baphysics_set_vertical_velocity(D_80364AE0);
|
||||
baphysics_set_gravity(D_80364AE4);
|
||||
func_80299B58(0.91f, 1.09f);
|
||||
D_8037D3B4 = 0;
|
||||
}
|
||||
@@ -200,9 +200,9 @@ void bsbwhirl_jump_update(void){
|
||||
|
||||
__bsbwhirl_spawnSparkle();
|
||||
func_802AA400();
|
||||
_get_velocity(&sp1C);
|
||||
baphysics_get_velocity(sp1C);
|
||||
if(button_released(BUTTON_A) && 0.0f < sp1C[1])
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
|
||||
switch(D_8037D3B4){
|
||||
case 0://L802AAB48
|
||||
@@ -236,7 +236,7 @@ void bsbwhirl_jump_update(void){
|
||||
}
|
||||
|
||||
void bsbwhirl_jump_end(void){
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
__bsbwhirl_end();
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ void bsbwhirl_exit_init(void){
|
||||
animctrl_start(aCtrl, "bsbwhirl.c", 0x201);
|
||||
baanim_setUpdateType(BAANIM_UPDATE_1_NORMAL);
|
||||
func_8029957C(2);
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
comusic_8025AB44(COMUSIC_25_USING_GOLD_FEATHERS, 0.0f, 0xFA0);
|
||||
}
|
||||
|
||||
@@ -285,8 +285,8 @@ void bsbwhirl_drone_end(void){
|
||||
|
||||
void func_802AADBC(void){
|
||||
baanim_playForDuration_loopSmooth(ASSET_23_ANIM_BSWONDERWING_IDLE, 1.0f);
|
||||
func_8029C7F4(1,1,3,2);
|
||||
func_80297970(0.0f);
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_NORMAL);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
func_8029C674();
|
||||
}
|
||||
|
||||
|
@@ -2,6 +2,8 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
/*.data*/
|
||||
const f32 D_80364990 = 400.0f;
|
||||
const f32 D_80364994 = -800.0f;
|
||||
@@ -62,11 +64,11 @@ void bsbbuster_init(void){
|
||||
animctrl_setSubRange(aCtrl, 0.0f, 0.35f);
|
||||
animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE);
|
||||
animctrl_start(aCtrl, "bsbbuster.c", 0x81);
|
||||
func_8029C7F4(1,1,3,6);
|
||||
gravity_set(0.0f);
|
||||
func_80297970(0.0f);
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_AIRBORN);
|
||||
baphysics_set_gravity(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
ml_vec3f_clear(sp20);
|
||||
func_80297A0C(sp20);
|
||||
baphysics_set_velocity(sp20);
|
||||
func_8029E070(1);
|
||||
func_802A02B4(0);
|
||||
D_8037D2B9 = 0;
|
||||
@@ -101,16 +103,16 @@ void bsbbuster_update(void){
|
||||
case 1://8029FE24
|
||||
D_8037D2B0 -= time_getDelta();
|
||||
if(D_8037D2B0 <= 0.0f){
|
||||
gravity_reset();
|
||||
func_80297BF8(D_803649A8);
|
||||
gravity_set(D_803649A4);
|
||||
player_setYVelocity(D_803649A0);
|
||||
baphysics_reset_gravity();
|
||||
baphysics_set_terminal_velocity(D_803649A8);
|
||||
baphysics_set_gravity(D_803649A4);
|
||||
baphysics_set_vertical_velocity(D_803649A0);
|
||||
D_8037D2B7 = 1;
|
||||
D_8037D2BA = 2;
|
||||
}
|
||||
break;
|
||||
case 2://8029FEA0
|
||||
if(D_8037D2B5 == 0 && _get_vertVelocity() < 0.0f){
|
||||
if(D_8037D2B5 == 0 && baphysics_get_vertical_velocity() < 0.0f){
|
||||
func_8030E760(SFX_45_KAZOOIE_HUGHH, 1.2f, 0x7530);
|
||||
D_8037D2B5++;
|
||||
}
|
||||
@@ -137,16 +139,16 @@ void bsbbuster_update(void){
|
||||
func_802BB3DC( 0, 45.0f, 0.71f);
|
||||
func_8029AE74(0);
|
||||
func_8029FB30();
|
||||
func_80297A0C(0);
|
||||
gravity_set(0.0f);
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_velocity(0);
|
||||
baphysics_set_gravity(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
D_8037D2B7 = 2;
|
||||
D_8037D2B8 = 1;
|
||||
D_8037D2B0 = 0.09f;
|
||||
D_8037D2BA = 3;
|
||||
_player_getPosition(player_position);
|
||||
func_8032728C(player_position, 150.0f, 2, func_8029FB20);
|
||||
if(func_802931DC(&sp3C)){
|
||||
if(bafalldamage_get_damage(&sp3C)){
|
||||
sp44 = BS_SPLAT;
|
||||
}
|
||||
}
|
||||
@@ -160,11 +162,11 @@ void bsbbuster_update(void){
|
||||
D_8037D2B0 -= time_getDelta();
|
||||
if(D_8037D2B0 <= 0.0f){
|
||||
if(D_8037D2BB){
|
||||
player_setYVelocity(D_80364990);
|
||||
gravity_set(D_80364994);
|
||||
baphysics_set_vertical_velocity(D_80364990);
|
||||
baphysics_set_gravity(D_80364994);
|
||||
}else{
|
||||
player_setYVelocity(D_80364998);
|
||||
gravity_set(D_8036499C);
|
||||
baphysics_set_vertical_velocity(D_80364998);
|
||||
baphysics_set_gravity(D_8036499C);
|
||||
}
|
||||
|
||||
animctrl_setSubRange(aCtrl, 0.0f, 0.7299f);
|
||||
@@ -196,8 +198,8 @@ void bsbbuster_update(void){
|
||||
}//L802A024C
|
||||
|
||||
void bsbbuster_end(void){
|
||||
gravity_reset();
|
||||
func_80297B94();
|
||||
baphysics_reset_gravity();
|
||||
baphysics_reset_terminal_velocity();
|
||||
func_8029E070(0);
|
||||
D_8037D2B7 = 0;
|
||||
D_8037D2B8 = 0;
|
||||
|
@@ -2,20 +2,18 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
|
||||
void func_80354030(f32*, f32);
|
||||
f32 func_8029B2E8(void);
|
||||
f32 func_8029B33C(void);
|
||||
void func_8029797C(f32);
|
||||
void func_80297970(f32);
|
||||
|
||||
void baModel_setYDisplacement(f32);
|
||||
void func_80297BF8(f32);
|
||||
void ncDynamicCam4_func_802BFE50(f32, f32, f32);
|
||||
void yaw_setVelocityBounded(f32, f32);
|
||||
f32 func_8029B2D0(void);
|
||||
f32 func_8029B2DC(void);
|
||||
f32 func_80297A64(void);
|
||||
void func_802979AC(f32, f32);
|
||||
void func_8028FDC8(f32);
|
||||
void func_80290B40(f32);
|
||||
void func_80290A6C(void);
|
||||
@@ -45,13 +43,13 @@ void func_802A04F0(void){
|
||||
void func_802A0590(void){
|
||||
func_802A0340();
|
||||
baanim_playForDuration_onceSmooth(0x1df, 1.5f);
|
||||
func_8029C7F4(1,1,3,6);
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_AIRBORN);
|
||||
if(func_8029B2E8() != 0.0f){
|
||||
yaw_setIdeal(func_8029B33C());
|
||||
}
|
||||
func_8029797C(yaw_getIdeal());
|
||||
func_80297970(0.0f);
|
||||
gravity_set(-1200.0f);
|
||||
baphysics_set_target_yaw(yaw_getIdeal());
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
baphysics_set_gravity(-1200.0f);
|
||||
D_8037D2C0 = 0;
|
||||
}
|
||||
|
||||
@@ -64,7 +62,7 @@ void func_802A0630(void){
|
||||
case 0:
|
||||
if(!animctrl_isAt(mvmnt, 0.266f))
|
||||
break;
|
||||
player_setYVelocity(1600.0f);
|
||||
baphysics_set_vertical_velocity(1600.0f);
|
||||
func_8030E58C(SFX_C_TAKING_FLIGHT_LIFTOFF, 0.7f);
|
||||
D_8037D2C0 = 1;
|
||||
break;
|
||||
@@ -72,7 +70,7 @@ void func_802A0630(void){
|
||||
func_802A04F0();
|
||||
if(animctrl_isStopped(mvmnt))
|
||||
baanim_playForDuration_loopSmooth(ASSET_1DC_ANIM_BEE_FLY, 0.38f);
|
||||
if(_get_vertVelocity() < 0.0f)
|
||||
if(baphysics_get_vertical_velocity() < 0.0f)
|
||||
next_state = BS_BEE_FLY;
|
||||
break;
|
||||
}
|
||||
@@ -98,8 +96,8 @@ void _bsbeefly_end(void){
|
||||
roll_setIdeal(0.0f);
|
||||
pitch_setIdeal(0.0f);
|
||||
func_80291548();
|
||||
gravity_reset();
|
||||
func_80297B94();
|
||||
baphysics_reset_gravity();
|
||||
baphysics_reset_terminal_velocity();
|
||||
func_8028FFBC(0);
|
||||
func_8029099C();
|
||||
}
|
||||
@@ -111,8 +109,8 @@ void func_802A07F8(void){
|
||||
yaw_setUpdateState(3);
|
||||
roll_setAngularVelocity(500.0f, 2.0f);
|
||||
func_802A0724();
|
||||
gravity_set(-300.0f);
|
||||
func_80297BF8(-99.9f);
|
||||
baphysics_set_gravity(-300.0f);
|
||||
baphysics_set_terminal_velocity(-99.9f);
|
||||
func_8028FEF0();
|
||||
func_8028FFBC(1);
|
||||
func_802909C4();
|
||||
@@ -153,13 +151,13 @@ void bsbeefly_enter(void){
|
||||
|
||||
mvmnt = bs_getPrevState();
|
||||
baanim_playForDuration_loopSmooth(ASSET_1DC_ANIM_BEE_FLY, 0.38);
|
||||
func_8029C7F4(1, 1, 3, 3);
|
||||
func_8029C7F4(1, 1, 3, BA_PHYSICS_LOCKED_ROTATION);
|
||||
if(miscflag_isTrue(9))
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
else
|
||||
func_80297970(600.0f);
|
||||
func_802979AC(yaw_getIdeal(), func_80297A64());
|
||||
func_8029797C(yaw_getIdeal());
|
||||
baphysics_set_target_horizontal_velocity(600.0f);
|
||||
baphysics_set_horizontal_velocity(yaw_getIdeal(), baphysics_get_target_horizontal_velocity());
|
||||
baphysics_set_target_yaw(yaw_getIdeal());
|
||||
func_802914CC(4);
|
||||
func_802A07F8();
|
||||
if(mvmnt != 0x8b){
|
||||
@@ -200,7 +198,7 @@ void bsbeefly_update(void){
|
||||
sp40 += *sp24;
|
||||
sp3C = pitch_get();
|
||||
sp30 = 0.0f;
|
||||
if(_get_vertVelocity() < 0.0f){
|
||||
if(baphysics_get_vertical_velocity() < 0.0f){
|
||||
if(sp3C < 300.0f){
|
||||
sp30 = ml_map_f(sp3C, 0.0f, 80.0f, 0.0f, 0.23f);
|
||||
}
|
||||
@@ -228,7 +226,7 @@ void bsbeefly_update(void){
|
||||
pitch_setIdeal(sp40);
|
||||
func_802A0750();
|
||||
if(sp44 != 0){
|
||||
player_setYVelocity(sp44*400.0);
|
||||
baphysics_set_vertical_velocity(sp44*400.0);
|
||||
func_802A04F0();
|
||||
}
|
||||
if((s32)sp24 == (s32)&D_803649C4){
|
||||
@@ -238,23 +236,23 @@ void bsbeefly_update(void){
|
||||
break;
|
||||
}//L802A0DF0
|
||||
if(miscflag_isTrue(9)){
|
||||
func_80297BF8(0.0f);
|
||||
func_80297A0C(0);
|
||||
baphysics_set_terminal_velocity(0.0f);
|
||||
baphysics_set_velocity(0);
|
||||
sp38 = 0.0f;
|
||||
}else{
|
||||
if(sp3C <= 80.0f){
|
||||
func_80297BF8(ml_map_f(sp3C, 60.0f, 80.0f, -99.9, -1266.66));
|
||||
baphysics_set_terminal_velocity(ml_map_f(sp3C, 60.0f, 80.0f, -99.9, -1266.66));
|
||||
sp38 = ml_map_f(sp3C, 60.0f, 80.0f, 600.0f, 60.0f);
|
||||
}else{
|
||||
func_80297BF8(ml_map_f(sp3C, 300.0f, 310.0f, -399.99, -99.9));
|
||||
baphysics_set_terminal_velocity(ml_map_f(sp3C, 300.0f, 310.0f, -399.99, -99.9));
|
||||
sp38 = ml_map_f(sp3C, 300.0f, 340.0f, 0.0f, 600.0f);
|
||||
}
|
||||
}
|
||||
func_8029797C(yaw_get());
|
||||
baphysics_set_target_yaw(yaw_get());
|
||||
if(button_held(9)){
|
||||
sp38 += (f64)sp38;
|
||||
}
|
||||
func_80297970(sp38);
|
||||
baphysics_set_target_horizontal_velocity(sp38);
|
||||
if(func_8028B2E8() && !player_inWater())
|
||||
sp4C = BS_85_BEE_IDLE;
|
||||
func_8028FFF0();
|
||||
|
@@ -2,13 +2,12 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
f32 func_8029B41C(void);
|
||||
void func_8029E3C0(s32, f32);
|
||||
void func_80299628(s32);
|
||||
void yaw_applyIdeal(void);
|
||||
void func_8029797C(f32);
|
||||
f32 func_80297A64(void);
|
||||
void func_802979AC(f32, f32);
|
||||
void ncDynamicCamD_func_802BF2C0(f32);
|
||||
|
||||
f32 baanim_getTimer(void);
|
||||
@@ -51,18 +50,18 @@ void func_802A1020(void){
|
||||
|
||||
sp1c = func_8029B30C();
|
||||
if(func_8029B300() == 0){
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
}
|
||||
else{
|
||||
func_80297970(ml_interpolate_f(sp1c, D_803649E0, D_803649E4));
|
||||
baphysics_set_target_horizontal_velocity(ml_interpolate_f(sp1c, D_803649E0, D_803649E4));
|
||||
}
|
||||
}
|
||||
|
||||
void func_802A1080(void){
|
||||
func_802A0340();
|
||||
baanim_playForDuration_loopSmooth(ASSET_1DE_ANIM_BEE_IDLE,3.0f);
|
||||
func_8029C7F4(1,1,1,2);
|
||||
func_80297970(0.0f);
|
||||
func_8029C7F4(1,1,1, BA_PHYSICS_NORMAL);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
func_802900B4();
|
||||
}
|
||||
|
||||
@@ -75,7 +74,7 @@ void func_802A10D4(void){
|
||||
s0 = 0x88;
|
||||
|
||||
if(func_80294F78())
|
||||
s0 = func_802926C0();
|
||||
s0 = badrone_look();
|
||||
|
||||
if(func_8029B300() > 0)
|
||||
s0 = BS_BEE_WALK;
|
||||
@@ -97,7 +96,7 @@ void func_802A117C(void){
|
||||
void func_802A11A4(void){
|
||||
func_802A0340();
|
||||
baanim_playForDuration_loopSmooth(ASSET_1DD_ANIM_BEE_WALK, 0.38f);
|
||||
func_8029C7F4(2,1,1,2);
|
||||
func_8029C7F4(2,1,1, BA_PHYSICS_NORMAL);
|
||||
baanim_setVelocityMapRanges(D_803649E0, D_803649E4, D_803649E8, D_803649EC);
|
||||
func_802900B4();
|
||||
}
|
||||
@@ -110,7 +109,7 @@ void func_802A1214(void){
|
||||
func_802A1020();
|
||||
func_8029AD28(0.94f, 4);
|
||||
func_8029AD28(0.44f, 3);
|
||||
if(func_8029B300() == 0 && func_80297C04(1.0f))
|
||||
if(func_8029B300() == 0 && baphysics_is_slower_than(1.0f))
|
||||
s0 = BS_85_BEE_IDLE;
|
||||
|
||||
if(func_8028B094())
|
||||
@@ -143,15 +142,15 @@ void func_802A12FC(void){
|
||||
animctrl_setDuration(s0, 1.2f);
|
||||
animctrl_setPlaybackType(s0, ANIMCTRL_ONCE);
|
||||
animctrl_start(s0, "bsbeemain.c", 0x15b);
|
||||
func_8029C7F4(1,1,3,6);
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_AIRBORN);
|
||||
if(func_8029B2E8() != 0.0f){
|
||||
yaw_setIdeal(func_8029B33C());
|
||||
}
|
||||
func_8029797C(yaw_getIdeal());
|
||||
baphysics_set_target_yaw(yaw_getIdeal());
|
||||
func_802A1020();
|
||||
func_802979AC(yaw_getIdeal(), func_80297A64());
|
||||
player_setYVelocity(D_803649F0);
|
||||
gravity_set(D_803649F4);
|
||||
baphysics_set_horizontal_velocity(yaw_getIdeal(), baphysics_get_target_horizontal_velocity());
|
||||
baphysics_set_vertical_velocity(D_803649F0);
|
||||
baphysics_set_gravity(D_803649F4);
|
||||
func_802A0FB4();
|
||||
D_8037D2D4 = 0;
|
||||
}
|
||||
@@ -164,9 +163,9 @@ void func_802A1438(void){
|
||||
sp2c = 0;
|
||||
sp28 = baanim_getAnimCtrlPtr();
|
||||
func_802A1020();
|
||||
_get_velocity(sp1c);
|
||||
baphysics_get_velocity(sp1c);
|
||||
if(button_released(BUTTON_A) && (0.0f < sp1c[1])){
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
}
|
||||
switch (D_8037D2D4)
|
||||
{
|
||||
@@ -198,7 +197,7 @@ void func_802A1438(void){
|
||||
case 3:
|
||||
func_80299628(0);
|
||||
if(animctrl_isStopped(sp28)){
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
sp2c = BS_85_BEE_IDLE;
|
||||
}
|
||||
break;
|
||||
@@ -222,7 +221,7 @@ void func_802A1438(void){
|
||||
|
||||
void func_802A163C(void){
|
||||
func_802A02C0();
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
}
|
||||
|
||||
void func_802A1664(void){
|
||||
@@ -237,7 +236,7 @@ void func_802A1664(void){
|
||||
animctrl_setSubRange(s0, 0, 0.51f);
|
||||
animctrl_setPlaybackType(s0, ANIMCTRL_ONCE);
|
||||
animctrl_start(s0, "bsbeemain.c", 0x1e2);
|
||||
func_8029C7F4(1,1,3,6);
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_AIRBORN);
|
||||
D_8037D2D4 = 0;
|
||||
}
|
||||
|
||||
@@ -250,7 +249,7 @@ void func_802A170C(void){
|
||||
sp28 = baanim_getAnimCtrlPtr();
|
||||
func_80299628(0);
|
||||
func_802A1020();
|
||||
_get_velocity(sp1c);
|
||||
baphysics_get_velocity(sp1c);
|
||||
switch(D_8037D2D4){
|
||||
case 0:
|
||||
if(func_8028B254(0x82)){
|
||||
@@ -262,7 +261,7 @@ void func_802A170C(void){
|
||||
func_80299628(0);
|
||||
if(func_8028B2E8()){
|
||||
func_802A0F90();
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
baanim_setEndAndDuration(1.0f, 0.7f);
|
||||
D_8037D2D4 = 2;
|
||||
}
|
||||
@@ -270,14 +269,14 @@ void func_802A170C(void){
|
||||
case 2:
|
||||
func_80299628(0);
|
||||
if(animctrl_isStopped(sp28)){
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
sp2c = BS_85_BEE_IDLE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if(func_8028B2E8()){
|
||||
if(miscflag_isTrue(0x19)){
|
||||
sp2c = func_80292738();
|
||||
sp2c = badrone_transform();
|
||||
}else{
|
||||
if(func_8029B300() > 0)
|
||||
sp2c = BS_BEE_WALK;
|
||||
@@ -325,12 +324,12 @@ void func_802A18E8(s32 arg0){
|
||||
func_80257F18(sp20, sp2C, &sp38);
|
||||
yaw_setIdeal(mlNormalizeAngle(sp38 + 180.0f));
|
||||
yaw_applyIdeal();
|
||||
func_80297970(200.0f);
|
||||
func_8029797C(sp38);
|
||||
func_802979AC(sp38, func_80297A64());
|
||||
func_8029C7F4(1, 1, 2, 3);
|
||||
player_setYVelocity(510.0f);
|
||||
gravity_set(-1200.0f);
|
||||
baphysics_set_target_horizontal_velocity(200.0f);
|
||||
baphysics_set_target_yaw(sp38);
|
||||
baphysics_set_horizontal_velocity(sp38, baphysics_get_target_horizontal_velocity());
|
||||
func_8029C7F4(1, 1, 2, BA_PHYSICS_LOCKED_ROTATION);
|
||||
baphysics_set_vertical_velocity(510.0f);
|
||||
baphysics_set_gravity(-1200.0f);
|
||||
baMarker_collisionOff();
|
||||
func_80292E48();
|
||||
D_8037D2D4 = 0;
|
||||
@@ -363,7 +362,7 @@ void func_802A1A50(void){
|
||||
|
||||
void func_802A1B28(void){
|
||||
func_80297CA8();
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
baMarker_collisionOn();
|
||||
func_80292EA4();
|
||||
func_802A02C0();
|
||||
@@ -409,18 +408,18 @@ void bsbeemain_die_init(void){
|
||||
animctrl_setDuration(sp3C, 1.7f);
|
||||
animctrl_setPlaybackType(sp3C, ANIMCTRL_ONCE);
|
||||
animctrl_start(sp3C, "bsbeemain.c", 0x2ef);
|
||||
func_8029C7F4(1,1,2,3);
|
||||
func_8029C7F4(1,1,2, BA_PHYSICS_LOCKED_ROTATION);
|
||||
_player_getPosition(sp2C);
|
||||
func_80294980(sp20);
|
||||
func_80257F18(sp20, sp2C, &sp38);
|
||||
yaw_setIdeal(mlNormalizeAngle(sp38 + 180.0f));
|
||||
yaw_applyIdeal();
|
||||
D_8037D2D0 = 250.f;
|
||||
func_80297970(D_8037D2D0);
|
||||
func_8029797C(sp38);
|
||||
func_802979AC(sp38, func_80297A64());
|
||||
player_setYVelocity(420.0f);
|
||||
gravity_set(-1200.0f);
|
||||
baphysics_set_target_horizontal_velocity(D_8037D2D0);
|
||||
baphysics_set_target_yaw(sp38);
|
||||
baphysics_set_horizontal_velocity(sp38, baphysics_get_target_horizontal_velocity());
|
||||
baphysics_set_vertical_velocity(420.0f);
|
||||
baphysics_set_gravity(-1200.0f);
|
||||
pitch_setAngVel(1000.0f, 12.0f);
|
||||
baMarker_collisionOff();
|
||||
func_80292E48();
|
||||
@@ -433,7 +432,7 @@ void bsbeemain_die_init(void){
|
||||
}
|
||||
|
||||
void func_802A1DD8(void){
|
||||
func_80297970(D_8037D2D0);
|
||||
baphysics_set_target_horizontal_velocity(D_8037D2D0);
|
||||
func_80299628(0);
|
||||
switch(D_8037D2D4){
|
||||
case 0:
|
||||
@@ -442,7 +441,7 @@ void func_802A1DD8(void){
|
||||
baanim_setEnd(0.7453f);
|
||||
FUNC_8030E624(SFX_1F_HITTING_AN_ENEMY_3, 0.8f, 18000);
|
||||
FUNC_8030E624(SFX_39_BANJO_AYE_2, 1.8f, 18000);
|
||||
player_setYVelocity(400.0f);
|
||||
baphysics_set_vertical_velocity(400.0f);
|
||||
D_8037D2D4 = 1;
|
||||
break;
|
||||
case 1:
|
||||
@@ -471,7 +470,7 @@ void func_802A1DD8(void){
|
||||
|
||||
void func_802A1F2C(void){
|
||||
func_8024BD08(0);
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
func_80291548();
|
||||
func_80292EA4();
|
||||
func_802A02C0();
|
||||
@@ -480,8 +479,8 @@ void func_802A1F2C(void){
|
||||
void func_802A1F6C(void){
|
||||
func_802A0340();
|
||||
baanim_playForDuration_loopSmooth(ASSET_1DE_ANIM_BEE_IDLE, 3.0f);
|
||||
func_8029C7F4(1,1,3,2);
|
||||
func_80297970(0.0f);
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_NORMAL);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
func_8029C674();
|
||||
func_802B3A50();
|
||||
}
|
||||
@@ -518,8 +517,8 @@ void func_802A2098(void){
|
||||
miscflag_clear(0x1A);
|
||||
baanim_playForDuration_loopSmooth(ASSET_1DE_ANIM_BEE_IDLE, 3.0f);
|
||||
yaw_setIdeal(func_8029B41C());
|
||||
func_8029C7F4(1,1,3,2);
|
||||
func_80297970(0.0f);
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_NORMAL);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
func_8024BD08(0);
|
||||
func_8025A2FC(0, 0xFA0);
|
||||
func_8025A6EC(COMUSIC_42_NOTEDOOR_OPENING_FANFARE, -1);
|
||||
|
@@ -4,6 +4,7 @@
|
||||
#include "bsint.h"
|
||||
#include "core2/statetimer.h"
|
||||
#include "core2/ba/anim.h"
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
/* .data */
|
||||
const f32 D_80364AF0 = 30.0f;
|
||||
@@ -14,9 +15,9 @@ const f32 D_80364AFC = 0.4f;
|
||||
void func_802AAE80(void){
|
||||
f32 sp1C = func_8029B30C();
|
||||
if(func_8029B300() == 0)
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
else
|
||||
func_80297970(ml_interpolate_f(sp1C, D_80364AF0, D_80364AF4));
|
||||
baphysics_set_target_horizontal_velocity(ml_interpolate_f(sp1C, D_80364AF0, D_80364AF4));
|
||||
}
|
||||
|
||||
void func_802AAEE0(void){
|
||||
@@ -34,8 +35,8 @@ void bscarry_idle_init(void){
|
||||
animctrl_setIndex(aCtrl, ASSET_72_ANIM_BSCARRY_IDLE);
|
||||
animctrl_setDuration(aCtrl, 1.2f);
|
||||
animctrl_start(aCtrl, "bscarry.c", 0x6f);
|
||||
func_8029C7F4(1,1,1,2);
|
||||
func_80297970(0.0f);
|
||||
func_8029C7F4(1,1,1, BA_PHYSICS_NORMAL);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
pitch_setAngVel(1000.0f, 12.0f);
|
||||
roll_setAngularVelocity(1000.0f, 12.0f);
|
||||
}
|
||||
@@ -46,7 +47,7 @@ void bscarry_idle_update(void){
|
||||
if(func_8029B300() > 0)
|
||||
sp1C = BS_3B_CARRY_WALK;
|
||||
|
||||
if(carriedobj_getMarker() == NULL)
|
||||
if(bacarry_get_marker() == NULL)
|
||||
sp1C = BS_1_IDLE;
|
||||
|
||||
bs_setState(sp1C);
|
||||
@@ -63,7 +64,7 @@ void bscarry_walk_init(void){
|
||||
animctrl_setDuration(aCtrl, 0.8f);
|
||||
animctrl_setPlaybackType(aCtrl, ANIMCTRL_LOOP);
|
||||
animctrl_start(aCtrl, "bscarry.c", 0xac);
|
||||
func_8029C7F4(2,1,1,2);
|
||||
func_8029C7F4(2,1,1, BA_PHYSICS_NORMAL);
|
||||
baanim_setVelocityMapRanges(D_80364AF0, D_80364AF4, D_80364AF8, D_80364AFC);
|
||||
}
|
||||
|
||||
@@ -72,10 +73,10 @@ void bscarry_walk_update(void){
|
||||
func_8029AD28(0.4f, 4);
|
||||
func_8029AD28(0.9f, 3);
|
||||
func_802AAE80();
|
||||
if(func_8029B300() == 0 && func_80297C04(1.0f))
|
||||
if(func_8029B300() == 0 && baphysics_is_slower_than(1.0f))
|
||||
sp1C = BS_3A_CARRY_IDLE;
|
||||
|
||||
if(carriedobj_getMarker() == NULL)
|
||||
if(bacarry_get_marker() == NULL)
|
||||
sp1C = BS_1_IDLE;
|
||||
|
||||
bs_setState(sp1C);
|
||||
@@ -93,7 +94,7 @@ int bscarry_inSet(enum bs_e state){
|
||||
void bscarry_interrupt(void){
|
||||
switch(bs_getInterruptType()){
|
||||
case 7:
|
||||
func_802948F8(baMarker_8028D688());
|
||||
bacarry_set_marker(baMarker_8028D688());
|
||||
break;
|
||||
case 8:
|
||||
func_8029A86C(2);
|
||||
@@ -112,7 +113,7 @@ void bscarry_interrupt(void){
|
||||
}
|
||||
break;
|
||||
default://L802AB260
|
||||
func_802948E0();
|
||||
bacarry_reset_marker();
|
||||
func_80296608();
|
||||
break;
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
|
||||
void func_802915CC(f32);
|
||||
@@ -17,9 +17,9 @@ int bsclaw_hitboxActive(void){
|
||||
|
||||
void bsclaw_init(void){
|
||||
baanim_playForDuration_once(ASSET_5_ANIM_BSPUNCH, 1.3f);
|
||||
func_8029C7F4(1,1,3,3);
|
||||
func_8029797C(yaw_getIdeal());
|
||||
func_80297970(160.0f);
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_LOCKED_ROTATION);
|
||||
baphysics_set_target_yaw(yaw_getIdeal());
|
||||
baphysics_set_target_horizontal_velocity(160.0f);
|
||||
func_802915CC(80.0f);
|
||||
_bsclawHitboxActive = 0;
|
||||
}
|
||||
@@ -37,7 +37,7 @@ void bsclaw_update(void){
|
||||
|| animctrl_isAt(aCtrl, 0.5788f)
|
||||
|| (0.4788 < sp24 && sp24 < 0.6788);
|
||||
if(animctrl_isAt(aCtrl, 0.5788f))
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
|
||||
func_8029AD28(0.08f, 3);
|
||||
func_8029AD28(0.34f, 4);
|
||||
|
@@ -2,6 +2,7 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "core2/ba/anim.h"
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
/* .bss */
|
||||
u8 D_8037D3D0;
|
||||
@@ -24,7 +25,7 @@ void func_802AB5C0(void){
|
||||
sp2C[0] = 0.0f;
|
||||
sp2C[1] = f2;
|
||||
sp2C[2] = 0.0f;
|
||||
func_80297930(sp2C);
|
||||
baphysics_set_target_velocity(sp2C);
|
||||
}
|
||||
|
||||
void func_802AB654(void){
|
||||
@@ -33,8 +34,8 @@ void func_802AB654(void){
|
||||
yaw_setVelocityBounded(500.0f, 15.0f);
|
||||
func_8029B324(0, 0.03f);
|
||||
func_8029B324(1, 1.0f);
|
||||
func_802978DC(0xA);
|
||||
func_80297B64(10.0f);
|
||||
baphysics_set_type(BA_PHYSICS_CLIMB);
|
||||
baphysics_set_acceleration(10.0f);
|
||||
func_80294378(5);
|
||||
func_80293D48(80.0f, 10.0f);
|
||||
func_802914CC(0x10);
|
||||
@@ -45,7 +46,7 @@ void func_802AB6F0(void){
|
||||
func_80291548();
|
||||
func_8029B0C0();
|
||||
baanim_setUpdateType(BAANIM_UPDATE_1_NORMAL);
|
||||
func_802978DC(2);
|
||||
baphysics_set_type(BA_PHYSICS_NORMAL);
|
||||
func_80294378(1);
|
||||
func_80293D74();
|
||||
}
|
||||
@@ -56,7 +57,7 @@ void func_802AB750(f32 arg0, f32 arg1){
|
||||
}
|
||||
|
||||
int func_802AB788(void){
|
||||
return (0.0f < mlAbsF(func_80297A70())) || (yaw_get() != yaw_getIdeal());
|
||||
return (0.0f < mlAbsF(baphysics_get_target_vertical_velocity())) || (yaw_get() != yaw_getIdeal());
|
||||
}
|
||||
|
||||
int bsclimb_inSet(s32 move_indx){
|
||||
@@ -90,7 +91,7 @@ void bsclimb_idle_init(void){
|
||||
void bsclimb_idle_update(void){
|
||||
s32 next_state = 0;
|
||||
AnimCtrl *anim_ctrl = baanim_getAnimCtrlPtr();
|
||||
func_80293350();
|
||||
bafalldamage_start();
|
||||
switch(D_8037D3D0){
|
||||
case 0:
|
||||
D_8037D3D4 -= time_getDelta();
|
||||
@@ -138,7 +139,7 @@ void bsclimb_move_update(void){
|
||||
f32 plyr_pos[3];
|
||||
s32 map;
|
||||
|
||||
func_80293350();
|
||||
bafalldamage_start();
|
||||
func_802AB5C0();
|
||||
map = map_get();
|
||||
|
||||
@@ -160,15 +161,15 @@ void bsclimb_move_update(void){
|
||||
func_80299D2C(SFX_D3_JINXIE_SNIFFLING_1, 0.87f, 22000);
|
||||
}//L802ABB84
|
||||
|
||||
if(!func_802AB788() && _get_vertVelocity() < 30.0f)
|
||||
if(!func_802AB788() && baphysics_get_vertical_velocity() < 30.0f)
|
||||
next_state = BS_4F_CLIMB_IDLE;
|
||||
|
||||
_player_getPosition(plyr_pos);
|
||||
if(func_80297A70() < 0.0f && climbGetBottomY() == plyr_pos[1])
|
||||
if(baphysics_get_target_vertical_velocity() < 0.0f && climbGetBottomY() == plyr_pos[1])
|
||||
next_state = BS_1_IDLE;
|
||||
|
||||
if( func_8029825C() == 2
|
||||
&& 0.0f < func_80297A70()
|
||||
&& 0.0f < baphysics_get_target_vertical_velocity()
|
||||
&& climbGetTopY() == plyr_pos[1]
|
||||
){
|
||||
next_state = BS_51_CLIMB_EXIT;
|
||||
@@ -194,7 +195,7 @@ void func_802ABCCC(void){
|
||||
baanim_playForDuration_loopSmooth(ASSET_B2_ANIM_BSCLIMB_IDLE_2, 2.64f);
|
||||
baanim_setUpdateType(BAANIM_UPDATE_1_NORMAL);
|
||||
func_802AB654();
|
||||
func_802978DC(7);
|
||||
baphysics_set_type(BA_PHYSICS_FREEZE);
|
||||
}
|
||||
|
||||
//bsclimb_unknown_9E_update
|
||||
|
@@ -3,6 +3,7 @@
|
||||
#include "variables.h"
|
||||
#include "core2/statetimer.h"
|
||||
#include "core2/ba/anim.h"
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
int bscroc_inSet(enum bs_e state);
|
||||
|
||||
@@ -68,10 +69,10 @@ void func_802ABE70(void){
|
||||
void func_802ABF54(void){
|
||||
f32 sp1C = func_8029B30C();
|
||||
if(func_8029B300() == 0){
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
}
|
||||
else{
|
||||
func_80297970(ml_interpolate_f(sp1C, bsCrocMinWalkVelocity, __bscroc_getMaxVelocity()));
|
||||
baphysics_set_target_horizontal_velocity(ml_interpolate_f(sp1C, bsCrocMinWalkVelocity, __bscroc_getMaxVelocity()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,8 +104,8 @@ int bscroc_inSet(enum bs_e state){
|
||||
|
||||
void bscroc_idle_init(void){
|
||||
baanim_playForDuration_loopSmooth(0xe1, 1.0f);
|
||||
func_8029C7F4(1,1,1,2);
|
||||
func_80297970(0.0f);
|
||||
func_8029C7F4(1,1,1, BA_PHYSICS_NORMAL);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
pitch_setAngVel(1000.0f, 12.0f);
|
||||
roll_setAngularVelocity(1000.0f, 12.0f);
|
||||
func_80293D48(50.0f, 25.0f);
|
||||
@@ -121,7 +122,7 @@ void bscroc_idle_update(void){
|
||||
next_state = BS_61_CROC_FALL;
|
||||
|
||||
if(func_80294F78())
|
||||
next_state = func_802926C0();
|
||||
next_state = badrone_look();
|
||||
|
||||
if(func_8029B300() > 0)
|
||||
next_state = BS_CROC_WALK;
|
||||
@@ -144,7 +145,7 @@ void bscroc_idle_end(void){
|
||||
|
||||
void bscroc_walk_init(void){
|
||||
baanim_playForDuration_loopStartingAt(ASSET_E0_ANIM_BSCROC_WALK, 0.8f, 0.4f);
|
||||
func_8029C7F4(BAANIM_UPDATE_2_SCALE_HORZ,1,1,2);
|
||||
func_8029C7F4(BAANIM_UPDATE_2_SCALE_HORZ, 1, 1, BA_PHYSICS_NORMAL);
|
||||
baanim_setVelocityMapRanges(bsCrocMinWalkVelocity, bsCrocMaxWalkVelocity, bsCrocSlowestWalkDuration, bsCrocFastestWalkDuration);
|
||||
func_802900B4();
|
||||
}
|
||||
@@ -158,7 +159,7 @@ void bscroc_walk_update(void){
|
||||
|
||||
func_8029AD28(0.1f, 4);
|
||||
func_8029AD28(0.6f, 3);
|
||||
if(func_8029B300() == 0 && func_80297C04(1.0f))
|
||||
if(func_8029B300() == 0 && baphysics_is_slower_than(1.0f))
|
||||
next_state = BS_5E_CROC_IDLE;
|
||||
|
||||
if(func_8028B094())
|
||||
@@ -189,15 +190,15 @@ void bscroc_jump_init(void){
|
||||
animctrl_setStart(aCtrl, 0.1f);
|
||||
animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE);
|
||||
animctrl_start(aCtrl, "bscroc.c", 0x1ac);
|
||||
func_8029C7F4(1,1,3,6);
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_AIRBORN);
|
||||
if(func_8029B2E8() != 0.0f){
|
||||
yaw_setIdeal(func_8029B33C());
|
||||
}
|
||||
func_8029797C(yaw_getIdeal());
|
||||
baphysics_set_target_yaw(yaw_getIdeal());
|
||||
func_802ABF54();
|
||||
func_802979AC(yaw_getIdeal(), func_80297A64());
|
||||
player_setYVelocity(bsCrocInitialJumpVelocity);
|
||||
gravity_set(bsCrocGravity);
|
||||
baphysics_set_horizontal_velocity(yaw_getIdeal(), baphysics_get_target_horizontal_velocity());
|
||||
baphysics_set_vertical_velocity(bsCrocInitialJumpVelocity);
|
||||
baphysics_set_gravity(bsCrocGravity);
|
||||
__bscroc_jumpSfx();
|
||||
D_8037D3EC = 0;
|
||||
}
|
||||
@@ -209,9 +210,9 @@ void bscroc_jump_update(void){
|
||||
|
||||
func_802ABE70();
|
||||
func_802ABF54();
|
||||
_get_velocity(player_velocity);
|
||||
baphysics_get_velocity(player_velocity);
|
||||
if(button_released(BUTTON_A) && 0.0f < player_velocity[1])
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
|
||||
switch(D_8037D3EC){
|
||||
case 0:
|
||||
@@ -243,7 +244,7 @@ void bscroc_jump_update(void){
|
||||
case 3:
|
||||
func_80299628(0);
|
||||
if(animctrl_isStopped(aCtrl)){
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
sp2C = BS_5E_CROC_IDLE;
|
||||
}
|
||||
break;
|
||||
@@ -264,7 +265,7 @@ void bscroc_jump_update(void){
|
||||
}
|
||||
|
||||
void bscroc_jump_end(void){
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
func_802ABFBC();
|
||||
}
|
||||
|
||||
@@ -277,7 +278,7 @@ void bscroc_fall_init(void){
|
||||
animctrl_setDuration(aCtrl, 0.7f);
|
||||
animctrl_setPlaybackType(aCtrl, ANIMCTRL_STOPPED);
|
||||
animctrl_start(aCtrl, "bscroc.c", 0x235);
|
||||
func_8029C7F4(1,1,3,6);
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_AIRBORN);
|
||||
D_8037D3EC = 0;
|
||||
}
|
||||
|
||||
@@ -289,7 +290,7 @@ void bscroc_fall_update(void){
|
||||
func_802ABE70();
|
||||
func_80299628(0);
|
||||
func_802ABF54();
|
||||
_get_velocity(player_velocity);
|
||||
baphysics_get_velocity(player_velocity);
|
||||
|
||||
switch(D_8037D3EC){
|
||||
case 0:
|
||||
@@ -301,7 +302,7 @@ void bscroc_fall_update(void){
|
||||
case 1:
|
||||
if(func_8028B2E8()){
|
||||
func_8029AE48();
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
baanim_setEndAndDuration(1.0f, 1.0f);
|
||||
D_8037D3EC = 2;
|
||||
}
|
||||
@@ -312,7 +313,7 @@ void bscroc_fall_update(void){
|
||||
if(func_8028B2E8()){
|
||||
if(func_8029B300() > 0 || (D_8037D3EC == 2 && animctrl_isStopped(aCtrl))){
|
||||
if(miscflag_isTrue(0x19)){
|
||||
next_state = func_80292738();
|
||||
next_state = badrone_transform();
|
||||
}else{
|
||||
next_state = BS_5E_CROC_IDLE;
|
||||
}
|
||||
@@ -348,12 +349,12 @@ static void __bscroc_recoil_init(s32 damage){
|
||||
func_80257F18(sp20, player_position, &sp38);
|
||||
yaw_setIdeal(mlNormalizeAngle(sp38 + 180.0f));
|
||||
yaw_applyIdeal();
|
||||
func_80297970(200.0f);
|
||||
func_8029797C(sp38);
|
||||
func_802979AC(sp38, func_80297A64());
|
||||
func_8029C7F4(1,1,2,3);
|
||||
player_setYVelocity(510.0f);
|
||||
gravity_set(-1200.0f);
|
||||
baphysics_set_target_horizontal_velocity(200.0f);
|
||||
baphysics_set_target_yaw(sp38);
|
||||
baphysics_set_horizontal_velocity(sp38, baphysics_get_target_horizontal_velocity());
|
||||
func_8029C7F4(1,1,2, BA_PHYSICS_LOCKED_ROTATION);
|
||||
baphysics_set_vertical_velocity(510.0f);
|
||||
baphysics_set_gravity(-1200.0f);
|
||||
baMarker_collisionOff();
|
||||
func_80292E48();
|
||||
D_8037D3EC = 0;
|
||||
@@ -383,7 +384,7 @@ static void __bscroc_recoil_update(void){
|
||||
|
||||
void __bscroc_recoil_end(void){
|
||||
func_80297CA8();
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
baMarker_collisionOn();
|
||||
func_80292EA4();
|
||||
func_802ABFBC();
|
||||
@@ -427,18 +428,18 @@ void bscroc_die_init(void){
|
||||
animctrl_setDuration(aCtrl, 1.7f);
|
||||
animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE);
|
||||
animctrl_start(aCtrl, "bscroc.c", 0x32b);
|
||||
func_8029C7F4(1,1,2,3);
|
||||
func_8029C7F4(1,1,2, BA_PHYSICS_LOCKED_ROTATION);
|
||||
_player_getPosition(player_position);
|
||||
func_80294980(sp20);
|
||||
func_80257F18(sp20, player_position, &sp38);
|
||||
yaw_setIdeal(mlNormalizeAngle(sp38 + 180.0f));
|
||||
yaw_applyIdeal();
|
||||
D_8037D3E0 = 250.0f;
|
||||
func_80297970(D_8037D3E0);
|
||||
func_8029797C(sp38);
|
||||
func_802979AC(sp38, func_80297A64());
|
||||
player_setYVelocity(420.0f);
|
||||
gravity_set(-1200.0f);
|
||||
baphysics_set_target_horizontal_velocity(D_8037D3E0);
|
||||
baphysics_set_target_yaw(sp38);
|
||||
baphysics_set_horizontal_velocity(sp38, baphysics_get_target_horizontal_velocity());
|
||||
baphysics_set_vertical_velocity(420.0f);
|
||||
baphysics_set_gravity(-1200.0f);
|
||||
pitch_setAngVel(1000.0f, 12.0f);
|
||||
baMarker_collisionOff();
|
||||
func_80292E48();
|
||||
@@ -453,7 +454,7 @@ void bscroc_die_init(void){
|
||||
void bscroc_die_update(void){
|
||||
enum bs_e next_state = 0;
|
||||
func_802ABE70();
|
||||
func_80297970(D_8037D3E0);
|
||||
baphysics_set_target_horizontal_velocity(D_8037D3E0);
|
||||
func_80299628(0);
|
||||
switch(D_8037D3EC){
|
||||
case 0:
|
||||
@@ -461,7 +462,7 @@ void bscroc_die_update(void){
|
||||
baanim_setEnd(0.7453f);
|
||||
FUNC_8030E624(SFX_1F_HITTING_AN_ENEMY_3, 0.8f, 18000);
|
||||
FUNC_8030E624(SFX_39_BANJO_AYE_2, 1.8f, 18000);
|
||||
player_setYVelocity(400.0f);
|
||||
baphysics_set_vertical_velocity(400.0f);
|
||||
D_8037D3EC = 1;
|
||||
}
|
||||
break;
|
||||
@@ -490,7 +491,7 @@ void bscroc_die_update(void){
|
||||
|
||||
void bscroc_die_end(void){
|
||||
func_8024BD08(0);
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
pitch_setIdeal(0.0f);
|
||||
roll_setIdeal(0.0f);
|
||||
func_80291548();
|
||||
@@ -507,12 +508,12 @@ static void func_802ACF58(void){
|
||||
sp2C = func_8028B2E8() ? 500.0f : 400.0f;
|
||||
func_802589E4(sp20, yaw_get(), sp2C);
|
||||
sp20[1] = 200.0f;
|
||||
func_80297A0C(sp20);
|
||||
baphysics_set_velocity(sp20);
|
||||
}
|
||||
|
||||
void bscroc_bite_init(void){
|
||||
baanim_playForDuration_loopStartingAt(ASSET_122_ANIM_BSCROC_BITE, 0.25f, 0.2f);
|
||||
func_8029C7F4(1,1,1,3);
|
||||
func_8029C7F4(1,1,1, BA_PHYSICS_LOCKED_ROTATION);
|
||||
func_802ACF58();
|
||||
D_8037D3F4 = 0;
|
||||
_bscrocHitboxActive = TRUE;
|
||||
@@ -561,8 +562,8 @@ void bscroc_bite_end(void){
|
||||
|
||||
void bscroc_eat_bad_init(void){
|
||||
baanim_playForDuration_once(ASSET_123_ANIM_BSCROC_EAT_BAD, 2.41f);
|
||||
func_8029C7F4(1,1,2,3);
|
||||
func_80297970(0.0f);
|
||||
func_8029C7F4(1,1,2, BA_PHYSICS_LOCKED_ROTATION);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
}
|
||||
|
||||
void bscroc_eat_bad_update(void){
|
||||
@@ -612,7 +613,7 @@ void func_802AD318(void){
|
||||
|
||||
void bscroc_eat_good_init(void){
|
||||
baanim_playForDuration_loopSmooth(ASSET_122_ANIM_BSCROC_BITE, 0.25f);
|
||||
func_8029C7F4(1,1,1,2);
|
||||
func_8029C7F4(1,1,1, BA_PHYSICS_NORMAL);
|
||||
baModel_setPostDraw(func_802AD2A8);
|
||||
D_8037D3E8 = assetcache_get(func_80294974());
|
||||
D_8037D3F0 = 1.0f;
|
||||
@@ -668,8 +669,8 @@ void bscroc_eat_good_end(void){
|
||||
|
||||
void func_802AD56C(void){
|
||||
baanim_playForDuration_loopSmooth(ASSET_E1_ANIM_BSCROC_IDLE, 1.0f);
|
||||
func_8029C7F4(1,1,3,2);
|
||||
func_80297970(0.0f);
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_NORMAL);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
func_8029C674();
|
||||
func_802B3A50();
|
||||
}
|
||||
|
@@ -2,6 +2,7 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "core2/ba/anim.h"
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
/* .bss */
|
||||
f32 D_8037D400;
|
||||
@@ -62,16 +63,16 @@ void bscrouch_init(void){
|
||||
yaw_setVelocityBounded(350.0f, 14.0f);
|
||||
func_8029957C(7);
|
||||
func_8029932C(8.0f);
|
||||
func_802978DC(3);
|
||||
baphysics_set_type(BA_PHYSICS_LOCKED_ROTATION);
|
||||
func_8029E3C0(0, 0.7f);
|
||||
func_8029E3C0(1, 0.2f);
|
||||
_get_velocity(&sp28);
|
||||
baphysics_get_velocity(sp28);
|
||||
D_8037D400 = gu_sqrtf(sp28[0]*sp28[0] + sp28[2]*sp28[2]);
|
||||
if(140.0f < D_8037D400)
|
||||
func_80299AAC();
|
||||
|
||||
if(func_8025801C(sp28, &sp20))
|
||||
func_8029797C(sp20);
|
||||
baphysics_set_target_yaw(sp20);
|
||||
|
||||
D_8037D404 = 0;
|
||||
}
|
||||
@@ -88,7 +89,7 @@ void bscrouch_update(void){
|
||||
func_8029E1A8(1);
|
||||
|
||||
sp30 = ml_map_f(func_8029E270(0), 0.0f, 0.3f, 0.0f, D_8037D400);
|
||||
func_80297970(sp30);
|
||||
baphysics_set_target_horizontal_velocity(sp30);
|
||||
if(220.0f < sp30)
|
||||
func_802929F8();
|
||||
if(160.0f < sp30)
|
||||
|
@@ -2,6 +2,7 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "core2/ba/anim.h"
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
/* .bss */
|
||||
f32 D_8037D410;
|
||||
@@ -41,15 +42,15 @@ void bsdie_init(void){
|
||||
D_8037D410 = 250.0f;
|
||||
yaw_setIdeal(mlNormalizeAngle(sp38 + 180.0f));
|
||||
yaw_applyIdeal();
|
||||
func_80297970(D_8037D410);
|
||||
func_8029797C(sp38);
|
||||
func_802979AC(sp38, func_80297A64());
|
||||
baphysics_set_target_horizontal_velocity(D_8037D410);
|
||||
baphysics_set_target_yaw(sp38);
|
||||
baphysics_set_horizontal_velocity(sp38, baphysics_get_target_horizontal_velocity());
|
||||
baanim_setUpdateType(BAANIM_UPDATE_1_NORMAL);
|
||||
yaw_setUpdateState(1);
|
||||
func_8029957C(2);
|
||||
func_802978DC(3);
|
||||
player_setYVelocity(510.0f);
|
||||
gravity_set(-1400.0f);
|
||||
baphysics_set_type(BA_PHYSICS_LOCKED_ROTATION);
|
||||
baphysics_set_vertical_velocity(510.0f);
|
||||
baphysics_set_gravity(-1400.0f);
|
||||
pitch_setAngVel(1000.0f, 12.0f);
|
||||
func_8029E070(1);
|
||||
func_8029151C(0xd);
|
||||
@@ -64,14 +65,14 @@ void bsdie_init(void){
|
||||
void bsdie_update(void){
|
||||
AnimCtrl *aCtrl = baanim_getAnimCtrlPtr();
|
||||
enum bs_e sp28 = 0;
|
||||
func_80297970(D_8037D410);
|
||||
baphysics_set_target_horizontal_velocity(D_8037D410);
|
||||
func_80299628(0);
|
||||
switch(D_8037D414){
|
||||
case 0://L802AE0B8
|
||||
if(_bsdie_802ADE00()){
|
||||
animctrl_setSubRange(aCtrl, 0.0f, 1.0f);
|
||||
animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE);
|
||||
player_setYVelocity(400.0f);
|
||||
baphysics_set_vertical_velocity(400.0f);
|
||||
func_80299DB8();
|
||||
FUNC_8030E624(SFX_39_BANJO_AYE_2, 1.0f, 18000);
|
||||
rumbleManager_80250D94(1.0f, 1.0f, 0.4f);
|
||||
@@ -124,7 +125,7 @@ void bsdie_update(void){
|
||||
|
||||
void bsdie_end(void){
|
||||
func_8024BD08(0);
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
func_8029E070(0);
|
||||
pitch_setIdeal(0.0f);
|
||||
roll_setIdeal(0.0f);
|
||||
|
@@ -3,17 +3,20 @@
|
||||
#include "variables.h"
|
||||
#include "bsint.h"
|
||||
|
||||
#include "core2/ba/drone.h"
|
||||
|
||||
typedef struct{
|
||||
u8 unk0;
|
||||
u8 type;
|
||||
bsState behavior;
|
||||
} struct_drone;
|
||||
|
||||
struct_drone D_80364B30[] = {
|
||||
{01, {func_802AEDE8, func_802AEE48, func_802AEE9C, NULL}},
|
||||
{02, {bsDroneLook_init, bsDroneLook_update, bsDroneLook_end, func_80296608}},
|
||||
{04, {bsdronexform_init, bsdronexform_update, bsdronexform_end, bsdronexform_interrupt}},
|
||||
{05, {bsDroneEnter_init, bsDroneEnter_update, bsDroneEnter_end, NULL}},
|
||||
{06, {bsDroneVanish_init, bsDroneVanish_update, bsDroneVanish_end, NULL}},
|
||||
{BA_DRONE_GOTO, {bsDroneGoTo_init, bsDroneGoTo_update, bsDroneGoTo_end, NULL}},
|
||||
{BA_DRONE_LOOK, {bsDroneLook_init, bsDroneLook_update, bsDroneLook_end, func_80296608}},
|
||||
// {BA_DRONE_UNKNOWN_3, {NULL, NULL, NULL, NULL}}, //unused drone type?
|
||||
{BA_DRONE_TRANSFORM, {bsdronexform_init, bsdronexform_update, bsdronexform_end, bsdronexform_interrupt}},
|
||||
{BA_DRONE_ENTER, {bsDroneEnter_init, bsDroneEnter_update, bsDroneEnter_end, NULL}},
|
||||
{BA_DRONE_VANISH, {bsDroneVanish_init, bsDroneVanish_update, bsDroneVanish_end, NULL}},
|
||||
{0}
|
||||
};
|
||||
|
||||
@@ -21,9 +24,9 @@ struct_drone D_80364B30[] = {
|
||||
|
||||
static int __bsdrone_getIndex(void){
|
||||
int i;
|
||||
int val = func_802925EC();
|
||||
for(i = 0; D_80364B30[i].unk0 != 0; i++){
|
||||
if(val == D_80364B30[i].unk0)
|
||||
int val = badrone_get_type();
|
||||
for(i = 0; D_80364B30[i].type != 0; i++){
|
||||
if(val == D_80364B30[i].type)
|
||||
return i;
|
||||
}
|
||||
return 0;
|
||||
|
@@ -1,6 +1,8 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
|
||||
enum bsdroneenter_state_e{
|
||||
BSDRONEENTER_SUBSTATE_0_UNINITIALIZED,
|
||||
@@ -108,7 +110,7 @@ void bsDroneEnter_init(void) {
|
||||
|
||||
func_8029BCF8(&anim_id, &anim_duration);
|
||||
baanim_playForDuration_loopSmooth(anim_id, anim_duration);
|
||||
func_8029C7F4(1, 1, 3, 7);
|
||||
func_8029C7F4(1, 1, 3, BA_PHYSICS_FREEZE);
|
||||
func_80294378(6);
|
||||
__bsDroneEnter_init();
|
||||
bsDroneEnterSubstate = BSDRONEENTER_SUBSTATE_0_UNINITIALIZED;
|
||||
|
@@ -2,10 +2,11 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
void func_80297BB8(f32);
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
|
||||
/* .bss */
|
||||
u8 D_8037D440;
|
||||
u8 bsdronetogo_substate;
|
||||
u8 D_8037D441;
|
||||
|
||||
void func_802AEC08(void);
|
||||
@@ -13,8 +14,8 @@ void func_802AEC70(void);
|
||||
void func_802AEC78(void);
|
||||
void func_802AEDC8(void);
|
||||
|
||||
void func_802AEB60(s32 arg0){
|
||||
switch(D_8037D440){
|
||||
static void __bsDroneGoTo_set_substate(s32 arg0){
|
||||
switch(bsdronetogo_substate){
|
||||
case 1:
|
||||
func_802AEC70();
|
||||
break;
|
||||
@@ -22,7 +23,7 @@ void func_802AEB60(s32 arg0){
|
||||
func_802AEDC8();
|
||||
break;
|
||||
}
|
||||
switch(D_8037D440 = arg0){
|
||||
switch(bsdronetogo_substate = arg0){
|
||||
case 1:
|
||||
func_802AEC08();
|
||||
break;
|
||||
@@ -34,27 +35,27 @@ void func_802AEB60(s32 arg0){
|
||||
}
|
||||
|
||||
void func_802AEC08(void){
|
||||
func_802978A4();
|
||||
baphysics_reset_horizontal_velocity();
|
||||
}
|
||||
|
||||
void func_802AEC28(void){
|
||||
func_802978A4();
|
||||
baphysics_reset_horizontal_velocity();
|
||||
if(func_8028B2E8() || player_inWater())
|
||||
func_802AEB60(2);
|
||||
__bsDroneGoTo_set_substate(2);
|
||||
}
|
||||
|
||||
void func_802AEC70(void){}
|
||||
|
||||
void func_802AEC78(void){
|
||||
f32 sp2C;
|
||||
f32 sp20[3];
|
||||
s32 sp1C;
|
||||
func_8029BC60(&sp1C, &sp2C);
|
||||
baanim_playForDuration_loopSmooth(sp1C, sp2C);
|
||||
func_802925F8(&sp20, &sp2C);
|
||||
func_80297BC4(&sp20);
|
||||
func_80297BB8(sp2C);
|
||||
func_8029C7F4(1,1,3,0xC);
|
||||
f32 duration_s;
|
||||
f32 target_position[3];
|
||||
s32 anim_id;
|
||||
func_8029BC60(&anim_id, &duration_s);
|
||||
baanim_playForDuration_loopSmooth(anim_id, duration_s);
|
||||
badrone_get_position_and_duration(target_position, &duration_s);
|
||||
baphysics_set_goto_position(target_position);
|
||||
baphysics_set_goto_duration(duration_s);
|
||||
func_8029C7F4(1,1,3,BA_PHYSICS_GOTO);
|
||||
func_8029436C(1);
|
||||
D_8037D441 = 0;
|
||||
}
|
||||
@@ -64,7 +65,7 @@ void func_802AECE4(void){
|
||||
f32 sp20[3];
|
||||
AnimCtrl *aCtrl = baanim_getAnimCtrlPtr();
|
||||
|
||||
_get_velocity(&sp20);
|
||||
baphysics_get_velocity(sp20);
|
||||
if(func_8025801C(sp20, &sp2C)){
|
||||
yaw_setIdeal(sp2C);
|
||||
}
|
||||
@@ -77,9 +78,9 @@ void func_802AECE4(void){
|
||||
animctrl_start(aCtrl, "bsdronegoto.c", 0x9d);
|
||||
}
|
||||
|
||||
if(func_80297C48() && D_8037D441 == 0){
|
||||
if(baphysics_goto_done() && D_8037D441 == 0){
|
||||
D_8037D441++;
|
||||
func_80292768();
|
||||
badrone_goto_end();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,19 +88,19 @@ void func_802AEDC8(void){
|
||||
func_8029436C(0);
|
||||
}
|
||||
|
||||
void func_802AEDE8(void){
|
||||
D_8037D440 = 0;
|
||||
void bsDroneGoTo_init(void){
|
||||
bsdronetogo_substate = 0;
|
||||
func_8031F9F4(1);
|
||||
if( !func_8028B2E8() && func_8029BDE8()){
|
||||
func_802AEB60(1);
|
||||
__bsDroneGoTo_set_substate(1);
|
||||
}else{
|
||||
func_802AEB60(2);
|
||||
__bsDroneGoTo_set_substate(2);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void func_802AEE48(void){
|
||||
switch(D_8037D440){
|
||||
void bsDroneGoTo_update(void){
|
||||
switch(bsdronetogo_substate){
|
||||
case 1:
|
||||
func_802AEC28();
|
||||
break;
|
||||
@@ -109,7 +110,7 @@ void func_802AEE48(void){
|
||||
}
|
||||
}
|
||||
|
||||
void func_802AEE9C(void){
|
||||
func_802AEB60(0);
|
||||
void bsDroneGoTo_end(void){
|
||||
__bsDroneGoTo_set_substate(0);
|
||||
func_8031F9F4(0);
|
||||
}
|
||||
|
@@ -1,6 +1,7 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
extern f32 func_8029B2D0(void);
|
||||
|
||||
@@ -18,9 +19,9 @@ void bsDroneLook_init(void) {
|
||||
func_80299D2C(SFX_12D_CAMERA_ZOOM_CLOSEST, 1.2f, 12000);
|
||||
func_8029BCF8(&anim_id, &anim_duration);
|
||||
baanim_playForDuration_loopSmooth(anim_id, anim_duration);
|
||||
func_8029C7F4(1, 1, 3, 2);
|
||||
func_80297970(0.0f);
|
||||
func_80297A0C(0);
|
||||
func_8029C7F4(1, 1, 3, BA_PHYSICS_NORMAL);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
baphysics_set_velocity(0);
|
||||
ncDynamicCamera_enterFirstPerson();
|
||||
__bsDroneLook_getEyePos(eye_position);
|
||||
ncFirstPersonCamera_setZoomedOutPosition(eye_position);
|
||||
@@ -42,6 +43,7 @@ void bsDroneLook_update(void) {
|
||||
next_state = 0;
|
||||
dt = time_getDelta();
|
||||
if (ncFirstPersonCamera_getState() == 2) {
|
||||
//camera is in "idle" state
|
||||
ncFirstPersonCamera_getZoomedInRotation(eye_rotation);
|
||||
eye_rotation[0] -= func_8029B2DC() * 90.0f * dt;
|
||||
eye_rotation[1] -= func_8029B2D0() * 90.0f * dt;
|
||||
@@ -49,10 +51,13 @@ void bsDroneLook_update(void) {
|
||||
eye_rotation[0] = (eye_rotation[0] > 180.0f) ? ml_max_f(305.0f, eye_rotation[0]) : ml_min_f(70.0f, eye_rotation[0]);
|
||||
ncFirstPersonCamera_setZoomedOutRotation(eye_rotation);
|
||||
yaw_setIdeal(eye_rotation[1] + 180.0f);
|
||||
|
||||
exit_first_person = FALSE;
|
||||
// 1st person cancelled via input
|
||||
if (button_pressed(BUTTON_B) || button_pressed(BUTTON_A) || button_pressed(BUTTON_C_UP)) {
|
||||
exit_first_person = TRUE;
|
||||
}
|
||||
// 1st person cancelled via entering water
|
||||
if (player_inWater()) {
|
||||
if (player_getTransformation() == TRANSFORM_1_BANJO && func_8028EE84() == BSWATERGROUP_0_NONE) {
|
||||
exit_first_person += TRUE;
|
||||
|
@@ -2,6 +2,8 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
/* .bss */
|
||||
struct {
|
||||
ParticleEmitter *unk0;
|
||||
@@ -10,6 +12,7 @@ struct {
|
||||
f32 unkC;
|
||||
f32 unk10;
|
||||
}D_8037D450;
|
||||
u32 pad_8037D464;
|
||||
u8 D_8037D468;
|
||||
|
||||
/* .code */
|
||||
@@ -93,7 +96,7 @@ void bsDroneVanish_init(void){
|
||||
|
||||
func_8029BCF8(&anim_id, &anim_duration);
|
||||
baanim_playForDuration_loopSmooth(anim_id, anim_duration);
|
||||
func_8029C7F4(1,1,3,7);
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_FREEZE);
|
||||
func_80294378(6);
|
||||
__bsDroneVanish_init();
|
||||
D_8037D468 = 0;
|
||||
|
@@ -1,10 +1,11 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
|
||||
extern void player_setYPosition(f32);
|
||||
extern void yaw_applyIdeal(void);
|
||||
extern void func_802978DC(int);
|
||||
extern f32 func_80257A44(f32, f32);
|
||||
extern f32 cosf(f32);
|
||||
extern f32 ml_remainder_f(f32, f32);
|
||||
@@ -260,14 +261,14 @@ static void __bsdronexform_setState(int next_state){
|
||||
func_802AFBA0(180.0f);
|
||||
func_802AFBAC(0.04f);
|
||||
func_802B01B0(0.05f);
|
||||
func_802978DC(7);
|
||||
baphysics_set_type(BA_PHYSICS_FREEZE);
|
||||
func_8029E3C0(0, 2.8f);
|
||||
FUNC_8030E624(SFX_17E_MUMBO_TRANSFORMATION_01, 1.0f, 15000);
|
||||
break;
|
||||
|
||||
case 2:// 802B02A8
|
||||
func_8029E3C0(0, 0.5f);
|
||||
func_802978DC(0xb);
|
||||
baphysics_set_type(BA_PHYSICS_TRANSFORM);
|
||||
break;
|
||||
|
||||
case 3:// 802B02C4
|
||||
@@ -314,7 +315,7 @@ static void __bsdronexform_setState(int next_state){
|
||||
case 9:// 802B0438
|
||||
D_8037D470.unk1C = 0;
|
||||
func_8029E3C0(0, 0.7f);
|
||||
func_802978DC(7);
|
||||
baphysics_set_type(BA_PHYSICS_FREEZE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -324,9 +325,9 @@ void bsdronexform_init(void){
|
||||
enum asset_e sp18;
|
||||
func_8029BCAC(&sp18, &sp1C);
|
||||
baanim_playForDuration_loopSmooth(sp18, sp1C);
|
||||
func_8029C7F4(1,1,3,7);
|
||||
func_80297A0C(0);
|
||||
func_80297930(0);
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_FREEZE);
|
||||
baphysics_set_velocity(0);
|
||||
baphysics_set_target_velocity(0);
|
||||
pitch_setIdeal(0.0f);
|
||||
roll_setIdeal(0.0f);
|
||||
func_80294378(6);
|
||||
|
@@ -2,6 +2,8 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
/* .bss */
|
||||
u8 D_8037D4B0;
|
||||
u8 D_8037D4B1;
|
||||
@@ -28,8 +30,8 @@ void bsjig_jiggy_init(void){
|
||||
animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE);
|
||||
animctrl_start(aCtrl, "bsjig.c", 0x7f);
|
||||
yaw_setIdeal(func_8029B41C()); //face camera
|
||||
func_8029C7F4(1,1,3,2);
|
||||
func_80297970(0.0f);
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_NORMAL);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
func_8024BD08(0);
|
||||
func_8025A2FC(0,0xfa0);
|
||||
tmp = (item_getCount(ITEM_E_JIGGY) == 9);
|
||||
@@ -169,8 +171,8 @@ void bsjig_notedoor_init(void){
|
||||
animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE);
|
||||
animctrl_start(aCtrl, "bsjig.c", 0x14d);
|
||||
yaw_setIdeal(func_8029B41C());
|
||||
func_8029C7F4(1,1,3,2);
|
||||
func_80297970(0.0f);
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_NORMAL);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
if(bs_getPrevState() != BS_44_JIG_JIGGY){
|
||||
func_8024BD08(0);
|
||||
func_8025A2FC(0,0xfa0);
|
||||
|
@@ -5,10 +5,9 @@
|
||||
#include "core2/ba/model.h"
|
||||
#include "core2/ba/anim.h"
|
||||
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
f32 func_80294438(void);
|
||||
void func_8029797C(f32);
|
||||
void func_802979AC(f32, f32);
|
||||
f32 func_80297A64(void);
|
||||
void func_80299B58(f32, f32);
|
||||
f32 func_8029B2E8(void);
|
||||
f32 func_8029B33C(void);
|
||||
@@ -59,19 +58,19 @@ void bsjump_init(void){
|
||||
animctrl_setSubRange(aCtrl, 0.0f, 0.5042f);
|
||||
animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE);
|
||||
animctrl_start(aCtrl, "bsjump.c", 0x95);
|
||||
func_8029C7F4(1,1,3,6);
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_AIRBORN);
|
||||
if(func_8029B2E8() != 0.0f){
|
||||
yaw_setIdeal(func_8029B33C());
|
||||
}
|
||||
func_8029797C(yaw_getIdeal());
|
||||
baphysics_set_target_yaw(yaw_getIdeal());
|
||||
func_802B6FA8();
|
||||
func_802979AC(yaw_getIdeal(), func_80297A64());
|
||||
baphysics_set_horizontal_velocity(yaw_getIdeal(), baphysics_get_target_horizontal_velocity());
|
||||
if(D_8037D4C1){
|
||||
player_setYVelocity(D_80364CE4);
|
||||
baphysics_set_vertical_velocity(D_80364CE4);
|
||||
} else {
|
||||
player_setYVelocity(D_80364CD0);
|
||||
baphysics_set_vertical_velocity(D_80364CD0);
|
||||
}
|
||||
gravity_set(D_80364CD4);
|
||||
baphysics_set_gravity(D_80364CD4);
|
||||
D_8037D4C0 = 0;
|
||||
if(D_8037D4C2){
|
||||
func_8030E6D4(SFX_33_BANJO_AHOO);
|
||||
@@ -91,14 +90,14 @@ void bsjump_update(void){
|
||||
func_8029C348();
|
||||
|
||||
if(miscflag_isTrue(0xf)){
|
||||
func_802978A4();
|
||||
baphysics_reset_horizontal_velocity();
|
||||
}else{
|
||||
func_802B6FA8();
|
||||
}
|
||||
|
||||
_get_velocity(velocity);
|
||||
baphysics_get_velocity(velocity);
|
||||
if((button_released(BUTTON_A) && 0.0f < velocity[1] && !D_8037D4C2) || !can_control_jump_height()){
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
}
|
||||
|
||||
switch(D_8037D4C0){
|
||||
@@ -166,15 +165,15 @@ void bsjump_end(void){
|
||||
ability_use(0);
|
||||
|
||||
if(bs_getNextState() != BS_11_BPECK)
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
}
|
||||
|
||||
void bsjump_fall_init(void){
|
||||
AnimCtrl *aCtrl = baanim_getAnimCtrlPtr();
|
||||
int sp20;
|
||||
|
||||
if(miscflag_isTrue(7) && 700.0f < _get_vertVelocity())
|
||||
player_setYVelocity(700.0f);
|
||||
if(miscflag_isTrue(7) && 700.0f < baphysics_get_vertical_velocity())
|
||||
baphysics_set_vertical_velocity(700.0f);
|
||||
|
||||
sp20 = (bs_getPrevState() == BS_12_BFLIP)? 0 : 1;
|
||||
animctrl_reset(aCtrl);
|
||||
@@ -183,7 +182,7 @@ void bsjump_fall_init(void){
|
||||
animctrl_setTransitionDuration(aCtrl, 0.3f);
|
||||
animctrl_setDuration(aCtrl, 0.38f);
|
||||
animctrl_start(aCtrl, "bsjump.c", 0x188);
|
||||
func_8029C7F4(1,1,3,6);
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_AIRBORN);
|
||||
D_8037D4C0 = 0;
|
||||
}
|
||||
|
||||
@@ -193,11 +192,11 @@ void bsjump_fall_update(void){
|
||||
f32 player_velocity[3];
|
||||
|
||||
if(miscflag_isTrue(0xf))
|
||||
func_802978A4();
|
||||
baphysics_reset_horizontal_velocity();
|
||||
else
|
||||
func_802B6FA8();
|
||||
|
||||
_get_velocity(player_velocity);
|
||||
baphysics_get_velocity(player_velocity);
|
||||
|
||||
switch(D_8037D4C0){
|
||||
case 0://L802B17B8
|
||||
@@ -264,12 +263,12 @@ void func_802B1928(void) {
|
||||
baanim_setUpdateType(BAANIM_UPDATE_1_NORMAL);
|
||||
yaw_setUpdateState(1);
|
||||
func_8029957C(3);
|
||||
func_802978DC(3);
|
||||
func_8029797C(yaw_getIdeal());
|
||||
func_80297970(60.0f);
|
||||
func_802979AC(yaw_getIdeal(), func_80297A64());
|
||||
player_setYVelocity(D_80364CDC);
|
||||
gravity_set(D_80364CE0);
|
||||
baphysics_set_type(BA_PHYSICS_LOCKED_ROTATION);
|
||||
baphysics_set_target_yaw(yaw_getIdeal());
|
||||
baphysics_set_target_horizontal_velocity(60.0f);
|
||||
baphysics_set_horizontal_velocity(yaw_getIdeal(), baphysics_get_target_horizontal_velocity());
|
||||
baphysics_set_vertical_velocity(D_80364CDC);
|
||||
baphysics_set_gravity(D_80364CE0);
|
||||
func_80294378(6);
|
||||
D_8037D4C0 = 0;
|
||||
func_802B1100();
|
||||
@@ -282,7 +281,7 @@ void func_802B1A54(void) {
|
||||
|
||||
next_state = 0;
|
||||
anim_ctrl = baanim_getAnimCtrlPtr();
|
||||
_get_velocity(velocity);
|
||||
baphysics_get_velocity(velocity);
|
||||
if (velocity[1] < 0.0f) {
|
||||
func_80294378(1);
|
||||
}
|
||||
@@ -321,7 +320,7 @@ void func_802B1A54(void) {
|
||||
|
||||
void func_802B1BCC(void){
|
||||
func_80294378(1);
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
}
|
||||
|
||||
void func_802B1BF4(void) {
|
||||
@@ -345,9 +344,9 @@ void func_802B1BF4(void) {
|
||||
baanim_setUpdateType(BAANIM_UPDATE_1_NORMAL);
|
||||
yaw_setUpdateState(1);
|
||||
func_8029957C(3);
|
||||
func_802978DC(6);
|
||||
func_80297970(0.0f);
|
||||
func_80297A0C(0);
|
||||
baphysics_set_type(BA_PHYSICS_AIRBORN);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
baphysics_set_velocity(0);
|
||||
D_8037D4C0 = 0;
|
||||
baMarker_collisionOff();
|
||||
}
|
||||
@@ -359,7 +358,7 @@ void func_802B1CF8(void) {
|
||||
|
||||
next_state = 0;
|
||||
anim_ctrl = baanim_getAnimCtrlPtr();
|
||||
_get_velocity(velocity);
|
||||
baphysics_get_velocity(velocity);
|
||||
switch (D_8037D4C0) {
|
||||
case 0:
|
||||
if (func_8028B254(90)) {
|
||||
@@ -388,9 +387,9 @@ bool bsjump_jumpingFromWater(void){
|
||||
|
||||
void bsjump_tumble_init(void){
|
||||
baanim_playForDuration_loop(ASSET_68_ANIM_BSJUMP_TUMBLE, 0.35f);
|
||||
func_8029C7F4(1,1,3,6);
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_AIRBORN);
|
||||
baModel_setYDisplacement(60.0f);
|
||||
if(func_80293234() == 1){
|
||||
if(bafalldamage_get_state() == 1){
|
||||
func_8029E3C0(0, 0.5f);
|
||||
func_8029E3C0(1, 0.41f);
|
||||
func_80299CF4(SFX_52_BANJO_YAH_OH, 1.0f, 22000);
|
||||
@@ -437,7 +436,7 @@ void bsjump_tumble_end(void){
|
||||
|| next_state == BS_BFLAP
|
||||
|| next_state == BS_11_BPECK
|
||||
){
|
||||
func_80293240(3);
|
||||
bafalldamage_set_state(3);
|
||||
}
|
||||
func_8029CB84();
|
||||
baModel_setYDisplacement(0.0f);
|
||||
|
@@ -2,6 +2,8 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
void func_802B37DC(void);
|
||||
|
||||
/* .bss */
|
||||
@@ -54,7 +56,7 @@ void bsow_update(void) {
|
||||
if (func_8028B2E8() != 0) {
|
||||
sp1C = BS_2_WALK_SLOW;
|
||||
}
|
||||
if ((player_inWater() != 0) && (_get_vertVelocity() <= 0.0f)) {
|
||||
if ((player_inWater() != 0) && (baphysics_get_vertical_velocity() <= 0.0f)) {
|
||||
sp1C = BS_4C_LANDING_IN_WATER;
|
||||
}
|
||||
|
||||
@@ -65,7 +67,7 @@ void bsow_end(void){
|
||||
func_802B35DC();
|
||||
func_802B1FD0(0);
|
||||
func_80297CA8();
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
baMarker_collisionOn();
|
||||
func_80292EA4();
|
||||
}
|
||||
|
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "core2/ba/model.h"
|
||||
#include "core2/ba/anim.h"
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
extern void baanim_playForDuration_loop(s32, f32);
|
||||
extern void func_8029AD68(f32, s32);
|
||||
@@ -43,10 +44,10 @@ void func_802B223C(void) {
|
||||
|
||||
sp1C = func_8029B30C();
|
||||
if (func_8029B300() == 0) {
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
return;
|
||||
}
|
||||
func_80297970(ml_interpolate_f(sp1C, D_80364CF0, D_80364CF4));
|
||||
baphysics_set_target_horizontal_velocity(ml_interpolate_f(sp1C, D_80364CF0, D_80364CF4));
|
||||
}
|
||||
|
||||
void func_802B229C(void) {
|
||||
@@ -74,8 +75,8 @@ int bspumpkin_inSet(s32 move_indx){
|
||||
|
||||
void bspumpkin_idle_init(void) {
|
||||
baanim_playForDuration_loop(ASSET_A0_ANIM_BSPUMPKIN_WALK, 0.8f);
|
||||
func_8029C7F4(1, 1, 1, 2);
|
||||
func_80297970(0.0f);
|
||||
func_8029C7F4(1, 1, 1, BA_PHYSICS_NORMAL);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
pitch_setAngVel(1000.0f, 12.0f);
|
||||
roll_setAngularVelocity(1000.0f, 12.0f);
|
||||
func_80293D48(50.0f, 25.0f);
|
||||
@@ -92,7 +93,7 @@ void bspumpkin_idle_update(void) {
|
||||
next_state = BS_4B_PUMPKIN_FALL;
|
||||
}
|
||||
if (func_80294F78()) {
|
||||
next_state = func_802926C0();
|
||||
next_state = badrone_look();
|
||||
}
|
||||
if (func_8029B300() > 0) {
|
||||
next_state = BS_49_PUMPKIN_WALK;
|
||||
@@ -118,7 +119,7 @@ void bspumpkin_walk_init(void) {
|
||||
animctrl_setDuration(anim_ctrl, 0.8f);
|
||||
animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_LOOP);
|
||||
animctrl_start(anim_ctrl, "bspumpkin.c", 0x11D);
|
||||
func_8029C7F4(2, 1, 1, 2);
|
||||
func_8029C7F4(2, 1, 1, BA_PHYSICS_NORMAL);
|
||||
baanim_setVelocityMapRanges(D_80364CF0, D_80364CF4, D_80364CF8, D_80364CFC);
|
||||
func_802900B4();
|
||||
}
|
||||
@@ -130,7 +131,7 @@ void bspumpkin_walk_update(void) {
|
||||
next_state = 0;
|
||||
func_802B223C();
|
||||
func_8029AD68(0.3f, 4);
|
||||
if ((func_8029B300() == 0) && func_80297C04(1.0f)) {
|
||||
if ((func_8029B300() == 0) && baphysics_is_slower_than(1.0f)) {
|
||||
next_state = BS_48_PUMPKIN_IDLE;
|
||||
}
|
||||
if (func_8028B094()) {
|
||||
@@ -157,15 +158,15 @@ void bspumpkin_jump_init(void) {
|
||||
animctrl_setDuration(anim_ctrl, 1.2f);
|
||||
animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE);
|
||||
animctrl_start(anim_ctrl, "bspumpkin.c", 0x16C);
|
||||
func_8029C7F4(1, 1, 3, 6);
|
||||
func_8029C7F4(1, 1, 3, BA_PHYSICS_AIRBORN);
|
||||
if (func_8029B2E8() != 0.0f) {
|
||||
yaw_setIdeal(func_8029B33C());
|
||||
}
|
||||
func_8029797C(yaw_getIdeal());
|
||||
baphysics_set_target_yaw(yaw_getIdeal());
|
||||
func_802B223C();
|
||||
func_802979AC(yaw_getIdeal(), func_80297A64());
|
||||
player_setYVelocity(D_80364D00);
|
||||
gravity_set(D_80364D04);
|
||||
baphysics_set_horizontal_velocity(yaw_getIdeal(), baphysics_get_target_horizontal_velocity());
|
||||
baphysics_set_vertical_velocity(D_80364D00);
|
||||
baphysics_set_gravity(D_80364D04);
|
||||
func_802B21D0();
|
||||
D_8037D4E0 = 0;
|
||||
}
|
||||
@@ -178,13 +179,13 @@ void bspumpkin_jump_update(void) {
|
||||
next_state = 0;
|
||||
anim_ctrl = baanim_getAnimCtrlPtr();
|
||||
func_802B223C();
|
||||
_get_velocity(sp1C);
|
||||
baphysics_get_velocity(sp1C);
|
||||
if (button_released(BUTTON_A) && sp1C[1] > 0.0f) {
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
}
|
||||
switch (D_8037D4E0) {
|
||||
case 0:
|
||||
if (_get_vertVelocity() < 0.0f) {
|
||||
if (baphysics_get_vertical_velocity() < 0.0f) {
|
||||
if (func_8028B254(130)) {
|
||||
func_80292E48();
|
||||
animctrl_setDuration(anim_ctrl, 0.7f);
|
||||
@@ -218,7 +219,7 @@ void bspumpkin_jump_update(void) {
|
||||
case 3:
|
||||
if (animctrl_isStopped(anim_ctrl)) {
|
||||
func_80292EA4();
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
next_state = BS_48_PUMPKIN_IDLE;
|
||||
}
|
||||
break;
|
||||
@@ -236,7 +237,7 @@ void bspumpkin_jump_update(void) {
|
||||
|
||||
void bspumpkin_jump_end(void){
|
||||
func_80292EA4();
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
func_802B229C();
|
||||
}
|
||||
|
||||
@@ -251,7 +252,7 @@ void bspumpkin_fall_init(void) {
|
||||
animctrl_setDuration(anim_ctrl, 0.7f);
|
||||
animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_STOPPED);
|
||||
animctrl_start(anim_ctrl, "bspumpkin.c", 0x1F1);
|
||||
func_8029C7F4(1, 1, 3, 6);
|
||||
func_8029C7F4(1, 1, 3, BA_PHYSICS_AIRBORN);
|
||||
D_8037D4E0 = 0;
|
||||
}
|
||||
|
||||
@@ -266,7 +267,7 @@ void bspumpkin_fall_update(void) {
|
||||
if (D_8037D4E4) {
|
||||
func_802B223C();
|
||||
}
|
||||
_get_velocity(sp1C);
|
||||
baphysics_get_velocity(sp1C);
|
||||
switch (D_8037D4E0) {
|
||||
case 0:
|
||||
if (func_8028B254(130)) {
|
||||
@@ -278,7 +279,7 @@ void bspumpkin_fall_update(void) {
|
||||
case 1:
|
||||
if (func_8028B2E8()) {
|
||||
func_8029AE48();
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
animctrl_setSubRange(anim_ctrl, 0.0f, 1.0f);
|
||||
animctrl_setDuration(anim_ctrl, 1.2f);
|
||||
animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE);
|
||||
@@ -290,7 +291,7 @@ void bspumpkin_fall_update(void) {
|
||||
}
|
||||
if (func_8028B2E8() && ((func_8029B300() > 0) || (D_8037D4E0 == 2 && animctrl_isStopped(anim_ctrl)))) {
|
||||
if (miscflag_isTrue(0x19)) {
|
||||
next_state = func_80292738();
|
||||
next_state = badrone_transform();
|
||||
} else {
|
||||
next_state = BS_48_PUMPKIN_IDLE;
|
||||
}
|
||||
@@ -306,7 +307,7 @@ void func_802B2BF0(void) {
|
||||
func_8029656C(D_8037D4E8);
|
||||
func_8028FAB0(D_8037D4E8);
|
||||
baanim_playForDuration_loop(ASSET_A0_ANIM_BSPUMPKIN_WALK, 0.8f);
|
||||
func_8029C7F4(1, 1, 2, 7);
|
||||
func_8029C7F4(1, 1, 2, BA_PHYSICS_FREEZE);
|
||||
func_80294378(6);
|
||||
func_8029E3C0(0, 0.0f);
|
||||
}
|
||||
@@ -357,12 +358,12 @@ void __bspumpkin_bounce_init(s32 arg0) {
|
||||
func_80257F18(sp20, plyr_pos, &sp38);
|
||||
yaw_setIdeal(mlNormalizeAngle(sp38 + 180.0f));
|
||||
yaw_applyIdeal();
|
||||
func_80297970(200.0f);
|
||||
func_8029797C(sp38);
|
||||
func_802979AC(sp38, func_80297A64());
|
||||
func_8029C7F4(1, 1, 2, 3);
|
||||
player_setYVelocity(510.0f);
|
||||
gravity_set(-1200.0f);
|
||||
baphysics_set_target_horizontal_velocity(200.0f);
|
||||
baphysics_set_target_yaw(sp38);
|
||||
baphysics_set_horizontal_velocity(sp38, baphysics_get_target_horizontal_velocity());
|
||||
func_8029C7F4(1, 1, 2, BA_PHYSICS_LOCKED_ROTATION);
|
||||
baphysics_set_vertical_velocity(510.0f);
|
||||
baphysics_set_gravity(-1200.0f);
|
||||
baMarker_collisionOff();
|
||||
func_80292E48();
|
||||
D_8037D4E0 = 0;
|
||||
@@ -394,7 +395,7 @@ void __bspumpkin_bounce_update(void) {
|
||||
|
||||
void __bspumpkin_bounce_end(void) {
|
||||
func_80297CA8();
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
baMarker_collisionOn();
|
||||
func_80292EA4();
|
||||
func_802B229C();
|
||||
@@ -446,12 +447,12 @@ void bspumpkin_die_init(void) {
|
||||
D_8037D4F4 = 250.0f;
|
||||
yaw_setIdeal(mlNormalizeAngle(sp38 + 180.0f));
|
||||
yaw_applyIdeal();
|
||||
func_80297970(D_8037D4F4);
|
||||
func_8029797C(sp38);
|
||||
func_802979AC(sp38, func_80297A64());
|
||||
func_8029C7F4(1, 1, 2, 3);
|
||||
player_setYVelocity(510.0f);
|
||||
gravity_set(-1200.0f);
|
||||
baphysics_set_target_horizontal_velocity(D_8037D4F4);
|
||||
baphysics_set_target_yaw(sp38);
|
||||
baphysics_set_horizontal_velocity(sp38, baphysics_get_target_horizontal_velocity());
|
||||
func_8029C7F4(1, 1, 2, BA_PHYSICS_LOCKED_ROTATION);
|
||||
baphysics_set_vertical_velocity(510.0f);
|
||||
baphysics_set_gravity(-1200.0f);
|
||||
pitch_setAngVel(1000.0f, 12.0f);
|
||||
func_802914CC(0xD);
|
||||
ncDynamicCamD_func_802BF2C0(30.0f);
|
||||
@@ -463,7 +464,7 @@ void bspumpkin_die_init(void) {
|
||||
}
|
||||
|
||||
void bspumpkin_die_update(void){
|
||||
func_80297970(D_8037D4F4);
|
||||
baphysics_set_target_horizontal_velocity(D_8037D4F4);
|
||||
func_80299628(0);
|
||||
switch(D_8037D4E0){
|
||||
case 0://L802B3284
|
||||
@@ -485,7 +486,7 @@ void bspumpkin_die_update(void){
|
||||
|
||||
case 2://L802B3300
|
||||
if(baanim_isStopped()) {
|
||||
player_setYVelocity(400.0f);
|
||||
baphysics_set_vertical_velocity(400.0f);
|
||||
baanim_setEnd(0.355f);
|
||||
D_8037D4E0 = 3;
|
||||
}
|
||||
@@ -524,7 +525,7 @@ void bspumpkin_die_update(void){
|
||||
void bspumpkin_die_end(void) {
|
||||
func_802B229C();
|
||||
func_8024BD08(0);
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
pitch_setIdeal(0.0f);
|
||||
roll_setIdeal(0.0f);
|
||||
func_80292EA4();
|
||||
@@ -533,8 +534,8 @@ void bspumpkin_die_end(void) {
|
||||
|
||||
void func_802B34A0(void) {
|
||||
baanim_playForDuration_loopSmooth(0xA0, 0.8f);
|
||||
func_8029C7F4(1, 1, 3, 2);
|
||||
func_80297970(0.0f);
|
||||
func_8029C7F4(1, 1, 3, BA_PHYSICS_NORMAL);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
func_8029C674();
|
||||
func_802B3A50();
|
||||
}
|
||||
|
@@ -2,9 +2,10 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
extern f32 func_80296548(void);
|
||||
extern f32 func_8029653C(void);
|
||||
extern f32 func_80297A4C(void);
|
||||
extern f32 func_8029B56C(f32, f32, f32, f32);
|
||||
|
||||
/* .bss */
|
||||
@@ -18,7 +19,7 @@ void func_802B35D0(s32 arg0){
|
||||
|
||||
void func_802B35DC(void) {
|
||||
if (D_8037D500 == 1) {
|
||||
func_80297A0C(0);
|
||||
baphysics_set_velocity(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,31 +38,31 @@ void func_802B360C(void) {
|
||||
func_80257F18(sp38, sp2C, &sp28);
|
||||
if ((sp1C == 0xE) || (sp1C == 0x10)) {
|
||||
func_802B35D0(1);
|
||||
func_8029C7F4(1, 1, 2, 1);
|
||||
func_8029C7F4(1, 1, 2, BA_PHYSICS_UNK1);
|
||||
yaw_setIdeal(mlNormalizeAngle(sp28));
|
||||
gravity_set(func_80296548());
|
||||
baphysics_set_gravity(func_80296548());
|
||||
sp20 = func_8029653C();
|
||||
sp24 = func_8029B56C(sp2C[1], sp38[1], sp20, func_80297A4C());
|
||||
sp24 = func_8029B56C(sp2C[1], sp38[1], sp20, baphysics_get_gravity());
|
||||
ml_vec3f_diff_copy(sp44, sp38, sp2C);
|
||||
D_8037D504 = sp24;
|
||||
sp44[0] /= sp24;
|
||||
sp44[1] /= sp24;
|
||||
sp44[2] /= sp24;
|
||||
sp44[1] = sp20;
|
||||
func_80297A0C(sp44);
|
||||
baphysics_set_velocity(sp44);
|
||||
func_8029E3C0(6, sp24);
|
||||
} else {
|
||||
func_802B35D0(0);
|
||||
func_80298760(sp1C);
|
||||
yaw_setIdeal(mlNormalizeAngle(sp28 + 180.0f));
|
||||
func_80297970(func_802987D4());
|
||||
func_8029797C(sp28);
|
||||
func_802979AC(sp28, func_80297A64());
|
||||
player_setYVelocity(func_802987C4());
|
||||
gravity_set(func_802987E4());
|
||||
func_8029C7F4(1, 1, 2, 3);
|
||||
baphysics_set_target_horizontal_velocity(func_802987D4());
|
||||
baphysics_set_target_yaw(sp28);
|
||||
baphysics_set_horizontal_velocity(sp28, baphysics_get_target_horizontal_velocity());
|
||||
baphysics_set_vertical_velocity(func_802987C4());
|
||||
baphysics_set_gravity(func_802987E4());
|
||||
func_8029C7F4(1, 1, 2, BA_PHYSICS_LOCKED_ROTATION);
|
||||
if (func_802987B4() == 2) {
|
||||
func_802978DC(6);
|
||||
baphysics_set_type(BA_PHYSICS_AIRBORN);
|
||||
}
|
||||
}
|
||||
yaw_applyIdeal();
|
||||
@@ -72,11 +73,11 @@ void func_802B37DC(void) {
|
||||
|
||||
if (D_8037D500 != 0) {
|
||||
if ((D_8037D500 == 1) && func_8029E1A8(6)) {
|
||||
_get_velocity(velocity);
|
||||
baphysics_get_velocity(velocity);
|
||||
velocity[0] = 0.0f;
|
||||
velocity[2] = 0.0f;
|
||||
func_80297A0C(velocity);
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_velocity(velocity);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
}
|
||||
} else if (func_802987B4() == 2) {
|
||||
func_802B6FA8();
|
||||
@@ -132,6 +133,6 @@ void func_802B3954(void) {
|
||||
|
||||
void func_802B3A20(void) {
|
||||
func_802B35DC();
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
baMarker_collisionOn();
|
||||
}
|
||||
|
@@ -2,6 +2,7 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
void func_802B3A50(void) {
|
||||
f32 sp34;
|
||||
@@ -40,8 +41,8 @@ void func_802B3AAC(enum asset_e anim_id, f32 anim_duration) {
|
||||
} else {
|
||||
baanim_playForDuration_loopSmooth(anim_id, anim_duration);
|
||||
}
|
||||
func_8029C7F4(1, 1, 3, 2);
|
||||
func_80297970(0.0f);
|
||||
func_8029C7F4(1, 1, 3, BA_PHYSICS_NORMAL);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
func_802B3A50();
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,8 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
|
||||
ActorMarker *bssled_gSledMarker;
|
||||
|
||||
@@ -25,8 +27,8 @@ void func_802B3F60(void){
|
||||
void bssled_init(void){
|
||||
func_802B3F20();
|
||||
baanim_playForDuration_loopSmooth(ASSET_228_ANIM_BANJO_SLED, 1.8f);
|
||||
func_8029C7F4(1, 1, 3, 7);
|
||||
func_80297970(0.0f);
|
||||
func_8029C7F4(1, 1, 3, BA_PHYSICS_FREEZE);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
func_80294A8C(0);
|
||||
func_80294378(6);
|
||||
}
|
||||
|
@@ -2,6 +2,8 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
/* .bss */
|
||||
s32 D_8037D520;
|
||||
s32 D_8037D524;
|
||||
@@ -66,11 +68,11 @@ void bsslide_init(void){
|
||||
animctrl_setPlaybackType(aCtrl, ANIMCTRL_STOPPED);
|
||||
animctrl_setDuration(aCtrl, 1.0f);
|
||||
animctrl_start(aCtrl, "bsslide.c", 0x7f);
|
||||
func_8029C7F4(1,1,3,3);
|
||||
func_8029797C(yaw_getIdeal());
|
||||
func_802979AC(yaw_getIdeal() ,func_80297A64());
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_LOCKED_ROTATION);
|
||||
baphysics_set_target_yaw(yaw_getIdeal());
|
||||
baphysics_set_horizontal_velocity(yaw_getIdeal() ,baphysics_get_target_horizontal_velocity());
|
||||
pitch_setAngVel(800.0f, 8.0f);
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
func_80299AAC();
|
||||
D_8037D524 = 0;
|
||||
D_8037D528 = 1.0f;
|
||||
@@ -95,10 +97,10 @@ void bsslide_update(void){
|
||||
yaw_setIdeal(sp2C);
|
||||
pitch_setIdeal(sp28);
|
||||
}
|
||||
func_80297970(ml_map_f(sp28,20.0f, 60.0f, 550.0f, 700.0f));
|
||||
func_8029797C(sp2C);
|
||||
baphysics_set_target_horizontal_velocity(ml_map_f(sp28,20.0f, 60.0f, 550.0f, 700.0f));
|
||||
baphysics_set_target_yaw(sp2C);
|
||||
}else{
|
||||
func_80297970(500.0f);
|
||||
baphysics_set_target_horizontal_velocity(500.0f);
|
||||
}
|
||||
func_802B40D0();
|
||||
}else{//L802B44C4
|
||||
|
@@ -3,6 +3,8 @@
|
||||
#include "variables.h"
|
||||
#include "bsint.h"
|
||||
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
void func_80292900(f32, f32);
|
||||
void rumbleManager_80250D94(f32, f32, f32);
|
||||
|
||||
@@ -21,8 +23,8 @@ void func_802B4570(void) {
|
||||
void bssplat_init(void){
|
||||
s32 sp1C;
|
||||
baanim_playForDuration_onceSmooth(ASSET_149_ANIM_BSSPLAT, 1.1f);
|
||||
func_8029C7F4(1,1,3,3);
|
||||
func_802931DC(&sp1C);
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_LOCKED_ROTATION);
|
||||
bafalldamage_get_damage(&sp1C);
|
||||
func_803463D4(ITEM_14_HEALTH, -sp1C);
|
||||
if(func_8029CEB0() == 4){
|
||||
FUNC_8030E624(SFX_116_DEAF_RUSTLING, 0.7f, 32000);
|
||||
@@ -45,12 +47,12 @@ void bssplat_init(void){
|
||||
void bssplat_update(void){
|
||||
enum bs_e sp1C = 0;
|
||||
AnimCtrl *aCtrl = baanim_getAnimCtrlPtr();
|
||||
func_80297970(ml_max_f(0.0f, func_80297A64() - 15.0f));
|
||||
baphysics_set_target_horizontal_velocity(ml_max_f(0.0f, baphysics_get_target_horizontal_velocity() - 15.0f));
|
||||
|
||||
switch (D_8037D530)
|
||||
{
|
||||
case 0://L802B4760
|
||||
if(140.0f < func_80297A64())
|
||||
if(140.0f < baphysics_get_target_horizontal_velocity())
|
||||
func_802929F8();
|
||||
|
||||
if(func_8028B094())
|
||||
|
@@ -3,6 +3,7 @@
|
||||
#include "variables.h"
|
||||
#include "bsint.h"
|
||||
#include "core2/statetimer.h"
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
extern f32 func_8029B2E8(void);
|
||||
void yaw_setVelocityBounded(f32, f32);
|
||||
@@ -73,7 +74,7 @@ s32 func_802B488C(s32 arg0){
|
||||
retVal = func_8029C780();
|
||||
|
||||
if(func_80294F78())
|
||||
retVal = func_802926C0();
|
||||
retVal = badrone_look();
|
||||
|
||||
if(player_isSliding())
|
||||
retVal = BS_SLIDE;
|
||||
@@ -91,8 +92,8 @@ void bsstand_init(void){
|
||||
climbRelease();
|
||||
|
||||
baanim_playForDuration_once(ASSET_6F_ANIM_BSSTAND_IDLE, 5.5f);
|
||||
func_8029C7F4(1,1,1,2);
|
||||
func_80297970(0.0f);
|
||||
func_8029C7F4(1,1,1, BA_PHYSICS_NORMAL);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
func_802900B4();
|
||||
D_8037D540 = 0;
|
||||
D_8037D544 = 0;
|
||||
@@ -279,8 +280,8 @@ void bsstand_end(void){
|
||||
|
||||
//bsStand_Land_init
|
||||
void bsstand_landing_init(void){
|
||||
func_8029C7F4(1,1,1,2);
|
||||
func_80297970(0.0f);
|
||||
func_8029C7F4(1,1,1, BA_PHYSICS_NORMAL);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
}
|
||||
|
||||
//bsStand_Land_update
|
||||
@@ -316,7 +317,7 @@ void func_802B5350(void){
|
||||
if(bsStoredState_getTransformation() != TRANSFORM_1_BANJO)
|
||||
func_8029A86C(1);
|
||||
else{
|
||||
func_802948F8(baMarker_8028D688());
|
||||
bacarry_set_marker(baMarker_8028D688());
|
||||
bs_setState(BS_3A_CARRY_IDLE);
|
||||
}
|
||||
}
|
||||
@@ -331,7 +332,7 @@ void func_802B5350(void){
|
||||
func_8029A86C(2);
|
||||
bs_setState(BS_3C_TALK);
|
||||
}else{
|
||||
func_802948E0();
|
||||
bacarry_reset_marker();
|
||||
func_80296608();
|
||||
}
|
||||
}
|
||||
|
@@ -2,6 +2,8 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
/* .bss */
|
||||
s32 D_8037D560;
|
||||
|
||||
@@ -15,8 +17,8 @@ void func_802B5FD0(void) {
|
||||
animctrl_setDuration(anim_ctrl, 1.8f);
|
||||
animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_LOOP);
|
||||
animctrl_start(anim_ctrl, "bssurf.c", 0x33);
|
||||
func_8029C7F4(1, 1, 3, 2);
|
||||
func_80297970(0.0f);
|
||||
func_8029C7F4(1, 1, 3, BA_PHYSICS_NORMAL);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
D_8037D560 = 1;
|
||||
}
|
||||
|
||||
|
@@ -3,6 +3,7 @@
|
||||
#include "variables.h"
|
||||
|
||||
#include "core2/ba/anim.h"
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
extern void func_80295328(s32, f32);
|
||||
|
||||
@@ -66,10 +67,10 @@ void func_802B55DC(void) {
|
||||
|
||||
sp1C = func_8029B30C();
|
||||
if (func_8029B300() == 0) {
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
return;
|
||||
}
|
||||
func_80297970(ml_interpolate_f(sp1C, bsSwimHorzVelocityMin, bsSwimHorzVelocityMax));
|
||||
baphysics_set_target_horizontal_velocity(ml_interpolate_f(sp1C, bsSwimHorzVelocityMin, bsSwimHorzVelocityMax));
|
||||
}
|
||||
|
||||
void swim_enteredWater(void) {
|
||||
@@ -78,8 +79,8 @@ void swim_enteredWater(void) {
|
||||
} else if (map_get() == MAP_46_CCW_WINTER) {
|
||||
func_8035644C(FILEPROG_DD_HAS_TOUCHED_CCW_ICY_WATER);
|
||||
}
|
||||
gravity_set(100.0f);
|
||||
func_80297BF8(133.33f);
|
||||
baphysics_set_gravity(100.0f);
|
||||
baphysics_set_terminal_velocity(133.33f);
|
||||
func_8029B324(0, 0.03f);
|
||||
func_8029B324(1, 1.0f);
|
||||
func_80294378(3);
|
||||
@@ -88,8 +89,8 @@ void swim_enteredWater(void) {
|
||||
|
||||
void func_802B56D4(void) {
|
||||
if (!bsswim_inset(bs_getNextState())) {
|
||||
func_80297B94();
|
||||
gravity_reset();
|
||||
baphysics_reset_terminal_velocity();
|
||||
baphysics_reset_gravity();
|
||||
func_8029B0C0();
|
||||
func_80294378(1);
|
||||
}
|
||||
@@ -138,9 +139,9 @@ void func_802B5774(void) {
|
||||
animctrl_setDuration(anim_ctrl, 1.2f);
|
||||
animctrl_start(anim_ctrl, "bsswim.c", 0xFD);
|
||||
}
|
||||
func_8029C7F4(1, 3, 3, 2);
|
||||
func_8029C7F4(1, 3, 3, BA_PHYSICS_NORMAL);
|
||||
yaw_setVelocityBounded(500.0f, 5.0f);
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
swim_enteredWater();
|
||||
bsSwimCurrentAnimation = 0;
|
||||
}
|
||||
@@ -170,7 +171,7 @@ void func_802B5950(void) {
|
||||
next_state = BS_1_IDLE;
|
||||
}
|
||||
if (func_80294F78()) {
|
||||
next_state = func_802926C0();
|
||||
next_state = badrone_look();
|
||||
}
|
||||
if (should_dive()) {
|
||||
next_state = BS_30_DIVE_ENTER;
|
||||
@@ -212,7 +213,7 @@ void func_802B5B18(void) {
|
||||
yaw_setUpdateState(3);
|
||||
yaw_setVelocityBounded(500.0f, 5.0f);
|
||||
func_8029957C(1);
|
||||
func_802978DC(2);
|
||||
baphysics_set_type(BA_PHYSICS_NORMAL);
|
||||
}
|
||||
|
||||
void func_802B5C40(void) {
|
||||
@@ -280,9 +281,9 @@ void func_802B5E30(void) {
|
||||
|
||||
void func_802B5E8C(void) {
|
||||
baanim_playForDuration_loopSmooth(0x57, 1.2f);
|
||||
func_8029C7F4(1, 3, 3, 2);
|
||||
func_8029C7F4(1, 3, 3, BA_PHYSICS_NORMAL);
|
||||
yaw_setVelocityBounded(500.0f, 5.0f);
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
swim_enteredWater();
|
||||
func_802B5E30();
|
||||
}
|
||||
|
@@ -2,6 +2,7 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "core2/ba/anim.h"
|
||||
#include "core2/ba/physics.h"
|
||||
#include "core2/yaw.h"
|
||||
|
||||
/* .bss */
|
||||
@@ -26,8 +27,8 @@ void bstalk_init(void){
|
||||
baanim_setUpdateType(BAANIM_UPDATE_1_NORMAL);
|
||||
yaw_setUpdateState(YAW_STATE_1_DEFAULT);
|
||||
func_8029957C(3);
|
||||
func_802978DC(2);
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_type(BA_PHYSICS_NORMAL);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
bsTalkStayInState = TRUE;
|
||||
}
|
||||
|
||||
|
@@ -3,8 +3,9 @@
|
||||
#include "variables.h"
|
||||
#include "core2/statetimer.h"
|
||||
#include "core2/ba/anim.h"
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
extern ActorMarker *carriedobj_getMarker(void);
|
||||
extern ActorMarker *bacarry_get_marker(void);
|
||||
|
||||
/* .bss */
|
||||
u8 D_8037D580;
|
||||
@@ -22,9 +23,9 @@ void bsthrow_init(void){
|
||||
baanim_setUpdateType(BAANIM_UPDATE_1_NORMAL);
|
||||
yaw_setUpdateState(1);
|
||||
func_8029957C(3);
|
||||
func_802978DC(3);
|
||||
func_80297970(0.0f);
|
||||
func_80297A0C(0);
|
||||
baphysics_set_type(BA_PHYSICS_LOCKED_ROTATION);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
baphysics_set_velocity(0);
|
||||
D_8037D580 = 0;
|
||||
}
|
||||
|
||||
@@ -34,10 +35,10 @@ void bsthrow_update(void){
|
||||
f32 sp34[3];
|
||||
f32 player_position[3];
|
||||
f32 sp24;
|
||||
ActorMarker *sp20 = carriedobj_getMarker();
|
||||
ActorMarker *sp20 = bacarry_get_marker();
|
||||
|
||||
if(D_8037D580 == 0 && sp20 != NULL)
|
||||
func_802948F8(sp20);
|
||||
bacarry_set_marker(sp20);
|
||||
|
||||
_player_getPosition(player_position);
|
||||
get_throw_target_position(sp34);
|
||||
|
@@ -1,6 +1,7 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
|
||||
void func_80292E80(s32, f32);
|
||||
@@ -9,8 +10,8 @@ void ncDynamicCamD_func_802BF2C0(f32);
|
||||
|
||||
void func_802B6270(void){
|
||||
baanim_playForDuration_once(ASSET_77_ANIM_BSTIMEOUT, 3.2f);
|
||||
func_8029C7F4(1,1,3,2);
|
||||
func_80297970(0.0f);
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_NORMAL);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
func_802914CC(0xd);
|
||||
yaw_setIdeal(func_8029B41C() + 35.0f);
|
||||
ncDynamicCamD_func_802BF2C0(80.0f);
|
||||
@@ -50,8 +51,8 @@ void func_802B63F8(void){
|
||||
func_8029C848(aCtrl);
|
||||
animctrl_setPlaybackType(aCtrl, ANIMCTRL_LOOP);
|
||||
animctrl_start(aCtrl, "bstimeout.c", 0x7e);
|
||||
func_8029C7F4(1,1,3,7);
|
||||
func_80297970(0.0f);
|
||||
func_8029C7F4(1,1,3,BA_PHYSICS_FREEZE);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
func_802914CC(0xd);
|
||||
yaw_setIdeal(func_8029B41C() + 35.0f);
|
||||
ncDynamicCamD_func_802BF2C0(80.0f);
|
||||
|
@@ -2,9 +2,10 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "core2/ba/anim.h"
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
/* .data */
|
||||
f32 D_8037D590;
|
||||
f32 bsturn_starting_horizontal_velocity;
|
||||
s32 D_8037D594;
|
||||
|
||||
/* .code */
|
||||
@@ -21,9 +22,9 @@ void bsturn_init(void){
|
||||
baanim_setUpdateType(BAANIM_UPDATE_1_NORMAL);
|
||||
yaw_setUpdateState(1);
|
||||
func_8029957C(2);
|
||||
func_802978DC(3);
|
||||
_get_velocity(&sp28);
|
||||
D_8037D590 = gu_sqrtf(sp28[0]*sp28[0] + sp28[2]*sp28[2]);
|
||||
baphysics_set_type(BA_PHYSICS_LOCKED_ROTATION);
|
||||
baphysics_get_velocity(sp28);
|
||||
bsturn_starting_horizontal_velocity = gu_sqrtf(sp28[0]*sp28[0] + sp28[2]*sp28[2]);
|
||||
func_8030EBC8(SFX_19_BANJO_LANDING_08, 0.95f, 1.05f, 0x7530, 0x7d00);
|
||||
D_8037D594 = 0;
|
||||
}
|
||||
@@ -31,7 +32,7 @@ void bsturn_init(void){
|
||||
void bsturn_update(void){
|
||||
enum bs_e sp2C = 0;
|
||||
|
||||
func_80297970(ml_map_f(animctrl_getAnimTimer(baanim_getAnimCtrlPtr()), 0.18f, 1.0f, D_8037D590, 0.0f));
|
||||
baphysics_set_target_horizontal_velocity(ml_map_f(animctrl_getAnimTimer(baanim_getAnimCtrlPtr()), 0.18f, 1.0f, bsturn_starting_horizontal_velocity, 0.0f));
|
||||
|
||||
D_8037D594++;
|
||||
if(!(D_8037D594 < 6))
|
||||
@@ -39,13 +40,13 @@ void bsturn_update(void){
|
||||
|
||||
switch(D_8037D594){
|
||||
case -1://L802B68DC
|
||||
func_802927E0(func_80297A7C() - 10.0f, _get_horzVelocity()*0.88);
|
||||
func_802927E0(baphysics_get_target_yaw() - 10.0f, baphysics_get_horizontal_velocity()*0.88);
|
||||
break;
|
||||
case 0://L802B691C
|
||||
func_802927E0(func_80297A7C(), _get_horzVelocity());
|
||||
func_802927E0(baphysics_get_target_yaw(), baphysics_get_horizontal_velocity());
|
||||
break;
|
||||
case 1://L802B6940
|
||||
func_802927E0(func_80297A7C() + 10.0f, _get_horzVelocity()*0.88);
|
||||
func_802927E0(baphysics_get_target_yaw() + 10.0f, baphysics_get_horizontal_velocity()*0.88);
|
||||
break;
|
||||
}//L802B6978
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "core2/ba/anim.h"
|
||||
|
||||
#include "core2/ba/physics.h"
|
||||
/* .bss */
|
||||
f32 D_8037D5A0;
|
||||
u8 D_8037D5A4;
|
||||
@@ -25,11 +25,11 @@ void bstwirl_init(void){
|
||||
baanim_setUpdateType(BAANIM_UPDATE_1_NORMAL);
|
||||
yaw_setUpdateState(1);
|
||||
func_8029957C(3);
|
||||
func_8029797C(yaw_getIdeal());
|
||||
func_802979AC(yaw_getIdeal(), func_80297A64());
|
||||
func_802978DC(3);
|
||||
D_8037D5A0 = func_80297A64();
|
||||
func_80297970(600.0f);
|
||||
baphysics_set_target_yaw(yaw_getIdeal());
|
||||
baphysics_set_horizontal_velocity(yaw_getIdeal(), baphysics_get_target_horizontal_velocity());
|
||||
baphysics_set_type(BA_PHYSICS_LOCKED_ROTATION);
|
||||
D_8037D5A0 = baphysics_get_target_horizontal_velocity();
|
||||
baphysics_set_target_horizontal_velocity(600.0f);
|
||||
func_80299CF4(SFX_32_BANJO_EGHEE, 1.0f, 0x6590);
|
||||
_bstwirlHitboxActive = TRUE;
|
||||
func_8029E3C0(0, 0.01f);
|
||||
@@ -54,7 +54,7 @@ void bstwirl_update(void){
|
||||
}
|
||||
if(animctrl_isAt(aCtrl, 0.8011f)){
|
||||
animctrl_setDuration(aCtrl, 2.5f);
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
_bstwirlHitboxActive = 0;
|
||||
D_8037D5A4 = 3;
|
||||
}
|
||||
|
@@ -3,18 +3,15 @@
|
||||
#include "variables.h"
|
||||
#include "animation.h"
|
||||
#include "core2/ba/anim.h"
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
void baanim_setDurationRange(f32, f32);
|
||||
f32 _get_horzVelocity(void);
|
||||
void func_802927E0(f32, f32);
|
||||
f32 func_8029B2E8(void);
|
||||
int func_80297C04(f32);
|
||||
void func_8029AD28(f32, s32);
|
||||
f32 func_80297AF0(void);
|
||||
void baanim_scaleDuration(f32);
|
||||
f32 func_8029B30C(void);
|
||||
f32 ml_interpolate_f(f32, f32, f32);
|
||||
f32 func_80297A64(void);
|
||||
void func_80299594(s32, f32);
|
||||
|
||||
// .data
|
||||
@@ -49,27 +46,27 @@ void func_802B6D00(void){
|
||||
sp18 = func_8029B300();
|
||||
if(func_8028B128()){
|
||||
if(sp18 == 0){
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
}else{//L802B6D48
|
||||
func_80297970(ml_interpolate_f(func_8029B2E8(), bsWalkMinMudVelocity, bsWalkMaxMudVelocity));
|
||||
baphysics_set_target_horizontal_velocity(ml_interpolate_f(func_8029B2E8(), bsWalkMinMudVelocity, bsWalkMaxMudVelocity));
|
||||
}
|
||||
}
|
||||
else{//L802B6D78
|
||||
switch(sp18){
|
||||
case 0://802B6D98
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
break;
|
||||
case 1://802B6DAC
|
||||
func_80297970(ml_interpolate_f(sp1C, bsWalkMinCreepVelocity, bsWalkCreepSlowWalkVelocityThreshold));
|
||||
baphysics_set_target_horizontal_velocity(ml_interpolate_f(sp1C, bsWalkMinCreepVelocity, bsWalkCreepSlowWalkVelocityThreshold));
|
||||
break;
|
||||
case 2://802B6DD0
|
||||
func_80297970(ml_interpolate_f(sp1C, bsWalkCreepSlowWalkVelocityThreshold, bsWalkSlowWalkWalkVelocityThreshold));
|
||||
baphysics_set_target_horizontal_velocity(ml_interpolate_f(sp1C, bsWalkCreepSlowWalkVelocityThreshold, bsWalkSlowWalkWalkVelocityThreshold));
|
||||
break;
|
||||
case 3://802B6DF4
|
||||
func_80297970(ml_interpolate_f(sp1C, bsWalkSlowWalkWalkVelocityThreshold, bsWalkWalkFastWalkVelocityThreshold));
|
||||
baphysics_set_target_horizontal_velocity(ml_interpolate_f(sp1C, bsWalkSlowWalkWalkVelocityThreshold, bsWalkWalkFastWalkVelocityThreshold));
|
||||
break;
|
||||
case 4://802B6E18
|
||||
func_80297970(ml_interpolate_f(sp1C, bsWalkWalkFastWalkVelocityThreshold, bsWalkMaxFastWalkVelocity));
|
||||
baphysics_set_target_horizontal_velocity(ml_interpolate_f(sp1C, bsWalkWalkFastWalkVelocityThreshold, bsWalkMaxFastWalkVelocity));
|
||||
break;
|
||||
}
|
||||
}//L802B6E34
|
||||
@@ -77,7 +74,7 @@ void func_802B6D00(void){
|
||||
|
||||
void func_802B6E44(void){
|
||||
if(func_8028B394()){
|
||||
baanim_scaleDuration(ml_map_f(func_80297AF0(), 0.0f, 1.0f, 0.5f, 0.9f));
|
||||
baanim_scaleDuration(ml_map_f(baphysics_get_horizontal_velocity_percentage(), 0.0f, 1.0f, 0.5f, 0.9f));
|
||||
}else{
|
||||
baanim_scaleDuration(1.0f);
|
||||
}
|
||||
@@ -98,7 +95,7 @@ int func_802B6EF4(void){
|
||||
|
||||
s32 func_802B6F20(s32 arg0){
|
||||
if(button_pressed(BUTTON_B)){
|
||||
if( bsWalkWalkFastWalkVelocityThreshold < func_80297A64()){
|
||||
if( bsWalkWalkFastWalkVelocityThreshold < baphysics_get_target_horizontal_velocity()){
|
||||
if(can_roll())
|
||||
arg0 = BS_ROLL;
|
||||
}else{//L802B6F74
|
||||
@@ -132,7 +129,7 @@ void bswalk_creep_init(void){
|
||||
animctrl_setStart(anim_ctrl, start_position);
|
||||
animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_LOOP);
|
||||
animctrl_start(anim_ctrl, "bswalk.c", 0xe4);
|
||||
func_8029C7F4(BAANIM_UPDATE_2_SCALE_HORZ,1,1,2);
|
||||
func_8029C7F4(BAANIM_UPDATE_2_SCALE_HORZ,1,1, BA_PHYSICS_NORMAL);
|
||||
baanim_setDurationRange(0.3f, 1.5f);
|
||||
baanim_setVelocityMapRanges(bsWalkMinCreepVelocity, bsWalkCreepSlowWalkVelocityThreshold, bsWalkSlowestCreepDuration, bsWalkFastestCreepDuration);
|
||||
}
|
||||
@@ -149,7 +146,7 @@ void bswalk_creep_update(void){
|
||||
func_802B6D00();
|
||||
switch(func_8029B300()){
|
||||
case 0://L802B7160
|
||||
if(func_80297C04(1.0f))
|
||||
if(baphysics_is_slower_than(1.0f))
|
||||
next_state = BS_1_IDLE;
|
||||
break;
|
||||
case 2://L802B7180
|
||||
@@ -166,7 +163,7 @@ void bswalk_creep_update(void){
|
||||
next_state = BS_WALK_MUD;
|
||||
|
||||
if(func_80294F78())
|
||||
next_state = func_802926C0();
|
||||
next_state = badrone_look();
|
||||
|
||||
if(func_8028B094())
|
||||
next_state = BS_2F_FALL;
|
||||
@@ -205,7 +202,7 @@ void bswalk_slow_init(void){
|
||||
animctrl_setStart(anim_ctrl, start_position);
|
||||
animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_LOOP);
|
||||
animctrl_start(anim_ctrl, "bswalk.c", 0x168);
|
||||
func_8029C7F4(BAANIM_UPDATE_2_SCALE_HORZ,1,1,2);
|
||||
func_8029C7F4(BAANIM_UPDATE_2_SCALE_HORZ,1,1, BA_PHYSICS_NORMAL);
|
||||
baanim_setDurationRange(0.3f, 1.5f);
|
||||
baanim_setVelocityMapRanges(bsWalkCreepSlowWalkVelocityThreshold, bsWalkSlowWalkWalkVelocityThreshold, bsWalkSlowestSlowWalkDuration, bsWalkFastestSlowWalkDuration);
|
||||
}
|
||||
@@ -222,7 +219,7 @@ void bswalk_slow_upate(void){
|
||||
func_802B6D00();
|
||||
switch(func_8029B300()){
|
||||
case 0://L802B7160
|
||||
if(func_80297C04(3.0f))
|
||||
if(baphysics_is_slower_than(3.0f))
|
||||
next_state = BS_1_IDLE;
|
||||
break;
|
||||
case 1://L802B7180
|
||||
@@ -239,7 +236,7 @@ void bswalk_slow_upate(void){
|
||||
next_state = BS_WALK_MUD;
|
||||
|
||||
if(func_80294F78())
|
||||
next_state = func_802926C0();
|
||||
next_state = badrone_look();
|
||||
|
||||
if(func_8028B094())
|
||||
next_state = BS_2F_FALL;
|
||||
@@ -283,7 +280,7 @@ void bswalk_init(void){
|
||||
animctrl_setStart(anim_ctrl, start_position);
|
||||
animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_LOOP);
|
||||
animctrl_start(anim_ctrl, "bswalk.c", 0x1ed);
|
||||
func_8029C7F4(BAANIM_UPDATE_2_SCALE_HORZ,1,1,2);
|
||||
func_8029C7F4(BAANIM_UPDATE_2_SCALE_HORZ,1,1, BA_PHYSICS_NORMAL);
|
||||
baanim_setDurationRange(0.3f, 1.5f);
|
||||
baanim_setVelocityMapRanges(bsWalkSlowWalkWalkVelocityThreshold, bsWalkWalkFastWalkVelocityThreshold, bsWalkSlowestWalkDuration, bsWalkFastestWalkDuration);
|
||||
func_802B6EB0(0.3f);
|
||||
@@ -300,7 +297,7 @@ void bswalk_update(void){
|
||||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
if(func_80297C04(bsWalkSlowWalkWalkVelocityThreshold) && func_802B6EF4())
|
||||
if(baphysics_is_slower_than(bsWalkSlowWalkWalkVelocityThreshold) && func_802B6EF4())
|
||||
next_state = BS_2_WALK_SLOW;
|
||||
break;
|
||||
case 4:
|
||||
@@ -310,12 +307,12 @@ void bswalk_update(void){
|
||||
if(func_8028B128())
|
||||
next_state = BS_WALK_MUD;
|
||||
|
||||
if(func_8028B4C4() && bsWalkSkidVelocity < _get_horzVelocity()){
|
||||
if(func_8028B4C4() && bsWalkSkidVelocity < baphysics_get_horizontal_velocity()){
|
||||
next_state = BS_SKID;
|
||||
}
|
||||
|
||||
if(func_80294F78())
|
||||
next_state = func_802926C0();
|
||||
next_state = badrone_look();
|
||||
|
||||
if(func_8028B094())
|
||||
next_state = BS_2F_FALL;
|
||||
@@ -347,7 +344,7 @@ void bswalk_fast_init(void){
|
||||
switch(bs_getPrevState()){
|
||||
case 1:
|
||||
case 2://L802B780C
|
||||
if(_get_horzVelocity() < 200.0f){
|
||||
if(baphysics_get_horizontal_velocity() < 200.0f){
|
||||
func_802927E0(0.0f, 0.0f);
|
||||
}
|
||||
break;
|
||||
@@ -367,7 +364,7 @@ void bswalk_fast_init(void){
|
||||
animctrl_setStart(anim_ctrl, sp28);
|
||||
animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_LOOP);
|
||||
animctrl_start(anim_ctrl, "bswalk.c", 0x27d);
|
||||
func_8029C7F4(BAANIM_UPDATE_2_SCALE_HORZ,1,1,2);
|
||||
func_8029C7F4(BAANIM_UPDATE_2_SCALE_HORZ,1,1, BA_PHYSICS_NORMAL);
|
||||
baanim_setDurationRange(0.3f, 1.5f);
|
||||
baanim_setVelocityMapRanges(bsWalkWalkFastWalkVelocityThreshold, bsWalkMaxFastWalkVelocity, bsWalkSlowestFastWalkDuration, bsWalkFastestFastWalkDuration);
|
||||
pitch_setAngVel(1000.0f, 12.0f);
|
||||
@@ -386,34 +383,34 @@ void bswalk_fast_update(void){
|
||||
func_802B6D00();
|
||||
switch(func_8029B300()){
|
||||
case 0://L802B79EC
|
||||
if(func_80297C04(18.0f))
|
||||
if(baphysics_is_slower_than(18.0f))
|
||||
next_state = BS_1_IDLE;
|
||||
|
||||
if(func_80294F78())
|
||||
next_state = func_802926C0();
|
||||
next_state = badrone_look();
|
||||
|
||||
break;
|
||||
case 1:
|
||||
case 2://L802B7A28
|
||||
if(func_80297C04(bsWalkSlowWalkWalkVelocityThreshold))
|
||||
if(baphysics_is_slower_than(bsWalkSlowWalkWalkVelocityThreshold))
|
||||
next_state = BS_2_WALK_SLOW;
|
||||
|
||||
if(func_80294F78())
|
||||
next_state = func_802926C0();
|
||||
next_state = badrone_look();
|
||||
|
||||
break;
|
||||
case 3://L802B7A60
|
||||
if(func_80297C04(bsWalkWalkFastWalkVelocityThreshold) && func_802B6EF4())
|
||||
if(baphysics_is_slower_than(bsWalkWalkFastWalkVelocityThreshold) && func_802B6EF4())
|
||||
next_state = BS_WALK;
|
||||
|
||||
if(func_80294F78())
|
||||
next_state = func_802926C0();
|
||||
next_state = badrone_look();
|
||||
break;
|
||||
}//L802B7AA4
|
||||
if(func_8028B128())
|
||||
next_state = BS_WALK_MUD;
|
||||
|
||||
if(func_8028B4C4() && bsWalkSkidVelocity < _get_horzVelocity()){
|
||||
if(func_8028B4C4() && bsWalkSkidVelocity < baphysics_get_horizontal_velocity()){
|
||||
next_state = BS_SKID;
|
||||
}
|
||||
|
||||
@@ -446,7 +443,7 @@ void bswalk_fast_end(void){
|
||||
|
||||
void bswalk_mud_init(void){
|
||||
baanim_playForDuration_loopSmooth(ASSET_B_ANIM_BSWALK_MUD, 0.43f);
|
||||
func_8029C7F4(BAANIM_UPDATE_2_SCALE_HORZ,1,1,2);
|
||||
func_8029C7F4(BAANIM_UPDATE_2_SCALE_HORZ,1,1, BA_PHYSICS_NORMAL);
|
||||
baanim_setDurationRange(0.3f, 1.5f);
|
||||
baanim_setVelocityMapRanges(bsWalkMinMudVelocity, bsWalkMaxMudVelocity, bsWalkSlowestMudDuration, bsWalkFastestMudDuration);
|
||||
}
|
||||
@@ -464,7 +461,7 @@ void bswalk_mud_update(void){
|
||||
next_state = BS_1_IDLE;
|
||||
|
||||
if(func_80294F78())
|
||||
next_state = func_802926C0();
|
||||
next_state = badrone_look();
|
||||
|
||||
if(func_8028B094())
|
||||
next_state = BS_2F_FALL;
|
||||
|
@@ -2,6 +2,8 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "core2/ba/anim.h"
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
extern void func_8029AD68(f32, s32);
|
||||
extern f32 ml_dotProduct_vec3f(f32[3], f32[3]);
|
||||
|
||||
@@ -44,10 +46,10 @@ void func_802B7E6C(void) {
|
||||
|
||||
sp1C = func_8029B30C();
|
||||
if (func_8029B300() == 0) {
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
return;
|
||||
}
|
||||
func_80297970(ml_interpolate_f(sp1C, D_80364DC0, D_80364DC4));
|
||||
baphysics_set_target_horizontal_velocity(ml_interpolate_f(sp1C, D_80364DC0, D_80364DC4));
|
||||
}
|
||||
|
||||
void func_802B7ECC(void) {
|
||||
@@ -70,7 +72,7 @@ void func_802B7F28(void) {
|
||||
sp3C = D_80364DDC;
|
||||
sp40 = func_8029B30C();
|
||||
func_802B7ECC();
|
||||
_get_velocity(sp20);
|
||||
baphysics_get_velocity(sp20);
|
||||
sp20[1] = 0.0f;
|
||||
if (900.0 < sp20[0] * sp20[0] + sp20[1] * sp20[1] + sp20[2] * sp20[2]) {
|
||||
ml_vec3f_normalize(sp20);
|
||||
@@ -80,10 +82,10 @@ void func_802B7F28(void) {
|
||||
}
|
||||
}
|
||||
if (func_8029B300() == 0) {
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
return;
|
||||
}
|
||||
func_80297970(ml_interpolate_f(sp40, sp38, sp3C));
|
||||
baphysics_set_target_horizontal_velocity(ml_interpolate_f(sp40, sp38, sp3C));
|
||||
}
|
||||
|
||||
void func_802B8048(void){
|
||||
@@ -141,8 +143,8 @@ int bswalrus_inSet(enum bs_e state){
|
||||
|
||||
void bswalrus_idle_init(void){
|
||||
baanim_playForDuration_loopSmooth(ASSET_11F_ANIM_BSWALRUS_IDLE, 4.0f);
|
||||
func_8029C7F4(1,1,1,2);
|
||||
func_80297970(0.0f);
|
||||
func_8029C7F4(1,1,1, BA_PHYSICS_NORMAL);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
pitch_setAngVel(1000.0f, 12.0f);
|
||||
roll_setAngularVelocity(1000.0f, 12.0f);
|
||||
func_80293D48(50.0f, 25.0f);
|
||||
@@ -161,7 +163,7 @@ void bswalrus_idle_update(void){
|
||||
next_state = BS_6A_WALRUS_FALL;
|
||||
|
||||
if(func_80294F78())
|
||||
next_state = func_802926C0();
|
||||
next_state = badrone_look();
|
||||
|
||||
if(func_8029B300() > 0)
|
||||
next_state = BS_WALRUS_WALK;
|
||||
@@ -179,7 +181,7 @@ void bswalrus_idle_end(void){
|
||||
|
||||
void bswalrus_walk_init(void){
|
||||
baanim_playForDuration_loopSmooth(ASSET_120_ANIM_BSWALRUS_WALK, 0.8f);
|
||||
func_8029C7F4(BAANIM_UPDATE_2_SCALE_HORZ,1,1,2);
|
||||
func_8029C7F4(BAANIM_UPDATE_2_SCALE_HORZ,1,1, BA_PHYSICS_NORMAL);
|
||||
baanim_setVelocityMapRanges(D_80364DC0, D_80364DC4, D_80364DC8, D_80364DCC);
|
||||
func_802900B4();
|
||||
func_802B8110();
|
||||
@@ -192,7 +194,7 @@ void bswalrus_walk_update(void){
|
||||
func_802B7E6C();
|
||||
func_8029AD68(0.3f, 4);
|
||||
|
||||
if(func_8029B300() == 0 && func_80297C04(1.0f))
|
||||
if(func_8029B300() == 0 && baphysics_is_slower_than(1.0f))
|
||||
next_state = BS_67_WALRUS_IDLE;
|
||||
|
||||
if(func_8028B094())
|
||||
@@ -220,14 +222,14 @@ void bswalrus_jump_init(void){
|
||||
animctrl_setStart(aCtrl, 0.1);
|
||||
animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE);
|
||||
animctrl_start(aCtrl, "bswalrus.c", 0x1f8);
|
||||
func_8029C7F4(1,1,3,6);
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_AIRBORN);
|
||||
if(func_8029B2E8() != 0.0f)
|
||||
yaw_setIdeal(func_8029B33C());
|
||||
func_8029797C(yaw_getIdeal());
|
||||
baphysics_set_target_yaw(yaw_getIdeal());
|
||||
func_802B7E6C();
|
||||
func_802979AC(yaw_getIdeal(), func_80297A64());
|
||||
player_setYVelocity(D_80364DD0);
|
||||
gravity_set(D_80364DD4);
|
||||
baphysics_set_horizontal_velocity(yaw_getIdeal(), baphysics_get_target_horizontal_velocity());
|
||||
baphysics_set_vertical_velocity(D_80364DD0);
|
||||
baphysics_set_gravity(D_80364DD4);
|
||||
func_802B7E00();
|
||||
func_802B8110();
|
||||
D_8037D5C8 = 0;
|
||||
@@ -239,9 +241,9 @@ void bswalrus_jump_update(void){
|
||||
f32 sp1C[3];
|
||||
|
||||
func_802B7E6C();
|
||||
_get_velocity(sp1C);
|
||||
baphysics_get_velocity(sp1C);
|
||||
if(button_released(BUTTON_A) && 0.0f < sp1C[1])
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
|
||||
switch(D_8037D5C8){
|
||||
case 0://L802B86D8
|
||||
@@ -279,7 +281,7 @@ void bswalrus_jump_update(void){
|
||||
case 3://L802B880C
|
||||
func_80299628(0);
|
||||
if(animctrl_isStopped(aCtrl)){
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
next_state = BS_67_WALRUS_IDLE;
|
||||
}
|
||||
break;
|
||||
@@ -297,7 +299,7 @@ void bswalrus_jump_update(void){
|
||||
}
|
||||
|
||||
void bswalrus_jump_end(void){
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
func_802B8048();
|
||||
}
|
||||
|
||||
@@ -309,7 +311,7 @@ void bswalrus_fall_init(void){
|
||||
animctrl_setDuration(aCtrl, 0.7f);
|
||||
animctrl_setPlaybackType(aCtrl, ANIMCTRL_STOPPED);
|
||||
animctrl_start(aCtrl, "bswalrus.c", 0x284);
|
||||
func_8029C7F4(1,1,3,6);
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_AIRBORN);
|
||||
func_802B8110();
|
||||
D_8037D5C8 = 0;
|
||||
}
|
||||
@@ -321,7 +323,7 @@ void bswalrus_fall_update(void){
|
||||
|
||||
func_80299628(0);
|
||||
func_802B7E6C();
|
||||
_get_velocity(sp1C);
|
||||
baphysics_get_velocity(sp1C);
|
||||
|
||||
switch (D_8037D5C8)
|
||||
{
|
||||
@@ -335,7 +337,7 @@ void bswalrus_fall_update(void){
|
||||
case 1://L802B89E0
|
||||
if(func_8028B2E8()){
|
||||
func_8029AE48();
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
animctrl_setSubRange(aCtrl, 0.0f, 1.0f);
|
||||
animctrl_setDuration(aCtrl, 1.0f);
|
||||
animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE);
|
||||
@@ -351,7 +353,7 @@ void bswalrus_fall_update(void){
|
||||
|| (D_8037D5C8 == 2 && animctrl_isStopped(aCtrl))
|
||||
){
|
||||
if(miscflag_isTrue(0x19))
|
||||
next_state = func_80292738();
|
||||
next_state = badrone_transform();
|
||||
else
|
||||
next_state = BS_67_WALRUS_IDLE;
|
||||
}
|
||||
@@ -381,12 +383,12 @@ static void __bswalrus_recoil_init(s32 damage){
|
||||
func_80257F18(sp24, sp30, &sp3C);
|
||||
yaw_setIdeal(mlNormalizeAngle(sp3C + 180.0f));
|
||||
yaw_applyIdeal();
|
||||
func_80297970(func_802987D4());
|
||||
func_8029797C(sp3C);
|
||||
func_802979AC(sp3C, func_80297A64());
|
||||
func_8029C7F4(1,1,2,3);
|
||||
player_setYVelocity(func_802987C4());
|
||||
gravity_set(func_802987E4());
|
||||
baphysics_set_target_horizontal_velocity(func_802987D4());
|
||||
baphysics_set_target_yaw(sp3C);
|
||||
baphysics_set_horizontal_velocity(sp3C, baphysics_get_target_horizontal_velocity());
|
||||
func_8029C7F4(1,1,2, BA_PHYSICS_LOCKED_ROTATION);
|
||||
baphysics_set_vertical_velocity(func_802987C4());
|
||||
baphysics_set_gravity(func_802987E4());
|
||||
baMarker_collisionOff();
|
||||
func_80292E48();
|
||||
func_802B8110();
|
||||
@@ -404,7 +406,7 @@ static void __bswalrus_recoil_update(void){
|
||||
}
|
||||
|
||||
static void __bswalrus_recoil_end(void){
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
baMarker_collisionOn();
|
||||
func_80292EA4();
|
||||
func_802B8048();
|
||||
@@ -455,12 +457,12 @@ void bswalrus_die_init(void){
|
||||
D_8037D5C4 = 250.0f;
|
||||
yaw_setIdeal(mlNormalizeAngle(sp38 + 180.0f));
|
||||
yaw_applyIdeal();
|
||||
func_80297970(D_8037D5C4);
|
||||
func_8029797C(sp38);
|
||||
func_802979AC(sp38, func_80297A64());
|
||||
func_8029C7F4(1,1,2,3);
|
||||
player_setYVelocity(420.0f); //B)
|
||||
gravity_set(-1200.0f);
|
||||
baphysics_set_target_horizontal_velocity(D_8037D5C4);
|
||||
baphysics_set_target_yaw(sp38);
|
||||
baphysics_set_horizontal_velocity(sp38, baphysics_get_target_horizontal_velocity());
|
||||
func_8029C7F4(1,1,2, BA_PHYSICS_LOCKED_ROTATION);
|
||||
baphysics_set_vertical_velocity(420.0f); //B)
|
||||
baphysics_set_gravity(-1200.0f);
|
||||
pitch_setAngVel(1000.0f, 12.0f);
|
||||
func_802914CC(0xd);
|
||||
ncDynamicCamD_func_802BF2C0(30.0f);
|
||||
@@ -477,7 +479,7 @@ void bswalrus_die_init(void){
|
||||
void bswalrus_die_update(void){
|
||||
enum bs_e next_state = 0;
|
||||
|
||||
func_80297970(D_8037D5C4);
|
||||
baphysics_set_target_horizontal_velocity(D_8037D5C4);
|
||||
func_80299628(0);
|
||||
switch(D_8037D5C8){
|
||||
case 0://L802B8F54
|
||||
@@ -485,7 +487,7 @@ void bswalrus_die_update(void){
|
||||
baanim_setEnd(1.0f);
|
||||
FUNC_8030E624(SFX_1F_HITTING_AN_ENEMY_3, 0.8f, 18000);
|
||||
FUNC_8030E624(SFX_39_BANJO_AYE_2, 1.8f, 18000);
|
||||
player_setYVelocity(400.0f);
|
||||
baphysics_set_vertical_velocity(400.0f);
|
||||
D_8037D5C8 = 2;
|
||||
}
|
||||
break;
|
||||
@@ -507,7 +509,7 @@ void bswalrus_die_update(void){
|
||||
|
||||
void bswalrus_die_end(void){
|
||||
func_8024BD08(0);
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
pitch_setIdeal(0.0f);
|
||||
roll_setIdeal(0.0f);
|
||||
func_80291548();
|
||||
@@ -530,8 +532,8 @@ void bswalrus_drone_end(void){
|
||||
|
||||
void func_802B90D0(void){
|
||||
baanim_playForDuration_loopSmooth(ASSET_19E_ANIM_BSWALRUS_SLED, 0.8f);
|
||||
func_8029C7F4(1,1,3,2);
|
||||
func_80297970(0.0f);
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_NORMAL);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
func_8029C674();
|
||||
func_802B813C();
|
||||
func_802B3A50();
|
||||
@@ -555,7 +557,7 @@ void func_802B917C(void){
|
||||
|
||||
void bswalrus_sled_init(void){
|
||||
baanim_playForDuration_loopSmooth(ASSET_19E_ANIM_BSWALRUS_SLED, 0.8f);
|
||||
func_8029C7F4(BAANIM_UPDATE_2_SCALE_HORZ,1,1,2);
|
||||
func_8029C7F4(BAANIM_UPDATE_2_SCALE_HORZ,1,1, BA_PHYSICS_NORMAL);
|
||||
baanim_setVelocityMapRanges(D_80364DC0, D_80364DC4, D_80364DE0, D_80364DE4);
|
||||
func_802900B4();
|
||||
func_802B813C();
|
||||
@@ -565,7 +567,7 @@ void bswalrus_sled_update(void){
|
||||
enum bs_e next_state = 0;
|
||||
f32 sp20[3];
|
||||
|
||||
if(50.0f < _get_horzVelocity()){
|
||||
if(50.0f < baphysics_get_horizontal_velocity()){
|
||||
if(func_8023DB4C(1)){
|
||||
baModel_80292554(&sp20);
|
||||
}else{
|
||||
@@ -577,7 +579,7 @@ void bswalrus_sled_update(void){
|
||||
func_80299628(0);
|
||||
func_802B7F28();
|
||||
if(func_80294F78())
|
||||
next_state = func_802926C0();
|
||||
next_state = badrone_look();
|
||||
|
||||
if(button_pressed(BUTTON_A))
|
||||
next_state = BS_7E_WALRUS_SLED;
|
||||
@@ -601,14 +603,14 @@ void bswalrus_sled_jump_init(void){
|
||||
animctrl_setStart(aCtrl, 0.14f);
|
||||
animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE);
|
||||
animctrl_start(aCtrl, "bswalrus.c", 0x477);
|
||||
func_8029C7F4(1,1,3,6);
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_AIRBORN);
|
||||
if(func_8029B2E8() != 0.0f)
|
||||
yaw_setIdeal(func_8029B33C());
|
||||
func_8029797C(yaw_getIdeal());
|
||||
baphysics_set_target_yaw(yaw_getIdeal());
|
||||
func_802B7F28();
|
||||
func_802979AC(yaw_getIdeal(), func_80297A64());
|
||||
player_setYVelocity(D_80364DD0);
|
||||
gravity_set(D_80364DD4);
|
||||
baphysics_set_horizontal_velocity(yaw_getIdeal(), baphysics_get_target_horizontal_velocity());
|
||||
baphysics_set_vertical_velocity(D_80364DD0);
|
||||
baphysics_set_gravity(D_80364DD4);
|
||||
func_802B7E00();
|
||||
func_802B813C();
|
||||
D_8037D5C8 = 0;
|
||||
@@ -620,10 +622,10 @@ void bswalrus_sled_jump_update(void){
|
||||
f32 sp1C[3];
|
||||
|
||||
func_802B7F28();
|
||||
_get_velocity(sp1C);
|
||||
baphysics_get_velocity(sp1C);
|
||||
|
||||
if(button_released(BUTTON_A) && 0.0f < sp1C[1])
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
|
||||
switch (D_8037D5C8)
|
||||
{
|
||||
@@ -657,7 +659,7 @@ void bswalrus_sled_jump_update(void){
|
||||
}
|
||||
|
||||
void bswalrus_sled_jump_end(void){
|
||||
gravity_reset();
|
||||
baphysics_reset_gravity();
|
||||
func_802B80D0();
|
||||
}
|
||||
|
||||
@@ -669,7 +671,7 @@ void func_802B95A0(void){
|
||||
animctrl_setDuration(aCtrl, 1.0f);
|
||||
animctrl_setPlaybackType(aCtrl, ANIMCTRL_STOPPED);
|
||||
animctrl_start(aCtrl, "bswalrus.c", 0x4e2);
|
||||
func_8029C7F4(1,1,3,6);
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_AIRBORN);
|
||||
func_802B813C();
|
||||
D_8037D5C8 = 0;
|
||||
}
|
||||
@@ -681,7 +683,7 @@ void func_802B963C(void){
|
||||
|
||||
func_80299628(0);
|
||||
func_802B7E6C();
|
||||
_get_velocity(sp1C);
|
||||
baphysics_get_velocity(sp1C);
|
||||
switch (D_8037D5C8)
|
||||
{
|
||||
case 0://L802B9694
|
||||
@@ -693,7 +695,7 @@ void func_802B963C(void){
|
||||
case 1://L802B96C0
|
||||
if(func_8028B2E8()){
|
||||
func_8029AE48();
|
||||
func_80297970(0.0f);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
D_8037D5C8 = 2;
|
||||
}
|
||||
break;
|
||||
@@ -724,8 +726,8 @@ void func_802B976C(void){
|
||||
|
||||
void bswalrus_timeout_init(void) {
|
||||
baanim_playForDuration_once(ASSET_1A9_ANIM_BSWALRUS_LOSS, 3.2f);
|
||||
func_8029C7F4(1, 1, 3, 7);
|
||||
func_80297970(0.0f);
|
||||
func_8029C7F4(1, 1, 3, BA_PHYSICS_FREEZE);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
func_802914CC(0xD);
|
||||
ncDynamicCamD_func_802BF2C0(60.0f);
|
||||
func_8025A58C(0, 4000);
|
||||
|
@@ -2,6 +2,8 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
/* .bss */
|
||||
u8 D_8037D5D0;
|
||||
|
||||
@@ -14,11 +16,11 @@ void func_802B9980(s32 arg0){
|
||||
case 1: //L802B99B8
|
||||
func_802BB3DC(0, 30.0f, 0.6f);
|
||||
func_8030E58C(SFX_82_METAL_BREAK, 0.8f);
|
||||
player_setYVelocity(400.0f);
|
||||
baphysics_set_vertical_velocity(400.0f);
|
||||
break;
|
||||
case 2: //L802B99F4
|
||||
func_802BB3DC(0, 10.0f, 0.6f);
|
||||
player_setYVelocity(300.0f);
|
||||
baphysics_set_vertical_velocity(300.0f);
|
||||
break;
|
||||
case 3: //L802B9A20
|
||||
func_8029E3C0(0, 0.01f);
|
||||
@@ -45,7 +47,7 @@ void func_802B9AAC(void){
|
||||
|
||||
void func_802B9ACC(void){
|
||||
baanim_playForDuration_once(ASSET_281_ANIM_WISHYWASHY_DOOOH, 40.0f);
|
||||
func_8029C7F4(1, 1, 3, 2);
|
||||
func_8029C7F4(1, 1, 3, BA_PHYSICS_NORMAL);
|
||||
func_802900B4();
|
||||
func_802B9980(0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user