mirror of https://github.com/n64decomp/mk64.git
Naming sound effects
This commit is contained in:
parent
4975cb2c42
commit
aeab022e22
|
|
@ -332,16 +332,31 @@ enum PLACE { FIRST_PLACE, SECOND_PLACE, THIRD_PLACE, FOURTH_PLACE };
|
|||
* @brief sound effect of player's
|
||||
* for soundEffect
|
||||
*/
|
||||
#define HIT_SOUND_EFFECT 0x100 // hitting an object
|
||||
#define BOOST_SOUND_EFFECT 0x200 // being boosted by trigger a mushroom
|
||||
/*
|
||||
*/
|
||||
#define HIT_BANANA_SOUND_EFFECT 0x1 // hits a banana
|
||||
#define HIT_RED_BLUE_MOLE_SOUND_EFFECT 0x2 // hit by a red shell, blue shell, or hit a mole
|
||||
#define HIT_GREEN_SHELL_SOUND_EFFECT 0x4 // hit by a green shell
|
||||
#define DRIVING_SPINOUT_SOUND_EFFECT 0x80 // spinning out from erratic driving
|
||||
#define HIT_SOUND_EFFECT 0x100 // hitting an object (actually, stomped by thwomp)
|
||||
#define BOOST_SOUND_EFFECT 0x200 // being boosted by trigger a mushroom //correct
|
||||
#define BOO_SOUND_EFFECT 0x800 // being a boo
|
||||
#define STAR_SOUND_EFFECT 0x2000 // being a star
|
||||
#define HIT_ROTATING_SOUND_EFFECT 0x4000 // hitting a rotating object
|
||||
#define BOOST_RAMP_WOOD_SOUND_EFFECT 0x8000 // being boosted by a ramp
|
||||
#define HOLD_BANANA_SOUND_EFFECT 0x40000 // holding a banana
|
||||
#define REVERSE_SOUND_EFFECT 0x400000 // being in the wrong direction
|
||||
#define BOOST_RAMP_ASPHALT_SOUND_EFFECT 0x800000 // being boosted by a boost pad
|
||||
#define HIT_BY_ITEM_SOUND_EFFECT 0x1000000 // being hit by an item
|
||||
#define UNUSED_SOUND_EFFECT_0x1000 0x1000
|
||||
#define STAR_SOUND_EFFECT 0x2000 // Starting a star
|
||||
#define HIT_ROTATING_SOUND_EFFECT 0x4000 // hitting a rotating object (actually struck by lightning)
|
||||
#define BOOST_RAMP_WOOD_SOUND_EFFECT 0x8000 // being boosted by a ramp //confirmed
|
||||
#define UNUSED_SOUND_EFFECT_0x20000 0x20000
|
||||
#define HOLD_BANANA_SOUND_EFFECT 0x40000 // holding a banana (or a banana bunch or a fake item block)// confirmed but ongoing, so not really a sound effect
|
||||
#define HIT_PADDLE_BOAT_SOUND_EFFECT 0x80000 //hit paddle boat
|
||||
#define UNUSED_SOUND_EFFECT_0x10000 0x100000
|
||||
#define SPINOUT_SOUND_EFFECT 0x200000 // hit crab or spiny spinout or losing versus race
|
||||
#define REVERSE_SOUND_EFFECT 0x400000 // being in the wrong direction (actually hitting a fake item)
|
||||
#define BOOST_RAMP_ASPHALT_SOUND_EFFECT 0x800000 // being boosted by a boost pad // confirmed but not every time
|
||||
#define HIT_BY_ITEM_SOUND_EFFECT 0x1000000 // being hit by an item (actually a star)
|
||||
#define START_BOOST_SOUND_EFFECT 0x2000000 // Start boost sound effect
|
||||
#define LOSE_BATTLE_SOUND_EFFECT 0x4000000 // When losing battle mode
|
||||
#define UNKNOWN_SOUND_EFFECT_0x08000000 0x08000000 // Related to battle mode. Becoming a bomb?
|
||||
#define START_SPINOUT_SOUND_EFFECT 0x10000000 // Spinning out by holding gas at start of race
|
||||
|
||||
/**
|
||||
* @brief effect of player's
|
||||
|
|
|
|||
|
|
@ -1033,7 +1033,7 @@ void func_8001F394(Player* player, f32* arg1) {
|
|||
if ((player->effects & BOOST_RAMP_ASPHALT_EFFECT) == BOOST_RAMP_ASPHALT_EFFECT) {
|
||||
D_80164A08[playerIndex] = 3;
|
||||
}
|
||||
if ((player->soundEffects & 0x100) == 0x100) {
|
||||
if ((player->soundEffects & HIT_SOUND_EFFECT) == HIT_SOUND_EFFECT) {
|
||||
D_80164A08[playerIndex] = 4;
|
||||
}
|
||||
if (((player->effects & 0x80) == 0x80) || ((player->effects & 0x40) == 0x40)) {
|
||||
|
|
@ -1082,7 +1082,7 @@ void func_8001F394(Player* player, f32* arg1) {
|
|||
}
|
||||
break;
|
||||
case 4:
|
||||
if ((player->soundEffects & 0x100) == 0x100) {
|
||||
if ((player->soundEffects & HIT_SOUND_EFFECT) == HIT_SOUND_EFFECT) {
|
||||
move_f32_towards(&D_80164498[playerIndex], 25.0f, 1.0f);
|
||||
} else {
|
||||
if (D_80164498[playerIndex] > 1.0f) {
|
||||
|
|
|
|||
|
|
@ -1239,7 +1239,7 @@ s32 func_80089E18(s32 objectIndex) {
|
|||
if (player->effects & STAR_EFFECT) {
|
||||
var_s6 = 1;
|
||||
} else {
|
||||
player->soundEffects |= 1;
|
||||
player->soundEffects |= HIT_BANANA_SOUND_EFFECT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1263,7 +1263,7 @@ s32 func_80089F24(s32 objectIndex) {
|
|||
if (is_obj_flag_status_active(objectIndex, 0x04000000) != 0) {
|
||||
func_80072180();
|
||||
}
|
||||
player->soundEffects |= 0x200000;
|
||||
player->soundEffects |= SPINOUT_SOUND_EFFECT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1359,8 +1359,8 @@ void play_cpu_sound_effect(s32 arg0, Player* player) {
|
|||
}
|
||||
}
|
||||
if (D_801633B0[arg0] >= 0xB) {
|
||||
if ((player->soundEffects & REVERSE_EFFECT) || (player->soundEffects & 0x01000000) ||
|
||||
(player->soundEffects & 2) || (player->soundEffects & 4) || (player->effects & HIT_EFFECT)) {
|
||||
if ((player->soundEffects & REVERSE_EFFECT) || (player->soundEffects & HIT_BY_ITEM_SOUND_EFFECT) ||
|
||||
(player->soundEffects & HIT_RED_BLUE_MOLE_SOUND_EFFECT) || (player->soundEffects & HIT_GREEN_SHELL_SOUND_EFFECT) || (player->effects & HIT_EFFECT)) {
|
||||
func_800C92CC(arg0, SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x0B));
|
||||
D_801633B0[arg0] = 0;
|
||||
}
|
||||
|
|
@ -2216,7 +2216,7 @@ void init_players(void) {
|
|||
|
||||
for (i = 0; i < NUM_PLAYERS; i++) {
|
||||
if (D_80163330[i] == 1) {
|
||||
gPlayers[i].soundEffects |= 0x02000000;
|
||||
gPlayers[i].soundEffects |= START_BOOST_SOUND_EFFECT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ void func_8000DF8C(s32 bombKartId) {
|
|||
if ((((temp_f0 * temp_f0) + (temp_f2 * temp_f2)) + (temp_f12 * temp_f12)) < 25.0f) {
|
||||
var_s1 = 0;
|
||||
sp7E = 4;
|
||||
var_v0->soundEffects |= 0x400000;
|
||||
var_v0->soundEffects |= REVERSE_SOUND_EFFECT;
|
||||
var_v0->type &= ~0x2000;
|
||||
}
|
||||
}
|
||||
|
|
@ -155,9 +155,9 @@ void func_8000DF8C(s32 bombKartId) {
|
|||
sp7E = 4;
|
||||
var_s1 = 0;
|
||||
if (gCurrentCourseId == COURSE_FRAPPE_SNOWLAND) {
|
||||
var_v0->soundEffects |= 0x01000000;
|
||||
var_v0->soundEffects |= HIT_BY_ITEM_SOUND_EFFECT;
|
||||
} else {
|
||||
var_v0->soundEffects |= 0x400000;
|
||||
var_v0->soundEffects |= REVERSE_SOUND_EFFECT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ void regulate_cpu_speed(s32 playerId, f32 targetSpeed, Player* player) {
|
|||
|
||||
speed = player->speed;
|
||||
if (!(player->effects & 0x80) && !(player->effects & 0x40) && !(player->effects & 0x20000) &&
|
||||
!(player->soundEffects & 0x400000) && !(player->soundEffects & 0x01000000) && !(player->soundEffects & 2) &&
|
||||
!(player->soundEffects & REVERSE_SOUND_EFFECT) && !(player->soundEffects & HIT_BY_ITEM_SOUND_EFFECT) && !(player->soundEffects & HIT_RED_BLUE_MOLE_SOUND_EFFECT) &&
|
||||
!(player->soundEffects & 4)) {
|
||||
if (gCurrentCourseId == COURSE_AWARD_CEREMONY) {
|
||||
func_80007FA4(playerId, player, speed);
|
||||
|
|
|
|||
|
|
@ -621,7 +621,7 @@ void handle_paddle_boats_interactions(Player* player) {
|
|||
tempPaddleWheelBoat->velocity[0], tempPaddleWheelBoat->velocity[2],
|
||||
200.0f, 60.0f, playerX, playerZ) == 1) &&
|
||||
(y_diff < 60.0)) {
|
||||
player->soundEffects |= 0x80000;
|
||||
player->soundEffects |= HIT_PADDLE_BOAT_SOUND_EFFECT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ UNUSED void func_unnamed33(void) {
|
|||
}
|
||||
|
||||
void func_8008C310(Player* player) {
|
||||
if ((player->soundEffects & 2) || (player->soundEffects & 4) || ((player->soundEffects << 9) < 0) ||
|
||||
if ((player->soundEffects & HIT_RED_BLUE_MOLE_SOUND_EFFECT) || (player->soundEffects & HIT_GREEN_SHELL_SOUND_EFFECT) || ((player->soundEffects << 9) < 0) ||
|
||||
(player->soundEffects & HIT_BY_ITEM_SOUND_EFFECT)) {
|
||||
player->unk_0B6 = ((u16) player->unk_0B6 | 0x1000);
|
||||
}
|
||||
|
|
@ -216,7 +216,7 @@ void func_8008C528(Player* player, s8 playerIndex) {
|
|||
} else {
|
||||
play_cpu_sound_effect(playerIndex, player);
|
||||
}
|
||||
player->soundEffects = (s32) (player->soundEffects & ~4);
|
||||
player->soundEffects = (s32) (player->soundEffects & ~HIT_GREEN_SHELL_SOUND_EFFECT);
|
||||
}
|
||||
|
||||
void func_8008C62C(Player* player, s8 playerIndex) {
|
||||
|
|
@ -372,7 +372,7 @@ void func_8008C9EC(Player* player, s8 playerIndex) {
|
|||
void func_8008CDC0(Player* player, s8 playerIndex) {
|
||||
clean_effect(player, playerIndex);
|
||||
|
||||
player->soundEffects &= ~1;
|
||||
player->soundEffects &= ~HIT_BANANA_SOUND_EFFECT;
|
||||
player->unk_0B4 = 0;
|
||||
player->unk_0B8 = 3.0f;
|
||||
player->unk_0AC = 1;
|
||||
|
|
@ -444,7 +444,7 @@ void func_8008D0E4(Player* player, UNUSED s8 playerIndex) {
|
|||
void func_8008D0FC(Player* player, s8 playerIndex) {
|
||||
clean_effect(player, playerIndex);
|
||||
|
||||
player->soundEffects &= ~0x80;
|
||||
player->soundEffects &= ~DRIVING_SPINOUT_SOUND_EFFECT;
|
||||
player->unk_0B4 = 0;
|
||||
player->unk_0B8 = 2.0f;
|
||||
player->unk_0AC = 1;
|
||||
|
|
@ -559,7 +559,7 @@ void func_8008D570(Player* player, s8 playerIndex) {
|
|||
player->unk_0AE = player->rotation[1];
|
||||
player->effects |= 0x80000;
|
||||
player->effects &= ~0x10;
|
||||
player->soundEffects &= ~0x1000;
|
||||
player->soundEffects &= ~UNUSED_SOUND_EFFECT_0x1000;
|
||||
player->kartHopJerk = D_800E3730[player->characterId];
|
||||
player->kartHopAcceleration = 0.0f;
|
||||
player->kartHopVelocity = (f32) D_800E3710[player->characterId];
|
||||
|
|
@ -618,7 +618,7 @@ void func_8008D7B0(Player* player, s8 playerIndex) {
|
|||
player->unk_0AE = player->rotation[1];
|
||||
player->effects |= 0x800000;
|
||||
player->effects &= ~0x10;
|
||||
player->soundEffects &= ~0x20000;
|
||||
player->soundEffects &= ~UNUSED_SOUND_EFFECT_0x20000;
|
||||
player->kartHopJerk = D_800E3770[player->characterId];
|
||||
player->kartHopAcceleration = 0.0f;
|
||||
player->kartHopVelocity = D_800E3750[player->characterId];
|
||||
|
|
@ -704,7 +704,7 @@ void apply_hit_sound_effect(Player* player, s8 playerIndex) {
|
|||
player->unk_D9C = 0.0f;
|
||||
player->unk_DA0 = 65.0f;
|
||||
|
||||
if ((player->soundEffects & 0x100) != 0) {
|
||||
if ((player->soundEffects & HIT_SOUND_EFFECT) != 0) {
|
||||
player->unk_046 |= 0x80;
|
||||
}
|
||||
|
||||
|
|
@ -738,7 +738,7 @@ void apply_hit_effect(Player* player, s8 playerIndex) {
|
|||
}
|
||||
|
||||
if ((player->unk_046 & 0x80) != 0) {
|
||||
if ((player->soundEffects & 0x100) == 0) {
|
||||
if ((player->soundEffects & HIT_SOUND_EFFECT) == 0) {
|
||||
D_8018D990[playerIndex] = 1;
|
||||
player->unk_238 = 0;
|
||||
if ((player->type & PLAYER_HUMAN) != 0) {
|
||||
|
|
@ -1025,7 +1025,7 @@ void apply_reverse_sound_effect(Player* player, s8 playerIndex) {
|
|||
play_cpu_sound_effect(playerIndex, player);
|
||||
}
|
||||
|
||||
player->soundEffects &= ~(REVERSE_SOUND_EFFECT | 0x80000);
|
||||
player->soundEffects &= ~(REVERSE_SOUND_EFFECT | HIT_PADDLE_BOAT_SOUND_EFFECT);
|
||||
player->unk_0B6 |= 0x40;
|
||||
gTimerBoostTripleACombo[playerIndex] = 0;
|
||||
gIsPlayerTripleAButtonCombo[playerIndex] = false;
|
||||
|
|
@ -1126,7 +1126,7 @@ void apply_hit_by_item_sound_effect(Player* player, s8 playerIndex) {
|
|||
|
||||
player->effects |= HIT_BY_ITEM_EFFECT;
|
||||
player->unk_0B6 |= 0x40;
|
||||
player->soundEffects &= ~0x01000002;
|
||||
player->soundEffects &= ~(HIT_BY_ITEM_SOUND_EFFECT | HIT_RED_BLUE_MOLE_SOUND_EFFECT);
|
||||
|
||||
gTimerBoostTripleACombo[playerIndex] = 0;
|
||||
gIsPlayerTripleAButtonCombo[playerIndex] = false;
|
||||
|
|
@ -1522,8 +1522,8 @@ void func_8008FC64(Player* player, s8 arg1) {
|
|||
player->alpha -= 4;
|
||||
if (player->alpha < 5) {
|
||||
player->alpha = ALPHA_MIN;
|
||||
player->soundEffects &= 0xFBFFFFFF;
|
||||
player->soundEffects |= 0x08000000;
|
||||
player->soundEffects &= ~LOSE_BATTLE_SOUND_EFFECT;
|
||||
player->soundEffects |= UNKNOWN_SOUND_EFFECT_0x08000000;
|
||||
player->type |= PLAYER_UNKNOWN_0x40;
|
||||
|
||||
func_8008FDA8(player, arg1);
|
||||
|
|
@ -1535,7 +1535,7 @@ void func_8008FCDC(Player* player, s8 playerIndex) {
|
|||
player->alpha += 2;
|
||||
if (player->alpha >= 0xF0) {
|
||||
player->alpha = ALPHA_MAX;
|
||||
player->soundEffects &= ~0x08000000;
|
||||
player->soundEffects &= ~UNKNOWN_SOUND_EFFECT_0x08000000;
|
||||
}
|
||||
|
||||
func_80056A40(playerIndex, (u32) player->alpha);
|
||||
|
|
@ -1544,7 +1544,7 @@ void func_8008FCDC(Player* player, s8 playerIndex) {
|
|||
void func_8008FD4C(Player* player, UNUSED s8 arg1) {
|
||||
s16 temp_v0;
|
||||
|
||||
player->soundEffects |= 0x04000000;
|
||||
player->soundEffects |= LOSE_BATTLE_SOUND_EFFECT;
|
||||
player->unk_044 |= 0x200;
|
||||
|
||||
for (temp_v0 = 0; temp_v0 < 10; ++temp_v0) {
|
||||
|
|
@ -1571,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->soundEffects &= ~0x00100000;
|
||||
player->soundEffects &= ~UNUSED_SOUND_EFFECT_0x10000;
|
||||
player->effects |= UNKNOWN_EFFECT_0x10000000;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1085,7 +1085,7 @@ void func_8002A5F4(Vec3f arg0, f32 arg1, Vec3f arg2, f32 arg3, f32 arg4) {
|
|||
|
||||
void func_8002A704(Player* player, s8 playerIndex) {
|
||||
player->effects |= BOOST_EFFECT;
|
||||
player->soundEffects &= ~0x02000000;
|
||||
player->soundEffects &= ~START_BOOST_SOUND_EFFECT;
|
||||
if (((player->type & PLAYER_HUMAN) == PLAYER_HUMAN) &&
|
||||
((player->type & PLAYER_INVISIBLE_OR_BOMB) != PLAYER_INVISIBLE_OR_BOMB)) {
|
||||
func_800C90F4(0U, (player->characterId * 0x10) + 0x29008001);
|
||||
|
|
@ -1351,25 +1351,28 @@ void func_8002B218(Player* player) {
|
|||
}
|
||||
|
||||
void apply_sound_effect(Player* player, s8 playerId, UNUSED s8 screenId) {
|
||||
if ((player->soundEffects & 2) == 2) {
|
||||
/*if (playerId == 0){
|
||||
print_timer(playerHUD[0].timerX, playerHUD[0].timerY, playerHUD[0].someTimer);
|
||||
}*/
|
||||
if ((player->soundEffects & HIT_RED_BLUE_MOLE_SOUND_EFFECT) == HIT_RED_BLUE_MOLE_SOUND_EFFECT) {
|
||||
apply_hit_by_item_sound_effect(player, playerId);
|
||||
}
|
||||
if ((player->soundEffects & 4) == 4) {
|
||||
if ((player->soundEffects & HIT_GREEN_SHELL_SOUND_EFFECT) == HIT_GREEN_SHELL_SOUND_EFFECT) {
|
||||
func_8008C528(player, playerId);
|
||||
}
|
||||
if ((player->soundEffects & 1) == 1) {
|
||||
if ((player->soundEffects & HIT_BANANA_SOUND_EFFECT) == HIT_BANANA_SOUND_EFFECT) {
|
||||
func_8008CDC0(player, playerId);
|
||||
}
|
||||
if ((player->soundEffects & BOOST_SOUND_EFFECT) == BOOST_SOUND_EFFECT) {
|
||||
apply_boost_sound_effect(player, playerId);
|
||||
}
|
||||
if ((player->soundEffects & 0x02000000) == 0x02000000) {
|
||||
if ((player->soundEffects & START_BOOST_SOUND_EFFECT) == START_BOOST_SOUND_EFFECT) {
|
||||
func_8002A704(player, playerId);
|
||||
}
|
||||
if ((player->soundEffects & 0x1000) == 0x1000) {
|
||||
if ((player->soundEffects & UNUSED_SOUND_EFFECT_0x1000) == UNUSED_SOUND_EFFECT_0x1000) {
|
||||
func_8008D570(player, playerId);
|
||||
}
|
||||
if ((player->soundEffects & 0x20000) == 0x20000) {
|
||||
if ((player->soundEffects & UNUSED_SOUND_EFFECT_0x20000) == UNUSED_SOUND_EFFECT_0x20000) {
|
||||
func_8008D7B0(player, playerId);
|
||||
}
|
||||
if ((player->soundEffects & HIT_SOUND_EFFECT) == HIT_SOUND_EFFECT) {
|
||||
|
|
@ -1378,7 +1381,7 @@ void apply_sound_effect(Player* player, s8 playerId, UNUSED s8 screenId) {
|
|||
if ((player->soundEffects & HIT_ROTATING_SOUND_EFFECT) == HIT_ROTATING_SOUND_EFFECT) {
|
||||
apply_hit_rotating_sound_effect(player, playerId);
|
||||
}
|
||||
if ((player->soundEffects & 0x200000) == 0x200000) {
|
||||
if ((player->soundEffects & SPINOUT_SOUND_EFFECT) == SPINOUT_SOUND_EFFECT) {
|
||||
func_8008C73C(player, playerId);
|
||||
}
|
||||
if ((player->soundEffects & REVERSE_SOUND_EFFECT) == REVERSE_SOUND_EFFECT) {
|
||||
|
|
@ -1399,10 +1402,10 @@ void apply_sound_effect(Player* player, s8 playerId, UNUSED s8 screenId) {
|
|||
if ((player->soundEffects & BOO_SOUND_EFFECT) == BOO_SOUND_EFFECT) {
|
||||
apply_boo_sound_effect(player, playerId);
|
||||
}
|
||||
if (player->soundEffects & 0x80) {
|
||||
if (player->soundEffects & DRIVING_SPINOUT_SOUND_EFFECT) {
|
||||
func_8008D0FC(player, playerId);
|
||||
}
|
||||
if (player->soundEffects & 0x80000) {
|
||||
if (player->soundEffects & HIT_PADDLE_BOAT_SOUND_EFFECT) {
|
||||
apply_reverse_sound_effect(player, playerId);
|
||||
}
|
||||
}
|
||||
|
|
@ -1980,10 +1983,10 @@ void apply_effect(Player* player, s8 playerIndex, s8 arg2) {
|
|||
player_decelerate_alternative(player, 10.0f);
|
||||
}
|
||||
if (D_800DC510 != 5) {
|
||||
if (player->soundEffects & 0x04000000) {
|
||||
if (player->soundEffects & LOSE_BATTLE_SOUND_EFFECT) {
|
||||
func_8008FC64(player, playerIndex);
|
||||
}
|
||||
if (player->soundEffects & 0x08000000) {
|
||||
if (player->soundEffects & UNKNOWN_SOUND_EFFECT_0x08000000) {
|
||||
func_8008FCDC(player, playerIndex);
|
||||
}
|
||||
}
|
||||
|
|
@ -3321,7 +3324,7 @@ void player_accelerate_alternative(Player* player) {
|
|||
player->unk_044 |= 0x20;
|
||||
if ((player->soundEffects * 8) < 0) {
|
||||
func_8008F104(player, player_index);
|
||||
player->soundEffects &= 0xEFFFFFFF;
|
||||
player->soundEffects &= ~START_SPINOUT_SOUND_EFFECT;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3345,7 +3348,7 @@ void player_decelerate_alternative(Player* player, f32 speed) {
|
|||
player->unk_044 &= 0xFFDF;
|
||||
if ((player->soundEffects * 8) < 0) {
|
||||
func_8008F104(player, player_index);
|
||||
player->soundEffects &= 0xEFFFFFFF;
|
||||
player->soundEffects &= ~START_SPINOUT_SOUND_EFFECT;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3585,11 +3588,11 @@ void player_accelerate_during_start_sequence(Player* player) {
|
|||
var_v0 = 8;
|
||||
}
|
||||
if ((time_delta < var_v0) && ((player->unk_044 & 0x20) != 0x20)) {
|
||||
player->soundEffects |= 0x02000000;
|
||||
player->soundEffects |= START_BOOST_SOUND_EFFECT;
|
||||
} else if ((player->topSpeed * 0.9f) <= player->currentSpeed) {
|
||||
if ((player->soundEffects & 0x02000000) != 0x02000000) {
|
||||
player->soundEffects |= 0x10000000;
|
||||
player->soundEffects &= ~0x02000000;
|
||||
if ((player->soundEffects & START_BOOST_SOUND_EFFECT) != START_BOOST_SOUND_EFFECT) {
|
||||
player->soundEffects |= START_SPINOUT_SOUND_EFFECT;
|
||||
player->soundEffects &= ~START_BOOST_SOUND_EFFECT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3609,9 +3612,9 @@ void player_decelerate_during_start_sequence(Player* player, f32 speedReduction)
|
|||
player->currentSpeed = player->topSpeed;
|
||||
}
|
||||
if ((f64) player->currentSpeed <= (player->topSpeed * 0.7)) {
|
||||
player->soundEffects &= ~0x10000000;
|
||||
player->soundEffects &= ~START_SPINOUT_SOUND_EFFECT;
|
||||
}
|
||||
player->soundEffects &= ~0x02000000;
|
||||
player->soundEffects &= ~START_BOOST_SOUND_EFFECT;
|
||||
player->unk_044 &= ~0x0020;
|
||||
player->unk_098 = (player->currentSpeed * player->currentSpeed) / 25.0f;
|
||||
}
|
||||
|
|
@ -3860,7 +3863,7 @@ void func_80033AE0(Player* player, struct Controller* controller, s8 arg2) {
|
|||
(!(player->effects & 8))) &&
|
||||
(((player->speed / 18.0f) * 216.0f) >= 40.0f)) &&
|
||||
(player->unk_204 == 0)) {
|
||||
player->soundEffects |= 0x80;
|
||||
player->soundEffects |= DRIVING_SPINOUT_SOUND_EFFECT;
|
||||
}
|
||||
}
|
||||
if (((s32) player->tyres[BACK_RIGHT].surfaceType) < 0xF) {
|
||||
|
|
|
|||
|
|
@ -1862,7 +1862,7 @@ void destroy_destructable_actor(struct Actor* actor) {
|
|||
break;
|
||||
case HELD_BANANA:
|
||||
player = &gPlayers[banana->playerId];
|
||||
player->soundEffects &= ~0x00040000;
|
||||
player->soundEffects &= ~HOLD_BANANA_SOUND_EFFECT;
|
||||
/* fallthrough */
|
||||
case BANANA_ON_GROUND:
|
||||
banana->flags = -0x8000;
|
||||
|
|
@ -1957,7 +1957,7 @@ void destroy_destructable_actor(struct Actor* actor) {
|
|||
fakeItemBox = (struct FakeItemBox*) actor;
|
||||
player = &gPlayers[(s16) fakeItemBox->playerId];
|
||||
if (fakeItemBox->state == HELD_FAKE_ITEM_BOX) {
|
||||
player->soundEffects &= ~0x00040000;
|
||||
player->soundEffects &= ~HOLD_BANANA_SOUND_EFFECT;
|
||||
}
|
||||
fakeItemBox->state = DESTROYED_FAKE_ITEM_BOX;
|
||||
fakeItemBox->flags = -0x8000;
|
||||
|
|
@ -2080,7 +2080,7 @@ void evaluate_collision_between_player_actor(Player* player, struct Actor* actor
|
|||
if (player->effects & (BOO_EFFECT | 0x8C0)) {
|
||||
break;
|
||||
}
|
||||
if (player->soundEffects & 1) {
|
||||
if (player->soundEffects & HIT_BANANA_SOUND_EFFECT) {
|
||||
break;
|
||||
}
|
||||
temp_v1 = actor->rot[0];
|
||||
|
|
@ -2088,7 +2088,7 @@ void evaluate_collision_between_player_actor(Player* player, struct Actor* actor
|
|||
(query_collision_player_vs_actor_item(player, actor) != COLLISION)) {
|
||||
break;
|
||||
}
|
||||
player->soundEffects |= 1;
|
||||
player->soundEffects |= HIT_BANANA_SOUND_EFFECT;
|
||||
owner = &gPlayers[temp_v1];
|
||||
if (owner->type & 0x4000) {
|
||||
if (actor->flags & 0xF) {
|
||||
|
|
@ -2109,7 +2109,7 @@ void evaluate_collision_between_player_actor(Player* player, struct Actor* actor
|
|||
if (player->effects & 0x80000400) {
|
||||
break;
|
||||
}
|
||||
if (player->soundEffects & 4) {
|
||||
if (player->soundEffects & HIT_GREEN_SHELL_SOUND_EFFECT) {
|
||||
break;
|
||||
}
|
||||
temp_v1 = actor->rot[2];
|
||||
|
|
@ -2117,7 +2117,7 @@ void evaluate_collision_between_player_actor(Player* player, struct Actor* actor
|
|||
(query_collision_player_vs_actor_item(player, actor) != COLLISION)) {
|
||||
break;
|
||||
}
|
||||
player->soundEffects |= 4;
|
||||
player->soundEffects |= HIT_GREEN_SHELL_SOUND_EFFECT;
|
||||
func_800C98B8(player->pos, player->velocity, SOUND_ARG_LOAD(0x19, 0x01, 0x80, 0x10));
|
||||
owner = &gPlayers[temp_v1];
|
||||
if ((owner->type & 0x4000) && (temp_lo != temp_v1)) {
|
||||
|
|
@ -2126,7 +2126,7 @@ void evaluate_collision_between_player_actor(Player* player, struct Actor* actor
|
|||
destroy_destructable_actor(actor);
|
||||
break;
|
||||
case ACTOR_BLUE_SPINY_SHELL:
|
||||
if (player->soundEffects & 2) {
|
||||
if (player->soundEffects & HIT_RED_BLUE_MOLE_SOUND_EFFECT) {
|
||||
break;
|
||||
}
|
||||
temp_v1 = actor->rot[2];
|
||||
|
|
@ -2135,7 +2135,7 @@ void evaluate_collision_between_player_actor(Player* player, struct Actor* actor
|
|||
break;
|
||||
}
|
||||
if (!(player->effects & BOO_EFFECT)) {
|
||||
player->soundEffects |= 2;
|
||||
player->soundEffects |= HIT_RED_BLUE_MOLE_SOUND_EFFECT;
|
||||
func_800C98B8(player->pos, player->velocity, SOUND_ARG_LOAD(0x19, 0x01, 0x80, 0x10));
|
||||
}
|
||||
owner = &gPlayers[temp_v1];
|
||||
|
|
@ -2151,7 +2151,7 @@ void evaluate_collision_between_player_actor(Player* player, struct Actor* actor
|
|||
if (player->effects & UNKNOWN_EFFECT_0x1000000) {
|
||||
break;
|
||||
}
|
||||
if (player->soundEffects & 2) {
|
||||
if (player->soundEffects & HIT_RED_BLUE_MOLE_SOUND_EFFECT) {
|
||||
break;
|
||||
}
|
||||
temp_v1 = actor->rot[2];
|
||||
|
|
@ -2160,7 +2160,7 @@ void evaluate_collision_between_player_actor(Player* player, struct Actor* actor
|
|||
break;
|
||||
}
|
||||
if (!(player->effects & BOO_EFFECT)) {
|
||||
player->soundEffects |= 2;
|
||||
player->soundEffects |= HIT_RED_BLUE_MOLE_SOUND_EFFECT;
|
||||
func_800C98B8(player->pos, player->velocity, SOUND_ARG_LOAD(0x19, 0x01, 0x80, 0x10));
|
||||
}
|
||||
owner = &gPlayers[temp_v1];
|
||||
|
|
@ -2235,7 +2235,7 @@ void evaluate_collision_between_player_actor(Player* player, struct Actor* actor
|
|||
}
|
||||
}
|
||||
if (actor->state == 0) {
|
||||
owner->soundEffects &= ~0x00040000;
|
||||
owner->soundEffects &= ~HOLD_BANANA_SOUND_EFFECT;
|
||||
}
|
||||
}
|
||||
actor->state = 2;
|
||||
|
|
|
|||
|
|
@ -565,7 +565,7 @@ void func_8028EF28(void) {
|
|||
}
|
||||
D_800DC510 = 5;
|
||||
i = gPlayerPositionLUT[1];
|
||||
gPlayers[i].soundEffects |= 0x200000;
|
||||
gPlayers[i].soundEffects |= SPINOUT_SOUND_EFFECT;
|
||||
gPlayers[i].type |= PLAYER_CPU;
|
||||
func_800CA118((u8) i);
|
||||
break;
|
||||
|
|
@ -583,7 +583,7 @@ void func_8028EF28(void) {
|
|||
if (*(gNmiUnknown2 + i * 3 + 2) > 99) {
|
||||
*(gNmiUnknown2 + i * 3 + 2) = 99;
|
||||
}
|
||||
gPlayers[i].soundEffects |= 0x200000;
|
||||
gPlayers[i].soundEffects |= SPINOUT_SOUND_EFFECT;
|
||||
gPlayers[i].type |= PLAYER_CPU;
|
||||
func_800CA118((u8) i);
|
||||
}
|
||||
|
|
@ -598,7 +598,7 @@ void func_8028EF28(void) {
|
|||
if (currentPosition == 2) {
|
||||
D_800DC510 = 5;
|
||||
i = gPlayerPositionLUT[3];
|
||||
gPlayers[i].soundEffects |= 0x200000;
|
||||
gPlayers[i].soundEffects |= SPINOUT_SOUND_EFFECT;
|
||||
gPlayers[i].type |= PLAYER_CPU;
|
||||
func_800CA118((u8) i);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1502,8 +1502,8 @@ void render_kart(Player* player, s8 playerId, s8 arg2, s8 flipOffset) {
|
|||
AA_EN | Z_CMP | Z_UPD | IM_RD | CVG_DST_WRAP | ZMODE_XLU | CVG_X_ALPHA | FORCE_BL |
|
||||
GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA));
|
||||
}
|
||||
} else if (((player->unk_0CA & 4) == 4) || (player->soundEffects & 0x08000000) ||
|
||||
(player->soundEffects & 0x04000000)) {
|
||||
} else if (((player->unk_0CA & 4) == 4) || (player->soundEffects & UNKNOWN_SOUND_EFFECT_0x08000000) ||
|
||||
(player->soundEffects & LOSE_BATTLE_SOUND_EFFECT)) {
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxKart[playerId + (arg2 * 8)]),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(gDisplayListHead++, common_setting_render_character);
|
||||
|
|
|
|||
|
|
@ -5981,7 +5981,7 @@ void func_80080B28(s32 objectIndex, s32 playerId) {
|
|||
|
||||
temp_s0 = &gPlayerOne[playerId];
|
||||
if (is_obj_flag_status_active(objectIndex, 0x00000200) != 0) {
|
||||
if (!(temp_s0->soundEffects & 0x100)) {
|
||||
if (!(temp_s0->soundEffects & HIT_SOUND_EFFECT)) {
|
||||
temp_f0 = func_80088F54(objectIndex, temp_s0);
|
||||
if ((temp_f0 <= 9.0) && !(temp_s0->effects & 0x04000000) &&
|
||||
(has_collided_horizontally_with_player(objectIndex, temp_s0) != 0)) {
|
||||
|
|
@ -6012,7 +6012,7 @@ void func_80080B28(s32 objectIndex, s32 playerId) {
|
|||
func_800722A4(objectIndex, 2);
|
||||
temp_s0->unk_040 = (s16) objectIndex;
|
||||
temp_s0->unk_046 |= 2;
|
||||
temp_s0->soundEffects |= 0x100;
|
||||
temp_s0->soundEffects |= HIT_SOUND_EFFECT;
|
||||
func_80088FF0(temp_s0);
|
||||
}
|
||||
}
|
||||
|
|
@ -6029,7 +6029,7 @@ void 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->soundEffects &= ~HIT_SOUND_EFFECT;
|
||||
player->unk_040 = -1;
|
||||
}
|
||||
}
|
||||
|
|
@ -6397,7 +6397,7 @@ void func_80081D34(s32 objectIndex) {
|
|||
if (player->effects & 0x200) {
|
||||
func_800C9060(playerIndex, 0x1900A046U);
|
||||
} else {
|
||||
player->soundEffects |= 2;
|
||||
player->soundEffects |= HIT_RED_BLUE_MOLE_SOUND_EFFECT;
|
||||
}
|
||||
object->direction_angle[1] = var_s4->rot[1];
|
||||
object->velocity[1] = (player->speed / 2) + 3.0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue