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

Data Structures

struct  grGreens_YakumonoParam

Macros

#define Gr_Greens_Block_Status_None   0
#define Gr_Greens_Block_Colum   3
 "Colum" (sic): the retail assert strings at 0x803E7908/0x803E7924 spell "ix<Gr_Greens_Block_Colum*2" / "ix<Gr_Greens_Block_Colum", so the original macro name carried this typo.
#define Gr_Greens_Block_Max   30

Functions

static void fn_80216DE4 (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 sdata2_order (void)
static void order_data (void)
static int randrange (int min, int max)
static struct grGreens_BlockVarsgetBlock (Ground *gp, int i, int j)
static VecgetVec (Ground *gp, int i, int j)
void grGreens_80213458 (bool arg)
void grGreens_Init (void)
void grGreens_802134F4 (void)
void grGreens_802134F8 (void)
bool grGreens_8021351C (void)
Ground_GObjgrGreens_80213524 (int id)
void grGreens_8021360C (Ground_GObj *gobj)
bool grGreens_802138AC (Ground_GObj *arg)
void grGreens_802138B4 (Ground_GObj *arg)
void grGreens_802138B8 (Ground_GObj *arg)
void grGreens_802138BC (Ground_GObj *gobj)
bool grGreens_80213900 (Ground_GObj *arg)
void grGreens_80213908 (Ground_GObj *arg)
void grGreens_8021390C (Ground_GObj *arg)
void grGreens_80213910 (Ground_GObj *gobj)
bool grGreens_8021393C (Ground_GObj *arg)
void grGreens_80213944 (Ground_GObj *arg)
void grGreens_80213948 (Ground_GObj *arg)
void grGreens_8021394C (Ground_GObj *gobj)
bool grGreens_80213978 (Ground_GObj *arg)
void grGreens_80213980 (Ground_GObj *arg)
void grGreens_80213984 (Ground_GObj *arg)
void grGreens_80213988 (Ground_GObj *gobj)
bool grGreens_802139B4 (Ground_GObj *arg)
void grGreens_802139BC (Ground_GObj *arg)
void grGreens_802139C0 (Ground_GObj *arg)
void grGreens_802139C4 (Ground_GObj *gobj)
bool grGreens_80213AAC (Ground_GObj *arg)
bool grGreens_80213AB4 (Vec *vec, f32 maxX, f32 minX, f32 maxY, f32 minY)
bool fn_80213B1C (Ground_GObj *ground_gobj, Fighter_GObj *fighter_gobj, Vec *vec)
static int get_whispy_dir (Ground_GObj *gobj, Vec3 *pos)
void grGreens_80213C10 (Ground_GObj *gobj)
void grGreens_80214654 (Ground_GObj *arg)
void fn_80214658 (Ground_GObj *gobj)
void grGreens_80214674 (Ground_GObj *gobj)
bool grGreens_80214794 (Ground_GObj *arg)
void grGreens_8021479C (Ground_GObj *gobj)
void grGreens_80214804 (Ground_GObj *gobj)
void grGreens_8021483C (Ground_GObj *gobj)
static void BOMB (int idx)
void grGreens_80214B58 (Ground_GObj *gobj)
void grGreens_80214FA8 (Ground_GObj *gobj)
void grGreens_802150C4 (Ground_GObj *gobj, int arg1, int arg2)
static void get_block_material_params (int block_type, float *duration, float *scale)
void grGreens_80215358 (Ground_GObj *gobj, int col, int row, int arg3, int arg4)
void fn_802159B4 (Item_GObj *item_gobj, Ground *gp)
static Item_GObjgetBlockItemGObj (Ground *gp, int i, int j)
void grGreens_802159B8 (Ground *gp, int i, int j, int value)
static bool find_block (Ground *gp, Item_GObj *item_gobj, int *row, int *col)
void fn_80215B84 (Item_GObj *item_gobj, Ground *gp, Vec *arg2, HSD_GObj *gobj, float arg4)
void fn_80215D50 (Item_GObj *item_gobj, Ground *gp, HSD_GObj *gobj)
s32 grGreens_80215D54 (Ground_GObj *gobj, int arg1, int arg2)
void grGreens_80215ED8 (Ground_GObj *gobj, int col, int row)
void grGreens_802166C4 (Ground_GObj *gobj)
static int getBlockX18 (Ground *gp, int i, int j)
void grGreens_80216C20 (Ground_GObj *gobj)
DynamicsDescgrGreens_80216E64 (enum_t arg)
bool grGreens_80216E6C (Vec3 *arg, int arg0, HSD_JObj *jobj)

Variables

static u8 grGr_804D6AAC
static u8 grGr_804D6AAD
static struct grGreens_YakumonoParamyakumono_param
static StageCallbacks grGr_callbacks []
StageData grGr_StageData
static u8 grGr_8049F9E0 [0x20]
static s32 grGr_803E7734 []
static s32 grGr_803E775C []
static s32 grGr_803E777C [][2]
static s32 grGr_803E77B4 []
static s32 grGr_803E77D4 [][2]
static Vec3 grGr_803E780C []
static s16 grGr_803E7840 [Gr_Greens_Block_Max]
 JObj indices of the 30 breakable blocks (passed to Ground_801C3FA4).
static s16 grGr_803E787C [Gr_Greens_Block_Max]
 Map joint IDs of the 30 breakable blocks (passed to mpJointSetCb2).

Macro Definition Documentation

◆ Gr_Greens_Block_Status_None

#define Gr_Greens_Block_Status_None   0

◆ Gr_Greens_Block_Colum

#define Gr_Greens_Block_Colum   3

"Colum" (sic): the retail assert strings at 0x803E7908/0x803E7924 spell "ix<Gr_Greens_Block_Colum*2" / "ix<Gr_Greens_Block_Colum", so the original macro name carried this typo.

◆ Gr_Greens_Block_Max

#define Gr_Greens_Block_Max   30

Function Documentation

◆ fn_80216DE4()

void fn_80216DE4 ( 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

◆ sdata2_order()

void sdata2_order ( void )
static
Todo
Emitted only to lay out the .sdata2 literal pool in retail order.

◆ order_data()

void order_data ( void )
static

◆ randrange()

int randrange ( int min,
int max )
inlinestatic

◆ getBlock()

struct grGreens_BlockVars * getBlock ( Ground * gp,
int i,
int j )
inlinestatic

◆ getVec()

Vec * getVec ( Ground * gp,
int i,
int j )
inlinestatic

◆ grGreens_80213458()

void grGreens_80213458 ( bool arg)

◆ grGreens_Init()

void grGreens_Init ( void )

◆ grGreens_802134F4()

void grGreens_802134F4 ( void )

◆ grGreens_802134F8()

void grGreens_802134F8 ( void )

◆ grGreens_8021351C()

bool grGreens_8021351C ( void )

◆ grGreens_80213524()

Ground_GObj * grGreens_80213524 ( int id)

◆ grGreens_8021360C()

void grGreens_8021360C ( Ground_GObj * gobj)

◆ grGreens_802138AC()

bool grGreens_802138AC ( Ground_GObj * arg)

◆ grGreens_802138B4()

void grGreens_802138B4 ( Ground_GObj * arg)

◆ grGreens_802138B8()

void grGreens_802138B8 ( Ground_GObj * arg)

◆ grGreens_802138BC()

void grGreens_802138BC ( Ground_GObj * gobj)

◆ grGreens_80213900()

bool grGreens_80213900 ( Ground_GObj * arg)

◆ grGreens_80213908()

void grGreens_80213908 ( Ground_GObj * arg)

◆ grGreens_8021390C()

void grGreens_8021390C ( Ground_GObj * arg)

◆ grGreens_80213910()

void grGreens_80213910 ( Ground_GObj * gobj)

◆ grGreens_8021393C()

bool grGreens_8021393C ( Ground_GObj * arg)

◆ grGreens_80213944()

void grGreens_80213944 ( Ground_GObj * arg)

◆ grGreens_80213948()

void grGreens_80213948 ( Ground_GObj * arg)

◆ grGreens_8021394C()

void grGreens_8021394C ( Ground_GObj * gobj)

◆ grGreens_80213978()

bool grGreens_80213978 ( Ground_GObj * arg)

◆ grGreens_80213980()

void grGreens_80213980 ( Ground_GObj * arg)

◆ grGreens_80213984()

void grGreens_80213984 ( Ground_GObj * arg)

◆ grGreens_80213988()

void grGreens_80213988 ( Ground_GObj * gobj)

◆ grGreens_802139B4()

bool grGreens_802139B4 ( Ground_GObj * arg)

◆ grGreens_802139BC()

void grGreens_802139BC ( Ground_GObj * arg)

◆ grGreens_802139C0()

void grGreens_802139C0 ( Ground_GObj * arg)

◆ grGreens_802139C4()

void grGreens_802139C4 ( Ground_GObj * gobj)

◆ grGreens_80213AAC()

bool grGreens_80213AAC ( Ground_GObj * arg)

◆ grGreens_80213AB4()

bool grGreens_80213AB4 ( Vec * vec,
f32 maxX,
f32 minX,
f32 maxY,
f32 minY )

◆ fn_80213B1C()

bool fn_80213B1C ( Ground_GObj * ground_gobj,
Fighter_GObj * fighter_gobj,
Vec * vec )

◆ get_whispy_dir()

int get_whispy_dir ( Ground_GObj * gobj,
Vec3 * pos )
inlinestatic

◆ grGreens_80213C10()

void grGreens_80213C10 ( Ground_GObj * gobj)

◆ grGreens_80214654()

void grGreens_80214654 ( Ground_GObj * arg)

◆ fn_80214658()

void fn_80214658 ( Ground_GObj * gobj)

◆ grGreens_80214674()

void grGreens_80214674 ( Ground_GObj * gobj)

◆ grGreens_80214794()

bool grGreens_80214794 ( Ground_GObj * arg)

◆ grGreens_8021479C()

void grGreens_8021479C ( Ground_GObj * gobj)

◆ grGreens_80214804()

void grGreens_80214804 ( Ground_GObj * gobj)

◆ grGreens_8021483C()

void grGreens_8021483C ( Ground_GObj * gobj)

◆ BOMB()

void BOMB ( int idx)
inlinestatic

◆ grGreens_80214B58()

void grGreens_80214B58 ( Ground_GObj * gobj)

◆ grGreens_80214FA8()

void grGreens_80214FA8 ( Ground_GObj * gobj)

◆ grGreens_802150C4()

void grGreens_802150C4 ( Ground_GObj * gobj,
int arg1,
int arg2 )

◆ get_block_material_params()

void get_block_material_params ( int block_type,
float * duration,
float * scale )
inlinestatic

◆ grGreens_80215358()

void grGreens_80215358 ( Ground_GObj * gobj,
int col,
int row,
int arg3,
int arg4 )

◆ fn_802159B4()

void fn_802159B4 ( Item_GObj * item_gobj,
Ground * gp )

◆ getBlockItemGObj()

Item_GObj * getBlockItemGObj ( Ground * gp,
int i,
int j )
inlinestatic

◆ grGreens_802159B8()

void grGreens_802159B8 ( Ground * gp,
int i,
int j,
int value )

◆ find_block()

bool find_block ( Ground * gp,
Item_GObj * item_gobj,
int * row,
int * col )
inlinestatic

◆ fn_80215B84()

void fn_80215B84 ( Item_GObj * item_gobj,
Ground * gp,
Vec * arg2,
HSD_GObj * gobj,
float arg4 )

◆ fn_80215D50()

void fn_80215D50 ( Item_GObj * item_gobj,
Ground * gp,
HSD_GObj * gobj )

◆ grGreens_80215D54()

s32 grGreens_80215D54 ( Ground_GObj * gobj,
int arg1,
int arg2 )

◆ grGreens_80215ED8()

void grGreens_80215ED8 ( Ground_GObj * gobj,
int col,
int row )

◆ grGreens_802166C4()

void grGreens_802166C4 ( Ground_GObj * gobj)

◆ getBlockX18()

int getBlockX18 ( Ground * gp,
int i,
int j )
inlinestatic

◆ grGreens_80216C20()

void grGreens_80216C20 ( Ground_GObj * gobj)

◆ grGreens_80216E64()

DynamicsDesc * grGreens_80216E64 ( enum_t arg)

◆ grGreens_80216E6C()

bool grGreens_80216E6C ( Vec3 * arg,
int arg0,
HSD_JObj * jobj )

Variable Documentation

◆ grGr_804D6AAC

u8 grGr_804D6AAC
static

◆ grGr_804D6AAD

u8 grGr_804D6AAD
static

◆ yakumono_param

struct grGreens_YakumonoParam* yakumono_param
static

◆ grGr_callbacks

StageCallbacks grGr_callbacks[]
static

◆ grGr_StageData

StageData grGr_StageData
Initial value:
= {
"/GrGr.dat",
(1 << 0),
0,
}
bool grGreens_8021351C(void)
Definition grgreens.c:226
void grGreens_802134F4(void)
Definition grgreens.c:219
void grGreens_Init(void)
Definition grgreens.c:202
bool grGreens_80216E6C(Vec3 *arg, int arg0, HSD_JObj *jobj)
Definition grgreens.c:1622
DynamicsDesc * grGreens_80216E64(enum_t arg)
Definition grgreens.c:1617
void grGreens_802134F8(void)
Definition grgreens.c:221
static StageCallbacks grGr_callbacks[]
Definition grgreens.c:91
void grGreens_80213458(bool arg)
Definition grgreens.c:197
@ Gr_Kind_Greens
Definition forward.h:68
#define NULL
Definition stddef.h:19

◆ grGr_8049F9E0

u8 grGr_8049F9E0[0x20]
static

◆ grGr_803E7734

s32 grGr_803E7734[]
static
Initial value:
= {
0, 1, 0, 1, 0, 2, 0, 1, 0, 2,
}

◆ grGr_803E775C

s32 grGr_803E775C[]
static
Initial value:
= {
0, 0, 0, 14, 0, 0, 0, 14,
}

◆ grGr_803E777C

s32 grGr_803E777C[][2]
static
Initial value:
= {
{ 1, 8 }, { 15, 16 }, { 2, 9 }, { 3, 10 }, { 4, 11 }, { 5, 12 }, { 6, 13 },
}

◆ grGr_803E77B4

s32 grGr_803E77B4[]
static
Initial value:
= {
0, 0, 0, 14, 0, 0, 0, 14,
}

◆ grGr_803E77D4

s32 grGr_803E77D4[][2]
static
Initial value:
= {
{ 1, 8 }, { 15, 16 }, { 2, 9 }, { 3, 10 }, { 4, 11 }, { 5, 12 }, { 6, 13 },
}

◆ grGr_803E780C

Vec3 grGr_803E780C[]
static
Initial value:
= {
{ -1.0f, 0.0f, 0.0f },
{ 1.0f, 0.0f, 0.0f },
}

◆ grGr_803E7840

s16 grGr_803E7840[Gr_Greens_Block_Max]
static
Initial value:
= {
5, 6, 7, 8, 9, 0xA, 0xB, 0xC, 0xD, 0xE,
0xF, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22,
}

JObj indices of the 30 breakable blocks (passed to Ground_801C3FA4).

◆ grGr_803E787C

s16 grGr_803E787C[Gr_Greens_Block_Max]
static
Initial value:
= {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
0xA, 0xB, 0xC, 0xD, 0xE, 0xF, 0x10, 0x11, 0x12, 0x13,
0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D,
}

Map joint IDs of the 30 breakable blocks (passed to mpJointSetCb2).