core2/code_ABC00.c progress

This commit is contained in:
Banjo Kazooie
2022-07-29 23:07:29 -05:00
parent 149f11d382
commit 26c1253536
8 changed files with 235 additions and 31 deletions

View File

@@ -164,9 +164,8 @@ enum bkprog_e{
// {index=0x99, type="Prog", level=6, name="1st Time Past 50 ND Text"}, // {index=0x99, type="Prog", level=6, name="1st Time Past 50 ND Text"},
// {index=0x9B, type="Prog", level=6, name="CC WS Eyes Active"}, // {index=0x9B, type="Prog", level=6, name="CC WS Eyes Active"},
// {index=0x9C, type="Prog", level=6, name="CC WS Left Eye Pressed"}, BKPROG_9C_LAIR_CC_WITCH_SWITCH_LEFT_EYE_PRESSED = 0x9C,
// {index=0x9D, type="Prog", level=6, name="CC WS Right Eye Pressed"}, BKPROG_9D_LAIR_CC_WITCH_SWITCH_RIGHT_EYE_PRESSED = 0x9D,
// {index=0x9E, type="Prog", level=6, name="Crypt Coffin Lid Open"},
BKPROG_9E_CRYPT_COFFIN_LID_OPEN = 0x9E, BKPROG_9E_CRYPT_COFFIN_LID_OPEN = 0x9E,
BKPROG_A1_STATUE_HAT_OPEN = 0xA1, BKPROG_A1_STATUE_HAT_OPEN = 0xA1,

View File

@@ -166,7 +166,7 @@ Actor *func_802C8C04(s32 position[3], s32 yaw, ActorInfo* actorInfo, u32 flags);
Actor *marker_getActor(ActorMarker *); Actor *marker_getActor(ActorMarker *);
f32 time_getDelta(void); f32 time_getDelta(void);
void jiggySpawn(u32 indx, f32 pos[3]); void jiggySpawn(enum jiggy_e jiggy_id, f32 pos[3]);
struct3s *func_802F8264(s32 arg0); struct3s *func_802F8264(s32 arg0);
struct6s *func_802F8BE0(s32 arg0); struct6s *func_802F8BE0(s32 arg0);

View File

@@ -857,4 +857,13 @@ typedef struct {
// u8 pad31[3]; // u8 pad31[3];
}Struct80s; }Struct80s;
typedef struct {
u8 pad0[4];
struct actor_marker_s *marker;
f32 position[3];
void (*unk14)(struct actor_s *, struct actor_marker_s *);
struct actor_marker_s *unk18;
}Struct81s;
#endif #endif

View File

@@ -9,7 +9,7 @@
</mask> </mask>
<g mask="url(#anybadge_1)"> <g mask="url(#anybadge_1)">
<path fill="#555" d="M0 0h44v20H0z"/> <path fill="#555" d="M0 0h44v20H0z"/>
<path fill="#6fe000" d="M44 0h67v20H44z"/> <path fill="#6ee000" d="M44 0h67v20H44z"/>
<path fill="url(#b)" d="M0 0h111v20H0z"/> <path fill="url(#b)" d="M0 0h111v20H0z"/>
</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">
@@ -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">75.2473%</text> <text x="78.5" y="15" fill="#010101" fill-opacity=".3">75.5318%</text>
<text x="77.5" y="14">75.2473%</text> <text x="77.5" y="14">75.5318%</text>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -9,7 +9,7 @@
</mask> </mask>
<g mask="url(#anybadge_1)"> <g mask="url(#anybadge_1)">
<path fill="#555" d="M0 0h150v20H0z"/> <path fill="#555" d="M0 0h150v20H0z"/>
<path fill="#57e000" d="M150 0h67v20H150z"/> <path fill="#56e000" d="M150 0h67v20H150z"/>
<path fill="url(#b)" d="M0 0h217v20H0z"/> <path fill="url(#b)" d="M0 0h217v20H0z"/>
</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">
@@ -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">80.5899%</text> <text x="184.5" y="15" fill="#010101" fill-opacity=".3">80.7531%</text>
<text x="183.5" y="14">80.5899%</text> <text x="183.5" y="14">80.7531%</text>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -42,7 +42,7 @@ void func_80323230(void){}
void func_80323238(void){} void func_80323238(void){}
// BREAK ??? // =============================================BREAK ???
extern f32 func_80258708(f32 [3], f32[3]); extern f32 func_80258708(f32 [3], f32[3]);
extern f32 ml_vec3f_distance_squared(f32 [3], f32 [3]); extern f32 ml_vec3f_distance_squared(f32 [3], f32 [3]);
@@ -79,7 +79,6 @@ f32 func_803232AC(f32 *arg0, f32 arg1, f32 arg2, s32 arg3, f32 arg4) {
func_80341180(arg2, arg3, 3, arg0, sp60); func_80341180(arg2, arg3, 3, arg0, sp60);
var_f22 += func_80258708(sp6C, sp60); var_f22 += func_80258708(sp6C, sp60);
return var_f22; return var_f22;
} }
f32 func_803233F8(struct56s *arg0) { f32 func_803233F8(struct56s *arg0) {

View File

@@ -2,33 +2,207 @@
#include "functions.h" #include "functions.h"
#include "variables.h" #include "variables.h"
extern void func_80347B54(Struct81s *);
extern void func_80347B80(Struct81s *);
extern void func_80347C5C(Struct81s *, Gfx **, Mtx **, Vtx **);
extern void func_80347C70(Struct81s *);
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_ABC00/func_80332B90.s") extern void func_80347CC8(Struct81s *);
extern void func_80347CF4(Struct81s *);
extern void func_80347DD0(Struct81s *, Gfx **, Mtx **, Vtx **);
extern void func_80347DE4(Struct81s *);
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_ABC00/func_80332BB0.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_ABC00/func_80332BEC.s") typedef struct {
void (*unk0)(void **);
void (*unk4)(void **);
void (*unk8)(void **, Gfx**, Mtx **, Vtx **);
void (*unkC)(void **);
Struct81s unk10;
}Struct_core2_ABC00_0;
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_ABC00/func_80332CCC.s") void func_803331D8(enum jiggy_e, f32[3]);
void func_803332D0(Actor *);
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_ABC00/func_80332D98.s") /* .data */
extern u8 D_8036E830;
extern Struct_core2_ABC00_0 D_8036E834[];
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_ABC00/func_80332E08.s") /* .bss */
extern s32 D_80383560;
extern s32 D_80383564;
extern s32 D_80383568;
extern s32 D_8038356C;
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_ABC00/func_80332F4C.s") /* .code */
void func_80332B90(void){
func_8024BD08(1);
}
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_ABC00/func_8033301C.s") void func_80332BB0(void) {
timedFunc_set_0(1.0f, func_80332B90);
func_8025A55C(-1, 4000, 5);
}
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_ABC00/jiggySpawn.s") void func_80332BEC(enum map_e map_id) {
s32 temp_a2;
s32 temp_at;
s32 temp_hi;
s32 temp_lo;
s32 temp_t4;
s32 var_a1;
s32 var_v1;
s32 var_v0;
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_ABC00/func_803331D8.s") var_v1 = (map_getLevel(map_id) - 1) % (D_80383568 = 0xA);
var_a1 = MAX(0, var_v1);
D_80383560 = var_a1 * 0xA;
D_80383564 = (var_a1 + 1) * 0xA;
for(D_8038356C = D_80383560; D_8038356C < D_80383564; D_8038356C++){
D_8036E834[D_8038356C].unk10.marker = NULL;
}
D_8036E830 = 0;
}
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_ABC00/func_80333270.s") void func_80332CCC(void) {
Actor **temp_v0;
s32 i;
temp_v0 = func_80326FC0();
for(D_8038356C = 0; temp_v0[D_8038356C] != NULL; D_8038356C++){
if(!temp_v0[D_8038356C]->unk44_2){
D_8036E834[func_802C8088(temp_v0[D_8038356C]) - 1].unk10.marker = temp_v0[D_8038356C]->marker;
}
}
}
void func_80332D98(enum map_e map_id, enum jiggy_e jiggy_id, enum bkprog_e flag_id, s32 arg3) {
f32 sp1C[3];
if ((map_get() == map_id)
&& func_8031FF1C(flag_id)
&& !jiggyscore_isSpawned(jiggy_id)
&& func_80304E24(arg3, sp1C)
) {
func_803331D8(jiggy_id, sp1C);
}
}
void func_80332E08(void) {
s32 temp_t0;
s32 var_v0;
void *temp_v1;
for(D_8038356C = D_80383560; D_8038356C < D_80383564; D_8038356C++) {
if (D_8036E834[D_8038356C].unk10.marker != NULL) {
D_8036E834[D_8038356C].unk4(&D_8036E834[D_8038356C].unk10);
var_v0 = D_8038356C;
}
}
func_80332D98(MAP_69_GL_MM_LOBBY, JIGGY_34_LAIR_MM_WITCH_SWITCH, BKPROG_18_MM_WITCH_SWITCH_JIGGY_SPAWNED, 0x205);
func_80332D98(MAP_6F_GL_FP_LOBBY, JIGGY_39_LAIR_MMM_WITCH_SWITCH, BKPROG_19_MMM_WITCH_SWITCH_JIGGY_SPAWNED, 0x207);
func_80332D98(MAP_6D_GL_TTC_LOBBY, JIGGY_36_LAIR_TTC_WITCH_SWITCH, BKPROG_1A_TTC_WITCH_SWITCH_JIGGY_SPAWNED, 0x209);
func_80332D98(MAP_76_GL_640_NOTE_DOOR, JIGGY_3B_LAIR_RBB_WITCH_SWITCH, BKPROG_1C_RBB_WITCH_SWITCH_JIGGY_SPAWNED, 0x20C);
func_80332D98(MAP_79_GL_CCW_LOBBY, JIGGY_3C_LAIR_CCW_WITCH_SWITCH, BKPROG_46_CCW_WITCH_SWITCH_JIGGY_SPAWNED, 0x238);
if ((D_8036E830 == 0) && func_8031FF1C(BKPROG_9C_LAIR_CC_WITCH_SWITCH_LEFT_EYE_PRESSED)) {
func_80332D98(MAP_6A_GL_TTC_AND_CC_PUZZLE, JIGGY_35_LAIR_CC_WITCH_SWITCH, BKPROG_9D_LAIR_CC_WITCH_SWITCH_RIGHT_EYE_PRESSED, 0x190);
}
D_8036E830 = 1;
}
void func_80332F4C(Gfx **gfx, Mtx **mtx, Vtx **vtx) {
for(D_8038356C = D_80383560; D_8038356C < D_80383564; D_8038356C++) {
if (D_8036E834[D_8038356C].unk10.marker != NULL) {
D_8036E834[D_8038356C].unk8(&D_8036E834[D_8038356C].unk10, gfx, mtx, vtx);
}
}
}
void func_8033301C(void) {
for(D_8038356C = D_80383560; D_8038356C < D_80383564; D_8038356C++) {
if (D_8036E834[D_8038356C].unk10.marker != NULL) {
func_803332D0(marker_getActor(D_8036E834[D_8038356C].unk10.marker));
}
}
}
void jiggySpawn(enum jiggy_e jiggy_id, f32 pos[3]) {
Struct_core2_ABC00_0 *temp_v0;
jiggy_id = ((jiggy_id <= 0) || (jiggy_id >= (D_80383568 * 10))) ? 10 : jiggy_id;
temp_v0 = &D_8036E834[jiggy_id - 1];
if (D_8036E834[jiggy_id - 1].unk10.marker == NULL) {
temp_v0->unk10.position[0] = pos[0];
temp_v0->unk10.position[1] = pos[1];
temp_v0->unk10.position[2] = pos[2];
temp_v0->unk0(&temp_v0->unk10);
jiggyscore_setSpawned(jiggy_id, TRUE);
if (!jiggyscore_isCollected(jiggy_id) && (jiggy_id != 0x3E) && (jiggy_id != 0xB)) {
func_8024BD08(0);
func_8025A55C(0, 4000, 5);
func_8025A6EC(COMUSIC_3D_JIGGY_SPAWN, 0x7FFF);
timedFunc_set_0(3.5f, func_80332BB0);
}
}
}
void func_803331D8(enum jiggy_e jiggy_id, f32 arg1[3]) {
jiggy_id = ((jiggy_id <= 0) || (jiggy_id >= (D_80383568 * 10))) ? JIGGY_A_MM_CONGA : jiggy_id;
D_8036E834[jiggy_id - 1].unk10.position[0] = arg1[0];
D_8036E834[jiggy_id - 1].unk10.position[1] = arg1[1];
D_8036E834[jiggy_id - 1].unk10.position[2] = arg1[2];
D_8036E834[jiggy_id - 1].unk0(&D_8036E834[jiggy_id - 1].unk10);
jiggyscore_setSpawned(jiggy_id, TRUE);
}
void func_80333270(enum jiggy_e jiggy_id, f32 position[3], void (*method)(Actor *, ActorMarker *), ActorMarker *other_marker) {
Struct_core2_ABC00_0 *ptr;
ptr = &D_8036E834[jiggy_id - 1];
jiggySpawn(jiggy_id, position);
ptr->unk10.unk14 = method;
ptr->unk10.unk18 = other_marker;
}
void func_803332D0(Actor *);
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_ABC00/func_803332D0.s") #pragma GLOBAL_ASM("asm/nonmatchings/core2/code_ABC00/func_803332D0.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_ABC00/func_80333334.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_ABC00/func_80333388.s") void func_80333334(enum jiggy_e jiggy_id) {
Struct_core2_ABC00_0 *temp_v0;
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_ABC00/func_803333DC.s") temp_v0 = &D_8036E834[jiggy_id - 1];
temp_v0->unk0 = func_80347B54;
temp_v0->unk4 = func_80347B80;
temp_v0->unk8 = func_80347C5C;
temp_v0->unkC = func_80347C70;
}
void func_80333388(enum jiggy_e jiggy_id) {
Struct_core2_ABC00_0 *temp_v0;
temp_v0 = &D_8036E834[jiggy_id - 1];
temp_v0->unk0 = func_80347CC8;
temp_v0->unk4 = func_80347CF4;
temp_v0->unk8 = func_80347DD0;
temp_v0->unkC = func_80347DE4;
}
void func_803333DC(Struct81s *arg0, Actor *arg1) {
s32 sp20;
arg0->marker = arg1->marker;
if (arg0->unk14 != NULL) {
arg0->unk14(arg1, arg0->unk18);
}
func_803300D8(arg1->marker, func_803332D0);
sp20 = ((s32) ((s32)arg0 - (s32)&D_8036E834) / 0x2C) + 1;
func_802C80B4(arg1, sp20);
if ((sp20 == JIGGY_49_CCW_EYRIE) || (sp20 == JIGGY_39_LAIR_MMM_WITCH_SWITCH) || (sp20 == JIGGY_3C_LAIR_CCW_WITCH_SWITCH)) {
arg1->marker->unk40_21 = TRUE;
arg1->marker->unk40_20 = TRUE;
}
}

View File

@@ -426,12 +426,35 @@ void func_8034798C(void){
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_BEF20/func_80347AA8.s") #pragma GLOBAL_ASM("asm/nonmatchings/core2/code_BEF20/func_80347AA8.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_BEF20/func_80347B10.s") /// =============== BREAK?????
extern void func_80329904(ActorMarker *, s32, f32 *);
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_BEF20/func_80347B54.s") void func_80347B10(Struct81s *arg0){
Actor *actor;
actor = func_802C937C(0x10, arg0->position);
actor->unk54 = 3.0f;
func_803333DC(arg0, actor);
}
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_BEF20/func_80347B80.s") void func_80347B54(Struct81s *arg0){
func_802C3C88((GenMethod_1)func_80347B10, reinterpret_cast(s32, arg0));
}
void func_80347C5C(s32 arg0, s32 arg1, s32 arg2, s32 arg3){} void func_80347B80(Struct81s *arg0) {
Actor *sp1C;
Actor *temp_v0;
void func_80347C70(s32 arg0){} sp1C = marker_getActor(arg0->marker);
if (sp1C->unk54 > 0.0) {
if (randf() < ((sp1C->unk54 / 3.0) * 2)) {
func_8033E73C(arg0->marker, 5, func_80329904);
func_8033E3F0(0xF, ((ActorMarker *)arg0->marker)->unk14_21);
// func_8033E3F0(0xF, arg0->marker->unk14_21);
}
sp1C->unk54 -= time_getDelta();
}
}
void func_80347C5C(Struct81s *arg0, Gfx **arg1, Mtx **arg2, Vtx **arg3){}
void func_80347C70(Struct81s *arg0){}