Fix some warnings

This commit is contained in:
Donkey Kong 2024-05-11 15:04:22 +09:30
parent 3f229e162f
commit 7557b58957
19 changed files with 62 additions and 75 deletions

View File

@ -1596,12 +1596,12 @@ u8 func_global_asm_8062D2AC(void *arg0, void *arg1, u8 arg2);
void func_global_asm_8062E608(void *arg0, s32 *arg1, s32 arg2);
void func_global_asm_8062F318(void);
s32 func_global_asm_8062F388(s32 *arg0);
void func_global_asm_8062A274(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4);
void func_global_asm_8062A274(s32 arg0, s32 arg1, void *arg2, s32 arg3, s32 arg4);
u8 func_global_asm_8062919C(void);
u8 func_global_asm_806291A8(void);
void func_global_asm_8062A130(s32 arg0, s32 arg1, s32 arg2);
void func_global_asm_8062A228(s32 arg0, s32 arg1, s32 arg2);
void func_global_asm_8062A24C(s32 arg0, s32 arg1, s32 arg2);
void func_global_asm_8062A130(s32 arg0, s32 arg1, void* arg2);
void func_global_asm_8062A228(s32 arg0, s32 arg1, void *arg2);
void func_global_asm_8062A24C(s32 arg0, s32 arg1, void *arg2);
void func_global_asm_8062A348(void);
void func_global_asm_8062A774(void);
void func_global_asm_8062A7D0(void);
@ -1659,7 +1659,7 @@ void func_global_asm_80663844(Actor *arg0);
s32 func_global_asm_8060095C(s32 arg0, s32 *arg1, s32 *arg2);
f32 func_global_asm_806FDA8C(s16 arg0);
void func_global_asm_806FDAB8(s16 arg0, f32 arg1);
void func_global_asm_806FDF1C(s16 arg0, s32 arg1);
void func_global_asm_806FDF1C(s16 arg0, char *arg1);
void func_global_asm_806FF32C(Gfx *dl, Actor *arg1);
void func_global_asm_806FFF5C(void);
void func_global_asm_807040D0(u16 arg0);
@ -1799,7 +1799,6 @@ void func_global_asm_8068B9B4(void);
void func_global_asm_8068BA2C(void);
void func_global_asm_8060B84C(f32);
void func_global_asm_8066EABC(Actor *arg0);
void func_global_asm_80732D80(s32 *arg0);
f32 func_global_asm_80732DAC(f32 arg0);
void func_global_asm_806C6530(void);
void func_global_asm_806C6884(s16 arg0, s16 arg1, u16 arg2);
@ -2339,7 +2338,7 @@ void func_global_asm_806F0D68(Actor*);
void func_global_asm_806C9AE0(void);
s16 func_global_asm_80631FAC(Maps arg0, u8 arg1);
u8 func_global_asm_80731654(s16, s16);
void func_critter_80026FD0(s32 arg0);
void func_critter_80026FD0(void *arg0);
void setupRaceOnMapLoad(Maps map);
void func_global_asm_80600590(Maps map);
void func_boss_8002920C(void);
@ -2421,7 +2420,7 @@ void func_global_asm_80697CEC(void);
void func_global_asm_80713438(Gfx *dl, u8 arg1);
void func_global_asm_80713764(Gfx *dl, u8 arg1, f32 arg2);
void func_global_asm_8069CD9C(void);
s32 func_global_asm_8069D930(Gfx *dl, Actor *arg1);
Gfx *func_global_asm_8069D930(Gfx *dl, Actor *arg1);
void func_global_asm_8065996C(s16 arg0);
s32 func_global_asm_8069E724(s32 arg0);
void func_global_asm_8069F904(Gfx *dl, Actor *arg1);

View File

@ -1405,7 +1405,8 @@ struct actor {
void *additional_data_pointer; //legacy
};
union {
Actor178 *unk178;
void *unk178;
Actor178 *a178;
RaceActor178 *race178;
BossActor178 *boss178;
A178_806A18A8 *a178_806A18A8;
@ -1414,7 +1415,7 @@ struct actor {
Actor17C *unk17C;
};
union {
s32 unk180;
void *unk180;
SnideAaD180* snide_aad_180;
};
void* unk184;

View File

@ -93,16 +93,6 @@ typedef struct {
CritterStruct0 *unk4;
} CritterStruct1;
// CritterController again?
typedef struct unkStruct_critter_80029BA0 {
u8 unk0;
u8 unk1;
u8 unk2;
u8 unk3;
s32 unk4;
s32 unk8;
} unkStruct_critter_80029BA0;
typedef struct {
s16 unk0;
s16 unk2;
@ -172,7 +162,7 @@ typedef struct Struct80025AD0 {
Struct800247F4* unk8;
} Struct80025AD0;
extern unkStruct_critter_80029BA0* D_critter_80029BA0;
extern CritterController* D_critter_80029BA0;
extern s32 D_critter_80029BA8;
extern s32 D_global_asm_8071FC40;
@ -184,7 +174,7 @@ Gfx *func_critter_80025AD0(Gfx *, Struct80025AD0 *);
void func_critter_80025DB8(CritterStruct6*, CritterStruct6*, u8, s16, u8);
void func_critter_800262C0(Critter*, CritterController*);
void func_critter_8002646C(Critter*, Critter*);
void func_critter_80026E0C(s32);
void func_critter_80026E0C(CritterController*);
void func_global_asm_8060956C(f32, f32, f32, s32, u8, f32, u8, u8);
void func_global_asm_80718BF4(void);
@ -881,7 +871,7 @@ void func_critter_80026904(Critter *arg0, CritterController *arg1) {
}
}
s32 func_critter_80026A5C(Critter *arg0, s32 arg1) {
s32 func_critter_80026A5C(Critter *arg0, CritterController *arg1) {
CritterStruct5 *temp_v0;
if (arg0->unk1E2 == 1) {
@ -915,7 +905,7 @@ s32 func_critter_80026A5C(Critter *arg0, s32 arg1) {
}
void func_critter_80026B78(CritterController *arg0) {
void (*var_s3)(void *);
void (*var_s3)(Critter *);
s32 i;
u8 temp_t6;
Critter *critter;
@ -1007,20 +997,20 @@ void func_critter_80026C9C(CritterController *arg0) {
void func_critter_80027118(CritterController *arg0);
void func_critter_80026E0C(s32 arg0) {
void func_critter_80026E0C(CritterController *arg0) {
s32 j;
unkStruct_critter_80029BA0 *var_s2;
CritterController *var_s2;
Struct80026E0C *var_s0;
s32 i;
s32 var_s3;
if (arg0 != 0) {
if (arg0 != NULL) {
memcpy(D_critter_80029BA0, arg0, 1);
var_s3 = arg0 + 1;
for (i = 0; i < D_critter_80029BA0->unk0; i++) {
var_s3 = &arg0->unk1;
for (i = 0; i < D_critter_80029BA0->critter_count; i++) {
j = 0;
if (i == 0) {
D_critter_80029BA0->unk4 = malloc(D_critter_80029BA0->unk0 * 0xC);
D_critter_80029BA0->unk4 = malloc(D_critter_80029BA0->critter_count * 0xC);
func_global_asm_80611690(D_critter_80029BA0->unk4);
var_s2 = D_critter_80029BA0->unk4;
} else {
@ -1049,7 +1039,7 @@ void func_critter_80026E0C(s32 arg0) {
}
}
void func_critter_80026FD0(s32 arg0) {
void func_critter_80026FD0(void *arg0) {
D_critter_80029BA8 = 0;
D_critter_80029BA0 = malloc(8); // TODO: Something up here...
func_global_asm_80611690(D_critter_80029BA0);

View File

@ -47,8 +47,8 @@ void func_dk64_boot_80000450(s32 devAddr, s32 arg1, void *dramAddr) {
}
void func_dk64_boot_800004B4(s32 *arg0, s32 *arg1) {
func_dk64_boot_800024E0(arg0, arg1, 0x804FAE00);
func_dk64_boot_800024E0(arg0, arg1, 0x804FAE00);
func_dk64_boot_800024E0(arg0, arg1, (void*)0x804FAE00);
func_dk64_boot_800024E0(arg0, arg1, (void*)0x804FAE00);
}
void func_dk64_boot_800004F4(s32 arg0) {
@ -58,7 +58,7 @@ void func_dk64_boot_800004F4(s32 arg0) {
switch ((u32)sp24) {
case 0x29d://L80000538
if (D_dk64_boot_8000DCB0) {
gaFunc = 0x805fb300;
gaFunc = (void*)0x805fb300;
gaFunc(&D_dk64_boot_80011548, 2);
break;
}
@ -66,17 +66,17 @@ void func_dk64_boot_800004F4(s32 arg0) {
while(1);
case 0x309: //L80000570
osSetThreadPri(NULL, 0x12);
gaFunc = 0x805fb300;
gaFunc = (void*)0x805fb300;
gaFunc(&D_dk64_boot_80011548, 1);
while(1);
}
}
#ifndef NONMATCHING
void func_dk64_boot_800005A8(s32 arg0);
void func_dk64_boot_800005A8(void *arg0);
#pragma GLOBAL_ASM("asm/nonmatchings/dk64_boot/dk64_boot_1050/func_dk64_boot_800005A8.s")
#else
void func_dk64_boot_800005A8(s32 arg0) {
void func_dk64_boot_800005A8(void *arg0) {
u32 sp34;
u32 sp30;
s32 sp20[3] = D_dk64_boot_8000DE74;
@ -157,7 +157,7 @@ void func_dk64_boot_80000980(void) {
void func_dk64_boot_800009D0(void) {
u32 *tmp_a0;
osInitialize();
tmp_a0 = 0xA02FE1C0;
tmp_a0 = (void*)0xA02FE1C0;
while(0xAD170014 != *tmp_a0);
*tmp_a0 = 0xF0F0F0F0;
func_dk64_boot_80000980();

View File

@ -6,13 +6,13 @@ typedef struct {
s32 unk4;
s32 unk8;
s32 unkC;
s32 unk10;
s32 unk14;
s32 unk18;
void *unk10;
void *unk14;
void *unk18;
} Struct80732DEC;
typedef struct {
s32 unk0;
void *unk0;
u8 unk4;
s8 unk5;
s8 unk6;
@ -128,11 +128,11 @@ s32 func_global_asm_80732B3C(Struct80732B3C *arg0, f32 *arg1) {
return sp24;
}
void func_global_asm_80732D80(s32 *arg0) {
s32 *sp4;
void func_global_asm_80732D80(Struct80732B3C *arg0) {
Struct80732B3C *sp4;
sp4 = arg0;
*arg0 = D_global_asm_807FF030;
arg0->unk0 = D_global_asm_807FF030;
D_global_asm_807FF030 = arg0;
}

View File

@ -63,10 +63,7 @@ s32 func_global_asm_806FBB9C(s16 textureIndex) {
}
void func_global_asm_806FBC34(void) {
s16 i;
s16 k;
s16 j;
Struct80754A34 *temp_s3;
s16 i, k, j;
i = 0;
for (j = 0; j < 8; j++) {

View File

@ -100,7 +100,7 @@ void func_global_asm_806FDAEC(s16 arg0) {
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_1025E0/func_global_asm_806FDB8C.s")
void func_global_asm_806FDF1C(s16 arg0, s32 arg1) {
void func_global_asm_806FDF1C(s16 arg0, char *arg1) {
strcpy(func_global_asm_806FD9B4(arg0)->unk4, arg1);
}

View File

@ -736,8 +736,8 @@ void func_global_asm_8071338C(Gfx *dl) {
}
void func_global_asm_80713438(Gfx *dl, u8 arg1) {
void *sp34;
s32 sp30;
char *sp34;
char *sp30;
s32 pad2C;
f32 sp28;
f32 temp_f16;

View File

@ -82,7 +82,7 @@ void func_global_asm_806291B4(u8 arg0) {
// Jumptable, doable, displaylist stuff
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_2DE90/func_global_asm_80629300.s")
void func_global_asm_8062A130(s32 arg0, s32 arg1, s32 arg2) {
void func_global_asm_8062A130(s32 arg0, s32 arg1, void* arg2) {
f32 temp_f0;
s32 phi_v0;
@ -104,15 +104,15 @@ void func_global_asm_8062A130(s32 arg0, s32 arg1, s32 arg2) {
func_global_asm_80704130(arg2, 0xFF, 0xFF, 0xFF, phi_v0, 0);
}
void func_global_asm_8062A228(s32 arg0, s32 arg1, s32 arg2) {
void func_global_asm_8062A228(s32 arg0, s32 arg1, void *arg2) {
func_global_asm_8062A274(arg0, arg1, arg2, 0, 0);
}
void func_global_asm_8062A24C(s32 arg0, s32 arg1, s32 arg2) {
void func_global_asm_8062A24C(s32 arg0, s32 arg1, void *arg2) {
func_global_asm_8062A274(arg0, arg1, arg2, 0xA0, 0x78);
}
void func_global_asm_8062A274(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) {
void func_global_asm_8062A274(s32 arg0, s32 arg1, void *arg2, s32 arg3, s32 arg4) {
f32 temp_f0;
s32 temp_v0;
s32 temp_v1;

View File

@ -721,7 +721,7 @@ s32 func_global_asm_80600080(Maps map) {
// close
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_3C10/func_global_asm_80600174.s")
int func_global_asm_80689C20(s32, s32, s32, s32, f32, f32);
int func_global_asm_80689C20(s32, s32, s32, f32, f32, f32);
void func_global_asm_80631F58(void*, void*, void*);
s16 func_global_asm_80600174(f32*, f32*, f32*);
@ -747,7 +747,7 @@ s16 func_global_asm_80600174(f32 *x, f32 *y, f32 *z) {
s32 func_global_asm_80600340(s32 arg0, u8 arg1, s32 *arg2) {
s32 sp3C;
s32 sp38;
s32 sp34;
f32 sp34;
f32 sp30;
f32 sp2C;
u8 temp_1 = func_global_asm_80600174(&sp34, &sp30, &sp2C);

View File

@ -48,7 +48,7 @@ void func_global_asm_80685F60(Actor *actor);
void func_global_asm_80684550(Actor *actor, u8 boneIndex, f32 scale) {
func_global_asm_807149B8(1);
func_global_asm_8071498C(&func_global_asm_8071AF30);
func_global_asm_80714950(actor);
func_global_asm_80714950((s32)actor);
func_global_asm_80714A28(4);
func_global_asm_80714C08(&D_global_asm_80720120, scale, current_actor_pointer, boneIndex, 0);
}
@ -636,7 +636,7 @@ void func_global_asm_8068696C(Actor *actor) {
for (i = 0; i < 0x10; i++) {
func_global_asm_807149B8(1);
func_global_asm_807149FC(-1);
func_global_asm_80714950(actor);
func_global_asm_80714950((s32)actor);
func_global_asm_8071498C(&func_global_asm_8071DC90);
drawSpriteAtPosition(D_global_asm_8074E880[i % 3], 0.7f, actor->x_position, actor->y_position, actor->z_position);
}
@ -647,14 +647,14 @@ void func_global_asm_80686A5C(Actor *actor, f32 arg1, f32 arg2, s32 arg3) {
for (i = 0; i < 3; i++) {
func_global_asm_807149B8(1);
func_global_asm_807149FC(-1);
func_global_asm_80714950(actor);
func_global_asm_80714950((s32)actor);
func_global_asm_8071498C(func_global_asm_8071E1C8);
func_global_asm_8071E110(drawSpriteAtPosition(D_global_asm_8074E880[i], 0.7f, actor->x_position, actor->y_position, actor->z_position), 1, (i * 1365.3334f), arg1, arg2, arg3);
}
for (i = 0; i < 3; i++) {
func_global_asm_807149B8(1);
func_global_asm_807149FC(-1);
func_global_asm_80714950(actor);
func_global_asm_80714950((s32)actor);
func_global_asm_8071498C(func_global_asm_8071E1C8);
func_global_asm_8071E110(drawSpriteAtPosition(D_global_asm_8074E880[i], 0.7f, actor->x_position, actor->y_position, actor->z_position), 0, (i * 1365.3334f), arg1, arg2, arg3);
}

View File

@ -93,7 +93,7 @@ Gfx *func_global_asm_8068DAF4(Gfx *dl, u8 *arg1) {
gDPSetCombineMode(dl++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
gDPSetPrimColor(dl++, 0, 0, 0xFF, 0xFF, 0xFF, 0x96);
sprintf(&sp38, "%d", *arg1);
sprintf(sp38, "%d", *arg1);
return printStyledText(dl, 3, 260, 80, &sp38, 1);
}
@ -135,19 +135,19 @@ Gfx *func_global_asm_8068E7B4(Gfx *dl, f32 arg1, f32 arg2, s32 seconds) {
f32 pad48;
s32 pad44;
s32 minutes;
s32 sp3C;
char sp3C[4];
s32 y;
sp50 = arg2 - (func_global_asm_806FD894(0x86) * 0.5f);
sprintf(&sp3C, ":");
sp4C = getCenterOfString(6, &sp3C) * 0.5f;
sprintf(sp3C, ":");
sp4C = getCenterOfString(6, sp3C) * 0.5f;
sp54 = arg1 - sp4C;
y = sp50 * 4.0f;
minutes = seconds / 60;
dl = printStyledText(dl, 6, sp54 * 4.0f, y, &sp3C, 1);
sprintf(&sp3C, "%2d", minutes);
sprintf(sp3C, "%2d", minutes);
sp54 -= getCenterOfString(0x86, &sp3C);
dl = printStyledText(dl, 0x86, sp54 * 4.0f, y, &sp3C, 1);
sprintf(&sp3C, "%02d", seconds - (minutes * 60));
sprintf(sp3C, "%02d", seconds - (minutes * 60));
return printStyledText(dl, 0x86, (arg1 + sp4C) * 4.0f, y, &sp3C, 1);
}

View File

@ -1559,7 +1559,7 @@ void func_global_asm_80696A6C(void) {
func_global_asm_807149B8(1);
func_global_asm_8071498C(func_global_asm_8071AF30);
func_global_asm_807149A8(0x3E8);
func_global_asm_80714950(current_actor_pointer);
func_global_asm_80714950((s32)current_actor_pointer);
func_global_asm_80714C08(&D_global_asm_80720120, 1.0f, current_actor_pointer, 1, 0);
}
renderActor(current_actor_pointer, 0);

View File

@ -523,7 +523,7 @@ typedef struct {
u8 unkA;
} AAD_global_asm_8069D930;
s32 func_global_asm_8069D930(Gfx *dl, Actor *arg1) {
Gfx *func_global_asm_8069D930(Gfx *dl, Actor *arg1) {
AAD_global_asm_8069D930 *aaD;
aaD = arg1->additional_actor_data;

View File

@ -171,7 +171,7 @@ void func_global_asm_806BE09C(void) {
func_global_asm_8071498C(&func_global_asm_8071D0F0);
func_global_asm_807149FC(-1);
func_global_asm_807149B8(1);
func_global_asm_80714950(current_actor_pointer);
func_global_asm_80714950((s32)current_actor_pointer);
func_global_asm_80714C08(func_global_asm_806FACE8(0), 0.3f, player_pointer, 4, 0);
}
} else if (D_global_asm_807FDC90->unk2E == 0) {

View File

@ -3,7 +3,7 @@
extern s32 D_global_asm_8071FFA0;
extern s32 D_global_asm_8074E880[]; // TODO: Datatype
extern void *D_global_asm_8074E880[]; // TODO: Sprite
extern s16 D_global_asm_807F6248;
extern s16 D_global_asm_807F624C;

View File

@ -770,7 +770,7 @@ void func_global_asm_806F9744(Struct806F9744_arg0 *arg0, s32 arg1, f32 arg2, f32
}
func_global_asm_80714998(sp2C);
func_global_asm_80714944(arg4);
func_global_asm_80714950(arg0);
func_global_asm_80714950((s32)arg0);
func_global_asm_8071498C(&func_global_asm_8071BE04);
func_global_asm_80714A28(0x21);
if (arg1 == 3) {

View File

@ -1871,7 +1871,7 @@ void func_menu_80030894(MenuAdditionalActorData *arg0, void *arg1, s32 arg2, s32
func_global_asm_80714998(arg5);
func_global_asm_8071495C();
func_global_asm_807149FC(-1);
func_global_asm_80714950(arg0);
func_global_asm_80714950((s32)arg0);
func_global_asm_8071498C(&func_menu_80030C14);
func_global_asm_80714A28(1);
sp3C = drawSpriteAtPosition(arg1, arg4, arg2, arg3, -10.0f);

View File

@ -147,7 +147,7 @@ void func_minecart_800241A0(s16 *arg0, u8 arg1, u8 arg2) {
// TODO: Get rid of this typecast if possible
if (((func_global_asm_806119A0() & 0xFF) >= (u32)arg2) && (*arg0 == 0)) {
playSoundAtActorPosition(current_actor_pointer, 0x8A, 0x96, 0x7F, 0x32);
func_global_asm_80714950(current_actor_pointer);
func_global_asm_80714950((s32)current_actor_pointer);
func_global_asm_8071498C(&func_global_asm_8071A440);
D_minecart_80028C30 = func_global_asm_80714C08(&D_global_asm_8072006C, 0.4f, current_actor_pointer, arg1 + 7, 2);
}