From eeaa6c5fd4957b6719fcb9f76cef5f9931237891 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sat, 23 Sep 2017 09:21:55 -0400 Subject: Expanded gender field MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rather than representing it as a binary, the data structure now uses two bits for gender, in order to represent genderless Pokémon. --- gba/source/serialize.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gba') diff --git a/gba/source/serialize.c b/gba/source/serialize.c index 069418d..d08dfc2 100644 --- a/gba/source/serialize.c +++ b/gba/source/serialize.c @@ -99,7 +99,10 @@ void PokemonIntermediateInit( // Derive gender from the personality value. int genderThreshold = baseStats->genderRatio; - if ((genderThreshold == 0) || (genderThreshold == 255)) + if (genderThreshold == 255) + { + pki->gender = 2; + } else if (genderThreshold == 0) { pki->gender = 0; } else if (genderThreshold == 254) -- cgit 1.4.1