Skip to content

Commit

Permalink
clean up protos
Browse files Browse the repository at this point in the history
  • Loading branch information
thefoxcam committed Jul 25, 2024
1 parent 5b1d33a commit 585ce17
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 94 deletions.
3 changes: 2 additions & 1 deletion src/melee/ft/ftcoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,8 @@ void ftColl_80077464(void)
NOT_IMPLEMENTED;
}

void ftColl_80077688(void)
void ftColl_80077688(Item* item, HitCapsule* hurt, Fighter* fp, Vec3* pos,
f32 val)
{
NOT_IMPLEMENTED;
}
Expand Down
2 changes: 2 additions & 0 deletions src/melee/ft/ftcoll.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <platform.h>
#include "ft/forward.h"
#include "ftCommon/forward.h"
#include "it/forward.h"
#include "lb/forward.h"
#include <baselib/forward.h>

Expand Down Expand Up @@ -33,6 +34,7 @@
/* 076ED8 */ bool ftColl_80076ED8(Fighter* fp0, HitCapsule* hit0, Fighter* fp1,
HitCapsule* hit1);
/* 077464 */ UNK_RET ftColl_80077464(UNK_PARAMS);
/* 077688 */ void ftColl_80077688(Item*, HitCapsule*, Fighter*, Vec3*, f32);
/* 077970 */ UNK_RET ftColl_80077970(UNK_PARAMS);
/* 077C60 */ UNK_RET ftColl_80077C60(UNK_PARAMS);
/* 078384 */ void ftColl_80078384(Fighter*, HurtCapsule*, HitCapsule*);
Expand Down
122 changes: 33 additions & 89 deletions src/melee/gr/grkongo.c
Original file line number Diff line number Diff line change
@@ -1,100 +1,38 @@
#include "gr/grkongo.h"

#include "lb/lb_00B0.h"

#include "mp/mplib.h"

#include "lb/lb_00F9.h"

#include <baselib/random.h>
#include "gr/inlines.h"
#include "gr/granime.h"

#include "gr/grzakogenerator.h"
#include "grmaterial.h"
#include "types.h"

#include "ft/ftdevice.h"

#include "gm/gm_1601.h"

#include "gr/granime.h"
#include "gr/grdisplay.h"
#include "gr/ground.h"
#include "gr/grzakogenerator.h"
#include "gr/inlines.h"
#include "gr/stage.h"

#include "lb/lb_00B0.h"
#include "lb/lb_00F9.h"
#include "mp/mplib.h"

#include "gr/ground.h"

#include "MSL/math.h"
#include "MSL/math_ppc.h"
#include "grmaterial.h"
#include "types.h"
#include "gr/grdisplay.h"
#include <baselib/spline.h>
#include <baselib/gobjproc.h>
#include <baselib/gobjgxlink.h>

#include <baselib/gobj.h>
#include <baselib/gobjgxlink.h>
#include <baselib/gobjproc.h>
#include <baselib/random.h>
#include <baselib/spline.h>

void grAnime_801C78FC(HSD_GObj *, s32, s32);
s32 grAnime_801C84A4(HSD_GObj *, s32, s32);
void grAnime_801C7A04(HSD_GObj *, s32, s32, f32); /* extern */
void it_802E20D8(Item_GObj *); /* extern */

bool grAnime_801C84A4(HSD_GObj*, s32, s32);
void grAnime_801C7A04(HSD_GObj*, s32, s32, f32);
void it_802E20D8(Item_GObj*);
void mpLib_800580AC(s32); /* extern */
void mpLib_800580E0(s32); /* extern */

void grKongo_801D5238(); /* static */
void grKongo_801D523C(); /* static */
void grKongo_801D52F8(); /* static */
void grKongo_801D52FC(); /* static */

void grKongo_801D5238(); /* static */
HSD_GObj *grKongo_801D5340(s32); /* static */
void grKongo_801D828C(HSD_GObj* gobj);
int fn_801D8134(HSD_GObj *arg0, HSD_GObj *arg1); /* static */
s32 grKongo_801D5338(); /* static */

int fn_801D8134(HSD_GObj* arg0, HSD_GObj* arg1); /* static */
void fn_801D7700(void *arg2, s32 arg4); /* static */
void fn_801D7E60(void *arg2, s32 arg4); /* static */
// HSD_GObj *grKongo_801D5340(s32 arg0, ?, u8 *); /* static */
void grKongo_801D5490(HSD_GObj *arg0); /* static */
s32 grKongo_801D5574(); /* static */
void grKongo_801D557C(HSD_GObj *arg0); /* static */
void grKongo_801D55D4(); /* static */
void grKongo_801D55D8(HSD_GObj *arg0); /* static */
s32 grKongo_801D5774(); /* static */
void grKongo_801D577C(HSD_GObj *arg0); /* static */
void grKongo_801D5FA4(); /* static */
void grKongo_801D5FA8(HSD_GObj *arg0); /* static */
s32 grKongo_801D5FD4(); /* static */
void grKongo_801D5FDC(); /* static */
void grKongo_801D5FE0(); /* static */
void grKongo_801D5FE4(HSD_GObj *arg0); /* static */
s32 grKongo_801D6028(); /* static */
void grKongo_801D6030(); /* static */
void grKongo_801D6034(); /* static */
void grKongo_801D6038(HSD_GObj *arg0); /* static */
s32 grKongo_801D6064(); /* static */
void grKongo_801D606C(); /* static */
void grKongo_801D6070(); /* static */
void grKongo_801D6074(HSD_GObj *arg0); /* static */
s32 grKongo_801D6190(); /* static */
void grKongo_801D6198(HSD_GObj *arg0); /* static */
void grKongo_801D6378(); /* static */
void grKongo_801D637C(HSD_GObj *arg0); /* static */
s32 grKongo_801D64B4(); /* static */
void grKongo_801D64BC(HSD_GObj *arg0); /* static */
void grKongo_801D6518(); /* static */
void grKongo_801D651C(HSD_GObj *arg0); /* static */
s32 grKongo_801D6660(); /* static */
void grKongo_801D6668(HSD_GObj *arg0); /* static */
void grKongo_801D69AC(); /* static */
void grKongo_801D69B0(HSD_GObj *arg0); /* static */
void grKongo_801D7134(HSD_GObj *arg0, s32 arg1); /* static */
void grKongo_801D77E0(HSD_GObj *arg0, s32 arg1); /* static */
void grKongo_801D7BBC(HSD_GObj *arg0); /* static */
s32 grKongo_801D7F78(HSD_GObj *arg0); /* static */
Item_GObj *grKongo_801D8078(HSD_GObj *); /* static */
f32 grKongo_801D8314(); /* static */
s32 grKongo_801D8444(); /* static */
s32 grKongo_801D844C(void *arg0, HSD_JObj *arg2); /* static */
void grKongo_801D6AFC(void);
void fn_801D7E60(void* arg2, s32 arg4); /* static */

static StageCallbacks *grKg_803E16E0;

Expand Down Expand Up @@ -291,7 +229,6 @@ void grKongo_801D5490(HSD_GObj *arg0) {
s32 grKongo_801D5574(void) {
return 0;
}

void grKongo_801D557C(HSD_GObj *arg0) {
grKongo_801D7134(arg0, 0);
grKongo_801D77E0(arg0, 0);
Expand Down Expand Up @@ -354,6 +291,7 @@ static inline s32 random_adder(s32 temp_f0, s32 temp_f2)
}
return var_r29 + var_r3_2;
}
return temp_r28_2;
#endif
}

Expand Down Expand Up @@ -385,6 +323,7 @@ static inline s32 random_adder_f(f32 temp_f0, f32 temp_f2)
}
return var_r29 + var_r3_2;
}
return temp_r28_2;
#else
s32 temp_s0 = temp_f0;
s32 temp_s2 = temp_f2;
Expand Down Expand Up @@ -483,6 +422,7 @@ static inline f32 tau_range(f32 a)
} else if (a < (f32)-M_TAU) {
return (f64)a + M_TAU;
}
return 0.0F;
}

void grKongo_801D577C(HSD_GObj *arg0) {
Expand Down Expand Up @@ -582,7 +522,7 @@ void grKongo_801D577C(HSD_GObj *arg0) {
}
break;
case 2:
temp_r31->gv.kongo2.xCE =- 1;
temp_r31->gv.kongo2.xCE -= 1;
if (temp_r31->gv.kongo2.xCE < 0) {
temp_r31->gv.kongo2.xC8 = 3;
}
Expand Down Expand Up @@ -748,7 +688,8 @@ void grKongo_801D6074(HSD_GObj *arg0) {
HSD_JObjSetTranslateX(temp_r30, temp_r31->gv.kongo.xCC);
}

s32 grKongo_801D6190() {
s32 grKongo_801D6190(void)
{
return 0;
}

Expand Down Expand Up @@ -804,9 +745,11 @@ void grKongo_801D6198(HSD_GObj *arg0) {
}

void grKongo_801D6378(void) {

return;
}

// @todo: change callsites from s32 * to HSD_GObj *
#if 0
void grKongo_801D828C(HSD_GObj* gobj)
{
Ground* gp = gobj->user_data;
Expand All @@ -820,6 +763,7 @@ void grKongo_801D828C(HSD_GObj* gobj)
grMaterial_801C95C4(gobj);
}
}
#endif

void grKongo_801D637C(HSD_GObj *arg0) {
Ground *temp_r31;
Expand Down Expand Up @@ -1040,7 +984,7 @@ void grKongo_801D69B0(HSD_GObj *gobj) {
mpLib_800580AC(4);
}

static inline rad_compare(f32 a, f32 b, f32 *ret)
static inline void rad_compare(f32 a, f32 b, f32* ret)
{
f32 c = deg_to_rad * b;
if (a > c) {
Expand All @@ -1053,7 +997,7 @@ static inline rad_compare(f32 a, f32 b, f32 *ret)
}
}

static inline rad_compare_b(f32 a, f32 b, f32 *ret)
static inline void rad_compare_b(f32 a, f32 b, f32* ret)
{
f32 c = deg_to_rad * b;
if (a > c) {
Expand All @@ -1065,7 +1009,7 @@ static inline rad_compare_b(f32 a, f32 b, f32 *ret)
*ret = (f32) (0.99 * (f64) (c + *ret));
}

static inline rad_compare_c(f32 a, f32 b, f32 d, f32 *ret)
static inline void rad_compare_c(f32 a, f32 b, f32 d, f32* ret)
{
f32 c = deg_to_rad * b;
if (a > c) {
Expand Down
50 changes: 50 additions & 0 deletions src/melee/gr/grkongo.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,58 @@
#define GALE01_1D5238

#include <platform.h>
#include "lb/forward.h"
#include <baselib/forward.h>

/* 1D5238 */ void grKongo_801D5238(void);
/* 1D523C */ void grKongo_801D523C(void);
/* 1D52F8 */ void grKongo_801D52F8(void);
/* 1D52FC */ void grKongo_801D52FC(void);
/* 1D5338 */ s32 grKongo_801D5338(void);
/* 1D5340 */ HSD_GObj* grKongo_801D5340(s32);
/* 1D542C */ void fn_801D542C(HSD_GObj*);
/* 1D5490 */ void grKongo_801D5490(HSD_GObj*);
/* 1D5574 */ s32 grKongo_801D5574(void);
/* 1D557C */ void grKongo_801D557C(HSD_GObj*);
/* 1D55D4 */ void grKongo_801D55D4(void);
/* 1D55D8 */ void grKongo_801D55D8(HSD_GObj*);
/* 1D5774 */ s32 grKongo_801D5774(void);
/* 1D577C */ void grKongo_801D577C(HSD_GObj*);
/* 1D5FA4 */ void grKongo_801D5FA4(void);
/* 1D5FA8 */ void grKongo_801D5FA8(HSD_GObj*);
/* 1D5FD4 */ s32 grKongo_801D5FD4(void);
/* 1D5FDC */ void grKongo_801D5FDC(void);
/* 1D5FE0 */ void grKongo_801D5FE0(void);
/* 1D5FE4 */ void grKongo_801D5FE4(HSD_GObj*);
/* 1D6028 */ s32 grKongo_801D6028(void);
/* 1D6030 */ void grKongo_801D6030(void);
/* 1D6034 */ void grKongo_801D6034(void);
/* 1D6038 */ void grKongo_801D6038(HSD_GObj*);
/* 1D6064 */ s32 grKongo_801D6064(void);
/* 1D606C */ void grKongo_801D606C(void);
/* 1D6070 */ void grKongo_801D6070(void);
/* 1D6074 */ void grKongo_801D6074(HSD_GObj*);
/* 1D6190 */ s32 grKongo_801D6190(void);
/* 1D6198 */ void grKongo_801D6198(HSD_GObj*);
/* 1D6378 */ void grKongo_801D6378(void);
/* 1D8270 */ void grKongo_801D8270(s32);
/* 1D828C */ void grKongo_801D828C(s32);
/* 1D637C */ void grKongo_801D637C(HSD_GObj*);
/* 1D64B4 */ s32 grKongo_801D64B4(void);
/* 1D64BC */ void grKongo_801D64BC(HSD_GObj*);
/* 1D6518 */ void grKongo_801D6518(void);
/* 1D651C */ void grKongo_801D651C(HSD_GObj*);
/* 1D6660 */ s32 grKongo_801D6660(void);
/* 1D6668 */ void grKongo_801D6668(HSD_GObj*);
/* 1D69AC */ void grKongo_801D69AC(void);
/* 1D69B0 */ void grKongo_801D69B0(HSD_GObj*);
/* 1D6AFC */ void grKongo_801D6AFC(void);
/* 1D69B0 */ void grKongo_801D69B0(HSD_GObj*);
/* 1D7134 */ void grKongo_801D7134(HSD_GObj*, s32);
/* 1D77E0 */ void grKongo_801D77E0(HSD_GObj*, s32);
/* 1D7BBC */ void grKongo_801D7BBC(HSD_GObj*);
/* 1D7F78 */ bool grKongo_801D7F78(HSD_GObj*);
/* 1D8078 */ HSD_GObj* grKongo_801D8078(HSD_GObj*);
/* 1D8314 */ f32 grKongo_801D8314(void);

#endif
4 changes: 2 additions & 2 deletions src/melee/gr/ground.c
Original file line number Diff line number Diff line change
Expand Up @@ -1167,7 +1167,7 @@ void Ground_801C2374(HSD_LObj* lobj)
}
}

s32 Ground_801C247C(s32 arg0, s32 arg1)
HSD_Spline* Ground_801C247C(s32 arg0, s32 arg1)
{
UnkArchiveStruct* archive = grDatFiles_801C6330(arg0);
if (archive == NULL) {
Expand All @@ -1176,7 +1176,7 @@ s32 Ground_801C247C(s32 arg0, s32 arg1)
if (archive->unk4 != NULL && arg1 < archive->unk4->unk14) {
return archive->unk4->unk10[arg1];
} else {
return 0;
return NULL;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/melee/gr/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ struct UnkStageDat {
struct UnkStageDat_x8_t* unk8;
s32 unkC;

s32* unk10;
HSD_Spline** unk10;
s32 unk14;

u8 x18_fill[0x20 - 0x18];
Expand Down
1 change: 0 additions & 1 deletion src/melee/it/it_266F.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

#include <placeholder.h>

/* 077688 */ void ftColl_80077688(Item *, HitCapsule *, Fighter *, Vec3 *, f32);
/* 26D324 */ bool it_8026D324(bool);
/* 26D604 */ s32 it_8026D604(HSD_GObj* gobj);
/* 26D62C */ void it_8026D62C(Item_GObj*, HSD_GObjEvent);
Expand Down

0 comments on commit 585ce17

Please sign in to comment.