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

Go to the source code of this file.

Functions

void player_surface_spawn_basic_fx (void)
 
void player_surface_spawn_flower_fx (void)
 
void player_surface_spawn_cloud_fx (void)
 
void player_surface_spawn_snow_fx (void)
 
void player_surface_spawn_hedges_fx (void)
 
void player_surface_spawn_water_fx (void)
 
void surface_set_walk_effect (s32 effect)
 Select the type of surface effect spawned by the player while moving The effect is reset between maps, so include this in the Main script for every map you wish to change.
 
void player_surface_spawn_fx (void)
 
void npc_surface_spawn_basic_fx (Npc *npc, SurfaceInteractMode mode)
 
void npc_surface_spawn_flower_fx (Npc *npc, SurfaceInteractMode mode)
 
void npc_surface_spawn_cloud_fx (Npc *npc, SurfaceInteractMode mode)
 
void npc_surface_spawn_snow_fx (Npc *npc, SurfaceInteractMode mode)
 
void npc_surface_spawn_hedges_fx (Npc *npc, SurfaceInteractMode mode)
 
void npc_surface_spawn_water_fx (Npc *npc, SurfaceInteractMode mode)
 
void npc_surface_spawn_fx (Npc *npc, SurfaceInteractMode mode)
 

Variables

BSS s32 PrevTimeInAir
 
BSS s32 LandedTimeInAir
 
s32 PrevSurfaceType = SURFACE_TYPE_DEFAULT
 
s32 SurfaceWalkEffectType = SURFACE_WALK_FX_STANDARD
 
s16 PlayerDustSpawnDelay = 4
 
f32 PlayerFlowerSplashAngle = 0.0f
 
s16 PlayerFlowerSplashDelay = 5
 
s16 PlayerFlowerTrailDelay = 4
 
s32 PlayerFlowerTrailVariant = 0
 
f32 PlayerCloudPuffAngle = 0.0f
 
s16 PlayerSnowSpawnDelay = 4
 
b32 PlayerNextFootParity = FALSE
 
s16 PlayerHedgeSpawnDelay = 4
 
s16 PlayerWaterSpawnDelay = 4
 
s16 NpcDustSpawnDelay = 4
 
f32 NpcDustSpawnAngle = 0.0f
 
s16 NpcFlowerSplashDelay = 5
 
f32 NpcFlowerSplashAngle = 0
 
s16 NpcFlowerTrailDelay = 4
 
s32 NpcFlowerTrailVariant = 0
 
f32 NpcCloudPuffAngle = 0.0f
 
s16 NpcSnowSpawnDelay = 4
 
s32 NpcNextFootParity = 0
 
s16 NpcHedgeSpawnDelay = 4
 
s16 NpcWaterSpawnDelay = 4
 

Function Documentation

◆ player_surface_spawn_basic_fx()

void player_surface_spawn_basic_fx ( void )

Definition at line 83 of file surfaces.c.

83 {
84 f32 sinAngle, cosAngle;
85 f32 x, y, z;
86
87 // spawn effects if landing from a decent height
90 && LandedTimeInAir >= 10
91 ) {
95 switch (SurfaceWalkEffectType) {
97 fx_landing_dust(0, x, y, z, 0.0f);
98 break;
100 fx_misc_particles(3, x, y, z, 13.0f, 10.0f, 1.0f, 5, 30);
101 break;
102 }
103 return;
104 }
105
106 // spawn effects if ground pounding
109 ) {
110 x = gPlayerStatus.pos.x;
111 y = gPlayerStatus.pos.y;
112 z = gPlayerStatus.pos.z;
113 switch (SurfaceWalkEffectType) {
115 fx_landing_dust(0, x, y, z, 0.0f);
116 break;
118 fx_misc_particles(3, x, y, z, gPlayerStatus.colliderDiameter, 10.0f, 1.0f, 5, 40);
119 break;
120 }
121 return;
122 }
123
124 // spawn effects if spinning and moving
126 if (PlayerDustSpawnDelay++ >= 4) {
128
129 switch (SurfaceWalkEffectType) {
131 sin_cos_rad(DEG_TO_RAD(clamp_angle(-gPlayerStatus.curYaw)), &sinAngle, &cosAngle);
132 fx_walking_dust(
133 0,
134 gPlayerStatus.pos.x + (gPlayerStatus.colliderDiameter * sinAngle * 0.2f),
135 gPlayerStatus.pos.y + 1.5f,
136 gPlayerStatus.pos.z + (gPlayerStatus.colliderDiameter * cosAngle * 0.2f),
137 sinAngle,
138 cosAngle
139 );
140 break;
143 fx_misc_particles(
144 3,
146 gPlayerStatus.pos.y + 1.5f,
148 13.0f, 10.0f, 1.0f, 5, 30
149 );
150 break;
151 }
152 }
153 return;
154 }
155
156 // spawn effects if running or starting a spin
159 ) {
160 if (PlayerDustSpawnDelay++ >= 4) {
162
163 switch (SurfaceWalkEffectType) {
165 sin_cos_rad(DEG_TO_RAD(clamp_angle(-gPlayerStatus.curYaw)), &sinAngle, &cosAngle);
166 fx_walking_dust(
167 0,
168 gPlayerStatus.pos.x + (gPlayerStatus.colliderDiameter * sinAngle * 0.2f),
169 gPlayerStatus.pos.y + 1.5f,
170 gPlayerStatus.pos.z + (gPlayerStatus.colliderDiameter * cosAngle * 0.2f),
171 sinAngle,
172 cosAngle
173 );
174 break;
177 fx_misc_particles(
178 3,
180 gPlayerStatus.pos.y + 1.5f,
182 13.0f, 10.0f, 1.0f, 5, 30
183 );
184 break;
185 }
186 }
187 return;
188 }
189
190 // reset the delay
192 return;
193}
#define clamp_angle
@ PS_FLAG_ACTION_STATE_CHANGED
Definition enums.h:3084
@ PS_FLAG_SPECIAL_LAND
Definition enums.h:3048
@ ACTION_STATE_SPIN_POUND
Definition enums.h:2442
@ ACTION_STATE_TORNADO_POUND
Definition enums.h:2444
@ ACTION_STATE_LAND
Definition enums.h:2437
@ ACTION_STATE_SPIN
Definition enums.h:2454
@ ACTION_STATE_RUN
Definition enums.h:2428
void sin_cos_rad(f32 rad, f32 *outSinTheta, f32 *outCosTheta)
Definition 43F0.c:706
#define DEG_TO_RAD(deg)
Definition macros.h:134
s32 SurfaceWalkEffectType
Definition surfaces.c:16
s16 PlayerDustSpawnDelay
Definition surfaces.c:30
BSS s32 LandedTimeInAir
Definition surfaces.c:12
@ SURFACE_WALK_FX_STANDARD
Definition surfaces.h:7
@ SURFACE_WALK_FX_SPARKLE
Definition surfaces.h:8
PlayerStatus gPlayerStatus
Definition 77480.c:39

Referenced by player_surface_spawn_fx().

◆ player_surface_spawn_flower_fx()

void player_surface_spawn_flower_fx ( void )

Definition at line 195 of file surfaces.c.

195 {
196 f32 sinAngle, cosAngle;
197 f32 x, y, z;
198
202 ) {
203 x = gPlayerStatus.pos.x;
204 z = gPlayerStatus.pos.z;
205 y = gPlayerStatus.pos.y + 14.0f;
206
207 fx_flower_splash(x, y, z, PlayerFlowerSplashAngle);
210 return;
211 }
212
214 if (PlayerFlowerSplashDelay > 5) {
216 }
217
221 ) {
222 if (PlayerFlowerTrailDelay++ > 0) {
224 sin_cos_rad(DEG_TO_RAD(clamp_angle(-gPlayerStatus.curYaw)), &sinAngle, &cosAngle);
225
226 x = gPlayerStatus.pos.x + (gPlayerStatus.colliderDiameter * sinAngle * -0.4f);
227 z = gPlayerStatus.pos.z + (gPlayerStatus.colliderDiameter * cosAngle * -0.4f);
228 y = gPlayerStatus.pos.y + 15.5f;
229
230 fx_flower_trail(0, x, y, z, -gPlayerStatus.curYaw + rand_int(10) - 5.0f, PlayerFlowerTrailVariant);
232 }
233 return;
234 }
235
237 return;
238}
#define rand_int
@ ACTION_STATE_JUMP
Definition enums.h:2430
@ ACTION_STATE_WALK
Definition enums.h:2427
f32 PlayerFlowerSplashAngle
Definition surfaces.c:31
s16 PlayerFlowerTrailDelay
Definition surfaces.c:33
s16 PlayerFlowerSplashDelay
Definition surfaces.c:32
s32 PlayerFlowerTrailVariant
Definition surfaces.c:34

Referenced by player_surface_spawn_fx().

◆ player_surface_spawn_cloud_fx()

void player_surface_spawn_cloud_fx ( void )

Definition at line 240 of file surfaces.c.

240 {
241 f32 sinAngle, cosAngle;
242 f32 dx, dy, dz;
243 s32 i;
244
248 && LandedTimeInAir >= 10
249 ) {
250 fx_cloud_puff(
252 (gPlayerStatus.pos.y + 14.0f) - 5.0f,
255 );
257
258 for (i = 0; i < 4; i++) {
259 dx = rand_int(10) - 5;
260 dz = rand_int(10) - 5;
261 dy = -2.0f - ((SQ(dx) + SQ(dz)) / 5.0f);
262
263 sin_cos_rad(DEG_TO_RAD(clamp_angle(-gPlayerStatus.curYaw + (i * 90))), &sinAngle, &cosAngle);
264 fx_cloud_trail(
265 0,
266 gPlayerStatus.pos.x + (gPlayerStatus.colliderDiameter * sinAngle * -0.3f) + dx,
267 gPlayerStatus.pos.y + 15.5f + dy,
268 gPlayerStatus.pos.z + (gPlayerStatus.colliderDiameter * cosAngle * -0.3f) + dz
269 );
270 }
271 return;
272 }
273
277 ) {
278 dx = rand_int(10) - 5;
279 dz = rand_int(10) - 5;
280 dy = -2.0f - ((SQ(dx) + SQ(dz)) / 5.0f);
281
282 sin_cos_rad(DEG_TO_RAD(clamp_angle(-gPlayerStatus.curYaw)), &sinAngle, &cosAngle);
283 fx_cloud_trail(
284 1,
285 gPlayerStatus.pos.x + (gPlayerStatus.colliderDiameter * sinAngle * -0.3f) + dx,
286 gPlayerStatus.pos.y + 15.5f + dy,
287 gPlayerStatus.pos.z + (gPlayerStatus.colliderDiameter * cosAngle * -0.3f) + dz
288 );
289
290 }
291 return;
292}
#define SQ(x)
Definition macros.h:166
f32 PlayerCloudPuffAngle
Definition surfaces.c:35

Referenced by player_surface_spawn_fx().

◆ player_surface_spawn_snow_fx()

void player_surface_spawn_snow_fx ( void )

Definition at line 294 of file surfaces.c.

294 {
295 f32 sinAngle, cosAngle;
296
302 ) {
303 if (PlayerSnowSpawnDelay++ >= 4) {
305 sin_cos_rad(DEG_TO_RAD(clamp_angle(-gPlayerStatus.curYaw)), &sinAngle, &cosAngle);
306 fx_footprint(
307 gPlayerStatus.pos.x + (gPlayerStatus.colliderDiameter * sinAngle * 0.2f),
308 gPlayerStatus.pos.y + 1.5f,
309 gPlayerStatus.pos.z + (gPlayerStatus.colliderDiameter * cosAngle * 0.2f),
312 );
314 }
315 return;
316 }
317
319 return;
320}
@ ACTION_STATE_IDLE
Definition enums.h:2426
b32 PlayerNextFootParity
Definition surfaces.c:37
s16 PlayerSnowSpawnDelay
Definition surfaces.c:36

Referenced by player_surface_spawn_fx().

◆ player_surface_spawn_hedges_fx()

void player_surface_spawn_hedges_fx ( void )

Definition at line 322 of file surfaces.c.

322 {
323 f32 sinAngle, cosAngle;
324
330 ) {
331 if (PlayerHedgeSpawnDelay++ >= 4) {
333 sin_cos_rad(DEG_TO_RAD(clamp_angle(-gPlayerStatus.curYaw)), &sinAngle, &cosAngle);
334 fx_falling_leaves(
335 0,
336 gPlayerStatus.pos.x + (gPlayerStatus.colliderDiameter * sinAngle * 0.2f),
337 40.0f,
338 gPlayerStatus.pos.z + (gPlayerStatus.colliderDiameter * cosAngle * 0.2f)
339 );
340 }
341 return;
342 }
343
345 return;
346}
s16 PlayerHedgeSpawnDelay
Definition surfaces.c:38

Referenced by player_surface_spawn_fx().

◆ player_surface_spawn_water_fx()

void player_surface_spawn_water_fx ( void )

Definition at line 348 of file surfaces.c.

348 {
349 f32 sinAngle, cosAngle;
350
356 ) {
357 if (PlayerWaterSpawnDelay++ >= 4) {
359 sin_cos_rad(DEG_TO_RAD(clamp_angle(-gPlayerStatus.curYaw)), &sinAngle, &cosAngle);
360 fx_rising_bubble(
361 0,
362 gPlayerStatus.pos.x + (gPlayerStatus.colliderDiameter * sinAngle * 0.2f),
363 gPlayerStatus.pos.y + 0.0f,
364 gPlayerStatus.pos.z + (gPlayerStatus.colliderDiameter * cosAngle * 0.2f),
365 0.0f
366 );
367 }
368 return;
369 }
370
372 return;
373}
s16 PlayerWaterSpawnDelay
Definition surfaces.c:39

Referenced by player_surface_spawn_fx().

◆ surface_set_walk_effect()

void surface_set_walk_effect ( s32 effect)

Select the type of surface effect spawned by the player while moving The effect is reset between maps, so include this in the Main script for every map you wish to change.

Parameters
typeenum value from SurfaceWalkEffect

Definition at line 18 of file surfaces.c.

18 {
19 SurfaceWalkEffectType = effect;
20}

Referenced by load_map_by_IDs().

◆ player_surface_spawn_fx()

void player_surface_spawn_fx ( void )

Definition at line 42 of file surfaces.c.

42 {
43 s32 surfaceType = SURFACE_TYPE_DEFAULT;
44
46 surfaceType = PrevSurfaceType;
47 }
48
50
52 surfaceType = PrevSurfaceType;
53 }
54
57 }
58
60
61 switch (surfaceType) {
64 break;
67 break;
70 break;
73 break;
76 break;
77 default:
79 break;
80 }
81}
@ SURFACE_TYPE_HEDGES
used within hedge maze in flo_11
Definition enums.h:4679
@ SURFACE_TYPE_DEFAULT
Definition enums.h:4670
@ SURFACE_TYPE_SNOW
Definition enums.h:4678
@ SURFACE_TYPE_WATER
Definition enums.h:4671
@ SURFACE_TYPE_CLOUD
used with clouds in flo_19 and flo_21
Definition enums.h:4677
@ SURFACE_TYPE_FLOWERS
Definition enums.h:4676
@ COLLIDER_FLAGS_SURFACE_TYPE_MASK
Definition enums.h:4693
s32 get_collider_flags(s32 colliderID)
Definition collision.c:481
void player_surface_spawn_water_fx(void)
Definition surfaces.c:348
void player_surface_spawn_cloud_fx(void)
Definition surfaces.c:240
void player_surface_spawn_hedges_fx(void)
Definition surfaces.c:322
BSS s32 PrevTimeInAir
Definition surfaces.c:11
void player_surface_spawn_flower_fx(void)
Definition surfaces.c:195
void player_surface_spawn_snow_fx(void)
Definition surfaces.c:294
s32 PrevSurfaceType
Definition surfaces.c:14
void player_surface_spawn_basic_fx(void)
Definition surfaces.c:83
CollisionStatus gCollisionStatus
Definition 7BB60.c:6

Referenced by player_jump(), and update_player().

◆ npc_surface_spawn_basic_fx()

void npc_surface_spawn_basic_fx ( Npc * npc,
SurfaceInteractMode mode )

Definition at line 424 of file surfaces.c.

424 {
425 f32 sinTheta, cosTheta;
426 f32 x, y, z;
427
428 if (mode == SURFACE_INTERACT_LAND) {
429 x = npc->pos.x;
430 y = npc->pos.y + 0.0f;
431 z = npc->pos.z;
432
433 switch (SurfaceWalkEffectType) {
435 fx_landing_dust(0, x, y, z, NpcDustSpawnAngle);
437 break;
439 fx_misc_particles(3, x, y, z, 13.0f, 10.0f, 1.0f, 5, 30);
440 break;
441 }
442 } else if (mode != SURFACE_INTERACT_WALK) {
443 if (NpcDustSpawnDelay++ >= 4) {
445
446 switch (SurfaceWalkEffectType) {
448 sin_cos_rad(DEG_TO_RAD(clamp_angle(-npc->yaw)), &sinTheta, &cosTheta);
449 fx_walking_dust(0,
450 npc->pos.x + (npc->collisionDiameter * sinTheta * 0.2f),
451 npc->pos.y + 1.5f,
452 npc->pos.z + (npc->collisionDiameter * cosTheta * 0.2f),
453 sinTheta,
454 cosTheta);
455 break;
457 sin_cos_rad(DEG_TO_RAD(clamp_angle(npc->yaw)), &sinTheta, &cosTheta);
458 fx_misc_particles(3,
459 npc->pos.x + (npc->collisionDiameter * sinTheta),
460 npc->pos.y + 1.5f,
461 npc->pos.z + (npc->collisionDiameter * cosTheta),
462 5.0f, 10.0f, 1.0f, 5, 30);
463 break;
464 }
465 }
466 }
467}
@ SURFACE_INTERACT_WALK
Definition enums.h:4684
@ SURFACE_INTERACT_LAND
Definition enums.h:4686
s16 collisionDiameter
Vec3f pos
s16 NpcDustSpawnDelay
Definition surfaces.c:375
f32 NpcDustSpawnAngle
Definition surfaces.c:376

Referenced by npc_surface_spawn_fx().

◆ npc_surface_spawn_flower_fx()

void npc_surface_spawn_flower_fx ( Npc * npc,
SurfaceInteractMode mode )

Definition at line 469 of file surfaces.c.

469 {
470 f32 sinAngle, cosAngle;
471 f32 x, y, z;
472
473 if (mode == SURFACE_INTERACT_LAND && NpcFlowerSplashDelay == 5) {
474 x = npc->pos.x;
475 y = npc->pos.y + + 14.0f;
476 z = npc->pos.z;
477
478 fx_flower_splash(x, y, z, NpcFlowerSplashAngle);
481 return;
482 }
483
485 if (NpcFlowerSplashDelay > 5) {
487 }
488
489 if (NpcFlowerTrailDelay++ > 0) {
491
492 sin_cos_rad(DEG_TO_RAD(clamp_angle(-npc->yaw)), &sinAngle, &cosAngle);
493 x = npc->pos.x + (npc->collisionDiameter * sinAngle * -0.4f);
494 z = npc->pos.z + (npc->collisionDiameter * cosAngle * -0.4f);
495 y = npc->pos.y + 15.5f;
496
497 fx_flower_trail(1, x, y, z, -npc->yaw + rand_int(10) - 5.0f, NpcFlowerTrailVariant);
499 }
500}
s32 NpcFlowerTrailVariant
Definition surfaces.c:380
f32 NpcFlowerSplashAngle
Definition surfaces.c:378
s16 NpcFlowerTrailDelay
Definition surfaces.c:379
s16 NpcFlowerSplashDelay
Definition surfaces.c:377

Referenced by npc_surface_spawn_fx().

◆ npc_surface_spawn_cloud_fx()

void npc_surface_spawn_cloud_fx ( Npc * npc,
SurfaceInteractMode mode )

Definition at line 502 of file surfaces.c.

502 {
503 f32 sinAngle, cosAngle;
504 f32 dx, dy, dz;
505 s32 i;
506
507 if (mode == SURFACE_INTERACT_LAND) {
508 fx_cloud_puff(npc->pos.x, (npc->pos.y + 14.0f) - 5.0f, npc->pos.z, NpcCloudPuffAngle);
509
511
512 for (i = 0; i < 4; i++) {
513 dx = rand_int(10) - 5;
514 dz = rand_int(10) - 5;
515 dy = -2.0f - ((SQ(dx) + SQ(dz)) / 5.0f);
516
517 sin_cos_rad(DEG_TO_RAD(clamp_angle(-npc->yaw + (i * 90))), &sinAngle, &cosAngle);
518 fx_cloud_trail(
519 1,
520 npc->pos.x + (npc->collisionDiameter * sinAngle * -0.3f) + dx,
521 npc->pos.y + 15.5f + dy,
522 npc->pos.z + (npc->collisionDiameter * cosAngle * -0.3f) + dz
523 );
524 }
525 } else {
526 dx = rand_int(10) - 5;
527 dz = rand_int(10) - 5;
528 dy = -2.0f - ((SQ(dx) + SQ(dz)) / 5.0f);
529
530 sin_cos_rad(DEG_TO_RAD(clamp_angle(-npc->yaw)), &sinAngle, &cosAngle);
531 fx_cloud_trail(
532 1,
533 npc->pos.x + (npc->collisionDiameter * sinAngle * -0.3f) + dx,
534 npc->pos.y + 15.5f + dy,
535 npc->pos.z + (npc->collisionDiameter * cosAngle * -0.3f) + dz
536 );
537 }
538}
f32 NpcCloudPuffAngle
Definition surfaces.c:381

Referenced by npc_surface_spawn_fx().

◆ npc_surface_spawn_snow_fx()

void npc_surface_spawn_snow_fx ( Npc * npc,
SurfaceInteractMode mode )

Definition at line 540 of file surfaces.c.

540 {
541 f32 sinAngle, cosAngle;
542
544 return;
545 }
546
547 if (NpcSnowSpawnDelay++ >= 4) {
549 sin_cos_rad(DEG_TO_RAD(clamp_angle(-npc->yaw)), &sinAngle, &cosAngle);
550 fx_footprint(
551 npc->pos.x + (npc->collisionDiameter * sinAngle * 0.2f),
552 npc->pos.y + 1.5f,
553 npc->pos.z + (npc->collisionDiameter * cosAngle * 0.2f),
554 -npc->yaw,
557 }
558}
@ PARTNER_ACTION_NONE
Definition enums.h:2932
@ PARTNER_LAKILESTER
Definition enums.h:2893
s16 NpcSnowSpawnDelay
Definition surfaces.c:382
s32 NpcNextFootParity
Definition surfaces.c:383
PartnerStatus gPartnerStatus
Definition partners.c:42

Referenced by npc_surface_spawn_fx().

◆ npc_surface_spawn_hedges_fx()

void npc_surface_spawn_hedges_fx ( Npc * npc,
SurfaceInteractMode mode )

Definition at line 560 of file surfaces.c.

560 {
561 f32 sinAngle, cosAngle;
562
563 if (NpcHedgeSpawnDelay++ >= 4) {
565 sin_cos_rad(DEG_TO_RAD(clamp_angle(-npc->yaw)), &sinAngle, &cosAngle);
566 fx_falling_leaves(
567 1,
568 npc->pos.x + (npc->collisionDiameter * sinAngle * 0.2f),
569 40.0f,
570 npc->pos.z + (npc->collisionDiameter * cosAngle * 0.2f));
571 }
572}
s16 NpcHedgeSpawnDelay
Definition surfaces.c:384

Referenced by npc_surface_spawn_fx().

◆ npc_surface_spawn_water_fx()

void npc_surface_spawn_water_fx ( Npc * npc,
SurfaceInteractMode mode )

Definition at line 574 of file surfaces.c.

574 {
575 f32 sinAngle, cosAngle;
576
577 if (NpcWaterSpawnDelay++ >= 4) {
579 sin_cos_rad(DEG_TO_RAD(clamp_angle(-npc->yaw)), &sinAngle, &cosAngle);
580 fx_rising_bubble(
581 0,
582 npc->pos.x + (npc->collisionDiameter * sinAngle * 0.2f),
583 npc->pos.y + 0.0f,
584 npc->pos.z + (npc->collisionDiameter * cosAngle * 0.2f),
585 0.0f);
586 }
587}
s16 NpcWaterSpawnDelay
Definition surfaces.c:385

Referenced by npc_surface_spawn_fx().

◆ npc_surface_spawn_fx()

void npc_surface_spawn_fx ( Npc * npc,
SurfaceInteractMode mode )

Definition at line 394 of file surfaces.c.

394 {
395 s32 surfaceType;
396
397 if ((npc->flags & NPC_FLAG_INVISIBLE) || !(npc->flags & NPC_FLAG_TOUCHES_GROUND) || npc->moveSpeed == 0.0f) {
398 return;
399 }
400
402 switch (surfaceType) {
405 break;
408 break;
410 npc_surface_spawn_snow_fx(npc, mode);
411 break;
414 break;
417 break;
418 default:
420 break;
421 }
422}
@ NPC_FLAG_TOUCHES_GROUND
Definition enums.h:3020
@ NPC_FLAG_INVISIBLE
Definition enums.h:2999
s32 flags
s16 curFloor
f32 moveSpeed
void npc_surface_spawn_water_fx(Npc *npc, SurfaceInteractMode mode)
Definition surfaces.c:574
void npc_surface_spawn_snow_fx(Npc *npc, SurfaceInteractMode mode)
Definition surfaces.c:540
void npc_surface_spawn_flower_fx(Npc *npc, SurfaceInteractMode mode)
Definition surfaces.c:469
void npc_surface_spawn_cloud_fx(Npc *npc, SurfaceInteractMode mode)
Definition surfaces.c:502
void npc_surface_spawn_basic_fx(Npc *npc, SurfaceInteractMode mode)
Definition surfaces.c:424
void npc_surface_spawn_hedges_fx(Npc *npc, SurfaceInteractMode mode)
Definition surfaces.c:560

Referenced by _npc_jump_to(), AvoidPlayerAI_Chase(), basic_ai_chase(), CleftAI_Tackle(), GuardAI_Chase(), partner_get_out(), partner_move_to_goal(), partner_walking_follow_player(), PatrolAI_Chase(), PatrolAI_Move(), player_jump(), and update_riding_physics().

Variable Documentation

◆ PrevTimeInAir

BSS s32 PrevTimeInAir

Definition at line 11 of file surfaces.c.

Referenced by player_surface_spawn_fx().

◆ LandedTimeInAir

BSS s32 LandedTimeInAir

◆ PrevSurfaceType

s32 PrevSurfaceType = SURFACE_TYPE_DEFAULT

Definition at line 14 of file surfaces.c.

Referenced by player_surface_spawn_fx().

◆ SurfaceWalkEffectType

s32 SurfaceWalkEffectType = SURFACE_WALK_FX_STANDARD

◆ PlayerDustSpawnDelay

s16 PlayerDustSpawnDelay = 4

Definition at line 30 of file surfaces.c.

Referenced by player_surface_spawn_basic_fx().

◆ PlayerFlowerSplashAngle

f32 PlayerFlowerSplashAngle = 0.0f

Definition at line 31 of file surfaces.c.

Referenced by player_surface_spawn_flower_fx().

◆ PlayerFlowerSplashDelay

s16 PlayerFlowerSplashDelay = 5

Definition at line 32 of file surfaces.c.

Referenced by player_surface_spawn_flower_fx().

◆ PlayerFlowerTrailDelay

s16 PlayerFlowerTrailDelay = 4

Definition at line 33 of file surfaces.c.

Referenced by player_surface_spawn_flower_fx().

◆ PlayerFlowerTrailVariant

s32 PlayerFlowerTrailVariant = 0

Definition at line 34 of file surfaces.c.

Referenced by player_surface_spawn_flower_fx().

◆ PlayerCloudPuffAngle

f32 PlayerCloudPuffAngle = 0.0f

Definition at line 35 of file surfaces.c.

Referenced by player_surface_spawn_cloud_fx().

◆ PlayerSnowSpawnDelay

s16 PlayerSnowSpawnDelay = 4

Definition at line 36 of file surfaces.c.

Referenced by player_surface_spawn_snow_fx().

◆ PlayerNextFootParity

b32 PlayerNextFootParity = FALSE

Definition at line 37 of file surfaces.c.

Referenced by player_surface_spawn_snow_fx().

◆ PlayerHedgeSpawnDelay

s16 PlayerHedgeSpawnDelay = 4

Definition at line 38 of file surfaces.c.

Referenced by player_surface_spawn_hedges_fx().

◆ PlayerWaterSpawnDelay

s16 PlayerWaterSpawnDelay = 4

Definition at line 39 of file surfaces.c.

Referenced by player_surface_spawn_water_fx().

◆ NpcDustSpawnDelay

s16 NpcDustSpawnDelay = 4

Definition at line 375 of file surfaces.c.

Referenced by npc_surface_spawn_basic_fx().

◆ NpcDustSpawnAngle

f32 NpcDustSpawnAngle = 0.0f

Definition at line 376 of file surfaces.c.

Referenced by npc_surface_spawn_basic_fx().

◆ NpcFlowerSplashDelay

s16 NpcFlowerSplashDelay = 5

Definition at line 377 of file surfaces.c.

Referenced by npc_surface_spawn_flower_fx().

◆ NpcFlowerSplashAngle

f32 NpcFlowerSplashAngle = 0

Definition at line 378 of file surfaces.c.

Referenced by npc_surface_spawn_flower_fx().

◆ NpcFlowerTrailDelay

s16 NpcFlowerTrailDelay = 4

Definition at line 379 of file surfaces.c.

Referenced by npc_surface_spawn_flower_fx().

◆ NpcFlowerTrailVariant

s32 NpcFlowerTrailVariant = 0

Definition at line 380 of file surfaces.c.

Referenced by npc_surface_spawn_flower_fx().

◆ NpcCloudPuffAngle

f32 NpcCloudPuffAngle = 0.0f

Definition at line 381 of file surfaces.c.

Referenced by npc_surface_spawn_cloud_fx().

◆ NpcSnowSpawnDelay

s16 NpcSnowSpawnDelay = 4

Definition at line 382 of file surfaces.c.

Referenced by npc_surface_spawn_snow_fx().

◆ NpcNextFootParity

s32 NpcNextFootParity = 0

Definition at line 383 of file surfaces.c.

Referenced by npc_surface_spawn_snow_fx().

◆ NpcHedgeSpawnDelay

s16 NpcHedgeSpawnDelay = 4

Definition at line 384 of file surfaces.c.

Referenced by npc_surface_spawn_hedges_fx().

◆ NpcWaterSpawnDelay

s16 NpcWaterSpawnDelay = 4

Definition at line 385 of file surfaces.c.

Referenced by npc_surface_spawn_water_fx().