about summary refs log tree commit diff stats
path: root/gba
diff options
context:
space:
mode:
Diffstat (limited to 'gba')
-rw-r--r--gba/source/main.c32
1 files changed, 30 insertions, 2 deletions
diff --git a/gba/source/main.c b/gba/source/main.c index 4bb120f..375adb8 100644 --- a/gba/source/main.c +++ b/gba/source/main.c
@@ -199,9 +199,9 @@ int main(void)
199 sendU32(partyCount); 199 sendU32(partyCount);
200 waitForAck(); 200 waitForAck();
201 201
202 for (int pki=0; pki<partyCount; pki++) 202 for (int ki=0; ki<partyCount; ki++)
203 { 203 {
204 struct Pokemon* pkm = (playerParty + pki); 204 struct Pokemon* pkm = (playerParty + ki);
205 struct BoxPokemon* bpkm = &(pkm->box); 205 struct BoxPokemon* bpkm = &(pkm->box);
206 206
207 struct PokemonIntermediate pki; 207 struct PokemonIntermediate pki;
@@ -209,4 +209,32 @@ int main(void)
209 PokemonIntermediateInit(&pki, bpkm); 209 PokemonIntermediateInit(&pki, bpkm);
210 PokemonIntermediateStream(&pki); 210 PokemonIntermediateStream(&pki);
211 } 211 }
212
213 struct PokemonStorage* pc = gameData.SaveBlock3;
214
215 for (int bi=0; bi<14; bi++)
216 {
217 struct BoxPokemon* box = pc->boxes[bi];
218
219 for (int si=0; si<30; si++)
220 {
221 struct BoxPokemon* bpkm = &(box[si]);
222
223 DecryptBoxPokemon(bpkm);
224 struct PokemonSubstruct0* sub0 = GetBoxPokemonSubstruct0(bpkm);
225 bool isPoke = (sub0->species != 0);
226 EncryptBoxPokemon(bpkm);
227
228 sendU32(isPoke);
229 waitForAck();
230
231 if (isPoke)
232 {
233 struct PokemonIntermediate pki;
234
235 PokemonIntermediateInit(&pki, bpkm);
236 PokemonIntermediateStream(&pki);
237 }
238 }
239 }
212} 240}