Skip to content

Commit

Permalink
initial dump, matched all functions
Browse files Browse the repository at this point in the history
  • Loading branch information
thefoxcam committed Jun 15, 2024
1 parent a60e81d commit ea93272
Show file tree
Hide file tree
Showing 4 changed files with 220 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/melee/it/itCommonItems.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,11 @@ typedef struct FFlowerVars {
uint x4;
} FFlowerVars;

typedef struct FFlowerFlameVars {
/* +0 */ Vec3 pos;
/* +C */ f32 unk;
} FFlowerFlameVars;

typedef struct HassamVars {
f32 x0;
f32 x4;
Expand Down
194 changes: 194 additions & 0 deletions src/melee/it/items/itfflowerflame.c
Original file line number Diff line number Diff line change
@@ -1 +1,195 @@
#include "itfflowerflame.h"

#include "it/inlines.h"
#include "it/it_2725.h"
#include "it/item.h"

HSD_GObj* it_8029A748(Item_GObj* arg0, Vec3* arg1, u8 arg2, f32 arg3) {
SpawnItem spawn;
Item_GObj* gobj;

spawn.kind = It_Kind_F_Flower_Flame;
spawn.prev_pos = *arg1;
spawn.prev_pos.z = 0.0F;
it_8026BB68(arg0, &spawn.pos);
spawn.facing_dir = arg3;
spawn.x3C_damage = 0;
spawn.vel.z = 0.0F;
spawn.vel.y = 0.0F;
spawn.vel.x = 0.0F;
spawn.x0_parent_gobj = (HSD_GObj *)arg0;
spawn.x4_parent_gobj2 = spawn.x0_parent_gobj;
spawn.x44_flag.bits.b0 = true;
spawn.x40 = 0;

gobj = Item_80268B18(&spawn);
if (gobj != NULL) {
Vec3 temp_pos;
HSD_JObj* jobj;
Item* item = GET_ITEM((HSD_GObj *)gobj);
f32 lifetime = *(f32 *)item->xC4_article_data->x4_specialAttributes;
it_80275158((HSD_GObj* ) gobj, lifetime);
Item_8026AB54((HSD_GObj* ) gobj, (HSD_GObj* ) arg0, arg2);
it_8026B3A8(gobj);
jobj = it_80272CC0(gobj, 2);
HSD_JObjGetTranslation(jobj, &temp_pos);
item->xDD4_itemVar.fflowerflame.pos.x = temp_pos.x;
item->xDD4_itemVar.fflowerflame.pos.y = temp_pos.y;
item->xDD4_itemVar.fflowerflame.pos.z = temp_pos.z;
}
return (HSD_GObj* ) gobj;
}

void it_8029A89C(Item_GObj* arg0, f32 arg1) {
HSD_JObj* temp_r3;
f32 pad;

if (arg0 != NULL) {
Item* item = GET_ITEM((HSD_GObj *)arg0);
if (item != NULL) {
temp_r3 = it_80272CC0(arg0, 1);
item->xDD4_itemVar.fflowerflame.unk = arg1;
it_80272F7C(temp_r3, item->xDD4_itemVar.fflowerflame.unk);
}
}
}

void it_8029A8F4(Item_GObj* arg0, Vec3* arg1) {
HSD_JObj* jobj;
Vec3 temp_pos;

if (arg0 != NULL) {
Item* item = GET_ITEM((HSD_GObj *)arg0);
if (item != NULL) {
jobj = it_80272CC0(arg0, 2);
temp_pos.x = item->xDD4_itemVar.fflowerflame.pos.x + arg1->x;
temp_pos.y = item->xDD4_itemVar.fflowerflame.pos.y + arg1->y;
temp_pos.z = item->xDD4_itemVar.fflowerflame.pos.z + arg1->z;
HSD_JObjSetTranslate(jobj, &temp_pos);
}
}
}

void it_8029A9FC(Item_GObj* arg0) {
it_8026B3A8(arg0);
}

void it_8029AA1C(HSD_GObj* arg0) {
Item* item = GET_ITEM(arg0);
item->x40_vel.z = 0.0F;
item->x40_vel.y = 0.0F;
item->x40_vel.x = 0.0F;
Item_80268E5C(arg0, 0, ITEM_ANIM_UPDATE);
it_8026B3A8((Item_GObj* ) arg0);
}

u32 it_8029AA6C(Item_GObj* arg0) {
HSD_JObj* jobj;
Item* item = GET_ITEM((HSD_GObj *)arg0);
it_80272F7C(it_80272CC0(arg0, 1), item->xDD4_itemVar.fflowerflame.unk);
jobj = it_80272CC0(arg0, 2);
HSD_JObjSetTranslate(jobj, &item->xDD4_itemVar.fflowerflame.pos);
return 0;
}

void it_8029AB60(void) {
return;
}

s32 it_8029AB64(Item_GObj* arg0) {
it_8026D62C(arg0, it_8029AB90);
return 0;
}

void it_8029AB90(HSD_GObj* gobj) {
Item_80268E5C(gobj, 1, ITEM_ANIM_UPDATE);
it_8026B3A8((Item_GObj* ) gobj);
}

void it_8029ABCC(Item_GObj* arg0) {
HSD_JObj* jobj;
Item* item = GET_ITEM((HSD_GObj *)arg0);
it_80272F7C(it_80272CC0(arg0, 1), item->xDD4_itemVar.fflowerflame.unk);
jobj = it_80272CC0(arg0, 2);
HSD_JObjSetTranslate(jobj, &item->xDD4_itemVar.fflowerflame.pos);
it_80273130(arg0);
}

void it_8029ACCC(Item_GObj* arg0) {
ItemAttr* temp_r4;

Item* item = GET_ITEM((HSD_GObj *)arg0);
temp_r4 = item->xCC_item_attr;
it_80272860(arg0, temp_r4->x10_fall_speed, temp_r4->x14_fall_speed_max);
}

void it_8029ACFC(void) {
it_8026DF34();
}

void it_8029AD1C(Item_GObj* arg0) {
Item_80268E5C((HSD_GObj* ) arg0, 2, ITEM_ANIM_UPDATE);
it_8026B3A8(arg0);
}

s32 it_8029AD58(Item_GObj* arg0) {
Item* item = GET_ITEM((HSD_GObj *)arg0);
it_80272F7C(it_80272CC0(arg0, 1), item->xDD4_itemVar.fflowerflame.unk);
return 0;
}

void it_8029AD94(Item_GObj* arg0) {
Item_80268E5C((HSD_GObj* ) arg0, 1, 6);
it_8026B3A8(arg0);
}

void it_8029ADD0(Item_GObj* arg0) {
HSD_JObj* jobj;
Item* item = GET_ITEM((HSD_GObj *)arg0);
it_80272F7C(it_80272CC0(arg0, 1), item->xDD4_itemVar.fflowerflame.unk);
jobj = it_80272CC0(arg0, 2);
HSD_JObjSetTranslate(jobj, &item->xDD4_itemVar.fflowerflame.pos);
it_80273130(arg0);
}

void it_8029AED0(Item_GObj* arg0) {
ItemAttr* temp_r4;

Item* item = GET_ITEM((HSD_GObj *)arg0);
temp_r4 = item->xCC_item_attr;
it_80272860(arg0, temp_r4->x10_fall_speed, temp_r4->x14_fall_speed_max);
}

s32 it_8029AF00(Item_GObj* arg0) {
if (it_8026DA08(arg0) != 0) {
return 1;
}
return 0;
}

void it_8029AF34(Item_GObj* arg0) {
Item_80268E5C((HSD_GObj* ) arg0, 4, ITEM_ANIM_UPDATE);
it_8026B3A8(arg0);
}

void it_8029AF70(Item_GObj* arg0) {
HSD_JObj* jobj;
Item* item = GET_ITEM((HSD_GObj *)arg0);
it_80272F7C(it_80272CC0(arg0, 1), item->xDD4_itemVar.fflowerflame.unk);
jobj = it_80272CC0(arg0, 2);
HSD_JObjSetTranslate(jobj, &item->xDD4_itemVar.fflowerflame.pos);
it_80273130(arg0);
}

void it_8029B070(void) {
return;
}

s32 it_8029B074(Item_GObj* arg0) {
it_8026E8C4(arg0, it_8029AA1C, it_8029AB90);
return 0;
}

void it_8029B0A8(Item_GObj* arg0, Item_GObj* arg1) {
it_8026B894(arg0, (HSD_GObj* ) arg1);
}
20 changes: 20 additions & 0 deletions src/melee/it/items/itfflowerflame.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,34 @@
#ifndef GALE01_29A748
#define GALE01_29A748

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

#include "it/items/types.h"
#include "it/types.h"

/* 29A748 */ HSD_GObj* it_8029A748(Item_GObj*, Vec3*, u8, f32);
/* 29A8F4 */ void it_8029A8F4(Item_GObj*, Vec3*);
/* 29A89C */ void it_8029A89C(Item_GObj*, f32);
/* 29A9FC */ void it_8029A9FC(Item_GObj*);
/* 29AA1C */ void it_8029AA1C(HSD_GObj*);
/* 29AA6C */ u32 it_8029AA6C(Item_GObj*);
/* 29AB60 */ void it_8029AB60(void);
/* 29AB64 */ s32 it_8029AB64(Item_GObj*);
/* 29AB90 */ void it_8029AB90(HSD_GObj*);
/* 29ABCC */ void it_8029ABCC(Item_GObj*);
/* 29ACCC */ void it_8029ACCC(Item_GObj*);
/* 29ACFC */ void it_8029ACFC(void);
/* 29AD1C */ void it_8029AD1C(Item_GObj*);
/* 29AD58 */ s32 it_8029AD58(Item_GObj*);
/* 29AD94 */ void it_8029AD94(Item_GObj*);
/* 29ADD0 */ void it_8029ADD0(Item_GObj*);
/* 29AED0 */ void it_8029AED0(Item_GObj*);
/* 29AF00 */ s32 it_8029AF00(Item_GObj*);
/* 29AF34 */ void it_8029AF34(Item_GObj*);
/* 29AF70 */ void it_8029AF70(Item_GObj*);
/* 29B070 */ void it_8029B070(void);
/* 29B074 */ s32 it_8029B074(Item_GObj*);
/* 29B0A8 */ void it_8029B0A8(Item_GObj*, Item_GObj*);
/* 3F66C8 */ extern ItemStateTable it_803F66C8[];

Expand Down
1 change: 1 addition & 0 deletions src/melee/it/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,7 @@ struct Item {
itTargetVars target;
CoinVars coin;
FFlowerVars fflower;
FFlowerFlameVars fflowerflame;
HassamVars hassam;
u8 padding[0xFCC - 0xDD4];
} xDD4_itemVar;
Expand Down

0 comments on commit ea93272

Please sign in to comment.