From e31c3a44c7a429b95ed720964a24be1465f48c9a Mon Sep 17 00:00:00 2001 From: wyatt-avilla Date: Fri, 8 Mar 2024 20:14:00 -0800 Subject: [PATCH] match `it_802F1518`. also declaration changes for externed functions --- src/melee/it/itCommonItems.h | 4 ++-- src/melee/it/items/itcoin.c | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/melee/it/itCommonItems.h b/src/melee/it/itCommonItems.h index 6af8c12800..ff14d8bb37 100644 --- a/src/melee/it/itCommonItems.h +++ b/src/melee/it/itCommonItems.h @@ -188,9 +188,9 @@ typedef struct MewVars { typedef struct CoinVars { s32 x0; s32 x4; - s32 x8; - s32 xc; + u8 x8_filler[8]; s32 x10; + s32 x14; } CoinVars; #endif diff --git a/src/melee/it/items/itcoin.c b/src/melee/it/items/itcoin.c index 27690ce353..7343d7351e 100644 --- a/src/melee/it/items/itcoin.c +++ b/src/melee/it/items/itcoin.c @@ -22,8 +22,8 @@ extern f32 it_804DD9C4; extern f32 it_804DD9D0; s32 grFigureGet_80219C50(s32); /* extern */ -M2C_UNK gm_8017E280(s16, M2C_UNK); /* extern */ -M2C_UNK grFigureGet_80219C34(f32); /* extern */ +M2C_UNK gm_8017E280(u16, M2C_UNK); /* extern */ +M2C_UNK grFigureGet_80219C34(s32); /* extern */ M2C_UNK HSD_GObjObjet_80390A70(Item_GObj*, u8, s32); /* extern */ M2C_UNK HSD_GObjObjet_80390B0C(Item_GObj*); /* extern */ M2C_UNK it_8027B798(Item_GObj*, Vec3*); /* extern */ @@ -80,10 +80,10 @@ void it_802F1518(Item_GObj* gobj) { Item* ip = GET_ITEM(gobj); - if (ip->xDD4_itemVar.capsule.x4 != 0) { - grFigureGet_80219C34(ip->xDD4_itemVar.star.yvel); - } else if ((M2C_FIELD(ip, u8*, 0xDCA) >> 4) & 1) { - gm_8017E280(ip->xDD4_itemVar.capsule.x0, 1); + if (ip->xDD4_itemVar.coin.x4 != 0) { + grFigureGet_80219C34(ip->xDD4_itemVar.coin.x14); + } else if (ip->xDC8_word.flags.x13 != false) { + gm_8017E280(ip->xDD4_itemVar.coin.x0, 1); it_8027CE44(gobj); } it_8027C8B0(gobj);