about summary refs log tree commit diff stats
path: root/gba/source/serialize.h
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2017-08-18 13:49:00 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2017-08-18 13:49:00 -0400
commit08dfb0aa80668b80c4a31bd064f5f2d729e5b7f6 (patch)
treeb46baa9353c0919efaed4349d2207958fa0bfaf5 /gba/source/serialize.h
parenta19507262602fa31f9f14a9e4f4e03e375bca111 (diff)
downloadgen3uploader-08dfb0aa80668b80c4a31bd064f5f2d729e5b7f6.tar.gz
gen3uploader-08dfb0aa80668b80c4a31bd064f5f2d729e5b7f6.tar.bz2
gen3uploader-08dfb0aa80668b80c4a31bd064f5f2d729e5b7f6.zip
Started working on serializing pokemon data
The GBA program now sends serialized data about the first pokemon in the
player's party over to the Wii. This data doesn't yet include all of the
information that we will eventually want. It does, however, not transfer
any private data, specifically IVs, EVs, and the personality value. It
does this by deriving the public information (stats, nature, gender,
shiny) before sending the pokemon over. Because of this, lookup tables
for things such as base stats were needed, and given that these are
large tables, it was easier to use the tables already existent in the
game's ROM. Thus, the addresses of the three lookup tables that are now
used are necessary for each ROM that this tool supports.

I derived the addresses for version 1 of English Pokemon LeafGreen by dumping
my own copy and searching through it with a text editor. Thus, at the current
time, that cartridge is the only one that is supported. I will supplement this
soon with addresses for the other four gen 3 carts that I have, but that will
still not provide a very large amount of coverage. I have not yet decided how
to address this issue.

There is one current bug with the serialized data: the Wii doesn't seem
to see the original trainer ID. Will fix.
Diffstat (limited to 'gba/source/serialize.h')
-rw-r--r--gba/source/serialize.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/gba/source/serialize.h b/gba/source/serialize.h new file mode 100644 index 0000000..21049c5 --- /dev/null +++ b/gba/source/serialize.h
@@ -0,0 +1,19 @@
1#ifndef POKEMON_H_67C60AC1
2#define POKEMON_H_67C60AC1
3
4#include <gba.h>
5
6struct BoxPokemon;
7struct PokemonIntermediate;
8struct GameData;
9
10void PokemonIntermediateInit(
11 struct PokemonIntermediate* pki,
12 struct BoxPokemon* bpkm,
13 u16 trainerId,
14 u16 secretId,
15 const struct GameData* gameData);
16
17void PokemonIntermediateStream(struct PokemonIntermediate* pki);
18
19#endif /* end of include guard: POKEMON_H_67C60AC1 */