Skip to content

Commit

Permalink
match it_802F1C70 and add itCoinAttributes
Browse files Browse the repository at this point in the history
  • Loading branch information
wyatt-avilla committed Mar 9, 2024
1 parent d713da1 commit c00a1f1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
5 changes: 5 additions & 0 deletions src/melee/it/itCommonItems.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
15 changes: 6 additions & 9 deletions src/melee/it/items/itcoin.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand All @@ -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;
Expand Down

0 comments on commit c00a1f1

Please sign in to comment.