Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Item files work #1488

Merged
merged 34 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
2784bbe
it_2F28 match
AaronB-Hub Sep 30, 2024
d06b8a4
Link `it_2F28`
ribbanya Sep 30, 2024
502d0d5
Merge branch 'doldecomp:master' into master
AaronB-Hub Sep 30, 2024
3ee9171
Merge branch 'doldecomp:master' into master
AaronB-Hub Oct 2, 2024
0d543e8
it_27CF work
AaronB-Hub Oct 2, 2024
6288908
formatting
AaronB-Hub Oct 2, 2024
e865323
Fixing func params
AaronB-Hub Oct 2, 2024
3c121b7
formatting
AaronB-Hub Oct 2, 2024
12ce95b
it_2E6A work
AaronB-Hub Oct 3, 2024
15de5e2
Update itCommonItems.h
AaronB-Hub Oct 3, 2024
25d1fa7
Fix line ending
AaronB-Hub Oct 3, 2024
33b87a2
Fix errors
ribbanya Oct 13, 2024
eec6943
Merge branch 'upstream-master' into aaronb-master
ribbanya Oct 13, 2024
fe462d5
it_2E5A work
AaronB-Hub Oct 17, 2024
9c6d97e
Merge branch 'doldecomp:master' into master
AaronB-Hub Oct 17, 2024
751f59e
Merge branch 'master' of https://github.com/AaronB-Hub/doldecomp-melee
AaronB-Hub Oct 17, 2024
512ef3d
Updating structs ordering
AaronB-Hub Oct 17, 2024
a3c4bfd
Redo ordering
AaronB-Hub Oct 17, 2024
8f6c409
Merge branch 'doldecomp:master' into master
AaronB-Hub Oct 21, 2024
d5fab95
Merge branch 'doldecomp:master' into master
AaronB-Hub Oct 22, 2024
9b6e13a
item file work
AaronB-Hub Jan 13, 2025
b2c8bbc
formatting
AaronB-Hub Jan 13, 2025
d978511
merge conflict shenanigans
AaronB-Hub Jan 13, 2025
64fb76b
Update itnokonoko.h
AaronB-Hub Jan 13, 2025
17ba1d5
Update itnokonoko.h
AaronB-Hub Jan 13, 2025
69bcd9d
Removing unused includes
AaronB-Hub Jan 13, 2025
e5c536e
Formatting
AaronB-Hub Jan 13, 2025
6c38d2d
Error fixes
AaronB-Hub Jan 13, 2025
dcb1664
Formatting
AaronB-Hub Jan 13, 2025
acaae5d
More fixes
AaronB-Hub Jan 13, 2025
bf0db49
Formatting
AaronB-Hub Jan 13, 2025
c857683
Formatting
AaronB-Hub Jan 13, 2025
960f61e
make `xDC0` a word
thefoxcam Jan 14, 2025
56ff202
Merge branch 'upstream-master'
ribbanya Jan 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/common_structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@ typedef u32 HSD_Pad;
#define MPCOLL_FLAGS_B11 (1 << 11)
#define MPCOLL_CEIL 0x6000 ///< Bits 13-14
#define MPCOLL_FLAGS_B14 (1 << 14)
#define MPCOLL_UNK 0x18000
#define MPCOLL_UNK 0x18000 // Floor??
#define MPCOLL_GRPUSH (1 << 15)
#define MPCOLL_FLAGS_B16 (1 << 16)
#define MPCOLL_FLAGS_B20 (1 << 20) // 0x100000
#define MPCOLL_FLAGS_B21 (1 << 21) // 0x200000
#define MPCOLL_FLAGS_B23 (1 << 23)
#define MPCOLL_FLAGS_B24 (1 << 24)
#define MPCOLL_FLAGS_B25 (1 << 25)
Expand Down
3 changes: 1 addition & 2 deletions src/melee/ft/ft_0877.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,7 @@ s32 ft_80087D0C(Fighter* fighter, s32 sfx_id)

void ft_8008805C(Fighter* arg0, s32 arg1)
{
ft_80087D0C(arg0, arg1);
lbAudioAx_80024DC4();
lbAudioAx_80024DC4(ft_80087D0C(arg0, arg1));
}

void ft_80088080(Fighter* fp)
Expand Down
2 changes: 1 addition & 1 deletion src/melee/ft/ft_0881.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
/* 088C5C */ void ft_80088C5C(Fighter_GObj* gobj);
/* 0890BC */ void ft_800890BC(Fighter* fp);
/* 0890D0 */ void ft_800890D0(Fighter* fp, u32 move_id);
/* 089228 */ UNK_RET ft_80089228(UNK_PARAMS);
/* 089228 */ float ft_80089228(Fighter*, s32, s32, f32);
/* 0892A0 */ void ft_800892A0(Fighter_GObj* gobj);

#endif
4 changes: 2 additions & 2 deletions src/melee/ft/ft_0892.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
/* 0892D4 */ void ft_800892D4(Fighter*);
/* 089460 */ UNK_RET ft_80089460(UNK_PARAMS);
/* 0895E0 */ void ft_800895E0(Fighter*, int);
/* 089768 */ UNK_RET ft_80089768(UNK_PARAMS);
/* 089768 */ void ft_80089768(Vec2*);
/* 089824 */ void ft_80089824(Fighter_GObj* gobj);
/* 089884 */ union Struct2070* ft_80089884(Fighter_GObj* gobj);
/* 089890 */ UNK_T ft_80089890(Fighter_GObj* gobj);
/* 08989C */ u16 ft_8008989C(Fighter_GObj* gobj);
/* 0898A8 */ UNK_T ft_800898A8(Fighter_GObj* gobj);
/* 0898A8 */ struct Struct2074* ft_800898A8(Fighter_GObj* gobj);
/* 0898B4 */ int ft_800898B4(Fighter_GObj* gobj);
/* 0898C0 */ UNK_RET ft_800898C0(UNK_PARAMS);
/* 089914 */ UNK_RET ft_80089914(UNK_PARAMS);
Expand Down
9 changes: 4 additions & 5 deletions src/melee/ft/ftcoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "ftCommon/ftCo_Guard.h"
#include "ftCommon/types.h"
#include "gm/gm_1601.h"
#include "it/it_266F.h"
#include "it/it_26B1.h"
#include "lb/lbcollision.h"
#include "lb/types.h"
Expand Down Expand Up @@ -65,8 +64,8 @@ STATIC_ASSERT(sizeof(DmgLogEntry) == 0x28);

/* 07A06C */ static void ftColl_8007A06C(float facing_dir, DmgLogEntry** log,
int idx, bool);
/* 076808 */ static void ftColl_80076808(Fighter* fp, HitCapsule* hit, int,
Fighter* victim, bool);
// /* 076808 */ static void ftColl_80076808(Fighter* fp, HitCapsule* hit, int,
// Fighter* victim, bool);

// .data
IntVec3 ftColl_803C0C40 = { 141, 142, 143 };
Expand Down Expand Up @@ -285,7 +284,7 @@ void ftColl_80076764(int arg0, enum_t arg1, Fighter_GObj* arg2,
}
}

void ftColl_80076808(Fighter* fp, HitCapsule* hit, int arg2, Fighter* victim,
void ftColl_80076808(Fighter* fp, HitCapsule* hit, int arg2, void* victim,
bool arg4)
{
s8 j;
Expand Down Expand Up @@ -520,7 +519,7 @@ struct ftCollSFX lbl_803C0C40 = {

/// @todo #ftColl_80076808
inline void inlineB0(Fighter* fp0, HitCapsule* hitbox, Fighter* fp1, int arg3,
bool (*cb)(HitCapsule* hit, int arg1, Fighter* fp))
bool (*cb)(HitCapsule* hit, int arg1, void* fp))
{
size_t i;
for (i = 0; i < ARRAY_SIZE(fp0->x914); i++) {
Expand Down
5 changes: 5 additions & 0 deletions src/melee/ft/ftcoll.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@
/* 079AB0 */ UNK_RET ftColl_80079AB0(UNK_PARAMS);
/* 079C70 */ float ftColl_80079C70(Fighter*, Fighter*, void*, int);
/* 079EA8 */ float ftColl_80079EA8(Fighter*, HitCapsule*, int);
// /* 07A06C */ static void ftColl_8007A06C(float facing_dir, DmgLogEntry**
// log,
// int idx, bool);
/* 076808 */ static void ftColl_80076808(Fighter* fp, HitCapsule* hit, int,
void* victim, bool);
/* 07AB48 */ void ftColl_8007AB48(Fighter_GObj*);
/* 07AB80 */ void ftColl_8007AB80(Fighter_GObj*);
/* 07ABD0 */ void ftColl_8007ABD0(HitCapsule*, u32 damageAmount,
Expand Down
2 changes: 1 addition & 1 deletion src/melee/ft/ftlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ s32 ftLib_800874BC(HSD_GObj* gobj)
return fp->x221F_b4;
}

void ftLib_800874CC(HSD_GObj* gobj, s32 arg1, s32 arg2)
void ftLib_800874CC(HSD_GObj* gobj, void* arg1, s32 arg2)
{
Fighter* fp = GET_FIGHTER(gobj);
pl_8003E4A4(fp->player_id, fp->x221F_b4, arg1, arg2);
Expand Down
2 changes: 1 addition & 1 deletion src/melee/ft/ftlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
/* 087460 */ u32 ftLib_80087460(HSD_GObj*);
/* 08746C */ s32 ftLib_8008746C(HSD_GObj*);
/* 0874BC */ s32 ftLib_800874BC(HSD_GObj*);
/* 0874CC */ void ftLib_800874CC(HSD_GObj*, s32, s32);
/* 0874CC */ void ftLib_800874CC(HSD_GObj*, void*, s32);
/* 087508 */ void ftLib_80087508(s8, u8);
/* 087574 */ void ftLib_80087574(s8);
/* 087610 */ void ftLib_80087610(u8);
Expand Down
12 changes: 10 additions & 2 deletions src/melee/ft/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,15 @@ struct Fighter_DemoStrings {
/* fp+2070 */ s32 x2070_int;
};

/// @todo See if this should likewise be instituted for item->xD94 thru
/// xDA4_word/xDA8_short
/* fp+2074 */ struct Struct2074 {
/* fp+2074 */ Vec2 x2074_vec;
/* fp+207C */ Vec2 x207C;
/* fp+2084 */ u32 x2084;
/* fp+2088 */ u16 x2088;
};

struct ftSubactionList {
u8 x0_opcode;
};
Expand Down Expand Up @@ -1410,8 +1419,7 @@ struct Fighter {
/* fp+206C */ u16 x206C_attack_instance;
/* fp+206E */ short x206E;
/* fp+2070 */ union Struct2070 x2070;
/* fp+2074 */ int x2074;
/* fp+2074 */ u8 _2078[0x208C - 0x2078];
/* fp+2074 */ struct Struct2074 x2074;
/* fp+208C */ s32 x208C;
/* fp+2090 */ u16 x2090;
/* fp+2092 */ u16 x2092;
Expand Down
7 changes: 4 additions & 3 deletions src/melee/gm/gm_1601.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <placeholder.h>

#include "gm/forward.h"
#include "it/forward.h"

/* 1601C4 */ UNK_RET gm_801601C4(UNK_PARAMS);
/* 160244 */ UNK_RET gm_80160244(UNK_PARAMS);
Expand Down Expand Up @@ -120,7 +121,7 @@
/* 164B48 */ UNK_RET fn_80164B48(UNK_PARAMS);
/* 164F18 */ UNK_RET gm_80164F18(UNK_PARAMS);
/* 16505C */ UNK_RET gm_8016505C(UNK_PARAMS);
/* 165084 */ UNK_RET gm_80165084(UNK_PARAMS);
/* 165084 */ bool gm_80165084(void);
/* 1650E8 */ UNK_RET fn_801650E8(UNK_PARAMS);
/* 165108 */ UNK_RET fn_80165108(UNK_PARAMS);
/* 165190 */ UNK_RET fn_80165190(UNK_PARAMS);
Expand Down Expand Up @@ -299,8 +300,8 @@
/* 16C4F4 */ UNK_RET fn_8016C4F4(UNK_PARAMS);
/* 16C5C0 */ bool gm_8016C5C0(int pl_slot);
/* 16C658 */ UNK_RET gm_8016C658(UNK_PARAMS);
/* 16C6C0 */ /* static */ UNK_RET gm_8016C6C0(UNK_PARAMS);
/* 16C6C0 */ UNK_RET gm_8016C6C0(UNK_PARAMS);
/* 16C6C0 */ /* static */ s32 gm_8016C6C0(Item_GObj*);
/* 16C6C0 */ s32 gm_8016C6C0(Item_GObj*);
/* 16C75C */ /* static */ UNK_RET gm_8016C75C(UNK_PARAMS);
/* 16C75C */ UNK_RET gm_8016C75C(UNK_PARAMS);
/* 16C7D0 */ UNK_RET fn_8016C7D0(UNK_PARAMS);
Expand Down
2 changes: 1 addition & 1 deletion src/melee/gm/gm_1A36.h
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@
/* 1BEBA8 */ UNK_RET gm_801BEBA8(UNK_PARAMS);
/* 1BEBC0 */ UNK_RET gm_801BEBC0(UNK_PARAMS);
/* 1BEBF8 */ UNK_RET gm_801BEBF8(UNK_PARAMS);
/* 1BEC54 */ UNK_RET gm_801BEC54(UNK_PARAMS);
/* 1BEC54 */ void* gm_801BEC54(void);
/* 1BEC80 */ UNK_RET gm_801BEC80(UNK_PARAMS);
/* 1BECA8 */ UNK_RET gm_801BECA8(UNK_PARAMS);
/* 1BECD0 */ UNK_RET gm_801BECD0(UNK_PARAMS);
Expand Down
2 changes: 1 addition & 1 deletion src/melee/gr/grmaterial.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ void grMaterial_801C8E28(HSD_GObj* gobj)
bool grMaterial_801C8E48(HSD_GObj* gobj)
{
Item* it = gobj->user_data;
if (it->x52C_item_script != NULL) {
if (it->x524_cmd.x8 != NULL) {
return false;
}
return true;
Expand Down
3 changes: 2 additions & 1 deletion src/melee/gr/grzakogenerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

#include "gr/types.h"

void grZakoGenerator_801CACB8(Ground_GObj* gobj);
/* 1CAC14 */ void grZakoGenerator_801CAC14(void);
/* 1CACB8 */ void grZakoGenerator_801CACB8(Ground_GObj* gobj);
/* 1CAE04 */ void grZakoGenerator_801CAE04(bool);

#endif
8 changes: 4 additions & 4 deletions src/melee/gr/stage.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,15 +267,15 @@ void Stage_80224E64(enum_t arg0, Vec3* arg_vec)
Ground_801C2D24(arg0, arg_vec);
}

s32 Stage_80224FDC(Vec3* arg0)
bool Stage_80224FDC(Vec3* arg0)
{
s32 rand_output;
s32 counter = 0x15;
s32 counter2;

while (counter != 0) {
if (Ground_801C2D24(HSD_Randi(counter) + 0x7F, arg0)) {
return 1;
return true;
}
counter += -1;
}
Expand All @@ -286,12 +286,12 @@ s32 Stage_80224FDC(Vec3* arg0)
counter2 = Ground_801C2D24(rand_output, arg0);

if (counter2 != 0) {
return 1;
return true;
}
counter2 = rand_output;
}

return 0;
return false;
}

s32 Stage_80225074(s32 arg0)
Expand Down
2 changes: 1 addition & 1 deletion src/melee/gr/stage.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
/* 224DC8 */ bool Stage_80224DC8(s32);
/* 224E38 */ void Stage_80224E38(Vec3*, s32);
/* 224E64 */ void Stage_80224E64(enum_t, Vec3*);
/* 224FDC */ s32 Stage_80224FDC(Vec3*);
/* 224FDC */ bool Stage_80224FDC(Vec3*);
/* 225074 */ s32 Stage_80225074(s32);
/* 225194 */ enum_t Stage_80225194(void);
/* 22519C */ s32 Stage_8022519C(InternalStageId idx);
Expand Down
3 changes: 3 additions & 0 deletions src/melee/it/forward.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef MELEE_IT_FORWARD_H
#define MELEE_IT_FORWARD_H

#include "ft/forward.h"
#include <baselib/forward.h>

typedef struct Article Article;
Expand Down Expand Up @@ -55,6 +56,8 @@ struct Item_GObj {
typedef HSD_GObj Item_GObj;
#endif

typedef void (*ItCmd)(Item_GObj* gobj, FtCmdState* cmd);

typedef enum Item_StateChangeFlags {
ITEM_UNK_0x1 = (1 << 0),
ITEM_ANIM_UPDATE = (1 << 1),
Expand Down
Loading
Loading