diff options
author | Seth Barberee <seth.barberee@gmail.com> | 2021-05-23 16:19:35 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-23 16:19:35 -0500 |
commit | eaa141c612dd1689936a21bd57018a55ff686b69 (patch) | |
tree | fafe2a9a562af6a8e36716ff76a5b3e8b30d4411 /src/friend_area.c | |
parent | f402e46cd3c8b7236673d6edbae77903a7cc0618 (diff) |
Keep on keepin on (#38)
* end of may dump of work
* move save text to src
* decomp a little more
Diffstat (limited to 'src/friend_area.c')
-rw-r--r-- | src/friend_area.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/src/friend_area.c b/src/friend_area.c index 27eddee..a6fd1d5 100644 --- a/src/friend_area.c +++ b/src/friend_area.c @@ -1,22 +1,13 @@ #include "global.h" #include "constants/friend_area.h" #include "friend_area.h" +#include "pokemon.h" extern bool8 gBoughtFriendAreas[NUM_FRIEND_AREAS]; extern bool8 *gFriendAreas; -struct unkStruct_203B45C -{ - // size: 0x58? - u16 unk0; - s16 unk2; - u8 unk4[0x24]; - u8 unk28; - u8 unk29[0x2f]; -}; - -extern struct unkStruct_203B45C gRecruitedPokemonRef[]; +extern struct unkStruct_203B45C *gRecruitedPokemonRef; extern bool8 *gFriendAreas; @@ -362,14 +353,17 @@ void sub_8092404(u8 r0, u16 *r1, bool8 r2, bool8 r3) s32 counter; bool32 flag; s32 r6; + struct PokemonStruct *pokemon; + r6 = 0; for(counter = 0; counter <= 412; counter++) { - if((u8)(gRecruitedPokemonRef[counter].unk0) & 1) + pokemon = &gRecruitedPokemonRef->pokemon[counter]; + if((u8)(pokemon->unk0) & 1) { - if(((u8)gRecruitedPokemonRef[counter].unk2 == 0) || r2) + if((pokemon->unk2 == 0) || r2) { - flag = (u8)gRecruitedPokemonRef[counter].unk4[0] == 65; + flag = (u8)pokemon->fill4[0] == 65; if(!flag || r3) { if(sub_80923D4(counter) == r0) |