Skip to content

Commit

Permalink
it_2E5A work (#1482)
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronB-Hub authored Oct 22, 2024
1 parent a6a0819 commit 5167b69
Show file tree
Hide file tree
Showing 5 changed files with 816 additions and 48 deletions.
88 changes: 88 additions & 0 deletions src/melee/it/itCommonItems.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <platform.h>
#include <placeholder.h>

#include "it/forward.h"
#include <baselib/forward.h>

#include <common_structs.h>
Expand Down Expand Up @@ -419,6 +420,93 @@ struct it_2F28_DatAttrs {
f32 float2; // item var x0
};

typedef struct it_2E5A_ItemVars_struct {
f32 x0; // set to float calc result/item->x3C
HSD_JObj* x4; // set to item_gobj->hsd_obj
Vec3 x8; // called in lb_8000B1CC
Vec3 x14; // set equal to x8
} it_2E5A_ItemVars_struct;

typedef struct it_2E5A_ItemVars {
// /* ip+DD4 */ HSD_GObj* x0;
/* ip+DD4 */ s32 x0;
/* ip+DD8 */ s32 x4; // uses regular registers (#? gets multiplied by 2C,
// then indexed into attr)
/* ip+DDC */ s32 x8; // uses regular registers
/* ip+DE0 */ s32 xC; // uses regular registers
/* ip+DE4 */ f32 x10; // uses float registers; timer?
/* ip+DE8 */ f32 x14;
/* ip+DEC */ UnkFlagStruct x18; // has bit assignments
/* ip+DF0 */ it_2E5A_ItemVars_struct* x1C;
// /* ip+DF4 */ s32 x20;
// /* ip+DF8 */ s32 x24;
// /* ip+DFC */ s32 x28;
// /* ip+E00 */ s32 x2C;
// /* ip+E04 */ s32 x30;
// /* ip+E08 */ s32 x34;
// /* ip+E0C */ s32 x38;
// /* ip+E10 */ s32 x3C;
// /* ip+E14 */ s32 x40;
// /* ip+E18 */ s32 x44;
// /* ip+E1C */ s32 x48;
// /* ip+E20 */ s32 x4C;
// /* ip+E24 */ s32 x50;
// /* ip+E28 */ s32 x54;
// /* ip+E2C */ s32 x58;
} it_2E5A_ItemVars;

typedef struct it_2E5A_DatAttrs_1 {
f32 x0; // lifetime?
f32 x4; // float assignment
f32 x8;
f32 xC;
f32 x10;
f32 x14; // item->x40_vel.x
f32 x18;
f32 x1C;
f32 x20;
f32 x24; // float assignment
f32 x28;
f32 x2C; // float assignment
f32 x30;
f32 x34;
f32 x38;
HSD_Joint* x3C; // called in it_80273318
f32 x40;
f32 x44;
f32 x48;
s32 x4C; // item->xD84
s32 x50;
f32 x54; // item->scl
ECB* x58; // called in it_80275D5C
s32 x5C;
} it_2E5A_DatAttrs_1;

typedef struct it_2E5A_DatAttrs_2 {
f32 x0; // lifetime?
f32 x4; // float assignment
f32 x8;
f32 xC;
HSD_Joint* x10; // called in it_80273318
ItemStateDesc* x14; // item2->xD0_itemStateDesc
f32 x18;
f32 x1C;
s32 x20; // item->xD84
f32 x24; // float assignment
f32 x28; // item->scl
// ECB* x2C; // called in it_80275D5C
} it_2E5A_DatAttrs_2;

typedef struct it_802E5FXX_struct { // used for it_802E5F00 and it_802E5F8C
HSD_GObj* x0; // Item GObj assignment/passed to db_80225DD8
f32 x4; // float assignment (angle?)
f32 x8; // float assignment (used in x40_vel.y calc)
s32 xC; // non-float assignment (arg3/arg2/while condition)
s32 x10; // non-float assignment
s32 x14; // non-float assignment
s32 x18; // non-float assignment (gm_8016C6C0)
} it_802E5FXX_struct;

// Not sure if there is a way to combine these two structs?
typedef struct it_2E6A_ItemVars_1 {
/* +0 ip+DD4 */ s16 x0;
Expand Down
8 changes: 4 additions & 4 deletions src/melee/it/it_2725.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
/* 273168 */ void it_80273168(Item_GObj* gobj);
/* 2731A4 */ void it_802731A4(Item_GObj*);
/* 2731E0 */ void it_802731E0(Item_GObj*);
/* 27321C */ UNK_RET it_8027321C(UNK_PARAMS);
/* 27321C */ void it_8027321C(Item_GObj*);
/* 27327C */ void it_8027327C(Item_GObj* gobj, s32 ID1, s32 ID2);
/* 2732E4 */ UNK_RET it_802732E4(UNK_PARAMS);
/* 273318 */ void it_80273318(Item_GObj*, HSD_Joint*, s32);
Expand Down Expand Up @@ -119,7 +119,7 @@
/* 275534 */ UNK_RET it_80275534(UNK_PARAMS);
/* 275594 */ UNK_RET it_80275594(UNK_PARAMS);
/* 2755C0 */ UNK_RET it_802755C0(UNK_PARAMS);
/* 275640 */ UNK_RET it_80275640(UNK_PARAMS);
/* 275640 */ void it_80275640(Item_GObj*, f32);
/* 2756D0 */ void it_802756D0(Item_GObj* gobj);
/* 2756E0 */ void it_802756E0(Item_GObj* gobj);
/* 27570C */ UNK_RET it_8027570C(UNK_PARAMS);
Expand Down Expand Up @@ -151,15 +151,15 @@
/* 276934 */ UNK_RET it_80276934(UNK_PARAMS);
/* 276CB8 */ void it_80276CB8(Item_GObj* gobj);
/* 276CEC */ void it_80276CEC(Item_GObj*);
/* 276D9C */ UNK_RET it_80276D9C(UNK_PARAMS);
/* 276D9C */ bool it_80276D9C(Item_GObj*, s32);
/* 276FC4 */ void it_80276FC4(Item_GObj*);
/* 277040 */ bool it_80277040(Item_GObj*);
/* 27737C */ void it_8027737C(Item_GObj* gobj, Vec3* pos);
/* 277544 */ bool it_80277544(Item_GObj*);
/* 2775F0 */ UNK_RET it_802775F0(UNK_PARAMS);
/* 27770C */ UNK_RET it_8027770C(UNK_PARAMS);
/* 27781C */ bool it_8027781C(Item_GObj*);
/* 277C40 */ UNK_RET it_80277C40(UNK_PARAMS);
/* 277C40 */ void it_80277C40(Item_GObj*, s32);
/* 277D08 */ UNK_RET it_80277D08(UNK_PARAMS);
/* 277D8C */ UNK_RET fn_80277D8C(UNK_PARAMS);
/* 277F90 */ UNK_RET it_80277F90(UNK_PARAMS);
Expand Down
Loading

0 comments on commit 5167b69

Please sign in to comment.