diff --git a/decompressed.us.v10.yaml b/decompressed.us.v10.yaml index b1603c6d..37332817 100644 --- a/decompressed.us.v10.yaml +++ b/decompressed.us.v10.yaml @@ -749,15 +749,15 @@ segments: - [0xFCADE0, c, code_75480] #DONE - [0xFCB290, c, code_75930] #DONE - [0xFCB7F0, c, code_75E90] #DONE - - [0xFCBCF0, c, code_76390] #DONE - - [0xFCBD30, c, code_763D0] #DONE - - [0xFCC6F0, c, code_76D90] #DONE + - [0xFCBCF0, c, fx/common1score] #DONE + - [0xFCBD30, c, fx/common2score] #DONE + - [0xFCC6F0, c, fx/honeycarrierscore] #DONE - [0xFCD7B0, c, code_77E50] #DONE - - [0xFCDA60, c, code_78100] #DONE - - [0xFCE7B0, c, code_78E50] #DONE - - [0xFCF190, c, fxcommon3score] #DONE - - [0xFCF5E0, c, code_79C80] #DONE - - [0xFD00C0, c, code_7A760] #DONE + - [0xFCDA60, c, fx/jinjoscore] #DONE + - [0xFCE7B0, c, fx/lifescore] #DONE + - [0xFCF190, c, fx/common3score] #DONE + - [0xFCF5E0, c, fx/healthscore] #DONE + - [0xFD00C0, c, fx/airscore] #DONE - [0xFD08E0, c, code_7AF80] - [0xFD7960, c, mapModel] #DONE - [0xFD8CA0, c, code_83340] #DONE @@ -1026,13 +1026,13 @@ segments: - [0x1038260, .data, code_75480] - [0x1038290, .data, code_75930] - [0x10382C0, .data, code_75E90] - - [0x10382F0, .data, code_763D0] - - [0x10389E0, .data, code_76D90] - - [0x1038A40, .data, code_78100] - - [0x1038C30, .data, code_78E50] - - [0x1038C80, .data, fxcommon3score] - - [0x10392E0, .data, code_79C80] - - [0x1039330, .data, code_7A760] + - [0x10382F0, .data, fx/common2score] + - [0x10389E0, .data, fx/honeycarrierscore] + - [0x1038A40, .data, fx/jinjoscore] + - [0x1038C30, .data, fx/lifescore] + - [0x1038C80, .data, fx/common3score] + - [0x10392E0, .data, fx/healthscore] + - [0x1039330, .data, fx/airscore] - [0x1039380, .data, code_7AF80] - [0x10395B0, .data, mapModel] - [0x103A1D0, .data, code_83340] @@ -1271,13 +1271,13 @@ segments: - [0x1045D10, .rodata, code_72060] - [0x1045D30, .rodata, code_73640] - [0x1045D60, .rodata, code_74420] - - [0x1045D70, .rodata, code_763D0] - - [0x1045D80, .rodata, code_76D90] - - [0x1045DD0, .rodata, code_78100] - - [0x1045E00, .rodata, code_78100] - - [0x1045E30, .rodata, fxcommon3score] - - [0x1045E50, .rodata, code_79C80] - - [0x1045E60, .rodata, code_7A760] + - [0x1045D70, .rodata, fx/common2score] + - [0x1045D80, .rodata, fx/honeycarrierscore] + - [0x1045DD0, .rodata, fx/jinjoscore] + - [0x1045E00, .rodata, fx/jinjoscore] + - [0x1045E30, .rodata, fx/common3score] + - [0x1045E50, .rodata, fx/healthscore] + - [0x1045E60, .rodata, fx/airscore] - [0x1045E80, .rodata, code_7AF80] - [0x1045F40, .rodata, mapModel] - [0x1046100, .rodata, code_83340] @@ -1535,12 +1535,12 @@ segments: - [0x1048560, .bss, code_75480] - [0x1048560, .bss, code_75930] - [0x1048560, .bss, code_75E90] - - [0x1048560, .bss, code_76390] - - [0x1048560, .bss, code_76D90] - - [0x1048560, .bss, code_78100] - - [0x1048560, .bss, code_78E50] - - [0x1048560, .bss, code_79C80] - - [0x1048560, .bss, code_7A760] + - [0x1048560, .bss, fx/common1score] + - [0x1048560, .bss, fx/honeycarrierscore] + - [0x1048560, .bss, fx/jinjoscore] + - [0x1048560, .bss, fx/lifescore] + - [0x1048560, .bss, fx/healthscore] + - [0x1048560, .bss, fx/airscore] - [0x1048560, .bss, code_7AF80] - [0x1048560, .bss, mapModel] - [0x1048560, .bss, code_83340] diff --git a/include/functions.h b/include/functions.h index 6541fc01..84dc3111 100644 --- a/include/functions.h +++ b/include/functions.h @@ -180,36 +180,36 @@ void fxcommon2score_update(s32, struct8s *); void fxcommon2score_draw(enum item_e, struct8s *, Gfx**, Mtx**, Vtx **); void fxcommon2score_free(enum item_e, struct8s *); -struct7s *func_802FDE2C(s32); -void func_802FE844(s32, struct8s *); -void func_802FDEE0(s32, struct8s *, Gfx**, Mtx**, Vtx **); -void func_802FDDC4(s32, struct8s *); +struct7s *fxhoneycarrierscore_new(s32); +void fxhoneycarrierscore_update(s32, struct8s *); +void fxhoneycarrierscore_draw(s32, struct8s *, Gfx**, Mtx**, Vtx **); +void fxhoneycarrierscore_free(s32, struct8s *); -struct7s *func_802FF090(enum item_e); +struct7s *fxjinjoscore_new(enum item_e); void fxjinjoscore_update(enum item_e, struct8s *); void fxjinjoscore_draw(s32, struct8s *, Gfx**, Mtx**, Vtx **); void fxjinjoscore_free(enum item_e, struct8s *); -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 *); +struct7s *fxlifescore_new(s32); +void fxlifescore_update(enum item_e, struct8s *); +void fxlifescore_draw(enum item_e, struct8s *, Gfx**, Mtx**, Vtx **); +void fxlifescore_free(s32, struct8s *); void *fxcommon3score_new(enum item_e); 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 *); -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(enum item_e, struct8s *); +struct7s *fxhealthscore_new(enum item_e); +void fxhealthscore_update(enum item_e, struct8s *); +void fxhealthscore_draw(enum item_e item_id, struct8s *arg1, Gfx **gfx, Mtx **mtx, Vtx **vtx); +void fxhealthscore_free(enum item_e, struct8s *); -struct7s *func_8030179C(s32); -void func_80301DE4(enum item_e, struct7s *); -void func_803017D0(enum item_e, struct8s *, Gfx**, Mtx**, Vtx **); -void func_80301754(s32, struct8s *); +struct7s *fxairscore_new(s32); +void fxairscore_update(enum item_e, struct7s *); +void fxairscore_draw(enum item_e, struct8s *, Gfx**, Mtx**, Vtx **); +void fxairscore_free(s32, struct8s *); diff --git a/src/core2/code_14420.c b/src/core2/code_14420.c index bcc41c45..b7a8fc7a 100644 --- a/src/core2/code_14420.c +++ b/src/core2/code_14420.c @@ -781,17 +781,17 @@ void func_8029C848(AnimCtrl *arg0) { break; case TRANSFORM_3_PUMPKIN: //L8029C8A0 - animctrl_setIndex(arg0, 0xA0); + animctrl_setIndex(arg0, ASSET_A0_ANIM_BSPUMPKIN_WALK); animctrl_setDuration(arg0, 0.8f); break; case TRANSFORM_5_CROC: //L8029C8C4 - animctrl_setIndex(arg0, 0xE1); + animctrl_setIndex(arg0, ASSET_E1_ANIM_BSCROC_IDLE); animctrl_setDuration(arg0, 1.0f); break; case TRANSFORM_4_WALRUS: //L8029C8E4 - animctrl_setIndex(arg0, 0x11F); + animctrl_setIndex(arg0, ASSET_11F_ANIM_BSWALRUS_IDLE); animctrl_setDuration(arg0, 1.0f); break; @@ -803,11 +803,11 @@ void func_8029C848(AnimCtrl *arg0) { case TRANSFORM_1_BANJO: default: if (player_inWater()) { - animctrl_setIndex(arg0, 0x57); + animctrl_setIndex(arg0, ASSET_57_ANIM_BSSWIM_IDLE); animctrl_setDuration(arg0, 1.2f); } else{ - animctrl_setIndex(arg0, 0x6F); + animctrl_setIndex(arg0, ASSET_6F_ANIM_BSSTAND_IDLE); animctrl_setDuration(arg0, 5.5f); } break; diff --git a/src/core2/code_73640.c b/src/core2/code_73640.c index 058dc89f..e1f5e94f 100644 --- a/src/core2/code_73640.c +++ b/src/core2/code_73640.c @@ -58,12 +58,12 @@ ItemPrint D_803692F8[0x2C] = { { fxcommon2score_new, fxcommon2score_update, fxcommon2score_draw, fxcommon2score_free, 1, NULL }, //ITEM_F_RED_FEATHER { fxcommon2score_new, fxcommon2score_update, fxcommon2score_draw, fxcommon2score_free, 1, NULL }, //ITEM_10_GOLD_FEATHER { fxcommon1score_new, fxcommon1score_update, fxcommon1score_draw, fxcommon1score_free, 0, NULL }, //17 - { func_802FF090, fxjinjoscore_update, fxjinjoscore_draw, fxjinjoscore_free, 3, NULL }, //ITEM_12_JINJOS - { func_802FDE2C, func_802FE844, func_802FDEE0, func_802FDDC4, 0, NULL }, //ITEM_13_EMPTY_HONEYCOMB - { func_80300CD8, func_80301348, func_80300D0C, func_80300C70, 0, NULL }, //ITEM_14_HEALTH + { fxjinjoscore_new, fxjinjoscore_update, fxjinjoscore_draw, fxjinjoscore_free, 3, NULL }, //ITEM_12_JINJOS + { fxhoneycarrierscore_new, fxhoneycarrierscore_update, fxhoneycarrierscore_draw, fxhoneycarrierscore_free, 0, NULL }, //ITEM_13_EMPTY_HONEYCOMB + { fxhealthscore_new, fxhealthscore_update, fxhealthscore_draw, fxhealthscore_free, 0, NULL }, //ITEM_14_HEALTH { fxcommon1score_new, fxcommon1score_update, fxcommon1score_draw, fxcommon1score_free, 0, NULL }, //ITEM_15_HEALTH_TOTAL - { func_802FFE4C, func_803005BC, func_802FFF34, func_802FFED4, 6, NULL }, //ITEM_16_LIFE - { func_8030179C, func_80301DE4, func_803017D0, func_80301754, 0, NULL }, //ITEM_17_AIR + { fxlifescore_new, fxlifescore_update, fxlifescore_draw, fxlifescore_free, 6, NULL }, //ITEM_16_LIFE + { fxairscore_new, fxairscore_update, fxairscore_draw, fxairscore_free, 0, NULL }, //ITEM_17_AIR { fxcommon3score_new, fxcommon3score_update, fxcommon3score_draw, fxcommon3score_free, 2, NULL }, //ITEM_18_GOLD_BULLIONS { fxcommon3score_new, fxcommon3score_update, fxcommon3score_draw, fxcommon3score_free, 2, NULL }, //ITEM_19_ORANGE { fxcommon2score_new, fxcommon2score_update, fxcommon2score_draw, fxcommon2score_free, 6, NULL }, //ITEM_1A_PLAYER_VILE_SCORE diff --git a/src/core2/code_7AF80.c b/src/core2/code_7AF80.c index 05d0fbd3..bd4501c4 100644 --- a/src/core2/code_7AF80.c +++ b/src/core2/code_7AF80.c @@ -8,7 +8,7 @@ extern f32 ml_distanceSquared_vec3f(f32[3], f32[3]); extern f32 func_802586B0(f32[3], f32[3]); extern void mapModel_getCubeBounds(s32 min[3], s32 max[3]); extern f32 func_803243D0(struct56s *arg0, f32 arg1[3]); -extern void func_802CAF14(u32*, s32, bool); +extern void bitfield_setBit(u32*, s32, bool); extern void func_8032D510(Cube *, Gfx **, Mtx **, Vtx **); extern ActorProp *func_803322F0(Cube *, ActorMarker *, f32, s32, s32 *); extern BKCollisionTri *func_803319C0(Cube *cube, f32 position[3], f32 radius, f32 arg2[3], u32 flags); @@ -775,7 +775,7 @@ void cubeList_free(void){ cube_free(D_80381FA0.unk40); free(D_80381FA0.unk40); } - func_802CAEF4(D_8036A9E0); + bitfield_free(D_8036A9E0); D_8036A9E0 = NULL; } @@ -867,7 +867,7 @@ void cubeList_init(void){ D_80381FA0.unk4 = 200.0f; } func_80320B24(func_803036A0, func_80303960, func_80303AF0); - D_8036A9E0 = func_802CAEBC(0xF0); + D_8036A9E0 = bitfield_new(0xF0); func_8032E070(); } @@ -905,7 +905,7 @@ void cubeList_fromFile(Struct61s *file_ptr) { } } func_8034AF98(file_ptr, 0); - func_802CAFA8(D_8036A9E0, 0); + bitfield_setAll(D_8036A9E0, 0); for(sp5C[0] = sp50[0]; sp5C[0] <= sp44[0]; sp5C[0]++){ for(sp5C[1] = sp50[1]; sp5C[1] <= sp44[1]; sp5C[1]++){ for(sp5C[2] = sp50[2]; sp5C[2] <= sp44[2]; sp5C[2]++){ @@ -913,7 +913,7 @@ void cubeList_fromFile(Struct61s *file_ptr) { if (cube->unk0_4) { for(iPtr = cube->prop1Ptr; iPtr < &cube->prop1Ptr[cube->unk0_4] ;iPtr++){ if (!iPtr->unk6.bit0) { - func_802CAF14(D_8036A9E0, iPtr->unkA, 1); + bitfield_setBit(D_8036A9E0, iPtr->unkA, 1); } } } @@ -2030,7 +2030,7 @@ Cube **func_80307948(s32 arg0[3]) { // s32 i; // temp_s4 = D_8036A9E4[marker->unk14_20]; -// if ((temp_s4 != 0xFF) && (func_802CAF70(D_8036A9E0, temp_s4) == 1)) { +// if ((temp_s4 != 0xFF) && (bitfield_isBitSet(D_8036A9E0, temp_s4) == 1)) { // func_8032E010(marker->propPtr, sp58); // var_s2 = func_80307948(sp58); // var_a0 = *var_s2; diff --git a/src/core2/code_E910.c b/src/core2/code_E910.c index a69a61b2..ac20bae5 100644 --- a/src/core2/code_E910.c +++ b/src/core2/code_E910.c @@ -241,18 +241,18 @@ void func_80295A8C(void){ void func_80295B04(void){ f32 sp24; enum bs_e sp20 = bs_getState(); - int tmp_a1; + bool is_in_talon_trot; sp24 = (bslongleg_inSet(sp20)) ? func_80291670(2) : 0.0f; func_8029A968(sp24); sp24 = 0.0f; - tmp_a1 = 0; + is_in_talon_trot = FALSE; if(bsbtrot_inSet(sp20)){ sp24 = func_80291670(3); - tmp_a1 = 1; + is_in_talon_trot = TRUE; } - func_8029A980(tmp_a1); + func_8029A980(is_in_talon_trot); func_8029A974(sp24); bs_setState(BS_5A_LOADZONE); baMarker_free(); diff --git a/src/core2/code_EF50.c b/src/core2/code_EF50.c index 57613146..0dc9fd39 100644 --- a/src/core2/code_EF50.c +++ b/src/core2/code_EF50.c @@ -75,7 +75,7 @@ enum bs_e func_80295EE0(enum bs_e arg0){ return arg0; } -enum bs_e func_80296038(void){ +enum bs_e __get_rebound_state_id(void){ switch(_player_getTransformation()){ case TRANSFORM_3_PUMPKIN:// L8029606C return BS_PUMPKIN_BOUNCE; @@ -312,22 +312,22 @@ void func_80296608(void){ break; case BS_INTR_24: //L802966B8 func_802960C4(0); - next_state = func_80296038(); + next_state = __get_rebound_state_id(); sp2C = 2; break; case BS_INTR_23: //L802966D8 func_802960C4(1); - next_state = func_80296038(); + next_state = __get_rebound_state_id(); sp2C = 2; break; case BS_INTR_2D: //L802966F8 func_802960C4(3); - next_state = func_80296038(); + next_state = __get_rebound_state_id(); sp2C = 2; break; case BS_INTR_5: //L80296718 func_802961B4(0); - next_state = func_80296038(); + next_state = __get_rebound_state_id(); sp2C = 2; break; case BS_INTR_2C: //L80296738 diff --git a/src/core2/code_7A760.c b/src/core2/fx/airscore.c similarity index 93% rename from src/core2/code_7A760.c rename to src/core2/fx/airscore.c index 08854c16..16c23fc2 100644 --- a/src/core2/code_7A760.c +++ b/src/core2/fx/airscore.c @@ -38,7 +38,7 @@ void func_803016F0(void) { } } -void func_80301754(s32 arg0, struct8s *arg1) { +void fxairscore_free(s32 arg0, struct8s *arg1) { if (D_8036A960 != NULL) { func_8033BD4C(D_8036A960); D_8036A960 = NULL; @@ -46,13 +46,13 @@ void func_80301754(s32 arg0, struct8s *arg1) { func_803016F0(); } -struct7s *func_8030179C(s32 arg0) { +struct7s *fxairscore_new(s32 arg0) { func_803016F0(); D_80381F5C = 0.68f; return &D_80381F80; } -void func_803017D0(enum item_e item_id, struct8s *arg1, Gfx **gfx, Mtx **mtx, Vtx **vtx) { +void fxairscore_draw(enum item_e item_id, struct8s *arg1, Gfx **gfx, Mtx **mtx, Vtx **vtx) { f32 temp_f16; f32 var_f14; s32 spD4; @@ -123,7 +123,7 @@ s32 func_80301DBC(s32 minutes) { return (s32) (minutes * 60 * 60) / 6; } -void func_80301DE4(enum item_e arg0, struct7s *arg1) { +void fxairscore_update(enum item_e arg0, struct7s *arg1) { s32 temp_s0; s32 var_s0; @@ -140,7 +140,7 @@ void func_80301DE4(enum item_e arg0, struct7s *arg1) { } break; case 0: - func_80301754(arg0, arg1); + fxairscore_free(arg0, arg1); break; } if (temp_s0 != 0) { diff --git a/src/core2/code_76390.c b/src/core2/fx/common1score.c similarity index 100% rename from src/core2/code_76390.c rename to src/core2/fx/common1score.c diff --git a/src/core2/code_763D0.c b/src/core2/fx/common2score.c similarity index 100% rename from src/core2/code_763D0.c rename to src/core2/fx/common2score.c diff --git a/src/core2/fxcommon3score.c b/src/core2/fx/common3score.c similarity index 100% rename from src/core2/fxcommon3score.c rename to src/core2/fx/common3score.c diff --git a/src/core2/code_79C80.c b/src/core2/fx/healthscore.c similarity index 94% rename from src/core2/code_79C80.c rename to src/core2/fx/healthscore.c index 3c500c40..5c45bf41 100644 --- a/src/core2/code_79C80.c +++ b/src/core2/fx/healthscore.c @@ -45,7 +45,7 @@ void func_80300C10(void) { } } -void func_80300C70(enum item_e item_id, struct8s *arg1){ +void fxhealthscore_free(enum item_e item_id, struct8s *arg1){ s32 temp_a0; s32 temp_a0_2; @@ -60,13 +60,13 @@ void func_80300C70(enum item_e item_id, struct8s *arg1){ func_80300C10(); } -struct7s *func_80300CD8(enum item_e item_id){ +struct7s *fxhealthscore_new(enum item_e item_id){ func_80300C10(); D_80381EFC = 0.68f; return &D_80381F30; } -void func_80300D0C(enum item_e item_id, struct8s *arg1, Gfx **gfx, Mtx **mtx, Vtx **vtx){ +void fxhealthscore_draw(enum item_e item_id, struct8s *arg1, Gfx **gfx, Mtx **mtx, Vtx **vtx){ int i; int tmp_v1; s32 spEC; @@ -142,7 +142,7 @@ void func_803012F8(void) { } -void func_80301348(enum item_e item_id, struct8s *arg1) { +void fxhealthscore_update(enum item_e item_id, struct8s *arg1) { f32 temp_f20; s32 var_s0; s32 sp2C; @@ -209,7 +209,7 @@ void func_80301348(enum item_e item_id, struct8s *arg1) { break; case 0: - func_80300C70(item_id, arg1); + fxhealthscore_free(item_id, arg1); break; } if (sp2C) { diff --git a/src/core2/code_76D90.c b/src/core2/fx/honeycarrierscore.c similarity index 96% rename from src/core2/code_76D90.c rename to src/core2/fx/honeycarrierscore.c index c211343e..0acbc063 100644 --- a/src/core2/code_76D90.c +++ b/src/core2/fx/honeycarrierscore.c @@ -63,7 +63,7 @@ void func_802FDD20(void) { D_803815E8 = 0x50; } -void func_802FDDC4(s32 arg0, struct8s *arg1){ +void fxhoneycarrierscore_free(s32 arg0, struct8s *arg1){ if(D_8036A010){ func_8033BD4C(D_8036A010); D_8036A010 = NULL; @@ -75,7 +75,7 @@ void func_802FDDC4(s32 arg0, struct8s *arg1){ D_803815E8 = 0x50; } -struct7s *func_802FDE2C(s32 arg0){ +struct7s *fxhoneycarrierscore_new(s32 arg0){ func_802FDD20(); D_803815D0 = 1.0f; return &D_803815F0; @@ -97,7 +97,7 @@ f32 func_802FDE60(f32 arg0) { return arg0; } -void func_802FDEE0(s32 arg0, struct8s *arg1, Gfx **arg2, Mtx **arg3, Vtx **arg4){ +void fxhoneycarrierscore_draw(s32 arg0, struct8s *arg1, Gfx **arg2, Mtx **arg3, Vtx **arg4){ f64 var_f24; s32 sp13C; s32 sp138; @@ -174,7 +174,7 @@ void func_802FDEE0(s32 arg0, struct8s *arg1, Gfx **arg2, Mtx **arg3, Vtx **arg4) } extern f64 D_803773E0; -void func_802FE844(s32 arg0, struct8s *arg1){ +void fxhoneycarrierscore_update(s32 arg0, struct8s *arg1){ f32 sp24; s32 sp20; s32 tmp; @@ -199,7 +199,7 @@ void func_802FE844(s32 arg0, struct8s *arg1){ D_8036A010 = assetcache_get(0x7DC); break; case 0: - func_802FDDC4(arg0, arg1); + fxhoneycarrierscore_free(arg0, arg1); break; case 2: switch(D_803815C0){ @@ -242,7 +242,7 @@ void func_802FE844(s32 arg0, struct8s *arg1){ D_803815E4 = _76D90_MIN((D_803815E4 + (400.0*sp24)), 255.0); if(D_803815E0 < 0.1){ func_802FDD20(); - func_802FDDC4(arg0, arg1); + fxhoneycarrierscore_free(arg0, arg1); } break; } diff --git a/src/core2/code_78100.c b/src/core2/fx/jinjoscore.c similarity index 99% rename from src/core2/code_78100.c rename to src/core2/fx/jinjoscore.c index bdd4aa70..642b99c1 100644 --- a/src/core2/code_78100.c +++ b/src/core2/fx/jinjoscore.c @@ -45,7 +45,7 @@ struct7s D_80381E90; /* .code */ -struct7s *func_802FF090(enum item_e arg0){ +struct7s *fxjinjoscore_new(enum item_e arg0){ s32 i; s32 red; s32 green; diff --git a/src/core2/code_78E50.c b/src/core2/fx/lifescore.c similarity index 94% rename from src/core2/code_78E50.c rename to src/core2/fx/lifescore.c index 10c7bad7..f2942824 100644 --- a/src/core2/code_78E50.c +++ b/src/core2/fx/lifescore.c @@ -38,7 +38,7 @@ s32 func_802FFE04(void){ return (5 - v1)*4; } -struct7s *func_802FFE4C(s32 item_id){ +struct7s *fxlifescore_new(s32 item_id){ s32 i; D_80381EB8 = 1.0f; @@ -51,7 +51,7 @@ struct7s *func_802FFE4C(s32 item_id){ return &D_80381ED0; } -void func_802FFED4(s32 item_id, struct8s *arg1){ +void fxlifescore_free(s32 item_id, struct8s *arg1){ s32 i; for(i = 0; i < 2; i++){ if(D_80381EB0[i] != NULL){ @@ -61,7 +61,7 @@ void func_802FFED4(s32 item_id, struct8s *arg1){ }; } -void func_802FFF34(enum item_e item_id, struct8s *arg1, Gfx **gfx, Mtx **mtx, Vtx **vtx) { +void fxlifescore_draw(enum item_e item_id, struct8s *arg1, Gfx **gfx, Mtx **mtx, Vtx **vtx) { s32 sp10C; Vtx *sp108; s32 sp104; @@ -120,7 +120,7 @@ void func_802FFF34(enum item_e item_id, struct8s *arg1, Gfx **gfx, Mtx **mtx, Vt } } -void func_803005BC(enum item_e item_id, struct8s *arg1) { +void fxlifescore_update(enum item_e item_id, struct8s *arg1) { s32 var_v0; s32 sp20; s32 sp1C; @@ -135,7 +135,7 @@ void func_803005BC(enum item_e item_id, struct8s *arg1) { break; case 0: - func_802FFED4(item_id, arg1); + fxlifescore_free(item_id, arg1); break; case 2: diff --git a/src/core2/mapspecificflags.c b/src/core2/mapspecificflags.c index e6662b73..84414271 100644 --- a/src/core2/mapspecificflags.c +++ b/src/core2/mapspecificflags.c @@ -71,7 +71,7 @@ void mapSpecificFlags_setAll(u32 arg0){ _mapSpecificFlags_updateCRCs(); } -s32 *func_802CAEBC(s32 arg0){ +s32 *bitfield_new(s32 arg0){ s32 *phi_v0; phi_v0 = (s32*)malloc( (((arg0 + 0x1F)>>5) + 1)*sizeof(s32)); @@ -79,11 +79,11 @@ s32 *func_802CAEBC(s32 arg0){ return phi_v0; } -void func_802CAEF4(s32 *arg0){ +void bitfield_free(s32 *arg0){ free(arg0); } -void func_802CAF14(s32 *arg0, s32 arg1, bool arg2){ +void bitfield_setBit(s32 *arg0, s32 arg1, bool arg2){ if(arg2){ arg0[(arg1 >> 5) + 1] |= 1 << (arg1 & (0x1F)); } @@ -92,15 +92,15 @@ void func_802CAF14(s32 *arg0, s32 arg1, bool arg2){ } } -bool func_802CAF70(s32 *arg0, s32 arg1){ +bool bitfield_isBitSet(s32 *arg0, s32 arg1){ return (arg0[(arg1 >> 5) + 1] & (1 << (arg1 & 0x1F))) ? TRUE : FALSE; } -void func_802CAFA8(s32 *arg0, bool arg1) { +void bitfield_setAll(s32 *arg0, bool arg1) { s32 i; for(i = 0; i < *arg0; i++){ - func_802CAF14(arg0, i, arg1); + bitfield_setBit(arg0, i, arg1); } } diff --git a/symbol_addrs.us.v10.txt b/symbol_addrs.us.v10.txt index 69b97d05..4b3c5894 100644 --- a/symbol_addrs.us.v10.txt +++ b/symbol_addrs.us.v10.txt @@ -100,6 +100,7 @@ spawnQueue_lock = 0x802C3BE8; mapSpecificFlags_set = 0x802CADC0; mapSpecificFlags_getAll = 0x802CAE8C; mapSpecificFlags_setAll = 0x802CAE98; +bitfield_isBitSet = 0x802CAF70; mapSpecificFlags_validateCRC1 = 0x802CB00C; mapSavestate_save = 0x802E2F2C; mapSavestate_apply = 0x802E30AC;