mirror of
https://github.com/n64decomp/mk64
synced 2026-08-12 11:42:03 -04:00
place surface type const and unassemble flag in vtx and document effects (#553)
* place surface type const and unassemble flag in vtx
This commit is contained in:
+38
-38
@@ -2672,31 +2672,31 @@ void func_800C70A8(u8 playerId) {
|
||||
if ((D_800E9E54[playerId] > 3500.0f) || ((gPlayers[playerId].effects & 0x10) == 0x10)) {
|
||||
D_800E9E74[playerId] = 1;
|
||||
switch (gPlayers[playerId].boundingBoxCorners[AUDIO_LEFT_TYRE].surfaceType) {
|
||||
case 2: /* switch 1 */
|
||||
case DIRT: /* switch 1 */
|
||||
D_800E9E74[playerId] = 0x0000000D;
|
||||
break;
|
||||
case 3: /* switch 1 */
|
||||
case SAND: /* switch 1 */
|
||||
D_800E9E74[playerId] = 0x0000000E;
|
||||
break;
|
||||
case 6: /* switch 1 */
|
||||
case BRIDGE: /* switch 1 */
|
||||
D_800E9E74[playerId] = 0x00000011;
|
||||
break;
|
||||
case 4: /* switch 1 */
|
||||
case STONE: /* switch 1 */
|
||||
D_800E9E74[playerId] = 0x0000000F;
|
||||
break;
|
||||
case 5: /* switch 1 */
|
||||
case SNOW: /* switch 1 */
|
||||
D_800E9E74[playerId] = 0x00000010;
|
||||
break;
|
||||
case 9: /* switch 1 */
|
||||
case ICE: /* switch 1 */
|
||||
D_800E9E74[playerId] = 0x00000014;
|
||||
break;
|
||||
case 16: /* switch 1 */
|
||||
case ROPE_BRIDGE: /* switch 1 */
|
||||
D_800E9E74[playerId] = 0x00000019;
|
||||
break;
|
||||
case 17: /* switch 1 */
|
||||
case WOOD_BRIDGE: /* switch 1 */
|
||||
D_800E9E74[playerId] = 0x0000001A;
|
||||
break;
|
||||
case 14: /* switch 1 */
|
||||
case TRAIN_TRACK: /* switch 1 */
|
||||
D_800E9E74[playerId] = 0x0000001B;
|
||||
break;
|
||||
}
|
||||
@@ -2704,37 +2704,37 @@ void func_800C70A8(u8 playerId) {
|
||||
if ((gPlayers[playerId].effects & 0x10) == 0x10) {
|
||||
D_800E9E74[playerId] = 2;
|
||||
switch (gPlayers[playerId].boundingBoxCorners[AUDIO_LEFT_TYRE].surfaceType) { /* switch 2 */
|
||||
case 2: /* switch 2 */
|
||||
case DIRT: /* switch 2 */
|
||||
D_800E9E74[playerId] = 0x0000000D;
|
||||
break;
|
||||
case 3: /* switch 2 */
|
||||
case SAND: /* switch 2 */
|
||||
D_800E9E74[playerId] = 0x0000000E;
|
||||
break;
|
||||
case 6: /* switch 2 */
|
||||
case BRIDGE: /* switch 2 */
|
||||
D_800E9E74[playerId] = 0x00000011;
|
||||
break;
|
||||
case 4: /* switch 2 */
|
||||
case STONE: /* switch 2 */
|
||||
D_800E9E74[playerId] = 0x0000000F;
|
||||
break;
|
||||
case 5: /* switch 2 */
|
||||
case SNOW: /* switch 2 */
|
||||
D_800E9E74[playerId] = 0x00000010;
|
||||
break;
|
||||
case 9: /* switch 2 */
|
||||
case ICE: /* switch 2 */
|
||||
D_800E9E74[playerId] = 0x00000014;
|
||||
break;
|
||||
case 16: /* switch 2 */
|
||||
case ROPE_BRIDGE: /* switch 2 */
|
||||
D_800E9E74[playerId] = 0x00000019;
|
||||
break;
|
||||
case 17: /* switch 2 */
|
||||
case WOOD_BRIDGE: /* switch 2 */
|
||||
D_800E9E74[playerId] = 0x0000001A;
|
||||
break;
|
||||
case 14: /* switch 2 */
|
||||
case TRAIN_TRACK: /* switch 2 */
|
||||
D_800E9E74[playerId] = 0x0000001B;
|
||||
break;
|
||||
}
|
||||
}
|
||||
switch (gPlayers[playerId].boundingBoxCorners[AUDIO_LEFT_TYRE].surfaceType) { /* switch 3 */
|
||||
case 8: /* switch 3 */
|
||||
case GRASS: /* switch 3 */
|
||||
if (D_800E9E74[playerId] == 6) {
|
||||
D_800E9E74[playerId] = 4;
|
||||
} else if (D_800EA1C0 == 0) {
|
||||
@@ -2743,7 +2743,7 @@ void func_800C70A8(u8 playerId) {
|
||||
D_800E9E74[playerId] = 4;
|
||||
}
|
||||
break;
|
||||
case 7: /* switch 3 */
|
||||
case SAND_OFFROAD: /* switch 3 */
|
||||
if (D_800E9E74[playerId] == 0x0000000C) {
|
||||
D_800E9E74[playerId] = 0x0000000A;
|
||||
} else if (D_800EA1C0 == 0) {
|
||||
@@ -2752,7 +2752,7 @@ void func_800C70A8(u8 playerId) {
|
||||
D_800E9E74[playerId] = 0x0000000A;
|
||||
}
|
||||
break;
|
||||
case 13: /* switch 3 */
|
||||
case DIRT_OFFROAD: /* switch 3 */
|
||||
if (D_800E9E74[playerId] == 0x00000018) {
|
||||
D_800E9E74[playerId] = 0x00000016;
|
||||
} else if (D_800EA1C0 == 0) {
|
||||
@@ -2761,7 +2761,7 @@ void func_800C70A8(u8 playerId) {
|
||||
D_800E9E74[playerId] = 0x00000016;
|
||||
}
|
||||
break;
|
||||
case 11: /* switch 3 */
|
||||
case SNOW_OFFROAD: /* switch 3 */
|
||||
if (D_800E9E74[playerId] == 0x0000001F) {
|
||||
D_800E9E74[playerId] = 0x0000001D;
|
||||
} else if (D_800EA1C0 == 0) {
|
||||
@@ -2770,7 +2770,7 @@ void func_800C70A8(u8 playerId) {
|
||||
D_800E9E74[playerId] = 0x0000001D;
|
||||
}
|
||||
break;
|
||||
case 10: /* switch 3 */
|
||||
case WET_SAND: /* switch 3 */
|
||||
if (D_800E9F74[playerId] == 0) {
|
||||
if (D_800E9E74[playerId] == 9) {
|
||||
D_800E9E74[playerId] = 7;
|
||||
@@ -2783,18 +2783,18 @@ void func_800C70A8(u8 playerId) {
|
||||
D_800E9E74[playerId] = 0x0000001C;
|
||||
}
|
||||
break;
|
||||
case 16: /* switch 3 */
|
||||
case ROPE_BRIDGE: /* switch 3 */
|
||||
D_800E9E74[playerId] = 0x00000019;
|
||||
break;
|
||||
case 17: /* switch 3 */
|
||||
case WOOD_BRIDGE: /* switch 3 */
|
||||
D_800E9E74[playerId] = 0x0000001A;
|
||||
break;
|
||||
case 14: /* switch 3 */
|
||||
case TRAIN_TRACK: /* switch 3 */
|
||||
D_800E9E74[playerId] = 0x0000001B;
|
||||
break;
|
||||
}
|
||||
switch (gPlayers[playerId].boundingBoxCorners[AUDIO_RIGHT_TYRE].surfaceType) { /* switch 4 */
|
||||
case 8: /* switch 4 */
|
||||
case GRASS: /* switch 4 */
|
||||
if (D_800E9E74[playerId] == 5) {
|
||||
D_800E9E74[playerId] = 4;
|
||||
} else if (D_800EA1C0 == 0) {
|
||||
@@ -2803,7 +2803,7 @@ void func_800C70A8(u8 playerId) {
|
||||
D_800E9E74[playerId] = 4;
|
||||
}
|
||||
break;
|
||||
case 7: /* switch 4 */
|
||||
case SAND_OFFROAD: /* switch 4 */
|
||||
if (D_800E9E74[playerId] == 0x0000000B) {
|
||||
D_800E9E74[playerId] = 0x0000000A;
|
||||
} else if (D_800EA1C0 == 0) {
|
||||
@@ -2812,7 +2812,7 @@ void func_800C70A8(u8 playerId) {
|
||||
D_800E9E74[playerId] = 0x0000000A;
|
||||
}
|
||||
break;
|
||||
case 13: /* switch 4 */
|
||||
case DIRT_OFFROAD: /* switch 4 */
|
||||
if (D_800E9E74[playerId] == 0x00000017) {
|
||||
D_800E9E74[playerId] = 0x00000016;
|
||||
} else if (D_800EA1C0 == 0) {
|
||||
@@ -2821,7 +2821,7 @@ void func_800C70A8(u8 playerId) {
|
||||
D_800E9E74[playerId] = 0x00000016;
|
||||
}
|
||||
break;
|
||||
case 11: /* switch 4 */
|
||||
case SNOW_OFFROAD: /* switch 4 */
|
||||
if (D_800E9E74[playerId] == 0x0000001E) {
|
||||
D_800E9E74[playerId] = 0x0000001D;
|
||||
} else if (D_800EA1C0 == 0) {
|
||||
@@ -2830,7 +2830,7 @@ void func_800C70A8(u8 playerId) {
|
||||
D_800E9E74[playerId] = 0x0000001D;
|
||||
}
|
||||
break;
|
||||
case 10: /* switch 4 */
|
||||
case WET_SAND: /* switch 4 */
|
||||
if (D_800E9F74[playerId] == 0) {
|
||||
if (D_800E9E74[playerId] == 8) {
|
||||
D_800E9E74[playerId] = 7;
|
||||
@@ -2843,13 +2843,13 @@ void func_800C70A8(u8 playerId) {
|
||||
D_800E9E74[playerId] = 0x0000001C;
|
||||
}
|
||||
break;
|
||||
case 16: /* switch 4 */
|
||||
case ROPE_BRIDGE: /* switch 4 */
|
||||
D_800E9E74[playerId] = 0x00000019;
|
||||
break;
|
||||
case 17: /* switch 4 */
|
||||
case WOOD_BRIDGE: /* switch 4 */
|
||||
D_800E9E74[playerId] = 0x0000001A;
|
||||
break;
|
||||
case 14: /* switch 4 */
|
||||
case TRAIN_TRACK: /* switch 4 */
|
||||
D_800E9E74[playerId] = 0x0000001B;
|
||||
break;
|
||||
}
|
||||
@@ -3369,13 +3369,13 @@ void func_800C9018(u8 arg0, s32 arg1) {
|
||||
func_800C5578(D_800E9F7C[arg0].pos, arg1);
|
||||
}
|
||||
|
||||
void func_800C9060(u8 arg0, u32 arg1) {
|
||||
void func_800C9060(u8 playerId, u32 arg1) {
|
||||
if (D_800EA108 == 0) {
|
||||
switch(D_800EA0EC[arg0]) {
|
||||
switch(D_800EA0EC[playerId]) {
|
||||
case 2:
|
||||
D_800EA0EC[arg0] = 1;
|
||||
D_800EA0EC[playerId] = 1;
|
||||
case 0:
|
||||
play_sound(arg1, D_800E9F7C[arg0].pos, arg0, &D_800EA1D4, &D_800EA1D4, &D_800E9F7C[arg0].unk_14);
|
||||
play_sound(arg1, D_800E9F7C[playerId].pos, playerId, &D_800EA1D4, &D_800EA1D4, &D_800E9F7C[playerId].unk_14);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+8
-8
@@ -1010,16 +1010,16 @@ void func_8001F394(Player *player, f32 *arg1) {
|
||||
}
|
||||
|
||||
if (D_80164A08[playerIndex] == 0) {
|
||||
if (player->statusEffects & HOLD_BANANA_EFFECT) {
|
||||
if (player->soundEffects & HOLD_BANANA_SOUND_EFFECT) {
|
||||
D_80164A08[playerIndex] = 1;
|
||||
}
|
||||
if ((player->effects & 0x2000) == 0x2000) {
|
||||
if ((player->effects & BOOST_EFFECT) == BOOST_EFFECT) {
|
||||
D_80164A08[playerIndex] = 2;
|
||||
}
|
||||
if ((player->effects & 0x100000) == 0x100000) {
|
||||
if ((player->effects & BOOST_RAMP_ASPHALT_EFFECT) == BOOST_RAMP_ASPHALT_EFFECT) {
|
||||
D_80164A08[playerIndex] = 3;
|
||||
}
|
||||
if ((player->statusEffects & 0x100) == 0x100) {
|
||||
if ((player->soundEffects & 0x100) == 0x100) {
|
||||
D_80164A08[playerIndex] = 4;
|
||||
}
|
||||
if (((player->effects & 0x80) == 0x80) || ((player->effects & 0x40) == 0x40)) {
|
||||
@@ -1029,7 +1029,7 @@ void func_8001F394(Player *player, f32 *arg1) {
|
||||
}
|
||||
switch (D_80164A08[playerIndex]) {
|
||||
case 1:
|
||||
if (player->statusEffects & HOLD_BANANA_EFFECT) {
|
||||
if (player->soundEffects & HOLD_BANANA_SOUND_EFFECT) {
|
||||
move_f32_towards(&D_80164498[playerIndex], 20.0f, 0.2f);
|
||||
} else {
|
||||
if (D_80164498[playerIndex] > 1.0f) {
|
||||
@@ -1041,7 +1041,7 @@ void func_8001F394(Player *player, f32 *arg1) {
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if ((player->effects & 0x2000) == 0x2000) {
|
||||
if ((player->effects & BOOST_EFFECT) == BOOST_EFFECT) {
|
||||
if (player->boostTimer != 0) {
|
||||
move_f32_towards(&D_80164498[playerIndex], 8.0f, 0.2f);
|
||||
}
|
||||
@@ -1055,7 +1055,7 @@ void func_8001F394(Player *player, f32 *arg1) {
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (((player->effects & 0x100000) == 0x100000) && ((player->effects & 8) == 8)) {
|
||||
if (((player->effects & BOOST_RAMP_ASPHALT_EFFECT) == BOOST_RAMP_ASPHALT_EFFECT) && ((player->effects & 8) == 8)) {
|
||||
move_f32_towards(&D_80164498[playerIndex], 20.0f, 0.1f);
|
||||
} else {
|
||||
if (D_80164498[playerIndex] > 1.0f) {
|
||||
@@ -1067,7 +1067,7 @@ void func_8001F394(Player *player, f32 *arg1) {
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if ((player->statusEffects & 0x100) == 0x100) {
|
||||
if ((player->soundEffects & 0x100) == 0x100) {
|
||||
move_f32_towards(&D_80164498[playerIndex], 25.0f, 1.0f);
|
||||
} else {
|
||||
if (D_80164498[playerIndex] > 1.0f) {
|
||||
|
||||
+33
-33
@@ -1067,13 +1067,13 @@ void func_80008424(s32 playerId, f32 arg1, Player *player) {
|
||||
if (!(player->effects & 0x80) &&
|
||||
!(player->effects & 0x40) &&
|
||||
!(player->effects & 0x20000) &&
|
||||
!(player->statusEffects & 0x400000) &&
|
||||
!(player->statusEffects & 0x01000000) &&
|
||||
!(player->statusEffects & 2) &&
|
||||
!(player->statusEffects & 4)) {
|
||||
!(player->soundEffects & 0x400000) &&
|
||||
!(player->soundEffects & 0x01000000) &&
|
||||
!(player->soundEffects & 2) &&
|
||||
!(player->soundEffects & 4)) {
|
||||
if (gCurrentCourseId == COURSE_AWARD_CEREMONY) {
|
||||
func_80007FA4(playerId, player, var_f2);
|
||||
} else if ((D_801634D8[playerId] == 1) && !(player->effects & 0x80000200)) {
|
||||
} else if ((D_801634D8[playerId] == 1) && !(player->effects & (STAR_EFFECT | BOO_EFFECT))) {
|
||||
func_80031F48(player, 10.0f);
|
||||
if (player->currentSpeed == 0.0) {
|
||||
player->velocity[0] = 0.0f;
|
||||
@@ -1508,7 +1508,7 @@ void func_8000929C(s32 playerId, Player *player) {
|
||||
var_t0 = 0;
|
||||
if (gCurrentCourseId == 0x000B) {
|
||||
D_801634EC = 0;
|
||||
if (player->effects & 0x200) {
|
||||
if (player->effects & STAR_EFFECT) {
|
||||
D_801634EC = 1;
|
||||
}
|
||||
if (gIsMirrorMode != 0) {
|
||||
@@ -1650,7 +1650,7 @@ void func_800098FC(s32 arg0, Player *player) {
|
||||
}
|
||||
}
|
||||
if (D_801633B0[arg0] >= 0xB) {
|
||||
if ((player->statusEffects & 0x400000) || (player->statusEffects & 0x01000000) || (player->statusEffects & 2) || (player->statusEffects & 4) || (player->effects & 0x04000000)) {
|
||||
if ((player->soundEffects & 0x400000) || (player->soundEffects & 0x01000000) || (player->soundEffects & 2) || (player->soundEffects & 4) || (player->effects & 0x04000000)) {
|
||||
func_800C92CC(arg0, 0x2900800BU);
|
||||
D_801633B0[arg0] = 0;
|
||||
}
|
||||
@@ -2114,7 +2114,7 @@ void func_8000B140(s32 playerId) {
|
||||
(player->characterId != 5) &&
|
||||
(player->characterId != 7) &&
|
||||
(player->characterId != 4) &&
|
||||
!(player->effects & 0x200)) {
|
||||
!(player->effects & STAR_EFFECT)) {
|
||||
var_t1 = gNearestWaypointByPlayerId[playerId];
|
||||
temp_f22 = (player->unk_094 / 18.0f) * 216.0f;
|
||||
for (someIndex = 0; someIndex < 8; someIndex++) {
|
||||
@@ -3125,7 +3125,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->statusEffects |= 0x400000;
|
||||
var_v0->soundEffects |= 0x400000;
|
||||
var_v0->type &= ~0x2000;
|
||||
}
|
||||
}
|
||||
@@ -3140,9 +3140,9 @@ void func_8000DF8C(s32 bombKartId) {
|
||||
sp7E = 4;
|
||||
var_s1 = 0;
|
||||
if (gCurrentCourseId == COURSE_FRAPPE_SNOWLAND) {
|
||||
var_v0->statusEffects |= 0x01000000;
|
||||
var_v0->soundEffects |= 0x01000000;
|
||||
} else {
|
||||
var_v0->statusEffects |= 0x400000;
|
||||
var_v0->soundEffects |= 0x400000;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3705,7 +3705,7 @@ void func_8000F628(void) {
|
||||
|
||||
for (i = 0; i < NUM_PLAYERS; i++) {
|
||||
if (D_80163330[i] == 1) {
|
||||
gPlayers[i].statusEffects |= 0x02000000;
|
||||
gPlayers[i].soundEffects |= 0x02000000;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4736,12 +4736,12 @@ void func_80012DC0(s32 playerId, Player *player) {
|
||||
if ((x_dist > -100.0) && (x_dist < 100.0)) {
|
||||
if ((z_dist > -100.0) && (z_dist < 100.0)) {
|
||||
if (func_80006018(trainCar->position[0], trainCar->position[2], trainCar->velocity[0], trainCar->velocity[2], 60.0f, 20.0f, playerPosX, playerPosZ) == 1) {
|
||||
player->statusEffects |= REVERSE_EFFECT;
|
||||
player->soundEffects |= REVERSE_SOUND_EFFECT;
|
||||
}
|
||||
trainCar = &gTrainList[trainIndex].tender;
|
||||
if (trainCar->isActive == 1) {
|
||||
if (func_80006018(trainCar->position[0], trainCar->position[2], trainCar->velocity[0], trainCar->velocity[2], 30.0f, 20.0f, playerPosX, playerPosZ) == 1) {
|
||||
player->statusEffects |= REVERSE_EFFECT;
|
||||
player->soundEffects |= REVERSE_SOUND_EFFECT;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4755,7 +4755,7 @@ void func_80012DC0(s32 playerId, Player *player) {
|
||||
if ((x_dist > -100.0) && (x_dist < 100.0)) {
|
||||
if ((z_dist > -100.0) && (z_dist < 100.0)) {
|
||||
if (func_80006018(trainCar->position[0], trainCar->position[2], trainCar->velocity[0], trainCar->velocity[2], 30.0f, 20.0f, playerPosX, playerPosZ) == 1) {
|
||||
player->statusEffects |= REVERSE_EFFECT;
|
||||
player->soundEffects |= REVERSE_SOUND_EFFECT;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4965,7 +4965,7 @@ void func_80013854(Player *player) {
|
||||
f32 playerZ;
|
||||
f32 playerY;
|
||||
|
||||
if (!((player->effects & 0x01000000)) && (!(player->effects & 0x02000000))) {
|
||||
if (!((player->effects & 0x01000000)) && (!(player->effects & HIT_BY_ITEM_EFFECT))) {
|
||||
playerX = player->pos[0];
|
||||
playerY = player->pos[1];
|
||||
playerZ = player->pos[2];
|
||||
@@ -4978,7 +4978,7 @@ void func_80013854(Player *player) {
|
||||
if ((x_diff > -300.0) && (x_diff < 300.0)) {
|
||||
if ((z_diff > -300.0) && (z_diff < 300.0)) {
|
||||
if ((func_80006018(tempPaddleWheelBoat->position[0], tempPaddleWheelBoat->position[2], tempPaddleWheelBoat->velocity[0], tempPaddleWheelBoat->velocity[2], 200.0f, 60.0f, playerX, playerZ) == 1) && (y_diff < 60.0)) {
|
||||
player->statusEffects |= 0x80000;
|
||||
player->soundEffects |= 0x80000;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5155,7 +5155,7 @@ void func_80013F7C(s32 playerId, Player *player, VehicleStuff *vehicle, f32 arg3
|
||||
|
||||
if (((temp_f14) > -100.0) && ((temp_f14) < 100.0)) {
|
||||
if (func_80006018(vehicle->position[0], vehicle->position[2], vehicle->velocity[0], vehicle->velocity[2], arg3, arg4, spC4, spBC) == (s32) 1) {
|
||||
player->statusEffects |= REVERSE_EFFECT;
|
||||
player->soundEffects |= REVERSE_SOUND_EFFECT;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7671,7 +7671,7 @@ void cpu_use_item_strategy(s32 playerId) {
|
||||
} else if (temp_s0->unk_00 == 1) {
|
||||
temp_s0->actorIndex = use_banana_item(player);
|
||||
if ((temp_s0->actorIndex >= 0) && (temp_s0->actorIndex < 0x64)) {
|
||||
player->statusEffects |= HOLD_BANANA_EFFECT;
|
||||
player->soundEffects |= HOLD_BANANA_SOUND_EFFECT;
|
||||
temp_s0->unk_00 = 2;
|
||||
temp_s0->unk_04 = 0;
|
||||
temp_s0->unk_06 += 1;
|
||||
@@ -7688,7 +7688,7 @@ void cpu_use_item_strategy(s32 playerId) {
|
||||
if ((!(banana->flags & 0x8000)) || (banana->type != 6) || (banana->state != 0) || (playerId != banana->playerId)) {
|
||||
temp_s0->unk_00 = 0;
|
||||
temp_s0->unk_04 = 0;
|
||||
player->statusEffects &= ~0x00040000;
|
||||
player->soundEffects &= ~0x00040000;
|
||||
} else if (temp_s0->unk_0E < temp_s0->unk_04) {
|
||||
temp_s0->unk_00 = 3;
|
||||
}
|
||||
@@ -7707,7 +7707,7 @@ void cpu_use_item_strategy(s32 playerId) {
|
||||
banana->pos[1] = func_802AE1C0(player->pos[0], (f32) (((f64) player->pos[1]) + 30.0), player->pos[2]) + (banana->boundingBoxSize + 1.0f);
|
||||
}
|
||||
}
|
||||
player->statusEffects &= ~0x00040000;
|
||||
player->soundEffects &= ~0x00040000;
|
||||
temp_s0->unk_04 = 0;
|
||||
temp_s0->unk_00 = 0;
|
||||
break;
|
||||
@@ -7717,7 +7717,7 @@ void cpu_use_item_strategy(s32 playerId) {
|
||||
if ((temp_s0->actorIndex >= 0) && (temp_s0->actorIndex < 0x64)) {
|
||||
banana = (struct BananaActor*)&gActorList[temp_s0->actorIndex];
|
||||
banana->state = 4;
|
||||
player->statusEffects |= HOLD_BANANA_EFFECT;
|
||||
player->soundEffects |= HOLD_BANANA_SOUND_EFFECT;
|
||||
temp_s0->unk_00 = 0x0023;
|
||||
temp_s0->unk_04 = 0;
|
||||
temp_s0->unk_06 += 1;
|
||||
@@ -7739,7 +7739,7 @@ void cpu_use_item_strategy(s32 playerId) {
|
||||
if ((((!(banana->flags & 0x8000)) || (banana->type != 6)) || (banana->state != 4)) || (playerId != banana->playerId)) {
|
||||
temp_s0->unk_00 = 0;
|
||||
temp_s0->unk_04 = 0;
|
||||
player->statusEffects &= ~0x00040000;
|
||||
player->soundEffects &= ~0x00040000;
|
||||
} else {
|
||||
banana->velocity[1] -= 0.4;
|
||||
banana->pos[0] += banana->velocity[0];
|
||||
@@ -7762,7 +7762,7 @@ void cpu_use_item_strategy(s32 playerId) {
|
||||
banana->velocity[2] = 0.0f;
|
||||
banana->pos[1] = func_802AE1C0(banana->pos[0], (f32) (((f64) banana->pos[1]) + 30.0), banana->pos[2]) + (banana->boundingBoxSize + 1.0f);
|
||||
}
|
||||
player->statusEffects &= ~0x00040000;
|
||||
player->soundEffects &= ~0x00040000;
|
||||
temp_s0->unk_00 = 0;
|
||||
temp_s0->unk_04 = 0;
|
||||
break;
|
||||
@@ -7993,35 +7993,35 @@ void cpu_use_item_strategy(s32 playerId) {
|
||||
break;
|
||||
|
||||
case 25:
|
||||
player->statusEffects |= STAR_EFFECT;
|
||||
player->soundEffects |= STAR_SOUND_EFFECT;
|
||||
temp_s0->unk_00 = 0x001A;
|
||||
temp_s0->unk_04 = 0;
|
||||
temp_s0->unk_06 += 1;
|
||||
break;
|
||||
|
||||
case 26:
|
||||
if (!(player->effects & 0x200)) {
|
||||
if (!(player->effects & STAR_EFFECT)) {
|
||||
temp_s0->unk_00 = 0;
|
||||
}
|
||||
temp_s0->unk_04 = 0;
|
||||
break;
|
||||
|
||||
case 27:
|
||||
player->statusEffects |= BOO_EFFECT;
|
||||
player->soundEffects |= BOO_SOUND_EFFECT;
|
||||
temp_s0->unk_00 = 0x001C;
|
||||
temp_s0->unk_04 = 0;
|
||||
temp_s0->unk_06 += 1;
|
||||
break;
|
||||
|
||||
case 28:
|
||||
if (!(player->effects & 0x80000000)) {
|
||||
if (!(player->effects & BOO_EFFECT)) {
|
||||
temp_s0->unk_00 = 0;
|
||||
}
|
||||
temp_s0->unk_04 = 0;
|
||||
break;
|
||||
|
||||
case 29:
|
||||
player->statusEffects |= BOOST_EFFECT;
|
||||
player->soundEffects |= BOOST_SOUND_EFFECT;
|
||||
temp_s0->unk_00 = 0;
|
||||
temp_s0->unk_04 = 0;
|
||||
temp_s0->unk_06 += 1;
|
||||
@@ -8029,7 +8029,7 @@ void cpu_use_item_strategy(s32 playerId) {
|
||||
|
||||
case 30:
|
||||
if (temp_s0->unk_04 >= 0x3D) {
|
||||
player->statusEffects |= BOOST_EFFECT;
|
||||
player->soundEffects |= BOOST_SOUND_EFFECT;
|
||||
temp_s0->unk_00 = 0x001D;
|
||||
temp_s0->unk_04 = 0;
|
||||
}
|
||||
@@ -8037,7 +8037,7 @@ void cpu_use_item_strategy(s32 playerId) {
|
||||
|
||||
case 31:
|
||||
if (temp_s0->unk_04 >= 0x3D) {
|
||||
player->statusEffects |= BOOST_EFFECT;
|
||||
player->soundEffects |= BOOST_SOUND_EFFECT;
|
||||
temp_s0->unk_00 = 0x001E;
|
||||
temp_s0->unk_04 = 0;
|
||||
}
|
||||
@@ -8051,7 +8051,7 @@ void cpu_use_item_strategy(s32 playerId) {
|
||||
|
||||
case 33:
|
||||
if ((((s16) temp_s0->unk_04) % 60) == 0) {
|
||||
player->statusEffects |= BOOST_EFFECT;
|
||||
player->soundEffects |= BOOST_SOUND_EFFECT;
|
||||
if (temp_s0->unk_0E < temp_s0->unk_04) {
|
||||
temp_s0->unk_00 = 0;
|
||||
temp_s0->unk_04 = 0;
|
||||
@@ -8066,7 +8066,7 @@ void cpu_use_item_strategy(s32 playerId) {
|
||||
if (temp_s0->unk_04 < 0x2710) {
|
||||
temp_s0->unk_04 += 1;
|
||||
}
|
||||
if (player->effects & 0x80002200) {
|
||||
if (player->effects & (BOO_EFFECT | BOOST_EFFECT | STAR_EFFECT)) { // 0x80002200
|
||||
temp_s0->unk_04 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
+9
-8
@@ -3,8 +3,9 @@
|
||||
#include "math_util.h"
|
||||
#include "common_structs.h"
|
||||
#include "player_controller.h"
|
||||
#include "code_8008C1D0.h"
|
||||
#include "effects.h"
|
||||
#include "code_8003DC40.h"
|
||||
#include "defines.h"
|
||||
|
||||
void func_8003DC40(Player *player) {
|
||||
player->unk_DAC = 1.0f;
|
||||
@@ -68,8 +69,8 @@ void func_8003E048(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32 *arg4
|
||||
arg3[2] = (-(player->slopeAccel / 182) * 0xB4);
|
||||
func_80031F48(player, 4.0f);
|
||||
player->unk_DAC = 0.5f;
|
||||
if ((player->effects & 0x2000) != 0) {
|
||||
func_8008D554(player);
|
||||
if ((player->effects & BOOST_EFFECT) != 0) {
|
||||
remove_boost_effect(player);
|
||||
player->currentSpeed /= 2;
|
||||
player->unk_08C /= 2;
|
||||
}
|
||||
@@ -89,15 +90,15 @@ void func_8003E37C(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32 *arg4
|
||||
*arg6 += arg1[1] * player->unk_110.unk3C[2] * 0.2;
|
||||
*arg7 += arg1[2] * player->unk_110.unk3C[2] * 1;
|
||||
func_8002A5F4(arg1, *arg4, arg2, 0.5f, 2);
|
||||
if ((player->unk_110.orientationVector[1] <= 0.7318f) || (player->unk_0F8 == 0x000C)) {
|
||||
if ((player->unk_110.orientationVector[1] <= 0.7318f) || (player->surfaceType == CLIFF)) {
|
||||
arg3[0] = ((player->unk_206 / 182) * 0xB4);
|
||||
arg3[2] = (-(player->slopeAccel / 182) * 0xB4);
|
||||
if (((player->unk_094 / 18.0f) * 216.0f) >= 8.0f) {
|
||||
func_80031F48(player, 5.0f);
|
||||
}
|
||||
player->unk_DAC = 0.5f;
|
||||
if ((player->effects & 0x2000) != 0) {
|
||||
func_8008D554(player);
|
||||
if ((player->effects & BOOST_EFFECT) != 0) {
|
||||
remove_boost_effect(player);
|
||||
player->currentSpeed /= 2;
|
||||
player->unk_08C /= 2;
|
||||
}
|
||||
@@ -145,7 +146,7 @@ void func_8003E9EC(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32 *arg4
|
||||
func_8003DC40(player);
|
||||
} else {
|
||||
if ((((player->unk_094 / 18.0f) * 216.0f) > 20.0f) || ((player->effects & 0x10000) == 0x10000)) {
|
||||
if ((player->boundingBoxCorners[2].surfaceType == 1) || (player->boundingBoxCorners[3].surfaceType == 1) || (player->boundingBoxCorners[1].surfaceType == 1) || (player->boundingBoxCorners[0].surfaceType == 1)) {
|
||||
if ((player->boundingBoxCorners[2].surfaceType == ASPHALT) || (player->boundingBoxCorners[3].surfaceType == ASPHALT) || (player->boundingBoxCorners[1].surfaceType == ASPHALT) || (player->boundingBoxCorners[0].surfaceType == ASPHALT)) {
|
||||
arg3[0] = ((player->unk_206 / 182) * 5);
|
||||
} else {
|
||||
arg3[0] = ((player->unk_206 / 182) * 0x28);
|
||||
@@ -190,7 +191,7 @@ void func_8003F138(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32 *arg4
|
||||
*arg6 += arg1[1] * player->unk_110.unk3C[2] * 0.1;
|
||||
*arg7 += arg1[2] * player->unk_110.unk3C[2] * 1;
|
||||
func_8002A5F4(arg1, *arg4, arg2, 0.5f, 2);
|
||||
if (player->unk_0F8 == 8) {
|
||||
if (player->surfaceType == GRASS) {
|
||||
player->unk_044 &= ~1;
|
||||
}
|
||||
if (player->unk_110.orientationVector[1] <= 0.8357f) {
|
||||
|
||||
+510
-510
File diff suppressed because it is too large
Load Diff
+8
-8
@@ -23,7 +23,7 @@
|
||||
#include <actors.h>
|
||||
#include "race_logic.h"
|
||||
#include "collision.h"
|
||||
#include "code_8008C1D0.h"
|
||||
#include "effects.h"
|
||||
#include "code_80091440.h"
|
||||
#include "code_80091750.h"
|
||||
#include "podium_ceremony_actors.h"
|
||||
@@ -3125,7 +3125,7 @@ void func_80079860(s32 playerId) {
|
||||
(
|
||||
((func_802ABDF4(player->unk_110.unk3A) != 0) && (player->unk_110.unk3C[2] <= 3.0f)) ||
|
||||
(player->unk_0CA & 1) ||
|
||||
((player->unk_0F8 == 0x00FD) && !(player->effects & 8))
|
||||
((player->surfaceType == OUT_OF_BOUNDS) && !(player->effects & 8))
|
||||
)
|
||||
) {
|
||||
func_80090778(player);
|
||||
@@ -3268,7 +3268,7 @@ void update_obj_laikitu_fishing2(s32 objectIndex, s32 playerId) {
|
||||
func_80073654(objectIndex);
|
||||
break;
|
||||
case 3:
|
||||
if ((temp_s1->unk_0F8 == 9) && !(temp_s1->unk_0CA & 1) && ((f64) temp_s1->unk_110.unk3C[2] <= 30.0)) {
|
||||
if ((temp_s1->surfaceType == ICE) && !(temp_s1->unk_0CA & 1) && ((f64) temp_s1->unk_110.unk3C[2] <= 30.0)) {
|
||||
func_800722A4(objectIndex, 8);
|
||||
}
|
||||
if (!(temp_s1->unk_0CA & 2)) {
|
||||
@@ -5936,7 +5936,7 @@ void func_80080B28(s32 objectIndex, s32 playerId) {
|
||||
|
||||
temp_s0 = &gPlayerOne[playerId];
|
||||
if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000200) != 0) {
|
||||
if (!(temp_s0->statusEffects & 0x100)) {
|
||||
if (!(temp_s0->soundEffects & 0x100)) {
|
||||
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)) {
|
||||
if ((temp_s0->type & 0x8000) && !(temp_s0->type & 0x100)) {
|
||||
@@ -5964,7 +5964,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->statusEffects |= 0x100;
|
||||
temp_s0->soundEffects |= 0x100;
|
||||
func_80088FF0(temp_s0);
|
||||
}
|
||||
}
|
||||
@@ -5981,7 +5981,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->statusEffects &= ~0x100;
|
||||
player->soundEffects &= ~0x100;
|
||||
player->unk_040 = -1;
|
||||
}
|
||||
}
|
||||
@@ -6113,7 +6113,7 @@ void func_80081210(void) {
|
||||
player->unk_046 &= ~0x0006;
|
||||
for (var_s2_3 = 0; var_s2_3 < gNumActiveThwomps; var_s2_3++) {
|
||||
objectIndex = indexObjectList1[var_s2_3];
|
||||
if (!(player->effects & 0x80000000)) {
|
||||
if (!(player->effects & BOO_EFFECT)) {
|
||||
func_80080B28(objectIndex, var_s4);
|
||||
}
|
||||
if (is_obj_index_flag_unk_054_active(objectIndex, 0x00020000) != 0) {
|
||||
@@ -6343,7 +6343,7 @@ void func_80081D34(s32 objectIndex) {
|
||||
if (var_s1->effects & 0x200) {
|
||||
func_800C9060(var_s2, 0x1900A046U);
|
||||
} else {
|
||||
var_s1->statusEffects |= 2;
|
||||
var_s1->soundEffects |= 2;
|
||||
}
|
||||
temp_s0->direction_angle[1] = var_s4->rot[1];
|
||||
temp_s0->velocity[1] = (var_s1->unk_094 / 2) + 3.0;
|
||||
|
||||
+11
-11
@@ -1081,7 +1081,7 @@ void func_800896D4(s32 objectIndex, f32 arg1, f32 arg2) {
|
||||
player = gPlayerOne;
|
||||
if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000200) != 0) {
|
||||
for (var_s1 = 0; var_s1 < D_8018D158; var_s1++, player++) {
|
||||
if ((gObjectList[objectIndex].state != 0) && !(player->effects & 0x80000200) && (has_collided_horizontally_with_player(objectIndex, player) != 0)) {
|
||||
if ((gObjectList[objectIndex].state != 0) && !(player->effects & (STAR_EFFECT | BOO_EFFECT)) && (has_collided_horizontally_with_player(objectIndex, player) != 0)) {
|
||||
func_8008933C(player, objectIndex, arg1, arg2 * 1.1);
|
||||
if (is_obj_index_flag_unk_054_active(objectIndex, 0x04000000) != 0) {
|
||||
func_80072180();
|
||||
@@ -1099,9 +1099,9 @@ void func_80089820(s32 objectIndex, f32 arg1, f32 arg2, u32 arg3) {
|
||||
set_object_flag_unk_054_false(objectIndex, 0x02000000);
|
||||
if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000200) != 0) {
|
||||
for (var_s1 = 0; var_s1 < D_8018D158; var_s1++, player++) {
|
||||
if ((gObjectList[objectIndex].state != 0) && !(player->effects & 0x80000000)) {
|
||||
if ((gObjectList[objectIndex].state != 0) && !(player->effects & BOO_EFFECT)) {
|
||||
if ((player->type & PLAYER_EXISTS) && !(player->type & PLAYER_INVISIBLE_OR_BOMB) && (has_collided_horizontally_with_player(objectIndex, player) != 0)) {
|
||||
if (player->effects & 0x200) {
|
||||
if (player->effects & STAR_EFFECT) {
|
||||
set_object_flag_unk_054_true(objectIndex, 0x02000000);
|
||||
} else {
|
||||
if (is_obj_index_flag_unk_054_active(objectIndex, 0x04000000) != 0) {
|
||||
@@ -1124,7 +1124,7 @@ void func_80089A04(s32 objectIndex, f32 arg1, f32 arg2) {
|
||||
player = gPlayerOne;
|
||||
if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000200) != 0) {
|
||||
for (var_s1 = 0; var_s1 < D_8018D158; var_s1++, player++) {
|
||||
if ((gObjectList[objectIndex].state != 0) && !(player->effects & 0x80000200) && (has_collided_with_player(objectIndex, player) != 0)) {
|
||||
if ((gObjectList[objectIndex].state != 0) && !(player->effects & (BOO_EFFECT | STAR_EFFECT)) && (has_collided_with_player(objectIndex, player) != 0)) {
|
||||
func_8008933C(player, objectIndex, arg1, arg2 * 1.1);
|
||||
if (is_obj_index_flag_unk_054_active(objectIndex, 0x04000000) != 0) {
|
||||
func_80072180();
|
||||
@@ -1146,8 +1146,8 @@ s32 func_80089B50(s32 objectIndex) {
|
||||
if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000200) != 0) {
|
||||
for (var_s1 = 0; var_s1 < D_8018D158; var_s1++, player++, test++) {
|
||||
if ((gObjectList[objectIndex].state != 0) && !(player->effects & 0x81000000) && (player->type & PLAYER_EXISTS) && !(player->type & PLAYER_INVISIBLE_OR_BOMB) && (has_collided_horizontally_with_player(objectIndex, player) != 0)) {
|
||||
if (!(player->effects & 0x200)) {
|
||||
player->statusEffects |= REVERSE_EFFECT;
|
||||
if (!(player->effects & STAR_EFFECT)) {
|
||||
player->soundEffects |= REVERSE_SOUND_EFFECT;
|
||||
if (is_obj_index_flag_unk_054_active(objectIndex, 0x04000000) != 0) {
|
||||
func_80072180();
|
||||
}
|
||||
@@ -1172,8 +1172,8 @@ s32 func_80089CBC(s32 objectIndex, f32 arg1) {
|
||||
for (var_s1 = 0; var_s1 < D_8018D158; var_s1++, player++) {
|
||||
if ((gObjectList[objectIndex].state != 0) && !(player->effects & 0x81000000)) {
|
||||
if ((player->type & PLAYER_EXISTS) && !(player->type & PLAYER_INVISIBLE_OR_BOMB) && (has_collided_with_player_and_within_height(objectIndex, player, arg1) != 0)) {
|
||||
if (!(player->effects & 0x200)) {
|
||||
player->statusEffects |= REVERSE_EFFECT;
|
||||
if (!(player->effects & STAR_EFFECT)) {
|
||||
player->soundEffects |= REVERSE_SOUND_EFFECT;
|
||||
if (is_obj_index_flag_unk_054_active(objectIndex, 0x04000000) != 0) {
|
||||
func_80072180();
|
||||
}
|
||||
@@ -1196,10 +1196,10 @@ s32 func_80089E18(s32 objectIndex) {
|
||||
if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000200) != 0) {
|
||||
for (var_s1 = 0; var_s1 < D_8018D158; var_s1++, player++) {
|
||||
if ((gObjectList[objectIndex].state != 0) && !(player->effects & 0x800000C0) && (has_collided_horizontally_with_player(objectIndex, player) != 0)) {
|
||||
if (player->effects & 0x200) {
|
||||
if (player->effects & STAR_EFFECT) {
|
||||
var_s6 = 1;
|
||||
} else {
|
||||
player->statusEffects |= 1;
|
||||
player->soundEffects |= 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1222,7 +1222,7 @@ s32 func_80089F24(s32 objectIndex) {
|
||||
if (is_obj_index_flag_unk_054_active(objectIndex, 0x04000000) != 0) {
|
||||
func_80072180();
|
||||
}
|
||||
player->statusEffects |= 0x200000;
|
||||
player->soundEffects |= 0x200000;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+104
-104
@@ -13,7 +13,7 @@
|
||||
#include "player_controller.h"
|
||||
#include "hud_renderer.h"
|
||||
#include "code_80057C60.h"
|
||||
#include "code_8008C1D0.h"
|
||||
#include "effects.h"
|
||||
#include "audio/external.h"
|
||||
#include "spawn_players.h"
|
||||
|
||||
@@ -171,7 +171,7 @@ UNUSED void func_unnamed33(void) {
|
||||
|
||||
|
||||
void func_8008C310(Player *player) {
|
||||
if ((player->statusEffects & 2) || (player->statusEffects & 4) || ((player->statusEffects << 9) < 0) || (player->statusEffects & HIT_BY_ITEM_EFFECT)) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -180,7 +180,7 @@ UNUSED void func_unnamed34(void) {
|
||||
|
||||
}
|
||||
|
||||
void func_8008C354(Player *player, s8 arg1) {
|
||||
void clean_effect(Player *player, s8 arg1) {
|
||||
|
||||
if ((player->effects & 0x400) == 0x400) {
|
||||
func_8008C6D0(player, arg1);
|
||||
@@ -195,8 +195,8 @@ void func_8008C354(Player *player, s8 arg1) {
|
||||
if ((player->unk_044 & 0x4000) != 0) {
|
||||
func_8008D3B0(player, arg1);
|
||||
}
|
||||
if ((player->effects & 0x2000) == 0x2000) {
|
||||
func_8008D554(player);
|
||||
if ((player->effects & BOOST_EFFECT) == BOOST_EFFECT) {
|
||||
remove_boost_effect(player);
|
||||
}
|
||||
if ((player->effects & 0x80000) == 0x80000) {
|
||||
func_8008D760(player);
|
||||
@@ -207,14 +207,14 @@ void func_8008C354(Player *player, s8 arg1) {
|
||||
if ((player->effects & 0x1000000) == 0x1000000) {
|
||||
func_8008E884(player, arg1);
|
||||
}
|
||||
if ((player->effects & 0x2000000) == 0x2000000) {
|
||||
func_8008EC34(player, arg1);
|
||||
if ((player->effects & HIT_BY_ITEM_EFFECT) == HIT_BY_ITEM_EFFECT) {
|
||||
remove_hit_by_item_effect(player, arg1);
|
||||
}
|
||||
if ((player->effects & 0x100000) == 0x100000) {
|
||||
func_8008EEC4(player);
|
||||
if ((player->effects & BOOST_RAMP_ASPHALT_EFFECT) == BOOST_RAMP_ASPHALT_EFFECT) {
|
||||
remove_boost_ramp_asphalt_effect(player);
|
||||
}
|
||||
if ((player->effects & 4) == 4) {
|
||||
func_8008F0E8(player);
|
||||
if ((player->effects & BOOST_RAMP_WOOD_EFFECT) == BOOST_RAMP_WOOD_EFFECT) {
|
||||
remove_boost_ramp_wood_effect(player);
|
||||
}
|
||||
if ((player->effects & 0x4000) == 0x4000) {
|
||||
func_8008F3E0(player);
|
||||
@@ -232,7 +232,7 @@ void func_8008C354(Player *player, s8 arg1) {
|
||||
void func_8008C528(Player *player, s8 arg1) {
|
||||
UNUSED s32 sp24;
|
||||
s32 temp_v1;
|
||||
func_8008C354(player, arg1);
|
||||
clean_effect(player, arg1);
|
||||
func_8008C310(player);
|
||||
temp_v1 = player->characterId;
|
||||
player->unk_0C2 = 0;
|
||||
@@ -252,7 +252,7 @@ void func_8008C528(Player *player, s8 arg1) {
|
||||
} else {
|
||||
func_800098FC(arg1, player);
|
||||
}
|
||||
player->statusEffects = (s32) (player->statusEffects & ~4);
|
||||
player->soundEffects = (s32) (player->soundEffects & ~4);
|
||||
}
|
||||
|
||||
void func_8008C62C(Player *player, s8 arg1) {
|
||||
@@ -292,7 +292,7 @@ void func_8008C6D0(Player *player, s8 arg1) {
|
||||
}
|
||||
|
||||
void func_8008C73C(Player *player, s8 arg1) {
|
||||
func_8008C354(player, arg1);
|
||||
clean_effect(player, arg1);
|
||||
if (((player->effects & 0x80) != 0x80) && ((player->effects & 0x40) != 0x40)) {
|
||||
player->effects &= ~0x10;
|
||||
|
||||
@@ -343,7 +343,7 @@ void func_8008C8C4(Player* player, s8 playerId) {
|
||||
player->currentSpeed = (f32) (player->currentSpeed + 100.0f);
|
||||
}
|
||||
if ((gModeSelection == VERSUS) && ((player->type & PLAYER_CPU) == PLAYER_CPU) && (!gDemoMode) && ((player->unk_0CA & 2) == 0) && (gGPCurrentRaceRankByPlayerId[playerId] != 0)) {
|
||||
player->statusEffects = (s32) (player->statusEffects | REVERSE_EFFECT);
|
||||
player->soundEffects = (s32) (player->soundEffects | REVERSE_SOUND_EFFECT);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -402,9 +402,9 @@ void func_8008C9EC(Player *player, s8 arg1) {
|
||||
}
|
||||
|
||||
void func_8008CDC0(Player* player, s8 arg1) {
|
||||
func_8008C354(player, arg1);
|
||||
clean_effect(player, arg1);
|
||||
|
||||
player->statusEffects &= ~1;
|
||||
player->soundEffects &= ~1;
|
||||
player->unk_0B4 = 0;
|
||||
player->unk_0B8 = 3.0f;
|
||||
player->unk_0AC = 1;
|
||||
@@ -474,9 +474,9 @@ void func_8008D0E4(Player* player, UNUSED s8 arg1) {
|
||||
}
|
||||
|
||||
void func_8008D0FC(Player *player, s8 arg1) {
|
||||
func_8008C354(player, arg1);
|
||||
clean_effect(player, arg1);
|
||||
|
||||
player->statusEffects &= ~0x80;
|
||||
player->soundEffects &= ~0x80;
|
||||
player->unk_0B4 = 0;
|
||||
player->unk_0B8 = 2.0f;
|
||||
player->unk_0AC = 1;
|
||||
@@ -539,12 +539,12 @@ void func_8008D3B0(Player* player, UNUSED s8 arg1) {
|
||||
player->unk_044 &= 0xBFFF;
|
||||
}
|
||||
|
||||
void func_8008D3C4(Player* player, s8 arg1) {
|
||||
void apply_boost_sound_effect(Player* player, s8 arg1) {
|
||||
|
||||
func_8008C354(player, arg1);
|
||||
clean_effect(player, arg1);
|
||||
|
||||
player->effects |= 0x2000;
|
||||
player->statusEffects &= ~BOOST_EFFECT;
|
||||
player->effects |= BOOST_EFFECT;
|
||||
player->soundEffects &= ~BOOST_SOUND_EFFECT;
|
||||
player->unk_DB4.unk0 = 0;
|
||||
player->unk_DB4.unk8 = 8.0f;
|
||||
|
||||
@@ -563,7 +563,7 @@ void func_8008D3C4(Player* player, s8 arg1) {
|
||||
player->boostTimer = 0x50;
|
||||
}
|
||||
|
||||
void func_8008D4B4(Player* player) {
|
||||
void apply_boost_effect(Player* player) {
|
||||
player->currentSpeed = (f32) player->topSpeed;
|
||||
if ( player->boostTimer > 0) {
|
||||
--player->boostTimer;
|
||||
@@ -576,22 +576,22 @@ void func_8008D4B4(Player* player) {
|
||||
}
|
||||
|
||||
if (player->boostPower <= 1.0f) {
|
||||
player->effects &= ~0x2000;
|
||||
player->effects &= ~BOOST_EFFECT;
|
||||
}
|
||||
}
|
||||
|
||||
void func_8008D554(Player* player) {
|
||||
player->effects &= ~0x2000;
|
||||
void remove_boost_effect(Player* player) {
|
||||
player->effects &= ~BOOST_EFFECT;
|
||||
player->boostPower = 0.0f;
|
||||
}
|
||||
|
||||
void func_8008D570(Player *player, s8 arg1) {
|
||||
func_8008C354(player, arg1);
|
||||
clean_effect(player, arg1);
|
||||
|
||||
player->unk_0AE = player->rotation[1];
|
||||
player->effects |= 0x80000;
|
||||
player->effects &= ~0x10;
|
||||
player->statusEffects &= ~0x1000;
|
||||
player->soundEffects &= ~0x1000;
|
||||
player->kartHopJerk = D_800E3730[player->characterId];
|
||||
player->kartHopAcceleration = 0.0f;
|
||||
player->kartHopVelocity = (f32) D_800E3710[player->characterId];
|
||||
@@ -643,12 +643,12 @@ void func_8008D760(Player* player) {
|
||||
}
|
||||
|
||||
void func_8008D7B0(Player* player, s8 arg1) {
|
||||
func_8008C354(player, arg1);
|
||||
clean_effect(player, arg1);
|
||||
|
||||
player->unk_0AE = player->rotation[1];
|
||||
player->effects |= 0x800000;
|
||||
player->effects &= ~0x10;
|
||||
player->statusEffects &= 0xFFFDFFFF;
|
||||
player->soundEffects &= ~0x20000;
|
||||
player->kartHopJerk = D_800E3770[player->characterId];
|
||||
player->kartHopAcceleration = 0.0f;
|
||||
player->kartHopVelocity = D_800E3750[player->characterId];
|
||||
@@ -717,7 +717,7 @@ void func_8008D9C0(Player* player) {
|
||||
}
|
||||
|
||||
void func_8008DABC(Player *player, s8 arg1) {
|
||||
func_8008C354(player, arg1);
|
||||
clean_effect(player, arg1);
|
||||
|
||||
if ((player->effects & 0x4000000) == 0) {
|
||||
player->unk_DB4.unk2 = 0;
|
||||
@@ -733,7 +733,7 @@ void func_8008DABC(Player *player, s8 arg1) {
|
||||
player->unk_D9C = 0.0f;
|
||||
player->unk_DA0 = 65.0f;
|
||||
|
||||
if ((player->statusEffects & 0x100) != 0) {
|
||||
if ((player->soundEffects & 0x100) != 0) {
|
||||
player->unk_046 |= 0x80;
|
||||
}
|
||||
|
||||
@@ -765,7 +765,7 @@ void func_8008DC08(Player* player, s8 arg1) {
|
||||
}
|
||||
|
||||
if ((player->unk_046 & 0x80) != 0) {
|
||||
if ((player->statusEffects & 0x100) == 0) {
|
||||
if ((player->soundEffects & 0x100) == 0) {
|
||||
D_8018D990[arg1] = 1;
|
||||
player->unk_238 = 0;
|
||||
if ((player->type & PLAYER_HUMAN) != 0) {
|
||||
@@ -854,10 +854,10 @@ void func_8008DC08(Player* player, s8 arg1) {
|
||||
}
|
||||
}
|
||||
|
||||
void func_8008DF98(Player* player, s8 arg1) {
|
||||
func_8008C354(player, arg1);
|
||||
void apply_hit_rotating_sound_effect(Player* player, s8 arg1) {
|
||||
clean_effect(player, arg1);
|
||||
|
||||
player->statusEffects &= ~HIT_ROTATING_EFFECT;
|
||||
player->soundEffects &= ~HIT_ROTATING_SOUND_EFFECT;
|
||||
player->effects |= 0x40020000;
|
||||
player->effects &= ~0x10;
|
||||
player->unk_08C *= 0.6;
|
||||
@@ -887,7 +887,7 @@ void func_8008DF98(Player* player, s8 arg1) {
|
||||
}
|
||||
}
|
||||
|
||||
void func_8008E118(Player *player, s8 arg1) {
|
||||
void apply_lightning_effect(Player *player, s8 arg1) {
|
||||
s16 test;
|
||||
if (((player->effects & 0x8000) == 0x8000) && ((player->effects & 0x04000000) != 0x04000000)) {
|
||||
player->effects &= ~0x20000;
|
||||
@@ -895,7 +895,7 @@ void func_8008E118(Player *player, s8 arg1) {
|
||||
player->unk_07C = 0;
|
||||
player->unk_0C0 = 0;
|
||||
player->rotation[1] = player->unk_0AE;
|
||||
func_8008E3C0(player, arg1);
|
||||
remove_lightning_effect(player, arg1);
|
||||
D_80165190[0][arg1] = 1;
|
||||
D_80165190[1][arg1] = 1;
|
||||
D_80165190[2][arg1] = 1;
|
||||
@@ -930,7 +930,7 @@ void func_8008E118(Player *player, s8 arg1) {
|
||||
move_f32_towards(&player->size, 0.7f, 0.1f);
|
||||
move_f32_towards(&player->boundingBoxSize, (f32) ((f64) gKartBoundingBoxSizeTable[player->characterId] * 0.9), 0.1f);
|
||||
} else {
|
||||
func_8008E3C0(player, arg1);
|
||||
remove_lightning_effect(player, arg1);
|
||||
if (player->type & PLAYER_HUMAN) {
|
||||
func_800C90F4(arg1, (player->characterId * 0x10) + 0x29008008);
|
||||
}
|
||||
@@ -938,7 +938,7 @@ void func_8008E118(Player *player, s8 arg1) {
|
||||
}
|
||||
}
|
||||
|
||||
void func_8008E3C0(Player* player, UNUSED s8 arg1) {
|
||||
void remove_lightning_effect(Player* player, UNUSED s8 arg1) {
|
||||
move_f32_towards(&player->size, 1.0f, 0.1f);
|
||||
move_f32_towards(&player->boundingBoxSize, gKartBoundingBoxSizeTable[player->characterId], 0.1f);
|
||||
|
||||
@@ -1017,9 +1017,9 @@ void func_8008E4A4(Player* player, s8 arg1) {
|
||||
}
|
||||
}
|
||||
|
||||
void func_8008E6C0(Player *player, s8 arg1)
|
||||
void apply_reverse_sound_effect(Player *player, s8 arg1)
|
||||
{
|
||||
func_8008C354(player, arg1);
|
||||
clean_effect(player, arg1);
|
||||
func_8008C310(player);
|
||||
|
||||
player->unk_0A8 = 0;
|
||||
@@ -1051,7 +1051,7 @@ void func_8008E6C0(Player *player, s8 arg1)
|
||||
func_800098FC(arg1, player);
|
||||
}
|
||||
|
||||
player->statusEffects &= ~0x00480000;
|
||||
player->soundEffects &= ~(REVERSE_SOUND_EFFECT | 0x80000);
|
||||
player->unk_0B6 |= 0x40;
|
||||
gTimerBoostTripleACombo[arg1] = 0;
|
||||
gIsPlayerTripleAButtonCombo[arg1] = FALSE;
|
||||
@@ -1070,7 +1070,7 @@ void func_8008E884(Player* player, s8 arg1) {
|
||||
player->unk_042 = 0;
|
||||
}
|
||||
|
||||
void func_8008E8D8(Player *player, s8 arg1) {
|
||||
void apply_hit_by_item_effect(Player *player, s8 arg1) {
|
||||
player->unk_206 = 0;
|
||||
player->slopeAccel = 0;
|
||||
player->unk_0C0 = 0;
|
||||
@@ -1086,7 +1086,7 @@ void func_8008E8D8(Player *player, s8 arg1) {
|
||||
}
|
||||
|
||||
if (player->unk_0E0 == 4) {
|
||||
player->effects &= ~0x02000000;
|
||||
player->effects &= ~HIT_BY_ITEM_EFFECT;
|
||||
player->unk_0A8 = 0;
|
||||
player->unk_236 = 0;
|
||||
D_80165190[3][arg1] = 1;
|
||||
@@ -1108,7 +1108,7 @@ void func_8008E8D8(Player *player, s8 arg1) {
|
||||
player->unk_0A8 = 0;
|
||||
--player->unk_236;
|
||||
if (player->unk_236 == 0) {
|
||||
player->effects &= ~0x02000000;
|
||||
player->effects &= ~HIT_BY_ITEM_EFFECT;
|
||||
player->unk_236 = 0;
|
||||
D_80165190[0][arg1] = 1;
|
||||
D_80165190[1][arg1] = 1;
|
||||
@@ -1127,8 +1127,8 @@ void func_8008E8D8(Player *player, s8 arg1) {
|
||||
}
|
||||
}
|
||||
|
||||
void func_8008EAE0(Player* player, s8 arg1) {
|
||||
func_8008C354(player, arg1);
|
||||
void apply_hit_by_item_sound_effect(Player* player, s8 arg1) {
|
||||
clean_effect(player, arg1);
|
||||
func_8008C310(player);
|
||||
|
||||
player->unk_0A8 = 0;
|
||||
@@ -1149,9 +1149,9 @@ void func_8008EAE0(Player* player, s8 arg1) {
|
||||
func_800098FC(arg1, player);
|
||||
}
|
||||
|
||||
player->effects |= 0x02000000;
|
||||
player->effects |= HIT_BY_ITEM_EFFECT;
|
||||
player->unk_0B6 |= 0x40;
|
||||
player->statusEffects &= ~0x01000002;
|
||||
player->soundEffects &= ~0x01000002;
|
||||
|
||||
gTimerBoostTripleACombo[arg1] = 0;
|
||||
gIsPlayerTripleAButtonCombo[arg1] = FALSE;
|
||||
@@ -1159,8 +1159,8 @@ void func_8008EAE0(Player* player, s8 arg1) {
|
||||
gFrameSinceLastACombo[arg1] = 0;
|
||||
}
|
||||
|
||||
void func_8008EC34(Player* player, s8 arg1) {
|
||||
player->effects &= ~0x02000000;
|
||||
void remove_hit_by_item_effect(Player* player, s8 arg1) {
|
||||
player->effects &= ~HIT_BY_ITEM_EFFECT;
|
||||
player->unk_0A8 = 0;
|
||||
player->unk_236 = 0;
|
||||
D_80165190[0][arg1] = 1;
|
||||
@@ -1170,40 +1170,40 @@ void func_8008EC34(Player* player, s8 arg1) {
|
||||
player->unk_042 = 0;
|
||||
}
|
||||
|
||||
void func_8008EC88(Player* player, s8 arg1) {
|
||||
func_8008C354(player, arg1);
|
||||
void apply_boost_ramp_asphalt_sound_effect(Player* player, s8 playerId) {
|
||||
clean_effect(player, playerId);
|
||||
|
||||
player->effects |= 0x100000;
|
||||
player->statusEffects &= ~0x00800000;
|
||||
player->effects |= BOOST_RAMP_ASPHALT_EFFECT;
|
||||
player->soundEffects &= ~BOOST_RAMP_ASPHALT_SOUND_EFFECT;
|
||||
player->unk_DB4.unk0 = 0;
|
||||
player->unk_DB4.unk8 = 8.0f;
|
||||
if (D_8015F890 != 1) {
|
||||
if (((player->type & PLAYER_HUMAN) == PLAYER_HUMAN) && ((player->type & PLAYER_INVISIBLE_OR_BOMB) == 0)) {
|
||||
func_800C90F4(arg1, (player->characterId * 0x10) + 0x29008001);
|
||||
func_800C9060(arg1, 0x1900A40B);
|
||||
func_800C90F4(playerId, (player->characterId * 0x10) + 0x29008001);
|
||||
func_800C9060(playerId, 0x1900A40B);
|
||||
}
|
||||
} else if (player == gPlayerOne) {
|
||||
func_800C90F4(arg1, (player->characterId * 0x10) + 0x29008001);
|
||||
func_800C9060(arg1, 0x1900A40B);
|
||||
func_800C90F4(playerId, (player->characterId * 0x10) + 0x29008001);
|
||||
func_800C9060(playerId, 0x1900A40B);
|
||||
}
|
||||
player->unk_044 &= ~0x1;
|
||||
player->effects &= ~0x20;
|
||||
}
|
||||
|
||||
void func_8008EDC0(Player* player) {
|
||||
void apply_boost_ramp_asphalt_effect(Player* player) {
|
||||
f64 temp_f0;
|
||||
|
||||
player->currentSpeed = player->topSpeed;
|
||||
if ((u16) player->unk_256 > 0) {
|
||||
player->currentSpeed = 0.0f;
|
||||
}
|
||||
if ((player->unk_0F8 != 0xFE) && ((player->effects & 8) != 8)) {
|
||||
if ((player->surfaceType != BOOST_RAMP_ASPHALT) && ((player->effects & 8) != 8)) {
|
||||
move_f32_towards(&player->boostPower, 0, 1.0f);
|
||||
} else {
|
||||
move_f32_towards(&player->boostPower, 400.0f, 0.01f);
|
||||
}
|
||||
if (player->boostPower <= 1.0f) {
|
||||
player->effects &= ~0x00100000;
|
||||
player->effects &= ~BOOST_RAMP_ASPHALT_EFFECT;
|
||||
player->boostPower = 0.0f;
|
||||
if (player->unk_0C2 >= 0x33) {
|
||||
temp_f0 = 0.7;
|
||||
@@ -1213,55 +1213,55 @@ void func_8008EDC0(Player* player) {
|
||||
}
|
||||
}
|
||||
|
||||
void func_8008EEC4(Player* player) {
|
||||
player->effects &= ~0x00100000;
|
||||
void remove_boost_ramp_asphalt_effect(Player* player) {
|
||||
player->effects &= ~BOOST_RAMP_ASPHALT_EFFECT;
|
||||
player->boostPower = 0.0f;
|
||||
}
|
||||
|
||||
void func_8008EEE4(Player* player, s8 arg1) {
|
||||
func_8008C354(player, arg1);
|
||||
void apply_boost_ramp_wood_sound_effect(Player* player, s8 playerId) {
|
||||
clean_effect(player, playerId);
|
||||
|
||||
player->effects |= 0x4;
|
||||
player->statusEffects &= ~0x8000;
|
||||
player->effects |= BOOST_RAMP_WOOD_EFFECT;
|
||||
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)) {
|
||||
func_800C90F4(arg1, (player->characterId * 0x10) + 0x29008001);
|
||||
func_800C9060(arg1, 0x1900A40B);
|
||||
func_800C90F4(playerId, (player->characterId * 0x10) + 0x29008001);
|
||||
func_800C9060(playerId, 0x1900A40B);
|
||||
}
|
||||
} else if (player == gPlayerOne) {
|
||||
func_800C90F4(arg1, (player->characterId * 0x10) + 0x29008001);
|
||||
func_800C9060(arg1, 0x1900A40B);
|
||||
func_800C90F4(playerId, (player->characterId * 0x10) + 0x29008001);
|
||||
func_800C9060(playerId, 0x1900A40B);
|
||||
}
|
||||
|
||||
player->unk_044 &= ~0x1;
|
||||
player->effects &= ~0x20;
|
||||
}
|
||||
|
||||
void func_8008F008(Player* player) {
|
||||
void apply_boost_ramp_wood_effect(Player* player) {
|
||||
player->currentSpeed = gTopSpeedTable[0][player->characterId];
|
||||
|
||||
if ((player->unk_0F8 != 0xFC) && ((player->effects & 8) != 8)) {
|
||||
if ((player->surfaceType != BOOST_RAMP_WOOD) && ((player->effects & 8) != 8)) {
|
||||
move_f32_towards(&player->boostPower, 0, 1.0f);
|
||||
} else {
|
||||
move_f32_towards(&player->boostPower, 300.0f, 0.1f);
|
||||
}
|
||||
|
||||
if (player->boostPower <= 1.0f) {
|
||||
player->effects &= ~0x4;
|
||||
player->effects &= ~BOOST_RAMP_WOOD_EFFECT;
|
||||
player->boostPower = 0.0f;
|
||||
player->currentSpeed /= 2;
|
||||
player->unk_08C /= 2;
|
||||
}
|
||||
}
|
||||
|
||||
void func_8008F0E8(Player* player) {
|
||||
player->effects &= ~4;
|
||||
void remove_boost_ramp_wood_effect(Player* player) {
|
||||
player->effects &= ~BOOST_RAMP_WOOD_EFFECT;
|
||||
player->boostPower = 0.0f;
|
||||
}
|
||||
|
||||
void func_8008F104(Player* player, s8 arg1) {
|
||||
func_8008C354(player, arg1);
|
||||
clean_effect(player, arg1);
|
||||
|
||||
player->unk_0AE = player->rotation[1];
|
||||
player->unk_0B2 = 2;
|
||||
@@ -1350,12 +1350,12 @@ void func_8008F494(Player* player, s8 arg1) {
|
||||
if ((((player->effects & 0x80) != 0) ||
|
||||
((player->effects & 0x40) != 0) ||
|
||||
((player->effects & 0x01000000)) ||
|
||||
((player->effects & 0x02000000)) ||
|
||||
((player->effects & HIT_BY_ITEM_EFFECT)) ||
|
||||
((player->effects & 0x400) != 0)) && (gModeSelection == BATTLE)) {
|
||||
player->unk_044 |= 0x8000;
|
||||
}
|
||||
|
||||
func_8008C354(player, arg1);
|
||||
clean_effect(player, arg1);
|
||||
func_8008F86C(player, arg1);
|
||||
|
||||
player->unk_0A8 = 0;
|
||||
@@ -1397,7 +1397,7 @@ void func_8008F5A4(Player* player, s8 arg1) {
|
||||
player->unk_042 = 0;
|
||||
}
|
||||
|
||||
void func_8008F650(Player* player, s8 arg1) {
|
||||
void apply_star_effect(Player* player, s8 arg1) {
|
||||
if (((s32) gCourseTimer - D_8018D930[arg1]) >= 9) {
|
||||
D_8018D900[arg1] = 1;
|
||||
|
||||
@@ -1413,16 +1413,16 @@ void func_8008F650(Player* player, s8 arg1) {
|
||||
}
|
||||
|
||||
if (((s32) gCourseTimer - D_8018D930[arg1]) >= 0xA) {
|
||||
player->effects &= ~0x200;
|
||||
player->effects &= ~STAR_EFFECT;
|
||||
}
|
||||
}
|
||||
|
||||
// Star item
|
||||
void func_8008F778(Player* player, s8 arg1) {
|
||||
func_8008C354(player, arg1);
|
||||
void apply_star_sound_effect(Player* player, s8 arg1) {
|
||||
clean_effect(player, arg1);
|
||||
|
||||
player->effects |= 0x200;
|
||||
player->statusEffects &= ~STAR_EFFECT;
|
||||
player->effects |= STAR_EFFECT;
|
||||
player->soundEffects &= ~STAR_SOUND_EFFECT;
|
||||
D_8018D930[arg1] = gCourseTimer;
|
||||
D_8018D900[arg1] = 1;
|
||||
|
||||
@@ -1439,7 +1439,7 @@ void func_8008F778(Player* player, s8 arg1) {
|
||||
}
|
||||
|
||||
void func_8008F86C(Player* player, s8 arg1) {
|
||||
player->effects &= ~0x200;
|
||||
player->effects &= ~STAR_EFFECT;
|
||||
if (((player->type & PLAYER_HUMAN) == PLAYER_HUMAN) && ((player->type & PLAYER_INVISIBLE_OR_BOMB) != PLAYER_INVISIBLE_OR_BOMB)) {
|
||||
func_800CA730(arg1);
|
||||
return;
|
||||
@@ -1447,7 +1447,7 @@ void func_8008F86C(Player* player, s8 arg1) {
|
||||
func_800CAACC(arg1);
|
||||
}
|
||||
|
||||
void func_8008F8DC(Player* arg0, s8 arg1) {
|
||||
void apply_boo_effect(Player* arg0, s8 arg1) {
|
||||
s32 tmp;
|
||||
tmp = ((s32) gCourseTimer) - D_8018D950[arg1];
|
||||
if (tmp < 7) {
|
||||
@@ -1483,7 +1483,7 @@ void func_8008F8DC(Player* arg0, s8 arg1) {
|
||||
}
|
||||
}
|
||||
|
||||
void func_8008FA38(Player* player, s8 arg1) {
|
||||
void apply_boo_sound_effect(Player* player, s8 arg1) {
|
||||
s16 temp_v1;
|
||||
|
||||
if ((player->type & PLAYER_HUMAN) != 0) {
|
||||
@@ -1496,10 +1496,10 @@ void func_8008FA38(Player* player, s8 arg1) {
|
||||
}
|
||||
}
|
||||
|
||||
func_8008C354(player, arg1);
|
||||
clean_effect(player, arg1);
|
||||
|
||||
player->effects |= 0x80000000;
|
||||
player->statusEffects &= ~BOO_EFFECT;
|
||||
player->effects |= BOO_EFFECT;
|
||||
player->soundEffects &= ~BOO_SOUND_EFFECT;
|
||||
D_8018D950[arg1] = gCourseTimer;
|
||||
D_8018D970[arg1] = 0xFF;
|
||||
|
||||
@@ -1545,8 +1545,8 @@ void func_8008FC64(Player* player, s8 arg1) {
|
||||
player->unk_0C6 -= 4;
|
||||
if (player->unk_0C6 < 5) {
|
||||
player->unk_0C6 = 0;
|
||||
player->statusEffects &= 0xFBFFFFFF;
|
||||
player->statusEffects |= 0x08000000;
|
||||
player->soundEffects &= 0xFBFFFFFF;
|
||||
player->soundEffects |= 0x08000000;
|
||||
player->type |= PLAYER_UNKNOWN_0x40;
|
||||
|
||||
func_8008FDA8(player, arg1);
|
||||
@@ -1558,7 +1558,7 @@ void func_8008FCDC(Player* player, s8 arg1) {
|
||||
player->unk_0C6 += 2;
|
||||
if (player->unk_0C6 >= 0xF0) {
|
||||
player->unk_0C6 = 0xFF;
|
||||
player->statusEffects &= ~0x08000000;
|
||||
player->soundEffects &= ~0x08000000;
|
||||
}
|
||||
|
||||
func_80056A40(arg1, (u32) player->unk_0C6);
|
||||
@@ -1567,7 +1567,7 @@ void func_8008FCDC(Player* player, s8 arg1) {
|
||||
void func_8008FD4C(Player* player, UNUSED s8 arg1) {
|
||||
s16 temp_v0;
|
||||
|
||||
player->statusEffects |= 0x04000000;
|
||||
player->soundEffects |= 0x04000000;
|
||||
player->unk_044 |= 0x200;
|
||||
|
||||
for (temp_v0 = 0; temp_v0 < 10; ++temp_v0) {
|
||||
@@ -1588,13 +1588,13 @@ void func_8008FDA8(Player* player, UNUSED s8 arg1) {
|
||||
}
|
||||
|
||||
void func_8008FDF4(Player* player, UNUSED s8 arg1) {
|
||||
func_8008C354(player, arg1);
|
||||
clean_effect(player, arg1);
|
||||
|
||||
player->effects &= ~0x10;
|
||||
player->kartHopJerk = D_800E37F0[player->characterId];
|
||||
player->kartHopAcceleration = 0.0f;
|
||||
player->kartHopVelocity = D_800E37D0[player->characterId];
|
||||
player->statusEffects &= ~0x00100000;
|
||||
player->soundEffects &= ~0x00100000;
|
||||
player->effects |= 0x10000000;
|
||||
}
|
||||
|
||||
@@ -1788,7 +1788,7 @@ void func_80090778(Player* player) {
|
||||
player->unk_222 = 0;
|
||||
player->unk_08C = 0.0f;
|
||||
|
||||
func_8008C354(player, playerIndex);
|
||||
clean_effect(player, playerIndex);
|
||||
func_8008F86C(player, playerIndex);
|
||||
|
||||
player->unk_DB4.unk0 = 0;
|
||||
@@ -1802,7 +1802,7 @@ void func_80090778(Player* player) {
|
||||
player->unk_0C0 = 0;
|
||||
player->rotation[1] = player->unk_0AE;
|
||||
}
|
||||
func_8008E3C0(player, playerIndex);
|
||||
remove_lightning_effect(player, playerIndex);
|
||||
}
|
||||
player->effects &= ~0x20;
|
||||
}
|
||||
@@ -1852,7 +1852,7 @@ void func_80090970(Player *player, s8 arg1, s8 arg2) {
|
||||
player->unk_07C = 0;
|
||||
player->unk_0C0 = 0;
|
||||
player->unk_08C = 0.0f;
|
||||
func_8008C354(player, arg1);
|
||||
clean_effect(player, arg1);
|
||||
switch (player->unk_222) {
|
||||
case 0:
|
||||
if ((player->unk_0CA & 1) == 1) {
|
||||
@@ -1879,7 +1879,7 @@ void func_80090970(Player *player, s8 arg1, s8 arg2) {
|
||||
player->unk_0C6 = 0x00FF;
|
||||
}
|
||||
}
|
||||
if ((player->effects & 0x80000000) == 0x80000000) {
|
||||
if ((player->effects & BOO_EFFECT) == BOO_EFFECT) {
|
||||
func_8008FB30(player, arg1);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <code_8006E9C0.h>
|
||||
#include <code_80071F00.h>
|
||||
#include <code_80086E70.h>
|
||||
#include <code_8008C1D0.h>
|
||||
#include <effects.h>
|
||||
#include <code_80091440.h>
|
||||
#include <code_80091750.h>
|
||||
#include <code_800AF9B0.h>
|
||||
|
||||
+2106
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
#ifndef CODE_8008C1D0_H
|
||||
#define CODE_8008C1D0_H
|
||||
#ifndef EFFECTS_H
|
||||
#define EFFECTS_H
|
||||
|
||||
#include "common_structs.h"
|
||||
|
||||
@@ -46,7 +46,7 @@ void func_unnamed32(void);
|
||||
void func_unnamed33(void);
|
||||
void func_8008C310(Player*);
|
||||
void func_unnamed34(void);
|
||||
void func_8008C354(Player*, s8);
|
||||
void clean_effect(Player*, s8);
|
||||
void func_8008C528(Player*, s8);
|
||||
void func_8008C62C(Player*, s8);
|
||||
void func_8008C6D0(Player*, s8);
|
||||
@@ -59,9 +59,9 @@ void func_8008D0E4(Player*, s8);
|
||||
void func_8008D0FC(Player*, s8);
|
||||
void func_8008D170(Player*, s8);
|
||||
void func_8008D3B0(Player*, s8);
|
||||
void func_8008D3C4(Player*, s8);
|
||||
void func_8008D4B4(Player*);
|
||||
void func_8008D554(Player*);
|
||||
void apply_boost_sound_effect(Player*, s8);
|
||||
void apply_boost_effect(Player*);
|
||||
void remove_boost_effect(Player*);
|
||||
void func_8008D570(Player*, s8);
|
||||
void func_8008D698(Player*, s8);
|
||||
void func_8008D760(Player*);
|
||||
@@ -71,32 +71,32 @@ void func_8008D97C(Player*);
|
||||
void func_8008D9C0(Player*);
|
||||
void func_8008DABC(Player*, s8);
|
||||
void func_8008DC08(Player*, s8);
|
||||
void func_8008DF98(Player*, s8);
|
||||
void func_8008E118(Player*, s8);
|
||||
void func_8008E3C0(Player*, s8);
|
||||
void apply_hit_rotating_sound_effect(Player*, s8);
|
||||
void apply_lightning_effect(Player*, s8);
|
||||
void remove_lightning_effect(Player*, s8);
|
||||
void func_8008E4A4(Player*, s8);
|
||||
void func_8008E6C0(Player*, s8);
|
||||
void apply_reverse_sound_effect(Player*, s8);
|
||||
void func_8008E884(Player*, s8);
|
||||
void func_8008E8D8(Player*, s8);
|
||||
void func_8008EAE0(Player*, s8);
|
||||
void func_8008EC34(Player*, s8);
|
||||
void func_8008EC88(Player*, s8);
|
||||
void func_8008EDC0(Player*);
|
||||
void func_8008EEC4(Player*);
|
||||
void func_8008EEE4(Player*, s8);
|
||||
void func_8008F008(Player*);
|
||||
void func_8008F0E8(Player*);
|
||||
void apply_hit_by_item_effect(Player*, s8);
|
||||
void apply_hit_by_item_sound_effect(Player*, s8);
|
||||
void remove_hit_by_item_effect(Player*, s8);
|
||||
void apply_boost_ramp_asphalt_sound_effect(Player*, s8);
|
||||
void apply_boost_ramp_asphalt_effect(Player*);
|
||||
void remove_boost_ramp_asphalt_effect(Player*);
|
||||
void apply_boost_ramp_wood_sound_effect(Player*, s8);
|
||||
void apply_boost_ramp_wood_effect(Player*);
|
||||
void remove_boost_ramp_wood_effect(Player*);
|
||||
void func_8008F104(Player*, s8);
|
||||
void func_8008F1B8(Player*, s8);
|
||||
void func_8008F3E0(Player*);
|
||||
void func_8008F3F4(Player*, s8);
|
||||
void func_8008F494(Player*, s8);
|
||||
void func_8008F5A4(Player*, s8);
|
||||
void func_8008F650(Player*, s8);
|
||||
void func_8008F778(Player*, s8);
|
||||
void apply_star_effect(Player*, s8);
|
||||
void apply_star_sound_effect(Player*, s8);
|
||||
void func_8008F86C(Player*, s8);
|
||||
void func_8008F8DC(Player*, s8);
|
||||
void func_8008FA38(Player*, s8);
|
||||
void apply_boo_effect(Player*, s8);
|
||||
void apply_boo_sound_effect(Player*, s8);
|
||||
void func_8008FB30(Player*, s8);
|
||||
void func_8008FC1C(Player*);
|
||||
void func_8008FC64(Player*, s8);
|
||||
+1
-1
@@ -2840,7 +2840,7 @@ void func_80050E34(s32 playerId, s32 arg1) {
|
||||
} else {
|
||||
gDPLoadTLUT_pal256(gDisplayListHead++, gPortraitTLUTs[characterId]);
|
||||
gSPDisplayList(gDisplayListHead++, D_0D007DB8);
|
||||
if (player->effects & 0x200) {
|
||||
if (player->effects & STAR_EFFECT) {
|
||||
func_8004B614((s32) D_801656C0, (s32) D_801656D0, (s32) D_801656E0, 0x00000080, 0x00000080, 0x00000080, (s32) gObjectList[objectIndex].unk_0A0);
|
||||
} else {
|
||||
set_transparency((s32) gObjectList[objectIndex].unk_0A0);
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
#include "race_logic.h"
|
||||
#include "skybox_and_splitscreen.h"
|
||||
#include "hud_renderer.h"
|
||||
#include "code_8008C1D0.h"
|
||||
#include "effects.h"
|
||||
#include "code_80281780.h"
|
||||
#include "audio/external.h"
|
||||
#include "code_800029B0.h"
|
||||
|
||||
+209
-209
@@ -9,7 +9,7 @@
|
||||
#include "racing/memory.h"
|
||||
#include "math_util.h"
|
||||
#include "render_player.h"
|
||||
#include "code_8008C1D0.h"
|
||||
#include "effects.h"
|
||||
#include "collision.h"
|
||||
#include "waypoints.h"
|
||||
#include "audio/external.h"
|
||||
@@ -656,7 +656,7 @@ void func_80028864(Player *player, Camera *camera, s8 arg2, s8 arg3) {
|
||||
((player->effects & 0x80000) == 0x80000) ||
|
||||
((player->effects & 0x800000) == 0x800000) ||
|
||||
((player->effects & 0x01000000) == 0x01000000) ||
|
||||
((player->effects & 0x02000000) == 0x02000000) ||
|
||||
((player->effects & HIT_BY_ITEM_EFFECT) == HIT_BY_ITEM_EFFECT) ||
|
||||
((player->effects & 0x20000) == 0x20000) ||
|
||||
(player->unk_044 & 0x800)) {
|
||||
func_8002E594(player, camera, arg3, arg2);
|
||||
@@ -689,7 +689,7 @@ void func_80028C44(Player *player, Camera *camera, s8 arg2, s8 arg3) {
|
||||
((player->effects & 0x80000) == 0x80000) ||
|
||||
((player->effects & 0x800000) == 0x800000) ||
|
||||
((player->effects & 0x1000000) == 0x1000000) ||
|
||||
((player->effects & 0x2000000) == 0x2000000) ||
|
||||
((player->effects & HIT_BY_ITEM_EFFECT) == HIT_BY_ITEM_EFFECT) ||
|
||||
((player->effects & 0x20000) == 0x20000) ||
|
||||
((player->unk_044 & 0x800) != 0)) {
|
||||
func_8002E594(player, camera, arg3, arg2);
|
||||
@@ -716,7 +716,7 @@ void func_80028D3C(Player *player, Camera *camera, s8 arg2, s8 arg3) {
|
||||
((player->effects & 0x80000) == 0x80000) ||
|
||||
((player->effects & 0x800000) == 0x800000) ||
|
||||
((player->effects & 0x1000000) == 0x1000000) ||
|
||||
((player->effects & 0x2000000) == 0x2000000) ||
|
||||
((player->effects & HIT_BY_ITEM_EFFECT) == HIT_BY_ITEM_EFFECT) ||
|
||||
((player->effects & 0x20000) == 0x20000) ||
|
||||
((player->unk_044 & 0x800) != 0)) {
|
||||
func_8002E594(player, camera, arg3, arg2);
|
||||
@@ -966,7 +966,7 @@ void func_8002934C(Player *player, Camera *camera, s8 arg2, s8 playerId) {
|
||||
}
|
||||
if (((player->effects & 0x400) == 0x400)
|
||||
|| ((player->effects & 0x01000000) == 0x01000000)
|
||||
|| ((player->effects & 0x02000000) == 0x02000000)
|
||||
|| ((player->effects & HIT_BY_ITEM_EFFECT) == HIT_BY_ITEM_EFFECT)
|
||||
|| (player->effects & 0x10000)
|
||||
|| (player->effects & 0x80)
|
||||
|| (player->effects & 0x40)) {
|
||||
@@ -1102,15 +1102,15 @@ void func_80029B4C(Player *player, UNUSED f32 arg1, f32 arg2, UNUSED f32 arg3) {
|
||||
if (((player->effects & 8) == 8) && ((player->unk_0CA & 2) == 2)) {
|
||||
player->slopeAccel = (s16) ((s32) player->unk_D9C);
|
||||
}
|
||||
player->unk_0F8 = get_surface_type(player->unk_110.unk3A) & 0xFF;
|
||||
if (player->unk_0F8 == 0xFE) {
|
||||
if (((player->effects & 0x100000) != 0x100000) && ((player->effects & 8) != 8)) {
|
||||
player->statusEffects |= 0x800000;
|
||||
player->surfaceType = get_surface_type(player->unk_110.unk3A) & 0xFF;
|
||||
if (player->surfaceType == BOOST_RAMP_ASPHALT) {
|
||||
if (((player->effects & BOOST_RAMP_ASPHALT_EFFECT) != BOOST_RAMP_ASPHALT_EFFECT) && ((player->effects & 8) != 8)) {
|
||||
player->soundEffects |= BOOST_RAMP_ASPHALT_SOUND_EFFECT;
|
||||
}
|
||||
}
|
||||
if (player->unk_0F8 == 0xFC) {
|
||||
if (((player->effects & 4) != 4) && ((player->effects & 8) != 8)) {
|
||||
player->statusEffects |= 0x8000;
|
||||
if (player->surfaceType == BOOST_RAMP_WOOD) {
|
||||
if (((player->effects & BOOST_RAMP_WOOD_EFFECT) != BOOST_RAMP_WOOD_EFFECT) && ((player->effects & 8) != 8)) {
|
||||
player->soundEffects |= BOOST_RAMP_WOOD_SOUND_EFFECT;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1157,11 +1157,11 @@ void func_8002A194(Player *player, f32 arg1, f32 arg2, f32 arg3) {
|
||||
player->unk_1FC = (player->boundingBoxCorners[1].cornerGroundY + player->boundingBoxCorners[0].cornerGroundY) / 2;
|
||||
player->unk_1F8 = (player->boundingBoxCorners[3].cornerGroundY + player->boundingBoxCorners[2].cornerGroundY) / 2;
|
||||
}
|
||||
player->unk_0F8 = (u8)get_surface_type(player->unk_110.unk3A);
|
||||
player->boundingBoxCorners[3].surfaceType = player->unk_0F8;
|
||||
player->boundingBoxCorners[2].surfaceType = player->unk_0F8;
|
||||
player->boundingBoxCorners[1].surfaceType = player->unk_0F8;
|
||||
player->boundingBoxCorners[0].surfaceType = player->unk_0F8;
|
||||
player->surfaceType = (u8)get_surface_type(player->unk_110.unk3A);
|
||||
player->boundingBoxCorners[3].surfaceType = player->surfaceType;
|
||||
player->boundingBoxCorners[2].surfaceType = player->surfaceType;
|
||||
player->boundingBoxCorners[1].surfaceType = player->surfaceType;
|
||||
player->boundingBoxCorners[0].surfaceType = player->surfaceType;
|
||||
var_f20 = (gCharacterSize[player->characterId] * 18) + 1;
|
||||
temp_f0 = (player->unk_23C - player->unk_230);
|
||||
player->unk_206 = -func_802B7C40(temp_f0 / var_f20);
|
||||
@@ -1183,14 +1183,14 @@ void func_8002A194(Player *player, f32 arg1, f32 arg2, f32 arg3) {
|
||||
} else {
|
||||
player->boundingBoxCorners[3].unk_14 &= ~1;
|
||||
}
|
||||
if (player->unk_0F8 == 0x00FE) {
|
||||
if (((player->effects & 0x100000) != 0x100000) && ((player->effects & 8) != 8)) {
|
||||
player->statusEffects |= 0x800000;
|
||||
if (player->surfaceType == BOOST_RAMP_ASPHALT) {
|
||||
if (((player->effects & BOOST_RAMP_ASPHALT_EFFECT) != BOOST_RAMP_ASPHALT_EFFECT) && ((player->effects & 8) != 8)) {
|
||||
player->soundEffects |= BOOST_RAMP_ASPHALT_SOUND_EFFECT;
|
||||
}
|
||||
}
|
||||
if (player->unk_0F8 == 0x00FC) {
|
||||
if (((player->effects & 4) != 4) && ((player->effects & 8) != 8)) {
|
||||
player->statusEffects |= 0x8000;
|
||||
if (player->surfaceType == BOOST_RAMP_WOOD) {
|
||||
if (((player->effects & BOOST_RAMP_WOOD_EFFECT) != BOOST_RAMP_WOOD_EFFECT) && ((player->effects & 8) != 8)) {
|
||||
player->soundEffects |= BOOST_RAMP_WOOD_SOUND_EFFECT;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1230,8 +1230,8 @@ void func_8002A5F4(Vec3f arg0, f32 arg1, Vec3f arg2, f32 arg3, f32 arg4) {
|
||||
}
|
||||
|
||||
void func_8002A704(Player *player, s8 arg1) {
|
||||
player->effects |= 0x2000;
|
||||
player->statusEffects &= ~0x02000000;
|
||||
player->effects |= BOOST_EFFECT;
|
||||
player->soundEffects &= ~0x02000000;
|
||||
if (((player->type & PLAYER_HUMAN) == PLAYER_HUMAN) && ((player->type & PLAYER_INVISIBLE_OR_BOMB) != PLAYER_INVISIBLE_OR_BOMB)) {
|
||||
func_800C90F4(0U, (player->characterId * 0x10) + 0x29008001);
|
||||
func_800C9060(arg1, 0x1900A40BU);
|
||||
@@ -1377,11 +1377,11 @@ void func_8002AB70(Player *player) {
|
||||
move_f32_towards(&player->unk_DAC, 1.0f, 0.07f);
|
||||
}
|
||||
}
|
||||
if ((player->effects & 0x100000) == 0x100000) {
|
||||
if ((player->effects & BOOST_RAMP_ASPHALT_EFFECT) == BOOST_RAMP_ASPHALT_EFFECT) {
|
||||
move_f32_towards(&player->unk_DAC, 20.0f, 1.0f);
|
||||
player->kartGravity = 3500.0f;
|
||||
}
|
||||
if ((player->effects & 4) == 4) {
|
||||
if ((player->effects & BOOST_RAMP_WOOD_EFFECT) == BOOST_RAMP_WOOD_EFFECT) {
|
||||
move_f32_towards(&player->unk_DAC, 25.0f, 1.0f);
|
||||
player->kartGravity = 1800.0f;
|
||||
}
|
||||
@@ -1400,7 +1400,7 @@ void func_8002AB70(Player *player) {
|
||||
if ((player->effects & 0x01000000) == 0x01000000) {
|
||||
player->kartGravity = 550.0f;
|
||||
}
|
||||
if ((player->effects & 0x02000000) == 0x02000000) {
|
||||
if ((player->effects & HIT_BY_ITEM_EFFECT) == HIT_BY_ITEM_EFFECT) {
|
||||
player->kartGravity = 800.0f;
|
||||
}
|
||||
}
|
||||
@@ -1515,126 +1515,126 @@ void func_8002B218(Player *player) {
|
||||
}
|
||||
}
|
||||
|
||||
void func_8002B308(Player *player, s8 arg1, UNUSED s8 arg2) {
|
||||
if ((player->statusEffects & 2) == 2) {
|
||||
func_8008EAE0(player, arg1);
|
||||
void apply_sound_effect(Player *player, s8 playerId, UNUSED s8 arg2) {
|
||||
if ((player->soundEffects & 2) == 2) {
|
||||
apply_hit_by_item_sound_effect(player, playerId);
|
||||
}
|
||||
if ((player->statusEffects & 4) == 4) {
|
||||
func_8008C528(player, arg1);
|
||||
if ((player->soundEffects & 4) == 4) {
|
||||
func_8008C528(player, playerId);
|
||||
}
|
||||
if ((player->statusEffects & 1) == 1) {
|
||||
func_8008CDC0(player, arg1);
|
||||
if ((player->soundEffects & 1) == 1) {
|
||||
func_8008CDC0(player, playerId);
|
||||
}
|
||||
if ((player->statusEffects & BOOST_EFFECT) == BOOST_EFFECT) {
|
||||
func_8008D3C4(player, arg1);
|
||||
if ((player->soundEffects & BOOST_SOUND_EFFECT) == BOOST_SOUND_EFFECT) {
|
||||
apply_boost_sound_effect(player, playerId);
|
||||
}
|
||||
if ((player->statusEffects & 0x02000000) == 0x02000000) {
|
||||
func_8002A704(player, arg1);
|
||||
if ((player->soundEffects & 0x02000000) == 0x02000000) {
|
||||
func_8002A704(player, playerId);
|
||||
}
|
||||
if ((player->statusEffects & 0x1000) == 0x1000) {
|
||||
func_8008D570(player, arg1);
|
||||
if ((player->soundEffects & 0x1000) == 0x1000) {
|
||||
func_8008D570(player, playerId);
|
||||
}
|
||||
if ((player->statusEffects & 0x20000) == 0x20000) {
|
||||
func_8008D7B0(player, arg1);
|
||||
if ((player->soundEffects & 0x20000) == 0x20000) {
|
||||
func_8008D7B0(player, playerId);
|
||||
}
|
||||
if ((player->statusEffects & 0x100) == 0x100) {
|
||||
func_8008DABC(player, arg1);
|
||||
if ((player->soundEffects & 0x100) == 0x100) {
|
||||
func_8008DABC(player, playerId);
|
||||
}
|
||||
if ((player->statusEffects & HIT_ROTATING_EFFECT) == HIT_ROTATING_EFFECT) {
|
||||
func_8008DF98(player, arg1);
|
||||
if ((player->soundEffects & HIT_ROTATING_SOUND_EFFECT) == HIT_ROTATING_SOUND_EFFECT) {
|
||||
apply_hit_rotating_sound_effect(player, playerId);
|
||||
}
|
||||
if ((player->statusEffects & 0x200000) == 0x200000) {
|
||||
func_8008C73C(player, arg1);
|
||||
if ((player->soundEffects & 0x200000) == 0x200000) {
|
||||
func_8008C73C(player, playerId);
|
||||
}
|
||||
if ((player->statusEffects & REVERSE_EFFECT) == REVERSE_EFFECT) {
|
||||
func_8008E6C0(player, arg1);
|
||||
if ((player->soundEffects & REVERSE_SOUND_EFFECT) == REVERSE_SOUND_EFFECT) {
|
||||
apply_reverse_sound_effect(player, playerId);
|
||||
}
|
||||
if ((player->statusEffects & HIT_BY_ITEM_EFFECT) == HIT_BY_ITEM_EFFECT) {
|
||||
func_8008EAE0(player, arg1);
|
||||
if ((player->soundEffects & HIT_BY_ITEM_SOUND_EFFECT) == HIT_BY_ITEM_SOUND_EFFECT) {
|
||||
apply_hit_by_item_sound_effect(player, playerId);
|
||||
}
|
||||
if ((player->statusEffects & 0x00800000) == 0x00800000) {
|
||||
func_8008EC88(player, arg1);
|
||||
if ((player->soundEffects & BOOST_RAMP_ASPHALT_SOUND_EFFECT) == BOOST_RAMP_ASPHALT_SOUND_EFFECT) {
|
||||
apply_boost_ramp_asphalt_sound_effect(player, playerId);
|
||||
}
|
||||
if ((player->statusEffects & 0x8000) == 0x8000) {
|
||||
func_8008EEE4(player, arg1);
|
||||
if ((player->soundEffects & BOOST_RAMP_WOOD_SOUND_EFFECT) == BOOST_RAMP_WOOD_SOUND_EFFECT) {
|
||||
apply_boost_ramp_wood_sound_effect(player, playerId);
|
||||
}
|
||||
if ((player->statusEffects & STAR_EFFECT) == STAR_EFFECT) {
|
||||
func_8008F778(player, arg1);
|
||||
if ((player->soundEffects & STAR_SOUND_EFFECT) == STAR_SOUND_EFFECT) {
|
||||
apply_star_sound_effect(player, playerId);
|
||||
}
|
||||
if ((player->statusEffects & BOO_EFFECT) == BOO_EFFECT) {
|
||||
func_8008FA38(player, arg1);
|
||||
if ((player->soundEffects & BOO_SOUND_EFFECT) == BOO_SOUND_EFFECT) {
|
||||
apply_boo_sound_effect(player, playerId);
|
||||
}
|
||||
if (player->statusEffects & 0x80) {
|
||||
func_8008D0FC(player, arg1);
|
||||
if (player->soundEffects & 0x80) {
|
||||
func_8008D0FC(player, playerId);
|
||||
}
|
||||
if (player->statusEffects & 0x80000) {
|
||||
func_8008E6C0(player, arg1);
|
||||
if (player->soundEffects & 0x80000) {
|
||||
apply_reverse_sound_effect(player, playerId);
|
||||
}
|
||||
}
|
||||
|
||||
void func_8002B5C0(Player *player, UNUSED s8 arg1, UNUSED s8 arg2) {
|
||||
void func_8002B5C0(Player *player, UNUSED s8 playerId, UNUSED s8 arg2) {
|
||||
if (((player->unk_0CA & 8) != 0) || ((player->unk_0CA & 2) != 0)) {
|
||||
player->statusEffects &= 0xFE1D0478;
|
||||
player->soundEffects &= 0xFE1D0478;
|
||||
}
|
||||
if ((player->effects & 0x400) == 0x400) {
|
||||
player->statusEffects &= 0xFF5D457E;
|
||||
player->soundEffects &= 0xFF5D457E;
|
||||
}
|
||||
if (((player->effects & 0x80) == 0x80) || ((player->effects & 0x40) == 0x40)) {
|
||||
player->statusEffects &= 0xFF5F457E;
|
||||
player->soundEffects &= 0xFF5F457E;
|
||||
}
|
||||
if ((player->effects & 0x800) == 0x800) {
|
||||
player->statusEffects &= 0xFF5D457E;
|
||||
player->soundEffects &= 0xFF5D457E;
|
||||
}
|
||||
if ((player->unk_044 & 0x4000) != 0) {
|
||||
player->statusEffects &= 0xFF5D457E;
|
||||
player->soundEffects &= 0xFF5D457E;
|
||||
}
|
||||
if ((player->effects & 0x80000) == 0x80000) {
|
||||
player->statusEffects &= 0xFE1D4478;
|
||||
player->soundEffects &= 0xFE1D4478;
|
||||
}
|
||||
if ((player->effects & 0x800000) == 0x800000) {
|
||||
player->statusEffects &= 0xFE1D0478;
|
||||
player->soundEffects &= 0xFE1D0478;
|
||||
}
|
||||
if ((player->effects & 0x04000000) == 0x04000000) {
|
||||
player->statusEffects &= 0xFE1D0578;
|
||||
player->soundEffects &= 0xFE1D0578;
|
||||
}
|
||||
if ((player->effects & 0x01000000) == 0x01000000) {
|
||||
player->statusEffects &= 0xFE1D4478;
|
||||
player->soundEffects &= 0xFE1D4478;
|
||||
}
|
||||
if ((player->effects & 0x02000000) == 0x02000000) {
|
||||
player->statusEffects &= 0xFE1D4478;
|
||||
if ((player->effects & HIT_BY_ITEM_EFFECT) == HIT_BY_ITEM_EFFECT) {
|
||||
player->soundEffects &= 0xFE1D4478;
|
||||
}
|
||||
if ((player->effects & 0x100000) == 0x100000) {
|
||||
player->statusEffects &= 0xFE1D0478;
|
||||
if ((player->effects & BOOST_RAMP_ASPHALT_EFFECT) == BOOST_RAMP_ASPHALT_EFFECT) {
|
||||
player->soundEffects &= 0xFE1D0478;
|
||||
}
|
||||
if ((player->effects & 4) == 4) {
|
||||
player->statusEffects &= 0xFE1D0478;
|
||||
if ((player->effects & BOOST_RAMP_WOOD_EFFECT) == BOOST_RAMP_WOOD_EFFECT) {
|
||||
player->soundEffects &= 0xFE1D0478;
|
||||
}
|
||||
if ((player->effects & 0x10000) == 0x10000) {
|
||||
player->statusEffects &= 0xFE1D0478;
|
||||
player->soundEffects &= 0xFE1D0478;
|
||||
}
|
||||
if ((player->effects & 0x200) == 0x200) {
|
||||
player->statusEffects &= 0xFE9D8478;
|
||||
if ((player->effects & STAR_EFFECT) == STAR_EFFECT) {
|
||||
player->soundEffects &= 0xFE9D8478;
|
||||
}
|
||||
if ((player->effects & 0x80000000) == 0x80000000) {
|
||||
player->statusEffects &= 0xFE9D8678;
|
||||
if ((player->effects & BOO_EFFECT) == BOO_EFFECT) {
|
||||
player->soundEffects &= 0xFE9D8678;
|
||||
}
|
||||
if ((player->effects & 0x4000) == 0x4000) {
|
||||
player->statusEffects &= 0xFF5D45FF;
|
||||
player->soundEffects &= 0xFF5D45FF;
|
||||
}
|
||||
if ((player->effects & 0x20000) == 0x20000) {
|
||||
player->statusEffects &= 0xFE1D0478;
|
||||
player->soundEffects &= 0xFE1D0478;
|
||||
}
|
||||
}
|
||||
|
||||
void func_8002B830(Player *player, s8 arg1, s8 arg2) {
|
||||
if (player->statusEffects != 0) {
|
||||
func_8002B5C0(player, arg1, arg2);
|
||||
void func_8002B830(Player *player, s8 playerId, s8 arg2) {
|
||||
if (player->soundEffects != 0) {
|
||||
func_8002B5C0(player, playerId, arg2);
|
||||
}
|
||||
if (player->statusEffects != 0) {
|
||||
func_8002B308(player, arg1, arg2);
|
||||
if (player->soundEffects != 0) {
|
||||
apply_sound_effect(player, playerId, arg2);
|
||||
}
|
||||
if ((player->unk_044 & 0x400) != 0) {
|
||||
func_800911B4(player, arg1);
|
||||
func_800911B4(player, playerId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1873,22 +1873,22 @@ void func_8002C17C(Player *player, s8 playerId) {
|
||||
}
|
||||
break;
|
||||
case COURSE_FRAPPE_SNOWLAND:
|
||||
if ((player->unk_0F8 == 0x000B) && (D_80165330[playerId] == 0)) {
|
||||
if ((player->surfaceType == SNOW_OFFROAD) && (D_80165330[playerId] == 0)) {
|
||||
D_80165330[playerId] = 1;
|
||||
gCopyNearestWaypointByPlayerId[playerId] = gNearestWaypointByPlayerId[playerId];
|
||||
gCopyPathIndexByPlayerId[playerId] = gPathIndexByPlayerId[playerId];
|
||||
} else if (player->unk_0F8 != 0x000B) {
|
||||
} else if (player->surfaceType != SNOW_OFFROAD) {
|
||||
D_80165330[playerId] = 0;
|
||||
gCopyNearestWaypointByPlayerId[playerId] = gNearestWaypointByPlayerId[playerId];
|
||||
gCopyPathIndexByPlayerId[playerId] = gPathIndexByPlayerId[playerId];
|
||||
}
|
||||
break;
|
||||
case COURSE_ROYAL_RACEWAY:
|
||||
if (((player->effects & 0x100000) != 0) && (D_80165330[playerId] == 0)) {
|
||||
if (((player->effects & BOOST_RAMP_ASPHALT_EFFECT) != 0) && (D_80165330[playerId] == 0)) {
|
||||
D_80165330[playerId] = 1;
|
||||
gCopyNearestWaypointByPlayerId[playerId] = gNearestWaypointByPlayerId[playerId];
|
||||
gCopyPathIndexByPlayerId[playerId] = gPathIndexByPlayerId[playerId];
|
||||
} else if (((player->effects & 0x100000) == 0) && !(player->effects & 8)) {
|
||||
} else if (((player->effects & BOOST_RAMP_ASPHALT_EFFECT) == 0) && !(player->effects & 8)) {
|
||||
D_80165330[playerId] = 0;
|
||||
gCopyNearestWaypointByPlayerId[playerId] = gNearestWaypointByPlayerId[playerId];
|
||||
gCopyPathIndexByPlayerId[playerId] = gPathIndexByPlayerId[playerId];
|
||||
@@ -1962,7 +1962,7 @@ void func_8002C4F8(Player *player, s8 arg1) {
|
||||
func_80090868(player);
|
||||
}
|
||||
}
|
||||
if ((player->type & PLAYER_CPU) && (player->unk_0F8 == 0x00FD) && !(player->effects & 8)) {
|
||||
if ((player->type & PLAYER_CPU) && (player->surfaceType == OUT_OF_BOUNDS) && !(player->effects & 8)) {
|
||||
func_80090778(player);
|
||||
func_80090868(player);
|
||||
}
|
||||
@@ -1972,7 +1972,7 @@ void func_8002C4F8(Player *player, s8 arg1) {
|
||||
void func_8002C7E4(Player *player, s8 arg1, s8 arg2) {
|
||||
if ((player->unk_046 & 1) != 1) {
|
||||
if ((player->effects & 0x8000) == 0x8000) {
|
||||
if ((player->effects & 0x2000) != 0x2000) {
|
||||
if ((player->effects & BOOST_EFFECT) != BOOST_EFFECT) {
|
||||
func_8002B9CC(player, arg1, arg2);
|
||||
}
|
||||
player->unk_044 &= ~0x0001;
|
||||
@@ -1985,8 +1985,8 @@ void func_8002C7E4(Player *player, s8 arg1, s8 arg2) {
|
||||
if ((player->unk_046 & 4) != 4) {
|
||||
player->unk_046 |= 4;
|
||||
player->unk_046 |= 0x40;
|
||||
if (player->effects & 0x2000) {
|
||||
func_8008D554(player);
|
||||
if (player->effects & BOOST_EFFECT) {
|
||||
remove_boost_effect(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2017,7 +2017,7 @@ void func_8002C954(Player *player, s8 arg1, Vec3f arg2) {
|
||||
|
||||
temp_f0 = player->pos[1] - player->unk_074;
|
||||
if (((((player->effects & 0x10000) != 0x10000) &&
|
||||
((player->effects & 0x100000) == 0x100000)) ||
|
||||
((player->effects & BOOST_RAMP_ASPHALT_EFFECT) == BOOST_RAMP_ASPHALT_EFFECT)) ||
|
||||
((((temp_f0 >= 20.0f) ||
|
||||
(temp_f0 < (-1.0f))) &&
|
||||
((player->effects & 0x10000) == 0)) &&
|
||||
@@ -2068,13 +2068,13 @@ void func_8002C954(Player *player, s8 arg1, Vec3f arg2) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (player->effects & 0x2000) {
|
||||
func_8008D554(player);
|
||||
if (player->effects & BOOST_EFFECT) {
|
||||
remove_boost_effect(player);
|
||||
player->unk_08C /= 2;
|
||||
}
|
||||
}
|
||||
|
||||
void func_8002CD48(Player *player, s8 arg1, s8 arg2) {
|
||||
void apply_effect(Player *player, s8 arg1, s8 arg2) {
|
||||
if (((player->unk_0CA & 2) == 2) || ((player->unk_0CA & 8) == 8)) {
|
||||
func_80090970(player, arg1, arg2);
|
||||
}
|
||||
@@ -2084,29 +2084,29 @@ void func_8002CD48(Player *player, s8 arg1, s8 arg2) {
|
||||
if (player->unk_044 & 0x4000) {
|
||||
func_8008D170(player, arg1);
|
||||
}
|
||||
if ((player->effects & 0x2000) == 0x2000) {
|
||||
func_8008D4B4(player);
|
||||
if ((player->effects & BOOST_EFFECT) == BOOST_EFFECT) {
|
||||
apply_boost_effect(player);
|
||||
}
|
||||
if ((player->effects & 0x100000) == 0x100000) {
|
||||
func_8008EDC0(player);
|
||||
if ((player->effects & BOOST_RAMP_ASPHALT_EFFECT) == BOOST_RAMP_ASPHALT_EFFECT) {
|
||||
apply_boost_ramp_asphalt_effect(player);
|
||||
}
|
||||
if ((player->effects & 4) == 4) {
|
||||
func_8008F008(player);
|
||||
if ((player->effects & BOOST_RAMP_WOOD_EFFECT) == BOOST_RAMP_WOOD_EFFECT) {
|
||||
apply_boost_ramp_wood_effect(player);
|
||||
}
|
||||
if ((s32)(player->effects & 0x04000000) == 0x04000000) {
|
||||
func_8008DC08(player, arg1);
|
||||
}
|
||||
if ((player->effects & LIGHTNING_EFFECT) == LIGHTNING_EFFECT) {
|
||||
func_8008E118(player, arg1);
|
||||
apply_lightning_effect(player, arg1);
|
||||
}
|
||||
if ((player->effects & 0x10000) == 0x10000) {
|
||||
func_8008F3F4(player, arg1);
|
||||
}
|
||||
if ((player->effects & 0x200) == 0x200) {
|
||||
func_8008F650(player, arg1);
|
||||
if ((player->effects & STAR_EFFECT) == STAR_EFFECT) {
|
||||
apply_star_effect(player, arg1);
|
||||
}
|
||||
if ((player->effects & 0x80000000) == 0x80000000) {
|
||||
func_8008F8DC(player, arg1);
|
||||
if ((player->effects & BOO_EFFECT) == BOO_EFFECT) {
|
||||
apply_boo_effect(player, arg1);
|
||||
}
|
||||
if (((player->effects & 0x20000000) == 0x20000000) && (player->unk_228 >= 0x64)) {
|
||||
func_80031F48(player, 4.0f);
|
||||
@@ -2120,8 +2120,8 @@ void func_8002CD48(Player *player, s8 arg1, s8 arg2) {
|
||||
if ((player->effects & 0x01000000) == 0x01000000) {
|
||||
func_8008E4A4(player, arg1);
|
||||
}
|
||||
if ((player->effects & 0x02000000) == 0x02000000) {
|
||||
func_8008E8D8(player, arg1);
|
||||
if ((player->effects & HIT_BY_ITEM_EFFECT) == HIT_BY_ITEM_EFFECT) {
|
||||
apply_hit_by_item_effect(player, arg1);
|
||||
}
|
||||
if ((player->effects & 0x4000) == 0x4000) {
|
||||
func_8008F1B8(player, arg1);
|
||||
@@ -2134,10 +2134,10 @@ void func_8002CD48(Player *player, s8 arg1, s8 arg2) {
|
||||
func_80031F48(player, 10.0f);
|
||||
}
|
||||
if (D_800DC510 != 5) {
|
||||
if (player->statusEffects & 0x04000000) {
|
||||
if (player->soundEffects & 0x04000000) {
|
||||
func_8008FC64(player, arg1);
|
||||
}
|
||||
if (player->statusEffects & 0x08000000) {
|
||||
if (player->soundEffects & 0x08000000) {
|
||||
func_8008FCDC(player, arg1);
|
||||
}
|
||||
}
|
||||
@@ -2237,7 +2237,7 @@ void func_8002D268(Player *player, UNUSED Camera *camera, s8 arg2, s8 playerId)
|
||||
if (((player->type & PLAYER_HUMAN) == PLAYER_HUMAN) && ((player->type & PLAYER_INVISIBLE_OR_BOMB) != PLAYER_INVISIBLE_OR_BOMB)) {
|
||||
func_8002BF4C(player, playerId);
|
||||
}
|
||||
func_8002CD48(player, playerId, arg2);
|
||||
apply_effect(player, playerId, arg2);
|
||||
if (((player->effects & 0x20000000) == 0x20000000) && (player->unk_228 >= 0x64)) {
|
||||
sp7C = 2;
|
||||
}
|
||||
@@ -2248,7 +2248,7 @@ void func_8002D268(Player *player, UNUSED Camera *camera, s8 arg2, s8 playerId)
|
||||
player->unk_064[0] *= -1.0f;
|
||||
player->unk_064[2] *= -1.0f;
|
||||
}
|
||||
if ((player->boundingBoxCorners[2].surfaceType == 1) && (player->boundingBoxCorners[3].surfaceType == 1)) {
|
||||
if ((player->boundingBoxCorners[2].surfaceType == ASPHALT) && (player->boundingBoxCorners[3].surfaceType == ASPHALT)) {
|
||||
spB4 = (-1 * (player->unk_064[0] + sp16C[0])) + ((-player->unk_110.orientationVector[0] * player->kartGravity) * 0.925);
|
||||
spB0 = (-player->unk_110.orientationVector[1] * player->kartGravity);
|
||||
spAC = (-1 * (player->unk_064[2] + sp16C[2])) + ((-player->unk_110.orientationVector[2] * player->kartGravity) * 0.925);
|
||||
@@ -2295,7 +2295,7 @@ void func_8002D268(Player *player, UNUSED Camera *camera, s8 arg2, s8 playerId)
|
||||
sp98[2] = player->velocity[2];
|
||||
if (((player->unk_10C < 3)
|
||||
&& (((s32) player->unk_256) < 3))
|
||||
|| ((player->effects & 0x2000) == 0x2000)) {
|
||||
|| ((player->effects & BOOST_EFFECT) == BOOST_EFFECT)) {
|
||||
|
||||
if (((player->unk_07C >> 16) >= 0x28)
|
||||
|| ((player->unk_07C >> 16) < (-0x27))) {
|
||||
@@ -2362,7 +2362,7 @@ void func_8002D268(Player *player, UNUSED Camera *camera, s8 arg2, s8 playerId)
|
||||
player->unk_DB4.unk18 = 0;
|
||||
player->unk_0B6 |= 0x100;
|
||||
if ((((player->type & PLAYER_HUMAN) == PLAYER_HUMAN)
|
||||
&& ((player->effects & 0x100000) == 0x100000))
|
||||
&& ((player->effects & BOOST_RAMP_ASPHALT_EFFECT) == BOOST_RAMP_ASPHALT_EFFECT))
|
||||
&& ((player->type & PLAYER_INVISIBLE_OR_BOMB) != PLAYER_INVISIBLE_OR_BOMB))
|
||||
|
||||
func_800C9060(playerId, 0x1900A60AU);
|
||||
@@ -2508,7 +2508,7 @@ void func_8002E4C4(Player *player) {
|
||||
player->velocity[1] = 0.0f;
|
||||
}
|
||||
|
||||
void func_8002E594(Player *player, UNUSED Camera *camera, s8 arg2, s8 arg3) {
|
||||
void func_8002E594(Player *player, UNUSED Camera *camera, s8 arg2, s8 playerId) {
|
||||
Vec3f spEC = {0.0f, 0.0f, 1.0f};
|
||||
Vec3f spE0 = {0.0f, 0.0f, 0.0f};
|
||||
Vec3f spD4 = {0.0f, 0.0f, 0.0f};
|
||||
@@ -2530,7 +2530,7 @@ void func_8002E594(Player *player, UNUSED Camera *camera, s8 arg2, s8 arg3) {
|
||||
Vec3f sp54;
|
||||
Vec3f sp48;
|
||||
s16 sp46;
|
||||
func_8002B830(player, arg3, arg2);
|
||||
func_8002B830(player, playerId, arg2);
|
||||
if ((((((((player->effects & 0x80) == 0x80)
|
||||
|| ((player->effects & 0x40) == 0x40))
|
||||
|| ((player->effects & 0x4000) == 0x4000))
|
||||
@@ -2542,9 +2542,9 @@ void func_8002E594(Player *player, UNUSED Camera *camera, s8 arg2, s8 arg3) {
|
||||
} else {
|
||||
sp46 = 0;
|
||||
}
|
||||
func_8002CD48(player, arg3, arg2);
|
||||
apply_effect(player, playerId, arg2);
|
||||
func_8002AB70(player);
|
||||
func_8002FCA8(player, arg3);
|
||||
func_8002FCA8(player, playerId);
|
||||
if ((((player->effects & 0x80) == 0x80)
|
||||
|| ((player->effects & 0x40) == 0x40))
|
||||
|| ((player->effects & 0x20000) == 0x20000)) {
|
||||
@@ -2556,14 +2556,14 @@ void func_8002E594(Player *player, UNUSED Camera *camera, s8 arg2, s8 arg3) {
|
||||
sp7C = -1 * player->kartGravity;
|
||||
sp78 = -1 * player->unk_064[2];
|
||||
}
|
||||
func_8002C7E4(player, arg3, arg2);
|
||||
func_8002C7E4(player, playerId, arg2);
|
||||
if (sp46 == 1) {
|
||||
calculate_orientation_matrix(player->orientationMatrix, player->unk_058, player->unk_05C, player->unk_060, (s16) ((s32) player->rotation[1]));
|
||||
calculate_orientation_matrix(player->unk_150, player->unk_058, player->unk_05C, player->unk_060, (s16) ((s32) player->unk_0AE));
|
||||
} else {
|
||||
calculate_orientation_matrix(player->orientationMatrix, player->unk_058, player->unk_05C, player->unk_060, (s16) ((s32) player->rotation[1]));
|
||||
}
|
||||
spEC[2] = func_80030150(player, arg3);
|
||||
spEC[2] = func_80030150(player, playerId);
|
||||
if (sp46 == 1) {
|
||||
mtxf_translate_vec3f_mat3(spEC, player->unk_150);
|
||||
} else {
|
||||
@@ -2576,7 +2576,7 @@ void func_8002E594(Player *player, UNUSED Camera *camera, s8 arg2, s8 arg3) {
|
||||
&& ((player->unk_256) < 3)
|
||||
&& ((player->effects & 0x400) != 0x400)
|
||||
&& ((player->effects & 0x01000000) != 0x01000000)
|
||||
&& ((player->effects & 0x02000000) != 0x02000000)) {
|
||||
&& ((player->effects & HIT_BY_ITEM_EFFECT) != HIT_BY_ITEM_EFFECT)) {
|
||||
sp54[0] += (((((spEC[0] + sp80) + spD4[0])) - (sp54[0] * (0.12 * player->kartFriction))) / 6000) / ((player->unk_20C * 5.0f) + 1.0f);
|
||||
sp54[2] += (((((spEC[2] + sp78) + spD4[2])) - (sp54[2] * (0.12 * player->kartFriction))) / 6000) / ((player->unk_20C * 5.0f) + 1.0f);
|
||||
} else {
|
||||
@@ -2599,9 +2599,9 @@ void func_8002E594(Player *player, UNUSED Camera *camera, s8 arg2, s8 arg3) {
|
||||
player->copy_rotation_y = player->pos[1];
|
||||
player->copy_rotation_z = player->pos[2];
|
||||
|
||||
spD0 = posX + player->velocity[0] + D_8018CE10[arg3].unk_04[0];
|
||||
spD0 = posX + player->velocity[0] + D_8018CE10[playerId].unk_04[0];
|
||||
spCC = posY + player->velocity[1];
|
||||
spC8 = posZ + player->velocity[2] + D_8018CE10[arg3].unk_04[2];
|
||||
spC8 = posZ + player->velocity[2] + D_8018CE10[playerId].unk_04[2];
|
||||
func_8002AAC0(player);
|
||||
spCC += player->kartHopVelocity;
|
||||
func_802AD950(&player->unk_110, player->boundingBoxSize, spD0, spCC, spC8, player->copy_rotation_x, player->copy_rotation_y, player->copy_rotation_z);
|
||||
@@ -2616,7 +2616,7 @@ void func_8002E594(Player *player, UNUSED Camera *camera, s8 arg2, s8 arg3) {
|
||||
player->effects &= ~8;
|
||||
if ((((player->effects & 0x400) != 0x400)
|
||||
&& ((player->effects & 0x01000000) != 0x01000000))
|
||||
&& ((player->effects & 0x02000000) != 0x02000000)) {
|
||||
&& ((player->effects & HIT_BY_ITEM_EFFECT) != HIT_BY_ITEM_EFFECT)) {
|
||||
if (player->unk_0C2 >= 0x1C) {
|
||||
if (player->unk_0C2 >= 0x32) {
|
||||
player->unk_0C2 = 0x0032;
|
||||
@@ -2625,7 +2625,7 @@ void func_8002E594(Player *player, UNUSED Camera *camera, s8 arg2, s8 arg3) {
|
||||
player->unk_0B6 |= 0x100;
|
||||
player->unk_DB4.unkC = 3.0f;
|
||||
if (((player->type & PLAYER_HUMAN) == PLAYER_HUMAN) && ((player->type & PLAYER_INVISIBLE_OR_BOMB) != PLAYER_INVISIBLE_OR_BOMB)) {
|
||||
func_800CADD0((u8) arg3, ((f32) player->unk_0C2) / 50.0f);
|
||||
func_800CADD0((u8) playerId, ((f32) player->unk_0C2) / 50.0f);
|
||||
}
|
||||
if ((player->type & PLAYER_HUMAN) == PLAYER_HUMAN) {
|
||||
player->unk_044 |= 0x100;
|
||||
@@ -2637,7 +2637,7 @@ void func_8002E594(Player *player, UNUSED Camera *camera, s8 arg2, s8 arg3) {
|
||||
player->unk_DB4.unkC = 2.0f;
|
||||
player->unk_DB4.unk18 = 0;
|
||||
if (((player->type & PLAYER_HUMAN) == PLAYER_HUMAN) && ((player->type & PLAYER_INVISIBLE_OR_BOMB) != PLAYER_INVISIBLE_OR_BOMB)) {
|
||||
func_800CADD0((u8) arg3, ((f32) player->unk_0C2) / 50.0f);
|
||||
func_800CADD0((u8) playerId, ((f32) player->unk_0C2) / 50.0f);
|
||||
}
|
||||
if ((player->type & PLAYER_HUMAN) == PLAYER_HUMAN) {
|
||||
player->unk_044 |= 0x100;
|
||||
@@ -2650,7 +2650,7 @@ void func_8002E594(Player *player, UNUSED Camera *camera, s8 arg2, s8 arg3) {
|
||||
player->unk_0C2 = 0x0032;
|
||||
}
|
||||
if (((player->type & PLAYER_HUMAN) == PLAYER_HUMAN) && ((player->type & PLAYER_INVISIBLE_OR_BOMB) != PLAYER_INVISIBLE_OR_BOMB)) {
|
||||
func_800CADD0((u8) arg3, ((f32) player->unk_0C2) / 20.0f);
|
||||
func_800CADD0((u8) playerId, ((f32) player->unk_0C2) / 20.0f);
|
||||
}
|
||||
if (player->unk_0C2 >= 0x28) {
|
||||
player->unk_0C2 = 0x0014;
|
||||
@@ -2680,13 +2680,13 @@ void func_8002E594(Player *player, UNUSED Camera *camera, s8 arg2, s8 arg3) {
|
||||
sp74 = player->unk_110.unk3C[0];
|
||||
if (sp74 < 0.0f) {
|
||||
func_8003F734(player, sp48, sp54, &sp74, &spD0, &spCC, &spC8);
|
||||
func_8002C954(player, arg3, sp54);
|
||||
func_8002C954(player, playerId, sp54);
|
||||
func_80031F48(player, 6.0f);
|
||||
}
|
||||
sp74 = player->unk_110.unk3C[1];
|
||||
if (sp74 < 0.0f) {
|
||||
func_8003FBAC(player, sp48, sp54, &sp74, &spD0, &spCC, &spC8);
|
||||
func_8002C954(player, arg3, sp54);
|
||||
func_8002C954(player, playerId, sp54);
|
||||
func_80031F48(player, 6.0f);
|
||||
}
|
||||
sp74 = player->unk_110.unk3C[0];
|
||||
@@ -2705,10 +2705,10 @@ void func_8002E594(Player *player, UNUSED Camera *camera, s8 arg2, s8 arg3) {
|
||||
}
|
||||
if (((func_802ABDB8(player->unk_110.unk3A) != 0) && ((player->effects & 0x10000) != 0x10000)) && (((player->unk_094 / 18.0f) * 216.0f) >= 20.0f)) {
|
||||
if ((!(player->unk_0CA & 2)) || (!(player->unk_0CA & 8))) {
|
||||
func_8008F494(player, arg3);
|
||||
func_8008F494(player, playerId);
|
||||
}
|
||||
} else if (((!(player->effects & 8)) && (func_802ABDB8(player->unk_110.unk3A) == 0)) && (player->effects & 0x10000)) {
|
||||
func_8008F5A4(player, arg3);
|
||||
func_8008F5A4(player, playerId);
|
||||
}
|
||||
player->unk_074 = func_802ABE30(spD0, spCC, spC8, player->unk_110.unk3A);
|
||||
if (((player->type & PLAYER_HUMAN) == PLAYER_HUMAN) && (((gActiveScreenMode == SCREEN_MODE_1P) || (gActiveScreenMode == SCREEN_MODE_2P_SPLITSCREEN_VERTICAL)) || (gActiveScreenMode == SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL))) {
|
||||
@@ -2716,7 +2716,7 @@ void func_8002E594(Player *player, UNUSED Camera *camera, s8 arg2, s8 arg3) {
|
||||
} else {
|
||||
func_8002A194(player, spD0, spCC, spC8);
|
||||
}
|
||||
func_8002AE38(player, arg3, posX, posZ, spD0, spC8);
|
||||
func_8002AE38(player, playerId, posX, posZ, spD0, spC8);
|
||||
temp = (sp54[0] * sp54[0]) + (sp54[2] * sp54[2]);
|
||||
player->unk_22C = player->unk_094;
|
||||
player->unk_094 = sqrtf(temp);
|
||||
@@ -2748,10 +2748,10 @@ void func_8002E594(Player *player, UNUSED Camera *camera, s8 arg2, s8 arg3) {
|
||||
player->unk_094 = gKartTopSpeedTable[player->characterId];
|
||||
}
|
||||
}
|
||||
func_8002C4F8(player, arg3);
|
||||
func_8002C4F8(player, playerId);
|
||||
}
|
||||
|
||||
void control_cpu_movement(Player *player, UNUSED Camera *camera, s8 arg2, s8 arg3) {
|
||||
void control_cpu_movement(Player *player, UNUSED Camera *camera, s8 arg2, s8 playerId) {
|
||||
Vec3f spF4 = {0.0f, 0.0f, 1.0f};
|
||||
UNUSED Vec3f spE8 = {0.0f, 0.0f, 0.0f};
|
||||
Vec3f spDC = {0.0f, 0.0f, 0.0f};
|
||||
@@ -2771,17 +2771,17 @@ void control_cpu_movement(Player *player, UNUSED Camera *camera, s8 arg2, s8 arg
|
||||
f32 test;
|
||||
player->effects |= 0x1000;
|
||||
player->unk_044 |= 0x10;
|
||||
test = D_80164510[arg3];
|
||||
test = D_80164510[playerId];
|
||||
player->unk_204 = 0;
|
||||
player->effects &= ~0x10;
|
||||
func_8002B830(player, arg3, arg2);
|
||||
func_8002CD48(player, arg3, arg2);
|
||||
func_8002B830(player, playerId, arg2);
|
||||
apply_effect(player, playerId, arg2);
|
||||
sp84 = 0 * player->unk_064[0] + spDC[0];
|
||||
sp7C = 0 * player->unk_064[2] + spDC[2];
|
||||
player->unk_10C = 0;
|
||||
player->unk_256 = 0;
|
||||
player->effects &= ~0x8000;
|
||||
spF4[2] = func_80030150(player, arg3);
|
||||
spF4[2] = func_80030150(player, playerId);
|
||||
mtxf_translate_vec3f_mat3(spF4, player->orientationMatrix);
|
||||
sp68[0] = player->velocity[0];
|
||||
sp68[1] = 0;
|
||||
@@ -2814,9 +2814,9 @@ void control_cpu_movement(Player *player, UNUSED Camera *camera, s8 arg2, s8 arg
|
||||
player->velocity[0] = sp68[0];
|
||||
player->velocity[1] = sp68[1];
|
||||
player->velocity[2] = sp68[2];
|
||||
D_80165070[arg3][0] = sp68[0];
|
||||
D_80165070[arg3][1] = sp68[1];
|
||||
D_80165070[arg3][2] = sp68[2];
|
||||
D_80165070[playerId][0] = sp68[0];
|
||||
D_80165070[playerId][1] = sp68[1];
|
||||
D_80165070[playerId][2] = sp68[2];
|
||||
if (gKartTopSpeedTable[player->characterId] < player->unk_094) {
|
||||
temp_f0_2 = gKartTopSpeedTable[player->characterId] / player->unk_094;
|
||||
player->velocity[0] *= temp_f0_2;
|
||||
@@ -2939,7 +2939,7 @@ void func_8002FCA8(Player *player, s8 arg1) {
|
||||
s32 var_v1;
|
||||
|
||||
var_f0 = 0.0f;
|
||||
if ((player->effects & 0x200) != 0x200) {
|
||||
if ((player->effects & STAR_EFFECT) != STAR_EFFECT) {
|
||||
if ((s32) player->boundingBoxCorners[3].surfaceType < 0xF) {
|
||||
var_f0 += D_800E2A90[player->characterId][player->boundingBoxCorners[3].surfaceType];
|
||||
}
|
||||
@@ -3002,10 +3002,10 @@ void func_8002FE84(Player *player, f32 arg1) {
|
||||
var_f0 += (temp_lo * 0.025) / 1.2;
|
||||
}
|
||||
player->unk_098 = arg1 * (1.0f - var_f0);
|
||||
if (player->boundingBoxCorners[3].surfaceType == 8) {
|
||||
if (player->boundingBoxCorners[3].surfaceType == GRASS) {
|
||||
var_f0 += D_800E2E90[player->characterId][player->boundingBoxCorners[3].surfaceType] * 0.7;
|
||||
}
|
||||
if (player->boundingBoxCorners[2].surfaceType == 8) {
|
||||
if (player->boundingBoxCorners[2].surfaceType == GRASS) {
|
||||
// The unecessary "* 1.0" here is to force the compiler to save this 0.7 as a separate RO value from the 0.7 just above this comment
|
||||
var_f0 += D_800E2E90[player->characterId][player->boundingBoxCorners[2].surfaceType] * (0.7 * 1.0);
|
||||
}
|
||||
@@ -3031,7 +3031,7 @@ f32 func_80030150(Player *player, s8 arg1) {
|
||||
var_f0 = 0.0f;
|
||||
var_f2 = (player->unk_094 / 18.0f) * 216.0f;
|
||||
if (var_f2 >= 8.0f) {
|
||||
if ((player->effects & 0x200) != 0x200) {
|
||||
if ((player->effects & STAR_EFFECT) != STAR_EFFECT) {
|
||||
if ((s32) player->boundingBoxCorners[3].surfaceType >= 0xF) {
|
||||
// ???????
|
||||
if(1) {}
|
||||
@@ -3084,7 +3084,7 @@ f32 func_80030150(Player *player, s8 arg1) {
|
||||
var_f0 += var_v0 * 0.008;
|
||||
}
|
||||
}
|
||||
if ((player->effects & 0x200) == 0x200) {
|
||||
if ((player->effects & STAR_EFFECT) == STAR_EFFECT) {
|
||||
var_f0 += -0.25;
|
||||
}
|
||||
}
|
||||
@@ -3140,11 +3140,11 @@ f32 func_80030150(Player *player, s8 arg1) {
|
||||
if (((player->unk_0CA & 2) == 2) || ((player->unk_0CA & 8) == 8) || ((player->type & PLAYER_START_SEQUENCE) == PLAYER_START_SEQUENCE)) {
|
||||
return (1.0f - player->unk_104) * var_f2;
|
||||
}
|
||||
if (((player->effects & 0x80) == 0x80) || ((player->effects & 0x40) == 0x40) || ((player->effects & 0x01000000) == 0x01000000) || ((player->effects & 0x02000000) == 0x02000000)) {
|
||||
if (((player->effects & 0x80) == 0x80) || ((player->effects & 0x40) == 0x40) || ((player->effects & 0x01000000) == 0x01000000) || ((player->effects & HIT_BY_ITEM_EFFECT) == HIT_BY_ITEM_EFFECT)) {
|
||||
return (1.0f - player->unk_104) * var_f2;
|
||||
}
|
||||
// Have to `and` the 0x2000 here to force the compiler to reload the immediate
|
||||
if (((player->effects & 0x2000) == (0x2000 & 0xFFFFFFFF)) || ((player->effects & 0x100000) == 0x100000) || ((player->effects & 4) == 4)) {
|
||||
if (((player->effects & BOOST_EFFECT) == (BOOST_EFFECT & 0xFFFFFFFF)) || ((player->effects & BOOST_RAMP_ASPHALT_EFFECT) == BOOST_RAMP_ASPHALT_EFFECT) || ((player->effects & BOOST_RAMP_WOOD_EFFECT) == BOOST_RAMP_WOOD_EFFECT)) {
|
||||
func_8002FE84(player, player->boostPower + player->unk_08C);
|
||||
return player->boostPower + player->unk_08C;
|
||||
}
|
||||
@@ -3158,28 +3158,28 @@ void func_80030A34(Player *player) {
|
||||
|
||||
if (((player->unk_0CA & 2) != 2) && ((player->unk_0CA & 8) != 8)) {
|
||||
if ((((player->unk_094 / 18.0f) * 216.0f) >= 8.0f) && (player->unk_DB4.unkC < 1.0f)) {
|
||||
switch (player->unk_0F8) { /* irregular */
|
||||
case 1:
|
||||
if (random_int(0x000AU) != 8) {
|
||||
var_f0 = 0.35f;
|
||||
var_f2 = 0.55f;
|
||||
} else {
|
||||
player->unk_07A = 0;
|
||||
player->unk_108 = 0.0f;
|
||||
var_f0 = 0.0f;
|
||||
var_f2 = 0.0f;
|
||||
}
|
||||
break;
|
||||
case 14:
|
||||
case 16:
|
||||
var_f0 = 0.94f;
|
||||
var_f2 = 0.85f;
|
||||
break;
|
||||
default:
|
||||
if(1){}
|
||||
var_f0 = 0.46f;
|
||||
var_f2 = 0.48f;
|
||||
break;
|
||||
switch (player->surfaceType) { /* irregular */
|
||||
case ASPHALT:
|
||||
if (random_int(0x000AU) != 8) {
|
||||
var_f0 = 0.35f;
|
||||
var_f2 = 0.55f;
|
||||
} else {
|
||||
player->unk_07A = 0;
|
||||
player->unk_108 = 0.0f;
|
||||
var_f0 = 0.0f;
|
||||
var_f2 = 0.0f;
|
||||
}
|
||||
break;
|
||||
case TRAIN_TRACK:
|
||||
case ROPE_BRIDGE:
|
||||
var_f0 = 0.94f;
|
||||
var_f2 = 0.85f;
|
||||
break;
|
||||
default:
|
||||
if(1){}
|
||||
var_f0 = 0.46f;
|
||||
var_f2 = 0.48f;
|
||||
break;
|
||||
}
|
||||
} else if (random_int(0x000AU) != 8) {
|
||||
var_f0 = 0.3f;
|
||||
@@ -3398,9 +3398,9 @@ void player_speed(Player *player) {
|
||||
player->unk_08C = (player->currentSpeed * player->currentSpeed) / 25.0f;
|
||||
}
|
||||
player->unk_044 |= 0x20;
|
||||
if ((player->statusEffects * 8) < 0) {
|
||||
if ((player->soundEffects * 8) < 0) {
|
||||
func_8008F104(player, player_index);
|
||||
player->statusEffects &= 0xEFFFFFFF;
|
||||
player->soundEffects &= 0xEFFFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3422,9 +3422,9 @@ void func_80031F48(Player *player, f32 arg1) {
|
||||
player->unk_08C = (player->currentSpeed * player->currentSpeed) / 25.0f;
|
||||
}
|
||||
player->unk_044 &= 0xFFDF;
|
||||
if ((player->statusEffects * 8) < 0) {
|
||||
if ((player->soundEffects * 8) < 0) {
|
||||
func_8008F104(player, player_index);
|
||||
player->statusEffects &= 0xEFFFFFFF;
|
||||
player->soundEffects &= 0xEFFFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3664,11 +3664,11 @@ void func_80032700(Player *player) {
|
||||
var_v0 = 8;
|
||||
}
|
||||
if ((test < var_v0) && ((player->unk_044 & 0x20) != 0x20)) {
|
||||
player->statusEffects |= 0x02000000;
|
||||
player->soundEffects |= 0x02000000;
|
||||
} else if ((player->topSpeed * 0.9f) <= player->currentSpeed) {
|
||||
if ((player->statusEffects & 0x02000000) != 0x02000000) {
|
||||
player->statusEffects |= 0x10000000;
|
||||
player->statusEffects &= ~0x02000000;
|
||||
if ((player->soundEffects & 0x02000000) != 0x02000000) {
|
||||
player->soundEffects |= 0x10000000;
|
||||
player->soundEffects &= ~0x02000000;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3688,9 +3688,9 @@ void func_80032CB0(Player *player, f32 arg1) {
|
||||
player->currentSpeed = player->topSpeed;
|
||||
}
|
||||
if ((f64) player->currentSpeed <= (player->topSpeed * 0.7)) {
|
||||
player->statusEffects &= ~0x10000000;
|
||||
player->soundEffects &= ~0x10000000;
|
||||
}
|
||||
player->statusEffects &= ~0x02000000;
|
||||
player->soundEffects &= ~0x02000000;
|
||||
player->unk_044 &= ~0x0020;
|
||||
player->unk_098 = (player->currentSpeed * player->currentSpeed) / 25.0f;
|
||||
}
|
||||
@@ -3934,7 +3934,7 @@ void func_80033AE0(Player *player, struct Controller *controller, s8 arg2) {
|
||||
{
|
||||
if ((((((!(player->effects & 0x10)) && (gCCSelection == CC_150)) && (gModeSelection != BATTLE)) && (!(player->effects & 8))) && (((player->unk_094 / 18.0f) * 216.0f) >= 40.0f)) && (player->unk_204 == 0))
|
||||
{
|
||||
player->statusEffects |= 0x80;
|
||||
player->soundEffects |= 0x80;
|
||||
}
|
||||
}
|
||||
if (((s32) player->boundingBoxCorners[3].surfaceType) < 0xF)
|
||||
@@ -4290,7 +4290,7 @@ void func_8003680C(Player *player, s16 arg1) {
|
||||
(player->effects & 0x10000) ||
|
||||
(player->effects & 0x20000) ||
|
||||
(player->effects & 0x01000000) ||
|
||||
(player->effects & 0x02000000) ||
|
||||
(player->effects & HIT_BY_ITEM_EFFECT) ||
|
||||
(player->effects & 0x04000000))) {
|
||||
if (!(((player->unk_094 / 18.0f) * 216.0f) >= 110.0f)) {
|
||||
player->effects &= ~0x20000000;
|
||||
@@ -4409,7 +4409,7 @@ void func_80036DB4(Player *player, Vec3f arg1, Vec3f arg2) {
|
||||
var_f18 = player->unk_208 + ((-(player->unk_094 / 18.0f) * 216.0f) * 1.5) + (((player->unk_07C >> 0x10) * 0.1) + (-player->currentSpeed * 0.05)) + (-player->unk_20C * 50.0f);
|
||||
sp20 = player->unk_084;
|
||||
}
|
||||
if ((player->effects & 0x200) == 0x200) {
|
||||
if ((player->effects & STAR_EFFECT) == STAR_EFFECT) {
|
||||
if (((player->effects & 0x10) == 0x10) && ((player->effects & 2) != 2)) {
|
||||
var_f18 = player->unk_208 + ((-(player->unk_094 / 18.0f) * 216.0f) * 3.0f) + (-player->unk_20C * 10.0f);
|
||||
sp20 = player->unk_084 * 3.0f;
|
||||
@@ -4463,7 +4463,7 @@ void func_800371F4(Player *player, Vec3f arg1, Vec3f arg2) {
|
||||
var_f18 = ((player->unk_208 + ((f64) (-(player->unk_094 / 18.0f) * 216.0f) * 1.5)) - (((player->unk_07C >> 0x10) * 0.1) + (player->currentSpeed * 0.05))) + (-player->unk_20C * 50.0f);
|
||||
sp20 = player->unk_084;
|
||||
}
|
||||
if ((player->effects & 0x200) == 0x200) {
|
||||
if ((player->effects & STAR_EFFECT) == STAR_EFFECT) {
|
||||
if (((player->effects & 0x10) == 0x10) && ((player->effects & 2) != 2)) {
|
||||
var_f18 = player->unk_208 + ((-(player->unk_094 / 18.0f) * 216.0f) * 3.0f) + (-player->unk_20C * 50.0f);
|
||||
sp20 = player->unk_084 * 3.0f;
|
||||
@@ -4635,7 +4635,7 @@ void func_80037CFC(Player *player, struct Controller *controller, s8 arg2) {
|
||||
((player->effects & 0x400) != 0x400) &&
|
||||
((player->effects & 0x4000) != 0x4000) &&
|
||||
((player->effects & 0x01000000) != 0x01000000) &&
|
||||
((player->effects & 0x02000000) != 0x02000000) && ((player->effects & 0x10000) != 0x10000) &&
|
||||
((player->effects & HIT_BY_ITEM_EFFECT) != HIT_BY_ITEM_EFFECT) && ((player->effects & 0x10000) != 0x10000) &&
|
||||
((player->effects & 0x20000) != 0x20000)) {
|
||||
if (((player->effects & 0x04000000) != 0x04000000) &&
|
||||
((player->effects & 8) != 8) &&
|
||||
@@ -4653,7 +4653,7 @@ void func_80037CFC(Player *player, struct Controller *controller, s8 arg2) {
|
||||
func_80033AE0(player, controller, arg2);
|
||||
}
|
||||
player->effects &= ~1;
|
||||
if ((!(player->effects & 0x100000)) && (!(player->effects & 4))) {
|
||||
if ((!(player->effects & BOOST_RAMP_ASPHALT_EFFECT)) && (!(player->effects & BOOST_RAMP_WOOD_EFFECT))) {
|
||||
if (((player->unk_094 / 18.0f) * 216.0f) <= 12.0f) {
|
||||
if (controller->button & A_BUTTON) {
|
||||
if (controller->button & B_BUTTON) {
|
||||
@@ -4693,7 +4693,7 @@ void func_80037CFC(Player *player, struct Controller *controller, s8 arg2) {
|
||||
detect_triple_b_combo_b_released(player);
|
||||
}
|
||||
}
|
||||
if ((!(player->effects & 0x100000)) && (!(player->effects & 4))) {
|
||||
if ((!(player->effects & BOOST_RAMP_ASPHALT_EFFECT)) && (!(player->effects & 4))) {
|
||||
if (((func_800388B0(controller) < (-0x31)) &&
|
||||
(((player->unk_094 / 18.0f) * 216.0f) <= 5.0f)) &&
|
||||
(controller->button & B_BUTTON)) {
|
||||
@@ -4720,7 +4720,7 @@ void func_80037CFC(Player *player, struct Controller *controller, s8 arg2) {
|
||||
if (((((player->effects & 0x80) == 0x80) ||
|
||||
((player->effects & 0x40) == 0x40)) ||
|
||||
((player->effects & 0x01000000) == 0x01000000)) ||
|
||||
((player->effects & 0x02000000) == 0x02000000)) {
|
||||
((player->effects & HIT_BY_ITEM_EFFECT) == HIT_BY_ITEM_EFFECT)) {
|
||||
if (controller->button & A_BUTTON) {
|
||||
detect_triple_a_combo_a_pressed(player);
|
||||
func_800332E8(player, arg2);
|
||||
@@ -4940,7 +4940,7 @@ void func_80038BE4(Player *player, s16 arg1) {
|
||||
player->unk_08C = (player->currentSpeed * player->currentSpeed) / 25.0f;
|
||||
}
|
||||
|
||||
void func_80038C6C(Player *player, UNUSED Camera *camera, s8 arg2, s8 arg3) {
|
||||
void func_80038C6C(Player *player, UNUSED Camera *camera, s8 arg2, s8 playerId) {
|
||||
Vec3f sp114 = {0.0, 0.0, 1.0};
|
||||
Vec3f sp108 = {0.0, 0.0, 0.0};
|
||||
Vec3f spFC = {0.0, 0.0, 0.0};
|
||||
@@ -4967,8 +4967,8 @@ void func_80038C6C(Player *player, UNUSED Camera *camera, s8 arg2, s8 arg3) {
|
||||
player->unk_084 = -10.0f;
|
||||
player->unk_088 = 28.0f;
|
||||
player->topSpeed = 250.0f;
|
||||
func_8002B830(player, arg3, arg2);
|
||||
func_8002CD48(player, arg3, arg2);
|
||||
func_8002B830(player, playerId, arg2);
|
||||
apply_effect(player, playerId, arg2);
|
||||
player->rotation[1] += player->unk_078;
|
||||
spF0[0] = 0;
|
||||
spF0[1] = 0;
|
||||
@@ -5032,12 +5032,12 @@ void func_80038C6C(Player *player, UNUSED Camera *camera, s8 arg2, s8 arg3) {
|
||||
sp98 = player->unk_110.unk3C[0];
|
||||
if (sp98 < 0) {
|
||||
func_8003F734(player, sp7C, sp88, &sp98, &spEC, &spE8, &spE4);
|
||||
func_8002C954(player, arg3, sp88);
|
||||
func_8002C954(player, playerId, sp88);
|
||||
}
|
||||
sp98 = player->unk_110.unk3C[1];
|
||||
if (sp98 < 0) {
|
||||
func_8003FBAC(player, sp7C, sp88, &sp98, &spEC, &spE8, &spE4);
|
||||
func_8002C954(player, arg3, sp88);
|
||||
func_8002C954(player, playerId, sp88);
|
||||
}
|
||||
sp98 = player->unk_110.unk3C[0];
|
||||
if (sp98 >= 0) {
|
||||
@@ -5048,7 +5048,7 @@ void func_80038C6C(Player *player, UNUSED Camera *camera, s8 arg2, s8 arg3) {
|
||||
}
|
||||
player->unk_074 = func_802ABE30(spEC, spE8, spE4, player->unk_110.unk3A);
|
||||
func_80029B4C(player, spEC, spE8, spE4);
|
||||
func_8002AE38(player, arg3, posX, posZ, spEC, spE4);
|
||||
func_8002AE38(player, playerId, posX, posZ, spEC, spE4);
|
||||
sqrt = (sp88[0] * sp88[0]) + (sp88[2] * sp88[2]);
|
||||
player->unk_22C = player->unk_094;
|
||||
player->unk_094 = sqrtf(sqrt);
|
||||
@@ -5064,9 +5064,9 @@ void func_80038C6C(Player *player, UNUSED Camera *camera, s8 arg2, s8 arg3) {
|
||||
player->velocity[1] = sp88[1];
|
||||
player->velocity[2] = sp88[2];
|
||||
|
||||
D_80165070[arg3][0] = sp88[0];
|
||||
D_80165070[arg3][1] = sp88[1];
|
||||
D_80165070[arg3][2] = sp88[2];
|
||||
D_80165070[playerId][0] = sp88[0];
|
||||
D_80165070[playerId][1] = sp88[1];
|
||||
D_80165070[playerId][2] = sp88[2];
|
||||
|
||||
if ((player->type & PLAYER_HUMAN) == PLAYER_HUMAN) {
|
||||
if (gKartTopSpeedTable[player->characterId] < player->unk_094) {
|
||||
@@ -5088,5 +5088,5 @@ void func_80038C6C(Player *player, UNUSED Camera *camera, s8 arg2, s8 arg3) {
|
||||
if (player->unk_110.unk3C[2] >= 500.0f) {
|
||||
player->unk_078 /= 2;
|
||||
}
|
||||
func_8002C4F8(player, arg3);
|
||||
func_8002C4F8(player, playerId);
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ void func_8002AE30(void);
|
||||
void func_8002AE38(Player*, s8, f32, f32, f32, f32);
|
||||
|
||||
void func_8002B218(Player*);
|
||||
void func_8002B308(Player*, s8, s8);
|
||||
void apply_sound_effect(Player*, s8, s8);
|
||||
void func_8002B5C0(Player*, s8, s8);
|
||||
void func_8002B830(Player*, s8, s8);
|
||||
void func_8002B8A4(Player*, Player*);
|
||||
@@ -58,7 +58,7 @@ void func_8002C17C(Player*, s8);
|
||||
void func_8002C4F8(Player*, s8);
|
||||
void func_8002C7E4(Player*, s8, s8);
|
||||
void func_8002C954(Player*, s8, Vec3f);
|
||||
void func_8002CD48(Player*, s8, s8);
|
||||
void apply_effect(Player*, s8, s8);
|
||||
|
||||
void func_8002D028(Player*, s8);
|
||||
void func_8002D268(Player*, Camera*, s8, s8);
|
||||
|
||||
+32
-32
@@ -18,7 +18,7 @@
|
||||
#include "macros.h"
|
||||
#include "code_80005FD0.h"
|
||||
#include "code_80071F00.h"
|
||||
#include "code_8008C1D0.h"
|
||||
#include "effects.h"
|
||||
#include "collision.h"
|
||||
#include "audio/external.h"
|
||||
#include "common_textures.h"
|
||||
@@ -507,7 +507,7 @@ void update_actor_kiwano_fruit(struct KiwanoFruit *fruit) {
|
||||
}
|
||||
switch (fruit->state) { /* irregular */
|
||||
case 0:
|
||||
if ((get_surface_type(player->unk_110.unk3A) & 0xFF) != 8) {
|
||||
if ((get_surface_type(player->unk_110.unk3A) & 0xFF) != GRASS) {
|
||||
return;
|
||||
}
|
||||
fruit->state = 1;
|
||||
@@ -531,7 +531,7 @@ void update_actor_kiwano_fruit(struct KiwanoFruit *fruit) {
|
||||
fruit->velocity[0] = 0.0f;
|
||||
fruit->velocity[1] = 2.3f;
|
||||
fruit->velocity[2] = 0.0f;
|
||||
if ((player->effects & 0x200) != 0) {
|
||||
if ((player->effects & STAR_EFFECT) != 0) {
|
||||
func_800C9060(player - gPlayerOne, 0x1900A052U);
|
||||
} else {
|
||||
player->effects |= 0x8000;
|
||||
@@ -810,7 +810,7 @@ void func_80298AC0(Player *player) {
|
||||
sp64[1] = data->pos[1];
|
||||
sp64[2] = data->pos[2];
|
||||
if (func_8029EEB8(player, sp64, 5.0f, 40.0f, 0.8f) == 1) {
|
||||
if ((player->effects & 0x200) != 0) {
|
||||
if ((player->effects & STAR_EFFECT) != 0) {
|
||||
func_800C98B8(player->pos, player->velocity, 0x19018010);
|
||||
func_800C90F4((u8) (player - gPlayerOne), (player->characterId * 0x10) + 0x2900800D);
|
||||
data->someId |= 0x400;
|
||||
@@ -2629,7 +2629,7 @@ s32 func_8029EEB8(Player *player, Vec3f pos, f32 arg2, f32 arg3, f32 arg4) {
|
||||
sp28 = temp_f0_3 - arg2;
|
||||
temp_f16 = player->velocity[0];
|
||||
temp_f18 = player->velocity[2];
|
||||
if (player->effects & 0x200) {
|
||||
if (player->effects & STAR_EFFECT) {
|
||||
return 1;
|
||||
}
|
||||
if (temp_f0_3 < 0.1f) {
|
||||
@@ -2667,7 +2667,7 @@ s32 func_8029EEB8(Player *player, Vec3f pos, f32 arg2, f32 arg3, f32 arg4) {
|
||||
s32 func_8029F1F8(Player *player, struct Actor *marioRacewaySign) {
|
||||
if (func_8029EEB8(player, marioRacewaySign->pos, 7.0f, 200.0f, 0.8f) == 1) {
|
||||
if ((player->type & PLAYER_HUMAN) != 0) {
|
||||
if ((player->effects & 0x200) != 0) {
|
||||
if ((player->effects & STAR_EFFECT) != 0) {
|
||||
marioRacewaySign->flags |= 0x400;
|
||||
func_800C98B8(player->pos, player->velocity, 0x19018010U);
|
||||
func_800C90F4(player - gPlayerOne, (player->characterId * 0x10) + 0x2900800D);
|
||||
@@ -2683,7 +2683,7 @@ s32 func_8029F1F8(Player *player, struct Actor *marioRacewaySign) {
|
||||
s32 func_8029F2FC(Player *player, struct PiranhaPlant *plant) {
|
||||
if (func_8029EEB8(player, plant->pos, plant->boundingBoxSize, plant->boundingBoxSize, 2.5f) == 1) {
|
||||
if ((player->type & PLAYER_HUMAN) != 0) {
|
||||
if ((player->effects & 0x200) != 0) {
|
||||
if ((player->effects & STAR_EFFECT) != 0) {
|
||||
plant->flags |= 0x400;
|
||||
func_800C98B8(player->pos, player->velocity, 0x1901A24AU);
|
||||
func_800C90F4(player - gPlayerOne, (player->characterId * 0x10) + 0x2900800D);
|
||||
@@ -2734,7 +2734,7 @@ s32 func_8029F408(Player *player, struct YoshiValleyEgg *egg) {
|
||||
return 0;
|
||||
}
|
||||
if ((player->type & PLAYER_HUMAN) != 0) {
|
||||
if ((player->effects & 0x200) != 0) {
|
||||
if ((player->effects & STAR_EFFECT) != 0) {
|
||||
egg->flags |= 0x400;
|
||||
egg->pathCenter[1] = 8.0f;
|
||||
func_800C98B8(player->pos, player->velocity, 0x19018010);
|
||||
@@ -2799,7 +2799,7 @@ s32 func_8029F69C(Player *player, struct Actor *actor) {
|
||||
sp48 = player->velocity[0];
|
||||
sp44 = player->velocity[2];
|
||||
if (player->type & PLAYER_HUMAN) {
|
||||
if (player->effects & 0x200) {
|
||||
if (player->effects & STAR_EFFECT) {
|
||||
actor->flags |= 0x400;
|
||||
func_800C98B8(player->pos, player->velocity, 0x19018010U);
|
||||
func_800C90F4(player - gPlayerOne, (player->characterId * 0x10) + 0x2900800D);
|
||||
@@ -2809,7 +2809,7 @@ s32 func_8029F69C(Player *player, struct Actor *actor) {
|
||||
func_800C9060(player - gPlayerOne, 0x19007018U);
|
||||
}
|
||||
}
|
||||
if (!(player->effects & 0x200)) {
|
||||
if (!(player->effects & STAR_EFFECT)) {
|
||||
player->effects |= 0x8000;
|
||||
}
|
||||
sp20[0] = actor->pos[0];
|
||||
@@ -2941,7 +2941,7 @@ void func_8029FDC8(struct Actor *actor) {
|
||||
break;
|
||||
case HELD_BANANA:
|
||||
player = &gPlayers[banana->playerId];
|
||||
player->statusEffects &= ~0x00040000;
|
||||
player->soundEffects &= ~0x00040000;
|
||||
/* fallthrough */
|
||||
case BANANA_ON_GROUND:
|
||||
banana->flags = -0x8000;
|
||||
@@ -3036,7 +3036,7 @@ void func_8029FDC8(struct Actor *actor) {
|
||||
fakeItemBox = (struct FakeItemBox *)actor;
|
||||
player = &gPlayers[(s16)fakeItemBox->playerId];
|
||||
if (fakeItemBox->state == HELD_FAKE_ITEM_BOX) {
|
||||
player->statusEffects &= ~0x00040000;
|
||||
player->soundEffects &= ~0x00040000;
|
||||
}
|
||||
fakeItemBox->state = DESTROYED_FAKE_ITEM_BOX;
|
||||
fakeItemBox->flags = -0x8000;
|
||||
@@ -3151,16 +3151,16 @@ void func_802A0450(Player *player, struct Actor *actor) {
|
||||
temp_lo = player - gPlayerOne;
|
||||
switch (actor->type) {
|
||||
case ACTOR_YOSHI_VALLEY_EGG:
|
||||
if (!(player->effects & 0x80000000) && !(player->type & PLAYER_INVISIBLE_OR_BOMB)) {
|
||||
if (!(player->effects & BOO_EFFECT) && !(player->type & PLAYER_INVISIBLE_OR_BOMB)) {
|
||||
func_8029F408(player, (struct YoshiValleyEgg *) actor);
|
||||
}
|
||||
break;
|
||||
case ACTOR_BANANA:
|
||||
if (player->effects & 0x800008C0) { break; }
|
||||
if (player->statusEffects & 1) { break; }
|
||||
if (player->soundEffects & 1) { break; }
|
||||
temp_v1 = actor->rot[0];
|
||||
if (((temp_lo == temp_v1) && (actor->flags & 0x1000)) || (func_8029FB80(player, actor) != 1)) { break; }
|
||||
player->statusEffects |= 1;
|
||||
player->soundEffects |= 1;
|
||||
owner = &gPlayers[temp_v1];
|
||||
if (owner->type & 0x4000) {
|
||||
if (actor->flags & 0xF) {
|
||||
@@ -3179,10 +3179,10 @@ void func_802A0450(Player *player, struct Actor *actor) {
|
||||
break;
|
||||
case ACTOR_GREEN_SHELL:
|
||||
if (player->effects & 0x80000400) { break; }
|
||||
if (player->statusEffects & 4) { break; }
|
||||
if (player->soundEffects & 4) { break; }
|
||||
temp_v1 = actor->rot[2];
|
||||
if (((temp_lo == temp_v1) && (actor->flags & 0x1000)) || (func_8029FB80(player, actor) != 1)) { break; }
|
||||
player->statusEffects |= 4;
|
||||
player->soundEffects |= 4;
|
||||
func_800C98B8(player->pos, player->velocity, 0x19018010U);
|
||||
owner = &gPlayers[temp_v1];
|
||||
if ((owner->type & 0x4000) && (temp_lo != temp_v1)) {
|
||||
@@ -3191,11 +3191,11 @@ void func_802A0450(Player *player, struct Actor *actor) {
|
||||
func_8029FDC8(actor);
|
||||
break;
|
||||
case ACTOR_BLUE_SPINY_SHELL:
|
||||
if (player->statusEffects & 2) { break; }
|
||||
if (player->soundEffects & 2) { break; }
|
||||
temp_v1 = actor->rot[2];
|
||||
if (((temp_lo == temp_v1) && (actor->flags & 0x1000)) || (func_8029FB80(player, actor) != 1)) { break; }
|
||||
if (!(player->effects & 0x80000000)) {
|
||||
player->statusEffects |= 2;
|
||||
if (!(player->effects & BOO_EFFECT)) {
|
||||
player->soundEffects |= 2;
|
||||
func_800C98B8(player->pos, player->velocity, 0x19018010U);
|
||||
}
|
||||
owner = &gPlayers[temp_v1];
|
||||
@@ -3209,11 +3209,11 @@ void func_802A0450(Player *player, struct Actor *actor) {
|
||||
case ACTOR_RED_SHELL:
|
||||
temp_v1 = actor->rot[2];
|
||||
if (player->effects & 0x01000000) { break; }
|
||||
if (player->statusEffects & 2) { break; }
|
||||
if (player->soundEffects & 2) { break; }
|
||||
temp_v1 = actor->rot[2];
|
||||
if (((temp_lo == temp_v1) && (actor->flags & 0x1000)) || (func_8029FB80(player, actor) != 1)) { break; }
|
||||
if (!(player->effects & 0x80000000)) {
|
||||
player->statusEffects |= 2;
|
||||
if (!(player->effects & BOO_EFFECT)) {
|
||||
player->soundEffects |= 2;
|
||||
func_800C98B8(player->pos, player->velocity, 0x19018010U);
|
||||
}
|
||||
owner = &gPlayers[temp_v1];
|
||||
@@ -3223,12 +3223,12 @@ void func_802A0450(Player *player, struct Actor *actor) {
|
||||
func_8029FDC8(actor);
|
||||
break;
|
||||
case ACTOR_PIRANHA_PLANT:
|
||||
if (!(player->effects & 0x80000000)) {
|
||||
if (!(player->effects & BOO_EFFECT)) {
|
||||
func_8029F2FC(player, (struct PiranhaPlant *) actor);
|
||||
}
|
||||
break;
|
||||
case ACTOR_MARIO_RACEWAY_SIGN:
|
||||
if (!(player->effects & 0x80000000)) {
|
||||
if (!(player->effects & BOO_EFFECT)) {
|
||||
func_8029F1F8(player, actor);
|
||||
}
|
||||
break;
|
||||
@@ -3244,18 +3244,18 @@ void func_802A0450(Player *player, struct Actor *actor) {
|
||||
case 31:
|
||||
case 32:
|
||||
case 33:
|
||||
if (!(player->effects & 0x80000000)) {
|
||||
if (!(player->effects & BOO_EFFECT)) {
|
||||
func_8029F69C(player, actor);
|
||||
}
|
||||
break;
|
||||
case ACTOR_FALLING_ROCK:
|
||||
if (!(player->effects & 0x80000000) && !(player->type & PLAYER_INVISIBLE_OR_BOMB)) {
|
||||
if (!(player->effects & BOO_EFFECT) && !(player->type & PLAYER_INVISIBLE_OR_BOMB)) {
|
||||
if (func_8029FB80(player, actor) == 1) {
|
||||
func_800C98B8(actor->pos, actor->velocity, SOUND_ACTION_EXPLOSION);
|
||||
if ((gModeSelection == TIME_TRIALS) && !(player->type & PLAYER_CPU)) {
|
||||
D_80162DF8 = 1;
|
||||
}
|
||||
if (player->effects & 0x200) {
|
||||
if (player->effects & STAR_EFFECT) {
|
||||
actor->velocity[1] = 10.0f;
|
||||
} else {
|
||||
func_8008DABC(player, player - gPlayerOne);
|
||||
@@ -3265,10 +3265,10 @@ void func_802A0450(Player *player, struct Actor *actor) {
|
||||
break;
|
||||
case ACTOR_FAKE_ITEM_BOX:
|
||||
temp_v1 = actor->velocity[0];
|
||||
if (player->effects & 0x80000000) { break; }
|
||||
if (player->effects & BOO_EFFECT) { break; }
|
||||
temp_v1 = actor->velocity[0];
|
||||
if (((temp_lo == temp_v1) && (actor->flags & 0x1000)) || (func_8029FB80(player, actor) != 1)) { break; }
|
||||
player->statusEffects |= REVERSE_EFFECT;
|
||||
player->soundEffects |= REVERSE_SOUND_EFFECT;
|
||||
owner = &gPlayers[temp_v1];
|
||||
if (owner->type & 0x4000) {
|
||||
if (actor->flags & 0xF) {
|
||||
@@ -3283,7 +3283,7 @@ void func_802A0450(Player *player, struct Actor *actor) {
|
||||
}
|
||||
}
|
||||
if (actor->state == 0) {
|
||||
owner->statusEffects &= ~0x00040000;
|
||||
owner->soundEffects &= ~0x00040000;
|
||||
}
|
||||
}
|
||||
actor->state = 2;
|
||||
@@ -3451,7 +3451,7 @@ void update_actor_fake_item_box(struct FakeItemBox *fake_item_box) {
|
||||
if ((temp_v1_3->buttonDepressed & Z_TRIG) != 0) {
|
||||
temp_v1_3->buttonDepressed &= 0xDFFF;
|
||||
func_802A1064(fake_item_box);
|
||||
temp_v0_4->statusEffects &= 0xFFFBFFFF;
|
||||
temp_v0_4->soundEffects &= 0xFFFBFFFF;
|
||||
func_800C9060((u8)(temp_v0_4 - gPlayerOne), 0x19008012);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "actors_extended.h"
|
||||
#include "audio/external.h"
|
||||
#include "code_80071F00.h"
|
||||
#include "code_8008C1D0.h"
|
||||
#include "effects.h"
|
||||
|
||||
void copy_collision(Collision *arg0, Collision *arg1) {
|
||||
arg1->unk30 = arg0->unk30;
|
||||
@@ -292,7 +292,7 @@ void update_actor_banana_bunch(struct BananaBunchParent *banana_bunch) {
|
||||
}
|
||||
if (someCount == 0) {
|
||||
destroy_actor((struct Actor *) banana_bunch);
|
||||
owner->statusEffects &= ~HOLD_BANANA_EFFECT;
|
||||
owner->soundEffects &= ~HOLD_BANANA_SOUND_EFFECT;
|
||||
} else if ((owner->type & 0x4000) != 0) {
|
||||
controller = &gControllers[banana_bunch->playerId];
|
||||
if ((controller->buttonPressed & Z_TRIG) != 0) {
|
||||
@@ -520,7 +520,7 @@ s32 use_banana_bunch_item(Player *player) {
|
||||
bananaBunch = (struct BananaBunchParent *) &gActorList[actorIndex];
|
||||
bananaBunch->state = 0;
|
||||
bananaBunch->playerId = player - gPlayerOne;
|
||||
player->statusEffects |= HOLD_BANANA_EFFECT;
|
||||
player->soundEffects |= HOLD_BANANA_SOUND_EFFECT;
|
||||
return actorIndex;
|
||||
}
|
||||
|
||||
@@ -726,7 +726,7 @@ void update_actor_banana(struct BananaActor *banana) {
|
||||
controller->buttonDepressed &= ~Z_TRIG;
|
||||
banana->state = 1;
|
||||
banana->unk_04 = 0x00B4;
|
||||
player->statusEffects &= ~HOLD_BANANA_EFFECT;
|
||||
player->soundEffects &= ~HOLD_BANANA_SOUND_EFFECT;
|
||||
func_800C9060(player - gPlayerOne, 0x19008012U);
|
||||
pad3 = controller->rawStickY;
|
||||
if ((pad3 > 30.0f) && (controller->rawStickX < 10) && (controller->rawStickX >= -9)) {
|
||||
@@ -969,7 +969,7 @@ s32 use_fake_itembox_item(Player *player) {
|
||||
itemBox = (struct FakeItemBox*)&gActorList[actorIndex];
|
||||
itemBox->playerId = (player - gPlayerOne);
|
||||
itemBox->state = HELD_FAKE_ITEM_BOX;
|
||||
player->statusEffects |= HOLD_BANANA_EFFECT;
|
||||
player->soundEffects |= HOLD_BANANA_SOUND_EFFECT;
|
||||
return actorIndex;
|
||||
}
|
||||
|
||||
@@ -1016,7 +1016,7 @@ s32 use_banana_item(Player *player) {
|
||||
banana->playerId = playerId;
|
||||
banana->state = HELD_BANANA;
|
||||
banana->unk_04 = 0x0014;
|
||||
player->statusEffects |= HOLD_BANANA_EFFECT;
|
||||
player->soundEffects |= HOLD_BANANA_SOUND_EFFECT;
|
||||
return actorIndex;
|
||||
}
|
||||
|
||||
@@ -1038,7 +1038,7 @@ void use_thunder_item(Player *player) {
|
||||
for (index = 0; index < NUM_PLAYERS; index++) {
|
||||
otherPlayer = &gPlayers[index];
|
||||
if (player != otherPlayer) {
|
||||
otherPlayer->statusEffects |= HIT_ROTATING_EFFECT;
|
||||
otherPlayer->soundEffects |= HIT_ROTATING_SOUND_EFFECT;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1064,22 +1064,22 @@ void player_use_item(Player *player) {
|
||||
use_banana_bunch_item(player);
|
||||
break;
|
||||
case ITEM_MUSHROOM:
|
||||
player->statusEffects |= BOOST_EFFECT;
|
||||
player->soundEffects |= BOOST_SOUND_EFFECT;
|
||||
break;
|
||||
case ITEM_DOUBLE_MUSHROOM:
|
||||
player->statusEffects |= BOOST_EFFECT;
|
||||
player->soundEffects |= BOOST_SOUND_EFFECT;
|
||||
break;
|
||||
case ITEM_TRIPLE_MUSHROOM:
|
||||
player->statusEffects |= BOOST_EFFECT;
|
||||
player->soundEffects |= BOOST_SOUND_EFFECT;
|
||||
break;
|
||||
case ITEM_SUPER_MUSHROOM:
|
||||
player->statusEffects |= BOOST_EFFECT;
|
||||
player->soundEffects |= BOOST_SOUND_EFFECT;
|
||||
break;
|
||||
case ITEM_BOO:
|
||||
player->statusEffects |= BOO_EFFECT;
|
||||
player->soundEffects |= BOO_SOUND_EFFECT;
|
||||
break;
|
||||
case ITEM_STAR:
|
||||
player->statusEffects |= STAR_EFFECT;
|
||||
player->soundEffects |= STAR_SOUND_EFFECT;
|
||||
break;
|
||||
case ITEM_THUNDERBOLT:
|
||||
use_thunder_item(player);
|
||||
@@ -1446,7 +1446,7 @@ void func_802B3E7C(struct ShellActor *shell, Player *player) {
|
||||
shell->velocity[1] = -2.0f;
|
||||
shell->velocity[2] = z_velocity;
|
||||
|
||||
if (player->effects & 0x80000000) {
|
||||
if (player->effects & BOO_EFFECT) {
|
||||
func_8029FDC8((struct Actor *) shell);
|
||||
} else {
|
||||
func_802AD950(&shell->unk30, 4.0f, shell->pos[0], shell->pos[1], shell->pos[2], newPosition[0], newPosition[1], newPosition[2]);
|
||||
|
||||
@@ -76,14 +76,14 @@ f32 func_802AAB4C(Player *player) {
|
||||
}
|
||||
return 0.8f;
|
||||
case COURSE_SHERBET_LAND:
|
||||
if ((get_surface_type(player->unk_110.unk3A) & 0xFF) == 5) {
|
||||
if ((get_surface_type(player->unk_110.unk3A) & 0xFF) == SNOW) {
|
||||
return (f32) (D_8015F6EE - 0xA);
|
||||
}
|
||||
return D_8015F8E4;
|
||||
case COURSE_DK_JUNGLE:
|
||||
temp_v1 = func_802ABD40(player->unk_110.unk3A) & 0xFF;
|
||||
if (temp_v1 == 0xFF) {
|
||||
if ((get_surface_type(player->unk_110.unk3A) & 0xFF) == 0xF) {
|
||||
if ((get_surface_type(player->unk_110.unk3A) & 0xFF) == CAVE) {
|
||||
return -475.0f;
|
||||
}
|
||||
if (playerX > -478.0f) {
|
||||
@@ -2007,7 +2007,7 @@ void func_802AF314(void) {
|
||||
* Recursive search for vtx and set surfaceTypes to -1 and sectionId's to 0xFF
|
||||
*/
|
||||
void set_vertex_data_with_defaults(Gfx *gfx) {
|
||||
find_and_set_vertex_data(gfx, -1, 0xFF);
|
||||
find_and_set_vertex_data(gfx, SURFACE_DEFAULT, 0xFF);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+30
-30
@@ -411,8 +411,8 @@ u32 MIO0_0F(u8 *arg0, u32 arg1, u32 arg2) {
|
||||
return oldHeapEndPtr;
|
||||
}
|
||||
|
||||
void func_802A86A8(mk64_Vtx *data, u32 arg1) {
|
||||
mk64_Vtx_n *vtx_n = (mk64_Vtx_n *) data;
|
||||
void func_802A86A8(CourseVtx *data, u32 arg1) {
|
||||
CourseVtx *courseVtx = data;
|
||||
Vtx *vtx;
|
||||
s32 tmp = ALIGN16(arg1 * 0x10);
|
||||
#ifdef AVOID_UB
|
||||
@@ -427,35 +427,35 @@ void func_802A86A8(mk64_Vtx *data, u32 arg1) {
|
||||
gHeapEndPtr -= tmp;
|
||||
vtx = (Vtx *) gHeapEndPtr;
|
||||
|
||||
// s32 to u32 comparison required for matching.
|
||||
for (i = 0; i < arg1; i++) {
|
||||
if (gIsMirrorMode) {
|
||||
vtx->n.ob[0] = -vtx_n->ob[0];
|
||||
} else {
|
||||
vtx->n.ob[0] = vtx_n->ob[0];
|
||||
}
|
||||
|
||||
vtx->n.ob[1] = (vtx_n->ob[1] * vtxStretchY);
|
||||
temp_a0 = vtx_n->n[0];
|
||||
temp_a3 = vtx_n->n[1];
|
||||
|
||||
flags = temp_a0 & 3;
|
||||
flags |= (temp_a3 * 4) & 0xC;
|
||||
|
||||
vtx->n.ob[2] = vtx_n->ob[2];
|
||||
vtx->n.tc[0] = vtx_n->tc[0];
|
||||
vtx->n.tc[1] = vtx_n->tc[1];
|
||||
vtx->n.n[0] = (temp_a0 & 0xFC);
|
||||
vtx->n.n[1] = (temp_a3 & 0xFC);
|
||||
vtx->n.n[2] = vtx_n->n[2];
|
||||
vtx->n.flag = flags;
|
||||
vtx->n.a = 0xFF;
|
||||
vtx++;
|
||||
vtx_n++;
|
||||
// s32 to u32 comparison required for matching.
|
||||
for (i = 0; i < arg1; i++) {
|
||||
if (gIsMirrorMode) {
|
||||
vtx->v.ob[0] = -courseVtx->ob[0];
|
||||
} else {
|
||||
vtx->v.ob[0] = courseVtx->ob[0];
|
||||
}
|
||||
|
||||
vtx->v.ob[1] = (courseVtx->ob[1] * vtxStretchY);
|
||||
temp_a0 = courseVtx->ca[0];
|
||||
temp_a3 = courseVtx->ca[1];
|
||||
|
||||
flags = temp_a0 & 3;
|
||||
flags |= (temp_a3 << 2) & 0xC;
|
||||
|
||||
vtx->v.ob[2] = courseVtx->ob[2];
|
||||
vtx->v.tc[0] = courseVtx->tc[0];
|
||||
vtx->v.tc[1] = courseVtx->tc[1];
|
||||
vtx->v.cn[0] = (temp_a0 & 0xFC);
|
||||
vtx->v.cn[1] = (temp_a3 & 0xFC);
|
||||
vtx->v.cn[2] = courseVtx->ca[2];
|
||||
vtx->v.flag = flags;
|
||||
vtx->v.cn[3] = 0xFF;
|
||||
vtx++;
|
||||
courseVtx++;
|
||||
}
|
||||
}
|
||||
|
||||
void decompress_vtx(mk64_Vtx *arg0, u32 vertexCount) {
|
||||
void decompress_vtx(CourseVtx *arg0, u32 vertexCount) {
|
||||
s32 size = ALIGN16(vertexCount * 0x18);
|
||||
u32 segment = SEGMENT_NUMBER2(arg0);
|
||||
u32 offset = SEGMENT_OFFSET(arg0);
|
||||
@@ -467,7 +467,7 @@ void decompress_vtx(mk64_Vtx *arg0, u32 vertexCount) {
|
||||
gNextFreeMemoryAddress += size;
|
||||
|
||||
mio0decode(vtxCompressed, (u8 *) freeSpace);
|
||||
func_802A86A8((mk64_Vtx *) freeSpace, vertexCount);
|
||||
func_802A86A8((CourseVtx *) freeSpace, vertexCount);
|
||||
set_segment_base_addr(4, (void *) gHeapEndPtr);
|
||||
}
|
||||
|
||||
@@ -1330,7 +1330,7 @@ u8 *load_course(s32 courseId) {
|
||||
u8 *vertexRomEnd;
|
||||
UNUSED s32 pad2[2];
|
||||
u32 *textures;
|
||||
mk64_Vtx *vertexStart; // mio0 compressed
|
||||
CourseVtx *vertexStart; // mio0 compressed
|
||||
u8 *packedStart;
|
||||
u32 vertexCount;
|
||||
uintptr_t finalDisplaylistOffset;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include "race_logic.h"
|
||||
#include "skybox_and_splitscreen.h"
|
||||
#include "math_util_2.h"
|
||||
#include "code_8008C1D0.h"
|
||||
#include "effects.h"
|
||||
#include "math.h"
|
||||
#include "menus.h"
|
||||
|
||||
@@ -572,7 +572,7 @@ void func_8028EF28(void) {
|
||||
}
|
||||
D_800DC510 = 5;
|
||||
i = gPlayerPositionLUT[1];
|
||||
gPlayers[i].statusEffects |= 0x200000;
|
||||
gPlayers[i].soundEffects |= 0x200000;
|
||||
gPlayers[i].type |= PLAYER_CPU;
|
||||
func_800CA118((u8)i);
|
||||
break;
|
||||
@@ -590,7 +590,7 @@ void func_8028EF28(void) {
|
||||
if (*(gNmiUnknown2 + i * 3 + 2) > 99) {
|
||||
*(gNmiUnknown2 + i * 3 + 2) = 99;
|
||||
}
|
||||
gPlayers[i].statusEffects |= 0x200000;
|
||||
gPlayers[i].soundEffects |= 0x200000;
|
||||
gPlayers[i].type |= PLAYER_CPU;
|
||||
func_800CA118((u8)i);
|
||||
}
|
||||
@@ -605,7 +605,7 @@ void func_8028EF28(void) {
|
||||
if (currentPosition == 2) {
|
||||
D_800DC510 = 5;
|
||||
i = gPlayerPositionLUT[3];
|
||||
gPlayers[i].statusEffects |= 0x200000;
|
||||
gPlayers[i].soundEffects |= 0x200000;
|
||||
gPlayers[i].type |= PLAYER_CPU;
|
||||
func_800CA118((u8)i);
|
||||
}
|
||||
@@ -1146,22 +1146,22 @@ void func_802903D8(Player *playerOne, Player *playerTwo) {
|
||||
func_800C9060((playerTwo - gPlayerOne), 0x19008001U);
|
||||
return;
|
||||
} else {
|
||||
playerTwo->statusEffects |= REVERSE_EFFECT;
|
||||
playerTwo->soundEffects |= REVERSE_SOUND_EFFECT;
|
||||
func_8008FC1C(playerOne);
|
||||
func_800C9060((playerTwo - gPlayerOne), 0x19008001U);
|
||||
}
|
||||
} else if (playerTwo->type & PLAYER_UNKNOWN_0x40) {
|
||||
playerOne->statusEffects |= REVERSE_EFFECT;
|
||||
playerOne->soundEffects |= REVERSE_SOUND_EFFECT;
|
||||
func_8008FC1C(playerTwo);
|
||||
func_800C9060(playerOne - gPlayerOne, 0x19008001U);
|
||||
return;
|
||||
}
|
||||
if (playerOne->effects & 0x200) {
|
||||
if (!(playerTwo->effects & 0x200)) {
|
||||
playerTwo->statusEffects |= HIT_BY_ITEM_EFFECT;
|
||||
playerTwo->soundEffects |= HIT_BY_ITEM_SOUND_EFFECT;
|
||||
}
|
||||
} else if (playerTwo->effects & 0x200) {
|
||||
playerOne->statusEffects |= HIT_BY_ITEM_EFFECT;
|
||||
playerOne->soundEffects |= HIT_BY_ITEM_SOUND_EFFECT;
|
||||
} else {
|
||||
playerOne->effects |= 0x8000;
|
||||
playerTwo->effects |= 0x8000;
|
||||
|
||||
+8
-8
@@ -12,7 +12,7 @@
|
||||
#include "objects.h"
|
||||
#include "render_player.h"
|
||||
#include "code_80057C60.h"
|
||||
#include "code_8008C1D0.h"
|
||||
#include "effects.h"
|
||||
#include "framebuffers.h"
|
||||
#include "waypoints.h"
|
||||
#include "player_controller.h"
|
||||
@@ -1159,7 +1159,7 @@ void func_800235AC(Player *player, s8 arg1) {
|
||||
}
|
||||
return;
|
||||
}
|
||||
if ((player->effects & 0x200) != 0) {
|
||||
if ((player->effects & STAR_EFFECT) != 0) {
|
||||
temp = (s32)gCourseTimer - D_8018D930[arg1];
|
||||
if (temp <= 8) {
|
||||
|
||||
@@ -1242,7 +1242,7 @@ void render_player_shadow(Player *player, s8 arg1, s8 arg2) {
|
||||
|| ((player->effects & 0x800000) == 0x800000)
|
||||
|| ((player->effects & 0x400) == 0x400)
|
||||
|| ((player->unk_0CA & 2) == 2)
|
||||
|| ((player->effects & 0x02000000) == 0x02000000)
|
||||
|| ((player->effects & HIT_BY_ITEM_EFFECT) == HIT_BY_ITEM_EFFECT)
|
||||
|| ((player->effects & 0x10000) == 0x10000)
|
||||
|| ((player->effects & 8) == 8)) {
|
||||
|
||||
@@ -1402,7 +1402,7 @@ void kart_render(Player *player, s8 playerId, s8 arg2, s8 arg3) {
|
||||
mtxf_scale2(sp1A4, gCharacterSize[player->characterId] * player->size);
|
||||
convert_to_fixed_point_matrix(&gGfxPool->mtxKart[playerId + (arg2 * 8)], sp1A4);
|
||||
|
||||
if ((player->effects & 0x80000000) == 0x80000000) {
|
||||
if ((player->effects & BOO_EFFECT) == BOO_EFFECT) {
|
||||
if (arg2 == playerId) {
|
||||
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);
|
||||
@@ -1434,7 +1434,7 @@ void kart_render(Player *player, s8 playerId, s8 arg2, s8 arg3) {
|
||||
);
|
||||
gDPSetRenderMode(gDisplayListHead++, AA_EN | Z_CMP | Z_UPD | IM_RD | CVG_DST_WRAP | ZMODE_XLU | CVG_X_ALPHA | FORCE_BL | GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA), 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->statusEffects & 0x08000000) || (player->statusEffects & 0x04000000)) {
|
||||
} else if (((player->unk_0CA & 4) == 4) || (player->soundEffects & 0x08000000) || (player->soundEffects & 0x04000000)) {
|
||||
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);
|
||||
gDPLoadTLUT_pal256(gDisplayListHead++, gPlayerPalette);
|
||||
@@ -1646,8 +1646,8 @@ void player_render(Player *player, s8 playerId, s8 arg2) {
|
||||
}
|
||||
func_80023BF0(player, playerId, arg2, var_v1);
|
||||
temp_t1 = 8 << (arg2 * 4);
|
||||
if ((temp_t1 == (player->unk_002 & temp_t1)) && (player->unk_110.unk3C[2] <= 50.0f) && (player->unk_0F8 != 9)) {
|
||||
if ((player->effects & 0x80000000) == 0x80000000) {
|
||||
if ((temp_t1 == (player->unk_002 & temp_t1)) && (player->unk_110.unk3C[2] <= 50.0f) && (player->surfaceType != ICE)) {
|
||||
if ((player->effects & BOO_EFFECT) == BOO_EFFECT) {
|
||||
if (playerId == arg2) {
|
||||
render_player_shadow(player, playerId, arg2);
|
||||
}
|
||||
@@ -1661,7 +1661,7 @@ void player_render(Player *player, s8 playerId, s8 arg2) {
|
||||
ghost_render(player, playerId, arg2, var_v1);
|
||||
}
|
||||
osRecvMesg(&gDmaMesgQueue, &sp34, OS_MESG_BLOCK);
|
||||
if ((temp_t1 == (player->unk_002 & temp_t1)) && (player->unk_0F8 == 9) && ((player->unk_0CA & 1) != 1) && (player->unk_110.unk3C[2] <= 30.0f)) {
|
||||
if ((temp_t1 == (player->unk_002 & temp_t1)) && (player->surfaceType == ICE) && ((player->unk_0CA & 1) != 1) && (player->unk_110.unk3C[2] <= 30.0f)) {
|
||||
player_ice_reflection_render(player, playerId, arg2, var_v1);
|
||||
}
|
||||
if (player->boostPower >= 2.0f) {
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@
|
||||
#include "menus.h"
|
||||
#include "render_player.h"
|
||||
#include "code_80091750.h"
|
||||
#include "code_8008C1D0.h"
|
||||
#include "effects.h"
|
||||
|
||||
f32 D_80165210[8];
|
||||
f32 D_80165230[8];
|
||||
@@ -153,7 +153,7 @@ void spawn_player(Player *player, s8 playerIndex, f32 startingRow, f32 startingC
|
||||
player->unk_DAC = 0.0f;
|
||||
player->unk_044 = 0;
|
||||
player->unk_046 = 0;
|
||||
player->statusEffects = 0;
|
||||
player->soundEffects = 0;
|
||||
player->unk_0C6 = 0xFF;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user