Sleeping: Difference between revisions

35 bytes added ,  2 October 2023
m
added reference tag above navbar
(Created page with "{{Action_infobox |title= Sleeping |image= |official name= |hex= 0x0C000203 |flags= STATIONARY | ALLOW_FIRST_PERSON | PAUSE_EXIT |group= Stationary |id= 0x003 |into= stationar...")
 
m (added reference tag above navbar)
 
(4 intermediate revisions by one other user not shown)
Line 4: Line 4:
|official name=  
|official name=  
|hex= 0x0C000203
|hex= 0x0C000203
|flags= STATIONARY | ALLOW_FIRST_PERSON | PAUSE_EXIT
|flags= Stationary, Allow First Person, Pause Exit
|group= Stationary
|group= Stationary
|id= 0x003
|id= 0x003
|into= stationary cancels: [[Water Plunge]], [[Squished]], [[Standing Death]] (theoretically), [[Quicksand Death]], non cancel: [[Waking Up]]
|into= stationary cancels: [[Water Plunge]], [[Squished]], [[Standing Death]] (theoretically), [[Quicksand Death]], non cancel: [[Waking Up]]
|out of= [[Start Sleeping]]
|out of= [[Start Sleeping]]
|animation= 0x85 (sleep idle), 0x86 (sleep start lying), (sleep lying)
|animation= 0x85 (sleep idle), 0x86 (sleep start lying), 0x87 (sleep lying)
|related=
|related=
}}
}}
'''Sleeping''' is something Mario can do.
'''Sleeping''' is something Mario can do.
== Interactions ==
== Interactions ==
Interestingly, while sleeping, [[Klepto]] cannot steal your hat.<ref>https://github.com/n64decomp/sm64/blob/66018e9f3caaa67399218971d61366cb3f7ba7d7/src/game/behaviors/klepto.inc.c#L244</ref>
Interestingly, while sleeping, [[Klepto]] cannot steal your hat.<ref>https://github.com/n64decomp/sm64/blob/66018e9f3caaa67399218971d61366cb3f7ba7d7/src/game/behaviors/klepto.inc.c#L244</ref>
== Behavior ==
== Behavior ==
The only way to enter the action is through [[Start Sleeping]].
The only way to enter the action is through [[Start Sleeping]].


<code>update_mario_sound_and_camera</code> will increase background noise.<ref>https://github.com/n64decomp/sm64/blob/66018e9f3caaa67399218971d61366cb3f7ba7d7/src/game/mario.c#L727</ref>
When <code>update_mario_sound_and_camera</code> is called, it will <code>raise_background_noise</code>.<ref>https://github.com/n64decomp/sm64/blob/66018e9f3caaa67399218971d61366cb3f7ba7d7/src/game/mario.c#L727</ref>


Before performing the action, [[Idle#Stationary cancels|stationary cancels]] are checked.
Before performing the action, [[Idle#Stationary cancels|stationary cancels]] are checked.
# When INPUT_NONZERO_ANALOG | INPUT_A_PRESSED | INPUT_OFF_FLOOR | INPUT_ABOVE_SLIDE | INPUT_FIRST_PERSON | INPUT_STOMPED | INPUT_B_PRESSED | INPUT_Z_PRESSED, transition to [[Waking Up]]
# When INPUT_NONZERO_ANALOG | INPUT_A_PRESSED | INPUT_OFF_FLOOR | INPUT_ABOVE_SLIDE | INPUT_FIRST_PERSON | INPUT_STOMPED | INPUT_B_PRESSED | INPUT_Z_PRESSED, transition to [[Waking Up]]
# When quicksandDepth > 30, transition to [[Waking Up]]
# When quicksandDepth > 30, transition to [[Waking Up]]
Line 35: Line 29:
## State 0
## State 0
### Set Mario's animation to MARIO_ANIM_SLEEP_IDLE
### Set Mario's animation to MARIO_ANIM_SLEEP_IDLE
### <code>if (animFrame == -1 && !m->actionTimer) lower_background_noise(2);</code>
### <code>if (animFrame == -1 && !m->actionTimer) lower_background_noise</code>
### <code>if (animFrame == 2) play_sound(SOUND_MARIO_SNORING1 ...</code>
### <code>if (animFrame == 2) play_sound(SOUND_MARIO_SNORING1 ...</code>
### <code>if (animFrame == 20) play_sound(SOUND_MARIO_SNORING2 ...</code>
### <code>if (animFrame == 20) play_sound(SOUND_MARIO_SNORING2 ...</code>
Line 48: Line 42:
### (Non JP) Play SOUND_MARIO_SNORING3 if there's no sound flag already playing
### (Non JP) Play SOUND_MARIO_SNORING3 if there's no sound flag already playing
# Return FALSE (exit [[Action#Frame|action loop]])
# Return FALSE (exit [[Action#Frame|action loop]])
 
== References ==
<references/>
{{actions}}
{{actions}}
== References ==
577

edits