Skip to content

Commit 38705c1

Browse files
removed water particles from power build
1 parent 116782a commit 38705c1

4 files changed

Lines changed: 16 additions & 5 deletions

File tree

src/game/mario.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,13 +262,15 @@ void play_mario_jump_sound(struct MarioState *m) {
262262
* Spawns particles if the step sound says to, then either plays a step sound or relevant other sound.
263263
*/
264264
void play_sound_and_spawn_particles(struct MarioState *m, u32 soundBits, u32 waveParticleType) {
265+
#ifdef POWBUILD
265266
if (m->terrainSoundAddend == (SOUND_TERRAIN_WATER << 16)) {
266267
if (waveParticleType != 0) {
267268
m->particleFlags |= PARTICLE_SHALLOW_WATER_SPLASH;
268269
} else {
269270
m->particleFlags |= PARTICLE_SHALLOW_WATER_WAVE;
270271
}
271272
}
273+
#endif
272274

273275
if (soundBits == SOUND_ACTION_UNSTUCK_FROM_GROUND || soundBits == SOUND_ACTION_SPIN) {
274276
play_sound(soundBits, m->marioObj->header.gfx.cameraToObject);

src/game/mario_actions_moving.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1632,7 +1632,9 @@ s32 mario_execute_moving_action(struct MarioState *m) {
16321632
/* clang-format on */
16331633

16341634
if (!cancel && (m->input & INPUT_IN_WATER)) {
1635+
#ifdef POWBUILD
16351636
m->particleFlags |= PARTICLE_WAVE_TRAIL;
1637+
#endif
16361638
m->particleFlags &= ~PARTICLE_DUST;
16371639
}
16381640

src/game/mario_actions_stationary.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -826,9 +826,11 @@ s32 mario_execute_stationary_action(struct MarioState *m) {
826826
}
827827
/* clang-format on */
828828

829+
#ifdef POWBUILD
829830
if (!cancel && (m->input & INPUT_IN_WATER)) {
830831
m->particleFlags |= PARTICLE_IDLE_WATER_WAVE;
831832
}
833+
#endif
832834

833835
return cancel;
834836
}

src/game/mario_actions_submerged.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,11 @@ static void common_idle_step(struct MarioState *m, s32 animation, s32 arg) {
261261
m->forwardVel = 12.0f;
262262
}
263263

264+
#ifdef POWBUILD
264265
if (m->forwardVel > 2.0f) {
265266
set_swimming_at_surface_particles(m, PARTICLE_WAVE_TRAIL);
266267
}
268+
#endif
267269

268270
if (m->faceAngle[0] < targetPitch) {
269271
if ((m->faceAngle[0] += 0x200) > targetPitch) {
@@ -293,8 +295,9 @@ static void common_idle_step(struct MarioState *m, s32 animation, s32 arg) {
293295
} else {
294296
set_mario_anim_with_accel(m, animation, arg);
295297
}
296-
298+
#ifdef POWBUILD
297299
set_swimming_at_surface_particles(m, PARTICLE_IDLE_WATER_WAVE);
300+
#endif
298301
}
299302

300303
static s32 act_water_idle(struct MarioState *m) {
@@ -412,7 +415,9 @@ static void common_swimming_step(struct MarioState *m, s16 swimStrength) {
412415

413416
m->marioBodyState->headAngle[0] = approach_s32(m->marioBodyState->headAngle[0], 0, 0x200, 0x200);
414417

418+
#ifdef POWBUILD
415419
set_swimming_at_surface_particles(m, PARTICLE_WAVE_TRAIL);
420+
#endif
416421
}
417422

418423
static void play_swimming_noise(struct MarioState *m) {
@@ -831,14 +836,13 @@ static s32 act_water_plunge(struct MarioState *m) {
831836

832837
stepResult = perform_water_step(m);
833838

834-
#ifdef POWBUILD
835839
if (m->actionState == 0) {
836840
play_sound(SOUND_ACTION_UNKNOWN430, m->marioObj->header.gfx.cameraToObject);
837-
841+
#ifdef POWBUILD
838842
m->particleFlags |= PARTICLE_WATER_SPLASH;
843+
#endif
839844
m->actionState = 1;
840845
}
841-
#endif
842846

843847
if (stepResult == WATER_STEP_HIT_FLOOR || m->vel[1] >= endVSpeed || m->actionTimer > 20) {
844848
switch (stateFlags) {
@@ -878,8 +882,9 @@ static s32 act_water_plunge(struct MarioState *m) {
878882
set_mario_animation(m, MARIO_ANIM_FALL_WITH_LIGHT_OBJ);
879883
break;
880884
}
881-
885+
#ifdef POWBUILD
882886
m->particleFlags |= PARTICLE_PLUNGE_BUBBLE;
887+
#endif
883888
return FALSE;
884889
}
885890

0 commit comments

Comments
 (0)