diff --git a/src/code_8008C1D0.c b/src/code_8008C1D0.c index a15b8537d..c3180da51 100644 --- a/src/code_8008C1D0.c +++ b/src/code_8008C1D0.c @@ -303,10 +303,10 @@ void func_8008C73C(Player *player, s8 arg1) { D_80165190[2][arg1] = 1; D_80165190[3][arg1] = 1; D_80165280[arg1] = player->currentSpeed; - D_80165480[arg1] = 0; + gTimerBoostTripleACombo[arg1] = 0; gIsPlayerTripleAButtonCombo[arg1] = FALSE; - D_80165440[arg1] = 0; - D_80165420[arg1] = 0; + gCountASwitch[arg1] = 0; + gFrameSinceLastACombo[arg1] = 0; D_8018D920[arg1] = 0; if (((player->type & PLAYER_HUMAN) == PLAYER_HUMAN) && ((player->type & PLAYER_INVISIBLE_OR_BOMB) != PLAYER_INVISIBLE_OR_BOMB)) { @@ -388,7 +388,7 @@ void func_8008C9EC(Player *player, s8 arg1) { } } if ((gIsPlayerTripleAButtonCombo[arg1] == TRUE) && ((player->type & PLAYER_HUMAN) == PLAYER_HUMAN)) { - D_80165480[arg1] = 0x00000078; + gTimerBoostTripleACombo[arg1] = 0x00000078; if (player->currentSpeed <= 90.0f) { player->currentSpeed = 90.0f; } @@ -1047,10 +1047,10 @@ void func_8008E6C0(Player *player, s8 arg1) player->statusEffects &= ~0x00480000; player->unk_0B6 |= 0x40; - D_80165480[arg1] = 0; + gTimerBoostTripleACombo[arg1] = 0; gIsPlayerTripleAButtonCombo[arg1] = FALSE; - D_80165440[arg1] = 0; - D_80165420[arg1] = 0; + gCountASwitch[arg1] = 0; + gFrameSinceLastACombo[arg1] = 0; } void func_8008E884(Player* player, s8 arg1) { @@ -1147,10 +1147,10 @@ void func_8008EAE0(Player* player, s8 arg1) { player->unk_0B6 |= 0x40; player->statusEffects &= ~0x01000002; - D_80165480[arg1] = 0; + gTimerBoostTripleACombo[arg1] = 0; gIsPlayerTripleAButtonCombo[arg1] = FALSE; - D_80165440[arg1] = 0; - D_80165420[arg1] = 0; + gCountASwitch[arg1] = 0; + gFrameSinceLastACombo[arg1] = 0; } void func_8008EC34(Player* player, s8 arg1) { @@ -1637,20 +1637,20 @@ void func_8008FF08(Player *player, s8 playerId) { break; case COURSE_YOSHI_VALLEY: case COURSE_RAINBOW_ROAD: - player->nearestWaypointId = D_80165320[playerId]; + player->nearestWaypointId = gCopyNearestWaypointByPlayerId[playerId]; break; case COURSE_FRAPPE_SNOWLAND: waypoint = gNearestWaypointByPlayerId[playerId]; #ifdef VERSION_EU if (((waypoint >= 0xF0) && (waypoint < 0x11E)) || - ((D_80165320[playerId] >= 0xF0) && (D_80165320[playerId] < 0x11E))) + ((gCopyNearestWaypointByPlayerId[playerId] >= 0xF0) && (gCopyNearestWaypointByPlayerId[playerId] < 0x11E))) #else if ((waypoint >= 0xF0) && (waypoint < 0x105)) #endif { player->nearestWaypointId = 0xF0U; } else { - player->nearestWaypointId = D_80165320[playerId]; + player->nearestWaypointId = gCopyNearestWaypointByPlayerId[playerId]; if (player->nearestWaypointId < 0) { player->nearestWaypointId = gWaypointCountByPathIndex[0] + player->nearestWaypointId; } @@ -1661,7 +1661,7 @@ void func_8008FF08(Player *player, s8 playerId) { if ((waypoint >= 0x258) && (waypoint < 0x2A4)) { player->nearestWaypointId = 0x258U; } else { - player->nearestWaypointId = D_80165320[playerId]; + player->nearestWaypointId = gCopyNearestWaypointByPlayerId[playerId]; if (player->nearestWaypointId < 0) { player->nearestWaypointId = gWaypointCountByPathIndex[0] + player->nearestWaypointId; } @@ -1716,11 +1716,11 @@ void func_80090178(Player *player, s8 playerId, Vec3f arg2, Vec3f arg3) { switch (gCurrentCourseId) { case COURSE_YOSHI_VALLEY: test = player->nearestWaypointId; - temp_v1 = &D_80164550[D_80165310[playerId]][test]; + temp_v1 = &D_80164550[gCopyPathIndexByPlayerId[playerId]][test]; arg2[0] = temp_v1->posX; arg2[1] = temp_v1->posY; arg2[2] = temp_v1->posZ; - temp_v1 = &D_80164550[D_80165310[playerId]][(player->nearestWaypointId + 5) % (gWaypointCountByPathIndex[D_80165310[playerId]] + 1)]; + temp_v1 = &D_80164550[gCopyPathIndexByPlayerId[playerId]][(player->nearestWaypointId + 5) % (gWaypointCountByPathIndex[gCopyPathIndexByPlayerId[playerId]] + 1)]; arg3[0] = temp_v1->posX; arg3[1] = temp_v1->posY; arg3[2] = temp_v1->posZ; diff --git a/src/code_8008C1D0.h b/src/code_8008C1D0.h index 9eac665e7..a97d025e0 100644 --- a/src/code_8008C1D0.h +++ b/src/code_8008C1D0.h @@ -135,7 +135,7 @@ extern f32 D_800E37D0[]; extern f32 D_800E37F0[]; extern s16 D_80165190[4][8]; extern f32 D_80165280[]; -extern s32 D_80165420[]; +extern s32 gFrameSinceLastACombo[]; extern s8 D_801658BC; extern s32 D_8018D900[]; extern s16 D_8018D920[]; diff --git a/src/player_controller.c b/src/player_controller.c index 4ad52e852..cc78833e8 100644 --- a/src/player_controller.c +++ b/src/player_controller.c @@ -22,310 +22,310 @@ extern s16 D_801633F8; extern s32 D_8018D168; -s16 D_800E3810[] = { - 1, 2, 3, 4, 5, 6, 7, 0 +s16 gCPUforMario[] = { + LUIGI, YOSHI, TOAD, DK, WARIO, PEACH, BOWSER, 0 }; -s16 D_800E3820[] = { - 0, 2, 3, 4, 5, 6, 7, 0 +s16 gCPUforLuigi[] = { + MARIO, YOSHI, TOAD, DK, WARIO, PEACH, BOWSER, 0 }; -s16 D_800E3830[] = { - 0, 1, 3, 4, 5, 6, 7, 0 +s16 gCPUforYoshi[] = { + MARIO, LUIGI, TOAD, DK, WARIO, PEACH, BOWSER, 0 }; -s16 D_800E3840[] = { - 0, 1, 2, 4, 5, 6, 7, 0 +s16 gCPUforToad[] = { + MARIO, LUIGI, YOSHI, DK, WARIO, PEACH, BOWSER, 0 }; -s16 D_800E3850[] = { - 0, 1, 2, 3, 5, 6, 7, 0 +s16 gCPUforDk[] = { + MARIO, LUIGI, YOSHI, TOAD, WARIO, PEACH, BOWSER, 0 }; -s16 D_800E3860[] = { - 0, 1, 2, 3, 4, 6, 7, 0 +s16 gCPUforWario[] = { + MARIO, LUIGI, YOSHI, TOAD, DK, PEACH, BOWSER, 0 }; -s16 D_800E3870[] = { - 0, 1, 2, 3, 4, 5, 7, 0 +s16 gCPUforPeach[] = { + MARIO, LUIGI, YOSHI, TOAD, DK, WARIO, BOWSER, 0 }; -s16 D_800E3880[] = { - 0, 1, 2, 3, 4, 5, 6, 0 +s16 gCPUforBowser[] = { + MARIO, LUIGI, YOSHI, TOAD, DK, WARIO, PEACH, 0 }; -s16 *D_800E3890[] = { - D_800E3810, D_800E3820, D_800E3830, D_800E3840, - D_800E3850, D_800E3860, D_800E3870, D_800E3880 +s16 *gCPUforPlayer[] = { + gCPUforMario, gCPUforLuigi, gCPUforYoshi, gCPUforToad, + gCPUforDk, gCPUforWario, gCPUforPeach, gCPUforBowser }; -s16 D_800E38B0[] = { - 2, 3, 4, 5, 6, 7 +s16 gCPUforMarioAndLuigi[] = { + YOSHI, TOAD, DK, WARIO, PEACH, BOWSER }; -s16 D_800E38BC[] = { - 1, 3, 4, 5, 6, 7 +s16 gCPUforMarioAndYoshi[] = { + LUIGI, TOAD, DK, WARIO, PEACH, BOWSER }; -s16 D_800E38C8[] = { - 1, 2, 4, 5, 6, 7 +s16 gCPUforMarioAndToad[] = { + LUIGI, YOSHI, DK, WARIO, PEACH, BOWSER }; -s16 D_800E38D4[] = { - 1, 2, 3, 5, 6, 7 +s16 gCPUforMarioAndDk[] = { + LUIGI, YOSHI, TOAD, WARIO, PEACH, BOWSER }; -s16 D_800E38E0[] = { - 1, 2, 3, 4, 6, 7 +s16 gCPUforMarioAndWario[] = { + LUIGI, YOSHI, TOAD, DK, PEACH, BOWSER }; -s16 D_800E38EC[] = { - 1, 2, 3, 4, 5, 7 +s16 gCPUforMarioAndPeach[] = { + LUIGI, YOSHI, TOAD, DK, WARIO, BOWSER }; -s16 D_800E38F8[] = { - 1, 2, 3, 4, 5, 6 +s16 gCPUforMarioAndBowser[] = { + LUIGI, YOSHI, TOAD, DK, WARIO, PEACH }; -s16 D_800E3904[] = { - 2, 3, 4, 5, 6, 7 +s16 gCPUforLuigiAndMario[] = { + YOSHI, TOAD, DK, WARIO, PEACH, BOWSER }; -s16 D_800E3910[] = { - 0, 3, 4, 5, 6, 7 +s16 gCPUforLuigiAndYoshi[] = { + MARIO, TOAD, DK, WARIO, PEACH, BOWSER }; -s16 D_800E391C[] = { - 0, 2, 4, 5, 6, 7 +s16 gCPUforLuigiAndToad[] = { + MARIO, YOSHI, DK, WARIO, PEACH, BOWSER }; -s16 D_800E3928[] = { - 0, 2, 3, 5, 6, 7 +s16 gCPUforLuigiAndDk[] = { + MARIO, YOSHI, TOAD, WARIO, PEACH, BOWSER }; -s16 D_800E3934[] = { - 0, 2, 3, 4, 6, 7 +s16 gCPUforLuigiAndWario[] = { + MARIO, YOSHI, TOAD, DK, PEACH, BOWSER }; -s16 D_800E3940[] = { - 0, 2, 3, 4, 5, 7 +s16 gCPUforLuigiAndPeach[] = { + MARIO, YOSHI, TOAD, DK, WARIO, BOWSER }; -s16 D_800E394C[] = { - 0, 2, 3, 4, 5, 6 +s16 gCPUforLuigiAndBowser[] = { + MARIO, YOSHI, TOAD, DK, WARIO, PEACH }; -s16 D_800E3958[] = { - 1, 3, 4, 5, 6, 7 +s16 gCPUforYoshiAndMario[] = { + LUIGI, TOAD, DK, WARIO, PEACH, BOWSER }; -s16 D_800E3964[] = { - 0, 3, 4, 5, 6, 7 +s16 gCPUforYoshiAndLuigi[] = { + MARIO, TOAD, DK, WARIO, PEACH, BOWSER }; -s16 D_800E3970[] = { - 0, 1, 4, 5, 6, 7 +s16 gCPUforYoshiAndToad[] = { + MARIO, LUIGI, DK, WARIO, PEACH, BOWSER }; -s16 D_800E397C[] = { - 0, 1, 3, 5, 6, 7 +s16 gCPUforYoshiAndDk[] = { + MARIO, LUIGI, TOAD, WARIO, PEACH, BOWSER }; -s16 D_800E3988[] = { - 0, 1, 3, 4, 6, 7 +s16 gCPUforYoshiAndWario[] = { + MARIO, LUIGI, TOAD, DK, PEACH, BOWSER }; -s16 D_800E3994[] = { - 0, 1, 3, 4, 5, 7 +s16 gCPUforYoshiAndPeach[] = { + MARIO, LUIGI, TOAD, DK, WARIO, BOWSER }; -s16 D_800E39A0[] = { - 0, 1, 3, 4, 5, 6 +s16 gCPUforYoshiAndBowser[] = { + MARIO, LUIGI, TOAD, DK, WARIO, PEACH }; -s16 D_800E39AC[] = { - 1, 2, 4, 5, 6, 7 +s16 gCPUforToadAndMario[] = { + LUIGI, YOSHI, DK, WARIO, PEACH, BOWSER }; -s16 D_800E39B8[] = { - 0, 2, 4, 5, 6, 7 +s16 gCPUforToadAndLuigi[] = { + MARIO, YOSHI, DK, WARIO, PEACH, BOWSER }; -s16 D_800E39C4[] = { - 0, 1, 4, 5, 6, 7 +s16 gCPUforToadAndYoshi[] = { + MARIO, LUIGI, DK, WARIO, PEACH, BOWSER }; -s16 D_800E39D0[] = { - 0, 1, 2, 5, 6, 7 +s16 gCPUforToadAndDk[] = { + MARIO, LUIGI, YOSHI, WARIO, PEACH, BOWSER }; -s16 D_800E39DC[] = { - 0, 1, 2, 4, 6, 7 +s16 gCPUforToadAndWario[] = { + MARIO, LUIGI, YOSHI, DK, PEACH, BOWSER }; -s16 D_800E39E8[] = { - 0, 1, 2, 4, 5, 7 +s16 gCPUforToadAndPeach[] = { + MARIO, LUIGI, YOSHI, DK, WARIO, BOWSER }; -s16 D_800E39F4[] = { - 0, 1, 2, 4, 5, 6 +s16 gCPUforToadAndBowser[] = { + MARIO, LUIGI, YOSHI, DK, WARIO, PEACH }; -s16 D_800E3A00[] = { - 1, 2, 3, 5, 6, 7 +s16 gCPUforDkAndMario[] = { + LUIGI, YOSHI, TOAD, WARIO, PEACH, BOWSER }; -s16 D_800E3A0C[] = { - 0, 2, 3, 5, 6, 7 +s16 gCPUforDkAndLuigi[] = { + MARIO, YOSHI, TOAD, WARIO, PEACH, BOWSER }; -s16 D_800E3A18[] = { - 0, 1, 3, 5, 6, 7 +s16 gCPUforDkAndToad[] = { + MARIO, LUIGI, TOAD, WARIO, PEACH, BOWSER }; -s16 D_800E3A24[] = { - 0, 1, 2, 5, 6, 7 +s16 gCPUforDkAndYoshi[] = { + MARIO, LUIGI, YOSHI, WARIO, PEACH, BOWSER }; -s16 D_800E3A30[] = { - 0, 1, 2, 3, 6, 7 +s16 gCPUforDkAndWario[] = { + MARIO, LUIGI, YOSHI, TOAD, PEACH, BOWSER }; -s16 D_800E3A3C[] = { - 0, 1, 2, 3, 5, 7 +s16 gCPUforDkAndPeach[] = { + MARIO, LUIGI, YOSHI, TOAD, WARIO, BOWSER }; -s16 D_800E3A48[] = { - 0, 1, 2, 3, 5, 6 +s16 gCPUforDkAndBowser[] = { + MARIO, LUIGI, YOSHI, TOAD, WARIO, PEACH }; -s16 D_800E3A54[] = { - 1, 2, 3, 4, 6, 7 +s16 gCPUforWarioAndMario[] = { + LUIGI, YOSHI, TOAD, DK, PEACH, BOWSER }; -s16 D_800E3A60[] = { - 0, 2, 3, 4, 6, 7 +s16 gCPUforWarioAndLuigi[] = { + MARIO, YOSHI, TOAD, DK, PEACH, BOWSER }; -s16 D_800E3A6C[] = { - 0, 1, 3, 4, 6, 7 +s16 gCPUforWarioAndYoshi[] = { + MARIO, LUIGI, TOAD, DK, PEACH, BOWSER }; -s16 D_800E3A78[] = { - 0, 1, 2, 3, 6, 7 +s16 gCPUforWarioAndDk[] = { + MARIO, LUIGI, YOSHI, TOAD, PEACH, BOWSER }; -s16 D_800E3A84[] = { - 0, 1, 2, 4, 6, 7 +s16 gCPUforWarioAndToad[] = { + MARIO, LUIGI, YOSHI, DK, PEACH, BOWSER }; -s16 D_800E3A90[] = { - 0, 1, 2, 3, 4, 7 +s16 gCPUforWarioAndPeach[] = { + MARIO, LUIGI, YOSHI, TOAD, DK, BOWSER }; -s16 D_800E3A9C[] = { - 0, 1, 2, 3, 4, 6 +s16 gCPUforWarioAndBowser[] = { + MARIO, LUIGI, YOSHI, TOAD, DK, PEACH }; -s16 D_800E3AA8[] = { - 1, 2, 3, 4, 5, 7 +s16 gCPUforPeachAndMario[] = { + LUIGI, YOSHI, TOAD, DK, WARIO, BOWSER }; -s16 D_800E3AB4[] = { - 0, 2, 3, 4, 5, 7 +s16 gCPUforPeachAndLuigi[] = { + MARIO, YOSHI, TOAD, DK, WARIO, BOWSER }; -s16 D_800E3AC0[] = { - 0, 1, 3, 4, 5, 7 +s16 gCPUforPeachAndYoshi[] = { + MARIO, LUIGI, TOAD, DK, WARIO, BOWSER }; -s16 D_800E3ACC[] = { - 0, 1, 2, 3, 5, 7 +s16 gCPUforPeachAndDk[] = { + MARIO, LUIGI, YOSHI, TOAD, WARIO, BOWSER }; -s16 D_800E3AD8[] = { - 0, 1, 2, 3, 4, 7 +s16 gCPUforPeachAndWario[] = { + MARIO, LUIGI, YOSHI, TOAD, DK, BOWSER }; -s16 D_800E3AE4[] = { - 0, 1, 2, 4, 5, 7 +s16 gCPUforPeachAndToad[] = { + MARIO, LUIGI, YOSHI, DK, WARIO, BOWSER }; -s16 D_800E3AF0[] = { - 0, 1, 2, 3, 4, 5 +s16 gCPUforPeachAndBowser[] = { + MARIO, LUIGI, YOSHI, TOAD, DK, WARIO }; -s16 D_800E3AFC[] = { - 1, 2, 3, 4, 5, 6 +s16 gCPUforBowserAndMario[] = { + LUIGI, YOSHI, TOAD, DK, WARIO, PEACH }; -s16 D_800E3B08[] = { - 0, 2, 3, 4, 5, 6 +s16 gCPUforBowserAndLuigi[] = { + MARIO, YOSHI, TOAD, DK, WARIO, PEACH }; -s16 D_800E3B14[] = { - 0, 1, 3, 4, 5, 6 +s16 gCPUforBowserAndYoshi[] = { + MARIO, LUIGI, TOAD, DK, WARIO, PEACH }; -s16 D_800E3B20[] = { - 0, 1, 2, 3, 5, 6 +s16 gCPUforBowserAndDk[] = { + MARIO, LUIGI, YOSHI, TOAD, WARIO, PEACH }; -s16 D_800E3B2C[] = { - 0, 1, 2, 3, 4, 6 +s16 gCPUforBowserAndWario[] = { + MARIO, LUIGI, YOSHI, TOAD, DK, PEACH }; -s16 D_800E3B38[] = { - 0, 1, 2, 4, 5, 6 +s16 gCPUforBowserAndToad[] = { + MARIO, LUIGI, YOSHI, DK, WARIO, PEACH }; -s16 D_800E3B44[] = { - 0, 1, 2, 3, 4, 5 +s16 gCPUforBowserAndPeach[] = { + MARIO, LUIGI, YOSHI, TOAD, DK, WARIO }; -s16 *D_800E3B50[] = { - D_800E38B0, D_800E38B0, D_800E38BC, D_800E38C8, - D_800E38D4, D_800E38E0, D_800E38EC, D_800E38F8 +s16 *gListCPUforMario[] = { + gCPUforMarioAndLuigi, gCPUforMarioAndLuigi, gCPUforMarioAndYoshi, gCPUforMarioAndToad, + gCPUforMarioAndDk, gCPUforMarioAndWario, gCPUforMarioAndPeach, gCPUforMarioAndBowser }; -s16 *D_800E3B70[] = { - D_800E3904, D_800E3904, D_800E3910, D_800E391C, - D_800E3928, D_800E3934, D_800E3940, D_800E394C +s16 *gListCPUforLuigi[] = { + gCPUforLuigiAndMario, gCPUforLuigiAndMario, gCPUforLuigiAndYoshi, gCPUforLuigiAndToad, + gCPUforLuigiAndDk, gCPUforLuigiAndWario, gCPUforLuigiAndPeach, gCPUforLuigiAndBowser }; -s16 *D_800E3B90[] = { - D_800E3958, D_800E3964, D_800E3964, D_800E3970, - D_800E397C, D_800E3988, D_800E3994, D_800E39A0 +s16 *gListCPUforYoshi[] = { + gCPUforYoshiAndMario, gCPUforYoshiAndLuigi, gCPUforYoshiAndLuigi, gCPUforYoshiAndToad, + gCPUforYoshiAndDk, gCPUforYoshiAndWario, gCPUforYoshiAndPeach, gCPUforYoshiAndBowser }; -s16 *D_800E3BB0[] = { - D_800E39AC, D_800E39B8, D_800E39C4, D_800E39C4, - D_800E39D0, D_800E39DC, D_800E39E8, D_800E39F4 +s16 *gListCPUforToad[] = { + gCPUforToadAndMario, gCPUforToadAndLuigi, gCPUforToadAndYoshi, gCPUforToadAndYoshi, + gCPUforToadAndDk, gCPUforToadAndWario, gCPUforToadAndPeach, gCPUforToadAndBowser }; -s16 *D_800E3BD0[] = { - D_800E3A00, D_800E3A0C, D_800E3A18, D_800E3A24, - D_800E3A24, D_800E3A30, D_800E3A3C, D_800E3A48 +s16 *gListCPUforDk[] = { + gCPUforDkAndMario, gCPUforDkAndLuigi, gCPUforDkAndToad, gCPUforDkAndYoshi, + gCPUforDkAndYoshi, gCPUforDkAndWario, gCPUforDkAndPeach, gCPUforDkAndBowser }; -s16 *D_800E3BF0[] = { - D_800E3A54, D_800E3A60, D_800E3A6C, D_800E3A84, - D_800E3A78, D_800E3A78, D_800E3A90, D_800E3A9C +s16 *gListCPUforWario[] = { + gCPUforWarioAndMario, gCPUforWarioAndLuigi, gCPUforWarioAndYoshi, gCPUforWarioAndToad, + gCPUforWarioAndDk, gCPUforWarioAndDk, gCPUforWarioAndPeach, gCPUforWarioAndBowser }; -s16 *D_800E3C10[] = { - D_800E3AA8, D_800E3AB4, D_800E3AC0, D_800E3AE4, - D_800E3ACC, D_800E3AD8, D_800E3ACC, D_800E3AF0 +s16 *gListCPUforPeach[] = { + gCPUforPeachAndMario, gCPUforPeachAndLuigi, gCPUforPeachAndYoshi, gCPUforPeachAndToad, + gCPUforPeachAndDk, gCPUforPeachAndWario, gCPUforPeachAndDk, gCPUforPeachAndBowser }; -s16 *D_800E3C30[] = { - D_800E3AFC, D_800E3B08, D_800E3B14, D_800E3B38, - D_800E3B20, D_800E3B2C, D_800E3B44, D_800E3B44 +s16 *gListCPUforBowser[] = { + gCPUforBowserAndMario, gCPUforBowserAndLuigi, gCPUforBowserAndYoshi, gCPUforBowserAndToad, + gCPUforBowserAndDk, gCPUforBowserAndWario, gCPUforBowserAndPeach, gCPUforBowserAndPeach }; -s16 **D_800E3C50[] = { - D_800E3B50, D_800E3B70, D_800E3B90, D_800E3BB0, - D_800E3BD0, D_800E3BF0, D_800E3C10, D_800E3C30 +s16 **gCPUforTwoPlayer[] = { + gListCPUforMario, gListCPUforLuigi, gListCPUforYoshi, gListCPUforToad, + gListCPUforDk, gListCPUforWario, gListCPUforPeach, gListCPUforBowser }; // func_80027D00 @@ -1637,7 +1637,7 @@ void func_8002B830(Player *player, s8 arg1, s8 arg2) { } } -void func_8002B8A4(Player *player_one, Player *player_two) { +UNUSED void func_8002B8A4(Player *player_one, Player *player_two) { s32 var_v1; /* @@ -1860,11 +1860,11 @@ void func_8002C17C(Player *player, s8 playerId) { case COURSE_YOSHI_VALLEY: if ((player->unk_110.unk3C[2] >= 600.0f) && (D_80165330[playerId] == 0)) { D_80165330[playerId] = 1; - D_80165320[playerId] = gNearestWaypointByPlayerId[playerId]; - D_80165310[playerId] = gPathIndexByPlayerId[playerId]; + gCopyNearestWaypointByPlayerId[playerId] = gNearestWaypointByPlayerId[playerId]; + gCopyPathIndexByPlayerId[playerId] = gPathIndexByPlayerId[playerId]; } else if (D_80165330[playerId] == 0) { - D_80165320[playerId] = gNearestWaypointByPlayerId[playerId]; - D_80165310[playerId] = gPathIndexByPlayerId[playerId]; + gCopyNearestWaypointByPlayerId[playerId] = gNearestWaypointByPlayerId[playerId]; + gCopyPathIndexByPlayerId[playerId] = gPathIndexByPlayerId[playerId]; } else if (!(player->effects & 8)) { if (func_802ABDF4(player->unk_110.unk3A) == 0) { D_80165330[playerId] = 0; @@ -1874,33 +1874,33 @@ void func_8002C17C(Player *player, s8 playerId) { case COURSE_FRAPPE_SNOWLAND: if ((player->unk_0F8 == 0x000B) && (D_80165330[playerId] == 0)) { D_80165330[playerId] = 1; - D_80165320[playerId] = gNearestWaypointByPlayerId[playerId]; - D_80165310[playerId] = gPathIndexByPlayerId[playerId]; + gCopyNearestWaypointByPlayerId[playerId] = gNearestWaypointByPlayerId[playerId]; + gCopyPathIndexByPlayerId[playerId] = gPathIndexByPlayerId[playerId]; } else if (player->unk_0F8 != 0x000B) { D_80165330[playerId] = 0; - D_80165320[playerId] = gNearestWaypointByPlayerId[playerId]; - D_80165310[playerId] = gPathIndexByPlayerId[playerId]; + gCopyNearestWaypointByPlayerId[playerId] = gNearestWaypointByPlayerId[playerId]; + gCopyPathIndexByPlayerId[playerId] = gPathIndexByPlayerId[playerId]; } break; case COURSE_ROYAL_RACEWAY: if (((player->effects & 0x100000) != 0) && (D_80165330[playerId] == 0)) { D_80165330[playerId] = 1; - D_80165320[playerId] = gNearestWaypointByPlayerId[playerId]; - D_80165310[playerId] = gPathIndexByPlayerId[playerId]; + gCopyNearestWaypointByPlayerId[playerId] = gNearestWaypointByPlayerId[playerId]; + gCopyPathIndexByPlayerId[playerId] = gPathIndexByPlayerId[playerId]; } else if (((player->effects & 0x100000) == 0) && !(player->effects & 8)) { D_80165330[playerId] = 0; - D_80165320[playerId] = gNearestWaypointByPlayerId[playerId]; - D_80165310[playerId] = gPathIndexByPlayerId[playerId]; + gCopyNearestWaypointByPlayerId[playerId] = gNearestWaypointByPlayerId[playerId]; + gCopyPathIndexByPlayerId[playerId] = gPathIndexByPlayerId[playerId]; } break; case COURSE_RAINBOW_ROAD: if ((player->unk_110.unk3C[2] >= 600.0f) && (D_80165330[playerId] == 0)) { D_80165330[playerId] = 1; - D_80165320[playerId] = gNearestWaypointByPlayerId[playerId]; - D_80165310[playerId] = gPathIndexByPlayerId[playerId]; + gCopyNearestWaypointByPlayerId[playerId] = gNearestWaypointByPlayerId[playerId]; + gCopyPathIndexByPlayerId[playerId] = gPathIndexByPlayerId[playerId]; } else if (D_80165330[playerId] == 0) { - D_80165320[playerId] = gNearestWaypointByPlayerId[playerId]; - D_80165310[playerId] = gPathIndexByPlayerId[playerId]; + gCopyNearestWaypointByPlayerId[playerId] = gNearestWaypointByPlayerId[playerId]; + gCopyPathIndexByPlayerId[playerId] = gPathIndexByPlayerId[playerId]; } else if (!((player->effects & 8) || (player->unk_0CA & 1))) { D_80165330[playerId] = 0; } @@ -3200,68 +3200,7 @@ void func_80030A34(Player *player) { } } -// This is likely the function responsible for detecting triple-tap "A" for "fast" acceleration -void func_80030C34(Player *player) { - s32 var_v0; - - if (player == gPlayerOne) { - var_v0 = 0; - } - if (player == gPlayerTwo) { - var_v0 = 1; - } - if (player == gPlayerThree) { - var_v0 = 2; - } - if (player == gPlayerFour) { - var_v0 = 3; - } - if (player == gPlayerFive) { - var_v0 = 4; - } - if (player == gPlayerSix) { - var_v0 = 5; - } - if (player == gPlayerSeven) { - var_v0 = 6; - } - if (player == gPlayerEight) { - var_v0 = 7; - } - if (gIsPlayerTripleAButtonCombo[var_v0] == FALSE) { - if (gPlayerIsThrottleActive[var_v0] == 1) { - if ((D_80165420[var_v0] < 2) || (D_80165420[var_v0] >= 9)) { - D_80165440[var_v0] = 0; - } - D_80165420[var_v0] = 0; - D_80165400[var_v0] = 0; - } - gPlayerIsThrottleActive[var_v0] = 0; - D_80165420[var_v0]++; - if (D_80165420[var_v0] >= 9) { - D_80165420[var_v0] = 9; - } - if ((D_80165420[var_v0] >= 2) && (D_80165420[var_v0] < 9)) { - if (D_80165400[var_v0] == 0) { - D_80165440[var_v0] += 1; - } - D_80165400[var_v0] = 1; - } - if (D_80165440[var_v0] == 5) { - gIsPlayerTripleAButtonCombo[var_v0] = TRUE; - D_80165480[var_v0] = 120; - D_80165440[var_v0] = 0; - D_80165420[var_v0] = 0; - } - } else { - D_80165480[var_v0]--; - if (D_80165480[var_v0] <= 0) { - gIsPlayerTripleAButtonCombo[var_v0] = FALSE; - } - } -} - -void func_80030E00(Player *player) { +void detect_triple_a_combo_a_released(Player *player) { s32 playerIndex; if (player == gPlayerOne) { @@ -3289,33 +3228,93 @@ void func_80030E00(Player *player) { playerIndex = 7; } if (gIsPlayerTripleAButtonCombo[playerIndex] == FALSE) { - if (gPlayerIsThrottleActive[playerIndex] == 0) { - if ((D_80165420[playerIndex] < 2) || (D_80165420[playerIndex] >= 9)) { - D_80165440[playerIndex] = 0; + if (gPlayerIsThrottleActive[playerIndex] == TRUE) { + if ((gFrameSinceLastACombo[playerIndex] < 2) || (gFrameSinceLastACombo[playerIndex] >= 9)) { + gCountASwitch[playerIndex] = 0; } - D_80165420[playerIndex] = 0; + gFrameSinceLastACombo[playerIndex] = 0; D_80165400[playerIndex] = 0; } - gPlayerIsThrottleActive[playerIndex] = 1; - D_80165420[playerIndex]++; - if (D_80165420[playerIndex] >= 9) { - D_80165420[playerIndex] = 9; + gPlayerIsThrottleActive[playerIndex] = FALSE; + gFrameSinceLastACombo[playerIndex]++; + if (gFrameSinceLastACombo[playerIndex] >= 9) { + gFrameSinceLastACombo[playerIndex] = 9; } - if ((D_80165420[playerIndex] >= 2) && (D_80165420[playerIndex] < 9)) { + if ((gFrameSinceLastACombo[playerIndex] >= 2) && (gFrameSinceLastACombo[playerIndex] < 9)) { if (D_80165400[playerIndex] == 0) { - D_80165440[playerIndex] += 1; + gCountASwitch[playerIndex] += 1; } D_80165400[playerIndex] = 1; } - if (D_80165440[playerIndex] == 5) { + if (gCountASwitch[playerIndex] == 5) { gIsPlayerTripleAButtonCombo[playerIndex] = TRUE; - D_80165480[playerIndex] = 0x00000078; - D_80165440[playerIndex] = 0; - D_80165420[playerIndex] = 0; + gTimerBoostTripleACombo[playerIndex] = 120; + gCountASwitch[playerIndex] = 0; + gFrameSinceLastACombo[playerIndex] = 0; } } else { - D_80165480[playerIndex]--; - if (D_80165480[playerIndex] <= 0) { + gTimerBoostTripleACombo[playerIndex]--; + if (gTimerBoostTripleACombo[playerIndex] <= 0) { + gIsPlayerTripleAButtonCombo[playerIndex] = FALSE; + } + } +} + +void detect_triple_a_combo_a_pressed(Player *player) { + s32 playerIndex; + + if (player == gPlayerOne) { + playerIndex = 0; + } + if (player == gPlayerTwo) { + playerIndex = 1; + } + if (player == gPlayerThree) { + playerIndex = 2; + } + if (player == gPlayerFour) { + playerIndex = 3; + } + if (player == gPlayerFive) { + playerIndex = 4; + } + if (player == gPlayerSix) { + playerIndex = 5; + } + if (player == gPlayerSeven) { + playerIndex = 6; + } + if (player == gPlayerEight) { + playerIndex = 7; + } + if (gIsPlayerTripleAButtonCombo[playerIndex] == FALSE) { + if (gPlayerIsThrottleActive[playerIndex] == FALSE) { + if ((gFrameSinceLastACombo[playerIndex] < 2) || (gFrameSinceLastACombo[playerIndex] >= 9)) { + gCountASwitch[playerIndex] = 0; + } + gFrameSinceLastACombo[playerIndex] = 0; + D_80165400[playerIndex] = 0; + } + gPlayerIsThrottleActive[playerIndex] = TRUE; + gFrameSinceLastACombo[playerIndex]++; + if (gFrameSinceLastACombo[playerIndex] >= 9) { + gFrameSinceLastACombo[playerIndex] = 9; + } + if ((gFrameSinceLastACombo[playerIndex] >= 2) && (gFrameSinceLastACombo[playerIndex] < 9)) { + if (D_80165400[playerIndex] == 0) { + gCountASwitch[playerIndex] += 1; + } + D_80165400[playerIndex] = 1; + } + if (gCountASwitch[playerIndex] == 5) { + gIsPlayerTripleAButtonCombo[playerIndex] = TRUE; + gTimerBoostTripleACombo[playerIndex] = 120; + gCountASwitch[playerIndex] = 0; + gFrameSinceLastACombo[playerIndex] = 0; + } + } else { + gTimerBoostTripleACombo[playerIndex]--; + if (gTimerBoostTripleACombo[playerIndex] <= 0) { gIsPlayerTripleAButtonCombo[playerIndex] = FALSE; } } @@ -3428,124 +3427,124 @@ void func_80031F48(Player *player, f32 arg1) { } } -void func_80032050(Player *player) { - s32 var_v0; +void detect_triple_b_combo_b_released(Player *player) { + s32 playerIndex; if (player == gPlayerOne) { - var_v0 = 0; + playerIndex = 0; } if (player == gPlayerTwo) { - var_v0 = 1; + playerIndex = 1; } if (player == gPlayerThree) { - var_v0 = 2; + playerIndex = 2; } if (player == gPlayerFour) { - var_v0 = 3; + playerIndex = 3; } if (player == gPlayerFive) { - var_v0 = 4; + playerIndex = 4; } if (player == gPlayerSix) { - var_v0 = 5; + playerIndex = 5; } if (player == gPlayerSeven) { - var_v0 = 6; + playerIndex = 6; } if (player == gPlayerEight) { - var_v0 = 7; + playerIndex = 7; } - if (D_80165520[var_v0] == 0) { - if (D_801654A0[var_v0] == 1) { - if ((D_801654E0[var_v0] < 2) || (D_801654E0[var_v0] >= 9)) { - D_80165500[var_v0] = 0; + if (gIsPlayerTripleBButtonCombo[playerIndex] == FALSE) { + if (gPlayerIsBrakeActive[playerIndex] == TRUE) { + if ((gFrameSinceLastBCombo[playerIndex] < 2) || (gFrameSinceLastBCombo[playerIndex] >= 9)) { + gCountBChangement[playerIndex] = 0; } - D_801654E0[var_v0] = 0; - D_801654C0[var_v0] = 0; + gFrameSinceLastBCombo[playerIndex] = 0; + D_801654C0[playerIndex] = 0; } - D_801654A0[var_v0] = 0; - D_801654E0[var_v0]++; - if (D_801654E0[var_v0] >= 9) { - D_801654E0[var_v0] = 9; + gPlayerIsBrakeActive[playerIndex] = FALSE; + gFrameSinceLastBCombo[playerIndex]++; + if (gFrameSinceLastBCombo[playerIndex] >= 9) { + gFrameSinceLastBCombo[playerIndex] = 9; } - if ((D_801654E0[var_v0] >= 2) && (D_801654E0[var_v0] < 9)) { - if (D_801654C0[var_v0] == 0) { - D_80165500[var_v0]++; + if ((gFrameSinceLastBCombo[playerIndex] >= 2) && (gFrameSinceLastBCombo[playerIndex] < 9)) { + if (D_801654C0[playerIndex] == 0) { + gCountBChangement[playerIndex]++; } - D_801654C0[var_v0] = 1; + D_801654C0[playerIndex] = 1; } - if (D_80165500[var_v0] == 5) { - D_80165520[var_v0] = 1; - D_80165540[var_v0] = 0x00000078; - D_80165500[var_v0] = 0; - D_801654E0[var_v0] = 0; + if (gCountBChangement[playerIndex] == 5) { + gIsPlayerTripleBButtonCombo[playerIndex] = TRUE; + gTimerBoostTripleBCombo[playerIndex] = 120; + gCountBChangement[playerIndex] = 0; + gFrameSinceLastBCombo[playerIndex] = 0; } } else { - D_80165540[var_v0]--; - if (D_80165540[var_v0] <= 0) { - D_80165520[var_v0] = 0; + gTimerBoostTripleBCombo[playerIndex]--; + if (gTimerBoostTripleBCombo[playerIndex] <= 0) { + gIsPlayerTripleBButtonCombo[playerIndex] = FALSE; } } } -void func_8003221C(Player *player) { - s32 var_v0; +void detect_triple_b_combo_b_pressed(Player *player) { + s32 playerIndex; if (player == gPlayerOne) { - var_v0 = 0; + playerIndex = 0; } if (player == gPlayerTwo) { - var_v0 = 1; + playerIndex = 1; } if (player == gPlayerThree) { - var_v0 = 2; + playerIndex = 2; } if (player == gPlayerFour) { - var_v0 = 3; + playerIndex = 3; } if (player == gPlayerFive) { - var_v0 = 4; + playerIndex = 4; } if (player == gPlayerSix) { - var_v0 = 5; + playerIndex = 5; } if (player == gPlayerSeven) { - var_v0 = 6; + playerIndex = 6; } if (player == gPlayerEight) { - var_v0 = 7; + playerIndex = 7; } - if (D_80165520[var_v0] == 0) { - if (D_801654A0[var_v0] == 0) { - if ((D_801654E0[var_v0] < 2) || (D_801654E0[var_v0] >= 9)) { - D_80165500[var_v0] = 0; + if (gIsPlayerTripleBButtonCombo[playerIndex] == FALSE) { + if (gPlayerIsBrakeActive[playerIndex] == FALSE) { + if ((gFrameSinceLastBCombo[playerIndex] < 2) || (gFrameSinceLastBCombo[playerIndex] >= 9)) { + gCountBChangement[playerIndex] = 0; } - D_801654E0[var_v0] = 0; - D_801654C0[var_v0] = 0; + gFrameSinceLastBCombo[playerIndex] = 0; + D_801654C0[playerIndex] = 0; } - D_801654A0[var_v0] = 1; - D_801654E0[var_v0]++; - if (D_801654E0[var_v0] >= 9) { - D_801654E0[var_v0] = 9; + gPlayerIsBrakeActive[playerIndex] = TRUE; + gFrameSinceLastBCombo[playerIndex]++; + if (gFrameSinceLastBCombo[playerIndex] >= 9) { + gFrameSinceLastBCombo[playerIndex] = 9; } - if ((D_801654E0[var_v0] >= 2) && (D_801654E0[var_v0] < 9)) { - if (D_801654C0[var_v0] == 0) { - D_80165500[var_v0]++; + if ((gFrameSinceLastBCombo[playerIndex] >= 2) && (gFrameSinceLastBCombo[playerIndex] < 9)) { + if (D_801654C0[playerIndex] == 0) { + gCountBChangement[playerIndex]++; } - D_801654C0[var_v0] = 1; + D_801654C0[playerIndex] = 1; } - if (D_80165500[var_v0] == 5) { - D_80165520[var_v0] = 1; - D_80165540[var_v0] = 0x00000078; - D_80165500[var_v0] = 0; - D_801654E0[var_v0] = 0; + if (gCountBChangement[playerIndex] == 5) { + gIsPlayerTripleBButtonCombo[playerIndex] = TRUE; + gTimerBoostTripleBCombo[playerIndex] = 120; + gCountBChangement[playerIndex] = 0; + gFrameSinceLastBCombo[playerIndex] = 0; } } else { - D_80165540[var_v0]--; - if (D_80165540[var_v0] <= 0) { - D_80165520[var_v0] = 0; + gTimerBoostTripleBCombo[playerIndex]--; + if (gTimerBoostTripleBCombo[playerIndex] <= 0) { + gIsPlayerTripleBButtonCombo[playerIndex] = FALSE; } } } @@ -3601,7 +3600,7 @@ void func_800323E4(Player *player) { player->unk_20C = 2.0f; } } - if (D_80165520[var_v1] == 1) { + if (gIsPlayerTripleBButtonCombo[var_v1] == TRUE) { if (player->unk_20C >= 2.0f) { func_80031F48(player, (1.0f - var_f2) * 5.0f); } else { @@ -4673,7 +4672,7 @@ void func_80037CFC(Player *player, struct Controller *controller, s8 arg2) { if ((player->unk_044 & 1) != 1) { if (controller->button & A_BUTTON) { player_speed(player); - func_80030E00(player); + detect_triple_a_combo_a_pressed(player); } else { if (gModeSelection == BATTLE) { @@ -4683,14 +4682,14 @@ void func_80037CFC(Player *player, struct Controller *controller, s8 arg2) { { func_80031F48(player, 1.0f); } - func_80030C34(player); + detect_triple_a_combo_a_released(player); } if (controller->button & B_BUTTON) { func_800323E4(player); - func_8003221C(player); + detect_triple_b_combo_b_pressed(player); } else { player->unk_20C = 0.0f; - func_80032050(player); + detect_triple_b_combo_b_released(player); } } if ((!(player->effects & 0x100000)) && (!(player->effects & 4))) { @@ -4722,11 +4721,11 @@ void func_80037CFC(Player *player, struct Controller *controller, s8 arg2) { ((player->effects & 0x01000000) == 0x01000000)) || ((player->effects & 0x02000000) == 0x02000000)) { if (controller->button & A_BUTTON) { - func_80030E00(player); + detect_triple_a_combo_a_pressed(player); func_800332E8(player, arg2); return; } - func_80030C34(player); + detect_triple_a_combo_a_released(player); func_800337CC(player, 5.0f, arg2); } } diff --git a/src/player_controller.h b/src/player_controller.h index 5270de4d6..6e61c44b4 100644 --- a/src/player_controller.h +++ b/src/player_controller.h @@ -71,12 +71,12 @@ void func_8002FE84(Player*, f32); f32 func_80030150(Player*, s8); void func_80030A34(Player*); -void func_80030C34(Player*); -void func_80030E00(Player*); +void detect_triple_a_combo_a_released(Player*); +void detect_triple_a_combo_a_pressed(Player*); void player_speed(Player*); void func_80031F48(Player*, f32); -void func_80032050(Player*); -void func_8003221C(Player*); +void detect_triple_b_combo_b_released(Player*); +void detect_triple_b_combo_b_pressed(Player*); void func_800323E4(Player*); void func_80032700(Player*); void func_80032CB0(Player*, f32); @@ -113,81 +113,81 @@ void func_80038C6C(Player*, Camera*, s8, s8); /* This is where I'd put my static data, if I had any */ -extern s16 D_800E3810[]; -extern s16 D_800E3820[]; -extern s16 D_800E3830[]; -extern s16 D_800E3840[]; -extern s16 D_800E3850[]; -extern s16 D_800E3860[]; -extern s16 D_800E3870[]; -extern s16 D_800E3880[]; -extern s16 *D_800E3890[]; +extern s16 gCPUforMario[]; +extern s16 gCPUforLuigi[]; +extern s16 gCPUforYoshi[]; +extern s16 gCPUforToad[]; +extern s16 gCPUforDk[]; +extern s16 gCPUforWario[]; +extern s16 gCPUforPeach[]; +extern s16 gCPUforBowser[]; +extern s16 *gCPUforPlayer[]; -extern s16 D_800E38B0[]; -extern s16 D_800E38BC[]; -extern s16 D_800E38C8[]; -extern s16 D_800E38D4[]; -extern s16 D_800E38E0[]; -extern s16 D_800E38EC[]; -extern s16 D_800E38F8[]; -extern s16 D_800E3904[]; -extern s16 D_800E3910[]; -extern s16 D_800E391C[]; -extern s16 D_800E3928[]; -extern s16 D_800E3934[]; -extern s16 D_800E3940[]; -extern s16 D_800E394C[]; -extern s16 D_800E3958[]; -extern s16 D_800E3964[]; -extern s16 D_800E3970[]; -extern s16 D_800E397C[]; -extern s16 D_800E3988[]; -extern s16 D_800E3994[]; -extern s16 D_800E39A0[]; -extern s16 D_800E39AC[]; -extern s16 D_800E39B8[]; -extern s16 D_800E39C4[]; -extern s16 D_800E39D0[]; -extern s16 D_800E39DC[]; -extern s16 D_800E39E8[]; -extern s16 D_800E39F4[]; -extern s16 D_800E3A00[]; -extern s16 D_800E3A0C[]; -extern s16 D_800E3A18[]; -extern s16 D_800E3A24[]; -extern s16 D_800E3A30[]; -extern s16 D_800E3A3C[]; -extern s16 D_800E3A48[]; -extern s16 D_800E3A54[]; -extern s16 D_800E3A60[]; -extern s16 D_800E3A6C[]; -extern s16 D_800E3A78[]; -extern s16 D_800E3A84[]; -extern s16 D_800E3A90[]; -extern s16 D_800E3A9C[]; -extern s16 D_800E3AA8[]; -extern s16 D_800E3AB4[]; -extern s16 D_800E3AC0[]; -extern s16 D_800E3ACC[]; -extern s16 D_800E3AD8[]; -extern s16 D_800E3AE4[]; -extern s16 D_800E3AF0[]; -extern s16 D_800E3AFC[]; -extern s16 D_800E3B08[]; -extern s16 D_800E3B14[]; -extern s16 D_800E3B20[]; -extern s16 D_800E3B2C[]; -extern s16 D_800E3B38[]; -extern s16 D_800E3B44[]; -extern s16 *D_800E3B50[]; -extern s16 *D_800E3B70[]; -extern s16 *D_800E3B90[]; -extern s16 *D_800E3BB0[]; -extern s16 *D_800E3BD0[]; -extern s16 *D_800E3BF0[]; -extern s16 *D_800E3C10[]; -extern s16 *D_800E3C30[]; -extern s16 **D_800E3C50[]; +extern s16 gCPUforMarioAndLuigi[]; +extern s16 gCPUforMarioAndYoshi[]; +extern s16 gCPUforMarioAndToad[]; +extern s16 gCPUforMarioAndDk[]; +extern s16 gCPUforMarioAndWario[]; +extern s16 gCPUforMarioAndPeach[]; +extern s16 gCPUforMarioAndBowser[]; +extern s16 gCPUforLuigiAndMario[]; +extern s16 gCPUforLuigiAndYoshi[]; +extern s16 gCPUforLuigiAndToad[]; +extern s16 gCPUforLuigiAndDk[]; +extern s16 gCPUforLuigiAndWario[]; +extern s16 gCPUforLuigiAndPeach[]; +extern s16 gCPUforLuigiAndBowser[]; +extern s16 gCPUforYoshiAndMario[]; +extern s16 gCPUforYoshiAndLuigi[]; +extern s16 gCPUforYoshiAndToad[]; +extern s16 gCPUforYoshiAndDk[]; +extern s16 gCPUforYoshiAndWario[]; +extern s16 gCPUforYoshiAndPeach[]; +extern s16 gCPUforYoshiAndBowser[]; +extern s16 gCPUforToadAndMario[]; +extern s16 gCPUforToadAndLuigi[]; +extern s16 gCPUforToadAndYoshi[]; +extern s16 gCPUforToadAndDk[]; +extern s16 gCPUforToadAndWario[]; +extern s16 gCPUforToadAndPeach[]; +extern s16 gCPUforToadAndBowser[]; +extern s16 gCPUforDkAndMario[]; +extern s16 gCPUforDkAndLuigi[]; +extern s16 gCPUforDkAndToad[]; +extern s16 gCPUforDkAndYoshi[]; +extern s16 gCPUforDkAndWario[]; +extern s16 gCPUforDkAndPeach[]; +extern s16 gCPUforDkAndBowser[]; +extern s16 gCPUforWarioAndMario[]; +extern s16 gCPUforWarioAndLuigi[]; +extern s16 gCPUforWarioAndYoshi[]; +extern s16 gCPUforWarioAndDk[]; +extern s16 gCPUforWarioAndToad[]; +extern s16 gCPUforWarioAndPeach[]; +extern s16 gCPUforWarioAndBowser[]; +extern s16 gCPUforPeachAndMario[]; +extern s16 gCPUforPeachAndLuigi[]; +extern s16 gCPUforPeachAndYoshi[]; +extern s16 gCPUforPeachAndDk[]; +extern s16 gCPUforPeachAndWario[]; +extern s16 gCPUforPeachAndToad[]; +extern s16 gCPUforPeachAndBowser[]; +extern s16 gCPUforBowserAndMario[]; +extern s16 gCPUforBowserAndLuigi[]; +extern s16 gCPUforBowserAndYoshi[]; +extern s16 gCPUforBowserAndDk[]; +extern s16 gCPUforBowserAndWario[]; +extern s16 gCPUforBowserAndToad[]; +extern s16 gCPUforBowserAndPeach[]; +extern s16 *gListCPUforMario[]; +extern s16 *gListCPUforLuigi[]; +extern s16 *gListCPUforYoshi[]; +extern s16 *gListCPUforToad[]; +extern s16 *gListCPUforDk[]; +extern s16 *gListCPUforWario[]; +extern s16 *gListCPUforPeach[]; +extern s16 *gListCPUforBowser[]; +extern s16 **gCPUforTwoPlayer[]; extern s16 gMatrixEffectCount; diff --git a/src/render_player.c b/src/render_player.c index a869830fd..d0af86240 100644 --- a/src/render_player.c +++ b/src/render_player.c @@ -1682,7 +1682,7 @@ void func_80026A48(Player *player, s8 arg1) { } temp_f0 = ((player->unk_094 * (1.0f + player->unk_104)) / 18.0f) * 216.0f; - if ((temp_f0 <= 1.0f) || (D_80165520[arg1] == 1)) { + if ((temp_f0 <= 1.0f) || (gIsPlayerTripleBButtonCombo[arg1] == TRUE)) { player->unk_240 = 0; } else { player->unk_240 += D_800DDE74[(s32)(temp_f0 / 12.0f)]; diff --git a/src/spawn_players.c b/src/spawn_players.c index c622e6e56..88379d538 100644 --- a/src/spawn_players.c +++ b/src/spawn_players.c @@ -24,7 +24,7 @@ f32 D_80165210[8]; f32 D_80165230[8]; -f32 D_80165250[8]; +UNUSED f32 D_80165250[8]; s16 D_80165270[8]; f32 D_80165280[8]; f32 D_801652A0[8]; @@ -32,27 +32,30 @@ s32 D_801652C0[8]; s32 D_801652E0[8]; s16 D_80165300[8]; // Shadows values from gPathIndexByPlayerId, but is an array -u16 D_80165310[8]; +u16 gCopyPathIndexByPlayerId[8]; // Shadows values from gNearestWaypointByPlayerId, but is an array -s16 D_80165320[8]; -// Don't think this really belongs with waypoint stuff, but don't know where else to put it +s16 gCopyNearestWaypointByPlayerId[8]; s16 D_80165330[8]; s16 D_80165340; UNUSED s32 D_80165348[29]; Player *D_801653C0[8]; -s32 gPlayerIsThrottleActive[8]; + +bool gPlayerIsThrottleActive[8]; s32 D_80165400[8]; -s32 D_80165420[8]; -s32 D_80165440[8]; +s32 gFrameSinceLastACombo[8]; +s32 gCountASwitch[8]; bool gIsPlayerTripleAButtonCombo[8]; -s32 D_80165480[8]; -s32 D_801654A0[8]; +s32 gTimerBoostTripleACombo[8]; + +bool gPlayerIsBrakeActive[8]; s32 D_801654C0[8]; -s32 D_801654E0[8]; -s32 D_80165500[8]; -s32 D_80165520[8]; -s32 D_80165540[8]; -s16 D_80165560[7]; +s32 gFrameSinceLastBCombo[8]; +s32 gCountBChangement[8]; +bool gIsPlayerTripleBButtonCombo[8]; +s32 gTimerBoostTripleBCombo[8]; + +s16 chooseCPUPlayers[7]; + s16 D_8016556E; s16 D_80165570; s16 D_80165572; @@ -261,14 +264,14 @@ void spawn_player(Player *player, s8 playerIndex, f32 startingRow, f32 startingC D_801651D0[2][idx] = 0; D_801651D0[3][idx] = 0; - D_80165420[idx] = 0; - D_80165440[idx] = 0; + gFrameSinceLastACombo[idx] = 0; + gCountASwitch[idx] = 0; gIsPlayerTripleAButtonCombo[idx] = FALSE; - D_80165480[idx] = 0; - D_801654E0[idx] = 0; - D_80165500[idx] = 0; - D_80165520[idx] = 0; - D_80165540[playerIndex] = 0; + gTimerBoostTripleACombo[idx] = 0; + gFrameSinceLastBCombo[idx] = 0; + gCountBChangement[idx] = 0; + gIsPlayerTripleBButtonCombo[idx] = FALSE; + gTimerBoostTripleBCombo[playerIndex] = 0; D_8018D900[0] = 0; D_801652E0[playerIndex] = 0; @@ -281,7 +284,7 @@ void spawn_player(Player *player, s8 playerIndex, f32 startingRow, f32 startingC D_801652A0[playerIndex] = 0.0f; gPlayerIsThrottleActive[playerIndex] = 0; D_80165400[playerIndex] = 0; - D_801654A0[playerIndex] = 0; + gPlayerIsBrakeActive[playerIndex] = 0; D_801654C0[playerIndex] = 0; D_80165340 = 0; @@ -478,7 +481,7 @@ UNUSED f32 D_800E43A0 = 1.0f; UNUSED s16 D_800E43A4 = 1; UNUSED s16 D_800E43A8 = 0; -void func_80039F44(f32 *arg0, f32 *arg1, f32 arg2) { +void spawn_players_gp_one_player(f32 *arg0, f32 *arg1, f32 arg2) { func_80039DA4(); if (((gCupCourseSelection == CUP_COURSE_ONE) && (D_8016556E == 0)) || (gDemoMode == 1) || @@ -491,16 +494,16 @@ void func_80039F44(f32 *arg0, f32 *arg1, f32 arg2) { } while(rand == gCharacterSelections[0]); // Randomize gPlayerTwo - D_80165560[0] = rand; + chooseCPUPlayers[0] = rand; // Chooses arr[0] as a fallback to prevent duplicating characters. // If it doesn't find the if, it will grab the final index as a fallback. for (i = 1; i < 7; i++) { - u16* arr = (u16 *) D_800E3890[gCharacterSelections[0]]; + u16* arr = (u16 *) gCPUforPlayer[gCharacterSelections[0]]; if (rand == arr[i]) { - D_80165560[i] = arr[0]; + chooseCPUPlayers[i] = arr[0]; } else { - D_80165560[i] = arr[i]; + chooseCPUPlayers[i] = arr[i]; } } } @@ -508,29 +511,29 @@ void func_80039F44(f32 *arg0, f32 *arg1, f32 arg2) { D_8016556E = 0; if (gDemoMode == 1) { spawn_player(gPlayerOneCopy, 0, arg0[D_80165270[0]], arg1[D_80165270[0]], arg2, 32768.0f, gCharacterSelections[0], PLAYER_HUMAN_AND_CPU); - spawn_player(gPlayerTwo, 1, arg0[D_80165270[1]], arg1[D_80165270[1]], arg2, 32768.0f, D_80165560[0], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE); - spawn_player(gPlayerThree, 2, arg0[D_80165270[2]], arg1[D_80165270[2]], arg2, 32768.0f, D_80165560[1], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE); - spawn_player(gPlayerFour, 3, arg0[D_80165270[3]], arg1[D_80165270[3]], arg2, 32768.0f, D_80165560[2], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE); - spawn_player(gPlayerFive, 4, arg0[D_80165270[4]], arg1[D_80165270[4]], arg2, 32768.0f, D_80165560[3], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE); - spawn_player(gPlayerSix, 5, arg0[D_80165270[5]], arg1[D_80165270[5]], arg2, 32768.0f, D_80165560[4], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE); - spawn_player(gPlayerSeven, 6, arg0[D_80165270[6]], arg1[D_80165270[6]], arg2, 32768.0f, D_80165560[5], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE); - spawn_player(gPlayerEight, 7, arg0[D_80165270[7]], arg1[D_80165270[7]], arg2, 32768.0f, D_80165560[6], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE); + spawn_player(gPlayerTwo, 1, arg0[D_80165270[1]], arg1[D_80165270[1]], arg2, 32768.0f, chooseCPUPlayers[0], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE); + spawn_player(gPlayerThree, 2, arg0[D_80165270[2]], arg1[D_80165270[2]], arg2, 32768.0f, chooseCPUPlayers[1], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE); + spawn_player(gPlayerFour, 3, arg0[D_80165270[3]], arg1[D_80165270[3]], arg2, 32768.0f, chooseCPUPlayers[2], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE); + spawn_player(gPlayerFive, 4, arg0[D_80165270[4]], arg1[D_80165270[4]], arg2, 32768.0f, chooseCPUPlayers[3], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE); + spawn_player(gPlayerSix, 5, arg0[D_80165270[5]], arg1[D_80165270[5]], arg2, 32768.0f, chooseCPUPlayers[4], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE); + spawn_player(gPlayerSeven, 6, arg0[D_80165270[6]], arg1[D_80165270[6]], arg2, 32768.0f, chooseCPUPlayers[5], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE); + spawn_player(gPlayerEight, 7, arg0[D_80165270[7]], arg1[D_80165270[7]], arg2, 32768.0f, chooseCPUPlayers[6], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE); D_80164A28 = 0; } else { spawn_player(gPlayerOneCopy, 0, arg0[D_80165270[0]], arg1[D_80165270[0]] + 250.0f, arg2, 32768.0f, gCharacterSelections[0], PLAYER_EXISTS | PLAYER_STAGING | PLAYER_START_SEQUENCE | PLAYER_HUMAN); - spawn_player(gPlayerTwo, 1, arg0[D_80165270[1]], arg1[D_80165270[1]] + 250.0f, arg2, 32768.0f, D_80165560[0], PLAYER_EXISTS | PLAYER_STAGING | PLAYER_START_SEQUENCE | PLAYER_CPU); - spawn_player(gPlayerThree, 2, arg0[D_80165270[3]], arg1[D_80165270[2]] + 250.0f, arg2, 32768.0f, D_80165560[1], PLAYER_EXISTS | PLAYER_STAGING | PLAYER_START_SEQUENCE | PLAYER_CPU); - spawn_player(gPlayerFour, 3, arg0[D_80165270[2]], arg1[D_80165270[3]] + 250.0f, arg2, 32768.0f, D_80165560[2], PLAYER_EXISTS | PLAYER_STAGING | PLAYER_START_SEQUENCE | PLAYER_CPU); - spawn_player(gPlayerFive, 4, arg0[D_80165270[5]], arg1[D_80165270[4]] + 250.0f, arg2, 32768.0f, D_80165560[3], PLAYER_EXISTS | PLAYER_STAGING | PLAYER_START_SEQUENCE | PLAYER_CPU); - spawn_player(gPlayerSix, 5, arg0[D_80165270[4]], arg1[D_80165270[5]] + 250.0f, arg2, 32768.0f, D_80165560[4], PLAYER_EXISTS | PLAYER_STAGING | PLAYER_START_SEQUENCE | PLAYER_CPU); - spawn_player(gPlayerSeven, 6, arg0[D_80165270[7]], arg1[D_80165270[6]] + 250.0f, arg2, 32768.0f, D_80165560[5], PLAYER_EXISTS | PLAYER_STAGING | PLAYER_START_SEQUENCE | PLAYER_CPU); - spawn_player(gPlayerEight, 7, arg0[D_80165270[6]], arg1[D_80165270[7]] + 250.0f, arg2, 32768.0f, D_80165560[6], PLAYER_EXISTS | PLAYER_STAGING | PLAYER_START_SEQUENCE | PLAYER_CPU); + spawn_player(gPlayerTwo, 1, arg0[D_80165270[1]], arg1[D_80165270[1]] + 250.0f, arg2, 32768.0f, chooseCPUPlayers[0], PLAYER_EXISTS | PLAYER_STAGING | PLAYER_START_SEQUENCE | PLAYER_CPU); + spawn_player(gPlayerThree, 2, arg0[D_80165270[3]], arg1[D_80165270[2]] + 250.0f, arg2, 32768.0f, chooseCPUPlayers[1], PLAYER_EXISTS | PLAYER_STAGING | PLAYER_START_SEQUENCE | PLAYER_CPU); + spawn_player(gPlayerFour, 3, arg0[D_80165270[2]], arg1[D_80165270[3]] + 250.0f, arg2, 32768.0f, chooseCPUPlayers[2], PLAYER_EXISTS | PLAYER_STAGING | PLAYER_START_SEQUENCE | PLAYER_CPU); + spawn_player(gPlayerFive, 4, arg0[D_80165270[5]], arg1[D_80165270[4]] + 250.0f, arg2, 32768.0f, chooseCPUPlayers[3], PLAYER_EXISTS | PLAYER_STAGING | PLAYER_START_SEQUENCE | PLAYER_CPU); + spawn_player(gPlayerSix, 5, arg0[D_80165270[4]], arg1[D_80165270[5]] + 250.0f, arg2, 32768.0f, chooseCPUPlayers[4], PLAYER_EXISTS | PLAYER_STAGING | PLAYER_START_SEQUENCE | PLAYER_CPU); + spawn_player(gPlayerSeven, 6, arg0[D_80165270[7]], arg1[D_80165270[6]] + 250.0f, arg2, 32768.0f, chooseCPUPlayers[5], PLAYER_EXISTS | PLAYER_STAGING | PLAYER_START_SEQUENCE | PLAYER_CPU); + spawn_player(gPlayerEight, 7, arg0[D_80165270[6]], arg1[D_80165270[7]] + 250.0f, arg2, 32768.0f, chooseCPUPlayers[6], PLAYER_EXISTS | PLAYER_STAGING | PLAYER_START_SEQUENCE | PLAYER_CPU); D_80164A28 = 1; } func_80039AE4(); } -void func_8003A59C(f32 *arg0, f32 *arg1, f32 arg2) { +void spawn_players_versus_one_player(f32 *arg0, f32 *arg1, f32 arg2) { spawn_player(gPlayerFour, 3, arg0[2], arg1[2], arg2, 32768.0f, gCharacterSelections[0], PLAYER_START_SEQUENCE | PLAYER_CPU); spawn_player(gPlayerFive, 4, arg0[3], arg1[3], arg2, 32768.0f, gCharacterSelections[0], PLAYER_START_SEQUENCE | PLAYER_CPU); spawn_player(gPlayerSix, 5, arg0[4], arg1[4], arg2, 32768.0f, gCharacterSelections[0], PLAYER_START_SEQUENCE | PLAYER_CPU); @@ -569,12 +572,13 @@ void func_8003A59C(f32 *arg0, f32 *arg1, f32 arg2) { func_80039AE4(); } -void func_8003A9F0(f32* arg0, f32* arg1, f32 arg2) { +void spawn_players_gp_two_player(f32* arg0, f32* arg1, f32 arg2) { func_80039DA4(); if ((gCupCourseSelection == CUP_COURSE_ONE) || (gDemoMode == 1) || (gDebugMenuSelection == DEBUG_MENU_EXITED)) { s16 rand; s16 i; + // @todo: this is a do-while loop getRand: rand = random_int(7); if (gCharacterSelections[0] == rand) @@ -582,24 +586,24 @@ getRand: if (gCharacterSelections[1] == rand) goto getRand; - D_80165560[0] = rand; + chooseCPUPlayers[0] = rand; for (i = 1; i < 6; i++) { - u16* arr = (u16 *) D_800E3C50[gCharacterSelections[0]][gCharacterSelections[1]]; + u16* arr = (u16 *) gCPUforTwoPlayer[gCharacterSelections[0]][gCharacterSelections[1]]; if (rand == arr[i]) { - D_80165560[i] = arr[0]; + chooseCPUPlayers[i] = arr[0]; } else { - D_80165560[i] = arr[i]; + chooseCPUPlayers[i] = arr[i]; } } } - spawn_player(gPlayerThree, 2, arg0[D_80165270[2]], arg1[D_80165270[2]], arg2, 32768.0f, D_80165560[0], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE); - spawn_player(gPlayerFour, 3, arg0[D_80165270[3]], arg1[D_80165270[3]], arg2, 32768.0f, D_80165560[1], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE); - spawn_player(gPlayerFive, 4, arg0[D_80165270[4]], arg1[D_80165270[4]], arg2, 32768.0f, D_80165560[2], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE); - spawn_player(gPlayerSix, 5, arg0[D_80165270[5]], arg1[D_80165270[5]], arg2, 32768.0f, D_80165560[3], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE); - spawn_player(gPlayerSeven, 6, arg0[D_80165270[6]], arg1[D_80165270[6]], arg2, 32768.0f, D_80165560[4], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE); - spawn_player(gPlayerEight, 7, arg0[D_80165270[7]], arg1[D_80165270[7]], arg2, 32768.0f, D_80165560[5], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE); + spawn_player(gPlayerThree, 2, arg0[D_80165270[2]], arg1[D_80165270[2]], arg2, 32768.0f, chooseCPUPlayers[0], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE); + spawn_player(gPlayerFour, 3, arg0[D_80165270[3]], arg1[D_80165270[3]], arg2, 32768.0f, chooseCPUPlayers[1], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE); + spawn_player(gPlayerFive, 4, arg0[D_80165270[4]], arg1[D_80165270[4]], arg2, 32768.0f, chooseCPUPlayers[2], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE); + spawn_player(gPlayerSix, 5, arg0[D_80165270[5]], arg1[D_80165270[5]], arg2, 32768.0f, chooseCPUPlayers[3], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE); + spawn_player(gPlayerSeven, 6, arg0[D_80165270[6]], arg1[D_80165270[6]], arg2, 32768.0f, chooseCPUPlayers[4], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE); + spawn_player(gPlayerEight, 7, arg0[D_80165270[7]], arg1[D_80165270[7]], arg2, 32768.0f, chooseCPUPlayers[5], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE); if (gDemoMode == 1) { spawn_player(gPlayerOneCopy, 0, arg0[D_80165270[0]], arg1[D_80165270[0]], arg2, 32768.0f, gCharacterSelections[0], PLAYER_HUMAN_AND_CPU); @@ -616,7 +620,7 @@ getRand: func_80039AE4(); } -void func_8003AE24(f32 *arg0, f32 *arg1, f32 arg2) { +void spawn_players_versus_two_player(f32 *arg0, f32 *arg1, f32 arg2) { spawn_player(gPlayerThree, 2, arg0[1], arg1[1], arg2, 32768.0f, gCharacterSelections[0], PLAYER_START_SEQUENCE | PLAYER_CPU); spawn_player(gPlayerFour, 3, arg0[2], arg1[2], arg2, 32768.0f, gCharacterSelections[0], PLAYER_START_SEQUENCE | PLAYER_CPU); spawn_player(gPlayerFive, 4, arg0[3], arg1[3], arg2, 32768.0f, gCharacterSelections[0], PLAYER_START_SEQUENCE | PLAYER_CPU); @@ -820,7 +824,7 @@ void func_8003C0F0(void) { D_80165230[5] = sp5C + 0x82; D_80165230[6] = sp5C + 0x96; D_80165230[7] = sp5C + 0xAA; - func_80039F44(D_80165210, D_80165230, sp5A); + spawn_players_gp_one_player(D_80165210, D_80165230, sp5A); break; case TIME_TRIALS: @@ -834,7 +838,7 @@ void func_8003C0F0(void) { D_80165230[5] = sp5C + 0x1E; D_80165230[6] = sp5C + 0x1E; D_80165230[7] = sp5C + 0x1E; - func_8003A59C(D_80165210, D_80165230, sp5A); + spawn_players_versus_one_player(D_80165210, D_80165230, sp5A); break; } break; @@ -853,7 +857,7 @@ void func_8003C0F0(void) { D_80165230[5] = sp5C + 0x82; D_80165230[6] = sp5C + 0x96; D_80165230[7] = sp5C + 0xAA; - func_8003A9F0(D_80165210, D_80165230, sp5A); + spawn_players_gp_two_player(D_80165210, D_80165230, sp5A); break; case VERSUS: @@ -867,7 +871,7 @@ void func_8003C0F0(void) { D_80165230[5] = sp5C + 0x1E; D_80165230[6] = sp5C + 0x1E; D_80165230[7] = sp5C + 0x1E; - func_8003AE24(D_80165210, D_80165230, sp5A); + spawn_players_versus_two_player(D_80165210, D_80165230, sp5A); break; } break; diff --git a/src/spawn_players.h b/src/spawn_players.h index e11f287c3..d7cae3ad3 100644 --- a/src/spawn_players.h +++ b/src/spawn_players.h @@ -5,14 +5,14 @@ #include "common_structs.h" /* Function Prototypes */ - +/** @cond */ void spawn_player(Player*, s8, f32, f32, f32, f32, u16, s16); void func_80039AE4(void); void func_80039DA4(void); -void func_80039F44(f32*, f32*, f32); -void func_8003A59C(f32*, f32*, f32); -void func_8003A9F0(f32* arg0, f32* arg1, f32); -void func_8003AE24(f32*, f32*, f32); +void spawn_players_gp_one_player(f32*, f32*, f32); +void spawn_players_versus_one_player(f32*, f32*, f32); +void spawn_players_gp_two_player(f32* arg0, f32* arg1, f32); +void spawn_players_versus_two_player(f32*, f32*, f32); void spawn_players_2p_battle(f32*, f32*, f32); void func_8003B318(f32*, f32*, f32); void spawn_players_3p_battle(f32*, f32*, f32); @@ -33,24 +33,24 @@ extern f32 D_801652A0[]; extern s32 D_801652C0[]; extern s32 D_801652E0[]; extern s16 D_80165300[]; -extern u16 D_80165310[]; -extern s16 D_80165320[]; +extern u16 gCopyPathIndexByPlayerId[]; +extern s16 gCopyNearestWaypointByPlayerId[]; extern s16 D_80165330[]; extern s16 D_80165340; extern Player *D_801653C0[]; extern s32 gPlayerIsThrottleActive[]; extern s32 D_80165400[]; -extern s32 D_80165420[]; -extern s32 D_80165440[]; +extern s32 gFrameSinceLastACombo[]; +extern s32 gCountASwitch[]; extern bool gIsPlayerTripleAButtonCombo[]; -extern s32 D_80165480[]; -extern s32 D_801654A0[]; +extern s32 gTimerBoostTripleACombo[]; +extern s32 gPlayerIsBrakeActive[]; extern s32 D_801654C0[]; -extern s32 D_801654E0[]; -extern s32 D_80165500[]; -extern s32 D_80165520[]; -extern s32 D_80165540[]; -extern s16 D_80165560[]; +extern s32 gFrameSinceLastBCombo[]; +extern s32 gCountBChangement[]; +extern s32 gIsPlayerTripleBButtonCombo[]; +extern s32 gTimerBoostTripleBCombo[]; +extern s16 chooseCPUPlayers[]; extern s16 D_8016556E; extern s16 D_80165570; extern s16 D_80165572; @@ -62,5 +62,6 @@ extern s16 D_8016557C; extern s16 D_8016557E; extern s16 D_80165580; extern s16 D_80165582; +/** @endcond */ #endif diff --git a/tools/doxygen_syms.md b/tools/doxygen_syms.md index 9fb869aae..f0ef93ae2 100644 --- a/tools/doxygen_syms.md +++ b/tools/doxygen_syms.md @@ -481,12 +481,12 @@ Variable Name | Memory Address [func_8002FE84](@ref func_8002FE84) | 0x8002FE84 [func_80030150](@ref func_80030150) | 0x80030150 [func_80030A34](@ref func_80030A34) | 0x80030A34 -[func_80030C34](@ref func_80030C34) | 0x80030C34 -[func_80030E00](@ref func_80030E00) | 0x80030E00 +[detect_triple_a_combo_a_released](@ref detect_triple_a_combo_a_released) | 0x80030C34 +[detect_triple_a_combo_a_pressed](@ref detect_triple_a_combo_a_pressed) | 0x80030E00 [player_speed](@ref player_speed) | 0x80030FC8 [func_80031F48](@ref func_80031F48) | 0x80031F48 -[func_80032050](@ref func_80032050) | 0x80032050 -[func_8003221C](@ref func_8003221C) | 0x8003221C +[detect_triple_b_combo_b_released](@ref detect_triple_b_combo_b_released) | 0x80032050 +[detect_triple_b_combo_b_pressed](@ref detect_triple_b_combo_b_pressed) | 0x8003221C [func_800323E4](@ref func_800323E4) | 0x800323E4 [func_80032700](@ref func_80032700) | 0x80032700 [func_80032CB0](@ref func_80032CB0) | 0x80032CB0 @@ -520,10 +520,10 @@ Variable Name | Memory Address [spawn_player](@ref spawn_player) | 0x800393C0 [func_80039AE4](@ref func_80039AE4) | 0x80039AE4 [func_80039DA4](@ref func_80039DA4) | 0x80039DA4 -[func_80039F44](@ref func_80039F44) | 0x80039F44 -[func_8003A59C](@ref func_8003A59C) | 0x8003A59C -[func_8003A9F0](@ref func_8003A9F0) | 0x8003A9F0 -[func_8003AE24](@ref func_8003AE24) | 0x8003AE24 +[spawn_players_gp_one_player](@ref spawn_players_gp_one_player) | 0x80039F44 +[spawn_players_versus_one_player](@ref spawn_players_versus_one_player) | 0x8003A59C +[spawn_players_gp_two_player](@ref spawn_players_gp_two_player) | 0x8003A9F0 +[spawn_players_versus_two_player](@ref spawn_players_versus_two_player) | 0x8003AE24 [spawn_players_2p_battle](@ref spawn_players_2p_battle) | 0x8003B098 [func_8003B318](@ref func_8003B318) | 0x8003B318 [spawn_players_3p_battle](@ref spawn_players_3p_battle) | 0x8003B59C @@ -3178,80 +3178,80 @@ Variable Name | Memory Address [D_800E37B0](@ref D_800E37B0) | 0x800E37B0 [D_800E37D0](@ref D_800E37D0) | 0x800E37D0 [D_800E37F0](@ref D_800E37F0) | 0x800E37F0 -[D_800E3810](@ref D_800E3810) | 0x800E3810 -[D_800E3820](@ref D_800E3820) | 0x800E3820 -[D_800E3830](@ref D_800E3830) | 0x800E3830 -[D_800E3840](@ref D_800E3840) | 0x800E3840 -[D_800E3850](@ref D_800E3850) | 0x800E3850 -[D_800E3860](@ref D_800E3860) | 0x800E3860 -[D_800E3870](@ref D_800E3870) | 0x800E3870 -[D_800E3880](@ref D_800E3880) | 0x800E3880 -[D_800E3890](@ref D_800E3890) | 0x800E3890 -[D_800E38B0](@ref D_800E38B0) | 0x800E38B0 -[D_800E38BC](@ref D_800E38BC) | 0x800E38BC -[D_800E38C8](@ref D_800E38C8) | 0x800E38C8 -[D_800E38D4](@ref D_800E38D4) | 0x800E38D4 -[D_800E38E0](@ref D_800E38E0) | 0x800E38E0 -[D_800E38EC](@ref D_800E38EC) | 0x800E38EC -[D_800E38F8](@ref D_800E38F8) | 0x800E38F8 -[D_800E3904](@ref D_800E3904) | 0x800E3904 -[D_800E3910](@ref D_800E3910) | 0x800E3910 -[D_800E391C](@ref D_800E391C) | 0x800E391C -[D_800E3928](@ref D_800E3928) | 0x800E3928 -[D_800E3934](@ref D_800E3934) | 0x800E3934 -[D_800E3940](@ref D_800E3940) | 0x800E3940 -[D_800E394C](@ref D_800E394C) | 0x800E394C -[D_800E3958](@ref D_800E3958) | 0x800E3958 -[D_800E3964](@ref D_800E3964) | 0x800E3964 -[D_800E3970](@ref D_800E3970) | 0x800E3970 -[D_800E397C](@ref D_800E397C) | 0x800E397C -[D_800E3988](@ref D_800E3988) | 0x800E3988 -[D_800E3994](@ref D_800E3994) | 0x800E3994 -[D_800E39A0](@ref D_800E39A0) | 0x800E39A0 -[D_800E39AC](@ref D_800E39AC) | 0x800E39AC -[D_800E39B8](@ref D_800E39B8) | 0x800E39B8 -[D_800E39C4](@ref D_800E39C4) | 0x800E39C4 -[D_800E39D0](@ref D_800E39D0) | 0x800E39D0 -[D_800E39DC](@ref D_800E39DC) | 0x800E39DC -[D_800E39E8](@ref D_800E39E8) | 0x800E39E8 -[D_800E39F4](@ref D_800E39F4) | 0x800E39F4 -[D_800E3A00](@ref D_800E3A00) | 0x800E3A00 -[D_800E3A0C](@ref D_800E3A0C) | 0x800E3A0C -[D_800E3A18](@ref D_800E3A18) | 0x800E3A18 -[D_800E3A24](@ref D_800E3A24) | 0x800E3A24 -[D_800E3A30](@ref D_800E3A30) | 0x800E3A30 -[D_800E3A3C](@ref D_800E3A3C) | 0x800E3A3C -[D_800E3A48](@ref D_800E3A48) | 0x800E3A48 -[D_800E3A54](@ref D_800E3A54) | 0x800E3A54 -[D_800E3A60](@ref D_800E3A60) | 0x800E3A60 -[D_800E3A6C](@ref D_800E3A6C) | 0x800E3A6C -[D_800E3A78](@ref D_800E3A78) | 0x800E3A78 -[D_800E3A84](@ref D_800E3A84) | 0x800E3A84 -[D_800E3A90](@ref D_800E3A90) | 0x800E3A90 -[D_800E3A9C](@ref D_800E3A9C) | 0x800E3A9C -[D_800E3AA8](@ref D_800E3AA8) | 0x800E3AA8 -[D_800E3AB4](@ref D_800E3AB4) | 0x800E3AB4 -[D_800E3AC0](@ref D_800E3AC0) | 0x800E3AC0 -[D_800E3ACC](@ref D_800E3ACC) | 0x800E3ACC -[D_800E3AD8](@ref D_800E3AD8) | 0x800E3AD8 -[D_800E3AE4](@ref D_800E3AE4) | 0x800E3AE4 -[D_800E3AF0](@ref D_800E3AF0) | 0x800E3AF0 -[D_800E3AFC](@ref D_800E3AFC) | 0x800E3AFC -[D_800E3B08](@ref D_800E3B08) | 0x800E3B08 -[D_800E3B14](@ref D_800E3B14) | 0x800E3B14 -[D_800E3B20](@ref D_800E3B20) | 0x800E3B20 -[D_800E3B2C](@ref D_800E3B2C) | 0x800E3B2C -[D_800E3B38](@ref D_800E3B38) | 0x800E3B38 -[D_800E3B44](@ref D_800E3B44) | 0x800E3B44 -[D_800E3B50](@ref D_800E3B50) | 0x800E3B50 -[D_800E3B70](@ref D_800E3B70) | 0x800E3B70 -[D_800E3B90](@ref D_800E3B90) | 0x800E3B90 -[D_800E3BB0](@ref D_800E3BB0) | 0x800E3BB0 -[D_800E3BD0](@ref D_800E3BD0) | 0x800E3BD0 -[D_800E3BF0](@ref D_800E3BF0) | 0x800E3BF0 -[D_800E3C10](@ref D_800E3C10) | 0x800E3C10 -[D_800E3C30](@ref D_800E3C30) | 0x800E3C30 -[D_800E3C50](@ref D_800E3C50) | 0x800E3C50 +[gCPUforMario](@ref gCPUforMario) | 0x800E3810 +[gCPUforLuigi](@ref gCPUforLuigi) | 0x800E3820 +[gCPUforYoshi](@ref gCPUforYoshi) | 0x800E3830 +[gCPUforToad](@ref gCPUforToad) | 0x800E3840 +[gCPUforDk](@ref gCPUforDk) | 0x800E3850 +[gCPUforWario](@ref gCPUforWario) | 0x800E3860 +[gCPUforPeach](@ref gCPUforPeach) | 0x800E3870 +[gCPUforBowser](@ref gCPUforBowser) | 0x800E3880 +[gCPUforPlayer](@ref gCPUforPlayer) | 0x800E3890 +[gCPUforMarioAndLuigi](@ref gCPUforMarioAndLuigi) | 0x800E38B0 +[gCPUforMarioAndYoshi](@ref gCPUforMarioAndYoshi) | 0x800E38BC +[gCPUforMarioAndToad](@ref gCPUforMarioAndToad) | 0x800E38C8 +[gCPUforMarioAndDk](@ref gCPUforMarioAndDk) | 0x800E38D4 +[gCPUforMarioAndWario](@ref gCPUforMarioAndWario) | 0x800E38E0 +[gCPUforMarioAndPeach](@ref gCPUforMarioAndPeach) | 0x800E38EC +[gCPUforMarioAndBowser](@ref gCPUforMarioAndBowser) | 0x800E38F8 +[gCPUforLuigiAndMario](@ref gCPUforLuigiAndMario) | 0x800E3904 +[gCPUforLuigiAndYoshi](@ref gCPUforLuigiAndYoshi) | 0x800E3910 +[gCPUforLuigiAndToad](@ref gCPUforLuigiAndToad) | 0x800E391C +[gCPUforLuigiAndDk](@ref gCPUforLuigiAndDk) | 0x800E3928 +[gCPUforLuigiAndWario](@ref gCPUforLuigiAndWario) | 0x800E3934 +[gCPUforLuigiAndPeach](@ref gCPUforLuigiAndPeach) | 0x800E3940 +[gCPUforLuigiAndBowser](@ref gCPUforLuigiAndBowser) | 0x800E394C +[gCPUforYoshiAndMario](@ref gCPUforYoshiAndMario) | 0x800E3958 +[gCPUforYoshiAndLuigi](@ref gCPUforYoshiAndLuigi) | 0x800E3964 +[gCPUforYoshiAndToad](@ref gCPUforYoshiAndToad) | 0x800E3970 +[gCPUforYoshiAndDk](@ref gCPUforYoshiAndDk) | 0x800E397C +[gCPUforYoshiAndWario](@ref gCPUforYoshiAndWario) | 0x800E3988 +[gCPUforYoshiAndPeach](@ref gCPUforYoshiAndPeach) | 0x800E3994 +[gCPUforYoshiAndBowser](@ref gCPUforYoshiAndBowser) | 0x800E39A0 +[gCPUforToadAndMario](@ref gCPUforToadAndMario) | 0x800E39AC +[gCPUforToadAndLuigi](@ref gCPUforToadAndLuigi) | 0x800E39B8 +[gCPUforToadAndYoshi](@ref gCPUforToadAndYoshi) | 0x800E39C4 +[gCPUforToadAndDk](@ref gCPUforToadAndDk) | 0x800E39D0 +[gCPUforToadAndWario](@ref gCPUforToadAndWario) | 0x800E39DC +[gCPUforToadAndPeach](@ref gCPUforToadAndPeach) | 0x800E39E8 +[gCPUforToadAndBowser](@ref gCPUforToadAndBowser) | 0x800E39F4 +[gCPUforDkAndMario](@ref gCPUforDkAndMario) | 0x800E3A00 +[gCPUforDkAndLuigi](@ref gCPUforDkAndLuigi) | 0x800E3A0C +[gCPUforDkAndToad](@ref gCPUforDkAndToad) | 0x800E3A18 +[gCPUforDkAndYoshi](@ref gCPUforDkAndYoshi) | 0x800E3A24 +[gCPUforDkAndWario](@ref gCPUforDkAndWario) | 0x800E3A30 +[gCPUforDkAndPeach](@ref gCPUforDkAndPeach) | 0x800E3A3C +[gCPUforDkAndBowser](@ref gCPUforDkAndBowser) | 0x800E3A48 +[gCPUforWarioAndMario](@ref gCPUforWarioAndMario) | 0x800E3A54 +[gCPUforWarioAndLuigi](@ref gCPUforWarioAndLuigi) | 0x800E3A60 +[gCPUforWarioAndYoshi](@ref gCPUforWarioAndYoshi) | 0x800E3A6C +[gCPUforWarioAndDk](@ref gCPUforWarioAndDk) | 0x800E3A78 +[gCPUforWarioAndToad](@ref gCPUforWarioAndToad) | 0x800E3A84 +[gCPUforWarioAndPeach](@ref gCPUforWarioAndPeach) | 0x800E3A90 +[gCPUforWarioAndBowser](@ref gCPUforWarioAndBowser) | 0x800E3A9C +[gCPUforPeachAndMario](@ref gCPUforPeachAndMario) | 0x800E3AA8 +[gCPUforPeachAndLuigi](@ref gCPUforPeachAndLuigi) | 0x800E3AB4 +[gCPUforPeachAndYoshi](@ref gCPUforPeachAndYoshi) | 0x800E3AC0 +[gCPUforPeachAndDk](@ref gCPUforPeachAndDk) | 0x800E3ACC +[gCPUforPeachAndWario](@ref gCPUforPeachAndWario) | 0x800E3AD8 +[gCPUforPeachAndToad](@ref gCPUforPeachAndToad) | 0x800E3AE4 +[gCPUforPeachAndBowser](@ref gCPUforPeachAndBowser) | 0x800E3AF0 +[gCPUforBowserAndMario](@ref gCPUforBowserAndMario) | 0x800E3AFC +[gCPUforBowserAndLuigi](@ref gCPUforBowserAndLuigi) | 0x800E3B08 +[gCPUforBowserAndYoshi](@ref gCPUforBowserAndYoshi) | 0x800E3B14 +[gCPUforBowserAndDk](@ref gCPUforBowserAndDk) | 0x800E3B20 +[gCPUforBowserAndWario](@ref gCPUforBowserAndWario) | 0x800E3B2C +[gCPUforBowserAndToad](@ref gCPUforBowserAndToad) | 0x800E3B38 +[gCPUforBowserAndPeach](@ref gCPUforBowserAndPeach) | 0x800E3B44 +[gListCPUforMario](@ref gListCPUforMario) | 0x800E3B50 +[gListCPUforLuigi](@ref gListCPUforLuigi) | 0x800E3B70 +[gListCPUforYoshi](@ref gListCPUforYoshi) | 0x800E3B90 +[gListCPUforToad](@ref gListCPUforToad) | 0x800E3BB0 +[gListCPUforDk](@ref gListCPUforDk) | 0x800E3BD0 +[gListCPUforWario](@ref gListCPUforWario) | 0x800E3BF0 +[gListCPUforPeach](@ref gListCPUforPeach) | 0x800E3C10 +[gListCPUforBowser](@ref gListCPUforBowser) | 0x800E3C30 +[gCPUforTwoPlayer](@ref gCPUforTwoPlayer) | 0x800E3C50 [D_800E43A0](@ref D_800E43A0) | 0x800E43A0 [D_800E43A4](@ref D_800E43A4) | 0x800E43A4 [D_800E43A8](@ref D_800E43A8) | 0x800E43A8 @@ -4370,25 +4370,25 @@ Variable Name | Memory Address [D_801652C0](@ref D_801652C0) | 0x801652C0 [D_801652E0](@ref D_801652E0) | 0x801652E0 [D_80165300](@ref D_80165300) | 0x80165300 -[D_80165310](@ref D_80165310) | 0x80165310 -[D_80165320](@ref D_80165320) | 0x80165320 +[gCopyPathIndexByPlayerId](@ref gCopyPathIndexByPlayerId) | 0x80165310 +[gCopyNearestWaypointByPlayerId](@ref gCopyNearestWaypointByPlayerId) | 0x80165320 [D_80165330](@ref D_80165330) | 0x80165330 [D_80165340](@ref D_80165340) | 0x80165340 [D_80165348](@ref D_80165348) | 0x80165348 [D_801653C0](@ref D_801653C0) | 0x801653C0 [gPlayerIsThrottleActive](@ref gPlayerIsThrottleActive) | 0x801653E0 [D_80165400](@ref D_80165400) | 0x80165400 -[D_80165420](@ref D_80165420) | 0x80165420 -[D_80165440](@ref D_80165440) | 0x80165440 +[gFrameSinceLastACombo](@ref gFrameSinceLastACombo) | 0x80165420 +[gCountASwitch](@ref gCountASwitch) | 0x80165440 [gIsPlayerTripleAButtonCombo](@ref gIsPlayerTripleAButtonCombo) | 0x80165460 -[D_80165480](@ref D_80165480) | 0x80165480 -[D_801654A0](@ref D_801654A0) | 0x801654A0 +[gTimerBoostTripleACombo](@ref gTimerBoostTripleACombo) | 0x80165480 +[gPlayerIsBrakeActive](@ref gPlayerIsBrakeActive) | 0x801654A0 [D_801654C0](@ref D_801654C0) | 0x801654C0 -[D_801654E0](@ref D_801654E0) | 0x801654E0 -[D_80165500](@ref D_80165500) | 0x80165500 -[D_80165520](@ref D_80165520) | 0x80165520 -[D_80165540](@ref D_80165540) | 0x80165540 -[D_80165560](@ref D_80165560) | 0x80165560 +[gFrameSinceLastBCombo](@ref gFrameSinceLastBCombo) | 0x801654E0 +[gCountBChangement](@ref gCountBChangement) | 0x80165500 +[gIsPlayerTripleBButtonCombo](@ref gIsPlayerTripleBButtonCombo) | 0x80165520 +[gTimerBoostTripleBCombo](@ref gTimerBoostTripleBCombo) | 0x80165540 +[chooseCPUPlayers](@ref chooseCPUPlayers) | 0x80165560 [D_8016556E](@ref D_8016556E) | 0x8016556E [D_80165570](@ref D_80165570) | 0x80165570 [D_80165572](@ref D_80165572) | 0x80165572