diff --git a/src/melee/it/itCommonItems.h b/src/melee/it/itCommonItems.h index 2a172f13e8..f54062e4fc 100644 --- a/src/melee/it/itCommonItems.h +++ b/src/melee/it/itCommonItems.h @@ -171,7 +171,6 @@ typedef struct itPokemonAttributes { typedef struct { u8 padding[0xE34 - 0xDD4]; s32 timer; - s32 x64; } ItPokemonVars; typedef struct { @@ -217,4 +216,18 @@ typedef struct CoinVars { int x14; } CoinVars; +typedef struct itMarumineAttributes { + f32 x0; + s32 x4; + int x8; + s32 xC; +} itMarumineAttributes; + +typedef struct itMarumineVars { + u8 x0_padding[0xE34 - 0xDD4]; + s32 x60; + s32 x64; + +} itMarumineVars; + #endif diff --git a/src/melee/it/items/itmarumine.c b/src/melee/it/items/itmarumine.c index 28d9c4896b..ee818c0396 100644 --- a/src/melee/it/items/itmarumine.c +++ b/src/melee/it/items/itmarumine.c @@ -69,18 +69,18 @@ void it_802D09D0(Item_GObj* gobj) void it_802D0A0C(Item_GObj* gobj) { Item* ip; - itPokemonAttributes* attr; + itMarumineAttributes* attr; ip = GET_ITEM(gobj); attr = ip->xC4_article_data->x4_specialAttributes; ip->facing_dir = 0.0F; ip->xDC8_word.flags.x0 = true; - ip->xDD4_itemVar.pokemon.timer = 0xB4 - attr->max; + ip->xDD4_itemVar.marumine.x60 = 0xB4 - attr->x8; it_80279CDC(gobj, attr->x0); it_80273454(gobj); it_802D1320(gobj); ip->xDC8_word.flags.x0 = true; - ip->xDD4_itemVar.pokemon.x64 = attr->xC; + ip->xDD4_itemVar.marumine.x64 = attr->xC; ip->xDAC_itcmd_var0 = 1; } @@ -126,10 +126,10 @@ void it_802D0BB4(Item_GObj* gobj) {} bool it_802D0BB8(Item_GObj* gobj) { Item* ip = GET_ITEM(gobj); - itPokemonAttributes* attr = ip->xC4_article_data->x4_specialAttributes; + itMarumineAttributes* attr = ip->xC4_article_data->x4_specialAttributes; if (it_8026DA08(gobj) == false) { - if (ip->x5CC_currentAnimFrame >= attr->timer) { + if (ip->x5CC_currentAnimFrame >= attr->x4) { it_802D0C44(gobj); } } @@ -196,15 +196,15 @@ bool it_802D0DB4(Item_GObj* gobj) void it_802D0DBC(Item_GObj* gobj) { f32 sp10; - itPokemonAttributes* attr; + itMarumineAttributes* attr; Item* ip = GET_ITEM(gobj); - if (--ip->xDD4_itemVar.pokemon.x64 == 0) { + if (--ip->xDD4_itemVar.marumine.x64 == 0) { attr = ip->xC4_article_data->x4_specialAttributes; sp10 = 1.0F; efSync_Spawn(0x471, gobj, (ip->xBBC_dynamicBoneTable->bones[3]), &sp10); - ip->xDD4_itemVar.pokemon.x64 = attr->xC; + ip->xDD4_itemVar.marumine.x64 = attr->xC; } } @@ -256,12 +256,12 @@ void fn_802D0F98(Item_GObj* gobj) f32 sp10; Item* ip = GET_ITEM(gobj); - if (--ip->xDD4_itemVar.pokemon.x64 == 0) { - itPokemonAttributes* attr = + if (--ip->xDD4_itemVar.marumine.x64 == 0) { + itMarumineAttributes* attr = ip->xC4_article_data->x4_specialAttributes; sp10 = 1.0F; efSync_Spawn(0x471, gobj, ip->xBBC_dynamicBoneTable->bones[3], &sp10); - ip->xDD4_itemVar.pokemon.x64 = attr->xC; + ip->xDD4_itemVar.marumine.x64 = attr->xC; } } @@ -310,17 +310,17 @@ void it_802D1140(Item_GObj* gobj) { f32 sp10; Item* ip; - itPokemonAttributes* attr; + itMarumineAttributes* attr; ip = GET_ITEM(gobj); - if (--ip->xDD4_itemVar.pokemon.timer < 0) { - if (--ip->xDD4_itemVar.pokemon.x64 == 0) { + if (--ip->xDD4_itemVar.marumine.x60 < 0) { + if (--ip->xDD4_itemVar.marumine.x64 == 0) { attr = ip->xC4_article_data->x4_specialAttributes; sp10 = 1.0F; efSync_Spawn(0x471, gobj, ip->xBBC_dynamicBoneTable->bones[3], &sp10); - ip->xDD4_itemVar.pokemon.x64 = attr->xC; + ip->xDD4_itemVar.marumine.x64 = attr->xC; } it_8026B390(gobj); if (ip->xDAC_itcmd_var0 != 0) { diff --git a/src/melee/it/types.h b/src/melee/it/types.h index 158c45016f..7cc1814f48 100644 --- a/src/melee/it/types.h +++ b/src/melee/it/types.h @@ -563,6 +563,7 @@ struct Item { itShellVars shell; itTargetVars target; CoinVars coin; + itMarumineVars marumine; u8 padding[0xFCC - 0xDD4]; } xDD4_itemVar; };