diff --git a/config/GALE01/symbols.txt b/config/GALE01/symbols.txt index af191a0ec1..84733cbbad 100644 --- a/config/GALE01/symbols.txt +++ b/config/GALE01/symbols.txt @@ -16510,47 +16510,47 @@ it_802DC480 = .text:0x802DC480; // type:function size:0x3C scope:global it_802DC4BC = .text:0x802DC4BC; // type:function size:0x1E0 scope:global it_802DC69C = .text:0x802DC69C; // type:function size:0xD8 scope:global it_802DC774 = .text:0x802DC774; // type:function size:0xC8 scope:global -it_802DC83C = .text:0x802DC83C; // type:function size:0x7C scope:global -fn_802DC8B8 = .text:0x802DC8B8; // type:function size:0x58 -it_802DC910 = .text:0x802DC910; // type:function size:0x8 scope:global -it_802DC918 = .text:0x802DC918; // type:function size:0x3C scope:global -it_802DC954 = .text:0x802DC954; // type:function size:0x3C scope:global -it_802DC990 = .text:0x802DC990; // type:function size:0xCC scope:global -it_802DCA5C = .text:0x802DCA5C; // type:function size:0x48 scope:global -it_802DCAA4 = .text:0x802DCAA4; // type:function size:0x90 scope:global -it_802DCB34 = .text:0x802DCB34; // type:function size:0x68 scope:global -it_802DCB9C = .text:0x802DCB9C; // type:function size:0xBC scope:global -it_802DCC58 = .text:0x802DCC58; // type:function size:0x8 scope:global -it_802DCC60 = .text:0x802DCC60; // type:function size:0x30 scope:global -it_802DCC90 = .text:0x802DCC90; // type:function size:0x3C scope:global -it_802DCCCC = .text:0x802DCCCC; // type:function size:0x88 scope:global -it_802DCD54 = .text:0x802DCD54; // type:function size:0x48 scope:global -it_802DCD9C = .text:0x802DCD9C; // type:function size:0x28 scope:global -it_802DCDC4 = .text:0x802DCDC4; // type:function size:0x3C scope:global +it_802DC83C = .text:0x802DC83C; // type:function size:0x7C scope:local +fn_802DC8B8 = .text:0x802DC8B8; // type:function size:0x58 scope:local +it_802DC910 = .text:0x802DC910; // type:function size:0x8 scope:local +it_802DC918 = .text:0x802DC918; // type:function size:0x3C scope:local +it_802DC954 = .text:0x802DC954; // type:function size:0x3C scope:local +it_802DC990 = .text:0x802DC990; // type:function size:0xCC scope:local +it_802DCA5C = .text:0x802DCA5C; // type:function size:0x48 scope:local +it_802DCAA4 = .text:0x802DCAA4; // type:function size:0x90 scope:local +it_802DCB34 = .text:0x802DCB34; // type:function size:0x68 scope:local +it_802DCB9C = .text:0x802DCB9C; // type:function size:0xBC scope:local +it_802DCC58 = .text:0x802DCC58; // type:function size:0x8 scope:local +it_802DCC60 = .text:0x802DCC60; // type:function size:0x30 scope:local +it_802DCC90 = .text:0x802DCC90; // type:function size:0x3C scope:local +it_802DCCCC = .text:0x802DCCCC; // type:function size:0x88 scope:local +it_802DCD54 = .text:0x802DCD54; // type:function size:0x48 scope:local +it_802DCD9C = .text:0x802DCD9C; // type:function size:0x28 scope:local +it_802DCDC4 = .text:0x802DCDC4; // type:function size:0x3C scope:local it_802DCE00 = .text:0x802DCE00; // type:function size:0x74 scope:global -it_802DCE74 = .text:0x802DCE74; // type:function size:0x50 scope:global -it_802DCEC4 = .text:0x802DCEC4; // type:function size:0xF8 scope:global -it_802DCFBC = .text:0x802DCFBC; // type:function size:0xE4 scope:global -it_802DD0A0 = .text:0x802DD0A0; // type:function size:0x114 scope:global -it_802DD1B4 = .text:0x802DD1B4; // type:function size:0x28 scope:global -it_802DD1DC = .text:0x802DD1DC; // type:function size:0x80 scope:global -it_802DD25C = .text:0x802DD25C; // type:function size:0x8 scope:global -it_802DD264 = .text:0x802DD264; // type:function size:0x2C scope:global -it_802DD290 = .text:0x802DD290; // type:function size:0x4C scope:global -it_802DD2DC = .text:0x802DD2DC; // type:function size:0x4C scope:global -it_802DD328 = .text:0x802DD328; // type:function size:0x140 scope:global -it_802DD468 = .text:0x802DD468; // type:function size:0x4 scope:global -it_802DD46C = .text:0x802DD46C; // type:function size:0x3C scope:global -it_802DD4A8 = .text:0x802DD4A8; // type:function size:0x4C scope:global +it_802DCE74 = .text:0x802DCE74; // type:function size:0x50 scope:local +it_802DCEC4 = .text:0x802DCEC4; // type:function size:0xF8 scope:local +it_802DCFBC = .text:0x802DCFBC; // type:function size:0xE4 scope:local +it_802DD0A0 = .text:0x802DD0A0; // type:function size:0x114 scope:local +it_802DD1B4 = .text:0x802DD1B4; // type:function size:0x28 scope:local +it_802DD1DC = .text:0x802DD1DC; // type:function size:0x80 scope:local +it_802DD25C = .text:0x802DD25C; // type:function size:0x8 scope:local +it_802DD264 = .text:0x802DD264; // type:function size:0x2C scope:local +it_802DD290 = .text:0x802DD290; // type:function size:0x4C scope:local +it_802DD2DC = .text:0x802DD2DC; // type:function size:0x4C scope:local +it_802DD328 = .text:0x802DD328; // type:function size:0x140 scope:local +it_802DD468 = .text:0x802DD468; // type:function size:0x4 scope:local +it_802DD46C = .text:0x802DD46C; // type:function size:0x3C scope:local +it_802DD4A8 = .text:0x802DD4A8; // type:function size:0x4C scope:local it_802DD4F4 = .text:0x802DD4F4; // type:function size:0x48 scope:global -it_802DD53C = .text:0x802DD53C; // type:function size:0x5C scope:global -it_802DD598 = .text:0x802DD598; // type:function size:0x4 scope:global +it_802DD53C = .text:0x802DD53C; // type:function size:0x5C scope:local +it_802DD598 = .text:0x802DD598; // type:function size:0x4 scope:local it_802DD59C = .text:0x802DD59C; // type:function size:0xE0 scope:global it_802DD67C = .text:0x802DD67C; // type:function size:0x58 scope:global -it_802DD6D4 = .text:0x802DD6D4; // type:function size:0x48 scope:global -it_802DD71C = .text:0x802DD71C; // type:function size:0x30 scope:global -it_802DD74C = .text:0x802DD74C; // type:function size:0x40 scope:global -it_802DD78C = .text:0x802DD78C; // type:function size:0x44 scope:global +it_802DD6D4 = .text:0x802DD6D4; // type:function size:0x48 scope:local +it_802DD71C = .text:0x802DD71C; // type:function size:0x30 scope:local +it_802DD74C = .text:0x802DD74C; // type:function size:0x40 scope:local +it_802DD78C = .text:0x802DD78C; // type:function size:0x44 scope:local it_802DD7D0 = .text:0x802DD7D0; // type:function size:0x20 scope:global it_802DD7F0 = .text:0x802DD7F0; // type:function size:0x294 scope:global it_802DDA84 = .text:0x802DDA84; // type:function size:0xB4 scope:global @@ -23217,7 +23217,7 @@ it_803F83F0 = .data:0x803F83F0; // type:object size:0x50 scope:global it_803F8468 = .data:0x803F8468; // type:object size:0x160 scope:global it_803F85C8 = .data:0x803F85C8; // type:object size:0x28 scope:global it_803F85F0 = .data:0x803F85F0; // type:object size:0xB0 scope:global -it_803F86A0 = .data:0x803F86A0; // type:object size:0x28 scope:global +it_803F86A0 = .data:0x803F86A0; // type:object size:0x25 scope:local data:string it_803F86C8 = .data:0x803F86C8; // type:object size:0x128 scope:global it_803F87F0 = .data:0x803F87F0; // type:object size:0xD0 scope:global it_803F88C0 = .data:0x803F88C0; // type:object size:0x80 scope:global @@ -26381,8 +26381,8 @@ it_804D5638 = .sdata:0x804D5638; // type:object size:0x8 scope:global @237 = .sdata:0x804D5648; // type:object size:0x5 scope:local data:string it_804D5650 = .sdata:0x804D5650; // type:object size:0x8 scope:global it_804D5658 = .sdata:0x804D5658; // type:object size:0x8 scope:global -it_804D5660 = .sdata:0x804D5660; // type:object size:0x8 scope:global -it_804D5668 = .sdata:0x804D5668; // type:object size:0x8 scope:global +it_804D5660 = .sdata:0x804D5660; // type:object size:0x7 scope:local data:string +it_804D5668 = .sdata:0x804D5668; // type:object size:0x5 scope:local data:string it_804D5670 = .sdata:0x804D5670; // type:object size:0x8 scope:global it_804D5678 = .sdata:0x804D5678; // type:object size:0x8 scope:global it_804D5680 = .sdata:0x804D5680; // type:object size:0x8 scope:global @@ -32669,7 +32669,7 @@ it_804DD624 = .sdata2:0x804DD624; // type:object size:0x4 scope:global data:floa it_804DD628 = .sdata2:0x804DD628; // type:object size:0x4 scope:global data:float it_804DD62C = .sdata2:0x804DD62C; // type:object size:0x4 scope:global data:float it_804DD630 = .sdata2:0x804DD630; // type:object size:0x4 scope:global data:float -it_804DD634 = .sdata2:0x804DD634; // type:object size:0x4 scope:global data:float +it_804DD634 = .sdata2:0x804DD634; // type:object size:0x4 data:float it_804DD638 = .sdata2:0x804DD638; // type:object size:0x8 scope:global data:double it_804DD640 = .sdata2:0x804DD640; // type:object size:0x4 scope:global data:float it_804DD648 = .sdata2:0x804DD648; // type:object size:0x8 scope:global data:double diff --git a/configure.py b/configure.py index 1e92e5e2ad..753b7b2e7b 100755 --- a/configure.py +++ b/configure.py @@ -1115,7 +1115,7 @@ def TRKLib(lib_name: str, objects: Objects) -> Library: Object(Matching, "melee/it/items/itmato.c"), Object(Matching, "melee/it/items/itheiho.c"), Object(NonMatching, "melee/it/items/itlikelike.c"), - Object(NonMatching, "melee/it/items/itnokonoko.c"), + Object(Matching, "melee/it/items/itnokonoko.c"), Object(NonMatching, "melee/it/items/itzgshell.c"), Object(Matching, "melee/it/items/itzrshell.c"), Object(NonMatching, "melee/it/items/itpatapata.c"), diff --git a/src/melee/it/itCommonItems.h b/src/melee/it/itCommonItems.h index f619f1488e..03245257e3 100644 --- a/src/melee/it/itCommonItems.h +++ b/src/melee/it/itCommonItems.h @@ -12,6 +12,13 @@ #include #include +struct ECB { + f32 top; + f32 bottom; + f32 right; + f32 left; +}; + typedef struct { bool x0; bool x4; @@ -388,6 +395,57 @@ typedef struct itKinoko_ItemVars { f32 xC; } itKinoko_ItemVars; +typedef struct itNokoNoko_ItemVars { + f32 x0; + s32 x4; + f32 x8; + f32 xC; + f32 x10; + s32 x14; + s32 x18; + s32 x1C; + s32 x20; + s32 x24; + s32 x28; + s32 x2C; + s32 x30; + f32 x34; + f32 x38; + s32 x3C; + s32 x40; + s32 x44; + f32 x48; + f32 x4C; + f32 x50; + f32 x54; + f32 x58; + f32 x5C; + f32 x60; + f32 x64; + f32 x68; + f32 x6C; + f32 x70; + ECB x74; + f32 x84; + f32 x88; + f32 x8C; + f32 x90; + f32 x94; + f32 x98; + f32 x9C; +} itNokoNoko_ItemVars; + +typedef struct itNokoNoko_DatAttrs2 { + s32 x0; + f32 x4; +} itNokoNoko_DatAttrs2; + +typedef struct itNokoNoko_DatAttrs { + itNokoNoko_DatAttrs2* x0; + f32 x4; + f32 x8; +} itNokoNoko_DatAttrs; + typedef struct itTaruCann_DatAttrs { /* +0 */ char pad_0[0x28]; /* +28 */ int x28; diff --git a/src/melee/it/it_2725.c b/src/melee/it/it_2725.c index 2fa14dca02..97e954e499 100644 --- a/src/melee/it/it_2725.c +++ b/src/melee/it/it_2725.c @@ -3547,7 +3547,7 @@ void it_802762B0(Item* arg0) /// #it_8027C56C -bool it_8027C794(void) +bool it_8027C794(Item_GObj* gobj) { return false; } diff --git a/src/melee/it/it_2725.h b/src/melee/it/it_2725.h index 5a72137b88..ad9c3ca2ea 100644 --- a/src/melee/it/it_2725.h +++ b/src/melee/it/it_2725.h @@ -76,7 +76,7 @@ /* 274C60 */ UNK_RET it_80274C60(UNK_PARAMS); /* 274C78 */ bool it_80274C78(Item_GObj* gobj); /* 274C88 */ void it_80274C88(Item_GObj* gobj); -/* 274CAC */ UNK_RET it_80274CAC(UNK_PARAMS); +/* 274CAC */ void it_80274CAC(HSD_GObj*); /* 274D04 */ UNK_RET it_80274D04(UNK_PARAMS); /* 274D6C */ UNK_RET it_80274D6C(UNK_PARAMS); /* 274DAC */ void it_80274DAC(Item_GObj*); @@ -101,7 +101,7 @@ /* 275228 */ UNK_RET it_80275228(UNK_PARAMS); /* 275240 */ UNK_RET it_80275240(UNK_PARAMS); /* 275258 */ UNK_RET it_80275258(UNK_PARAMS); -/* 275270 */ UNK_RET it_80275270(UNK_PARAMS); +/* 275270 */ void it_80275270(Item_GObj*); /* 275288 */ UNK_RET it_80275288(UNK_PARAMS); /* 2752D8 */ UNK_RET it_802752D8(UNK_PARAMS); /* 275328 */ UNK_RET it_80275328(UNK_PARAMS); @@ -109,7 +109,7 @@ /* 2753BC */ void it_802753BC(Item_GObj*, s16); /* 2753DC */ void it_802753DC(Item_GObj*); /* 275414 */ void it_80275414(Item_GObj*); -/* 27542C */ UNK_RET it_8027542C(UNK_PARAMS); +/* 27542C */ void it_8027542C(Item_GObj*); /* 275444 */ void it_80275444(Item_GObj*); /* 275474 */ void it_80275474(Item_GObj* gobj); /* 2754A4 */ void it_802754A4(Item_GObj*); @@ -222,27 +222,27 @@ /* 27B4A4 */ void it_8027B4A4(Fighter_GObj*, Item_GObj*); /* 27B508 */ UNK_RET it_8027B508(UNK_PARAMS); /* 27B564 */ UNK_RET it_8027B564(UNK_PARAMS); -/* 27B5B0 */ Item_GObj* it_8027B5B0(s32, s32, HSD_JObj*, Vec3*, s32); +/* 27B5B0 */ Item_GObj* it_8027B5B0(s32, Vec3*, HSD_JObj*, Vec3*, s32); /* 27B730 */ void it_8027B730(void); /* 27B798 */ s32 it_8027B798(Item_GObj*, Vec3*); /* 27B964 */ UNK_RET it_8027B964(UNK_PARAMS); /* 27BA54 */ UNK_RET it_8027BA54(UNK_PARAMS); /* 27BB1C */ UNK_RET it_8027BB1C(UNK_PARAMS); /* 27BBF4 */ UNK_RET it_8027BBF4(UNK_PARAMS); -/* 27C0A8 */ UNK_RET it_8027C0A8(UNK_PARAMS); +/* 27C0A8 */ UNK_RET it_8027C0A8(Item_GObj*, f32, f32); /* 27C0CC */ UNK_RET it_8027C0CC(UNK_PARAMS); /* 27C0F0 */ UNK_RET it_8027C0F0(UNK_PARAMS); /* 27C56C */ void it_8027C56C(Item_GObj*, f32); -/* 27C794 */ bool it_8027C794(void); +/* 27C794 */ bool it_8027C794(Item_GObj*); /* 27C79C */ UNK_RET it_8027C79C(UNK_PARAMS); /* 27C824 */ UNK_RET it_8027C824(UNK_PARAMS); /* 27C8B0 */ void it_8027C8B0(Item_GObj*); -/* 27C8D0 */ UNK_RET it_8027C8D0(UNK_PARAMS); +/* 27C8D0 */ void it_8027C8D0(Vec3*, Vec3*, f32); /* 27C9D8 */ UNK_RET it_8027C9D8(UNK_PARAMS); /* 27CA7C */ UNK_RET it_8027CA7C(UNK_PARAMS); -/* 27CAD8 */ UNK_RET it_8027CAD8(UNK_PARAMS); +/* 27CAD8 */ void it_8027CAD8(Item_GObj*); /* 27CB3C */ UNK_RET it_8027CB3C(UNK_PARAMS); -/* 27CBA4 */ UNK_RET it_8027CBA4(UNK_PARAMS); +/* 27CBA4 */ void it_8027CBA4(Item_GObj*); /* 27CBFC */ f32 it_8027CBFC(Item_GObj*); /* 27CC88 */ UNK_RET it_8027CC88(UNK_PARAMS); /* 27CE18 */ UNK_RET it_8027CE18(UNK_PARAMS); diff --git a/src/melee/it/items/itheiho.c b/src/melee/it/items/itheiho.c index 79aa38c78f..5554abdcc6 100644 --- a/src/melee/it/items/itheiho.c +++ b/src/melee/it/items/itheiho.c @@ -46,7 +46,7 @@ ItemStateTable it_803F83F0[] = { { -1, it_802D88CC, it_802D88D4, it_802D8910 }, void it_802D8618(s32 arg0, Vec3* arg1, s32 arg2, s32 arg3) { - Item_GObj* gobj = it_8027B5B0(0xD2, (s32) arg1, NULL, NULL, 1); + Item_GObj* gobj = it_8027B5B0(0xD2, arg1, NULL, NULL, 1); Item* ip = GET_ITEM(gobj); ip->xDD4_itemVar.heiho.x20 = (s8) arg0; ip->xDD4_itemVar.heiho.x21 = (s8) arg2; diff --git a/src/melee/it/items/itnokonoko.c b/src/melee/it/items/itnokonoko.c index 4abb17f7be..8ba603dc1f 100644 --- a/src/melee/it/items/itnokonoko.c +++ b/src/melee/it/items/itnokonoko.c @@ -1,103 +1,545 @@ -#include -#include +#include "it/items/itnokonoko.h" + +#include "cm/camera.h" +#include "ft/ftlib.h" +#include "it/inlines.h" +#include "it/it_266F.h" +#include "it/it_26B1.h" +#include "it/it_2725.h" +#include "it/items/itzgshell.h" +#include "it/items/itzrshell.h" +#include "mp/mpcoll.h" + +ItemStateTable it_803F85F0[] = { + { 0, NULL, NULL, NULL }, + { -1, it_802DC910, it_802DC918, it_802DC954 }, + { 1, it_802DCA5C, it_802DCAA4, it_802DCB34 }, + { 2, it_802DD328, it_802DD468, it_802DD46C }, + { 1, it_802DCC58, it_802DCC60, it_802DCC90 }, + { 3, it_802DD0A0, it_802DD1B4, it_802DD1DC }, + { 3, it_802DD25C, it_802DD264, it_802DCC90 }, + { 4, it_802DCD54, it_802DCD9C, it_802DCDC4 }, + { 4, it_802DCD54, it_802DCE74, it_802DCDC4 }, + { 4, it_802DD53C, it_802DD598, NULL }, + { 5, it_802DD6D4, it_802DD71C, it_802DD74C }, +}; + +void static inline coll_inline(Item* ip) +{ + mpColl_800436D8(&ip->x378_itemColl, (ip->facing_dir == -1.0f) ? -1 : 1); +} + +void it_802DC69C(Item_GObj* gobj) +{ + Item* ip = GET_ITEM(gobj); + it_8027B730(); + it_8027C56C(gobj, ip->facing_dir); + coll_inline(ip); + ip->xD5C = 0; + + ip->xDC8_word.flags.x15 = 0; + it_8027542C(gobj); + it_80275270(gobj); + ip->xDC8_word.flags.x19 = 1; + ip->xDD4_itemVar.nokonoko.x28 = 0; + ip->xDD4_itemVar.nokonoko.x40 = 0; + ip->xDD4_itemVar.nokonoko.x20 = 0; + ip->xDD4_itemVar.nokonoko.x74 = ip->xC1C; + it_802DCB9C(gobj); +} + +static void zero_pad(Item* ip) +{ + ip->x40_vel.z = 0.0f; + ip->x40_vel.y = 0.0f; +} + +bool it_802DC774(Item_GObj* gobj) +{ + Item* ip = GET_ITEM(gobj); + itNokoNoko_DatAttrs* da = ip->xC4_article_data->x4_specialAttributes; + PAD_STACK(4); + ip->init_facing_dir = ip->facing_dir; + ip->xC9C = (s32) ((f32) ip->xC9C + it_8027CBFC(gobj)); + if (ip->msid == 0xA) { + it_802DD78C(gobj); + } else if (ip->xC9C > da->x0->x0) { + it_802DCFBC(gobj); + } else { + it_802DCCCC(gobj); + } + return 0; +} + +bool it_802DC83C(Item_GObj* gobj) +{ + Item* ip = GET_ITEM(gobj); + ip->init_facing_dir = ip->facing_dir; + it_80274C88(gobj); + it_802DCFBC(gobj); + Camera_80030E44(2, &ip->pos); + Item_8026AE84(ip, 0x12E, 0x7F, 0x40); + ftLib_80086D40(ip->xCFC, 0xC, 0); + return 0; +} -/// #it_802DC69C +void fn_802DC8B8(Item_GObj* gobj) +{ + Item* ip = GET_ITEM(gobj); + it_8027CAD8(gobj); + it_8027C0A8(gobj, ip->facing_dir, 5.0f); + it_802DD4A8(gobj, 1, ITEM_ANIM_UPDATE); +} -/// #it_802DC774 +bool it_802DC910(Item_GObj* gobj) +{ + return 0; +} -/// #it_802DC83C +void it_802DC918(Item_GObj* gobj) +{ + Item* ip = GET_ITEM(gobj); + if (ip->xDD4_itemVar.nokonoko.x28 <= 0) { + it_802DC990(gobj); + return; + } + ip->xDD4_itemVar.nokonoko.x28 -= 1; +} -/// #fn_802DC8B8 +int it_802DC954(Item_GObj* gobj) +{ + it_8026D62C(gobj, it_802DCB9C); + return it_8027C794(gobj); +} -bool it_802DC910(void) +void it_802DC990(Item_GObj* gobj) { - return false; + Item* ip = GET_ITEM(gobj); + itNokoNoko_DatAttrs* da = ip->xC4_article_data->x4_specialAttributes; + ip->x40_vel.x = ip->facing_dir * da->x0->x4; + ip->x40_vel.z = 0.0f; + ip->x40_vel.y = 0.0f; + coll_inline(ip); + it_802756E0(gobj); + if ((s32) ip->xDD4_itemVar.nokonoko.x20 == 0) { + ip->xDD4_itemVar.nokonoko.x20 = (s32) (da->x8 / da->x0->x4); + } + it_802DD4A8(gobj, 2, ITEM_ANIM_UPDATE); } -/// #it_802DC918 +bool it_802DCA5C(Item_GObj* gobj) +{ + PAD_STACK(8); + if (it_80272C6C(gobj) == 0) { + it_802DD4A8(gobj, 2, 0x12); + } + return 0; +} -/// #it_802DC954 +void it_802DCAA4(Item_GObj* gobj) +{ + Item* ip = GET_ITEM(gobj); + PAD_STACK(8); + if (ip->xDD4_itemVar.nokonoko.x20 == 0) { + it_802DD290(gobj); + } else { + ip->xDD4_itemVar.nokonoko.x20 -= 1; + } + if (it_802750E8(gobj, 2) != 0) { + it_802DD290(gobj); + } + it_8027C8D0(&ip->x40_vel, &ip->x378_itemColl.floor.normal, ip->facing_dir); + it_8027C0A8(gobj, ip->facing_dir, 5.0f); +} -/// #it_802DC990 +int it_802DCB34(Item_GObj* gobj) +{ + PAD_STACK(8); + if (it_8026D8A4(gobj, it_802DD290) != 0) { + if (it_80276308(gobj) != 0) { + it_802DD290(gobj); + } + } else { + it_802DCB9C(gobj); + } + return it_8027C794(gobj); +} -/// #it_802DCA5C +void it_802DCB9C(Item_GObj* gobj) +{ + Item* ip = GET_ITEM(gobj); + itNokoNoko_DatAttrs* da = ip->xC4_article_data->x4_specialAttributes; + ip->x40_vel.x *= da->x4; + ip->xDD4_itemVar.nokonoko.x28 = 0.0f; + if (((ip->facing_dir > 0.0f) && (ip->x70_nudge.x < 0.0f)) || + ((ip->facing_dir < 0.0f) && (ip->x70_nudge.x > 0.0f))) + { + s32 var_r4; + ip->facing_dir = -ip->facing_dir; + coll_inline(ip); + } + it_802DD4A8(gobj, 4, ITEM_ANIM_UPDATE); +} -/// #it_802DCAA4 +bool it_802DCC58(Item_GObj* gobj) +{ + return 0; +} -/// #it_802DCB34 +void it_802DCC60(Item_GObj* gobj) +{ + ItemAttr* temp_r4 = GET_ITEM(gobj)->xCC_item_attr; + it_80272860(gobj, temp_r4->x10_fall_speed, temp_r4->x14_fall_speed_max); +} -/// #it_802DCB9C +int it_802DCC90(Item_GObj* gobj) +{ + PAD_STACK(8); + it_8026E414(gobj, (void (*)(HSD_GObj*)) fn_802DC8B8); + return it_8027C794(gobj); +} -bool it_802DCC58(void) +void it_802DCCCC(Item_GObj* gobj) { - return false; + Item* ip = GET_ITEM(gobj); + ip->xDD4_itemVar.nokonoko.x28 = 0.0f; + it_80275474(gobj); + it_8027B798(gobj, &ip->x40_vel); + if (ip->x40_vel.y <= 0.2) { + ip->x40_vel.y = 0.2; + } + it_802762BC(ip); + ip->facing_dir = ip->init_facing_dir; + it_802DD4A8(gobj, 7, ITEM_ANIM_UPDATE); } -/// #it_802DCC60 +bool it_802DCD54(Item_GObj* gobj) +{ + PAD_STACK(8); + if (it_80272C6C(gobj) == 0) { + it_802DD4A8(gobj, 7, ITEM_ANIM_UPDATE); + } + return 0; +} -/// #it_802DCC90 +void it_802DCD9C(HSD_GObj* gobj) +{ + Item* ip = GET_ITEM(gobj); + if (ip->ground_or_air == 1) { + ip->x40_vel.y -= ip->xCC_item_attr->x10_fall_speed; + } +} -/// #it_802DCCCC +int it_802DCDC4(Item_GObj* gobj) +{ + PAD_STACK(8); + it_8026E414(gobj, it_802DCEC4); + return it_8027C794(gobj); +} -/// #it_802DCD54 +void it_802DCE00(Item_GObj* gobj) +{ + Item* ip = GET_ITEM(gobj); + it_802762BC(ip); + ip->xDD4_itemVar.nokonoko.x28 = 10; + it_802756D0(gobj); + ip->xCC8_knockback = ip->xDD4_itemVar.nokonoko.x34; + ip->xCAC_angle = ip->xDD4_itemVar.nokonoko.x3C; + ip->xCCC_incDamageDirection = ip->xDD4_itemVar.nokonoko.x38; + Item_80268E5C(gobj, 8, ITEM_ANIM_UPDATE); +} -/// #it_802DCD9C +void it_802DCE74(Item_GObj* gobj) +{ + Item* ip = GET_ITEM(gobj); + ip->x40_vel.y -= ip->xCC_item_attr->x10_fall_speed; + if (ip->xDD4_itemVar.nokonoko.x28 == 0) { + it_802756E0(gobj); + return; + } + ip->xDD4_itemVar.nokonoko.x28 -= 1; +} -/// #it_802DCDC4 +void it_802DCEC4(Item_GObj* gobj) +{ + Item* ip = GET_ITEM(gobj); + ip->xDD4_itemVar.nokonoko.x28 = 0; + it_802756E0(gobj); + if (ip->xCCC_incDamageDirection == ip->facing_dir) { + it_802DD2DC(gobj); + return; + } + it_802DC990(gobj); +} -/// #it_802DCE00 +void it_802DCFBC(Item_GObj* gobj) +{ + ECB box; + Item* ip = GET_ITEM(gobj); + it_802756D0(gobj); + if (it_8027B798(gobj, &ip->x40_vel) != 0) { + it_802762BC(ip); + } else { + it_802762B0(ip); + } + ip->facing_dir = ip->init_facing_dir; + coll_inline(ip); + ip->xDD4_itemVar.nokonoko.x28 = 0.0f; + Item_80268E5C(gobj, 5, ITEM_ANIM_UPDATE); + box = ip->xC1C; + box.top = 4.5f; + box.right = 3.0f; + box.left = 3.0f; + it_80275D5C(gobj, &box); +} -/// #it_802DCE74 +f32 static inline lt_zero(f32 val) +{ + if (val < 0.0f) { + return -1.0f; + } else { + return 1.0f; + } +} -/// #it_802DCEC4 +bool it_802DD0A0(Item_GObj* gobj) +{ + Vec3 pos; + f32 var_f2; + Item_GObj* ip_2; + Item* ip = GET_ITEM(gobj); + if ((it_80272C6C(gobj) == 0) && ((s32) ip->ground_or_air == GA_Ground)) { + HSD_JObj* jobj = HSD_GObjGetHSDObj(gobj); + var_f2 = lt_zero(57.29578f * HSD_JObjGetRotationY(jobj)); + pos = ip->pos; + pos.y += 0.1f; + if (ip->xDD4_itemVar.nokonoko.x40 < 2) { + ip_2 = it_802E0100(ip->xDD4_itemVar.nokonoko.x40, &pos, var_f2); + } else { + ip_2 = it_802E0488(ip->xDD4_itemVar.nokonoko.x40, &pos, var_f2); + } + if (ip_2 != NULL) { + GET_ITEM(ip_2)->xDD4_itemVar.nokonoko.x4 = + ip->xDD4_itemVar.nokonoko.x4; + ip->xDD4_itemVar.nokonoko.x4 = -1; + } + return 1; + } + return 0; +} -/// #it_802DCFBC +void it_802DD1B4(Item_GObj* gobj) +{ + Item* ip = GET_ITEM(gobj); + if (ip->ground_or_air == GA_Air) { + ip->x40_vel.y -= ip->xCC_item_attr->x10_fall_speed; + } +} -/// #it_802DD0A0 +int it_802DD1DC(Item_GObj* gobj) +{ + Item* ip = gobj->user_data; + PAD_STACK(12); + if (ip->ground_or_air == GA_Air) { + if (it_8026DB40(gobj) & 1) { + it_802762B0(ip); + ip->x40_vel.x = ip->x40_vel.y = ip->x40_vel.z = 0.0f; + } + } else { + it_8026D82C(gobj); + } + return it_8027C794(gobj); +} -/// #it_802DD1B4 +int it_802DD25C(HSD_GObj* gobj) +{ + return 0; +} -/// #it_802DD1DC +void it_802DD264(Item_GObj* gobj) +{ + it_8027C0A8(gobj, GET_ITEM(gobj)->facing_dir, 0.0f); +} -bool it_802DD25C(void) +void static inline it_802DD290_inline(Item_GObj* gobj, s32 val) { - return false; + Item* ip = gobj->user_data; + ip->x40_vel.x = ip->x40_vel.y = ip->x40_vel.z = 0.0f; + ip->xDD4_itemVar.nokonoko.x20 = 0; + ip->xDD4_itemVar.nokonoko.x28 = 0x26; + it_802DD4A8(gobj, 0x3, val); } -/// #it_802DD264 +void it_802DD290(Item_GObj* gobj) +{ + it_802DD290_inline(gobj, 0x12); +} -/// #it_802DD290 +void it_802DD2DC(HSD_GObj* gobj) +{ + it_802DD290_inline(gobj, 2); +} -/// #it_802DD2DC +int it_802DD328(Item_GObj* gobj) +{ + Item* ip = GET_ITEM(gobj); + if (ip->xDD4_itemVar.nokonoko.x28 == 0) { + ip->facing_dir = -ip->facing_dir; + coll_inline(ip); + } + ip->xDD4_itemVar.nokonoko.x28 -= 1; + if (it_80272C6C(gobj) == 0) { + Item* ip = GET_ITEM(gobj); + it_8026D5CC(gobj); + ip->xDD4_itemVar.nokonoko.x28 = 0.0f; + it_802DC990(gobj); + } + return 0; +} -/// #it_802DD328 +void it_802DD468(HSD_GObj* gobj) {} -void it_802DD468(void) {} +int it_802DD46C(Item_GObj* gobj) +{ + it_8026D62C(gobj, it_802DCB9C); + return it_8027C794(gobj); +} -/// #it_802DD46C +void it_802DD4A8(HSD_GObj* gobj, s32 arg1, enum Item_StateChangeFlags arg2) +{ + Item* ip = GET_ITEM(gobj); + Item_80268E5C(gobj, arg1, arg2); + it_80274CAC(gobj); + ip->jumped_on = it_802DC83C; +} -/// #it_802DD4A8 +void it_802DD4F4(Item_GObj* gobj) +{ + PAD_STACK(16); + GET_ITEM(gobj)->xDD4_itemVar.nokonoko.x28 = 0.0f; + it_80274740(gobj); + Item_80268E5C(gobj, 9, ITEM_ANIM_UPDATE); +} -/// #it_802DD4F4 +int it_802DD53C(Item_GObj* gobj) +{ + PAD_STACK(24); + if (it_80272C6C(gobj) == 0) { + it_802DD4F4(gobj); + } + return 0; +} -/// #it_802DD53C +void it_802DD598(HSD_GObj* gobj) {} -void it_802DD598(void) {} +static void it_802DD59C_inline(HSD_GObj* gobj) +{ + Item* ip = GET_ITEM(gobj); + itNokoNoko_DatAttrs* da = ip->xC4_article_data->x4_specialAttributes; + f32 temp_f2; + ip->x40_vel.x *= da->x4; + ip->xDD4_itemVar.nokonoko.x28 = 0.0f; + temp_f2 = ip->facing_dir; + if (((temp_f2 > 0.0f) && (ip->x70_nudge.x < 0.0f)) || + ((temp_f2 < 0.0f) && (ip->x70_nudge.x > 0.0f))) + { + ip->facing_dir = -temp_f2; + coll_inline(ip); + } + it_802DD4A8(gobj, 4, ITEM_ANIM_UPDATE); +} -/// #it_802DD59C +void it_802DD59C(Item_GObj* gobj) +{ + it_8027CBA4(gobj); + it_802DD59C_inline(gobj); +} -/// #it_802DD67C +void it_802DD67C(Item_GObj* gobj) +{ + Item* ip = gobj->user_data; + it_8027CB3C(); + it_80274C88(gobj); + ip->xDD4_itemVar.nokonoko.x28 = 0.0f; + Item_80268E5C(gobj, 0xA, ITEM_ANIM_UPDATE); +} -/// #it_802DD6D4 +int it_802DD6D4(Item_GObj* gobj) +{ + if (it_80272C6C(gobj) == 0) { + Item_80268E5C(gobj, 0xA, ITEM_ANIM_UPDATE); + } + return 0; +} -/// #it_802DD71C +void it_802DD71C(Item_GObj* gobj) +{ + ItemAttr* temp_r4 = GET_ITEM(gobj)->xCC_item_attr; + it_80272860(gobj, temp_r4->x10_fall_speed, temp_r4->x14_fall_speed_max); +} -/// #it_802DD74C +int it_802DD74C(Item_GObj* gobj) +{ + if (it_8026DAA8(gobj) & 0xF) { + it_802DD78C(gobj); + } + return 0; +} -/// #it_802DD78C +void it_802DD78C(Item_GObj* gobj) +{ + PAD_STACK(8); + it_8027327C(gobj, 0x444, 0x130); + it_8027CE44(gobj); + Item_8026A8EC(gobj); +} -/// #it_802DD7D0 +void it_802DD7D0(Item_GObj* gobj, HSD_GObj* arg1) +{ + it_8026B894(gobj, arg1); +} -/// #it_802DD7F0 +Item_GObj* it_802DD7F0(s32 arg0, Vec3* arg1, Vec3* arg2, s32 arg3) +{ + Item_GObj* gobj = it_8027B5B0(0xD3, arg1, NULL, arg2, 1); + f32 temp_f31; + PAD_STACK(8); + if (gobj != NULL) { + HSD_JObj* jobj = HSD_GObjGetHSDObj(gobj); + Item* ip = GET_ITEM(gobj); + ip->facing_dir = (f32) arg3; + coll_inline(ip); + temp_f31 = ip->facing_dir * 1.5707963267948966; + HSD_JObjSetRotationY(jobj, temp_f31); + ip->xDD4_itemVar.nokonoko.x40 = arg0; + if (ip->xDD4_itemVar.nokonoko.x40 == 2) { + Item_80268E5C((HSD_GObj*) gobj, 0, ITEM_ANIM_UPDATE); + HSD_JObjAnimAll(gobj->hsd_obj); + } + if (it_802DDA84(gobj) != 0) { + it_802762B0(ip); + fn_802DC8B8(gobj); + } else { + it_802762BC(ip); + it_802DD59C_inline(gobj); + } + } + return gobj; +} -/// #it_802DDA84 +int it_802DDA84(Item_GObj* gobj) +{ + Item* ip = gobj->user_data; + CollData* col = &ip->x378_itemColl; + bool cond; + ip->x378_itemColl.cur_topn = ip->pos; + ip->x378_itemColl.prev_topn = ip->x378_itemColl.cur_topn; + ip->x378_itemColl.prev_topn.y += 10.0f; + ip->x378_itemColl.cur_topn.y -= 10.0f; + cond = mpColl_800471F8(col); + ip->pos = col->cur_topn; + if (cond) { + return 1; + } + return 0; +} diff --git a/src/melee/it/items/itnokonoko.h b/src/melee/it/items/itnokonoko.h index da2cc31efc..f9187fcc0e 100644 --- a/src/melee/it/items/itnokonoko.h +++ b/src/melee/it/items/itnokonoko.h @@ -5,52 +5,53 @@ #include #include "it/forward.h" +#include -/* 2DC69C */ UNK_RET it_802DC69C(UNK_PARAMS); -/* 2DC774 */ UNK_RET it_802DC774(UNK_PARAMS); -/* 2DC83C */ UNK_RET it_802DC83C(UNK_PARAMS); -/* 2DC8B8 */ UNK_RET fn_802DC8B8(UNK_PARAMS); -/* 2DC910 */ UNK_RET it_802DC910(UNK_PARAMS); -/* 2DC918 */ UNK_RET it_802DC918(UNK_PARAMS); -/* 2DC954 */ UNK_RET it_802DC954(UNK_PARAMS); -/* 2DC990 */ UNK_RET it_802DC990(UNK_PARAMS); -/* 2DCA5C */ UNK_RET it_802DCA5C(UNK_PARAMS); -/* 2DCAA4 */ UNK_RET it_802DCAA4(UNK_PARAMS); -/* 2DCB34 */ UNK_RET it_802DCB34(UNK_PARAMS); -/* 2DCB9C */ UNK_RET it_802DCB9C(UNK_PARAMS); -/* 2DCC58 */ UNK_RET it_802DCC58(UNK_PARAMS); -/* 2DCC60 */ UNK_RET it_802DCC60(UNK_PARAMS); -/* 2DCC90 */ UNK_RET it_802DCC90(UNK_PARAMS); -/* 2DCCCC */ UNK_RET it_802DCCCC(UNK_PARAMS); -/* 2DCD54 */ UNK_RET it_802DCD54(UNK_PARAMS); -/* 2DCD9C */ UNK_RET it_802DCD9C(UNK_PARAMS); -/* 2DCDC4 */ UNK_RET it_802DCDC4(UNK_PARAMS); -/* 2DCE00 */ UNK_RET it_802DCE00(UNK_PARAMS); -/* 2DCE74 */ UNK_RET it_802DCE74(UNK_PARAMS); -/* 2DCEC4 */ UNK_RET it_802DCEC4(UNK_PARAMS); -/* 2DCFBC */ UNK_RET it_802DCFBC(UNK_PARAMS); -/* 2DD0A0 */ UNK_RET it_802DD0A0(UNK_PARAMS); -/* 2DD1B4 */ UNK_RET it_802DD1B4(UNK_PARAMS); -/* 2DD1DC */ UNK_RET it_802DD1DC(UNK_PARAMS); -/* 2DD25C */ UNK_RET it_802DD25C(UNK_PARAMS); -/* 2DD264 */ UNK_RET it_802DD264(UNK_PARAMS); -/* 2DD290 */ UNK_RET it_802DD290(UNK_PARAMS); -/* 2DD2DC */ UNK_RET it_802DD2DC(UNK_PARAMS); -/* 2DD328 */ UNK_RET it_802DD328(UNK_PARAMS); -/* 2DD468 */ UNK_RET it_802DD468(UNK_PARAMS); -/* 2DD46C */ UNK_RET it_802DD46C(UNK_PARAMS); -/* 2DD4A8 */ UNK_RET it_802DD4A8(UNK_PARAMS); -/* 2DD4F4 */ UNK_RET it_802DD4F4(UNK_PARAMS); -/* 2DD53C */ UNK_RET it_802DD53C(UNK_PARAMS); -/* 2DD598 */ UNK_RET it_802DD598(UNK_PARAMS); -/* 2DD59C */ UNK_RET it_802DD59C(UNK_PARAMS); -/* 2DD67C */ UNK_RET it_802DD67C(UNK_PARAMS); -/* 2DD6D4 */ UNK_RET it_802DD6D4(UNK_PARAMS); -/* 2DD71C */ UNK_RET it_802DD71C(UNK_PARAMS); -/* 2DD74C */ UNK_RET it_802DD74C(UNK_PARAMS); -/* 2DD78C */ UNK_RET it_802DD78C(UNK_PARAMS); -/* 2DD7D0 */ UNK_RET it_802DD7D0(UNK_PARAMS); -/* 2DD7F0 */ UNK_RET it_802DD7F0(UNK_PARAMS); +/* 2DC69C */ void it_802DC69C(Item_GObj*); +/* 2DC774 */ bool it_802DC774(Item_GObj*); +/* 2DC83C */ bool it_802DC83C(Item_GObj*); +/* 2DC8B8 */ void fn_802DC8B8(Item_GObj*); +/* 2DC910 */ bool it_802DC910(Item_GObj*); +/* 2DC918 */ void it_802DC918(Item_GObj*); +/* 2DC954 */ int it_802DC954(Item_GObj*); +/* 2DC990 */ void it_802DC990(Item_GObj*); +/* 2DCA5C */ int it_802DCA5C(Item_GObj*); +/* 2DCAA4 */ void it_802DCAA4(Item_GObj*); +/* 2DCB34 */ int it_802DCB34(Item_GObj*); +/* 2DCB9C */ void it_802DCB9C(Item_GObj*); +/* 2DCC58 */ bool it_802DCC58(Item_GObj*); +/* 2DCC60 */ void it_802DCC60(Item_GObj*); +/* 2DCC90 */ int it_802DCC90(Item_GObj*); +/* 2DCCCC */ void it_802DCCCC(Item_GObj*); +/* 2DCD54 */ bool it_802DCD54(Item_GObj*); +/* 2DCD9C */ void it_802DCD9C(Item_GObj*); +/* 2DCDC4 */ int it_802DCDC4(Item_GObj*); +/* 2DCE00 */ void it_802DCE00(Item_GObj*); +/* 2DCE74 */ void it_802DCE74(Item_GObj*); +/* 2DCEC4 */ void it_802DCEC4(Item_GObj*); +/* 2DCFBC */ void it_802DCFBC(Item_GObj*); +/* 2DD0A0 */ bool it_802DD0A0(Item_GObj*); +/* 2DD1B4 */ void it_802DD1B4(Item_GObj*); +/* 2DD1DC */ int it_802DD1DC(Item_GObj*); +/* 2DD25C */ bool it_802DD25C(Item_GObj*); +/* 2DD264 */ void it_802DD264(Item_GObj*); +/* 2DD290 */ void it_802DD290(Item_GObj*); +/* 2DD2DC */ void it_802DD2DC(Item_GObj*); +/* 2DD328 */ bool it_802DD328(Item_GObj*); +/* 2DD468 */ void it_802DD468(Item_GObj*); +/* 2DD46C */ int it_802DD46C(Item_GObj*); +/* 2DD4A8 */ void it_802DD4A8(Item_GObj*, s32, Item_StateChangeFlags); +/* 2DD4F4 */ void it_802DD4F4(Item_GObj*); +/* 2DD53C */ bool it_802DD53C(Item_GObj*); +/* 2DD598 */ void it_802DD598(Item_GObj*); +/* 2DD59C */ void it_802DD59C(Item_GObj*); +/* 2DD67C */ void it_802DD67C(Item_GObj*); +/* 2DD6D4 */ bool it_802DD6D4(Item_GObj*); +/* 2DD71C */ void it_802DD71C(Item_GObj*); +/* 2DD74C */ int it_802DD74C(Item_GObj*); +/* 2DD78C */ void it_802DD78C(Item_GObj*); +/* 2DD7D0 */ void it_802DD7D0(Item_GObj*, Item_GObj*); +/* 2DD7F0 */ Item_GObj* it_802DD7F0(s32, Vec3*, Vec3*, s32); /* 2DDA84 */ bool it_802DDA84(Item_GObj*); #endif diff --git a/src/melee/it/items/itzgshell.h b/src/melee/it/items/itzgshell.h index b0abff339a..7c81d822c5 100644 --- a/src/melee/it/items/itzgshell.h +++ b/src/melee/it/items/itzgshell.h @@ -5,6 +5,7 @@ #include #include "it/forward.h" +#include /* 2DDB38 */ UNK_RET it_802DDB38(UNK_PARAMS); /* 2DDBE8 */ UNK_RET it_802DDBE8(UNK_PARAMS); @@ -63,7 +64,7 @@ /* 2DFF14 */ UNK_RET it_802DFF14(UNK_PARAMS); /* 2DFFA0 */ UNK_RET it_802DFFA0(UNK_PARAMS); /* 2DFFB8 */ UNK_RET it_802DFFB8(UNK_PARAMS); -/* 2E0100 */ UNK_RET it_802E0100(UNK_PARAMS); +/* 2E0100 */ Item_GObj* it_802E0100(s32, Vec3*, s32); /* 2E0408 */ void it_802E0408(Item_GObj*); #endif diff --git a/src/melee/it/items/itzrshell.c b/src/melee/it/items/itzrshell.c index e1dfdfc655..a4a319d4af 100644 --- a/src/melee/it/items/itzrshell.c +++ b/src/melee/it/items/itzrshell.c @@ -89,7 +89,7 @@ void it_802E0468(Item_GObj* gobj, HSD_GObj* ref_gobj) it_8026B894(gobj, ref_gobj); } -Item_GObj* it_802E0488(s32 arg0, s32 arg1, s32 arg2) +Item_GObj* it_802E0488(s32 arg0, Vec3* arg1, s32 arg2) { Vec3 pos = { 0, 0, 0 }; Item_GObj* it_gp; diff --git a/src/melee/it/items/itzrshell.h b/src/melee/it/items/itzrshell.h index 072ee40481..57b15df2f0 100644 --- a/src/melee/it/items/itzrshell.h +++ b/src/melee/it/items/itzrshell.h @@ -19,7 +19,7 @@ void it_802E0408(Item_GObj*); void it_802E0428(Item_GObj*); void it_802E0448(Item_GObj*); void it_802E0468(Item_GObj*, HSD_GObj*); -Item_GObj* it_802E0488(s32, s32, s32); +Item_GObj* it_802E0488(s32, Vec3*, s32); extern ItemStateTable it_803F87F0[]; #endif diff --git a/src/melee/it/types.h b/src/melee/it/types.h index 7377eecde6..be5a68e6ca 100644 --- a/src/melee/it/types.h +++ b/src/melee/it/types.h @@ -80,13 +80,6 @@ struct Item_DynamicBones { }; STATIC_ASSERT(sizeof(struct Item_DynamicBones) == 0x1C); -struct ECB { - f32 top; - f32 bottom; - f32 right; - f32 left; -}; - struct ItemAttr { u8 x0_is_heavy : 1; // 0x0, bit 0x80, is heavy item (crate) u8 x0_78 : 4; // unk, might be lock-on behavior? (Samus Missile) @@ -573,6 +566,7 @@ struct Item { itLinkBow_ItemVars linkbow; itLinkHookshot_ItemVars linkhookshot; itMato_ItemVars mato; + itNokoNoko_ItemVars nokonoko; itPikachutJoltGround_ItemVars pikachujoltground; itPKFlush_ItemVars pkflush; itPKFlushExplode_ItemVars pkflushexplode;