From c00a1f1d42d73eb0bec8a9656813a90f6259ff80 Mon Sep 17 00:00:00 2001 From: wyatt-avilla Date: Fri, 8 Mar 2024 21:55:00 -0800 Subject: [PATCH] match `it_802F1C70` and add `itCoinAttributes` --- src/melee/it/itCommonItems.h | 5 +++++ src/melee/it/items/itcoin.c | 15 ++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/melee/it/itCommonItems.h b/src/melee/it/itCommonItems.h index aac1f9e34e..4df2cd1081 100644 --- a/src/melee/it/itCommonItems.h +++ b/src/melee/it/itCommonItems.h @@ -185,6 +185,11 @@ typedef struct MewVars { f32 xC; } MewVars; +typedef struct itCoinAttributes { + u8 x0_filler[50]; + f32 x50; +} itCoinAttributes; + typedef struct CoinVars { s32 x0; s32 x4; diff --git a/src/melee/it/items/itcoin.c b/src/melee/it/items/itcoin.c index b7bb88b541..8ccd0a7d9b 100644 --- a/src/melee/it/items/itcoin.c +++ b/src/melee/it/items/itcoin.c @@ -7,6 +7,7 @@ #include "it/it_266F.h" #include "it/it_26B1.h" #include "it/it_2725.h" +#include "it/itCommonItems.h" #include "it/item.h" #include "lb/lbaudio_ax.h" #include "lb/lbvector.h" @@ -341,15 +342,13 @@ bool it_802F1C68(Item_GObj* gobj) return false; } -void it_802F1C70(Item_GObj* arg0) +void it_802F1C70(Item_GObj* gobj) { - Item* temp_r5; + Item* ip = GET_ITEM(gobj); + itCoinAttributes* attr = ip->xC4_article_data->x4_specialAttributes; - temp_r5 = arg0->user_data; - temp_r5->x40_vel.x *= - M2C_FIELD(temp_r5->xC4_article_data->x4_specialAttributes, f32*, 0x34); - // it_80272860(arg0, temp_r5->xDD4_itemVar.star.x8, - // temp_r5->xDD4_itemVar.star.xC); + ip->x40_vel.x *= attr->x50; + it_80272860(gobj, ip->xDD4_itemVar.coin.x8, ip->xDD4_itemVar.coin.xC); } bool it_802F1CB4(Item_GObj* gobj) @@ -358,8 +357,6 @@ bool it_802F1CB4(Item_GObj* gobj) return false; } -extern f32 it_804DD9B8; - void it_802F1CE0(Item_GObj* arg0) { HSD_JObj* temp_r30;