PAL: sync core2/code_7060 & resolve file compiler warnings

This commit is contained in:
Banjo Kazooie
2024-09-28 13:20:56 -05:00
parent 86b22d6d09
commit 87b9bb398f
17 changed files with 136 additions and 68 deletions

View File

@@ -90,7 +90,7 @@ f32 func_802D7038(Actor *this) {
void func_802D7124(Actor *actor, f32 arg1) {
f32 vp[3];
viewport_getPosition_vec3f(&vp);
viewport_getPosition_vec3f(vp);
if ((actor->position[0] - vp[0]) * (actor->position[0] - vp[0]) + (actor->position[2] - vp[2]) * (actor->position[2] - vp[2]) < 12250000.0f) {
func_802D729C(actor, arg1);
}

View File

@@ -4,7 +4,7 @@
void func_802D77D4(Actor *this);
extern void func_8028F738(f32[3], f32[3], f32, u32);
extern void player_setClimbParams(f32[3], f32[3], f32, u32);
extern f32 func_80258640(f32[3], f32[3]);
typedef struct {
@@ -78,7 +78,7 @@ void func_802D77D4(Actor *this) {
if (((sp4C[0] * sp4C[0]) + (sp4C[2] * sp4C[2])) < (sp3C * sp3C)) {
if ((this->position[1] < sp40[1]) && (sp40[1] <= local->unk0[1])) {
if (volatileFlag_get(VOLATILE_FLAG_2_FF_IN_MINIGAME) == 0) {
func_8028F738(this->position, local->unk0, (f32)this->unkF4_8, local->unkC);
player_setClimbParams(this->position, local->unk0, (f32)this->unkF4_8, local->unkC);
}
}
}

View File

@@ -57,7 +57,7 @@ void __chTermite_updateWalkSFX(Actor *this) {
f32 sp24[3];
f32 sp20;
viewport_getPosition_vec3f(&sp24);
viewport_getPosition_vec3f(sp24);
sp20 = ml_map_f( (300.0f - sp24[0])*(300.0f - sp24[0]) + (this->position[1] - sp24[1])*(this->position[1] - sp24[1]) + (-858.0f - sp24[2])*(-858.0f - sp24[2])
, 7617600.0f, 8236900.0f
, 8000.0f, 1000.0f

View File

@@ -22,7 +22,7 @@ extern void func_8029B73C(f32 arg0[3], f32 arg1, f32 arg2, f32 arg3, f32 arg4);
bool func_8028F4B8(f32 arg0[3], f32 arg1, f32 arg2);
bool func_8028F620(f32 arg0[3], f32 arg1, f32 arg2);
void func_8028F85C(f32 arg0[3]);
void func_8028F8A4(f32 rotation[3]);
void player_setRotation(f32 rotation[3]);
void func_8028F918(s32 arg0);
@@ -46,15 +46,15 @@ f32 D_8037BFCC;
f32 D_8037BFD0;
/* .code */
bool func_8028DFF0(s32 arg0, s32 arg1[3]) {
bool func_8028DFF0(s32 arg0, s32 position[3]) {
if (arg0 >= 0x80) {
arg1[0] = func_802E4A98(arg0);
arg1[1] = func_802E4AAC(arg0);
arg1[2] = func_802E4AC0(arg0);
position[0] = func_802E4A98(arg0);
position[1] = func_802E4AAC(arg0);
position[2] = func_802E4AC0(arg0);
return TRUE;
}
else{
return _nodeProp_findPositionFromActorId(func_803084F0(arg0), arg1);
return _nodeProp_findPositionFromActorId(func_803084F0(arg0), position);
}
}
@@ -151,7 +151,7 @@ void func_8028E0F0(s32 arg0, s32 arg1[3]) {
bs_setState(badrone_goto(sp7C, 1.0f, func_8028E0B0, NULL));
return;
}
func_8028F85C(&sp7C);
func_8028F85C(sp7C);
func_80295A8C();
bsStoredState_setTrot(FALSE);
miscFlag_clear(MISC_FLAG_16);
@@ -192,7 +192,7 @@ void func_8028E4B0(void) {
return;
}
if (sp20 == 0x63) {
func_8028F85C(&D_8037BFC0);
func_8028F85C(D_8037BFC0);
yaw_set(D_8037BFCC);
D_8037BFBC = (s32) D_8037BFD0;
D_8037BFB8 = 1;
@@ -213,12 +213,12 @@ void func_8028E4B0(void) {
D_80363694--;
if (D_80363694 == 0) {
func_8028F85C(D_80363698);
func_8028F8A4(D_803636A4);
player_setRotation(D_803636A4);
}
}
if (D_803636B0) {
D_803636B0 = FALSE;
func_8028F85C(&D_803636B4);
func_8028F85C(D_803636B4);
}
}
@@ -668,7 +668,7 @@ bool player_setCarryObjectPoseInHorizontalRadius(f32 position[3], f32 radius, en
}
//sets carry actor if player is within a cylinder around a point
bool func_8028F364(f32 position[3], f32 radius, f32 vert_range, enum actor_e actor_id, Actor **arg4) {
bool player_setCarryObjectPoseInCylinder(f32 position[3], f32 radius, f32 vert_range, enum actor_e actor_id, Actor **arg4) {
if (player_isInVerticalRange(position, vert_range)) {
return player_setCarryObjectPoseInHorizontalRadius(position, radius, actor_id, arg4);
}
@@ -774,7 +774,7 @@ void player_stateTimer_set(enum state_timer_e timer_id, f32 value){
stateTimer_set(timer_id, value);
}
void func_8028F738(f32 bottom[3], f32 top[3], f32 radius, u32 arg3){
void player_setClimbParams(f32 bottom[3], f32 top[3], f32 radius, u32 arg3){
climbSet(bottom, top, radius, arg3);
}
@@ -824,7 +824,7 @@ void func_8028F85C(f32 arg0[3]){
cameraMode_update();
}
void func_8028F8A4(f32 rotation[3]){
void player_setRotation(f32 rotation[3]){
pitch_setIdeal(rotation[0]);
yaw_setIdeal(rotation[1]);
roll_setIdeal(rotation[2]);
@@ -875,8 +875,8 @@ void func_8028FA34(enum actor_e arg0, Actor *arg1){
func_8028DEEC(arg0, arg1);
}
void func_8028FA54(f32 arg0[3]){
set_throw_target_position(arg0);
void player_setThrowTargetPosition(f32 position[3]){
set_throw_target_position(position);
}
void func_8028FA74(f32 dst[3]){
@@ -897,7 +897,7 @@ void func_8028FAB0(f32 arg0[3]){
func_80298564(diff);
}
void func_8028FAEC(f32 rotation[3]){
void player_setIdealRotation(f32 rotation[3]){
pitch_setIdeal(rotation[0]);
yaw_setIdeal(rotation[1]);
roll_setIdeal(rotation[2]);

View File

@@ -219,8 +219,8 @@ s32 func_8030CDE4(SfxSource *arg0){
f32 temp_f0;
f32 pad;
viewport_getPosition_vec3f(&sp44);
viewport_getLookVector(&sp38);
viewport_getPosition_vec3f(sp44);
viewport_getLookVector(sp38);
sp2C[0] = arg0->position[0] - sp44[0];
sp2C[1] = arg0->position[1] - sp44[1];
sp2C[2] = arg0->position[2] - sp44[2];
@@ -228,9 +228,9 @@ s32 func_8030CDE4(SfxSource *arg0){
if(sp2C[0]*sp2C[0] + sp2C[1]*sp2C[1] + sp2C[2]*sp2C[2] < 10.0f){
return 0x40;
}
ml_vec3f_normalize(&sp2C);
ml_vec3f_normalize(sp2C);
sp38[1] = 0.0f;
ml_vec3f_normalize(&sp38);
ml_vec3f_normalize(sp38);
temp_f0 = func_80256AB4(sp38[0], sp38[2], sp2C[0], sp2C[2]);
if(arg0->unk16){
arg0->unk18 += 0.07*((f32)(s32)(64.0f - (temp_f0 * 63.0f)) - arg0->unk18);

View File

@@ -163,7 +163,7 @@ void chMinigame_update(Actor *this){
marker_setFreeMethod(this->marker, __chMinigame_free);
func_8028FAB0(this->position);
this->unk1C[0] = 0.0f; this->unk1C[1] = this->yaw; this->unk1C[2] = 0.0f;
func_8028FAEC(this->unk1C);
player_setIdealRotation(this->unk1C);
this->has_met_before = FALSE;
if(this->unk10_12 >= 7){
marker_despawn(this->marker);

View File

@@ -55,7 +55,7 @@ void func_8034F774(void){
sfxsource_setSfxId(D_803720A0.sfxsourceIdx, 0x3EC);
func_8030DD14(D_803720A0.sfxsourceIdx, 3);
func_8030DFF0(D_803720A0.sfxsourceIdx, 1);
sfxsource_set_position(D_803720A0.sfxsourceIdx, &sp44);
sfxsource_set_position(D_803720A0.sfxsourceIdx, sp44);
sfxsource_set_fade_distances(D_803720A0.sfxsourceIdx, 400.0f, 3200.0f);
func_8030DE44(D_803720A0.sfxsourceIdx, 2, 0.5f);
func_8030E2C4(D_803720A0.sfxsourceIdx);