Move BoxRS Data Down to ExternalEventFlags

As suggested, moved the BoxRS data fields into ExternalEventFlags and packed that struct.
This commit is contained in:
Deokishisu 2021-02-16 16:01:18 -05:00
parent fb60e036ce
commit 7f55bf875c

View File

@ -912,15 +912,15 @@ struct ExternalEventData
u32 unknownExternalDataFields3:4; 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. 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. u8 unknownExternalDataFields4[5]; // if actually used, may be broken up into different fields.
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. } __attribute__((packed)); /*size = 0x14*/
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;
} __attribute__((packed)); /*size = 0x15*/
// For external event flags. The majority of these may have never been used. // 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 // In Emerald, Jirachi cannot normally be received, but hacking the distribution discs allows Emerald to receive Jirachi and set the flag
struct ExternalEventFlags 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 unknownFlag1;
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 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 unknownFlag3;
@ -942,7 +942,7 @@ struct ExternalEventFlags
u8 unknownFlag19; u8 unknownFlag19;
u8 unknownFlag20; u8 unknownFlag20;
};/*size = 0x14*/ } __attribute__((packed));/*size = 0x15*/
struct SaveBlock1 struct SaveBlock1
{ {