summaryrefslogtreecommitdiff
path: root/include/global.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/global.h')
-rw-r--r--include/global.h56
1 files changed, 29 insertions, 27 deletions
diff --git a/include/global.h b/include/global.h
index af33f13cb..d33be5d82 100644
--- a/include/global.h
+++ b/include/global.h
@@ -214,14 +214,16 @@ struct ApprenticeMon
u16 item;
};
+// This is for past players Apprentices or Apprentices received via Record Mix.
+// For the current Apprentice, see struct PlayersApprentice
struct Apprentice
{
u8 id:5;
u8 lvlMode:2; // + 1
- u8 field_1;
+ u8 numQuestions;
u8 number;
struct ApprenticeMon party[MULTI_PARTY_SIZE];
- u16 easyChatWords[6];
+ u16 speechWon[EASY_CHAT_BATTLE_WORDS_COUNT];
u8 playerId[TRAINER_ID_LENGTH];
u8 playerName[PLAYER_NAME_LENGTH];
u8 language;
@@ -264,9 +266,9 @@ struct EmeraldBattleTowerRecord
/*0x02*/ u16 winStreak;
/*0x04*/ u8 name[PLAYER_NAME_LENGTH + 1];
/*0x0C*/ u8 trainerId[TRAINER_ID_LENGTH];
- /*0x10*/ u16 greeting[6];
- /*0x1C*/ u16 speechWon[6];
- /*0x28*/ u16 speechLost[6];
+ /*0x10*/ u16 greeting[EASY_CHAT_BATTLE_WORDS_COUNT];
+ /*0x1C*/ u16 speechWon[EASY_CHAT_BATTLE_WORDS_COUNT];
+ /*0x28*/ u16 speechLost[EASY_CHAT_BATTLE_WORDS_COUNT];
/*0x34*/ struct BattleTowerPokemon party[4];
/*0xE4*/ u8 language;
/*0xE8*/ u32 checksum;
@@ -279,9 +281,9 @@ struct BattleTowerEReaderTrainer
/*0x02*/ u16 winStreak;
/*0x04*/ u8 name[PLAYER_NAME_LENGTH + 1];
/*0x0C*/ u8 trainerId[TRAINER_ID_LENGTH];
- /*0x10*/ u16 greeting[6];
- /*0x1C*/ u16 farewellPlayerLost[6];
- /*0x28*/ u16 farewellPlayerWon[6];
+ /*0x10*/ u16 greeting[EASY_CHAT_BATTLE_WORDS_COUNT];
+ /*0x1C*/ u16 farewellPlayerLost[EASY_CHAT_BATTLE_WORDS_COUNT];
+ /*0x28*/ u16 farewellPlayerWon[EASY_CHAT_BATTLE_WORDS_COUNT];
/*0x34*/ struct BattleTowerPokemon party[FRONTIER_PARTY_SIZE];
/*0xB8*/ u32 checksum;
};
@@ -401,26 +403,26 @@ struct BattleFrontier
/*0xEFC*/ struct FrontierMonData field_EFC[3];
};
-struct Sav2_B8
+struct ApprenticeQuestion
{
- u8 unk0_0:2;
- u8 unk0_1:2;
- u8 unk0_2:2;
- u8 unk0_3:2;
- u16 unk2;
+ u8 questionId:2;
+ 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
+ u16 data; // used both as an itemId and a moveId
};
struct PlayersApprentice
{
/*0xB0*/ u8 id;
- /*0xB1*/ u8 activeLvlMode:2; // +1, 0 means not active
- /*0xB1*/ u8 field_B1_1:4;
- /*0xB1*/ u8 field_B1_2:2;
- /*0xB2*/ u8 field_B2_0:3;
- /*0xB2*/ u8 field_B2_1:2;
- /*0xB3*/ u8 field_B3;
- /*0xB4*/ u8 monIds[MULTI_PARTY_SIZE];
- /*0xB8*/ struct Sav2_B8 field_B8[9];
+ /*0xB1*/ u8 lvlMode:2; //0: Unassigned, 1: Lv 50, 2: Open Lv
+ /*0xB1*/ u8 questionsAnswered:4;
+ /*0xB1*/ u8 leadMonId:2;
+ /*0xB2*/ u8 party:3;
+ /*0xB2*/ u8 saveId:2;
+ /*0xB3*/ u8 unused;
+ /*0xB4*/ u8 speciesIds[MULTI_PARTY_SIZE];
+ /*0xB8*/ struct ApprenticeQuestion questions[APPRENTICE_MAX_QUESTIONS];
};
struct RankingHall1P
@@ -465,7 +467,7 @@ struct SaveBlock2
/*0xA8*/ u32 field_A8; // Written to, but never read.
/*0xAC*/ u32 encryptionKey;
/*0xB0*/ struct PlayersApprentice playerApprentice;
- /*0xDC*/ struct Apprentice apprentices[4]; // From record mixing.
+ /*0xDC*/ struct Apprentice apprentices[APPRENTICE_COUNT];
/*0x1EC*/ struct BerryCrush berryCrush;
/*0x1FC*/ struct PokemonJumpResults pokeJump;
/*0x20C*/ struct BerryPickingResults berryPick;
@@ -949,10 +951,10 @@ struct SaveBlock1
/*0x2BA1*/ u8 outbreakPokemonProbability;
/*0x2BA2*/ u16 outbreakDaysLeft;
/*0x2BA4*/ struct GabbyAndTyData gabbyAndTyData;
- /*0x2BB0*/ u16 easyChatProfile[6];
- /*0x2BBC*/ u16 easyChatBattleStart[6];
- /*0x2BC8*/ u16 easyChatBattleWon[6];
- /*0x2BD4*/ u16 easyChatBattleLost[6];
+ /*0x2BB0*/ u16 easyChatProfile[EASY_CHAT_BATTLE_WORDS_COUNT];
+ /*0x2BBC*/ u16 easyChatBattleStart[EASY_CHAT_BATTLE_WORDS_COUNT];
+ /*0x2BC8*/ u16 easyChatBattleWon[EASY_CHAT_BATTLE_WORDS_COUNT];
+ /*0x2BD4*/ u16 easyChatBattleLost[EASY_CHAT_BATTLE_WORDS_COUNT];
/*0x2BE0*/ struct MailStruct mail[MAIL_COUNT];
/*0x2E20*/ u8 additionalPhrases[8]; // bitfield for 33 additional phrases in easy chat system
/*0x2E28*/ OldMan oldMan;