SSBM Decomp
Loading...
Searching...
No Matches
itspawn.c File Reference
#include "it/itspawn.h"
#include "placeholder.h"
#include "db/db.h"
#include "ef/efsync.h"
#include "gm/gm_unsplit.h"
#include "gr/ground.h"
#include "gr/stage.h"
#include "it/it_26B1.h"
#include "it/it_2725.h"
#include "it/it_3F14.h"
#include "it/item.h"
#include "mp/mpcoll.h"
#include <baselib/gobj.h>
#include <baselib/gobjproc.h>
#include <baselib/memory.h>
#include <baselib/random.h>

Functions

static void sdata2_order (void)
void it_8026C47C (struct it_8026C47C_arg0_t *arg_struct)
static int bisectValue (int val, ItemPickTable *table, int lo, int hi)
 bisection search in the item table for a given value
ItemKind it_8026C65C (ItemPickTable *table)
bool it_8026C704 (void)
ItemKind it_8026C75C (ItemPickTable *table)
 Decides item kind for spawned items - not sure in which context (i.e from pokeballs, from capsules, thin air, etc.).
static void it_8026C88C_inline (RandomItemSpawner *alloc)
void fn_8026C88C (HSD_GObj *gobj)
void it_8026CA4C (ItemPickTable *alloc, s32 *arg1, u64 arg2, s32 arg3, f32 arg4)
bool it_8026CB3C (Vec3 *vec)
void it_8026CB9C (s32 *counts, u64 mask, f32 weight)
 Builds some structs for items.
void it_8026CD50 (s32 *counts, u64 mask, f32 weight)
void it_8026CF04 (void)
 Builds the monster-item weighted-pick table (it_804A0E60).
static bool it_8026D018_inline (f32 weight, int chk, s32 *stage_info, u64 stage_mask)
void it_8026D018 (void)
bool it_8026D258 (Vec3 *pos, ItemKind kind)
 Spawn item of specified kind at specified position (but no z-offset).
bool it_8026D324 (ItemKind kind)
bool it_8026D3CC (void)

Variables

ItemPickTable monster
ItemPickTable it_804A0E50
RandomItemSpawner it_804A0E30

Function Documentation

◆ sdata2_order()

void sdata2_order ( void )
static
Todo
.sdata2 order hack

◆ it_8026C47C()

void it_8026C47C ( struct it_8026C47C_arg0_t * arg_struct)

◆ bisectValue()

int bisectValue ( int val,
ItemPickTable * table,
int lo,
int hi )
static

bisection search in the item table for a given value

◆ it_8026C65C()

ItemKind it_8026C65C ( ItemPickTable * table)

◆ it_8026C704()

bool it_8026C704 ( void )

◆ it_8026C75C()

ItemKind it_8026C75C ( ItemPickTable * table)

Decides item kind for spawned items - not sure in which context (i.e from pokeballs, from capsules, thin air, etc.).

Todo
Two callee-saved registers are swapped.

◆ it_8026C88C_inline()

void it_8026C88C_inline ( RandomItemSpawner * alloc)
inlinestatic

◆ fn_8026C88C()

void fn_8026C88C ( HSD_GObj * gobj)

◆ it_8026CA4C()

void it_8026CA4C ( ItemPickTable * alloc,
s32 * arg1,
u64 arg2,
s32 arg3,
f32 arg4 )

◆ it_8026CB3C()

bool it_8026CB3C ( Vec3 * vec)

◆ it_8026CB9C()

void it_8026CB9C ( s32 * counts,
u64 mask,
f32 weight )

Builds some structs for items.

◆ it_8026CD50()

void it_8026CD50 ( s32 * counts,
u64 mask,
f32 weight )
Todo
it_804A0E50 immediately follows it_804A0E30; the original addressed it relative to the spawner.

◆ it_8026CF04()

void it_8026CF04 ( void )

Builds the monster-item weighted-pick table (it_804A0E60).

◆ it_8026D018_inline()

bool it_8026D018_inline ( f32 weight,
int chk,
s32 * stage_info,
u64 stage_mask )
inlinestatic

◆ it_8026D018()

void it_8026D018 ( void )

◆ it_8026D258()

bool it_8026D258 ( Vec3 * pos,
ItemKind kind )

Spawn item of specified kind at specified position (but no z-offset).

◆ it_8026D324()

bool it_8026D324 ( ItemKind kind)

◆ it_8026D3CC()

bool it_8026D3CC ( void )

Variable Documentation

◆ monster

ItemPickTable monster

◆ it_804A0E50

ItemPickTable it_804A0E50

◆ it_804A0E30

RandomItemSpawner it_804A0E30