about summary refs log tree commit diff stats
path: root/gba/source/main.c
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2017-09-30 08:15:49 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2017-09-30 08:15:49 -0400
commitde39982228cc445fb02ca061e6484f7030104b7c (patch)
tree75b70bbf9e6b71d04863bc5c46f7399bcb1fc032 /gba/source/main.c
parent62be650076d6ea83e9822be56eaa59ab4195202c (diff)
downloadgen3uploader-de39982228cc445fb02ca061e6484f7030104b7c.tar.gz
gen3uploader-de39982228cc445fb02ca061e6484f7030104b7c.tar.bz2
gen3uploader-de39982228cc445fb02ca061e6484f7030104b7c.zip
Extractor now gets gift ribbon descriptions
Also fixed offsets of gift ribbon descriptions in the RSE save data, and
added the offset for FRLG.
Diffstat (limited to 'gba/source/main.c')
-rw-r--r--gba/source/main.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/gba/source/main.c b/gba/source/main.c index 30f11d6..71db50d 100644 --- a/gba/source/main.c +++ b/gba/source/main.c
@@ -130,6 +130,36 @@ int main(void)
130 return 0; 130 return 0;
131 } 131 }
132 132
133 // Send gift ribbon descriptions
134 u8* giftRibbons = 0;
135 if (GAME_RS)
136 {
137 giftRibbons = gameData.SaveBlock1->rs.giftRibbons;
138 } else if (GAME_FRLG)
139 {
140 giftRibbons = gameData.SaveBlock1->frlg.giftRibbons;
141 } else if (GAME_EM)
142 {
143 giftRibbons = gameData.SaveBlock1->e.giftRibbons;
144 }
145
146 u32 gn1 =
147 (giftRibbons[0] << 24)
148 | (giftRibbons[1] << 16)
149 | (giftRibbons[2] << 8)
150 | (giftRibbons[3]);
151
152 u32 gn2 =
153 (giftRibbons[4] << 24)
154 | (giftRibbons[5] << 16)
155 | (giftRibbons[6] << 8);
156
157 sendU32(gn1);
158 waitForAck();
159
160 sendU32(gn2);
161 waitForAck();
162
133 // Send Pokédex data 163 // Send Pokédex data
134 u8* pokedexSeen = 0; 164 u8* pokedexSeen = 0;
135 if (GAME_RS) 165 if (GAME_RS)