address variaty of compiler warnings and code documentation

This commit is contained in:
Banjo Kazooie
2022-12-03 01:30:35 -06:00
parent 263b5bab4e
commit 1c063c781c
211 changed files with 1341 additions and 1323 deletions

View File

@@ -152,7 +152,7 @@ void chmotzhand_update(Actor *this){
func_80387410(sp30);
}
else{
func_80389BCC(*local->pattern_ptr, sp30);
organMinigame_getKeyPosition(*local->pattern_ptr, sp30);
sp30[0] += local->unkC[0];
sp30[1] += local->unkC[1];
sp30[2] += local->unkC[2];

View File

@@ -120,7 +120,7 @@ void chnapper_update(Actor *this){
}//L80386CBC
if(this->state == 0){
jiggy = func_80326EEC(ACTOR_46_JIGGY);
jiggy = actorArray_findActorFromActorId(ACTOR_46_JIGGY);
if(jiggy){
local->jiggy_marker = jiggy->marker;
this->position_x = jiggy->position_x;\
@@ -222,4 +222,4 @@ void chnapper_update(Actor *this){
if(0.99 <= this->unk48)
marker_despawn(this->marker);
}
}
}

View File

@@ -126,7 +126,7 @@ void func_80387DF8(f32 position[3], s32 count, enum asset_e sprite_id) {
ParticleEmitter *pCtrl;
pCtrl = partEmitList_pushNew(count);
func_802EFFA8(pCtrl, &D_8038BAF4);
func_802EFFA8(pCtrl, D_8038BAF4);
particleEmitter_setSprite(pCtrl, sprite_id);
particleEmitter_setPosition(pCtrl, position);
particleEmitter_setPositionVelocityAndAccelerationRanges(pCtrl, &D_8038BB28);
@@ -184,7 +184,7 @@ void func_80388028(Actor *this){
this->unk16C_4 = TRUE;
this->unk16C_0 = TRUE;
marker_setCollisionScripts(this->marker, NULL, MMM_func_80387CF4, func_80387D1C);
__spawnqueue_add_1(func_80387D48, this->marker);
__spawnQueue_add_1((GenMethod_1)func_80387D48, reinterpret_cast(s32, this->marker));
func_80387B14(this, (this->state < 5) ? 1 : 6);
}//L803880B4

View File

@@ -15,7 +15,7 @@ typedef struct {
u8 unk1;
} Struct_MMM_3420_1;
void func_80389A0C(s32 arg0);
void organMinigame_setState(s32 arg0);
/* .data */
Struct_MMM_3420_0 D_8038BF20[] = {
@@ -136,28 +136,28 @@ f32 D_8038C1E0[3] = {0.0f, 3250.0f, -3200.0f}; //jiggy spawn position
/* .bss */
extern struct {
s32 unk0;
ActorMarker *unk4; //motzhand_marker
ActorMarker *motzhand_marker;
Struct_MMM_3420_0 *unk8;
u8 unkC; //state
u8 unkD; //pattern id
u8 state;
u8 pattern;
//u8 padE[2];
u8 *unk10;
}D_8038C4F0;
/* .code */
void MMM_func_80389810(ActorMarker *caller, enum asset_e text_id, s32 arg2) {
switch (D_8038C4F0.unkC) {
switch (D_8038C4F0.state) {
case 2:
func_80389A0C(3);
organMinigame_setState(3);
return;
case 4:
func_80389A0C(1);
organMinigame_setState(1);
return;
case 5:
func_80389A0C(3);
organMinigame_setState(3);
return;
case 6:
func_80389A0C(7);
organMinigame_setState(7);
return;
}
}
@@ -186,15 +186,15 @@ void func_80389910() {
void func_803899BC(void){
func_80324E38(0.0f, 3);
timedFunc_set_2(0.0f, (TFQM2)func_8025A6EC, COMUSIC_38_MOTZAND_BEATEN, 0x7fff);
timedFunc_set_2(0.0f, (GenMethod_2)func_8025A6EC, COMUSIC_38_MOTZAND_BEATEN, 0x7fff);
timedFunc_set_0(2.25f, func_80389910);
}
void func_80389A0C(s32 next_state){
void organMinigame_setState(s32 next_state){
func_8028F8F8(1, FALSE);
if(next_state == 2){
if(D_8038C4F0.unkD == 0){
D_8038C4F0.unkD = 1;
if(D_8038C4F0.pattern == 0){
D_8038C4F0.pattern = 1;
func_80311480(0xad3, 4, NULL, NULL, MMM_func_80389810, NULL);
}
else{//L80389A84
@@ -204,34 +204,34 @@ void func_80389A0C(s32 next_state){
if(next_state == 3){
D_8038C4F0.unk0 = 0;
if(D_8038C4F0.unkD == 1){
if(D_8038C4F0.pattern == 1){
D_8038C4F0.unk10 = D_8038C1CC;
}
else{
D_8038C4F0.unk10 = D_8038C1D4;
}
func_8028F8F8(1, TRUE);
func_803876C8(D_8038C4F0.unk4, D_8038C4F0.unkD);
func_803876C8(D_8038C4F0.motzhand_marker, D_8038C4F0.pattern);
}//L80389AF4
if(next_state == 4){
func_80311480(0xadd, 4, NULL, NULL, MMM_func_80389810, NULL);
func_80387720(D_8038C4F0.unk4);
func_80387720(D_8038C4F0.motzhand_marker);
}
if(next_state == 5){
D_8038C4F0.unkD++;
D_8038C4F0.pattern++;
func_80311480(0xad4, 4, NULL, NULL, MMM_func_80389810, NULL);
func_80387720(D_8038C4F0.unk4);
func_80387720(D_8038C4F0.motzhand_marker);
}
if(next_state == 6){
MMM_func_803898C8();
timedFunc_set_0(1.25f, func_803899BC);
func_80387654(D_8038C4F0.unk4);
func_80387654(D_8038C4F0.motzhand_marker);
}
D_8038C4F0.unkC = next_state;
D_8038C4F0.state = next_state;
}
s32 func_80389BBC(void){
@@ -239,7 +239,7 @@ s32 func_80389BBC(void){
}
//organCtrl_getKeyPosition
void func_80389BCC(s32 key_indx, f32 position[3]) {
void organMinigame_getKeyPosition(s32 key_indx, f32 position[3]) {
Struct_MMM_3420_1 *iPtr;
s32 is_black_key;
@@ -271,16 +271,16 @@ void MMM_func_80389CD8() {}
void func_80389CE0() {}
int func_80389CE8(s32 arg0, s32 arg1, s32 arg2){
if(D_8038C4F0.unkC == 3){
if(D_8038C4F0.state == 3){
if(*D_8038C4F0.unk10 == arg2){
D_8038C4F0.unk0--;
D_8038C4F0.unk10++;
if(*D_8038C4F0.unk10 == 0){
if(D_8038C4F0.unkD == 1){
func_80389A0C(5);
if(D_8038C4F0.pattern == 1){
organMinigame_setState(5);
}
else{
func_80389A0C(6);
organMinigame_setState(6);
}
}
return 1;
@@ -307,10 +307,10 @@ void func_80389DF4(s32 arg0, s32 arg1) {
D_8038C4F0.unk8 = &D_8038BF20;
func_80250170(0, 0x6A, 0);
D_8038C4F0.unkC = 0;
D_8038C4F0.state = 0;
if ((map_get() == MAP_1C_MMM_CHURCH) && (arg1 == 2)) {
D_8038C4F0.unk4 = NULL;
D_8038C4F0.unkD = 0;
D_8038C4F0.motzhand_marker = NULL;
D_8038C4F0.pattern = 0;
key_position[0] = -1345.0f;
key_position[1] = 1150.0f;
key_position[2] = -2300.0f;
@@ -329,24 +329,24 @@ void func_80389DF4(s32 arg0, s32 arg1) {
}
}
if (jiggyscore_isSpawned(JIGGY_60_MMM_MOTZHAND)) {
func_80389A0C(7);
organMinigame_setState(7);
return;
}
func_80389A0C(1);
organMinigame_setState(1);
}
}
void func_80389FC0(void){
void organMinigame_update(void){
UNK_TYPE(u32) sp4C;
f32 sp48;
f32 motzhand_dist;
Actor *motzhand;
f32 sp38[3];
f32 plyr_pos[3];
Actor *motzhand_2;
if(D_8038C4F0.unkC == 0) return;
if(D_8038C4F0.state == 0) return;
if(func_802501A0(0, 0x6A, &sp4C)){
func_80250170(0, 0x6A, 0);
@@ -356,25 +356,25 @@ void func_80389FC0(void){
}
}//L8038A02C
if(D_8038C4F0.unkC == 1 && D_8038C4F0.unk4 == NULL){
if(D_8038C4F0.state == 1 && D_8038C4F0.motzhand_marker == NULL){
sp38[0] = sp38[1] = sp38[2] = 0.0f;
motzhand = func_80326D68(sp38, ACTOR_3A_MOTZHAND, -1, &sp48);
D_8038C4F0.unk4 = motzhand->marker;
motzhand = actorArray_findClosestActorFromActorId(sp38, ACTOR_3A_MOTZHAND, -1, &motzhand_dist);
D_8038C4F0.motzhand_marker = motzhand->marker;
}//L8038A078
if(D_8038C4F0.unkC == 1 || D_8038C4F0.unkC == 3){
if(func_8038769C(D_8038C4F0.unk4)){
if(D_8038C4F0.state == 1 || D_8038C4F0.state == 3){
if(func_8038769C(D_8038C4F0.motzhand_marker)){
player_getPosition(plyr_pos);
motzhand_2 = marker_getActor(D_8038C4F0.unk4);
motzhand_2 = marker_getActor(D_8038C4F0.motzhand_marker);
if( ml_vec3f_distance(motzhand_2->position, plyr_pos) < 400.0f
&& motzhand_2->position_y - 50.0f <= plyr_pos[1]
){
func_80389A0C(2);
organMinigame_setState(2);
}
}
}//L8038A104
if(D_8038C4F0.unkC == 3 && D_8038C4F0.unk0 >= 3){
func_80389A0C(4);
if(D_8038C4F0.state == 3 && D_8038C4F0.unk0 >= 3){
organMinigame_setState(4);
}
}

View File

@@ -82,7 +82,7 @@ void MMM_func_8038ADF0(Struct_MMM_47D0_0 *arg0, Struct68s *arg1) {
func_8030E2C4(sp3F);
func_8035179C(arg1, sp28);
sp38 = 500.0f;
jiggy = func_80326D68(sp28, ACTOR_46_JIGGY, -1, &sp38);
jiggy = actorArray_findClosestActorFromActorId(sp28, ACTOR_46_JIGGY, -1, &sp38);
if (jiggy != NULL) {
arg0->unk0 = jiggy->marker;
} else {

View File

@@ -91,4 +91,4 @@ bool MMM_func_80387340(ActorMarker *marker){
}
func_803871D4(sp1C);
return TRUE;
}
}

View File

@@ -3,4 +3,4 @@
u32 D_8038C300 = 0x00146061;
u32 D_8038C304 = 0xEC79D7B4;
u32 D_8038C308 = 0x0001B98D;
u32 D_8038C30C = 0x0;
u32 D_8038C30C = 0x0;