From 91b3ff200ea7e9de048c1a9d784df43147bc1042 Mon Sep 17 00:00:00 2001 From: AltoXorg <56553686+Alto1772@users.noreply.github.com> Date: Fri, 8 Nov 2024 18:57:56 +0800 Subject: [PATCH] resolve PR comments --- src/battle/action_cmd/three_chances.c | 7 +++---- src/battle/level_up.c | 8 ++++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/battle/action_cmd/three_chances.c b/src/battle/action_cmd/three_chances.c index 080fdbfcce..220287335e 100644 --- a/src/battle/action_cmd/three_chances.c +++ b/src/battle/action_cmd/three_chances.c @@ -40,7 +40,6 @@ enum { // input window before the light appears where A inputs cause timing test to fail #define ANTI_MASH_TIME 5 -#define PAL_DT_WRAP(x) (s32) ((x) * DT) INCLUDE_IMG("battle/action_cmd/three_chances_1.png", battle_action_cmd_three_chances_1_png); INCLUDE_PAL("battle/action_cmd/three_chances_1.pal", battle_action_cmd_three_chances_1_pal); @@ -370,7 +369,7 @@ void N(update)(void) { && acs->threeChances.time >= -5 ) { s32 (*difficultyVec)[2] = (s32 (*)[2])battleStatus->actionCmdDifficultyTable; - window = difficultyVec[acs->difficulty][0] + difficultyVec[acs->difficulty][1] + PAL_DT_WRAP(ANTI_MASH_TIME); + window = difficultyVec[acs->difficulty][0] + difficultyVec[acs->difficulty][1] + (s32)(ANTI_MASH_TIME * DT); pos = battleStatus->inputBufferPos; pos -= window; if (pos < 0) { @@ -453,7 +452,7 @@ void N(update)(void) { && acs->threeChances.time >= -5 ) { s32 (*difficultyVec)[2] = (s32 (*)[2])battleStatus->actionCmdDifficultyTable; - window = difficultyVec[acs->difficulty][0] + difficultyVec[acs->difficulty][1] + PAL_DT_WRAP(ANTI_MASH_TIME - 1); + window = difficultyVec[acs->difficulty][0] + difficultyVec[acs->difficulty][1] + (s32)((ANTI_MASH_TIME - 1) * DT); if (window < 6) { window = 6; } @@ -541,7 +540,7 @@ void N(update)(void) { && acs->threeChances.time >= -5 ) { s32 (*difficultyVec)[2] = (s32 (*)[2])battleStatus->actionCmdDifficultyTable; - window = difficultyVec[acs->difficulty][0] + difficultyVec[acs->difficulty][1] + PAL_DT_WRAP(ANTI_MASH_TIME - 2); + window = difficultyVec[acs->difficulty][0] + difficultyVec[acs->difficulty][1] + (s32)((ANTI_MASH_TIME - 2) * DT); if (window < 6) { window = 6; } diff --git a/src/battle/level_up.c b/src/battle/level_up.c index cfcd5f8e57..0c7b5d4af6 100644 --- a/src/battle/level_up.c +++ b/src/battle/level_up.c @@ -593,13 +593,13 @@ EvtScript EVS_ShowLevelUp = { #if VERSION_PAL Call(GetLanguage, LVar0) Switch(LVar0) - CaseEq(0) + CaseEq(LANGUAGE_EN) Call(CreateVirtualEntity, LVar9, Ref(EMS_level_up_en_de)) - CaseEq(1) + CaseEq(LANGUAGE_DE) Call(CreateVirtualEntity, LVar9, Ref(EMS_level_up_en_de)) - CaseEq(2) + CaseEq(LANGUAGE_FR) Call(CreateVirtualEntity, LVar9, Ref(EMS_level_up_fr)) - CaseEq(3) + CaseEq(LANGUAGE_ES) Call(CreateVirtualEntity, LVar9, Ref(EMS_level_up_es)) EndSwitch #else