func_80307CA0() match

This commit is contained in:
Banjo Kazooie
2023-02-22 16:34:34 -06:00
parent d0112a6d4a
commit ffd0495f90
15 changed files with 72 additions and 75 deletions

View File

@@ -1,4 +1,4 @@
# banjo (98.4318%) # banjo (98.4559%)
<img src="./progress/progress_total.svg"> <img src="./progress/progress_total.svg">

View File

@@ -2172,7 +2172,7 @@ segments:
exclusive_ram_id: overlay exclusive_ram_id: overlay
subsegments: subsegments:
- [0x1098070, c, code_0] #DONE - [0x1098070, c, code_0] #DONE
- [0x109C310, c, code_42A0] #DONE - [0x109C310, c, ch/cauldron] #DONE
- [0x109D6B0, c, ch/brentilda] #DONE - [0x109D6B0, c, ch/brentilda] #DONE
- [0x109DF40, c, code_5ED0] #DONE - [0x109DF40, c, code_5ED0] #DONE
- [0x10A0760, c, code_86F0] #DONE - [0x10A0760, c, code_86F0] #DONE
@@ -2186,7 +2186,7 @@ segments:
- [0x10A4230, c, code_C1C0] #DONE - [0x10A4230, c, code_C1C0] #DONE
- [0x10A4730, c, code_C6C0] #DONE - [0x10A4730, c, code_C6C0] #DONE
- [0x10A4930, .data, code_0] - [0x10A4930, .data, code_0]
- [0x10A51A0, .data, code_42A0] - [0x10A51A0, .data, ch/cauldron]
- [0x10A5390, .data, ch/brentilda] - [0x10A5390, .data, ch/brentilda]
- [0x10A53E0, .data, code_5ED0] - [0x10A53E0, .data, code_5ED0]
- [0x10A6430, .data, code_86F0] - [0x10A6430, .data, code_86F0]
@@ -2200,7 +2200,7 @@ segments:
- [0x10A6940, .data, code_C1C0] - [0x10A6940, .data, code_C1C0]
- [0x10A69A0, .data, code_C6C0] - [0x10A69A0, .data, code_C6C0]
- [0x10A69D0, .rodata, code_0] - [0x10A69D0, .rodata, code_0]
- [0x10A6C80, .rodata, code_42A0] - [0x10A6C80, .rodata, ch/cauldron]
- [0x10A6D10, .rodata, ch/brentilda] - [0x10A6D10, .rodata, ch/brentilda]
- [0x10A6D40, .rodata, code_5ED0] - [0x10A6D40, .rodata, code_5ED0]
- [0x10A6E50, .rodata, code_86F0] - [0x10A6E50, .rodata, code_86F0]

View File

@@ -1746,7 +1746,7 @@ enum actor_e
ACTOR_239_FP_WITCH_SWITCH = 0x239, ACTOR_239_FP_WITCH_SWITCH = 0x239,
ACTOR_23B_DINGPOT = 0x23B, ACTOR_23B_WARP_CAULDRON = 0x23B,
ACTOR_243_GV_SNS_CHAMBER_DOOR = 0x243, ACTOR_243_GV_SNS_CHAMBER_DOOR = 0x243,
ACTOR_244_GV_SNS_SARCOPHAGUS, ACTOR_244_GV_SNS_SARCOPHAGUS,
@@ -1798,7 +1798,7 @@ enum actor_e
ACTOR_2A8_NABNUT = 0x2A8, ACTOR_2A8_NABNUT = 0x2A8,
ACTOR_2A9_ACORN, ACTOR_2A9_ACORN,
ACTOR_2DB_WARP_CAULDRON = 0x2DB, ACTOR_2DB_DINGPOT = 0x2DB,
ACTOR_2E5_DOOR_OF_GRUNTY = 0x2e5, ACTOR_2E5_DOOR_OF_GRUNTY = 0x2e5,
@@ -4346,7 +4346,7 @@ enum marker_e{
MARKER_22A_CCW_WITCH_SWITCH = 0x22A, MARKER_22A_CCW_WITCH_SWITCH = 0x22A,
MARKER_22B_FP_WITCH_SWITCH, MARKER_22B_FP_WITCH_SWITCH,
MARKER_231_DINGPOT = 0x231, MARKER_231_WARP_CAULDRON = 0x231,
MARKER_23A_GV_SNS_CHAMBER_DOOR = 0x23A, MARKER_23A_GV_SNS_CHAMBER_DOOR = 0x23A,
MARKER_23B_GV_SNS_SARCOPHAGUS, MARKER_23B_GV_SNS_SARCOPHAGUS,
@@ -4355,7 +4355,7 @@ enum marker_e{
MARKER_23F_LAIR_FLIGHT_PAD_SWITCH = 0x23F, MARKER_23F_LAIR_FLIGHT_PAD_SWITCH = 0x23F,
MARKER_240_LAIR_SWITCH_FLIGHT_PAD = 0x240, MARKER_240_LAIR_SWITCH_FLIGHT_PAD = 0x240,
MARKER_244_WARP_CAULDRON = 0x244, MARKER_244_DINGPOT = 0x244,
MARKER_245_XMAS_TREE_EGG_TOLL = 0x245, MARKER_245_XMAS_TREE_EGG_TOLL = 0x245,
MARKER_250_ICECUBE_A = 0x250, MARKER_250_ICECUBE_A = 0x250,

View File

@@ -17,7 +17,7 @@
<text x="22.0" y="14">core2</text> <text x="22.0" y="14">core2</text>
</g> </g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"> <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">97.6633%</text> <text x="78.5" y="15" fill="#010101" fill-opacity=".3">97.7054%</text>
<text x="77.5" y="14">97.6633%</text> <text x="77.5" y="14">97.7054%</text>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -17,7 +17,7 @@
<text x="75.0" y="14">Banjo-Kazooie (us.v10)</text> <text x="75.0" y="14">Banjo-Kazooie (us.v10)</text>
</g> </g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"> <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">98.4318%</text> <text x="184.5" y="15" fill="#010101" fill-opacity=".3">98.4559%</text>
<text x="183.5" y="14">98.4318%</text> <text x="183.5" y="14">98.4559%</text>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -16,7 +16,7 @@ typedef struct {
/* .code */ /* .code */
void MMM_func_8038ABC0(s32 arg0) { void MMM_func_8038ABC0(s32 arg0) {
if (getGameMode() != 7) { if (getGameMode() != 7) {
func_80295864(func_802957F0() & ~arg0); ability_setAllLearned(ability_getAllLearned() & ~arg0);
} }
} }

View File

@@ -10,12 +10,12 @@ struct {
u8 bsStoredStateInTrot; //in trot u8 bsStoredStateInTrot; //in trot
/* .code */ /* .code */
void func_8029A890(void){ void bsStoredState_debug(void){
func_802957FC(); ability_debug();
} }
void bsStoredState_clear(void){ void bsStoredState_clear(void){
func_80295804(); ability_clearAll();
bsStoredState.longleg_timer = bsStoredState.turbo_timer = 0.0f; bsStoredState.longleg_timer = bsStoredState.turbo_timer = 0.0f;
bsStoredState.transformation = TRANSFORM_1_BANJO; bsStoredState.transformation = TRANSFORM_1_BANJO;
bsStoredStateInTrot = FALSE; bsStoredStateInTrot = FALSE;

View File

@@ -2017,39 +2017,36 @@ Cube **func_80307948(s32 arg0[3]) {
} }
#endif #endif
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_7AF80/func_80307CA0.s") void func_80307CA0(ActorMarker *marker) {
// void func_80307CA0(ActorMarker *marker) { s32 temp_s4;
// s32 sp58[3]; s32 sp58[3];
// s32 sp40[3]; s32 i;
// Cube **var_s2; Cube **var_s2;
// Cube *var_a0; NodeProp *temp_v0_2;
// NodeProp *temp_v0_2; s32 sp40[3];
// s32 temp_v0_3; s32 temp_v0_3;
// u32 var_s0; s32 var_s0;
// u8 temp_s4;
// s32 i;
// temp_s4 = D_8036A9E4[marker->unk14_20]; temp_s4 = D_8036A9E4[marker->unk14_20];
// if ((temp_s4 != 0xFF) && (bitfield_isBitSet(D_8036A9E0, temp_s4) == 1)) { if ((temp_s4 != 0xFF) && (bitfield_isBitSet(D_8036A9E0, temp_s4) == 1)) {
// func_8032E010(marker->propPtr, sp58); func_8032E010(marker->propPtr, sp58);
// var_s2 = func_80307948(sp58); var_s2 = func_80307948(sp58);
// var_a0 = *var_s2; for(i = 0; var_s2[i] != NULL; i++) {
// for(i = 0; var_s2[i] != NULL; i++) { for(var_s0 = 0; var_s0 < var_s2[i]->unk0_4; var_s0++){
// for(var_s0 = 0; var_s0 < var_s2[i]->unk0_4; var_s0++){ temp_v0_2 = func_8032E02C(var_s2[i], var_s0);
// temp_v0_2 = func_8032E02C(var_a0, var_s0); if (func_80330F74(temp_v0_2) == temp_s4) {
// if (func_80330F74(temp_v0_2) == temp_s4) { temp_v0_3 = func_80330F94(temp_v0_2, sp40);
// temp_v0_3 = func_80330F94(temp_v0_2, sp40); if( ((sp40[0] - temp_v0_3) < sp58[0]) && (sp58[0] < (sp40[0] + temp_v0_3))
// if( ((sp40[0] - temp_v0_3) < sp58[0]) && (sp58[0] < (sp40[0] + temp_v0_3)) && ((sp40[1] - temp_v0_3) < sp58[1]) && (sp58[1] < (sp40[1] + temp_v0_3))
// && ((sp40[1] - temp_v0_3) < sp58[1]) && (sp58[1] < (sp40[1] + temp_v0_3)) && ((sp40[2] - temp_v0_3) < sp58[2]) && (sp58[2] < (sp40[2] + temp_v0_3))
// && ((sp40[2] - temp_v0_3) < sp58[2]) && (sp58[2] < (sp40[2] + temp_v0_3)) ) {
// ) { func_80334448(temp_v0_2, marker);
// func_80334448(temp_v0_2, marker); }
// } }
// } }
// } }
// } }
// } }
// }
u32 func_80307E1C(void) { u32 func_80307E1C(void) {

View File

@@ -1464,6 +1464,6 @@ void func_8031FBF8(void) {
honeycombscore_debug(); honeycombscore_debug();
jiggyscore_debug(); jiggyscore_debug();
func_803465DC(); func_803465DC();
func_8029A890(); bsStoredState_debug();
func_802C5A48(); func_802C5A48();
} }

View File

@@ -115,7 +115,7 @@ void savedata_init(void){ //savedata_init
func_80346F44(&sp48, &sp24); func_80346F44(&sp48, &sp24);
itemscore_timeScores_getSizeAndPtr(&sp44, &sp20); itemscore_timeScores_getSizeAndPtr(&sp44, &sp20);
func_80347630(&sp3C, &sp1C); func_80347630(&sp3C, &sp1C);
func_8029587C(&sp38, &sp18); ability_getSizeAndPtr(&sp38, &sp18);
D_80383CF0 = 0; D_80383CF0 = 0;
D_80383CF4 = D_80383CF0 + 2; D_80383CF4 = D_80383CF0 + 2;
D_80383CF8 = D_80383CF4 + sp54; D_80383CF8 = D_80383CF4 + sp54;
@@ -216,7 +216,7 @@ void __savedata_load_abilities(u8 *savedata){ //savedata_load_abilities
u8 *sp28; u8 *sp28;
int i; int i;
func_8029587C(&sp2C, &sp28); ability_getSizeAndPtr(&sp2C, &sp28);
for(i = D_80383D10; i < D_80383D10 + sp2C; i++){ for(i = D_80383D10; i < D_80383D10 + sp2C; i++){
sp28[i - D_80383D10] = savedata[i]; sp28[i - D_80383D10] = savedata[i];
} }
@@ -308,7 +308,7 @@ void __savedata_save_abilities(u8 *savedata){ //savedata_save_abilities
u8 *sp28; u8 *sp28;
int i; int i;
func_8029587C(&sp2C, &sp28); ability_getSizeAndPtr(&sp2C, &sp28);
for(i = D_80383D10; i < D_80383D10 + sp2C; i++){ for(i = D_80383D10; i < D_80383D10 + sp2C; i++){
savedata[i] = sp28[i - D_80383D10]; savedata[i] = sp28[i - D_80383D10];
} }

View File

@@ -196,8 +196,8 @@ void func_8034B834(void) {
item_set(ITEM_F_RED_FEATHER, 50); item_set(ITEM_F_RED_FEATHER, 50);
item_set(ITEM_10_GOLD_FEATHER, 10); item_set(ITEM_10_GOLD_FEATHER, 10);
item_set(ITEM_1C_MUMBO_TOKEN, 25); item_set(ITEM_1C_MUMBO_TOKEN, 25);
func_80295864(-1); ability_setAllLearned(-1);
func_80295870(-1); ability_setAllUsed(-1);
for(i = 0; i < 10; i++){ for(i = 0; i < 10; i++){
fileProgressFlag_set(D_80371FA0[i], 1); fileProgressFlag_set(D_80371FA0[i], 1);
} }

View File

@@ -82,6 +82,6 @@ void func_80356714(void) {
void func_80356734(void) { void func_80356734(void) {
func_803565BC(); func_803565BC();
if (func_803565BC() == 0) { if (func_803565BC() == 0) {
func_80295864(0x10); ability_setAllLearned(0x10);
} }
} }

View File

@@ -84,13 +84,13 @@ int ability_hasLearned(enum ability_e move){
return (1 << move) & D_8037C3A0; return (1 << move) & D_8037C3A0;
} }
s32 func_802957F0(void){ s32 ability_getAllLearned(void){
return D_8037C3A0; return D_8037C3A0;
} }
void func_802957FC(void){} void ability_debug(void){}
void func_80295804(void){ void ability_clearAll(void){
D_8037C3A0 = 0; D_8037C3A0 = 0;
D_8037C3A4 = 0; D_8037C3A4 = 0;
} }
@@ -103,15 +103,15 @@ void func_80295818(s32 move, s32 val){
} }
} }
void func_80295864(s32 val){ void ability_setAllLearned(s32 val){
D_8037C3A0 = val; D_8037C3A0 = val;
} }
void func_80295870(s32 val){ void ability_setAllUsed(s32 val){
D_8037C3A4 = val; D_8037C3A4 = val;
} }
void func_8029587C(s32 *size, u8 **addr){ void ability_getSizeAndPtr(s32 *size, u8 **addr){
*size = 8; *size = 8;
*addr = &D_8037C3A0; *addr = &D_8037C3A0;
} }

View File

@@ -33,8 +33,8 @@ ActorAnimationInfo D_80393520[] = {
{0x28F, 5.167f}, {0x28F, 5.167f},
{0x290, 6.26f} {0x290, 6.26f}
}; };
ActorInfo D_80393560 = { MARKER_231_DINGPOT, ACTOR_23B_DINGPOT, ASSET_4DF_MODEL_WARP_CAULDRON, 1, D_80393520, chWarpCauldron_update, func_80326224, chWarpCauldron_draw, 0, 0, 3.0f, 0}; ActorInfo D_80393560 = { MARKER_231_WARP_CAULDRON, ACTOR_23B_WARP_CAULDRON, ASSET_4DF_MODEL_WARP_CAULDRON, 1, D_80393520, chWarpCauldron_update, func_80326224, chWarpCauldron_draw, 0, 0, 3.0f, 0};
ActorInfo D_80393584 = { MARKER_244_WARP_CAULDRON, ACTOR_2DB_WARP_CAULDRON, ASSET_450_MODEL_DINGPOT, 1, D_80393520, chWarpCauldron_update, func_80326224, chWarpCauldron_draw, 0, 0, 3.0f, 0}; ActorInfo D_80393584 = { MARKER_244_DINGPOT, ACTOR_2DB_DINGPOT, ASSET_450_MODEL_DINGPOT, 1, D_80393520, chWarpCauldron_update, func_80326224, chWarpCauldron_draw, 0, 0, 3.0f, 0};
f32 D_803935A8[][2][3] = { f32 D_803935A8[][2][3] = {
{{1.0f, 1.0f, 1.0f}, {1.0f, 0.0f, 1.0f}}, {{1.0f, 1.0f, 1.0f}, {1.0f, 0.0f, 1.0f}},
{{1.0f, 1.0f, 1.0f}, {0.0f, 1.0f, 1.0f}}, {{1.0f, 1.0f, 1.0f}, {0.0f, 1.0f, 1.0f}},
@@ -129,7 +129,7 @@ void func_8038A96C(Actor *this, s32 arg1) {
f32 sp38[4]; f32 sp38[4];
if( ( (arg1 != 3) || ( (this->unk1C[1] == 0.0f) && (this->marker->unk14_21 == 1))) if( ( (arg1 != 3) || ( (this->unk1C[1] == 0.0f) && (this->marker->unk14_21 == 1)))
&& (this->modelCacheIndex == ACTOR_23B_DINGPOT) && (this->modelCacheIndex == ACTOR_23B_WARP_CAULDRON)
&& ((arg1 != 0) || fileProgressFlag_get(chWarpCauldron_getFileProgressFlagIndex(this))) && ((arg1 != 0) || fileProgressFlag_get(chWarpCauldron_getFileProgressFlagIndex(this)))
){ ){
sp5C = func_8034C2C4(this->marker, 0x1C3); sp5C = func_8034C2C4(this->marker, 0x1C3);
@@ -227,7 +227,7 @@ void chWarpCauldron_update(Actor *this) {
this->marker->propPtr->unk8_3 = TRUE; this->marker->propPtr->unk8_3 = TRUE;
this->unk1C[1] = 0.0f; this->unk1C[1] = 0.0f;
this->velocity[0] = this->yaw; this->velocity[0] = this->yaw;
if (this->modelCacheIndex == ACTOR_2DB_WARP_CAULDRON) { if (this->modelCacheIndex == ACTOR_2DB_DINGPOT) {
if (fileProgressFlag_get(FILEPROG_F3_MET_DINGPOT)) { if (fileProgressFlag_get(FILEPROG_F3_MET_DINGPOT)) {
sp4C = (fileProgressFlag_get(FILEPROG_CF_HAS_ENTERED_FINAL_FIGHT)) ? 0xFB7 : 0xFAE; sp4C = (fileProgressFlag_get(FILEPROG_CF_HAS_ENTERED_FINAL_FIGHT)) ? 0xFB7 : 0xFAE;
phi_v0 = (fileProgressFlag_get(FILEPROG_CF_HAS_ENTERED_FINAL_FIGHT)) ? 0xFBC : 0xFB7; phi_v0 = (fileProgressFlag_get(FILEPROG_CF_HAS_ENTERED_FINAL_FIGHT)) ? 0xFBC : 0xFB7;
@@ -434,7 +434,7 @@ Actor *chWarpCauldron_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx)
s32 sp3C[4]; s32 sp3C[4];
this = marker_getActor(marker); this = marker_getActor(marker);
if(this->modelCacheIndex == ACTOR_23B_DINGPOT) { if(this->modelCacheIndex == ACTOR_23B_WARP_CAULDRON) {
func_8033A45C(3, this->unk38_0 ? TRUE : FALSE); func_8033A45C(3, this->unk38_0 ? TRUE : FALSE);
func_8033A45C(4, this->unk38_0 ? FALSE : TRUE); func_8033A45C(4, this->unk38_0 ? FALSE : TRUE);
} }

View File

@@ -59,8 +59,8 @@ extern int quizQuestionAskedBitfield_get(u32); // ff_isAsked_flag_get
extern void BKModel_getMeshCenter(BKModel *model, s32 mesh_id, s16 [3]); //! $a2 type unk extern void BKModel_getMeshCenter(BKModel *model, s32 mesh_id, s16 [3]); //! $a2 type unk
extern s32 func_803203FC(s32); // get volatile flag extern s32 func_803203FC(s32); // get volatile flag
extern void func_80295864(s32); // set unlocked moves bitfield extern void ability_setAllLearned(s32); // set unlocked moves bitfield
extern s32 func_802957F0(void); // get unlocked moves bitfield extern s32 ability_getAllLearned(void); // get unlocked moves bitfield
extern s32 item_getCount(s32); // item count get extern s32 item_getCount(s32); // item count get
extern void func_803463F4(s32, s32); // item count set extern void func_803463F4(s32, s32); // item count set
@@ -568,7 +568,7 @@ void lair_func_8038CD48(void)
* Sets moves upon entering SM or MM from the Lair, FF asm code stays * Sets moves upon entering SM or MM from the Lair, FF asm code stays
* latent until then * latent until then
*/ */
func_80295864(D_8037DCB8->unlockedMoves); ability_setAllLearned(D_8037DCB8->unlockedMoves);
D_8037DCB8->unk0 = NULL; D_8037DCB8->unk0 = NULL;
@@ -600,7 +600,7 @@ void func_8038CE28(void)
quizQuestionAskedBitfield_init(); quizQuestionAskedBitfield_init();
// dump currently unlocked moves to storage // dump currently unlocked moves to storage
D_8037DCB8->unlockedMoves = func_802957F0(); D_8037DCB8->unlockedMoves = ability_getAllLearned();
for (i = 0; i < ARRLEN(D_8037DCB8->unk3C); i++) for (i = 0; i < ARRLEN(D_8037DCB8->unk3C); i++)
D_8037DCB8->unk3C[i] = 0; D_8037DCB8->unk3C[i] = 0;
@@ -833,7 +833,7 @@ void func_8038D4BC(void)
// restore moves after a delay // restore moves after a delay
timedFunc_set_1(0.25f, timedFunc_set_1(0.25f,
func_80295864, ability_setAllLearned,
D_8037DCB8->unlockedMoves D_8037DCB8->unlockedMoves
); );
@@ -901,12 +901,12 @@ void func_8038D670(enum FF_Action next_state) {
} }
func_802FAD64(ITEM_27_JOKER_CARD); func_802FAD64(ITEM_27_JOKER_CARD);
D_8037DCB8->unkF = -2; D_8037DCB8->unkF = -2;
func_80295864(D_8037DCB8->unlockedMoves); ability_setAllLearned(D_8037DCB8->unlockedMoves);
func_80347A14(1); func_80347A14(1);
break; break;
case FFA_2_ON_BOARD_FORGET_MOVES: //L8038D70C case FFA_2_ON_BOARD_FORGET_MOVES: //L8038D70C
func_80295864(0); ability_setAllLearned(0);
break; break;
case FFA_3_TRIGGER_QUESTION: //L8038D720 case FFA_3_TRIGGER_QUESTION: //L8038D720
@@ -1008,7 +1008,7 @@ void func_8038D670(enum FF_Action next_state) {
break; break;
case FFA_5_FORGET_MOVES_2: //L8038DBEC case FFA_5_FORGET_MOVES_2: //L8038DBEC
func_80295864(0); ability_setAllLearned(0);
break; break;
case FFA_8_FURNACE_FUN_COMPLETE: //L8038DC00 case FFA_8_FURNACE_FUN_COMPLETE: //L8038DC00
@@ -1026,7 +1026,7 @@ void func_8038D670(enum FF_Action next_state) {
func_80347A14(0); func_80347A14(0);
} }
func_8038D5A0(); func_8038D5A0();
func_80295864(D_8037DCB8->unlockedMoves); ability_setAllLearned(D_8037DCB8->unlockedMoves);
func_80347A14(1); func_80347A14(1);
func_802FAD64(ITEM_27_JOKER_CARD); func_802FAD64(ITEM_27_JOKER_CARD);
break; break;