Go to the source code of this file.
Data Structures | |
struct | QuizRequirement |
struct | NpcBlueprint |
struct | MobileAISettings |
struct | GuardAISettings |
struct | FireBarAISettings |
struct | FireBarData |
struct | NpcSettings |
struct | ItemDrop |
struct | StatDrop |
Describes heart/flower drop chances after defeating an Npc in the overworld. More... | |
struct | EnemyDrops |
struct | EnemyDetectVolume |
struct | EnemyTerritoryWander |
struct | EnemyTerritoryPatrol |
union | EnemyTerritory |
union | NpcInitialVars |
struct | NpcData |
struct | NpcGroup |
Zero-terminated. More... | |
struct | Enemy |
struct | Encounter |
struct | FieldStatus |
struct | EncounterStatus |
struct | NpcData.animations |
union | Enemy.__unnamed54__ |
Macros | |
#define | NPC_GROUP(args...) VFUNC(NPC_GROUP, args) |
#define | NPC_GROUP1(npcs) { sizeof(npcs) / sizeof(NpcData), (NpcData*) &npcs, 0, 0 } |
#define | NPC_GROUP2(npcs, battle) { sizeof(npcs) / sizeof(NpcData), (NpcData*) &npcs, battle, 0 } |
#define | NPC_GROUP3(npcs, battle, stage) { sizeof(npcs) / sizeof(NpcData), (NpcData*) &npcs, battle, stage + 1 } |
#define | NPC_GROUP_EXPLICIT_SIZE(args...) VFUNC(NPC_GROUP_EXPLICIT_SIZE, args) |
#define | NPC_GROUP_EXPLICIT_SIZE3(npcs, start, count) { count, (NpcData*) &npcs[start], 0, 0 } |
#define | NPC_GROUP_EXPLICIT_SIZE4(npcs, start, count, battle) { count, (NpcData*) &npcs[start], battle, 0 } |
#define | NPC_GROUP_EXPLICIT_SIZE5(npcs, start, count, battle, stage) { count, (NpcData*) &npcs[start], battle, stage + 1 } |
#define | NO_DROPS |
#define | STANDARD_HEART_DROPS(attempts) |
#define | GENEROUS_HEART_DROPS(attempts) |
#define | GENEROUS_WHEN_LOW_HEART_DROPS(attempts) |
#define | STANDARD_FLOWER_DROPS(attempts) |
#define | GENEROUS_WHEN_LOW_FLOWER_DROPS(attempts) |
#define | REDUCED_FLOWER_DROPS(attempts) |
#define | OVERRIDE_MOVEMENT_SPEED(speed) ((s32)(speed * 32767)) |
#define | NO_OVERRIDE_MOVEMENT_SPEED OVERRIDE_MOVEMENT_SPEED(-1.0f) |
Typedefs | |
typedef void(* | FireBarCallback) (struct FireBarData *, s32) |
typedef NpcGroup | NpcGroupList[] |
typedef void | AIStateHandler(Evt *script, MobileAISettings *settings, EnemyDetectVolume *territory) |
Enumerations | |
enum | TerritoryShape { SHAPE_CYLINDER , SHAPE_RECT } |
Functions | |
s32 | basic_ai_check_player_dist (EnemyDetectVolume *arg0, Enemy *arg1, f32 arg2, f32 arg3, b8 arg4) |
void | STUB_npc_callback (Npc *) |
The default Npc::onUpdate and Npc::onRender callback. | |
void | mtx_ident_mirror_y (Matrix4f mtx) |
void | clear_npcs (void) |
void | init_npc_list (void) |
Points the current NPC list to the world or battle lists depending on game state. | |
s32 | create_npc_impl (NpcBlueprint *blueprint, AnimID *animList, s32 skipLoadingAnims) |
s32 | create_basic_npc (NpcBlueprint *blueprint) |
s32 | create_standard_npc (NpcBlueprint *blueprint, AnimID *animList) |
s32 | create_peach_npc (NpcBlueprint *blueprint) |
void | free_npc_by_index (s32 listIndex) |
void | free_npc (Npc *npc) |
Npc * | get_npc_by_index (s32 listIndex) |
void | npc_do_world_collision (Npc *npc) |
void | npc_do_other_npc_collision (Npc *npc) |
s32 | npc_do_player_collision (Npc *npc) |
void | npc_try_apply_gravity (Npc *npc) |
s32 | npc_try_snap_to_ground (Npc *npc, f32 velocity) |
void | update_npcs (void) |
Updates all NPCs. | |
f32 | npc_get_render_yaw (Npc *npc) |
void | appendGfx_npc (void *data) |
void | render_npcs (void) |
Renders all NPCs. | |
void | npc_move_heading (Npc *npc, f32 speed, f32 yaw) |
Npc * | get_npc_unsafe (s32 npcID) |
Npc * | get_npc_safe (s32 npcID) |
void | enable_npc_shadow (Npc *npc) |
void | disable_npc_shadow (Npc *npc) |
void | update_npc_blur (Npc *npc) |
void | appendGfx_npc_blur (void *npc) |
void | npc_enable_collisions (void) |
void | npc_disable_collisions (void) |
void | func_8003B1A8 (void) |
void | npc_reload_all (void) |
void | set_npc_yaw (Npc *npc, f32 yaw) |
void | npc_set_palswap_mode_A (Npc *npc, s32 arg1) |
void | npc_set_palswap_mode_B (Npc *npc, s32 arg1) |
void | npc_revert_palswap_mode (Npc *npc) |
void | npc_set_palswap_1 (Npc *npc, s32 palIndexA, s32 palIndexB, s32 timeHoldA, s32 timeAB) |
void | npc_set_palswap_2 (Npc *npc, s32 timeHoldB, s32 timeBA, s32 palIndexC, s32 palIndexD) |
void | npc_draw_with_palswap (Npc *npc, s32 arg1, Matrix4f mtx) |
void | npc_render_without_adjusted_palettes (Npc *npc, s32 arg1, Matrix4f mtx) |
s32 | npc_render_with_watt_idle_palettes (Npc *, s32, Matrix4f mtx) |
u16 | npc_blend_palette_colors (u16 colorA, u16 colorB, s32 lerpAlpha) |
s32 | npc_render_with_single_pal_blending (Npc *, s32, s32, Matrix4f mtx) |
s32 | npc_render_with_double_pal_blending (Npc *, s32, Matrix4f mtx) |
void | npc_set_decoration (Npc *npc, s32 idx, s32 decorationType) |
void | npc_remove_decoration (Npc *npc, s32 idx) |
s32 | npc_update_decorations (Npc *npc) |
void | npc_reset_current_decoration (Npc *npc, s32 idx) |
void | npc_update_decoration_none (Npc *npc, s32 idx) |
void | npc_remove_decoration_none (Npc *npc, s32 idx) |
void | npc_update_decoration_bowser_aura (Npc *npc, s32 idx) |
void | npc_remove_decoration_bowser_aura (Npc *npc, s32 idx) |
void | npc_update_decoration_sweat (Npc *npc, s32 idx) |
void | npc_remove_decoration_sweat (Npc *npc, s32 idx) |
void | npc_update_decoration_seeing_stars (Npc *npc, s32 idx) |
void | npc_remove_decoration_seeing_stars (Npc *npc, s32 idx) |
void | npc_update_decoration_glow_in_front (Npc *npc, s32 idx) |
void | npc_remove_decoration_glow_in_front (Npc *npc, s32 idx) |
void | npc_update_decoration_glow_behind (Npc *npc, s32 idx) |
void | npc_remove_decoration_glow_behind (Npc *npc, s32 idx) |
void | npc_update_decoration_charged (Npc *npc, s32 idx) |
void | npc_remove_decoration_charged (Npc *npc, s32 idx) |
Npc * | npc_find_closest (f32 x, f32 y, f32 z, f32 radius) |
Finds the closest NPC to a given point within a radius. | |
Npc * | npc_find_closest_simple (f32 x, f32 y, f32 z, f32 radius) |
Finds the closest simple-hitbox NPC to a given point within a radius. | |
s32 | npc_get_collider_below (Npc *npc) |
void | npc_imgfx_update (Npc *npc) |
void | npc_set_imgfx_params (Npc *npc, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6) |
void | npc_surface_spawn_fx (Npc *npc, SurfaceInteractMode mode) |
void | spawn_default_surface_effects (Npc *npc, SurfaceInteractMode mode) |
void | spawn_flower_surface_effects (Npc *npc, SurfaceInteractMode mode) |
void | spawn_cloud_surface_effects (Npc *npc, SurfaceInteractMode mode) |
void | spawn_snow_surface_effects (Npc *npc, SurfaceInteractMode mode) |
void | spawn_hedge_surface_effects (Npc *npc, SurfaceInteractMode mode) |
void | spawn_water_surface_effects (Npc *npc, SurfaceInteractMode mode) |
void | COPY_set_defeated (s32 mapID, s32 encounterID) |
Duplicate of set_defeated(). | |
void | init_encounter_status (void) |
void | clear_encounter_status (void) |
void | func_8003E50C (void) |
void | func_8003E514 (s8 arg0) |
void | update_encounters (void) |
void | draw_encounter_ui (void) |
void | draw_first_strike_ui (void) |
void | npc_render_worker_do_nothing (void) |
void | make_npcs (s32 flags, s32 mapID, s32 *npcGroupList) |
s32 | kill_encounter (Enemy *enemy) |
void | kill_enemy (Enemy *enemy) |
s32 | bind_enemy_ai (Enemy *enemy, EvtScript *aiScriptBytecode) |
Binds the specified ai script to the specified enemy. | |
s32 | bind_enemy_aux (Enemy *enemy, EvtScript *auxScriptBytecode) |
Binds the specified auxillary script to the specified enemy. | |
s32 | bind_enemy_interact (Enemy *enemy, EvtScript *interactScriptBytecode) |
Binds the specified interact script to the specified enemy. | |
void | bind_npc_ai (s32 npcID, EvtScript *npcAiBytecode) |
Binds the specified ai script to the npc matching the specified npcId. | |
void | bind_npc_aux (s32 npcID, EvtScript *npcAuxBytecode) |
Binds the specified auxillary script to the npc matching the specified npcId. | |
void | bind_npc_interact (s32 npcID, EvtScript *npcInteractBytecode) |
Binds the specified interact script to the npc matching the specified npcId. | |
Enemy * | get_enemy (s32 npcID) |
Looks for an enemy matching the specified npcID. | |
Enemy * | get_enemy_safe (s32 npcID) |
Same as get_enemy(), with the exception of always returning a value if an enemy is not found. | |
void | set_npc_sprite (Npc *npc, s32 anim, AnimID *extraAnimList) |
Variables | |
EncounterStatus | gCurrentEncounter |
struct MobileAISettings |
struct GuardAISettings |
struct FireBarAISettings |
Data Fields | ||
---|---|---|
Vec3i | centerPos | |
s32 | rotRate | |
s32 | firstNpc | |
s32 | npcCount | |
FireBarCallback | callback |
struct FireBarData |
Data Fields | ||
---|---|---|
s32 | flags | |
Vec3f | centerPos | |
f32 | rotRate | |
s32 | firstNpc | |
s32 | npcCount | |
FireBarCallback | callback | |
s32 | soundIndex | |
f32 | lastDeltaYaw | |
f32 | yaw | |
FireBarAISettings * | settings |
struct NpcSettings |
struct StatDrop |
Data Fields | ||
---|---|---|
s16 | cutoff | % of max HP/FP. If current HP/FP > cutoff, no hearts/flowers can be dropped. |
s16 | generalChance | % chance for any hearts/flowers to be dropped at all from this StatDrop. |
s16 | attempts | Maximum number of hearts/flowers that can be dropped from this StatDrop. |
s16 | chancePerAttempt | % chance for a single heart/flower to be dropped from each attempt. |
struct EnemyDrops |
struct EnemyDetectVolume |
Data Fields | ||
---|---|---|
s32 | skipPlayerDetectChance | |
enum TerritoryShape | shape | |
s32 | pointX | |
s32 | pointZ | |
s32 | sizeX | |
s32 | sizeZ | |
f32 | halfHeight | |
s16 | detectFlags |
struct EnemyTerritoryWander |
Data Fields | ||
---|---|---|
Vec3i | centerPos | |
VecXZi | wanderSize | |
s32 | moveSpeedOverride | |
enum TerritoryShape | wanderShape | |
Vec3i | detectPos | |
VecXZi | detectSize | |
enum TerritoryShape | detectShape | |
b32 | isFlying |
struct EnemyTerritoryPatrol |
Data Fields | ||
---|---|---|
s32 | numPoints | |
Vec3i | points[10] | |
s32 | moveSpeedOverride | |
Vec3i | detectPos | |
VecXZi | detectSize | |
enum TerritoryShape | detectShape | |
b32 | isFlying |
union EnemyTerritory |
Data Fields | ||
---|---|---|
EnemyTerritoryWander | wander | |
EnemyTerritoryPatrol | patrol | |
char | PADDING[0xC0] |
struct NpcData |
Data Fields | ||
---|---|---|
s32 | id | |
NpcSettings * | settings | |
Vec3f | pos | |
s32 | flags | |
EvtScript * | init | |
s32 | initVarCount | |
NpcInitialVars | initVar | |
s32 | yaw | |
EnemyDrops | drops | |
EnemyTerritory | territory | |
struct NpcData.animations | animations | |
s8 | unk__1E0 | |
s8 | unk__1E1 | |
s8 | unk__1E2 | |
u8 | aiDetectFlags | |
u32 | aiFlags | |
AnimID * | extraAnimations | |
s32 | tattle |
struct NpcGroup |
Data Fields | ||
---|---|---|
s32 | npcCount | |
NpcData * | npcs | |
s16 | battle | |
s16 | stage |
struct Enemy |
Data Fields | ||
---|---|---|
s32 | flags | |
s8 | encounterIndex | |
s8 | encountered | |
u8 | scriptGroup | |
s8 | hitboxIsActive | |
s16 | npcID | |
s16 | spawnPos[3] | |
Vec3s | unk_10 | |
char | unk_16[2] | |
NpcSettings * | npcSettings | |
EvtScript * | initBytecode | |
EvtScript * | interactBytecode | |
EvtScript * | aiBytecode | |
EvtScript * | hitBytecode | |
EvtScript * | auxBytecode | |
EvtScript * | defeatBytecode | |
struct Evt * | initScript | |
struct Evt * | interactScript | |
struct Evt * | aiScript | |
struct Evt * | hitScript | |
struct Evt * | auxScript | |
struct Evt * | defeatScript | |
s32 | initScriptID | |
s32 | interactScriptID | |
s32 | aiScriptID | |
s32 | hitScriptID | |
s32 | auxScriptID | |
s32 | defeatScriptID | |
void * | unk_64 | |
char | unk_68[4] | |
union Enemy.__unnamed54__ | __unnamed__ | |
u8 | aiDetectFlags | |
char | unk_AD[3] | |
u32 | aiFlags | |
s8 | aiSuspendTime | |
s8 | instigatorValue | |
char | unk_B6[2] | |
EvtScript * | unk_B8 | |
struct Evt * | unk_BC | |
s32 | unk_C0 | |
s32 | unk_C4 | |
s32 | unk_C8 | |
s32 * | animList | |
EnemyTerritory * | territory | |
EnemyDrops * | drops | |
u32 | tattleMsg | |
s32 | unk_DC | |
s16 | savedNpcYaw | |
char | unk_E2[6] |
struct Encounter |
Data Fields | ||
---|---|---|
s32 | count | |
Enemy * | enemy[16] | |
s16 | battle | |
s16 | stage | |
s16 | encounterID | |
char | unk_4C[2] |
struct EncounterStatus |
Data Fields | ||
---|---|---|
s32 | flags | |
s8 | firstStrikeType | |
s8 | hitType | |
s8 | hitTier | |
char | unk_07 | |
s8 | unk_08 | |
s8 | battleOutcome | |
s8 | battleTriggerCooldown | set to 15 after victory, 45 after fleeing |
b8 | hasMerleeCoinBonus | |
u8 | damageTaken | |
char | unk_0D | |
s16 | coinsEarned | |
s8 | instigatorValue | |
s8 | forbidFleeing | |
s8 | scriptedBattle | battle started by StartBattle but not by encounter |
s8 | dropWhackaBump | |
s32 | songID | |
s32 | unk_18 | |
s8 | numEncounters | |
s8 | curAreaIndex | |
u8 | curMapIndex | |
u8 | curEntryIndex | |
s8 | mapID | |
s8 | resetMapEncounterFlags | |
char | unk_22[2] | |
s32 * | npcGroupList | |
Encounter * | encounterList[24] | |
Encounter * | curEncounter | |
Enemy * | curEnemy | |
s32 | fadeOutAmount | |
s32 | substateDelay | |
s32 | fadeOutAccel | |
s32 | battleStartCountdown | |
FieldStatus | dizzyAttack | |
FieldStatus | unusedAttack1 | |
FieldStatus | unusedAttack2 | |
FieldStatus | unusedAttack3 | |
s32 | defeatFlags[60][12] | |
s16 | recentMaps[2] |
struct NpcData.animations |
#define NPC_GROUP_EXPLICIT_SIZE | ( | args... | ) | VFUNC(NPC_GROUP_EXPLICIT_SIZE, args) |
#define NPC_GROUP_EXPLICIT_SIZE3 | ( | npcs, | |
start, | |||
count ) { count, (NpcData*) &npcs[start], 0, 0 } |
#define NPC_GROUP_EXPLICIT_SIZE4 | ( | npcs, | |
start, | |||
count, | |||
battle ) { count, (NpcData*) &npcs[start], battle, 0 } |
#define NPC_GROUP_EXPLICIT_SIZE5 | ( | npcs, | |
start, | |||
count, | |||
battle, | |||
stage ) { count, (NpcData*) &npcs[start], battle, stage + 1 } |
#define NO_DROPS |
Definition at line 23 of file npc.h.
#define STANDARD_HEART_DROPS | ( | attempts | ) |
Definition at line 29 of file npc.h.
#define GENEROUS_HEART_DROPS | ( | attempts | ) |
Definition at line 37 of file npc.h.
#define GENEROUS_WHEN_LOW_HEART_DROPS | ( | attempts | ) |
Definition at line 45 of file npc.h.
#define STANDARD_FLOWER_DROPS | ( | attempts | ) |
Definition at line 53 of file npc.h.
#define GENEROUS_WHEN_LOW_FLOWER_DROPS | ( | attempts | ) |
Definition at line 61 of file npc.h.
#define REDUCED_FLOWER_DROPS | ( | attempts | ) |
Definition at line 69 of file npc.h.
#define OVERRIDE_MOVEMENT_SPEED | ( | speed | ) | ((s32)(speed * 32767)) |
#define NO_OVERRIDE_MOVEMENT_SPEED OVERRIDE_MOVEMENT_SPEED(-1.0f) |
typedef void(* FireBarCallback) (struct FireBarData *, s32) |
typedef void AIStateHandler(Evt *script, MobileAISettings *settings, EnemyDetectVolume *territory) |
enum TerritoryShape |
s32 basic_ai_check_player_dist | ( | EnemyDetectVolume * | arg0, |
Enemy * | arg1, | ||
f32 | arg2, | ||
f32 | arg3, | ||
b8 | arg4 ) |
Definition at line 429 of file 23680.c.
Referenced by AvoidPlayerAI_Chase(), AvoidPlayerAI_ChaseInit(), basic_ai_chase(), basic_ai_loiter(), basic_ai_wander(), CleftAI_FindPlayer(), CleftAI_Hiding(), CleftAI_ReturnHome(), ClubbaNappingAI_Loiter(), ClubbaNappingAI_ReturnHome(), ClubbaNappingAI_Sleep(), FlyingAI_Loiter(), FlyingAI_Wander(), FlyingNoAttackAI_13(), GuardAI_Chase(), GuardAI_Idle(), GuardAI_ReturnHome(), HoppingAI_Chase(), HoppingAI_Hop(), HoppingAI_Loiter(), LakituAI_Loiter(), LakituAI_Wander(), MagikoopaAI_CanShootSpell(), PatrolAI_Chase(), PatrolAI_Loiter(), PatrolAI_Move(), PiranhaPlantAI_01(), PiranhaPlantAI_LosePlayer(), SentinelAI_Chase(), SentinelAI_Descend(), SentinelAI_ReturnHome(), and UnkNpcAIFunc48().
void STUB_npc_callback | ( | Npc * | npc | ) |
The default Npc::onUpdate and Npc::onRender callback.
Definition at line 49 of file npc.c.
Referenced by create_npc_impl().
void mtx_ident_mirror_y | ( | Matrix4f | mtx | ) |
Definition at line 52 of file npc.c.
Referenced by appendGfx_npc().
void clear_npcs | ( | void | ) |
Definition at line 60 of file npc.c.
Referenced by load_demo_battle(), load_engine_data(), load_map_by_IDs(), state_init_logos(), state_init_title_screen(), state_step_battle(), state_step_demo(), state_step_intro(), state_step_pause(), state_step_startup(), and state_step_title_screen().
void init_npc_list | ( | void | ) |
Points the current NPC list to the world or battle lists depending on game state.
Definition at line 77 of file npc.c.
Referenced by state_step_end_battle(), and state_step_unpause().
s32 create_npc_impl | ( | NpcBlueprint * | blueprint, |
AnimID * | animList, | ||
s32 | skipLoadingAnims ) |
Definition at line 88 of file npc.c.
Referenced by create_basic_npc(), create_peach_npc(), and create_standard_npc().
s32 create_basic_npc | ( | NpcBlueprint * | blueprint | ) |
Definition at line 190 of file npc.c.
Referenced by create_partner_npc().
s32 create_standard_npc | ( | NpcBlueprint * | blueprint, |
AnimID * | animList ) |
Definition at line 194 of file npc.c.
Referenced by create_encounters(), and peach_make_disguise_npc().
s32 create_peach_npc | ( | NpcBlueprint * | blueprint | ) |
Definition at line 198 of file npc.c.
Referenced by create_encounters().
void free_npc_by_index | ( | s32 | listIndex | ) |
Definition at line 202 of file npc.c.
Referenced by action_update_parasol(), partner_free_npc(), and peach_force_disguise_action().
void free_npc | ( | Npc * | npc | ) |
Definition at line 237 of file npc.c.
Referenced by kill_enemy().
Npc * get_npc_by_index | ( | s32 | listIndex | ) |
Definition at line 271 of file npc.c.
Referenced by action_update_parasol(), create_encounters(), create_partner_npc(), entity_HiddenPanel_flip_over(), entity_HiddenPanel_idle(), npc_do_other_npc_collision(), peach_make_disguise_npc(), peach_set_disguise_anim(), and peach_sync_disguise_npc().
void npc_do_world_collision | ( | Npc * | npc | ) |
Definition at line 278 of file npc.c.
Referenced by partner_get_out(), partner_move_to_goal(), and update_npcs().
void npc_do_other_npc_collision | ( | Npc * | npc | ) |
Definition at line 381 of file npc.c.
Referenced by update_npcs().
s32 npc_do_player_collision | ( | Npc * | npc | ) |
Definition at line 443 of file npc.c.
Referenced by update_npcs().
void npc_try_apply_gravity | ( | Npc * | npc | ) |
Definition at line 541 of file npc.c.
Referenced by update_npcs().
s32 npc_try_snap_to_ground | ( | Npc * | npc, |
f32 | velocity ) |
Definition at line 581 of file npc.c.
Referenced by partner_get_out(), and update_npcs().
void update_npcs | ( | void | ) |
Updates all NPCs.
Definition at line 617 of file npc.c.
Referenced by state_step_battle(), state_step_change_map(), state_step_enter_world(), state_step_game_over(), state_step_intro(), state_step_logos(), state_step_pause(), state_step_title_screen(), state_step_unpause(), and state_step_world().
f32 npc_get_render_yaw | ( | Npc * | npc | ) |
Definition at line 745 of file npc.c.
Referenced by appendGfx_npc().
void appendGfx_npc | ( | void * | data | ) |
Definition at line 809 of file npc.c.
Referenced by render_npcs().
void render_npcs | ( | void | ) |
Renders all NPCs.
Definition at line 933 of file npc.c.
Referenced by render_frame().
void npc_move_heading | ( | Npc * | npc, |
f32 | speed, | ||
f32 | yaw ) |
Definition at line 986 of file npc.c.
Referenced by _npc_jump_to(), AvoidPlayerAI_Chase(), basic_ai_chase(), basic_ai_wander(), BooPatrolAI_Move(), CleftAI_ReturnHome(), CleftAI_Tackle(), ClubbaNappingAI_ReturnHome(), FlyingAI_LosePlayer(), FlyingAI_Wander(), FlyingNoAttackAI_13(), GuardAI_Chase(), GuardAI_ReturnHome(), HoppingAI_Chase(), HoppingAI_Hop(), LakituAI_Wander(), MagikoopaAI_06(), npc_follow_npc(), ParatroopaAI_Dive(), ParatroopaAI_Overshoot(), partner_do_player_collision(), partner_flying_follow_player(), partner_get_out(), partner_move_to_goal(), partner_put_away(), partner_walking_follow_player(), PatrolAI_Chase(), PatrolAI_Move(), PiranhaPlantAI_10(), player_jump(), SentinelAI_Chase(), SentinelAI_ReturnHome(), ShyGuyPatrolAI_15(), ShyGuyPatrolAI_16(), ShyGuyWanderAI_15(), ShyGuyWanderAI_16(), UnkNpcAIFunc12(), update_riding_physics(), and update_riding_physics().
Npc * get_npc_unsafe | ( | s32 | npcID | ) |
Definition at line 995 of file npc.c.
Referenced by ai_check_player_dist(), ai_suspend_for_time(), ai_try_set_state(), AvoidPlayerAI_Chase(), AvoidPlayerAI_ChaseInit(), AvoidPlayerAI_LosePlayer(), basic_ai_chase(), basic_ai_chase_init(), basic_ai_check_player_dist(), basic_ai_found_player_jump(), basic_ai_found_player_jump_init(), basic_ai_loiter(), basic_ai_loiter_init(), basic_ai_lose_player(), basic_ai_suspend(), basic_ai_wander(), basic_ai_wander_init(), BooPatrolAI_Loiter(), BooPatrolAI_Move(), can_dismount(), check_conversation_trigger(), CleftAI_Ambush(), CleftAI_CanSeePlayer(), CleftAI_Disguise(), CleftAI_DisguiseInit(), CleftAI_FindPlayer(), CleftAI_FindPlayerInit(), CleftAI_Hiding(), CleftAI_HidingInit(), CleftAI_LosePlayer(), CleftAI_PostDisguise(), CleftAI_PreAmbush(), CleftAI_ReturnHome(), CleftAI_RevUp(), CleftAI_RevUpInit(), CleftAI_Tackle(), ClubbaNappingAI_FallAsleep(), ClubbaNappingAI_Init(), ClubbaNappingAI_Loiter(), ClubbaNappingAI_LoiterInit(), ClubbaNappingAI_ReturnHome(), ClubbaNappingAI_ReturnHomeInit(), ClubbaNappingAI_Sleep(), ClubbaNappingAI_WakeUp(), draw_encounters_pre_battle(), FlyingAI_Chase(), FlyingAI_ChaseInit(), FlyingAI_Jump(), FlyingAI_JumpInit(), FlyingAI_Loiter(), FlyingAI_LoiterInit(), FlyingAI_LosePlayer(), FlyingAI_Wander(), FlyingAI_WanderInit(), FlyingMagikoopaAI_10(), FlyingMagikoopaAI_11(), FlyingMagikoopaAI_15(), FlyingMagikoopaAI_16(), FlyingMagikoopaAI_17(), FlyingMagikoopaAI_20(), FlyingMagikoopaAI_21(), FlyingMagikoopaAI_22(), FlyingMagikoopaAI_23(), FlyingMagikoopaAI_24(), FlyingMagikoopaAI_50(), FlyingNoAttackAI_12(), FlyingNoAttackAI_13(), FlyingNoAttackAI_20(), func_80048F0C(), get_npc_pos(), GrooveGuyAI_02(), GrooveGuyAI_03(), GuardAI_Alert(), GuardAI_AlertInit(), GuardAI_Chase(), GuardAI_ChaseInit(), GuardAI_Idle(), GuardAI_IdleInit(), GuardAI_LosePlayer(), GuardAI_ReturnHome(), GuardAI_ReturnHomeInit(), HoppingAI_Chase(), HoppingAI_ChaseInit(), HoppingAI_Hop(), HoppingAI_HopInit(), HoppingAI_Loiter(), HoppingAI_LoiterInit(), HoppingAI_LosePlayer(), kill_enemy(), LakituAI_Loiter(), LakituAI_Wander(), MagikoopaAI_00(), MagikoopaAI_01(), MagikoopaAI_05(), MagikoopaAI_06(), MagikoopaAI_10(), MagikoopaAI_11(), MagikoopaAI_20(), MagikoopaAI_21(), MagikoopaAI_22(), MagikoopaAI_23(), MagikoopaAI_24(), MagikoopaAI_CanShootSpell(), MeleeHitbox_30(), MeleeHitbox_31(), MeleeHitbox_32(), MeleeHitbox_33(), MeleeHitbox_CanSeePlayer(), ParatroopaAI_Dive(), ParatroopaAI_Overshoot(), ParatroopaAI_Reset(), ParatroopaAI_Windup(), PatrolAI_Chase(), PatrolAI_ChaseInit(), PatrolAI_Jump(), PatrolAI_JumpInit(), PatrolAI_Loiter(), PatrolAI_LoiterInit(), PatrolAI_LosePlayer(), PatrolAI_Move(), PatrolAI_MoveInit(), PatrolAI_PostLoiter(), PatrolNoAttackAI_15(), PiranhaPlantAI_00(), PiranhaPlantAI_01(), PiranhaPlantAI_10(), PiranhaPlantAI_11(), PiranhaPlantAI_12(), PiranhaPlantAI_13(), PiranhaPlantAI_LosePlayer(), ProjectileHitbox_30(), ProjectileHitbox_31(), ProjectileHitbox_32(), ProjectileHitbox_33(), ProjectileHitbox_GetUsableProjectileID(), reset_outta_sight_alpha_on_menu_close(), SentinelAI_Chase(), SentinelAI_ChaseInit(), SentinelAI_Descend(), SentinelAI_DescendInit(), SentinelAI_GrabPlayer(), SentinelAI_LosePlayer(), SentinelAI_LosePlayerInit(), SentinelAI_PostLosePlayer(), SentinelAI_ReturnHome(), SentinelAI_ReturnHomeInit(), set_script_owner_npc_anim(), set_script_owner_npc_col_height(), ShyGuyPatrolAI_14(), ShyGuyPatrolAI_15(), ShyGuyPatrolAI_16(), ShyGuyPatrolAI_17(), ShyGuyWanderAI_14(), ShyGuyWanderAI_15(), ShyGuyWanderAI_16(), ShyGuyWanderAI_17(), spawn_drops(), SpearGuyAI_Loiter(), SpearGuyAI_LoiterInit(), StoneChompAI_ChaseInit(), StoneChompAI_HopInit(), sync_player_position(), UnkDistFunc(), UnkNpcAIFunc12(), UnkNpcAIFunc48(), update_encounters_neutral(), update_encounters_post_battle(), and update_player().
Npc * get_npc_safe | ( | s32 | npcID | ) |
Definition at line 1010 of file npc.c.
Referenced by resolve_npc(), sfx_play_sound_at_npc(), and unkVtxFunc001().
void enable_npc_shadow | ( | Npc * | npc | ) |
Definition at line 1027 of file npc.c.
Referenced by CleftAI_PreAmbush(), and MagikoopaAI_11().
void disable_npc_shadow | ( | Npc * | npc | ) |
Definition at line 1037 of file npc.c.
Referenced by action_update_use_tweester(), CleftAI_HidingInit(), MagikoopaAI_01(), and peach_make_disguise_npc().
void update_npc_blur | ( | Npc * | npc | ) |
Definition at line 1097 of file npc.c.
Referenced by update_npcs().
void appendGfx_npc_blur | ( | void * | npc | ) |
Definition at line 1113 of file npc.c.
Referenced by render_npcs().
void npc_enable_collisions | ( | void | ) |
void npc_disable_collisions | ( | void | ) |
void func_8003B1A8 | ( | void | ) |
Definition at line 1205 of file npc.c.
Referenced by state_step_battle(), and state_step_pause().
void npc_reload_all | ( | void | ) |
Definition at line 1208 of file npc.c.
Referenced by state_step_end_battle(), and state_step_unpause().
void set_npc_yaw | ( | Npc * | npc, |
f32 | yaw ) |
Definition at line 1246 of file npc.c.
Referenced by create_encounters(), GrooveGuyAI_02(), GrooveGuyAI_03(), peach_make_disguise_npc(), SpearGuyAI_Loiter(), and SpearGuyAI_LoiterInit().
void npc_set_palswap_mode_A | ( | Npc * | npc, |
s32 | arg1 ) |
void npc_set_palswap_mode_B | ( | Npc * | npc, |
s32 | arg1 ) |
void npc_revert_palswap_mode | ( | Npc * | npc | ) |
void npc_set_palswap_1 | ( | Npc * | npc, |
s32 | palIndexA, | ||
s32 | palIndexB, | ||
s32 | timeHoldA, | ||
s32 | timeAB ) |
Definition at line 1287 of file npc.c.
void npc_set_palswap_2 | ( | Npc * | npc, |
s32 | timeHoldB, | ||
s32 | timeBA, | ||
s32 | palIndexC, | ||
s32 | palIndexD ) |
Definition at line 1294 of file npc.c.
Definition at line 1301 of file npc.c.
Referenced by appendGfx_npc().
Definition at line 1321 of file npc.c.
Referenced by npc_draw_with_palswap().
Definition at line 1343 of file npc.c.
Referenced by npc_draw_with_palswap().
u16 npc_blend_palette_colors | ( | u16 | colorA, |
u16 | colorB, | ||
s32 | lerpAlpha ) |
Definition at line 1439 of file npc.c.
Referenced by npc_render_with_double_pal_blending(), and npc_render_with_single_pal_blending().
s32 npc_render_with_single_pal_blending | ( | Npc * | npc, |
s32 | yaw, | ||
s32 | hasDifferentIntervals, | ||
Matrix4f | mtx ) |
Definition at line 1448 of file npc.c.
Referenced by npc_draw_with_palswap().
Definition at line 1584 of file npc.c.
Referenced by npc_draw_with_palswap().
void npc_set_decoration | ( | Npc * | npc, |
s32 | idx, | ||
s32 | decorationType ) |
Definition at line 1734 of file npc.c.
void npc_remove_decoration | ( | Npc * | npc, |
s32 | idx ) |
Definition at line 1741 of file npc.c.
Referenced by free_npc(), free_npc_by_index(), and npc_set_decoration().
s32 npc_update_decorations | ( | Npc * | npc | ) |
Definition at line 1768 of file npc.c.
Referenced by update_npcs().
void npc_reset_current_decoration | ( | Npc * | npc, |
s32 | idx ) |
Definition at line 1798 of file npc.c.
Referenced by npc_reload_all().
void npc_update_decoration_none | ( | Npc * | npc, |
s32 | idx ) |
void npc_remove_decoration_none | ( | Npc * | npc, |
s32 | idx ) |
void npc_update_decoration_bowser_aura | ( | Npc * | npc, |
s32 | idx ) |
Definition at line 1819 of file npc.c.
Referenced by npc_update_decorations().
void npc_remove_decoration_bowser_aura | ( | Npc * | npc, |
s32 | idx ) |
void npc_update_decoration_sweat | ( | Npc * | npc, |
s32 | idx ) |
Definition at line 1843 of file npc.c.
Referenced by npc_update_decorations().
void npc_remove_decoration_sweat | ( | Npc * | npc, |
s32 | idx ) |
void npc_update_decoration_seeing_stars | ( | Npc * | npc, |
s32 | idx ) |
Definition at line 1867 of file npc.c.
Referenced by npc_update_decorations().
void npc_remove_decoration_seeing_stars | ( | Npc * | npc, |
s32 | idx ) |
void npc_update_decoration_glow_in_front | ( | Npc * | npc, |
s32 | idx ) |
Definition at line 1888 of file npc.c.
Referenced by npc_update_decorations().
void npc_remove_decoration_glow_in_front | ( | Npc * | npc, |
s32 | idx ) |
Definition at line 1906 of file npc.c.
Referenced by npc_remove_decoration().
void npc_update_decoration_glow_behind | ( | Npc * | npc, |
s32 | idx ) |
Definition at line 1910 of file npc.c.
Referenced by npc_update_decorations().
void npc_remove_decoration_glow_behind | ( | Npc * | npc, |
s32 | idx ) |
Definition at line 1928 of file npc.c.
Referenced by npc_remove_decoration().
void npc_update_decoration_charged | ( | Npc * | npc, |
s32 | idx ) |
Definition at line 1932 of file npc.c.
Referenced by npc_update_decorations().
void npc_remove_decoration_charged | ( | Npc * | npc, |
s32 | idx ) |
Npc * npc_find_closest | ( | f32 | x, |
f32 | y, | ||
f32 | z, | ||
f32 | radius ) |
Finds the closest NPC to a given point within a radius.
Ignores Y position.
NPCs with NPC_FLAG_PARTNER set are ignored. See also npc_find_closest_simple(), which requires that NPC_FLAG_PARTNER be set.
x | X position |
y | Y position (unused) |
z | Z position |
radius | No NPCs further than this distance will be considered |
Definition at line 1969 of file npc.c.
Referenced by parasol_get_npc().
Npc * npc_find_closest_simple | ( | f32 | x, |
f32 | y, | ||
f32 | z, | ||
f32 | radius ) |
Finds the closest simple-hitbox NPC to a given point within a radius.
Ignores Y position.
Only NPCs with NPC_FLAG_PARTNER set are considered. See also npc_find_closest(), which requires that NPC_FLAG_PARTNER be unset.
x | X position |
y | Y position (unused) |
z | Z position |
radius | No NPCs further than this distance will be considered |
Definition at line 1995 of file npc.c.
Referenced by entity_Tweester_idle().
s32 npc_get_collider_below | ( | Npc * | npc | ) |
Definition at line 2069 of file npc.c.
Referenced by npc_find_standing_on_entity().
void npc_imgfx_update | ( | Npc * | npc | ) |
Definition at line 2093 of file npc.c.
Referenced by appendGfx_npc_blur(), npc_reload_all(), and npc_set_imgfx_params().
void npc_set_imgfx_params | ( | Npc * | npc, |
s32 | arg1, | ||
s32 | arg2, | ||
s32 | arg3, | ||
s32 | arg4, | ||
s32 | arg5, | ||
s32 | arg6 ) |
Definition at line 2162 of file npc.c.
Referenced by end_outta_sight_cleanup(), reset_outta_sight_alpha_on_menu_close(), and update_riding_physics().
void npc_surface_spawn_fx | ( | Npc * | npc, |
SurfaceInteractMode | mode ) |
Definition at line 394 of file surfaces.c.
Referenced by _npc_jump_to(), AvoidPlayerAI_Chase(), basic_ai_chase(), CleftAI_Tackle(), GuardAI_Chase(), partner_get_out(), partner_move_to_goal(), partner_walking_follow_player(), PatrolAI_Chase(), PatrolAI_Move(), player_jump(), and update_riding_physics().
void spawn_default_surface_effects | ( | Npc * | npc, |
SurfaceInteractMode | mode ) |
void spawn_flower_surface_effects | ( | Npc * | npc, |
SurfaceInteractMode | mode ) |
void spawn_cloud_surface_effects | ( | Npc * | npc, |
SurfaceInteractMode | mode ) |
void spawn_snow_surface_effects | ( | Npc * | npc, |
SurfaceInteractMode | mode ) |
void spawn_hedge_surface_effects | ( | Npc * | npc, |
SurfaceInteractMode | mode ) |
void spawn_water_surface_effects | ( | Npc * | npc, |
SurfaceInteractMode | mode ) |
void COPY_set_defeated | ( | s32 | mapID, |
s32 | encounterID ) |
Duplicate of set_defeated().
Definition at line 2172 of file npc.c.
Referenced by kill_enemy().
void init_encounter_status | ( | void | ) |
Definition at line 2191 of file npc.c.
Referenced by load_engine_data(), state_step_demo(), state_step_intro(), and state_step_startup().
void clear_encounter_status | ( | void | ) |
Definition at line 2224 of file npc.c.
Referenced by load_demo_battle(), and load_map_by_IDs().
void func_8003E514 | ( | s8 | arg0 | ) |
Definition at line 2266 of file npc.c.
Referenced by btl_state_update_end_battle().
void update_encounters | ( | void | ) |
Definition at line 2270 of file npc.c.
Referenced by state_step_battle(), state_step_change_map(), state_step_enter_world(), state_step_game_over(), state_step_intro(), state_step_pause(), state_step_unpause(), and state_step_world().
void draw_encounter_ui | ( | void | ) |
Definition at line 2294 of file npc.c.
Referenced by state_drawUI_battle(), and state_drawUI_world().
void draw_first_strike_ui | ( | void | ) |
Definition at line 2318 of file npc.c.
Referenced by state_world_draw_aux_ui().
void npc_render_worker_do_nothing | ( | void | ) |
Definition at line 2328 of file npc.c.
Referenced by clear_encounter_status(), and init_encounter_status().
void make_npcs | ( | s32 | flags, |
s32 | mapID, | ||
s32 * | npcGroupList ) |
Definition at line 2331 of file npc.c.
s32 kill_encounter | ( | Enemy * | enemy | ) |
Definition at line 2361 of file npc.c.
void kill_enemy | ( | Enemy * | enemy | ) |
Definition at line 2374 of file npc.c.
Referenced by kill_encounter(), and update_encounters_post_battle().
Binds the specified ai script to the specified enemy.
enemy | pointer to the enemy to bind the script to |
aiScriptBytecode | pointer to the script to be bound. |
Definition at line 2441 of file npc.c.
Referenced by bind_npc_ai().
Binds the specified auxillary script to the specified enemy.
enemy | pointer to the enemy to bind the script to |
auxScriptBytecode | pointer to the script to be bound. |
Definition at line 2455 of file npc.c.
Referenced by bind_npc_aux().
Binds the specified interact script to the specified enemy.
enemy | pointer to the enemy to bind the script to |
interactScriptBytecode | pointer to the script to be bound. |
Definition at line 2469 of file npc.c.
Referenced by bind_npc_interact().
void bind_npc_ai | ( | s32 | npcID, |
EvtScript * | npcAiBytecode ) |
Binds the specified ai script to the npc matching the specified npcId.
npcID | ID of the desired npc |
npcAiBytecode | pointer to the script to be bound. |
Definition at line 2483 of file npc.c.
void bind_npc_aux | ( | s32 | npcID, |
EvtScript * | npcAuxBytecode ) |
Binds the specified auxillary script to the npc matching the specified npcId.
npcID | ID of the desired npc |
npcAuxBytecode | pointer to the script to be bound. |
Definition at line 2502 of file npc.c.
void bind_npc_interact | ( | s32 | npcID, |
EvtScript * | npcInteractBytecode ) |
Binds the specified interact script to the npc matching the specified npcId.
npcID | ID of the desired npc |
npcInteractBytecode | pointer to the script to be bound. |
Definition at line 2521 of file npc.c.
Enemy * get_enemy | ( | s32 | npcID | ) |
Looks for an enemy matching the specified npcID.
npcID | ID of the npc bound to the desired enemy. |
Definition at line 2540 of file npc.c.
Referenced by ai_enemy_play_sound(), FlyingMagikoopaAI_23(), LakituAI_GetAvailableSpiny(), MagikoopaAI_23(), MagikoopaAI_CanShootSpell(), MeleeHitbox_CanSeePlayer(), ProjectileHitbox_30(), ProjectileHitbox_32(), ProjectileHitbox_GetUsableProjectileID(), SentinelAI_DescendInit(), set_npc_animation(), and UnkNpcAIFunc48().
Enemy * get_enemy_safe | ( | s32 | npcID | ) |
Same as get_enemy(), with the exception of always returning a value if an enemy is not found.
npcID | ID of the npc bound to the desired enemy. |
Definition at line 2559 of file npc.c.
Definition at line 1048 of file npc.c.
|
extern |
Definition at line 176 of file encounter.c.
Referenced by bind_npc_ai(), bind_npc_aux(), bind_npc_interact(), btl_merlee_on_first_strike(), btl_merlee_on_start_turn(), btl_state_draw_end_battle(), btl_state_update_defeat(), btl_state_update_end_battle(), btl_state_update_end_training_battle(), btl_state_update_first_strike(), btl_state_update_normal_start(), btl_state_update_run_away(), btl_state_update_victory(), check_conversation_trigger(), clear_encounter_status(), COPY_set_defeated(), create_encounters(), draw_encounters_post_battle(), draw_encounters_pre_battle(), fio_serialize_state(), func_8003E514(), func_80048F0C(), get_coin_drop_amount(), get_defeated(), get_enemy(), get_enemy_safe(), init_encounter_status(), is_starting_conversation(), kill_encounter(), kill_enemy(), load_demo_battle(), make_npcs(), set_defeated(), show_first_strike_message(), spawn_drops(), start_battle(), test_item_player_collision(), update_encounters_conversation(), update_encounters_neutral(), update_encounters_post_battle(), update_encounters_pre_battle(), ver_deserialize_standard(), and ver_deserialize_vanilla_save().