-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Match it_802ADC04 * Match most of itkirbyhammer * Match it_802ADC54 * Remove assignment in PAD_STACK and mark itkirbyhammer as matching * Address issues * Add func proto, remove usage of forward, detete .s file, use .c for make compilation * Add baselib/forward.h for consistency * Adjust include guards on itkirbyhammer * Remove extra comma
- Loading branch information
Showing
8 changed files
with
100 additions
and
163 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,4 +19,8 @@ typedef struct { | |
HSD_JObj* xDDC; | ||
} FoxIllusionVars; | ||
|
||
typedef struct { | ||
u32 x0; | ||
} itKirbyHammerVars; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,82 @@ | ||
#include "itkirbyhammer.h" | ||
|
||
#include "db/db_2253.h" | ||
#include "ef/efasync.h" | ||
#include "ft/chara/ftKirby/ftKb_Init.h" | ||
#include "it/inlines.h" | ||
#include "it/it_266F.h" | ||
#include "it/it_26B1.h" | ||
#include "it/item.h" | ||
|
||
ItemStateTable it_803F6C98[] = { | ||
{ 0, NULL, NULL, NULL }, | ||
}; | ||
|
||
void it_802ADC04(Item_GObj* gobj) | ||
{ | ||
Item* it = GET_ITEM((HSD_GObj*) gobj); | ||
|
||
if (it->owner == NULL) { | ||
return; | ||
} | ||
ftKb_SpecialAirLw_800F539C((ftKb_GObj*) it->owner); | ||
} | ||
|
||
void it_802ADC34(Item_GObj* gobj) | ||
{ | ||
Item_8026A8EC(gobj); | ||
} | ||
|
||
static void setupHammerParticles(HSD_GObj* parent, Item_GObj* item_gobj, | ||
u8 sfx, u32 vars) | ||
{ | ||
HSD_JObj* jobj; | ||
u32 particle_id; | ||
Item* it = GET_ITEM((HSD_GObj*) item_gobj); | ||
|
||
it->xDD4_itemVar.kirbyhammer.x0 = vars; | ||
db_80225DD8((HSD_GObj*) item_gobj, parent); | ||
Item_8026AB54((HSD_GObj*) item_gobj, parent, sfx); | ||
if (((Item*) item_gobj->user_data)->xDD4_itemVar.kirbyhammer.x0 == 1) { | ||
particle_id = 1177; | ||
} else { | ||
particle_id = 1176; | ||
} | ||
jobj = it_80272C90(item_gobj); | ||
efAsync_Spawn((HSD_GObj*) item_gobj, &((Item*) item_gobj->user_data)->xBC0, | ||
0, particle_id, jobj); | ||
} | ||
|
||
Item_GObj* it_802ADC54(HSD_GObj* parent, Vec3* pos, u8 sfx, u32 vars, f32 dir) | ||
{ | ||
Item_GObj* item_gobj; | ||
SpawnItem spawn; | ||
PAD_STACK(12); | ||
|
||
spawn.kind = It_Kind_Kirby_Hammer; | ||
spawn.prev_pos = *pos; | ||
it_8026BB68((Item_GObj*) parent, &spawn.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 = true; | ||
spawn.x40 = 0; | ||
|
||
item_gobj = Item_80268B18(&spawn); | ||
if (item_gobj != NULL) { | ||
setupHammerParticles(parent, item_gobj, sfx, vars); | ||
} | ||
return item_gobj; | ||
} | ||
|
||
void it_802ADD88(Item_GObj* gobj) | ||
{ | ||
Item_80268E5C(gobj, 0, ITEM_ANIM_UPDATE); | ||
} | ||
|
||
void it_802ADDB0(Item_GObj* gobj, HSD_GObj* ref_gobj) | ||
{ | ||
it_8026B894(gobj, ref_gobj); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
#ifndef GALE01_2ADC04 | ||
#define GALE01_2ADC04 | ||
#ifndef _itkirbyhammer_h_ | ||
#define _itkirbyhammer_h_ | ||
|
||
#include <platform.h> | ||
#include <baselib/forward.h> | ||
|
||
#include "it/types.h" | ||
|
||
/* 2ADC04 */ void it_802ADC04(Item_GObj*); | ||
/* 2ADD88 */ void it_802ADD88(Item_GObj*); | ||
/* 2ADDB0 */ void it_802ADDB0(Item_GObj*, Item_GObj*); | ||
/* 3F6C98 */ extern ItemStateTable it_803F6C98[]; | ||
void it_802ADC04(Item_GObj* gobj); | ||
void it_802ADC34(Item_GObj* gobj); | ||
Item_GObj* it_802ADC54(HSD_GObj* parent, Vec3* pos, u8 sfx, u32 vars, f32 dir); | ||
void it_802ADD88(Item_GObj* gobj); | ||
void it_802ADDB0(Item_GObj* gobj, HSD_GObj* ref_gobj); | ||
extern ItemStateTable it_803F6C98[]; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters