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

View File

@ -10,7 +10,7 @@ struct MultiBootParam
{
u32 system_work[5]; // 00
u8 handshake_data; // 14
u8 padding; // 15
//u8 padding; // 15
u16 handshake_timeout; // 16
u8 probe_count; // 18
u8 client_data[MULTIBOOT_NCHILD]; // 19

View File

@ -40,6 +40,7 @@ struct Berry2
u8 bitter;
u8 sour;
u8 smoothness;
//u8 padding;
};
struct EnigmaBerry

View File

@ -41,7 +41,7 @@ struct Tileset
/*0x01*/ bool8 isSecondary;
/*0x04*/ const u32 *tiles;
/*0x08*/ const u16 (*palettes)[16];
/*0x0c*/ const u16 *metatiles;
/*0x0C*/ const u16 *metatiles;
/*0x10*/ const u16 *metatileAttributes;
/*0x14*/ TilesetCB callback;
};
@ -51,7 +51,7 @@ struct MapLayout
/*0x00*/ s32 width;
/*0x04*/ s32 height;
/*0x08*/ u16 *border;
/*0x0c*/ u16 *map;
/*0x0C*/ u16 *map;
/*0x10*/ struct Tileset *primaryTileset;
/*0x14*/ struct Tileset *secondaryTileset;
};
@ -68,16 +68,19 @@ struct ObjectEventTemplate
/*0x00*/ u8 localId;
/*0x01*/ u8 graphicsId;
/*0x02*/ u8 inConnection; // Leftover from FRLG
/*0x03*/ //u8 padding1;
/*0x04*/ s16 x;
/*0x06*/ s16 y;
/*0x08*/ u8 elevation;
/*0x09*/ u8 movementType;
/*0x0A*/ u16 movementRangeX:4;
u16 movementRangeY:4;
//u16 padding2:8;
/*0x0C*/ u16 trainerType;
/*0x0E*/ u16 trainerRange_berryTreeId;
/*0x10*/ const u8 *script;
/*0x14*/ u16 flagId;
/*0x16*/ //u8 padding3[2];
};
struct WarpEvent
@ -192,6 +195,7 @@ struct ObjectEvent
u32 disableJumpLandingGroundEffect:1;
u32 fixedPriority:1;
u32 hideReflection:1;
//u32 padding:4;
/*0x04*/ u8 spriteId;
/*0x05*/ u8 graphicsId;
/*0x06*/ u8 movementType;
@ -217,6 +221,7 @@ struct ObjectEvent
/*0x20*/ u8 previousMovementDirection;
/*0x21*/ u8 directionSequenceIndex;
/*0x22*/ u8 playerCopyableMovement; // COPY_MOVE_*
/*0x23*/ //u8 padding2;
/*size = 0x24*/
};

View File

@ -246,9 +246,11 @@ struct ApprenticeMon
struct Apprentice
{
u8 id:5;
u8 lvlMode:2; // + 1
u8 lvlMode:2;
//u8 padding1:1;
u8 numQuestions;
u8 number;
//u8 padding2;
struct ApprenticeMon party[MULTI_PARTY_SIZE];
u16 speechWon[EASY_CHAT_BATTLE_WORDS_COUNT];
u8 playerId[TRAINER_ID_LENGTH];
@ -296,6 +298,7 @@ struct EmeraldBattleTowerRecord
/*0x28*/ u16 speechLost[EASY_CHAT_BATTLE_WORDS_COUNT];
/*0x34*/ struct BattleTowerPokemon party[MAX_FRONTIER_PARTY_SIZE];
/*0xE4*/ u8 language;
/*0xE7*/ //u8 padding[3];
/*0xE8*/ u32 checksum;
};
@ -328,14 +331,17 @@ struct DomeMonData
u16 moves[MAX_MON_MOVES];
u8 evs[NUM_STATS];
u8 nature;
//u8 padding;
};
struct RentalMon
{
u16 monId;
//u8 padding1[2];
u32 personality;
u8 ivs;
u8 abilityNum;
//u8 padding2[2];
};
struct BattleDomeTrainer
@ -357,8 +363,9 @@ struct BattleFrontier
/*0xBEC*/ struct BattleTowerEReaderTrainer ereaderTrainer;
/*0xCA8*/ u8 challengeStatus;
/*0xCA9*/ u8 lvlMode:2;
/*0xCA9*/ u8 challengePaused:1;
/*0xCA9*/ u8 disableRecordBattle:1;
u8 challengePaused:1;
u8 disableRecordBattle:1;
//u8 padding1:4;
/*0xCAA*/ u16 selectedPartyMons[MAX_FRONTIER_PARTY_SIZE];
/*0xCB2*/ u16 curChallengeBattleNum; // Battle number / room number (Pike) / floor number (Pyramid)
/*0xCB4*/ u16 trainerIds[20];
@ -402,16 +409,19 @@ struct BattleFrontier
/*0xE08*/ u16 pikeRecordStreaks[FRONTIER_LVL_MODE_COUNT];
/*0xE0C*/ u16 pikeTotalStreaks[FRONTIER_LVL_MODE_COUNT];
/*0xE10*/ u8 pikeHintedRoomIndex:3;
/*0xE10*/ u8 pikeHintedRoomType:4;
/*0xE10*/ u8 pikeHealingRoomsDisabled:1;
u8 pikeHintedRoomType:4;
u8 pikeHealingRoomsDisabled:1;
/*0xE11*/ //u8 padding2;
/*0xE12*/ u16 pikeHeldItemsBackup[FRONTIER_PARTY_SIZE];
/*0xE18*/ u16 pyramidPrize;
/*0xE1A*/ u16 pyramidWinStreaks[FRONTIER_LVL_MODE_COUNT];
/*0xE1E*/ u16 pyramidRecordStreaks[FRONTIER_LVL_MODE_COUNT];
/*0xE22*/ u16 pyramidRandoms[4];
/*0xE2A*/ u8 pyramidTrainerFlags; // 1 bit for each trainer (MAX_PYRAMID_TRAINERS)
/*0xE2B*/ //u8 padding3;
/*0xE2C*/ struct PyramidBag pyramidBag;
/*0xE68*/ u8 pyramidLightRadius;
/*0xE69*/ //u8 padding4;
/*0xE6A*/ u16 verdanturfTentPrize;
/*0xE6C*/ u16 fallarborTentPrize;
/*0xE6E*/ u16 slateportTentPrize;
@ -436,6 +446,7 @@ struct ApprenticeQuestion
u8 monId:2;
u8 moveSlot:2;
u8 suggestedChange:2; // TRUE if told to use held item or second move, FALSE if told to use no item or first move
//u8 padding;
u16 data; // used both as an itemId and a moveId
};
@ -446,9 +457,11 @@ struct PlayersApprentice
/*0xB1*/ u8 questionsAnswered:4;
/*0xB1*/ u8 leadMonId:2;
/*0xB2*/ u8 party:3;
/*0xB2*/ u8 saveId:2;
u8 saveId:2;
//u8 padding1:3;
/*0xB3*/ u8 unused;
/*0xB4*/ u8 speciesIds[MULTI_PARTY_SIZE];
/*0xB7*/ //u8 padding2;
/*0xB8*/ struct ApprenticeQuestion questions[APPRENTICE_MAX_QUESTIONS];
};
@ -458,6 +471,7 @@ struct RankingHall1P
u16 winStreak;
u8 name[PLAYER_NAME_LENGTH + 1];
u8 language;
//u8 padding;
};
struct RankingHall2P
@ -468,6 +482,7 @@ struct RankingHall2P
u8 name1[PLAYER_NAME_LENGTH + 1];
u8 name2[PLAYER_NAME_LENGTH + 1];
u8 language;
//u8 padding;
};
struct SaveBlock2
@ -487,6 +502,8 @@ struct SaveBlock2
u16 optionsBattleStyle:1; // OPTIONS_BATTLE_STYLE_[SHIFT/SET]
u16 optionsBattleSceneOff:1; // whether battle animations are disabled
u16 regionMapZoom:1; // whether the map is zoomed in
//u16 padding1:4;
//u16 padding2;
/*0x18*/ struct Pokedex pokedex;
/*0x90*/ u8 filler_90[0x8];
/*0x98*/ struct Time localTimeOffset;
@ -531,6 +548,7 @@ struct SecretBase
/*0x1AAD*/ u8 unused;
/*0x1AAE*/ u8 decorations[DECOR_MAX_SECRET_BASE];
/*0x1ABE*/ u8 decorationPositions[DECOR_MAX_SECRET_BASE];
/*0x1ACE*/ //u8 padding[2];
/*0x1AD0*/ struct SecretBaseParty party;
};
@ -545,6 +563,7 @@ struct WarpData
s8 mapGroup;
s8 mapNum;
s8 warpId;
//u8 padding;
s16 x, y;
};
@ -589,6 +608,7 @@ struct RamScriptData
u8 mapNum;
u8 objectId;
u8 script[995];
//u8 padding;
};
struct RamScript
@ -603,6 +623,7 @@ struct DewfordTrend
u16 trendiness:7;
u16 maxTrendiness:7;
u16 gainingTrendiness:1;
//u16 padding:1;
u16 rand;
u16 words[2];
}; /*size = 0x8*/
@ -615,6 +636,7 @@ struct MauvilleManCommon
struct MauvilleManBard
{
/*0x00*/ u8 id;
/*0x01*/ //u8 padding1;
/*0x02*/ u16 songLyrics[BARD_SONG_LENGTH];
/*0x0E*/ u16 temporaryLyrics[BARD_SONG_LENGTH];
/*0x1A*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
@ -622,6 +644,7 @@ struct MauvilleManBard
/*0x25*/ u8 playerTrainerId[TRAINER_ID_LENGTH];
/*0x29*/ bool8 hasChangedSong;
/*0x2A*/ u8 language;
/*0x2B*/ //u8 padding2;
}; /*size = 0x2C*/
struct MauvilleManStoryteller
@ -640,9 +663,11 @@ struct MauvilleManGiddy
/*0x00*/ u8 id;
/*0x01*/ u8 taleCounter;
/*0x02*/ u8 questionNum;
/*0x03*/ //u8 padding1;
/*0x04*/ u16 randomWords[GIDDY_MAX_TALES];
/*0x18*/ u8 questionList[GIDDY_MAX_QUESTIONS];
/*0x20*/ u8 language;
/*0x21*/ //u8 padding2;
}; /*size = 0x2C*/
struct MauvilleManHipster
@ -687,6 +712,7 @@ struct LinkBattleRecords
{
struct LinkBattleRecord entries[LINK_B_RECORDS_COUNT];
u8 languages[LINK_B_RECORDS_COUNT];
//u8 padding;
};
struct RecordMixingGiftData
@ -712,6 +738,7 @@ struct ContestWinner
u8 monName[POKEMON_NAME_LENGTH + 1];
u8 trainerName[PLAYER_NAME_LENGTH + 1];
u8 contestRank;
//u8 padding;
};
struct Mail
@ -744,6 +771,7 @@ struct DayCare
struct DaycareMon mons[DAYCARE_MON_COUNT];
u32 offspringPersonality;
u8 stepCounter;
//u8 padding[3];
};
struct LilycoveLadyQuiz
@ -756,10 +784,10 @@ struct LilycoveLadyQuiz
/*0x018*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
/*0x020*/ u16 playerTrainerId[TRAINER_ID_LENGTH];
/*0x028*/ u16 prize;
/*0x02a*/ bool8 waitingForChallenger;
/*0x02b*/ u8 questionId;
/*0x02c*/ u8 prevQuestionId;
/*0x02d*/ u8 language;
/*0x02A*/ bool8 waitingForChallenger;
/*0x02B*/ u8 questionId;
/*0x02C*/ u8 prevQuestionId;
/*0x02D*/ u8 language;
};
struct LilycoveLadyFavor
@ -769,10 +797,12 @@ struct LilycoveLadyFavor
/*0x002*/ bool8 likedItem;
/*0x003*/ u8 numItemsGiven;
/*0x004*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
/*0x00c*/ u8 favorId;
/*0x00e*/ u16 itemId;
/*0x00C*/ u8 favorId;
/*0x00D*/ //u8 padding1;
/*0x00E*/ u16 itemId;
/*0x010*/ u16 bestItem;
/*0x012*/ u8 language;
/*0x013*/ //u8 padding2;
};
struct LilycoveLadyContest
@ -782,9 +812,9 @@ struct LilycoveLadyContest
/*0x002*/ u8 numGoodPokeblocksGiven;
/*0x003*/ u8 numOtherPokeblocksGiven;
/*0x004*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
/*0x00c*/ u8 maxSheen;
/*0x00d*/ u8 category;
/*0x00e*/ u8 language;
/*0x00C*/ u8 maxSheen;
/*0x00D*/ u8 category;
/*0x00E*/ u8 language;
};
typedef union // 3b58
@ -793,7 +823,7 @@ typedef union // 3b58
struct LilycoveLadyFavor favor;
struct LilycoveLadyContest contest;
u8 id;
u8 pad[0x40];
u8 filler[0x40];
} LilycoveLady;
struct WaldaPhrase
@ -803,6 +833,7 @@ struct WaldaPhrase
u8 iconId;
u8 patternId;
bool8 patternUnlocked;
//u8 padding;
};
struct TrainerNameRecord
@ -818,12 +849,13 @@ struct TrainerHillSave
/*0x3D6C*/ u8 unk_3D6C;
/*0x3D6D*/ u8 unused;
/*0x3D6E*/ u16 receivedPrize:1;
/*0x3D6E*/ u16 checkedFinalTime:1;
/*0x3D6E*/ u16 spokeToOwner:1;
/*0x3D6E*/ u16 hasLost:1;
/*0x3D6E*/ u16 maybeECardScanDuringChallenge:1;
/*0x3D6E*/ u16 field_3D6E_0f:1;
/*0x3D6E*/ u16 mode:2; // HILL_MODE_*
u16 checkedFinalTime:1;
u16 spokeToOwner:1;
u16 hasLost:1;
u16 maybeECardScanDuringChallenge:1;
u16 field_3D6E_0f:1;
u16 mode:2; // HILL_MODE_*
//u16 padding:8;
};
struct WonderNewsMetadata
@ -832,6 +864,7 @@ struct WonderNewsMetadata
u8 sentCounter:3;
u8 getCounter:3;
u8 rand;
//u8 padding[2];
};
struct WonderNews
@ -857,6 +890,7 @@ struct WonderCard
u8 bodyText[WONDER_CARD_BODY_TEXT_LINES][WONDER_CARD_TEXT_LENGTH];
u8 footerLine1Text[WONDER_CARD_TEXT_LENGTH];
u8 footerLine2Text[WONDER_CARD_TEXT_LENGTH];
//u8 padding[2];
};
struct WonderCardMetadata
@ -903,7 +937,7 @@ 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 1499 deposited)
u8 padding:5;
//u8 padding:5;
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 unknownFlag3;
@ -939,9 +973,11 @@ struct SaveBlock1
/*0x2E*/ u8 weather;
/*0x2F*/ u8 weatherCycleStage;
/*0x30*/ u8 flashLevel;
/*0x31*/ //u8 padding1;
/*0x32*/ u16 mapLayoutId;
/*0x34*/ u16 mapView[0x100];
/*0x234*/ u8 playerPartyCount;
/*0x235*/ //u8 padding2[3];
/*0x238*/ struct Pokemon playerParty[PARTY_SIZE];
/*0x490*/ u32 money;
/*0x494*/ u16 coins;
@ -958,6 +994,7 @@ struct SaveBlock1
/*0x9C2*/ u8 unused_9C2[6];
/*0x9C8*/ u16 trainerRematchStepCounter;
/*0x9CA*/ u8 trainerRematches[MAX_REMATCH_ENTRIES];
/*0xA2E*/ //u8 padding3[2];
/*0xA30*/ struct ObjectEvent objectEvents[OBJECT_EVENTS_COUNT];
/*0xC70*/ struct ObjectEventTemplate objectEventTemplates[OBJECT_EVENT_TEMPLATES_COUNT];
/*0x1270*/ u8 flags[NUM_FLAG_BYTES];
@ -975,6 +1012,7 @@ struct SaveBlock1
/*0x278E*/ u8 decorationPosters[10];
/*0x2798*/ u8 decorationDolls[40];
/*0x27C0*/ u8 decorationCushions[10];
/*0x27CA*/ //u8 padding4[2];
/*0x27CC*/ TVShow tvShows[TV_SHOWS_COUNT];
/*0x2B50*/ PokeNews pokeNews[POKE_NEWS_COUNT];
/*0x2B90*/ u16 outbreakPokemonSpecies;
@ -994,6 +1032,7 @@ struct SaveBlock1
/*0x2BD4*/ u16 easyChatBattleLost[EASY_CHAT_BATTLE_WORDS_COUNT];
/*0x2BE0*/ struct Mail mail[MAIL_COUNT];
/*0x2E20*/ u8 additionalPhrases[NUM_ADDITIONAL_PHRASE_BYTES]; // bitfield for 33 additional phrases in easy chat system
/*0x2E25*/ //u8 padding5[3];
/*0x2E28*/ OldMan oldMan;
/*0x2e64*/ struct DewfordTrend dewfordTrends[SAVED_TRENDS_COUNT];
/*0x2e90*/ struct ContestWinner contestWinners[NUM_CONTEST_WINNERS]; // see CONTEST_WINNER_*

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

View File

@ -109,7 +109,7 @@ struct __attribute__((packed, aligned(2))) RfuGameData
u8 startedActivity:1;
u8 playerGender:1;
u8 tradeLevel:7;
u8 padding;
u8 filler;
};
// Constants for getting/setting information in 'partnerInfo' of RfuGameData.

View File

@ -59,23 +59,23 @@ struct PlayerRecordRS
struct RecordMixingDaycareMail daycareMail;
struct RSBattleTowerRecord battleTowerRecord;
u16 giftItem;
u16 padding[50];
u16 filler[50];
};
struct PlayerRecordEmerald
{
/* 0x0000 */ struct SecretBase secretBases[SECRET_BASES_COUNT];
/* 0x0c80 */ TVShow tvShows[TV_SHOWS_COUNT];
/* 0x0C80 */ TVShow tvShows[TV_SHOWS_COUNT];
/* 0x1004 */ PokeNews pokeNews[POKE_NEWS_COUNT];
/* 0x1044 */ OldMan oldMan;
/* 0x1084 */ struct DewfordTrend dewfordTrends[SAVED_TRENDS_COUNT];
/* 0x10ac */ struct RecordMixingDaycareMail daycareMail;
/* 0x10AC */ struct RecordMixingDaycareMail daycareMail;
/* 0x1124 */ struct EmeraldBattleTowerRecord battleTowerRecord;
/* 0x1210 */ u16 giftItem;
/* 0x1214 */ LilycoveLady lilycoveLady;
/* 0x1254 */ struct Apprentice apprentices[2];
/* 0x12dc */ struct PlayerHallRecords hallRecords;
/* 0x1434 */ u8 padding[16];
/* 0x12DC */ struct PlayerHallRecords hallRecords;
/* 0x1434 */ u8 filler_1434[16];
}; // 0x1444
union PlayerRecord