Clear out parties between battle tests
This commit is contained in:
parent
bf68865e0d
commit
27539239db
@ -1341,6 +1341,18 @@ void TestRunner_Battle_AfterLastTurn(void)
|
||||
|
||||
static void TearDownBattle(void)
|
||||
{
|
||||
// Zero out the parties, data in them could potentially carry over
|
||||
for (u32 i = 0; i < 6; i++)
|
||||
{
|
||||
u32 *playerPtr = (u32 *)(&gPlayerParty[i]);
|
||||
u32 *opponentPtr = (u32 *)(&gEnemyParty[i]);
|
||||
for (u32 j = 0; j < sizeof(struct Pokemon)/4; j++)
|
||||
{
|
||||
playerPtr[j] = 0;
|
||||
opponentPtr[j] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
FreeMonSpritesGfx();
|
||||
FreeBattleSpritesData();
|
||||
FreeBattleResources();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user