SSBM Decomp
Loading...
Searching...
No Matches
it_26B1.c File Reference
#include "it_26B1.h"
#include <sysdolphin/baselib/forward.h>
#include <math.h>
#include "forward.h"
#include "inlines.h"
#include "it_2725.h"
#include "it_3F14.h"
#include "itanimlist.h"
#include "itCommonItems.h"
#include "item.h"
#include "ithitbox.h"
#include "itspawn.h"
#include "kinds/itbat.h"
#include "kinds/itbombhei.h"
#include "kinds/itbox.h"
#include "kinds/itfflower.h"
#include "kinds/itflipper.h"
#include "kinds/itheart.h"
#include "kinds/itkusudama.h"
#include "kinds/itlinkbomb.h"
#include "kinds/itmarumine.h"
#include "kinds/itmsbomb.h"
#include "kinds/itrabbitc.h"
#include "kinds/itsscope.h"
#include "kinds/itsword.h"
#include "kinds/ittomato.h"
#include "types.h"
#include <melee/ft/ftlib.h>
#include <melee/ft/types.h>
#include <melee/gm/gm_unsplit.h>
#include <melee/lb/lb_00B0.h>
#include <sysdolphin/baselib/gobj.h>
#include <sysdolphin/baselib/jobj.h>

Macros

#define my_sqrtf(x)

Functions

f32 it_8026B1D4 (HSD_GObj *gobj, HitCapsule *itemHitboxUnk)
 Apply Item Damage.
void it_8026B294 (HSD_GObj *gobj, Vec3 *pos)
 Copy Item position vector.
bool itIsHeavy (HSD_GObj *gobj)
 Check if item is heavy.
bool it_8026B2D8 (HSD_GObj *gobj)
 Check if item is heavy again?
ItemKind itGetKind (HSD_GObj *gobj)
 Get Item ID.
enum_t it_8026B30C (Item_GObj *gobj)
 Return flag from Item Attributes.
Item_HoldKinds itGetHoldKind (HSD_GObj *gobj)
 Return item hold kind.
f32 itGetDamageMultiplier (HSD_GObj *gobj)
 Return item damage multiplier.
void it_8026B344 (HSD_GObj *gobj, Vec3 *pos)
 Unknown item position math, related to velocity?
f32 itGetGrabRangeX (HSD_GObj *gobj)
 Return item's X-Axis grab range?
f32 itGetGrabRangeY (HSD_GObj *gobj)
 Return item's Y-Axis grab range?
void it_8026B390 (HSD_GObj *gobj)
 Toggle item flag 0x15 in 0xDC8 word ON.
void it_8026B3A8 (HSD_GObj *gobj)
 Toggle item flag 0x15 in 0xDC8 word OFF.
int it_8026B3C0 (ItemKind kind)
 Count identical item GObj entities?
void it_8026B3F8 (Article *article, s32 kind)
 Store Item article pointer to table.
void it_8026B40C (Article *article, s32 kind)
 Store Stage Item article pointer to table.
float it_8026B424 (int damage)
 Item Damage Math.
s32 it_8026B47C (HSD_GObj *gobj)
 Get heal value of healing items.
bool it_8026B4F0 (HSD_GObj *gobj)
 Check if item is a healing item.
float it_8026B54C (HSD_GObj *gobj)
 Get unknown float from 0x0 of item's special attributes.
float it_8026B560 (HSD_GObj *gobj)
 Identical to 0x8026B54C but likely using a different itAttributes struct.
float it_8026B574 (HSD_GObj *gobj)
 Get unknown float from 0x4 of item's special attributes.
s32 it_8026B588 (void)
 Get unknown integer from itCommonData.
bool it_8026B594 (HSD_GObj *gobj)
 Check if item can fire projectiles and if ammo is remaining.
HSD_GObjit_8026B5E4 (Vec3 *vector, Vec3 *vector2, HSD_GObj *gobj)
 Unknown item camera check?
Fighter_GObj * it_8026B634 (Vec3 *arg0, Vec3 *arg1, Item_GObj *arg2, f32 farg0)
 Unknown item camera check 2?
float it_8026B684 (Vec3 *pos)
 Get facing direction of fighter (?) with NULL.
float it_8026B6A8 (Vec3 *pos, HSD_GObj *arg1)
 Get facing direction of fighter (?) with variable argument.
bool it_8026B6C8 (HSD_GObj *gobj)
 Check if item is a stage item?
void it_8026B718 (HSD_GObj *gobj, f32 hitlagFrames)
 Set item's hitlag frames.
void it_8026B724 (HSD_GObj *gobj)
 Toggle bit 3 of 0xDC8 word ON.
void it_8026B73C (HSD_GObj *gobj)
 Toggle bits in 0xDC8 word.
bool it_8026B774 (HSD_GObj *gobj, u8 arg1)
 Bitwise operations in 0xDC8 word.
s32 itGetMotionId (HSD_GObj *gobj)
 Get Item State ID.
u8 itGetTeamId (HSD_GObj *gobj)
 Get Item Team ID.
s32 it_8026B7BC (HSD_GObj *gobj)
 Get flag 0x14 of 0xDC8 word.
s32 it_8026B7CC (HSD_GObj *gobj)
 Get 0x1C of Item - something to do with stale moves?
s32 it_8026B7D8 (void)
 Get unknown var from global data.
s32 it_8026B7E0 (void)
 Get unknown var from global data.
s32 it_8026B7E8 (HSD_GObj *gobj)
 Get bit 1 of 0xDC8 word.
static void RunCallbackUnk (HSD_GObjInteraction proc, HSD_GObj *gobj0, HSD_GObj *gobj1)
void it_8026B7F8 (HSD_GObj *fighter_gobj)
 Remove item from player on death?
bool it_8026B894 (HSD_GObj *gobj, HSD_GObj *ref_gobj)
 Remove all GObj interaction references from item.
s32 it_8026B924 (HSD_GObj *gobj)
 Return result of unk item check.
f32 it_8026B960 (HSD_GObj *gobj)
 Return float result of item kind and state checks.
void it_8026B9A8 (HSD_GObj *gobj, HSD_GObj *arg1, Fighter_Part arg2)
 Transfer item on character transformation (Zelda <-> Sheik).
void it_8026BAE8 (HSD_GObj *gobj, f32 scl_mul)
 Multiply item's scale.
void it_8026BB20 (HSD_GObj *gobj)
 Clear JObj flags on item model.
void it_8026BB44 (HSD_GObj *gobj)
 Set JObj flags on item model.
void it_8026BB68 (HSD_GObj *fighter_gobj, Vec3 *pos)
 Adjust item's position to fp bone.
void it_8026BB88 (HSD_GObj *gobj, Vec3 *pos)
 Adjust item's position based on ECB?
void it_8026BBCC (HSD_GObj *gobj, Vec3 *pos)
 Adjust item's ECB position?
void it_8026BC14 (HSD_GObj *gobj)
 Check if item owner is a fighter + decrement hitlag.
bool it_8026BC68 (HSD_GObj *gobj)
 Return bit 0 of 0xDD0.
HSD_GObjitGetOwner (HSD_GObj *gobj)
 Get item owner.
s32 itGetAttackId (HSD_GObj *gobj)
 Get item attack kind.
void it_8026BC90 (HSD_GObj *gobj, Vec3 *pos)
 Unknown item ECB / position update.
void it_8026BCF4 (HSD_GObj *gobj)
 Unsets #Item::xDCD_flag::bits::b2 of gobj.
void it_8026BD0C (HSD_GObj *gobj)
 Sets #Item::xDCD_flag::bits::b2 of gobj.
void it_8026BD24 (HSD_GObj *gobj)
 Sets #Item::xDD0_flag::bits::b3 of gobj.
void it_8026BD3C (HSD_GObj *gobj)
 Sets #Item::xDCC_flag::bits::b3 of gobj.
void it_8026BD54 (HSD_GObj *gobj)
 Unsets #Item::xDCC_flag::bits::b3 of gobj.
void it_8026BD6C (HSD_GObj *gobj)
 Sets #Item::xDCD_flag::bits::b3 of gobj.
void it_8026BD84 (HSD_GObj *gobj)
 Sets #Item::xDCD_flag::bits::b4 of gobj.
void it_8026BD9C (HSD_GObj *gobj)
 Sets #Item::xDC8_word::flags::x1A of gobj.
void it_8026BDB4 (HSD_GObj *gobj)
 0x8026BDB4 // Identical to previous function except for the toggle bit
void it_8026BDCC (HSD_GObj *gobj)
 Toggles several item flags.
void it_8026BE28 (HSD_GObj *gobj)
 Toggle several item flags. The inverse of it_8026BDCC.
HSD_GObjit_8026BE84 (BobOmbRain *bobOmbRain)
 Bob-Omb Rain Switch.
CollDatait_8026C100 (HSD_GObj *gobj)
 Get item's CollData pointer.
void it_8026C16C (HSD_GObj *gobj, bool is_headless)
 Check if Hammer item's head should break off.
bool it_8026C1B4 (HSD_GObj *gobj)
 Check if item has a hitbox.
u32 it_8026C1D4 (void)
 Get unknown var from r13 pointer.
bool it_8026C1E8 (HSD_GObj *gobj)
 Check if item has grabbed a GObj?
void it_8026C220 (HSD_GObj *gobj, HSD_GObj *fighter_gobj)
 Get item owner's port number.
HSD_GObjit_8026C258 (Vec3 *pos, f32 facing_dir)
 Find the closest item to the given position?
void it_8026C334 (HSD_GObj *gobj, Vec3 *pos)
 Unknown item position / ECB update.
void it_8026C368 (HSD_GObj *gobj)
 Run bomb item explosion callbacks.
void it_8026C3FC (void)
 Toggle bit 3 of 0xDC8 ON for all active item GObjs?
void it_8026C42C (void)
 Toggle bits in 0xDC8 for all active item GObjs?

Macro Definition Documentation

◆ my_sqrtf

#define my_sqrtf ( x)
Value:
float sqrtf(float)
Definition math_ppc.h:11

Function Documentation

◆ it_8026B1D4()

f32 it_8026B1D4 ( HSD_GObj * gobj,
HitCapsule * itemHitboxUnk )

Apply Item Damage.

◆ it_8026B294()

void it_8026B294 ( HSD_GObj * gobj,
Vec3 * pos )

Copy Item position vector.

◆ itIsHeavy()

bool itIsHeavy ( HSD_GObj * gobj)

Check if item is heavy.

◆ it_8026B2D8()

bool it_8026B2D8 ( HSD_GObj * gobj)

Check if item is heavy again?

◆ itGetKind()

ItemKind itGetKind ( HSD_GObj * gobj)

Get Item ID.

◆ it_8026B30C()

enum_t it_8026B30C ( Item_GObj * gobj)

Return flag from Item Attributes.

◆ itGetHoldKind()

Item_HoldKinds itGetHoldKind ( HSD_GObj * gobj)

Return item hold kind.

◆ itGetDamageMultiplier()

f32 itGetDamageMultiplier ( HSD_GObj * gobj)

Return item damage multiplier.

◆ it_8026B344()

void it_8026B344 ( HSD_GObj * gobj,
Vec3 * pos )

Unknown item position math, related to velocity?

◆ itGetGrabRangeX()

f32 itGetGrabRangeX ( HSD_GObj * gobj)

Return item's X-Axis grab range?

◆ itGetGrabRangeY()

f32 itGetGrabRangeY ( HSD_GObj * gobj)

Return item's Y-Axis grab range?

◆ it_8026B390()

void it_8026B390 ( HSD_GObj * gobj)

Toggle item flag 0x15 in 0xDC8 word ON.

◆ it_8026B3A8()

void it_8026B3A8 ( HSD_GObj * gobj)

Toggle item flag 0x15 in 0xDC8 word OFF.

◆ it_8026B3C0()

int it_8026B3C0 ( ItemKind kind)

Count identical item GObj entities?

Count item entities of identical kind?

Count identical item GObj entities?

◆ it_8026B3F8()

void it_8026B3F8 ( Article * article,
s32 kind )

Store Item article pointer to table.

◆ it_8026B40C()

void it_8026B40C ( Article * article,
s32 kind )

Store Stage Item article pointer to table.

◆ it_8026B424()

float it_8026B424 ( int damage)

Item Damage Math.

◆ it_8026B47C()

s32 it_8026B47C ( HSD_GObj * gobj)

Get heal value of healing items.

◆ it_8026B4F0()

bool it_8026B4F0 ( HSD_GObj * gobj)

Check if item is a healing item.

◆ it_8026B54C()

float it_8026B54C ( HSD_GObj * gobj)

Get unknown float from 0x0 of item's special attributes.

◆ it_8026B560()

float it_8026B560 ( Item_GObj * gobj)

Identical to 0x8026B54C but likely using a different itAttributes struct.

Identical to it_8026B54C but likely using a different itAttributes struct.

Identical to 0x8026B54C but likely using a different itAttributes struct.

◆ it_8026B574()

float it_8026B574 ( HSD_GObj * gobj)

Get unknown float from 0x4 of item's special attributes.

◆ it_8026B588()

s32 it_8026B588 ( void )

Get unknown integer from itCommonData.

◆ it_8026B594()

bool it_8026B594 ( Item_GObj * gobj)

Check if item can fire projectiles and if ammo is remaining.

Check if item can fire projectiles.

Check if item can fire projectiles and if ammo is remaining.

◆ it_8026B5E4()

HSD_GObj * it_8026B5E4 ( Vec3 * vector,
Vec3 * vector2,
HSD_GObj * gobj )

Unknown item camera check?

◆ it_8026B634()

Fighter_GObj * it_8026B634 ( Vec3 * arg0,
Vec3 * arg1,
Item_GObj * arg2,
f32 farg0 )

Unknown item camera check 2?

◆ it_8026B684()

float it_8026B684 ( Vec3 * pos)

Get facing direction of fighter (?) with NULL.

Get facing direction of fp (?) with argument 0.

Get facing direction of fighter (?) with NULL.

◆ it_8026B6A8()

float it_8026B6A8 ( Vec3 * pos,
HSD_GObj * arg )

Get facing direction of fighter (?) with variable argument.

Get facing direction of fp (?) with variable argument.

Get facing direction of fighter (?) with variable argument.

◆ it_8026B6C8()

bool it_8026B6C8 ( HSD_GObj * gobj)

Check if item is a stage item?

◆ it_8026B718()

void it_8026B718 ( HSD_GObj * gobj,
f32 hitlagFrames )

Set item's hitlag frames.

◆ it_8026B724()

void it_8026B724 ( HSD_GObj * gobj)

Toggle bit 3 of 0xDC8 word ON.

◆ it_8026B73C()

void it_8026B73C ( HSD_GObj * gobj)

Toggle bits in 0xDC8 word.

◆ it_8026B774()

bool it_8026B774 ( HSD_GObj * gobj,
u8 arg1 )

Bitwise operations in 0xDC8 word.

◆ itGetMotionId()

s32 itGetMotionId ( HSD_GObj * gobj)

Get Item State ID.

◆ itGetTeamId()

u8 itGetTeamId ( HSD_GObj * gobj)

Get Item Team ID.

◆ it_8026B7BC()

s32 it_8026B7BC ( HSD_GObj * gobj)

Get flag 0x14 of 0xDC8 word.

◆ it_8026B7CC()

s32 it_8026B7CC ( HSD_GObj * gobj)

Get 0x1C of Item - something to do with stale moves?

◆ it_8026B7D8()

s32 it_8026B7D8 ( void )

Get unknown var from global data.

◆ it_8026B7E0()

s32 it_8026B7E0 ( void )

Get unknown var from global data.

◆ it_8026B7E8()

s32 it_8026B7E8 ( HSD_GObj * gobj)

Get bit 1 of 0xDC8 word.

◆ RunCallbackUnk()

void RunCallbackUnk ( HSD_GObjInteraction proc,
HSD_GObj * gobj0,
HSD_GObj * gobj1 )
inlinestatic

◆ it_8026B7F8()

void it_8026B7F8 ( HSD_GObj * fighter_gobj)

Remove item from player on death?

◆ it_8026B894()

bool it_8026B894 ( HSD_GObj * gobj,
HSD_GObj * ref_gobj )

Remove all GObj interaction references from item.

Returns
Whether or not ref_gobj was the Item::owner.

◆ it_8026B924()

s32 it_8026B924 ( HSD_GObj * gobj)

Return result of unk item check.

◆ it_8026B960()

f32 it_8026B960 ( HSD_GObj * gobj)

Return float result of item kind and state checks.

◆ it_8026B9A8()

void it_8026B9A8 ( Item_GObj * gobj,
HSD_GObj * arg1,
Fighter_Part arg2 )

Transfer item on character transformation (Zelda <-> Sheik).

Transfer item on character swap - used for Zelda <-> Sheik.

Transfer item on character transformation (Zelda <-> Sheik).

Todo
Not enough stack for GET_JOBJ.

◆ it_8026BAE8()

void it_8026BAE8 ( HSD_GObj * gobj,
f32 scl_mul )

Multiply item's scale.

◆ it_8026BB20()

void it_8026BB20 ( HSD_GObj * gobj)

Clear JObj flags on item model.

◆ it_8026BB44()

void it_8026BB44 ( HSD_GObj * gobj)

Set JObj flags on item model.

◆ it_8026BB68()

void it_8026BB68 ( HSD_GObj * fighter_gobj,
Vec3 * pos )

Adjust item's position to fp bone.

◆ it_8026BB88()

void it_8026BB88 ( HSD_GObj * gobj,
Vec3 * pos )

Adjust item's position based on ECB?

Todo
Why is this always zero? Stripped something?

◆ it_8026BBCC()

void it_8026BBCC ( HSD_GObj * gobj,
Vec3 * pos )

Adjust item's ECB position?

Todo
Why is this always zero? Stripped something?

◆ it_8026BC14()

void it_8026BC14 ( Item_GObj * gobj)

Check if item owner is a fighter + decrement hitlag.

Check if item owner is a fp + decrement hitlag.

Check if item owner is a fighter + decrement hitlag.

◆ it_8026BC68()

bool it_8026BC68 ( HSD_GObj * gobj)

Return bit 0 of 0xDD0.

Returns
#Item::xDD0_flag::bits::b0 of gobj.

◆ itGetOwner()

HSD_GObj * itGetOwner ( HSD_GObj * gobj)

Get item owner.

Returns
Item::owner of gobj.

◆ itGetAttackId()

s32 itGetAttackId ( HSD_GObj * gobj)

Get item attack kind.

Returns
Item::xD88_attackID of gobj.

◆ it_8026BC90()

void it_8026BC90 ( HSD_GObj * gobj,
Vec3 * pos )

Unknown item ECB / position update.

◆ it_8026BCF4()

void it_8026BCF4 ( Item_GObj * gobj)

Unsets #Item::xDCD_flag::bits::b2 of gobj.

Toggle bit 2 of 0xDCD OFF.

Unsets #Item::xDCD_flag::bits::b2 of gobj.

◆ it_8026BD0C()

void it_8026BD0C ( Item_GObj * gobj)

Sets #Item::xDCD_flag::bits::b2 of gobj.

Toggle bit 2 of 0xDCD ON.

Sets #Item::xDCD_flag::bits::b2 of gobj.

◆ it_8026BD24()

void it_8026BD24 ( Item_GObj * gobj)

Sets #Item::xDD0_flag::bits::b3 of gobj.

Toggle bit 3 of 0xDD0 ON.

Sets #Item::xDD0_flag::bits::b3 of gobj.

◆ it_8026BD3C()

void it_8026BD3C ( Item_GObj * gobj)

Sets #Item::xDCC_flag::bits::b3 of gobj.

Toggle bit 3 of 0xDCC ON.

Sets #Item::xDCC_flag::bits::b3 of gobj.

◆ it_8026BD54()

void it_8026BD54 ( Item_GObj * gobj)

Unsets #Item::xDCC_flag::bits::b3 of gobj.

Toggle bit 3 of 0xDCC OFF.

Unsets #Item::xDCC_flag::bits::b3 of gobj.

◆ it_8026BD6C()

void it_8026BD6C ( Item_GObj * gobj)

Sets #Item::xDCD_flag::bits::b3 of gobj.

Toggle bit 3 of 0xDCD ON.

Sets #Item::xDCD_flag::bits::b3 of gobj.

◆ it_8026BD84()

void it_8026BD84 ( Item_GObj * gobj)

Sets #Item::xDCD_flag::bits::b4 of gobj.

Toggle bit 4 of 0xDCD ON.

Sets #Item::xDCD_flag::bits::b4 of gobj.

◆ it_8026BD9C()

void it_8026BD9C ( Item_GObj * gobj)

Sets #Item::xDC8_word::flags::x1A of gobj.

Toggle 0x1A of 0xDC8 word ON.

Sets #Item::xDC8_word::flags::x1A of gobj.

◆ it_8026BDB4()

void it_8026BDB4 ( Item_GObj * gobj)

0x8026BDB4 // Identical to previous function except for the toggle bit

Toggle 0x1A of 0xDC8 word OFF.

0x8026BDB4 // Identical to previous function except for the toggle bit

◆ it_8026BDCC()

void it_8026BDCC ( Item_GObj * gobj)

Toggles several item flags.

Toggle several item flags.

Toggles several item flags.

Todo
Each of these is an inlined function. Some are already defined.

◆ it_8026BE28()

void it_8026BE28 ( Item_GObj * gobj)

Toggle several item flags. The inverse of it_8026BDCC.

Toggle several item flags, inverted.

Toggle several item flags. The inverse of it_8026BDCC.

Todo
Each of these is an inlined function. Some are already defined.

◆ it_8026BE84()

HSD_GObj * it_8026BE84 ( BobOmbRain * bobOmbRain)

Bob-Omb Rain Switch.

◆ it_8026C100()

CollData * it_8026C100 ( HSD_GObj * gobj)

Get item's CollData pointer.

◆ it_8026C16C()

void it_8026C16C ( HSD_GObj * gobj,
bool is_headless )

Check if Hammer item's head should break off.

◆ it_8026C1B4()

bool it_8026C1B4 ( HSD_GObj * gobj)

Check if item has a hitbox.

◆ it_8026C1D4()

u32 it_8026C1D4 ( void )

Get unknown var from r13 pointer.

◆ it_8026C1E8()

bool it_8026C1E8 ( HSD_GObj * gobj)

Check if item has grabbed a GObj?

◆ it_8026C220()

void it_8026C220 ( HSD_GObj * gobj,
HSD_GObj * fighter_gobj )

Get item owner's port number.

◆ it_8026C258()

HSD_GObj * it_8026C258 ( Vec3 * pos,
f32 facing_dir )

Find the closest item to the given position?

Remarks
Used by Samus's Homing Missile to lock onto certain items.
Returns
The nearest HSD_GObj to pos that fits the criteria.
Todo
Why is this cast to s16 necessary?

◆ it_8026C334()

void it_8026C334 ( HSD_GObj * gobj,
Vec3 * pos )

Unknown item position / ECB update.

◆ it_8026C368()

void it_8026C368 ( HSD_GObj * gobj)

Run bomb item explosion callbacks.

◆ it_8026C3FC()

void it_8026C3FC ( void )

Toggle bit 3 of 0xDC8 ON for all active item GObjs?

◆ it_8026C42C()

void it_8026C42C ( void )

Toggle bits in 0xDC8 for all active item GObjs?