Skip to content

Commit

Permalink
match all funcs
Browse files Browse the repository at this point in the history
  • Loading branch information
thefoxcam committed Jul 2, 2024
1 parent a60e81d commit 3a7692b
Show file tree
Hide file tree
Showing 4 changed files with 116 additions and 1 deletion.
2 changes: 1 addition & 1 deletion config/GALE01/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15859,7 +15859,7 @@ it_802C7E94 = .text:0x802C7E94; // type:function size:0x4C scope:global
it_802C7EE0 = .text:0x802C7EE0; // type:function size:0x20 scope:global
it_802C7F00 = .text:0x802C7F00; // type:function size:0x20 scope:global
it_802C7F20 = .text:0x802C7F20; // type:function size:0x8C scope:global
it_802C7FAC = .text:0x802C7FAC; // type:function size:0x6C scope:global
it_802C7FAC = .text:0x802C7FAC; // type:function size:0x6C scope:local
it_802C8018 = .text:0x802C8018; // type:function size:0x20 scope:global
it_802C8038 = .text:0x802C8038; // type:function size:0x120 scope:global
it_802C8158 = .text:0x802C8158; // type:function size:0x70 scope:global
Expand Down
1 change: 1 addition & 0 deletions src/melee/it/it_2725.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
/* 27C8B0 */ void it_8027C8B0(Item_GObj*);
/* 27CBFC */ f32 it_8027CBFC(Item_GObj*);
/* 27CE44 */ void it_8027CE44(Item_GObj*);
/* 27CE64 */ void it_8027CE64(Item_GObj*, Item_GObj*, s32);
/* 3F14C4 */ extern struct ItemLogicTable it_803F14C4[43];
/* 3F23CC */ extern struct ItemLogicTable it_803F23CC[];
/* 3F3100 */ extern struct ItemLogicTable it_803F3100[118];
Expand Down
108 changes: 108 additions & 0 deletions src/melee/it/items/itgamewatchpanic.c
Original file line number Diff line number Diff line change
@@ -1 +1,109 @@
#include "itgamewatchpanic.h"

#include "db/db_2253.h"
#include "ft/chara/ftGameWatch/ftGw_SpecialLw.h"
#include "ft/ftLib.h"
#include "it/inlines.h"
#include "it/it_26B1.h"
#include "it/it_2725.h"
#include "it/item.h"

/* 2C7FAC */ static bool it_802C7FAC(Item_GObj*);

HSD_GObj* it_802C7D60(Item_GObj* parent, Vec3* pos, u8 arg2, f32 dir)
{
SpawnItem spawn_item;
HSD_GObj* item_gobj;
int* attr;

spawn_item.kind = It_Kind_GameWatch_Panic;
spawn_item.prev_pos = *pos;
spawn_item.pos = spawn_item.prev_pos;
spawn_item.facing_dir = dir;
spawn_item.x3C_damage = 0;
spawn_item.vel.x = spawn_item.vel.y = spawn_item.vel.z = 0.0f;
spawn_item.x0_parent_gobj = parent;

spawn_item.x4_parent_gobj2 = spawn_item.x0_parent_gobj;
spawn_item.x44_flag.bits.b0 = true;
spawn_item.x40 = 0;
item_gobj = Item_80268B18(&spawn_item);
if (item_gobj != NULL) {
Item* it = GET_ITEM(item_gobj);
attr = it->xC4_article_data->x4_specialAttributes;
Item_8026AB54(item_gobj, parent, arg2);
db_80225DD8(item_gobj, parent);
it_8027CE64(item_gobj, parent, *attr);
return item_gobj;
}
return NULL;
}

void it_802C7E64(Item_GObj* item_gobj)
{
Item* it = GET_ITEM(item_gobj);
if (it->owner != NULL) {
ftGw_SpecialLw_ItemPanicSetFlag(it->owner);
}
}

void it_802C7E94(Item_GObj* arg0)
{
HSD_GObj* gobj;
Item* item;

item = arg0->user_data;
if (item != NULL) {
it_802C7E64(arg0);
Item_8026A8EC(arg0);
}
}

void it_802C7EE0(Item_GObj* arg0)
{
it_8026B724(arg0);
}

void it_802C7F00(Item_GObj* arg0)
{
it_8026B73C(arg0);
}

void it_802C7F20(Item_GObj* arg0)
{
Item* item;

item = GET_ITEM((HSD_GObj*) arg0);
item->xDB0_itcmd_var1 = 0;
item->xDAC_itcmd_var0 = 0;
if (item->owner != NULL) {
item->ground_or_air = ftLib_800865CC(item->owner);
if ((enum GroundOrAir) item->ground_or_air == GA_Ground) {
Item_80268E5C((HSD_GObj*) arg0, 0, ITEM_ANIM_UPDATE);
} else {
Item_80268E5C((HSD_GObj*) arg0, 1, ITEM_ANIM_UPDATE);
}
Item_802694CC((HSD_GObj*) arg0);
}
}

bool it_802C7FAC(Item_GObj* item_gobj)
{
Item* it = GET_ITEM(item_gobj);
u32 unused[2];
if (it->owner != NULL ? ftGw_SpecialLw_ItemCheckPanicRemove(it->owner)
: true)
{
Item* it = GET_ITEM(item_gobj);
if (it->owner != NULL) {
ftGw_SpecialLw_ItemPanicSetFlag(it->owner);
}
return true;
}
return false;
}

void it_802C8018(Item_GObj* arg0, Item_GObj* arg1)
{
it_8026B894(arg0, (HSD_GObj*) arg1);
}
6 changes: 6 additions & 0 deletions src/melee/it/items/itgamewatchpanic.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
#ifndef GALE01_2C7D60
#define GALE01_2C7D60

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

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

/* 2C7D60 */ HSD_GObj* it_802C7D60(Item_GObj*, Vec3*, u8, f32);
/* 2C7E64 */ void it_802C7E64(Item_GObj*);
/* 2C7E94 */ void it_802C7E94(Item_GObj*);
/* 2C7EE0 */ void it_802C7EE0(Item_GObj*);
/* 2C7F00 */ void it_802C7F00(Item_GObj*);
/* 2C7F20 */ void it_802C7F20(Item_GObj*);
/* 2C8018 */ void it_802C8018(Item_GObj*, Item_GObj*);
/* 3F79A0 */ extern ItemStateTable it_803F79A0[];
Expand Down

0 comments on commit 3a7692b

Please sign in to comment.