Skip to content

Commit

Permalink
Ugh
Browse files Browse the repository at this point in the history
  • Loading branch information
WhenGryphonsFly committed Aug 17, 2023
1 parent 2c15471 commit 8270a56
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions src/pokedex_end.c
Original file line number Diff line number Diff line change
@@ -1,31 +1,11 @@
#include "global.h"
#include "main.h"

#ifdef NONMATCHING
void ResetPokedex(void)
{
s32 i;
for (i = NUM_SPECIES - 1; i >= 0; i--)
for (i = 0; i < NUM_SPECIES; i++)
{
gMain_saveData.pokedexFlags[i] = 0;
}
}
#else
NAKED
void ResetPokedex(void)
{
asm_unified("\n\
ldr r1, _08008AD0 @ =gMain+0x74\n\
movs r2, #0\n\
adds r0, r1, #0\n\
adds r0, #0xcc\n\
_08008AC4:\n\
strb r2, [r0]\n\
subs r0, #1\n\
cmp r0, r1\n\
bge _08008AC4\n\
bx lr\n\
.align 2, 0\n\
_08008AD0: .4byte gMain+0x74");
}
#endif // NONMATCHING

0 comments on commit 8270a56

Please sign in to comment.