core2/ .b.bscore2 define bss addresses in splat
This commit is contained in:
parent
83dd7df9a3
commit
dd088afb72
|
@ -1484,6 +1484,7 @@ enum actor_e
|
|||
ACTOR_2A_GOLD_BULLION,
|
||||
ACTOR_2B_GOLD_BULLION_THROW_TARGET,
|
||||
ACTOR_2C_TURBO_TALON_TRAINERS,
|
||||
ACTOR_2D_MUMBO_TOKEN,
|
||||
|
||||
//ACTOR_2F_WATERFALL_START
|
||||
//ACTOR_30_WATERFALL_END
|
||||
|
@ -3297,8 +3298,9 @@ enum asset_e
|
|||
|
||||
ASSET_7DD_SPRITE_HEALTH = 0x7dd,
|
||||
|
||||
ASSET_7E6_SPRITE_VILE = 0x7e6,
|
||||
ASSET_7E7_SPRITE_CROC_BANJO,
|
||||
ASSET_7E5_SPRITE_WATER_HONEYCOMB = 0x7e5,
|
||||
ASSET_7E6_SPRITE_VILE,
|
||||
ASSET_7E7_SPRITE_CROC_BANJO,
|
||||
|
||||
ASSET_7EE_JOKER_CARD = 0x7ee,
|
||||
ASSET_7EF_SPRITE_BANJO,
|
||||
|
@ -3502,6 +3504,7 @@ enum marker_e{
|
|||
MARKER_36_ORANGE_COLLECTABLE = 0x36,
|
||||
MARKER_37_GOLD_BULLION,
|
||||
MARKER_38_TURBO_TALON_TRAINERS,
|
||||
MARKER_39_MUMBO_TOKEN,
|
||||
|
||||
MARKER_3B_SCARF_SLED = 0x3B,
|
||||
MARKER_3C_RACE_SLED,
|
||||
|
|
|
@ -170,7 +170,7 @@ void jiggySpawn(enum jiggy_e jiggy_id, f32 pos[3]);
|
|||
|
||||
struct3s *func_802F8264(s32 arg0);
|
||||
struct6s *func_802F8BE0(s32 arg0);
|
||||
struct8s *func_802FD320(enum asset_e item_id);
|
||||
struct7s *func_802FD320(enum asset_e item_id);
|
||||
void func_802FD330(enum item_e, struct8s *);
|
||||
void func_802FD33C(enum item_e arg0, struct8s *arg1, Gfx **arg2, Mtx **arg3, Vtx **arg4);
|
||||
void func_802FD350(enum item_e item_id, struct8s *);
|
||||
|
@ -180,17 +180,17 @@ void func_802FD80C(s32, struct8s *);
|
|||
void func_802FDAF4(enum item_e, struct8s *, Gfx**, Mtx**, Vtx **);
|
||||
void func_802FDC80(enum item_e, struct8s *);
|
||||
|
||||
struct8s *func_802FDE2C(s32);
|
||||
struct7s *func_802FDE2C(s32);
|
||||
void func_802FE844(s32, struct8s *);
|
||||
void func_802FDEE0(s32, struct8s *, Gfx**, Mtx**, s32*);
|
||||
void func_802FDDC4(s32, struct8s *);
|
||||
|
||||
struct8s *func_802FF090(enum item_e);
|
||||
struct7s *func_802FF090(enum item_e);
|
||||
void func_802FFA50(enum item_e, struct8s *);
|
||||
void func_802FF3B8(s32, struct8s *, Gfx**, Mtx**, Vtx **);
|
||||
void func_802FF358(enum item_e, struct8s *);
|
||||
|
||||
struct8s *func_802FFE4C(s32);
|
||||
struct7s *func_802FFE4C(s32);
|
||||
void func_803005BC(enum item_e, struct8s *);
|
||||
void func_802FFF34(enum item_e, struct8s *, Gfx**, Mtx**, Vtx **);
|
||||
void func_802FFED4(s32, struct8s *);
|
||||
|
@ -200,14 +200,14 @@ void fxcommon3score_update(enum item_e, void *);
|
|||
void fxcommon3score_draw(enum item_e, void *, Gfx**, Mtx**, Vtx **);
|
||||
void fxcommon3score_free(enum item_e item_id, void *);
|
||||
|
||||
struct8s *func_80300CD8(s32);
|
||||
void func_80301348(s32, struct8s *);
|
||||
struct7s *func_80300CD8(enum item_e);
|
||||
void func_80301348(enum item_e, struct8s *);
|
||||
void func_80300D0C(enum item_e item_id, struct8s *arg1, Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void func_80300C70(s32, struct8s *);
|
||||
void func_80300C70(enum item_e, struct8s *);
|
||||
|
||||
|
||||
struct8s *func_8030179C(s32);
|
||||
void func_80301DE4(s32, struct8s *);
|
||||
struct7s *func_8030179C(s32);
|
||||
void func_80301DE4(enum item_e, struct7s *);
|
||||
void func_803017D0(s32, struct8s *, Gfx**, Mtx**, s32);
|
||||
void func_80301754(s32, struct8s *);
|
||||
|
||||
|
|
|
@ -216,7 +216,7 @@ typedef struct struct_6_s{
|
|||
f32 unk38;
|
||||
}struct6s;
|
||||
|
||||
typedef struct struct_8_s{
|
||||
typedef struct struct_7_s{
|
||||
s32 unk0;
|
||||
s32 unk4;
|
||||
f32 unk8;
|
||||
|
@ -225,6 +225,17 @@ typedef struct struct_8_s{
|
|||
s32 unk14;
|
||||
s32 unk18;
|
||||
f32 unk1C;
|
||||
}struct7s;
|
||||
|
||||
typedef struct struct_8_s{
|
||||
s32 unk0;
|
||||
s32 unk4;
|
||||
f32 unk8;
|
||||
f32 unkC;
|
||||
f32 unk10;
|
||||
s32 unk14;
|
||||
s32 unk18;
|
||||
f32 unk1C; //first 0x20 should be struct7s
|
||||
u32 unk20; //item_id
|
||||
s32 unk24; //asset_id
|
||||
u32 unk28;
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<text x="22.0" y="14">core2</text>
|
||||
</g>
|
||||
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
||||
<text x="78.5" y="15" fill="#010101" fill-opacity=".3">76.4903%</text>
|
||||
<text x="77.5" y="14">76.4903%</text>
|
||||
<text x="78.5" y="15" fill="#010101" fill-opacity=".3">76.6689%</text>
|
||||
<text x="77.5" y="14">76.6689%</text>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
|
@ -9,7 +9,7 @@
|
|||
</mask>
|
||||
<g mask="url(#anybadge_1)">
|
||||
<path fill="#555" d="M0 0h150v20H0z"/>
|
||||
<path fill="#54e000" d="M150 0h67v20H150z"/>
|
||||
<path fill="#53e000" d="M150 0h67v20H150z"/>
|
||||
<path fill="url(#b)" d="M0 0h217v20H0z"/>
|
||||
</g>
|
||||
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
||||
|
@ -17,7 +17,7 @@
|
|||
<text x="75.0" y="14">Banjo-Kazooie (us.v10)</text>
|
||||
</g>
|
||||
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
||||
<text x="184.5" y="15" fill="#010101" fill-opacity=".3">81.3031%</text>
|
||||
<text x="183.5" y="14">81.3031%</text>
|
||||
<text x="184.5" y="15" fill="#010101" fill-opacity=".3">81.4055%</text>
|
||||
<text x="183.5" y="14">81.4055%</text>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
@ -20,8 +20,9 @@ extern ActorInfo D_80367B20 = {
|
|||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
extern f32 D_8037DE30[3];
|
||||
extern u8 D_8037DE3C;
|
||||
/* .bss */
|
||||
f32 D_8037DE30[3];
|
||||
u8 D_8037DE3C;
|
||||
|
||||
/* .code */
|
||||
s32 func_802D76E0(Actor *this, f32 *arg1) {
|
||||
|
|
|
@ -41,8 +41,10 @@ extern f32 D_80366C4C;
|
|||
extern f64 D_80376410;
|
||||
|
||||
/* .bss */
|
||||
extern f32 D_8037DDB4;
|
||||
extern f32 D_8037DDB8;
|
||||
UNK_TYPE(s32) D_8037DDB0;
|
||||
f32 D_8037DDB4;
|
||||
f32 D_8037DDB8;
|
||||
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_41FB0/func_802C8F40.s")
|
||||
|
||||
|
|
|
@ -25,11 +25,11 @@ ActorInfo D_80366CA4 = { MARKER_55_HONEYCOMB, ACTOR_50_HONEYCOMB, ASSET_363_MODE
|
|||
};
|
||||
|
||||
/* .bss */
|
||||
extern enum honeycomb_e D_8037DDC0;
|
||||
extern array(s32) * D_8037DDC4;
|
||||
extern s32 D_8037DDC8;
|
||||
extern u32 D_8037DDCC;
|
||||
extern s32 D_8037DDD0;
|
||||
enum honeycomb_e D_8037DDC0;
|
||||
array(s32) * D_8037DDC4;
|
||||
s32 D_8037DDC8;
|
||||
u32 D_8037DDCC;
|
||||
s32 D_8037DDD0;
|
||||
|
||||
/* .code */
|
||||
enum honeycomb_e func_802C9C40(Actor *this){
|
||||
|
|
|
@ -25,10 +25,10 @@ extern s32 D_8036751C[4];
|
|||
|
||||
|
||||
/* .bss */
|
||||
extern u8 D_8037DDF0;
|
||||
extern u8 D_8037DDF1;
|
||||
extern u8 D_8037DDF2;
|
||||
extern u8 D_8037DDF3;
|
||||
u8 D_8037DDF0;
|
||||
u8 D_8037DDF1;
|
||||
u8 D_8037DDF2;
|
||||
u8 D_8037DDF3;
|
||||
|
||||
|
||||
/* .code */
|
||||
|
|
|
@ -104,9 +104,9 @@ extern f64 D_80376A98;
|
|||
// 4072C00000000000 4072C00000000000
|
||||
|
||||
/* .bss */
|
||||
extern int D_8037DE00;
|
||||
extern f32 D_8037DE04;
|
||||
extern f32 D_8037DE08;
|
||||
int D_8037DE00;
|
||||
f32 D_8037DE04;
|
||||
f32 D_8037DE08;
|
||||
|
||||
void func_802D6114(void);
|
||||
void func_802D6264(f32 arg0, enum map_e arg1, s32 arg2, s32 arg3, s32 arg4, enum bkprog_e arg5);
|
||||
|
|
|
@ -14,7 +14,7 @@ ActorInfo D_803680DC = {
|
|||
};
|
||||
|
||||
/* .bss */
|
||||
s32 D_8037DE70;
|
||||
ActorMarker *D_8037DE70;
|
||||
|
||||
/* .code */
|
||||
void func_802DCA20(Actor *this){
|
||||
|
|
|
@ -28,6 +28,7 @@ ActorInfo D_8036833C = {
|
|||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
/* .bss */
|
||||
ActorMarker *D_8037DFE0;
|
||||
enum level_e D_8037DFE4;
|
||||
BKModelBin *D_8037DFE8;
|
||||
|
|
|
@ -18,8 +18,8 @@ ActorInfo D_8036838C = {
|
|||
};
|
||||
|
||||
/* .bss */
|
||||
extern ActorMarker *D_8037E000;
|
||||
extern s32 D_8037E008[20];
|
||||
ActorMarker *D_8037E000;
|
||||
s32 D_8037E008[20];
|
||||
|
||||
/* .code */
|
||||
Actor *func_802DF160(Gfx **gfx, Mtx **mtx, Vtx **vtx) {
|
||||
|
|
|
@ -63,6 +63,7 @@ ActorInfo D_80368418 = {
|
|||
ActorMarker *D_8037E060;
|
||||
f32 D_8037E068[20][2];
|
||||
Struct_core2_584D0_0 D_8037E248[20];
|
||||
u8 pad_8037E478[0x140];
|
||||
s32 D_8037E5B8;
|
||||
struct {
|
||||
s32 unk0;
|
||||
|
|
|
@ -13,7 +13,7 @@ s32 func_802E0CB0(Actor *this);
|
|||
|
||||
/* .data */
|
||||
ActorInfo D_803685A0 = {
|
||||
0x39, 0x2D, 0x41A,
|
||||
MARKER_39_MUMBO_TOKEN, ACTOR_2D_MUMBO_TOKEN, ASSET_41A_SPRITE_MUMBO_TOKEN,
|
||||
0, NULL,
|
||||
func_802E0B10, func_80326224, func_80325934,
|
||||
2000, 0, 0.0f, 0
|
||||
|
|
|
@ -2,65 +2,26 @@
|
|||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include "gc/gctransition.h"
|
||||
|
||||
void func_8024CE60(f32, f32);
|
||||
|
||||
|
||||
void func_802E40A8(s32 map, s32 exit);
|
||||
void func_802E40C4( s32 arg0);
|
||||
void func_802E40D0(s32 map, s32 exit);
|
||||
void func_802E40E8(s32 transition);
|
||||
int func_802E4A08(void);
|
||||
|
||||
f32 func_8033DC20(void);
|
||||
void func_8033DC9C(f32);
|
||||
extern void func_80324C58(void);
|
||||
|
||||
|
||||
extern f32 D_80377110;
|
||||
extern f32 D_80377114;
|
||||
|
||||
extern s32 D_8037E8EC;
|
||||
|
||||
extern struct{
|
||||
s32 unk0;
|
||||
s32 game_mode; //game_mode
|
||||
f32 unk8;
|
||||
s32 unkC; //freeze_scene_flag (used for pause menu)
|
||||
f32 unk10;
|
||||
u8 unk14; //
|
||||
u8 unk15; //map
|
||||
u8 unk16; //exit
|
||||
u8 unk17; //reset_on_map_load
|
||||
u8 unk18;
|
||||
u8 unk19;
|
||||
u8 unk1A;
|
||||
u8 unk1B;
|
||||
u8 unk1C;
|
||||
} D_8037E8E0;
|
||||
|
||||
typedef struct map_savestate_s{
|
||||
u32 flags;
|
||||
}MapSavestate;
|
||||
|
||||
extern MapSavestate *D_8037E650[];
|
||||
/* .bss */
|
||||
MapSavestate *D_8037E650[0x9A];
|
||||
u8 pad_8037E8A8[0x18];
|
||||
|
||||
/* public functions */
|
||||
void func_802E3BD0(s32 frame_buffer_indx);
|
||||
int func_802E49F0(void);
|
||||
|
||||
/* .code */
|
||||
|
||||
#ifndef NONMATCHING
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5BEB0/func_802E2E40.s")
|
||||
#else
|
||||
void func_802E2E40(void){
|
||||
int i;
|
||||
for(i = 0; i < 0x9A; i++){
|
||||
D_8037E650[i] = 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void mapSavestate_free_all(void){
|
||||
int i;
|
||||
|
@ -149,481 +110,3 @@ void mapSavestate_save(enum map_e map){
|
|||
// *mssp = NULL;
|
||||
// }
|
||||
// }
|
||||
|
||||
//===== BREAK ======//
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5BEB0/func_802E31D0.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5BEB0/func_802E329C.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5BEB0/func_802E3460.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5BEB0/func_802E3524.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5BEB0/func_802E3580.s")
|
||||
|
||||
void func_802E35D0(void){}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5BEB0/func_802E35D8.s")
|
||||
|
||||
extern void func_8024C510(f32);
|
||||
extern void func_8024CDF8(f32, f32, f32);
|
||||
extern void func_8024CE40(f32, f32, f32);
|
||||
|
||||
void func_802E3800(void){
|
||||
func_8024CDF8(0.0f, 0.0f, 0.0f);
|
||||
func_8024CE40(-30.0f, 30.0f, 0.0f);
|
||||
func_8024C510(D_80377110);
|
||||
func_8024CFD4();
|
||||
}
|
||||
|
||||
void func_802E3854(void){
|
||||
int i;
|
||||
|
||||
func_8033B61C();
|
||||
func_80254464();
|
||||
for(i = 0; i < 0xF; i++){
|
||||
func_802E6820(5);
|
||||
func_8033A4D8();
|
||||
mapSavestate_defrag_all();
|
||||
gctransition_8030B740();
|
||||
func_802F542C();
|
||||
func_80350E00();
|
||||
func_802FA4E0();
|
||||
func_8033B5FC();
|
||||
timedFuncQueue_defrag();
|
||||
func_8025AF38();
|
||||
}
|
||||
}
|
||||
|
||||
void func_802E38E8(enum map_e map, s32 exit, s32 reset_on_load){
|
||||
if(reset_on_load || level_get() != map_getLevel(map)){
|
||||
func_8030AFD8(1);
|
||||
func_80321854();
|
||||
func_803216D0(map); //load_map_asm
|
||||
func_8030AFA0(map);
|
||||
}
|
||||
else{
|
||||
func_8030AFD8(1);
|
||||
func_8030AFA0(map);
|
||||
}
|
||||
func_802FA508();
|
||||
func_80334B20(map, exit, 0);
|
||||
func_802E3800();
|
||||
func_8033DC10();
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5BEB0/func_802E398C.s")
|
||||
|
||||
void func_802E39D0(Gfx **gdl, Mtx **mptr, Vtx **vptr, s32 arg3, s32 arg4){
|
||||
Mtx* m_start = *mptr;
|
||||
Vtx* v_start = *vptr;
|
||||
|
||||
func_802539AC(gdl, arg3);
|
||||
D_8037E8E0.unkC = FALSE;
|
||||
func_80334540(gdl, mptr, vptr);
|
||||
if(!arg4){
|
||||
func_802E67AC();
|
||||
func_802E3BD0(func_8024BDA0());
|
||||
func_802E67C4();
|
||||
func_802E5F10(gdl);
|
||||
}
|
||||
if( D_8037E8E0.game_mode == GAME_MODE_A_SNS_PICTURE
|
||||
&& D_8037E8E0.unk19 != 6
|
||||
&& D_8037E8E0.unk19 != 5
|
||||
){
|
||||
gctransition_draw(gdl, mptr, vptr);
|
||||
}
|
||||
|
||||
if( D_8037E8E0.game_mode == GAME_MODE_8_BOTTLES_BONUS
|
||||
|| D_8037E8E0.game_mode == GAME_MODE_A_SNS_PICTURE
|
||||
){
|
||||
func_8030C2D4(gdl, mptr, vptr);
|
||||
}
|
||||
|
||||
if(!func_802E49F0() && func_80335134()){
|
||||
func_8032D474(gdl, mptr, vptr);
|
||||
}
|
||||
|
||||
func_80314320(gdl, mptr, vptr);
|
||||
if(!func_802E49F0()){
|
||||
func_8025AFC0(gdl, mptr, vptr);
|
||||
}
|
||||
|
||||
func_8030F410(gdl, mptr, vptr);
|
||||
if(!func_802E49F0()){
|
||||
func_802FAB54(gdl, mptr, vptr);
|
||||
}
|
||||
|
||||
printbuffer_draw(gdl, mptr, vptr);
|
||||
|
||||
if( D_8037E8E0.game_mode != GAME_MODE_A_SNS_PICTURE
|
||||
|| D_8037E8E0.unk19 == 6
|
||||
|| D_8037E8E0.unk19 == 5
|
||||
){
|
||||
gctransition_draw(gdl, mptr, vptr);
|
||||
}
|
||||
func_80253DE0(gdl);
|
||||
osWritebackDCache(m_start, sizeof(Mtx)*( *mptr - m_start));
|
||||
osWritebackDCache(v_start, sizeof(Vtx)*( *vptr - v_start));
|
||||
}
|
||||
|
||||
void func_802E3BD0(s32 frame_buffer_indx){
|
||||
func_8024A85C(frame_buffer_indx);
|
||||
}
|
||||
|
||||
void func_802E3BF0(void){
|
||||
return;
|
||||
}
|
||||
|
||||
//_set_game_mode
|
||||
void func_802E3BF8(enum game_mode_e next_mode, s32 arg1){
|
||||
s32 prev_mode = D_8037E8E0.game_mode;
|
||||
s32 sp20;
|
||||
s32 sp1C;
|
||||
|
||||
if( ( ( D_8037E8E0.game_mode == GAME_MODE_3_NORMAL || func_802E4A08())
|
||||
&& next_mode != GAME_MODE_4_PAUSED
|
||||
)
|
||||
|| ( D_8037E8E0.game_mode == GAME_MODE_4_PAUSED && next_mode != GAME_MODE_3_NORMAL )
|
||||
){
|
||||
func_80324C58();
|
||||
}
|
||||
|
||||
if(D_8037E8E0.game_mode == GAME_MODE_4_PAUSED && next_mode != GAME_MODE_4_PAUSED ){
|
||||
func_803117E8();
|
||||
}
|
||||
|
||||
//L802E3C84
|
||||
if(next_mode == GAME_MODE_8_BOTTLES_BONUS || next_mode == GAME_MODE_A_SNS_PICTURE){
|
||||
func_8030C1A0();
|
||||
}
|
||||
else{
|
||||
func_8030C204();
|
||||
}//L802E3CB4
|
||||
|
||||
D_8037E8E0.game_mode = next_mode;
|
||||
|
||||
if(next_mode == 2){
|
||||
func_80334E1C(3);
|
||||
}
|
||||
else if(next_mode == GAME_MODE_3_NORMAL || func_802E4A08()){
|
||||
if(prev_mode != GAME_MODE_4_PAUSED) {
|
||||
func_80334E1C(2);
|
||||
}//L802E3D18
|
||||
if(arg1){
|
||||
sp20 = FALSE;
|
||||
if(next_mode == GAME_MODE_3_NORMAL){
|
||||
if(func_803203FC(0x1F)){
|
||||
sp20 = TRUE;
|
||||
sp1C = 7;
|
||||
}
|
||||
else if(func_8032190C()
|
||||
&& level_get() != LEVEL_C_BOSS
|
||||
&& level_get() != LEVEL_B_SPIRAL_MOUNTAIN
|
||||
&& level_get() != LEVEL_6_LAIR
|
||||
&& level_get() != LEVEL_D_CUTSCENE
|
||||
){
|
||||
sp20 = TRUE;
|
||||
sp1C = 1;
|
||||
}
|
||||
}
|
||||
else if(func_802E4A08()){//L802E3DBC
|
||||
sp20 = TRUE;
|
||||
sp1C = func_8034BDA4(D_8037E8E0.unk15, D_8037E8E0.unk16);
|
||||
}
|
||||
|
||||
if(sp20)
|
||||
gctransition_8030BEA4(sp1C);
|
||||
else
|
||||
gctransition_8030BD4C();
|
||||
}
|
||||
func_80346CA8();
|
||||
D_8037E8E0.unk10 = 0.0f;
|
||||
}
|
||||
else if(next_mode == GAME_MODE_4_PAUSED){//L802E3E24
|
||||
func_80335110(0);
|
||||
FUNC_8030E624(SFX_C9_PAUSEMENU_ENTER, 1.1f, 32750);
|
||||
func_8024E7C8();
|
||||
func_8025A430(0, 2000, 3);
|
||||
func_8025A23C(COMUSIC_6F_PAUSE_SCREEN);
|
||||
func_80312B8C();
|
||||
}//L802E3E6C
|
||||
}
|
||||
|
||||
void func_802E3E7C(enum game_mode_e mode){
|
||||
s32 sp34;
|
||||
s32 sp30;
|
||||
s32 map;
|
||||
s32 sp28;
|
||||
s32 prev_mode;
|
||||
|
||||
func_80254008();
|
||||
sp34 = D_8037E8E0.unk18;
|
||||
sp30 = D_8037E8E0.unk17;
|
||||
map = D_8037E8E0.unk15;
|
||||
sp28 = D_8037E8E0.unk16;
|
||||
prev_mode = D_8037E8E0.unk0;
|
||||
func_802E3BF8(2, 0);
|
||||
if(!func_80320454(0x21, 0) || map_getLevel(map_get()) == map_getLevel(D_8037E8E0.unk15)){
|
||||
if(!func_803203FC(0x1F))
|
||||
mapSavestate_save(map_get());
|
||||
}
|
||||
func_802E398C(1);
|
||||
func_802E38E8(map, sp28, sp34);
|
||||
mapSavestate_apply(map);
|
||||
D_8037E8E0.unk0 = prev_mode;
|
||||
func_802E3BF8(mode, sp30);
|
||||
func_80332CCC();
|
||||
func_80346CA8();
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5BEB0/func_802E3F80.s")
|
||||
|
||||
//game_draw
|
||||
void func_802E3F8C(s32 arg0){
|
||||
Gfx *sp34;
|
||||
Gfx *sp30;
|
||||
Gfx *sp2C;
|
||||
Mtx *sp28;
|
||||
Vtx *sp24;
|
||||
if(arg0){
|
||||
func_80254348();
|
||||
}
|
||||
|
||||
func_80254404(&sp34, &sp28, &sp24);
|
||||
if(D_8037E8EC == 1){
|
||||
func_80254404(&sp34, &sp28, &sp24);
|
||||
}
|
||||
sp30 = sp34;
|
||||
func_802E39D0(&sp34, &sp28, &sp24, func_8024BDA0(), arg0);
|
||||
if(D_8037E8EC == 0){
|
||||
sp2C = sp34;
|
||||
func_8024C1DC();
|
||||
func_80253EC4(sp30, sp2C);
|
||||
if(arg0){
|
||||
func_80254348();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_802E4048(s32 map, s32 exit, s32 transition){
|
||||
func_802E40A8(map, exit);
|
||||
func_802E40E8(transition);
|
||||
func_802E40C4(1);
|
||||
}
|
||||
|
||||
//take me there
|
||||
extern void func_802E4078(enum map_e map, s32 exit, s32 transition){
|
||||
func_802E40D0(map, exit);
|
||||
func_802E40E8(transition);
|
||||
func_802E40C4(1);
|
||||
}
|
||||
|
||||
void func_802E40A8(s32 map, s32 exit){
|
||||
D_8037E8E0.unk18 = 1;
|
||||
D_8037E8E0.unk15 = map;
|
||||
D_8037E8E0.unk16 = exit;
|
||||
}
|
||||
|
||||
void func_802E40C4( s32 arg0){
|
||||
D_8037E8E0.unk14 = arg0;
|
||||
}
|
||||
|
||||
void func_802E40D0(s32 map, s32 exit){
|
||||
D_8037E8E0.unk18 = 0;
|
||||
D_8037E8E0.unk15 = map;
|
||||
D_8037E8E0.unk16 = exit;
|
||||
}
|
||||
|
||||
void func_802E40E8(s32 transition){
|
||||
D_8037E8E0.unk17 = transition;
|
||||
D_8037E8E0.unk19 = 0;
|
||||
if(transition && !gctransition_8030BDC0()){
|
||||
gctransition_8030BE60();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void func_802E412C(s32 arg0, s32 arg1){
|
||||
D_8037E8E0.unk17 = arg0;
|
||||
D_8037E8E0.unk19 = arg1;
|
||||
if(arg0 && !gctransition_8030BDC0()){
|
||||
gctransition_8030BEA4(arg1);
|
||||
}
|
||||
}
|
||||
|
||||
void func_802E4170(void){
|
||||
func_802E3BF8(2,0);
|
||||
func_80240844();
|
||||
func_802E5F68();
|
||||
if(!func_802E4A08())
|
||||
func_802F4F64();
|
||||
timedFuncQueue_free();
|
||||
func_802F9C48();
|
||||
func_8033A17C();
|
||||
func_80253420();
|
||||
func_802E398C(0);
|
||||
func_8030AFD8(0);
|
||||
func_80321854();
|
||||
func_8031FBF8();
|
||||
func_802880C0();
|
||||
func_80259B14();
|
||||
func_8030D8DC();
|
||||
}
|
||||
|
||||
#ifndef NONMATCHING
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5BEB0/func_802E4214.s")
|
||||
#else
|
||||
// //99.9% there
|
||||
void func_802E4214(s32 arg0){
|
||||
D_8037E8E0.unk14 = 0;
|
||||
D_8037E8E0.unk18 = 0;
|
||||
D_8037E8E0.unk19 = 0;
|
||||
D_8037E8E0.unk17 = 0;
|
||||
D_8037E8E0.unk16 = 0;
|
||||
D_8037E8E0.unk15 = 0;
|
||||
D_8037E8E0.unk1A = 0;
|
||||
D_8037E8E0.unk1B = 0;
|
||||
D_8037E8E0.unkC = 0;
|
||||
D_8037E8E0.unk1C = 0;
|
||||
func_8033C070();
|
||||
func_8025B0E4();
|
||||
func_8030D86C();
|
||||
func_80259A24();
|
||||
func_80322764();
|
||||
timedFuncQueue_init();
|
||||
func_802F9CD8();
|
||||
func_8031B62C();
|
||||
if(!func_802E4A08())
|
||||
func_802F51B8();
|
||||
func_802E5F38();
|
||||
func_802407C0();
|
||||
func_8033A1A4();
|
||||
func_80253428(1);
|
||||
func_80288070();
|
||||
func_8024CCC4();
|
||||
func_8024CE60(1.0f, D_80377114);
|
||||
func_8034A6B4();
|
||||
func_80254348();
|
||||
func_80253FE8();
|
||||
func_8033DC70();
|
||||
func_8033DC04();
|
||||
func_8031FBA0();
|
||||
D_8037E8E0.game_mode = 2;
|
||||
D_8037E8E0.unk8 = 0.0f;
|
||||
func_8033DC9C(0.0f);
|
||||
func_8033DD04(0);
|
||||
func_803216D0(arg0);
|
||||
func_8030AFA0(arg0);
|
||||
func_802E3854();
|
||||
func_802E38E8(arg0, 0, 0);
|
||||
D_8037E8E0.unk0 = 0;
|
||||
func_802E3BF8(3,1);
|
||||
}
|
||||
#endif
|
||||
|
||||
void func_802E4384(void){
|
||||
if(D_8037E8E0.unk8 == 0.0f){
|
||||
func_8033DC9C(0.0f);
|
||||
}
|
||||
else{
|
||||
func_8033DC18();
|
||||
;
|
||||
func_8033DD04((s32)(func_8033DC20()*60.0f + 0.5));
|
||||
}
|
||||
func_8033DC10();
|
||||
|
||||
D_8037E8E0.unk8 += time_getDelta();
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5BEB0/func_802E4424.s")
|
||||
|
||||
void func_802E48B8(enum GAME_MODE_E mode, s32 arg1){
|
||||
func_802E3BF8(mode, arg1);
|
||||
}
|
||||
|
||||
s32 func_802E48D8(void){
|
||||
func_802555C4();
|
||||
if( !level_get() )
|
||||
return NULL;
|
||||
|
||||
func_80343F3C();
|
||||
func_80288470();
|
||||
func_802F1320();
|
||||
func_802BA128();
|
||||
func_8033A4D8();
|
||||
func_8028FB68();
|
||||
func_802F0E58();
|
||||
func_8030A298();
|
||||
func_803086B4();
|
||||
func_8032AF94();
|
||||
func_802C4320();
|
||||
func_802F3300();
|
||||
func_802F542C();
|
||||
gcdialog_defrag();
|
||||
if(D_8037E8E0.game_mode == 4)
|
||||
func_80311740();
|
||||
switch(get_loaded_overlay_id()){
|
||||
case OVERLAY_2_WHALE:
|
||||
func_803894A0();
|
||||
break;
|
||||
case OVERLAY_D_WITCH:
|
||||
func_80350E00();
|
||||
break;
|
||||
}
|
||||
return func_802555D0();
|
||||
}
|
||||
|
||||
void func_802E49E0(void){
|
||||
D_8037E8E0.unkC = TRUE;
|
||||
}
|
||||
|
||||
int func_802E49F0(void){
|
||||
return D_8037E8E0.unkC;
|
||||
}
|
||||
|
||||
s32 getGameMode(void){
|
||||
return D_8037E8E0.game_mode;
|
||||
}
|
||||
|
||||
int func_802E4A08(void){
|
||||
return (D_8037E8E0.game_mode == GAME_MODE_6_FILE_PLAYBACK)
|
||||
|| (D_8037E8E0.game_mode == 5)
|
||||
|| (D_8037E8E0.game_mode == GAME_MODE_7_ATTRACT_DEMO)
|
||||
|| (D_8037E8E0.game_mode == GAME_MODE_8_BOTTLES_BONUS)
|
||||
|| (D_8037E8E0.game_mode == GAME_MODE_9_BANJO_AND_KAZOOIE)
|
||||
|| (D_8037E8E0.game_mode == GAME_MODE_A_SNS_PICTURE);
|
||||
}
|
||||
|
||||
void func_802E4A70(void){
|
||||
D_8037E8E0.unk1C = 1;
|
||||
}
|
||||
|
||||
void func_802E4A80(void){
|
||||
D_8037E8E0.unk1C = 0;
|
||||
}
|
||||
|
||||
u8 func_802E4A8C(void){
|
||||
return D_8037E8E0.unk1C;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5BEB0/func_802E4A98.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5BEB0/func_802E4AAC.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5BEB0/func_802E4AC0.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5BEB0/func_802E4AD4.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5BEB0/func_802E4AE8.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5BEB0/func_802E4AFC.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5BEB0/func_802E4B10.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5BEB0/func_802E4B24.s")
|
||||
|
||||
f32 func_802E4B38(void){
|
||||
return D_8037E8E0.unk8;
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
/* .bss */
|
||||
struct {
|
||||
u8 pad0[0x20];
|
||||
}D_8037E8C0;
|
||||
|
||||
/* .code */
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5C240/func_802E31D0.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5C240/func_802E329C.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5C240/func_802E3460.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5C240/func_802E3524.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5C240/func_802E3580.s")
|
||||
|
||||
void func_802E35D0(void){}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5C240/func_802E35D8.s")
|
|
@ -0,0 +1,505 @@
|
|||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include "gc/gctransition.h"
|
||||
|
||||
extern void func_8024C510(f32);
|
||||
extern void func_8024CDF8(f32, f32, f32);
|
||||
extern void func_8024CE40(f32, f32, f32);
|
||||
extern void func_8024CE60(f32, f32);
|
||||
|
||||
|
||||
void func_802E3BD0(s32 frame_buffer_indx);
|
||||
void func_802E40A8(s32 map, s32 exit);
|
||||
void func_802E40C4( s32 arg0);
|
||||
void func_802E40D0(s32 map, s32 exit);
|
||||
void func_802E40E8(s32 transition);
|
||||
int func_802E4A08(void);
|
||||
|
||||
f32 func_8033DC20(void);
|
||||
void func_8033DC9C(f32);
|
||||
extern void func_80324C58(void);
|
||||
|
||||
|
||||
/* .rodata */
|
||||
extern f32 D_80377110;
|
||||
extern f32 D_80377114;
|
||||
|
||||
|
||||
/* .bss */
|
||||
struct{
|
||||
s32 unk0;
|
||||
s32 game_mode; //game_mode
|
||||
f32 unk8;
|
||||
s32 unkC; //freeze_scene_flag (used for pause menu)
|
||||
f32 unk10;
|
||||
u8 unk14; //
|
||||
u8 unk15; //map
|
||||
u8 unk16; //exit
|
||||
u8 unk17; //reset_on_map_load
|
||||
u8 unk18;
|
||||
u8 unk19;
|
||||
u8 unk1A;
|
||||
u8 unk1B;
|
||||
u8 unk1C;
|
||||
} D_8037E8E0;
|
||||
|
||||
void func_802E3800(void){
|
||||
func_8024CDF8(0.0f, 0.0f, 0.0f);
|
||||
func_8024CE40(-30.0f, 30.0f, 0.0f);
|
||||
func_8024C510(D_80377110);
|
||||
func_8024CFD4();
|
||||
}
|
||||
|
||||
void func_802E3854(void){
|
||||
int i;
|
||||
|
||||
func_8033B61C();
|
||||
func_80254464();
|
||||
for(i = 0; i < 0xF; i++){
|
||||
func_802E6820(5);
|
||||
func_8033A4D8();
|
||||
mapSavestate_defrag_all();
|
||||
gctransition_8030B740();
|
||||
func_802F542C();
|
||||
func_80350E00();
|
||||
func_802FA4E0();
|
||||
func_8033B5FC();
|
||||
timedFuncQueue_defrag();
|
||||
func_8025AF38();
|
||||
}
|
||||
}
|
||||
|
||||
void func_802E38E8(enum map_e map, s32 exit, s32 reset_on_load){
|
||||
if(reset_on_load || level_get() != map_getLevel(map)){
|
||||
func_8030AFD8(1);
|
||||
func_80321854();
|
||||
func_803216D0(map); //load_map_asm
|
||||
func_8030AFA0(map);
|
||||
}
|
||||
else{
|
||||
func_8030AFD8(1);
|
||||
func_8030AFA0(map);
|
||||
}
|
||||
func_802FA508();
|
||||
func_80334B20(map, exit, 0);
|
||||
func_802E3800();
|
||||
func_8033DC10();
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5C870/func_802E398C.s")
|
||||
|
||||
|
||||
void func_802E39D0(Gfx **gdl, Mtx **mptr, Vtx **vptr, s32 arg3, s32 arg4){
|
||||
Mtx* m_start = *mptr;
|
||||
Vtx* v_start = *vptr;
|
||||
|
||||
func_802539AC(gdl, arg3);
|
||||
D_8037E8E0.unkC = FALSE;
|
||||
func_80334540(gdl, mptr, vptr);
|
||||
if(!arg4){
|
||||
func_802E67AC();
|
||||
func_802E3BD0(func_8024BDA0());
|
||||
func_802E67C4();
|
||||
func_802E5F10(gdl);
|
||||
}
|
||||
if( D_8037E8E0.game_mode == GAME_MODE_A_SNS_PICTURE
|
||||
&& D_8037E8E0.unk19 != 6
|
||||
&& D_8037E8E0.unk19 != 5
|
||||
){
|
||||
gctransition_draw(gdl, mptr, vptr);
|
||||
}
|
||||
|
||||
if( D_8037E8E0.game_mode == GAME_MODE_8_BOTTLES_BONUS
|
||||
|| D_8037E8E0.game_mode == GAME_MODE_A_SNS_PICTURE
|
||||
){
|
||||
func_8030C2D4(gdl, mptr, vptr);
|
||||
}
|
||||
|
||||
if(!func_802E49F0() && func_80335134()){
|
||||
func_8032D474(gdl, mptr, vptr);
|
||||
}
|
||||
|
||||
func_80314320(gdl, mptr, vptr);
|
||||
if(!func_802E49F0()){
|
||||
func_8025AFC0(gdl, mptr, vptr);
|
||||
}
|
||||
|
||||
func_8030F410(gdl, mptr, vptr);
|
||||
if(!func_802E49F0()){
|
||||
func_802FAB54(gdl, mptr, vptr);
|
||||
}
|
||||
|
||||
printbuffer_draw(gdl, mptr, vptr);
|
||||
|
||||
if( D_8037E8E0.game_mode != GAME_MODE_A_SNS_PICTURE
|
||||
|| D_8037E8E0.unk19 == 6
|
||||
|| D_8037E8E0.unk19 == 5
|
||||
){
|
||||
gctransition_draw(gdl, mptr, vptr);
|
||||
}
|
||||
func_80253DE0(gdl);
|
||||
osWritebackDCache(m_start, sizeof(Mtx)*( *mptr - m_start));
|
||||
osWritebackDCache(v_start, sizeof(Vtx)*( *vptr - v_start));
|
||||
}
|
||||
|
||||
void func_802E3BD0(s32 frame_buffer_indx){
|
||||
func_8024A85C(frame_buffer_indx);
|
||||
}
|
||||
|
||||
void func_802E3BF0(void){
|
||||
return;
|
||||
}
|
||||
|
||||
//_set_game_mode
|
||||
void func_802E3BF8(enum game_mode_e next_mode, s32 arg1){
|
||||
s32 prev_mode = D_8037E8E0.game_mode;
|
||||
s32 sp20;
|
||||
s32 sp1C;
|
||||
|
||||
if( ( ( D_8037E8E0.game_mode == GAME_MODE_3_NORMAL || func_802E4A08())
|
||||
&& next_mode != GAME_MODE_4_PAUSED
|
||||
)
|
||||
|| ( D_8037E8E0.game_mode == GAME_MODE_4_PAUSED && next_mode != GAME_MODE_3_NORMAL )
|
||||
){
|
||||
func_80324C58();
|
||||
}
|
||||
|
||||
if(D_8037E8E0.game_mode == GAME_MODE_4_PAUSED && next_mode != GAME_MODE_4_PAUSED ){
|
||||
func_803117E8();
|
||||
}
|
||||
|
||||
//L802E3C84
|
||||
if(next_mode == GAME_MODE_8_BOTTLES_BONUS || next_mode == GAME_MODE_A_SNS_PICTURE){
|
||||
func_8030C1A0();
|
||||
}
|
||||
else{
|
||||
func_8030C204();
|
||||
}//L802E3CB4
|
||||
|
||||
D_8037E8E0.game_mode = next_mode;
|
||||
|
||||
if(next_mode == 2){
|
||||
func_80334E1C(3);
|
||||
}
|
||||
else if(next_mode == GAME_MODE_3_NORMAL || func_802E4A08()){
|
||||
if(prev_mode != GAME_MODE_4_PAUSED) {
|
||||
func_80334E1C(2);
|
||||
}//L802E3D18
|
||||
if(arg1){
|
||||
sp20 = FALSE;
|
||||
if(next_mode == GAME_MODE_3_NORMAL){
|
||||
if(func_803203FC(0x1F)){
|
||||
sp20 = TRUE;
|
||||
sp1C = 7;
|
||||
}
|
||||
else if(func_8032190C()
|
||||
&& level_get() != LEVEL_C_BOSS
|
||||
&& level_get() != LEVEL_B_SPIRAL_MOUNTAIN
|
||||
&& level_get() != LEVEL_6_LAIR
|
||||
&& level_get() != LEVEL_D_CUTSCENE
|
||||
){
|
||||
sp20 = TRUE;
|
||||
sp1C = 1;
|
||||
}
|
||||
}
|
||||
else if(func_802E4A08()){//L802E3DBC
|
||||
sp20 = TRUE;
|
||||
sp1C = func_8034BDA4(D_8037E8E0.unk15, D_8037E8E0.unk16);
|
||||
}
|
||||
|
||||
if(sp20)
|
||||
gctransition_8030BEA4(sp1C);
|
||||
else
|
||||
gctransition_8030BD4C();
|
||||
}
|
||||
func_80346CA8();
|
||||
D_8037E8E0.unk10 = 0.0f;
|
||||
}
|
||||
else if(next_mode == GAME_MODE_4_PAUSED){//L802E3E24
|
||||
func_80335110(0);
|
||||
FUNC_8030E624(SFX_C9_PAUSEMENU_ENTER, 1.1f, 32750);
|
||||
func_8024E7C8();
|
||||
func_8025A430(0, 2000, 3);
|
||||
func_8025A23C(COMUSIC_6F_PAUSE_SCREEN);
|
||||
func_80312B8C();
|
||||
}//L802E3E6C
|
||||
}
|
||||
|
||||
void func_802E3E7C(enum game_mode_e mode){
|
||||
s32 sp34;
|
||||
s32 sp30;
|
||||
s32 map;
|
||||
s32 sp28;
|
||||
s32 prev_mode;
|
||||
|
||||
func_80254008();
|
||||
sp34 = D_8037E8E0.unk18;
|
||||
sp30 = D_8037E8E0.unk17;
|
||||
map = D_8037E8E0.unk15;
|
||||
sp28 = D_8037E8E0.unk16;
|
||||
prev_mode = D_8037E8E0.unk0;
|
||||
func_802E3BF8(2, 0);
|
||||
if(!func_80320454(0x21, 0) || map_getLevel(map_get()) == map_getLevel(D_8037E8E0.unk15)){
|
||||
if(!func_803203FC(0x1F))
|
||||
mapSavestate_save(map_get());
|
||||
}
|
||||
func_802E398C(1);
|
||||
func_802E38E8(map, sp28, sp34);
|
||||
mapSavestate_apply(map);
|
||||
D_8037E8E0.unk0 = prev_mode;
|
||||
func_802E3BF8(mode, sp30);
|
||||
func_80332CCC();
|
||||
func_80346CA8();
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5C870/func_802E3F80.s")
|
||||
|
||||
//game_draw
|
||||
void func_802E3F8C(s32 arg0){
|
||||
Gfx *sp34;
|
||||
Gfx *sp30;
|
||||
Gfx *sp2C;
|
||||
Mtx *sp28;
|
||||
Vtx *sp24;
|
||||
if(arg0){
|
||||
func_80254348();
|
||||
}
|
||||
|
||||
func_80254404(&sp34, &sp28, &sp24);
|
||||
if(D_8037E8E0.unkC == 1){
|
||||
func_80254404(&sp34, &sp28, &sp24);
|
||||
}
|
||||
sp30 = sp34;
|
||||
func_802E39D0(&sp34, &sp28, &sp24, func_8024BDA0(), arg0);
|
||||
if(D_8037E8E0.unkC == 0){
|
||||
sp2C = sp34;
|
||||
func_8024C1DC();
|
||||
func_80253EC4(sp30, sp2C);
|
||||
if(arg0){
|
||||
func_80254348();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_802E4048(s32 map, s32 exit, s32 transition){
|
||||
func_802E40A8(map, exit);
|
||||
func_802E40E8(transition);
|
||||
func_802E40C4(1);
|
||||
}
|
||||
|
||||
//take me there
|
||||
extern void func_802E4078(enum map_e map, s32 exit, s32 transition){
|
||||
func_802E40D0(map, exit);
|
||||
func_802E40E8(transition);
|
||||
func_802E40C4(1);
|
||||
}
|
||||
|
||||
void func_802E40A8(s32 map, s32 exit){
|
||||
D_8037E8E0.unk18 = 1;
|
||||
D_8037E8E0.unk15 = map;
|
||||
D_8037E8E0.unk16 = exit;
|
||||
}
|
||||
|
||||
void func_802E40C4( s32 arg0){
|
||||
D_8037E8E0.unk14 = arg0;
|
||||
}
|
||||
|
||||
void func_802E40D0(s32 map, s32 exit){
|
||||
D_8037E8E0.unk18 = 0;
|
||||
D_8037E8E0.unk15 = map;
|
||||
D_8037E8E0.unk16 = exit;
|
||||
}
|
||||
|
||||
void func_802E40E8(s32 transition){
|
||||
D_8037E8E0.unk17 = transition;
|
||||
D_8037E8E0.unk19 = 0;
|
||||
if(transition && !gctransition_8030BDC0()){
|
||||
gctransition_8030BE60();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void func_802E412C(s32 arg0, s32 arg1){
|
||||
D_8037E8E0.unk17 = arg0;
|
||||
D_8037E8E0.unk19 = arg1;
|
||||
if(arg0 && !gctransition_8030BDC0()){
|
||||
gctransition_8030BEA4(arg1);
|
||||
}
|
||||
}
|
||||
|
||||
void func_802E4170(void){
|
||||
func_802E3BF8(2,0);
|
||||
func_80240844();
|
||||
func_802E5F68();
|
||||
if(!func_802E4A08())
|
||||
func_802F4F64();
|
||||
timedFuncQueue_free();
|
||||
func_802F9C48();
|
||||
func_8033A17C();
|
||||
func_80253420();
|
||||
func_802E398C(0);
|
||||
func_8030AFD8(0);
|
||||
func_80321854();
|
||||
func_8031FBF8();
|
||||
func_802880C0();
|
||||
func_80259B14();
|
||||
func_8030D8DC();
|
||||
}
|
||||
|
||||
#ifndef NONMATCHING
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5C870/func_802E4214.s")
|
||||
#else
|
||||
// //99.9% there
|
||||
void func_802E4214(s32 arg0){
|
||||
D_8037E8E0.unk14 = 0;
|
||||
D_8037E8E0.unk18 = 0;
|
||||
D_8037E8E0.unk19 = 0;
|
||||
D_8037E8E0.unk17 = 0;
|
||||
D_8037E8E0.unk16 = 0;
|
||||
D_8037E8E0.unk15 = 0;
|
||||
D_8037E8E0.unk1A = 0;
|
||||
D_8037E8E0.unk1B = 0;
|
||||
D_8037E8E0.unkC = 0;
|
||||
D_8037E8E0.unk1C = 0;
|
||||
func_8033C070();
|
||||
func_8025B0E4();
|
||||
func_8030D86C();
|
||||
func_80259A24();
|
||||
func_80322764();
|
||||
timedFuncQueue_init();
|
||||
func_802F9CD8();
|
||||
func_8031B62C();
|
||||
if(!func_802E4A08())
|
||||
func_802F51B8();
|
||||
func_802E5F38();
|
||||
func_802407C0();
|
||||
func_8033A1A4();
|
||||
func_80253428(1);
|
||||
func_80288070();
|
||||
func_8024CCC4();
|
||||
func_8024CE60(1.0f, D_80377114);
|
||||
func_8034A6B4();
|
||||
func_80254348();
|
||||
func_80253FE8();
|
||||
func_8033DC70();
|
||||
func_8033DC04();
|
||||
func_8031FBA0();
|
||||
D_8037E8E0.game_mode = 2;
|
||||
D_8037E8E0.unk8 = 0.0f;
|
||||
func_8033DC9C(0.0f);
|
||||
func_8033DD04(0);
|
||||
func_803216D0(arg0);
|
||||
func_8030AFA0(arg0);
|
||||
func_802E3854();
|
||||
func_802E38E8(arg0, 0, 0);
|
||||
D_8037E8E0.unk0 = 0;
|
||||
func_802E3BF8(3,1);
|
||||
}
|
||||
#endif
|
||||
|
||||
void func_802E4384(void){
|
||||
if(D_8037E8E0.unk8 == 0.0f){
|
||||
func_8033DC9C(0.0f);
|
||||
}
|
||||
else{
|
||||
func_8033DC18();
|
||||
;
|
||||
func_8033DD04((s32)(func_8033DC20()*60.0f + 0.5));
|
||||
}
|
||||
func_8033DC10();
|
||||
|
||||
D_8037E8E0.unk8 += time_getDelta();
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5C870/func_802E4424.s")
|
||||
|
||||
void func_802E48B8(enum game_mode_e mode, s32 arg1){
|
||||
func_802E3BF8(mode, arg1);
|
||||
}
|
||||
|
||||
s32 func_802E48D8(void){
|
||||
func_802555C4();
|
||||
if( !level_get() )
|
||||
return NULL;
|
||||
|
||||
func_80343F3C();
|
||||
func_80288470();
|
||||
func_802F1320();
|
||||
func_802BA128();
|
||||
func_8033A4D8();
|
||||
func_8028FB68();
|
||||
func_802F0E58();
|
||||
func_8030A298();
|
||||
func_803086B4();
|
||||
func_8032AF94();
|
||||
func_802C4320();
|
||||
func_802F3300();
|
||||
func_802F542C();
|
||||
gcdialog_defrag();
|
||||
if(D_8037E8E0.game_mode == 4)
|
||||
func_80311740();
|
||||
switch(get_loaded_overlay_id()){
|
||||
case OVERLAY_2_WHALE:
|
||||
func_803894A0();
|
||||
break;
|
||||
case OVERLAY_D_WITCH:
|
||||
func_80350E00();
|
||||
break;
|
||||
}
|
||||
return func_802555D0();
|
||||
}
|
||||
|
||||
void func_802E49E0(void){
|
||||
D_8037E8E0.unkC = TRUE;
|
||||
}
|
||||
|
||||
int func_802E49F0(void){
|
||||
return D_8037E8E0.unkC;
|
||||
}
|
||||
|
||||
s32 getGameMode(void){
|
||||
return D_8037E8E0.game_mode;
|
||||
}
|
||||
|
||||
int func_802E4A08(void){
|
||||
return (D_8037E8E0.game_mode == GAME_MODE_6_FILE_PLAYBACK)
|
||||
|| (D_8037E8E0.game_mode == 5)
|
||||
|| (D_8037E8E0.game_mode == GAME_MODE_7_ATTRACT_DEMO)
|
||||
|| (D_8037E8E0.game_mode == GAME_MODE_8_BOTTLES_BONUS)
|
||||
|| (D_8037E8E0.game_mode == GAME_MODE_9_BANJO_AND_KAZOOIE)
|
||||
|| (D_8037E8E0.game_mode == GAME_MODE_A_SNS_PICTURE);
|
||||
}
|
||||
|
||||
void func_802E4A70(void){
|
||||
D_8037E8E0.unk1C = 1;
|
||||
}
|
||||
|
||||
void func_802E4A80(void){
|
||||
D_8037E8E0.unk1C = 0;
|
||||
}
|
||||
|
||||
u8 func_802E4A8C(void){
|
||||
return D_8037E8E0.unk1C;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5C870/func_802E4A98.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5C870/func_802E4AAC.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5C870/func_802E4AC0.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5C870/func_802E4AD4.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5C870/func_802E4AE8.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5C870/func_802E4AFC.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5C870/func_802E4B10.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5C870/func_802E4B24.s")
|
||||
|
||||
f32 func_802E4B38(void){
|
||||
return D_8037E8E0.unk8;
|
||||
}
|
|
@ -43,8 +43,10 @@ typedef struct {
|
|||
|
||||
extern u8 D_80368830[3] = {0,0,0};
|
||||
|
||||
extern struct5DBC0s * D_8037E900;
|
||||
/* .bss */
|
||||
struct5DBC0s * D_8037E900;
|
||||
|
||||
/* .code */
|
||||
struct5DBC0s *func_802E4B50(void){
|
||||
u8 sp24[3] = D_80368830;
|
||||
D_8037E900 = (struct5DBC0s *)malloc(sizeof(struct5DBC0s));
|
||||
|
|
|
@ -30,12 +30,12 @@ extern f32 D_80377180;
|
|||
extern f32 D_80377184;
|
||||
|
||||
/* .bss */
|
||||
extern struct {
|
||||
struct {
|
||||
BKCollisionGeo *unk0[100];
|
||||
BKCollisionGeo **unk190;
|
||||
}D_8037E910;
|
||||
extern f32 D_8037EAA8[3][3];
|
||||
extern Struct_core2_5FD90_1 D_8037EAD0[];
|
||||
f32 D_8037EAA8[3][3];
|
||||
Struct_core2_5FD90_1 D_8037EAD0[100];
|
||||
|
||||
/* .code */
|
||||
void func_802E6D20(BKCollisionTri *arg0, BKVertexList *vtx_list) {
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
extern void func_80252C08(f32[3], f32[3], f32, f32[3]);
|
||||
extern void func_80252CC4(f32[3], f32[3], f32, s32);
|
||||
|
||||
/* .bss */
|
||||
Mtx D_80380880;
|
||||
|
||||
/* .code */
|
||||
bool func_802EA760(BKModelUnk14List *arg0, s32 arg1, f32 arg2[3], f32 arg3[3], f32 arg4, f32 arg5[3], f32 arg6[3], f32 *arg7) {
|
||||
s32 start;
|
||||
BKModelUnk14_2 *temp_v0;
|
||||
|
@ -133,7 +137,6 @@ s32 func_802EB8A0(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32
|
|||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_637D0/func_802EBA98.s")
|
||||
|
||||
extern Mtx D_80380880;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_637D0/func_802EBAE0.s")
|
||||
// s32 func_802EBAE0(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32 scale, s32 arg4, s32 arg5, f32 arg6[3], f32 arg7, f32 arg8[3]) {
|
||||
|
|
|
@ -6,14 +6,13 @@ extern void func_80252CC4(f32[3], f32 [3], f32, f32[3]);
|
|||
extern f32 func_8034A9D0(f32[4], f32);
|
||||
|
||||
/*.bss */
|
||||
extern struct {
|
||||
struct {
|
||||
s32 unk0;
|
||||
f32 unk4[3];
|
||||
f32 unk10[3];
|
||||
f32 unk1C;
|
||||
f32 unk20[3];
|
||||
}D_803808C0;
|
||||
extern f32 D_803808E0;
|
||||
|
||||
/* .code */
|
||||
Vtx *vtxList_getVertices(BKVertexList *vtxList){
|
||||
|
|
|
@ -11,7 +11,7 @@ extern void func_802EFF9C(ParticleEmitter *, f32);
|
|||
extern s32 D_80368850[3];
|
||||
|
||||
/* .bss */
|
||||
extern u8 D_803808F0;
|
||||
u8 D_803808F0;
|
||||
|
||||
/* .code */
|
||||
void func_802EDD20(void){
|
||||
|
|
|
@ -2,66 +2,11 @@
|
|||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern int func_8024DB50(f32 (*)[3], f32);
|
||||
extern s32 spriteGetFrameCount(BKSprite *);
|
||||
extern void func_80344720(s32 SpriteGfx, s32 frame, s32, f32[3], f32[3], f32[3], Gfx **, Mtx **);
|
||||
extern void func_80344424(s32 SpriteGfx, s32 frame, s32, f32[3], f32[3], f32, Gfx **, Mtx **);
|
||||
|
||||
|
||||
void func_802EF9E4(ParticleEmitter *this, s32 arg1);
|
||||
void func_802EF9EC(ParticleEmitter *this, s32 arg1, s32 arg2);
|
||||
void func_802EFA04(ParticleEmitter *, f32);
|
||||
void particleEmitter_setParticleCallback(ParticleEmitter *this, void (*arg1)(ParticleEmitter *this, f32 pos[3]));
|
||||
void func_802EFA20(ParticleEmitter *, f32, f32);
|
||||
void func_802EFA34(ParticleEmitter *, f32);
|
||||
void func_802EFA40(ParticleEmitter *, f32 (*)[3]);
|
||||
void func_802EFA78(ParticleEmitter *this, s32 arg1);
|
||||
void func_802EFF5C(ParticleEmitter *, f32, f32, f32);
|
||||
void func_802EFF7C(ParticleEmitter *, f32, f32, f32);
|
||||
void func_802EFF9C(ParticleEmitter *, f32);
|
||||
void func_802F0C78(ParticleEmitter *this);
|
||||
|
||||
|
||||
extern s16 D_80368930[] = {0x700, 0x702, 0x70D};
|
||||
extern Gfx D_80368940[] = {
|
||||
gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH),
|
||||
gsSPSetGeometryMode(G_ZBUFFER | G_SHADE | G_TEXTURE_GEN_LINEAR | G_SHADING_SMOOTH),
|
||||
gsSPTexture(0x8000, 0x8000, 0, G_TX_RENDERTILE, G_ON),
|
||||
gsDPSetCombineMode(G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM),
|
||||
gsDPSetCycleType(G_CYC_1CYCLE),
|
||||
gsDPSetRenderMode(Z_CMP | IM_RD | CVG_DST_FULL | ZMODE_OPA | FORCE_BL | GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA), Z_CMP | IM_RD | CVG_DST_FULL | ZMODE_OPA | FORCE_BL | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)),
|
||||
gsSPEndDisplayList()
|
||||
};
|
||||
|
||||
extern Gfx D_80368978[] = {
|
||||
gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH),
|
||||
gsSPSetGeometryMode(G_SHADE | G_TEXTURE_GEN_LINEAR | G_SHADING_SMOOTH),
|
||||
gsSPTexture(0x8000, 0x8000, 0, G_TX_RENDERTILE, G_ON),
|
||||
gsDPSetCombineMode(G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM),
|
||||
gsDPSetCycleType(G_CYC_1CYCLE),
|
||||
gsDPSetRenderMode(G_RM_XLU_SURF, G_RM_XLU_SURF2),
|
||||
gsSPEndDisplayList()
|
||||
};
|
||||
|
||||
ParticleEmitter **D_803689B0; //particlePtrArrayPtr
|
||||
s32 D_803689B4; //particlePtrArraySize
|
||||
s32 D_803689B8[3];
|
||||
|
||||
extern f64 D_803771B0;
|
||||
extern f64 D_803771B8;
|
||||
extern f64 D_803771C0;
|
||||
extern f64 D_803771C8;
|
||||
|
||||
// 000F 0220: C0F86A0000000000 40F86A0000000000
|
||||
// 000F 0230: 40F86A0000000000 3F50624DD2F1A9FC
|
||||
// 000F 0240: 400921FB54524550 0000000000000000
|
||||
|
||||
extern u8 D_80380910[];
|
||||
extern f32 D_80380920;
|
||||
extern u8 D_80380924;
|
||||
|
||||
|
||||
/* .bss */
|
||||
u8 D_80380910[3];
|
||||
|
||||
/* .code */
|
||||
s32 func_802EE5E0(s32 arg0){
|
||||
return arg0;
|
||||
}
|
||||
|
@ -70,852 +15,12 @@ void func_802EE5E8(ParticleEmitter *this){
|
|||
return;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_67650/func_802EE5F0.s")
|
||||
bool func_802EE5F0(s32 arg0){
|
||||
return (arg0 < 3) ? !func_802EF648(func_802F0EF0(D_80380910[arg0])) : FALSE;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_67650/func_802EE63C.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_67650/func_802EE684.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_67650/func_802EE6CC.s")
|
||||
|
||||
void func_802EE930(ParticleEmitter *this){
|
||||
func_8033B388(&this->sprite_1C, &this->unk34);
|
||||
if(this->model_20)
|
||||
func_8033BD20(&this->model_20);
|
||||
}
|
||||
|
||||
int func_802EE974(ParticleEmitter *this, f32 (*arg1)[3], f32 (*arg2)[3], f32 (*arg3)[3], s32 arg4){
|
||||
if(-100000.0 == this->unk74 && 100000.0 == this->unk78){
|
||||
return func_80309B48(arg1, arg2, arg3, 0);
|
||||
}
|
||||
|
||||
if(100000.0 != this->unk78 && this->unk78 < (*arg2)[1]){
|
||||
(*arg2)[1] = this->unk78;
|
||||
(*arg3)[2] = 0.0f;
|
||||
(*arg3)[0] = 0.0f;
|
||||
(*arg3)[1] = -1.0f;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if(this->unk74 != -100000.0 && (*arg2)[1] < this->unk74){
|
||||
(*arg2)[1] = this->unk74;
|
||||
(*arg3)[2] = 0.0f;
|
||||
(*arg3)[0] = 0.0f;
|
||||
(*arg3)[1] = 1.0f;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __particleEmitter_initParticle(ParticleEmitter *this, Particle *particle){
|
||||
particle->unk0[0] = randf2(this->particleAccerationRange_4C_min_x, this->particleAccerationRange_4C_max_x);
|
||||
particle->unk0[1] = randf2(this->particleAccerationRange_4C_min_y, this->particleAccerationRange_4C_max_y);
|
||||
particle->unk0[2] = randf2(this->particleAccerationRange_4C_min_z, this->particleAccerationRange_4C_max_z);
|
||||
particle->unk5C = this->unk64;
|
||||
|
||||
particle->unkC = (0.0f == this->unk10) ? 1.0f : 0;
|
||||
particle->frame_10 = randf2((f32)this->particleStartingFrameRange_84_min, (f32)this->particleStartingFrameRange_84_max);
|
||||
particle->framerate_14 = randf2(this->particleFramerateRange_8C_min, this->particleFramerateRange_8C_max);
|
||||
|
||||
particle->position_18[0] = this->postion_28[0];
|
||||
particle->position_18[1] = this->postion_28[1];
|
||||
particle->position_18[2] = this->postion_28[2];
|
||||
|
||||
particle->position_18[0] = particle->position_18[0] + randf2(this->particleSpawnPositionRange_94_min_x, this->particleSpawnPositionRange_94_max_x);
|
||||
particle->position_18[1] = particle->position_18[1] + randf2(this->particleSpawnPositionRange_94_min_y, this->particleSpawnPositionRange_94_max_y);
|
||||
particle->position_18[2] = particle->position_18[2] + randf2(this->particleSpawnPositionRange_94_min_z, this->particleSpawnPositionRange_94_max_z);
|
||||
|
||||
particle->initialSize_34 = particle->size_30 = randf2(this->particleStartingScaleRange_AC_min, this->particleStartingScaleRange_AC_max);
|
||||
if(0.0f == this->particleFinalScaleRange_B4_min && 0.0f == this->particleFinalScaleRange_B4_max)
|
||||
particle->finalSizeDiff = 0.0f;
|
||||
else
|
||||
particle->finalSizeDiff = randf2(this->particleFinalScaleRange_B4_min, this->particleFinalScaleRange_B4_max)- particle->initialSize_34;
|
||||
|
||||
particle->unk24[2] = 0.0f;
|
||||
particle->unk24[1] = 0.0f;
|
||||
particle->unk24[0] = 0.0f;
|
||||
|
||||
particle->unk3C[0] = randf2(this->unkBC[0], this->unkC8[0]);
|
||||
particle->unk3C[1] = randf2(this->unkBC[1], this->unkC8[1]);
|
||||
particle->unk3C[2] = randf2(this->unkBC[2], this->unkC8[2]);
|
||||
|
||||
particle->age_48 = 0.0f;
|
||||
particle->lifetime_4C = randf2(this->unkDC[0], this->unkDC[1]) + 0.001;
|
||||
if(!this->sphericalParticleVelocity_48){
|
||||
particle->velocity_50[0] = randf2(this->particleVelocityRange_E4.cartisian_min_x, this->particleVelocityRange_E4.cartisian_max_x);
|
||||
particle->velocity_50[1] = randf2(this->particleVelocityRange_E4.cartisian_min_y, this->particleVelocityRange_E4.cartisian_max_y);
|
||||
particle->velocity_50[2] = randf2(this->particleVelocityRange_E4.cartisian_min_z, this->particleVelocityRange_E4.cartisian_max_z);
|
||||
}
|
||||
else{
|
||||
func_80256E24(particle->velocity_50,
|
||||
mlNormalizeAngle(randf2(this->particleVelocityRange_E4.spherical.pitch_min, this->particleVelocityRange_E4.spherical.pitch_max)),
|
||||
mlNormalizeAngle(randf2(this->particleVelocityRange_E4.spherical.yaw_min, this->particleVelocityRange_E4.spherical.yaw_max)),
|
||||
0.0f,
|
||||
0.0f,
|
||||
randf2(this->particleVelocityRange_E4.spherical.radius_min, this->particleVelocityRange_E4.spherical.radius_max)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
void func_802EED1C(ParticleEmitter *this, f32 arg1, f32 arg2[3]){
|
||||
int i;
|
||||
f32 tmp_f22;
|
||||
f32 tmp_f0;
|
||||
|
||||
tmp_f22 = this->unk108*0.5;
|
||||
for(i = 0; i < 3; i++){
|
||||
if(this->unk118[i] != 0.0f){
|
||||
tmp_f0 = func_802588B0(this->unk10C[i] + arg1, this->unk108);
|
||||
tmp_f0 = mlAbsF(tmp_f0 - tmp_f22);
|
||||
tmp_f0 = ml_map_f(tmp_f0, 0.0f, tmp_f22, 1.0 - this->unk118[i], this->unk118[i] + 1.0);
|
||||
arg2[i] *= tmp_f0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef NONMATCHING
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_67650/func_802EEE3C.s")
|
||||
#else
|
||||
void func_802EEE3C(ParticleEmitter *this, Gfx **gfx, Mtx **mtx, Vtx **vtx, s32 arg4){
|
||||
f32 sp8C[3];
|
||||
f32 sp80[3];
|
||||
f32 sp74[3];
|
||||
Particle *iPtr;
|
||||
s32 tmp_a0;
|
||||
s32 tmp_a1;
|
||||
s32 tmp_a2;
|
||||
s32 tmp_a3;
|
||||
|
||||
if(arg4 != (this->unk18 & 0x4))
|
||||
return;
|
||||
|
||||
if(this->model_20 != NULL){
|
||||
for(iPtr = this->pList_start_124; iPtr < this->pList_end_128; iPtr++){
|
||||
sp8C[0] = iPtr->position_18[0] + this->unk4[0];
|
||||
sp8C[1] = iPtr->position_18[1] + this->unk4[1];
|
||||
sp8C[2] = iPtr->position_18[2] + this->unk4[2];
|
||||
if( 0.0f != this->unk10 || 1.0 != this->unk14 || this->unk49 != 0xff ){
|
||||
func_8033A410((s32) (iPtr->unkC*this->unk49));
|
||||
}//L802EEF5C
|
||||
tmp_a3 = (this->unk18 & 0x10)?0:1;
|
||||
set_model_render_mode(tmp_a3);
|
||||
func_803391A4(gfx, mtx, sp8C, iPtr->unk24, iPtr->size_30, NULL, this->model_20);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(this->unk34){//L802EEFC4
|
||||
if( this->unk3C[0] != 0xff
|
||||
|| this->unk3C[1] != 0xff
|
||||
|| this->unk3C[2] != 0xff
|
||||
|| this->unk49 != 0xff
|
||||
){
|
||||
tmp_a3 = (this->unk18 & 0x10)? 9: 0xf;
|
||||
func_803382E4(tmp_a3);
|
||||
func_80338338(this->unk3C[0], this->unk3C[1], this->unk3C[2]);
|
||||
tmp_a0 = (this->unk3C[0] < 8)? 0 : this->unk3C[0] - 8;
|
||||
tmp_a1 = (this->unk3C[1] < 8)? 0 : this->unk3C[1] - 8;
|
||||
tmp_a2 = (this->unk3C[2] < 8)? 0 : this->unk3C[2] - 8;
|
||||
tmp_a3 = (this->unk18 & 0x20)? 0xff : this->unk49;
|
||||
func_803382B4(tmp_a0, tmp_a1, tmp_a2, tmp_a3);
|
||||
func_80338370();
|
||||
func_80335D30(gfx);
|
||||
}
|
||||
else if(this->unk18 & 0x10){//L802EF0C0
|
||||
gSPDisplayList((*gfx)++, D_80368978);
|
||||
}
|
||||
else{//L802EF0EC
|
||||
gSPDisplayList((*gfx)++, D_80368940);
|
||||
}//L802EF10C
|
||||
sp80[0] = 90.0f;
|
||||
sp80[1] = 0.0f;
|
||||
sp80[2] = 0.0f;
|
||||
for(iPtr = this->pList_start_124; iPtr < this->pList_end_128; iPtr++){
|
||||
gDPSetPrimColor((*gfx)++, 0, 0, this->unk3C[0], this->unk3C[1], this->unk3C[2], iPtr->unkC*this->unk49);
|
||||
sp8C[0] = iPtr->position_18[0] + this->unk4[0];
|
||||
sp8C[1] = iPtr->position_18[1] + this->unk4[1];
|
||||
sp8C[2] = iPtr->position_18[2] + this->unk4[2];
|
||||
|
||||
sp74[0] = iPtr->size_30;
|
||||
sp74[1] = iPtr->size_30;
|
||||
sp74[2] = iPtr->size_30;
|
||||
if(0.0f != this->unk108){
|
||||
func_802EED1C(this, iPtr->age_48, sp74);
|
||||
}
|
||||
func_80344C2C(this->unk0_16);
|
||||
if(this->unk18 & 1){
|
||||
func_80344720(this->unk34, (s32)iPtr->frame_10, 0, sp8C, sp80, sp74, gfx, mtx);
|
||||
}//L802EF2F8
|
||||
else{
|
||||
func_80344424(this->unk34, (s32)iPtr->frame_10, 0, sp8C, sp74, iPtr->unk24[2], gfx, mtx);
|
||||
}//L802EF324
|
||||
}//L802EF338
|
||||
if( this->unk3C[0] != 0xff
|
||||
|| this->unk3C[1] != 0xff
|
||||
|| this->unk3C[2] != 0xff
|
||||
|| this->unk49 != 0xff
|
||||
){
|
||||
func_8033687C(gfx);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void func_802EF3A8(ParticleEmitter *this, Gfx **gdl, Mtx **mPtr, Vtx **vPtr){
|
||||
func_802EEE3C(this, gdl, mPtr, vPtr, 4);
|
||||
func_802EEE3C(this, gdl, mPtr, vPtr, 0);
|
||||
}
|
||||
|
||||
void func_802EF3F4(ParticleEmitter *this, f32 position_min[3], f32 position_max[3], s32 count){
|
||||
for(count; count > 0; count--){
|
||||
if(this->pList_end_128 < this->pList_capacity_12C){
|
||||
__particleEmitter_initParticle(this, this->pList_end_128);
|
||||
this->pList_end_128->position_18[0] = randf2(position_min[0], position_max[0]);
|
||||
this->pList_end_128->position_18[1] = randf2(position_min[1], position_max[1]);
|
||||
this->pList_end_128->position_18[2] = randf2(position_min[2], position_max[2]);
|
||||
this->pList_end_128++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef NONMATCHING
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_67650/func_802EF4AC.s")
|
||||
#else
|
||||
void func_802EF4AC(ParticleEmitter *this, f32 arg1[3], f32 arg2[3], s32 arg3) {
|
||||
f32 sp3C[3];
|
||||
f32 temp_f0;
|
||||
s32 temp_s4;
|
||||
s32 i;
|
||||
|
||||
// temp_s4 = arg3 - 1;
|
||||
sp3C[0] = arg2[0] - arg1[0];
|
||||
sp3C[1] = arg2[1] - arg1[1];
|
||||
sp3C[2] = arg2[2] - arg1[2];
|
||||
for(i = 0; i < arg3 - 1; i++){
|
||||
if (this->pList_end_128 < this->pList_capacity_12C) {
|
||||
__particleEmitter_initParticle(this, this->pList_end_128);
|
||||
temp_f0 = (f32)i / arg3;
|
||||
this->pList_end_128->position_18[0] = arg1[0] + sp3C[0]*temp_f0;
|
||||
this->pList_end_128->position_18[1] = arg1[1] + sp3C[1]*temp_f0;
|
||||
this->pList_end_128->position_18[2] = arg1[2] + sp3C[2]*temp_f0;
|
||||
this->pList_end_128++;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
//particleEmitter_emitN
|
||||
void particleEmitter_emitN(ParticleEmitter *this, int n){
|
||||
for(n; n > 0; n--){
|
||||
if(this->pList_end_128 < this->pList_capacity_12C){
|
||||
__particleEmitter_initParticle(this, this->pList_end_128++);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//particleEmitter_particleListLength
|
||||
int func_802EF628(ParticleEmitter *this){
|
||||
return (u32)(this->pList_end_128 - this->pList_start_124);
|
||||
}
|
||||
|
||||
//particleEmitter_isDone
|
||||
int func_802EF648(ParticleEmitter *this){
|
||||
return (u32)(this->pList_end_128 - this->pList_start_124) < 1
|
||||
&& this->doneSpawning_0_23 == 1;
|
||||
}
|
||||
|
||||
//particleEmitter_free
|
||||
void func_802EF684(ParticleEmitter *this){
|
||||
func_802EE930(this);
|
||||
free(this);
|
||||
}
|
||||
|
||||
ParticleEmitter * particleEmitter_new(u32 capacity){
|
||||
ParticleEmitter *this = malloc(capacity*sizeof(Particle) + sizeof(ParticleEmitter));
|
||||
f32 sp40[3];
|
||||
|
||||
this->unk0_0 = 0;
|
||||
this->doneSpawning_0_23 = 1;
|
||||
this->unk18 = 0;
|
||||
this->sprite_1C = NULL;
|
||||
this->unk0_16 = 0;
|
||||
this->model_20 = NULL;
|
||||
this->unk34 = 0;
|
||||
this->assetId_0_15 = 0;
|
||||
this->unk3C[0] = 0xff;
|
||||
this->unk3C[1] = 0xff;
|
||||
this->unk3C[2] = 0xff;
|
||||
this->particleSpawnTimer_24 = 0.0f;
|
||||
this->spawnIntervalTimer_38 = 0.0f;
|
||||
sp40[0] = sp40[1] = sp40[2] = 0.0f;
|
||||
|
||||
func_802EFA40(this, &sp40);
|
||||
func_802EFA5C(this, 0.0f, 1.0f);
|
||||
func_802EFA70(this, 0);
|
||||
particleEmitter_setPosition(this, sp40);
|
||||
particleEmitter_setParticleAccelerationRange(this, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
func_802EF9E4(this, 0xff);
|
||||
particleEmitter_setParticleSpawnPositionRange(this, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
particleEmitter_setParticleVelocityRange(this, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
func_802EF9EC(this, 0, 0);
|
||||
func_802EF9F8(this, 0.9f);
|
||||
func_802EFA04(this, -100000.0f);
|
||||
func_802EFA34(this, 100000.0f);
|
||||
particleEmitter_setParticleCallback(this, 0);
|
||||
func_802EFA18(this, 0);
|
||||
func_802EFA20(this, 1.0f, 1.0f);
|
||||
particleEmitter_setStartingFrameRange(this, 0, 0);
|
||||
particleEmitter_setParticleFramerateRange(this, 0.0f, 0.0f);
|
||||
func_802EFB70(this, 1.0f, 1.0f);
|
||||
func_802EFB84(this, 0.0f, 0.0f);
|
||||
func_802EFE24(this, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
particleEmitter_setSpawnIntervalRange(this, 0.0f, 5.0f);
|
||||
func_802EFEC0(this, 0.0f, 5.0f);
|
||||
func_802EFF5C(this, 0.0f, 0.0f, 0.0f);
|
||||
func_802EFF7C(this, 0.0f, 0.0f, 0.0f);
|
||||
func_802EFF9C(this, 0.0f);
|
||||
func_802EFF50(this, 0.0f);
|
||||
this->unk100 = 0;
|
||||
this->unk104 = 0;
|
||||
this->pList_start_124 = &this->data[0];
|
||||
this->pList_end_128 = &this->data[0];
|
||||
this->pList_capacity_12C = &this->pList_start_124[capacity];
|
||||
return this;
|
||||
}
|
||||
|
||||
void particleEmitter_setSprite(ParticleEmitter *this, enum asset_e sprite_id){
|
||||
if(sprite_id != this->assetId_0_15){
|
||||
this->assetId_0_15 = sprite_id;
|
||||
func_802EE930(this);
|
||||
this->sprite_1C = func_8033B6C4(sprite_id, &this->unk34);
|
||||
}
|
||||
}
|
||||
|
||||
void particleEmitter_setParticleAccelerationRange(ParticleEmitter *this, f32 min_x, f32 min_y, f32 min_z, f32 max_x, f32 max_y, f32 max_z){
|
||||
this->particleAccerationRange_4C_min_x = min_x;
|
||||
this->particleAccerationRange_4C_min_y = min_y;
|
||||
this->particleAccerationRange_4C_min_z = min_z;
|
||||
this->particleAccerationRange_4C_max_x = max_x;
|
||||
this->particleAccerationRange_4C_max_y = max_y;
|
||||
this->particleAccerationRange_4C_max_z = max_z;
|
||||
}
|
||||
|
||||
void func_802EF9E4(ParticleEmitter *this, s32 arg1){
|
||||
this->unk49 = arg1;
|
||||
}
|
||||
|
||||
void func_802EF9EC(ParticleEmitter *this, s32 arg1, s32 arg2){
|
||||
this->unk66 = arg1;
|
||||
this->unk7C = arg2;
|
||||
}
|
||||
|
||||
void func_802EF9F8(ParticleEmitter *this, f32 arg1){
|
||||
this->unk68 = arg1;
|
||||
}
|
||||
|
||||
void func_802EFA04(ParticleEmitter *this, f32 arg1){
|
||||
this->unk74 = arg1;
|
||||
}
|
||||
|
||||
void particleEmitter_setParticleCallback(ParticleEmitter *this, void (*arg1)(ParticleEmitter *this, f32 pos[3])){
|
||||
this->particleCallback_80 = arg1;
|
||||
}
|
||||
|
||||
void func_802EFA18(ParticleEmitter *this, s32 arg1){
|
||||
this->unk64 = arg1;
|
||||
}
|
||||
|
||||
void func_802EFA20(ParticleEmitter *this, f32 arg1, f32 arg2){
|
||||
this->unk6C = arg1;
|
||||
this->unk70 = arg2;
|
||||
}
|
||||
|
||||
void func_802EFA34(ParticleEmitter *this, f32 arg1){
|
||||
this->unk78 = arg1;
|
||||
}
|
||||
|
||||
void func_802EFA40(ParticleEmitter *this, f32 (*arg1)[3]){
|
||||
this->unk4[0] = (*arg1)[0];
|
||||
this->unk4[1] = (*arg1)[1];
|
||||
this->unk4[2] = (*arg1)[2];
|
||||
}
|
||||
|
||||
void func_802EFA5C(ParticleEmitter *this, f32 arg1, f32 arg2){
|
||||
this->unk10 = arg1;
|
||||
this->unk14 = arg2;
|
||||
}
|
||||
|
||||
void func_802EFA70(ParticleEmitter *this, s32 arg1){
|
||||
this->unk18 = arg1;
|
||||
}
|
||||
|
||||
void func_802EFA78(ParticleEmitter *this, s32 arg1){
|
||||
this->unk0_16 = arg1;
|
||||
}
|
||||
|
||||
void particleEmitter_setStartingFrameRange(ParticleEmitter *this, s32 arg1, s32 arg2){
|
||||
this->particleStartingFrameRange_84_min = arg1;
|
||||
this->particleStartingFrameRange_84_max = arg2;
|
||||
}
|
||||
|
||||
void particleEmitter_setParticleFramerateRange(ParticleEmitter *this, f32 arg1, f32 arg2){
|
||||
this->particleFramerateRange_8C_min = arg1;
|
||||
this->particleFramerateRange_8C_max = arg2;
|
||||
}
|
||||
|
||||
void func_802EFAB0(ParticleEmitter *this, s32 arg1, f32 arg2){
|
||||
this->unk100 = arg1;
|
||||
this->unk104 = (s16) arg2;
|
||||
}
|
||||
|
||||
//
|
||||
void particleEmitter_setModel(ParticleEmitter *this, enum asset_e model_id){
|
||||
if(this->assetId_0_15 != model_id){
|
||||
this->assetId_0_15 = model_id;
|
||||
func_802EE930(this);
|
||||
this->model_20 = assetcache_get(model_id);
|
||||
}
|
||||
}
|
||||
|
||||
void particleEmitter_setParticleSpawnPositionRange(ParticleEmitter *this, f32 min_x, f32 min_y, f32 min_z, f32 max_x, f32 max_y, f32 max_z){
|
||||
this->particleSpawnPositionRange_94_min_x = min_x;
|
||||
this->particleSpawnPositionRange_94_min_y = min_y;
|
||||
this->particleSpawnPositionRange_94_min_z = min_z;
|
||||
this->particleSpawnPositionRange_94_max_x = max_x;
|
||||
this->particleSpawnPositionRange_94_max_y = max_y;
|
||||
this->particleSpawnPositionRange_94_max_z = max_z;
|
||||
}
|
||||
|
||||
void particleEmitter_setPosition(ParticleEmitter * this, f32 position[3]){
|
||||
this->postion_28[0] = position[0];
|
||||
this->postion_28[1] = position[1];
|
||||
this->postion_28[2] = position[2];
|
||||
}
|
||||
|
||||
void func_802EFB70(ParticleEmitter * this, f32 min, f32 max){
|
||||
this->particleStartingScaleRange_AC_min = min;
|
||||
this->particleStartingScaleRange_AC_max = max;
|
||||
}
|
||||
|
||||
void func_802EFB84(ParticleEmitter * this, f32 min, f32 max){
|
||||
this->particleFinalScaleRange_B4_min = min;
|
||||
this->particleFinalScaleRange_B4_max = max;
|
||||
}
|
||||
|
||||
void func_802EFB98(ParticleEmitter *this, struct31s *arg1){
|
||||
this->particleStartingScaleRange_AC_min = arg1->unk0[0];
|
||||
this->particleStartingScaleRange_AC_max = arg1->unk0[1];
|
||||
if(-1.0f != arg1->unk8[0]){
|
||||
this->particleFinalScaleRange_B4_min = arg1->unk8[0];
|
||||
this->particleFinalScaleRange_B4_max = arg1->unk8[1];
|
||||
}
|
||||
particleEmitter_setSpawnIntervalRange(this, arg1->unk10[0], arg1->unk10[1]);
|
||||
this->unkDC[0] = arg1->unk18[0];
|
||||
this->unkDC[1] = arg1->unk18[1];
|
||||
this->unk10 = arg1->unk20;
|
||||
this->unk14 = arg1->unk24;
|
||||
}
|
||||
|
||||
void func_802EFC28(ParticleEmitter *this, struct40s *arg1){
|
||||
func_802EFB98(this, &arg1->unk0);
|
||||
func_802EFA70(this, (s32)arg1->unk28);
|
||||
particleEmitter_emitN(this, (s32)arg1->unk2C);
|
||||
}
|
||||
|
||||
void particleEmitter_setVelocityAndAccelerationRanges(ParticleEmitter *this, struct41s *arg1){
|
||||
particleEmitter_setParticleVelocityRange(this,
|
||||
arg1->unk0.unk0[0], arg1->unk0.unk0[1], arg1->unk0.unk0[2],
|
||||
arg1->unk0.unkC[0], arg1->unk0.unkC[1], arg1->unk0.unkC[2]
|
||||
);
|
||||
particleEmitter_setParticleAccelerationRange(this,
|
||||
arg1->unk18.unk0[0], arg1->unk18.unk0[1], arg1->unk18.unk0[2],
|
||||
arg1->unk18.unkC[0], arg1->unk18.unkC[1], arg1->unk18.unkC[2]
|
||||
);
|
||||
}
|
||||
|
||||
void particleEmitter_setPositionAndVelocityRanges(ParticleEmitter *this, struct42s *arg1){
|
||||
particleEmitter_setParticleVelocityRange(this,
|
||||
arg1->unk0.unk0[0], arg1->unk0.unk0[1], arg1->unk0.unk0[2],
|
||||
arg1->unk0.unkC[0], arg1->unk0.unkC[1], arg1->unk0.unkC[2]
|
||||
);
|
||||
|
||||
particleEmitter_setParticleSpawnPositionRange( this,
|
||||
arg1->unk18.unk0[0], arg1->unk18.unk0[1], arg1->unk18.unk0[2],
|
||||
arg1->unk18.unkC[0], arg1->unk18.unkC[1], arg1->unk18.unkC[2]
|
||||
);
|
||||
}
|
||||
|
||||
void particleEmitter_setPositionVelocityAndAccelerationRanges(ParticleEmitter *this, struct43s* arg1){
|
||||
particleEmitter_setParticleVelocityRange(this,
|
||||
arg1->unk0.unk0[0], arg1->unk0.unk0[1], arg1->unk0.unk0[2],
|
||||
arg1->unk0.unkC[0], arg1->unk0.unkC[1], arg1->unk0.unkC[2]
|
||||
);
|
||||
particleEmitter_setParticleAccelerationRange(this,
|
||||
arg1->unk18.unk0[0], arg1->unk18.unk0[1], arg1->unk18.unk0[2],
|
||||
arg1->unk18.unkC[0], arg1->unk18.unkC[1], arg1->unk18.unkC[2]
|
||||
);
|
||||
particleEmitter_setParticleSpawnPositionRange( this,
|
||||
arg1->unk30.unk0[0], arg1->unk30.unk0[1], arg1->unk30.unk0[2],
|
||||
arg1->unk30.unkC[0], arg1->unk30.unkC[1], arg1->unk30.unkC[2]
|
||||
);
|
||||
}
|
||||
|
||||
void func_802EFE24(ParticleEmitter *this, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6){
|
||||
this->unkBC[0] = arg1;
|
||||
this->unkBC[1] = arg2;
|
||||
this->unkBC[2] = arg3;
|
||||
this->unkC8[0] = arg4;
|
||||
this->unkC8[1] = arg5;
|
||||
this->unkC8[2] = arg6;
|
||||
}
|
||||
|
||||
void particleEmitter_setSpawnIntervalRange(ParticleEmitter *this, f32 min, f32 max){
|
||||
this->spawnIntervalRange_D4_min = min;
|
||||
this->spawnIntervalRange_D4_max = max;
|
||||
if(0.0f == this->particleSpawnTimer_24 || max < this->particleSpawnTimer_24)
|
||||
this->particleSpawnTimer_24 = randf2(this->spawnIntervalRange_D4_min, this->spawnIntervalRange_D4_max);
|
||||
}
|
||||
|
||||
void func_802EFEC0(ParticleEmitter *this, f32 arg1, f32 arg2){
|
||||
this->unkDC[0] = arg1;
|
||||
this->unkDC[1] = arg2;
|
||||
}
|
||||
|
||||
void particleEmitter_setParticleVelocityRange(ParticleEmitter *this, f32 x_min, f32 x_max, f32 y_min, f32 y_max, f32 z_min, f32 z_max){
|
||||
this->sphericalParticleVelocity_48 = FALSE;
|
||||
this->particleVelocityRange_E4.cartisian_min_x = x_min;
|
||||
this->particleVelocityRange_E4.cartisian_min_y = x_max;
|
||||
this->particleVelocityRange_E4.cartisian_min_z = y_min;
|
||||
this->particleVelocityRange_E4.cartisian_max_x = y_max;
|
||||
this->particleVelocityRange_E4.cartisian_max_y = z_min;
|
||||
this->particleVelocityRange_E4.cartisian_max_z = z_max;
|
||||
}
|
||||
|
||||
void particleEmitter_setSphericalParticleVelocityRange(ParticleEmitter *this, f32 pitch_min, f32 yaw_min, f32 radial_min, f32 pitch_max, f32 yaw_max, f32 radial_max){
|
||||
this->sphericalParticleVelocity_48 = TRUE;
|
||||
this->particleVelocityRange_E4.spherical.yaw_min = yaw_min;
|
||||
this->particleVelocityRange_E4.spherical.yaw_max = yaw_max;
|
||||
this->particleVelocityRange_E4.spherical.pitch_min = pitch_min;
|
||||
this->particleVelocityRange_E4.spherical.pitch_max = pitch_max;
|
||||
this->particleVelocityRange_E4.spherical.radius_min = radial_min;
|
||||
this->particleVelocityRange_E4.spherical.radius_max = radial_max;
|
||||
}
|
||||
|
||||
void func_802EFF50(ParticleEmitter *this, f32 arg1){
|
||||
this->unkFC = arg1;
|
||||
}
|
||||
|
||||
void func_802EFF5C(ParticleEmitter *this, f32 arg1, f32 arg2, f32 arg3){
|
||||
this->unk118[0] = arg1;
|
||||
this->unk118[1] = arg2;
|
||||
this->unk118[2] = arg3;
|
||||
}
|
||||
|
||||
void func_802EFF7C(ParticleEmitter *this, f32 arg1, f32 arg2, f32 arg3){
|
||||
this->unk10C[0] = arg1;
|
||||
this->unk10C[1] = arg2;
|
||||
this->unk10C[2] = arg3;
|
||||
}
|
||||
|
||||
void func_802EFF9C(ParticleEmitter *this, f32 arg1){
|
||||
this->unk108 = arg1;
|
||||
}
|
||||
|
||||
void func_802EFFA8(ParticleEmitter *this, s32 arg1[3]){
|
||||
this->unk3C[0] = arg1[0];
|
||||
this->unk3C[1] = arg1[1];
|
||||
this->unk3C[2] = arg1[2];
|
||||
}
|
||||
|
||||
void particleEmitter_setSpawnInterval(ParticleEmitter *this, f32 arg1){
|
||||
this->doneSpawning_0_23 = FALSE;
|
||||
this->spawnIntervalTimer_38 = arg1;
|
||||
}
|
||||
|
||||
void func_802EFFDC(ParticleEmitter *this){
|
||||
return;
|
||||
}
|
||||
|
||||
void particleEmitter_update(ParticleEmitter *this){
|
||||
Particle *iPtr;
|
||||
f32 tick = time_getDelta();
|
||||
f32 temp_f0;
|
||||
f32 sp78[3];
|
||||
f32 sp6C[3];
|
||||
f32 sp68;
|
||||
|
||||
if(D_80380924){
|
||||
for(iPtr = this->pList_start_124; iPtr < this->pList_end_128;){//L802F005C
|
||||
iPtr->age_48 += tick;
|
||||
if(iPtr->lifetime_4C <= iPtr->age_48){
|
||||
memcpy(iPtr, --this->pList_end_128, sizeof(Particle));
|
||||
}else{//L802F00A0
|
||||
temp_f0 = iPtr->age_48/iPtr->lifetime_4C;
|
||||
if(temp_f0 < this->unk10)
|
||||
iPtr->unkC = temp_f0/this->unk10;
|
||||
else if(temp_f0 <= this->unk14)
|
||||
iPtr->unkC = 1.0f;
|
||||
else{
|
||||
iPtr->unkC = 1.0f - ((temp_f0 - this->unk14)/(1.0f - this->unk14));
|
||||
}//L802F00F0
|
||||
iPtr->size_30 = iPtr->initialSize_34 + temp_f0*iPtr->finalSizeDiff;
|
||||
|
||||
if(this->sprite_1C){
|
||||
iPtr->frame_10 += iPtr->framerate_14*tick;
|
||||
if(!((s32)iPtr->frame_10 < spriteGetFrameCount(this->sprite_1C))){
|
||||
if(this->unk18 & 8){
|
||||
iPtr->frame_10 = spriteGetFrameCount(this->sprite_1C) - 1;
|
||||
}else{
|
||||
iPtr->frame_10 = 0.0f;
|
||||
}
|
||||
}
|
||||
}//L802F0180
|
||||
|
||||
iPtr->position_18[0] += iPtr->velocity_50[0]*tick;
|
||||
iPtr->position_18[1] += iPtr->velocity_50[1]*tick;
|
||||
iPtr->position_18[2] += iPtr->velocity_50[2]*tick;
|
||||
|
||||
iPtr->unk24[0] += iPtr->unk3C[0]*tick;
|
||||
iPtr->unk24[1] += iPtr->unk3C[1]*tick;
|
||||
iPtr->unk24[2] += iPtr->unk3C[2]*tick;
|
||||
|
||||
iPtr->velocity_50[0] = iPtr->velocity_50[0] + iPtr->unk0[0]*tick;
|
||||
iPtr->velocity_50[1] = iPtr->velocity_50[1] + iPtr->unk0[1]*tick;
|
||||
iPtr->velocity_50[2] = iPtr->velocity_50[2] + iPtr->unk0[2]*tick;
|
||||
|
||||
if(this->unk100){
|
||||
iPtr->position_18[1] = func_8034E698(this->unk100) + this->unk104;
|
||||
}//L802F0254
|
||||
|
||||
if( 0.0f != this->unkFC
|
||||
&& !func_8024DB50(&iPtr->position_18, this->unkFC)
|
||||
){
|
||||
memcpy(iPtr, --this->pList_end_128, sizeof(Particle));
|
||||
}
|
||||
else{//L802F029C
|
||||
if(iPtr->unk5C > 0){
|
||||
sp6C[0] = iPtr->position_18[0];
|
||||
sp6C[1] = iPtr->position_18[1] + 50.0f;
|
||||
sp6C[2] = iPtr->position_18[2];
|
||||
if(func_802EE974(this, &sp6C, &iPtr->position_18, &sp78, 0)){
|
||||
if(this->unk66){
|
||||
sp68 = mlAbsF(iPtr->velocity_50[1])/10.0;
|
||||
if(1.0f < sp68){
|
||||
sp68 = 1.0f;
|
||||
}//L802F0324
|
||||
if(D_80380920 == 0.0f){
|
||||
func_8030E6A4(this->unk66, randf2(this->unk6C, this->unk70), (s32)((f32)this->unk7C*sp68));
|
||||
D_80380920 = 0.25f;
|
||||
}
|
||||
}//L802F0384
|
||||
iPtr->position_18[1] += 2.0f;
|
||||
iPtr->velocity_50[1] = mlAbsF(iPtr->velocity_50[1]) * this->unk68;
|
||||
if((this->unk18 & 0x2) == 0){
|
||||
iPtr->initialSize_34 *= this->unk68;
|
||||
iPtr->finalSizeDiff *= this->unk68;
|
||||
}//L802F03DC
|
||||
|
||||
iPtr->unk3C[0] *= this->unk68;
|
||||
iPtr->unk3C[1] *= this->unk68;
|
||||
iPtr->unk3C[2] *= this->unk68;
|
||||
if(--iPtr->unk5C == 0){
|
||||
if(this->particleCallback_80)
|
||||
this->particleCallback_80(this, iPtr->position_18);
|
||||
memcpy(iPtr, --this->pList_end_128, sizeof(Particle));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
iPtr++;
|
||||
}
|
||||
}//L802F045C
|
||||
}//L802F0468
|
||||
if(0.0f < this->spawnIntervalTimer_38){ //if exactly 0.0f (no update)
|
||||
this->spawnIntervalTimer_38 -= tick;
|
||||
if(this->spawnIntervalTimer_38 <= 0.0f) //only can stop spawning
|
||||
this->doneSpawning_0_23 = TRUE;
|
||||
}
|
||||
|
||||
if(this->doneSpawning_0_23 != TRUE){
|
||||
this->particleSpawnTimer_24 -= tick;
|
||||
if(this->particleSpawnTimer_24 <= 0.0f){
|
||||
this->particleSpawnTimer_24 = randf2(this->spawnIntervalRange_D4_min, this->spawnIntervalRange_D4_max);
|
||||
if(this->pList_end_128 < this->pList_capacity_12C)
|
||||
__particleEmitter_initParticle(this, this->pList_end_128++);
|
||||
}
|
||||
}
|
||||
}//L802F0514
|
||||
}
|
||||
|
||||
void func_802F053C(ParticleEmitter *this, f32 arg1[3]){
|
||||
particleEmitter_setSprite(this, ASSET_70E_SPRITE_SMOKE_2);
|
||||
func_802EFFA8(this, D_803689B8);
|
||||
func_802EFA5C(this, 0.0f, 0.1f);
|
||||
particleEmitter_setStartingFrameRange(this, 0, 7);
|
||||
particleEmitter_setParticleSpawnPositionRange(this, -80.0f, 0.0f, -80.0f, 80.0f, 60.0f, 80.0f);
|
||||
particleEmitter_setPosition(this, arg1);
|
||||
func_802EFB70(this, 1.0f, 1.0f);
|
||||
func_802EFB84(this, 2.0f, 3.0f);
|
||||
particleEmitter_setSpawnIntervalRange(this, 0.0f, 0.01f);
|
||||
func_802EFEC0(this, 3.0f, 4.0f);
|
||||
particleEmitter_setParticleVelocityRange(this, -200.0f, 0.0f, -200.0f, 200.0f, 100.0f, 200.0f);
|
||||
}
|
||||
|
||||
void func_802F066C(ParticleEmitter *this, f32 arg1[3]){
|
||||
particleEmitter_setParticleAccelerationRange(this, 0.0f, -800.0f, 0.0f, 0.0f, -800.0f, 0.0f);
|
||||
func_802EF9F8(this, 0.6f);
|
||||
func_802EFA18(this, 3);
|
||||
particleEmitter_setModel(this, ASSET_896_MODEL_GOLD_ROCK);
|
||||
particleEmitter_setParticleSpawnPositionRange(this,
|
||||
-120.0f, -60.0f, -120.0f,
|
||||
120.0f, 60.0f, 120.0f
|
||||
);
|
||||
particleEmitter_setPosition(this, arg1);
|
||||
func_802EFB70(this, 0.2f, 0.3f);
|
||||
func_802EFE24(this,
|
||||
-300.0f, -300.0f, -300.0f,
|
||||
300.0f, 300.0f, 300.0f
|
||||
);
|
||||
particleEmitter_setSpawnIntervalRange(this, 0.0f, 0.01f);
|
||||
func_802EFEC0(this, 10.0f, 10.0f);
|
||||
particleEmitter_setParticleVelocityRange(this,
|
||||
-500.0f, 150.0f,
|
||||
-500.0f, 500.0f,
|
||||
400.0f, 500.0f
|
||||
);
|
||||
}
|
||||
|
||||
void func_802F07D8(void){
|
||||
D_803689B0 = (ParticleEmitter **) malloc(0);
|
||||
D_803689B4 = 0;
|
||||
}
|
||||
|
||||
void func_802F0804(void){
|
||||
int i;
|
||||
for(i = 0; i < D_803689B4; i++){
|
||||
func_802EF684(D_803689B0[i]);
|
||||
}
|
||||
free(D_803689B0);
|
||||
D_803689B0 = NULL;
|
||||
D_803689B4 = 0;
|
||||
}
|
||||
|
||||
void func_802F0898(void){
|
||||
return;
|
||||
}
|
||||
|
||||
void func_802F08A0(void){
|
||||
int i;
|
||||
ParticleEmitter *iPtr;
|
||||
|
||||
D_80380920 = MAX(0.0, D_80380920 - time_getDelta());
|
||||
if(D_803689B0){
|
||||
for(i = 0; i < D_803689B4; i++){
|
||||
iPtr = D_803689B0[i];
|
||||
particleEmitter_update(iPtr);
|
||||
if( iPtr->unk0_0
|
||||
&& iPtr->doneSpawning_0_23 == TRUE
|
||||
&& iPtr->pList_end_128 == iPtr->pList_start_124
|
||||
){
|
||||
iPtr->unk0_1 = TRUE;
|
||||
}
|
||||
else{
|
||||
iPtr->unk0_1 = FALSE;
|
||||
}
|
||||
}//L802F09C0
|
||||
for(i = 0; i < D_803689B4;){
|
||||
if(D_803689B0[i]->unk0_1){
|
||||
func_802F0C78(D_803689B0[i]);
|
||||
}
|
||||
else{
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}//L802F0A14
|
||||
}
|
||||
|
||||
void func_802F0A34(Gfx **gdl, Mtx **mptr, Vtx **vptr){
|
||||
int i;
|
||||
for(i = 0; i < D_803689B4; i++){
|
||||
func_802EEE3C(D_803689B0[i], gdl, mptr, vptr, 4);
|
||||
}
|
||||
}
|
||||
|
||||
void func_802F0AE8(Gfx **gdl, Mtx **mptr, Vtx **vptr){
|
||||
int i;
|
||||
for(i = 0; i < D_803689B4; i++){
|
||||
func_802EEE3C(D_803689B0[i], gdl, mptr, vptr, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void func_802F0B98(Gfx **gdl, Mtx **mptr, Vtx **vptr){
|
||||
func_802F0A34(gdl, mptr, vptr);
|
||||
func_802F0AE8(gdl, mptr, vptr);
|
||||
}
|
||||
|
||||
ParticleEmitter *partEmitList_pushNew(u32 cnt){
|
||||
D_803689B0 = realloc(D_803689B0, (++D_803689B4)*4);
|
||||
D_803689B0[D_803689B4 - 1] = particleEmitter_new(cnt);
|
||||
D_803689B0[D_803689B4 - 1]->unk0_0 = TRUE;
|
||||
return D_803689B0[D_803689B4 - 1];
|
||||
}
|
||||
|
||||
|
||||
void func_802F0C78(ParticleEmitter *this){
|
||||
int i = 0;
|
||||
while(this != D_803689B0[i] && i < D_803689B4){i++;}
|
||||
if(i == D_803689B4)
|
||||
return;
|
||||
|
||||
func_802EF684(this);
|
||||
D_803689B0[i] = D_803689B0[D_803689B4 - 1];
|
||||
D_803689B4--;
|
||||
D_803689B0 = realloc(D_803689B0, D_803689B4*sizeof(ParticleEmitter *));
|
||||
}
|
||||
|
||||
void func_802F0D54(ParticleEmitter *this){
|
||||
this->unk0_0 = FALSE;
|
||||
}
|
||||
|
||||
void func_802F0D64(ParticleEmitter *this){
|
||||
this->unk0_0 = TRUE;
|
||||
}
|
||||
|
||||
ParticleEmitter * func_802F0D74(ParticleEmitter *this){
|
||||
int i;
|
||||
s32 a3;
|
||||
|
||||
if(this){
|
||||
a3 = (s32)this;
|
||||
i = 0;
|
||||
while(D_803689B0[i] != this && i < D_803689B4){
|
||||
i++;
|
||||
}
|
||||
this = (ParticleEmitter *)defrag(this);
|
||||
this->pList_start_124 = (Particle *)((s32)this + (u32)((s32)this->pList_start_124 - a3));
|
||||
this->pList_end_128 = (Particle *)((s32)this + (u32)((s32)this->pList_end_128 - a3));
|
||||
this->pList_capacity_12C = (Particle *)((s32)this + (u32)((s32)this->pList_capacity_12C - a3));
|
||||
if(i < D_803689B4){
|
||||
D_803689B0[i] = this;
|
||||
}
|
||||
|
||||
}//L802F0E44
|
||||
return this;
|
||||
}
|
||||
|
||||
void func_802F0E58(void){
|
||||
D_803689B0 = (ParticleEmitter **)defrag(D_803689B0);
|
||||
}
|
||||
|
||||
void func_802F0E80(void* arg0, s32 arg1){
|
||||
D_80380924 = (arg1 == 2) ? 1 : 0;
|
||||
}
|
||||
|
||||
void func_802F0EAC(ParticleEmitter *this, f32 arg1){
|
||||
Particle *iPtr;
|
||||
this->postion_28[1] = arg1;
|
||||
for(iPtr = this->pList_start_124; iPtr < this->pList_end_128; iPtr++)
|
||||
iPtr->position_18[1] = arg1;
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,904 @@
|
|||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern int func_8024DB50(f32 (*)[3], f32);
|
||||
extern s32 spriteGetFrameCount(BKSprite *);
|
||||
extern void func_80344720(s32 SpriteGfx, s32 frame, s32, f32[3], f32[3], f32[3], Gfx **, Mtx **);
|
||||
extern void func_80344424(s32 SpriteGfx, s32 frame, s32, f32[3], f32[3], f32, Gfx **, Mtx **);
|
||||
|
||||
|
||||
void func_802EF9E4(ParticleEmitter *this, s32 arg1);
|
||||
void func_802EF9EC(ParticleEmitter *this, s32 arg1, s32 arg2);
|
||||
void func_802EFA04(ParticleEmitter *, f32);
|
||||
void particleEmitter_setParticleCallback(ParticleEmitter *this, void (*arg1)(ParticleEmitter *this, f32 pos[3]));
|
||||
void func_802EFA20(ParticleEmitter *, f32, f32);
|
||||
void func_802EFA34(ParticleEmitter *, f32);
|
||||
void func_802EFA40(ParticleEmitter *, f32 (*)[3]);
|
||||
void func_802EFA78(ParticleEmitter *this, s32 arg1);
|
||||
void func_802EFF5C(ParticleEmitter *, f32, f32, f32);
|
||||
void func_802EFF7C(ParticleEmitter *, f32, f32, f32);
|
||||
void func_802EFF9C(ParticleEmitter *, f32);
|
||||
void func_802F0C78(ParticleEmitter *this);
|
||||
|
||||
|
||||
extern s16 D_80368930[] = {0x700, 0x702, 0x70D};
|
||||
extern Gfx D_80368940[] = {
|
||||
gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH),
|
||||
gsSPSetGeometryMode(G_ZBUFFER | G_SHADE | G_TEXTURE_GEN_LINEAR | G_SHADING_SMOOTH),
|
||||
gsSPTexture(0x8000, 0x8000, 0, G_TX_RENDERTILE, G_ON),
|
||||
gsDPSetCombineMode(G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM),
|
||||
gsDPSetCycleType(G_CYC_1CYCLE),
|
||||
gsDPSetRenderMode(Z_CMP | IM_RD | CVG_DST_FULL | ZMODE_OPA | FORCE_BL | GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA), Z_CMP | IM_RD | CVG_DST_FULL | ZMODE_OPA | FORCE_BL | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)),
|
||||
gsSPEndDisplayList()
|
||||
};
|
||||
|
||||
extern Gfx D_80368978[] = {
|
||||
gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH),
|
||||
gsSPSetGeometryMode(G_SHADE | G_TEXTURE_GEN_LINEAR | G_SHADING_SMOOTH),
|
||||
gsSPTexture(0x8000, 0x8000, 0, G_TX_RENDERTILE, G_ON),
|
||||
gsDPSetCombineMode(G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM),
|
||||
gsDPSetCycleType(G_CYC_1CYCLE),
|
||||
gsDPSetRenderMode(G_RM_XLU_SURF, G_RM_XLU_SURF2),
|
||||
gsSPEndDisplayList()
|
||||
};
|
||||
|
||||
extern ParticleEmitter **D_803689B0; //particlePtrArrayPtr
|
||||
extern s32 D_803689B4; //particlePtrArraySize
|
||||
extern s32 D_803689B8[3];
|
||||
|
||||
extern f64 D_803771B0;
|
||||
extern f64 D_803771B8;
|
||||
extern f64 D_803771C0;
|
||||
extern f64 D_803771C8;
|
||||
|
||||
// 000F 0220: C0F86A0000000000 40F86A0000000000
|
||||
// 000F 0230: 40F86A0000000000 3F50624DD2F1A9FC
|
||||
// 000F 0240: 400921FB54524550 0000000000000000
|
||||
|
||||
/* .bss */
|
||||
f32 D_80380920;
|
||||
u8 D_80380924;
|
||||
|
||||
/* .code */
|
||||
void func_802EE930(ParticleEmitter *this){
|
||||
func_8033B388(&this->sprite_1C, &this->unk34);
|
||||
if(this->model_20)
|
||||
func_8033BD20(&this->model_20);
|
||||
}
|
||||
|
||||
int func_802EE974(ParticleEmitter *this, f32 (*arg1)[3], f32 (*arg2)[3], f32 (*arg3)[3], s32 arg4){
|
||||
if(-100000.0 == this->unk74 && 100000.0 == this->unk78){
|
||||
return func_80309B48(arg1, arg2, arg3, 0);
|
||||
}
|
||||
|
||||
if(100000.0 != this->unk78 && this->unk78 < (*arg2)[1]){
|
||||
(*arg2)[1] = this->unk78;
|
||||
(*arg3)[2] = 0.0f;
|
||||
(*arg3)[0] = 0.0f;
|
||||
(*arg3)[1] = -1.0f;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if(this->unk74 != -100000.0 && (*arg2)[1] < this->unk74){
|
||||
(*arg2)[1] = this->unk74;
|
||||
(*arg3)[2] = 0.0f;
|
||||
(*arg3)[0] = 0.0f;
|
||||
(*arg3)[1] = 1.0f;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __particleEmitter_initParticle(ParticleEmitter *this, Particle *particle){
|
||||
particle->unk0[0] = randf2(this->particleAccerationRange_4C_min_x, this->particleAccerationRange_4C_max_x);
|
||||
particle->unk0[1] = randf2(this->particleAccerationRange_4C_min_y, this->particleAccerationRange_4C_max_y);
|
||||
particle->unk0[2] = randf2(this->particleAccerationRange_4C_min_z, this->particleAccerationRange_4C_max_z);
|
||||
particle->unk5C = this->unk64;
|
||||
|
||||
particle->unkC = (0.0f == this->unk10) ? 1.0f : 0;
|
||||
particle->frame_10 = randf2((f32)this->particleStartingFrameRange_84_min, (f32)this->particleStartingFrameRange_84_max);
|
||||
particle->framerate_14 = randf2(this->particleFramerateRange_8C_min, this->particleFramerateRange_8C_max);
|
||||
|
||||
particle->position_18[0] = this->postion_28[0];
|
||||
particle->position_18[1] = this->postion_28[1];
|
||||
particle->position_18[2] = this->postion_28[2];
|
||||
|
||||
particle->position_18[0] = particle->position_18[0] + randf2(this->particleSpawnPositionRange_94_min_x, this->particleSpawnPositionRange_94_max_x);
|
||||
particle->position_18[1] = particle->position_18[1] + randf2(this->particleSpawnPositionRange_94_min_y, this->particleSpawnPositionRange_94_max_y);
|
||||
particle->position_18[2] = particle->position_18[2] + randf2(this->particleSpawnPositionRange_94_min_z, this->particleSpawnPositionRange_94_max_z);
|
||||
|
||||
particle->initialSize_34 = particle->size_30 = randf2(this->particleStartingScaleRange_AC_min, this->particleStartingScaleRange_AC_max);
|
||||
if(0.0f == this->particleFinalScaleRange_B4_min && 0.0f == this->particleFinalScaleRange_B4_max)
|
||||
particle->finalSizeDiff = 0.0f;
|
||||
else
|
||||
particle->finalSizeDiff = randf2(this->particleFinalScaleRange_B4_min, this->particleFinalScaleRange_B4_max)- particle->initialSize_34;
|
||||
|
||||
particle->unk24[2] = 0.0f;
|
||||
particle->unk24[1] = 0.0f;
|
||||
particle->unk24[0] = 0.0f;
|
||||
|
||||
particle->unk3C[0] = randf2(this->unkBC[0], this->unkC8[0]);
|
||||
particle->unk3C[1] = randf2(this->unkBC[1], this->unkC8[1]);
|
||||
particle->unk3C[2] = randf2(this->unkBC[2], this->unkC8[2]);
|
||||
|
||||
particle->age_48 = 0.0f;
|
||||
particle->lifetime_4C = randf2(this->unkDC[0], this->unkDC[1]) + 0.001;
|
||||
if(!this->sphericalParticleVelocity_48){
|
||||
particle->velocity_50[0] = randf2(this->particleVelocityRange_E4.cartisian_min_x, this->particleVelocityRange_E4.cartisian_max_x);
|
||||
particle->velocity_50[1] = randf2(this->particleVelocityRange_E4.cartisian_min_y, this->particleVelocityRange_E4.cartisian_max_y);
|
||||
particle->velocity_50[2] = randf2(this->particleVelocityRange_E4.cartisian_min_z, this->particleVelocityRange_E4.cartisian_max_z);
|
||||
}
|
||||
else{
|
||||
func_80256E24(particle->velocity_50,
|
||||
mlNormalizeAngle(randf2(this->particleVelocityRange_E4.spherical.pitch_min, this->particleVelocityRange_E4.spherical.pitch_max)),
|
||||
mlNormalizeAngle(randf2(this->particleVelocityRange_E4.spherical.yaw_min, this->particleVelocityRange_E4.spherical.yaw_max)),
|
||||
0.0f,
|
||||
0.0f,
|
||||
randf2(this->particleVelocityRange_E4.spherical.radius_min, this->particleVelocityRange_E4.spherical.radius_max)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
void func_802EED1C(ParticleEmitter *this, f32 arg1, f32 arg2[3]){
|
||||
int i;
|
||||
f32 tmp_f22;
|
||||
f32 tmp_f0;
|
||||
|
||||
tmp_f22 = this->unk108*0.5;
|
||||
for(i = 0; i < 3; i++){
|
||||
if(this->unk118[i] != 0.0f){
|
||||
tmp_f0 = func_802588B0(this->unk10C[i] + arg1, this->unk108);
|
||||
tmp_f0 = mlAbsF(tmp_f0 - tmp_f22);
|
||||
tmp_f0 = ml_map_f(tmp_f0, 0.0f, tmp_f22, 1.0 - this->unk118[i], this->unk118[i] + 1.0);
|
||||
arg2[i] *= tmp_f0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef NONMATCHING
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_679A0/func_802EEE3C.s")
|
||||
#else
|
||||
void func_802EEE3C(ParticleEmitter *this, Gfx **gfx, Mtx **mtx, Vtx **vtx, s32 arg4){
|
||||
f32 sp8C[3];
|
||||
f32 sp80[3];
|
||||
f32 sp74[3];
|
||||
Particle *iPtr;
|
||||
s32 tmp_a0;
|
||||
s32 tmp_a1;
|
||||
s32 tmp_a2;
|
||||
s32 tmp_a3;
|
||||
|
||||
if(arg4 != (this->unk18 & 0x4))
|
||||
return;
|
||||
|
||||
if(this->model_20 != NULL){
|
||||
for(iPtr = this->pList_start_124; iPtr < this->pList_end_128; iPtr++){
|
||||
sp8C[0] = iPtr->position_18[0] + this->unk4[0];
|
||||
sp8C[1] = iPtr->position_18[1] + this->unk4[1];
|
||||
sp8C[2] = iPtr->position_18[2] + this->unk4[2];
|
||||
if( 0.0f != this->unk10 || 1.0 != this->unk14 || this->unk49 != 0xff ){
|
||||
func_8033A410((s32) (iPtr->unkC*this->unk49));
|
||||
}//L802EEF5C
|
||||
tmp_a3 = (this->unk18 & 0x10)?0:1;
|
||||
set_model_render_mode(tmp_a3);
|
||||
func_803391A4(gfx, mtx, sp8C, iPtr->unk24, iPtr->size_30, NULL, this->model_20);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(this->unk34){//L802EEFC4
|
||||
if( this->unk3C[0] != 0xff
|
||||
|| this->unk3C[1] != 0xff
|
||||
|| this->unk3C[2] != 0xff
|
||||
|| this->unk49 != 0xff
|
||||
){
|
||||
tmp_a3 = (this->unk18 & 0x10)? 9: 0xf;
|
||||
func_803382E4(tmp_a3);
|
||||
func_80338338(this->unk3C[0], this->unk3C[1], this->unk3C[2]);
|
||||
tmp_a0 = (this->unk3C[0] < 8)? 0 : this->unk3C[0] - 8;
|
||||
tmp_a1 = (this->unk3C[1] < 8)? 0 : this->unk3C[1] - 8;
|
||||
tmp_a2 = (this->unk3C[2] < 8)? 0 : this->unk3C[2] - 8;
|
||||
tmp_a3 = (this->unk18 & 0x20)? 0xff : this->unk49;
|
||||
func_803382B4(tmp_a0, tmp_a1, tmp_a2, tmp_a3);
|
||||
func_80338370();
|
||||
func_80335D30(gfx);
|
||||
}
|
||||
else if(this->unk18 & 0x10){//L802EF0C0
|
||||
gSPDisplayList((*gfx)++, D_80368978);
|
||||
}
|
||||
else{//L802EF0EC
|
||||
gSPDisplayList((*gfx)++, D_80368940);
|
||||
}//L802EF10C
|
||||
sp80[0] = 90.0f;
|
||||
sp80[1] = 0.0f;
|
||||
sp80[2] = 0.0f;
|
||||
for(iPtr = this->pList_start_124; iPtr < this->pList_end_128; iPtr++){
|
||||
gDPSetPrimColor((*gfx)++, 0, 0, this->unk3C[0], this->unk3C[1], this->unk3C[2], iPtr->unkC*this->unk49);
|
||||
sp8C[0] = iPtr->position_18[0] + this->unk4[0];
|
||||
sp8C[1] = iPtr->position_18[1] + this->unk4[1];
|
||||
sp8C[2] = iPtr->position_18[2] + this->unk4[2];
|
||||
|
||||
sp74[0] = iPtr->size_30;
|
||||
sp74[1] = iPtr->size_30;
|
||||
sp74[2] = iPtr->size_30;
|
||||
if(0.0f != this->unk108){
|
||||
func_802EED1C(this, iPtr->age_48, sp74);
|
||||
}
|
||||
func_80344C2C(this->unk0_16);
|
||||
if(this->unk18 & 1){
|
||||
func_80344720(this->unk34, (s32)iPtr->frame_10, 0, sp8C, sp80, sp74, gfx, mtx);
|
||||
}//L802EF2F8
|
||||
else{
|
||||
func_80344424(this->unk34, (s32)iPtr->frame_10, 0, sp8C, sp74, iPtr->unk24[2], gfx, mtx);
|
||||
}//L802EF324
|
||||
}//L802EF338
|
||||
if( this->unk3C[0] != 0xff
|
||||
|| this->unk3C[1] != 0xff
|
||||
|| this->unk3C[2] != 0xff
|
||||
|| this->unk49 != 0xff
|
||||
){
|
||||
func_8033687C(gfx);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void func_802EF3A8(ParticleEmitter *this, Gfx **gdl, Mtx **mPtr, Vtx **vPtr){
|
||||
func_802EEE3C(this, gdl, mPtr, vPtr, 4);
|
||||
func_802EEE3C(this, gdl, mPtr, vPtr, 0);
|
||||
}
|
||||
|
||||
void func_802EF3F4(ParticleEmitter *this, f32 position_min[3], f32 position_max[3], s32 count){
|
||||
for(count; count > 0; count--){
|
||||
if(this->pList_end_128 < this->pList_capacity_12C){
|
||||
__particleEmitter_initParticle(this, this->pList_end_128);
|
||||
this->pList_end_128->position_18[0] = randf2(position_min[0], position_max[0]);
|
||||
this->pList_end_128->position_18[1] = randf2(position_min[1], position_max[1]);
|
||||
this->pList_end_128->position_18[2] = randf2(position_min[2], position_max[2]);
|
||||
this->pList_end_128++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef NONMATCHING
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_679A0/func_802EF4AC.s")
|
||||
#else
|
||||
void func_802EF4AC(ParticleEmitter *this, f32 arg1[3], f32 arg2[3], s32 arg3) {
|
||||
f32 sp3C[3];
|
||||
f32 temp_f0;
|
||||
s32 temp_s4;
|
||||
s32 i;
|
||||
|
||||
// temp_s4 = arg3 - 1;
|
||||
sp3C[0] = arg2[0] - arg1[0];
|
||||
sp3C[1] = arg2[1] - arg1[1];
|
||||
sp3C[2] = arg2[2] - arg1[2];
|
||||
for(i = 0; i < arg3 - 1; i++){
|
||||
if (this->pList_end_128 < this->pList_capacity_12C) {
|
||||
__particleEmitter_initParticle(this, this->pList_end_128);
|
||||
temp_f0 = (f32)i / arg3;
|
||||
this->pList_end_128->position_18[0] = arg1[0] + sp3C[0]*temp_f0;
|
||||
this->pList_end_128->position_18[1] = arg1[1] + sp3C[1]*temp_f0;
|
||||
this->pList_end_128->position_18[2] = arg1[2] + sp3C[2]*temp_f0;
|
||||
this->pList_end_128++;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
//particleEmitter_emitN
|
||||
void particleEmitter_emitN(ParticleEmitter *this, int n){
|
||||
for(n; n > 0; n--){
|
||||
if(this->pList_end_128 < this->pList_capacity_12C){
|
||||
__particleEmitter_initParticle(this, this->pList_end_128++);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//particleEmitter_particleListLength
|
||||
int func_802EF628(ParticleEmitter *this){
|
||||
return (u32)(this->pList_end_128 - this->pList_start_124);
|
||||
}
|
||||
|
||||
//particleEmitter_isDone
|
||||
int func_802EF648(ParticleEmitter *this){
|
||||
return (u32)(this->pList_end_128 - this->pList_start_124) < 1
|
||||
&& this->doneSpawning_0_23 == 1;
|
||||
}
|
||||
|
||||
//particleEmitter_free
|
||||
void func_802EF684(ParticleEmitter *this){
|
||||
func_802EE930(this);
|
||||
free(this);
|
||||
}
|
||||
|
||||
ParticleEmitter * particleEmitter_new(u32 capacity){
|
||||
ParticleEmitter *this = malloc(capacity*sizeof(Particle) + sizeof(ParticleEmitter));
|
||||
f32 sp40[3];
|
||||
|
||||
this->unk0_0 = 0;
|
||||
this->doneSpawning_0_23 = 1;
|
||||
this->unk18 = 0;
|
||||
this->sprite_1C = NULL;
|
||||
this->unk0_16 = 0;
|
||||
this->model_20 = NULL;
|
||||
this->unk34 = 0;
|
||||
this->assetId_0_15 = 0;
|
||||
this->unk3C[0] = 0xff;
|
||||
this->unk3C[1] = 0xff;
|
||||
this->unk3C[2] = 0xff;
|
||||
this->particleSpawnTimer_24 = 0.0f;
|
||||
this->spawnIntervalTimer_38 = 0.0f;
|
||||
sp40[0] = sp40[1] = sp40[2] = 0.0f;
|
||||
|
||||
func_802EFA40(this, &sp40);
|
||||
func_802EFA5C(this, 0.0f, 1.0f);
|
||||
func_802EFA70(this, 0);
|
||||
particleEmitter_setPosition(this, sp40);
|
||||
particleEmitter_setParticleAccelerationRange(this, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
func_802EF9E4(this, 0xff);
|
||||
particleEmitter_setParticleSpawnPositionRange(this, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
particleEmitter_setParticleVelocityRange(this, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
func_802EF9EC(this, 0, 0);
|
||||
func_802EF9F8(this, 0.9f);
|
||||
func_802EFA04(this, -100000.0f);
|
||||
func_802EFA34(this, 100000.0f);
|
||||
particleEmitter_setParticleCallback(this, 0);
|
||||
func_802EFA18(this, 0);
|
||||
func_802EFA20(this, 1.0f, 1.0f);
|
||||
particleEmitter_setStartingFrameRange(this, 0, 0);
|
||||
particleEmitter_setParticleFramerateRange(this, 0.0f, 0.0f);
|
||||
func_802EFB70(this, 1.0f, 1.0f);
|
||||
func_802EFB84(this, 0.0f, 0.0f);
|
||||
func_802EFE24(this, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
particleEmitter_setSpawnIntervalRange(this, 0.0f, 5.0f);
|
||||
func_802EFEC0(this, 0.0f, 5.0f);
|
||||
func_802EFF5C(this, 0.0f, 0.0f, 0.0f);
|
||||
func_802EFF7C(this, 0.0f, 0.0f, 0.0f);
|
||||
func_802EFF9C(this, 0.0f);
|
||||
func_802EFF50(this, 0.0f);
|
||||
this->unk100 = 0;
|
||||
this->unk104 = 0;
|
||||
this->pList_start_124 = &this->data[0];
|
||||
this->pList_end_128 = &this->data[0];
|
||||
this->pList_capacity_12C = &this->pList_start_124[capacity];
|
||||
return this;
|
||||
}
|
||||
|
||||
void particleEmitter_setSprite(ParticleEmitter *this, enum asset_e sprite_id){
|
||||
if(sprite_id != this->assetId_0_15){
|
||||
this->assetId_0_15 = sprite_id;
|
||||
func_802EE930(this);
|
||||
this->sprite_1C = func_8033B6C4(sprite_id, &this->unk34);
|
||||
}
|
||||
}
|
||||
|
||||
void particleEmitter_setParticleAccelerationRange(ParticleEmitter *this, f32 min_x, f32 min_y, f32 min_z, f32 max_x, f32 max_y, f32 max_z){
|
||||
this->particleAccerationRange_4C_min_x = min_x;
|
||||
this->particleAccerationRange_4C_min_y = min_y;
|
||||
this->particleAccerationRange_4C_min_z = min_z;
|
||||
this->particleAccerationRange_4C_max_x = max_x;
|
||||
this->particleAccerationRange_4C_max_y = max_y;
|
||||
this->particleAccerationRange_4C_max_z = max_z;
|
||||
}
|
||||
|
||||
void func_802EF9E4(ParticleEmitter *this, s32 arg1){
|
||||
this->unk49 = arg1;
|
||||
}
|
||||
|
||||
void func_802EF9EC(ParticleEmitter *this, s32 arg1, s32 arg2){
|
||||
this->unk66 = arg1;
|
||||
this->unk7C = arg2;
|
||||
}
|
||||
|
||||
void func_802EF9F8(ParticleEmitter *this, f32 arg1){
|
||||
this->unk68 = arg1;
|
||||
}
|
||||
|
||||
void func_802EFA04(ParticleEmitter *this, f32 arg1){
|
||||
this->unk74 = arg1;
|
||||
}
|
||||
|
||||
void particleEmitter_setParticleCallback(ParticleEmitter *this, void (*arg1)(ParticleEmitter *this, f32 pos[3])){
|
||||
this->particleCallback_80 = arg1;
|
||||
}
|
||||
|
||||
void func_802EFA18(ParticleEmitter *this, s32 arg1){
|
||||
this->unk64 = arg1;
|
||||
}
|
||||
|
||||
void func_802EFA20(ParticleEmitter *this, f32 arg1, f32 arg2){
|
||||
this->unk6C = arg1;
|
||||
this->unk70 = arg2;
|
||||
}
|
||||
|
||||
void func_802EFA34(ParticleEmitter *this, f32 arg1){
|
||||
this->unk78 = arg1;
|
||||
}
|
||||
|
||||
void func_802EFA40(ParticleEmitter *this, f32 (*arg1)[3]){
|
||||
this->unk4[0] = (*arg1)[0];
|
||||
this->unk4[1] = (*arg1)[1];
|
||||
this->unk4[2] = (*arg1)[2];
|
||||
}
|
||||
|
||||
void func_802EFA5C(ParticleEmitter *this, f32 arg1, f32 arg2){
|
||||
this->unk10 = arg1;
|
||||
this->unk14 = arg2;
|
||||
}
|
||||
|
||||
void func_802EFA70(ParticleEmitter *this, s32 arg1){
|
||||
this->unk18 = arg1;
|
||||
}
|
||||
|
||||
void func_802EFA78(ParticleEmitter *this, s32 arg1){
|
||||
this->unk0_16 = arg1;
|
||||
}
|
||||
|
||||
void particleEmitter_setStartingFrameRange(ParticleEmitter *this, s32 arg1, s32 arg2){
|
||||
this->particleStartingFrameRange_84_min = arg1;
|
||||
this->particleStartingFrameRange_84_max = arg2;
|
||||
}
|
||||
|
||||
void particleEmitter_setParticleFramerateRange(ParticleEmitter *this, f32 arg1, f32 arg2){
|
||||
this->particleFramerateRange_8C_min = arg1;
|
||||
this->particleFramerateRange_8C_max = arg2;
|
||||
}
|
||||
|
||||
void func_802EFAB0(ParticleEmitter *this, s32 arg1, f32 arg2){
|
||||
this->unk100 = arg1;
|
||||
this->unk104 = (s16) arg2;
|
||||
}
|
||||
|
||||
//
|
||||
void particleEmitter_setModel(ParticleEmitter *this, enum asset_e model_id){
|
||||
if(this->assetId_0_15 != model_id){
|
||||
this->assetId_0_15 = model_id;
|
||||
func_802EE930(this);
|
||||
this->model_20 = assetcache_get(model_id);
|
||||
}
|
||||
}
|
||||
|
||||
void particleEmitter_setParticleSpawnPositionRange(ParticleEmitter *this, f32 min_x, f32 min_y, f32 min_z, f32 max_x, f32 max_y, f32 max_z){
|
||||
this->particleSpawnPositionRange_94_min_x = min_x;
|
||||
this->particleSpawnPositionRange_94_min_y = min_y;
|
||||
this->particleSpawnPositionRange_94_min_z = min_z;
|
||||
this->particleSpawnPositionRange_94_max_x = max_x;
|
||||
this->particleSpawnPositionRange_94_max_y = max_y;
|
||||
this->particleSpawnPositionRange_94_max_z = max_z;
|
||||
}
|
||||
|
||||
void particleEmitter_setPosition(ParticleEmitter * this, f32 position[3]){
|
||||
this->postion_28[0] = position[0];
|
||||
this->postion_28[1] = position[1];
|
||||
this->postion_28[2] = position[2];
|
||||
}
|
||||
|
||||
void func_802EFB70(ParticleEmitter * this, f32 min, f32 max){
|
||||
this->particleStartingScaleRange_AC_min = min;
|
||||
this->particleStartingScaleRange_AC_max = max;
|
||||
}
|
||||
|
||||
void func_802EFB84(ParticleEmitter * this, f32 min, f32 max){
|
||||
this->particleFinalScaleRange_B4_min = min;
|
||||
this->particleFinalScaleRange_B4_max = max;
|
||||
}
|
||||
|
||||
void func_802EFB98(ParticleEmitter *this, struct31s *arg1){
|
||||
this->particleStartingScaleRange_AC_min = arg1->unk0[0];
|
||||
this->particleStartingScaleRange_AC_max = arg1->unk0[1];
|
||||
if(-1.0f != arg1->unk8[0]){
|
||||
this->particleFinalScaleRange_B4_min = arg1->unk8[0];
|
||||
this->particleFinalScaleRange_B4_max = arg1->unk8[1];
|
||||
}
|
||||
particleEmitter_setSpawnIntervalRange(this, arg1->unk10[0], arg1->unk10[1]);
|
||||
this->unkDC[0] = arg1->unk18[0];
|
||||
this->unkDC[1] = arg1->unk18[1];
|
||||
this->unk10 = arg1->unk20;
|
||||
this->unk14 = arg1->unk24;
|
||||
}
|
||||
|
||||
void func_802EFC28(ParticleEmitter *this, struct40s *arg1){
|
||||
func_802EFB98(this, &arg1->unk0);
|
||||
func_802EFA70(this, (s32)arg1->unk28);
|
||||
particleEmitter_emitN(this, (s32)arg1->unk2C);
|
||||
}
|
||||
|
||||
void particleEmitter_setVelocityAndAccelerationRanges(ParticleEmitter *this, struct41s *arg1){
|
||||
particleEmitter_setParticleVelocityRange(this,
|
||||
arg1->unk0.unk0[0], arg1->unk0.unk0[1], arg1->unk0.unk0[2],
|
||||
arg1->unk0.unkC[0], arg1->unk0.unkC[1], arg1->unk0.unkC[2]
|
||||
);
|
||||
particleEmitter_setParticleAccelerationRange(this,
|
||||
arg1->unk18.unk0[0], arg1->unk18.unk0[1], arg1->unk18.unk0[2],
|
||||
arg1->unk18.unkC[0], arg1->unk18.unkC[1], arg1->unk18.unkC[2]
|
||||
);
|
||||
}
|
||||
|
||||
void particleEmitter_setPositionAndVelocityRanges(ParticleEmitter *this, struct42s *arg1){
|
||||
particleEmitter_setParticleVelocityRange(this,
|
||||
arg1->unk0.unk0[0], arg1->unk0.unk0[1], arg1->unk0.unk0[2],
|
||||
arg1->unk0.unkC[0], arg1->unk0.unkC[1], arg1->unk0.unkC[2]
|
||||
);
|
||||
|
||||
particleEmitter_setParticleSpawnPositionRange( this,
|
||||
arg1->unk18.unk0[0], arg1->unk18.unk0[1], arg1->unk18.unk0[2],
|
||||
arg1->unk18.unkC[0], arg1->unk18.unkC[1], arg1->unk18.unkC[2]
|
||||
);
|
||||
}
|
||||
|
||||
void particleEmitter_setPositionVelocityAndAccelerationRanges(ParticleEmitter *this, struct43s* arg1){
|
||||
particleEmitter_setParticleVelocityRange(this,
|
||||
arg1->unk0.unk0[0], arg1->unk0.unk0[1], arg1->unk0.unk0[2],
|
||||
arg1->unk0.unkC[0], arg1->unk0.unkC[1], arg1->unk0.unkC[2]
|
||||
);
|
||||
particleEmitter_setParticleAccelerationRange(this,
|
||||
arg1->unk18.unk0[0], arg1->unk18.unk0[1], arg1->unk18.unk0[2],
|
||||
arg1->unk18.unkC[0], arg1->unk18.unkC[1], arg1->unk18.unkC[2]
|
||||
);
|
||||
particleEmitter_setParticleSpawnPositionRange( this,
|
||||
arg1->unk30.unk0[0], arg1->unk30.unk0[1], arg1->unk30.unk0[2],
|
||||
arg1->unk30.unkC[0], arg1->unk30.unkC[1], arg1->unk30.unkC[2]
|
||||
);
|
||||
}
|
||||
|
||||
void func_802EFE24(ParticleEmitter *this, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6){
|
||||
this->unkBC[0] = arg1;
|
||||
this->unkBC[1] = arg2;
|
||||
this->unkBC[2] = arg3;
|
||||
this->unkC8[0] = arg4;
|
||||
this->unkC8[1] = arg5;
|
||||
this->unkC8[2] = arg6;
|
||||
}
|
||||
|
||||
void particleEmitter_setSpawnIntervalRange(ParticleEmitter *this, f32 min, f32 max){
|
||||
this->spawnIntervalRange_D4_min = min;
|
||||
this->spawnIntervalRange_D4_max = max;
|
||||
if(0.0f == this->particleSpawnTimer_24 || max < this->particleSpawnTimer_24)
|
||||
this->particleSpawnTimer_24 = randf2(this->spawnIntervalRange_D4_min, this->spawnIntervalRange_D4_max);
|
||||
}
|
||||
|
||||
void func_802EFEC0(ParticleEmitter *this, f32 arg1, f32 arg2){
|
||||
this->unkDC[0] = arg1;
|
||||
this->unkDC[1] = arg2;
|
||||
}
|
||||
|
||||
void particleEmitter_setParticleVelocityRange(ParticleEmitter *this, f32 x_min, f32 x_max, f32 y_min, f32 y_max, f32 z_min, f32 z_max){
|
||||
this->sphericalParticleVelocity_48 = FALSE;
|
||||
this->particleVelocityRange_E4.cartisian_min_x = x_min;
|
||||
this->particleVelocityRange_E4.cartisian_min_y = x_max;
|
||||
this->particleVelocityRange_E4.cartisian_min_z = y_min;
|
||||
this->particleVelocityRange_E4.cartisian_max_x = y_max;
|
||||
this->particleVelocityRange_E4.cartisian_max_y = z_min;
|
||||
this->particleVelocityRange_E4.cartisian_max_z = z_max;
|
||||
}
|
||||
|
||||
void particleEmitter_setSphericalParticleVelocityRange(ParticleEmitter *this, f32 pitch_min, f32 yaw_min, f32 radial_min, f32 pitch_max, f32 yaw_max, f32 radial_max){
|
||||
this->sphericalParticleVelocity_48 = TRUE;
|
||||
this->particleVelocityRange_E4.spherical.yaw_min = yaw_min;
|
||||
this->particleVelocityRange_E4.spherical.yaw_max = yaw_max;
|
||||
this->particleVelocityRange_E4.spherical.pitch_min = pitch_min;
|
||||
this->particleVelocityRange_E4.spherical.pitch_max = pitch_max;
|
||||
this->particleVelocityRange_E4.spherical.radius_min = radial_min;
|
||||
this->particleVelocityRange_E4.spherical.radius_max = radial_max;
|
||||
}
|
||||
|
||||
void func_802EFF50(ParticleEmitter *this, f32 arg1){
|
||||
this->unkFC = arg1;
|
||||
}
|
||||
|
||||
void func_802EFF5C(ParticleEmitter *this, f32 arg1, f32 arg2, f32 arg3){
|
||||
this->unk118[0] = arg1;
|
||||
this->unk118[1] = arg2;
|
||||
this->unk118[2] = arg3;
|
||||
}
|
||||
|
||||
void func_802EFF7C(ParticleEmitter *this, f32 arg1, f32 arg2, f32 arg3){
|
||||
this->unk10C[0] = arg1;
|
||||
this->unk10C[1] = arg2;
|
||||
this->unk10C[2] = arg3;
|
||||
}
|
||||
|
||||
void func_802EFF9C(ParticleEmitter *this, f32 arg1){
|
||||
this->unk108 = arg1;
|
||||
}
|
||||
|
||||
void func_802EFFA8(ParticleEmitter *this, s32 arg1[3]){
|
||||
this->unk3C[0] = arg1[0];
|
||||
this->unk3C[1] = arg1[1];
|
||||
this->unk3C[2] = arg1[2];
|
||||
}
|
||||
|
||||
void particleEmitter_setSpawnInterval(ParticleEmitter *this, f32 arg1){
|
||||
this->doneSpawning_0_23 = FALSE;
|
||||
this->spawnIntervalTimer_38 = arg1;
|
||||
}
|
||||
|
||||
void func_802EFFDC(ParticleEmitter *this){
|
||||
return;
|
||||
}
|
||||
|
||||
void particleEmitter_update(ParticleEmitter *this){
|
||||
Particle *iPtr;
|
||||
f32 tick = time_getDelta();
|
||||
f32 temp_f0;
|
||||
f32 sp78[3];
|
||||
f32 sp6C[3];
|
||||
f32 sp68;
|
||||
|
||||
if(D_80380924){
|
||||
for(iPtr = this->pList_start_124; iPtr < this->pList_end_128;){//L802F005C
|
||||
iPtr->age_48 += tick;
|
||||
if(iPtr->lifetime_4C <= iPtr->age_48){
|
||||
memcpy(iPtr, --this->pList_end_128, sizeof(Particle));
|
||||
}else{//L802F00A0
|
||||
temp_f0 = iPtr->age_48/iPtr->lifetime_4C;
|
||||
if(temp_f0 < this->unk10)
|
||||
iPtr->unkC = temp_f0/this->unk10;
|
||||
else if(temp_f0 <= this->unk14)
|
||||
iPtr->unkC = 1.0f;
|
||||
else{
|
||||
iPtr->unkC = 1.0f - ((temp_f0 - this->unk14)/(1.0f - this->unk14));
|
||||
}//L802F00F0
|
||||
iPtr->size_30 = iPtr->initialSize_34 + temp_f0*iPtr->finalSizeDiff;
|
||||
|
||||
if(this->sprite_1C){
|
||||
iPtr->frame_10 += iPtr->framerate_14*tick;
|
||||
if(!((s32)iPtr->frame_10 < spriteGetFrameCount(this->sprite_1C))){
|
||||
if(this->unk18 & 8){
|
||||
iPtr->frame_10 = spriteGetFrameCount(this->sprite_1C) - 1;
|
||||
}else{
|
||||
iPtr->frame_10 = 0.0f;
|
||||
}
|
||||
}
|
||||
}//L802F0180
|
||||
|
||||
iPtr->position_18[0] += iPtr->velocity_50[0]*tick;
|
||||
iPtr->position_18[1] += iPtr->velocity_50[1]*tick;
|
||||
iPtr->position_18[2] += iPtr->velocity_50[2]*tick;
|
||||
|
||||
iPtr->unk24[0] += iPtr->unk3C[0]*tick;
|
||||
iPtr->unk24[1] += iPtr->unk3C[1]*tick;
|
||||
iPtr->unk24[2] += iPtr->unk3C[2]*tick;
|
||||
|
||||
iPtr->velocity_50[0] = iPtr->velocity_50[0] + iPtr->unk0[0]*tick;
|
||||
iPtr->velocity_50[1] = iPtr->velocity_50[1] + iPtr->unk0[1]*tick;
|
||||
iPtr->velocity_50[2] = iPtr->velocity_50[2] + iPtr->unk0[2]*tick;
|
||||
|
||||
if(this->unk100){
|
||||
iPtr->position_18[1] = func_8034E698(this->unk100) + this->unk104;
|
||||
}//L802F0254
|
||||
|
||||
if( 0.0f != this->unkFC
|
||||
&& !func_8024DB50(&iPtr->position_18, this->unkFC)
|
||||
){
|
||||
memcpy(iPtr, --this->pList_end_128, sizeof(Particle));
|
||||
}
|
||||
else{//L802F029C
|
||||
if(iPtr->unk5C > 0){
|
||||
sp6C[0] = iPtr->position_18[0];
|
||||
sp6C[1] = iPtr->position_18[1] + 50.0f;
|
||||
sp6C[2] = iPtr->position_18[2];
|
||||
if(func_802EE974(this, &sp6C, &iPtr->position_18, &sp78, 0)){
|
||||
if(this->unk66){
|
||||
sp68 = mlAbsF(iPtr->velocity_50[1])/10.0;
|
||||
if(1.0f < sp68){
|
||||
sp68 = 1.0f;
|
||||
}//L802F0324
|
||||
if(D_80380920 == 0.0f){
|
||||
func_8030E6A4(this->unk66, randf2(this->unk6C, this->unk70), (s32)((f32)this->unk7C*sp68));
|
||||
D_80380920 = 0.25f;
|
||||
}
|
||||
}//L802F0384
|
||||
iPtr->position_18[1] += 2.0f;
|
||||
iPtr->velocity_50[1] = mlAbsF(iPtr->velocity_50[1]) * this->unk68;
|
||||
if((this->unk18 & 0x2) == 0){
|
||||
iPtr->initialSize_34 *= this->unk68;
|
||||
iPtr->finalSizeDiff *= this->unk68;
|
||||
}//L802F03DC
|
||||
|
||||
iPtr->unk3C[0] *= this->unk68;
|
||||
iPtr->unk3C[1] *= this->unk68;
|
||||
iPtr->unk3C[2] *= this->unk68;
|
||||
if(--iPtr->unk5C == 0){
|
||||
if(this->particleCallback_80)
|
||||
this->particleCallback_80(this, iPtr->position_18);
|
||||
memcpy(iPtr, --this->pList_end_128, sizeof(Particle));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
iPtr++;
|
||||
}
|
||||
}//L802F045C
|
||||
}//L802F0468
|
||||
if(0.0f < this->spawnIntervalTimer_38){ //if exactly 0.0f (no update)
|
||||
this->spawnIntervalTimer_38 -= tick;
|
||||
if(this->spawnIntervalTimer_38 <= 0.0f) //only can stop spawning
|
||||
this->doneSpawning_0_23 = TRUE;
|
||||
}
|
||||
|
||||
if(this->doneSpawning_0_23 != TRUE){
|
||||
this->particleSpawnTimer_24 -= tick;
|
||||
if(this->particleSpawnTimer_24 <= 0.0f){
|
||||
this->particleSpawnTimer_24 = randf2(this->spawnIntervalRange_D4_min, this->spawnIntervalRange_D4_max);
|
||||
if(this->pList_end_128 < this->pList_capacity_12C)
|
||||
__particleEmitter_initParticle(this, this->pList_end_128++);
|
||||
}
|
||||
}
|
||||
}//L802F0514
|
||||
}
|
||||
|
||||
void func_802F053C(ParticleEmitter *this, f32 arg1[3]){
|
||||
particleEmitter_setSprite(this, ASSET_70E_SPRITE_SMOKE_2);
|
||||
func_802EFFA8(this, D_803689B8);
|
||||
func_802EFA5C(this, 0.0f, 0.1f);
|
||||
particleEmitter_setStartingFrameRange(this, 0, 7);
|
||||
particleEmitter_setParticleSpawnPositionRange(this, -80.0f, 0.0f, -80.0f, 80.0f, 60.0f, 80.0f);
|
||||
particleEmitter_setPosition(this, arg1);
|
||||
func_802EFB70(this, 1.0f, 1.0f);
|
||||
func_802EFB84(this, 2.0f, 3.0f);
|
||||
particleEmitter_setSpawnIntervalRange(this, 0.0f, 0.01f);
|
||||
func_802EFEC0(this, 3.0f, 4.0f);
|
||||
particleEmitter_setParticleVelocityRange(this, -200.0f, 0.0f, -200.0f, 200.0f, 100.0f, 200.0f);
|
||||
}
|
||||
|
||||
void func_802F066C(ParticleEmitter *this, f32 arg1[3]){
|
||||
particleEmitter_setParticleAccelerationRange(this, 0.0f, -800.0f, 0.0f, 0.0f, -800.0f, 0.0f);
|
||||
func_802EF9F8(this, 0.6f);
|
||||
func_802EFA18(this, 3);
|
||||
particleEmitter_setModel(this, ASSET_896_MODEL_GOLD_ROCK);
|
||||
particleEmitter_setParticleSpawnPositionRange(this,
|
||||
-120.0f, -60.0f, -120.0f,
|
||||
120.0f, 60.0f, 120.0f
|
||||
);
|
||||
particleEmitter_setPosition(this, arg1);
|
||||
func_802EFB70(this, 0.2f, 0.3f);
|
||||
func_802EFE24(this,
|
||||
-300.0f, -300.0f, -300.0f,
|
||||
300.0f, 300.0f, 300.0f
|
||||
);
|
||||
particleEmitter_setSpawnIntervalRange(this, 0.0f, 0.01f);
|
||||
func_802EFEC0(this, 10.0f, 10.0f);
|
||||
particleEmitter_setParticleVelocityRange(this,
|
||||
-500.0f, 150.0f,
|
||||
-500.0f, 500.0f,
|
||||
400.0f, 500.0f
|
||||
);
|
||||
}
|
||||
|
||||
void func_802F07D8(void){
|
||||
D_803689B0 = (ParticleEmitter **) malloc(0);
|
||||
D_803689B4 = 0;
|
||||
}
|
||||
|
||||
void func_802F0804(void){
|
||||
int i;
|
||||
for(i = 0; i < D_803689B4; i++){
|
||||
func_802EF684(D_803689B0[i]);
|
||||
}
|
||||
free(D_803689B0);
|
||||
D_803689B0 = NULL;
|
||||
D_803689B4 = 0;
|
||||
}
|
||||
|
||||
void func_802F0898(void){
|
||||
return;
|
||||
}
|
||||
|
||||
void func_802F08A0(void){
|
||||
int i;
|
||||
ParticleEmitter *iPtr;
|
||||
|
||||
D_80380920 = MAX(0.0, D_80380920 - time_getDelta());
|
||||
if(D_803689B0){
|
||||
for(i = 0; i < D_803689B4; i++){
|
||||
iPtr = D_803689B0[i];
|
||||
particleEmitter_update(iPtr);
|
||||
if( iPtr->unk0_0
|
||||
&& iPtr->doneSpawning_0_23 == TRUE
|
||||
&& iPtr->pList_end_128 == iPtr->pList_start_124
|
||||
){
|
||||
iPtr->unk0_1 = TRUE;
|
||||
}
|
||||
else{
|
||||
iPtr->unk0_1 = FALSE;
|
||||
}
|
||||
}//L802F09C0
|
||||
for(i = 0; i < D_803689B4;){
|
||||
if(D_803689B0[i]->unk0_1){
|
||||
func_802F0C78(D_803689B0[i]);
|
||||
}
|
||||
else{
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}//L802F0A14
|
||||
}
|
||||
|
||||
void func_802F0A34(Gfx **gdl, Mtx **mptr, Vtx **vptr){
|
||||
int i;
|
||||
for(i = 0; i < D_803689B4; i++){
|
||||
func_802EEE3C(D_803689B0[i], gdl, mptr, vptr, 4);
|
||||
}
|
||||
}
|
||||
|
||||
void func_802F0AE8(Gfx **gdl, Mtx **mptr, Vtx **vptr){
|
||||
int i;
|
||||
for(i = 0; i < D_803689B4; i++){
|
||||
func_802EEE3C(D_803689B0[i], gdl, mptr, vptr, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void func_802F0B98(Gfx **gdl, Mtx **mptr, Vtx **vptr){
|
||||
func_802F0A34(gdl, mptr, vptr);
|
||||
func_802F0AE8(gdl, mptr, vptr);
|
||||
}
|
||||
|
||||
ParticleEmitter *partEmitList_pushNew(u32 cnt){
|
||||
D_803689B0 = realloc(D_803689B0, (++D_803689B4)*4);
|
||||
D_803689B0[D_803689B4 - 1] = particleEmitter_new(cnt);
|
||||
D_803689B0[D_803689B4 - 1]->unk0_0 = TRUE;
|
||||
return D_803689B0[D_803689B4 - 1];
|
||||
}
|
||||
|
||||
|
||||
void func_802F0C78(ParticleEmitter *this){
|
||||
int i = 0;
|
||||
while(this != D_803689B0[i] && i < D_803689B4){i++;}
|
||||
if(i == D_803689B4)
|
||||
return;
|
||||
|
||||
func_802EF684(this);
|
||||
D_803689B0[i] = D_803689B0[D_803689B4 - 1];
|
||||
D_803689B4--;
|
||||
D_803689B0 = realloc(D_803689B0, D_803689B4*sizeof(ParticleEmitter *));
|
||||
}
|
||||
|
||||
void func_802F0D54(ParticleEmitter *this){
|
||||
this->unk0_0 = FALSE;
|
||||
}
|
||||
|
||||
void func_802F0D64(ParticleEmitter *this){
|
||||
this->unk0_0 = TRUE;
|
||||
}
|
||||
|
||||
ParticleEmitter * func_802F0D74(ParticleEmitter *this){
|
||||
int i;
|
||||
s32 a3;
|
||||
|
||||
if(this){
|
||||
a3 = (s32)this;
|
||||
i = 0;
|
||||
while(D_803689B0[i] != this && i < D_803689B4){
|
||||
i++;
|
||||
}
|
||||
this = (ParticleEmitter *)defrag(this);
|
||||
this->pList_start_124 = (Particle *)((s32)this + (u32)((s32)this->pList_start_124 - a3));
|
||||
this->pList_end_128 = (Particle *)((s32)this + (u32)((s32)this->pList_end_128 - a3));
|
||||
this->pList_capacity_12C = (Particle *)((s32)this + (u32)((s32)this->pList_capacity_12C - a3));
|
||||
if(i < D_803689B4){
|
||||
D_803689B0[i] = this;
|
||||
}
|
||||
|
||||
}//L802F0E44
|
||||
return this;
|
||||
}
|
||||
|
||||
void func_802F0E58(void){
|
||||
D_803689B0 = (ParticleEmitter **)defrag(D_803689B0);
|
||||
}
|
||||
|
||||
void func_802F0E80(void* arg0, s32 arg1){
|
||||
D_80380924 = (arg1 == 2) ? 1 : 0;
|
||||
}
|
||||
|
||||
void func_802F0EAC(ParticleEmitter *this, f32 arg1){
|
||||
Particle *iPtr;
|
||||
this->postion_28[1] = arg1;
|
||||
for(iPtr = this->pList_start_124; iPtr < this->pList_end_128; iPtr++)
|
||||
iPtr->position_18[1] = arg1;
|
||||
|
||||
}
|
|
@ -13,8 +13,8 @@ typedef struct {
|
|||
void func_802F1190(u8 arg0);
|
||||
|
||||
/* .bss*/
|
||||
extern u8 D_80380930;
|
||||
extern Struct_Core2_69F60_0 D_80380938[];
|
||||
u8 D_80380930;
|
||||
Struct_Core2_69F60_0 D_80380938[16];
|
||||
|
||||
/* .code */
|
||||
ParticleEmitter *func_802F0EF0(u8 arg0){
|
||||
|
|
|
@ -7,7 +7,7 @@ extern s32 D_80368AA0[3];
|
|||
|
||||
|
||||
/* .bss */
|
||||
extern u8 D_80380A00;
|
||||
u8 D_80380A00;
|
||||
|
||||
|
||||
/* .code */
|
||||
|
|
|
@ -31,9 +31,9 @@ extern f32 D_803771E0;
|
|||
extern f32 D_803771E4;
|
||||
|
||||
/* .bss */
|
||||
extern f32 *D_80380A10;
|
||||
extern Mtx D_80380A18;
|
||||
extern s32 D_80380A58;
|
||||
f32 *D_80380A10;
|
||||
Mtx D_80380A18;
|
||||
s32 D_80380A58;
|
||||
|
||||
/* .code */
|
||||
#ifndef NONMATCHING
|
||||
|
|
|
@ -37,7 +37,7 @@ extern f32 D_80377200;
|
|||
extern f32 D_80377204;
|
||||
|
||||
/* .bss */
|
||||
extern u8 D_80380A60;
|
||||
u8 D_80380A60;
|
||||
|
||||
/* .code */
|
||||
bool func_802F3370(f32 arg0[3], s32 *arg1, bool arg2){
|
||||
|
|
|
@ -16,7 +16,7 @@ struct43s D_80368D88 = {
|
|||
};
|
||||
|
||||
/* .bss */
|
||||
extern u8 D_80380A70;
|
||||
u8 D_80380A70;
|
||||
|
||||
/* .code */
|
||||
void func_802F3CB0(void){
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include "variables.h"
|
||||
|
||||
/* .bss */
|
||||
extern u8 D_80380A80;
|
||||
u8 D_80380A80;
|
||||
|
||||
/* .code */
|
||||
void func_802F3E50(void){
|
||||
|
|
|
@ -10,7 +10,7 @@ ParticleEmitter *func_802F4274(f32 arg0[3]);
|
|||
extern s32 D_80368DE0[3];
|
||||
|
||||
/* .bss */
|
||||
extern u8 D_80380AA0;
|
||||
u8 D_80380AA0;
|
||||
|
||||
/* .code */
|
||||
void func_802F4200(f32 arg0[3]){
|
||||
|
|
|
@ -29,6 +29,16 @@ typedef struct map_font_texture_map{
|
|||
s16 assetId;
|
||||
} MapFontTextureMap;
|
||||
|
||||
typedef struct{
|
||||
u8 unk0;
|
||||
u8 unk1;
|
||||
u8 pad2[1];
|
||||
s8 unk3;
|
||||
}Struct_6DA30_0_s;
|
||||
|
||||
/* .data */
|
||||
extern Struct_6DA30_0_s D_80369000[];
|
||||
|
||||
extern struct {
|
||||
u8 unk0;
|
||||
u8 unk1;
|
||||
|
@ -53,6 +63,7 @@ extern Gfx D_80369238[];/* = {
|
|||
gsSPEndDisplayList(),
|
||||
};*/
|
||||
|
||||
|
||||
extern u8 D_80377240[4];
|
||||
extern u8 D_80377244[4];
|
||||
extern u8 D_80377248[4];
|
||||
|
@ -60,33 +71,31 @@ extern u8 D_8037724C[4];
|
|||
extern u8 D_80377250[4];
|
||||
extern u8 D_80377254[4];
|
||||
|
||||
extern s8 D_80380AB0;
|
||||
extern BKSprite *D_80380AB8[0x5];
|
||||
s8 D_80380AB0;
|
||||
BKSprite *D_80380AB8[0x5];
|
||||
|
||||
extern FontLetter *print_sFonts[4];
|
||||
extern PrintBuffer *print_sPrintBuffer;
|
||||
extern PrintBuffer *print_sCurrentPtr;
|
||||
extern struct {
|
||||
s32 unk0;
|
||||
}D_80380AE8;
|
||||
FontLetter *print_sFonts[4];
|
||||
PrintBuffer *print_sPrintBuffer;
|
||||
PrintBuffer *print_sCurrentPtr;
|
||||
s32 D_80380AE8;
|
||||
s32 D_80380AEC;
|
||||
s32 D_80380AF0;
|
||||
s32 D_80380AF4;
|
||||
s32 D_80380AF8;
|
||||
s32 D_80380AFC;
|
||||
s32 D_80380B00;
|
||||
s32 D_80380B04;
|
||||
bool print_sInFontFormatMode;
|
||||
s32 D_80380B0C;
|
||||
s32 D_80380B10;
|
||||
s32 D_80380B14;
|
||||
s32 D_80380B18;
|
||||
s32 D_80380B1C;
|
||||
s8 D_80380B20[0x400];
|
||||
s8 D_80380F20[0x80];
|
||||
f32 D_80380FA0;
|
||||
f32 D_80380FA8[0x20];
|
||||
|
||||
extern s32 D_80380AEC;
|
||||
extern s32 D_80380AF0;
|
||||
extern s32 D_80380AF4;
|
||||
extern s32 D_80380AF8;
|
||||
extern s32 D_80380AFC;
|
||||
extern s32 D_80380B00;
|
||||
extern s32 D_80380B04;
|
||||
extern bool print_sInFontFormatMode;
|
||||
extern s32 D_80380B0C;
|
||||
extern s32 D_80380B10;
|
||||
extern s32 D_80380B14;
|
||||
|
||||
extern s32 D_80380B18;
|
||||
extern s32 D_80380B1C;
|
||||
extern s8 D_80380B20[0x400];
|
||||
extern s8 D_80380F20[0x80];
|
||||
extern f32 D_80380FA8[];
|
||||
|
||||
//returns map texture assetID for current map;
|
||||
enum asset_e func_802F49C0(void){
|
||||
|
@ -297,7 +306,7 @@ void func_802F5188(void){
|
|||
D_80380B0C = 0;
|
||||
D_80380B10 = 0;
|
||||
D_80380B14 = 0;
|
||||
D_80380AE8.unk0 = 0;
|
||||
D_80380AE8 = 0;
|
||||
D_80380AB0 = 0;
|
||||
func_802F7A2C(3);
|
||||
D_80380AB8[0] = assetcache_get(SPRITE_DIALOG_FONT_ALPHAMASK);
|
||||
|
@ -357,9 +366,9 @@ void func_802F542C(void){
|
|||
|
||||
//returns the pixel data and type for a given letter
|
||||
void *func_802F5494(s32 letterId, s32 *fontType){
|
||||
if(D_80380AE8.unk0 != 1 || (D_80380AE8.unk0 == 1 && letterId < 0xA)){
|
||||
*fontType = D_80380AB8[D_80380AE8.unk0]->type;
|
||||
return print_sFonts[D_80380AE8.unk0][letterId].unk0;
|
||||
if(D_80380AE8 != 1 || (D_80380AE8 == 1 && letterId < 0xA)){
|
||||
*fontType = D_80380AB8[D_80380AE8]->type;
|
||||
return print_sFonts[D_80380AE8][letterId].unk0;
|
||||
}
|
||||
else{//L802F5510
|
||||
if(!D_80380AB8[3]){
|
||||
|
@ -377,19 +386,9 @@ void *func_802F5494(s32 letterId, s32 *fontType){
|
|||
|
||||
//returns the letter's palette
|
||||
void *func_802F55A8(u8 arg0){
|
||||
return print_sFonts[D_80380AE8.unk0][arg0].unk4;
|
||||
return print_sFonts[D_80380AE8][arg0].unk4;
|
||||
}
|
||||
|
||||
typedef struct{
|
||||
u8 unk0;
|
||||
u8 unk1;
|
||||
u8 pad2[1];
|
||||
s8 unk3;
|
||||
}Struct_6DA30_0_s;
|
||||
|
||||
extern f32 D_80380FA0;
|
||||
extern Struct_6DA30_0_s D_80369000[];
|
||||
|
||||
#ifndef NONMATCHING
|
||||
void _printbuffer_draw_letter(s32 letter, f32* xPtr, f32* yPtr, f32 arg3, Gfx **gtx, Mtx **mtx, Vtx **vtx);
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_6DA30/_printbuffer_draw_letter.s")
|
||||
|
@ -418,7 +417,7 @@ void _printbuffer_draw_letter(s32 letter, f32* xPtr, f32* yPtr, f32 arg3, Gfx **
|
|||
D_80380FA0 = 0.0f;
|
||||
}//L802F563C
|
||||
|
||||
switch(D_80380AE8.unk0){
|
||||
switch(D_80380AE8){
|
||||
case 0: //L802F5678
|
||||
if(letter >= '\x21' && letter < '\x5f'){
|
||||
sp20C = letter - '\x21';
|
||||
|
@ -456,7 +455,7 @@ void _printbuffer_draw_letter(s32 letter, f32* xPtr, f32* yPtr, f32 arg3, Gfx **
|
|||
print_sInFontFormatMode = FALSE;
|
||||
switch(letter){
|
||||
case ' '://802F5818
|
||||
*xPtr += arg3*((D_80380AF0) ? D_80369068[D_80380AE8.unk0]: D_80369068[D_80380AE8.unk0]*0.8);
|
||||
*xPtr += arg3*((D_80380AF0) ? D_80369068[D_80380AE8]: D_80369068[D_80380AE8]*0.8);
|
||||
break;
|
||||
|
||||
case 'b': //L802F5890
|
||||
|
@ -465,7 +464,7 @@ void _printbuffer_draw_letter(s32 letter, f32* xPtr, f32* yPtr, f32 arg3, Gfx **
|
|||
break;
|
||||
|
||||
case 'f': //L802F58A8
|
||||
D_80380AEC = D_80380AE8.unk0 = D_80380AE8.unk0 ^ 1;
|
||||
D_80380AEC = D_80380AE8 = D_80380AE8 ^ 1;
|
||||
break;
|
||||
|
||||
case 'l': //L802F58BC
|
||||
|
@ -479,8 +478,8 @@ void _printbuffer_draw_letter(s32 letter, f32* xPtr, f32* yPtr, f32 arg3, Gfx **
|
|||
case 'j': //L802F58D4
|
||||
if(D_80380AFC == 0){
|
||||
D_80380AFC = 1;
|
||||
D_80380AEC = D_80380AE8.unk0;
|
||||
D_80380AE8.unk0 = 2;
|
||||
D_80380AEC = D_80380AE8;
|
||||
D_80380AE8 = 2;
|
||||
// D_80380AE8 = 2;
|
||||
}
|
||||
break;
|
||||
|
@ -488,7 +487,7 @@ void _printbuffer_draw_letter(s32 letter, f32* xPtr, f32* yPtr, f32 arg3, Gfx **
|
|||
case 'e': //L802F58FC
|
||||
if(D_80380AFC){
|
||||
D_80380AFC = 0;
|
||||
D_80380AE8.unk0 = D_80380AEC;
|
||||
D_80380AE8 = D_80380AEC;
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -565,7 +564,7 @@ void _printbuffer_draw_letter(s32 letter, f32* xPtr, f32* yPtr, f32 arg3, Gfx **
|
|||
f28 += randf2(-2.0f, 2.0f);
|
||||
}
|
||||
if (D_80380AF0 != 0) {
|
||||
sp1F8 = (f32)D_80369068[D_80380AE8.unk0];
|
||||
sp1F8 = (f32)D_80369068[D_80380AE8];
|
||||
} else {
|
||||
sp1F8 = (f32)sp214->x;
|
||||
}
|
||||
|
@ -662,16 +661,16 @@ void printbuffer_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx) {
|
|||
_printbuffer_draw_letter(print_sCurrentPtr->fmtString[j], &_x, &_y, 1.0f, gfx, mtx, vtx);
|
||||
}
|
||||
if (D_80380B00 != 0) {
|
||||
width = (strlen(print_sCurrentPtr->string) -1)*D_80369068[D_80380AE8.unk0];
|
||||
width = (strlen(print_sCurrentPtr->string) -1)*D_80369068[D_80380AE8];
|
||||
gDPPipeSync((*gfx)++);
|
||||
gDPSetPrimColor((*gfx)++, 0, 0, 0x00, 0x00, 0x00, 0x64);
|
||||
gDPSetCombineMode((*gfx)++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
|
||||
gDPScisFillRectangle((*gfx)++, _x - D_80369068[D_80380AE8.unk0]/2 - 1.0f, _y - D_80369068[D_80380AE8.unk0]/2 - 1.0f, _x + width + D_80369068[D_80380AE8.unk0]/2, _y + D_80369068[D_80380AE8.unk0]/2 + 1.0f);
|
||||
gDPScisFillRectangle((*gfx)++, _x - D_80369068[D_80380AE8]/2 - 1.0f, _y - D_80369068[D_80380AE8]/2 - 1.0f, _x + width + D_80369068[D_80380AE8]/2, _y + D_80369068[D_80380AE8]/2 + 1.0f);
|
||||
gDPPipeSync((*gfx)++);
|
||||
|
||||
}//L802F73E8
|
||||
if ((D_80380AF8 == 0) && (D_80380AF4 == 0)) {
|
||||
if (D_80380AE8.unk0 != 0) {
|
||||
if (D_80380AE8 != 0) {
|
||||
gDPSetCombineMode((*gfx)++, G_CC_DECALRGBA, G_CC_DECALRGBA);
|
||||
gDPSetPrimColor((*gfx)++, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF);
|
||||
} else {
|
||||
|
@ -679,7 +678,7 @@ void printbuffer_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx) {
|
|||
gDPSetPrimColor((*gfx)++, 0, 0, print_sCurrentPtr->rgba[0], print_sCurrentPtr->rgba[1], print_sCurrentPtr->rgba[2], print_sCurrentPtr->rgba[3]);
|
||||
}
|
||||
}
|
||||
if ((D_80380AE8.unk0 == 1) && ((f64) print_sCurrentPtr->unk10 < 0.0)) {
|
||||
if ((D_80380AE8 == 1) && ((f64) print_sCurrentPtr->unk10 < 0.0)) {
|
||||
for(j = 0; print_sCurrentPtr->string[j]; j++){
|
||||
D_80380FA8[j] = func_802F6C90(print_sCurrentPtr->string[j], &_x, &_y, -print_sCurrentPtr->unk10);
|
||||
}
|
||||
|
|
|
@ -2,9 +2,11 @@
|
|||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern struct6s *D_80381030;
|
||||
extern struct3s *D_80381034;
|
||||
/* .bss */
|
||||
struct6s *D_80381030;
|
||||
struct3s *D_80381034;
|
||||
|
||||
/* .code */
|
||||
void func_802F7BC0(Gfx **gdl, Mtx **mptr, Vtx **vptr){
|
||||
if(D_80381030){
|
||||
func_802F8A90(D_80381030, gdl, mptr, vptr);
|
||||
|
|
|
@ -21,15 +21,18 @@ extern Gfx D_80369290[];
|
|||
extern f32 D_80377350;
|
||||
extern f32 D_80377354;
|
||||
|
||||
extern f32 D_80381050[3];
|
||||
extern f32 D_80381060;
|
||||
extern f32 D_80381064;
|
||||
extern f32 D_80381070[3];
|
||||
extern f32 D_80381080[3];
|
||||
extern s32 D_8038108C;
|
||||
extern Gfx *D_80381090;
|
||||
extern Struct_core2_72060_0 *D_80381094;
|
||||
/* .bss */
|
||||
f32 D_80381040[3];
|
||||
f32 D_8038104C;
|
||||
f32 D_80381050[3];
|
||||
f32 D_80381060[3];
|
||||
f32 D_80381070[3];
|
||||
f32 D_80381080[3];
|
||||
s32 D_8038108C;
|
||||
Gfx *D_80381090;
|
||||
Struct_core2_72060_0 *D_80381094;
|
||||
|
||||
/* .code */
|
||||
void func_802F8FF0(void){
|
||||
D_80369284 = 0;
|
||||
}
|
||||
|
@ -139,8 +142,8 @@ bool func_802F989C(Gfx **gfx, Mtx **mtx, f32 arg2[3]) {
|
|||
mlMtxApply(*mtx);
|
||||
func_80252434(&D_80381080, D_80381094->unkC);
|
||||
func_80251B5C(D_80381080[0], D_80381080[1], D_80381080[2]);
|
||||
func_8025208C(D_80381064);
|
||||
func_80251F8C(D_80381060);
|
||||
func_8025208C(D_80381060[1]);
|
||||
func_80251F8C(D_80381060[0]);
|
||||
func_80252A38(-(D_80381094->unkC[0]), -(D_80381094->unkC[1]), -(D_80381094->unkC[2]));
|
||||
mlMtxApply(*mtx);
|
||||
gSPMatrix((*gfx)++, (*mtx)++, G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
|
|
@ -4,8 +4,10 @@
|
|||
|
||||
f32 sfx_randf2(f32, f32);
|
||||
|
||||
extern vector(struct4Es) *D_803810A0;
|
||||
/* .bss */
|
||||
vector(struct4Es) *D_803810A0;
|
||||
|
||||
/* public */
|
||||
void func_802F9D38(s32 arg0);
|
||||
void func_802FA028(s32 arg0, s32 arg1);
|
||||
void func_802FA0B0(s32 arg0, s32 arg1);
|
||||
|
|
|
@ -87,15 +87,15 @@ ItemPrint D_803692F8[0x2C] = {
|
|||
};
|
||||
|
||||
/* .bss */
|
||||
extern s32 D_803810B0;
|
||||
extern f32 D_803810B8[0x2C]; //item_print_value
|
||||
extern s32 D_80381168[0x2C]; //comusic_e
|
||||
extern f32 D_80381218[0x2C]; //item_sfx_volume???
|
||||
extern s32 D_803812C8[0x2C]; //comusic_e
|
||||
extern s32 D_80381378[0x2C]; //sfx_e
|
||||
extern void *D_80381428[];
|
||||
extern void *D_80381450[];
|
||||
extern s32 D_80381478[0X2C];
|
||||
s32 D_803810B0;
|
||||
f32 D_803810B8[0x2C]; //item_print_value
|
||||
s32 D_80381168[0x2C]; //comusic_e
|
||||
f32 D_80381218[0x2C]; //item_sfx_volume???
|
||||
s32 D_803812C8[0x2C]; //comusic_e
|
||||
s32 D_80381378[0x2C]; //sfx_e
|
||||
void *D_80381428[10];
|
||||
void *D_80381450[10];
|
||||
s32 D_80381478[0X2C];
|
||||
|
||||
/* .code */
|
||||
void func_802FA5D0(void){
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
|
||||
extern s32 D_80369824;
|
||||
|
||||
extern struct8s * D_80381530[];
|
||||
/* .bss */
|
||||
struct8s * D_80381530[4];
|
||||
|
||||
f32 func_802FB3B0(struct8s* arg0){
|
||||
int i;
|
||||
|
@ -19,17 +20,14 @@ f32 func_802FB3B0(struct8s* arg0){
|
|||
return 0.0f;
|
||||
}
|
||||
|
||||
#ifndef NONMATCHING
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_74420/func_802FB414.s")
|
||||
#else
|
||||
void func_802FB414(void){
|
||||
int i;
|
||||
int i = 0;
|
||||
D_80369824--;
|
||||
for(i = 0; i < D_80369824; i++){
|
||||
while(i < D_80369824){
|
||||
D_80381530[i] = D_80381530[i+1];
|
||||
i++;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_74420/func_802FB458.s")
|
||||
|
||||
|
@ -59,65 +57,3 @@ void func_802FB61C(s32 arg0, struct8s *arg1){
|
|||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_74420/func_802FB630.s")
|
||||
|
||||
/* ???BREAK??? */
|
||||
|
||||
extern s32 D_80369884;
|
||||
extern s32 *D_8038155C[];
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_74420/func_802FB8A0.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_74420/func_802FB8F8.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_74420/func_802FB93C.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_74420/func_802FBA54.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_74420/func_802FBA78.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_74420/func_802FBA9C.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_74420/func_802FBAB0.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_74420/func_802FBB04.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_74420/func_802FBB18.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_74420/func_802FBBC0.s")
|
||||
|
||||
void func_802FBDFC(void){}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_74420/func_802FBE04.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_74420/func_802FBE48.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_74420/func_802FBE60.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_74420/func_802FBEB8.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_74420/func_802FBEFC.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_74420/func_802FC014.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_74420/func_802FC038.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_74420/func_802FC05C.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_74420/func_802FC070.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_74420/func_802FC0C4.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_74420/func_802FC0D8.s")
|
||||
|
||||
bool func_802FC390(void){
|
||||
s32 *phi_v1 = D_8038155C[1];
|
||||
if (D_80369884 == 0)
|
||||
return 0;
|
||||
return *phi_v1 == 2;
|
||||
}
|
||||
|
||||
bool func_802FC3C4(void){
|
||||
if (D_80369884 == 0)
|
||||
return 0;
|
||||
return (func_802FDD0C(D_8038155C[D_80369884]) == 0xE);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,196 @@
|
|||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern f32 D_80369830[];
|
||||
extern s32 D_80369854;
|
||||
|
||||
struct8s *D_80381540[5];
|
||||
s32 D_80381554;
|
||||
|
||||
/* .code */
|
||||
f32 func_802FB8A0(struct8s * arg0){
|
||||
s32 i;
|
||||
f32 var_f0;
|
||||
f32 var_f2;
|
||||
|
||||
var_f2 = 0.0f;
|
||||
var_f0 = 40.0f;
|
||||
for(i = 0; i < D_80369854; i++){
|
||||
if(arg0 == D_80381540[i]){
|
||||
return var_f2;
|
||||
}
|
||||
var_f2 += var_f0;
|
||||
}
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
void func_802FB8F8(void){
|
||||
s32 i = 0;
|
||||
|
||||
D_80369854--;
|
||||
while(i < D_80369854){
|
||||
D_80381540[i] = D_80381540[i + 1];
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef NONMATCHING
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_74910/func_802FB93C.s")
|
||||
#else
|
||||
void func_802FB93C(struct8s *arg0) {
|
||||
void *sp18;
|
||||
s32 temp_a1;
|
||||
s32 temp_t9;
|
||||
s32 var_v1;
|
||||
void **var_v0;
|
||||
void **var_v0_2;
|
||||
void *temp_a0;
|
||||
struct8s *temp_t0;
|
||||
void *temp_v0;
|
||||
|
||||
for(var_v1 = 0; var_v1 < D_80369854; var_v1++){
|
||||
if (arg0 == D_80381540[var_v1]) {
|
||||
func_802FB020(D_80381540[var_v1], 1);
|
||||
D_80381540[var_v1]->unk10 = 3.0f;
|
||||
if (D_80381540[var_v1]->unk18 == 0) {
|
||||
D_80381540[var_v1]->unk1C = 0.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(var_v1 = D_80369854; var_v1 > 0; var_v0--){
|
||||
D_80381540[var_v1] = D_80381540[var_v1 - 1];
|
||||
var_v1--;
|
||||
}
|
||||
|
||||
D_80381540[0] = arg0;
|
||||
if ((temp_a1 != 0) && (func_802FDD0C(D_80381540[1]) == 0x2A)) {
|
||||
temp_t0 = D_80381540[1];
|
||||
D_80381540[1] = D_80381540[0];
|
||||
D_80381540[0] = temp_t0;
|
||||
}
|
||||
D_80369854++;
|
||||
}
|
||||
#endif
|
||||
|
||||
void func_802FBA54(s32 arg0, struct8s *arg1){
|
||||
func_802FB93C(arg1);
|
||||
}
|
||||
|
||||
void func_802FBA78(s32 arg0, struct8s *arg1){
|
||||
func_802FB8F8();
|
||||
}
|
||||
|
||||
void func_802FBA9C(s32 arg0, struct8s *arg1){
|
||||
arg1->unk18 = 0;
|
||||
arg1->unk1C = 0.0f;
|
||||
}
|
||||
|
||||
void func_802FBAB0(s32 arg0, struct8s *arg1){
|
||||
s32 sp1C;
|
||||
struct8s *var_v0;
|
||||
|
||||
var_v0 = D_80381540[0];
|
||||
if(D_80369854 != 0){
|
||||
arg1->unkC = func_802FB8A0(arg1) + var_v0->unk1C;
|
||||
}
|
||||
}
|
||||
|
||||
void func_802FBB04(s32 arg0, struct8s *arg1){
|
||||
D_80369854 = 0;
|
||||
}
|
||||
|
||||
void func_802FBB18(void) {
|
||||
struct8s *temp_s2;
|
||||
struct8s *var_s0;
|
||||
s32 var_s1;
|
||||
|
||||
if (D_80369854 != 0) {
|
||||
temp_s2 = D_80381540[0];
|
||||
temp_s2->unk0 = 3;
|
||||
for(var_s1 = 1; var_s1 < D_80369854; var_s1++){
|
||||
func_802FBA9C(2, D_80381540[var_s1]);
|
||||
func_802FB020(D_80381540[var_s1], temp_s2->unk0);
|
||||
}
|
||||
D_80381554 = 1;
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef NONMATCHING
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_74910/func_802FBBC0.s")
|
||||
#else
|
||||
void func_802FBBC0(void) {
|
||||
struct8s *sp1C;
|
||||
f32 temp_f0;
|
||||
struct8s *temp_a2;
|
||||
s32 temp_v0;
|
||||
s32 temp_v0_2;
|
||||
s32 temp_v0_3;
|
||||
s32 temp_v1;
|
||||
s32 var_a0;
|
||||
s32 var_v0;
|
||||
s32 var_v1;
|
||||
|
||||
var_a0 = D_80369854;
|
||||
sp1C = D_80381540;
|
||||
if(D_80369854 != 0){
|
||||
switch(sp1C->unk0){
|
||||
case 1:
|
||||
sp1C->unk1C += sp1C->unk14 * D_80369830[sp1C->unk18];
|
||||
if (D_80369830[sp1C->unk18] == 0.0) {
|
||||
sp1C->unk0 = 2;
|
||||
sp1C->unk10 = 3.0f;
|
||||
} else {
|
||||
sp1C->unk18++;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
sp1C->unk10 -= time_getDelta();
|
||||
if (sp1C->unk10 < 0.0f) {
|
||||
func_802FBB18();
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if (D_80381554 != 0) {
|
||||
var_v1 = (sp1C->unk1C < -20.0f) ? TRUE : FALSE;
|
||||
} else {
|
||||
var_v1 = (sp1C->unk18 == 0);
|
||||
}
|
||||
if (var_v1) {
|
||||
D_80381554 = 0;
|
||||
func_802FB020(sp1C, 0);
|
||||
} else {
|
||||
temp_v0_3 = sp1C->unk18 - 1;
|
||||
sp1C->unk18 = (temp_v0_3 < 0) ? 0 : temp_v0_3;
|
||||
sp1C->unk1C -= sp1C->unk14 * D_80369830[sp1C->unk18];
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for(var_v0 = 1; var_v0 < D_80369854; var_v0++){
|
||||
if (temp_a2->unk0 == 2) {
|
||||
D_80381540[var_v0]->unk0 = temp_a2->unk0;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void func_802FBDFC(void){}
|
||||
|
||||
bool func_802FBE04(void){
|
||||
struct8s * var_v1 = D_80381540[0];
|
||||
|
||||
if(D_80369854 == 0){
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return ((var_v1->unk0 == 1) || (var_v1->unk0 == 2));
|
||||
}
|
||||
|
||||
bool func_802FBE48(void){
|
||||
return D_80369854 == 0;
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
/* .data */
|
||||
extern s32 D_80369884;
|
||||
|
||||
/* .bss */
|
||||
struct8s *D_80381560[3];
|
||||
s32 D_8038156C;
|
||||
|
||||
/* .code */
|
||||
f32 func_802FBE60(struct8s * arg0) {
|
||||
f32 var_f2;
|
||||
s32 var_v0;
|
||||
|
||||
var_f2 = 0.0f;
|
||||
for(var_v0 = 0; var_v0 < D_80369884; var_v0++){
|
||||
if (arg0 == D_80381560[var_v0]) {
|
||||
return var_f2;
|
||||
}
|
||||
var_f2 += 40.0f;
|
||||
}
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
void func_802FBEB8(void){
|
||||
s32 i = 0;
|
||||
|
||||
D_80369884--;
|
||||
while(i < D_80369884){
|
||||
D_80381560[i] = D_80381560[i + 1];
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_74ED0/func_802FBEFC.s")
|
||||
|
||||
void func_802FC014(s32 arg0, struct8s * arg1){
|
||||
func_802FBEFC(arg1);
|
||||
}
|
||||
|
||||
void func_802FC038(s32 arg0, struct8s * arg1){
|
||||
func_802FBEB8();
|
||||
}
|
||||
|
||||
void func_802FC05C(s32 arg0, struct8s * arg1){
|
||||
arg1->unk18 = 0;
|
||||
arg1->unk1C = 0.0f;
|
||||
}
|
||||
|
||||
void func_802FC070(s32 arg0, struct8s *arg1){
|
||||
s32 sp1C;
|
||||
struct8s *var_v0;
|
||||
|
||||
var_v0 = D_80381560[0];
|
||||
if(D_80369884 != 0){
|
||||
arg1->unkC = func_802FBE60(arg1) + var_v0->unk1C;
|
||||
}
|
||||
}
|
||||
|
||||
void func_802FC0C4(s32 arg0, struct8s *arg1){
|
||||
D_80369884 = 0;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_74ED0/func_802FC0D8.s")
|
||||
|
||||
bool func_802FC390(void){
|
||||
s32 *phi_v1 = D_80381560[0];
|
||||
if (D_80369884 == 0)
|
||||
return FALSE;
|
||||
return *phi_v1 == 2;
|
||||
}
|
||||
|
||||
bool func_802FC3C4(void){
|
||||
if (D_80369884 == 0)
|
||||
return FALSE;
|
||||
return (func_802FDD0C(D_80381560[D_80369884 - 1]) == 0xE);
|
||||
}
|
|
@ -2,14 +2,42 @@
|
|||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
/* .data */
|
||||
extern s32 D_803698B4;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_75480/func_802FC410.s")
|
||||
/* .bss */
|
||||
struct8s *D_80381570[4];
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_75480/func_802FC468.s")
|
||||
/* .code */
|
||||
f32 func_802FC410(struct8s * arg0) {
|
||||
f32 var_f2;
|
||||
s32 var_v0;
|
||||
|
||||
var_f2 = 0.0f;
|
||||
for(var_v0 = 0; var_v0 < D_803698B4; var_v0++){
|
||||
if (arg0 == D_80381570[var_v0]) {
|
||||
return var_f2;
|
||||
}
|
||||
var_f2 += 35.0f;
|
||||
}
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
void func_802FC468(void){
|
||||
s32 i = 0;
|
||||
|
||||
D_803698B4--;
|
||||
while(i < D_803698B4){
|
||||
D_80381570[i] = D_80381570[i + 1];
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_75480/func_802FC4AC.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_75480/func_802FC580.s")
|
||||
void func_802FC580(s32 arg0, struct8s * arg1){
|
||||
func_802FC4AC(arg1);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_75480/func_802FC5A4.s")
|
||||
|
||||
|
|
|
@ -3,7 +3,26 @@
|
|||
#include "variables.h"
|
||||
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_75930/func_802FC8C0.s")
|
||||
/* .data */
|
||||
extern s32 D_803698E4;
|
||||
|
||||
/* .bss */
|
||||
struct8s *D_80381580[4];
|
||||
|
||||
/* .code */
|
||||
f32 func_802FC8C0(struct8s * arg0) {
|
||||
f32 var_f2;
|
||||
s32 var_v0;
|
||||
|
||||
var_f2 = 0.0f;
|
||||
for(var_v0 = 0; var_v0 < D_803698E4; var_v0++){
|
||||
if (arg0 == D_80381580[var_v0]) {
|
||||
return var_f2;
|
||||
}
|
||||
var_f2 += 48.0f;
|
||||
}
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_75930/func_802FC918.s")
|
||||
|
||||
|
|
|
@ -2,9 +2,13 @@
|
|||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
/* .data */
|
||||
extern s32 D_80369914;
|
||||
extern s32 D_8038158C[];
|
||||
|
||||
/* .bss */
|
||||
struct8s *D_80381590[4];
|
||||
|
||||
/* .code */
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_75E90/func_802FCE20.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_75E90/func_802FCE88.s")
|
||||
|
@ -26,5 +30,5 @@ extern s32 D_8038158C[];
|
|||
int func_802FD2D4(void){
|
||||
if(!D_80369914)
|
||||
return 0;
|
||||
return func_802FDD0C(D_8038158C[D_80369914]) == 0x1A;
|
||||
return func_802FDD0C(D_80381590[D_80369914 - 1]) == 0x1A;
|
||||
}
|
||||
|
|
|
@ -2,9 +2,11 @@
|
|||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern struct8s D_803815A0;
|
||||
/* .bss */
|
||||
struct7s D_803815A0;
|
||||
|
||||
struct8s *func_802FD320(enum asset_e item_id){
|
||||
/* .code */
|
||||
struct7s *func_802FD320(enum asset_e item_id){
|
||||
return &D_803815A0;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,20 +22,20 @@ extern f32 D_8036A018[];
|
|||
extern Gfx D_8036A030[];
|
||||
|
||||
|
||||
extern s32 D_803815C0;
|
||||
extern s32 D_803815C4;
|
||||
extern f32 D_803815C8;
|
||||
extern f32 D_803815CC;
|
||||
extern f32 D_803815D0;
|
||||
extern f32 D_803815D4;
|
||||
extern f32 D_803815D8;
|
||||
extern f32 D_803815DC;
|
||||
extern f32 D_803815E0;
|
||||
extern s32 D_803815E4;
|
||||
extern s32 D_803815E8;
|
||||
extern s32 D_803815EC;
|
||||
extern struct8s D_803815F0;
|
||||
extern s32 D_80381610;
|
||||
s32 D_803815C0;
|
||||
s32 D_803815C4;
|
||||
f32 D_803815C8;
|
||||
f32 D_803815CC;
|
||||
f32 D_803815D0;
|
||||
f32 D_803815D4;
|
||||
f32 D_803815D8;
|
||||
f32 D_803815DC;
|
||||
f32 D_803815E0;
|
||||
s32 D_803815E4;
|
||||
s32 D_803815E8;
|
||||
s32 D_803815EC;
|
||||
struct7s D_803815F0;
|
||||
s32 D_80381610;
|
||||
|
||||
|
||||
/* rodata
|
||||
|
@ -71,7 +71,7 @@ void func_802FDDC4(s32 arg0, struct8s *arg1){
|
|||
D_803815E8 = 0x50;
|
||||
}
|
||||
|
||||
struct8s *func_802FDE2C(s32 arg0){
|
||||
struct7s *func_802FDE2C(s32 arg0){
|
||||
func_802FDD20();
|
||||
D_803815D0 = 1.0f;
|
||||
return &D_803815F0;
|
||||
|
|
|
@ -10,20 +10,20 @@ extern enum asset_e D_8036A210[5];
|
|||
extern Gfx D_8036A228[];
|
||||
|
||||
/* .bss */
|
||||
extern u16 D_80381620[0xD][5][0x10];
|
||||
extern BKSprite *D_80381E40[5];
|
||||
extern f32 D_80381E54;
|
||||
extern u8 D_80381E58[5];
|
||||
extern f32 D_80381E60[5];
|
||||
extern f32 D_80381E78[5];
|
||||
extern struct8s D_80381E90;
|
||||
u16 D_80381620[0xD][5][0x10];
|
||||
BKSprite *D_80381E40[5];
|
||||
f32 D_80381E54;
|
||||
u8 D_80381E58[5];
|
||||
f32 D_80381E60[5];
|
||||
f32 D_80381E78[5];
|
||||
struct7s D_80381E90;
|
||||
|
||||
|
||||
/* .code */
|
||||
#ifndef nonmatching
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_78100/func_802FF090.s")
|
||||
#else
|
||||
struct8s *func_802FF090(s32 arg0) {
|
||||
struct7s *func_802FF090(s32 arg0) {
|
||||
f32 *var_s6;
|
||||
f64 temp_f20;
|
||||
f64 temp_f22;
|
||||
|
|
|
@ -9,13 +9,13 @@ extern s32 D_8036A260[];
|
|||
extern Gfx D_8036A278[];
|
||||
|
||||
/* .bss */
|
||||
extern void *D_80381EB0[2];
|
||||
extern f32 D_80381EB8;
|
||||
extern f32 D_80381EBC;
|
||||
extern s32 D_80381EC0;
|
||||
extern s32 D_80381EC4;
|
||||
extern u8 D_80381EC8[];
|
||||
extern struct8s D_80381ED0;
|
||||
void *D_80381EB0[2];
|
||||
f32 D_80381EB8;
|
||||
f32 D_80381EBC;
|
||||
s32 D_80381EC0;
|
||||
s32 D_80381EC4;
|
||||
u8 D_80381EC8[8];
|
||||
struct7s D_80381ED0;
|
||||
|
||||
/* .code */
|
||||
s32 func_802FFDE0(s32 arg0){
|
||||
|
@ -28,7 +28,7 @@ s32 func_802FFE04(void){
|
|||
return (5 - v1)*4;
|
||||
}
|
||||
|
||||
struct8s *func_802FFE4C(s32 item_id){
|
||||
struct7s *func_802FFE4C(s32 item_id){
|
||||
s32 i;
|
||||
|
||||
D_80381EB8 = 1.0f;
|
||||
|
|
|
@ -11,17 +11,34 @@ extern Gfx D_8036A918[];
|
|||
|
||||
extern f32 D_80377480;
|
||||
|
||||
extern f32 D_80381EFC;
|
||||
extern s32 D_80381F00;
|
||||
extern f32 D_80381F04;
|
||||
extern f32 D_80381F08[];
|
||||
extern struct8s D_80381F30;
|
||||
/* .bss */
|
||||
s32 D_80381EF0;
|
||||
f32 D_80381EF4;
|
||||
f32 D_80381EF8;
|
||||
f32 D_80381EFC;
|
||||
s32 D_80381F00;
|
||||
f32 D_80381F04;
|
||||
f32 D_80381F08[8];
|
||||
f32 D_80381F28;
|
||||
f32 D_80381F2C;
|
||||
struct7s D_80381F30;
|
||||
|
||||
/* .code */
|
||||
void func_80300C10(void) {
|
||||
s32 i;
|
||||
|
||||
D_80381EF8 = -272.0f;
|
||||
D_80381EF4 = 1.0f;
|
||||
D_80381EF0 = 0;
|
||||
for(i = 0; i < 8; i++){
|
||||
D_80381F08[i] = -64.0f;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_79C80/func_80300C10.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_79C80/func_80300C70.s")
|
||||
|
||||
struct8s *func_80300CD8(s32 item_id){
|
||||
struct7s *func_80300CD8(enum item_e item_id){
|
||||
func_80300C10();
|
||||
D_80381EFC = D_80377480;
|
||||
return &D_80381F30;
|
||||
|
@ -110,21 +127,3 @@ void func_80300D0C(enum item_e item_id, struct8s *arg1, Gfx **gfx, Mtx **mtx, Vt
|
|||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_79C80/func_803012F8.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_79C80/func_80301348.s")
|
||||
|
||||
//BREAK???
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_79C80/func_803016F0.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_79C80/func_80301754.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_79C80/func_8030179C.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_79C80/func_803017D0.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_79C80/func_80301CE0.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_79C80/func_80301D24.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_79C80/func_80301DBC.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_79C80/func_80301DE4.s")
|
||||
|
|
|
@ -0,0 +1,66 @@
|
|||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern BKSprite *D_8036A960;
|
||||
|
||||
/* .rodata */
|
||||
extern f64 D_803774A0;
|
||||
|
||||
/* .bss */
|
||||
s32 D_80381F50;
|
||||
f32 D_80381F54;
|
||||
f32 D_80381F58;
|
||||
f32 D_80381F5C;
|
||||
f32 D_80381F60;
|
||||
f32 D_80381F68[6];
|
||||
struct7s D_80381F80;
|
||||
|
||||
/* .code */
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_7A760/func_803016F0.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_7A760/func_80301754.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_7A760/func_8030179C.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_7A760/func_803017D0.s")
|
||||
|
||||
bool func_80301CE0(f32, s32, s32);
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_7A760/func_80301CE0.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_7A760/func_80301D24.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_7A760/func_80301DBC.s")
|
||||
|
||||
#ifndef NONMATCHING //probably just need .rodata defined
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_7A760/func_80301DE4.s")
|
||||
#else
|
||||
void func_80301DE4(enum item_e arg0, struct7s *arg1) {
|
||||
s32 temp_s0;
|
||||
s32 var_s0;
|
||||
|
||||
temp_s0 = func_802FB0D4(arg1);
|
||||
if (D_80381F50 == 0) {
|
||||
D_80381F60 = (f32) func_80301D24(itemPrint_getValue(arg0));
|
||||
}
|
||||
switch (temp_s0) {
|
||||
case 2:
|
||||
break;
|
||||
case 1:
|
||||
if (D_8036A960 == NULL) {
|
||||
D_8036A960 = (BKSprite *)assetcache_get(ASSET_7E5_SPRITE_WATER_HONEYCOMB);
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
func_80301754(arg0, arg1);
|
||||
break;
|
||||
}
|
||||
if (temp_s0 != 0) {
|
||||
for(var_s0 = 5; var_s0 >= 0; var_s0--){
|
||||
if (func_80301CE0(-15.0f, var_s0, 6)) {
|
||||
D_80381F68[var_s0] *= D_803774A0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
|
@ -74,7 +74,7 @@ extern s16 D_8036ABC0[];
|
|||
/* .rodata */
|
||||
|
||||
/* .bss */
|
||||
extern struct {
|
||||
struct {
|
||||
Cube *cube_list;
|
||||
f32 unk4;
|
||||
s32 min[3];
|
||||
|
@ -90,12 +90,16 @@ extern struct {
|
|||
s32 unk44;
|
||||
} D_80381FA0;
|
||||
|
||||
extern u8 D_80381FE8[];
|
||||
extern s32 D_803820B8[]; //ActorProp *, (maybe Prop *)
|
||||
extern s32 D_8038213C;
|
||||
extern s32 D_80382148;
|
||||
extern s16 D_80382150[];
|
||||
extern u32 D_803821E0[0x5B];
|
||||
u8 D_80381FE8[0x50];
|
||||
s32 D_80382038[0x20];
|
||||
s32 D_803820B8[0x20]; //ActorProp *, (maybe Prop *)
|
||||
s32 pad_80382138;
|
||||
s32 D_8038213C;
|
||||
s32 D_80382140;
|
||||
s32 D_80382144;
|
||||
s32 D_80382148;
|
||||
s16 D_80382150[0x48];
|
||||
u32 D_803821E0[0x5B];
|
||||
|
||||
|
||||
/* .code */
|
||||
|
@ -1710,16 +1714,12 @@ void func_80308D2C(Gfx **gfx, Mtx **mtx, Vtx **vtx) {
|
|||
func_8032F464(0);
|
||||
}
|
||||
|
||||
#ifndef NONMATCHING
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_7AF80/func_80308EC8.s")
|
||||
#else
|
||||
void func_80308EC8(void){
|
||||
s32 i;
|
||||
for(i = 0; i < 0x5B; i++){
|
||||
D_803821E0[i] = 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void func_80308F0C(Cube *cube) {
|
||||
s32 *temp_v1;
|
||||
|
|
|
@ -20,11 +20,16 @@ typedef struct{
|
|||
|
||||
BKModelBin *func_8030A428(s32 arg0);
|
||||
|
||||
/* .data */
|
||||
s32 D_8036B800;
|
||||
|
||||
/* .rodata */
|
||||
extern f32 D_80377730;
|
||||
|
||||
/* .bss */
|
||||
struct_7AF80_0 *D_80382390; //prop models ???
|
||||
struct_7AF80_1 *D_80382394; //prop_sprites ???
|
||||
|
||||
extern f32 D_80377730;
|
||||
|
||||
void func_8030A2D0(Gfx **gfx, Mtx **mtx, Vtx **vtx, f32 arg3[3], f32 arg4[3], f32 arg5, s32 arg6, Cube* arg7){
|
||||
BKModelBin * sp2C;
|
||||
|
|
|
@ -24,7 +24,7 @@ extern u8 D_80378430[];
|
|||
extern u8 D_80378434[];
|
||||
|
||||
/* .bss */
|
||||
extern u8 D_803823A0[];
|
||||
char D_803823A0[0x70];
|
||||
|
||||
/* .data */
|
||||
#ifndef NONMATCHING
|
||||
|
|
|
@ -6,8 +6,10 @@ extern void func_8024CE60(f32, f32);
|
|||
|
||||
extern struct48s D_8036BD40[];
|
||||
|
||||
/* .rodata */
|
||||
extern f32 D_80378440;
|
||||
|
||||
/* .bss */
|
||||
struct
|
||||
{
|
||||
struct48s *unk0;
|
||||
|
@ -16,6 +18,7 @@ struct
|
|||
f32 unk1C;
|
||||
}D_80382410;
|
||||
|
||||
/* .code */
|
||||
struct48s * func_8030B060(enum map_e map_id){
|
||||
struct48s * v1 = D_8036BD40;
|
||||
while(v1->map){
|
||||
|
|
|
@ -2,13 +2,16 @@
|
|||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern s16 *D_80382450;
|
||||
extern void *D_80382454;
|
||||
extern u8 D_803A5D00[2][0x1ecc0];
|
||||
|
||||
/* .data */
|
||||
extern Gfx D_8036C450[];
|
||||
extern Gfx D_8036C4A8[];
|
||||
|
||||
extern u8 D_803A5D00[2][0x1ecc0];
|
||||
/* .bss */
|
||||
s16 *D_80382450;
|
||||
void *D_80382454;
|
||||
|
||||
|
||||
/* .code */
|
||||
void func_8030C160(void){
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include "variables.h"
|
||||
|
||||
/* .bss */
|
||||
extern s32 D_80382460;
|
||||
s32 D_80382460;
|
||||
|
||||
/* .code */
|
||||
void func_8030C740(void){
|
||||
|
|
|
@ -55,7 +55,7 @@ int func_8030ED70(enum sfx_e uid);
|
|||
void func_8030EDAC(f32, f32);
|
||||
|
||||
/* .bss */
|
||||
struct46s D_80382470[16];
|
||||
struct46s D_80382470[10];
|
||||
struct45s D_803824C0[35];
|
||||
f32 D_80382E0C;
|
||||
f32 D_80382E10;
|
||||
|
|
|
@ -14,6 +14,7 @@ extern bool func_803188B4(gczoombox_t *);
|
|||
extern s8 D_8036C4D0[];
|
||||
extern f32 D_80378534;
|
||||
|
||||
/* .bss */
|
||||
struct {
|
||||
char output[0x100];
|
||||
u8 *unk100;
|
||||
|
@ -53,7 +54,7 @@ struct {
|
|||
s32 (* unk144)(ActorMarker *, s32, s32);
|
||||
struct14s unk148[4];
|
||||
} D_80382E20;
|
||||
extern char D_80382FF8[];
|
||||
char D_80382FF8[0x18];
|
||||
|
||||
/* .code */
|
||||
int func_8030EDC0(ActorMarker *caller, s32 arg1){
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
#include "variables.h"
|
||||
|
||||
|
||||
extern s16 D_803A5D00[2][0xF660];
|
||||
|
||||
extern Gfx D_8036C630[];
|
||||
extern Gfx D_8036C690[];
|
||||
|
||||
extern s32 D_803830A0;
|
||||
/* .bss */
|
||||
s32 D_803830A0;
|
||||
|
||||
extern s16 D_803A5D00[2][0xF660];
|
||||
|
||||
/* .code */
|
||||
#ifndef NONMATCHING
|
||||
|
|
|
@ -57,8 +57,10 @@ void func_8031A3E4(void);
|
|||
|
||||
extern u8 D_8036D940[];
|
||||
|
||||
extern Struct_Core2_91E10 *D_803830E0;
|
||||
/* .bss */
|
||||
Struct_Core2_91E10 *D_803830E0;
|
||||
|
||||
/* .code */
|
||||
void func_80318DA0(s8 *ptr, u8 min_indx, u8 max_indx, s32 min_value, s32 max_value){
|
||||
s32 i;
|
||||
s32 j;
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern struct{
|
||||
/* .bss */
|
||||
struct{
|
||||
u8 pad0[3];
|
||||
s8 unk3;
|
||||
u8 pad4[3];
|
||||
|
@ -10,7 +11,9 @@ extern struct{
|
|||
u8 pad8[4];
|
||||
struct1Cs *unkC;
|
||||
}D_803830F0;
|
||||
s32 D_80383100[20];
|
||||
|
||||
/* .code */
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_93C10/func_8031ABA0.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_93C10/func_8031ABF8.s")
|
||||
|
|
|
@ -3,18 +3,24 @@
|
|||
#include "variables.h"
|
||||
#include "structs.h"
|
||||
|
||||
extern s32 D_80383150;
|
||||
extern u8 D_80383158;
|
||||
s32 D_80383150;
|
||||
s32 pad_80383154;
|
||||
struct {
|
||||
u8 unk0;
|
||||
void *unk4;
|
||||
s32 unk8;
|
||||
}
|
||||
D_80383158;
|
||||
|
||||
s32 func_8031B5B0(void) {
|
||||
return D_80383158;
|
||||
return D_80383158.unk0;
|
||||
}
|
||||
|
||||
s32 func_8031B5BC(void){ return 1; }
|
||||
|
||||
void func_8031B5C4(s32 arg0) {
|
||||
if ((arg0 >= 0) && (arg0 < func_8031B5BC())) {
|
||||
D_80383158 = (s8) arg0;
|
||||
D_80383158.unk0 = (s8) arg0;
|
||||
}
|
||||
D_80383150 = 1;
|
||||
}
|
||||
|
@ -25,7 +31,7 @@ bool func_8031B604(char *arg0) {
|
|||
}
|
||||
|
||||
void func_8031B62C(void) {
|
||||
D_80383158 = (u8)0;
|
||||
D_80383158.unk0 = (u8)0;
|
||||
}
|
||||
|
||||
s32 func_8031B638(void) {
|
||||
|
|
|
@ -8,10 +8,19 @@ extern f32 func_8028EBA4(void);
|
|||
extern void projectile_getPosition(u8 arg0, f32 arg1[3]);
|
||||
extern void func_8033FC98(u8 arg0, s32 arg1);
|
||||
|
||||
/* .data */
|
||||
extern u8 D_803726D4[];
|
||||
extern f32 D_803726EC;
|
||||
|
||||
/* .rodata */
|
||||
extern f64 D_80379480;
|
||||
|
||||
extern f64 D_803794B0;
|
||||
|
||||
|
||||
/* .bss */
|
||||
// extern s32 D_803863E4;
|
||||
|
||||
void func_80354670(u8 arg0, s32 arg1) {
|
||||
func_8033FFE4(arg0, D_803726D4[arg1], D_803726D4[arg1]);
|
||||
func_8033FC34(arg0, ml_map_f(arg1, 0.0f, 8.0f, 40.0f, 255.0f));
|
||||
|
@ -47,7 +56,7 @@ void func_803546E8(void) {
|
|||
func_80344EE4(sp47, -700.0f, -22000.0f);
|
||||
func_802589E4(sp28, D_803726EC, 250.0f);
|
||||
sp28[1] = 250.0f;
|
||||
D_803726EC = mlNormalizeAngle((f32) ((f64) D_803726EC + D_80379480));
|
||||
D_803726EC = mlNormalizeAngle(D_803726EC + D_80379480);
|
||||
func_80344E3C(sp47, sp28);
|
||||
func_80344D94(sp47, sp34);
|
||||
temp_s0->unk20 = 0x14;
|
||||
|
@ -348,7 +357,7 @@ void func_803553E8(void) {
|
|||
|
||||
void func_80355548(void){}
|
||||
|
||||
//Static var not defined properly
|
||||
//matching but require .bss defined
|
||||
#ifdef NON_MATCHING
|
||||
void func_80355550(void) {
|
||||
static s32 D_803863E0;
|
||||
|
@ -432,7 +441,57 @@ void func_8035570C(void) {
|
|||
|
||||
void func_8035585C(void){}
|
||||
|
||||
#ifndef NONMATCHING //matching but require .bss defined
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_CD6E0/func_80355864.s")
|
||||
#else
|
||||
void func_80355864(void) {
|
||||
u8 sp5F;
|
||||
struct54s *sp58;
|
||||
u8 sp57;
|
||||
static s32 D_803863E4;
|
||||
f32 var_f2;
|
||||
Actor *sp4C;
|
||||
ParticleStruct0s *sp48;
|
||||
s32 sp44;
|
||||
f32 sp38[3];
|
||||
f32 sp2C[3];
|
||||
f32 sp28;
|
||||
|
||||
sp5F = func_8033E8D0();
|
||||
sp58 = func_8033E8F4();
|
||||
sp57 = func_8033E93C();
|
||||
sp4C = marker_getActor(func_8033E864());
|
||||
sp48 = func_8033E960();
|
||||
D_803863E4 = (D_803863E4 + 1) % 10;
|
||||
sp44 = (D_803863E4 == 0);
|
||||
sp38[0] = sp4C->position[0];
|
||||
sp38[1] = sp4C->position[1];
|
||||
sp38[2] = sp4C->position[2];
|
||||
sp48->unk0 = randf2(-10.0f, 10.0f);
|
||||
sp48->unk4 = (f32) ((randf() * 45.0f) + 10.0f);
|
||||
sp48->unk8 = randf2(-10.0f, 10.0f);
|
||||
projectile_setSprite(sp5F, 0x713);
|
||||
projectile_setPosition(sp5F, &sp38);
|
||||
func_8033FCD8(sp5F, 0xC);
|
||||
func_80287E9C(sp58);
|
||||
func_80287F7C(sp58, 3);
|
||||
func_80287FD0(sp58, (sp44)? 16.0 : 3.0);
|
||||
func_80344E18(sp57, 5);
|
||||
func_80344EE4(sp57, -700.0f, -22000.0f);
|
||||
sp28 = (sp44) ? randf2(-75.0f, 75.0f) + 400.0f
|
||||
: randf2(-50.0f, 50.0f) + 250.0f;
|
||||
|
||||
func_802589E4(sp2C, D_803726EC, sp28);
|
||||
sp2C[1] = sp28 * ((sp44 * 0.5) + 1.0);
|
||||
D_803726EC = mlNormalizeAngle(D_803726EC + D_803794B0);
|
||||
func_80344E3C(sp57, sp2C);
|
||||
func_80344D94(sp57, sp38);
|
||||
sp48->unk20 = 0x14;
|
||||
sp48->unk24 = sp44;
|
||||
sp48->unk28 = 1;
|
||||
func_80354670(sp5F, 0x14);
|
||||
}
|
||||
#endif;
|
||||
|
||||
void func_80355B00(void) {
|
||||
ParticleStruct0s *sp44;
|
||||
|
|
|
@ -18,9 +18,9 @@ extern Gfx D_803688E8[] = {
|
|||
}; //_gcBoundDisplayList
|
||||
|
||||
/* .bss */
|
||||
extern u8 _gcbound_red; //D_80380900
|
||||
extern u8 _gcbound_green; //D_80380901
|
||||
extern u8 _gcbound_blue; //D_80380902
|
||||
u8 _gcbound_red; //D_80380900
|
||||
u8 _gcbound_green; //D_80380901
|
||||
u8 _gcbound_blue; //D_80380902
|
||||
|
||||
/* .code */
|
||||
void _gcbound_draw(Gfx** dl, s32 a, s32 r, s32 g, s32 b){
|
||||
|
|
|
@ -37,8 +37,8 @@ extern const char D_8036C618[] = "";
|
|||
extern int D_8036C620;
|
||||
|
||||
|
||||
|
||||
extern struct{
|
||||
/* .bss */
|
||||
struct{
|
||||
u32 unk0_31:8; //menu state
|
||||
u32 unk0_23:8;
|
||||
u32 unk0_15:8; //menu page
|
||||
|
@ -83,9 +83,9 @@ extern struct{
|
|||
u32 unk70_29:1;
|
||||
u32 pad70_28:29;
|
||||
}D_80383010;
|
||||
char D_80383088[0x18];
|
||||
|
||||
extern char D_80383088[];
|
||||
|
||||
/* public */
|
||||
void func_803129DC(s32,s32);
|
||||
void func_803184C8(gczoombox_t *, f32, s32, s32, f32, s32, s32);
|
||||
void func_80318640(gczoombox_t *, s32, f32, f32, s32);
|
||||
|
|
|
@ -9,6 +9,16 @@ void func_8025AC20(s32, s32, s32, f32, char*, s32);
|
|||
f32 func_80257618(void);
|
||||
void func_8024CE60(f32, f32);
|
||||
|
||||
|
||||
/* .data */
|
||||
extern struct9s D_8036C150[0x16];
|
||||
extern struct9s D_8036C308[0xC];
|
||||
extern struct10s D_8036C3F8[0x18];
|
||||
extern f32 D_8036C440;
|
||||
extern f32 D_8036C444;
|
||||
|
||||
|
||||
/* .bss */
|
||||
struct{
|
||||
s32 unk0; //times drawn?
|
||||
struct9s *unk4;
|
||||
|
@ -21,12 +31,7 @@ struct{
|
|||
s32 unk1C; //times update called?
|
||||
} D_80382430;
|
||||
|
||||
extern struct9s D_8036C150[0x16];
|
||||
extern struct9s D_8036C308[0xC];
|
||||
extern struct10s D_8036C3F8[0x18];
|
||||
extern f32 D_8036C440;
|
||||
extern f32 D_8036C444;
|
||||
|
||||
/* .code */
|
||||
struct9s *_gctranstion_8030B400(s32 arg0){
|
||||
struct9s * i;
|
||||
for(i = D_8036C150; i->uid != 0; i++){
|
||||
|
|
|
@ -423,7 +423,7 @@ gczoomboxPortraitInfo D_8036C6C0[] = {
|
|||
s32 D_8036D924[] = { 70, 35, 18, 9, 4, 2, 1};
|
||||
|
||||
/* .bss */
|
||||
extern u8 D_803830B0[];
|
||||
char D_803830B0[0x30];
|
||||
|
||||
void func_8030DA44(u8);
|
||||
void func_80338338(s32, s32, s32);
|
||||
|
|
|
@ -8,9 +8,9 @@ void mapSpecificFlags_set(s32 i, s32 val);
|
|||
extern u32 D_80367000;
|
||||
|
||||
/* .bss */
|
||||
extern u32 D_8037DDE0;
|
||||
extern u32 D_8037DDE4;
|
||||
extern u32 D_8037DDE8;
|
||||
u32 D_8037DDE0;
|
||||
u32 D_8037DDE4;
|
||||
u32 D_8037DDE8;
|
||||
|
||||
/* .code */
|
||||
u32 _mapSpecificFlags_calcCRC1(void){
|
||||
|
|
|
@ -231,6 +231,8 @@ segments:
|
|||
- [0x5B6A0, c, code_5B6A0]
|
||||
- [0x5BD90, c, code_5BD90] #DONE
|
||||
- [0x5BEB0, c, code_5BEB0]
|
||||
- [0x5C240, c, code_5C240]
|
||||
- [0x5C870, c, code_5C870]
|
||||
- [0x5DBC0, c, code_5DBC0]
|
||||
- [0x5FD80, c, code_5FD80] #DONE
|
||||
- [0x5FD90, c, code_5FD90]
|
||||
|
@ -247,6 +249,7 @@ segments:
|
|||
- [0x66FB0, c, code_66FB0] #DONE
|
||||
- [0x67490, c, gc/bound] #DONE
|
||||
- [0x67650, c, code_67650]
|
||||
- [0x679A0, c, code_679A0]
|
||||
- [0x69F60, c, code_69F60] #DONE
|
||||
- [0x6A4B0, c, code_6A4B0] #DONE
|
||||
- [0x6AEF0, c, code_6AEF0] #DONE
|
||||
|
@ -267,6 +270,8 @@ segments:
|
|||
- [0x74090, c, code_74090] #DONE
|
||||
- [0x74290, c, code_74290] #DONE
|
||||
- [0x74420, c, code_74420]
|
||||
- [0x74910, c, code_74910]
|
||||
- [0x74ED0, c, code_74ED0]
|
||||
- [0x75480, c, code_75480]
|
||||
- [0x75930, c, code_75930]
|
||||
- [0x75E90, c, code_75E90]
|
||||
|
@ -278,6 +283,7 @@ segments:
|
|||
- [0x78E50, c, code_78E50]
|
||||
- [0x79830, c, fxcommon3score] #DONE
|
||||
- [0x79C80, c, code_79C80]
|
||||
- [0x7A760, c, code_7A760]
|
||||
- [0x7AF80, c, code_7AF80]
|
||||
- [0x82000, c, code_82000]
|
||||
- [0x83340, c, code_83340]
|
||||
|
@ -673,7 +679,7 @@ segments:
|
|||
#- [0xEF480, .rodata, code_41FB0] #temp
|
||||
- [0xEF480, bin, data_EF480]
|
||||
- [0xEF4C0, .rodata, ch/musicnote]
|
||||
- [0xEF4D0, .rodata, code_42CB0]
|
||||
- [0xEF4D0, .rodata, code_42CB0] #DONE
|
||||
- [0xEF4E0, bin, data_EF4E0]
|
||||
- [0xEF500, .rodata, code_440B0]
|
||||
- [0xEF550, .rodata, code_45310]
|
||||
|
@ -709,12 +715,11 @@ segments:
|
|||
- [0xF0140, .rodata, code_5B6A0]
|
||||
- [0xF0160, bin, data_F0160] #.rodata, code_5B6A0]
|
||||
- [0xF0170, bin, data_F0170]
|
||||
#- [0xF0180, .rodata, code_5BEB0]
|
||||
- [0xF0180, bin, data_F0180]
|
||||
- [0xF01F0, bin, data_F01F0] #.rodata, code_5FD90]
|
||||
- [0xF0200, .rodata, code_66FB0]
|
||||
- [0xF0210, bin, data_F0210]
|
||||
- [0xF0220, .rodata, code_67650]
|
||||
- [0xF0220, .rodata, code_679A0]
|
||||
- [0xF0240, bin, data_F0240]
|
||||
- [0xF0280, .rodata, code_6CEC0]
|
||||
- [0xF0290, .rodata, code_6D030]
|
||||
|
@ -935,5 +940,78 @@ segments:
|
|||
- [0xf2c00, .bss, code_3B5C0]
|
||||
- [0xf2c00, .bss, ch/gameSelect]
|
||||
- [0xf2c00, .bss, code_41460]
|
||||
# - [0xf2c00, .bss, code_CD6E0] //D_803863E0
|
||||
- [0xf2c00, .bss, code_41FB0]
|
||||
- [0xf2c00, .bss, code_42CB0]
|
||||
- [0xf2c00, .bss, mapspecificflags]
|
||||
- [0xf2c00, .bss, code_4A6F0]
|
||||
- [0xf2c00, .bss, code_4C020]
|
||||
- [0xf2c00, .bss, ch/badShad]
|
||||
- [0xf2c00, .bss, ch/climbBase]
|
||||
- [0xf2c00, .bss, code_55390]
|
||||
- [0xf2c00, .bss, code_556C0]
|
||||
- [0xf2c00, .bss, code_55850]
|
||||
- [0xf2c00, .bss, code_55A90]
|
||||
- [0xf2c00, .bss, code_55BC0]
|
||||
- [0xf2c00, .bss, code_55E70]
|
||||
- [0xf2c00, .bss, code_560F0]
|
||||
- [0xf2c00, .bss, code_57C70]
|
||||
- [0xf2c00, .bss, code_581D0]
|
||||
- [0xf2c00, .bss, code_584D0]
|
||||
- [0xf2c00, .bss, code_59A80]
|
||||
- [0xf2c00, .bss, code_59D40]
|
||||
- [0xf2c00, .bss, code_5B6A0]
|
||||
- [0xf2c00, .bss, code_5BEB0]
|
||||
- [0xf2c00, .bss, code_5C240]
|
||||
- [0xf2c00, .bss, code_5C870]
|
||||
- [0xf2c00, .bss, code_5DBC0]
|
||||
- [0xf2c00, .bss, code_5FD90]
|
||||
- [0xf2c00, .bss, code_637D0]
|
||||
- [0xf2c00, .bss, code_654C0]
|
||||
- [0xf2c00, .bss, code_66D90]
|
||||
- [0xf2c00, .bss, gc/bound]
|
||||
- [0xf2c00, .bss, code_67650]
|
||||
- [0xf2c00, .bss, code_679A0]
|
||||
- [0xf2c00, .bss, code_69F60]
|
||||
- [0xf2c00, .bss, code_6AEF0]
|
||||
- [0xf2c00, .bss, code_6B030]
|
||||
- [0xf2c00, .bss, code_6C3E0]
|
||||
- [0xf2c00, .bss, code_6CD20]
|
||||
- [0xf2c00, .bss, code_6CEC0]
|
||||
- [0xf2c00, .bss, code_6D030]
|
||||
- [0xf2c00, .bss, code_6D270]
|
||||
- [0xf2c00, .bss, code_6DA30]
|
||||
- [0xf2c00, .bss, code_6DA30]
|
||||
- [0xf2c00, .bss, code_70C30]
|
||||
- [0xf2c00, .bss, code_72060]
|
||||
- [0xf2c00, .bss, code_72B10]
|
||||
- [0xf2c00, .bss, code_73640]
|
||||
- [0xf2c00, .bss, code_74420]
|
||||
- [0xf2c00, .bss, code_74910]
|
||||
- [0xf2c00, .bss, code_74ED0]
|
||||
- [0xf2c00, .bss, code_75480]
|
||||
- [0xf2c00, .bss, code_75930]
|
||||
- [0xf2c00, .bss, code_75E90]
|
||||
- [0xf2c00, .bss, code_76390]
|
||||
- [0xf2c00, .bss, code_76D90]
|
||||
- [0xf2c00, .bss, code_78100]
|
||||
- [0xf2c00, .bss, code_78E50]
|
||||
- [0xf2c00, .bss, code_79C80]
|
||||
- [0xf2c00, .bss, code_7A760]
|
||||
- [0xf2c00, .bss, code_7AF80]
|
||||
- [0xf2c00, .bss, code_82000]
|
||||
- [0xf2c00, .bss, code_83340]
|
||||
- [0xf2c00, .bss, code_83D70]
|
||||
- [0xf2c00, .bss, code_840D0]
|
||||
- [0xf2c00, .bss, gc/transition]
|
||||
- [0xf2c00, .bss, code_851D0]
|
||||
- [0xf2c00, .bss, code_857B0]
|
||||
- [0xf2c00, .bss, code_85800]
|
||||
- [0xf2c00, .bss, code_87E30]
|
||||
- [0xf2c00, .bss, gc/pauseMenu]
|
||||
- [0xf2c00, .bss, code_8DC20]
|
||||
- [0xf2c00, .bss, gc/zoombox]
|
||||
- [0xf2c00, .bss, code_91E10]
|
||||
- [0xf2c00, .bss, code_93C10]
|
||||
- [0xf2c00, .bss, code_94620]
|
||||
# - [0xf2c00, .bss, code_CD6E0] # D_803863E0
|
||||
- [0xf2c00] # core2 end
|
||||
|
|
Loading…
Reference in New Issue