Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
MorsGames
GitHub Repository: MorsGames/sm64plus
Path: blob/master/src/game/mario_actions_stationary.c
7858 views
1
#include <PR/ultratypes.h>
2
3
#include "sm64.h"
4
#include "area.h"
5
#include "audio/external.h"
6
#include "behavior_data.h"
7
#include "camera.h"
8
#include "engine/math_util.h"
9
#include "interaction.h"
10
#include "level_update.h"
11
#include "mario.h"
12
#include "mario_actions_stationary.h"
13
#include "mario_step.h"
14
#include "memory.h"
15
#include "save_file.h"
16
#include "sound_init.h"
17
#include "surface_terrains.h"
18
#include "game_init.h"
19
#include "rumble_init.h"
20
21
#include "settings.h"
22
23
s32 check_common_idle_cancels(struct MarioState *m) {
24
mario_drop_held_object(m);
25
if (m->floor->normal.y < 0.29237169f) {
26
return mario_push_off_steep_floor(m, ACT_FREEFALL, 0);
27
}
28
29
if (m->input & INPUT_STOMPED) {
30
return set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0);
31
}
32
33
if (m->input & INPUT_A_PRESSED) {
34
return set_jumping_action(m, ACT_JUMP, 0);
35
}
36
37
if (m->input & INPUT_OFF_FLOOR) {
38
return set_mario_action(m, ACT_FREEFALL, 0);
39
}
40
41
if (m->input & INPUT_ABOVE_SLIDE) {
42
return set_mario_action(m, ACT_BEGIN_SLIDING, 0);
43
}
44
45
if (m->input & INPUT_FIRST_PERSON) {
46
return set_mario_action(m, ACT_FIRST_PERSON, 0);
47
}
48
49
if (m->input & INPUT_NONZERO_ANALOG) {
50
m->faceAngle[1] = (s16) m->intendedYaw;
51
return set_mario_action(m, ACT_WALKING, 0);
52
}
53
54
if (m->input & INPUT_B_PRESSED) {
55
return set_mario_action(m, ACT_PUNCHING, 0);
56
}
57
58
if (m->input & INPUT_Z_DOWN) {
59
return set_mario_action(m, ACT_START_CROUCHING, 0);
60
}
61
62
return FALSE;
63
}
64
65
s32 check_common_hold_idle_cancels(struct MarioState *m) {
66
if (m->floor->normal.y < 0.29237169f) {
67
return mario_push_off_steep_floor(m, ACT_HOLD_FREEFALL, 0);
68
}
69
70
if (m->heldObj->oInteractionSubtype & INT_SUBTYPE_DROP_IMMEDIATELY) {
71
m->heldObj->oInteractionSubtype =
72
(s32)(m->heldObj->oInteractionSubtype & ~INT_SUBTYPE_DROP_IMMEDIATELY);
73
return set_mario_action(m, ACT_PLACING_DOWN, 0);
74
}
75
76
if (m->input & INPUT_STOMPED) {
77
return drop_and_set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0);
78
}
79
80
if (m->input & INPUT_A_PRESSED) {
81
return set_jumping_action(m, ACT_HOLD_JUMP, 0);
82
}
83
84
if (m->input & INPUT_OFF_FLOOR) {
85
return set_mario_action(m, ACT_HOLD_FREEFALL, 0);
86
}
87
88
if (m->input & INPUT_ABOVE_SLIDE) {
89
return set_mario_action(m, ACT_HOLD_BEGIN_SLIDING, 0);
90
}
91
92
if (m->input & INPUT_NONZERO_ANALOG) {
93
m->faceAngle[1] = (s16) m->intendedYaw;
94
return set_mario_action(m, ACT_HOLD_WALKING, 0);
95
}
96
97
if (m->input & INPUT_B_PRESSED) {
98
return set_mario_action(m, ACT_THROWING, 0);
99
}
100
101
if (m->input & INPUT_Z_DOWN) {
102
return drop_and_set_mario_action(m, ACT_START_CROUCHING, 0);
103
}
104
105
return FALSE;
106
}
107
108
s32 act_idle(struct MarioState *m) {
109
if (m->quicksandDepth > 30.0f) {
110
return set_mario_action(m, ACT_IN_QUICKSAND, 0);
111
}
112
113
if ((m->input & INPUT_IN_POISON_GAS) && (!mario_has_improved_metal_cap(m))){
114
return set_mario_action(m, ACT_COUGHING, 0);
115
}
116
117
if (!(m->actionArg & 1) && m->health < 0x300) {
118
return set_mario_action(m, ACT_PANTING, 0);
119
}
120
121
if (check_common_idle_cancels(m)) {
122
return TRUE;
123
}
124
125
if (m->actionState == 3) {
126
if ((m->area->terrainType & TERRAIN_MASK) == TERRAIN_SNOW) {
127
return set_mario_action(m, ACT_SHIVERING, 0);
128
} else {
129
return set_mario_action(m, ACT_START_SLEEPING, 0);
130
}
131
}
132
133
if (m->actionArg & 1) {
134
set_mario_animation(m, MARIO_ANIM_STAND_AGAINST_WALL);
135
} else {
136
switch (m->actionState) {
137
case 0:
138
set_mario_animation(m, MARIO_ANIM_IDLE_HEAD_LEFT);
139
break;
140
141
case 1:
142
set_mario_animation(m, MARIO_ANIM_IDLE_HEAD_RIGHT);
143
break;
144
145
case 2:
146
set_mario_animation(m, MARIO_ANIM_IDLE_HEAD_CENTER);
147
break;
148
}
149
150
if (is_anim_at_end(m)) {
151
// Fall asleep after 10 head turning cycles.
152
// act_start_sleeping is triggered earlier in the function
153
// when actionState == 3. This happens when Mario's done
154
// turning his head back and forth. However, we do some checks
155
// here to make sure that Mario would be able to sleep here,
156
// and that he's gone through 10 cycles before sleeping.
157
// actionTimer is used to track how many cycles have passed.
158
if (++m->actionState == 3) {
159
f32 deltaYOfFloorBehindMario = m->pos[1] - find_floor_height_relative_polar(m, -0x8000, 60.0f);
160
if (deltaYOfFloorBehindMario < -24.0f || 24.0f < deltaYOfFloorBehindMario || m->floor->flags & SURFACE_FLAG_DYNAMIC) {
161
m->actionState = 0;
162
} else {
163
// If Mario hasn't turned his head 10 times yet, stay idle instead of going to sleep.
164
m->actionTimer++;
165
if (m->actionTimer < 10) {
166
m->actionState = 0;
167
}
168
}
169
}
170
}
171
}
172
173
stationary_ground_step(m);
174
175
return FALSE;
176
}
177
178
void play_anim_sound(struct MarioState *m, u32 actionState, s32 animFrame, u32 sound) {
179
if (m->actionState == actionState && m->marioObj->header.gfx.animInfo.animFrame == animFrame) {
180
play_sound(sound, m->marioObj->header.gfx.cameraToObject);
181
}
182
}
183
184
s32 act_start_sleeping(struct MarioState *m) {
185
#ifndef VERSION_JP
186
s32 animFrame;
187
#endif
188
189
if (check_common_idle_cancels(m)) {
190
return TRUE;
191
}
192
193
if (m->quicksandDepth > 30.0f) {
194
return set_mario_action(m, ACT_IN_QUICKSAND, 0);
195
}
196
197
if (m->actionState == 4) {
198
return set_mario_action(m, ACT_SLEEPING, 0);
199
}
200
201
switch (m->actionState) {
202
case 0:
203
#ifndef VERSION_JP
204
animFrame =
205
#endif
206
set_mario_animation(m, MARIO_ANIM_START_SLEEP_IDLE);
207
break;
208
209
case 1:
210
#ifndef VERSION_JP
211
animFrame =
212
#endif
213
set_mario_animation(m, MARIO_ANIM_START_SLEEP_SCRATCH);
214
break;
215
216
case 2:
217
#ifndef VERSION_JP
218
animFrame =
219
#endif
220
set_mario_animation(m, MARIO_ANIM_START_SLEEP_YAWN);
221
m->marioBodyState->eyeState = MARIO_EYES_HALF_CLOSED;
222
break;
223
224
case 3:
225
#ifndef VERSION_JP
226
animFrame =
227
#endif
228
set_mario_animation(m, MARIO_ANIM_START_SLEEP_SITTING);
229
m->marioBodyState->eyeState = MARIO_EYES_HALF_CLOSED;
230
break;
231
}
232
233
play_anim_sound(m, 1, 41, SOUND_ACTION_PAT_BACK);
234
play_anim_sound(m, 1, 49, SOUND_ACTION_PAT_BACK);
235
play_anim_sound(m, 3, 15, m->terrainSoundAddend + SOUND_ACTION_TERRAIN_BODY_HIT_GROUND);
236
237
if (is_anim_at_end(m)) {
238
m->actionState++;
239
}
240
241
#ifndef VERSION_JP
242
if (m->actionState == 2 && animFrame == -1) {
243
play_sound(SOUND_MARIO_YAWNING, m->marioObj->header.gfx.cameraToObject);
244
}
245
246
if (m->actionState == 1 && animFrame == -1) {
247
play_sound(SOUND_MARIO_IMA_TIRED, m->marioObj->header.gfx.cameraToObject);
248
}
249
#else
250
if (m->actionState == 2) {
251
play_sound_if_no_flag(m, SOUND_MARIO_YAWNING, MARIO_MARIO_SOUND_PLAYED);
252
}
253
#endif
254
255
stationary_ground_step(m);
256
return FALSE;
257
}
258
259
s32 act_sleeping(struct MarioState *m) {
260
s32 animFrame;
261
if (m->input
262
& (INPUT_NONZERO_ANALOG | INPUT_A_PRESSED | INPUT_OFF_FLOOR | INPUT_ABOVE_SLIDE
263
| INPUT_FIRST_PERSON | INPUT_STOMPED | INPUT_B_PRESSED | INPUT_Z_PRESSED)) {
264
return set_mario_action(m, ACT_WAKING_UP, m->actionState);
265
}
266
267
if (m->quicksandDepth > 30.0f) {
268
return set_mario_action(m, ACT_WAKING_UP, m->actionState);
269
}
270
271
if (m->pos[1] - find_floor_height_relative_polar(m, -0x8000, 60.0f) > 24.0f) {
272
return set_mario_action(m, ACT_WAKING_UP, m->actionState);
273
}
274
275
m->marioBodyState->eyeState = MARIO_EYES_CLOSED;
276
stationary_ground_step(m);
277
switch (m->actionState) {
278
case 0:
279
animFrame = set_mario_animation(m, MARIO_ANIM_SLEEP_IDLE);
280
281
if (animFrame == -1 && !m->actionTimer) {
282
lower_background_noise(2);
283
}
284
285
if (animFrame == 2) {
286
play_sound(SOUND_MARIO_SNORING1, m->marioObj->header.gfx.cameraToObject);
287
}
288
289
if (animFrame == 20) {
290
play_sound(SOUND_MARIO_SNORING2, m->marioObj->header.gfx.cameraToObject);
291
}
292
293
if (is_anim_at_end(m)) {
294
m->actionTimer++;
295
if (m->actionTimer > 45) {
296
m->actionState++;
297
}
298
}
299
break;
300
301
case 1:
302
if (set_mario_animation(m, MARIO_ANIM_SLEEP_START_LYING) == 18) {
303
play_mario_heavy_landing_sound(m, SOUND_ACTION_TERRAIN_BODY_HIT_GROUND);
304
}
305
306
if (is_anim_at_end(m)) {
307
m->actionState++;
308
}
309
break;
310
311
case 2:
312
animFrame = set_mario_animation(m, MARIO_ANIM_SLEEP_LYING);
313
#ifndef VERSION_JP
314
play_sound_if_no_flag(m, SOUND_MARIO_SNORING3, MARIO_ACTION_SOUND_PLAYED);
315
#else
316
if (animFrame == 2) {
317
play_sound(SOUND_MARIO_SNORING2, m->marioObj->header.gfx.cameraToObject);
318
}
319
320
if (animFrame == 25) {
321
play_sound(SOUND_MARIO_SNORING1, m->marioObj->header.gfx.cameraToObject);
322
}
323
#endif
324
break;
325
}
326
return FALSE;
327
}
328
329
s32 act_waking_up(struct MarioState *m) {
330
if (!m->actionTimer) {
331
stop_sound(SOUND_MARIO_SNORING1, m->marioObj->header.gfx.cameraToObject);
332
stop_sound(SOUND_MARIO_SNORING2, m->marioObj->header.gfx.cameraToObject);
333
#ifndef VERSION_JP
334
stop_sound(SOUND_MARIO_SNORING3, m->marioObj->header.gfx.cameraToObject);
335
#endif
336
raise_background_noise(2);
337
}
338
339
if (m->input & INPUT_STOMPED) {
340
return set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0);
341
}
342
343
if (m->input & INPUT_OFF_FLOOR) {
344
return set_mario_action(m, ACT_FREEFALL, 0);
345
}
346
347
if (m->input & INPUT_ABOVE_SLIDE) {
348
return set_mario_action(m, ACT_BEGIN_SLIDING, 0);
349
}
350
351
m->actionTimer++;
352
353
if (m->actionTimer > 20) {
354
return set_mario_action(m, ACT_IDLE, 0);
355
}
356
357
stationary_ground_step(m);
358
359
set_mario_animation(m, !m->actionArg ? MARIO_ANIM_WAKE_FROM_SLEEP : MARIO_ANIM_WAKE_FROM_LYING);
360
361
return FALSE;
362
}
363
364
s32 act_shivering(struct MarioState *m) {
365
s32 animFrame;
366
367
if (m->input & INPUT_STOMPED) {
368
return set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0);
369
}
370
371
if (m->input & INPUT_OFF_FLOOR) {
372
return set_mario_action(m, ACT_FREEFALL, 0);
373
}
374
375
if (m->input & INPUT_ABOVE_SLIDE) {
376
return set_mario_action(m, ACT_BEGIN_SLIDING, 0);
377
}
378
379
if (m->input
380
& (INPUT_NONZERO_ANALOG | INPUT_A_PRESSED | INPUT_OFF_FLOOR | INPUT_ABOVE_SLIDE
381
| INPUT_FIRST_PERSON | INPUT_STOMPED | INPUT_B_PRESSED | INPUT_Z_PRESSED)) {
382
m->actionState = 2;
383
}
384
385
stationary_ground_step(m);
386
switch (m->actionState) {
387
case 0:
388
animFrame = set_mario_animation(m, MARIO_ANIM_SHIVERING_WARMING_HAND);
389
if (animFrame == 49) {
390
m->particleFlags |= PARTICLE_BREATH;
391
play_sound(SOUND_MARIO_PANTING_COLD, m->marioObj->header.gfx.cameraToObject);
392
}
393
if (animFrame == 7 || animFrame == 81) {
394
play_sound(SOUND_ACTION_CLAP_HANDS_COLD, m->marioObj->header.gfx.cameraToObject);
395
}
396
if (is_anim_past_end(m)) {
397
m->actionState = 1;
398
}
399
break;
400
401
case 1:
402
animFrame = set_mario_animation(m, MARIO_ANIM_SHIVERING);
403
if (animFrame == 9 || animFrame == 25 || animFrame == 44) {
404
play_sound(SOUND_ACTION_CLAP_HANDS_COLD, m->marioObj->header.gfx.cameraToObject);
405
}
406
break;
407
408
case 2:
409
set_mario_animation(m, MARIO_ANIM_SHIVERING_RETURN_TO_IDLE);
410
if (is_anim_past_end(m)) {
411
set_mario_action(m, ACT_IDLE, 0);
412
}
413
break;
414
}
415
return FALSE;
416
}
417
418
s32 act_coughing(struct MarioState *m) {
419
s32 animFrame;
420
421
if (check_common_idle_cancels(m)) {
422
return TRUE;
423
}
424
425
stationary_ground_step(m);
426
animFrame = set_mario_animation(m, MARIO_ANIM_COUGHING);
427
if (animFrame == 25 || animFrame == 35) {
428
play_sound(SOUND_MARIO_COUGHING3, m->marioObj->header.gfx.cameraToObject);
429
}
430
431
if (animFrame == 50 || animFrame == 58) {
432
play_sound(SOUND_MARIO_COUGHING2, m->marioObj->header.gfx.cameraToObject);
433
}
434
435
if (animFrame == 71 || animFrame == 80) {
436
play_sound(SOUND_MARIO_COUGHING1, m->marioObj->header.gfx.cameraToObject);
437
}
438
439
return FALSE;
440
}
441
442
s32 act_hold_idle(struct MarioState *m) {
443
if (segmented_to_virtual(&bhvJumpingBox) == m->heldObj->behavior) {
444
return set_mario_action(m, ACT_CRAZY_BOX_BOUNCE, 0);
445
}
446
447
if (m->marioObj->oInteractStatus & INT_STATUS_MARIO_DROP_OBJECT) {
448
return drop_and_set_mario_action(m, ACT_IDLE, 0);
449
}
450
451
if (m->quicksandDepth > 30.0f) {
452
return drop_and_set_mario_action(m, ACT_IN_QUICKSAND, 0);
453
}
454
455
if (check_common_hold_idle_cancels(m)) {
456
return TRUE;
457
}
458
459
stationary_ground_step(m);
460
set_mario_animation(m, MARIO_ANIM_IDLE_WITH_LIGHT_OBJ);
461
return FALSE;
462
}
463
464
s32 act_hold_heavy_idle(struct MarioState *m) {
465
if (m->input & INPUT_STOMPED) {
466
return drop_and_set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0);
467
}
468
469
if (m->input & INPUT_OFF_FLOOR) {
470
return drop_and_set_mario_action(m, ACT_FREEFALL, 0);
471
}
472
473
if (m->input & INPUT_ABOVE_SLIDE) {
474
return drop_and_set_mario_action(m, ACT_BEGIN_SLIDING, 0);
475
}
476
477
if (m->input & INPUT_NONZERO_ANALOG) {
478
return set_mario_action(m, ACT_HOLD_HEAVY_WALKING, 0);
479
}
480
481
if (m->input & INPUT_B_PRESSED) {
482
return set_mario_action(m, ACT_HEAVY_THROW, 0);
483
}
484
485
stationary_ground_step(m);
486
set_mario_animation(m, MARIO_ANIM_IDLE_HEAVY_OBJ);
487
return FALSE;
488
}
489
490
s32 act_standing_against_wall(struct MarioState *m) {
491
if (m->input & INPUT_STOMPED) {
492
return set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0);
493
}
494
495
if (m->input & (INPUT_NONZERO_ANALOG | INPUT_A_PRESSED | INPUT_OFF_FLOOR | INPUT_ABOVE_SLIDE)) {
496
return check_common_action_exits(m);
497
}
498
499
if (m->input & INPUT_FIRST_PERSON) {
500
return set_mario_action(m, ACT_FIRST_PERSON, 0);
501
}
502
503
if (m->input & INPUT_B_PRESSED) {
504
return set_mario_action(m, ACT_PUNCHING, 0);
505
}
506
507
set_mario_animation(m, MARIO_ANIM_STAND_AGAINST_WALL);
508
stationary_ground_step(m);
509
return FALSE;
510
}
511
512
s32 act_in_quicksand(struct MarioState *m) {
513
if (m->quicksandDepth < 30.0f) {
514
return set_mario_action(m, ACT_IDLE, 0);
515
}
516
517
if (check_common_idle_cancels(m)) {
518
return TRUE;
519
}
520
521
if (m->quicksandDepth > 70.0f) {
522
set_mario_animation(m, MARIO_ANIM_DYING_IN_QUICKSAND);
523
} else {
524
set_mario_animation(m, MARIO_ANIM_IDLE_IN_QUICKSAND);
525
}
526
527
stationary_ground_step(m);
528
return FALSE;
529
}
530
531
s32 act_crouching(struct MarioState *m) {
532
if (m->input & INPUT_STOMPED) {
533
return set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0);
534
}
535
536
if (m->input & INPUT_A_PRESSED) {
537
return set_jumping_action(m, ACT_BACKFLIP, 0);
538
}
539
540
if (m->input & INPUT_OFF_FLOOR) {
541
return set_mario_action(m, ACT_FREEFALL, 0);
542
}
543
544
if (m->input & INPUT_ABOVE_SLIDE) {
545
return set_mario_action(m, ACT_BEGIN_SLIDING, 0);
546
}
547
548
if (m->input & INPUT_FIRST_PERSON) {
549
return set_mario_action(m, ACT_STOP_CROUCHING, 0);
550
}
551
552
if (!(m->input & INPUT_Z_DOWN)) {
553
return set_mario_action(m, ACT_STOP_CROUCHING, 0);
554
}
555
556
if (m->input & INPUT_NONZERO_ANALOG) {
557
return set_mario_action(m, ACT_START_CRAWLING, 0);
558
}
559
560
if (m->input & INPUT_B_PRESSED) {
561
return set_mario_action(m, configRolling ? ACT_ROLL : ACT_PUNCHING, configRolling ? 0 : 9);
562
}
563
564
stationary_ground_step(m);
565
set_mario_animation(m, MARIO_ANIM_CROUCHING);
566
return FALSE;
567
}
568
569
s32 act_panting(struct MarioState *m) {
570
if (m->input & INPUT_STOMPED) {
571
return set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0);
572
}
573
574
if (m->health >= 0x500) {
575
return set_mario_action(m, ACT_IDLE, 0);
576
}
577
578
if (check_common_idle_cancels(m)) {
579
return TRUE;
580
}
581
582
if (set_mario_animation(m, MARIO_ANIM_WALK_PANTING) == 1) {
583
play_sound(SOUND_MARIO_PANTING + ((gAudioRandom % 3U) << 0x10),
584
m->marioObj->header.gfx.cameraToObject);
585
}
586
587
stationary_ground_step(m);
588
m->marioBodyState->eyeState = MARIO_EYES_HALF_CLOSED;
589
return FALSE;
590
}
591
592
s32 act_hold_panting_unused(struct MarioState *m) {
593
if (m->marioObj->oInteractStatus & INT_STATUS_MARIO_DROP_OBJECT) {
594
return drop_and_set_mario_action(m, ACT_PANTING, 0);
595
}
596
597
if (m->input & INPUT_STOMPED) {
598
return drop_and_set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0);
599
}
600
601
if (m->health >= 0x500) {
602
return set_mario_action(m, ACT_HOLD_IDLE, 0);
603
}
604
605
if (check_common_hold_idle_cancels(m)) {
606
return TRUE;
607
}
608
609
set_mario_animation(m, MARIO_ANIM_WALK_PANTING);
610
stationary_ground_step(m);
611
m->marioBodyState->eyeState = MARIO_EYES_HALF_CLOSED;
612
return FALSE;
613
}
614
615
void stopping_step(struct MarioState *m, s32 animID, u32 action) {
616
stationary_ground_step(m);
617
set_mario_animation(m, animID);
618
if (is_anim_at_end(m)) {
619
set_mario_action(m, action, 0);
620
}
621
}
622
623
s32 act_braking_stop(struct MarioState *m) {
624
if (m->input & INPUT_STOMPED) {
625
return set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0);
626
}
627
628
if (m->input & INPUT_OFF_FLOOR) {
629
return set_mario_action(m, ACT_FREEFALL, 0);
630
}
631
632
if (m->input & INPUT_B_PRESSED) {
633
return set_mario_action(m, ACT_PUNCHING, 0);
634
}
635
636
if (!(m->input & INPUT_FIRST_PERSON)
637
&& m->input & (INPUT_NONZERO_ANALOG | INPUT_A_PRESSED | INPUT_OFF_FLOOR | INPUT_ABOVE_SLIDE)) {
638
return check_common_action_exits(m);
639
}
640
641
stopping_step(m, MARIO_ANIM_STOP_SKID, ACT_IDLE);
642
return FALSE;
643
}
644
645
s32 act_butt_slide_stop(struct MarioState *m) {
646
if (m->input & INPUT_STOMPED) {
647
return set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0);
648
}
649
650
if (m->input & (INPUT_NONZERO_ANALOG | INPUT_A_PRESSED | INPUT_OFF_FLOOR | INPUT_ABOVE_SLIDE)) {
651
return check_common_action_exits(m);
652
}
653
654
stopping_step(m, MARIO_ANIM_STOP_SLIDE, ACT_IDLE);
655
if (m->marioObj->header.gfx.animInfo.animFrame == 6) {
656
play_mario_landing_sound(m, SOUND_ACTION_TERRAIN_LANDING);
657
}
658
659
return FALSE;
660
}
661
662
s32 act_hold_butt_slide_stop(struct MarioState *m) {
663
if (m->marioObj->oInteractStatus & INT_STATUS_MARIO_DROP_OBJECT) {
664
return drop_and_set_mario_action(m, ACT_IDLE, 0);
665
}
666
667
if (m->input & INPUT_STOMPED) {
668
return drop_and_set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0);
669
}
670
671
if (m->input & (INPUT_NONZERO_ANALOG | INPUT_A_PRESSED | INPUT_OFF_FLOOR | INPUT_ABOVE_SLIDE)) {
672
return check_common_hold_action_exits(m);
673
}
674
675
if (m->input & INPUT_B_PRESSED) {
676
return set_mario_action(m, ACT_THROWING, 0);
677
}
678
679
stopping_step(m, MARIO_ANIM_STAND_UP_FROM_SLIDING_WITH_LIGHT_OBJ, ACT_HOLD_IDLE);
680
return FALSE;
681
}
682
683
s32 act_slide_kick_slide_stop(struct MarioState *m) {
684
if (m->input & INPUT_STOMPED) {
685
return drop_and_set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0);
686
}
687
688
if (m->input & INPUT_OFF_FLOOR) {
689
return drop_and_set_mario_action(m, ACT_FREEFALL, 0);
690
}
691
692
stopping_step(m, MARIO_ANIM_CROUCH_FROM_SLIDE_KICK, ACT_CROUCHING);
693
return FALSE;
694
}
695
696
s32 act_start_crouching(struct MarioState *m) {
697
if (m->input & INPUT_STOMPED) {
698
return set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0);
699
}
700
701
if (m->input & INPUT_OFF_FLOOR) {
702
return set_mario_action(m, ACT_FREEFALL, 0);
703
}
704
705
if (m->input & INPUT_A_PRESSED) {
706
return set_jumping_action(m, ACT_BACKFLIP, 0);
707
}
708
709
if (m->input & INPUT_ABOVE_SLIDE) {
710
return set_mario_action(m, ACT_BEGIN_SLIDING, 0);
711
}
712
713
stationary_ground_step(m);
714
if (configImprovedControls)
715
set_mario_anim_with_accel(m, MARIO_ANIM_START_CROUCHING, 0x26000);
716
else
717
set_mario_animation(m, MARIO_ANIM_START_CROUCHING);
718
719
if (is_anim_past_end(m)) {
720
set_mario_action(m, ACT_CROUCHING, 0);
721
}
722
return FALSE;
723
}
724
725
s32 act_stop_crouching(struct MarioState *m) {
726
if (m->input & INPUT_STOMPED) {
727
return set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0);
728
}
729
730
if (m->input & INPUT_OFF_FLOOR) {
731
return set_mario_action(m, ACT_FREEFALL, 0);
732
}
733
734
if (m->input & INPUT_A_PRESSED) {
735
return set_jumping_action(m, ACT_BACKFLIP, 0);
736
}
737
738
if (m->input & INPUT_ABOVE_SLIDE) {
739
return set_mario_action(m, ACT_BEGIN_SLIDING, 0);
740
}
741
742
stationary_ground_step(m);
743
if (configImprovedControls)
744
set_mario_anim_with_accel(m, MARIO_ANIM_STOP_CROUCHING, 0x26000);
745
else
746
set_mario_animation(m, MARIO_ANIM_STOP_CROUCHING);
747
if (is_anim_past_end(m)) {
748
set_mario_action(m, ACT_IDLE, 0);
749
}
750
return FALSE;
751
}
752
753
s32 act_start_crawling(struct MarioState *m) {
754
if (m->input & INPUT_FIRST_PERSON) {
755
return set_mario_action(m, ACT_STOP_CROUCHING, 0);
756
}
757
758
if (m->input & INPUT_OFF_FLOOR) {
759
return set_mario_action(m, ACT_FREEFALL, 0);
760
}
761
762
if (m->input & INPUT_STOMPED) {
763
return set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0);
764
}
765
766
if (m->input & INPUT_ABOVE_SLIDE) {
767
return set_mario_action(m, ACT_BEGIN_SLIDING, 0);
768
}
769
770
stationary_ground_step(m);
771
set_mario_animation(m, MARIO_ANIM_START_CRAWLING);
772
if (is_anim_past_end(m)) {
773
set_mario_action(m, ACT_CRAWLING, 0);
774
}
775
776
return FALSE;
777
}
778
779
s32 act_stop_crawling(struct MarioState *m) {
780
if (m->input & INPUT_STOMPED) {
781
return set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0);
782
}
783
784
if (m->input & INPUT_OFF_FLOOR) {
785
return set_mario_action(m, ACT_FREEFALL, 0);
786
}
787
788
if (m->input & INPUT_ABOVE_SLIDE) {
789
return set_mario_action(m, ACT_BEGIN_SLIDING, 0);
790
}
791
792
stationary_ground_step(m);
793
set_mario_animation(m, MARIO_ANIM_STOP_CRAWLING);
794
if (is_anim_past_end(m)) {
795
set_mario_action(m, ACT_CROUCHING, 0);
796
}
797
return FALSE;
798
}
799
800
s32 act_shockwave_bounce(struct MarioState *m) {
801
s16 sp1E;
802
f32 sp18;
803
804
if (m->marioObj->oInteractStatus & INT_STATUS_MARIO_SHOCKWAVE) {
805
#if ENABLE_RUMBLE
806
queue_rumble_data(70, 40);
807
#endif
808
return hurt_and_set_mario_action(m, ACT_SHOCKED, 0, 4);
809
}
810
811
if (m->actionTimer == 0) {
812
#if ENABLE_RUMBLE
813
queue_rumble_data(70, 40);
814
#endif
815
if (m->marioObj->oInteractStatus & INT_STATUS_MARIO_KNOCKBACK_DMG) {
816
return hurt_and_set_mario_action(m, ACT_BACKWARD_GROUND_KB, 0, 0xc);
817
}
818
}
819
820
if (++m->actionTimer == 48) {
821
return set_mario_action(m, ACT_IDLE, 0);
822
}
823
824
sp1E = (m->actionTimer % 16) << 12;
825
sp18 = (f32)(((f32)(6 - m->actionTimer / 8) * 8.0f) + 4.0f);
826
mario_set_forward_vel(m, 0);
827
vec3f_set(m->vel, 0.0f, 0.0f, 0.0f);
828
if (sins(sp1E) >= 0.0f) {
829
m->pos[1] = sins(sp1E) * sp18 + m->floorHeight;
830
} else {
831
m->pos[1] = m->floorHeight - sins(sp1E) * sp18;
832
}
833
834
vec3f_copy(m->marioObj->header.gfx.pos, m->pos);
835
vec3s_set(m->marioObj->header.gfx.angle, 0, m->faceAngle[1], 0);
836
set_mario_animation(m, MARIO_ANIM_A_POSE);
837
return FALSE;
838
}
839
840
s32 landing_step(struct MarioState *m, s32 arg1, u32 action) {
841
stationary_ground_step(m);
842
set_mario_animation(m, arg1);
843
if (is_anim_at_end(m)) {
844
return set_mario_action(m, action, 0);
845
}
846
return FALSE;
847
}
848
849
s32 check_common_landing_cancels(struct MarioState *m, u32 action) {
850
if (m->input & INPUT_STOMPED) {
851
return set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0);
852
}
853
854
if (m->input & INPUT_FIRST_PERSON) {
855
return set_mario_action(m, ACT_IDLE, 0);
856
}
857
858
if (m->input & INPUT_A_PRESSED) {
859
if (!action) {
860
return set_jump_from_landing(m);
861
} else {
862
return set_jumping_action(m, action, 0);
863
}
864
}
865
866
if (m->input & (INPUT_NONZERO_ANALOG | INPUT_A_PRESSED | INPUT_OFF_FLOOR | INPUT_ABOVE_SLIDE)) {
867
return check_common_action_exits(m);
868
}
869
870
if (m->input & INPUT_B_PRESSED) {
871
return set_mario_action(m, ACT_PUNCHING, 0);
872
}
873
874
return FALSE;
875
}
876
877
s32 act_jump_land_stop(struct MarioState *m) {
878
if (check_common_landing_cancels(m, 0)) {
879
return TRUE;
880
}
881
882
landing_step(m, MARIO_ANIM_LAND_FROM_SINGLE_JUMP, ACT_IDLE);
883
return FALSE;
884
}
885
886
s32 act_double_jump_land_stop(struct MarioState *m) {
887
if (check_common_landing_cancels(m, 0)) {
888
return TRUE;
889
}
890
891
landing_step(m, MARIO_ANIM_LAND_FROM_DOUBLE_JUMP, ACT_IDLE);
892
return FALSE;
893
}
894
895
s32 act_side_flip_land_stop(struct MarioState *m) {
896
if (check_common_landing_cancels(m, 0)) {
897
return TRUE;
898
}
899
900
landing_step(m, MARIO_ANIM_SLIDEFLIP_LAND, ACT_IDLE);
901
m->marioObj->header.gfx.angle[1] += 0x8000;
902
return FALSE;
903
}
904
905
s32 act_freefall_land_stop(struct MarioState *m) {
906
if (check_common_landing_cancels(m, 0)) {
907
return TRUE;
908
}
909
910
landing_step(m, MARIO_ANIM_GENERAL_LAND, ACT_IDLE);
911
return FALSE;
912
}
913
914
s32 act_triple_jump_land_stop(struct MarioState *m) {
915
if (check_common_landing_cancels(m, ACT_JUMP)) {
916
return TRUE;
917
}
918
919
landing_step(m, MARIO_ANIM_TRIPLE_JUMP_LAND, ACT_IDLE);
920
return FALSE;
921
}
922
923
s32 act_backflip_land_stop(struct MarioState *m) {
924
if (!(m->input & INPUT_Z_DOWN) || m->marioObj->header.gfx.animInfo.animFrame >= 6) {
925
m->input &= ~INPUT_A_PRESSED;
926
}
927
928
if (check_common_landing_cancels(m, ACT_BACKFLIP)) {
929
return TRUE;
930
}
931
932
landing_step(m, MARIO_ANIM_TRIPLE_JUMP_LAND, ACT_IDLE);
933
return FALSE;
934
}
935
936
s32 act_lava_boost_land(struct MarioState *m) {
937
m->input &= ~(INPUT_FIRST_PERSON | INPUT_B_PRESSED);
938
939
if (check_common_landing_cancels(m, 0)) {
940
return TRUE;
941
}
942
943
landing_step(m, MARIO_ANIM_STAND_UP_FROM_LAVA_BOOST, ACT_IDLE);
944
return FALSE;
945
}
946
947
s32 act_long_jump_land_stop(struct MarioState *m) {
948
m->input &= ~INPUT_B_PRESSED;
949
if (check_common_landing_cancels(m, ACT_JUMP)) {
950
return TRUE;
951
}
952
953
landing_step(m, !m->marioObj->oMarioLongJumpIsSlow ? MARIO_ANIM_CROUCH_FROM_FAST_LONGJUMP
954
: MARIO_ANIM_CROUCH_FROM_SLOW_LONGJUMP,
955
ACT_CROUCHING);
956
return FALSE;
957
}
958
959
s32 act_hold_jump_land_stop(struct MarioState *m) {
960
if (m->marioObj->oInteractStatus & INT_STATUS_MARIO_DROP_OBJECT) {
961
return drop_and_set_mario_action(m, ACT_IDLE, 0);
962
}
963
964
if (m->input & INPUT_STOMPED) {
965
return drop_and_set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0);
966
}
967
968
if (m->input & (INPUT_NONZERO_ANALOG | INPUT_A_PRESSED | INPUT_OFF_FLOOR | INPUT_ABOVE_SLIDE)) {
969
return check_common_hold_action_exits(m);
970
}
971
972
if (m->input & INPUT_B_PRESSED) {
973
return set_mario_action(m, ACT_THROWING, 0);
974
}
975
976
landing_step(m, MARIO_ANIM_JUMP_LAND_WITH_LIGHT_OBJ, ACT_HOLD_IDLE);
977
return FALSE;
978
}
979
980
s32 act_hold_freefall_land_stop(struct MarioState *m) {
981
if (m->marioObj->oInteractStatus & INT_STATUS_MARIO_DROP_OBJECT) {
982
return drop_and_set_mario_action(m, ACT_IDLE, 0);
983
}
984
985
if (m->input & INPUT_STOMPED) {
986
return drop_and_set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0);
987
}
988
989
if (m->input & (INPUT_NONZERO_ANALOG | INPUT_A_PRESSED | INPUT_OFF_FLOOR | INPUT_ABOVE_SLIDE)) {
990
return check_common_hold_action_exits(m);
991
}
992
993
if (m->input & INPUT_B_PRESSED) {
994
return set_mario_action(m, ACT_THROWING, 0);
995
}
996
landing_step(m, MARIO_ANIM_FALL_LAND_WITH_LIGHT_OBJ, ACT_HOLD_IDLE);
997
return FALSE;
998
}
999
1000
s32 act_air_throw_land(struct MarioState *m) {
1001
if (m->input & INPUT_STOMPED) {
1002
return set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0);
1003
}
1004
1005
if (m->input & INPUT_OFF_FLOOR) {
1006
return set_mario_action(m, ACT_FREEFALL, 0);
1007
}
1008
1009
if (++m->actionTimer == 4) {
1010
mario_throw_held_object(m);
1011
}
1012
1013
landing_step(m, MARIO_ANIM_THROW_LIGHT_OBJECT, ACT_IDLE);
1014
return FALSE;
1015
}
1016
1017
s32 act_twirl_land(struct MarioState *m) {
1018
m->actionState = 1;
1019
if (m->input & INPUT_STOMPED) {
1020
return set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0);
1021
}
1022
1023
if (m->input & INPUT_OFF_FLOOR) {
1024
return set_mario_action(m, ACT_FREEFALL, 0);
1025
}
1026
1027
stationary_ground_step(m);
1028
set_mario_animation(m, MARIO_ANIM_TWIRL_LAND);
1029
if (m->angleVel[1] > 0) {
1030
m->angleVel[1] -= 0x400;
1031
if (m->angleVel[1] < 0) {
1032
m->angleVel[1] = 0;
1033
}
1034
1035
m->twirlYaw += m->angleVel[1];
1036
}
1037
1038
m->marioObj->header.gfx.angle[1] += m->twirlYaw;
1039
if (is_anim_at_end(m) && m->angleVel[1] == 0) {
1040
m->faceAngle[1] += m->twirlYaw;
1041
set_mario_action(m, ACT_IDLE, 0);
1042
}
1043
1044
return FALSE;
1045
}
1046
1047
s32 act_ground_pound_land(struct MarioState *m) {
1048
m->actionState = 1;
1049
if (configFlashbackGroundPound) {
1050
if (m->input & INPUT_OFF_FLOOR) {
1051
return set_mario_action(m, ACT_FREEFALL, 0);
1052
}
1053
else if (m->input & INPUT_ABOVE_SLIDE) {
1054
return set_mario_action(m, ACT_BUTT_SLIDE, 0);
1055
}
1056
if (m->input & INPUT_Z_DOWN) {
1057
if (gPlayer1Controller->stickX != 0 || gPlayer1Controller->stickY != 0) {
1058
m->vel[1] = 2.0f;
1059
mario_set_forward_vel(m, 56.0f);
1060
m->faceAngle[1] = m->intendedYaw;
1061
return set_mario_action(m, ACT_SLIDE_KICK, 0);
1062
}
1063
else {
1064
return set_mario_action(m, ACT_CROUCHING, 0);
1065
}
1066
}
1067
else if ((configGroundPoundJump) && (gPlayer1Controller->buttonDown & A_BUTTON)) {
1068
set_mario_action(m, ACT_DOUBLE_JUMP, 0);
1069
m->vel[1] = 60.0f;
1070
play_mario_sound(m, SOUND_ACTION_TERRAIN_HEAVY_LANDING, SOUND_MARIO_YAHOO);
1071
return TRUE;
1072
}
1073
else {
1074
set_mario_action(m, ACT_BACKWARD_ROLLOUT, 0);
1075
m->actionState = 1;
1076
m->vel[1] = 40.0f;
1077
mario_set_forward_vel(m, 0.0f);
1078
return TRUE;
1079
}
1080
}
1081
else {
1082
if ((configGroundPoundJump) && (gPlayer1Controller->buttonPressed & A_BUTTON)) {
1083
set_mario_action(m, ACT_DOUBLE_JUMP, 0);
1084
m->vel[1] = 60.0f;
1085
play_mario_sound(m, SOUND_ACTION_TERRAIN_HEAVY_LANDING, SOUND_MARIO_YAHOO);
1086
return TRUE;
1087
}
1088
1089
if (m->input & INPUT_STOMPED) {
1090
return drop_and_set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0);
1091
}
1092
1093
if (m->input & INPUT_OFF_FLOOR) {
1094
return set_mario_action(m, ACT_FREEFALL, 0);
1095
}
1096
1097
if (m->input & INPUT_ABOVE_SLIDE) {
1098
return set_mario_action(m, ACT_BUTT_SLIDE, 0);
1099
}
1100
}
1101
1102
landing_step(m, MARIO_ANIM_GROUND_POUND_LANDING, ACT_BUTT_SLIDE_STOP);
1103
return FALSE;
1104
}
1105
1106
s32 act_first_person(struct MarioState *m) {
1107
s32 sp1C = (m->input & (INPUT_OFF_FLOOR | INPUT_ABOVE_SLIDE | INPUT_STOMPED)) != 0;
1108
1109
if (m->actionState == 0) {
1110
lower_background_noise(2);
1111
set_camera_mode(m->area->camera, CAMERA_MODE_C_UP, 0x10);
1112
m->actionState = 1;
1113
} else if (!(m->input & INPUT_FIRST_PERSON) || sp1C) {
1114
raise_background_noise(2);
1115
// Go back to the last camera mode
1116
set_camera_mode(m->area->camera, -1, 1);
1117
return set_mario_action(m, ACT_IDLE, 0);
1118
}
1119
1120
if (m->floor->type == SURFACE_LOOK_UP_WARP
1121
&& save_file_get_total_star_count(gCurrSaveFileNum - 1, COURSE_MIN - 1, COURSE_MAX - 1) >= 10) {
1122
s16 sp1A = m->statusForCamera->headRotation[0];
1123
s16 sp18 = ((m->statusForCamera->headRotation[1] * 4) / 3) + m->faceAngle[1];
1124
if (sp1A == -0x1800 && (sp18 < -0x6FFF || sp18 >= 0x7000)) {
1125
level_trigger_warp(m, WARP_OP_UNKNOWN_01);
1126
}
1127
}
1128
1129
stationary_ground_step(m);
1130
set_mario_animation(m, MARIO_ANIM_FIRST_PERSON);
1131
return FALSE;
1132
}
1133
1134
s32 check_common_stationary_cancels(struct MarioState *m) {
1135
if (m->pos[1] < m->waterLevel - 100) {
1136
if (m->action == ACT_SPAWN_SPIN_LANDING) {
1137
load_level_init_text(0);
1138
}
1139
update_mario_sound_and_camera(m);
1140
return set_water_plunge_action(m);
1141
}
1142
1143
if (m->input & INPUT_SQUISHED) {
1144
update_mario_sound_and_camera(m);
1145
return drop_and_set_mario_action(m, ACT_SQUISHED, 0);
1146
}
1147
1148
if (m->action != ACT_UNKNOWN_0002020E) {
1149
if (m->health < 0x100) {
1150
update_mario_sound_and_camera(m);
1151
return drop_and_set_mario_action(m, ACT_STANDING_DEATH, 0);
1152
}
1153
}
1154
return FALSE;
1155
}
1156
1157
s32 mario_execute_stationary_action(struct MarioState *m) {
1158
s32 cancel;
1159
1160
if (check_common_stationary_cancels(m)) {
1161
return TRUE;
1162
}
1163
1164
if (mario_update_quicksand(m, 0.5f)) {
1165
return TRUE;
1166
}
1167
1168
/* clang-format off */
1169
switch (m->action) {
1170
case ACT_IDLE: cancel = act_idle(m); break;
1171
case ACT_START_SLEEPING: cancel = act_start_sleeping(m); break;
1172
case ACT_SLEEPING: cancel = act_sleeping(m); break;
1173
case ACT_WAKING_UP: cancel = act_waking_up(m); break;
1174
case ACT_PANTING: cancel = act_panting(m); break;
1175
case ACT_HOLD_PANTING_UNUSED: cancel = act_hold_panting_unused(m); break;
1176
case ACT_HOLD_IDLE: cancel = act_hold_idle(m); break;
1177
case ACT_HOLD_HEAVY_IDLE: cancel = act_hold_heavy_idle(m); break;
1178
case ACT_IN_QUICKSAND: cancel = act_in_quicksand(m); break;
1179
case ACT_STANDING_AGAINST_WALL: cancel = act_standing_against_wall(m); break;
1180
case ACT_COUGHING: cancel = act_coughing(m); break;
1181
case ACT_SHIVERING: cancel = act_shivering(m); break;
1182
case ACT_CROUCHING: cancel = act_crouching(m); break;
1183
case ACT_START_CROUCHING: cancel = act_start_crouching(m); break;
1184
case ACT_STOP_CROUCHING: cancel = act_stop_crouching(m); break;
1185
case ACT_START_CRAWLING: cancel = act_start_crawling(m); break;
1186
case ACT_STOP_CRAWLING: cancel = act_stop_crawling(m); break;
1187
case ACT_SLIDE_KICK_SLIDE_STOP: cancel = act_slide_kick_slide_stop(m); break;
1188
case ACT_SHOCKWAVE_BOUNCE: cancel = act_shockwave_bounce(m); break;
1189
case ACT_FIRST_PERSON: cancel = act_first_person(m); break;
1190
case ACT_JUMP_LAND_STOP: cancel = act_jump_land_stop(m); break;
1191
case ACT_DOUBLE_JUMP_LAND_STOP: cancel = act_double_jump_land_stop(m); break;
1192
case ACT_FREEFALL_LAND_STOP: cancel = act_freefall_land_stop(m); break;
1193
case ACT_SIDE_FLIP_LAND_STOP: cancel = act_side_flip_land_stop(m); break;
1194
case ACT_HOLD_JUMP_LAND_STOP: cancel = act_hold_jump_land_stop(m); break;
1195
case ACT_HOLD_FREEFALL_LAND_STOP: cancel = act_hold_freefall_land_stop(m); break;
1196
case ACT_AIR_THROW_LAND: cancel = act_air_throw_land(m); break;
1197
case ACT_LAVA_BOOST_LAND: cancel = act_lava_boost_land(m); break;
1198
case ACT_TWIRL_LAND: cancel = act_twirl_land(m); break;
1199
case ACT_TRIPLE_JUMP_LAND_STOP: cancel = act_triple_jump_land_stop(m); break;
1200
case ACT_BACKFLIP_LAND_STOP: cancel = act_backflip_land_stop(m); break;
1201
case ACT_LONG_JUMP_LAND_STOP: cancel = act_long_jump_land_stop(m); break;
1202
case ACT_GROUND_POUND_LAND: cancel = act_ground_pound_land(m); break;
1203
case ACT_BRAKING_STOP: cancel = act_braking_stop(m); break;
1204
case ACT_BUTT_SLIDE_STOP: cancel = act_butt_slide_stop(m); break;
1205
case ACT_HOLD_BUTT_SLIDE_STOP: cancel = act_hold_butt_slide_stop(m); break;
1206
}
1207
/* clang-format on */
1208
1209
if (!cancel && (m->input & INPUT_IN_WATER)) {
1210
m->particleFlags |= PARTICLE_IDLE_WATER_WAVE;
1211
}
1212
1213
return cancel;
1214
}
1215
1216