Skip to content

Commit

Permalink
Move ItemStateTable to it/items/types.h
Browse files Browse the repository at this point in the history
  • Loading branch information
ribbanya committed Feb 19, 2024
1 parent 27e87e1 commit d675913
Show file tree
Hide file tree
Showing 161 changed files with 436 additions and 226 deletions.
2 changes: 1 addition & 1 deletion src/melee/ft/chara/ftNess/ftNs_AttackHi4.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "ftCommon/forward.h"
#include "it/forward.h"
#include "lb/forward.h"

#include "ftNs_AttackHi4.h"
Expand All @@ -19,6 +18,7 @@
#include "ftNess/types.h"
#include "it/items/it_27CF.h"
#include "it/itYoyo.h"
#include "it/types.h"
#include "lb/lb_00B0.h"
#include "lb/lbcollision.h"
#include "lb/lbrefract.h"
Expand Down
2 changes: 1 addition & 1 deletion src/melee/ft/chara/ftSeak/ftSk_SpecialS.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include "it/forward.h"
#include "lb/forward.h"

#include "ftSeak/ftSk_SpecialS.h"
Expand All @@ -17,6 +16,7 @@
#include "ftSeak/ftSk_Init.h"
#include "ftSeak/types.h"
#include "it/items/it_27CF.h"
#include "it/types.h"
#include "lb/lb_00B0.h"
#include "lb/lbcollision.h"
#include "lb/lbrefract.h"
Expand Down
2 changes: 0 additions & 2 deletions src/melee/it/forward.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@ typedef struct ItemAttr ItemAttr;
typedef struct ItemCommonData ItemCommonData;
typedef struct ItemDynamics ItemDynamics;
typedef struct ItemDynamicsDesc ItemDynamicsDesc;
typedef struct ItemLogicTable ItemLogicTable;
typedef struct ItemModelDesc ItemModelDesc;
typedef struct ItemModStruct ItemModStruct;
typedef struct ItemStateArray ItemStateArray;
typedef struct ItemStateDesc ItemStateDesc;
typedef struct ItemStateTable ItemStateTable;
typedef struct itSword_ItemVars itSword_ItemVars;
typedef struct SpawnItem SpawnItem;
typedef struct UnkItemArticles3 UnkItemArticles3;
Expand Down
6 changes: 6 additions & 0 deletions src/melee/it/it_2725.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#include "it/forward.h"
#include <baselib/forward.h>

#include "it/items/types.h"

#include <placeholder.h>

/* 272CC0 */ HSD_JObj* it_80272CC0(Item_GObj*, enum_t);
Expand All @@ -27,5 +29,9 @@
/* 27B378 */ void it_8027B378(Fighter_GObj*, Item_GObj*, float);
/* 27C8B0 */ void it_8027C8B0(Item_GObj*);
/* 27CE44 */ void it_8027CE44(Item_GObj*);
/* 3F14C4 */ extern struct ItemLogicTable it_803F14C4[43];
/* 3F23CC */ extern struct ItemLogicTable it_803F23CC[];
/* 3F3100 */ extern struct ItemLogicTable it_803F3100[118];
/* 3F4D20 */ extern struct ItemLogicTable it_803F4D20[];

#endif
7 changes: 1 addition & 6 deletions src/melee/it/item.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
#include "ef/efasync.h"
#include "ef/eflib.h"
#include "ft/ftlib.h"
#include "ft/types.h"
#include "gm/gm_1601.h"
#include "gr/grlib.h"
#include "gr/stage.h"
#include "it/inlines.h"
#include "it/it_2725.h"
#include "it/types.h"
#include "lb/lb_00B0.h"
#include "lb/lb_00F9.h"
Expand Down Expand Up @@ -523,11 +523,6 @@ static /// @remarks #Item_8026862C loads two integers into this,
return result;
}

extern struct ItemLogicTable it_803F14C4[43];
extern struct ItemLogicTable it_803F3100[118];
extern struct ItemLogicTable it_803F23CC[];
extern struct ItemLogicTable it_803F4D20[];

void Item_80267978(HSD_GObj* gobj)
{
Item* item_data = gobj->user_data;
Expand Down
2 changes: 2 additions & 0 deletions src/melee/it/items/forward.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef MELEE_IT_ITEMS_FORWARD_H
#define MELEE_IT_ITEMS_FORWARD_H

typedef struct ItemLogicTable ItemLogicTable;
typedef struct ItemStateTable ItemStateTable;
typedef struct itSword_UnkArticle1 itSword_UnkArticle1;
typedef struct itSword_UnkBytes itSword_UnkBytes;

Expand Down
3 changes: 2 additions & 1 deletion src/melee/it/items/it_27CF.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@

#include <platform.h>
#include "ft/forward.h"
#include "it/forward.h"
#include <dolphin/mtx/forward.h>
#include <baselib/forward.h>

#include "ftSeak/types.h"
#include "it/types.h"
#include "it/items/types.h"

/* 27D670 */ void it_8027D670(Vec3* const);
/* 27D730 */ void it_8027D730(Item_GObj*);
Expand Down
3 changes: 2 additions & 1 deletion src/melee/it/items/it_2ADA.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#ifndef GALE01_2ADA1C
#define GALE01_2ADA1C

#include "it/forward.h"
#include <dolphin/mtx/forward.h>

#include "it/types.h"
#include "it/items/types.h"

/* 2ADA1C */ void it_802ADA1C(Vec3* pos, Vec3* vel, float facing_dir);
/* 2ADBE4 */ void it_802ADBE4(Item_GObj*, Item_GObj*);
Expand Down
3 changes: 2 additions & 1 deletion src/melee/it/items/it_2E5A.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
#define GALE01_2E5AC4

#include <platform.h>
#include "it/forward.h"

#include "it/types.h"
#include "it/items/types.h"

/* 2E6A40 */ bool it_802E6A40(Item_GObj*);
/* 2E6ACC */ void it_802E6ACC(Item_GObj*, Item_GObj*);
Expand Down
3 changes: 2 additions & 1 deletion src/melee/it/items/it_2E6A.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
#define GALE01_2E6AEC

#include <platform.h>
#include "it/forward.h"

#include "it/types.h"
#include "it/items/types.h"

/* 2E6F7C */ bool it_802E6F7C(Item_GObj*);
/* 2E6FC0 */ bool it_802E6FC0(Item_GObj*);
Expand Down
4 changes: 3 additions & 1 deletion src/melee/it/items/it_2F28.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#ifndef GALE01_2F28C8
#define GALE01_2F28C8

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

#include "it/items/types.h"

/* 2F2BDC */ void it_802F2BDC(Item_GObj*, Item_GObj*);
/* 3F9470 */ extern ItemStateTable it_803F9470[];
Expand Down
3 changes: 2 additions & 1 deletion src/melee/it/items/it_2F2B.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@

#include <platform.h>
#include "ft/chara/ftYoshi/forward.h"
#include "it/forward.h"

#include "it/types.h"
#include "it/items/types.h"

/* 2F2BFC */ void it_802F2BFC(Item_GObj* gobj, ftYs_GObj* owner_gobj);
/* 2F2CE0 */ void it_802F2CE0(Item_GObj* gobj, bool has_destroy_type);
Expand Down
3 changes: 2 additions & 1 deletion src/melee/it/items/itbat.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
#define GALE01_284854

#include <platform.h>
#include "it/forward.h"

#include "it/types.h"
#include "it/items/types.h"

/* 284910 */ void it_80284910(Item_GObj*);
/* 284AAC */ void it_80284AAC(Item_GObj*);
Expand Down
4 changes: 3 additions & 1 deletion src/melee/it/items/itbombhei.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#ifndef GALE01_27D670
#define GALE01_27D670

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

#include "it/items/types.h"

/* 27D76C */ void it_8027D76C(Item_GObj*);
/* 27E0B4 */ void it_8027E0B4(Item_GObj*);
Expand Down
4 changes: 3 additions & 1 deletion src/melee/it/items/itbox.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#ifndef GALE01_286088
#define GALE01_286088

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

#include "it/items/types.h"

/* 2861CC */ void it_802861CC(Item_GObj*);
/* 286208 */ void it_80286208(Item_GObj*);
Expand Down
3 changes: 2 additions & 1 deletion src/melee/it/items/itcapsule.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
#define GALE01_27CF00

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

#include "it/types.h"
#include "it/items/types.h"

/* 27CF00 */ void it_8027CF00(Item_GObj*);
/* 27CF30 */ void it_8027CF30(Item_GObj*);
Expand Down
4 changes: 3 additions & 1 deletion src/melee/it/items/itcerebi.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#ifndef GALE01_2D3EF8
#define GALE01_2D3EF8

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

#include "it/items/types.h"

/* 2D3EF8 */ void it_802D3EF8(Item_GObj*);
/* 2D3F4C */ void it_802D3F4C(Item_GObj*, Item_GObj*);
Expand Down
4 changes: 3 additions & 1 deletion src/melee/it/items/itchicorita.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#ifndef GALE01_2C9588
#define GALE01_2C9588

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

#include "it/items/types.h"

/* 2C9588 */ void it_802C9588(Item_GObj*);
/* 2C961C */ void it_802C961C(Item_GObj*, Item_GObj*);
Expand Down
3 changes: 2 additions & 1 deletion src/melee/it/items/itchicoritaleaf.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
#define GALE01_2C9B20

#include <platform.h>
#include "it/forward.h"

#include "it/types.h"
#include "it/items/types.h"

/* 2C9C20 */ void it_802C9C20(Item_GObj*);
/* 2C9C78 */ bool it_802C9C78(Item_GObj*);
Expand Down
3 changes: 2 additions & 1 deletion src/melee/it/items/itclimbersblizzard.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
#define GALE01_2C2144

#include <platform.h>
#include "it/forward.h"

#include "it/types.h"
#include "it/items/types.h"

/* 2C2424 */ bool it_802C2424(Item_GObj*);
/* 2C242C */ bool it_802C242C(Item_GObj*);
Expand Down
3 changes: 2 additions & 1 deletion src/melee/it/items/itclimbersice.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
#define GALE01_2C1590

#include <platform.h>
#include "it/forward.h"

#include "it/types.h"
#include "it/items/types.h"

/* 2C17FC */ void it_802C17FC(Item_GObj*);
/* 2C1FC8 */ bool it_802C1FC8(Item_GObj*);
Expand Down
4 changes: 3 additions & 1 deletion src/melee/it/items/itclimbersstring.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#ifndef GALE01_2C248C
#define GALE01_2C248C

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

#include "it/items/types.h"

/* 2C37BC */ void it_802C37BC(Item_GObj*);
/* 2C3AA4 */ void it_802C3AA4(Item_GObj*, Item_GObj*);
Expand Down
4 changes: 3 additions & 1 deletion src/melee/it/items/itclinkmilk.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#ifndef GALE01_2C8B28
#define GALE01_2C8B28

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

#include "it/items/types.h"

/* 2C8C74 */ void it_802C8C74(Item_GObj*);
/* 2C8F2C */ void it_802C8F2C(Item_GObj*, Item_GObj*);
Expand Down
3 changes: 2 additions & 1 deletion src/melee/it/items/itcoin.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
#define GALE01_2F13B4

#include <platform.h>
#include "it/forward.h"

#include "it/types.h"
#include "it/items/types.h"

/* 2F14E4 */ void it_802F14E4(Item_GObj*);
/* 2F1518 */ void it_802F1518(Item_GObj*);
Expand Down
3 changes: 2 additions & 1 deletion src/melee/it/items/itcrazyhandbomb.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
#define GALE01_2F0F6C

#include <platform.h>
#include "it/forward.h"

#include "it/types.h"
#include "it/items/types.h"

/* 2F1094 */ void it_802F1094(Item_GObj*, Item_GObj*);
/* 2F10B4 */ bool it_802F10B4(Item_GObj*);
Expand Down
3 changes: 2 additions & 1 deletion src/melee/it/items/itdkinoko.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
#define GALE01_293A08

#include <platform.h>
#include "it/forward.h"

#include "it/types.h"
#include "it/items/types.h"

/* 293A08 */ void it_80293A08(Item_GObj*);
/* 293D6C */ bool it_80293D6C(Item_GObj*);
Expand Down
4 changes: 3 additions & 1 deletion src/melee/it/items/itdosei.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#ifndef GALE01_281164
#define GALE01_281164

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

#include "it/items/types.h"

/* 281164 */ void it_80281164(Item_GObj*);
/* 28218C */ void it_8028218C(Item_GObj*);
Expand Down
3 changes: 2 additions & 1 deletion src/melee/it/items/itdrmariopill.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@

#include <platform.h>
#include "ft/forward.h"
#include "it/forward.h"
#include <dolphin/mtx/forward.h>

#include "it/types.h"
#include "it/items/types.h"

/* 2C09C4 */ Item_GObj* it_802C09C4(Fighter_GObj* owner, Vec3* pos, int,
enum_t, bool, bool, float facing_dir);
Expand Down
4 changes: 3 additions & 1 deletion src/melee/it/items/itegg.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#ifndef GALE01_288C88
#define GALE01_288C88

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

#include "it/items/types.h"

/* 288D98 */ void it_80288D98(Item_GObj*);
/* 288F88 */ void it_80288F88(Item_GObj*);
Expand Down
4 changes: 3 additions & 1 deletion src/melee/it/items/itentei.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#ifndef GALE01_2CF3E0
#define GALE01_2CF3E0

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

#include "it/items/types.h"

/* 2CF3E0 */ void it_802CF3E0(Item_GObj*);
/* 2CF450 */ void it_802CF450(Item_GObj*, Item_GObj*);
Expand Down
3 changes: 2 additions & 1 deletion src/melee/it/items/itevyoshiegg.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
#define GALE01_29B0C8

#include <platform.h>
#include "it/forward.h"

#include "it/types.h"
#include "it/items/types.h"

/* 29B188 */ void it_8029B188(Item_GObj*);
/* 29B1AC */ void it_8029B1AC(Item_GObj*);
Expand Down
3 changes: 2 additions & 1 deletion src/melee/it/items/itfflower.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
#define GALE01_292D48

#include <platform.h>
#include "it/forward.h"

#include "it/types.h"
#include "it/items/types.h"

/* 292E04 */ void it_80292E04(Item_GObj*);
/* 293284 */ void it_80293284(Item_GObj*);
Expand Down
4 changes: 3 additions & 1 deletion src/melee/it/items/itfflowerflame.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#ifndef GALE01_29A748
#define GALE01_29A748

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

#include "it/items/types.h"

/* 29A9FC */ void it_8029A9FC(Item_GObj*);
/* 29AD1C */ void it_8029AD1C(Item_GObj*);
Expand Down
Loading

0 comments on commit d675913

Please sign in to comment.