SSBM Decomp
Loading...
Searching...
No Matches
itbox.h File Reference
#include "it/forward.h"
#include "it/items/types.h"

Go to the source code of this file.

Functions

Item_GObjit_80286088 (Item_GObj *)
 Spawn a box accessory item that follows the parent item.
 
void itBox_Logic1_Spawned (Item_GObj *)
 
void itBox_Logic1_Destroyed (Item_GObj *)
 
void it_80286248 (Item_GObj *, s32, s32, s32, s32)
 Spawn item(s) from box based on weighted random roll.
 
bool it_80286340 (Item_GObj *, s32, s32, s32, s32)
 
bool it_802863BC (Item_GObj *)
 Check if box bounced off a surface nearly upright.
 
void fn_80286480 (Item_GObj *)
 
bool itBox_UnkMotion0_Anim (Item_GObj *gobj)
 Check animation frame and play sound if at start.
 
void itBox_UnkMotion0_Phys (Item_GObj *gobj)
 
bool itBox_UnkMotion0_Coll (Item_GObj *gobj)
 
void it_8028655C (Item_GObj *gobj)
 
bool itBox_UnkMotion4_Anim (Item_GObj *gobj)
 
void itBox_UnkMotion1_Phys (Item_GObj *gobj)
 Physics for thrown box motion.
 
bool itBox_UnkMotion1_Coll (Item_GObj *gobj)
 
void itBox_Logic1_PickedUp (Item_GObj *)
 
bool itBox_UnkMotion2_Anim (Item_GObj *gobj)
 
void itBox_UnkMotion2_Phys (Item_GObj *gobj)
 
void itBox_Logic1_Thrown (Item_GObj *)
 
void itBox_UnkMotion4_Phys (Item_GObj *gobj)
 
bool itBox_UnkMotion3_Coll (Item_GObj *gobj)
 Collision handler for dropped box. Opens on ground/wall contact.
 
void itBox_Logic1_Dropped (Item_GObj *)
 
bool itBox_UnkMotion4_Coll (Item_GObj *gobj)
 Collision handler for thrown box in air.
 
void it_80286AA4 (Item_GObj *)
 Box opens empty (no items spawned).
 
bool itBox_UnkMotion6_Anim (Item_GObj *gobj)
 
void itBox_UnkMotion6_Phys (Item_GObj *gobj)
 
bool itBox_UnkMotion6_Coll (Item_GObj *gobj)
 
void it_80286BA0 (Item_GObj *)
 Box opens and spawns items.
 
bool itBox_UnkMotion7_Anim (Item_GObj *gobj)
 
void itBox_UnkMotion7_Phys (Item_GObj *gobj)
 
bool itBox_UnkMotion7_Coll (Item_GObj *gobj)
 
bool itBox_Logic1_DmgDealt (Item_GObj *)
 Box dealt damage to something - try to open.
 
bool itBox_Logic1_Clanked (Item_GObj *)
 Box clanked with another hitbox - try to open.
 
bool itBox_Logic1_HitShield (Item_GObj *)
 Box hit a shield - try to open.
 
bool itBox_Logic1_Reflected (Item_GObj *)
 Box was reflected - try to open.
 
bool itBox_Logic1_DmgReceived (Item_GObj *)
 Handle damage received by box.
 
void itBox_Logic1_EnteredAir (Item_GObj *)
 
bool itBox_UnkMotion5_Anim (Item_GObj *gobj)
 
void itBox_UnkMotion5_Phys (Item_GObj *gobj)
 
bool itBox_UnkMotion5_Coll (Item_GObj *gobj)
 
void itBox_Logic1_EvtUnk (Item_GObj *, Item_GObj *)
 
void it_802870A4 (Item_GObj *)
 Transition box to state 8 and set accessory callback.
 
bool itBox_UnkMotion8_Anim (Item_GObj *gobj)
 
void itBox_UnkMotion8_Phys (Item_GObj *gobj)
 Physics for floating box (state 8).
 
bool itBox_UnkMotion8_Coll (Item_GObj *gobj)
 
void it_8028733C (Item_GObj *)
 Accessory callback - makes item follow its spawned parent item.
 

Variables

ItemStateTable it_803F5850 []
 

Function Documentation

◆ it_80286088()

Item_GObj * it_80286088 ( Item_GObj parent_gobj)

Spawn a box accessory item that follows the parent item.

Returns the spawned gobj, or NULL if parent is invalid.

◆ itBox_Logic1_Spawned()

void itBox_Logic1_Spawned ( Item_GObj gobj)

◆ itBox_Logic1_Destroyed()

void itBox_Logic1_Destroyed ( Item_GObj gobj)

◆ it_80286248()

void it_80286248 ( Item_GObj gobj,
s32  arg1,
s32  arg2,
s32  arg3,
s32  arg4 
)

Spawn item(s) from box based on weighted random roll.

arg1/arg2/arg3 are spawn weights, arg4 is additional weight for special roll.

◆ it_80286340()

bool it_80286340 ( Item_GObj gobj,
s32  arg1,
s32  arg2,
s32  arg3,
s32  arg4 
)

◆ it_802863BC()

bool it_802863BC ( Item_GObj gobj)

Check if box bounced off a surface nearly upright.

If the bounce angle relative to vertical is below threshold, clear velocity vectors and set ground flag.

◆ fn_80286480()

void fn_80286480 ( Item_GObj gobj)

◆ itBox_UnkMotion0_Anim()

bool itBox_UnkMotion0_Anim ( Item_GObj gobj)

Check animation frame and play sound if at start.

◆ itBox_UnkMotion0_Phys()

void itBox_UnkMotion0_Phys ( Item_GObj gobj)

◆ itBox_UnkMotion0_Coll()

bool itBox_UnkMotion0_Coll ( Item_GObj gobj)

◆ it_8028655C()

void it_8028655C ( Item_GObj gobj)

◆ itBox_UnkMotion4_Anim()

bool itBox_UnkMotion4_Anim ( Item_GObj gobj)

◆ itBox_UnkMotion1_Phys()

void itBox_UnkMotion1_Phys ( Item_GObj gobj)

Physics for thrown box motion.

Applies gravity and updates rotation based on stored rotation velocities (wobble effect when thrown).

◆ itBox_UnkMotion1_Coll()

bool itBox_UnkMotion1_Coll ( Item_GObj gobj)

◆ itBox_Logic1_PickedUp()

void itBox_Logic1_PickedUp ( Item_GObj gobj)

◆ itBox_UnkMotion2_Anim()

bool itBox_UnkMotion2_Anim ( Item_GObj gobj)

◆ itBox_UnkMotion2_Phys()

void itBox_UnkMotion2_Phys ( Item_GObj gobj)

◆ itBox_Logic1_Thrown()

void itBox_Logic1_Thrown ( Item_GObj gobj)

◆ itBox_UnkMotion4_Phys()

void itBox_UnkMotion4_Phys ( Item_GObj gobj)

◆ itBox_UnkMotion3_Coll()

bool itBox_UnkMotion3_Coll ( Item_GObj gobj)

Collision handler for dropped box. Opens on ground/wall contact.

◆ itBox_Logic1_Dropped()

void itBox_Logic1_Dropped ( Item_GObj gobj)

◆ itBox_UnkMotion4_Coll()

bool itBox_UnkMotion4_Coll ( Item_GObj gobj)

Collision handler for thrown box in air.

Checks if landed hard enough to break, otherwise bounces.

◆ it_80286AA4()

void it_80286AA4 ( Item_GObj gobj)

Box opens empty (no items spawned).

Clears velocity, sets opened flag, spawns smoke effect (0x78), and transitions to state 6.

◆ itBox_UnkMotion6_Anim()

bool itBox_UnkMotion6_Anim ( Item_GObj gobj)

◆ itBox_UnkMotion6_Phys()

void itBox_UnkMotion6_Phys ( Item_GObj gobj)

◆ itBox_UnkMotion6_Coll()

bool itBox_UnkMotion6_Coll ( Item_GObj gobj)

◆ it_80286BA0()

void it_80286BA0 ( Item_GObj gobj)

Box opens and spawns items.

Plays sound, triggers camera, spawns items, sets opened flag, and transitions to state 7.

◆ itBox_UnkMotion7_Anim()

bool itBox_UnkMotion7_Anim ( Item_GObj gobj)

◆ itBox_UnkMotion7_Phys()

void itBox_UnkMotion7_Phys ( Item_GObj gobj)

◆ itBox_UnkMotion7_Coll()

bool itBox_UnkMotion7_Coll ( Item_GObj gobj)

◆ itBox_Logic1_DmgDealt()

bool itBox_Logic1_DmgDealt ( Item_GObj gobj)

Box dealt damage to something - try to open.

◆ itBox_Logic1_Clanked()

bool itBox_Logic1_Clanked ( Item_GObj gobj)

Box clanked with another hitbox - try to open.

◆ itBox_Logic1_HitShield()

bool itBox_Logic1_HitShield ( Item_GObj gobj)

Box hit a shield - try to open.

◆ itBox_Logic1_Reflected()

bool itBox_Logic1_Reflected ( Item_GObj gobj)

Box was reflected - try to open.

◆ itBox_Logic1_DmgReceived()

bool itBox_Logic1_DmgReceived ( Item_GObj gobj)

Handle damage received by box.

When accumulated damage reaches threshold, box breaks open. Weighted random roll determines if items spawn or box is empty. Effect 0x427 is the box breaking visual effect.

◆ itBox_Logic1_EnteredAir()

void itBox_Logic1_EnteredAir ( Item_GObj gobj)

◆ itBox_UnkMotion5_Anim()

bool itBox_UnkMotion5_Anim ( Item_GObj gobj)

◆ itBox_UnkMotion5_Phys()

void itBox_UnkMotion5_Phys ( Item_GObj gobj)

◆ itBox_UnkMotion5_Coll()

bool itBox_UnkMotion5_Coll ( Item_GObj gobj)

◆ itBox_Logic1_EvtUnk()

void itBox_Logic1_EvtUnk ( Item_GObj gobj,
Item_GObj ref_gobj 
)

◆ it_802870A4()

void it_802870A4 ( Item_GObj gobj)

Transition box to state 8 and set accessory callback.

◆ itBox_UnkMotion8_Anim()

bool itBox_UnkMotion8_Anim ( Item_GObj gobj)

◆ itBox_UnkMotion8_Phys()

void itBox_UnkMotion8_Phys ( Item_GObj gobj)

Physics for floating box (state 8).

Randomly adjusts rotation velocities each frame and applies rotation around X and Y axes.

◆ itBox_UnkMotion8_Coll()

bool itBox_UnkMotion8_Coll ( Item_GObj gobj)

◆ it_8028733C()

void it_8028733C ( Item_GObj gobj)

Accessory callback - makes item follow its spawned parent item.

Updates position and velocity to track the parent's JObj position.

Variable Documentation

◆ it_803F5850

ItemStateTable it_803F5850[]
extern