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

Macros

#define NAMESPACE   action_command_power_shock
 The player must mash A to fill up a meter.
 
#define METER_FILL_TICK   850
 
#define GET_DRAIN_RATE(pct)   (N(DrainRateTable)[((pct) / (ONE_PCT_MASH / 5))])
 

Enumerations

enum  {
  HIDX_BUTTON = 0 , HIDX_METER = 1 , HIDX_RUN_AWAY = 2 , HIDX_100_PCT = 3 ,
  HIDX_OK = 4
}
 

Functions

void N update (void)
 
void N draw (void)
 
void N free (void)
 

Variables

s32 actionCmdTablePowerShock []
 

Macro Definition Documentation

◆ GET_DRAIN_RATE

#define GET_DRAIN_RATE ( pct)    (N(DrainRateTable)[((pct) / (ONE_PCT_MASH / 5))])

Referenced by update().

◆ METER_FILL_TICK

#define METER_FILL_TICK   850

Referenced by update().

◆ NAMESPACE

#define NAMESPACE   action_command_power_shock

The player must mash A to fill up a meter.

After a fixed period of time, the fill amount is compared to a "random" threshold value to determine success. This "random" value is selected using a mechanic similar to the flee command – a random initial value is chosen which begins increasing and decreasing, bounded by the limits of the meter, at a fixed rate until the command is done. However, since the "speed" of the moving value and the duration are both fixed, this is effectively just choosing a random threhsold value.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
HIDX_BUTTON 
HIDX_METER 
HIDX_RUN_AWAY 
HIDX_100_PCT 
HIDX_OK 

Function Documentation

◆ draw()

void N draw ( void )

◆ free()

void N free ( void )

◆ update()

void N update ( void )

Variable Documentation

◆ actionCmdTablePowerShock

s32 actionCmdTablePowerShock[]
extern