Skip to content

Commit

Permalink
Match itseakvanish (#947)
Browse files Browse the repository at this point in the history
  • Loading branch information
r-burns authored Jul 1, 2023
1 parent 66673a0 commit ae3fdab
Show file tree
Hide file tree
Showing 7 changed files with 88 additions and 143 deletions.
138 changes: 0 additions & 138 deletions asm/melee/it/items/itseakvanish.s

This file was deleted.

2 changes: 1 addition & 1 deletion obj_files.mk
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ TEXT_O_FILES +=\
$(BUILD_DIR)/asm/melee/it/items/itnesspkflushexplode.s.o\
$(BUILD_DIR)/asm/melee/it/items/itseakneedlethrown.s.o\
$(BUILD_DIR)/asm/melee/it/items/itseakneedleheld.s.o\
$(BUILD_DIR)/asm/melee/it/items/itseakvanish.s.o\
$(BUILD_DIR)/src/melee/it/items/itseakvanish.c.o\
$(BUILD_DIR)/asm/melee/it/items/itpikachuthunder.s.o\
$(BUILD_DIR)/asm/melee/it/items/itmariocape.s.o\
$(BUILD_DIR)/asm/melee/it/items/ityoshieggthrow.s.o\
Expand Down
2 changes: 2 additions & 0 deletions src/melee/it/it_266F.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,5 +137,7 @@ bool it_8026DA08(Item_GObj*);
bool it_80276308(Item_GObj*);
bool it_802763E0(Item_GObj*);
void it_80272860(Item_GObj*, f32, f32);
void it_8027518C(Item_GObj*);
bool it_802751D8(Item_GObj*);

#endif
4 changes: 1 addition & 3 deletions src/melee/it/it_803F3100.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <melee/it/it_27CF.h>
#include <melee/it/items/itfoxlaser.h>
#include <melee/it/items/itfoxillusion.h>
#include <melee/it/items/itseakvanish.h>

void it_8027C8B0();
bool it_8029BA38();
Expand Down Expand Up @@ -104,8 +105,6 @@ bool it_802B16E4();
void it_802B1890();
void it_802B1AAC();
void it_802B1C40();
bool it_802B1D38();
void it_802B1DCC();
void it_802B202C();
bool it_802B2508();
bool it_802B2510();
Expand Down Expand Up @@ -373,7 +372,6 @@ extern ItemStateTable it_803F6E98[];
extern ItemStateTable it_803F6F40[];
extern ItemStateTable it_803F6F50[];
extern ItemStateTable it_803F70A8[];
extern ItemStateTable it_803F70B8[];
extern ItemStateTable it_803F70C8[];
extern ItemStateTable it_803F70F8[];
extern ItemStateTable it_803F7118[];
Expand Down
1 change: 0 additions & 1 deletion src/melee/it/items/itcapsule.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ void it_80272C08();
void it_80273454();
void it_80274658(Item_GObj*, f32);
void it_8027518C();
bool it_802751D8(Item_GObj*);
void it_80275444();
void it_802756D0();
void it_8027D258(Item_GObj*);
Expand Down
68 changes: 68 additions & 0 deletions src/melee/it/items/itseakvanish.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#include "itseakvanish.h"

#include <melee/db/db_2253.h>
#include <melee/it/it_266F.h>
#include <melee/it/it_26B1.h>
#include <melee/it/item.h>
#include <melee/it/types.h>

ItemStateTable it_803F70B8[] = {
{
0,
it_802B1DAC,
NULL,
NULL,
},
};

Item_GObj* it_802B1C60(HSD_GObj* parent, Vec3* pos, f32 dir)
{
SpawnItem spawn;
Item_GObj* item_gobj;

spawn.kind = 0x55;
spawn.prev_pos = *pos;
spawn.pos = spawn.prev_pos;
spawn.facing_dir = dir;
spawn.x3C_damage = 0;
spawn.vel.x = spawn.vel.y = spawn.vel.z = 0.0F;
spawn.x0_parent_gobj = parent;
spawn.x4_parent_gobj2 = spawn.x0_parent_gobj;
spawn.x44_flag.bits.b0 = 1;
spawn.x40 = 0;
item_gobj = Item_80268B18(&spawn);
if (item_gobj != NULL) {
it_802B1D40(item_gobj, parent);
db_80225DD8(item_gobj, parent);
return item_gobj;
}
return NULL;
}

bool it_802B1D38(Item_GObj* item_gobj)
{
return false;
}

void it_802B1D40(Item_GObj* item_gobj, HSD_GObj* owner)
{
Item* item = GET_ITEM(item_gobj);
item->owner = owner;
item->xD44_lifeTimer = 60.0F;
item->xDAC_itcmd_var0 = 0;
it_8026BB44(item_gobj);
it_8026B3A8(item_gobj);
it_8026BD24(item_gobj);
it_8027518C(item_gobj);
Item_80268E5C(item_gobj, 0, ITEM_ANIM_UPDATE);
}

bool it_802B1DAC(Item_GObj* item_gobj)
{
return it_802751D8(item_gobj);
}

void it_802B1DCC(Item_GObj* item_gobj, HSD_GObj* gobj)
{
it_8026B894(item_gobj, gobj);
}
16 changes: 16 additions & 0 deletions src/melee/it/items/itseakvanish.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#ifndef MELEE_IT_ITSEAKVANISH_H
#define MELEE_IT_ITSEAKVANISH_H

#include <melee/it/forward.h>
#include <dolphin/mtx/forward.h>
#include <sysdolphin/baselib/forward.h>

extern ItemStateTable it_803F70B8[];

Item_GObj* it_802B1C60(HSD_GObj* parent, Vec3* pos, f32 dir);
bool it_802B1D38(Item_GObj*);
void it_802B1D40(Item_GObj*, HSD_GObj*);
bool it_802B1DAC(Item_GObj*);
void it_802B1DCC(Item_GObj*, HSD_GObj*);

#endif

0 comments on commit ae3fdab

Please sign in to comment.