about summary refs log tree commit diff stats
path: root/gba
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2017-09-29 18:39:52 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2017-09-29 18:39:52 -0400
commit62be650076d6ea83e9822be56eaa59ab4195202c (patch)
tree3f9742814e42523292ee30aef266058547ddac9a /gba
parent7012d24b532a4996cfe27fdea40b4209d608a1a7 (diff)
downloadgen3uploader-62be650076d6ea83e9822be56eaa59ab4195202c.tar.gz
gen3uploader-62be650076d6ea83e9822be56eaa59ab4195202c.tar.bz2
gen3uploader-62be650076d6ea83e9822be56eaa59ab4195202c.zip
Extractor now gets ribbons
Diffstat (limited to 'gba')
-rw-r--r--gba/source/savestructs.h14
-rw-r--r--gba/source/serialize.c20
2 files changed, 27 insertions, 7 deletions
diff --git a/gba/source/savestructs.h b/gba/source/savestructs.h index fb8ef36..a5aff4e 100644 --- a/gba/source/savestructs.h +++ b/gba/source/savestructs.h
@@ -342,13 +342,13 @@ struct PokemonSubstruct3
342 /* 0x0A */ u32 victoryRibbon:1; 342 /* 0x0A */ u32 victoryRibbon:1;
343 /* 0x0A */ u32 artistRibbon:1; 343 /* 0x0A */ u32 artistRibbon:1;
344 /* 0x0A */ u32 effortRibbon:1; 344 /* 0x0A */ u32 effortRibbon:1;
345 /* 0x0A */ u32 giftRibbon1:1; 345 /* 0x0A */ u32 marineRibbon:1;
346 /* 0x0A */ u32 giftRibbon2:1; 346 /* 0x0A */ u32 landRibbon:1;
347 /* 0x0A */ u32 giftRibbon3:1; 347 /* 0x0A */ u32 skyRibbon:1;
348 /* 0x0A */ u32 giftRibbon4:1; 348 /* 0x0A */ u32 countryRibbon:1;
349 /* 0x0B */ u32 giftRibbon5:1; 349 /* 0x0B */ u32 nationalRibbon:1;
350 /* 0x0B */ u32 giftRibbon6:1; 350 /* 0x0B */ u32 earthRibbon:1;
351 /* 0x0B */ u32 giftRibbon7:1; 351 /* 0x0B */ u32 worldRibbon:1;
352 /* 0x0B */ u32 fatefulEncounter:5; // unused in Ruby/Sapphire, but the high bit must be set for Mew/Deoxys to obey in FR/LG/Emerald 352 /* 0x0B */ u32 fatefulEncounter:5; // unused in Ruby/Sapphire, but the high bit must be set for Mew/Deoxys to obey in FR/LG/Emerald
353}; 353};
354 354
diff --git a/gba/source/serialize.c b/gba/source/serialize.c index 5c4ff8d..4cb95ac 100644 --- a/gba/source/serialize.c +++ b/gba/source/serialize.c
@@ -101,6 +101,26 @@ void PokemonIntermediateInit(
101 pki->language = bpkm->language & 7; 101 pki->language = bpkm->language & 7;
102 pki->orre = (sub3->metGame == 15); 102 pki->orre = (sub3->metGame == 15);
103 103
104 pki->coolRibbons = sub3->coolRibbon;
105 pki->beautyRibbons = sub3->beautyRibbon;
106 pki->cuteRibbons = sub3->cuteRibbon;
107 pki->smartRibbons = sub3->smartRibbon;
108 pki->toughRibbons = sub3->toughRibbon;
109
110 pki->miscRibbons =
111 (CHAMPION_RIBBON * sub3->championRibbon)
112 | (WINNING_RIBBON * sub3->winningRibbon)
113 | (VICTORY_RIBBON * sub3->victoryRibbon)
114 | (ARTIST_RIBBON * sub3->artistRibbon)
115 | (EFFORT_RIBBON * sub3->effortRibbon)
116 | (MARINE_RIBBON * sub3->marineRibbon)
117 | (LAND_RIBBON * sub3->landRibbon)
118 | (SKY_RIBBON * sub3->skyRibbon)
119 | (COUNTRY_RIBBON * sub3->countryRibbon)
120 | (NATIONAL_RIBBON * sub3->nationalRibbon)
121 | (EARTH_RIBBON * sub3->earthRibbon)
122 | (WORLD_RIBBON * sub3->worldRibbon);
123
104 // Derive nature from the personality value. 124 // Derive nature from the personality value.
105 pki->nature = (bpkm->personality % 25); 125 pki->nature = (bpkm->personality % 25);
106 126