SSBM Decomp
Loading...
Searching...
No Matches
inlines.h
Go to the documentation of this file.
1#ifndef MELEE_IT_INLINES_H
2#define MELEE_IT_INLINES_H
3
4#include "it/types.h"
5
6#include <baselib/gobj.h>
7
8#define GET_ITEM(gobj) ((Item*) HSD_GObjGetUserData(gobj))
9
10static inline Item* GetItemData(HSD_GObj* gobj)
11{
12 Item* item_data = gobj->user_data;
13 return item_data;
14}
15
16static inline void itResetVelocity(Item* ip)
17{
18 ip->x40_vel.x = ip->x40_vel.y = ip->x40_vel.z = 0.0F;
19}
20
23{
24 HSD_JObj* jobj = GET_JOBJ(gobj);
25 HSD_JObj* child;
26
27 if (!jobj) {
28 child = NULL;
29 } else {
30 child = jobj->child;
31 }
32 if (!child) {
33 child = NULL;
34 } else {
35 child = child->child;
36 }
37 return child;
38}
39
40#endif
#define GET_JOBJ(gobj)
Definition gobj.h:168
static void itResetVelocity(Item *ip)
Definition inlines.h:16
static Item * GetItemData(HSD_GObj *gobj)
Definition inlines.h:10
static HSD_JObj * itGetJObjGrandchild(Item_GObj *gobj)
Definition inlines.h:22
#define NULL
Definition stddef.h:19
was using this to try and fix some matches, unsuccessfully
Definition gobj.h:26
void * user_data
Definition gobj.h:42
Definition jobj.h:107
HSD_JObj * child
Definition jobj.h:111
Definition types.h:200
Vec3 x40_vel
Definition types.h:249