mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-08-26 00:24:03 -04:00
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>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user