From 403326035eb305a5ac2558bd8b784bc3c1dba2d3 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Wed, 11 Oct 2023 03:41:34 +0200 Subject: [PATCH] fix broken move anims in tests (#3398) --- include/test/battle.h | 1 - test/test_runner_battle.c | 7 ++++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/test/battle.h b/include/test/battle.h index 2314e0961c..e99eae4316 100644 --- a/include/test/battle.h +++ b/include/test/battle.h @@ -679,7 +679,6 @@ struct BattleTestData u8 aiActionsPlayed[MAX_BATTLERS_COUNT]; struct ExpectedAIAction expectedAiActions[MAX_BATTLERS_COUNT][MAX_EXPECTED_ACTIONS]; struct ExpectedAiScore expectedAiScores[MAX_BATTLERS_COUNT][MAX_TURNS][MAX_AI_SCORE_COMPARISION_PER_TURN]; // Max 4 comparisions per turn - struct AILogLine aiLogLines[MAX_BATTLERS_COUNT][MAX_MON_MOVES][MAX_AI_LOG_LINES]; u8 aiLogPrintedForMove[MAX_BATTLERS_COUNT]; // Marks ai score log as printed for move, so the same log isn't displayed multiple times. }; diff --git a/test/test_runner_battle.c b/test/test_runner_battle.c index 51daa11174..c6b7587d42 100644 --- a/test/test_runner_battle.c +++ b/test/test_runner_battle.c @@ -34,6 +34,7 @@ #undef Q_4_12 #define Q_4_12(n) (s32)((n) * 4096) +static EWRAM_DATA struct AILogLine sAILogLines[MAX_BATTLERS_COUNT][MAX_MON_MOVES][MAX_AI_LOG_LINES] = {0}; EWRAM_DATA struct BattleTestRunnerState *gBattleTestRunnerState = NULL; static void CB2_BattleTest_NextParameter(void); @@ -937,7 +938,7 @@ static void PrintAiMoveLog(u32 battlerId, u32 moveSlot, u32 moveId, s32 totalSco MgbaPrintf_("Score Log for move %S:\n", gMoveNames[moveId]); for (i = 0; i < MAX_AI_LOG_LINES; i++) { - struct AILogLine *log = &DATA.aiLogLines[battlerId][moveSlot][i]; + struct AILogLine *log = &sAILogLines[battlerId][moveSlot][i]; if (log->file) { if (log->set) @@ -973,7 +974,7 @@ static void ClearAiLog(u32 battlerId) u32 i, j; for (i = 0; i < MAX_MON_MOVES; i++) { - struct AILogLine *logs = DATA.aiLogLines[battlerId][i]; + struct AILogLine *logs = sAILogLines[battlerId][i]; for (j = 0; j < MAX_AI_LOG_LINES; j++) memset(&logs[j], 0, sizeof(struct AILogLine)); } @@ -2551,7 +2552,7 @@ struct AILogLine *GetLogLine(u32 battlerId, u32 moveIndex) for (i = 0; i < MAX_AI_LOG_LINES; i++) { - struct AILogLine *log = &DATA.aiLogLines[battlerId][moveIndex][i]; + struct AILogLine *log = &sAILogLines[battlerId][moveIndex][i]; if (log->file == NULL) { return log;