mirror of
https://github.com/n64decomp/mk64
synced 2026-08-14 04:22:30 -04:00
This reverts commit e88f33fb18.
This commit is contained in:
+33
-34
@@ -134,9 +134,8 @@ UNUSED void func_unnamed33(void) {
|
||||
}
|
||||
|
||||
void func_8008C310(Player* player) {
|
||||
// The << 9 is a hacky way to check for VERTICAL_TUMBLE_TRIGGER
|
||||
if ((player->triggers & HIGH_TUMBLE_TRIGGER) || (player->triggers & LOW_TUMBLE_TRIGGER) || ((player->triggers << 9) < 0) ||
|
||||
(player->triggers & HIT_BY_STAR_TRIGGER)) {
|
||||
if ((player->soundEffects & 2) || (player->soundEffects & 4) || ((player->soundEffects << 9) < 0) ||
|
||||
(player->soundEffects & HIT_BY_ITEM_SOUND_EFFECT)) {
|
||||
player->unk_0B6 = ((u16) player->unk_0B6 | 0x1000);
|
||||
}
|
||||
}
|
||||
@@ -217,7 +216,7 @@ void func_8008C528(Player* player, s8 playerIndex) {
|
||||
} else {
|
||||
play_cpu_sound_effect(playerIndex, player);
|
||||
}
|
||||
player->triggers = (s32) (player->triggers & ~LOW_TUMBLE_TRIGGER);
|
||||
player->soundEffects = (s32) (player->soundEffects & ~4);
|
||||
}
|
||||
|
||||
void func_8008C62C(Player* player, s8 playerIndex) {
|
||||
@@ -312,7 +311,7 @@ void func_8008C8C4(Player* player, s8 playerId) {
|
||||
}
|
||||
if ((gModeSelection == VERSUS) && ((player->type & PLAYER_CPU) == PLAYER_CPU) && (!gDemoMode) &&
|
||||
((player->unk_0CA & 2) == 0) && (gGPCurrentRaceRankByPlayerId[playerId] != 0)) {
|
||||
player->triggers = (s32) (player->triggers | VERTICAL_TUMBLE_TRIGGER);
|
||||
player->soundEffects = (s32) (player->soundEffects | REVERSE_SOUND_EFFECT);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -373,7 +372,7 @@ void func_8008C9EC(Player* player, s8 playerIndex) {
|
||||
void func_8008CDC0(Player* player, s8 playerIndex) {
|
||||
clean_effect(player, playerIndex);
|
||||
|
||||
player->triggers &= ~HIT_BANANA_TRIGGER;
|
||||
player->soundEffects &= ~1;
|
||||
player->unk_0B4 = 0;
|
||||
player->unk_0B8 = 3.0f;
|
||||
player->unk_0AC = 1;
|
||||
@@ -445,7 +444,7 @@ void func_8008D0E4(Player* player, UNUSED s8 playerIndex) {
|
||||
void func_8008D0FC(Player* player, s8 playerIndex) {
|
||||
clean_effect(player, playerIndex);
|
||||
|
||||
player->triggers &= ~DRIVING_SPINOUT_TRIGGER;
|
||||
player->soundEffects &= ~0x80;
|
||||
player->unk_0B4 = 0;
|
||||
player->unk_0B8 = 2.0f;
|
||||
player->unk_0AC = 1;
|
||||
@@ -507,12 +506,12 @@ void func_8008D3B0(Player* player, UNUSED s8 playerIndex) {
|
||||
player->unk_044 &= 0xBFFF;
|
||||
}
|
||||
|
||||
void trigger_shroom(Player* player, s8 playerIndex) {
|
||||
void apply_boost_sound_effect(Player* player, s8 playerIndex) {
|
||||
|
||||
clean_effect(player, playerIndex);
|
||||
|
||||
player->effects |= BOOST_EFFECT;
|
||||
player->triggers &= ~SHROOM_TRIGGER;
|
||||
player->soundEffects &= ~BOOST_SOUND_EFFECT;
|
||||
player->unk_DB4.unk0 = 0;
|
||||
player->unk_DB4.unk8 = 8.0f;
|
||||
|
||||
@@ -560,7 +559,7 @@ void func_8008D570(Player* player, s8 playerIndex) {
|
||||
player->unk_0AE = player->rotation[1];
|
||||
player->effects |= 0x80000;
|
||||
player->effects &= ~0x10;
|
||||
player->triggers &= ~UNUSED_TRIGGER_0x1000;
|
||||
player->soundEffects &= ~0x1000;
|
||||
player->kartHopJerk = D_800E3730[player->characterId];
|
||||
player->kartHopAcceleration = 0.0f;
|
||||
player->kartHopVelocity = (f32) D_800E3710[player->characterId];
|
||||
@@ -619,7 +618,7 @@ void func_8008D7B0(Player* player, s8 playerIndex) {
|
||||
player->unk_0AE = player->rotation[1];
|
||||
player->effects |= 0x800000;
|
||||
player->effects &= ~0x10;
|
||||
player->triggers &= ~UNUSED_TRIGGER_0x20000;
|
||||
player->soundEffects &= ~0x20000;
|
||||
player->kartHopJerk = D_800E3770[player->characterId];
|
||||
player->kartHopAcceleration = 0.0f;
|
||||
player->kartHopVelocity = D_800E3750[player->characterId];
|
||||
@@ -688,7 +687,7 @@ void func_8008D9C0(Player* player) {
|
||||
}
|
||||
}
|
||||
|
||||
void trigger_squish(Player* player, s8 playerIndex) {
|
||||
void apply_hit_sound_effect(Player* player, s8 playerIndex) {
|
||||
clean_effect(player, playerIndex);
|
||||
|
||||
if ((player->effects & HIT_EFFECT) == 0) {
|
||||
@@ -705,7 +704,7 @@ void trigger_squish(Player* player, s8 playerIndex) {
|
||||
player->unk_D9C = 0.0f;
|
||||
player->unk_DA0 = 65.0f;
|
||||
|
||||
if ((player->triggers & THWOMP_SQUISH_TRIGGER) != 0) {
|
||||
if ((player->soundEffects & 0x100) != 0) {
|
||||
player->unk_046 |= 0x80;
|
||||
}
|
||||
|
||||
@@ -739,7 +738,7 @@ void apply_hit_effect(Player* player, s8 playerIndex) {
|
||||
}
|
||||
|
||||
if ((player->unk_046 & 0x80) != 0) {
|
||||
if ((player->triggers & THWOMP_SQUISH_TRIGGER) == 0) {
|
||||
if ((player->soundEffects & 0x100) == 0) {
|
||||
D_8018D990[playerIndex] = 1;
|
||||
player->unk_238 = 0;
|
||||
if ((player->type & PLAYER_HUMAN) != 0) {
|
||||
@@ -828,10 +827,10 @@ void apply_hit_effect(Player* player, s8 playerIndex) {
|
||||
}
|
||||
}
|
||||
|
||||
void trigger_lightning_strike(Player* player, s8 playerIndex) {
|
||||
void apply_hit_rotating_sound_effect(Player* player, s8 playerIndex) {
|
||||
clean_effect(player, playerIndex);
|
||||
|
||||
player->triggers &= ~LIGHTNING_STRIKE_TRIGGER;
|
||||
player->soundEffects &= ~HIT_ROTATING_SOUND_EFFECT;
|
||||
player->effects |= 0x40020000;
|
||||
player->effects &= ~0x10;
|
||||
player->unk_08C *= 0.6;
|
||||
@@ -875,7 +874,7 @@ void apply_lightning_effect(Player* player, s8 playerIndex) {
|
||||
D_80165190[1][playerIndex] = 1;
|
||||
D_80165190[2][playerIndex] = 1;
|
||||
D_80165190[3][playerIndex] = 1;
|
||||
trigger_squish(player, playerIndex);
|
||||
apply_hit_sound_effect(player, playerIndex);
|
||||
} else if ((player->effects & 0x20000) == 0x20000) {
|
||||
player->rotation[1] -= 0x5B0;
|
||||
D_8018D920[playerIndex] -= 0x5B0;
|
||||
@@ -993,7 +992,7 @@ void func_8008E4A4(Player* player, s8 playerIndex) {
|
||||
}
|
||||
}
|
||||
|
||||
void trigger_vertical_tumble(Player* player, s8 playerIndex) {
|
||||
void apply_reverse_sound_effect(Player* player, s8 playerIndex) {
|
||||
clean_effect(player, playerIndex);
|
||||
func_8008C310(player);
|
||||
|
||||
@@ -1026,7 +1025,7 @@ void trigger_vertical_tumble(Player* player, s8 playerIndex) {
|
||||
play_cpu_sound_effect(playerIndex, player);
|
||||
}
|
||||
|
||||
player->triggers &= ~(VERTICAL_TUMBLE_TRIGGER | HIT_PADDLE_BOAT_TRIGGER);
|
||||
player->soundEffects &= ~(REVERSE_SOUND_EFFECT | 0x80000);
|
||||
player->unk_0B6 |= 0x40;
|
||||
gTimerBoostTripleACombo[playerIndex] = 0;
|
||||
gIsPlayerTripleAButtonCombo[playerIndex] = false;
|
||||
@@ -1102,7 +1101,7 @@ void apply_hit_by_item_effect(Player* player, s8 playerIndex) {
|
||||
}
|
||||
}
|
||||
|
||||
void trigger_high_tumble(Player* player, s8 playerIndex) {
|
||||
void apply_hit_by_item_sound_effect(Player* player, s8 playerIndex) {
|
||||
clean_effect(player, playerIndex);
|
||||
func_8008C310(player);
|
||||
|
||||
@@ -1127,7 +1126,7 @@ void trigger_high_tumble(Player* player, s8 playerIndex) {
|
||||
|
||||
player->effects |= HIT_BY_ITEM_EFFECT;
|
||||
player->unk_0B6 |= 0x40;
|
||||
player->triggers &= ~(HIT_BY_STAR_TRIGGER | HIGH_TUMBLE_TRIGGER);
|
||||
player->soundEffects &= ~0x01000002;
|
||||
|
||||
gTimerBoostTripleACombo[playerIndex] = 0;
|
||||
gIsPlayerTripleAButtonCombo[playerIndex] = false;
|
||||
@@ -1146,11 +1145,11 @@ void remove_hit_by_item_effect(Player* player, s8 playerIndex) {
|
||||
player->unk_042 = 0;
|
||||
}
|
||||
|
||||
void trigger_asphalt_ramp_boost(Player* player, s8 playerId) {
|
||||
void apply_boost_ramp_asphalt_sound_effect(Player* player, s8 playerId) {
|
||||
clean_effect(player, playerId);
|
||||
|
||||
player->effects |= BOOST_RAMP_ASPHALT_EFFECT;
|
||||
player->triggers &= ~BOOST_RAMP_ASPHALT_TRIGGER;
|
||||
player->soundEffects &= ~BOOST_RAMP_ASPHALT_SOUND_EFFECT;
|
||||
player->unk_DB4.unk0 = 0;
|
||||
player->unk_DB4.unk8 = 8.0f;
|
||||
if (D_8015F890 != 1) {
|
||||
@@ -1194,11 +1193,11 @@ void remove_boost_ramp_asphalt_effect(Player* player) {
|
||||
player->boostPower = 0.0f;
|
||||
}
|
||||
|
||||
void trigger_wood_ramp_boost(Player* player, s8 playerId) {
|
||||
void apply_boost_ramp_wood_sound_effect(Player* player, s8 playerId) {
|
||||
clean_effect(player, playerId);
|
||||
|
||||
player->effects |= BOOST_RAMP_WOOD_EFFECT;
|
||||
player->triggers &= ~BOOST_RAMP_WOOD_TRIGGER;
|
||||
player->soundEffects &= ~BOOST_RAMP_WOOD_SOUND_EFFECT;
|
||||
|
||||
if (D_8015F890 != 1) {
|
||||
if (((player->type & PLAYER_HUMAN) == PLAYER_HUMAN) && ((player->type & PLAYER_INVISIBLE_OR_BOMB) == 0)) {
|
||||
@@ -1392,11 +1391,11 @@ void apply_star_effect(Player* player, s8 playerIndex) {
|
||||
}
|
||||
|
||||
// Star item
|
||||
void trigger_star(Player* player, s8 playerIndex) {
|
||||
void apply_star_sound_effect(Player* player, s8 playerIndex) {
|
||||
clean_effect(player, playerIndex);
|
||||
|
||||
player->effects |= STAR_EFFECT;
|
||||
player->triggers &= ~STAR_TRIGGER;
|
||||
player->soundEffects &= ~STAR_SOUND_EFFECT;
|
||||
gPlayerStarEffectStartTime[playerIndex] = gCourseTimer;
|
||||
D_8018D900[playerIndex] = 1;
|
||||
|
||||
@@ -1461,7 +1460,7 @@ void apply_boo_effect(Player* player, s8 playerIndex) {
|
||||
}
|
||||
}
|
||||
|
||||
void trigger_boo(Player* player, s8 playerIndex) {
|
||||
void apply_boo_sound_effect(Player* player, s8 playerIndex) {
|
||||
s16 temp_v1;
|
||||
|
||||
if ((player->type & PLAYER_HUMAN) != 0) {
|
||||
@@ -1477,7 +1476,7 @@ void trigger_boo(Player* player, s8 playerIndex) {
|
||||
clean_effect(player, playerIndex);
|
||||
|
||||
player->effects |= BOO_EFFECT;
|
||||
player->triggers &= ~BOO_TRIGGER;
|
||||
player->soundEffects &= ~BOO_SOUND_EFFECT;
|
||||
gPlayerBooEffectStartTime[playerIndex] = gCourseTimer;
|
||||
gPlayerOtherScreensAlpha[playerIndex] = ALPHA_MAX;
|
||||
|
||||
@@ -1523,8 +1522,8 @@ void func_8008FC64(Player* player, s8 arg1) {
|
||||
player->alpha -= 4;
|
||||
if (player->alpha < 5) {
|
||||
player->alpha = ALPHA_MIN;
|
||||
player->triggers &= ~LOSE_BATTLE_EFFECT;
|
||||
player->triggers |= BECOME_BOMB_EFFECT;
|
||||
player->soundEffects &= 0xFBFFFFFF;
|
||||
player->soundEffects |= 0x08000000;
|
||||
player->type |= PLAYER_UNKNOWN_0x40;
|
||||
|
||||
func_8008FDA8(player, arg1);
|
||||
@@ -1536,7 +1535,7 @@ void func_8008FCDC(Player* player, s8 playerIndex) {
|
||||
player->alpha += 2;
|
||||
if (player->alpha >= 0xF0) {
|
||||
player->alpha = ALPHA_MAX;
|
||||
player->triggers &= ~BECOME_BOMB_EFFECT;
|
||||
player->soundEffects &= ~0x08000000;
|
||||
}
|
||||
|
||||
func_80056A40(playerIndex, (u32) player->alpha);
|
||||
@@ -1545,7 +1544,7 @@ void func_8008FCDC(Player* player, s8 playerIndex) {
|
||||
void func_8008FD4C(Player* player, UNUSED s8 arg1) {
|
||||
s16 temp_v0;
|
||||
|
||||
player->triggers |= LOSE_BATTLE_EFFECT;
|
||||
player->soundEffects |= 0x04000000;
|
||||
player->unk_044 |= 0x200;
|
||||
|
||||
for (temp_v0 = 0; temp_v0 < 10; ++temp_v0) {
|
||||
@@ -1572,7 +1571,7 @@ void func_8008FDF4(Player* player, s8 playerIndex) {
|
||||
player->kartHopJerk = D_800E37F0[player->characterId];
|
||||
player->kartHopAcceleration = 0.0f;
|
||||
player->kartHopVelocity = D_800E37D0[player->characterId];
|
||||
player->triggers &= ~UNUSED_TRIGGER_0x10000;
|
||||
player->soundEffects &= ~0x00100000;
|
||||
player->effects |= UNKNOWN_EFFECT_0x10000000;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user