about summary refs log tree commit diff stats
path: root/gba
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2017-09-23 09:21:55 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2017-09-23 09:21:55 -0400
commiteeaa6c5fd4957b6719fcb9f76cef5f9931237891 (patch)
tree0a0db13dc2751b995a7742bbc8bb78c0037ce81e /gba
parentab81a9b0a3619b5043f4752580d79f2c14b96e73 (diff)
downloadgen3uploader-eeaa6c5fd4957b6719fcb9f76cef5f9931237891.tar.gz
gen3uploader-eeaa6c5fd4957b6719fcb9f76cef5f9931237891.tar.bz2
gen3uploader-eeaa6c5fd4957b6719fcb9f76cef5f9931237891.zip
Expanded gender field
Rather than representing it as a binary, the data structure now uses two
bits for gender, in order to represent genderless Pokémon.
Diffstat (limited to 'gba')
-rw-r--r--gba/source/serialize.c5
1 files changed, 4 insertions, 1 deletions
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(
99 // Derive gender from the personality value. 99 // Derive gender from the personality value.
100 int genderThreshold = baseStats->genderRatio; 100 int genderThreshold = baseStats->genderRatio;
101 101
102 if ((genderThreshold == 0) || (genderThreshold == 255)) 102 if (genderThreshold == 255)
103 {
104 pki->gender = 2;
105 } else if (genderThreshold == 0)
103 { 106 {
104 pki->gender = 0; 107 pki->gender = 0;
105 } else if (genderThreshold == 254) 108 } else if (genderThreshold == 254)