summaryrefslogtreecommitdiff
path: root/src/engine
diff options
context:
space:
mode:
authorcoco875 <59367621+coco875@users.noreply.github.com>2025-12-13 20:08:59 +0100
committerGitHub <noreply@github.com>2025-12-13 12:08:59 -0700
commit4e51b7d5b6a9b89deb5ef135deec0ee5f0087e7c (patch)
tree5c9d1156a8785e1f0736a89c6fa512fae8e4a3d1 /src/engine
parentb934e98fc34964970ab5efacb2fb7c3372ae0b1a (diff)
Document sound effects (pr 735 from the decomp) (#589)
Co-authored-by: Jed Grabman <JedGrabman@users.noreply.github.com> Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/objects/BombKart.cpp6
-rw-r--r--src/engine/objects/Mole.cpp2
-rw-r--r--src/engine/objects/Thwomp.cpp6
-rw-r--r--src/engine/vehicles/Boat.cpp2
-rw-r--r--src/engine/vehicles/Bus.cpp2
-rw-r--r--src/engine/vehicles/Car.cpp2
-rw-r--r--src/engine/vehicles/TankerTruck.cpp2
-rw-r--r--src/engine/vehicles/Train.cpp6
-rw-r--r--src/engine/vehicles/Truck.cpp2
9 files changed, 15 insertions, 15 deletions
diff --git a/src/engine/objects/BombKart.cpp b/src/engine/objects/BombKart.cpp
index 4ba5ff843..3ba60d98a 100644
--- a/src/engine/objects/BombKart.cpp
+++ b/src/engine/objects/BombKart.cpp
@@ -148,7 +148,7 @@ void OBombKart::Tick() {
circleTimer = 0;
state = States::EXPLODE;
Behaviour = States::EXPLODE;
- player->soundEffects |= 0x400000;
+ player->triggers |= VERTICAL_TUMBLE_TRIGGER;
player->type &= ~0x2000;
}
}
@@ -165,9 +165,9 @@ void OBombKart::Tick() {
Behaviour = States::EXPLODE;
circleTimer = 0;
if (IsFrappeSnowland()) {
- player->soundEffects |= 0x01000000;
+ player->triggers |= HIT_BY_STAR_TRIGGER;
} else {
- player->soundEffects |= 0x400000;
+ player->triggers |= VERTICAL_TUMBLE_TRIGGER;
}
}
}
diff --git a/src/engine/objects/Mole.cpp b/src/engine/objects/Mole.cpp
index 92d357873..8cdfd0599 100644
--- a/src/engine/objects/Mole.cpp
+++ b/src/engine/objects/Mole.cpp
@@ -217,7 +217,7 @@ void OMole::func_80081D34(s32 objectIndex) {
if (player->effects & 0x200) {
func_800C9060(i, 0x1900A046U);
} else {
- player->soundEffects |= 2;
+ player->triggers |= HIGH_TUMBLE_TRIGGER;
}
object->direction_angle[1] = camera->rot[1];
object->velocity[1] = (player->speed / 2) + 3.0;
diff --git a/src/engine/objects/Thwomp.cpp b/src/engine/objects/Thwomp.cpp
index b658b50ff..4a699c217 100644
--- a/src/engine/objects/Thwomp.cpp
+++ b/src/engine/objects/Thwomp.cpp
@@ -644,7 +644,7 @@ void OThwomp::func_80080B28(s32 objectIndex, s32 playerId) {
player = &gPlayerOne[playerId];
if (is_obj_flag_status_active(objectIndex, 0x00000200) != 0) {
- if (!(player->soundEffects & 0x100)) {
+ if (!(player->triggers & THWOMP_SQUISH_TRIGGER)) {
temp_f0 = func_80088F54(objectIndex, player);
if ((temp_f0 <= 9.0) && !(player->effects & 0x04000000) &&
(has_collided_horizontally_with_player(objectIndex, player) != 0)) {
@@ -675,7 +675,7 @@ void OThwomp::func_80080B28(s32 objectIndex, s32 playerId) {
func_800722A4(objectIndex, 2);
player->unk_040 = (s16) objectIndex;
player->unk_046 |= 2;
- player->soundEffects |= 0x100;
+ player->triggers |= THWOMP_SQUISH_TRIGGER;
reset_player_speed_and_velocity(player);
}
}
@@ -816,7 +816,7 @@ void OThwomp::func_80080DE4(s32 arg0) {
player = gPlayerOne;
for (var_v1 = 0; var_v1 < NUM_PLAYERS; var_v1++, player++) {
if (arg0 == player->unk_040) {
- player->soundEffects &= ~0x100;
+ player->triggers &= ~THWOMP_SQUISH_TRIGGER;
player->unk_040 = -1;
}
}
diff --git a/src/engine/vehicles/Boat.cpp b/src/engine/vehicles/Boat.cpp
index 5a74dc664..9a47fe1e1 100644
--- a/src/engine/vehicles/Boat.cpp
+++ b/src/engine/vehicles/Boat.cpp
@@ -205,7 +205,7 @@ void ABoat::VehicleCollision(s32 playerId, Player* player) {
if ((is_collide_with_vehicle(Position[0], Position[2], Velocity[0], Velocity[2], 200.0f, 60.0f,
playerX, playerZ) == 1) &&
(y_diff < 60.0)) {
- player->soundEffects |= 0x80000;
+ player->triggers |= HIT_PADDLE_BOAT_TRIGGER;
}
}
}
diff --git a/src/engine/vehicles/Bus.cpp b/src/engine/vehicles/Bus.cpp
index 07057d7b0..f1252c303 100644
--- a/src/engine/vehicles/Bus.cpp
+++ b/src/engine/vehicles/Bus.cpp
@@ -204,7 +204,7 @@ void ABus::VehicleCollision(s32 playerId, Player* player) {
if (((temp_f14) > -100.0) && ((temp_f14) < 100.0)) {
if (is_collide_with_vehicle(Position[0], Position[2], Velocity[0], Velocity[2], SomeArg3, SomeArg4,
spC4, spBC) == (s32) 1) {
- player->soundEffects |= REVERSE_SOUND_EFFECT;
+ player->triggers |= VERTICAL_TUMBLE_TRIGGER;
}
}
}
diff --git a/src/engine/vehicles/Car.cpp b/src/engine/vehicles/Car.cpp
index 8873d5248..9438a7332 100644
--- a/src/engine/vehicles/Car.cpp
+++ b/src/engine/vehicles/Car.cpp
@@ -205,7 +205,7 @@ void ACar::VehicleCollision(s32 playerId, Player* player) {
if (((temp_f14) > -100.0) && ((temp_f14) < 100.0)) {
if (is_collide_with_vehicle(Position[0], Position[2], Velocity[0], Velocity[2], SomeArg3, SomeArg4,
spC4, spBC) == (s32) 1) {
- player->soundEffects |= REVERSE_SOUND_EFFECT;
+ player->triggers |= VERTICAL_TUMBLE_TRIGGER;
}
}
}
diff --git a/src/engine/vehicles/TankerTruck.cpp b/src/engine/vehicles/TankerTruck.cpp
index f8a3d3d2a..ea9993652 100644
--- a/src/engine/vehicles/TankerTruck.cpp
+++ b/src/engine/vehicles/TankerTruck.cpp
@@ -204,7 +204,7 @@ void ATankerTruck::VehicleCollision(s32 playerId, Player* player) {
if (((temp_f14) > -100.0) && ((temp_f14) < 100.0)) {
if (is_collide_with_vehicle(Position[0], Position[2], Velocity[0], Velocity[2], SomeArg3, SomeArg4,
spC4, spBC) == (s32) 1) {
- player->soundEffects |= REVERSE_SOUND_EFFECT;
+ player->triggers |= VERTICAL_TUMBLE_TRIGGER;
}
}
}
diff --git a/src/engine/vehicles/Train.cpp b/src/engine/vehicles/Train.cpp
index 8b728375e..f76592756 100644
--- a/src/engine/vehicles/Train.cpp
+++ b/src/engine/vehicles/Train.cpp
@@ -272,13 +272,13 @@ void ATrain::VehicleCollision(s32 playerId, Player* player) {
if ((z_dist > -100.0) && (z_dist < 100.0)) {
if (is_collide_with_vehicle(trainCar->position[0], trainCar->position[2], trainCar->velocity[0],
trainCar->velocity[2], 60.0f, 20.0f, playerPosX, playerPosZ) == 1) {
- player->soundEffects |= REVERSE_SOUND_EFFECT;
+ player->triggers |= VERTICAL_TUMBLE_TRIGGER;
}
trainCar = &Tender;
if (trainCar->isActive == 1) {
if (is_collide_with_vehicle(trainCar->position[0], trainCar->position[2], trainCar->velocity[0],
trainCar->velocity[2], 30.0f, 20.0f, playerPosX, playerPosZ) == 1) {
- player->soundEffects |= REVERSE_SOUND_EFFECT;
+ player->triggers |= VERTICAL_TUMBLE_TRIGGER;
}
}
}
@@ -294,7 +294,7 @@ void ATrain::VehicleCollision(s32 playerId, Player* player) {
if (is_collide_with_vehicle(trainCar->position[0], trainCar->position[2],
trainCar->velocity[0], trainCar->velocity[2], 30.0f, 20.0f,
playerPosX, playerPosZ) == 1) {
- player->soundEffects |= REVERSE_SOUND_EFFECT;
+ player->triggers |= VERTICAL_TUMBLE_TRIGGER;
}
}
}
diff --git a/src/engine/vehicles/Truck.cpp b/src/engine/vehicles/Truck.cpp
index 76914418b..a191aec37 100644
--- a/src/engine/vehicles/Truck.cpp
+++ b/src/engine/vehicles/Truck.cpp
@@ -204,7 +204,7 @@ void ATruck::VehicleCollision(s32 playerId, Player* player) {
if (((temp_f14) > -100.0) && ((temp_f14) < 100.0)) {
if (is_collide_with_vehicle(Position[0], Position[2], Velocity[0], Velocity[2], SomeArg3, SomeArg4,
spC4, spBC) == (s32) 1) {
- player->soundEffects |= REVERSE_SOUND_EFFECT;
+ player->triggers |= VERTICAL_TUMBLE_TRIGGER;
}
}
}