summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2021-02-16 16:25:02 -0500
committerGitHub <noreply@github.com>2021-02-16 16:25:02 -0500
commit549ddb8c9518c4409adfbbf9c536d2b14327a246 (patch)
treea6ba28a4839f85ce1780053487aff462faaf1922
parent2e355ac8480941f791192c1342a2bdfcd3951fe7 (diff)
parent1dda9939ab86844176bf8b00fd78c4afbea21fae (diff)
Merge pull request #1335 from Deokishisu/ExternalEvents-doc
Document More External Events
-rw-r--r--include/global.h21
1 files changed, 16 insertions, 5 deletions
diff --git a/include/global.h b/include/global.h
index 5b1a7b44b..38850d6fa 100644
--- a/include/global.h
+++ b/include/global.h
@@ -899,19 +899,30 @@ struct MysteryEventStruct
}; // 0x36C 0x3598
// For external event data storage. The majority of these may have never been used.
+// In Emerald, the only known used fields are the PokeCoupon and BoxRS ones, but hacking the distribution discs allows Emerald to receive events and set the others
struct ExternalEventData
{
u8 unknownExternalDataFields1[7]; // if actually used, may be broken up into different fields.
- u32 currentPokeCoupons; // PokéCoupons stored by Pokémon Colosseum and XD from Mt. Battle runs. Earned PokéCoupons are also added to totalEarnedPokeCoupons.
- u32 totalEarnedPokeCoupons; // Used by the JP Colosseum bonus disc. Determines PokéCoupon rank to distribute rewards. Unread in International games.
- u8 unknownExternalDataFields2[5]; // if actually used, may be broken up into different fields.
+ u32 unknownExternalDataFields2:8;
+ u32 currentPokeCoupons:24; // PokéCoupons stored by Pokémon Colosseum and XD from Mt. Battle runs. Earned PokéCoupons are also added to totalEarnedPokeCoupons. Colosseum/XD caps this at 9,999,999, but will read up to 16,777,215.
+ u32 gotGoldPokeCouponTitleReward:1; // Master Ball from Jp Colosseum Bonus Disc; for reaching 30,000 totalEarnedPokeCoupons
+ u32 gotSilverPokeCouponTitleReward:1; // Light Ball Pikachu from JP Colosseum Bonus Disc; for reaching 5000 totalEarnedPokeCoupons
+ u32 gotBronzePokeCouponTitleReward:1; // PP Max from JP Colosseum Bonus Disc; for reaching 2500 totalEarnedPokeCoupons
+ u32 receivedAgetoCelebi:1; // from JP Colosseum Bonus Disc
+ u32 unknownExternalDataFields3:4;
+ u32 totalEarnedPokeCoupons:24; // Used by the JP Colosseum bonus disc. Determines PokéCoupon rank to distribute rewards. Unread in International games. Colosseum/XD caps this at 9,999,999.
+ u8 unknownExternalDataFields4[5]; // if actually used, may be broken up into different fields.
} __attribute__((packed)); /*size = 0x14*/
// For external event flags. The majority of these may have never been used.
+// In Emerald, Jirachi cannot normally be received, but hacking the distribution discs allows Emerald to receive Jirachi and set the flag
struct ExternalEventFlags
{
+ u8 usedBoxRS:1; // Set by Pokémon Box: Ruby & Sapphire; denotes whether this save has connected to it and triggered the free False Swipe Swablu Egg giveaway.
+ u8 boxRSEggsUnlocked:2; // Set by Pokémon Box: Ruby & Sapphire; denotes the number of Eggs unlocked from deposits; 1 for ExtremeSpeed Zigzagoon (at 100 deposited), 2 for Pay Day Skitty (at 500 deposited), 3 for Surf Pichu (at 1500 deposited)
+ u8 padding:5;
u8 unknownFlag1;
- u8 receivedWishmakerJirachi; // may also be used for Ageto Celebi?
+ u8 receivedGCNJirachi; // Both the US Colosseum Bonus Disc and PAL/AUS Pokémon Channel use this field. One cannot receive a WISHMKR Jirachi and CHANNEL Jirachi with the same savefile.
u8 unknownFlag3;
u8 unknownFlag4;
u8 unknownFlag5;
@@ -931,7 +942,7 @@ struct ExternalEventFlags
u8 unknownFlag19;
u8 unknownFlag20;
-};/*size = 0x14*/
+} __attribute__((packed));/*size = 0x15*/
struct SaveBlock1
{