papermario
Decompilation of Paper Mario
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Loading...
Searching...
No Matches
190B20.c File Reference

Macros

#define CHECK_DEFENSE(element)
 

Functions

s32 get_npc_anim_for_status (AnimID *, s32)
 
void create_target_list (Actor *actor, b32 targetHomePos)
 
void set_actor_pal_adjustment (Actor *actor, s32 palAdjust)
 
void create_current_pos_target_list (Actor *actor)
 
void create_home_target_list (Actor *actor)
 
s32 func_80263064 (Actor *actor, Actor *targetActor, b32 unused)
 
s32 func_80263230 (Actor *actor, Actor *targetActor)
 
s32 func_8026324C (Actor *actor, Actor *targetActor)
 
void func_80263268 (void)
 
void func_80263300 (void)
 
s32 btl_are_all_enemies_defeated (void)
 
s32 btl_check_enemies_defeated (void)
 
s32 btl_check_player_defeated (void)
 
void btl_init_menu_boots (void)
 
void btl_init_menu_hammer (void)
 
void btl_init_menu_partner (void)
 
s32 count_power_plus (s32 damageType)
 
void deduct_current_move_fp (void)
 
void reset_actor_turn_info (void)
 
void shake_battle_cam_pitch (s32 initialDelay)
 
void set_actor_anim (s32 actorID, s32 partID, AnimID animID)
 
void set_actor_anim_by_ref (Actor *actor, ActorPart *part, AnimID anim)
 
void set_actor_anim_rate (s32 actorID, s32 partID, f32 rate)
 
void set_actor_yaw (s32 actorID, s32 yaw)
 
void set_part_yaw (s32 actorID, s32 partID, s32 value)
 
void set_part_flag_bits (s32 actorID, s32 partID, s32 flags)
 
void clear_part_flag_bits (s32 actorID, s32 partID, s32 flags)
 
void add_xz_vec3f (Vec3f *vector, f32 speed, f32 angleDeg)
 
void add_xz_vec3f_copy1 (Vec3f *vector, f32 speed, f32 angleDeg)
 
void add_xz_vec3f_copy2 (Vec3f *vector, f32 speed, f32 angleDeg)
 
void play_movement_dust_effects (s32 var0, f32 xPos, f32 yPos, f32 zPos, f32 angleDeg)
 
ActorPartget_actor_part (Actor *actor, s32 partID)
 
void load_player_actor (void)
 
void load_partner_actor (void)
 
Actorcreate_actor (Formation formation)
 
s32 get_player_anim_for_status (s32 statusKey)
 
s32 lookup_defense (s32 *defenseTable, s32 elementKey)
 
s32 lookup_status_chance (s32 *statusTable, s32 statusKey)
 
s32 lookup_status_duration_mod (s32 *statusTable, s32 statusKey)
 
s32 inflict_status (Actor *target, s32 statusTypeKey, s32 duration)
 
s32 inflict_partner_ko (Actor *target, s32 statusTypeKey, s32 duration)
 
s32 get_defense (Actor *actor, s32 *defenseTable, s32 elementFlags)
 
void show_primary_damage_popup (f32 posX, f32 posY, f32 posZ, s32 damageAmt, b32 angle)
 
void show_next_damage_popup (f32 posX, f32 posY, f32 posZ, s32 damageAmt, b32 angle)
 
void update_damage_popups (void)
 
void show_damage_fx (Actor *actor, f32 x, f32 y, f32 z, s32 damage)
 
void show_action_rating (s32 rating, Actor *actor, f32 x, f32 y, f32 z)
 
void func_80266970 (Actor *target)
 
void update_action_ratings (void)
 
void show_actor_health_bar (Actor *target)
 
void hide_actor_health_bar (Actor *target)
 
void update_health_bars (void)
 
s32 try_inflict_status (Actor *actor, s32 statusTypeKey, s32 statusKey)
 
s32 inflict_status_set_duration (Actor *actor, s32 statusTypeKey, s32 statusDurationKey, s32 duration)
 
void set_part_pal_adjustment (ActorPart *part, s32 palAdjust)
 
void clear_part_pal_adjustment (ActorPart *part)
 
void clear_actor_static_pal_adjustments (Actor *actor)
 
void set_part_glow_pal (ActorPart *part, s32 glowState)
 
void set_actor_glow_pal (Actor *actor, s32 glowState)
 
void clear_part_glow_pal (ActorPart *part)
 
void clear_actor_glow_pal (Actor *actor)
 
void set_part_flash_mode (ActorPart *part, s32 flashState)
 
void set_actor_flash_mode (Actor *actor, s32 flashState)
 
void clear_part_flash_mode (ActorPart *part)
 
void clear_actor_flash_mode (Actor *actor)
 
void add_part_decoration (ActorPart *part, s32 decorationIndex, s32 decorationType)
 
void add_actor_decoration (Actor *actor, s32 decorationIndex, s32 decorationType)
 
void remove_part_decoration (ActorPart *part, s32 decorationIndex)
 
void remove_actor_decoration (Actor *actor, s32 decorationIndex)
 
s32 player_team_is_ability_active (Actor *actor, s32 ability)
 
void create_part_shadow (s32 actorID, s32 partID)
 
void remove_part_shadow (s32 actorID, s32 partID)
 
void create_part_shadow_by_ref (UNK_TYPE arg0, ActorPart *part)
 
void remove_player_buffs (s32 buffs)
 
void btl_update_ko_status (void)
 
void btl_appendGfx_prim_quad (u8 r, u8 g, u8 b, u8 a, u16 left, u16 top, u16 right, u16 bottom)
 
void btl_draw_prim_quad (u8 r, u8 g, u8 b, u8 a, u16 left, u16 top, u16 arg6, u16 arg7)
 
void reset_all_actor_sounds (Actor *actor)
 
void hide_foreground_models_unchecked (void)
 
void show_foreground_models_unchecked (void)
 
void hide_foreground_models (void)
 
void show_foreground_models (void)
 
void start_rumble_type (u32 type)
 

Variables

EvtScript EVS_ShakeBattleCamPitch
 
f32 D_802938A4 = 0.0f
 
s16 D_802938A8 = 4
 
EffectInstancegDamageCountEffects []
 
s32 gDamageCountTimers []
 
Gfx D_80293970 []
 
s32 bCurRumbleScript = 0
 
s32 bMarioDefenseTable []
 
s32 bPlayerStatusTable []
 
ActorBlueprint bPlayerActorBlueprint
 
ActorPartBlueprint bMarioParts []
 
PartnerDMAData bPartnerDmaTable []
 
EvtScript EVS_BattleRumble_Long
 
EvtScript EVS_BattleRumble_HitMin
 
EvtScript EVS_BattleRumble_HitLight
 
EvtScript EVS_BattleRumble_HitHeavy
 
EvtScript EVS_BattleRumble_HitExtreme
 
EvtScript EVS_BattleRumble_HitMax
 
EvtScript EVS_BattleRumble_PlayerMin
 
EvtScript EVS_BattleRumble_PlayerLight
 
EvtScript EVS_BattleRumble_PlayerHeavy
 
EvtScript EVS_BattleRumble_PlayerExtreme
 
EvtScript EVS_BattleRumble_PlayerMax
 

Macro Definition Documentation

◆ CHECK_DEFENSE

#define CHECK_DEFENSE ( element)
Value:
if (elementFlags & DAMAGE_TYPE_##element) { \
elemDefense = lookup_defense(defenseTable, ELEMENT_##element); \
if (elemDefense < minDefense) { \
minDefense = elemDefense; \
} \
} \
s32 lookup_defense(s32 *defenseTable, s32 elementKey)
Definition 190B20.c:2101

Function Documentation

◆ add_actor_decoration()

void add_actor_decoration ( Actor * actor,
s32 decorationIndex,
s32 decorationType )

◆ add_part_decoration()

void add_part_decoration ( ActorPart * part,
s32 decorationIndex,
s32 decorationType )

Referenced by add_actor_decoration().

◆ add_xz_vec3f()

void add_xz_vec3f ( Vec3f * vector,
f32 speed,
f32 angleDeg )

◆ add_xz_vec3f_copy1()

void add_xz_vec3f_copy1 ( Vec3f * vector,
f32 speed,
f32 angleDeg )

◆ add_xz_vec3f_copy2()

void add_xz_vec3f_copy2 ( Vec3f * vector,
f32 speed,
f32 angleDeg )

◆ btl_appendGfx_prim_quad()

void btl_appendGfx_prim_quad ( u8 r,
u8 g,
u8 b,
u8 a,
u16 left,
u16 top,
u16 right,
u16 bottom )

Referenced by btl_draw_prim_quad().

◆ btl_are_all_enemies_defeated()

s32 btl_are_all_enemies_defeated ( void )

◆ btl_check_enemies_defeated()

◆ btl_check_player_defeated()

◆ btl_draw_prim_quad()

void btl_draw_prim_quad ( u8 r,
u8 g,
u8 b,
u8 a,
u16 left,
u16 top,
u16 arg6,
u16 arg7 )

◆ btl_init_menu_boots()

void btl_init_menu_boots ( void )

◆ btl_init_menu_hammer()

void btl_init_menu_hammer ( void )

◆ btl_init_menu_partner()

void btl_init_menu_partner ( void )

◆ btl_update_ko_status()

void btl_update_ko_status ( void )

◆ clear_actor_flash_mode()

void clear_actor_flash_mode ( Actor * actor)

◆ clear_actor_glow_pal()

void clear_actor_glow_pal ( Actor * actor)

◆ clear_actor_static_pal_adjustments()

void clear_actor_static_pal_adjustments ( Actor * actor)

◆ clear_part_flag_bits()

void clear_part_flag_bits ( s32 actorID,
s32 partID,
s32 flags )

◆ clear_part_flash_mode()

void clear_part_flash_mode ( ActorPart * part)

Referenced by part_flash_on().

◆ clear_part_glow_pal()

void clear_part_glow_pal ( ActorPart * part)

◆ clear_part_pal_adjustment()

void clear_part_pal_adjustment ( ActorPart * part)

◆ count_power_plus()

s32 count_power_plus ( s32 damageType)

◆ create_actor()

Actor * create_actor ( Formation formation)

◆ create_current_pos_target_list()

◆ create_home_target_list()

void create_home_target_list ( Actor * actor)

◆ create_part_shadow()

void create_part_shadow ( s32 actorID,
s32 partID )

◆ create_part_shadow_by_ref()

void create_part_shadow_by_ref ( UNK_TYPE arg0,
ActorPart * part )

◆ create_target_list()

void create_target_list ( Actor * actor,
b32 targetHomePos )
Bug
this should be % 4

Referenced by create_current_pos_target_list(), and create_home_target_list().

◆ deduct_current_move_fp()

void deduct_current_move_fp ( void )

◆ func_80263064()

s32 func_80263064 ( Actor * actor,
Actor * targetActor,
b32 unused )
Bug
part list position is not advanced, all further loop iterations will be stuck here

Referenced by func_80263230(), and func_8026324C().

◆ func_80263230()

s32 func_80263230 ( Actor * actor,
Actor * targetActor )

◆ func_8026324C()

s32 func_8026324C ( Actor * actor,
Actor * targetActor )

◆ func_80263268()

void func_80263268 ( void )

◆ func_80263300()

void func_80263300 ( void )

◆ func_80266970()

◆ get_actor_part()

◆ get_defense()

s32 get_defense ( Actor * actor,
s32 * defenseTable,
s32 elementFlags )

◆ get_npc_anim_for_status()

s32 get_npc_anim_for_status ( AnimID * animations,
s32 statusKey )

◆ get_player_anim_for_status()

s32 get_player_anim_for_status ( s32 statusKey)

◆ hide_actor_health_bar()

void hide_actor_health_bar ( Actor * target)

◆ hide_foreground_models()

void hide_foreground_models ( void )

◆ hide_foreground_models_unchecked()

void hide_foreground_models_unchecked ( void )

Referenced by tattle_cam_pre_render().

◆ inflict_partner_ko()

s32 inflict_partner_ko ( Actor * target,
s32 statusTypeKey,
s32 duration )

◆ inflict_status()

s32 inflict_status ( Actor * target,
s32 statusTypeKey,
s32 duration )

◆ inflict_status_set_duration()

s32 inflict_status_set_duration ( Actor * actor,
s32 statusTypeKey,
s32 statusDurationKey,
s32 duration )

◆ load_partner_actor()

void load_partner_actor ( void )

◆ load_player_actor()

void load_player_actor ( void )

◆ lookup_defense()

s32 lookup_defense ( s32 * defenseTable,
s32 elementKey )

Referenced by get_defense().

◆ lookup_status_chance()

s32 lookup_status_chance ( s32 * statusTable,
s32 statusKey )

◆ lookup_status_duration_mod()

s32 lookup_status_duration_mod ( s32 * statusTable,
s32 statusKey )

Referenced by try_inflict_status().

◆ play_movement_dust_effects()

void play_movement_dust_effects ( s32 var0,
f32 xPos,
f32 yPos,
f32 zPos,
f32 angleDeg )

◆ player_team_is_ability_active()

◆ remove_actor_decoration()

void remove_actor_decoration ( Actor * actor,
s32 decorationIndex )

◆ remove_part_decoration()

void remove_part_decoration ( ActorPart * part,
s32 decorationIndex )

Referenced by remove_actor_decoration().

◆ remove_part_shadow()

void remove_part_shadow ( s32 actorID,
s32 partID )

◆ remove_player_buffs()

void remove_player_buffs ( s32 buffs)

◆ reset_actor_turn_info()

◆ reset_all_actor_sounds()

void reset_all_actor_sounds ( Actor * actor)

◆ set_actor_anim()

◆ set_actor_anim_by_ref()

void set_actor_anim_by_ref ( Actor * actor,
ActorPart * part,
AnimID anim )

◆ set_actor_anim_rate()

void set_actor_anim_rate ( s32 actorID,
s32 partID,
f32 rate )

◆ set_actor_flash_mode()

◆ set_actor_glow_pal()

void set_actor_glow_pal ( Actor * actor,
s32 glowState )

◆ set_actor_pal_adjustment()

void set_actor_pal_adjustment ( Actor * actor,
s32 palAdjust )

◆ set_actor_yaw()

void set_actor_yaw ( s32 actorID,
s32 yaw )

◆ set_part_flag_bits()

void set_part_flag_bits ( s32 actorID,
s32 partID,
s32 flags )

◆ set_part_flash_mode()

void set_part_flash_mode ( ActorPart * part,
s32 flashState )

Referenced by set_actor_flash_mode().

◆ set_part_glow_pal()

void set_part_glow_pal ( ActorPart * part,
s32 glowState )

Referenced by set_actor_glow_pal().

◆ set_part_pal_adjustment()

void set_part_pal_adjustment ( ActorPart * part,
s32 palAdjust )

◆ set_part_yaw()

void set_part_yaw ( s32 actorID,
s32 partID,
s32 value )

◆ shake_battle_cam_pitch()

void shake_battle_cam_pitch ( s32 initialDelay)

◆ show_action_rating()

void show_action_rating ( s32 rating,
Actor * actor,
f32 x,
f32 y,
f32 z )

◆ show_actor_health_bar()

◆ show_damage_fx()

◆ show_foreground_models()

void show_foreground_models ( void )

◆ show_foreground_models_unchecked()

void show_foreground_models_unchecked ( void )

Referenced by tattle_cam_post_render().

◆ show_next_damage_popup()

◆ show_primary_damage_popup()

void show_primary_damage_popup ( f32 posX,
f32 posY,
f32 posZ,
s32 damageAmt,
b32 angle )

◆ start_rumble_type()

void start_rumble_type ( u32 type)

◆ try_inflict_status()

s32 try_inflict_status ( Actor * actor,
s32 statusTypeKey,
s32 statusKey )

◆ update_action_ratings()

void update_action_ratings ( void )

Referenced by btl_update().

◆ update_damage_popups()

void update_damage_popups ( void )

Referenced by btl_update().

◆ update_health_bars()

void update_health_bars ( void )

Referenced by btl_update().

Variable Documentation

◆ bCurRumbleScript

s32 bCurRumbleScript = 0

Referenced by start_rumble_type().

◆ bMarioDefenseTable

s32 bMarioDefenseTable[]
extern

Referenced by load_player_actor().

◆ bMarioParts

ActorPartBlueprint bMarioParts[]
extern

Referenced by load_player_actor().

◆ bPartnerDmaTable

PartnerDMAData bPartnerDmaTable[]
extern

Referenced by load_partner_actor().

◆ bPlayerActorBlueprint

ActorBlueprint bPlayerActorBlueprint
extern

Referenced by load_player_actor().

◆ bPlayerStatusTable

s32 bPlayerStatusTable[]
extern

Referenced by load_player_actor().

◆ D_802938A4

f32 D_802938A4 = 0.0f

◆ D_802938A8

s16 D_802938A8 = 4

◆ D_80293970

Gfx D_80293970[]
Initial value:
= {
gsDPPipeSync(),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
gsDPSetCycleType(G_CYC_1CYCLE),
gsDPSetTexturePersp(G_TP_NONE),
gsDPSetTextureDetail(G_TD_CLAMP),
gsDPSetTextureLOD(G_TL_TILE),
gsDPSetTextureFilter(G_TF_POINT),
gsDPSetTextureLUT(G_TT_NONE),
gsDPSetTextureConvert(G_TC_FILT),
gsSPEndDisplayList(),
}

Referenced by btl_appendGfx_prim_quad().

◆ EVS_BattleRumble_HitExtreme

EvtScript EVS_BattleRumble_HitExtreme
Initial value:
= {
Call(N(StartRumbleWithParams), 256, 40)
}
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
Definition macros.h:225
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
Definition macros.h:588
#define Return
Kills the current EVT thread.
Definition macros.h:229

Referenced by start_rumble_type().

◆ EVS_BattleRumble_HitHeavy

EvtScript EVS_BattleRumble_HitHeavy
Initial value:
= {
Call(N(StartRumbleWithParams), 200, 30)
}

Referenced by start_rumble_type().

◆ EVS_BattleRumble_HitLight

EvtScript EVS_BattleRumble_HitLight
Initial value:
= {
Call(N(StartRumbleWithParams), 150, 20)
}

Referenced by start_rumble_type().

◆ EVS_BattleRumble_HitMax

EvtScript EVS_BattleRumble_HitMax
Initial value:
= {
Call(N(StartRumbleWithParams), 256, 60)
}

Referenced by start_rumble_type().

◆ EVS_BattleRumble_HitMin

EvtScript EVS_BattleRumble_HitMin
Initial value:
= {
Call(N(StartRumbleWithParams), 100, 20)
}

Referenced by start_rumble_type().

◆ EVS_BattleRumble_Long

EvtScript EVS_BattleRumble_Long
Initial value:
= {
Call(N(StartRumbleWithParams), 256, 30)
Call(N(StartRumbleWithParams), 200, 15)
Call(N(StartRumbleWithParams), 50, 15)
}

Referenced by start_rumble_type().

◆ EVS_BattleRumble_PlayerExtreme

EvtScript EVS_BattleRumble_PlayerExtreme
Initial value:
= {
Call(N(StartRumbleWithParams), 256, 40)
}

◆ EVS_BattleRumble_PlayerHeavy

EvtScript EVS_BattleRumble_PlayerHeavy
Initial value:
= {
Call(N(StartRumbleWithParams), 200, 30)
}

◆ EVS_BattleRumble_PlayerLight

EvtScript EVS_BattleRumble_PlayerLight
Initial value:
= {
Call(N(StartRumbleWithParams), 150, 20)
}

◆ EVS_BattleRumble_PlayerMax

EvtScript EVS_BattleRumble_PlayerMax
Initial value:
= {
Call(N(StartRumbleWithParams), 256, 60)
}

◆ EVS_BattleRumble_PlayerMin

EvtScript EVS_BattleRumble_PlayerMin
Initial value:
= {
Call(N(StartRumbleWithParams), 100, 20)
}

Referenced by start_rumble_type().

◆ EVS_ShakeBattleCamPitch

EvtScript EVS_ShakeBattleCamPitch
Initial value:
= {
Loop(4)
Call(SetBattleCamParam, 4, 11)
Wait(1)
Call(SetBattleCamParam, 4, 5)
Wait(1)
Call(SetBattleCamParam, 4, 8)
}
#define EndLoop
Marks the end of a loop.
Definition macros.h:260
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:266
#define Loop(TIMES)
Marks the beginning of a loop.
Definition macros.h:257
#define LVar0
Definition macros.h:144

Referenced by shake_battle_cam_pitch().

◆ gDamageCountEffects

EffectInstance* gDamageCountEffects[]
Initial value:
= {
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
}

Referenced by show_next_damage_popup(), show_primary_damage_popup(), and update_damage_popups().

◆ gDamageCountTimers

s32 gDamageCountTimers[]
Initial value:
= {
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
}

Referenced by show_next_damage_popup(), show_primary_damage_popup(), and update_damage_popups().