diff options
-rw-r--r-- | gba/source/serialize.c | 5 | ||||
-rw-r--r-- | include/pokemon.h | 7 |
2 files changed, 6 insertions, 6 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) |
diff --git a/include/pokemon.h b/include/pokemon.h index 072386f..04ecfa0 100644 --- a/include/pokemon.h +++ b/include/pokemon.h | |||
@@ -63,12 +63,9 @@ struct __attribute__((aligned(4))) PokemonIntermediate { | |||
63 | u8 language:3; | 63 | u8 language:3; |
64 | u8 altAbility:1; | 64 | u8 altAbility:1; |
65 | u8 orre:1; | 65 | u8 orre:1; |
66 | u8 filler:3; // waste of space but nothing to pack it with | 66 | u8 gender:2; |
67 | |||
68 | // the following values are generated from the personality value. | ||
69 | u8 nature:6; | ||
70 | u8 gender:1; | ||
71 | u8 shiny:1; | 67 | u8 shiny:1; |
68 | u8 nature; | ||
72 | u8 unownLetter; | 69 | u8 unownLetter; |
73 | 70 | ||
74 | // the level is calculated from the species and experience. this is mostly | 71 | // the level is calculated from the species and experience. this is mostly |