SSBM Decomp
Loading...
Searching...
No Matches
grinishie1.c File Reference

Data Structures

struct  grInishie1_YakumonoParam
struct  block_table_struct

Macros

#define DOBJ_LOOP(jobj)
#define DOBJ_CLEAR_LOOP(jobj)
#define BLOCK_COUNT   19
 corresponds with the 3 - 13 - 3 block pattern on the stage
#define HATENA_APPEAR_CHECKLOOP(countdown, last_index, status_val, line, index)

Enumerations

enum  { HATENA_APPEAR_CHECKLOOP = 0x14 }

Functions

static void grInishie1_801FA908 (bool)
static void grInishie1_801FA90C (void)
static void grInishie1_801FA984 (void)
static void grInishie1_801FA988 (void)
static bool grInishie1_801FA9AC (void)
static Ground_GObjsetupStageCallbacks (int gobj_id)
static void grInishie1_801FAAA0 (Ground_GObj *)
static bool grInishie1_801FAACC (Ground_GObj *)
static void grInishie1_801FAAD4 (Ground_GObj *)
static void grInishie1_801FAAD8 (Ground_GObj *)
static void grInishie1_801FAADC (Ground_GObj *)
static bool grInishie1_801FAB60 (Ground_GObj *)
static void grInishie1_801FAB68 (Ground_GObj *)
static void grInishie1_801FABB0 (Ground_GObj *)
static void grInishie1_801FABB4 (Ground_GObj *)
static bool grInishie1_801FABF4 (Ground_GObj *)
static void grInishie1_801FABFC (Ground_GObj *)
static void grInishie1_801FAC00 (Ground_GObj *)
static void grInishie1_801FAC04 (Ground_GObj *)
static bool grInishie1_801FAC50 (Ground_GObj *)
static void grInishie1_801FAC58 (Ground_GObj *)
static void grInishie1_801FAD80 (Ground_GObj *)
static void grInishie1_801FAD84 (HSD_GObj *)
static void grInishie1_801FB0AC (HSD_GObj *, u32)
static void grInishie1_801FB3F0 (HSD_GObj *)
static void grInishie1_801FBA34 (HSD_GObj *gobj, HSD_JObj *jobj)
 gives item from hatena block upwards velocity, maybe handles spawning it as well
static void grInishie1_801FBAA0 (HSD_GObj *, s32)
static void grInishie1_801FBC4C (HSD_GObj *, u32)
static void grInishie1_801FBCEC (HSD_GObj *, u32)
static void fn_801FBEB8 (void *user_data, int joint_id, CollData *coll, int coll_x50, mpLib_GroundEnum ground_kind, float delta_y)
 Joint collision callback for ground surfaces.
static void fn_801FBF6C (Item_GObj *, Ground *, Vec3 *, HSD_GObj *, f32)
static void grInishie1_801FC018 (HSD_GObj *)
static void grInishie1_801FC110 (HSD_GObj *)
static void grInishie1_801FC4A0 (HSD_GObj *)
static void grInishie1_801FC664 (HSD_GObj *)
static void fn_801FC9AC (void *user_data, int joint_id, CollData *coll, int coll_x50, mpLib_GroundEnum ground_kind, float delta_y)
 Joint collision callback for ground surfaces.
static void grInishie1_801FCB10 (HSD_GObj *)
static DynamicsDescgrInishie1_801FCBB0 (enum_t)
static bool grInishie1_801FCBB8 (Vec3 *, int arg, HSD_JObj *jobj)
static void grInishie1_SetRespawnTimer (Ground *gp, u32 index, s32 min, s32 max)
static f32 fabsf_inline (f32 x)
static void grInishie1_ShowBlock (HSD_JObj *jobj)
static void grInishie1_801FB3F0_UpdateY (grInishie1_Block *block)
static bool grInishie1_801FB3F0_IsFar (HSD_JObj *jobj, Vec3 *pos)
static void grInishie1_UpdateDObjFlags (HSD_JObj *jobj, HSD_DObj **walker, bool hidden)
static s32 get_block_id (s32 block_id)
static ItemGET_ITEM2 (Item_GObj *arg0)
bool grInishie1_801FCAAC (int line_id)

Variables

static struct grInishie1_YakumonoParamyakumono_param
const Vec3 grI1_803B8268 = { 0.0f, 5.0f, 0.0f }
 initial velocity for items spawned from hatena blocks
GrJoint grI1_803E48C8 []
StageCallbacks grI1_StageCallbacks []
StageData grI1_StageData
struct block_table_struct grI1_803E49B8 [BLOCK_COUNT]

Macro Definition Documentation

◆ DOBJ_LOOP

#define DOBJ_LOOP ( jobj)
Value:
{ \
HSD_DObj* dobj = HSD_JObjGetDObj(jobj); \
while (dobj != NULL) { \
HSD_DObjSetFlags(dobj, 1U); \
dobj = (dobj != NULL) ? dobj->next : NULL; \
} \
};
HSD_DObj * HSD_JObjGetDObj(HSD_JObj *jobj)
Definition jobj.c:931
#define NULL
Definition stddef.h:14
Definition dobj.h:14
HSD_DObj * next
Definition dobj.h:16

◆ DOBJ_CLEAR_LOOP

#define DOBJ_CLEAR_LOOP ( jobj)
Value:
{ \
HSD_DObj* dobj = HSD_JObjGetDObj(jobj); \
while (dobj != NULL) { \
HSD_DObjClearFlags(dobj, 1U); \
dobj = (dobj != NULL) ? dobj->next : NULL; \
} \
}

◆ BLOCK_COUNT

#define BLOCK_COUNT   19

corresponds with the 3 - 13 - 3 block pattern on the stage

◆ HATENA_APPEAR_CHECKLOOP

#define HATENA_APPEAR_CHECKLOOP ( countdown,
last_index,
status_val,
line,
index )
Value:
if (countdown > 0) { \
countdown--; \
if (countdown == 0) { \
s32 zero; \
int i = 0; \
\
do { \
s32 result = HSD_Randi(0x13); \
/* Keep MWCC's saved index separate from result. */ \
index = result | (zero = 0); \
if (result != last_index && \
vars->u.inishie1.block[result].status == 0) \
{ \
break; \
} \
i++; \
} while (i < HATENA_APPEAR_CHECKLOOP); \
\
HSD_ASSERT(line, i!=HATENA_APPEAR_CHECKLOOP); \
\
last_index = index; \
vars->u.inishie1.block[index].status = status_val; \
grInishie1_801FBAA0(gobj, index); \
vars->u.inishie1.block[index].x20 = 0; \
} \
}
signed long s32
Definition types.h:8
static const Vec3 zero
Definition ftlinkspecialn.c:199
HSD_GObj * gobj
Definition gm_19EF.c:73
#define HATENA_APPEAR_CHECKLOOP(countdown, last_index, status_val, line, index)
Definition grinishie1.c:553
s32 HSD_Randi(s32 max_val)
Definition random.c:18

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
HATENA_APPEAR_CHECKLOOP 

Function Documentation

◆ grInishie1_801FA908()

void grInishie1_801FA908 ( bool arg)
static

◆ grInishie1_801FA90C()

void grInishie1_801FA90C ( void )
static

◆ grInishie1_801FA984()

void grInishie1_801FA984 ( void )
static

◆ grInishie1_801FA988()

void grInishie1_801FA988 ( void )
static

◆ grInishie1_801FA9AC()

bool grInishie1_801FA9AC ( void )
static

◆ setupStageCallbacks()

Ground_GObj * setupStageCallbacks ( int gobj_id)
static

◆ grInishie1_801FAAA0()

void grInishie1_801FAAA0 ( Ground_GObj * gobj)
static

◆ grInishie1_801FAACC()

bool grInishie1_801FAACC ( Ground_GObj * gobj)
static

◆ grInishie1_801FAAD4()

void grInishie1_801FAAD4 ( Ground_GObj * gobj)
static

◆ grInishie1_801FAAD8()

void grInishie1_801FAAD8 ( Ground_GObj * gobj)
static

◆ grInishie1_801FAADC()

void grInishie1_801FAADC ( Ground_GObj * gobj)
static

◆ grInishie1_801FAB60()

bool grInishie1_801FAB60 ( Ground_GObj * gobj)
static

◆ grInishie1_801FAB68()

void grInishie1_801FAB68 ( Ground_GObj * gobj)
static

◆ grInishie1_801FABB0()

void grInishie1_801FABB0 ( Ground_GObj * gobj)
static

◆ grInishie1_801FABB4()

void grInishie1_801FABB4 ( Ground_GObj * gobj)
static

◆ grInishie1_801FABF4()

bool grInishie1_801FABF4 ( Ground_GObj * gobj)
static

◆ grInishie1_801FABFC()

void grInishie1_801FABFC ( Ground_GObj * gobj)
static

◆ grInishie1_801FAC00()

void grInishie1_801FAC00 ( Ground_GObj * gobj)
static

◆ grInishie1_801FAC04()

void grInishie1_801FAC04 ( Ground_GObj * gobj)
static

◆ grInishie1_801FAC50()

bool grInishie1_801FAC50 ( Ground_GObj * gobj)
static

◆ grInishie1_801FAC58()

void grInishie1_801FAC58 ( Ground_GObj * gobj)
static

◆ grInishie1_801FAD80()

void grInishie1_801FAD80 ( Ground_GObj * gobj)
static

◆ grInishie1_801FAD84()

void grInishie1_801FAD84 ( HSD_GObj * gobj)
static

◆ grInishie1_801FB0AC()

void grInishie1_801FB0AC ( HSD_GObj * gobj,
u32 ix )
static

◆ grInishie1_801FB3F0()

void grInishie1_801FB3F0 ( HSD_GObj * gobj)
static

◆ grInishie1_801FBA34()

void grInishie1_801FBA34 ( HSD_GObj * gobj,
HSD_JObj * jobj )
static

gives item from hatena block upwards velocity, maybe handles spawning it as well

◆ grInishie1_801FBAA0()

void grInishie1_801FBAA0 ( HSD_GObj * gobj,
s32 ix )
static

◆ grInishie1_801FBC4C()

void grInishie1_801FBC4C ( HSD_GObj * gobj,
u32 index )
static

◆ grInishie1_801FBCEC()

void grInishie1_801FBCEC ( HSD_GObj * gobj,
u32 index )
static

◆ fn_801FBEB8()

void fn_801FBEB8 ( void * user_data,
int joint_id,
CollData * coll,
int coll_x50,
mpLib_GroundEnum ground_kind,
float delta_y )
static

Joint collision callback for ground surfaces.

Parameters
user_dataSaved untyped data attached to the callback.
coll_x50Unknown, sourced from CollData::x50. dist according to fn_801FC9AC?
delta_yRelative y-offset since the collision started, equal to coll->cur_pos.y - coll->last_pos.y

◆ fn_801FBF6C()

void fn_801FBF6C ( Item_GObj * item_gobj,
Ground * gp,
Vec3 * pos,
HSD_GObj * arg3,
f32 arg4 )
static

◆ grInishie1_801FC018()

void grInishie1_801FC018 ( HSD_GObj * gobj)
static

◆ grInishie1_801FC110()

void grInishie1_801FC110 ( HSD_GObj * gobj)
static

◆ grInishie1_801FC4A0()

void grInishie1_801FC4A0 ( HSD_GObj * gobj)
static

◆ grInishie1_801FC664()

void grInishie1_801FC664 ( HSD_GObj * gobj)
static

◆ fn_801FC9AC()

void fn_801FC9AC ( void * user_data,
int joint_id,
CollData * coll,
int coll_x50,
mpLib_GroundEnum ground_kind,
float delta_y )
static

Joint collision callback for ground surfaces.

Parameters
user_dataSaved untyped data attached to the callback.
coll_x50Unknown, sourced from CollData::x50. dist according to fn_801FC9AC?
delta_yRelative y-offset since the collision started, equal to coll->cur_pos.y - coll->last_pos.y

◆ grInishie1_801FCB10()

void grInishie1_801FCB10 ( HSD_GObj * gobj)
static

◆ grInishie1_801FCBB0()

DynamicsDesc * grInishie1_801FCBB0 ( enum_t arg)
static

◆ grInishie1_801FCBB8()

bool grInishie1_801FCBB8 ( Vec3 * arg,
int arg,
HSD_JObj * jobj )
static

◆ grInishie1_SetRespawnTimer()

void grInishie1_SetRespawnTimer ( Ground * gp,
u32 index,
s32 min,
s32 max )
inlinestatic

◆ fabsf_inline()

f32 fabsf_inline ( f32 x)
inlinestatic

◆ grInishie1_ShowBlock()

void grInishie1_ShowBlock ( HSD_JObj * jobj)
inlinestatic

◆ grInishie1_801FB3F0_UpdateY()

void grInishie1_801FB3F0_UpdateY ( grInishie1_Block * block)
inlinestatic

◆ grInishie1_801FB3F0_IsFar()

bool grInishie1_801FB3F0_IsFar ( HSD_JObj * jobj,
Vec3 * pos )
inlinestatic

◆ grInishie1_UpdateDObjFlags()

void grInishie1_UpdateDObjFlags ( HSD_JObj * jobj,
HSD_DObj ** walker,
bool hidden )
inlinestatic

◆ get_block_id()

s32 get_block_id ( s32 block_id)
inlinestatic

◆ GET_ITEM2()

Item * GET_ITEM2 ( Item_GObj * arg0)
inlinestatic

◆ grInishie1_801FCAAC()

bool grInishie1_801FCAAC ( int line_id)

Variable Documentation

◆ yakumono_param

struct grInishie1_YakumonoParam* yakumono_param
static

◆ grI1_803B8268

const Vec3 grI1_803B8268 = { 0.0f, 5.0f, 0.0f }

initial velocity for items spawned from hatena blocks

◆ grI1_803E48C8

GrJoint grI1_803E48C8[]
Initial value:
= {
{ 13, 3, 3 }, { 14, 3, 14 }, { 15, 3, 15 }, { 16, 3, 16 },
{ 17, 3, 17 }, { 18, 3, 18 }, { 19, 3, 19 },
}

◆ grI1_StageCallbacks

StageCallbacks grI1_StageCallbacks[]
Initial value:
= {
{
0,
},
{
0,
},
{
0,
},
{
(1 << 30) | (1 << 31),
},
}
static void grInishie1_801FAC58(Ground_GObj *)
Definition grinishie1.c:365
static void grInishie1_801FAAD8(Ground_GObj *)
Definition grinishie1.c:305
static bool grInishie1_801FAC50(Ground_GObj *)
Definition grinishie1.c:360
static bool grInishie1_801FAB60(Ground_GObj *)
Definition grinishie1.c:318
static bool grInishie1_801FAACC(Ground_GObj *)
Definition grinishie1.c:298
static void grInishie1_801FABB0(Ground_GObj *)
Definition grinishie1.c:332
static void grInishie1_801FAD80(Ground_GObj *)
Definition grinishie1.c:391
static void grInishie1_801FAADC(Ground_GObj *)
Definition grinishie1.c:307
static void grInishie1_801FABB4(Ground_GObj *)
Definition grinishie1.c:334
static void grInishie1_801FAB68(Ground_GObj *)
Definition grinishie1.c:323
static void grInishie1_801FAC00(Ground_GObj *)
Definition grinishie1.c:349
static void grInishie1_801FAAA0(Ground_GObj *)
Definition grinishie1.c:292
static bool grInishie1_801FABF4(Ground_GObj *)
Definition grinishie1.c:342
static void grInishie1_801FABFC(Ground_GObj *)
Definition grinishie1.c:347
static void grInishie1_801FAC04(Ground_GObj *)
Definition grinishie1.c:351
static void grInishie1_801FAAD4(Ground_GObj *)
Definition grinishie1.c:303

◆ grI1_StageData

StageData grI1_StageData
Initial value:
= {
"/GrI1.dat",
(1 << 0),
}
static void grInishie1_801FA984(void)
Definition grinishie1.c:245
static void grInishie1_801FA90C(void)
Definition grinishie1.c:232
static void grInishie1_801FA988(void)
Definition grinishie1.c:247
static bool grInishie1_801FCBB8(Vec3 *, int arg, HSD_JObj *jobj)
Definition grinishie1.c:1190
StageCallbacks grI1_StageCallbacks[]
Definition grinishie1.c:166
static DynamicsDesc * grInishie1_801FCBB0(enum_t)
Definition grinishie1.c:1185
static void grInishie1_801FA908(bool)
Definition grinishie1.c:220
GrJoint grI1_803E48C8[]
Definition grinishie1.c:161
static bool grInishie1_801FA9AC(void)
Definition grinishie1.c:252
@ Gr_Kind_Inishie1
Definition forward.h:83
#define ARRAY_SIZE(arr)
Definition platform.h:202

◆ grI1_803E49B8

struct block_table_struct grI1_803E49B8
Initial value:
= {
{ 13, 3 }, { 14, 14 }, { 15, 15 }, { 16, 16 }, { 17, 17 },
{ 18, 18 }, { 19, 19 }, { 11, 20 }, { 12, 21 }, { 1, 4 },
{ 2, 5 }, { 3, 6 }, { 4, 7 }, { 5, 8 }, { 6, 9 },
{ 7, 10 }, { 8, 11 }, { 9, 12 }, { 10, 13 },
}