Merge branch 'master' into 'document/level-setup-related-code'
# Conflicts: # src/core2/nc/dynamicCam12.c
This commit is contained in:
@@ -30,24 +30,24 @@ void ability_use(s32 arg0){
|
||||
break;
|
||||
case 0x3://L8029569C //
|
||||
if(map_get() == MAP_1_SM_SPIRAL_MOUNTAIN){
|
||||
sp2C = ASSET_DFC_TEXT_UNKNOWN;
|
||||
sp2C = ASSET_DFC_DIALOG_UNKNOWN;
|
||||
}
|
||||
break;
|
||||
case 0x4://L802956B8 //
|
||||
if(map_get() == MAP_1_SM_SPIRAL_MOUNTAIN){
|
||||
sp2C = ASSET_E02_TEXT_UNKNOWN;
|
||||
sp2C = ASSET_E02_DIALOG_UNKNOWN;
|
||||
}
|
||||
break;
|
||||
case 0x5://L802956D4 //barge
|
||||
if(map_get() == MAP_1_SM_SPIRAL_MOUNTAIN){
|
||||
sp2C = ASSET_E05_TEXT_UNKNOWN;
|
||||
sp2C = ASSET_E05_DIALOG_UNKNOWN;
|
||||
}
|
||||
break;
|
||||
case 0x6://L802956F0 //slide
|
||||
sp28 = 0;
|
||||
if (!ability_isUnlocked(ABILITY_10_TALON_TROT)) {
|
||||
if (map_get() == MAP_2_MM_MUMBOS_MOUNTAIN) {
|
||||
sp2C = ASSET_B4D_TEXT_UNKNOWN;
|
||||
sp2C = ASSET_B4D_DIALOG_UNKNOWN;
|
||||
}
|
||||
else {
|
||||
return;
|
||||
|
@@ -6,7 +6,6 @@
|
||||
|
||||
|
||||
extern f32 func_802E4B38(void);
|
||||
extern f32 ml_mapRange_f(f32, f32, f32, f32, f32);
|
||||
|
||||
void baanim_80289F30(void);
|
||||
|
||||
|
@@ -91,7 +91,7 @@ void baflap_update(void) {
|
||||
if (s_active != 0) {
|
||||
//update timers
|
||||
for(i = 0; i < 5; i++){
|
||||
func_80259430(&s_flap_list[i]);
|
||||
ml_sub_delta_time(&s_flap_list[i]);
|
||||
}
|
||||
if (s_flap_max_timer != 0.0f) {
|
||||
temp_f0 = s_flap_max_timer;
|
||||
|
@@ -1,20 +1,18 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "core2/ba/physics.h"
|
||||
#include "version.h"
|
||||
#include "prop.h"
|
||||
#include "SnS.h"
|
||||
|
||||
extern void func_803012F8(void);
|
||||
extern f32 ml_distanceSquared_vec3f(f32 arg0[3], f32 arg1[3]);
|
||||
extern void __baMarker_8028BA00(s32);
|
||||
extern void spawnQueue_actor_s16(void);
|
||||
extern void func_802A6388(f32);
|
||||
extern f32 chwadingboots_802D6E4C(Actor *);
|
||||
extern void set_turbo_duration(f32);
|
||||
extern f32 chtrainers_getDuration(Actor *);
|
||||
extern int ml_vec3f_point_within_horizontal_distance(f32 vec[3], f32 x, f32 z, f32 val);
|
||||
extern void func_802EE354(Actor *, s32, s32, s32, f32, f32, f32, f32 arg8[3], s32, f32 arg10[2]);
|
||||
extern void func_8035644C(s32);
|
||||
extern void func_8035646C(s32 arg0);
|
||||
@@ -24,7 +22,7 @@ extern Actor *baModel_80291AAC(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **
|
||||
extern void baMarker_8028D7B8(s32 arg0, ActorMarker *arg1, struct5Cs *collision_flags);
|
||||
extern void func_802EE6CC(f32[3], s32, s32[4], s32, f32, f32, s32,s32,s32);
|
||||
extern void func_80320ED8(ActorMarker *, f32, s32);
|
||||
extern NodeProp *cubeList_findNodePropByActorId(enum actor_e actor_id, s32 position[3]);
|
||||
extern NodeProp *cubeList_findNodePropByActorIdAndPosition_s32(enum actor_e actor_id, s32 position[3]);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -116,7 +114,7 @@ void __baMarker_8028B848(void){
|
||||
s0 = ASSET_E57_DIALOG_FIRST_JIGGY;
|
||||
}
|
||||
else if(map_get() == MAP_2_MM_MUMBOS_MOUNTAIN){
|
||||
s0 = ASSET_B45_TEXT_JIGGY_COLLECT_10;
|
||||
s0 = ASSET_B45_DIALOG_JIGGY_COLLECT_10;
|
||||
}
|
||||
|
||||
if(s0){
|
||||
@@ -157,7 +155,7 @@ void __baMarker_8028B9A8(s32 arg0){
|
||||
NodeProp *tmp_v0;
|
||||
s32 ideal_yaw[3];
|
||||
|
||||
tmp_v0 = cubeList_findNodePropByActorId(0x1F6, 0);
|
||||
tmp_v0 = cubeList_findNodePropByActorIdAndPosition_s32(0x1F6, NULL);
|
||||
nodeprop_getPosition_s32(tmp_v0, &ideal_yaw);
|
||||
func_802CA1CC(arg0);
|
||||
actor_spawnWithYaw_s32(ACTOR_47_EMPTY_HONEYCOMB, &ideal_yaw, 0);
|
||||
|
@@ -6,9 +6,7 @@
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
void func_80254008(void);
|
||||
extern void func_80256E24(f32[3], f32, f32, f32, f32, f32);
|
||||
void assetcache_release(void *); //assetcache_free
|
||||
extern void ml_vec3f_assign(f32[3], f32, f32, f32);
|
||||
void func_8033A280(f32);
|
||||
|
||||
extern s32 osCicId;
|
||||
|
@@ -3,10 +3,6 @@
|
||||
#include "variables.h"
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
extern f32 ml_sin_deg(f32);
|
||||
extern f32 ml_dotProduct_vec3f(f32[3], f32[3]);
|
||||
extern void func_80256D0C(f32, f32, f32, f32, f32, f32 *, f32 *, f32 *);
|
||||
extern void func_80256E24(f32[3], f32, f32, f32, f32, f32);
|
||||
extern f32 climbGetRadius(void);
|
||||
extern f32 func_8029CED0(void);
|
||||
|
||||
@@ -61,7 +57,7 @@ void __baphysics_update_normal(void){
|
||||
if(func_80294548()){
|
||||
func_80294480(sp54);
|
||||
ml_vec3f_normalize_copy(sp48, sp60);
|
||||
sp44 = ml_dotProduct_vec3f(sp48, sp54);
|
||||
sp44 = ml_vec3f_dot_product(sp48, sp54);
|
||||
sp40 = get_slope_timer();
|
||||
if(sp44 != 0.0f){
|
||||
if(sp44 < 0){
|
||||
|
@@ -440,7 +440,7 @@ void bsant_die_update(void){
|
||||
}
|
||||
|
||||
void bsant_die_end(void){
|
||||
func_8024BD08(0);
|
||||
core1_ce60_incOrDecCounter(FALSE);
|
||||
baphysics_reset_gravity();
|
||||
pitch_setIdeal(0.0f);
|
||||
roll_setIdeal(0.0f);
|
||||
|
@@ -196,5 +196,5 @@ void bsbflap_end(void) {
|
||||
baphysics_reset_gravity();
|
||||
baphysics_reset_terminal_velocity();
|
||||
func_8029E090(0, 0.2f);
|
||||
func_8030DA44(D_8037D30C);
|
||||
sfxsource_freeSfxsourceByIndex(D_8037D30C);
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include <core1/viewport.h>
|
||||
#include "core2/ba/physics.h"
|
||||
#include "core2/ba/flap.h"
|
||||
|
||||
|
@@ -152,7 +152,7 @@ void bsblongleg_enter_update(void){
|
||||
|
||||
void bsblongleg_enter_end(void){
|
||||
func_802A5404();
|
||||
func_8030DA44(D_8037D361);
|
||||
sfxsource_freeSfxsourceByIndex(D_8037D361);
|
||||
}
|
||||
|
||||
void bsblongleg_stand_enter(void){
|
||||
@@ -308,7 +308,7 @@ void bsblongleg_exit_update(void){
|
||||
}
|
||||
|
||||
void bsblongleg_exit_end(void){
|
||||
func_8030DA44(D_8037D361);
|
||||
sfxsource_freeSfxsourceByIndex(D_8037D361);
|
||||
func_802A5404();
|
||||
}
|
||||
|
||||
|
@@ -116,7 +116,7 @@ void bsbshock_charge_update(void){
|
||||
}
|
||||
|
||||
void bsbshock_charge_end(void){
|
||||
func_8030DA44(D_8037D382);
|
||||
sfxsource_freeSfxsourceByIndex(D_8037D382);
|
||||
func_8029E064(0);
|
||||
func_8029E070(0);
|
||||
if(baModel_80292230() != 0.0f){
|
||||
|
@@ -464,7 +464,7 @@ void func_802A8098(void) {
|
||||
void func_802A82D4(void) {
|
||||
func_802906A4(1);
|
||||
func_80291548();
|
||||
func_8024BD08(0);
|
||||
core1_ce60_incOrDecCounter(FALSE);
|
||||
baMarker_collisionOn();
|
||||
if (bs_getNextState() != BS_5A_LOADZONE) {
|
||||
func_80346CE8();
|
||||
|
@@ -39,7 +39,7 @@ static void __bsbwhirl_end(void){
|
||||
func_8029B0C0();
|
||||
func_8029E070(0);
|
||||
func_8025A55C(-1, 0xfa0, 0xd);
|
||||
func_8024BD08(1);
|
||||
core1_ce60_incOrDecCounter(TRUE);
|
||||
func_8025A7DC(COMUSIC_25_USING_GOLD_FEATHERS);
|
||||
}
|
||||
baanim_setUpdateType(BAANIM_UPDATE_1_NORMAL);
|
||||
@@ -86,7 +86,7 @@ void bsbwhirl_enter_init(void){
|
||||
func_8029B324(1, 1.0f);
|
||||
func_8029E070(1);
|
||||
D_8037D3B0 = 0.0f;
|
||||
func_8024BD08(0);
|
||||
core1_ce60_incOrDecCounter(FALSE);
|
||||
func_8025A55C(0, 0xfa0, 0xd);
|
||||
func_8025A6EC(0x25, 0x6d60);
|
||||
func_80299BD4();
|
||||
|
@@ -14,7 +14,6 @@ f32 baanim_getTimer(void);
|
||||
void baanim_setEndAndDuration(f32, f32);
|
||||
f32 func_8029B2E8(void);
|
||||
f32 func_8029B33C(void);
|
||||
f32 ml_interpolate_f(f32, f32, f32);
|
||||
f32 func_8029B30C();
|
||||
|
||||
/* .data */
|
||||
@@ -469,7 +468,7 @@ void func_802A1DD8(void){
|
||||
}
|
||||
|
||||
void func_802A1F2C(void){
|
||||
func_8024BD08(0);
|
||||
core1_ce60_incOrDecCounter(FALSE);
|
||||
baphysics_reset_gravity();
|
||||
func_80291548();
|
||||
func_80292EA4();
|
||||
@@ -508,7 +507,7 @@ void func_802A2014(void){
|
||||
void func_802A2054(void){
|
||||
baMarker_collisionOn();
|
||||
func_8025A2FC(-1, 0xFA0);
|
||||
func_8024BD08(1);
|
||||
core1_ce60_incOrDecCounter(TRUE);
|
||||
func_80291548();
|
||||
func_80298A64();
|
||||
}
|
||||
@@ -519,7 +518,7 @@ void func_802A2098(void){
|
||||
yaw_setIdeal(func_8029B41C());
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_NORMAL);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
func_8024BD08(0);
|
||||
core1_ce60_incOrDecCounter(FALSE);
|
||||
func_8025A2FC(0, 0xFA0);
|
||||
func_8025A6EC(COMUSIC_42_NOTEDOOR_OPENING_FANFARE, -1);
|
||||
func_8029151C(0xC);
|
||||
|
@@ -490,7 +490,7 @@ void bscroc_die_update(void){
|
||||
}
|
||||
|
||||
void bscroc_die_end(void){
|
||||
func_8024BD08(0);
|
||||
core1_ce60_incOrDecCounter(FALSE);
|
||||
baphysics_reset_gravity();
|
||||
pitch_setIdeal(0.0f);
|
||||
roll_setIdeal(0.0f);
|
||||
|
@@ -124,7 +124,7 @@ void bsdie_update(void){
|
||||
}
|
||||
|
||||
void bsdie_end(void){
|
||||
func_8024BD08(0);
|
||||
core1_ce60_incOrDecCounter(FALSE);
|
||||
baphysics_reset_gravity();
|
||||
func_8029E070(0);
|
||||
pitch_setIdeal(0.0f);
|
||||
|
@@ -1,16 +1,13 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include <core1/viewport.h>
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
|
||||
extern void player_setYPosition(f32);
|
||||
extern void yaw_applyIdeal(void);
|
||||
extern f32 func_80257A44(f32, f32);
|
||||
extern f32 cosf(f32);
|
||||
extern f32 ml_remainder_f(f32, f32);
|
||||
extern f32 func_80257AD4(f32, f32);
|
||||
|
||||
/* .bss */
|
||||
struct {
|
||||
|
@@ -32,7 +32,7 @@ void bsjig_jiggy_init(void){
|
||||
yaw_setIdeal(func_8029B41C()); //face camera
|
||||
func_8029C7F4(1,1,3, BA_PHYSICS_NORMAL);
|
||||
baphysics_set_target_horizontal_velocity(0.0f);
|
||||
func_8024BD08(0);
|
||||
core1_ce60_incOrDecCounter(FALSE);
|
||||
func_8025A2FC(0,0xfa0);
|
||||
tmp = (item_getCount(ITEM_E_JIGGY) == 9);
|
||||
if(tmp == 0) //weird if...
|
||||
@@ -106,7 +106,7 @@ void bsjig_jiggy_end(void){
|
||||
|
||||
if(bs_getNextState() != BS_34_JIG_NOTEDOOR){
|
||||
func_8025A2FC(-1, 0xfa0);
|
||||
func_8024BD08(1);
|
||||
core1_ce60_incOrDecCounter(TRUE);
|
||||
}
|
||||
baMarker_collisionOn();
|
||||
if( jiggyscore_total() == 100
|
||||
@@ -148,7 +148,7 @@ void bsjig_jiggy_interrupt(void){
|
||||
void bsjig_notedoor_end(void){
|
||||
baMarker_collisionOn();
|
||||
func_8025A2FC(-1, 0xfa0);
|
||||
func_8024BD08(1);
|
||||
core1_ce60_incOrDecCounter(TRUE);
|
||||
func_8029E070(0);
|
||||
func_80291548();
|
||||
if( D_8037D4B2
|
||||
@@ -174,7 +174,7 @@ void bsjig_notedoor_init(void){
|
||||
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);
|
||||
core1_ce60_incOrDecCounter(FALSE);
|
||||
func_8025A2FC(0,0xfa0);
|
||||
}
|
||||
func_8025A6EC(COMUSIC_42_NOTEDOOR_OPENING_FANFARE,-1);
|
||||
|
@@ -524,7 +524,7 @@ void bspumpkin_die_update(void){
|
||||
|
||||
void bspumpkin_die_end(void) {
|
||||
func_802B229C();
|
||||
func_8024BD08(0);
|
||||
core1_ce60_incOrDecCounter(FALSE);
|
||||
baphysics_reset_gravity();
|
||||
pitch_setIdeal(0.0f);
|
||||
roll_setIdeal(0.0f);
|
||||
|
@@ -17,7 +17,7 @@ void func_802B6270(void){
|
||||
ncDynamicCamD_func_802BF2C0(80.0f);
|
||||
func_8025A58C(0,0xfa0);
|
||||
comusic_playTrack(COMUSIC_3C_MINIGAME_LOSS);
|
||||
func_8024BD08(0);
|
||||
core1_ce60_incOrDecCounter(FALSE);
|
||||
func_8029E070(1);
|
||||
baMarker_collisionOff();
|
||||
}
|
||||
@@ -42,7 +42,7 @@ void func_802B6314(void){
|
||||
void func_802B63C8(void){
|
||||
func_80292EA4();
|
||||
func_80291548();
|
||||
func_8024BD08(1);
|
||||
core1_ce60_incOrDecCounter(TRUE);
|
||||
}
|
||||
|
||||
void func_802B63F8(void){
|
||||
@@ -58,7 +58,7 @@ void func_802B63F8(void){
|
||||
ncDynamicCamD_func_802BF2C0(80.0f);
|
||||
func_8025A58C(0,0xfa0);
|
||||
comusic_playTrack(COMUSIC_3C_MINIGAME_LOSS);
|
||||
func_8024BD08(0);
|
||||
core1_ce60_incOrDecCounter(FALSE);
|
||||
baMarker_collisionOff();
|
||||
func_8029E3C0(0, 2.9f);
|
||||
}
|
||||
@@ -71,6 +71,6 @@ void func_802B64D0(void){
|
||||
void func_802B6500(void){
|
||||
func_8029E070(0);
|
||||
func_80291548();
|
||||
func_8024BD08(1);
|
||||
core1_ce60_incOrDecCounter(TRUE);
|
||||
func_8025A904();
|
||||
}
|
||||
|
@@ -11,7 +11,6 @@ f32 func_8029B2E8(void);
|
||||
void func_8029AD28(f32, s32);
|
||||
void baanim_scaleDuration(f32);
|
||||
f32 func_8029B30C(void);
|
||||
f32 ml_interpolate_f(f32, f32, f32);
|
||||
void func_80299594(s32, f32);
|
||||
|
||||
// .data
|
||||
|
@@ -5,7 +5,6 @@
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
extern void func_8029AD68(f32, s32);
|
||||
extern f32 ml_dotProduct_vec3f(f32[3], f32[3]);
|
||||
|
||||
int bswalrus_inSet(enum bs_e state);
|
||||
|
||||
@@ -77,7 +76,7 @@ void func_802B7F28(void) {
|
||||
if (900.0 < sp20[0] * sp20[0] + sp20[1] * sp20[1] + sp20[2] * sp20[2]) {
|
||||
ml_vec3f_normalize(sp20);
|
||||
func_80294480(sp2C);
|
||||
if ( ml_dotProduct_vec3f(sp20, sp2C) < -0.2) {
|
||||
if ( ml_vec3f_dot_product(sp20, sp2C) < -0.2) {
|
||||
sp3C += D_8037D5C0 * 350.0;
|
||||
}
|
||||
}
|
||||
@@ -508,7 +507,7 @@ void bswalrus_die_update(void){
|
||||
}
|
||||
|
||||
void bswalrus_die_end(void){
|
||||
func_8024BD08(0);
|
||||
core1_ce60_incOrDecCounter(FALSE);
|
||||
baphysics_reset_gravity();
|
||||
pitch_setIdeal(0.0f);
|
||||
roll_setIdeal(0.0f);
|
||||
@@ -732,7 +731,7 @@ void bswalrus_timeout_init(void) {
|
||||
ncDynamicCamD_func_802BF2C0(60.0f);
|
||||
func_8025A58C(0, 4000);
|
||||
comusic_playTrack(COMUSIC_3C_MINIGAME_LOSS);
|
||||
func_8024BD08(0);
|
||||
core1_ce60_incOrDecCounter(FALSE);
|
||||
baMarker_collisionOff();
|
||||
func_8029E3C0(0, 2.9f);
|
||||
func_802B813C();
|
||||
@@ -749,7 +748,7 @@ void func_802B9830(void) {
|
||||
|
||||
void func_802B9880(void) {
|
||||
func_80291548();
|
||||
func_8024BD08(1);
|
||||
core1_ce60_incOrDecCounter(TRUE);
|
||||
func_8025A904();
|
||||
func_80292EA4();
|
||||
func_802B80D0();
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include <core1/viewport.h>
|
||||
|
||||
|
||||
extern void __spawnQueue_add_2(void (*)(s32, s32), s32, s32);
|
||||
|
@@ -4,7 +4,6 @@
|
||||
#include <math.h>
|
||||
|
||||
extern f32 mapModel_getFloorY(f32[3]);
|
||||
extern f32 func_80257204(f32, f32, f32, f32);
|
||||
|
||||
typedef enum {
|
||||
CH_BAT_STATE_ROOSTING = 1,
|
||||
|
@@ -35,7 +35,7 @@ void chBeehive_die(ActorMarker *this, ActorMarker *other){
|
||||
__spawnQueue_add_4((GenFunction_4)spawnQueue_actor_f32, ACTOR_4A_WOOD_EXPLOSION, reinterpret_cast(s32, actor->position[0]), reinterpret_cast(s32, actor->position[1]), reinterpret_cast(s32, actor->position[2]));
|
||||
actor->marker->propPtr->unk8_3 = 0;
|
||||
func_803115C4(ASSET_D96_DIALOG_BEEHIVE_MEET);
|
||||
func_803115C4(ASSET_DA6_TEXT_BEEHIVE_WITH_BEES);
|
||||
func_803115C4(ASSET_DA6_DIALOG_BEEHIVE_WITH_BEES);
|
||||
}
|
||||
|
||||
void chBeehive_update(Actor *this){
|
||||
|
@@ -263,7 +263,7 @@ void func_802C6240(Actor *this){
|
||||
if (0.0f == this->actor_specific_1_f) {
|
||||
animctrl_setPlaybackType(this->animctrl, ANIMCTRL_LOOP);
|
||||
subaddie_set_state_with_direction(this, 1, 0.65f, 1);
|
||||
func_8030DA44(this->unk44_31);
|
||||
sfxsource_freeSfxsourceByIndex(this->unk44_31);
|
||||
this->unk44_31 = 0;
|
||||
sfxsource_playHighPriority(SFX_19_BANJO_LANDING_08);
|
||||
}
|
||||
@@ -358,7 +358,7 @@ Actor *func_802C6E84(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
||||
break;
|
||||
case 4://L802C6F50
|
||||
if((globalTimer_getTime() & 1) == 1){
|
||||
if(func_80259808(actor->yaw)){
|
||||
if(ml_isViewportYawWithOffsetNormalized(actor->yaw)){
|
||||
func_802C6E3C(0xb, sp34);
|
||||
func_802C6E3C(0xa, sp34);
|
||||
}
|
||||
|
@@ -1,9 +1,8 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include <core1/viewport.h>
|
||||
|
||||
extern void func_8025982C(f32[3], f32[3], f32[3], f32);
|
||||
extern void func_8025A6CC(enum comusic_e arg0, s32 arg1);
|
||||
extern void chBottlesBonusCursor_func_802DF99C(void);
|
||||
extern f32 *chBottlesBonusCursor_func_802E05AC(s32);
|
||||
@@ -327,8 +326,8 @@ void chBottlesBonus_func_802DD8AC(BoneTransformList *arg0, s32 arg1) {
|
||||
switch(chBottlesBonusCursor_func_802E0538(i)){
|
||||
case 1://L802DDBB4
|
||||
chBottlesBonus_func_802DD484(spD8, spD4, 1.0f, 0.2);
|
||||
func_8025982C(D_8037DEBC[i].unk0, D_8037DEB8[i].unk0, chBottlesBonus_func_802DD60C(i), chBottlesBonus_func_802DD804(D_8037DEC8[i] / 0.2));
|
||||
func_8025982C(D_8037DEBC[i].unk1C, D_8037DEB8[i].unk1C, D_8037DEC4[i].unk1C, chBottlesBonus_func_802DD804(D_8037DEC8[i]/ 0.2));
|
||||
ml_vec3f_interpolate(D_8037DEBC[i].unk0, D_8037DEB8[i].unk0, chBottlesBonus_func_802DD60C(i), chBottlesBonus_func_802DD804(D_8037DEC8[i] / 0.2));
|
||||
ml_vec3f_interpolate(D_8037DEBC[i].unk1C, D_8037DEB8[i].unk1C, D_8037DEC4[i].unk1C, chBottlesBonus_func_802DD804(D_8037DEC8[i]/ 0.2));
|
||||
func_80345D30(spAC, chBottlesBonusCursor_func_802E068C(i), D_8037DEB8[i].unkC);
|
||||
func_803458E4(spBC, D_8037DEB8[i].unkC, spAC, chBottlesBonus_func_802DD804(D_8037DEC8[i] / 0.4));
|
||||
|
||||
@@ -346,7 +345,7 @@ void chBottlesBonus_func_802DD8AC(BoneTransformList *arg0, s32 arg1) {
|
||||
break;
|
||||
case 2://L802DDD9C
|
||||
chBottlesBonus_func_802DD484(spD8, spD4, 1.0f, 0.2);
|
||||
func_8025982C(D_8037DEBC[i].unk0, D_8037DEC4[chBottlesBonusCursor_func_802E0588(i)].unk0, chBottlesBonus_func_802DD60C(i), chBottlesBonus_func_802DD804(D_8037DEC8[i] / 0.2));
|
||||
ml_vec3f_interpolate(D_8037DEBC[i].unk0, D_8037DEC4[chBottlesBonusCursor_func_802E0588(i)].unk0, chBottlesBonus_func_802DD60C(i), chBottlesBonus_func_802DD804(D_8037DEC8[i] / 0.2));
|
||||
func_80345D30(sp9C, chBottlesBonusCursor_func_802E068C(i), D_8037DEB8[i].unkC);
|
||||
func_80345D30(sp8C, chBottlesBonusCursor_func_802E0664(i), D_8037DEB8[i].unkC);
|
||||
func_803458E4(D_8037DEBC[i].unkC, sp9C, sp8C, chBottlesBonus_func_802DD804(D_8037DF18[i] / 0.2));
|
||||
@@ -363,15 +362,15 @@ void chBottlesBonus_func_802DD8AC(BoneTransformList *arg0, s32 arg1) {
|
||||
|
||||
case 3://L802DDF48
|
||||
chBottlesBonusCursor_func_802DF460(40 + i, chBottlesBonusMarker, D_8037DEC4[chBottlesBonusCursor_func_802E0588(i)].unk0);
|
||||
func_8025982C(D_8037DEBC[i].unk0, D_8037DEC0[i].unk0, D_8037DEC4[chBottlesBonusCursor_func_802E0588(i)].unk0, chBottlesBonus_func_802DD804(D_8037DEC8[i] / 0.4));
|
||||
func_8025982C(D_8037DEBC[i].unk1C, D_8037DEC0[i].unk1C, D_8037DEC4[chBottlesBonusCursor_func_802E0588(i)].unk1C, chBottlesBonus_func_802DD804(D_8037DEC8[i] / 0.4));
|
||||
ml_vec3f_interpolate(D_8037DEBC[i].unk0, D_8037DEC0[i].unk0, D_8037DEC4[chBottlesBonusCursor_func_802E0588(i)].unk0, chBottlesBonus_func_802DD804(D_8037DEC8[i] / 0.4));
|
||||
ml_vec3f_interpolate(D_8037DEBC[i].unk1C, D_8037DEC0[i].unk1C, D_8037DEC4[chBottlesBonusCursor_func_802E0588(i)].unk1C, chBottlesBonus_func_802DD804(D_8037DEC8[i] / 0.4));
|
||||
func_80345D30(sp7C, chBottlesBonusCursor_func_802E0664(i), D_8037DEB8[i].unkC);
|
||||
func_803458E4(D_8037DEBC[i].unkC, D_8037DEC0[i].unkC, sp7C, chBottlesBonus_func_802DD804(D_8037DF18[i] / 0.2));
|
||||
break;
|
||||
|
||||
case 0://L802DE084
|
||||
func_8025982C(D_8037DEBC[i].unk0, D_8037DEC0[i].unk0, D_8037DEB8[i].unk0, chBottlesBonus_func_802DD804(D_8037DEC8[i] / 0.4));
|
||||
func_8025982C(D_8037DEBC[i].unk1C, D_8037DEC0[i].unk1C, D_8037DEB8[i].unk1C, chBottlesBonus_func_802DD804(D_8037DEC8[i] / 0.4));
|
||||
ml_vec3f_interpolate(D_8037DEBC[i].unk0, D_8037DEC0[i].unk0, D_8037DEB8[i].unk0, chBottlesBonus_func_802DD804(D_8037DEC8[i] / 0.4));
|
||||
ml_vec3f_interpolate(D_8037DEBC[i].unk1C, D_8037DEC0[i].unk1C, D_8037DEB8[i].unk1C, chBottlesBonus_func_802DD804(D_8037DEC8[i] / 0.4));
|
||||
func_803458E4(D_8037DEBC[i].unkC, D_8037DEC0[i].unkC, D_8037DEB8[i].unkC, chBottlesBonus_func_802DD804(D_8037DEC8[i] / 0.4));
|
||||
break;
|
||||
}
|
||||
@@ -521,7 +520,7 @@ void chBottlesBonus_update(Actor *this) {
|
||||
func_8025A7DC(COMUSIC_98_BBONUS_PIECES_SHUFFLE);
|
||||
if (D_8037DCC7 == 0) {
|
||||
func_80311714(0);
|
||||
gcdialog_showText(ASSET_E24_TEXT_UNKNOWN, 0x87, this->position, chBottlesBonusMarker, chBottlesBonus_startTimer, NULL);
|
||||
gcdialog_showText(ASSET_E24_DIALOG_UNKNOWN, 0x87, this->position, chBottlesBonusMarker, chBottlesBonus_startTimer, NULL);
|
||||
func_80311714(1);
|
||||
D_8037DCC7 = 1;
|
||||
}
|
||||
|
@@ -1,18 +1,16 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include <core1/viewport.h>
|
||||
|
||||
#ifndef ABS
|
||||
#define ABS(d) ((d) >= 0) ? (d) : -(d)
|
||||
#endif
|
||||
|
||||
extern s16 D_803A5D00[2][0xF660]; //framebuffer
|
||||
extern u8 D_8037DCC8; //bottles bonus flags???
|
||||
|
||||
|
||||
extern void ml_vec3f_assign(f32[3], f32, f32, f32);
|
||||
extern void func_8025AABC(enum comusic_e);
|
||||
extern f32 func_8024E420(s32, s32, s32);
|
||||
extern f32 func_8033DDB8(void);
|
||||
@@ -156,7 +154,7 @@ void chBottlesBonusCursor_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx) {
|
||||
func_80253208(gfx,
|
||||
(s32)(D_8037E5C0.unk18[0] - sp3C/2), (s32)(D_8037E5C0.unk18[1] - sp3C/2),
|
||||
(s32)sp3C, (s32)sp3C,
|
||||
D_803A5D00[getActiveFramebuffer()]
|
||||
gFramebuffers[getActiveFramebuffer()]
|
||||
);
|
||||
modelRender_draw(gfx, mtx, this->position, rotation, this->scale, NULL, marker_loadModelBin(chBottlesBonusCursorMarker));
|
||||
viewport_func_8024E030(this->position, D_8037E5C0.unk10);
|
||||
|
@@ -37,7 +37,7 @@ void func_803567EC(Actor *this){
|
||||
}
|
||||
|
||||
player_getPosition(plyr_pos);
|
||||
plyr_dist = ml_distance_vec3f(plyr_pos, this->position);
|
||||
plyr_dist = ml_vec3f_distance(plyr_pos, this->position);
|
||||
if(this->state == 1){
|
||||
if(plyr_dist < 700.0f)
|
||||
func_80356770(this, 2);
|
||||
|
@@ -5,7 +5,6 @@
|
||||
|
||||
void func_802D77D4(Actor *this);
|
||||
extern void player_setClimbParams(f32[3], f32[3], f32, u32);
|
||||
extern f32 ml_vec3f_horizontal_distance_zero_likely(f32[3], f32[3]);
|
||||
|
||||
typedef struct {
|
||||
f32 unk0[3];
|
||||
|
@@ -148,7 +148,7 @@ void func_8035765C(Actor *this){
|
||||
}//L803576EC
|
||||
|
||||
player_getPosition(sp5C);
|
||||
sp58 = ml_distance_vec3f(this->position, sp5C);
|
||||
sp58 = ml_vec3f_distance(this->position, sp5C);
|
||||
if(this->state == 1){
|
||||
if(sp58 < this->scale*800.0f){
|
||||
func_80357264(this, 2);
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include <core1/viewport.h>
|
||||
|
||||
void func_802CD898(Actor *);
|
||||
void func_802CD8C0(Actor *);
|
||||
|
@@ -96,7 +96,7 @@ void func_80356CCC(Actor *this){
|
||||
func_803569F0(this, (this->state < 5)? 1 : 6);
|
||||
}//L80356D48
|
||||
player_getPosition(sp5C);
|
||||
sp58 = ml_distance_vec3f(this->position, sp5C);
|
||||
sp58 = ml_vec3f_distance(this->position, sp5C);
|
||||
if( this->state == 1){
|
||||
if( sp58 < this->scale*400.0f
|
||||
&& (map_get() != MAP_3C_RBB_KITCHEN || this->position_z < sp5C[2])
|
||||
|
@@ -2,8 +2,6 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern bool ml_vec3f_point_within_horizontal_distance(f32[3], f32, f32, f32);
|
||||
|
||||
/* .data */
|
||||
ActorAnimationInfo chCrabAnimations[] ={
|
||||
{ 0, 0.0f},
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include <core1/viewport.h>
|
||||
|
||||
void chfirefx_update(Actor *this);
|
||||
|
||||
|
@@ -146,7 +146,7 @@ void func_8035C080(Actor *this, s32 next_state){
|
||||
}
|
||||
}
|
||||
else if(next_state == 3){//L8035C4C0
|
||||
if(ml_distance_vec3f(local->unk28, this->position) < 10.0f){
|
||||
if(ml_vec3f_distance(local->unk28, this->position) < 10.0f){
|
||||
func_8035C080(this, 1);
|
||||
return;
|
||||
}
|
||||
@@ -293,11 +293,11 @@ void func_8035C8F4(Actor *this){
|
||||
local->unk0 += 1.9047619047619049*sp34;
|
||||
if(1.0f <= local->unk0)
|
||||
local->unk0 = 1.0f;
|
||||
ml_interpolate_vec3f(this->position, local->unk10, local->unk1C, local->unk0);
|
||||
ml_vec3f_interpolate_fast(this->position, local->unk10, local->unk1C, local->unk0);
|
||||
this->position_y += 100.0f*sinf(local->unk0*3.141592654);
|
||||
this->yaw = local->unk0*(local->unk34[2] - local->unk34[1]) + local->unk34[1];
|
||||
if(skeletalAnim_getLoopCount(this->unk148) > 0){
|
||||
if(ml_distance_vec3f(this->position, local->unk28) < 10.0f){
|
||||
if(ml_vec3f_distance(this->position, local->unk28) < 10.0f){
|
||||
func_8035C080(this, 1);
|
||||
}
|
||||
else if(local->unkC > 0){//L8035CB8C
|
||||
|
@@ -24,8 +24,6 @@ extern void func_802C74F4(Actor *, s32, f32 );
|
||||
extern void warp_lairEnterLairFromSMLevel(s32, s32);
|
||||
extern void warp_smExitBanjosHouse(s32, s32);
|
||||
extern void func_80335110(s32);
|
||||
|
||||
extern void func_8024E60C(s32, s32[3]);
|
||||
extern void controller_getJoystick(s32, f32*);
|
||||
|
||||
extern char *gcpausemenu_TimeToA(int);
|
||||
|
@@ -60,7 +60,7 @@ void chgloop_update(Actor *this){
|
||||
|
||||
if( !mapSpecificFlags_get(2)
|
||||
&& func_80329530(this, 350)
|
||||
&& gcdialog_showText(ASSET_D34_TEXT_GLOOP_MEET, 0, NULL, NULL, NULL, NULL)
|
||||
&& gcdialog_showText(ASSET_D34_DIALOG_GLOOP_MEET, 0, NULL, NULL, NULL, NULL)
|
||||
){
|
||||
mapSpecificFlags_set(2, TRUE);
|
||||
}
|
||||
|
@@ -7,7 +7,6 @@ Actor *func_8035ECA0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void func_8035F138(Actor *this);
|
||||
BKModelBin *func_803257B4(ActorMarker *marker);
|
||||
extern void actor_postdrawMethod(ActorMarker *);
|
||||
extern f32 func_80257204(f32, f32, f32, f32);
|
||||
|
||||
typedef struct {
|
||||
s32 unk0;
|
||||
@@ -91,7 +90,7 @@ void func_8035EDB0(f32 position[3], s32 count, enum asset_e sprite) {
|
||||
void func_8035EE48(Actor *this){
|
||||
u8 val = this->unk44_31;
|
||||
if(val != 0){
|
||||
func_8030DA44(val);
|
||||
sfxsource_freeSfxsourceByIndex(val);
|
||||
this->unk44_31 = 0;
|
||||
}
|
||||
}
|
||||
|
@@ -4,7 +4,6 @@
|
||||
|
||||
#define _HorzDist3v(v1, v2) ((v1[0]-v2[0])*(v1[0]-v2[0]) + (v1[2]-v2[2])*(v1[2]-v2[2]))
|
||||
extern void func_802D729C(Actor *, f32);
|
||||
extern f32 func_80257204(f32, f32, f32, f32);
|
||||
extern Actor *bundle_spawn_f32(enum actor_e, f32[3]);
|
||||
|
||||
void chicecube_update(Actor *this);
|
||||
|
@@ -173,7 +173,7 @@ void chJinjo_update(Actor * this){
|
||||
sp40[1] += 50.0f;
|
||||
jiggy_spawn(10*level_get()-9, sp40);
|
||||
}//L802CE0CC
|
||||
func_8024BD08(0);
|
||||
core1_ce60_incOrDecCounter(FALSE);
|
||||
func_8032BB88(this, 0, 4000);
|
||||
if(local->unk4){
|
||||
func_8025A6EC(COMUSIC_30_5TH_JINJO_COLLECTED, 28000);
|
||||
@@ -248,7 +248,7 @@ void chJinjo_update(Actor * this){
|
||||
func_80326310(this);
|
||||
if(local->unk4 == 0){
|
||||
func_8032BB88(this, -1, 4000);
|
||||
func_8024BD08(1);
|
||||
core1_ce60_incOrDecCounter(TRUE);
|
||||
}
|
||||
}//L802CE518
|
||||
|
||||
@@ -263,7 +263,7 @@ void chJinjo_update(Actor * this){
|
||||
|
||||
if(local->unk4 && actor_animationIsAt(this,0.95f)){
|
||||
func_8032BB88(this, -1, 4000);
|
||||
func_8024BD08(1);
|
||||
core1_ce60_incOrDecCounter(TRUE);
|
||||
}
|
||||
}//L802CE598
|
||||
|
||||
|
@@ -77,19 +77,19 @@ enum asset_e chmole_learnedAllLevelAbilitiesDialog(void){
|
||||
int learned_all_moves = chmole_learnedAllLevelAbilities(level_id);
|
||||
switch(level_id){
|
||||
case LEVEL_1_MUMBOS_MOUNTAIN:
|
||||
return learned_all_moves ? ASSET_B4E_TEXT_BOTTLES_ALL_MM_MOVES_LEARNED : ASSET_D38_TEXT_BOTTLES_ALL_MOVES_LEARNED;
|
||||
return learned_all_moves ? ASSET_B4E_DIALOG_BOTTLES_ALL_MM_MOVES_LEARNED : ASSET_D38_DIALOG_BOTTLES_ALL_MOVES_LEARNED;
|
||||
case LEVEL_2_TREASURE_TROVE_COVE:
|
||||
return learned_all_moves ? ASSET_A27_TEXT_BOTTLES_ALL_TTC_MOVES_LEARNED : ASSET_D38_TEXT_BOTTLES_ALL_MOVES_LEARNED;
|
||||
return learned_all_moves ? ASSET_A27_DIALOG_BOTTLES_ALL_TTC_MOVES_LEARNED : ASSET_D38_DIALOG_BOTTLES_ALL_MOVES_LEARNED;
|
||||
case LEVEL_3_CLANKERS_CAVERN:
|
||||
return learned_all_moves ? ASSET_D37_TEXT_BOTTLES_ALL_CC_MOVES_LEARNED : ASSET_D38_TEXT_BOTTLES_ALL_MOVES_LEARNED;
|
||||
return learned_all_moves ? ASSET_D37_DIALOG_BOTTLES_ALL_CC_MOVES_LEARNED : ASSET_D38_DIALOG_BOTTLES_ALL_MOVES_LEARNED;
|
||||
case LEVEL_4_BUBBLEGLOOP_SWAMP:
|
||||
return learned_all_moves ? ASSET_C8A_TEXT_BOTTLES_ALL_BGS_MOVES_LEARNED : ASSET_D38_TEXT_BOTTLES_ALL_MOVES_LEARNED;
|
||||
return learned_all_moves ? ASSET_C8A_DIALOG_BOTTLES_ALL_BGS_MOVES_LEARNED : ASSET_D38_DIALOG_BOTTLES_ALL_MOVES_LEARNED;
|
||||
case LEVEL_5_FREEZEEZY_PEAK:
|
||||
return learned_all_moves ? ASSET_C2A_TEXT_BOTTLES_ALL_FP_GV_MOVES_LEARNED : ASSET_D38_TEXT_BOTTLES_ALL_MOVES_LEARNED;
|
||||
return learned_all_moves ? ASSET_C2A_DIALOG_BOTTLES_ALL_FP_GV_MOVES_LEARNED : ASSET_D38_DIALOG_BOTTLES_ALL_MOVES_LEARNED;
|
||||
case LEVEL_7_GOBIS_VALLEY:
|
||||
return learned_all_moves ? ASSET_C2A_TEXT_BOTTLES_ALL_FP_GV_MOVES_LEARNED : ASSET_D38_TEXT_BOTTLES_ALL_MOVES_LEARNED;
|
||||
return learned_all_moves ? ASSET_C2A_DIALOG_BOTTLES_ALL_FP_GV_MOVES_LEARNED : ASSET_D38_DIALOG_BOTTLES_ALL_MOVES_LEARNED;
|
||||
default:
|
||||
return ASSET_D38_TEXT_BOTTLES_ALL_MOVES_LEARNED;
|
||||
return ASSET_D38_DIALOG_BOTTLES_ALL_MOVES_LEARNED;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -157,9 +157,9 @@ void chmole_healthRefill(ActorMarker *marker, enum asset_e arg1, s32 arg2){
|
||||
if( arg1 == moleTable[actor->unkF4_8-9].teach_text_id
|
||||
&& item_getCount(ITEM_14_HEALTH) < item_getCount(ITEM_15_HEALTH_TOTAL)
|
||||
){
|
||||
gcdialog_showText(ASSET_D39_TEXT_BOTTLES_REFILL_HEALTH, 7, 0, actor->marker, chmole_healthRefill, chmole_additionalAbilityLearnActions);
|
||||
gcdialog_showText(ASSET_D39_DIALOG_BOTTLES_REFILL_HEALTH, 7, 0, actor->marker, chmole_healthRefill, chmole_additionalAbilityLearnActions);
|
||||
}//L802D9738
|
||||
else if(arg1 == moleTable[actor->unkF4_8-9].teach_text_id || arg1 == ASSET_D39_TEXT_BOTTLES_REFILL_HEALTH){
|
||||
else if(arg1 == moleTable[actor->unkF4_8-9].teach_text_id || arg1 == ASSET_D39_DIALOG_BOTTLES_REFILL_HEALTH){
|
||||
gcdialog_showText(chmole_learnedAllGameAbilities()? 0xa87 : chmole_learnedAllLevelAbilitiesDialog(), 7, 0, actor->marker, chmole_healthRefill, NULL);
|
||||
}
|
||||
else{//L802D97BC
|
||||
@@ -294,7 +294,7 @@ void chmole_spawnMolehill(ActorMarker *marker){
|
||||
void func_802D9C90(Actor *this){
|
||||
u8 tmp_a1 = this->unk44_31;
|
||||
if(tmp_a1){
|
||||
func_8030DA44(tmp_a1);
|
||||
sfxsource_freeSfxsourceByIndex(tmp_a1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -387,7 +387,7 @@ void chmole_update(Actor *this){
|
||||
&& (func_8028ECAC() == 0 || func_8028ECAC() == BSGROUP_8_TROT)
|
||||
){
|
||||
player_getPosition(sp34);
|
||||
if (ml_distance_vec3f(sp34, this->velocity) < this->actor_specific_1_f) {
|
||||
if (ml_vec3f_distance(sp34, this->velocity) < this->actor_specific_1_f) {
|
||||
chmole_startingDialog(this);
|
||||
}
|
||||
}
|
||||
@@ -413,7 +413,7 @@ void chmole_update(Actor *this){
|
||||
}//L802DA128
|
||||
if(actor_animationIsAt(this, 0.9999f)){
|
||||
chmole_setFacingDirection(this);
|
||||
func_8030DA44(this->unk44_31);
|
||||
sfxsource_freeSfxsourceByIndex(this->unk44_31);
|
||||
this->unk44_31 = 0;
|
||||
}
|
||||
else if(actor_animationIsAt(this, 0.14f)){//L802DA154
|
||||
@@ -466,7 +466,7 @@ void chmole_update(Actor *this){
|
||||
}
|
||||
else if(actor_animationIsAt(this, 0.9999f)){//L802DA45C
|
||||
func_802D9600(this);
|
||||
func_8030DA44(this->unk44_31);
|
||||
sfxsource_freeSfxsourceByIndex(this->unk44_31);
|
||||
this->unk44_31 = 0;
|
||||
}
|
||||
break;
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include <core1/viewport.h>
|
||||
|
||||
|
||||
extern Actor *actor_spawnWithYaw_f32(enum actor_e, f32[3], s32);
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include <core1/viewport.h>
|
||||
|
||||
|
||||
extern void subaddie_set_state_with_direction(Actor *, s32, f32, s32);
|
||||
|
@@ -4,7 +4,6 @@
|
||||
|
||||
#include "snacker.h"
|
||||
|
||||
extern f32 ml_distanceSquared_vec3f(f32 [3], f32 [3]);
|
||||
extern f32 func_80309B24(f32[3]);
|
||||
extern void func_80328FF0(Actor *, f32);
|
||||
extern void mapSpecificFlags_setN(s32, s32, s32);
|
||||
@@ -333,7 +332,7 @@ void chSnacker_spawn(void) {
|
||||
|
||||
_player_getPosition(spawn_position);
|
||||
if (volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE) != 0) {
|
||||
nodeprop_getPosition(func_80304CAC(0x3CB, spawn_position), spawn_position);
|
||||
nodeprop_getPosition(nodeprop_findByActorIdAndPosition_f32(ACTOR_3CB_UNKNOWN, spawn_position), spawn_position);
|
||||
}
|
||||
else{
|
||||
spawn_angle_rad = randf2(0.0f, 3.28f);
|
||||
@@ -374,10 +373,10 @@ void chSnacker_spawn(void) {
|
||||
}
|
||||
if (volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE) == 0) {
|
||||
func_8032BB88(snacker, 5000, 750);
|
||||
func_8024BD08(0);
|
||||
core1_ce60_incOrDecCounter(FALSE);
|
||||
func_8025A6EC(COMUSIC_34_SNACKER_DANGER, 0);
|
||||
comusic_8025AB44(COMUSIC_34_SNACKER_DANGER, 0x7FFF, 750);
|
||||
func_8024BD08(1);
|
||||
core1_ce60_incOrDecCounter(TRUE);
|
||||
}
|
||||
s_chSnacker_spawnTimer = 0.0f;
|
||||
func_8032CA80(snacker, s_chSnacker_inRbb ? 15 : 9);
|
||||
|
@@ -2,7 +2,6 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern int ml_vec3f_within_horizontal_distance(f32[3], f32[3], f32);
|
||||
extern void func_802EFA20(ParticleEmitter *, f32, f32);
|
||||
extern void subaddie_set_state_with_direction(Actor *, s32, f32, s32);
|
||||
extern void func_80328FB0(Actor *, f32);
|
||||
|
@@ -47,7 +47,7 @@ void func_802D0500(Actor *this){
|
||||
void func_802D05A0(Actor *this, s32 next_state){
|
||||
ActorLocal_Core2_49570 *local = (ActorLocal_Core2_49570 *)this->local;
|
||||
if(this->state == 2 && local->sfxsourceIdx){
|
||||
func_8030DA44(local->sfxsourceIdx);
|
||||
sfxsource_freeSfxsourceByIndex(local->sfxsourceIdx);
|
||||
local->sfxsourceIdx = 0;
|
||||
}
|
||||
if(next_state == 2){
|
||||
@@ -84,7 +84,7 @@ void func_802D07C8(Actor *this){
|
||||
func_802D05A0(this, 1);
|
||||
}
|
||||
player_getPosition(sp2C);
|
||||
sp28 = ml_distance_vec3f(sp2C, this->position);
|
||||
sp28 = ml_vec3f_distance(sp2C, this->position);
|
||||
if( this->state == 1){
|
||||
if(sp28 < D_80367340[(s32)this->yaw].unk6*this->scale){
|
||||
func_802D05A0(this, 2);
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include <core1/viewport.h>
|
||||
|
||||
|
||||
bool func_8034A6FC(f32, f32);
|
||||
|
@@ -105,7 +105,7 @@ void chwhipcrack_update(Actor *this){
|
||||
__chwhipcrack_setState(this, 1);
|
||||
}
|
||||
player_getPosition(plyr_pos);
|
||||
plyr_dist = ml_distance_vec3f(plyr_pos, this->position);
|
||||
plyr_dist = ml_vec3f_distance(plyr_pos, this->position);
|
||||
if(this->state == 1){
|
||||
if(plyr_dist < 700.0f){
|
||||
__chwhipcrack_setState(this, 2);
|
||||
|
@@ -2,8 +2,6 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern f32 ml_mapAbsRange_f(f32, f32, f32, f32, f32);
|
||||
extern void func_8025901C(f32, f32 *, f32 *, f32);
|
||||
extern f32 func_8029B2D0(void);
|
||||
|
||||
void func_8029957C(s32 arg0);
|
||||
|
@@ -77,7 +77,7 @@ void func_802997E8(void){
|
||||
if(D_8037C6D0.sfxsourceIdx){
|
||||
D_8037C6D0.unk4 += time_getDelta();
|
||||
if(D_8037C6D0.unk8 <= D_8037C6D0.unk4){
|
||||
func_8030DA44(D_8037C6D0.sfxsourceIdx);
|
||||
sfxsource_freeSfxsourceByIndex(D_8037C6D0.sfxsourceIdx);
|
||||
D_8037C6D0.sfxsourceIdx = 0;
|
||||
}
|
||||
else{
|
||||
@@ -127,13 +127,13 @@ void func_80299900(void){
|
||||
}
|
||||
|
||||
void func_80299A20(void){
|
||||
func_8030DA44(D_8037C6C1);
|
||||
func_8030DA44(D_8037C6C0);
|
||||
func_8030DA44(D_8037C6C3);
|
||||
func_8030DA44(D_8037C6C2);
|
||||
func_8030DA44(D_8037C6C4);
|
||||
sfxsource_freeSfxsourceByIndex(D_8037C6C1);
|
||||
sfxsource_freeSfxsourceByIndex(D_8037C6C0);
|
||||
sfxsource_freeSfxsourceByIndex(D_8037C6C3);
|
||||
sfxsource_freeSfxsourceByIndex(D_8037C6C2);
|
||||
sfxsource_freeSfxsourceByIndex(D_8037C6C4);
|
||||
if(D_8037C6D0.sfxsourceIdx){
|
||||
func_8030DA44(D_8037C6D0.sfxsourceIdx);
|
||||
sfxsource_freeSfxsourceByIndex(D_8037C6D0.sfxsourceIdx);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,10 +1,9 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include <core1/viewport.h>
|
||||
|
||||
extern void controller_getJoystick(s32, f32*);
|
||||
extern f32 ml_acosf(f32);
|
||||
extern f32 player_getYaw(void);
|
||||
extern void particleEmitter_setSphericalParticleVelocityRange(ParticleEmitter *this, f32 pitch_min, f32 yaw_min, f32 radial_min, f32 pitch_max, f32 yaw_max, f32 radial_max);
|
||||
ParticleEmitter * func_802EDD8C(f32[3], f32, f32);
|
||||
|
@@ -1,14 +1,13 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "core2/yaw.h"
|
||||
#include "core2/statetimer.h"
|
||||
#include "core2/ba/anim.h"
|
||||
#include "core2/ba/physics.h"
|
||||
#include <core1/viewport.h>
|
||||
|
||||
extern void controller_getJoystick(s32, f32*);
|
||||
extern f32 ml_acosf(f32);
|
||||
extern f32 player_getYaw(void);
|
||||
extern void particleEmitter_setSphericalParticleVelocityRange(ParticleEmitter *this, f32 pitch_min, f32 yaw_min, f32 radial_min, f32 pitch_max, f32 yaw_max, f32 radial_max);
|
||||
ParticleEmitter * func_802EDD8C(f32[3], f32, f32);
|
||||
@@ -823,7 +822,7 @@ void func_8029C984(void){
|
||||
func_8025AB00();
|
||||
func_8025A2FC(0, 4000);
|
||||
comusic_playTrack(COMUSIC_1A_DEATH);
|
||||
func_8024BD08(0);
|
||||
core1_ce60_incOrDecCounter(FALSE);
|
||||
}
|
||||
|
||||
s32 func_8029C9C0(s32 arg0){
|
||||
@@ -885,7 +884,7 @@ void func_8029CB84(void){
|
||||
|
||||
void func_8029CBC4(void){
|
||||
func_8025A55C(-1, 4000, 0xc);
|
||||
func_8024BD08(1);
|
||||
core1_ce60_incOrDecCounter(TRUE);
|
||||
}
|
||||
|
||||
void func_8029CBF4(void){
|
||||
@@ -920,7 +919,7 @@ void func_8029CCC4(void){
|
||||
if(jiggyscore_total() == 100 && fileProgressFlag_get(FILEPROG_FC_DEFEAT_GRUNTY)){
|
||||
func_8028F918(2);
|
||||
}
|
||||
func_8024BD08(0);
|
||||
core1_ce60_incOrDecCounter(FALSE);
|
||||
func_8025A55C(0, 4000, 0xC);
|
||||
func_8025A6EC(COMUSIC_D_JINGLE_JIGGY_COLLECTED, -1);
|
||||
timedFunc_set_0(4.0f, func_8029CBF4);
|
||||
|
@@ -4,8 +4,6 @@
|
||||
|
||||
#include "core2/statetimer.h"
|
||||
|
||||
extern int func_80258424(f32 vec[3], f32 minX, f32 minY, f32 minZ, f32 maxX, f32 maxY, f32 maxZ);
|
||||
|
||||
/* .bss */
|
||||
u8 D_8037D210;
|
||||
u8 D_8037D211;
|
||||
@@ -19,7 +17,7 @@ bool func_8029CFA0(void){
|
||||
}
|
||||
|
||||
void func_8029CFF8(void){
|
||||
func_8030DA44(D_8037D210);
|
||||
sfxsource_freeSfxsourceByIndex(D_8037D210);
|
||||
}
|
||||
|
||||
void func_8029D01C(void){
|
||||
@@ -190,7 +188,7 @@ bool func_8029D66C(void){
|
||||
|
||||
case MAP_31_RBB_RUSTY_BUCKET_BAY:
|
||||
player_getPosition(sp2C);
|
||||
return player_inWater() && func_80258424(sp2C, -9000.0f, -3000.0f, -3850.0f, -6820.0f, -700.0f, -1620.0f);
|
||||
return player_inWater() && ml_vec3f_inside_box_f(sp2C, -9000.0f, -3000.0f, -3850.0f, -6820.0f, -700.0f, -1620.0f);
|
||||
break;
|
||||
|
||||
case MAP_27_FP_FREEZEEZY_PEAK:
|
||||
|
@@ -2,32 +2,35 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include <core2/camera.h>
|
||||
#include <core2/file.h>
|
||||
|
||||
void func_802BA23C(s32 *arg0, s32 arg1);
|
||||
static void __code33250_func_802BA23C(CameraNodeType4 *this, s32 arg1);
|
||||
|
||||
/* .code */
|
||||
s32 * func_802BA1E0(void){
|
||||
s32 * sp1C = malloc(4);
|
||||
func_802BA23C(sp1C, 1);
|
||||
return sp1C;
|
||||
CameraNodeType4 *cameraNodeType4_init(){
|
||||
CameraNodeType4 * this;
|
||||
|
||||
this = malloc(sizeof(CameraNodeType4));
|
||||
__code33250_func_802BA23C(this, 1);
|
||||
return this;
|
||||
}
|
||||
|
||||
void func_802BA214(s32 *arg0){
|
||||
free(arg0);
|
||||
void cameraNodeType4_free(CameraNodeType4 *this){
|
||||
free(this);
|
||||
}
|
||||
|
||||
s32 func_802BA234(s32 *arg0){
|
||||
return *arg0;
|
||||
s32 code33250_func_802BA234(CameraNodeType4 *this){
|
||||
return this->unknownFlag;
|
||||
}
|
||||
|
||||
void func_802BA23C(s32 *arg0, s32 arg1){
|
||||
*arg0 = arg1;
|
||||
static void __code33250_func_802BA23C(CameraNodeType4 *this, s32 arg1){
|
||||
this->unknownFlag = arg1;
|
||||
}
|
||||
|
||||
void func_802BA244(File *file_ptr, s32 *arg1){
|
||||
void cameraNodeType4_fromFile(File *file_ptr, CameraNodeType4 *this){
|
||||
while(!file_isNextByteExpected(file_ptr, 0)){
|
||||
file_getWord_ifExpected(file_ptr, 1, arg1);
|
||||
file_getWord_ifExpected(file_ptr, 1, &this->unknownFlag);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -3,154 +3,142 @@
|
||||
#include "variables.h"
|
||||
|
||||
#include <core2/file.h>
|
||||
#include <core2/camera.h>
|
||||
|
||||
typedef struct{
|
||||
f32 unk0[3];
|
||||
f32 unkC;
|
||||
f32 unk10;
|
||||
f32 unk14;
|
||||
f32 unk18;
|
||||
f32 unk1C;
|
||||
f32 unk20;
|
||||
f32 unk24[3];
|
||||
s32 unk30;
|
||||
}Struct_core2_33310;
|
||||
|
||||
|
||||
void func_802BA3E8(Struct_core2_33310 *arg0, f32 arg1[3]);
|
||||
void func_802BA414(Struct_core2_33310 *arg0, f32 arg1);
|
||||
void func_802BA428(Struct_core2_33310 *arg0, f32 arg1);
|
||||
void func_802BA460(Struct_core2_33310 *arg0, f32 arg1[3]);
|
||||
void func_802BA494(Struct_core2_33310 *arg0, f32 arg1, f32 arg2);
|
||||
void func_802BA4BC(Struct_core2_33310 *arg0, f32 arg1, f32 arg2);
|
||||
void func_802BA510(Struct_core2_33310 *arg0, bool arg1);
|
||||
void func_802BA530(Struct_core2_33310 *arg0, bool arg1);
|
||||
static void __cameraNodeType3_setPitchYawRoll(CameraNodeType3 *this, f32 pitch_yaw_roll[3]);
|
||||
static void __cameraNodeType3_setFarDistance(CameraNodeType3 *this, f32 far_distance);
|
||||
static void __cameraNodeType3_setCloseDistance(CameraNodeType3 *this, f32 close_distnace);
|
||||
static void __cameraNodeType3_setPosition(CameraNodeType3 *this, f32 position[3]);
|
||||
static void __cameraNodeType3_setHorizontalAndVerticalSpeed(CameraNodeType3 *this, f32 horizontal_speed, f32 vertical_speed);
|
||||
static void __cameraNodeType3_setRotationAndAccelaration(CameraNodeType3 *this, f32 rotation, f32 accelaration);
|
||||
static void __code33310_func_802BA510(CameraNodeType3 *this, bool arg1);
|
||||
static void __code33310_func_802BA530(CameraNodeType3 *this, bool arg1);
|
||||
|
||||
/* .code */
|
||||
void func_802BA2A0(Struct_core2_33310 *arg0, bool arg1, s32 arg2){
|
||||
if(arg1){
|
||||
arg0->unk30 |= arg2;
|
||||
static void __code33310_func_802BA2A0(CameraNodeType3 *this, bool arg1, s32 arg2) {
|
||||
if(arg1) {
|
||||
this->unknownFlag |= arg2;
|
||||
}
|
||||
else{
|
||||
arg0->unk30 &= ~arg2;
|
||||
this->unknownFlag &= ~arg2;
|
||||
}
|
||||
}
|
||||
|
||||
bool func_802BA2D0(Struct_core2_33310 *arg0, s32 arg1){
|
||||
if(arg0->unk30 & arg1)
|
||||
bool __code33310_func_802BA2D0(CameraNodeType3 *this, s32 arg1) {
|
||||
if(this->unknownFlag & arg1)
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Struct_core2_33310 *func_802BA2F4(void){
|
||||
Struct_core2_33310 * this;
|
||||
CameraNodeType3 *cameraNodeType3_init() {
|
||||
CameraNodeType3 * this;
|
||||
f32 sp20[3];
|
||||
|
||||
this = (Struct_core2_33310 *)malloc(sizeof(Struct_core2_33310));
|
||||
this = (CameraNodeType3 *)malloc(sizeof(CameraNodeType3));
|
||||
ml_vec3f_clear(sp20);
|
||||
func_802BA460(this, sp20);
|
||||
func_802BA3E8(this, sp20);
|
||||
func_802BA494(this, 2.84f, 5.68f);
|
||||
func_802BA4BC(this, 4.0f, 16.0f);
|
||||
func_802BA428(this, 1000.0f);
|
||||
func_802BA414(this, 1000.0f);
|
||||
func_802BA530(this, FALSE);
|
||||
func_802BA510(this, FALSE);
|
||||
__cameraNodeType3_setPosition(this, sp20);
|
||||
__cameraNodeType3_setPitchYawRoll(this, sp20);
|
||||
__cameraNodeType3_setHorizontalAndVerticalSpeed(this, 2.84f, 5.68f);
|
||||
__cameraNodeType3_setRotationAndAccelaration(this, 4.0f, 16.0f);
|
||||
__cameraNodeType3_setCloseDistance(this, 1000.0f);
|
||||
__cameraNodeType3_setFarDistance(this, 1000.0f);
|
||||
__code33310_func_802BA530(this, FALSE);
|
||||
__code33310_func_802BA510(this, FALSE);
|
||||
return this;
|
||||
}
|
||||
|
||||
void func_802BA398(Struct_core2_33310 *arg0){
|
||||
free(arg0);
|
||||
void cameraNodeType3_free(CameraNodeType3 *this) {
|
||||
free(this);
|
||||
}
|
||||
|
||||
void func_802BA3B8(Struct_core2_33310 *arg0, f32 arg1[3]){
|
||||
ml_vec3f_add(arg1, arg0->unk0, arg0->unk24);
|
||||
void cameraNodeType3_getPositionWithPitchYawRoll(CameraNodeType3 *this, f32 pitch_yaw_roll[3]) {
|
||||
ml_vec3f_add(pitch_yaw_roll, this->position, this->pitchYawRoll);
|
||||
}
|
||||
|
||||
void func_802BA3E8(Struct_core2_33310 *arg0, f32 arg1[3]){
|
||||
ml_vec3f_diff_copy(arg0->unk24, arg1, arg0->unk0);
|
||||
static void __cameraNodeType3_setPitchYawRoll(CameraNodeType3 *this, f32 pitch_yaw_roll[3]) {
|
||||
ml_vec3f_diff_copy(this->pitchYawRoll, pitch_yaw_roll, this->position);
|
||||
}
|
||||
|
||||
f32 func_802BA40C(Struct_core2_33310 *arg0){
|
||||
return arg0->unk20;
|
||||
f32 cameraNodeType3_getFarDistance(CameraNodeType3 *this) {
|
||||
return this->farDistance;
|
||||
}
|
||||
|
||||
void func_802BA414(Struct_core2_33310 *arg0, f32 arg1){
|
||||
arg0->unk20 = arg1;
|
||||
static void __cameraNodeType3_setFarDistance(CameraNodeType3 *this, f32 far_distance) {
|
||||
this->farDistance = far_distance;
|
||||
}
|
||||
|
||||
f32 func_802BA420(Struct_core2_33310 *arg0){
|
||||
return arg0->unk1C;
|
||||
f32 cameraNodeType3_getCloseDistance(CameraNodeType3 *this) {
|
||||
return this->closeDistance;
|
||||
}
|
||||
|
||||
void func_802BA428(Struct_core2_33310 *arg0, f32 arg1){
|
||||
arg0->unk1C = arg1;
|
||||
static void __cameraNodeType3_setCloseDistance(CameraNodeType3 *this, f32 close_distance) {
|
||||
this->closeDistance = close_distance;
|
||||
}
|
||||
|
||||
void func_802BA434(Struct_core2_33310 *arg0, f32 arg1[3]){
|
||||
ml_vec3f_copy(arg1, arg0->unk0);
|
||||
void cameraNodeType3_getPosition(CameraNodeType3 *this, f32 position[3]) {
|
||||
ml_vec3f_copy(position, this->position);
|
||||
}
|
||||
|
||||
void func_802BA460(Struct_core2_33310 *arg0, f32 arg1[3]){
|
||||
ml_vec3f_copy(arg0->unk0, arg1);
|
||||
static void __cameraNodeType3_setPosition(CameraNodeType3 *this, f32 position[3]) {
|
||||
ml_vec3f_copy(this->position, position);
|
||||
}
|
||||
|
||||
void func_802BA480(Struct_core2_33310 *arg0, f32 *arg1, f32 *arg2){
|
||||
*arg1 = arg0->unkC;
|
||||
*arg2 = arg0->unk10;
|
||||
void cameraNodeType3_getHorizontalAndVerticalSpeed(CameraNodeType3 *this, f32 *horizontal_speed, f32 *vertical_speed) {
|
||||
*horizontal_speed = this->horizontalSpeed;
|
||||
*vertical_speed = this->verticalSpeed;
|
||||
}
|
||||
|
||||
void func_802BA494(Struct_core2_33310 *arg0, f32 arg1, f32 arg2){
|
||||
arg0->unkC = arg1;
|
||||
arg0->unk10 = arg2;
|
||||
static void __cameraNodeType3_setHorizontalAndVerticalSpeed(CameraNodeType3 *this, f32 horizontal_speed, f32 vertical_speed) {
|
||||
this->horizontalSpeed = horizontal_speed;
|
||||
this->verticalSpeed = vertical_speed;
|
||||
}
|
||||
|
||||
void func_802BA4A8(Struct_core2_33310 *arg0, f32 *arg1, f32 *arg2){
|
||||
*arg1 = arg0->unk14;
|
||||
*arg2 = arg0->unk18;
|
||||
void cameraNodeType3_getRotationAndAccelaration(CameraNodeType3 *this, f32 *rotation, f32 *accelaration) {
|
||||
*rotation = this->rotation;
|
||||
*accelaration = this->accelaration;
|
||||
}
|
||||
|
||||
void func_802BA4BC(Struct_core2_33310 *arg0, f32 arg1, f32 arg2){
|
||||
arg0->unk14 = arg1;
|
||||
arg0->unk18 = arg2;
|
||||
static void __cameraNodeType3_setRotationAndAccelaration(CameraNodeType3 *this, f32 rotation, f32 accelaration) {
|
||||
this->rotation = rotation;
|
||||
this->accelaration = accelaration;
|
||||
}
|
||||
|
||||
bool func_802BA4D0(Struct_core2_33310 *arg0){
|
||||
return func_802BA2D0(arg0, 4);
|
||||
bool code33310_func_802BA4D0(CameraNodeType3 *this) {
|
||||
return __code33310_func_802BA2D0(this, 4);
|
||||
}
|
||||
|
||||
bool func_802BA4F0(Struct_core2_33310 *arg0){
|
||||
return func_802BA2D0(arg0, 1);
|
||||
bool code33310_func_802BA4F0(CameraNodeType3 *this) {
|
||||
return __code33310_func_802BA2D0(this, 1);
|
||||
}
|
||||
|
||||
void func_802BA510(Struct_core2_33310 *arg0, bool arg1){
|
||||
func_802BA2A0(arg0, arg1, 4);
|
||||
static void __code33310_func_802BA510(CameraNodeType3 *this, bool arg1) {
|
||||
__code33310_func_802BA2A0(this, arg1, 4);
|
||||
}
|
||||
|
||||
void func_802BA530(Struct_core2_33310 *arg0, bool arg1){
|
||||
func_802BA2A0(arg0, arg1, 1);
|
||||
static void __code33310_func_802BA530(CameraNodeType3 *this, bool arg1) {
|
||||
__code33310_func_802BA2A0(this, arg1, 1);
|
||||
}
|
||||
|
||||
void func_802BA550(File *file_ptr, Struct_core2_33310 *arg1){
|
||||
while(!file_isNextByteExpected(file_ptr, 0)){
|
||||
if(!file_getNFloats_ifExpected(file_ptr, 1, arg1->unk0, 3)){
|
||||
if(file_isNextByteExpected(file_ptr, 2)){
|
||||
file_getFloat(file_ptr, &arg1->unkC);
|
||||
file_getFloat(file_ptr, &arg1->unk10);
|
||||
void cameraNodeType3_fromFile(File *file_ptr, CameraNodeType3 *this) {
|
||||
while(!file_isNextByteExpected(file_ptr, 0)) {
|
||||
if(!file_getNFloats_ifExpected(file_ptr, 1, this->position, 3)) {
|
||||
if(file_isNextByteExpected(file_ptr, 2)) {
|
||||
file_getFloat(file_ptr, &this->horizontalSpeed);
|
||||
file_getFloat(file_ptr, &this->verticalSpeed);
|
||||
}
|
||||
else if(file_isNextByteExpected(file_ptr, 3)){
|
||||
file_getFloat(file_ptr, &arg1->unk14);
|
||||
file_getFloat(file_ptr, &arg1->unk18);
|
||||
else if(file_isNextByteExpected(file_ptr, 3)) {
|
||||
file_getFloat(file_ptr, &this->rotation);
|
||||
file_getFloat(file_ptr, &this->accelaration);
|
||||
}
|
||||
else if(file_isNextByteExpected(file_ptr, 6)){
|
||||
file_getFloat(file_ptr, &arg1->unk1C);
|
||||
file_getFloat(file_ptr, &arg1->unk20);
|
||||
else if(file_isNextByteExpected(file_ptr, 6)) {
|
||||
file_getFloat(file_ptr, &this->closeDistance);
|
||||
file_getFloat(file_ptr, &this->farDistance);
|
||||
}
|
||||
else{
|
||||
if(!file_getNFloats_ifExpected(file_ptr, 4, arg1->unk24, 3)){
|
||||
file_getWord_ifExpected(file_ptr, 5, &arg1->unk30);
|
||||
if(!file_getNFloats_ifExpected(file_ptr, 4, this->pitchYawRoll, 3)) {
|
||||
file_getWord_ifExpected(file_ptr, 5, &this->unknownFlag);
|
||||
}
|
||||
}
|
||||
}//L802BA654
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -4,132 +4,124 @@
|
||||
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include <core2/camera.h>
|
||||
|
||||
typedef struct {
|
||||
f32 unk0[3];
|
||||
f32 unkC;
|
||||
f32 unk10;
|
||||
f32 unk14;
|
||||
f32 unk18;
|
||||
f32 unk1C[3];
|
||||
s32 unk28;
|
||||
} Struct_core2_336F0;
|
||||
|
||||
void func_802BA7B8(Struct_core2_336F0 *arg0, f32 arg1[3]);
|
||||
void func_802BA808(Struct_core2_336F0 *arg0, f32 arg1[3]);
|
||||
void func_802BA840(Struct_core2_336F0 *arg0, f32 arg1, f32 arg2);
|
||||
void func_802BA868(Struct_core2_336F0 *arg0, f32 arg1, f32 arg2);
|
||||
void func_802BA8DC(Struct_core2_336F0 *arg0, s32 arg1);
|
||||
void func_802BA8FC(Struct_core2_336F0 *arg0, s32 arg1);
|
||||
void func_802BA91C(Struct_core2_336F0 *arg0, s32 arg1);
|
||||
static void __cameraNodeType1_setPosition(CameraNodeType1 *this, f32 position[3]);
|
||||
static void __cameraNodeType1_func_802BA808(CameraNodeType1 *this, f32 arg1[3]);
|
||||
static void __cameraNodeType1_setHorizontalAndVerticalSpeed(CameraNodeType1 *this, f32 horizontal_speed, f32 vertical_speed);
|
||||
static void __cameraNodeType1_setRotationAndAccelaration(CameraNodeType1 *this, f32 rotation, f32 accelaration);
|
||||
static void __code336F0_func_802BA8DC(CameraNodeType1 *this, s32 arg1);
|
||||
static void __code336F0_func_802BA8FC(CameraNodeType1 *this, s32 arg1);
|
||||
static void __code336F0_func_802BA91C(CameraNodeType1 *this, s32 arg1);
|
||||
|
||||
void func_802BA680(Struct_core2_336F0 *arg0, s32 arg1, s32 arg2){
|
||||
if(arg1){
|
||||
arg0->unk28 |= arg2;
|
||||
}else{
|
||||
arg0->unk28 &= ~arg2;
|
||||
static void __code336F0_func_802BA680(CameraNodeType1 *this, s32 arg1, s32 arg2) {
|
||||
if(arg1) {
|
||||
this->unknownFlag |= arg2;
|
||||
} else{
|
||||
this->unknownFlag &= ~arg2;
|
||||
}
|
||||
}
|
||||
|
||||
bool func_802BA6B0(Struct_core2_336F0 *arg0, s32 arg1){
|
||||
if (arg0->unk28 & arg1)
|
||||
static bool __code336F0_func_802BA6B0(CameraNodeType1 *this, s32 arg1) {
|
||||
if (this->unknownFlag & arg1)
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Struct_core2_336F0 *func_802BA6D4(void){
|
||||
Struct_core2_336F0 *this;
|
||||
CameraNodeType1 *cameraNodeType1_init() {
|
||||
CameraNodeType1 *this;
|
||||
f32 sp20[3];
|
||||
|
||||
this = (Struct_core2_336F0 *)malloc(sizeof(Struct_core2_336F0));
|
||||
this = (CameraNodeType1 *)malloc(sizeof(CameraNodeType1));
|
||||
ml_vec3f_clear(sp20);
|
||||
func_802BA7B8(this, sp20);
|
||||
func_802BA808(this, sp20);
|
||||
func_802BA840(this, 0.7f, 2.33f);
|
||||
func_802BA868(this, 4.0f, 16.0f);
|
||||
func_802BA8DC(this, 0);
|
||||
func_802BA91C(this, 1);
|
||||
func_802BA8FC(this, 0);
|
||||
__cameraNodeType1_setPosition(this, sp20);
|
||||
__cameraNodeType1_func_802BA808(this, sp20);
|
||||
__cameraNodeType1_setHorizontalAndVerticalSpeed(this, 0.7f, 2.33f);
|
||||
__cameraNodeType1_setRotationAndAccelaration(this, 4.0f, 16.0f);
|
||||
__code336F0_func_802BA8DC(this, 0);
|
||||
__code336F0_func_802BA91C(this, 1);
|
||||
__code336F0_func_802BA8FC(this, 0);
|
||||
return this;
|
||||
}
|
||||
|
||||
void func_802BA76C(Struct_core2_336F0 *arg0){
|
||||
free(arg0);
|
||||
void cameraNodeType1_free(CameraNodeType1 *this) {
|
||||
free(this);
|
||||
}
|
||||
|
||||
void func_802BA78C(Struct_core2_336F0 *arg0, f32 arg1[3]){
|
||||
ml_vec3f_copy(arg1, arg0->unk0);
|
||||
void cameraNodeType1_getPosition(CameraNodeType1 *this, f32 position[3]) {
|
||||
ml_vec3f_copy(position, this->position);
|
||||
}
|
||||
|
||||
void func_802BA7B8(Struct_core2_336F0 *arg0, f32 arg1[3]){
|
||||
ml_vec3f_copy(arg0->unk0, arg1);
|
||||
static void __cameraNodeType1_setPosition(CameraNodeType1 *this, f32 position[3]) {
|
||||
ml_vec3f_copy(this->position, position);
|
||||
}
|
||||
|
||||
void func_802BA7D8(Struct_core2_336F0 *arg0, f32 arg1[3]){
|
||||
ml_vec3f_add(arg1, arg0->unk0, arg0->unk1C);
|
||||
void code336F0_func_802BA7D8(CameraNodeType1 *this, f32 arg1[3]) {
|
||||
ml_vec3f_add(arg1, this->position, this->pitchYawRoll);
|
||||
}
|
||||
|
||||
void func_802BA808(Struct_core2_336F0 *arg0, f32 arg1[3]){
|
||||
ml_vec3f_diff_copy(arg0->unk1C, arg1, arg0->unk0);
|
||||
static void __cameraNodeType1_func_802BA808(CameraNodeType1 *this, f32 arg1[3]) {
|
||||
ml_vec3f_diff_copy(this->pitchYawRoll, arg1, this->position);
|
||||
}
|
||||
|
||||
void func_802BA82C(Struct_core2_336F0 *arg0, f32 *arg1, f32 *arg2){
|
||||
*arg1 = arg0->unkC;
|
||||
*arg2 = arg0->unk10;
|
||||
void cameraNodeType1_getHorizontalAndVerticalSpeed(CameraNodeType1 *this, f32 *horizontal_speed, f32 *vertical_speed) {
|
||||
*horizontal_speed = this->horizontalSpeed;
|
||||
*vertical_speed = this->verticalSpeed;
|
||||
}
|
||||
|
||||
void func_802BA840(Struct_core2_336F0 *arg0, f32 arg1, f32 arg2){
|
||||
arg0->unkC = arg1;
|
||||
arg0->unk10 = arg2;
|
||||
static void __cameraNodeType1_setHorizontalAndVerticalSpeed(CameraNodeType1 *this, f32 horizontal_speed, f32 vertical_speed) {
|
||||
this->horizontalSpeed = horizontal_speed;
|
||||
this->verticalSpeed = vertical_speed;
|
||||
}
|
||||
|
||||
void func_802BA854(Struct_core2_336F0 *arg0, f32 *arg1, f32 *arg2){
|
||||
*arg1 = arg0->unk14;
|
||||
*arg2 = arg0->unk18;
|
||||
void cameraNodeType1_getRotationAndAccelaration(CameraNodeType1 *this, f32 *rotation, f32 *accelaration) {
|
||||
*rotation = this->rotation;
|
||||
*accelaration = this->accelaration;
|
||||
}
|
||||
|
||||
void func_802BA868(Struct_core2_336F0 *arg0, f32 arg1, f32 arg2){
|
||||
arg0->unk14 = arg1;
|
||||
arg0->unk18 = arg2;
|
||||
static void __cameraNodeType1_setRotationAndAccelaration(CameraNodeType1 *this, f32 rotation, f32 accelaration) {
|
||||
this->rotation = rotation;
|
||||
this->accelaration = accelaration;
|
||||
}
|
||||
|
||||
bool func_802BA87C(Struct_core2_336F0 *arg0){
|
||||
return func_802BA6B0(arg0, 1);
|
||||
bool code336F0_func_802BA87C(CameraNodeType1 *this) {
|
||||
return __code336F0_func_802BA6B0(this, 0x1);
|
||||
}
|
||||
|
||||
bool func_802BA89C(Struct_core2_336F0 *arg0){
|
||||
return func_802BA6B0(arg0, 4);
|
||||
bool code336F0_func_802BA89C(CameraNodeType1 *this) {
|
||||
return __code336F0_func_802BA6B0(this, 0x4);
|
||||
}
|
||||
|
||||
bool func_802BA8BC(Struct_core2_336F0 *arg0){
|
||||
return func_802BA6B0(arg0, 2);
|
||||
bool code336F0_func_802BA8BC(CameraNodeType1 *this) {
|
||||
return __code336F0_func_802BA6B0(this, 0x2);
|
||||
}
|
||||
|
||||
void func_802BA8DC(Struct_core2_336F0 *arg0, s32 arg1){
|
||||
func_802BA680(arg0, arg1, 1);
|
||||
static void __code336F0_func_802BA8DC(CameraNodeType1 *this, s32 arg1) {
|
||||
__code336F0_func_802BA680(this, arg1, 0x1);
|
||||
}
|
||||
|
||||
void func_802BA8FC(Struct_core2_336F0 *arg0, s32 arg1){
|
||||
func_802BA680(arg0, arg1, 4);
|
||||
static void __code336F0_func_802BA8FC(CameraNodeType1 *this, s32 arg1) {
|
||||
__code336F0_func_802BA680(this, arg1, 0x4);
|
||||
}
|
||||
|
||||
void func_802BA91C(Struct_core2_336F0 *arg0, s32 arg1){
|
||||
func_802BA680(arg0, arg1, 2);
|
||||
static void __code336F0_func_802BA91C(CameraNodeType1 *this, s32 arg1) {
|
||||
__code336F0_func_802BA680(this, arg1, 0x2);
|
||||
}
|
||||
|
||||
void func_802BA93C(File *file_ptr, Struct_core2_336F0 *arg1){
|
||||
while(!file_isNextByteExpected(file_ptr, 0)){
|
||||
if(!file_getNFloats_ifExpected(file_ptr, 1, arg1->unk0, 3)){
|
||||
if(file_isNextByteExpected(file_ptr, 2)){
|
||||
file_getFloat(file_ptr, &arg1->unkC);
|
||||
file_getFloat(file_ptr, &arg1->unk10);
|
||||
void cameraNodeType1_fromFile(File *file_ptr, CameraNodeType1 *this) {
|
||||
while(!file_isNextByteExpected(file_ptr, 0)) {
|
||||
if(!file_getNFloats_ifExpected(file_ptr, 1, this->position, 3)) {
|
||||
if(file_isNextByteExpected(file_ptr, 2)) {
|
||||
file_getFloat(file_ptr, &this->horizontalSpeed);
|
||||
file_getFloat(file_ptr, &this->verticalSpeed);
|
||||
}
|
||||
else if(file_isNextByteExpected(file_ptr, 3)){
|
||||
file_getFloat(file_ptr, &arg1->unk14);
|
||||
file_getFloat(file_ptr, &arg1->unk18);
|
||||
else if(file_isNextByteExpected(file_ptr, 3)) {
|
||||
file_getFloat(file_ptr, &this->rotation);
|
||||
file_getFloat(file_ptr, &this->accelaration);
|
||||
}
|
||||
else if(!file_getNFloats_ifExpected(file_ptr, 4, arg1->unk1C, 3)){
|
||||
file_getWord_ifExpected(file_ptr, 5, &arg1->unk28);
|
||||
else if(!file_getNFloats_ifExpected(file_ptr, 4, this->pitchYawRoll, 3)) {
|
||||
file_getWord_ifExpected(file_ptr, 5, &this->unknownFlag);
|
||||
}
|
||||
}//L802BAA0C
|
||||
}
|
||||
|
@@ -3,51 +3,47 @@
|
||||
#include "variables.h"
|
||||
|
||||
#include <core2/file.h>
|
||||
#include <core2/camera.h>
|
||||
|
||||
typedef struct {
|
||||
f32 position[3];
|
||||
f32 rotation[3];
|
||||
} CameraNodeType2;
|
||||
|
||||
void ncCameraNodeType2_setPosition(CameraNodeType2 *this, f32 src[3]);
|
||||
void ncCameraNodeType2_setRotation(CameraNodeType2 *this, f32 src[3]);
|
||||
static void __cameraNodeType2_setPosition(CameraNodeType2 *this, f32 position[3]);
|
||||
static void __cameraNodeType2_setPitchYawRoll(CameraNodeType2 *this, f32 pitch_yaw_roll[3]);
|
||||
|
||||
/* .code */
|
||||
CameraNodeType2 *ncCameraNodeType2_new(void){
|
||||
CameraNodeType2 *cameraNodeType2_init() {
|
||||
CameraNodeType2 *this;
|
||||
f32 sp18[3];
|
||||
|
||||
this = (CameraNodeType2 *)malloc(sizeof(CameraNodeType2));
|
||||
ml_vec3f_clear(sp18);
|
||||
ncCameraNodeType2_setPosition(this, sp18);
|
||||
ncCameraNodeType2_setRotation(this, sp18);
|
||||
__cameraNodeType2_setPosition(this, sp18);
|
||||
__cameraNodeType2_setPitchYawRoll(this, sp18);
|
||||
return this;
|
||||
}
|
||||
|
||||
void ncCameraNodeType2_free(CameraNodeType2 *this){
|
||||
void cameraNodeType2_free(CameraNodeType2 *this) {
|
||||
free(this);
|
||||
}
|
||||
|
||||
void ncCameraNodeType2_getPosition(CameraNodeType2 *this, f32 dst[3]){\
|
||||
ml_vec3f_copy(dst, this->position);
|
||||
void cameraNodeType2_getPosition(CameraNodeType2 *this, f32 position[3]) {
|
||||
ml_vec3f_copy(position, this->position);
|
||||
}
|
||||
|
||||
void ncCameraNodeType2_setPosition(CameraNodeType2 *this, f32 src[3]){
|
||||
ml_vec3f_copy(this->position, src);
|
||||
void __cameraNodeType2_setPosition(CameraNodeType2 *this, f32 position[3]) {
|
||||
ml_vec3f_copy(this->position, position);
|
||||
}
|
||||
|
||||
void ncCameraNodeType2_getRotation(CameraNodeType2 *this, f32 dst[3]){\
|
||||
ml_vec3f_copy(dst, this->rotation);
|
||||
void cameraNodeType2_getPitchYawRoll(CameraNodeType2 *this, f32 pitch_yaw_roll[3]) {\
|
||||
ml_vec3f_copy(pitch_yaw_roll, this->pitchYawRoll);
|
||||
}
|
||||
|
||||
void ncCameraNodeType2_setRotation(CameraNodeType2 *this, f32 src[3]){
|
||||
ml_vec3f_copy(this->rotation, src);
|
||||
void __cameraNodeType2_setPitchYawRoll(CameraNodeType2 *this, f32 pitch_yaw_roll[3]) {
|
||||
ml_vec3f_copy(this->pitchYawRoll, pitch_yaw_roll);
|
||||
}
|
||||
|
||||
void ncCameraNodeType2_fromFile(File *file_ptr, CameraNodeType2 *arg1){
|
||||
while(!file_isNextByteExpected(file_ptr, 0)){
|
||||
if(!file_getNFloats_ifExpected(file_ptr, 1, arg1->position, 3)){
|
||||
file_getNFloats_ifExpected(file_ptr, 2, arg1->rotation, 3);
|
||||
}//L802BAA0C
|
||||
void cameraNodeType2_fromFile(File *file_ptr, CameraNodeType2 *this) {
|
||||
while(!file_isNextByteExpected(file_ptr, 0)) {
|
||||
if(!file_getNFloats_ifExpected(file_ptr, 1, &this->position, 3)) {
|
||||
file_getNFloats_ifExpected(file_ptr, 2, &this->pitchYawRoll, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include <core1/viewport.h>
|
||||
|
||||
extern void func_802BEA4C(f32[3], f32[3], f32, f32[3]);
|
||||
extern ActorProp *func_80320EB0(ActorMarker *, f32, s32);
|
||||
|
@@ -4,9 +4,6 @@
|
||||
|
||||
|
||||
extern void rumbleManager_80250E6C(f32, f32);
|
||||
extern void ml_translate_y_local(f32[3], f32[3], f32);
|
||||
extern void ml_translate_z_local(f32[3], f32[3], f32);
|
||||
extern void ml_translate_x_local(f32[3], f32[3], f32);
|
||||
extern void func_802BE720(void);
|
||||
|
||||
typedef struct {
|
||||
|
@@ -1,15 +1,15 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "core2/nc/camera.h"
|
||||
#include <core1/viewport.h>
|
||||
#include "core2/coords.h"
|
||||
|
||||
extern Actor *func_80328230(enum actor_e, f32[3], f32[3]);
|
||||
extern void func_802BEA4C(f32[3], f32[3], f32, f32[3]);
|
||||
extern void func_802BEBE8(f32[3], f32[3], f32, f32[3]);
|
||||
extern void func_802BEAAC(f32[3], f32[3], f32, f32[3], f32[3], f32[3], f32[3]);
|
||||
extern NodeProp *cubeList_findNodePropByActorId(enum actor_e, s32[3]);
|
||||
extern NodeProp *cubeList_findNodePropByActorIdAndPosition_s32(enum actor_e, s32[3]);
|
||||
extern BKCollisionTri *func_80320B98(f32[3], f32[3], f32[3], s32);
|
||||
f32 func_802BB938(f32[3], f32[3]);
|
||||
f32 func_802BBD48(void);
|
||||
@@ -60,7 +60,7 @@ bool func_802BB720(s32 arg0, f32 arg1[3], f32 arg2[3], s32 *arg3) {
|
||||
if ((arg0 >= 0x5B) && (arg0 < 0x63)) {
|
||||
arg0 -= 0x40;
|
||||
}
|
||||
temp_v0 = cubeList_findNodePropByActorId(D_803657E0[arg0], NULL);
|
||||
temp_v0 = cubeList_findNodePropByActorIdAndPosition_s32(D_803657E0[arg0], NULL);
|
||||
if (temp_v0 != NULL) {
|
||||
nodeprop_getPosition(temp_v0, arg1);
|
||||
*arg3 = func_80304DB8(temp_v0);
|
||||
@@ -217,7 +217,7 @@ f32 func_802BBEA4(f32 arg0[3], f32 arg1[3], f32 arg2, s32 arg3, s32 arg4) {
|
||||
ml_vec3f_copy(sp4C, sp58[D_8037D8D0.unk30]);
|
||||
sp38 = func_80320B98(arg0, sp4C, sp3C, arg4);
|
||||
if (sp38 != NULL) {
|
||||
phi_f2 = ml_distance_vec3f(arg0, sp4C);
|
||||
phi_f2 = ml_vec3f_distance(arg0, sp4C);
|
||||
D_8037D8D0.unk0[D_8037D8D0.unk30] = sp38->flags;
|
||||
} else {
|
||||
phi_f2 = arg2;
|
||||
|
@@ -20,7 +20,7 @@ void func_802BE940(void)
|
||||
sp3C[0] = (sp3C[1] = (sp3C[2] = 0.0f));
|
||||
sp3C[1] = -1.0f;
|
||||
ml_vec3f_pitch_rotate_copy(sp24, sp3C, 68.0f);
|
||||
sp30[0] = sp24[1] * ((f32) framebuffer_width / framebuffer_height);
|
||||
sp30[0] = sp24[1] * ((f32) gFramebufferWidth / gFramebufferHeight);
|
||||
sp30[1] = 0;
|
||||
|
||||
D_8037DA40[1] = sp24[1];
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include <core1/viewport.h>
|
||||
|
||||
typedef struct{
|
||||
u8 map_id;
|
||||
|
@@ -1,14 +1,13 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include "prop.h"
|
||||
#include "core2/statetimer.h"
|
||||
#include "core2/ba/physics.h"
|
||||
#include <core1/viewport.h>
|
||||
|
||||
|
||||
extern int ml_vec3f_point_within_horizontal_distance(f32 vec[3], f32 x, f32 z, f32 val);
|
||||
extern f32 player_getYaw(void);
|
||||
|
||||
/* .bss */
|
||||
|
@@ -3,9 +3,6 @@
|
||||
#include "variables.h"
|
||||
|
||||
|
||||
f32 mlDiffDegF(f32, f32);
|
||||
|
||||
|
||||
/* .bss */
|
||||
static f32 s_position[3];
|
||||
static f32 s_rotation[3];
|
||||
|
@@ -7,8 +7,6 @@ extern bool func_80320C94(f32[3], f32[3], f32, f32 sp54[3], s32, s32);
|
||||
extern f32 func_8033229C(ActorMarker *);
|
||||
extern bool func_80309D58(f32[3], s32);
|
||||
|
||||
extern void ml_vec3f_normalize(f32 [3]);
|
||||
|
||||
typedef struct {
|
||||
s16 flags;
|
||||
// u8 pad2[0x2];
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include <core1/viewport.h>
|
||||
|
||||
|
||||
extern f32 func_8028E82C(void);
|
||||
|
@@ -1,10 +1,8 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include <core1/viewport.h>
|
||||
|
||||
extern f32 func_8025715C(f32, f32);
|
||||
extern f32 func_802575BC(f32);
|
||||
extern f32 func_80309B24(f32[3]);
|
||||
extern void sfxsource_playSfxAtVolume(u8, f32);
|
||||
extern void func_802CC340(Actor *, f32[3]);
|
||||
@@ -49,7 +47,7 @@ bool func_802CC2A0(Actor *this) {
|
||||
if (!this->marker->unk14_21) {
|
||||
return TRUE;
|
||||
}
|
||||
ml_interpolate_vec3f(sp20, local->unk8, local->unk18, func_802575BC(local->unk4 + 0.05));
|
||||
ml_vec3f_interpolate_fast(sp20, local->unk8, local->unk18, func_802575BC(local->unk4 + 0.05));
|
||||
sp20[1] += 60.0f;
|
||||
return func_80320DB0(sp20, 50.0f, sp2C, 0) == 0;
|
||||
}
|
||||
@@ -262,7 +260,7 @@ void func_802CCBC8(Actor *this) {
|
||||
|
||||
local = (ActorLocal_Core2_45310 * )&this->local;
|
||||
if(local->unk0 != 0){
|
||||
func_8030DA44(local->unk0);
|
||||
sfxsource_freeSfxsourceByIndex(local->unk0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -324,7 +322,7 @@ void func_802CCC5C(Actor *this) {
|
||||
}
|
||||
if (!subaddie_playerIsWithinSphere(this, 4000)) {
|
||||
if (local->unk0 != 0) {
|
||||
func_8030DA44(local->unk0);
|
||||
sfxsource_freeSfxsourceByIndex(local->unk0);
|
||||
local->unk0 = 0;
|
||||
}
|
||||
} else {
|
||||
@@ -351,7 +349,7 @@ void func_802CCC5C(Actor *this) {
|
||||
spB0 = (spB0 < spAC) ? spAC : MIN(spA8 , spB0);
|
||||
}
|
||||
sfxsource_playSfxAtVolume(local->unk0, spB0);
|
||||
phi_f12 = 1.0f - ml_distance_vec3f(spC4, this->position) / 2000.0f;
|
||||
phi_f12 = 1.0f - ml_vec3f_distance(spC4, this->position) / 2000.0f;
|
||||
if(0.0f > phi_f12){
|
||||
phi_f12 = 0.0f;
|
||||
}
|
||||
@@ -411,7 +409,7 @@ void func_802CCC5C(Actor *this) {
|
||||
local->unk4 = 1.0f;
|
||||
}
|
||||
sp9C = func_802575BC(local->unk4);
|
||||
ml_interpolate_vec3f(this->position, local->unk8, local->unk18, sp9C);
|
||||
ml_vec3f_interpolate_fast(this->position, local->unk8, local->unk18, sp9C);
|
||||
this->yaw = local->unk14 + (sp9C * (local->unk24 - local->unk14));
|
||||
if ((skeletalAnim_getAnimId(this->unk148) == 0x10E) && (skeletalAnim_getLoopCount(this->unk148) > 0)) {
|
||||
skeletalAnim_set(this->unk148, 0x10F, 0.1f, 0.45f);
|
||||
@@ -455,7 +453,7 @@ void func_802CCC5C(Actor *this) {
|
||||
sp68[1] = this->position[1];
|
||||
sp68[2] = this->position[2];
|
||||
sp68[0] = 0.0f;
|
||||
if (ml_distance_vec3f(sp8C, sp68) < 800.0f) {
|
||||
if (ml_vec3f_distance(sp8C, sp68) < 800.0f) {
|
||||
spBC = 3;
|
||||
}
|
||||
}
|
||||
|
@@ -11,7 +11,6 @@ extern void sfxsource_set_fade_distances(u8, f32, f32);
|
||||
extern void sfxsource_set_position(u8, f32[3]);
|
||||
extern void func_8030E2C4(u8);
|
||||
extern void sfxsource_setSampleRate(u8, s32);
|
||||
extern void ml_vec3f_normalize(f32[3]);
|
||||
|
||||
typedef struct{
|
||||
f32 unk0[3];
|
||||
@@ -122,7 +121,7 @@ void func_802CEDE4(f32 target_position[3], f32 p_ctrl[3], f32 distance, f32 *arg
|
||||
p_ctrl[1] = randf2(-distance, distance);
|
||||
p_ctrl[2] = randf2(-distance, distance);
|
||||
phi_s1++;
|
||||
}while(phi_s1 < 10 && ml_distance_vec3f(target_position, p_ctrl) < distance);
|
||||
}while(phi_s1 < 10 && ml_vec3f_distance(target_position, p_ctrl) < distance);
|
||||
*arg3 = randf2(arg4, arg5);
|
||||
}
|
||||
|
||||
@@ -237,7 +236,7 @@ void chBeeSwarm_802CF434(Actor *this) {
|
||||
local = (ActorLocal_core2_47BD0 *) &this->local;
|
||||
for(phi_s2 = 0, phi_s0 = local->unk8; phi_s2 < local->unk0; phi_s2++){
|
||||
chBeeSwarm_802CF1C8(phi_s0->unk18, phi_s0->unk0, phi_s0->unkC, phi_s0->unk24[2], 150.0f, phi_s0->unk24, &sp58);
|
||||
if (ml_distance_vec3f(phi_s0->unk0, phi_s0->unk18) < 50.0f) {
|
||||
if (ml_vec3f_distance(phi_s0->unk0, phi_s0->unk18) < 50.0f) {
|
||||
func_802CEEA4(this, phi_s0);
|
||||
}
|
||||
phi_s0++;
|
||||
@@ -385,7 +384,7 @@ void chBeeSwarm_update(Actor *this) {
|
||||
return;
|
||||
if (!subaddie_playerIsWithinSphere(this, 0x5DC)) {
|
||||
if ((u8)this->unk44_31 != 0) {
|
||||
func_8030DA44(this->unk44_31);
|
||||
sfxsource_freeSfxsourceByIndex(this->unk44_31);
|
||||
this->unk44_31 = 0;
|
||||
D_8037DCBC = 0;
|
||||
}
|
||||
@@ -455,12 +454,12 @@ void chBeeSwarm_update(Actor *this) {
|
||||
if (chBeeSwarm_802CF5E4(this)) {
|
||||
subaddie_set_state(this, 2U);
|
||||
}
|
||||
if (ml_distance_vec3f(this->position, this->unk1C) < 50.0f) {
|
||||
if (ml_vec3f_distance(this->position, this->unk1C) < 50.0f) {
|
||||
func_802CEF54(this, local->unkC, 100.0f);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (ml_distance_vec3f(this->position, this->unk1C) < 50.0f) {
|
||||
if (ml_vec3f_distance(this->position, this->unk1C) < 50.0f) {
|
||||
func_802CEF54(this, local->unkC, 100.0f);
|
||||
}
|
||||
chBeeSwarm_802CF518(this);
|
||||
@@ -471,7 +470,7 @@ void chBeeSwarm_update(Actor *this) {
|
||||
this->unk1C[2] = spB4[2];
|
||||
this->unk1C[1] += 50.0f;
|
||||
this->actor_specific_1_f = 400.0f;
|
||||
if (ml_distance_vec3f(this->position, this->unk1C) < 100.0f) {
|
||||
if (ml_vec3f_distance(this->position, this->unk1C) < 100.0f) {
|
||||
func_802CEF54(this, spB4, 50.0f);
|
||||
subaddie_set_state(this, 4);
|
||||
}
|
||||
@@ -496,22 +495,22 @@ void chBeeSwarm_update(Actor *this) {
|
||||
if (local->unk0 == 0) {
|
||||
marker_despawn(this->marker);
|
||||
}
|
||||
if (ml_distance_vec3f(this->position, this->unk1C) < 50.0f) {
|
||||
if (ml_vec3f_distance(this->position, this->unk1C) < 50.0f) {
|
||||
func_802CEF54(this, (s32 *) spB4, 50.0f);
|
||||
}
|
||||
if (ml_distance_vec3f(this->position, spB4) > 100.0f) {
|
||||
if (ml_vec3f_distance(this->position, spB4) > 100.0f) {
|
||||
subaddie_set_state(this, 3);
|
||||
}
|
||||
chBeeSwarm_802CF57C(this);
|
||||
break;
|
||||
case 5:
|
||||
if (ml_distance_vec3f(this->position, this->unk1C) < 50.0f) {
|
||||
if (ml_vec3f_distance(this->position, this->unk1C) < 50.0f) {
|
||||
subaddie_set_state(this, 2);
|
||||
}
|
||||
chBeeSwarm_802CF518(this);
|
||||
break;
|
||||
case 6:
|
||||
if (ml_distance_vec3f(this->position, this->unk1C) < 50.0f) {
|
||||
if (ml_vec3f_distance(this->position, this->unk1C) < 50.0f) {
|
||||
subaddie_set_state(this, local->unk6);
|
||||
}
|
||||
break;
|
||||
|
@@ -2,7 +2,6 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern void func_80256E24(f32 [3], f32, f32, f32, f32, f32);
|
||||
extern void func_802EE6CC(f32[3], f32[3], s32[4], s32, f32, f32, s32, s32, s32);
|
||||
extern void func_803255FC(Actor *);
|
||||
extern void func_80325760(Actor *);
|
||||
@@ -105,7 +104,7 @@ bool chMumbo_withinHorzDistToPlayer(s32 x, s32 z, s32 dist) {
|
||||
|
||||
bool chMumbo_func_802D181C(s32 arg0) {
|
||||
s32 search_start_cube[3] = D_80367504;
|
||||
return BOOL(cubeList_findNodePropByActorId(arg0, search_start_cube));
|
||||
return BOOL(cubeList_findNodePropByActorIdAndPosition_s32(arg0, search_start_cube));
|
||||
}
|
||||
|
||||
void chMumbo_func_802D186C(Actor *this) {
|
||||
|
@@ -1,16 +1,13 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include "SnS.h"
|
||||
|
||||
extern f32 ml_vec3f_horizontal_distance_zero_likely(f32 [3], f32[3]);
|
||||
extern void func_8025A788(enum comusic_e, f32, f32);
|
||||
extern void func_8031CC40(enum map_e, s32);
|
||||
extern void fxRipple_802F363C(f32);
|
||||
extern void func_802F9D38(s32);
|
||||
extern void func_802EE6CC(f32[3], f32[3], s32[4], s32, f32, f32, s32, s32, s32);
|
||||
extern void ml_vec3f_assign(f32[3], f32, f32, f32);
|
||||
extern void func_802EE2E8(Actor *arg0, s32 arg1, s32 cnt, s32 arg3, f32 arg4, f32 arg5, f32 arg6);
|
||||
extern void gcquiz_func_80319EA4(void);
|
||||
extern void fileProgressFlag_set(enum file_progress_e, bool);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include <core1/viewport.h>
|
||||
|
||||
extern f32 func_8028EF88(void);
|
||||
void func_802D8730(Actor *this);
|
||||
|
@@ -2,8 +2,6 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern f32 func_80257248(f32[3], f32[3]);
|
||||
|
||||
typedef struct {
|
||||
f32 unk0;
|
||||
f32 unk4;
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "core2/particle.h"
|
||||
#include <core1/viewport.h>
|
||||
|
||||
void func_802DC208(Actor *this);
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include <core1/viewport.h>
|
||||
|
||||
|
||||
extern void actor_postdrawMethod(ActorMarker *);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include <core1/viewport.h>
|
||||
|
||||
extern void actor_postdrawMethod(ActorMarker *);
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include <core1/viewport.h>
|
||||
|
||||
extern void func_802C71F0(Actor *);
|
||||
extern void actor_postdrawMethod(ActorMarker *);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include <core1/viewport.h>
|
||||
|
||||
extern void func_8023DFF0(s32);
|
||||
extern void comusicPlayer_update(void);
|
||||
@@ -11,10 +11,6 @@ extern void func_8033DC18(void);
|
||||
extern f32 func_8033DC20(void);
|
||||
extern void func_8033DC9C(f32);
|
||||
|
||||
extern s32 framebuffer_width; //framebuffer_width
|
||||
extern s32 framebuffer_height; //framebuffer_height
|
||||
extern s16 D_803A5D00[2][0xF660]; //framebuffer
|
||||
|
||||
/* .bss */
|
||||
struct {
|
||||
f32 unk0;
|
||||
@@ -33,9 +29,9 @@ void func_802E31D0(s32 arg0) {
|
||||
|
||||
temp_v0 = D_8037E8C0.unk14;
|
||||
if ((temp_v0 == 0) || (temp_v0 == 3)) {
|
||||
func_8024A85C(arg0);
|
||||
func_80249DE0(0, 0, D_8037E8C0.unkC, 0, 0);
|
||||
osWritebackDCache(D_803A5D00[arg0], (s32) ((f32) framebuffer_width * (f32) framebuffer_height * sizeof(s16)));
|
||||
framebufferdraw_setBufferIndex(arg0);
|
||||
framebufferdraw_func_80249DE0(0, 0, D_8037E8C0.unkC, 0, 0);
|
||||
osWritebackDCache(gFramebuffers[arg0], (s32) ((f32) gFramebufferWidth * (f32) gFramebufferHeight * sizeof(s16)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,14 +49,14 @@ void func_802E329C(s32 arg0, Gfx **gfx_begin, Gfx **gfx_end) {
|
||||
vtx_start = vtx;
|
||||
scissorBox_SetForGameMode(&gfx, arg0);
|
||||
if (D_8037E8C0.unk14 == 2) {
|
||||
drawRectangle2D(&gfx, 0, 0, (s32) (f32) framebuffer_width, (s32) (f32) framebuffer_height, 0, 0, 0);
|
||||
drawRectangle2D(&gfx, 0, 0, (s32) (f32) gFramebufferWidth, (s32) (f32) gFramebufferHeight, 0, 0, 0);
|
||||
}
|
||||
if ((D_8037E8C0.unk14 == 0) || (D_8037E8C0.unk14 == 3)) {
|
||||
viewport_setRenderViewportAndPerspectiveMatrix(&gfx, &mtx);
|
||||
gcbound_draw(&gfx);
|
||||
}
|
||||
if (D_8037E8C0.unk14 == 1) {
|
||||
drawRectangle2D(&gfx, 0, 0, (s32) (f32) framebuffer_width, (s32) (f32) framebuffer_height, 0, 0, 0);
|
||||
drawRectangle2D(&gfx, 0, 0, (s32) (f32) gFramebufferWidth, (s32) (f32) gFramebufferHeight, 0, 0, 0);
|
||||
viewport_setRenderViewportAndPerspectiveMatrix(&gfx, &mtx);
|
||||
func_802F1858(D_8037E8C0.unk10, &gfx, &mtx, &vtx);
|
||||
}
|
||||
@@ -95,11 +91,11 @@ void func_802E3524(s32 arg0) {
|
||||
Gfx *gfx_begin;
|
||||
Gfx *gfx_end;
|
||||
|
||||
func_802E31D0(func_8024BD80());
|
||||
func_802E329C(func_8024BD80(), &gfx_begin, &gfx_end);
|
||||
func_802E31D0(getOtherFramebuffer());
|
||||
func_802E329C(getOtherFramebuffer(), &gfx_begin, &gfx_end);
|
||||
func_80253EA4(gfx_begin, gfx_end);
|
||||
func_80254008();
|
||||
func_8024C1B4();
|
||||
viMgr_func_8024C1B4();
|
||||
}
|
||||
|
||||
void func_802E3580(void) {
|
||||
@@ -107,8 +103,8 @@ void func_802E3580(void) {
|
||||
func_802F1884(D_8037E8C0.unk10);
|
||||
func_802E5F68();
|
||||
comusicPlayer_free();
|
||||
dummy_func_80253420();
|
||||
func_8024BF94(2);
|
||||
depthBuffer_stub();
|
||||
viMgr_func_8024BF94(2);
|
||||
}
|
||||
|
||||
void dummy_func_802E35D0(void){}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include <core1/viewport.h>
|
||||
#include "gc/gctransition.h"
|
||||
|
||||
extern void func_802F5374(void);
|
||||
@@ -166,7 +166,7 @@ void func_802E39D0(Gfx **gdl, Mtx **mptr, Vtx **vptr, s32 framebuffer_idx, s32 a
|
||||
}
|
||||
|
||||
void func_802E3BD0(s32 frame_buffer_indx){
|
||||
func_8024A85C(frame_buffer_indx);
|
||||
framebufferdraw_setBufferIndex(frame_buffer_indx);
|
||||
}
|
||||
|
||||
void func_802E3BF0(void){
|
||||
@@ -301,7 +301,7 @@ void game_draw(s32 arg0){
|
||||
|
||||
if(D_8037E8E0.unkC == 0){
|
||||
sp2C = gfx;
|
||||
func_8024C1DC();
|
||||
viMgr_func_8024C1DC();
|
||||
func_80253EC4(gfx_start, sp2C);
|
||||
|
||||
if(arg0) {
|
||||
@@ -365,7 +365,7 @@ void func_802E4170(void){
|
||||
timedFuncQueue_free();
|
||||
func_802F9C48();
|
||||
modelRender_free();
|
||||
dummy_func_80253420();
|
||||
depthBuffer_stub();
|
||||
func_802E398C(0);
|
||||
func_8030AFD8(0);
|
||||
func_80321854();
|
||||
|
@@ -121,7 +121,7 @@ BKSpriteTextureBlock **func_802E4D8C(BKSprite *sprite) {
|
||||
s32 i;
|
||||
s32 chunk_size;
|
||||
|
||||
frame = spriteGetFramePtr(sprite, 0);
|
||||
frame = sprite_getFramePtr(sprite, 0);
|
||||
chunkPtrArray = (BKSpriteTextureBlock **)malloc((frame->chunkCnt + 1)*4);
|
||||
chunk = (BKSpriteTextureBlock *)(frame + 1);
|
||||
for (i = 0; i < frame->chunkCnt; i++) {
|
||||
@@ -481,7 +481,7 @@ void func_802E6628(s32 arg0, char *arg1) {
|
||||
|
||||
sp2C = func_802E4E54(0);
|
||||
arg0 *= D_8037E900->unk4[sp2C].height;
|
||||
func_802E502C((s32) (((f32) framebuffer_width - (f32) func_802E51A4(arg1, sp2C, 0, D_8037E900->flags)) / 2), arg0, sp2C, arg1, sp28);
|
||||
func_802E502C((s32) (((f32) gFramebufferWidth - (f32) func_802E51A4(arg1, sp2C, 0, D_8037E900->flags)) / 2), arg0, sp2C, arg1, sp28);
|
||||
}
|
||||
|
||||
void func_802E66F0(s32 arg0, char *arg1) {
|
||||
@@ -491,7 +491,7 @@ void func_802E66F0(s32 arg0, char *arg1) {
|
||||
|
||||
sp24 = func_802E4E54(0);
|
||||
arg0 *= D_8037E900->unk4[sp24].height;
|
||||
func_802E502C((s32) (((f32) framebuffer_width - (f32) func_802E51A4(arg1, sp24, 0, D_8037E900->flags)) / 2), arg0, sp24, arg1, D_8037E900->unk1C);
|
||||
func_802E502C((s32) (((f32) gFramebufferWidth - (f32) func_802E51A4(arg1, sp24, 0, D_8037E900->flags)) / 2), arg0, sp24, arg1, D_8037E900->unk1C);
|
||||
}
|
||||
|
||||
void func_802E67AC(void){
|
||||
@@ -530,7 +530,7 @@ void func_802E6820(s32 arg0) {
|
||||
|
||||
prev_sprite_ptr = D_8037E900->unk4[var_s5].font_bin;
|
||||
if (D_8037E900->unk4[var_s5].font_bin != NULL) {
|
||||
chunk_count = spriteGetFramePtr(prev_sprite_ptr, 0U)->chunkCnt;
|
||||
chunk_count = sprite_getFramePtr(prev_sprite_ptr, 0U)->chunkCnt;
|
||||
D_8037E900->unk4[var_s5].font_bin = (BKSprite *)defrag_asset(D_8037E900->unk4[var_s5].font_bin);
|
||||
for(i_chunk = 0; i_chunk < chunk_count; i_chunk++){
|
||||
D_8037E900->unk4[var_s5].letter_texture[i_chunk] = ((u32)(((s32)D_8037E900->unk4[var_s5].letter_texture[i_chunk] - (s32)prev_sprite_ptr)) + (u32)D_8037E900->unk4[var_s5].font_bin);
|
||||
|
@@ -4,9 +4,6 @@
|
||||
|
||||
#include "model.h"
|
||||
|
||||
extern void func_80252C08(f32[3],f32[3], f32, f32[3]);
|
||||
extern void func_80252CC4(f32[3],s32, f32, s32);
|
||||
extern f32 func_802560D0(f32[3], f32[3], f32[3]);
|
||||
extern f32 vtxList_getGlobalNorm(BKVertexList *);
|
||||
extern void points_to_boundingBoxWithMargin(f32 arg0[3], f32 arg1[3], f32 margin, f32 min[3], f32 max[3]);
|
||||
|
||||
@@ -207,21 +204,21 @@ bool func_802E74A0(f32 arg0[3], f32 arg1, f32 arg2[3], f32 arg3[3]) {
|
||||
f32 sp24[3];
|
||||
f32 sp20;
|
||||
|
||||
if (arg1 <= func_802560D0(arg2, arg3, arg0)) {
|
||||
if (arg1 <= ml_func_802560D0(arg2, arg3, arg0)) {
|
||||
return FALSE;
|
||||
}
|
||||
sp24[0] = (arg2[0] + arg3[0]) / 2;
|
||||
sp24[1] = (arg2[1] + arg3[1]) / 2;
|
||||
sp24[2] = (arg2[2] + arg3[2]) / 2;
|
||||
sp20 = ml_distance_vec3f(sp24, arg0);
|
||||
if ((ml_distance_vec3f(sp24, arg2) + arg1) <= sp20) {
|
||||
sp20 = ml_vec3f_distance(sp24, arg0);
|
||||
if ((ml_vec3f_distance(sp24, arg2) + arg1) <= sp20) {
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool func_802E7588(f32 arg0[3], f32 arg1, f32 arg2[3], f32 arg3) {
|
||||
return (ml_distance_vec3f(arg0, arg2) < (arg1 + arg3));
|
||||
return (ml_vec3f_distance(arg0, arg2) < (arg1 + arg3));
|
||||
}
|
||||
|
||||
void calculateBoundsAndDirection(f32 startPoint[3], f32 endPoint[3], s32 minBounds[3], s32 maxBounds[3], f32 directionVector[3]) {
|
||||
@@ -745,7 +742,7 @@ s32 func_802E9118(BKCollisionList * collision_list, BKVertexList *vtx_list, f32
|
||||
s32 sp3C;
|
||||
s32 i;
|
||||
|
||||
if (((f32)vtx_list->global_norm * arg4) <= (ml_distance_vec3f(arg6, arg2) - arg7)) {
|
||||
if (((f32)vtx_list->global_norm * arg4) <= (ml_vec3f_distance(arg6, arg2) - arg7)) {
|
||||
return 0;
|
||||
}
|
||||
mlMtxIdent();
|
||||
@@ -982,7 +979,7 @@ s32 func_802E9DD8(BKCollisionList *collisionList, BKVertexList *vtxList, f32 pos
|
||||
s32 i;
|
||||
|
||||
// check if (sphere around vtx's) <= ((distance between origins) - (radius of B))
|
||||
if ((vtxList->global_norm * scaleA) <= (ml_distance_vec3f(posB, posA) - radB)) {
|
||||
if ((vtxList->global_norm * scaleA) <= (ml_vec3f_distance(posB, posA) - radB)) {
|
||||
return 0;
|
||||
}
|
||||
mlMtxIdent();
|
||||
|
@@ -2,7 +2,6 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "animation.h"
|
||||
#include "ml/mtx.h"
|
||||
|
||||
void *defrag(void *);
|
||||
|
||||
|
@@ -1,10 +1,7 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "ml/mtx.h"
|
||||
|
||||
extern void func_80252C08(f32[3], f32[3], f32, f32[3]);
|
||||
extern void func_80252CC4(f32[3], f32[3], f32, f32[3]);
|
||||
extern void mlMtx_apply_f3(f32[3], f32, f32, f32);
|
||||
extern s32 func_802EBAE0(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32 scale, f32 arg4[3], AnimMtxList* arg5, f32 arg6[3], f32 arg7, f32 arg8[3]);
|
||||
extern MtxF *animMtxList_get(AnimMtxList *this, s32 arg1);
|
||||
@@ -348,7 +345,7 @@ s32 func_802EB8A0(BKModelUnk14List *arg0, f32 *position, f32 *rotation, f32 scal
|
||||
sp44[1] = sp5C[1] - sp68[1];
|
||||
sp44[2] = sp5C[2] - sp68[2];
|
||||
temp_f0 = gu_sqrtf(sp44[0]*sp44[0] + sp44[1]*sp44[1] + sp44[2]*sp44[2]);
|
||||
if ((arg7 + temp_f0 >= ml_distance_vec3f(sp68, sp74))) {
|
||||
if ((arg7 + temp_f0 >= ml_vec3f_distance(sp68, sp74))) {
|
||||
return (s32) i_ptr->unk8;
|
||||
}
|
||||
}
|
||||
@@ -530,7 +527,7 @@ s32 func_802EC238(BKModelUnk14List *arg0, f32 arg1[3], f32 rotation[3], f32 scal
|
||||
sp40[1] = i_ptr->unk2[1];
|
||||
sp40[2] = i_ptr->unk2[2];
|
||||
scale = i_ptr->unk0;
|
||||
if (ml_distance_vec3f(sp40, sp54) < scale)
|
||||
if (ml_vec3f_distance(sp40, sp54) < scale)
|
||||
return i_ptr->unk8;
|
||||
if (!i_ptr->unk0){ }
|
||||
}
|
||||
|
@@ -1,9 +1,8 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include <core1/viewport.h>
|
||||
|
||||
extern void func_80252CC4(f32[3], f32 [3], f32, f32[3]);
|
||||
extern f32 func_8034A9D0(f32[4], f32);
|
||||
|
||||
/*.bss */
|
||||
|
@@ -23,14 +23,14 @@ s32 D_80368860[] = {
|
||||
};
|
||||
|
||||
s32 D_8036889C[] = {
|
||||
0x608,
|
||||
ASSET_608_UNKNOWN,
|
||||
ASSET_702_SPRITE_UNKNOWN,
|
||||
0x712,
|
||||
ASSET_712_SPRITE_SPARKLE_GREEN,
|
||||
ASSET_713_SPRITE_SPARKLE_YELLOW,
|
||||
ASSET_717_SPRITE_SPARKLE_YELLOW_2,
|
||||
ASSET_710_SPRITE_SPARKLE_PURPLE,
|
||||
ASSET_711_SPRITE_SPARKLE_DARK_BLUE,
|
||||
0x714,
|
||||
ASSET_714_SPRITE_UNKNOWN,
|
||||
ASSET_715_SPRITE_SPARKLE_RED,
|
||||
ASSET_716_SPRITE_SPARKLE_WHITE,
|
||||
ASSET_718_SPRITE_SPARKLE_WHITE_2,
|
||||
|
@@ -1,12 +1,10 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include <core1/viewport.h>
|
||||
|
||||
|
||||
extern s16 D_803A5D00[2][0xF660];
|
||||
|
||||
typedef struct Struct_Core2_6A4B0_2{
|
||||
s16 (*vtx_coord)[3];
|
||||
u16 *tmem_raw_ptr;
|
||||
@@ -76,8 +74,8 @@ void func_802F1440(Struct_Core2_6A4B0_2 *arg0, Gfx **gfx, Mtx **mtx, Vtx **vtx)
|
||||
gSPVertex((*gfx)++, osVirtualToPhysical(i_vtx), 16, 0);
|
||||
for(sp4C = 0; sp4C < 6; sp4C++){
|
||||
for(sp50 = 0; sp50 < 9; sp50++){
|
||||
s16 *tmem = arg0->tmem_ptr + (0x20*sp50 + 1) + (0x20*sp4C + 0xC)*framebuffer_width;
|
||||
gDPLoadTextureTile((*gfx)++, osVirtualToPhysical(tmem), G_IM_FMT_RGBA, G_IM_SIZ_16b, framebuffer_width, 0, 0, 0, 33, 33, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
s16 *tmem = arg0->tmem_ptr + (0x20*sp50 + 1) + (0x20*sp4C + 0xC)*gFramebufferWidth;
|
||||
gDPLoadTextureTile((*gfx)++, osVirtualToPhysical(tmem), G_IM_FMT_RGBA, G_IM_SIZ_16b, gFramebufferWidth, 0, 0, 0, 33, 33, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
for(sp54 = 0; sp54 < 2; sp54++){
|
||||
gSP1Triangle((*gfx)++, var_s3, var_s3 + 1, var_s3 + 2, 0);
|
||||
var_s3 += 3;
|
||||
@@ -130,12 +128,12 @@ Struct_Core2_6A4B0_2 *func_802F18F0(void){
|
||||
|
||||
void func_802F1934(Struct_Core2_6A4B0_2 * arg0, s32 arg1){
|
||||
func_802F18B8(arg0);
|
||||
arg0->tmem_raw_ptr = malloc(framebuffer_width*framebuffer_height*sizeof(u16) + 0x10);
|
||||
arg0->tmem_raw_ptr = malloc(gFramebufferWidth*gFramebufferHeight*sizeof(u16) + 0x10);
|
||||
arg0->tmem_ptr = arg0->tmem_raw_ptr;
|
||||
while(((s32)arg0->tmem_ptr & 0x10) == 0){
|
||||
arg0->tmem_ptr = (u16*)((s32)arg0->tmem_ptr + 1);
|
||||
}
|
||||
func_80253010(arg0->tmem_ptr, D_803A5D00[arg1], framebuffer_width*framebuffer_height*sizeof(u16));
|
||||
func_80253010(arg0->tmem_ptr, gFramebuffers[arg1], gFramebufferWidth*gFramebufferHeight*sizeof(u16));
|
||||
osWriteBackDCacheAll();
|
||||
}
|
||||
|
||||
@@ -164,8 +162,8 @@ void func_802F1A10(Struct_Core2_6A4B0_2 *arg0, f32 angle_degrees) {
|
||||
cos = cosf(angle_degrees * 2 * BAD_PI);
|
||||
sin = sinf(angle_degrees * 2 * BAD_PI);
|
||||
viewport_getPosition_vec3f(spC0);
|
||||
spCC[0] = (-(framebuffer_width / 2) * 4) + 8;
|
||||
spCC[1] = ((framebuffer_height / 2) * 4) - 0x38;
|
||||
spCC[0] = (-(gFramebufferWidth / 2) * 4) + 8;
|
||||
spCC[1] = ((gFramebufferHeight / 2) * 4) - 0x38;
|
||||
spCC[2] = -0xA;
|
||||
for(var_s6 = 0; var_s6 < 6; var_s6++){
|
||||
for(var_s4 = 0; var_s4 < 9; var_s4++){
|
||||
|
@@ -1,17 +1,8 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include "ml/mtx.h"
|
||||
#include <core1/viewport.h>
|
||||
|
||||
|
||||
extern s16 D_803A5D00[2][0xF660];
|
||||
|
||||
|
||||
extern f32 func_80257680(f32, f32, f32);
|
||||
extern void func_80252330(f32, f32, f32);
|
||||
|
||||
typedef struct {
|
||||
s16 unk0;
|
||||
s16 unk2;
|
||||
@@ -87,23 +78,23 @@ void func_802F1FC0(Struct65s *self, Gfx **gfx, Mtx **mtx, Vtx **vtx) {
|
||||
mlMtx_apply_vec3f(spD0, spD0);
|
||||
spD0[0] = (-297.0f * spD0[0]) / spD0[2];
|
||||
spD0[1] = (297.0f * spD0[1]) / spD0[2];
|
||||
spC4 = (s32) (spD0[0] + (f32) (framebuffer_width / 2));
|
||||
spC0 = (s32) (spD0[1] + (f32) (framebuffer_height / 2));
|
||||
spC4 = (s32) (spD0[0] + (f32) (gFramebufferWidth / 2));
|
||||
spC0 = (s32) (spD0[1] + (f32) (gFramebufferHeight / 2));
|
||||
if (spC4 < 0) {
|
||||
spC4 = 0;
|
||||
} else if (framebuffer_width - 0x20 < spC4) {
|
||||
spC4 = framebuffer_width - 0x20;
|
||||
} else if (gFramebufferWidth - 0x20 < spC4) {
|
||||
spC4 = gFramebufferWidth - 0x20;
|
||||
}
|
||||
if (spC0 < 0) {
|
||||
spC0 = 0;
|
||||
} else if (framebuffer_height - 0x20 < spC0) {
|
||||
spC0 = framebuffer_height - 0x20;
|
||||
} else if (gFramebufferHeight - 0x20 < spC0) {
|
||||
spC0 = gFramebufferHeight - 0x20;
|
||||
}
|
||||
|
||||
gSPDisplayList((*gfx)++, D_80368AC0);
|
||||
func_80347FC0(gfx, D_80368AB0[1].unk0, 0, 0, 0, 0, 0, NULL, NULL, &width, &height);
|
||||
temp_addr = &D_803A5D00[func_8024BD80()][spC0*framebuffer_width + (spC4 & 0xFFFC)];
|
||||
gDPSetTextureImage((*gfx)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, framebuffer_width, temp_addr);
|
||||
temp_addr = &gFramebuffers[getOtherFramebuffer()][spC0*gFramebufferWidth + (spC4 & 0xFFFC)];
|
||||
gDPSetTextureImage((*gfx)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gFramebufferWidth, temp_addr);
|
||||
gDPSetTile((*gfx)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 9, 0x0080, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD);
|
||||
gDPLoadSync((*gfx)++);
|
||||
gDPLoadTile((*gfx)++, G_TX_LOADTILE, 0, 0, 0x008C, 0x007C);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include <core1/viewport.h>
|
||||
|
||||
extern func_802EFAB0(ParticleEmitter *, s32, f32);
|
||||
|
||||
@@ -49,7 +49,7 @@ ParticleEmitter *func_802F4274(f32 arg0[3]) {
|
||||
if (sp20 != 0) {
|
||||
func_802EFAB0(temp_v0, sp20, sp2C[1]);
|
||||
}
|
||||
particleEmitter_setSprite(temp_v0, 0x42A);
|
||||
particleEmitter_setSprite(temp_v0, ASSET_42A_UNKNOWN);
|
||||
particleEmitter_setAlpha(temp_v0, 0xFF);
|
||||
particleEmitter_setFade(temp_v0, 0, 0.78f);
|
||||
particleEmitter_setStartingFrameRange(temp_v0, 0, 0);
|
||||
|
@@ -155,8 +155,8 @@ void func_802F46F4(Struct5Ds *this){
|
||||
}
|
||||
|
||||
void func_802F4798(Struct5Ds *this){
|
||||
func_8030DA44(this->unk1C);
|
||||
func_8030DA44(this->unk1D);
|
||||
sfxsource_freeSfxsourceByIndex(this->unk1C);
|
||||
sfxsource_freeSfxsourceByIndex(this->unk1D);
|
||||
free(this);
|
||||
}
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include <core1/viewport.h>
|
||||
|
||||
|
||||
typedef struct{
|
||||
@@ -283,7 +283,7 @@ void func_802F4B58(BKSpriteTextureBlock *alphaMask, BKSpriteTextureBlock *textur
|
||||
|
||||
//This functions seperates the fonts into letters
|
||||
FontLetter *func_802F4C3C(BKSprite *alphaMask, BKSprite *textureSprite){
|
||||
BKSpriteFrame * font = spriteGetFramePtr(alphaMask, 0);
|
||||
BKSpriteFrame * font = sprite_getFramePtr(alphaMask, 0);
|
||||
BKSpriteTextureBlock *chunkPtr;
|
||||
FontLetter * sp2C = malloc((font->chunkCnt + 1)*sizeof(FontLetter));
|
||||
u8* palDataPtr;
|
||||
@@ -320,7 +320,7 @@ FontLetter *func_802F4C3C(BKSprite *alphaMask, BKSprite *textureSprite){
|
||||
{
|
||||
chunkPtr = (BKSpriteTextureBlock *)(font + 1);
|
||||
for( i = 0; i < font->chunkCnt; i++){
|
||||
func_802F4B58(chunkPtr, (BKSpriteTextureBlock *)(spriteGetFramePtr(textureSprite, 0) + 1));
|
||||
func_802F4B58(chunkPtr, (BKSpriteTextureBlock *)(sprite_getFramePtr(textureSprite, 0) + 1));
|
||||
sp2C[i].unk0 = chunkPtr;
|
||||
chunkSize = chunkPtr->w*chunkPtr->h;
|
||||
chunkDataPtr = (u8*)(chunkPtr + 1);
|
||||
@@ -740,8 +740,8 @@ void _printbuffer_draw_letter(char letter, f32* xPtr, f32* yPtr, f32 arg3, Gfx *
|
||||
|
||||
temp_f24 = (sp214->x - 1.0);
|
||||
spD0 = sp214->y - 1.0;
|
||||
temp_f26 = (f64) sp200 - (f32) framebuffer_width * 0.5;
|
||||
spC0 = (f64)f28 - (f32)framebuffer_height*0.5 -0.5f;
|
||||
temp_f26 = (f64) sp200 - (f32) gFramebufferWidth * 0.5;
|
||||
spC0 = (f64)f28 - (f32)gFramebufferHeight*0.5 -0.5f;
|
||||
gSPVertex((*gfx)++, *vtx, 4, 0);
|
||||
for(iy = 0.0f; iy < 2.0; iy+= 1.0){
|
||||
for(ix = 0.0f; ix < 2.0; ix += 1.0){
|
||||
|
@@ -98,8 +98,8 @@ void func_8028E0F0(s32 arg0, s32 arg1[3]) {
|
||||
case 1:
|
||||
sp68 = 1;
|
||||
ml_vec3f_copy(sp40, sp7C);
|
||||
nodeprop_getPosition(func_80304CAC(0x156, sp40), sp58);
|
||||
nodeprop_getPosition(func_80304CAC(0x157, sp40), sp4C);
|
||||
nodeprop_getPosition(nodeprop_findByActorIdAndPosition_f32(ACTOR_156_UNKNOWN, sp40), sp58);
|
||||
nodeprop_getPosition(nodeprop_findByActorIdAndPosition_f32(ACTOR_157_UNKNOWN, sp40), sp4C);
|
||||
sp40[0] = ((sp4C[0] - sp58[0]) * D_8037BFB0[0]) + sp58[0];
|
||||
sp40[2] = ((sp4C[2] - sp58[2]) * D_8037BFB0[1]) + sp58[2];
|
||||
ml_vec3f_copy(sp7C, sp40);
|
||||
@@ -107,8 +107,8 @@ void func_8028E0F0(s32 arg0, s32 arg1[3]) {
|
||||
case 2:
|
||||
sp64 = 1;
|
||||
ml_vec3f_copy(sp1C, sp7C);
|
||||
nodeprop_getPosition(func_80304CAC(0x154, sp1C), sp34);
|
||||
nodeprop_getPosition(func_80304CAC(0x155, sp1C), sp28);
|
||||
nodeprop_getPosition(nodeprop_findByActorIdAndPosition_f32(ACTOR_154_UNKNOWN, sp1C), sp34);
|
||||
nodeprop_getPosition(nodeprop_findByActorIdAndPosition_f32(ACTOR_155_UNKNOWN, sp1C), sp28);
|
||||
sp1C[1] = ((sp28[1] - sp34[1]) * D_8037BFB0[0]) + sp34[1];
|
||||
ml_vec3f_copy(sp7C, sp1C);
|
||||
break;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include <core1/viewport.h>
|
||||
|
||||
/* .code */
|
||||
void func_802F7EB0(struct3s *this){
|
||||
@@ -166,7 +166,7 @@ void func_802F83AC(struct3s *arg0) {
|
||||
arg0->unk1C++;
|
||||
if (arg0->unk1C < vector_size(arg0->unk20)) {
|
||||
temp_v0 = (struct4s *)vector_at(arg0->unk20, arg0->unk1C);
|
||||
if (1210.0 < ml_distance_vec3f(temp_v0->unk0, sp3C)) {
|
||||
if (1210.0 < ml_vec3f_distance(temp_v0->unk0, sp3C)) {
|
||||
vector_remove(arg0->unk20, arg0->unk1C);
|
||||
}
|
||||
} else {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include <core1/viewport.h>
|
||||
|
||||
#define _SQ3(x, y, z) (((x) * (x)) + ((y) * (y)) + ((z) * (z)))
|
||||
|
||||
@@ -168,7 +168,7 @@ void func_802F8CD0(struct6s * this){
|
||||
this->unk18++;
|
||||
if((s32)this->unk18 < vector_size(this->unk1C)){
|
||||
iPtr = vector_at(this->unk1C, this->unk18);
|
||||
if(1320.0 < ml_distance_vec3f(iPtr->unk4, plyr_pos)){
|
||||
if(1320.0 < ml_vec3f_distance(iPtr->unk4, plyr_pos)){
|
||||
vector_remove(this->unk1C, this->unk18);
|
||||
}
|
||||
}
|
||||
|
@@ -1,16 +1,13 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "ml/mtx.h"
|
||||
#include <core1/viewport.h>
|
||||
|
||||
typedef struct {
|
||||
u8 pad0[0xC];
|
||||
f32 unkC[3];
|
||||
}Struct_core2_72060_0;
|
||||
|
||||
extern void func_80251B5C(f32, f32, f32);
|
||||
extern void func_80252A38(f32, f32, f32);
|
||||
extern f32 vtxList_getGlobalNorm(BKVertexList *);
|
||||
|
||||
struct4Cs *D_80369280 = NULL;
|
||||
@@ -143,7 +140,7 @@ void func_802F919C(void) {
|
||||
D_8036928C++;
|
||||
if (D_8036928C < D_80369284) {
|
||||
sp5C = &D_80369280[0].unk1C[D_8036928C];
|
||||
if (ml_distance_vec3f((*sp5C).unk0, D_80381040) > 1300.0f) {
|
||||
if (ml_vec3f_distance((*sp5C).unk0, D_80381040) > 1300.0f) {
|
||||
func_802F9134(D_8036928C);
|
||||
}
|
||||
} else {
|
||||
|
@@ -86,7 +86,7 @@ void func_802F9D38(s32 arg0){
|
||||
ptr = vector_at(D_803810A0, arg0);
|
||||
if(ptr->unk0){
|
||||
func_8030E394(ptr->unk0);
|
||||
func_8030DA44(ptr->unk0);
|
||||
sfxsource_freeSfxsourceByIndex(ptr->unk0);
|
||||
ptr->unk0 = 0;
|
||||
}
|
||||
}
|
||||
|
@@ -1,9 +1,8 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern s16 D_803A5D00[2][0xF660];
|
||||
|
||||
void func_802FEDE0(BKTextureList *texture_list, s32 indx, s32 x_offset, s32 y_offset){
|
||||
u16 *sp24;
|
||||
u16 *frame_buffer_ptr;
|
||||
@@ -11,10 +10,10 @@ void func_802FEDE0(BKTextureList *texture_list, s32 indx, s32 x_offset, s32 y_of
|
||||
s32 x;
|
||||
|
||||
sp24 = (u16*)func_802EA620(texture_list) + indx*32*32;
|
||||
frame_buffer_ptr = D_803A5D00[getActiveFramebuffer()];
|
||||
frame_buffer_ptr = gFramebuffers[getActiveFramebuffer()];
|
||||
for(y = 0; y < 32; y++){//L802FEE60
|
||||
for(x = 0; x < 32; x++){//L802FEE68
|
||||
sp24[32*(31 - y) + x] = frame_buffer_ptr[(y_offset + y)*framebuffer_width + (x_offset + x)] | 1; //framebuffer to texture???
|
||||
sp24[32*(31 - y) + x] = frame_buffer_ptr[(y_offset + y)*gFramebufferWidth + (x_offset + x)] | 1; //framebuffer to texture???
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -25,12 +24,12 @@ void func_802FEF48(BKModelBin *model_bin){
|
||||
s32 x, y;
|
||||
|
||||
texture_list = model_getTextureList(model_bin);
|
||||
osInvalDCache((void *)D_803A5D00[getActiveFramebuffer()], framebuffer_width * framebuffer_height*2);
|
||||
osInvalDCache((void *)gFramebuffers[getActiveFramebuffer()], gFramebufferWidth * gFramebufferHeight*2);
|
||||
|
||||
for(y = 0; y < 8; y++){//L802FEFEC
|
||||
for(x = 0; x < 10; x++){
|
||||
//get textures from framebuffer???
|
||||
func_802FEDE0(texture_list, 10*y + x, 32*x + (framebuffer_width - 10*32)/2, (s32)32*y + (framebuffer_height - 8*32)/2);
|
||||
func_802FEDE0(texture_list, 10*y + x, 32*x + (gFramebufferWidth - 10*32)/2, (s32)32*y + (gFramebufferHeight - 8*32)/2);
|
||||
}
|
||||
};
|
||||
|
||||
|
@@ -1,14 +1,12 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include <core1/viewport.h>
|
||||
#include <core2/file.h>
|
||||
#include <math.h>
|
||||
#include "prop.h"
|
||||
|
||||
extern f32 ml_distanceSquared_vec3f(f32[3], f32[3]);
|
||||
extern f32 func_802586B0(f32[3], f32[3]);
|
||||
extern void mapModel_getCubeBounds(s32 min[3], s32 max[3]);
|
||||
extern f32 func_803243D0(struct56s *arg0, f32 arg1[3]);
|
||||
extern void bitfield_setBit(u32*, s32, bool);
|
||||
@@ -32,7 +30,7 @@ typedef struct {
|
||||
Struct_core2_7AF80_2 *unk8;
|
||||
} Struct_core2_7AF80_1;
|
||||
|
||||
NodeProp *cubeList_findNodePropByActorId(enum actor_e actor_id, s32 arg1[3]);
|
||||
NodeProp *cubeList_findNodePropByActorIdAndPosition_s32(enum actor_e actor_id, s32 arg1[3]);
|
||||
s32 func_80304FC4(enum actor_e *actor_id_list, NodeProp **node_list, s32 arg2);
|
||||
void cube_positionToIndices(s32 arg0[3], f32 arg1[3]);
|
||||
NodeProp *func_803080C8(s32 arg0);
|
||||
@@ -937,18 +935,18 @@ s32 func_803048E0(s32 arg0[3], s32 arg1[3], s32 arg2, s32 arg3, s32 arg4) {
|
||||
return func_8032F170(arg1, arg2);
|
||||
}
|
||||
|
||||
s32 func_80304984(s32 arg0, u32 *arg1) {
|
||||
NodeProp *temp_v0;
|
||||
s32 func_80304984(s32 actor_id, u32 *arg1) {
|
||||
NodeProp *temp_v0 = cubeList_findNodePropByActorIdAndPosition_s32(actor_id, NULL);
|
||||
|
||||
temp_v0 = cubeList_findNodePropByActorId(arg0, 0);
|
||||
if (temp_v0 != 0) {
|
||||
*arg1 = temp_v0->radius;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
NodeProp *cubeList_findNodePropByActorId(enum actor_e actor_id, s32 position[3]) {
|
||||
NodeProp *cubeList_findNodePropByActorIdAndPosition_s32(enum actor_e actor_id, s32 position[3]) {
|
||||
s32 cube_indices[3];
|
||||
s32 i;
|
||||
f32 position_f32[3];
|
||||
@@ -1000,42 +998,42 @@ NodeProp *cubeList_findNodePropByActorId(enum actor_e actor_id, s32 position[3])
|
||||
return NULL;
|
||||
}
|
||||
|
||||
NodeProp *nodeprop_findByActorIdAndActorPosition(enum actor_e actor_id, Actor *actor){
|
||||
s32 tmp_position[3];
|
||||
NodeProp *nodeprop_findByActorIdAndActorPosition(enum actor_e actor_id, Actor *actor_ptr) {
|
||||
s32 pos_s32[3];
|
||||
s32 *position;
|
||||
|
||||
if (actor != NULL) {
|
||||
tmp_position[0] = actor->position_x;
|
||||
tmp_position[1] = actor->position_y;
|
||||
tmp_position[2] = actor->position_z;
|
||||
if (actor_ptr != NULL) {
|
||||
pos_s32[0] = actor_ptr->position_x;
|
||||
pos_s32[1] = actor_ptr->position_y;
|
||||
pos_s32[2] = actor_ptr->position_z;
|
||||
}
|
||||
|
||||
if (actor == NULL) {
|
||||
if (actor_ptr == NULL) {
|
||||
position = NULL;
|
||||
}
|
||||
else {
|
||||
position = tmp_position;
|
||||
position = pos_s32;
|
||||
}
|
||||
|
||||
return cubeList_findNodePropByActorId(actor_id, position);
|
||||
return cubeList_findNodePropByActorIdAndPosition_s32(actor_id, position);
|
||||
}
|
||||
|
||||
NodeProp *func_80304CAC(s32 arg0, f32 *arg1) {
|
||||
s32 vec[3];
|
||||
NodeProp *nodeprop_findByActorIdAndPosition_f32(enum actor_e actor_id, f32 *position) {
|
||||
s32 pos_s32[3];
|
||||
|
||||
vec[0] = (s32)arg1[0];
|
||||
vec[1] = (s32)arg1[1];
|
||||
vec[2] = (s32)arg1[2];
|
||||
return cubeList_findNodePropByActorId(arg0, vec);
|
||||
pos_s32[0] = (s32) position[0];
|
||||
pos_s32[1] = (s32) position[1];
|
||||
pos_s32[2] = (s32) position[2];
|
||||
return cubeList_findNodePropByActorIdAndPosition_s32(actor_id, pos_s32);
|
||||
}
|
||||
|
||||
NodeProp *func_80304D04(s32 arg0, s16 *arg1) {
|
||||
s32 arr[3];
|
||||
NodeProp *nodeprop_findByActorIdAndPosition_s16(enum actor_e actor_id, s16 *position) {
|
||||
s32 pos_s32[3];
|
||||
|
||||
arr[0] = (s32)arg1[0];
|
||||
arr[1] = (s32)arg1[1];
|
||||
arr[2] = (s32)arg1[2];
|
||||
return cubeList_findNodePropByActorId(arg0, arr);
|
||||
pos_s32[0] = (s32) position[0];
|
||||
pos_s32[1] = (s32) position[1];
|
||||
pos_s32[2] = (s32) position[2];
|
||||
return cubeList_findNodePropByActorIdAndPosition_s32(actor_id, pos_s32);
|
||||
}
|
||||
|
||||
s32 nodeprop_getRadius(NodeProp *arg0) {
|
||||
@@ -1061,7 +1059,7 @@ s32 func_80304DB8(NodeProp *arg0) {
|
||||
bool _nodeProp_findPositionFromActorId(enum actor_e actor_id, s32 *position) {
|
||||
NodeProp *node_prop;
|
||||
|
||||
node_prop = cubeList_findNodePropByActorId(actor_id, NULL);
|
||||
node_prop = cubeList_findNodePropByActorIdAndPosition_s32(actor_id, NULL);
|
||||
if (node_prop != 0) {
|
||||
position[0] = (s32) node_prop->x;
|
||||
position[1] = (s32) node_prop->y;
|
||||
@@ -1173,7 +1171,7 @@ bool func_80305248(f32 arg0[3], s32 arg1, s32 arg2){
|
||||
}
|
||||
|
||||
bool func_8030526C(f32 arg0[3], s32 arg1, s32 arg2){
|
||||
return func_8030515C(arg0, arg1, arg2, func_802586B0);
|
||||
return func_8030515C(arg0, arg1, arg2, ml_vec3f_horizontal_distance_squared_zero_likely);
|
||||
}
|
||||
|
||||
bool func_80305290(bool (* arg0)(NodeProp *), bool (* arg1)(Prop *)){
|
||||
@@ -1192,7 +1190,7 @@ bool func_80305290(bool (* arg0)(NodeProp *), bool (* arg1)(Prop *)){
|
||||
bool func_80305344(s32 arg0, u32 *arg1) {
|
||||
NodeProp *temp_v0;
|
||||
|
||||
temp_v0 = cubeList_findNodePropByActorId(arg0, NULL);
|
||||
temp_v0 = cubeList_findNodePropByActorIdAndPosition_s32(arg0, NULL);
|
||||
if (temp_v0 != NULL) {
|
||||
*arg1 = temp_v0->unkC_31;
|
||||
return 1;
|
||||
|
@@ -1,9 +1,8 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern u8 D_803A5D00[2][0x1ecc0];
|
||||
|
||||
|
||||
#define TILE_SIZE 32
|
||||
#define TILE_COUNT_X 5
|
||||
@@ -91,7 +90,7 @@ void func_8030C27C(void){
|
||||
|
||||
void func_8030C2D4(Gfx **gdl, Mtx **mptr, Vtx **vptr){
|
||||
scissorBox_setDefault();
|
||||
func_80253640(gdl, D_803A5D00[getActiveFramebuffer()]);
|
||||
func_80253640(gdl, gFramebuffers[getActiveFramebuffer()]);
|
||||
}
|
||||
|
||||
// Draws a 160x128 image pointed to by D_80382450 into the center of the screen
|
||||
|
@@ -1,10 +1,9 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "n_libaudio.h"
|
||||
#include <core1/viewport.h>
|
||||
|
||||
extern f32 func_80256AB4(f32, f32, f32, f32);
|
||||
extern void func_80335394(s32, f32);
|
||||
extern f32 sfx_randf2(f32, f32);
|
||||
|
||||
@@ -358,7 +357,7 @@ void func_8030D310(u8 indx){
|
||||
switch(func_8030C7E8(ptr)){
|
||||
case 1://L8030D468
|
||||
if( func_8030C814(ptr, 0) || (func_8030C814(ptr, 1) && !ptr->unk40))
|
||||
func_8030DA44(indx);
|
||||
sfxsource_freeSfxsourceByIndex(indx);
|
||||
break;
|
||||
case 2://L8030D4A4
|
||||
if(func_8030C814(ptr, 1) && sfxsource_isFlagCleared(ptr, 1))
|
||||
@@ -444,7 +443,7 @@ void func_8030D778(void){
|
||||
int temp_s1;
|
||||
for(i = 1; i < 35; i++){
|
||||
if(sfxsources[i].busy)
|
||||
func_8030DA44(i);
|
||||
sfxsource_freeSfxsourceByIndex(i);
|
||||
}
|
||||
do{
|
||||
temp_s1 = 0;
|
||||
@@ -458,7 +457,7 @@ void func_8030D778(void){
|
||||
|
||||
void func_8030D86C(void){
|
||||
func_8030D750();
|
||||
func_80244AB0();
|
||||
core1_7090_alloc();
|
||||
func_8030EDAC(0.0f, 1.0f);
|
||||
}
|
||||
|
||||
@@ -472,7 +471,7 @@ void func_8030D8B4(void){
|
||||
}
|
||||
|
||||
void func_8030D8DC(void){
|
||||
func_80244B3C();
|
||||
core1_7090_release();
|
||||
func_8030D778();
|
||||
func_8030D8B4();
|
||||
}
|
||||
@@ -511,8 +510,8 @@ u8 sfxsource_createSfxsourceAndReturnIndex(void){
|
||||
return s1;
|
||||
}
|
||||
|
||||
void func_8030DA44(u8 indx){
|
||||
SfxSource * sp1C = sfxsource_at(indx);
|
||||
void sfxsource_freeSfxsourceByIndex(u8 indx) {
|
||||
SfxSource *sp1C = sfxsource_at(indx);
|
||||
func_8030E394(indx);
|
||||
func_8030C7F8(sp1C, 3);
|
||||
}
|
||||
@@ -536,7 +535,7 @@ void func_8030DB04(u8 indx, s32 arg1, f32 arg2[3], f32 min_dist, f32 max_dist){
|
||||
f32 dist;
|
||||
f32 temp_f2;
|
||||
__sfx_getPlayerPositionIfPresent(sp24);
|
||||
dist = ml_distance_vec3f(arg2, sp24);
|
||||
dist = ml_vec3f_distance(arg2, sp24);
|
||||
if(max_dist <= dist)
|
||||
temp_f2 = 0.0f;
|
||||
else{
|
||||
@@ -904,7 +903,7 @@ void sfx_play(enum sfx_e uid, f32 volume, u32 sampleRate, f32 position[3], f32 m
|
||||
f32 player_position[3];
|
||||
|
||||
__sfx_getPlayerPositionIfPresent(player_position);
|
||||
if( !(maxFadeDistance <= ml_distance_vec3f(player_position, position))
|
||||
if( !(maxFadeDistance <= ml_vec3f_distance(player_position, position))
|
||||
&& levelSpecificFlags_validateCRC2()
|
||||
&& dummy_func_80320240()
|
||||
){
|
||||
|
@@ -1,9 +1,9 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
|
||||
extern s16 D_803A5D00[2][0xF660];
|
||||
|
||||
Gfx D_8036C630[] =
|
||||
{
|
||||
@@ -40,10 +40,10 @@ void func_80314BB0(Gfx **gfx, Mtx **mtx, Vtx **vtx, void * frame_buffer_1, void
|
||||
s32 y;
|
||||
|
||||
gSPDisplayList((*gfx)++, D_8036C630);
|
||||
gDPSetColorImage((*gfx)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, framebuffer_width, OS_PHYSICAL_TO_K0(frame_buffer_1));
|
||||
for(y = 0; y < framebuffer_height / 32 + 1; y++){
|
||||
for(x = 0; x < framebuffer_width / 32 + 1; x++){
|
||||
gDPLoadTextureTile((*gfx)++, osVirtualToPhysical(frame_buffer_2), G_IM_FMT_RGBA, G_IM_SIZ_16b, framebuffer_width, framebuffer_height,
|
||||
gDPSetColorImage((*gfx)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gFramebufferWidth, OS_PHYSICAL_TO_K0(frame_buffer_1));
|
||||
for(y = 0; y < gFramebufferHeight / 32 + 1; y++){
|
||||
for(x = 0; x < gFramebufferWidth / 32 + 1; x++){
|
||||
gDPLoadTextureTile((*gfx)++, osVirtualToPhysical(frame_buffer_2), G_IM_FMT_RGBA, G_IM_SIZ_16b, gFramebufferWidth, gFramebufferHeight,
|
||||
0x20*x, 0x20*y, 0x20*(x + 1) - 1, 0x20*(y + 1) - 1,
|
||||
NULL, G_TX_CLAMP, G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, 0, 0
|
||||
);
|
||||
@@ -53,13 +53,13 @@ void func_80314BB0(Gfx **gfx, Mtx **mtx, Vtx **vtx, void * frame_buffer_1, void
|
||||
}
|
||||
}
|
||||
gSPDisplayList((*gfx)++, D_8036C690);
|
||||
gDPSetColorImage((*gfx)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, framebuffer_width, OS_PHYSICAL_TO_K0(D_803A5D00[getActiveFramebuffer()]));
|
||||
gDPSetColorImage((*gfx)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gFramebufferWidth, OS_PHYSICAL_TO_K0(gFramebuffers[getActiveFramebuffer()]));
|
||||
}
|
||||
|
||||
void func_80315084(Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
||||
func_80335128(0);
|
||||
D_803830A0 = 2;
|
||||
func_80314BB0(gfx, mtx, vtx, zBuffer_get(), D_803A5D00[getActiveFramebuffer()]);
|
||||
func_80314BB0(gfx, mtx, vtx, zBuffer_get(), gFramebuffers[getActiveFramebuffer()]);
|
||||
}
|
||||
|
||||
void func_80315110(Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
||||
@@ -72,7 +72,7 @@ void func_80315110(Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
||||
else{
|
||||
D_803830A0--;
|
||||
}
|
||||
func_80314BB0(gfx, mtx, vtx, D_803A5D00[getActiveFramebuffer()], zBuffer_get());
|
||||
func_80314BB0(gfx, mtx, vtx, gFramebuffers[getActiveFramebuffer()], zBuffer_get());
|
||||
}
|
||||
|
||||
void func_803151D0(Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user