Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
rumble.c File Reference

Go to the source code of this file.

Functions

void poll_rumble (void)
 
void start_rumble (s32 freq, s32 nframes)
 
void update_max_rumble_duration (void)
 
void reset_max_rumble_duration (void)
 

Variables

u16 rumbleMaxDuration = 0
 
s32 rumbleButtons = 0
 

Function Documentation

◆ poll_rumble()

void poll_rumble ( void )

Definition at line 10 of file rumble.c.

10 {
11 nuContRmbCheck(0);
12 nuContRmbModeSet(0, 2);
13}

Referenced by load_engine_data().

◆ start_rumble()

void start_rumble ( s32 freq,
s32 nframes )

Definition at line 15 of file rumble.c.

15 {
17 if (rumbleMaxDuration != 0) {
18#if !VERSION_JP
19 s32 maxFrames = rumbleMaxDuration * 2;
20
21 if (nframes > maxFrames) {
22 nframes = maxFrames;
23 }
24#endif
25
26 if (nuContRmbCheck(0) == 0) {
27 nuContRmbModeSet(0, 2);
28 nuContRmbStart(0, freq, nframes);
29 }
30 }
31 }
32}
@ DEMO_STATE_NONE
Definition enums.h:3535
u16 rumbleMaxDuration
Definition rumble.c:7
GameStatus * gGameStatusPtr
Definition main_loop.c:32

Referenced by action_hammer_play_hit_fx(), action_update_hit_lava(), action_update_spin_jump(), action_update_tornado_jump(), and entity_CymbalPlant_idle().

◆ update_max_rumble_duration()

void update_max_rumble_duration ( void )

Definition at line 34 of file rumble.c.

34 {
38 }
39
40 if (rumbleMaxDuration != 0) {
42 }
43}
s32 rumbleButtons
Definition rumble.c:8
void reset_max_rumble_duration(void)
Definition rumble.c:45

Referenced by step_game_loop().

◆ reset_max_rumble_duration()

void reset_max_rumble_duration ( void )

Definition at line 45 of file rumble.c.

45 {
46#if VERSION_JP
48#else
50#endif
51}

Referenced by load_map_by_IDs(), and update_max_rumble_duration().

Variable Documentation

◆ rumbleMaxDuration

u16 rumbleMaxDuration = 0

Definition at line 7 of file rumble.c.

Referenced by reset_max_rumble_duration(), start_rumble(), and update_max_rumble_duration().

◆ rumbleButtons

s32 rumbleButtons = 0

Definition at line 8 of file rumble.c.

Referenced by update_max_rumble_duration().