From e2a76d1f0fd978f285edf1dbc0f6e87cf89c63ce Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Wed, 13 Sep 2017 15:43:40 -0400 Subject: Added "Orre" flag to Pokémon serialization MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See wiki for more information on why. --- gba/source/serialize.c | 1 + include/pokemon.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/gba/source/serialize.c b/gba/source/serialize.c index 12afbdc..069418d 100644 --- a/gba/source/serialize.c +++ b/gba/source/serialize.c @@ -91,6 +91,7 @@ void PokemonIntermediateInit( pki->pokeball = sub3->pokeball; pki->altAbility = sub3->altAbility; pki->language = bpkm->language & 7; + pki->orre = (sub3->metGame == 15); // Derive nature from the personality value. pki->nature = (bpkm->personality % 25); diff --git a/include/pokemon.h b/include/pokemon.h index bd311c4..072386f 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -62,7 +62,8 @@ struct __attribute__((aligned(4))) PokemonIntermediate { u8 pokeball; u8 language:3; u8 altAbility:1; - u8 filler:4; // waste of space but nothing to pack it with + u8 orre:1; + u8 filler:3; // waste of space but nothing to pack it with // the following values are generated from the personality value. u8 nature:6; -- cgit 1.4.1