core2/code_91E10.c done, func_803192A4() match

This commit is contained in:
Banjo Kazooie
2023-01-04 14:51:49 -06:00
parent 3ea841c6e1
commit 569c23992f
6 changed files with 63 additions and 100 deletions

View File

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

View File

@@ -770,7 +770,7 @@ segments:
- [0xFE0110, c, gc/pauseMenu] #DONE
- [0xFE3580, c, code_8DC20] #DONE
- [0xFE3BD0, c, gc/zoombox] #DONE
- [0xFE7770, c, code_91E10]
- [0xFE7770, c, code_91E10] #DONE
- [0xFE8F50, c, code_935F0] #DONE #chminigmae
- [0xFE9570, c, gc/parade] #DONE
- [0xFE9F80, c, code_94620] #DONE

View File

@@ -9,7 +9,7 @@
</mask>
<g mask="url(#anybadge_1)">
<path fill="#555" d="M0 0h44v20H0z"/>
<path fill="#13e000" d="M44 0h67v20H44z"/>
<path fill="#12e000" d="M44 0h67v20H44z"/>
<path fill="url(#b)" d="M0 0h111v20H0z"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
@@ -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">95.8567%</text>
<text x="77.5" y="14">95.8567%</text>
<text x="78.5" y="15" fill="#010101" fill-opacity=".3">95.9750%</text>
<text x="77.5" y="14">95.9750%</text>
</g>
</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>
</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">97.1239%</text>
<text x="183.5" y="14">97.1239%</text>
<text x="184.5" y="15" fill="#010101" fill-opacity=".3">97.1918%</text>
<text x="183.5" y="14">97.1918%</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -243,127 +243,90 @@ void func_80319214(Gfx **gfx, Mtx **mtx, Vtx **vtx) {
}
}
#ifndef NONMATCHING
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_91E10/func_803192A4.s")
#else
bool func_803192A4(enum ff_question_type_e q_type, s32 q_indx, s32 arg2) {
s32 sp60;
s32 sp54;
s32 sp50;
s32 sp48;
s32 sp44;
s32 sp30;
s32 sp2C;
s32 temp_a1;
s32 temp_a1_2;
s32 temp_a2;
s32 temp_a2_2;
#define NEXT(iter) (*(((char *)(iter))++))
#define SKIP(iter,n) (((char *)(iter)) += (n))
char *char_iter;
s32 temp_s0;
s32 temp_s2;
s32 temp_v0;
s32 temp_v0_2;
s32 temp_v0_3;
s32 temp_v0_5;
s32 temp_v0_7;
s32 temp_v1;
u8 *temp_s0_7;
u8 temp_t0;
u8 str_cnt;
QuizQuestionBin *q_bin;
QuizQuestionBin_Struct_1 *temp_s0_3;
StringBin *temp_s0_4;
u8 *temp_s0_5;
s32 str_cnt;
s32 phi_v1;
s32 phi_v1_2;
s32 phi_v1_3;
s32 phi_a3;
s32 phi_a3_2;
s32 phi_t0;
s32 phi_a2;
s32 phi_a3_3;
s32 sp60;
s32 phi_a1;
s32 phi_v1_4;
s32 phi_a0;
void *phi_s0;
s32 phi_a0_2;
s32 phi_a0_3;
s32 phi_a1_2;
s32 phi_a0_4;
s32 phi_a0_5;
s32 sp58;
s32 sp54;
s32 sp50;
s32 sp4C;
s32 sp48;
s32 sp44;
s32 temp_v0_3;
s32 str_size;
temp_s0 = func_80318ED8(q_type) + q_indx;
if (func_8031A3BC() != 0) {
if (func_8031A3BC()) {
return 0;
}
if (func_8033BDAC(temp_s0, D_803830E0->unkC, 0x400) == 0) {
free(D_803830E0->unkC);
D_803830E0->unkC = (QuizQuestionBin *) assetcache_get(temp_s0);
}
q_bin = D_803830E0->unkC;
sp50 = q_bin->unk2;
phi_v1_4 = 0;
if (q_bin->unk1 >= 2) {
sp54 = q_bin->unk1;
phi_v1_4 = func_80318F60(q_type, q_indx, arg2);
}
temp_s2 = phi_v1_4 + 1;
phi_v1 = sp50 == 0;
if (phi_v1 == 0) {
sp54 = q_bin->unk1;
phi_v1 = func_80318FB4(q_type) != 0;
}
phi_a0_2 = 0;
phi_a0_3 = 0;
if (phi_v1 != 0) {
sp30 = q_bin->unk1 + sp50;
sp2C = temp_s2 - 1;
char_iter = D_803830E0->unkC;
sp58 = NEXT(char_iter);
sp54 = NEXT(char_iter);
sp50 = NEXT(char_iter);
sp4C = ((sp54 >= 2) ? func_80318F60(q_type, q_indx, arg2) : 0) + 1;
if (((sp50 == 0) || (func_80318FB4(q_type) != 0)) != 0) {
do {
temp_v0 = randi2(0, sp30);
sp2C = sp2C;
sp48 = temp_v0 + 1;
} while (temp_v0 == sp2C);
sp48 = randi2(0, sp54 + sp50) + 1;
} while (sp48 == sp4C);
do {
temp_v0_2 = randi2(0, sp30);
sp44 = temp_v0_2 + 1;
} while (temp_v0_2 == sp2C || sp44 == sp48);
sp44 = randi2(0, sp54 + sp50) + 1;
} while (sp44 == sp4C || sp44 == sp48);
} else {
sp54 = q_bin->unk1;
sp48 = randi2(0, sp50) + q_bin->unk1 + 1;
phi_t0 = q_bin->unk1;
sp48 = randi2(0, sp50) + sp54 + 1;
do {
sp44 = randi2(0, sp50) + sp54 + 1;
} while (sp48 == sp44);
} while (sp44 == sp48);
}
temp_s0_3 = (s32)q_bin +sizeof(QuizQuestionBin) + func_8031B5B0()*2;
temp_s0_4 = (s32)D_803830E0->unkC + (temp_s0_3->unk0 + (temp_s0_3->unk1 << 8)) + 1;
str_cnt = *((u8*)temp_s0_4 - 1);
phi_a1_2 = 0;
SKIP(char_iter, 2*func_8031B5B0());
phi_v1 = NEXT(char_iter);
phi_v1 += (NEXT(char_iter) << 8);
char_iter = (s32)D_803830E0->unkC + phi_v1;
str_cnt = NEXT(char_iter);
for(phi_a1 = 0; phi_a1 < 4; phi_a1++){
D_803830E0->unk18[phi_a1] = 0;
}
for(phi_a1_2 = 0; phi_a1_2 < str_cnt; phi_a1_2++){
temp_s0_5 = temp_s0_4 + 1;
temp_v0_3 = temp_s0_4->cmd - 0x80;
phi_a1_2 = 1;
if ((temp_v0_3 == 0) || (temp_v0_3 == temp_s2) || (temp_v0_3 == sp48) || (temp_v0_3 == sp44)) {
if (temp_v0_5 == 0) {
for(phi_a1 = 0; phi_a1 < str_cnt; phi_a1++){
temp_v0_3 = NEXT(char_iter);
str_size = NEXT(char_iter);
temp_v0_3 -= 0x80;
if ((temp_v0_3 == 0) || (temp_v0_3 == sp4C) || (temp_v0_3 == sp48) || (temp_v0_3 == sp44)) {
if (temp_v0_3 == 0) {
sp60 = 0;
} else if (temp_v0_5 == temp_s2) {
} else if (temp_v0_3 == sp4C) {
sp60 = 1;
} else if (temp_v0_5 == sp48) {
} else if (temp_v0_3 == sp48) {
sp60 = 2;
} else if (temp_v0_5 == sp44) {
} else if (temp_v0_3 == sp44) {
sp60 = 3;
} else{
sp60 = sp60;
}
D_803830E0->unk34.unk0[sp60][D_803830E0->unk18[sp60]++] = char_iter;
}
D_803830E0->unk34.unk0[sp60][D_803830E0->unk18[sp60]] = temp_s0_5;
D_803830E0->unk18[sp60]++;
temp_s0_4 = (s32)temp_s0_5 + temp_s0_4->string_size;
SKIP(char_iter, str_size);
}
return TRUE;
#undef NEXT
#undef SKIP
}
#endif
void func_803196D0(s32 arg0) {

View File

@@ -8,7 +8,7 @@ void func_80252330(f32, f32, f32);
void mlMtxApply(Mtx *);
void func_803382D8(s32 arg0);
void func_803382E4(s32 arg0);
void func_803382F0(s32 arg0);
void spriteRender_set1Primative(bool boolean);
void func_803382FC(s32 arg0);
void func_80338308(s32 arg0, s32 arg1);
@@ -578,7 +578,7 @@ void func_803381B4(Gfx **gfx, Mtx **mtx, f32 arg2[3]) {
void func_80338270(){
func_803382D8(0xFF);
func_803382E4(0);
func_803382F0(0);
spriteRender_set1Primative(0);
func_803382FC(0xFF);
func_80338308(100, 100);
@@ -599,8 +599,8 @@ void func_803382E4(s32 arg0){
D_80383634 = arg0;
}
void func_803382F0(s32 arg0){
D_80383638 = arg0;
void spriteRender_set1Primative(bool boolean){
D_80383638 = boolean;
}
void func_803382FC(s32 arg0){