Documenting padding in structs used by Saveblocks

This commit is contained in:
Eduardo Quezada
2022-12-17 22:55:43 -03:00
parent f87c5be45a
commit 66d1c9bc65
7 changed files with 161 additions and 90 deletions
+84 -58
View File
@@ -36,6 +36,7 @@ typedef union // size = 0x24
/*0x04*/ u16 words[6];
/*0x10*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
/*0x18*/ u8 language;
/*0x19*/ //u8 padding;
} fanclubLetter;
// TVSHOW_RECENT_HAPPENINGS
@@ -46,6 +47,7 @@ typedef union // size = 0x24
/*0x04*/ u16 words[6];
/*0x10*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
/*0x18*/ u8 language;
/*0x19*/ //u8 padding;
} recentHappenings;
// TVSHOW_PKMN_FAN_CLUB_OPINIONS
@@ -54,7 +56,7 @@ typedef union // size = 0x24
/*0x01*/ bool8 active;
/*0x02*/ u16 species;
/*0x04*/ u8 friendshipHighNybble:4;
/*0x04*/ u8 questionAsked:4;
u8 questionAsked:4;
/*0x05*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
/*0x0D*/ u8 language;
/*0x0E*/ u8 pokemonNameLanguage;
@@ -70,8 +72,8 @@ typedef union // size = 0x24
/*0x01*/ bool8 active;
/*0x02*/ u16 words[2];
/*0x06*/ u16 species;
/*0x08*/ u8 pad_08[3];
/*0x0b*/ u8 name[12];
/*0x08*/ u8 filler_08[3];
/*0x0B*/ u8 name[12];
/*0x17*/ u8 language;
} dummy;
@@ -98,8 +100,9 @@ typedef union // size = 0x24
/*0x04*/ u16 words[2];
/*0x08*/ u8 pokemonNickname[POKEMON_NAME_LENGTH + 1];
/*0x13*/ u8 contestCategory:3;
/*0x13*/ u8 contestRank:2;
/*0x13*/ u8 contestResult:2;
u8 contestRank:2;
u8 contestResult:2;
//u8 padding:1;
/*0x14*/ u16 move;
/*0x16*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
/*0x1E*/ u8 language;
@@ -121,6 +124,7 @@ typedef union // size = 0x24
/*0x1C*/ bool8 wonTheChallenge;
/*0x1D*/ u8 language;
/*0x1E*/ u8 pokemonNameLanguage;
/*0x1F*/ //u8 padding;
} bravoTrainerTower;
// TVSHOW_CONTEST_LIVE_UPDATES
@@ -131,14 +135,15 @@ typedef union // size = 0x24
/*0x04*/ u8 losingTrainerName[PLAYER_NAME_LENGTH + 1];
/*0x0C*/ u8 loserAppealFlag;
/*0x0D*/ u8 round1Placing;
/*0x0e*/ u8 round2Placing;
/*0x0f*/ u8 winnerAppealFlag;
/*0x0E*/ u8 round2Placing;
/*0x0F*/ u8 winnerAppealFlag;
/*0x10*/ u16 move;
/*0x12*/ u16 winningSpecies;
/*0x14*/ u8 winningTrainerName[PLAYER_NAME_LENGTH + 1];
/*0x1C*/ u8 category;
/*0x1D*/ u8 winningTrainerLanguage;
/*0x1E*/ u8 losingTrainerLanguage;
/*0x1F*/ //u8 padding;
} contestLiveUpdates;
// TVSHOW_3_CHEERS_FOR_POKEBLOCKS
@@ -147,7 +152,8 @@ typedef union // size = 0x24
/*0x01*/ bool8 active;
/*0x02*/ u8 sheen;
/*0x03*/ u8 flavor:3;
/*0x03*/ u8 color:2;
u8 color:2;
//u8 padding:3;
/*0x04*/ u8 worstBlenderName[PLAYER_NAME_LENGTH + 1];
/*0x0C*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
/*0x14*/ u8 language;
@@ -166,6 +172,7 @@ typedef union // size = 0x24
/*0x18*/ u8 battleType;
/*0x19*/ u8 language;
/*0x1A*/ u8 linkOpponentLanguage;
/*0x1B*/ //u8 padding;
} battleUpdate;
// TVSHOW_FAN_CLUB_SPECIAL
@@ -173,13 +180,14 @@ typedef union // size = 0x24
/*0x00*/ u8 kind;
/*0x01*/ bool8 active;
/*0x02*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
/*0x0a*/ u8 idLo;
/*0x0b*/ u8 idHi;
/*0x0c*/ u8 idolName[PLAYER_NAME_LENGTH + 1];
/*0x0A*/ u8 idLo;
/*0x0B*/ u8 idHi;
/*0x0C*/ u8 idolName[PLAYER_NAME_LENGTH + 1];
/*0x14*/ u16 words[1];
/*0x16*/ u8 score;
/*0x17*/ u8 language;
/*0x18*/ u8 idolNameLanguage;
/*0x19*/ //u8 padding;
} fanClubSpecial;
// TVSHOW_LILYCOVE_CONTEST_LADY
@@ -187,8 +195,8 @@ typedef union // size = 0x24
/*0x00*/ u8 kind;
/*0x01*/ bool8 active;
/*0x02*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
/*0x0a*/ u8 contestCategory;
/*0x0b*/ u8 nickname[POKEMON_NAME_LENGTH + 1];
/*0x0A*/ u8 contestCategory;
/*0x0B*/ u8 nickname[POKEMON_NAME_LENGTH + 1];
/*0x16*/ u8 pokeblockState;
/*0x17*/ u8 language;
/*0x18*/ u8 pokemonNameLanguage;
@@ -206,6 +214,7 @@ typedef union // size = 0x24
/*0x10*/ u16 species;
/*0x12*/ u8 nBallsUsed;
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
/*0x1B*/ //u8 padding;
} pokemonToday;
// TVSHOW_SMART_SHOPPER
@@ -214,11 +223,12 @@ typedef union // size = 0x24
/*0x01*/ bool8 active;
/*0x02*/ u8 priceReduced;
/*0x03*/ u8 language;
/*0x04*/ u8 pad04[2];
/*0x04*/ u8 filler_04[2];
/*0x06*/ u16 itemIds[SMARTSHOPPER_NUM_ITEMS];
/*0x0C*/ u16 itemAmounts[SMARTSHOPPER_NUM_ITEMS];
/*0x12*/ u8 shopLocation;
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
/*0x1B*/ //u8 padding;
} smartshopperShow;
// TVSHOW_POKEMON_TODAY_FAILED
@@ -226,13 +236,14 @@ typedef union // size = 0x24
/*0x00*/ u8 kind;
/*0x01*/ bool8 active;
/*0x02*/ u8 language;
/*0x03*/ u8 pad03[9];
/*0x0c*/ u16 species;
/*0x0e*/ u16 species2;
/*0x03*/ u8 filler_03[9];
/*0x0C*/ u16 species;
/*0x0E*/ u16 species2;
/*0x10*/ u8 nBallsUsed;
/*0x11*/ u8 outcome;
/*0x12*/ u8 location;
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
/*0x1B*/ //u8 padding;
} pokemonTodayFailed;
// TVSHOW_FISHING_ADVICE
@@ -243,8 +254,9 @@ typedef union // size = 0x24
/*0x03*/ u8 nFails;
/*0x04*/ u16 species;
/*0x06*/ u8 language;
/*0x07*/ u8 pad07[12];
/*0x07*/ u8 filler_07[12];
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
/*0x1B*/ //u8 padding;
} pokemonAngler;
// TVSHOW_WORLD_OF_MASTERS
@@ -255,10 +267,11 @@ typedef union // size = 0x24
/*0x04*/ u16 caughtPoke;
/*0x06*/ u16 steps;
/*0x08*/ u16 species;
/*0x0a*/ u8 location;
/*0x0b*/ u8 language;
/*0x0c*/ u8 pad0c[7];
/*0x0A*/ u8 location;
/*0x0B*/ u8 language;
/*0x0C*/ u8 filler_0C[7];
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
/*0x1B*/ //u8 padding2;
} worldOfMasters;
// TVSHOW_TODAYS_RIVAL_TRAINER
@@ -271,10 +284,11 @@ typedef union // size = 0x24
/*0x06*/ u8 nGoldSymbols;
/*0x07*/ u8 location;
/*0x08*/ u16 battlePoints;
/*0x0a*/ u16 mapLayoutId;
/*0x0c*/ u8 language;
/*0x0d*/ u8 filler_0d[6];
/*0x0A*/ u16 mapLayoutId;
/*0x0C*/ u8 language;
/*0x0D*/ u8 filler_0D[6];
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
/*0x1B*/ //u8 padding2;
} rivalTrainer;
// TVSHOW_TREND_WATCHER
@@ -285,8 +299,9 @@ typedef union // size = 0x24
/*0x04*/ u16 words[2];
/*0x08*/ u8 gender;
/*0x09*/ u8 language;
/*0x0a*/ u8 filler_0a[9];
/*0x0A*/ u8 filler_0a[9];
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
/*0x1B*/ //u8 padding;
} trendWatcher;
// TVSHOW_TREASURE_INVESTIGATORS
@@ -299,6 +314,7 @@ typedef union // size = 0x24
/*0x06*/ u16 mapLayoutId;
/*0x08*/ u8 filler_08[11];
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
/*0x1B*/ //u8 padding;
} treasureInvestigators;
// TVSHOW_FIND_THAT_GAMER
@@ -312,6 +328,7 @@ typedef union // size = 0x24
/*0x08*/ u8 language;
/*0x09*/ u8 filler_09[10];
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
/*0x1B*/ //u8 padding;
} findThatGamer;
// TVSHOW_BREAKING_NEWS
@@ -323,11 +340,12 @@ typedef union // size = 0x24
/*0x05*/ u8 outcome;
/*0x06*/ u16 caughtMonBall;
/*0x08*/ u16 balls;
/*0x0a*/ u16 poke1Species;
/*0x0c*/ u16 lastUsedMove;
/*0x0e*/ u8 language;
/*0x0f*/ u8 filler_0f[4];
/*0x0A*/ u16 poke1Species;
/*0x0C*/ u16 lastUsedMove;
/*0x0E*/ u8 language;
/*0x0F*/ u8 filler_0f[4];
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
/*0x1B*/ //u8 padding;
} breakingNews;
// TVSHOW_SECRET_BASE_VISIT
@@ -338,10 +356,11 @@ typedef union // size = 0x24
/*0x03*/ u8 numDecorations;
/*0x04*/ u8 decorations[4];
/*0x08*/ u16 species;
/*0x0a*/ u16 move;
/*0x0c*/ u8 language;
/*0x0d*/ u8 filler_0d[6];
/*0x0A*/ u16 move;
/*0x0C*/ u8 language;
/*0x0D*/ u8 filler_0d[6];
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
/*0x1B*/ //u8 padding;
} secretBaseVisit;
// TVSHOW_LOTTO_WINNER
@@ -353,6 +372,7 @@ typedef union // size = 0x24
/*0x05*/ u8 language;
/*0x06*/ u8 filler_06[13];
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
/*0x1B*/ //u8 padding;
} lottoWinner;
// TVSHOW_BATTLE_SEMINAR
@@ -363,11 +383,12 @@ typedef union // size = 0x24
/*0x04*/ u16 foeSpecies;
/*0x06*/ u16 species;
/*0x08*/ u16 otherMoves[3];
/*0x0e*/ u16 betterMove;
/*0x0E*/ u16 betterMove;
/*0x10*/ u8 nOtherMoves;
/*0x11*/ u8 language;
/*0x12*/ u8 filler_12[1];
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
/*0x1B*/ //u8 padding;
} battleSeminar;
// TVSHOW_TRAINER_FAN_CLUB
@@ -379,6 +400,7 @@ typedef union // size = 0x24
/*0x08*/ u8 language;
/*0x09*/ u8 filler_09[10];
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
/*0x1B*/ //u8 padding;
} trainerFanClub;
// TVSHOW_CUTIES
@@ -388,7 +410,7 @@ typedef union // size = 0x24
/*0x02*/ u8 nRibbons;
/*0x03*/ u8 selectedRibbon;
/*0x04*/ u8 nickname[POKEMON_NAME_LENGTH + 1];
/*0x0f*/ u8 language;
/*0x0F*/ u8 language;
/*0x10*/ u8 pokemonNameLanguage;
/*0x11*/ u8 filler_12[2];
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
@@ -402,11 +424,12 @@ typedef union // size = 0x24
/*0x04*/ u16 species1;
/*0x06*/ u16 species2;
/*0x08*/ u16 species3;
/*0x0a*/ u16 species4;
/*0x0c*/ u8 language;
/*0x0d*/ u8 facilityAndMode;
/*0x0e*/ u8 filler_0e[5];
/*0x0A*/ u16 species4;
/*0x0C*/ u8 language;
/*0x0D*/ u8 facilityAndMode;
/*0x0E*/ u8 filler_0e[5];
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
/*0x1B*/ //u8 padding;
} frontier;
// TVSHOW_NUMBER_ONE
@@ -418,6 +441,7 @@ typedef union // size = 0x24
/*0x05*/ u8 language;
/*0x06*/ u8 filler_06[13];
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
/*0x1B*/ //u8 padding;
} numberOne;
// TVSHOW_SECRET_BASE_SECRETS
@@ -426,12 +450,13 @@ typedef union // size = 0x24
/*0x01*/ bool8 active;
/*0x02*/ u16 stepsInBase;
/*0x04*/ u8 baseOwnersName[PLAYER_NAME_LENGTH + 1];
/*0x0c*/ u32 flags;
/*0x0C*/ u32 flags;
/*0x10*/ u16 item;
/*0x12*/ u8 savedState;
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
/*0x1b*/ u8 language;
/*0x1c*/ u8 baseOwnersNameLanguage;
/*0x1B*/ u8 language;
/*0x1C*/ u8 baseOwnersNameLanguage;
/*0x1D*/ //u8 padding[3];
} secretBaseSecrets;
// TVSHOW_SAFARI_FAN_CLUB
@@ -463,6 +488,7 @@ typedef union // size = 0x24
/*0x15*/ u8 unused5;
/*0x16*/ u16 daysLeft;
/*0x18*/ u8 language;
/*0x19*/ //u8 padding;
} massOutbreak;
} TVShow;
@@ -475,23 +501,23 @@ typedef struct
struct GabbyAndTyData
{
/*2ba4*/ u16 mon1;
/*2ba6*/ u16 mon2;
/*2ba8*/ u16 lastMove;
/*2baa*/ u16 quote[1];
/*2bac*/ u8 mapnum;
/*2bad*/ u8 battleNum;
/*2bae*/ u8 battleTookMoreThanOneTurn:1;
/*2bae*/ u8 playerLostAMon:1;
/*2bae*/ u8 playerUsedHealingItem:1;
/*2bae*/ u8 playerThrewABall:1;
/*2bae*/ u8 onAir:1;
/*2bae*/ u8 valA_5:3;
/*2baf*/ u8 battleTookMoreThanOneTurn2:1;
/*2baf*/ u8 playerLostAMon2:1;
/*2baf*/ u8 playerUsedHealingItem2:1;
/*2baf*/ u8 playerThrewABall2:1;
/*2baf*/ u8 valB_4:4;
/*2BA4*/ u16 mon1;
/*2BA6*/ u16 mon2;
/*2BA8*/ u16 lastMove;
/*2BAA*/ u16 quote[1];
/*2BAC*/ u8 mapnum;
/*2BAD*/ u8 battleNum;
/*2BAE*/ u8 battleTookMoreThanOneTurn:1;
u8 playerLostAMon:1;
u8 playerUsedHealingItem:1;
u8 playerThrewABall:1;
u8 onAir:1;
u8 valA_5:3;
/*2BAF*/ u8 battleTookMoreThanOneTurn2:1;
u8 playerLostAMon2:1;
u8 playerUsedHealingItem2:1;
u8 playerThrewABall2:1;
u8 valB_4:4;
};
#endif //GUARD_GLOBAL_TV_H