8#ifdef _LANGUAGE_C_PLUS_PLUS
13#define NPC_GROUP(args...) VFUNC(NPC_GROUP, args)
14#define NPC_GROUP1(npcs) { sizeof(npcs) / sizeof(NpcData), (NpcData*) &npcs, 0, 0 }
15#define NPC_GROUP2(npcs, battle) { sizeof(npcs) / sizeof(NpcData), (NpcData*) &npcs, battle, 0 }
16#define NPC_GROUP3(npcs, battle, stage) { sizeof(npcs) / sizeof(NpcData), (NpcData*) &npcs, battle, stage + 1 }
18#define NPC_GROUP_EXPLICIT_SIZE(args...) VFUNC(NPC_GROUP_EXPLICIT_SIZE, args)
19#define NPC_GROUP_EXPLICIT_SIZE3(npcs, start, count) { count, (NpcData*) &npcs[start], 0, 0 }
20#define NPC_GROUP_EXPLICIT_SIZE4(npcs, start, count, battle) { count, (NpcData*) &npcs[start], battle, 0 }
21#define NPC_GROUP_EXPLICIT_SIZE5(npcs, start, count, battle, stage) { count, (NpcData*) &npcs[start], battle, stage + 1 }
24 .dropFlags = NPC_DROP_FLAG_80, \
25 .heartDrops = { { F16(100), F16(0), 0, F16(0) } }, \
26 .flowerDrops = { { F16(100), F16(0), 0, F16(0) } }, \
29#define STANDARD_HEART_DROPS(attempts) { \
30 { F16(20), F16(70), attempts, F16(50) }, \
31 { F16(30), F16(60), attempts, F16(50) }, \
32 { F16(50), F16(50), attempts, F16(40) }, \
33 { F16(80), F16(40), attempts, F16(40) }, \
34 { F16(100), F16(30), attempts, F16(30) }, \
37#define GENEROUS_HEART_DROPS(attempts) { \
38 { F16(20), F16(80), attempts, F16(50) }, \
39 { F16(30), F16(70), attempts, F16(50) }, \
40 { F16(50), F16(60), attempts, F16(40) }, \
41 { F16(80), F16(50), attempts, F16(40) }, \
42 { F16(100), F16(40), attempts, F16(30) }, \
45#define GENEROUS_WHEN_LOW_HEART_DROPS(attempts) { \
46 { F16(20), F16(80), attempts, F16(60) }, \
47 { F16(30), F16(70), attempts, F16(50) }, \
48 { F16(50), F16(60), attempts, F16(50) }, \
49 { F16(80), F16(50), attempts, F16(40) }, \
50 { F16(100), F16(30), attempts, F16(30) }, \
53#define STANDARD_FLOWER_DROPS(attempts) { \
54 { F16(20), F16(50), attempts, F16(40) }, \
55 { F16(30), F16(40), attempts, F16(40) }, \
56 { F16(50), F16(40), attempts, F16(40) }, \
57 { F16(80), F16(40), attempts, F16(40) }, \
58 { F16(100), F16(30), attempts, F16(40) }, \
61#define GENEROUS_WHEN_LOW_FLOWER_DROPS(attempts) { \
62 { F16(20), F16(70), attempts, F16(50) }, \
63 { F16(30), F16(60), attempts, F16(50) }, \
64 { F16(50), F16(50), attempts, F16(40) }, \
65 { F16(80), F16(40), attempts, F16(40) }, \
66 { F16(100), F16(30), attempts, F16(40) }, \
69#define REDUCED_FLOWER_DROPS(attempts) { \
70 { F16(20), F16(40), attempts, F16(40) }, \
71 { F16(30), F16(40), attempts, F16(40) }, \
72 { F16(50), F16(40), attempts, F16(40) }, \
73 { F16(80), F16(40), attempts, F16(40) }, \
74 { F16(100), F16(30), attempts, F16(40) }, \
77#define OVERRIDE_MOVEMENT_SPEED(speed) ((s32)(speed * 32767))
78#define NO_OVERRIDE_MOVEMENT_SPEED OVERRIDE_MOVEMENT_SPEED(-1.0f)
328 void* varTablePtr[16];
664#ifdef _LANGUAGE_C_PLUS_PLUS
void npc_render_without_adjusted_palettes(Npc *npc, s32 arg1, Matrix4f mtx)
s8 resetMapEncounterFlags
s32 npc_try_snap_to_ground(Npc *npc, f32 velocity)
void npc_update_decoration_charged(Npc *npc, s32 idx)
void appendGfx_npc_blur(void *npc)
s32 create_basic_npc(NpcBlueprint *blueprint)
void npc_update_decoration_seeing_stars(Npc *npc, s32 idx)
void npc_remove_decoration_glow_in_front(Npc *npc, s32 idx)
enum TerritoryShape shape
struct Evt * interactScript
void npc_imgfx_update(Npc *npc)
s8 scriptedBattle
battle started by StartBattle but not by encounter
void spawn_flower_surface_effects(Npc *npc, SurfaceInteractMode mode)
enum TerritoryShape detectShape
s32 basic_ai_check_player_dist(EnemyDetectVolume *arg0, Enemy *arg1, f32 arg2, f32 arg3, b8 arg4)
void npc_set_palswap_mode_B(Npc *npc, s32 arg1)
s32 bind_enemy_ai(Enemy *enemy, EvtScript *aiScriptBytecode)
Binds the specified ai script to the specified enemy.
struct NpcData::@52 animations
void npc_reload_all(void)
s32 bind_enemy_aux(Enemy *enemy, EvtScript *auxScriptBytecode)
Binds the specified auxillary script to the specified enemy.
Enemy * get_enemy_safe(s32 npcID)
Same as get_enemy(), with the exception of always returning a value if an enemy is not found.
FieldStatus unusedAttack3
void npc_surface_spawn_fx(Npc *npc, SurfaceInteractMode mode)
void npc_remove_decoration_sweat(Npc *npc, s32 idx)
FieldStatus unusedAttack1
void kill_enemy(Enemy *enemy)
void spawn_snow_surface_effects(Npc *npc, SurfaceInteractMode mode)
Enemy * get_enemy(s32 npcID)
Looks for an enemy matching the specified npcID.
void npc_do_other_npc_collision(Npc *npc)
void bind_npc_ai(s32 npcID, EvtScript *npcAiBytecode)
Binds the specified ai script to the npc matching the specified npcId.
s32 requiredStoryProgress
s32 npc_render_with_double_pal_blending(Npc *, s32, Matrix4f mtx)
void npc_disable_collisions(void)
void npc_set_palswap_1(Npc *npc, s32 palIndexA, s32 palIndexB, s32 timeHoldA, s32 timeAB)
void spawn_default_surface_effects(Npc *npc, SurfaceInteractMode mode)
void enable_npc_shadow(Npc *npc)
void npc_remove_decoration_bowser_aura(Npc *npc, s32 idx)
Encounter * encounterList[24]
s32 create_peach_npc(NpcBlueprint *blueprint)
void npc_try_apply_gravity(Npc *npc)
s8 battleTriggerCooldown
set to 15 after victory, 45 after fleeing
void update_encounters(void)
void npc_draw_with_palswap(Npc *npc, s32 arg1, Matrix4f mtx)
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.
FireBarAISettings * settings
s32 create_standard_npc(NpcBlueprint *blueprint, AnimID *animList)
void init_npc_list(void)
Points the current NPC list to the world or battle lists depending on game state.
void spawn_cloud_surface_effects(Npc *npc, SurfaceInteractMode mode)
void disable_npc_shadow(Npc *npc)
void free_npc_by_index(s32 listIndex)
void func_8003E514(s8 arg0)
void npc_set_imgfx_params(Npc *npc, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6)
void npc_revert_palswap_mode(Npc *npc)
struct Evt * defeatScript
s16 chancePerAttempt
% chance for a single heart/flower to be dropped from each attempt.
void make_npcs(s32 flags, s32 mapID, s32 *npcGroupList)
void npc_set_decoration(Npc *npc, s32 idx, s32 decorationType)
void render_npcs(void)
Renders all NPCs.
Npc * get_npc_unsafe(s32 npcID)
void spawn_water_surface_effects(Npc *npc, SurfaceInteractMode mode)
void npc_set_palswap_2(Npc *npc, s32 timeHoldB, s32 timeBA, s32 palIndexC, s32 palIndexD)
void npc_enable_collisions(void)
void npc_render_worker_do_nothing(void)
void npc_remove_decoration_none(Npc *npc, s32 idx)
void(* FireBarCallback)(struct FireBarData *, s32)
void npc_update_decoration_glow_in_front(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.
void npc_reset_current_decoration(Npc *npc, s32 idx)
s32 npc_update_decorations(Npc *npc)
void mtx_ident_mirror_y(Matrix4f mtx)
s16 generalChance
% chance for any hearts/flowers to be dropped at all from this StatDrop.
void npc_do_world_collision(Npc *npc)
void bind_npc_aux(s32 npcID, EvtScript *npcAuxBytecode)
Binds the specified auxillary script to the npc matching the specified npcId.
EnemyTerritoryPatrol patrol
EvtScript * interactBytecode
void update_npcs(void)
Updates all NPCs.
s32 kill_encounter(Enemy *enemy)
void bind_npc_interact(s32 npcID, EvtScript *npcInteractBytecode)
Binds the specified interact script to the npc matching the specified npcId.
s16 attempts
Maximum number of hearts/flowers that can be dropped from this StatDrop.
void npc_set_palswap_mode_A(Npc *npc, s32 arg1)
Npc * get_npc_by_index(s32 listIndex)
void clear_encounter_status(void)
void draw_first_strike_ui(void)
NpcSettings * npcSettings
void npc_remove_decoration(Npc *npc, s32 idx)
EncounterStatus gCurrentEncounter
void npc_update_decoration_bowser_aura(Npc *npc, s32 idx)
s32 npc_render_with_watt_idle_palettes(Npc *, s32, Matrix4f mtx)
void AIStateHandler(Evt *script, MobileAISettings *settings, EnemyDetectVolume *territory)
enum TerritoryShape wanderShape
s32 npc_render_with_single_pal_blending(Npc *, s32, s32, Matrix4f mtx)
void npc_remove_decoration_glow_behind(Npc *npc, s32 idx)
FieldStatus unusedAttack2
s16 cutoff
% of max HP/FP. If current HP/FP > cutoff, no hearts/flowers can be dropped.
f32 npc_get_render_yaw(Npc *npc)
s32 npc_do_player_collision(Npc *npc)
void npc_remove_decoration_charged(Npc *npc, s32 idx)
void npc_move_heading(Npc *npc, f32 speed, f32 yaw)
void update_npc_blur(Npc *npc)
s32 create_npc_impl(NpcBlueprint *blueprint, AnimID *animList, s32 skipLoadingAnims)
void appendGfx_npc(void *data)
void spawn_hedge_surface_effects(Npc *npc, SurfaceInteractMode mode)
void COPY_set_defeated(s32 mapID, s32 encounterID)
Duplicate of set_defeated().
u16 npc_blend_palette_colors(u16 colorA, u16 colorB, s32 lerpAlpha)
void draw_encounter_ui(void)
void set_npc_yaw(Npc *npc, f32 yaw)
s32 npc_get_collider_below(Npc *npc)
void set_npc_sprite(Npc *npc, s32 anim, AnimID *extraAnimList)
s32 skipPlayerDetectChance
void init_encounter_status(void)
void STUB_npc_callback(Npc *)
The default Npc::onUpdate and Npc::onRender callback.
EvtScript * defeatBytecode
void npc_update_decoration_glow_behind(Npc *npc, s32 idx)
EnemyTerritoryWander wander
void npc_update_decoration_sweat(Npc *npc, s32 idx)
void npc_remove_decoration_seeing_stars(Npc *npc, s32 idx)
s32 bind_enemy_interact(Enemy *enemy, EvtScript *interactScriptBytecode)
Binds the specified interact script to the specified enemy.
enum TerritoryShape detectShape
void npc_update_decoration_none(Npc *npc, s32 idx)
EnemyTerritory * territory
Npc * get_npc_safe(s32 npcID)
Describes heart/flower drop chances after defeating an Npc in the overworld.
void(* onRender)(struct Npc *)
void(* onUpdate)(struct Npc *)