Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix broken move anims in tests #3398

Merged
merged 1 commit into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion include/test/battle.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
};

Expand Down
7 changes: 4 additions & 3 deletions test/test_runner_battle.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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));
}
Expand Down Expand Up @@ -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;
Expand Down
Loading