diff --git a/include/common_structs.h b/include/common_structs.h index b4282b075..332634cf0 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -145,14 +145,14 @@ typedef struct { } Collision; typedef struct { - /* 0x00 */ Vec3f unk_000; + /* 0x00 */ Vec3f pos; /* 0x0C */ f32 unk_00C; /* 0x10 */ u16 unk_010; - /* 0x12 */ u16 unk_012; - /* 0x14 */ f32 unk_014; + /* 0x12 */ u16 type; + /* 0x14 */ f32 surfaceType; /* 0x18 */ f32 unk_018; /* 0x1C */ s16 unk_01C; - /* 0x1E */ s16 unk_01E; + /* 0x1E */ s16 timer; /* 0x20 */ s16 unk_020; /* 0x22 */ s16 unk_022; /* 0x24 */ f32 unk_024; @@ -380,6 +380,19 @@ typedef struct { /* 0x0DD4 */ // s16 unk_DD4; } Player; // size = 0xDD8 +enum POOL_1_PARTICLE_TYPES { + NO_PARTICLE, + DRIFT_PARTICLE, + GROUND_PARTCLE, + POOL_1_PARTICLE_TYPE_3, + POOL_1_PARTICLE_TYPE_4, + POOL_1_PARTICLE_TYPE_5, + POOL_1_PARTICLE_TYPE_6, + POOL_1_PARTICLE_TYPE_7, + POOL_1_PARTICLE_TYPE_8, + POOL_1_PARTICLE_TYPE_9 +}; + typedef struct { // Something related to time trial ghost data? /* 0x00 */ s32 unk_00; diff --git a/src/code_80057C60.c b/src/code_80057C60.c index f428d9641..d2d1de5a2 100644 --- a/src/code_80057C60.c +++ b/src/code_80057C60.c @@ -2789,42 +2789,42 @@ void reset_player_particle_pool(Player* player) { for (temp_v0 = 0; temp_v0 < 10; ++temp_v0) { player->playerPacticlePool0[temp_v0].unk_01C = 0; - player->playerPacticlePool0[temp_v0].unk_01E = 0; - player->playerPacticlePool0[temp_v0].unk_012 = 0; + player->playerPacticlePool0[temp_v0].timer = 0; + player->playerPacticlePool0[temp_v0].type = NO_PARTICLE; } for (temp_v0 = 0; temp_v0 < 10; ++temp_v0) { player->playerPacticlePool3[temp_v0].unk_01C = 0; - player->playerPacticlePool3[temp_v0].unk_01E = 0; - player->playerPacticlePool3[temp_v0].unk_012 = 0; + player->playerPacticlePool3[temp_v0].timer = 0; + player->playerPacticlePool3[temp_v0].type = NO_PARTICLE; } for (temp_v0 = 0; temp_v0 < 10; ++temp_v0) { player->playerPacticlePool1[temp_v0].unk_01C = 0; - player->playerPacticlePool1[temp_v0].unk_01E = 0; - player->playerPacticlePool1[temp_v0].unk_012 = 0; + player->playerPacticlePool1[temp_v0].timer = 0; + player->playerPacticlePool1[temp_v0].type = NO_PARTICLE; } for (temp_v0 = 0; temp_v0 < 10; ++temp_v0) { player->playerPacticlePool2[temp_v0].unk_01C = 0; - player->playerPacticlePool2[temp_v0].unk_01E = 0; - player->playerPacticlePool2[temp_v0].unk_012 = 0; + player->playerPacticlePool2[temp_v0].timer = 0; + player->playerPacticlePool2[temp_v0].type = NO_PARTICLE; } } -void func_8005D794(Player* player, UnkPlayerStruct258* arg1, f32 arg2, f32 arg3, f32 arg4, s8 surfaceType, s8 arg6) { - arg1->unk_000[2] = arg4; - arg1->unk_000[0] = arg2; - arg1->unk_000[1] = arg3; +void func_8005D794(Player* player, UnkPlayerStruct258* arg1, f32 x, f32 y, f32 z, s8 surfaceType, s8 arg6) { + arg1->pos[2] = z; + arg1->pos[0] = x; + arg1->pos[1] = y; arg1->unk_020 = -player->rotation[1]; - arg1->unk_014 = surfaceType; + arg1->surfaceType = surfaceType; arg1->unk_010 = arg6; } -s32 func_8005D7D8(UnkPlayerStruct258* arg0, s8 arg1, f32 arg2) { +s32 func_8005D7D8(UnkPlayerStruct258* arg0, s8 type, f32 arg2) { arg0->unk_01C = 1; - arg0->unk_012 = arg1; - arg0->unk_01E = 0; + arg0->type = type; + arg0->timer = 0; arg0->unk_00C = arg2; } @@ -2885,9 +2885,9 @@ void func_8005D898(Player* player, s16 arg1, UNUSED s32 arg2, UNUSED s8 arg3, UN void func_8005DA30(Player* player, s16 arg1, s32 arg2, s8 arg3, s8 arg4) { if ((arg1 == 0) && - ((player->playerPacticlePool1[arg2].unk_01E >= 3) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { + ((player->playerPacticlePool1[arg2].timer >= 3) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { func_8005D898(player, arg1, arg2, arg3, arg4); - } else if (player->playerPacticlePool1[arg2].unk_01E >= 3) { + } else if (player->playerPacticlePool1[arg2].timer >= 3) { func_8005D898(player, arg1, arg2, arg3, arg4); } } @@ -2905,36 +2905,35 @@ void func_8005DAF4(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 UNUSED s32 stackPadding; s32 surfaceType; s32 var_t3; - f32 var_f2; - f32 var_f12; - f32 var_f14; - s32 temp_v0; + f32 x; + f32 y; + f32 z; + s32 randval; static s32 test = 8; surfaceType = 0x000000FF; - temp_v0 = random_int(test); - if ((temp_v0 == 0) || (temp_v0 == 4)) { - var_f2 = player->tyres[BACK_LEFT].pos[0]; - var_f12 = player->tyres[BACK_LEFT].baseHeight + 2.0f; - var_f14 = player->tyres[BACK_LEFT].pos[2]; + randval = random_int(test); + if ((randval == 0) || (randval == 4)) { + x = player->tyres[BACK_LEFT].pos[0]; + y = player->tyres[BACK_LEFT].baseHeight + 2.0f; + z = player->tyres[BACK_LEFT].pos[2]; var_t3 = 1; surfaceType = player->tyres[BACK_LEFT].surfaceType; } - if ((temp_v0 == 2) || (temp_v0 == 6)) { - var_f2 = player->tyres[BACK_RIGHT].pos[0]; - var_f12 = player->tyres[BACK_RIGHT].baseHeight + 2.0f; - var_f14 = player->tyres[BACK_RIGHT].pos[2]; + if ((randval == 2) || (randval == 6)) { + x = player->tyres[BACK_RIGHT].pos[0]; + y = player->tyres[BACK_RIGHT].baseHeight + 2.0f; + z = player->tyres[BACK_RIGHT].pos[2]; var_t3 = 0; surfaceType = player->tyres[BACK_RIGHT].surfaceType; } switch (surfaceType) { case DIRT: if ((arg1 == 0) && - ((player->playerPacticlePool1[arg2].unk_01E > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { + ((player->playerPacticlePool1[arg2].timer > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { if (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f2, var_f12, var_f14, - (s8) surfaceType, (s8) var_t3); - func_8005D7D8(&player->playerPacticlePool1[arg1], 2, 0.46f); + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, (s8) surfaceType, (s8) var_t3); + func_8005D7D8(&player->playerPacticlePool1[arg1], GROUND_PARTCLE, 0.46f); if ((gCurrentCourseId == COURSE_CHOCO_MOUNTAIN) || (gCurrentCourseId == COURSE_ROYAL_RACEWAY)) { func_8005DAD8(&player->playerPacticlePool1[arg1], 1, 0, 0x0080); } @@ -2955,11 +2954,10 @@ void func_8005DAF4(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 } player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); } - } else if ((player->playerPacticlePool1[arg2].unk_01E > 0) && + } else if ((player->playerPacticlePool1[arg2].timer > 0) && (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f)) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f2, var_f12, var_f14, (s8) surfaceType, - (s8) var_t3); - func_8005D7D8(&player->playerPacticlePool1[arg1], 2, 0.46f); + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, (s8) surfaceType, (s8) var_t3); + func_8005D7D8(&player->playerPacticlePool1[arg1], GROUND_PARTCLE, 0.46f); if ((gCurrentCourseId == COURSE_CHOCO_MOUNTAIN) || (gCurrentCourseId == COURSE_ROYAL_RACEWAY)) { func_8005DAD8(&player->playerPacticlePool1[arg1], 1, 0, 0x0080); } @@ -2983,100 +2981,90 @@ void func_8005DAF4(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 break; case GRASS: if ((arg1 == 0) && - ((player->playerPacticlePool1[arg2].unk_01E > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { + ((player->playerPacticlePool1[arg2].timer > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { if (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f2, var_f12, var_f14, - (s8) surfaceType, (s8) var_t3); + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, (s8) surfaceType, (s8) var_t3); func_8005D7D8(&player->playerPacticlePool1[arg1], 3, 1.0f); func_8005D800(&player->playerPacticlePool1[arg1], 0x00FFFFFF, 0x00FF); player->playerPacticlePool1[arg1].unk_038 -= arg1 * 8; player->playerPacticlePool1[arg1].unk_03A -= arg1 * 8; player->playerPacticlePool1[arg1].unk_03C -= arg1 * 8; } - } else if ((player->playerPacticlePool1[arg2].unk_01E > 0) && + } else if ((player->playerPacticlePool1[arg2].timer > 0) && (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f)) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f2, var_f12, var_f14, (s8) surfaceType, - (s8) var_t3); + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, (s8) surfaceType, (s8) var_t3); func_8005D7D8(&player->playerPacticlePool1[arg1], 3, 1.0f); func_8005D800(&player->playerPacticlePool1[arg1], 0x00FFFFFF, 0x00FF); player->playerPacticlePool1[arg1].unk_038 -= arg1 * 8; player->playerPacticlePool1[arg1].unk_03A -= arg1 * 8; player->playerPacticlePool1[arg1].unk_03C -= arg1 * 8; } - player->playerPacticlePool1[arg1].unk_000[1] -= 1.5; + player->playerPacticlePool1[arg1].pos[1] -= 1.5; break; case SAND_OFFROAD: if ((arg1 == 0) && - ((player->playerPacticlePool1[arg2].unk_01E > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { + ((player->playerPacticlePool1[arg2].timer > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { if (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f2, var_f12, var_f14, - (s8) surfaceType, (s8) var_t3); - func_8005D7D8(&player->playerPacticlePool1[arg1], 2, 0.46f); + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, (s8) surfaceType, (s8) var_t3); + func_8005D7D8(&player->playerPacticlePool1[arg1], GROUND_PARTCLE, 0.46f); func_8005DAD8(&player->playerPacticlePool1[arg1], 2, 1, 0x00A8); player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); } - } else if ((player->playerPacticlePool1[arg2].unk_01E > 0) && + } else if ((player->playerPacticlePool1[arg2].timer > 0) && (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f)) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f2, var_f12, var_f14, (s8) surfaceType, - (s8) var_t3); - func_8005D7D8(&player->playerPacticlePool1[arg1], 2, 0.46f); + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, (s8) surfaceType, (s8) var_t3); + func_8005D7D8(&player->playerPacticlePool1[arg1], GROUND_PARTCLE, 0.46f); func_8005DAD8(&player->playerPacticlePool1[arg1], 2, 1, 0x00A8); player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); } break; case SAND: if ((arg1 == 0) && - ((player->playerPacticlePool1[arg2].unk_01E > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { + ((player->playerPacticlePool1[arg2].timer > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { if (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f2, var_f12, var_f14, - (s8) surfaceType, (s8) var_t3); - func_8005D7D8(&player->playerPacticlePool1[arg1], 2, 0.46f); + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, (s8) surfaceType, (s8) var_t3); + func_8005D7D8(&player->playerPacticlePool1[arg1], GROUND_PARTCLE, 0.46f); func_8005DAD8(&player->playerPacticlePool1[arg1], 3, 1, 0x00A8); player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); } - } else if ((player->playerPacticlePool1[arg2].unk_01E > 0) && + } else if ((player->playerPacticlePool1[arg2].timer > 0) && (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f)) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f2, var_f12, var_f14, (s8) surfaceType, - (s8) var_t3); - func_8005D7D8(&player->playerPacticlePool1[arg1], 2, 0.46f); + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, (s8) surfaceType, (s8) var_t3); + func_8005D7D8(&player->playerPacticlePool1[arg1], GROUND_PARTCLE, 0.46f); func_8005DAD8(&player->playerPacticlePool1[arg1], 3, 1, 0x00A8); player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); } break; case WET_SAND: if ((arg1 == 0) && - ((player->playerPacticlePool1[arg2].unk_01E > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { + ((player->playerPacticlePool1[arg2].timer > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { if (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f2, var_f12, var_f14, - (s8) surfaceType, (s8) var_t3); - func_8005D7D8(&player->playerPacticlePool1[arg1], 2, 0.46f); + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, (s8) surfaceType, (s8) var_t3); + func_8005D7D8(&player->playerPacticlePool1[arg1], GROUND_PARTCLE, 0.46f); func_8005DAD8(&player->playerPacticlePool1[arg1], 4, 1, 0x00A8); player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); } - } else if ((player->playerPacticlePool1[arg2].unk_01E > 0) && + } else if ((player->playerPacticlePool1[arg2].timer > 0) && (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f)) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f2, var_f12, var_f14, (s8) surfaceType, - (s8) var_t3); - func_8005D7D8(&player->playerPacticlePool1[arg1], 2, 0.46f); + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, (s8) surfaceType, (s8) var_t3); + func_8005D7D8(&player->playerPacticlePool1[arg1], GROUND_PARTCLE, 0.46f); func_8005DAD8(&player->playerPacticlePool1[arg1], 4, 1, 0x00A8); player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); } break; case DIRT_OFFROAD: if ((arg1 == 0) && - ((player->playerPacticlePool1[arg2].unk_01E > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { + ((player->playerPacticlePool1[arg2].timer > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { if (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f2, var_f12, var_f14, - (s8) surfaceType, (s8) var_t3); - func_8005D7D8(&player->playerPacticlePool1[arg1], 2, 0.46f); + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, (s8) surfaceType, (s8) var_t3); + func_8005D7D8(&player->playerPacticlePool1[arg1], GROUND_PARTCLE, 0.46f); func_8005DAD8(&player->playerPacticlePool1[arg1], 5, 1, 0x00A8); player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); } - } else if ((player->playerPacticlePool1[arg2].unk_01E > 0) && + } else if ((player->playerPacticlePool1[arg2].timer > 0) && (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f)) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f2, var_f12, var_f14, (s8) surfaceType, - (s8) var_t3); - func_8005D7D8(&player->playerPacticlePool1[arg1], 2, 0.46f); + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, (s8) surfaceType, (s8) var_t3); + func_8005D7D8(&player->playerPacticlePool1[arg1], GROUND_PARTCLE, 0.46f); func_8005D82C(&player->playerPacticlePool1[arg1], 0x00FFA54F, 0x00AF); func_8005DAD8(&player->playerPacticlePool1[arg1], 5, 1, 0x00A8); player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); @@ -3085,19 +3073,17 @@ void func_8005DAF4(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 case SNOW: case SNOW_OFFROAD: if ((arg1 == 0) && - ((player->playerPacticlePool1[arg2].unk_01E > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { + ((player->playerPacticlePool1[arg2].timer > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { if (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f2, var_f12, var_f14, - (s8) surfaceType, (s8) var_t3); - func_8005D7D8(&player->playerPacticlePool1[arg1], 2, 0.46f); + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, (s8) surfaceType, (s8) var_t3); + func_8005D7D8(&player->playerPacticlePool1[arg1], GROUND_PARTCLE, 0.46f); func_8005DAD8(&player->playerPacticlePool1[arg1], 6, 1, 0x00A8); player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); } - } else if ((player->playerPacticlePool1[arg2].unk_01E > 0) && + } else if ((player->playerPacticlePool1[arg2].timer > 0) && (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f)) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f2, var_f12, var_f14, (s8) surfaceType, - (s8) var_t3); - func_8005D7D8(&player->playerPacticlePool1[arg1], 2, 0.46f); + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, (s8) surfaceType, (s8) var_t3); + func_8005D7D8(&player->playerPacticlePool1[arg1], GROUND_PARTCLE, 0.46f); func_8005DAD8(&player->playerPacticlePool1[arg1], 6, 1, 0x00A8); player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); } @@ -3106,23 +3092,21 @@ void func_8005DAF4(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 case STONE: case BRIDGE: if ((arg1 == 0) && - ((player->playerPacticlePool1[arg2].unk_01E > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { + ((player->playerPacticlePool1[arg2].timer > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { if (((((player->unk_094 / 18.0f) * 216.0f) >= 30.0f) && ((((player->unk_0C0 / 182) > 0x14) || ((player->unk_0C0 / 182) < (-0x14))))) || ((player->unk_22C - player->unk_094) >= 0.04)) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f2, var_f12, var_f14, - (s8) surfaceType, (s8) var_t3); - func_8005D7D8(&player->playerPacticlePool1[arg1], 2, 0.46f); + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, (s8) surfaceType, (s8) var_t3); + func_8005D7D8(&player->playerPacticlePool1[arg1], GROUND_PARTCLE, 0.46f); func_8005DAD8(&player->playerPacticlePool1[arg1], 0, 0, 0x0080); player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); } - } else if ((player->playerPacticlePool1[arg2].unk_01E > 0) && + } else if ((player->playerPacticlePool1[arg2].timer > 0) && (((((player->unk_094 / 18.0f) * 216.0f) >= 30.0f) && (((player->unk_0C0 / 182) >= 0x15) || ((player->unk_0C0 / 182) < -0x14))) || ((player->unk_22C - player->unk_094) >= 0.04))) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f2, var_f12, var_f14, (s8) surfaceType, - (s8) var_t3); - func_8005D7D8(&player->playerPacticlePool1[arg1], 2, 0.46f); + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, (s8) surfaceType, (s8) var_t3); + func_8005D7D8(&player->playerPacticlePool1[arg1], GROUND_PARTCLE, 0.46f); func_8005DAD8(&player->playerPacticlePool1[arg1], 0, 0, 0x0080); player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); } @@ -3134,44 +3118,44 @@ void func_8005DAF4(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 void func_8005EA94(Player* player, s16 arg1, s32 arg2, s8 arg3, UNUSED s8 arg4) { s32 temp_v0; - s32 var_t0; + s32 surfaceType; s32 var_t1; - f32 var_f2; - f32 var_f12; - f32 var_f14; + f32 x; + f32 y; + f32 z; static s32 test = 10; - var_t0 = 0x000000FF; + surfaceType = 0x000000FF; temp_v0 = random_int(test); if ((temp_v0 == 0) || (temp_v0 == 8)) { if ((D_801652A0[arg3] - player->tyres[BACK_LEFT].baseHeight) >= 3.5) { - var_f2 = player->tyres[BACK_LEFT].pos[0]; - var_f12 = player->tyres[BACK_LEFT].baseHeight + 2.0f; - var_f14 = player->tyres[BACK_LEFT].pos[2]; + x = player->tyres[BACK_LEFT].pos[0]; + y = player->tyres[BACK_LEFT].baseHeight + 2.0f; + z = player->tyres[BACK_LEFT].pos[2]; var_t1 = 1; - var_t0 = 0; + surfaceType = 0; } } if ((temp_v0 == 2) || (temp_v0 == 6)) { if ((D_801652A0[arg3] - player->tyres[BACK_RIGHT].baseHeight) >= 3.5) { - var_f2 = player->tyres[BACK_RIGHT].pos[0]; - var_f12 = player->tyres[BACK_RIGHT].baseHeight + 2.0f; - var_f14 = player->tyres[BACK_RIGHT].pos[2]; + x = player->tyres[BACK_RIGHT].pos[0]; + y = player->tyres[BACK_RIGHT].baseHeight + 2.0f; + z = player->tyres[BACK_RIGHT].pos[2]; var_t1 = 0; - var_t0 = 0; + surfaceType = 0; } } if (1) {} - if (var_t0 == 0) { + if (surfaceType == 0) { if ((arg1 == 0) && - ((player->playerPacticlePool1[arg2].unk_01E > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { + ((player->playerPacticlePool1[arg2].timer > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { if (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f2, var_f12, var_f14, var_t0, var_t1); + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, surfaceType, var_t1); func_8005D7D8(&player->playerPacticlePool1[arg1], 9, 0.8f); func_8005D800(&player->playerPacticlePool1[arg1], 0x00FFFFFF, 0x00AF); } - } else if ((player->playerPacticlePool1[arg2].unk_01E > 0) && (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f)) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f2, var_f12, var_f14, var_t0, var_t1); + } else if ((player->playerPacticlePool1[arg2].timer > 0) && (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f)) { + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, surfaceType, var_t1); func_8005D7D8(&player->playerPacticlePool1[arg1], 9, 0.8f); func_8005D800(&player->playerPacticlePool1[arg1], 0x00FFFFFF, 0x00AF); } @@ -3182,32 +3166,33 @@ void func_8005ED48(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 s32 temp_v0; s32 surfaceType; s32 var_t3; - f32 var_f0; - f32 var_f2; - f32 var_f12; + f32 x; + f32 y; + f32 z; static s32 test = 8; surfaceType = 0x000000FF; temp_v0 = random_int(test); if ((temp_v0 == 2) || (temp_v0 == 4)) { - var_f0 = player->tyres[BACK_LEFT].pos[0]; - var_f2 = player->tyres[BACK_LEFT].baseHeight + 2.0f; - var_f12 = player->tyres[BACK_LEFT].pos[2]; + x = player->tyres[BACK_LEFT].pos[0]; + y = player->tyres[BACK_LEFT].baseHeight + 2.0f; + z = player->tyres[BACK_LEFT].pos[2]; var_t3 = 1; surfaceType = player->tyres[BACK_LEFT].surfaceType; } if ((temp_v0 == 0) || (temp_v0 == 6)) { - var_f0 = player->tyres[BACK_RIGHT].pos[0]; - var_f2 = player->tyres[BACK_RIGHT].baseHeight + 2.0f; - var_f12 = player->tyres[BACK_RIGHT].pos[2]; + x = player->tyres[BACK_RIGHT].pos[0]; + y = player->tyres[BACK_RIGHT].baseHeight + 2.0f; + z = player->tyres[BACK_RIGHT].pos[2]; var_t3 = 0; surfaceType = player->tyres[BACK_RIGHT].surfaceType; } + switch (surfaceType) { case DIRT: if ((arg1 == 0) && - ((player->playerPacticlePool1[arg2].unk_01E > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f0, var_f2, var_f12, surfaceType, var_t3); + ((player->playerPacticlePool1[arg2].timer > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, surfaceType, var_t3); func_8005D7D8(&player->playerPacticlePool1[arg1], 5, 0.46f); if ((gCurrentCourseId == COURSE_CHOCO_MOUNTAIN) || (gCurrentCourseId == COURSE_ROYAL_RACEWAY)) { func_8005DAD8(&player->playerPacticlePool1[arg1], 1, 0, 0x0080); @@ -3228,8 +3213,8 @@ void func_8005ED48(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 func_8005DAD8(&player->playerPacticlePool1[arg1], 11, 0, 0x0080); } player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); - } else if (player->playerPacticlePool1[arg2].unk_01E > 0) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f0, var_f2, var_f12, surfaceType, var_t3); + } else if (player->playerPacticlePool1[arg2].timer > 0) { + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, surfaceType, var_t3); func_8005D7D8(&player->playerPacticlePool1[arg1], 5, 0.46f); if ((gCurrentCourseId == COURSE_CHOCO_MOUNTAIN) || (gCurrentCourseId == COURSE_ROYAL_RACEWAY)) { func_8005DAD8(&player->playerPacticlePool1[arg1], 1, 0, 0x0080); @@ -3254,36 +3239,32 @@ void func_8005ED48(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 break; case GRASS: if ((arg1 == 0) && - ((player->playerPacticlePool1[arg2].unk_01E > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f0, var_f2, var_f12, (s8) surfaceType, - (s8) var_t3); + ((player->playerPacticlePool1[arg2].timer > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, (s8) surfaceType, (s8) var_t3); func_8005D7D8(&player->playerPacticlePool1[arg1], 5, 0.1f); func_8005D800(&player->playerPacticlePool1[arg1], 0x00FFFFFF, 0x00FF); player->playerPacticlePool1[arg1].unk_038 -= arg1 * 8; player->playerPacticlePool1[arg1].unk_03A -= arg1 * 8; player->playerPacticlePool1[arg1].unk_03C -= arg1 * 8; - } else if (player->playerPacticlePool1[arg2].unk_01E > 0) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f0, var_f2, var_f12, (s8) surfaceType, - (s8) var_t3); + } else if (player->playerPacticlePool1[arg2].timer > 0) { + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, (s8) surfaceType, (s8) var_t3); func_8005D7D8(&player->playerPacticlePool1[arg1], 5, 0.1f); func_8005D800(&player->playerPacticlePool1[arg1], 0x00FFFFFF, 0x00FF); player->playerPacticlePool1[arg1].unk_038 -= arg1 * 8; player->playerPacticlePool1[arg1].unk_03A -= arg1 * 8; player->playerPacticlePool1[arg1].unk_03C -= arg1 * 8; } - player->playerPacticlePool1[arg1].unk_000[1] -= 1.5; + player->playerPacticlePool1[arg1].pos[1] -= 1.5; break; case SAND_OFFROAD: if ((arg1 == 0) && - ((player->playerPacticlePool1[arg2].unk_01E > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f0, var_f2, var_f12, (s8) surfaceType, - (s8) var_t3); + ((player->playerPacticlePool1[arg2].timer > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, (s8) surfaceType, (s8) var_t3); func_8005D7D8(&player->playerPacticlePool1[arg1], 5, 0.46f); func_8005DAD8(&player->playerPacticlePool1[arg1], 2, 1, 0x00A8); player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); - } else if (player->playerPacticlePool1[arg2].unk_01E > 0) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f0, var_f2, var_f12, (s8) surfaceType, - (s8) var_t3); + } else if (player->playerPacticlePool1[arg2].timer > 0) { + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, (s8) surfaceType, (s8) var_t3); func_8005D7D8(&player->playerPacticlePool1[arg1], 5, 0.46f); func_8005DAD8(&player->playerPacticlePool1[arg1], 2, 1, 0x00A8); player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); @@ -3291,15 +3272,13 @@ void func_8005ED48(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 break; case SAND: if ((arg1 == 0) && - ((player->playerPacticlePool1[arg2].unk_01E > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f0, var_f2, var_f12, (s8) surfaceType, - (s8) var_t3); + ((player->playerPacticlePool1[arg2].timer > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, (s8) surfaceType, (s8) var_t3); func_8005D7D8(&player->playerPacticlePool1[arg1], 5, 0.46f); func_8005DAD8(&player->playerPacticlePool1[arg1], 3, 1, 0x00A8); player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); - } else if (player->playerPacticlePool1[arg2].unk_01E > 0) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f0, var_f2, var_f12, (s8) surfaceType, - (s8) var_t3); + } else if (player->playerPacticlePool1[arg2].timer > 0) { + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, (s8) surfaceType, (s8) var_t3); func_8005D7D8(&player->playerPacticlePool1[arg1], 5, 0.46f); func_8005DAD8(&player->playerPacticlePool1[arg1], 3, 1, 0x00A8); player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); @@ -3307,15 +3286,13 @@ void func_8005ED48(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 break; case WET_SAND: if ((arg1 == 0) && - ((player->playerPacticlePool1[arg2].unk_01E > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f0, var_f2, var_f12, (s8) surfaceType, - (s8) var_t3); + ((player->playerPacticlePool1[arg2].timer > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, (s8) surfaceType, (s8) var_t3); func_8005D7D8(&player->playerPacticlePool1[arg1], 5, 0.46f); func_8005DAD8(&player->playerPacticlePool1[arg1], 4, 1, 0x00A8); player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); - } else if (player->playerPacticlePool1[arg2].unk_01E > 0) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f0, var_f2, var_f12, (s8) surfaceType, - (s8) var_t3); + } else if (player->playerPacticlePool1[arg2].timer > 0) { + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, (s8) surfaceType, (s8) var_t3); func_8005D7D8(&player->playerPacticlePool1[arg1], 5, 0.46f); func_8005DAD8(&player->playerPacticlePool1[arg1], 4, 1, 0x00A8); player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); @@ -3323,15 +3300,13 @@ void func_8005ED48(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 break; case DIRT_OFFROAD: if ((arg1 == 0) && - ((player->playerPacticlePool1[arg2].unk_01E > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f0, var_f2, var_f12, (s8) surfaceType, - (s8) var_t3); + ((player->playerPacticlePool1[arg2].timer > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, (s8) surfaceType, (s8) var_t3); func_8005D7D8(&player->playerPacticlePool1[arg1], 5, 0.46f); func_8005DAD8(&player->playerPacticlePool1[arg1], 5, 1, 0x00A8); player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); - } else if (player->playerPacticlePool1[arg2].unk_01E > 0) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f0, var_f2, var_f12, (s8) surfaceType, - (s8) var_t3); + } else if (player->playerPacticlePool1[arg2].timer > 0) { + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, (s8) surfaceType, (s8) var_t3); func_8005D7D8(&player->playerPacticlePool1[arg1], 5, 0.46f); func_8005DAD8(&player->playerPacticlePool1[arg1], 5, 1, 0x00A8); player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); @@ -3340,15 +3315,13 @@ void func_8005ED48(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 case SNOW: case SNOW_OFFROAD: if ((arg1 == 0) && - ((player->playerPacticlePool1[arg2].unk_01E > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f0, var_f2, var_f12, (s8) surfaceType, - (s8) var_t3); + ((player->playerPacticlePool1[arg2].timer > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, (s8) surfaceType, (s8) var_t3); func_8005D7D8(&player->playerPacticlePool1[arg1], 5, 0.46f); func_8005DAD8(&player->playerPacticlePool1[arg1], 6, 1, 0x00A8); player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); - } else if (player->playerPacticlePool1[arg2].unk_01E > 0) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f0, var_f2, var_f12, (s8) surfaceType, - (s8) var_t3); + } else if (player->playerPacticlePool1[arg2].timer > 0) { + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, (s8) surfaceType, (s8) var_t3); func_8005D7D8(&player->playerPacticlePool1[arg1], 5, 0.46f); func_8005DAD8(&player->playerPacticlePool1[arg1], 6, 1, 0x00A8); player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); @@ -3358,15 +3331,13 @@ void func_8005ED48(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 case STONE: case BRIDGE: if ((arg1 == 0) && - ((player->playerPacticlePool1[arg2].unk_01E > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f0, var_f2, var_f12, (s8) surfaceType, - (s8) var_t3); + ((player->playerPacticlePool1[arg2].timer > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, (s8) surfaceType, (s8) var_t3); func_8005D7D8(&player->playerPacticlePool1[arg1], 5, 0.46f); func_8005DAD8(&player->playerPacticlePool1[arg1], 0, 0, 0x0080); player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); - } else if (player->playerPacticlePool1[arg2].unk_01E > 0) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f0, var_f2, var_f12, (s8) surfaceType, - (s8) var_t3); + } else if (player->playerPacticlePool1[arg2].timer > 0) { + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, (s8) surfaceType, (s8) var_t3); func_8005D7D8(&player->playerPacticlePool1[arg1], 5, 0.46f); func_8005DAD8(&player->playerPacticlePool1[arg1], 0, 0, 0x0080); player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); @@ -3377,7 +3348,7 @@ void func_8005ED48(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 } } -#ifdef NON_MATCHING +#ifndef NON_MATCHING // Its close, there's some register allocation issue though // Permuter hasn't found anything // https://decomp.me/scratch/WjMqd @@ -3385,28 +3356,28 @@ void func_8005ED48(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 void func_8005F90C(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 arg4) { s32 var_t1; u8 surfaceType; - f32 var_f0; - f32 var_f2; - f32 var_f12; + f32 x; + f32 y; + f32 z; var_t1 = 0; if ((player->effects & 0x80) == 0x80) { - var_f0 = player->pos[0]; - var_f2 = player->pos[1] - player->boundingBoxSize; - var_f12 = player->pos[2]; + x = player->pos[0]; + y = player->pos[1] - player->boundingBoxSize; + z = player->pos[2]; var_t1 = 1; surfaceType = player->tyres[BACK_LEFT].surfaceType; } else { - var_f0 = player->pos[0]; - var_f2 = player->pos[1] - player->boundingBoxSize; - var_f12 = player->pos[2]; + x = player->pos[0]; + y = player->pos[1] - player->boundingBoxSize; + z = player->pos[2]; surfaceType = player->tyres[BACK_RIGHT].surfaceType; } switch (surfaceType) { case DIRT: if ((arg1 == 0) && - ((player->playerPacticlePool1[arg2].unk_01E > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f0, var_f2, var_f12, surfaceType, var_t1); + ((player->playerPacticlePool1[arg2].timer > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, surfaceType, var_t1); func_8005D7D8(&player->playerPacticlePool1[arg1], 4, 0.46f); if ((gCurrentCourseId == COURSE_CHOCO_MOUNTAIN) || (gCurrentCourseId == COURSE_ROYAL_RACEWAY)) { func_8005DAD8(&player->playerPacticlePool1[arg1], 1, 0, 0x0080); @@ -3427,8 +3398,8 @@ void func_8005F90C(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 func_8005DAD8(&player->playerPacticlePool1[arg1], 0x000B, 0, 0x0080); } player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); - } else if (player->playerPacticlePool1[arg2].unk_01E > 0) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f0, var_f2, var_f12, surfaceType, var_t1); + } else if (player->playerPacticlePool1[arg2].timer > 0) { + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, surfaceType, var_t1); func_8005D7D8(&player->playerPacticlePool1[arg1], 4, 0.46f); if ((gCurrentCourseId == COURSE_CHOCO_MOUNTAIN) || (gCurrentCourseId == COURSE_ROYAL_RACEWAY)) { func_8005DAD8(&player->playerPacticlePool1[arg1], 1, 0, 0x0080); @@ -3453,32 +3424,32 @@ void func_8005F90C(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 break; case GRASS: if ((arg1 == 0) && - ((player->playerPacticlePool1[arg2].unk_01E > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f0, var_f2, var_f12, surfaceType, var_t1); + ((player->playerPacticlePool1[arg2].timer > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, surfaceType, var_t1); func_8005D7D8(&player->playerPacticlePool1[arg1], 4, 0.1f); func_8005D800(&player->playerPacticlePool1[arg1], 0x00FFFFFF, 0x00FF); player->playerPacticlePool1[arg1].unk_038 -= arg1 * 8; player->playerPacticlePool1[arg1].unk_03A -= arg1 * 8; player->playerPacticlePool1[arg1].unk_03C -= arg1 * 8; - } else if (player->playerPacticlePool1[arg2].unk_01E > 0) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f0, var_f2, var_f12, surfaceType, var_t1); + } else if (player->playerPacticlePool1[arg2].timer > 0) { + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, surfaceType, var_t1); func_8005D7D8(&player->playerPacticlePool1[arg1], 4, 0.1f); func_8005D800(&player->playerPacticlePool1[arg1], 0x00FFFFFF, 0x00FF); player->playerPacticlePool1[arg1].unk_038 -= arg1 * 8; player->playerPacticlePool1[arg1].unk_03A -= arg1 * 8; player->playerPacticlePool1[arg1].unk_03C -= arg1 * 8; } - player->playerPacticlePool1[arg1].unk_000[1] -= 1.5; + player->playerPacticlePool1[arg1].pos[1] -= 1.5; break; case SAND_OFFROAD: if ((arg1 == 0) && - ((player->playerPacticlePool1[arg2].unk_01E > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f0, var_f2, var_f12, surfaceType, var_t1); + ((player->playerPacticlePool1[arg2].timer > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, surfaceType, var_t1); func_8005D7D8(&player->playerPacticlePool1[arg1], 4, 0.46f); func_8005DAD8(&player->playerPacticlePool1[arg1], 2, 1, 0x00A8); player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); - } else if (player->playerPacticlePool1[arg2].unk_01E > 0) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f0, var_f2, var_f12, surfaceType, var_t1); + } else if (player->playerPacticlePool1[arg2].timer > 0) { + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, surfaceType, var_t1); func_8005D7D8(&player->playerPacticlePool1[arg1], 4, 0.46f); func_8005DAD8(&player->playerPacticlePool1[arg1], 2, 1, 0x00A8); player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); @@ -3486,13 +3457,13 @@ void func_8005F90C(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 break; case SAND: if ((arg1 == 0) && - ((player->playerPacticlePool1[arg2].unk_01E > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f0, var_f2, var_f12, surfaceType, var_t1); + ((player->playerPacticlePool1[arg2].timer > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, surfaceType, var_t1); func_8005D7D8(&player->playerPacticlePool1[arg1], 4, 0.46f); func_8005DAD8(&player->playerPacticlePool1[arg1], 3, 1, 0x00A8); player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); - } else if (player->playerPacticlePool1[arg2].unk_01E > 0) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f0, var_f2, var_f12, surfaceType, var_t1); + } else if (player->playerPacticlePool1[arg2].timer > 0) { + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, surfaceType, var_t1); func_8005D7D8(&player->playerPacticlePool1[arg1], 4, 0.46f); func_8005DAD8(&player->playerPacticlePool1[arg1], 3, 1, 0x00A8); player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); @@ -3500,13 +3471,13 @@ void func_8005F90C(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 break; case WET_SAND: if ((arg1 == 0) && - ((player->playerPacticlePool1[arg2].unk_01E > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f0, var_f2, var_f12, surfaceType, var_t1); + ((player->playerPacticlePool1[arg2].timer > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, surfaceType, var_t1); func_8005D7D8(&player->playerPacticlePool1[arg1], 4, 0.46f); func_8005DAD8(&player->playerPacticlePool1[arg1], 4, 1, 0x00A8); player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); - } else if (player->playerPacticlePool1[arg2].unk_01E > 0) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f0, var_f2, var_f12, surfaceType, var_t1); + } else if (player->playerPacticlePool1[arg2].timer > 0) { + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, surfaceType, var_t1); func_8005D7D8(&player->playerPacticlePool1[arg1], 4, 0.46f); func_8005DAD8(&player->playerPacticlePool1[arg1], 4, 1, 0x00A8); player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); @@ -3514,13 +3485,13 @@ void func_8005F90C(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 break; case DIRT_OFFROAD: if ((arg1 == 0) && - ((player->playerPacticlePool1[arg2].unk_01E > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f0, var_f2, var_f12, surfaceType, var_t1); + ((player->playerPacticlePool1[arg2].timer > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, surfaceType, var_t1); func_8005D7D8(&player->playerPacticlePool1[arg1], 4, 0.46f); func_8005DAD8(&player->playerPacticlePool1[arg1], 5, 1, 0x00A8); player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); - } else if (player->playerPacticlePool1[arg2].unk_01E > 0) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f0, var_f2, var_f12, surfaceType, var_t1); + } else if (player->playerPacticlePool1[arg2].timer > 0) { + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, surfaceType, var_t1); func_8005D7D8(&player->playerPacticlePool1[arg1], 4, 0.46f); func_8005DAD8(&player->playerPacticlePool1[arg1], 5, 1, 0x00A8); player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); @@ -3529,13 +3500,13 @@ void func_8005F90C(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 case SNOW: case SNOW_OFFROAD: if ((arg1 == 0) && - ((player->playerPacticlePool1[arg2].unk_01E > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f0, var_f2, var_f12, surfaceType, var_t1); + ((player->playerPacticlePool1[arg2].timer > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, surfaceType, var_t1); func_8005D7D8(&player->playerPacticlePool1[arg1], 4, 0.46f); func_8005DAD8(&player->playerPacticlePool1[arg1], 6, 1, 0x00A8); player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); - } else if (player->playerPacticlePool1[arg2].unk_01E > 0) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f0, var_f2, var_f12, surfaceType, var_t1); + } else if (player->playerPacticlePool1[arg2].timer > 0) { + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, surfaceType, var_t1); func_8005D7D8(&player->playerPacticlePool1[arg1], 4, 0.46f); func_8005DAD8(&player->playerPacticlePool1[arg1], 6, 1, 0x00A8); player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); @@ -3545,13 +3516,13 @@ void func_8005F90C(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 case STONE: case BRIDGE: if ((arg1 == 0) && - ((player->playerPacticlePool1[arg2].unk_01E > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f0, var_f2, var_f12, surfaceType, var_t1); + ((player->playerPacticlePool1[arg2].timer > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, surfaceType, var_t1); func_8005D7D8(&player->playerPacticlePool1[arg1], 4, 0.46f); func_8005DAD8(&player->playerPacticlePool1[arg1], 0, 0, 0x0080); player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); - } else if (player->playerPacticlePool1[arg2].unk_01E > 0) { - func_8005D794(player, &player->playerPacticlePool1[arg1], var_f0, var_f2, var_f12, surfaceType, var_t1); + } else if (player->playerPacticlePool1[arg2].timer > 0) { + func_8005D794(player, &player->playerPacticlePool1[arg1], x, y, z, surfaceType, var_t1); func_8005D7D8(&player->playerPacticlePool1[arg1], 4, 0.46f); func_8005DAD8(&player->playerPacticlePool1[arg1], 0, 0, 0x0080); player->playerPacticlePool1[arg1].unk_03A = random_int(0x0010U); @@ -3569,9 +3540,9 @@ void func_80060504(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 UNUSED s32 thing1; s16 thing2; UNUSED s32 thing3; - f32 sp50; - f32 sp4C; - f32 sp48; + f32 x; + f32 y; + f32 z; f32 var_f0; s32 var_v0; s32 temp_v0; @@ -3585,17 +3556,17 @@ void func_80060504(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 temp_v0 = random_int(var_v0); if ((temp_v0 == 1) || (temp_v0 == 2) || (temp_v0 == 3)) { if ((arg1 == 0) && - ((player->playerPacticlePool0[arg2].unk_01E > 0) || (player->playerPacticlePool0[arg2].unk_01C == 0))) { - sp4C = player->pos[1] - 2.5; - sp48 = player->pos[2]; - sp50 = player->pos[0]; - func_8005D794(player, &player->playerPacticlePool0[arg1], sp50, sp4C, sp48, 0, 0); + ((player->playerPacticlePool0[arg2].timer > 0) || (player->playerPacticlePool0[arg2].unk_01C == 0))) { + y = player->pos[1] - 2.5; + z = player->pos[2]; + x = player->pos[0]; + func_8005D794(player, &player->playerPacticlePool0[arg1], x, y, z, 0, 0); func_8005D7D8(&player->playerPacticlePool0[arg1], 1, 0.5f); - } else if (player->playerPacticlePool0[arg2].unk_01E > 0) { - sp4C = player->pos[1] - 2.5; - sp48 = player->pos[2]; - sp50 = player->pos[0]; - func_8005D794(player, &player->playerPacticlePool0[arg1], sp50, sp4C, sp48, 0, 0); + } else if (player->playerPacticlePool0[arg2].timer > 0) { + y = player->pos[1] - 2.5; + z = player->pos[2]; + x = player->pos[0]; + func_8005D794(player, &player->playerPacticlePool0[arg1], x, y, z, 0, 0); func_8005D7D8(&player->playerPacticlePool0[arg1], 1, 0.5f); } } @@ -3625,12 +3596,12 @@ void func_80060504(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 } else { var_f0 = -((player->unk_098 / 5000.0f) + 0.1); } - func_80062B18(&sp50, &sp4C, &sp48, 0.0f, 4.5f, (player->playerPacticlePool0[arg1].unk_01E * var_f0) + -5.5, -thing2, + func_80062B18(&x, &y, &z, 0.0f, 4.5f, (player->playerPacticlePool0[arg1].timer * var_f0) + -5.5, -thing2, -player->unk_206 * 2); - player->playerPacticlePool0[arg1].unk_000[0] = player->pos[0] + sp50; - sp4C = sp4C + (player->pos[1] - player->boundingBoxSize); - player->playerPacticlePool0[arg1].unk_000[2] = player->pos[2] + sp48; - player->playerPacticlePool0[arg1].unk_000[1] = player->playerPacticlePool0[arg1].unk_024 + sp4C; + player->playerPacticlePool0[arg1].pos[0] = player->pos[0] + x; + y = y + (player->pos[1] - player->boundingBoxSize); + player->playerPacticlePool0[arg1].pos[2] = player->pos[2] + z; + player->playerPacticlePool0[arg1].pos[1] = player->playerPacticlePool0[arg1].unk_024 + y; player->playerPacticlePool0[arg1].unk_010 = 0; } @@ -3657,19 +3628,19 @@ void func_800608E0(Player* player, s16 arg1, UNUSED s32 arg2, s8 arg3, UNUSED s8 func_8005D800(&player->playerPacticlePool0[arg1], 0x00FFFFFF, 0x00CF); } func_80062B18(&sp50, &sp4C, &sp48, 0.0f, sp4C, - ((-player->playerPacticlePool0[arg1].unk_01E * (player->unk_094 / 18.0f) * 216.0f) / 10.0f) + -4.0f, + ((-player->playerPacticlePool0[arg1].timer * (player->unk_094 / 18.0f) * 216.0f) / 10.0f) + -4.0f, -player->playerPacticlePool0[arg1].unk_020, -player->unk_206 * 2); - player->playerPacticlePool0[arg1].unk_000[0] = player->pos[0] + sp50; - player->playerPacticlePool0[arg1].unk_000[2] = player->pos[2] + sp48; - player->playerPacticlePool0[arg1].unk_000[1] = player->pos[1] + sp4C; + player->playerPacticlePool0[arg1].pos[0] = player->pos[0] + sp50; + player->playerPacticlePool0[arg1].pos[2] = player->pos[2] + sp48; + player->playerPacticlePool0[arg1].pos[1] = player->pos[1] + sp4C; } void func_80060B14(Player* player, s16 arg1, s32 arg2, s8 arg3, s8 arg4) { if ((gCurrentCourseId != COURSE_SKYSCRAPER) && (gCurrentCourseId != COURSE_RAINBOW_ROAD)) { if ((arg1 == 0) && - ((player->playerPacticlePool0[arg2].unk_01E > 0) || (player->playerPacticlePool0[arg2].unk_01C == 0))) { + ((player->playerPacticlePool0[arg2].timer > 0) || (player->playerPacticlePool0[arg2].unk_01C == 0))) { func_800608E0(player, arg1, arg2, arg3, arg4); - } else if (player->playerPacticlePool0[arg2].unk_01E > 0) { + } else if (player->playerPacticlePool0[arg2].timer > 0) { func_800608E0(player, arg1, arg2, arg3, arg4); } } @@ -3696,22 +3667,22 @@ void func_80060BCC(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 return; } if ((arg1 == 0) && - ((player->playerPacticlePool1[arg2].unk_01E > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { + ((player->playerPacticlePool1[arg2].timer > 0) || (player->playerPacticlePool1[arg2].unk_01C == 0))) { func_8005D794(player, &player->playerPacticlePool1[arg1], 0.0f, 0.0f, 0.0f, (s8) 0, (s8) 0); func_8005D7D8(&player->playerPacticlePool1[arg1], 0x0B, 0.4f); func_8005D800(&player->playerPacticlePool1[arg1], 0x00FFFFFF, 0x00FF); - player->playerPacticlePool1[arg1].unk_000[2] = player->pos[2] + (coss(sp54 * 0xB6) * -1.8); - player->playerPacticlePool1[arg1].unk_000[0] = player->pos[0] + (sins(sp54 * 0xB6) * -1.8); - player->playerPacticlePool1[arg1].unk_000[1] = (player->pos[1] - player->boundingBoxSize) + sp4C + 2.0f; + player->playerPacticlePool1[arg1].pos[2] = player->pos[2] + (coss(sp54 * 0xB6) * -1.8); + player->playerPacticlePool1[arg1].pos[0] = player->pos[0] + (sins(sp54 * 0xB6) * -1.8); + player->playerPacticlePool1[arg1].pos[1] = (player->pos[1] - player->boundingBoxSize) + sp4C + 2.0f; player->playerPacticlePool1[arg1].unk_018 = sp44 + 1.0f; player->playerPacticlePool1[arg1].unk_00C = (sp48 + 2.0f) / 10.0f; - } else if (player->playerPacticlePool1[arg2].unk_01E > 0) { + } else if (player->playerPacticlePool1[arg2].timer > 0) { func_8005D794(player, &player->playerPacticlePool1[arg1], 0.0f, 0.0f, 0.0f, (s8) 0, (s8) 0); func_8005D7D8(&player->playerPacticlePool1[arg1], 0x0B, 0.4f); func_8005D800(&player->playerPacticlePool1[arg1], 0x00FFFFFF, 0x00FF); - player->playerPacticlePool1[arg1].unk_000[2] = player->pos[2] + (coss(sp54 * 0xB6) * -1.8); - player->playerPacticlePool1[arg1].unk_000[0] = player->pos[0] + (sins(sp54 * 0xB6) * -1.8); - player->playerPacticlePool1[arg1].unk_000[1] = (player->pos[1] - player->boundingBoxSize) + sp4C + 2.0f; + player->playerPacticlePool1[arg1].pos[2] = player->pos[2] + (coss(sp54 * 0xB6) * -1.8); + player->playerPacticlePool1[arg1].pos[0] = player->pos[0] + (sins(sp54 * 0xB6) * -1.8); + player->playerPacticlePool1[arg1].pos[1] = (player->pos[1] - player->boundingBoxSize) + sp4C + 2.0f; player->playerPacticlePool1[arg1].unk_018 = sp44 + 1.0f; player->playerPacticlePool1[arg1].unk_00C = (sp48 + 2.0f) / 10.0f; } @@ -3727,11 +3698,11 @@ void func_80060F50(Player* player, s16 arg1, UNUSED s32 arg2, s8 arg3, UNUSED s8 func_8005D800(&player->playerPacticlePool0[arg1], 0xFFFFFF, 0xFF); } - player->playerPacticlePool0[arg1].unk_000[2] = + player->playerPacticlePool0[arg1].pos[2] = player->pos[2] + (coss(player->playerPacticlePool0[arg1].unk_020) * -5.8); - player->playerPacticlePool0[arg1].unk_000[0] = + player->playerPacticlePool0[arg1].pos[0] = player->pos[0] + (sins(player->playerPacticlePool0[arg1].unk_020) * -5.8); - player->playerPacticlePool0[arg1].unk_000[1] = D_801652A0[arg3]; + player->playerPacticlePool0[arg1].pos[1] = D_801652A0[arg3]; player->unk_0DE &= ~0x0008; } @@ -3751,20 +3722,20 @@ void func_80061130(Player* player, s16 arg1, UNUSED s32 arg2, UNUSED s8 arg3, UN func_8005D7D8(&player->playerPacticlePool0[arg1], 7, 0.6f); func_8005D800(&player->playerPacticlePool0[arg1], 0xFFFFFF, 0xD0); - player->playerPacticlePool0[arg1].unk_000[2] = + player->playerPacticlePool0[arg1].pos[2] = player->pos[2] + (coss(player->playerPacticlePool0[arg1].unk_020) * 6.0f); - player->playerPacticlePool0[arg1].unk_000[0] = + player->playerPacticlePool0[arg1].pos[0] = player->pos[0] + (sins(player->playerPacticlePool0[arg1].unk_020) * 6.0f); - player->playerPacticlePool0[arg1].unk_000[1] = player->pos[1] - 5.0f; + player->playerPacticlePool0[arg1].pos[1] = player->pos[1] - 5.0f; player->playerPacticlePool0[arg1].unk_040 = 0; player->playerPacticlePool0[arg1].unk_024 = 0.0f; } void func_80061224(Player* player, s16 arg1, s32 arg2, s8 arg3, s8 arg4) { if ((arg1 == 0) && - ((player->playerPacticlePool0[arg2].unk_01E > 0) || (player->playerPacticlePool0[arg1].unk_01C == 0))) { + ((player->playerPacticlePool0[arg2].timer > 0) || (player->playerPacticlePool0[arg1].unk_01C == 0))) { func_80061130(player, arg1, arg2, arg3, arg4); - } else if (player->playerPacticlePool0[arg2].unk_01E >= 2) { + } else if (player->playerPacticlePool0[arg2].timer >= 2) { func_80061130(player, arg1, arg2, arg3, arg4); if (arg1 == 9) { player->unk_044 &= ~0x0200; @@ -3781,11 +3752,11 @@ void func_800612F8(Player* player, UNUSED s32 arg1, UNUSED s32 arg2, UNUSED s8 a player->playerPacticlePool3[var_s2].unk_020 = (0x1C70 * var_s2) - player->rotation[1]; player->playerPacticlePool3[var_s2].unk_024 = (random_int(0x0064U) / 100.0f) + 1.5; player->playerPacticlePool3[var_s2].unk_03A = 0; - player->playerPacticlePool3[var_s2].unk_012 = 1; - player->playerPacticlePool3[var_s2].unk_01E = 0; + player->playerPacticlePool3[var_s2].type = 1; + player->playerPacticlePool3[var_s2].timer = 0; player->playerPacticlePool3[var_s2].unk_03E = 0x00FF; - player->playerPacticlePool3[var_s2].unk_000[2] = player->pos[2]; - player->playerPacticlePool3[var_s2].unk_000[0] = player->pos[0]; + player->playerPacticlePool3[var_s2].pos[2] = player->pos[2]; + player->playerPacticlePool3[var_s2].pos[0] = player->pos[0]; } player->unk_046 &= ~0x0008; } @@ -3801,11 +3772,11 @@ void func_80061430(Player* player, UNUSED s32 arg1, UNUSED s32 arg2, UNUSED s8 a player->playerPacticlePool3[var_s2].unk_024 = (random_int(0x0064U) / 100.0f) + 1.9; player->playerPacticlePool3[var_s2].unk_024 = (random_int(0x0064U) / 100.0f) + 1.5; player->playerPacticlePool3[var_s2].unk_03A = 0; - player->playerPacticlePool3[var_s2].unk_012 = 9; - player->playerPacticlePool3[var_s2].unk_01E = 0; + player->playerPacticlePool3[var_s2].type = 9; + player->playerPacticlePool3[var_s2].timer = 0; player->playerPacticlePool3[var_s2].unk_03E = 0x00FF; - player->playerPacticlePool3[var_s2].unk_000[2] = player->pos[2]; - player->playerPacticlePool3[var_s2].unk_000[0] = player->pos[0]; + player->playerPacticlePool3[var_s2].pos[2] = player->pos[2]; + player->playerPacticlePool3[var_s2].pos[0] = player->pos[0]; } player->unk_044 &= ~0x1000; } @@ -3819,17 +3790,17 @@ void func_800615AC(Player* player, s16 arg1, UNUSED s32 arg2, UNUSED s8 arg3, UN if (random_int(3U) == 2.0f) { player->playerPacticlePool3[arg1].unk_01C = 1; - player->playerPacticlePool3[arg1].unk_000[0] = player->pos[0]; - player->playerPacticlePool3[arg1].unk_000[2] = player->pos[2]; + player->playerPacticlePool3[arg1].pos[0] = player->pos[0]; + player->playerPacticlePool3[arg1].pos[2] = player->pos[2]; player->playerPacticlePool3[arg1].unk_020 = -player->rotation[1] + sp28[arg1]; player->playerPacticlePool3[arg1].unk_018 = random_int(1U) + 2.0f; temp_f0 = random_int(4U); temp_f0 -= test; - player->playerPacticlePool3[arg1].unk_014 = temp_f0; - player->playerPacticlePool3[arg1].unk_000[1] = player->pos[1] + temp_f0; + player->playerPacticlePool3[arg1].surfaceType = temp_f0; + player->playerPacticlePool3[arg1].pos[1] = player->pos[1] + temp_f0; player->playerPacticlePool3[arg1].unk_00C = 0.15f; - player->playerPacticlePool3[arg1].unk_012 = 5; - player->playerPacticlePool3[arg1].unk_01E = 0; + player->playerPacticlePool3[arg1].type = 5; + player->playerPacticlePool3[arg1].timer = 0; player->playerPacticlePool3[arg1].unk_03E = 0x00FF; player->playerPacticlePool3[arg1].unk_038 = 0; } @@ -3861,18 +3832,18 @@ void func_80061754(Player* player, s16 arg1, UNUSED s32 arg2, UNUSED s32 arg3, U player->playerPacticlePool3[arg1].unk_03A += temp_s1; player->playerPacticlePool3[arg1].unk_03C += temp_s1; } - player->playerPacticlePool3[arg1].unk_000[2] = player->pos[2] + (coss(sp54 * 0xB6) * -5.0f); - player->playerPacticlePool3[arg1].unk_000[0] = player->pos[0] + (sins(sp54 * 0xB6) * -5.0f); - player->playerPacticlePool3[arg1].unk_000[1] = (player->pos[1] - player->boundingBoxSize) + sp4C + 2.0f; + player->playerPacticlePool3[arg1].pos[2] = player->pos[2] + (coss(sp54 * 0xB6) * -5.0f); + player->playerPacticlePool3[arg1].pos[0] = player->pos[0] + (sins(sp54 * 0xB6) * -5.0f); + player->playerPacticlePool3[arg1].pos[1] = (player->pos[1] - player->boundingBoxSize) + sp4C + 2.0f; player->playerPacticlePool3[arg1].unk_018 = sp44 + 1.0f; player->playerPacticlePool3[arg1].unk_00C = sp48 + 1.0f; } void func_8006199C(Player* player, s16 arg1, s32 arg2, s8 arg3, s8 arg4) { if ((arg1 == 0) && - ((player->playerPacticlePool3[arg2].unk_01E > 0) || (player->playerPacticlePool3[arg2].unk_01C == 0))) { + ((player->playerPacticlePool3[arg2].timer > 0) || (player->playerPacticlePool3[arg2].unk_01C == 0))) { func_80061754(player, arg1, arg2, (s32) arg3, arg4); - } else if (player->playerPacticlePool3[arg2].unk_01E > 0) { + } else if (player->playerPacticlePool3[arg2].timer > 0) { func_80061754(player, arg1, arg2, (s32) arg3, arg4); } } @@ -3889,21 +3860,21 @@ void func_80061A34(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 random_int(6U); sp48 = (f32) random_int(3U); if ((arg1 == 0) && - ((player->playerPacticlePool3[arg2].unk_01E > 0) || (player->playerPacticlePool3[arg2].unk_01C == 0))) { + ((player->playerPacticlePool3[arg2].timer > 0) || (player->playerPacticlePool3[arg2].unk_01C == 0))) { func_8005D794(player, &player->playerPacticlePool3[arg1], 0.0f, 0.0f, 0.0f, (s8) 0, (s8) 0); func_8005D7D8(&player->playerPacticlePool3[arg1], 7, 1.0f); func_8005D800(&player->playerPacticlePool3[arg1], 0x00FFFFFF, 0x00FF); - player->playerPacticlePool3[arg1].unk_000[2] = player->pos[2] + (coss(sp54 * 0xB6) * -2.0); - player->playerPacticlePool3[arg1].unk_000[0] = player->pos[0] + (sins(sp54 * 0xB6) * -2.0); - player->playerPacticlePool3[arg1].unk_000[1] = (player->pos[1] - player->boundingBoxSize) + sp4C + 2.0f; + player->playerPacticlePool3[arg1].pos[2] = player->pos[2] + (coss(sp54 * 0xB6) * -2.0); + player->playerPacticlePool3[arg1].pos[0] = player->pos[0] + (sins(sp54 * 0xB6) * -2.0); + player->playerPacticlePool3[arg1].pos[1] = (player->pos[1] - player->boundingBoxSize) + sp4C + 2.0f; player->playerPacticlePool3[arg1].unk_00C = (sp48 + 2.0f) / 10.0f; - } else if (player->playerPacticlePool3[arg2].unk_01E > 0) { + } else if (player->playerPacticlePool3[arg2].timer > 0) { func_8005D794(player, &player->playerPacticlePool3[arg1], 0.0f, 0.0f, 0.0f, (s8) 0, (s8) 0); func_8005D7D8(&player->playerPacticlePool3[arg1], 7, 1.0f); func_8005D800(&player->playerPacticlePool3[arg1], 0x00FFFFFF, 0x00FF); - player->playerPacticlePool3[arg1].unk_000[2] = player->pos[2] + (coss(sp54 * 0xB6) * -2.0); - player->playerPacticlePool3[arg1].unk_000[0] = player->pos[0] + (sins(sp54 * 0xB6) * -2.0); - player->playerPacticlePool3[arg1].unk_000[1] = (player->pos[1] - player->boundingBoxSize) + (f32) sp4C + 2.0f; + player->playerPacticlePool3[arg1].pos[2] = player->pos[2] + (coss(sp54 * 0xB6) * -2.0); + player->playerPacticlePool3[arg1].pos[0] = player->pos[0] + (sins(sp54 * 0xB6) * -2.0); + player->playerPacticlePool3[arg1].pos[1] = (player->pos[1] - player->boundingBoxSize) + (f32) sp4C + 2.0f; player->playerPacticlePool3[arg1].unk_00C = (sp48 + 2.0f) / 10.0f; } } @@ -3917,16 +3888,16 @@ void func_80061D4C(Player* player, s16 arg1, UNUSED s32 arg2, UNUSED s8 arg3, UN if (random_int(3U) == 2.0f) { player->playerPacticlePool3[arg1].unk_01C = 1; - player->playerPacticlePool3[arg1].unk_000[0] = player->pos[0]; - player->playerPacticlePool3[arg1].unk_000[1] = player->pos[1] + 2.0f; - player->playerPacticlePool3[arg1].unk_000[2] = player->pos[2]; + player->playerPacticlePool3[arg1].pos[0] = player->pos[0]; + player->playerPacticlePool3[arg1].pos[1] = player->pos[1] + 2.0f; + player->playerPacticlePool3[arg1].pos[2] = player->pos[2]; player->playerPacticlePool3[arg1].unk_020 = -player->rotation[1] + sp20[arg1]; player->playerPacticlePool3[arg1].unk_018 = random_int(3U) + 2.0f; - player->playerPacticlePool3[arg1].unk_014 = random_int(4U); - player->playerPacticlePool3[arg1].unk_014 -= test; + player->playerPacticlePool3[arg1].surfaceType = random_int(4U); + player->playerPacticlePool3[arg1].surfaceType -= test; player->playerPacticlePool3[arg1].unk_00C = 0.4f; - player->playerPacticlePool3[arg1].unk_012 = 2; - player->playerPacticlePool3[arg1].unk_01E = 0; + player->playerPacticlePool3[arg1].type = 2; + player->playerPacticlePool3[arg1].timer = 0; player->playerPacticlePool3[arg1].unk_03E = 0x00FF; } } @@ -3936,7 +3907,7 @@ void func_80061EF4(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 s32 var_t0 = 0x000000FF; s32 var_t1; s32 temp_v1; - f32 var_f2; + f32 y; UNUSED s32 stackPadding1; if (1) {}; @@ -3944,17 +3915,17 @@ void func_80061EF4(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 if (temp_v1 == 1) { var_t1 = 1; var_t0 = 0; - var_f2 = player->pos[1]; + y = player->pos[1]; } if (temp_v1 == 0) { var_t1 = 0; var_t0 = 0; - var_f2 = player->pos[1]; + y = player->pos[1]; } if (var_t0 == 0) { if ((arg1 == 0) && - ((player->playerPacticlePool3[arg2].unk_01E > 0) || (player->playerPacticlePool3[arg2].unk_01C == 0))) { - func_8005D794(player, &player->playerPacticlePool3[arg1], 0.0f, var_f2, 0.0f, (s8) var_t0, (s8) var_t1); + ((player->playerPacticlePool3[arg2].timer > 0) || (player->playerPacticlePool3[arg2].unk_01C == 0))) { + func_8005D794(player, &player->playerPacticlePool3[arg1], 0.0f, y, 0.0f, (s8) var_t0, (s8) var_t1); func_8005D7D8(&player->playerPacticlePool3[arg1], 3, 0.5f); func_8005D800(&player->playerPacticlePool3[arg1], 0x00FFFFFF, 0x0060); player->playerPacticlePool3[arg1].unk_020 = 0; @@ -3963,14 +3934,14 @@ void func_80061EF4(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 } else { player->playerPacticlePool3[arg1].unk_020 -= 0x888; } - player->playerPacticlePool3[arg1].unk_000[2] = + player->playerPacticlePool3[arg1].pos[2] = player->pos[2] + (coss(player->playerPacticlePool3[arg1].unk_020 - player->rotation[1] - player->unk_0C0) * 5.0f); - player->playerPacticlePool3[arg1].unk_000[0] = + player->playerPacticlePool3[arg1].pos[0] = player->pos[0] + (sins(player->playerPacticlePool3[arg1].unk_020 - player->rotation[1] - player->unk_0C0) * 5.0f); - } else if (player->playerPacticlePool3[arg2].unk_01E > 0) { - func_8005D794(player, &player->playerPacticlePool3[arg1], 0.0f, var_f2, 0.0f, (s8) var_t0, (s8) var_t1); + } else if (player->playerPacticlePool3[arg2].timer > 0) { + func_8005D794(player, &player->playerPacticlePool3[arg1], 0.0f, y, 0.0f, (s8) var_t0, (s8) var_t1); func_8005D7D8(&player->playerPacticlePool3[arg1], 3, 0.5f); func_8005D800(&player->playerPacticlePool3[arg1], 0x00FFFFFF, 0x0060); player->playerPacticlePool3[arg1].unk_020 = 0; @@ -3979,10 +3950,10 @@ void func_80061EF4(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 } else { player->playerPacticlePool3[arg1].unk_020 -= 0x888; } - player->playerPacticlePool3[arg1].unk_000[2] = + player->playerPacticlePool3[arg1].pos[2] = player->pos[2] + (coss(player->playerPacticlePool3[arg1].unk_020 - player->rotation[1] - player->unk_0C0) * 5.0f); - player->playerPacticlePool3[arg1].unk_000[0] = + player->playerPacticlePool3[arg1].pos[0] = player->pos[0] + (sins(player->playerPacticlePool3[arg1].unk_020 - player->rotation[1] - player->unk_0C0) * 5.0f); } @@ -3994,7 +3965,7 @@ void func_800621BC(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 s32 phi_t0; s32 phi_t1; Player* new_var; - f32 phi_f2; + f32 y; Player* new_var2; phi_t0 = 0xFF; @@ -4002,7 +3973,7 @@ void func_800621BC(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 if (temp_v1 == 1) { phi_t1 = 1; phi_t0 = 0; - phi_f2 = player->pos[1]; + y = player->pos[1]; } if (temp_v1 == 0) { @@ -4010,13 +3981,13 @@ void func_800621BC(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 if (1) { phi_t0 = 0; } - phi_f2 = player->pos[1]; + y = player->pos[1]; } if (phi_t0 == 0) { if ((arg1 == 0) && - ((player->playerPacticlePool3[arg2].unk_01E > 0) || (player->playerPacticlePool3[arg2].unk_01C == 0))) { - func_8005D794(player, &player->playerPacticlePool3[arg1], 0.0f, phi_f2, 0.0f, phi_t0, phi_t1); + ((player->playerPacticlePool3[arg2].timer > 0) || (player->playerPacticlePool3[arg2].unk_01C == 0))) { + func_8005D794(player, &player->playerPacticlePool3[arg1], 0.0f, y, 0.0f, phi_t0, phi_t1); func_8005D7D8(&player->playerPacticlePool3[arg1], 8, 1.0f); func_8005D800(&player->playerPacticlePool3[arg1], 0xFFFF20, 0xFF); @@ -4027,18 +3998,18 @@ void func_800621BC(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 player->playerPacticlePool3[arg1].unk_020 -= 2184; } - player->playerPacticlePool3[arg1].unk_000[2] = + player->playerPacticlePool3[arg1].pos[2] = player->pos[2] + (coss((player->playerPacticlePool3[arg1].unk_020 - player->rotation[1]) - player->unk_0C0) * 5.0f); - player->playerPacticlePool3[arg1].unk_000[0] = + player->playerPacticlePool3[arg1].pos[0] = player->pos[0] + (sins((player->playerPacticlePool3[arg1].unk_020 - player->rotation[1]) - player->unk_0C0) * 5.0f); return; } new_var2 = player; - if (new_var2->playerPacticlePool3[arg2].unk_01E > 0) { - func_8005D794(new_var2, &new_var2->playerPacticlePool3[arg1], 0.0f, phi_f2, 0.0f, phi_t0, phi_t1); + if (new_var2->playerPacticlePool3[arg2].timer > 0) { + func_8005D794(new_var2, &new_var2->playerPacticlePool3[arg1], 0.0f, y, 0.0f, phi_t0, phi_t1); func_8005D7D8(&new_var2->playerPacticlePool3[arg1], 8, 1.0f); func_8005D800(&new_var2->playerPacticlePool3[arg1], 0xFFFF20, 0xFF); new_var2->playerPacticlePool3[arg1].unk_020 = 0; @@ -4049,10 +4020,10 @@ void func_800621BC(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 } new_var = new_var2; - new_var->playerPacticlePool3[arg1].unk_000[2] = + new_var->playerPacticlePool3[arg1].pos[2] = new_var->pos[2] + (coss((new_var->playerPacticlePool3[arg1].unk_020 - new_var->rotation[1]) - new_var->unk_0C0) * 5.0f); - new_var->playerPacticlePool3[arg1].unk_000[0] = + new_var->playerPacticlePool3[arg1].pos[0] = new_var->pos[0] + (sins((new_var->playerPacticlePool3[arg1].unk_020 - new_var->rotation[1]) - new_var->unk_0C0) * 5.0f); } @@ -4061,12 +4032,12 @@ void func_800621BC(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 void func_80062484(Player* player, UnkPlayerStruct258* arg1, s32 arg2) { arg1->unk_01C = 1; - arg1->unk_000[1] = player->unk_074 + 1.0f; - arg1->unk_000[2] = player->pos[2]; - arg1->unk_000[0] = player->pos[0]; + arg1->pos[1] = player->unk_074 + 1.0f; + arg1->pos[2] = player->pos[2]; + arg1->pos[0] = player->pos[0]; arg1->unk_020 = (arg2 * 0x1998) - player->rotation[1]; - arg1->unk_012 = 4; - arg1->unk_01E = 0; + arg1->type = 4; + arg1->timer = 0; } void func_800624D8(Player* player, UNUSED s32 arg1, UNUSED s32 arg2, UNUSED s8 arg3, UNUSED s8 arg4) { @@ -4162,54 +4133,54 @@ void func_800624D8(Player* player, UNUSED s32 arg1, UNUSED s32 arg2, UNUSED s8 a void func_800628C0(Player* player, UNUSED s8 arg1, UNUSED s8 arg2, s8 arg3) { player->playerPacticlePool2[arg3].unk_01C = 1; player->playerPacticlePool2[arg3].unk_020 = -player->rotation[1]; - player->playerPacticlePool2[arg3].unk_012 = 2; - player->playerPacticlePool2[arg3].unk_01E = 0; + player->playerPacticlePool2[arg3].type = 2; + player->playerPacticlePool2[arg3].timer = 0; player->playerPacticlePool2[arg3].unk_00C = 0.2f; } void func_80062914(Player* player, UNUSED s8 arg1, UNUSED s8 arg2, s8 arg3) { player->playerPacticlePool2[arg3].unk_01C = 1; player->playerPacticlePool2[arg3].unk_020 = -player->rotation[1]; - player->playerPacticlePool2[arg3].unk_012 = 4; - player->playerPacticlePool2[arg3].unk_01E = 0; + player->playerPacticlePool2[arg3].type = 4; + player->playerPacticlePool2[arg3].timer = 0; player->playerPacticlePool2[arg3].unk_00C = 1.0f; } void func_80062968(Player* player, UNUSED s8 arg1, UNUSED s8 arg2, s8 arg3) { player->playerPacticlePool2[arg3].unk_01C = 1; player->playerPacticlePool2[arg3].unk_020 = -player->rotation[1]; - player->playerPacticlePool2[arg3].unk_012 = 5; - player->playerPacticlePool2[arg3].unk_01E = 0; + player->playerPacticlePool2[arg3].type = 5; + player->playerPacticlePool2[arg3].timer = 0; player->playerPacticlePool2[arg3].unk_00C = 0.2f; } void func_800629BC(Player* player, UNUSED s8 arg1, UNUSED s8 arg2, s8 arg3) { player->playerPacticlePool2[arg3].unk_01C = 1; player->playerPacticlePool2[arg3].unk_020 = -player->rotation[1]; - player->playerPacticlePool2[arg3].unk_012 = 6; - player->playerPacticlePool2[arg3].unk_01E = 0; + player->playerPacticlePool2[arg3].type = 6; + player->playerPacticlePool2[arg3].timer = 0; player->playerPacticlePool2[arg3].unk_00C = 0.2f; - player->playerPacticlePool2[arg3].unk_000[1] = 0.0f; + player->playerPacticlePool2[arg3].pos[1] = 0.0f; } void func_80062A18(Player* player, s8 arg1, UNUSED s8 arg2, s8 arg3) { player->playerPacticlePool2[arg3].unk_01C = 1; - player->playerPacticlePool2[arg3].unk_012 = 3; + player->playerPacticlePool2[arg3].type = 3; player->playerPacticlePool2[arg1 /* arg1 instead of arg3 */].unk_00C = 0.2f; - player->playerPacticlePool2[arg3].unk_01E = 1; + player->playerPacticlePool2[arg3].timer = 1; player->playerPacticlePool2[arg3].unk_020 = 0; player->unk_0B6 &= ~0x0080; - player->playerPacticlePool2[arg3].unk_000[2] = player->pos[2]; - player->playerPacticlePool2[arg3].unk_000[0] = player->pos[0]; - player->playerPacticlePool2[arg3].unk_000[1] = (player->pos[1] + 4.0f); + player->playerPacticlePool2[arg3].pos[2] = player->pos[2]; + player->playerPacticlePool2[arg3].pos[0] = player->pos[0]; + player->playerPacticlePool2[arg3].pos[1] = (player->pos[1] + 4.0f); } void func_80062AA8(Player* player, UNUSED s8 arg1, UNUSED s8 arg2, s8 arg3) { player->playerPacticlePool2[arg3].unk_01C = 1; - player->playerPacticlePool2[arg3].unk_012 = 5; + player->playerPacticlePool2[arg3].type = 5; player->playerPacticlePool2[arg3].unk_00C = 0.1f; - player->playerPacticlePool2[arg3].unk_01E = 0; - player->playerPacticlePool2[arg3].unk_000[1] = (player->pos[1] + player->boundingBoxSize) - 2.5; + player->playerPacticlePool2[arg3].timer = 0; + player->playerPacticlePool2[arg3].pos[1] = (player->pos[1] + player->boundingBoxSize) - 2.5; } void func_80062B18(f32* arg0, f32* arg1, f32* arg2, f32 arg3, f32 arg4, f32 arg5, u16 arg6, u16 arg7) { @@ -4256,17 +4227,17 @@ void func_80062C74(Player* player, s16 arg1, UNUSED s32 arg2, UNUSED s32 arg3) { f32 sp38; s16 thing; - player->playerPacticlePool0[arg1].unk_01E += 1; - if (player->playerPacticlePool0[arg1].unk_01E == 0x000C) { + player->playerPacticlePool0[arg1].timer++; + if (player->playerPacticlePool0[arg1].timer == 0x000C) { player->playerPacticlePool0[arg1].unk_01C = 0; - player->playerPacticlePool0[arg1].unk_01E = 0; - player->playerPacticlePool0[arg1].unk_012 = 0; + player->playerPacticlePool0[arg1].timer = 0; + player->playerPacticlePool0[arg1].type = NO_PARTICLE; } player->playerPacticlePool0[arg1].unk_018 = 2.0f; if (player->playerPacticlePool0[arg1].unk_040 == 0) { player->playerPacticlePool0[arg1].unk_00C = player->playerPacticlePool0[arg1].unk_00C + 0.07; player->playerPacticlePool0[arg1].unk_024 = player->playerPacticlePool0[arg1].unk_024 + 0.3; - if (player->playerPacticlePool0[arg1].unk_01E >= 3) { + if (player->playerPacticlePool0[arg1].timer >= 3) { player->playerPacticlePool0[arg1].unk_03E -= 3; } if (player->playerPacticlePool0[arg1].unk_03E <= 0) { @@ -4275,7 +4246,7 @@ void func_80062C74(Player* player, s16 arg1, UNUSED s32 arg2, UNUSED s32 arg3) { } else { player->playerPacticlePool0[arg1].unk_00C = player->playerPacticlePool0[arg1].unk_00C + 0.1; player->playerPacticlePool0[arg1].unk_024 = player->playerPacticlePool0[arg1].unk_024 + 0.3; - if (player->playerPacticlePool0[arg1].unk_01E >= 3) { + if (player->playerPacticlePool0[arg1].timer >= 3) { player->playerPacticlePool0[arg1].unk_03E -= 2; } if (player->playerPacticlePool0[arg1].unk_03E <= 0) { @@ -4288,7 +4259,7 @@ void func_80062C74(Player* player, s16 arg1, UNUSED s32 arg2, UNUSED s32 arg3) { } else { var_f6 = -((player->unk_098 / 6000.0f) + 0.1); } - if (((player->effects & BOOST_EFFECT) == BOOST_EFFECT) && (player->playerPacticlePool0[arg1].unk_01E >= 6)) { + if (((player->effects & BOOST_EFFECT) == BOOST_EFFECT) && (player->playerPacticlePool0[arg1].timer >= 6)) { player->playerPacticlePool0[arg1].unk_00C = player->playerPacticlePool0[arg1].unk_00C + 0.06; } player->playerPacticlePool0[arg1].unk_010++; @@ -4296,91 +4267,88 @@ void func_80062C74(Player* player, s16 arg1, UNUSED s32 arg2, UNUSED s32 arg3) { player->playerPacticlePool0[arg1].unk_010 = 0; } func_80062B18(&sp40, &sp38, &sp3C, 0.0f, sp48[player->characterId], - (player->playerPacticlePool0[arg1].unk_01E * var_f6) + -5.5, -thing, -player->unk_206 * 2); - player->playerPacticlePool0[arg1].unk_000[0] = player->pos[0] + sp40; + (player->playerPacticlePool0[arg1].timer * var_f6) + -5.5, -thing, -player->unk_206 * 2); + player->playerPacticlePool0[arg1].pos[0] = player->pos[0] + sp40; sp38 = (player->pos[1] - player->boundingBoxSize) + sp38; - player->playerPacticlePool0[arg1].unk_000[2] = player->pos[2] + sp3C; - player->playerPacticlePool0[arg1].unk_000[1] = player->playerPacticlePool0[arg1].unk_024 + sp38; + player->playerPacticlePool0[arg1].pos[2] = player->pos[2] + sp3C; + player->playerPacticlePool0[arg1].pos[1] = player->playerPacticlePool0[arg1].unk_024 + sp38; } void func_80062F98(Player* player, s16 arg1, s8 arg2, UNUSED s8 arg3) { f32 temp_f0; temp_f0 = player->playerPacticlePool1[arg1].unk_018 / 10.0f; - ++player->playerPacticlePool1[arg1].unk_01E; - player->playerPacticlePool1[arg1].unk_000[1] += temp_f0; + ++player->playerPacticlePool1[arg1].timer; + player->playerPacticlePool1[arg1].pos[1] += temp_f0; if ((player->unk_0CA & 1) == 1) { - player->playerPacticlePool1[arg1].unk_000[1] += (temp_f0 + 0.3); - if ((player->playerPacticlePool1[arg1].unk_01E == 0x10) || - ((D_801652A0[arg2] - player->playerPacticlePool1[arg1].unk_000[1]) < 3.0f)) { + player->playerPacticlePool1[arg1].pos[1] += (temp_f0 + 0.3); + if ((player->playerPacticlePool1[arg1].timer == 0x10) || + ((D_801652A0[arg2] - player->playerPacticlePool1[arg1].pos[1]) < 3.0f)) { player->playerPacticlePool1[arg1].unk_01C = 0; - player->playerPacticlePool1[arg1].unk_01E = 0; - player->playerPacticlePool1[arg1].unk_012 = 0; + player->playerPacticlePool1[arg1].timer = 0; + player->playerPacticlePool1[arg1].type = NO_PARTICLE; } - } else if ((player->playerPacticlePool1[arg1].unk_01E == 0xA) || - ((D_801652A0[arg2] - player->playerPacticlePool1[arg1].unk_000[1]) < 3.0f)) { + } else if ((player->playerPacticlePool1[arg1].timer == 0xA) || + ((D_801652A0[arg2] - player->playerPacticlePool1[arg1].pos[1]) < 3.0f)) { player->playerPacticlePool1[arg1].unk_01C = 0; - player->playerPacticlePool1[arg1].unk_01E = 0; - player->playerPacticlePool1[arg1].unk_012 = 0; + player->playerPacticlePool1[arg1].timer = 0; + player->playerPacticlePool1[arg1].type = NO_PARTICLE; } } void func_800630C0(Player* player, s16 arg1, s8 arg2, UNUSED s8 arg3) { - ++player->playerPacticlePool0[arg1].unk_01E; - player->playerPacticlePool0[arg1].unk_000[2] = - player->pos[2] + coss(player->playerPacticlePool0[arg1].unk_020) * -5.8; - player->playerPacticlePool0[arg1].unk_000[0] = - player->pos[0] + sins(player->playerPacticlePool0[arg1].unk_020) * -5.8; - player->playerPacticlePool0[arg1].unk_000[1] = D_801652A0[arg2]; - if (player->playerPacticlePool0[arg1].unk_01E == 15) { + ++player->playerPacticlePool0[arg1].timer; + player->playerPacticlePool0[arg1].pos[2] = player->pos[2] + coss(player->playerPacticlePool0[arg1].unk_020) * -5.8; + player->playerPacticlePool0[arg1].pos[0] = player->pos[0] + sins(player->playerPacticlePool0[arg1].unk_020) * -5.8; + player->playerPacticlePool0[arg1].pos[1] = D_801652A0[arg2]; + if (player->playerPacticlePool0[arg1].timer == 15) { player->playerPacticlePool0[arg1].unk_01C = 0; - player->playerPacticlePool0[arg1].unk_01E = 0; - player->playerPacticlePool0[arg1].unk_012 = 0; + player->playerPacticlePool0[arg1].timer = 0; + player->playerPacticlePool0[arg1].type = NO_PARTICLE; } } void func_800631A8(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { - ++player->playerPacticlePool0[arg1].unk_01E; - if ((s32) player->playerPacticlePool0[arg1].unk_01E < 9) { - if ((player->playerPacticlePool0[arg1].unk_01E & 1) != 0) { + ++player->playerPacticlePool0[arg1].timer; + if ((s32) player->playerPacticlePool0[arg1].timer < 9) { + if ((player->playerPacticlePool0[arg1].timer & 1) != 0) { player->playerPacticlePool0[arg1].unk_038 = 8; } else { player->playerPacticlePool0[arg1].unk_038 = 0; } - } else if (((player->playerPacticlePool0[arg1].unk_01E & 1) != 0) || - ((player->playerPacticlePool0[arg1].unk_01E >= 9) && (player->playerPacticlePool0[arg1].unk_01E < 12))) { + } else if (((player->playerPacticlePool0[arg1].timer & 1) != 0) || + ((player->playerPacticlePool0[arg1].timer >= 9) && (player->playerPacticlePool0[arg1].timer < 12))) { player->playerPacticlePool0[arg1].unk_038 = 0xFF; - } else if ((player->playerPacticlePool0[arg1].unk_01E & 2) != 0) { + } else if ((player->playerPacticlePool0[arg1].timer & 2) != 0) { player->playerPacticlePool0[arg1].unk_038 = 8; } else { player->playerPacticlePool0[arg1].unk_038 = 0; } player->playerPacticlePool0[arg1].unk_03A = 0; player->playerPacticlePool0[arg1].unk_03C = 0; - if ((s32) player->playerPacticlePool0[arg1].unk_01E >= 0x19) { + if ((s32) player->playerPacticlePool0[arg1].timer >= 0x19) { player->playerPacticlePool0[arg1].unk_01C = 0; - player->playerPacticlePool0[arg1].unk_01E = 0; - player->playerPacticlePool0[arg1].unk_012 = 0; + player->playerPacticlePool0[arg1].timer = 0; + player->playerPacticlePool0[arg1].type = NO_PARTICLE; } } void func_80063268(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { - if (player->playerPacticlePool0[arg1].unk_01E >= 0x1E) { + if (player->playerPacticlePool0[arg1].timer >= 0x1E) { player->playerPacticlePool0[arg1].unk_040 += 0x1FFE; } else { player->playerPacticlePool0[arg1].unk_040 += 0x1554; } player->playerPacticlePool0[arg1].unk_024 += 0.25; - player->playerPacticlePool0[arg1].unk_000[2] = + player->playerPacticlePool0[arg1].pos[2] = player->pos[2] + (coss((player->playerPacticlePool0[arg1].unk_020 + player->playerPacticlePool0[arg1].unk_040)) * 5.5); - player->playerPacticlePool0[arg1].unk_000[0] = + player->playerPacticlePool0[arg1].pos[0] = player->pos[0] + (sins((player->playerPacticlePool0[arg1].unk_020 + player->playerPacticlePool0[arg1].unk_040)) * 5.5); - player->playerPacticlePool0[arg1].unk_000[1] = - ((player->pos[1] - 5.0f) + player->playerPacticlePool0[arg1].unk_024); - ++player->playerPacticlePool0[arg1].unk_01E; + player->playerPacticlePool0[arg1].pos[1] = ((player->pos[1] - 5.0f) + player->playerPacticlePool0[arg1].unk_024); + ++player->playerPacticlePool0[arg1].timer; player->playerPacticlePool0[arg1].unk_00C += 0.05; player->playerPacticlePool0[arg1].unk_03E -= 5; @@ -4388,46 +4356,46 @@ void func_80063268(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { player->playerPacticlePool0[arg1].unk_03E = 0; } - if ((s32) player->playerPacticlePool0[arg1].unk_01E >= 0x28) { + if ((s32) player->playerPacticlePool0[arg1].timer >= 0x28) { player->playerPacticlePool0[arg1].unk_01C = 0; - player->playerPacticlePool0[arg1].unk_01E = 0; - player->playerPacticlePool0[arg1].unk_012 = 0; + player->playerPacticlePool0[arg1].timer = 0; + player->playerPacticlePool0[arg1].type = NO_PARTICLE; } } void func_80063408(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { if (player->playerPacticlePool1[arg1].unk_010 == 1) { - player->playerPacticlePool1[arg1].unk_000[2] = + player->playerPacticlePool1[arg1].pos[2] = player->tyres[BACK_LEFT].pos[2] + - (player->playerPacticlePool1[arg1].unk_01E * -7) * coss(player->playerPacticlePool1[arg1].unk_020); - player->playerPacticlePool1[arg1].unk_000[0] = + (player->playerPacticlePool1[arg1].timer * -7) * coss(player->playerPacticlePool1[arg1].unk_020); + player->playerPacticlePool1[arg1].pos[0] = player->tyres[BACK_LEFT].pos[0] + - (player->playerPacticlePool1[arg1].unk_01E * -7) * sins(player->playerPacticlePool1[arg1].unk_020); + (player->playerPacticlePool1[arg1].timer * -7) * sins(player->playerPacticlePool1[arg1].unk_020); } else { - player->playerPacticlePool1[arg1].unk_000[2] = + player->playerPacticlePool1[arg1].pos[2] = player->tyres[BACK_RIGHT].pos[2] + - (player->playerPacticlePool1[arg1].unk_01E * -7) * coss(player->playerPacticlePool1[arg1].unk_020); - player->playerPacticlePool1[arg1].unk_000[0] = + (player->playerPacticlePool1[arg1].timer * -7) * coss(player->playerPacticlePool1[arg1].unk_020); + player->playerPacticlePool1[arg1].pos[0] = player->tyres[BACK_RIGHT].pos[0] + - (player->playerPacticlePool1[arg1].unk_01E * -7) * sins(player->playerPacticlePool1[arg1].unk_020); + (player->playerPacticlePool1[arg1].timer * -7) * sins(player->playerPacticlePool1[arg1].unk_020); } - ++player->playerPacticlePool1[arg1].unk_01E; - player->playerPacticlePool1[arg1].unk_000[1] += 1.0f; + ++player->playerPacticlePool1[arg1].timer; + player->playerPacticlePool1[arg1].pos[1] += 1.0f; if (((player->effects & 0x80) != 0) || ((player->effects & 0x40) != 0)) { player->playerPacticlePool1[arg1].unk_01C = 0; - player->playerPacticlePool1[arg1].unk_01E = 0; + player->playerPacticlePool1[arg1].timer = 0; } - if (player->playerPacticlePool1[arg1].unk_01E == 8) { - player->playerPacticlePool1[arg1].unk_01E = 0; + if (player->playerPacticlePool1[arg1].timer == 8) { + player->playerPacticlePool1[arg1].timer = 0; player->playerPacticlePool1[arg1].unk_01C = 0; - player->playerPacticlePool1[arg1].unk_012 = 0; + player->playerPacticlePool1[arg1].type = NO_PARTICLE; } player->playerPacticlePool1[arg1].unk_00C += 0.08; - if (player->playerPacticlePool1[arg1].unk_01E >= 4) { + if (player->playerPacticlePool1[arg1].timer >= 4) { player->playerPacticlePool1[arg1].unk_03E -= 16; } @@ -4444,60 +4412,60 @@ void func_800635D4(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { if (player->playerPacticlePool1[arg1].unk_010 == 1) { if ((player->effects & LIGHTNING_EFFECT)) { func_80062B18(&sp44, &sp40, &sp3C, -2.0f, 0.0f, - (-player->playerPacticlePool1[arg1].unk_01E * (player->unk_094 / 18.0f) * 216.0f) / 16, + (-player->playerPacticlePool1[arg1].timer * (player->unk_094 / 18.0f) * 216.0f) / 16, -player->playerPacticlePool1[arg1].unk_020, 2 * -player->unk_206); - player->playerPacticlePool1[arg1].unk_000[0] = player->tyres[BACK_LEFT].pos[0] + sp44; - player->playerPacticlePool1[arg1].unk_000[2] = player->tyres[BACK_LEFT].pos[2] + sp3C; + player->playerPacticlePool1[arg1].pos[0] = player->tyres[BACK_LEFT].pos[0] + sp44; + player->playerPacticlePool1[arg1].pos[2] = player->tyres[BACK_LEFT].pos[2] + sp3C; } else { - player->playerPacticlePool1[arg1].unk_000[2] = + player->playerPacticlePool1[arg1].pos[2] = player->tyres[BACK_LEFT].pos[2] + - ((-player->playerPacticlePool1[arg1].unk_01E * (player->unk_094 / 18.0f) * 216.0f) / 16) * + ((-player->playerPacticlePool1[arg1].timer * (player->unk_094 / 18.0f) * 216.0f) / 16) * coss(player->playerPacticlePool1[arg1].unk_020); - player->playerPacticlePool1[arg1].unk_000[0] = + player->playerPacticlePool1[arg1].pos[0] = player->tyres[BACK_LEFT].pos[0] + - ((-player->playerPacticlePool1[arg1].unk_01E * (player->unk_094 / 18.0f) * 216.0f) / 16) * + ((-player->playerPacticlePool1[arg1].timer * (player->unk_094 / 18.0f) * 216.0f) / 16) * sins(player->playerPacticlePool1[arg1].unk_020); } } else if ((player->effects & LIGHTNING_EFFECT)) { func_80062B18(&sp44, &sp40, &sp3C, 2.0f, 0.0f, - (-player->playerPacticlePool1[arg1].unk_01E * (player->unk_094 / 18.0f) * 216.0f) / 16, + (-player->playerPacticlePool1[arg1].timer * (player->unk_094 / 18.0f) * 216.0f) / 16, -player->playerPacticlePool1[arg1].unk_020, 2 * -player->unk_206); - player->playerPacticlePool1[arg1].unk_000[0] = player->tyres[BACK_RIGHT].pos[0] + sp44; - player->playerPacticlePool1[arg1].unk_000[2] = player->tyres[BACK_RIGHT].pos[2] + sp3C; + player->playerPacticlePool1[arg1].pos[0] = player->tyres[BACK_RIGHT].pos[0] + sp44; + player->playerPacticlePool1[arg1].pos[2] = player->tyres[BACK_RIGHT].pos[2] + sp3C; } else { - player->playerPacticlePool1[arg1].unk_000[2] = + player->playerPacticlePool1[arg1].pos[2] = player->tyres[BACK_RIGHT].pos[2] + - ((-player->playerPacticlePool1[arg1].unk_01E * (player->unk_094 / 18.0f) * 216.0f) / 16) * + ((-player->playerPacticlePool1[arg1].timer * (player->unk_094 / 18.0f) * 216.0f) / 16) * coss(player->playerPacticlePool1[arg1].unk_020); - player->playerPacticlePool1[arg1].unk_000[0] = + player->playerPacticlePool1[arg1].pos[0] = player->tyres[BACK_RIGHT].pos[0] + - ((-player->playerPacticlePool1[arg1].unk_01E * (player->unk_094 / 18.0f) * 216.0f) / 16) * + ((-player->playerPacticlePool1[arg1].timer * (player->unk_094 / 18.0f) * 216.0f) / 16) * sins(player->playerPacticlePool1[arg1].unk_020); } - ++player->playerPacticlePool1[arg1].unk_01E; - player->playerPacticlePool1[arg1].unk_000[1] += 0.2; + ++player->playerPacticlePool1[arg1].timer; + player->playerPacticlePool1[arg1].pos[1] += 0.2; if (((player->effects & 0x80) != 0) || ((player->effects & 0x40) != 0)) { player->playerPacticlePool1[arg1].unk_01C = 0; - player->playerPacticlePool1[arg1].unk_01E = 0; + player->playerPacticlePool1[arg1].timer = 0; } - if (player->playerPacticlePool1[arg1].unk_01E == 8) { + if (player->playerPacticlePool1[arg1].timer == 8) { player->playerPacticlePool1[arg1].unk_01C = 0; - player->playerPacticlePool1[arg1].unk_01E = 0; - player->playerPacticlePool1[arg1].unk_012 = 0; + player->playerPacticlePool1[arg1].timer = 0; + player->playerPacticlePool1[arg1].type = NO_PARTICLE; } player->playerPacticlePool1[arg1].unk_00C += 0.1; if (player->playerPacticlePool1[arg1].unk_040 == 0) { - if (player->playerPacticlePool1[arg1].unk_01E >= 4) { + if (player->playerPacticlePool1[arg1].timer >= 4) { player->playerPacticlePool1[arg1].unk_03E -= 12; } if (player->playerPacticlePool1[arg1].unk_03E <= 0) { player->playerPacticlePool1[arg1].unk_03E = 0; } } else { - if (player->playerPacticlePool1[arg1].unk_01E >= 4) { + if (player->playerPacticlePool1[arg1].timer >= 4) { player->playerPacticlePool1[arg1].unk_03E -= 16; } if (player->playerPacticlePool1[arg1].unk_03E <= 0) { @@ -4508,38 +4476,38 @@ void func_800635D4(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { void func_800639DC(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { if (player->playerPacticlePool1[arg1].unk_010 == 1) { - player->playerPacticlePool1[arg1].unk_000[2] = + player->playerPacticlePool1[arg1].pos[2] = player->tyres[BACK_LEFT].pos[2] + - (-1.8f * player->playerPacticlePool1[arg1].unk_01E) * coss(player->playerPacticlePool1[arg1].unk_020); - player->playerPacticlePool1[arg1].unk_000[0] = + (-1.8f * player->playerPacticlePool1[arg1].timer) * coss(player->playerPacticlePool1[arg1].unk_020); + player->playerPacticlePool1[arg1].pos[0] = player->tyres[BACK_LEFT].pos[0] + - (-1.8f * player->playerPacticlePool1[arg1].unk_01E) * sins(player->playerPacticlePool1[arg1].unk_020); + (-1.8f * player->playerPacticlePool1[arg1].timer) * sins(player->playerPacticlePool1[arg1].unk_020); } else { - player->playerPacticlePool1[arg1].unk_000[2] = + player->playerPacticlePool1[arg1].pos[2] = player->tyres[BACK_RIGHT].pos[2] + - (-1.8f * player->playerPacticlePool1[arg1].unk_01E) * coss(player->playerPacticlePool1[arg1].unk_020); - player->playerPacticlePool1[arg1].unk_000[0] = + (-1.8f * player->playerPacticlePool1[arg1].timer) * coss(player->playerPacticlePool1[arg1].unk_020); + player->playerPacticlePool1[arg1].pos[0] = player->tyres[BACK_RIGHT].pos[0] + - (-1.8f * player->playerPacticlePool1[arg1].unk_01E) * sins(player->playerPacticlePool1[arg1].unk_020); + (-1.8f * player->playerPacticlePool1[arg1].timer) * sins(player->playerPacticlePool1[arg1].unk_020); } - ++player->playerPacticlePool1[arg1].unk_01E; - player->playerPacticlePool1[arg1].unk_000[1] += 0.3; - if (player->playerPacticlePool1[arg1].unk_01E == 8) { + ++player->playerPacticlePool1[arg1].timer; + player->playerPacticlePool1[arg1].pos[1] += 0.3; + if (player->playerPacticlePool1[arg1].timer == 8) { player->playerPacticlePool1[arg1].unk_01C = 0; - player->playerPacticlePool1[arg1].unk_01E = 0; - player->playerPacticlePool1[arg1].unk_012 = 0; + player->playerPacticlePool1[arg1].timer = 0; + player->playerPacticlePool1[arg1].type = NO_PARTICLE; } player->playerPacticlePool1[arg1].unk_00C += 0.15; if (player->playerPacticlePool1[arg1].unk_040 == 0) { - if ((s32) player->playerPacticlePool1[arg1].unk_01E >= 4) { + if ((s32) player->playerPacticlePool1[arg1].timer >= 4) { --player->playerPacticlePool1[arg1].unk_03E; } if ((s32) player->playerPacticlePool1[arg1].unk_03E <= 0) { player->playerPacticlePool1[arg1].unk_03E = 0; } } else { - if ((s32) player->playerPacticlePool1[arg1].unk_01E >= 4) { + if ((s32) player->playerPacticlePool1[arg1].timer >= 4) { player->playerPacticlePool1[arg1].unk_03E -= 16; } if ((s32) player->playerPacticlePool1[arg1].unk_03E <= 0) { @@ -4551,27 +4519,27 @@ void func_800639DC(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { void func_80063BD4(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { if (player->playerPacticlePool1[arg1].unk_010 == 1) { - player->playerPacticlePool1[arg1].unk_000[2] = + player->playerPacticlePool1[arg1].pos[2] = player->tyres[BACK_LEFT].pos[2] + - (-2 * player->playerPacticlePool1[arg1].unk_01E * coss(player->playerPacticlePool1[arg1].unk_020)); - player->playerPacticlePool1[arg1].unk_000[0] = + (-2 * player->playerPacticlePool1[arg1].timer * coss(player->playerPacticlePool1[arg1].unk_020)); + player->playerPacticlePool1[arg1].pos[0] = player->tyres[BACK_LEFT].pos[0] + - (-2 * player->playerPacticlePool1[arg1].unk_01E * sins(player->playerPacticlePool1[arg1].unk_020)); + (-2 * player->playerPacticlePool1[arg1].timer * sins(player->playerPacticlePool1[arg1].unk_020)); } else { - player->playerPacticlePool1[arg1].unk_000[2] = + player->playerPacticlePool1[arg1].pos[2] = player->tyres[BACK_RIGHT].pos[2] + - (-2 * player->playerPacticlePool1[arg1].unk_01E * coss(player->playerPacticlePool1[arg1].unk_020)); - player->playerPacticlePool1[arg1].unk_000[0] = + (-2 * player->playerPacticlePool1[arg1].timer * coss(player->playerPacticlePool1[arg1].unk_020)); + player->playerPacticlePool1[arg1].pos[0] = player->tyres[BACK_RIGHT].pos[0] + - (-2 * player->playerPacticlePool1[arg1].unk_01E * sins(player->playerPacticlePool1[arg1].unk_020)); + (-2 * player->playerPacticlePool1[arg1].timer * sins(player->playerPacticlePool1[arg1].unk_020)); } - ++player->playerPacticlePool1[arg1].unk_01E; - player->playerPacticlePool1[arg1].unk_000[1] += 0.2; - if (player->playerPacticlePool1[arg1].unk_01E == 8) { + ++player->playerPacticlePool1[arg1].timer; + player->playerPacticlePool1[arg1].pos[1] += 0.2; + if (player->playerPacticlePool1[arg1].timer == 8) { player->playerPacticlePool1[arg1].unk_01C = 0; - player->playerPacticlePool1[arg1].unk_01E = 0; - player->playerPacticlePool1[arg1].unk_012 = 0; + player->playerPacticlePool1[arg1].timer = 0; + player->playerPacticlePool1[arg1].type = NO_PARTICLE; } player->playerPacticlePool1[arg1].unk_018 = 2.0f; @@ -4580,38 +4548,38 @@ void func_80063BD4(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { void func_80063D58(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { if (player->playerPacticlePool1[arg1].unk_010 == 1) { - player->playerPacticlePool1[arg1].unk_000[2] = + player->playerPacticlePool1[arg1].pos[2] = player->tyres[BACK_LEFT].pos[2] + - ((-player->playerPacticlePool1[arg1].unk_01E * (player->unk_094 / 18.0f) * 216.0f) / 20.0f) * + ((-player->playerPacticlePool1[arg1].timer * (player->unk_094 / 18.0f) * 216.0f) / 20.0f) * coss(player->playerPacticlePool1[arg1].unk_020); - player->playerPacticlePool1[arg1].unk_000[0] = + player->playerPacticlePool1[arg1].pos[0] = player->tyres[BACK_LEFT].pos[0] + - ((-player->playerPacticlePool1[arg1].unk_01E * (player->unk_094 / 18.0f) * 216.0f) / 20.0f) * + ((-player->playerPacticlePool1[arg1].timer * (player->unk_094 / 18.0f) * 216.0f) / 20.0f) * sins(player->playerPacticlePool1[arg1].unk_020); } else { - player->playerPacticlePool1[arg1].unk_000[2] = + player->playerPacticlePool1[arg1].pos[2] = player->tyres[BACK_RIGHT].pos[2] + - ((-player->playerPacticlePool1[arg1].unk_01E * (player->unk_094 / 18.0f) * 216.0f) / 20.0f) * + ((-player->playerPacticlePool1[arg1].timer * (player->unk_094 / 18.0f) * 216.0f) / 20.0f) * coss(player->playerPacticlePool1[arg1].unk_020); - player->playerPacticlePool1[arg1].unk_000[0] = + player->playerPacticlePool1[arg1].pos[0] = player->tyres[BACK_RIGHT].pos[0] + - ((-player->playerPacticlePool1[arg1].unk_01E * (player->unk_094 / 18.0f) * 216.0f) / 20.0f) * + ((-player->playerPacticlePool1[arg1].timer * (player->unk_094 / 18.0f) * 216.0f) / 20.0f) * sins(player->playerPacticlePool1[arg1].unk_020); } - ++player->playerPacticlePool1[arg1].unk_01E; - if (player->playerPacticlePool1[arg1].unk_01E == 8) { - player->playerPacticlePool1[arg1].unk_01E = 0; + ++player->playerPacticlePool1[arg1].timer; + if (player->playerPacticlePool1[arg1].timer == 8) { + player->playerPacticlePool1[arg1].timer = 0; player->playerPacticlePool1[arg1].unk_01C = 0; - player->playerPacticlePool1[arg1].unk_012 = 0; + player->playerPacticlePool1[arg1].type = NO_PARTICLE; } player->playerPacticlePool1[arg1].unk_00C += 0.2; - if (player->playerPacticlePool1[arg1].unk_01E >= 4) { + if (player->playerPacticlePool1[arg1].timer >= 4) { player->playerPacticlePool1[arg1].unk_03E -= 18; - player->playerPacticlePool1[arg1].unk_000[1] -= 0.1; + player->playerPacticlePool1[arg1].pos[1] -= 0.1; } else { - player->playerPacticlePool1[arg1].unk_000[1] += 0.4; + player->playerPacticlePool1[arg1].pos[1] += 0.4; } if (player->playerPacticlePool1[arg1].unk_03E <= 0) { @@ -4626,23 +4594,21 @@ void func_80063FBC(Player* player, s16 arg1, UNUSED s32 arg2, UNUSED s32 arg3) { if (player->playerPacticlePool1[arg1].unk_010 == 1) { func_80062B18(&sp3C, &sp34, &sp38, 3.0f, 0.0f, - -5.5 - - (player->playerPacticlePool1[arg1].unk_01E * (((player->unk_094 / 18.0f) * 216.0f) / 15.0f)), + -5.5 - (player->playerPacticlePool1[arg1].timer * (((player->unk_094 / 18.0f) * 216.0f) / 15.0f)), -player->playerPacticlePool1[arg1].unk_020, 0); } else { func_80062B18(&sp3C, &sp34, &sp38, -3.0f, 0.0f, - -5.5 - - (player->playerPacticlePool1[arg1].unk_01E * (((player->unk_094 / 18.0f) * 216.0f) / 15.0f)), + -5.5 - (player->playerPacticlePool1[arg1].timer * (((player->unk_094 / 18.0f) * 216.0f) / 15.0f)), -player->playerPacticlePool1[arg1].unk_020, 0); } - player->playerPacticlePool1[arg1].unk_000[0] = player->pos[0] + sp3C; - player->playerPacticlePool1[arg1].unk_000[2] = player->pos[2] + sp38; - player->playerPacticlePool1[arg1].unk_000[1] = (player->pos[1] - player->boundingBoxSize) + sp34; - player->playerPacticlePool1[arg1].unk_01E++; - if (player->playerPacticlePool1[arg1].unk_01E == 6) { + player->playerPacticlePool1[arg1].pos[0] = player->pos[0] + sp3C; + player->playerPacticlePool1[arg1].pos[2] = player->pos[2] + sp38; + player->playerPacticlePool1[arg1].pos[1] = (player->pos[1] - player->boundingBoxSize) + sp34; + player->playerPacticlePool1[arg1].timer++; + if (player->playerPacticlePool1[arg1].timer == 6) { player->playerPacticlePool1[arg1].unk_01C = 0; - player->playerPacticlePool1[arg1].unk_01E = 0; - player->playerPacticlePool1[arg1].unk_012 = 0; + player->playerPacticlePool1[arg1].timer = 0; + player->playerPacticlePool1[arg1].type = NO_PARTICLE; } } @@ -4657,17 +4623,17 @@ void func_80064184(Player* player, s16 arg1, s8 arg2, UNUSED s8 arg3) { } func_80062B18(&sp44, &sp40, &sp3C, 0.0f, sp40, - -4.0f + ((-player->playerPacticlePool0[arg1].unk_01E * (player->unk_094 / 18.0f) * 216.0f) / 10.0f), + -4.0f + ((-player->playerPacticlePool0[arg1].timer * (player->unk_094 / 18.0f) * 216.0f) / 10.0f), -player->playerPacticlePool0[arg1].unk_020, 2 * -player->unk_206); - player->playerPacticlePool0[arg1].unk_000[0] = player->pos[0] + sp44; - player->playerPacticlePool0[arg1].unk_000[2] = player->pos[2] + sp3C; - player->playerPacticlePool0[arg1].unk_000[1] = player->pos[1] + sp40; - ++player->playerPacticlePool0[arg1].unk_01E; - if ((player->playerPacticlePool0[arg1].unk_01E == 12) || + player->playerPacticlePool0[arg1].pos[0] = player->pos[0] + sp44; + player->playerPacticlePool0[arg1].pos[2] = player->pos[2] + sp3C; + player->playerPacticlePool0[arg1].pos[1] = player->pos[1] + sp40; + ++player->playerPacticlePool0[arg1].timer; + if ((player->playerPacticlePool0[arg1].timer == 12) || (D_801652A0[arg2] <= (player->pos[1] - player->boundingBoxSize))) { player->playerPacticlePool0[arg1].unk_01C = 0; - player->playerPacticlePool0[arg1].unk_01E = 0; - player->playerPacticlePool0[arg1].unk_012 = 0; + player->playerPacticlePool0[arg1].timer = 0; + player->playerPacticlePool0[arg1].type = NO_PARTICLE; } player->playerPacticlePool0[arg1].unk_018 = 2.0f; player->playerPacticlePool0[arg1].unk_00C -= 0.35; @@ -4682,17 +4648,17 @@ void func_80064184(Player* player, s16 arg1, s8 arg2, UNUSED s8 arg3) { } void func_800643A8(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { - player->playerPacticlePool1[arg1].unk_000[2] = player->pos[2] + (-1.2 * player->playerPacticlePool1[arg1].unk_01E * - coss(player->playerPacticlePool1[arg1].unk_020)); - player->playerPacticlePool1[arg1].unk_000[0] = player->pos[0] + (-1.2 * player->playerPacticlePool1[arg1].unk_01E * - sins(player->playerPacticlePool1[arg1].unk_020)); - player->playerPacticlePool1[arg1].unk_000[1] = player->playerPacticlePool1[arg1].unk_000[1] + 0.5; + player->playerPacticlePool1[arg1].pos[2] = player->pos[2] + (-1.2 * player->playerPacticlePool1[arg1].timer * + coss(player->playerPacticlePool1[arg1].unk_020)); + player->playerPacticlePool1[arg1].pos[0] = player->pos[0] + (-1.2 * player->playerPacticlePool1[arg1].timer * + sins(player->playerPacticlePool1[arg1].unk_020)); + player->playerPacticlePool1[arg1].pos[1] = player->playerPacticlePool1[arg1].pos[1] + 0.5; - ++player->playerPacticlePool1[arg1].unk_01E; - if (player->playerPacticlePool1[arg1].unk_01E == 10) { + ++player->playerPacticlePool1[arg1].timer; + if (player->playerPacticlePool1[arg1].timer == 10) { player->playerPacticlePool1[arg1].unk_01C = 0; - player->playerPacticlePool1[arg1].unk_01E = 0; - player->playerPacticlePool1[arg1].unk_012 = 0; + player->playerPacticlePool1[arg1].timer = 0; + player->playerPacticlePool1[arg1].type = NO_PARTICLE; } player->playerPacticlePool1[arg1].unk_00C += 0.2; @@ -4708,24 +4674,24 @@ void func_800644E8(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { s32 thing; UNUSED s32 stackPadding1; - if (player->playerPacticlePool3[arg1].unk_01E >= 9) { - player->playerPacticlePool3[arg1].unk_01E = 9; + if (player->playerPacticlePool3[arg1].timer >= 9) { + player->playerPacticlePool3[arg1].timer = 9; } thing2 = player->playerPacticlePool3[arg1].unk_024; - thing = player->playerPacticlePool3[arg1].unk_01E; - player->playerPacticlePool3[arg1].unk_000[2] = + thing = player->playerPacticlePool3[arg1].timer; + player->playerPacticlePool3[arg1].pos[2] = player->pos[2] + (coss(player->playerPacticlePool3[arg1].unk_020) * (-0.7 * thing)); - player->playerPacticlePool3[arg1].unk_000[0] = + player->playerPacticlePool3[arg1].pos[0] = player->pos[0] + (sins(player->playerPacticlePool3[arg1].unk_020) * (-0.7 * thing)); - player->playerPacticlePool3[arg1].unk_01E++; - player->playerPacticlePool3[arg1].unk_000[1] = + player->playerPacticlePool3[arg1].timer++; + player->playerPacticlePool3[arg1].pos[1] = player->playerPacticlePool3[arg1].unk_028 + (f32) ((thing * thing2) - (0.2 * (thing * thing))); - if (player->playerPacticlePool3[arg1].unk_01E == 0x000A) { - player->playerPacticlePool3[arg1].unk_01E = 0; + if (player->playerPacticlePool3[arg1].timer == 0x000A) { + player->playerPacticlePool3[arg1].timer = 0; player->playerPacticlePool3[arg1].unk_01C = 0; - player->playerPacticlePool3[arg1].unk_012 = 0; + player->playerPacticlePool3[arg1].type = NO_PARTICLE; } - if (player->playerPacticlePool3[arg1].unk_01E >= 7) { + if (player->playerPacticlePool3[arg1].timer >= 7) { player->playerPacticlePool3[arg1].unk_03E -= 0x60; if (player->playerPacticlePool3[arg1].unk_03E <= 0) { player->playerPacticlePool3[arg1].unk_03E = 0; @@ -4739,21 +4705,21 @@ void func_80064664(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { s32 temp_v1; UNUSED s32 stackPadding1; - temp_v1 = player->playerPacticlePool3[arg1].unk_01E; + temp_v1 = player->playerPacticlePool3[arg1].timer; temp_f4 = player->playerPacticlePool3[arg1].unk_024; - player->playerPacticlePool3[arg1].unk_000[2] = + player->playerPacticlePool3[arg1].pos[2] = player->pos[2] + (coss(player->playerPacticlePool3[arg1].unk_020) * (-0.6 * temp_v1)); - player->playerPacticlePool3[arg1].unk_000[0] = + player->playerPacticlePool3[arg1].pos[0] = player->pos[0] + (sins(player->playerPacticlePool3[arg1].unk_020) * (-0.6 * temp_v1)); - player->playerPacticlePool3[arg1].unk_01E++; - player->playerPacticlePool3[arg1].unk_000[1] = + player->playerPacticlePool3[arg1].timer++; + player->playerPacticlePool3[arg1].pos[1] = player->playerPacticlePool3[arg1].unk_028 + (f32) ((temp_v1 * temp_f4) - (0.1 * (temp_v1 * temp_v1))); - if (player->playerPacticlePool3[arg1].unk_01E == 0x0019) { - player->playerPacticlePool3[arg1].unk_01E = 0; + if (player->playerPacticlePool3[arg1].timer == 0x0019) { + player->playerPacticlePool3[arg1].timer = 0; player->playerPacticlePool3[arg1].unk_01C = 0; - player->playerPacticlePool3[arg1].unk_012 = 0; + player->playerPacticlePool3[arg1].type = NO_PARTICLE; } - if (player->playerPacticlePool3[arg1].unk_01E >= 7) { + if (player->playerPacticlePool3[arg1].timer >= 7) { player->playerPacticlePool3[arg1].unk_03E -= 0x6; if (player->playerPacticlePool3[arg1].unk_03E <= 0) { player->playerPacticlePool3[arg1].unk_03E = 0; @@ -4763,19 +4729,17 @@ void func_80064664(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { void func_800647C8(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { - ++player->playerPacticlePool3[arg1].unk_01E; - player->playerPacticlePool3[arg1].unk_000[2] = - player->pos[2] + - ((-0.8 * (player->playerPacticlePool3[arg1].unk_01E)) * coss(player->playerPacticlePool3[arg1].unk_020)); - player->playerPacticlePool3[arg1].unk_000[0] = - player->pos[0] + - ((-0.8 * (player->playerPacticlePool3[arg1].unk_01E)) * sins(player->playerPacticlePool3[arg1].unk_020)); - player->playerPacticlePool3[arg1].unk_000[1] = (player->unk_074 + 2.0f); + ++player->playerPacticlePool3[arg1].timer; + player->playerPacticlePool3[arg1].pos[2] = player->pos[2] + ((-0.8 * (player->playerPacticlePool3[arg1].timer)) * + coss(player->playerPacticlePool3[arg1].unk_020)); + player->playerPacticlePool3[arg1].pos[0] = player->pos[0] + ((-0.8 * (player->playerPacticlePool3[arg1].timer)) * + sins(player->playerPacticlePool3[arg1].unk_020)); + player->playerPacticlePool3[arg1].pos[1] = (player->unk_074 + 2.0f); - if (player->playerPacticlePool3[arg1].unk_01E == 14) { + if (player->playerPacticlePool3[arg1].timer == 14) { player->playerPacticlePool3[arg1].unk_01C = 0; - player->playerPacticlePool3[arg1].unk_01E = 0; - player->playerPacticlePool3[arg1].unk_012 = 0; + player->playerPacticlePool3[arg1].timer = 0; + player->playerPacticlePool3[arg1].type = NO_PARTICLE; } player->playerPacticlePool3[arg1].unk_03E -= 12; @@ -4785,30 +4749,30 @@ void func_800647C8(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { } void func_800648E4(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { - ++player->playerPacticlePool3[arg1].unk_01E; + ++player->playerPacticlePool3[arg1].timer; player->playerPacticlePool3[arg1].unk_00C -= 0.06; - player->playerPacticlePool3[arg1].unk_000[1] += 0.1; + player->playerPacticlePool3[arg1].pos[1] += 0.1; player->playerPacticlePool3[arg1].unk_03E -= 12; if (player->playerPacticlePool3[arg1].unk_03E <= 0) { player->playerPacticlePool3[arg1].unk_03E = 0; } - if (player->playerPacticlePool3[arg1].unk_01E == 10) { + if (player->playerPacticlePool3[arg1].timer == 10) { player->playerPacticlePool3[arg1].unk_01C = 0; - player->playerPacticlePool3[arg1].unk_01E = 0; - player->playerPacticlePool3[arg1].unk_012 = 0; + player->playerPacticlePool3[arg1].timer = 0; + player->playerPacticlePool3[arg1].type = NO_PARTICLE; } } void func_80064988(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { - ++player->playerPacticlePool3[arg1].unk_01E; - player->playerPacticlePool3[arg1].unk_000[1] -= 0.3; + ++player->playerPacticlePool3[arg1].timer; + player->playerPacticlePool3[arg1].pos[1] -= 0.3; - if (player->playerPacticlePool3[arg1].unk_01E == 10) { + if (player->playerPacticlePool3[arg1].timer == 10) { player->playerPacticlePool3[arg1].unk_01C = 0; - player->playerPacticlePool3[arg1].unk_01E = 0; - player->playerPacticlePool3[arg1].unk_012 = 0; + player->playerPacticlePool3[arg1].timer = 0; + player->playerPacticlePool3[arg1].type = NO_PARTICLE; } } @@ -4816,23 +4780,21 @@ void func_800649F4(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { f32 temp; temp = player->playerPacticlePool3[arg1].unk_018; - player->playerPacticlePool3[arg1].unk_000[2] = - player->unk_21C + - (((-temp) * player->playerPacticlePool3[arg1].unk_01E) * coss(player->playerPacticlePool3[arg1].unk_020)); - player->playerPacticlePool3[arg1].unk_000[0] = - player->unk_218 + - (((-temp) * player->playerPacticlePool3[arg1].unk_01E) * sins(player->playerPacticlePool3[arg1].unk_020)); - player->playerPacticlePool3[arg1].unk_000[1] = player->pos[1] + player->playerPacticlePool3[arg1].unk_014; + player->playerPacticlePool3[arg1].pos[2] = player->unk_21C + (((-temp) * player->playerPacticlePool3[arg1].timer) * + coss(player->playerPacticlePool3[arg1].unk_020)); + player->playerPacticlePool3[arg1].pos[0] = player->unk_218 + (((-temp) * player->playerPacticlePool3[arg1].timer) * + sins(player->playerPacticlePool3[arg1].unk_020)); + player->playerPacticlePool3[arg1].pos[1] = player->pos[1] + player->playerPacticlePool3[arg1].surfaceType; player->playerPacticlePool3[arg1].unk_00C += 0.04; - ++player->playerPacticlePool3[arg1].unk_01E; - if (player->playerPacticlePool3[arg1].unk_01E == 12) { - player->playerPacticlePool3[arg1].unk_01E = 0; + ++player->playerPacticlePool3[arg1].timer; + if (player->playerPacticlePool3[arg1].timer == 12) { + player->playerPacticlePool3[arg1].timer = 0; player->playerPacticlePool3[arg1].unk_01C = 0; - player->playerPacticlePool3[arg1].unk_012 = 0; + player->playerPacticlePool3[arg1].type = NO_PARTICLE; } - if (player->playerPacticlePool3[arg1].unk_01E >= 9) { + if (player->playerPacticlePool3[arg1].timer >= 9) { player->playerPacticlePool3[arg1].unk_03E -= 0x10; if (player->playerPacticlePool3[arg1].unk_03E <= 0) { player->playerPacticlePool3[arg1].unk_03E = 0; @@ -4844,23 +4806,21 @@ void func_80064B30(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { f32 temp; temp = player->playerPacticlePool3[arg1].unk_018 * 1.2; - player->playerPacticlePool3[arg1].unk_000[2] = - (player->pos[2] + - (-temp * player->playerPacticlePool3[arg1].unk_01E) * (coss(player->playerPacticlePool3[arg1].unk_020))); - player->playerPacticlePool3[arg1].unk_000[0] = - (player->pos[0] + - (-temp * player->playerPacticlePool3[arg1].unk_01E) * (sins(player->playerPacticlePool3[arg1].unk_020))); - player->playerPacticlePool3[arg1].unk_000[1] += 0.1; + player->playerPacticlePool3[arg1].pos[2] = (player->pos[2] + (-temp * player->playerPacticlePool3[arg1].timer) * + (coss(player->playerPacticlePool3[arg1].unk_020))); + player->playerPacticlePool3[arg1].pos[0] = (player->pos[0] + (-temp * player->playerPacticlePool3[arg1].timer) * + (sins(player->playerPacticlePool3[arg1].unk_020))); + player->playerPacticlePool3[arg1].pos[1] += 0.1; - ++player->playerPacticlePool3[arg1].unk_01E; - if (player->playerPacticlePool3[arg1].unk_01E == 10) { - player->playerPacticlePool3[arg1].unk_01E = 0; + ++player->playerPacticlePool3[arg1].timer; + if (player->playerPacticlePool3[arg1].timer == 10) { + player->playerPacticlePool3[arg1].timer = 0; player->playerPacticlePool3[arg1].unk_01C = 0; - player->playerPacticlePool3[arg1].unk_012 = 0; + player->playerPacticlePool3[arg1].type = NO_PARTICLE; } player->playerPacticlePool3[arg1].unk_038 += 1820; - if (player->playerPacticlePool3[arg1].unk_01E >= 6) { + if (player->playerPacticlePool3[arg1].timer >= 6) { player->playerPacticlePool3[arg1].unk_03E -= 16; if (player->playerPacticlePool3[arg1].unk_03E <= 0) { player->playerPacticlePool3[arg1].unk_03E = 0; @@ -4876,22 +4836,22 @@ void func_80064C74(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { player->playerPacticlePool3[arg1].unk_020 -= 2184; } - player->playerPacticlePool3[arg1].unk_000[2] = + player->playerPacticlePool3[arg1].pos[2] = player->pos[2] + (coss(player->playerPacticlePool3[arg1].unk_020 - player->rotation[1] - player->unk_0C0) * 5.0f); - player->playerPacticlePool3[arg1].unk_000[0] = + player->playerPacticlePool3[arg1].pos[0] = player->pos[0] + (sins(player->playerPacticlePool3[arg1].unk_020 - player->rotation[1] - player->unk_0C0) * 5.0f); - player->playerPacticlePool3[arg1].unk_000[1] = player->pos[1] - 1.0f; + player->playerPacticlePool3[arg1].pos[1] = player->pos[1] - 1.0f; player->playerPacticlePool3[arg1].unk_00C += 0.4; - ++player->playerPacticlePool3[arg1].unk_01E; + ++player->playerPacticlePool3[arg1].timer; - if (player->playerPacticlePool3[arg1].unk_01E == 10) { - player->playerPacticlePool3[arg1].unk_01E = 0; + if (player->playerPacticlePool3[arg1].timer == 10) { + player->playerPacticlePool3[arg1].timer = 0; player->playerPacticlePool3[arg1].unk_01C = 0; - player->playerPacticlePool3[arg1].unk_012 = 0; + player->playerPacticlePool3[arg1].type = NO_PARTICLE; } - if (player->playerPacticlePool3[arg1].unk_01E >= 5) { + if (player->playerPacticlePool3[arg1].timer >= 5) { player->playerPacticlePool3[arg1].unk_03E -= 20; if (player->playerPacticlePool3[arg1].unk_03E <= 0) { player->playerPacticlePool3[arg1].unk_03E = 0; @@ -4901,14 +4861,14 @@ void func_80064C74(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { void func_80064DEC(Player* player, UNUSED s8 arg1, UNUSED s8 arg2, s8 arg3) { - player->playerPacticlePool2[arg3].unk_000[1] = player->pos[1]; - ++player->playerPacticlePool2[arg3].unk_01E; + player->playerPacticlePool2[arg3].pos[1] = player->pos[1]; + ++player->playerPacticlePool2[arg3].timer; - if (player->playerPacticlePool2[arg3].unk_01E == 9) { + if (player->playerPacticlePool2[arg3].timer == 9) { player->unk_0B6 &= ~0x0040; player->playerPacticlePool2[arg3].unk_01C = 0; - player->playerPacticlePool2[arg3].unk_01E = 0; - player->playerPacticlePool2[arg3].unk_012 = 0; + player->playerPacticlePool2[arg3].timer = 0; + player->playerPacticlePool2[arg3].type = NO_PARTICLE; } player->playerPacticlePool2[arg3].unk_00C += 0.8; @@ -4918,8 +4878,8 @@ void func_80064DEC(Player* player, UNUSED s8 arg1, UNUSED s8 arg2, s8 arg3) { } void func_80064EA4(Player* player, UNUSED s8 arg1, UNUSED s8 arg2, s8 arg3) { - ++player->playerPacticlePool2[arg3].unk_01E; - if (player->playerPacticlePool2[arg3].unk_01E < 4) { + ++player->playerPacticlePool2[arg3].timer; + if (player->playerPacticlePool2[arg3].timer < 4) { player->playerPacticlePool2[arg3].unk_00C += 1.2; if (player->playerPacticlePool2[arg3].unk_00C >= 3.5) { player->playerPacticlePool2[arg3].unk_00C = 3.5f; @@ -4929,48 +4889,48 @@ void func_80064EA4(Player* player, UNUSED s8 arg1, UNUSED s8 arg2, s8 arg3) { if (player->playerPacticlePool2[arg3].unk_00C <= 0.0f) { player->unk_0B6 &= ~0x1000; player->playerPacticlePool2[arg3].unk_01C = 0; - player->playerPacticlePool2[arg3].unk_01E = 0; - player->playerPacticlePool2[arg3].unk_012 = 0; + player->playerPacticlePool2[arg3].timer = 0; + player->playerPacticlePool2[arg3].type = NO_PARTICLE; } } } void func_80064F88(Player* player, UNUSED s8 arg1, UNUSED s8 arg2, s8 arg3) { - ++player->playerPacticlePool2[arg3].unk_01E; + ++player->playerPacticlePool2[arg3].timer; player->playerPacticlePool2[arg3].unk_00C += 0.15; if (1.2 <= player->playerPacticlePool2[arg3].unk_00C) { player->playerPacticlePool2[arg3].unk_00C = 1.2f; } - if (player->playerPacticlePool2[arg3].unk_01E >= 12) { + if (player->playerPacticlePool2[arg3].timer >= 12) { player->unk_0B6 &= ~0x0800; player->playerPacticlePool2[arg3].unk_01C = 0; - player->playerPacticlePool2[arg3].unk_01E = 0; - player->playerPacticlePool2[arg3].unk_012 = 0; + player->playerPacticlePool2[arg3].timer = 0; + player->playerPacticlePool2[arg3].type = NO_PARTICLE; } } void func_80065030(Player* player, UNUSED s8 arg1, UNUSED s8 arg2, s8 arg3) { - ++player->playerPacticlePool2[arg3].unk_01E; + ++player->playerPacticlePool2[arg3].timer; - player->playerPacticlePool2[arg3].unk_000[1] += 0.8; + player->playerPacticlePool2[arg3].pos[1] += 0.8; player->playerPacticlePool2[arg3].unk_00C += 0.4; if (player->playerPacticlePool2[arg3].unk_00C >= (f64) 1.5) { player->playerPacticlePool2[arg3].unk_00C = 1.5f; } - if (player->playerPacticlePool2[arg3].unk_01E >= 12) { + if (player->playerPacticlePool2[arg3].timer >= 12) { player->unk_0B6 &= ~0x0100; player->playerPacticlePool2[arg3].unk_01C = 0; - player->playerPacticlePool2[arg3].unk_01E = 0; - player->playerPacticlePool2[arg3].unk_012 = 0; + player->playerPacticlePool2[arg3].timer = 0; + player->playerPacticlePool2[arg3].type = NO_PARTICLE; } } void func_800650FC(Player* player, UNUSED s8 arg1, UNUSED s8 arg2, s8 arg3) { - player->playerPacticlePool2[arg3].unk_000[2] = (f32) player->pos[2]; - player->playerPacticlePool2[arg3].unk_000[0] = (f32) player->pos[0]; - player->playerPacticlePool2[arg3].unk_000[1] = (f32) (player->pos[1] + 4.0f); + player->playerPacticlePool2[arg3].pos[2] = (f32) player->pos[2]; + player->playerPacticlePool2[arg3].pos[0] = (f32) player->pos[0]; + player->playerPacticlePool2[arg3].pos[1] = (f32) (player->pos[1] + 4.0f); if ((player->effects & 0x80) == 0x80) { player->playerPacticlePool2[arg3].unk_020 += 4732; } else { @@ -4979,8 +4939,8 @@ void func_800650FC(Player* player, UNUSED s8 arg1, UNUSED s8 arg2, s8 arg3) { if (((player->effects & 0x80) != 0x80) && ((player->effects & 0x40) != 0x40)) { player->playerPacticlePool2[arg3].unk_01C = 0; - player->playerPacticlePool2[arg3].unk_01E = 0; - player->playerPacticlePool2[arg3].unk_012 = 0; + player->playerPacticlePool2[arg3].timer = 0; + player->playerPacticlePool2[arg3].type = NO_PARTICLE; } player->playerPacticlePool2[arg3].unk_00C += 0.08; @@ -4990,8 +4950,8 @@ void func_800650FC(Player* player, UNUSED s8 arg1, UNUSED s8 arg2, s8 arg3) { } void func_800651F4(Player* player, UNUSED s8 arg1, UNUSED s8 arg2, s8 arg3) { - ++player->playerPacticlePool2[arg3].unk_01E; - if (player->playerPacticlePool2[arg3].unk_01E < 8) { + ++player->playerPacticlePool2[arg3].timer; + if (player->playerPacticlePool2[arg3].timer < 8) { player->playerPacticlePool2[arg3].unk_00C += 0.2; if (1.2 <= player->playerPacticlePool2[arg3].unk_00C) { player->playerPacticlePool2[arg3].unk_00C = 1.2f; @@ -5001,8 +4961,8 @@ void func_800651F4(Player* player, UNUSED s8 arg1, UNUSED s8 arg2, s8 arg3) { if (player->playerPacticlePool2[arg3].unk_00C <= 0.0f) { player->unk_0B6 &= ~0x0020; player->playerPacticlePool2[arg3].unk_01C = 0; - player->playerPacticlePool2[arg3].unk_01E = 0; - player->playerPacticlePool2[arg3].unk_012 = 0; + player->playerPacticlePool2[arg3].timer = 0; + player->playerPacticlePool2[arg3].type = NO_PARTICLE; } } } @@ -5031,9 +4991,9 @@ void func_8006538C(Player* player, s8 arg1, s16 arg2, s8 arg3) { s16 envBlue; if (player->playerPacticlePool0[arg2].unk_01C == 1) { - spB4[0] = player->playerPacticlePool0[arg2].unk_000[0]; - spB4[1] = player->playerPacticlePool0[arg2].unk_000[1]; - spB4[2] = player->playerPacticlePool0[arg2].unk_000[2]; + spB4[0] = player->playerPacticlePool0[arg2].pos[0]; + spB4[1] = player->playerPacticlePool0[arg2].pos[1]; + spB4[2] = player->playerPacticlePool0[arg2].pos[2]; spAC[0] = 0; spAC[1] = player->unk_048[arg3]; spAC[2] = 0; @@ -5088,9 +5048,9 @@ void func_800658A0(Player* player, UNUSED s8 arg1, s16 arg2, s8 arg3) { green = player->playerPacticlePool0[arg2].unk_03A; blue = player->playerPacticlePool0[arg2].unk_03C; alpha = player->playerPacticlePool0[arg2].unk_03E; - sp54[0] = player->playerPacticlePool0[arg2].unk_000[0]; - sp54[1] = player->playerPacticlePool0[arg2].unk_000[1]; - sp54[2] = player->playerPacticlePool0[arg2].unk_000[2]; + sp54[0] = player->playerPacticlePool0[arg2].pos[0]; + sp54[1] = player->playerPacticlePool0[arg2].pos[1]; + sp54[2] = player->playerPacticlePool0[arg2].pos[2]; sp4C[0] = 0; sp4C[1] = player->unk_048[arg3]; sp4C[2] = 0; @@ -5164,7 +5124,7 @@ void render_drift_particle(Player* player, UNUSED s8 arg1, s16 arg2, s8 arg3) { GLOBAL_ASM("asm/non_matchings/code_80057C60/render_drift_particle.s") #endif -#ifdef NON_MATCHING +#ifndef NON_MATCHING // https://decomp.me/scratch/KEz08 // Something is very wrong with the handling of prim/evn colors, but I can't figuer out what. void func_80065F0C(Player* player, UNUSED s8 arg1, s16 arg2, s8 arg3) { @@ -5178,15 +5138,15 @@ void func_80065F0C(Player* player, UNUSED s8 arg1, s16 arg2, s8 arg3) { s16 envGreen; s16 envBlue; - if ((player->playerPacticlePool1[arg2].unk_01C == 1) && (player->playerPacticlePool1[arg2].unk_01E != 0)) { - spDC[0] = player->playerPacticlePool1[arg2].unk_000[0]; - spDC[1] = player->playerPacticlePool1[arg2].unk_000[1]; - spDC[2] = player->playerPacticlePool1[arg2].unk_000[2]; + if ((player->playerPacticlePool1[arg2].unk_01C == 1) && (player->playerPacticlePool1[arg2].timer != 0)) { + spDC[0] = player->playerPacticlePool1[arg2].pos[0]; + spDC[1] = player->playerPacticlePool1[arg2].pos[1]; + spDC[2] = player->playerPacticlePool1[arg2].pos[2]; spD4[0] = 0; spD4[1] = player->unk_048[arg3]; spD4[2] = 0; func_800652D4(spDC, spD4, player->playerPacticlePool1[arg2].unk_00C * player->size); - if ((s32) player->playerPacticlePool1[arg2].unk_014 != 8) { + if ((s32) player->playerPacticlePool1[arg2].surfaceType != 8) { primRed = ((D_800E47DC[player->playerPacticlePool1[arg2].unk_038] >> 0x10) & 0xFF) - player->playerPacticlePool1[arg2].unk_03A; primGreen = ((D_800E47DC[player->playerPacticlePool1[arg2].unk_038] >> 0x08) & 0xFF) - @@ -5250,9 +5210,9 @@ void func_800664E0(Player* player, UNUSED s8 arg1, s16 arg2, s8 arg3) { green = player->playerPacticlePool1[arg2].unk_03A; blue = player->playerPacticlePool1[arg2].unk_03C; alpha = player->playerPacticlePool1[arg2].unk_03E; - sp54[0] = player->playerPacticlePool1[arg2].unk_000[0]; - sp54[1] = player->playerPacticlePool1[arg2].unk_000[1]; - sp54[2] = player->playerPacticlePool1[arg2].unk_000[2]; + sp54[0] = player->playerPacticlePool1[arg2].pos[0]; + sp54[1] = player->playerPacticlePool1[arg2].pos[1]; + sp54[2] = player->playerPacticlePool1[arg2].pos[2]; sp4C[0] = 0; sp4C[1] = player->unk_048[arg3]; sp4C[2] = 0; @@ -5281,9 +5241,9 @@ void func_80066714(Player* player, UNUSED s32 arg1, s16 arg2, s8 arg3) { green = player->playerPacticlePool1[arg2].unk_03A; blue = player->playerPacticlePool1[arg2].unk_03C; alpha = player->playerPacticlePool1[arg2].unk_03E; - sp5C[0] = player->playerPacticlePool1[arg2].unk_000[0]; - sp5C[1] = player->playerPacticlePool1[arg2].unk_000[1]; - sp5C[2] = player->playerPacticlePool1[arg2].unk_000[2]; + sp5C[0] = player->playerPacticlePool1[arg2].pos[0]; + sp5C[1] = player->playerPacticlePool1[arg2].pos[1]; + sp5C[2] = player->playerPacticlePool1[arg2].pos[2]; sp54[0] = 0; sp54[1] = player->unk_048[arg3]; sp54[2] = 0; @@ -5314,9 +5274,9 @@ void func_80066998(Player* player, UNUSED s8 arg1, s16 arg2, s8 arg3) { green = player->playerPacticlePool0[arg2].unk_03A; blue = player->playerPacticlePool0[arg2].unk_03C; alpha = player->playerPacticlePool0[arg2].unk_03E; - sp54[0] = player->playerPacticlePool0[arg2].unk_000[0]; - sp54[1] = player->playerPacticlePool0[arg2].unk_000[1]; - sp54[2] = player->playerPacticlePool0[arg2].unk_000[2]; + sp54[0] = player->playerPacticlePool0[arg2].pos[0]; + sp54[1] = player->playerPacticlePool0[arg2].pos[1]; + sp54[2] = player->playerPacticlePool0[arg2].pos[2]; sp4C[0] = 0x4000; sp4C[1] = player->unk_048[arg3]; sp4C[2] = 0; @@ -5399,9 +5359,9 @@ void func_80067280(Player* player, UNUSED s8 arg1, s16 arg2, s8 arg3) { green = player->playerPacticlePool3[arg2].unk_03A; blue = player->playerPacticlePool3[arg2].unk_03C; alpha = player->playerPacticlePool3[arg2].unk_03E; - sp7C[0] = player->playerPacticlePool3[arg2].unk_000[0]; - sp7C[1] = player->playerPacticlePool3[arg2].unk_000[1]; - sp7C[2] = player->playerPacticlePool3[arg2].unk_000[2]; + sp7C[0] = player->playerPacticlePool3[arg2].pos[0]; + sp7C[1] = player->playerPacticlePool3[arg2].pos[1]; + sp7C[2] = player->playerPacticlePool3[arg2].pos[2]; sp74[0] = -0x071C; sp74[2] = 0; if (player->playerPacticlePool3[arg2].unk_010 == 1) { @@ -5433,9 +5393,9 @@ void func_80067604(Player* player, UNUSED s8 arg1, s16 arg2, s8 arg3) { UNUSED s32 stackPadding[4]; if (player->playerPacticlePool3[arg2].unk_01C == 1) { - sp8C[0] = player->playerPacticlePool3[arg2].unk_000[0]; - sp8C[1] = player->playerPacticlePool3[arg2].unk_000[1]; - sp8C[2] = player->playerPacticlePool3[arg2].unk_000[2]; + sp8C[0] = player->playerPacticlePool3[arg2].pos[0]; + sp8C[1] = player->playerPacticlePool3[arg2].pos[1]; + sp8C[2] = player->playerPacticlePool3[arg2].pos[2]; sp84[0] = 0; sp84[1] = player->unk_048[arg3]; sp84[2] = 0; @@ -5465,9 +5425,9 @@ void func_80067964(Player* player, UNUSED s8 arg1, f32 arg2, UNUSED s8 arg3, s8 UNUSED s32 stackPadding[2]; if (player->playerPacticlePool2[arg4].unk_01C == 1) { - sp9C[0] = player->playerPacticlePool2[arg4].unk_000[0]; - sp9C[1] = player->playerPacticlePool2[arg4].unk_000[1]; - sp9C[2] = player->playerPacticlePool2[arg4].unk_000[2]; + sp9C[0] = player->playerPacticlePool2[arg4].pos[0]; + sp9C[1] = player->playerPacticlePool2[arg4].pos[1]; + sp9C[2] = player->playerPacticlePool2[arg4].pos[2]; sp94[0] = 0; sp94[1] = player->playerPacticlePool2[arg4].unk_020; sp94[2] = 0; @@ -5552,7 +5512,7 @@ void func_80068310(Player* player, UNUSED s8 arg1, UNUSED f32 arg2, s8 arg3, s8 Vec3s sp94; if (player->playerPacticlePool2[arg4].unk_01C == 1) { - sp9C[1] = player->playerPacticlePool2[arg4].unk_000[1]; + sp9C[1] = player->playerPacticlePool2[arg4].pos[1]; sp9C[2] = player->pos[2] + (coss(player->unk_048[arg3]) * -10.0f); sp9C[0] = player->pos[0] + (sins(player->unk_048[arg3]) * -10.0f); sp94[0] = 0; @@ -5612,8 +5572,8 @@ void func_80068AA4(Player* player, UNUSED s8 arg1, UNUSED f32 arg2, s8 arg3, s8 if ((player->playerPacticlePool2[arg4].unk_01C == 1) && (player->animFrameSelector[arg3] < 0xD)) { sp64[1] = player->pos[1] - 3.0f; - sp64[2] = player->pos[2] + ((-2.5 * player->playerPacticlePool2[arg4].unk_01E) * coss(player->unk_048[arg3])); - sp64[0] = player->pos[0] + ((-2.5 * player->playerPacticlePool2[arg4].unk_01E) * sins(player->unk_048[arg3])); + sp64[2] = player->pos[2] + ((-2.5 * player->playerPacticlePool2[arg4].timer) * coss(player->unk_048[arg3])); + sp64[0] = player->pos[0] + ((-2.5 * player->playerPacticlePool2[arg4].timer) * sins(player->unk_048[arg3])); sp5C[0] = 0; sp5C[1] = player->unk_048[arg3]; sp5C[2] = 0; @@ -5636,7 +5596,7 @@ void func_80068DA0(Player* player, UNUSED s8 arg1, UNUSED f32 arg2, s8 arg3, s8 Vec3s sp94; if ((player->playerPacticlePool2[arg4].unk_01C == 1) && ((s32) player->animFrameSelector[arg3] < 0xD)) { - sp9C[1] = (player->pos[1] - 3.0f) + player->playerPacticlePool2[arg4].unk_000[1]; + sp9C[1] = (player->pos[1] - 3.0f) + player->playerPacticlePool2[arg4].pos[1]; sp9C[2] = player->pos[2] + (coss(player->unk_048[arg3]) * -10.0f); sp9C[0] = player->pos[0] + (sins(player->unk_048[arg3]) * -10.0f); sp94[0] = 0; @@ -5667,9 +5627,9 @@ void func_800691B8(Player* player, UNUSED s8 arg1, s16 arg2, s8 arg3) { if (player->playerPacticlePool3[arg2].unk_01C == 1) { alpha = player->playerPacticlePool3[arg2].unk_03E; - sp5C[0] = player->playerPacticlePool3[arg2].unk_000[0]; - sp5C[1] = player->playerPacticlePool3[arg2].unk_000[1]; - sp5C[2] = player->playerPacticlePool3[arg2].unk_000[2]; + sp5C[0] = player->playerPacticlePool3[arg2].pos[0]; + sp5C[1] = player->playerPacticlePool3[arg2].pos[1]; + sp5C[2] = player->playerPacticlePool3[arg2].pos[2]; sp54[0] = 0; sp54[1] = player->unk_048[arg3]; player->playerPacticlePool3[arg2].unk_03A += 0x1C71; @@ -5709,9 +5669,9 @@ void func_80069444(Player* player, UNUSED s8 arg1, s16 arg2, s8 arg3) { envBlue = D_800E480C[player->playerPacticlePool3[arg2].unk_038] & 0xFF; primAlpha = player->playerPacticlePool3[arg2].unk_03E; - sp74[0] = player->playerPacticlePool3[arg2].unk_000[0]; - sp74[1] = player->playerPacticlePool3[arg2].unk_000[1]; - sp74[2] = player->playerPacticlePool3[arg2].unk_000[2]; + sp74[0] = player->playerPacticlePool3[arg2].pos[0]; + sp74[1] = player->playerPacticlePool3[arg2].pos[1]; + sp74[2] = player->playerPacticlePool3[arg2].pos[2]; sp6C[0] = 0; sp6C[1] = player->unk_048[arg3]; sp6C[2] = 0; @@ -5738,9 +5698,9 @@ void func_800696CC(Player* player, UNUSED s8 arg1, s16 arg2, s8 arg3, f32 arg4) if (player->playerPacticlePool3[arg2].unk_01C == 1) { alpha = player->playerPacticlePool3[arg2].unk_03E; - sp5C[0] = player->playerPacticlePool3[arg2].unk_000[0]; - sp5C[1] = player->playerPacticlePool3[arg2].unk_000[1]; - sp5C[2] = player->playerPacticlePool3[arg2].unk_000[2]; + sp5C[0] = player->playerPacticlePool3[arg2].pos[0]; + sp5C[1] = player->playerPacticlePool3[arg2].pos[1]; + sp5C[2] = player->playerPacticlePool3[arg2].pos[2]; sp54[0] = 0; sp54[1] = player->unk_048[arg3]; sp54[2] = 0; @@ -5765,9 +5725,9 @@ void func_80069938(Player* player, UNUSED s8 arg1, s16 arg2, s8 arg3) { if (player->playerPacticlePool3[arg2].unk_01C == 1) { alpha = player->playerPacticlePool3[arg2].unk_03E; - sp5C[0] = player->playerPacticlePool3[arg2].unk_000[0]; - sp5C[1] = player->playerPacticlePool3[arg2].unk_000[1]; - sp5C[2] = player->playerPacticlePool3[arg2].unk_000[2]; + sp5C[0] = player->playerPacticlePool3[arg2].pos[0]; + sp5C[1] = player->playerPacticlePool3[arg2].pos[1]; + sp5C[2] = player->playerPacticlePool3[arg2].pos[2]; sp54[0] = 0; sp54[1] = player->unk_048[arg3]; sp54[2] = player->playerPacticlePool3[arg2].unk_038; @@ -5798,9 +5758,9 @@ void func_80069BA8(Player* player, UNUSED s8 arg1, s16 arg2, s8 arg3) { green = player->playerPacticlePool3[arg2].unk_03A; blue = player->playerPacticlePool3[arg2].unk_03C; alpha = player->playerPacticlePool3[arg2].unk_03E; - sp54[0] = player->playerPacticlePool3[arg2].unk_000[0]; - sp54[1] = player->playerPacticlePool3[arg2].unk_000[1]; - sp54[2] = player->playerPacticlePool3[arg2].unk_000[2]; + sp54[0] = player->playerPacticlePool3[arg2].pos[0]; + sp54[1] = player->playerPacticlePool3[arg2].pos[1]; + sp54[2] = player->playerPacticlePool3[arg2].pos[2]; sp4C[0] = 0; sp4C[1] = player->unk_048[arg3]; sp4C[2] = 0; @@ -5821,9 +5781,9 @@ void func_80069DB8(Player* player, UNUSED s8 arg1, s16 arg2, s8 arg3) { UNUSED s32 stackPadding[2]; if (player->playerPacticlePool3[arg2].unk_01C == 1) { - sp5C[0] = player->playerPacticlePool3[arg2].unk_000[0]; - sp5C[1] = player->playerPacticlePool3[arg2].unk_000[1]; - sp5C[2] = player->playerPacticlePool3[arg2].unk_000[2]; + sp5C[0] = player->playerPacticlePool3[arg2].pos[0]; + sp5C[1] = player->playerPacticlePool3[arg2].pos[1]; + sp5C[2] = player->playerPacticlePool3[arg2].pos[2]; sp54[0] = 0; sp54[1] = player->unk_048[arg3]; sp54[2] = 0; @@ -5846,9 +5806,9 @@ void func_8006A01C(Player* player, UNUSED s8 arg1, s16 arg2, s8 arg3) { Vec3s sp4C; if (player->playerPacticlePool0[arg2].unk_01C == 1) { - sp54[0] = player->playerPacticlePool1[arg2].unk_000[0]; - sp54[1] = player->playerPacticlePool1[arg2].unk_000[1]; - sp54[2] = player->playerPacticlePool1[arg2].unk_000[2]; + sp54[0] = player->playerPacticlePool1[arg2].pos[0]; + sp54[1] = player->playerPacticlePool1[arg2].pos[1]; + sp54[2] = player->playerPacticlePool1[arg2].pos[2]; sp4C[0] = 0; sp4C[1] = player->unk_048[arg3]; sp4C[2] = 0; @@ -5878,18 +5838,18 @@ void func_8006A280(Player* player, UNUSED s8 arg1, s16 arg2, s8 arg3) { red = player->playerPacticlePool0[arg2].unk_038; green = player->playerPacticlePool0[arg2].unk_03A; blue = player->playerPacticlePool0[arg2].unk_03C; - sp5C[0] = player->playerPacticlePool0[arg2].unk_000[0]; - sp5C[1] = player->playerPacticlePool0[arg2].unk_000[1]; - sp5C[2] = player->playerPacticlePool0[arg2].unk_000[2]; + sp5C[0] = player->playerPacticlePool0[arg2].pos[0]; + sp5C[1] = player->playerPacticlePool0[arg2].pos[1]; + sp5C[2] = player->playerPacticlePool0[arg2].pos[2]; sp54[0] = 0; sp54[1] = player->unk_048[arg3]; sp54[2] = 0; func_800652D4(sp5C, sp54, player->playerPacticlePool0[arg2].unk_00C * player->size); gSPDisplayList(gDisplayListHead++, D_0D008D58); gDPSetTextureLUT(gDisplayListHead++, G_TT_NONE); - gDPLoadTextureBlock_4b(gDisplayListHead++, *D_800E47A0[player->playerPacticlePool0[arg2].unk_01E], G_IM_FMT_I, - 64, 64, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, - G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); + gDPLoadTextureBlock_4b(gDisplayListHead++, *D_800E47A0[player->playerPacticlePool0[arg2].timer], G_IM_FMT_I, 64, + 64, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, + G_TX_NOLOD, G_TX_NOLOD); func_8004B414(red, green, blue, 0x000000FF); gDPSetRenderMode(gDisplayListHead++, G_RM_ZB_CLD_SURF, G_RM_ZB_CLD_SURF2); gSPVertex(gDisplayListHead++, D_800E8780, 4, 0); @@ -6304,7 +6264,7 @@ void func_8006C6AC(Player* player, s16 arg1, s8 playerId, s8 arg3) { sp28 = 9; } if (player->playerPacticlePool1[arg1].unk_01C == 1) { - switch (player->playerPacticlePool1[arg1].unk_012) { + switch (player->playerPacticlePool1[arg1].type) { case 1: func_80063408(player, arg1, playerIdCopy, arg3); break; @@ -6359,7 +6319,7 @@ void func_8006C9B8(Player* player, s16 arg1, s8 playerId, s8 arg3) { sp28 = 9; } if (player->playerPacticlePool3[arg1].unk_01C == 1) { - switch (player->playerPacticlePool3[arg1].unk_012) { + switch (player->playerPacticlePool3[arg1].type) { case 1: func_800644E8(player, arg1, playerId, arg3); break; @@ -6461,7 +6421,7 @@ void func_8006CEC0(Player* arg0, s16 arg1, s8 playerId, s8 arg3) { sp20 = 9; } if (arg0->playerPacticlePool0[arg1].unk_01C == 1) { - switch (arg0->playerPacticlePool0[arg1].unk_012) { + switch (arg0->playerPacticlePool0[arg1].type) { case 1: func_80062C74(arg0, arg1, playerId, arg3); break; @@ -6521,7 +6481,7 @@ void func_8006CEC0(Player* arg0, s16 arg1, s8 playerId, s8 arg3) { void func_8006D194(Player* player, s8 playerId, s8 arg2) { if (player->playerPacticlePool0[0x14].unk_01C == 1) { - switch (player->playerPacticlePool0[0x14].unk_012) { + switch (player->playerPacticlePool0[0x14].type) { case 2: func_80064DEC(player, playerId, arg2, 0); break; @@ -6556,7 +6516,7 @@ void func_8006D194(Player* player, s8 playerId, s8 arg2) { } } if (player->playerPacticlePool0[0x15].unk_01C == 1) { - if (player->playerPacticlePool0[0x15].unk_012 == 5) { + if (player->playerPacticlePool0[0x15].type == 5) { func_800651F4(player, playerId, arg2, 1); } } else if ((player->unk_0B6 & 0x20) == 0x20) { @@ -6568,7 +6528,7 @@ void func_8006D474(Player* player, s8 playerId, s8 screenId) { s16 var_s2; if ((player->unk_002 & (8 << (screenId * 4))) == (8 << (screenId * 4))) { for (var_s2 = 0; var_s2 < 10; var_s2++) { - switch (player->playerPacticlePool0[var_s2].unk_012) { + switch (player->playerPacticlePool0[var_s2].type) { case 1: if (gActiveScreenMode == SCREEN_MODE_3P_4P_SPLITSCREEN) { if (screenId == playerId) { @@ -6588,7 +6548,7 @@ void func_8006D474(Player* player, s8 playerId, s8 screenId) { } break; } - switch (player->playerPacticlePool3[var_s2].unk_012) { + switch (player->playerPacticlePool3[var_s2].type) { case 1: case 9: if (gActiveScreenMode == SCREEN_MODE_1P) { @@ -6649,8 +6609,8 @@ void func_8006D474(Player* player, s8 playerId, s8 screenId) { } break; } - switch (player->playerPacticlePool1[var_s2].unk_012) { - case 1: + switch (player->playerPacticlePool1[var_s2].type) { + case DRIFT_PARTICLE: if (gActiveScreenMode == SCREEN_MODE_3P_4P_SPLITSCREEN) { if (screenId == playerId) { render_drift_particle(player, playerId, var_s2, screenId); @@ -6659,7 +6619,7 @@ void func_8006D474(Player* player, s8 playerId, s8 screenId) { render_drift_particle(player, playerId, var_s2, screenId); } break; - case 2: + case GROUND_PARTCLE: case 3: case 4: case 5: @@ -6704,7 +6664,7 @@ void func_8006DC54(Player* player, s8 arg1, s8 arg2) { bitwiseMask = 8 << (arg2 * 4); if (bitwiseMask == (player->unk_002 & bitwiseMask)) { for (i = 0; i < 10; i++) { - if (player->playerPacticlePool0[i].unk_012 == 7) { + if (player->playerPacticlePool0[i].type == 7) { func_800658A0(player, arg1, i, arg2); } } @@ -6718,7 +6678,7 @@ void func_8006DD3C(Player* arg0, s8 arg1, s8 arg2) { temp_v0 = 8 << (arg2 * 4); if (temp_v0 == (arg0->unk_002 & temp_v0)) { for (temp_s0 = 0; temp_s0 < 10; ++temp_s0) { - temp_v0 = arg0->playerPacticlePool0[temp_s0].unk_012; + temp_v0 = arg0->playerPacticlePool0[temp_s0].type; if (temp_v0 != 3) { if (temp_v0 == 5) { func_8006A280(arg0, arg1, temp_s0, arg2); @@ -6733,7 +6693,7 @@ void func_8006DD3C(Player* arg0, s8 arg1, s8 arg2) { } if (((arg0->type & 0x4000) == 0x4000) && (arg2 == arg1)) { - switch (arg0->playerPacticlePool0[20].unk_012) { + switch (arg0->playerPacticlePool0[20].type) { case 2: func_80068310(arg0, arg1, arg0->playerPacticlePool0[20].unk_00C, arg2, 0); break; @@ -6750,7 +6710,7 @@ void func_8006DD3C(Player* arg0, s8 arg1, s8 arg2) { func_80068DA0(arg0, arg1, arg0->playerPacticlePool0[20].unk_00C, arg2, 0); break; } - if (arg0->playerPacticlePool0[21].unk_012 == 5) { + if (arg0->playerPacticlePool0[21].type == 5) { func_80067D3C(arg0, arg2, D_8018D480, 1, 1.6f, 0xFFFFFF); func_8006801C(arg0, arg2, D_8018D484, 1, 1.6f, 0xFF); } diff --git a/src/effects.c b/src/effects.c index 052e43085..13ec4ebc9 100644 --- a/src/effects.c +++ b/src/effects.c @@ -1465,8 +1465,8 @@ void apply_boo_sound_effect(Player* player, s8 arg1) { for (temp_v1 = 0; temp_v1 < 10; ++temp_v1) { player->playerPacticlePool0[temp_v1].unk_01C = 0; - player->playerPacticlePool0[temp_v1].unk_01E = 0; - player->playerPacticlePool0[temp_v1].unk_012 = 0; + player->playerPacticlePool0[temp_v1].timer = 0; + player->playerPacticlePool0[temp_v1].type = 0; } } @@ -1546,8 +1546,8 @@ void func_8008FD4C(Player* player, UNUSED s8 arg1) { for (temp_v0 = 0; temp_v0 < 10; ++temp_v0) { player->playerPacticlePool0[temp_v0].unk_01C = 0; - player->playerPacticlePool0[temp_v0].unk_01E = 0; - player->playerPacticlePool0[temp_v0].unk_012 = 0; + player->playerPacticlePool0[temp_v0].timer = 0; + player->playerPacticlePool0[temp_v0].type = 0; } } @@ -1556,8 +1556,8 @@ void func_8008FDA8(Player* player, UNUSED s8 arg1) { player->unk_044 |= 0x200; for (temp_v0 = 0; temp_v0 < 10; ++temp_v0) { player->playerPacticlePool0[temp_v0].unk_01C = 0; - player->playerPacticlePool0[temp_v0].unk_01E = 0; - player->playerPacticlePool0[temp_v0].unk_012 = 0; + player->playerPacticlePool0[temp_v0].timer = 0; + player->playerPacticlePool0[temp_v0].type = 0; } } @@ -2022,30 +2022,30 @@ void func_800911B4(Player* player, s8 arg1) { player->unk_078 = 0; D_8018D920[arg1] = 0; - player->playerPacticlePool0[31].unk_012 = 0; - player->playerPacticlePool0[31].unk_01E = 0; + player->playerPacticlePool0[31].type = 0; + player->playerPacticlePool0[31].timer = 0; player->playerPacticlePool0[31].unk_01C = 0; - player->playerPacticlePool0[30].unk_012 = 0; - player->playerPacticlePool0[30].unk_01E = 0; + player->playerPacticlePool0[30].type = 0; + player->playerPacticlePool0[30].timer = 0; player->playerPacticlePool0[30].unk_01C = 0; // clang-format off temp_v0 = 2; do { // clang-format on player->playerPacticlePool0[31 + temp_v0].unk_01C = 0; - player->playerPacticlePool0[31 + temp_v0].unk_01E = 0; - player->playerPacticlePool0[31 + temp_v0].unk_012 = 0; + player->playerPacticlePool0[31 + temp_v0].timer = 0; + player->playerPacticlePool0[31 + temp_v0].type = 0; player->playerPacticlePool0[32 + temp_v0].unk_01C = 0; - player->playerPacticlePool0[32 + temp_v0].unk_01E = 0; - player->playerPacticlePool0[32 + temp_v0].unk_012 = 0; + player->playerPacticlePool0[32 + temp_v0].timer = 0; + player->playerPacticlePool0[32 + temp_v0].type = 0; player->playerPacticlePool0[33 + temp_v0].unk_01C = 0; - player->playerPacticlePool0[33 + temp_v0].unk_01E = 0; - player->playerPacticlePool0[33 + temp_v0].unk_012 = 0; + player->playerPacticlePool0[33 + temp_v0].timer = 0; + player->playerPacticlePool0[33 + temp_v0].type = 0; temp_v0 += 4; player->playerPacticlePool0[26 + temp_v0].unk_01C = 0; - player->playerPacticlePool0[26 + temp_v0].unk_01E = 0; - player->playerPacticlePool0[26 + temp_v0].unk_012 = 0; + player->playerPacticlePool0[26 + temp_v0].timer = 0; + player->playerPacticlePool0[26 + temp_v0].type = 0; } while (temp_v0 < 10); }