summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/apprentice.h4
-rw-r--r--include/field_specials.h1
-rw-r--r--include/frontier_util.h (renamed from include/battle_frontier_2.h)13
-rw-r--r--include/global.h91
-rw-r--r--include/menu.h1
-rw-r--r--include/record_mixing.h30
-rw-r--r--include/save.h2
-rw-r--r--include/strings.h43
-rw-r--r--include/tv.h2
9 files changed, 113 insertions, 74 deletions
diff --git a/include/apprentice.h b/include/apprentice.h
index ca0b04800..23e1fc8f2 100644
--- a/include/apprentice.h
+++ b/include/apprentice.h
@@ -9,7 +9,9 @@ struct ApprenticeTrainer
u16 otId;
u8 facilityClass;
u16 species[APPRENTICE_SPECIES_COUNT];
- u8 rest[14];
+ u8 unk;
+ u8 unk_;
+ u16 easyChatWords[6];
};
extern const struct ApprenticeTrainer gApprentices[];
diff --git a/include/field_specials.h b/include/field_specials.h
index 0e2daf9c3..50823ba7d 100644
--- a/include/field_specials.h
+++ b/include/field_specials.h
@@ -15,5 +15,6 @@ bool32 sub_8138168(void);
bool32 sub_81381B0(void);
bool32 sub_81381F8(void);
bool32 CountSSTidalStep(u16 delta);
+void sub_813A878(u8 a0);
#endif // GUARD_FIELD_SPECIALS_H
diff --git a/include/battle_frontier_2.h b/include/frontier_util.h
index 3bd605829..019210691 100644
--- a/include/battle_frontier_2.h
+++ b/include/frontier_util.h
@@ -1,9 +1,9 @@
-#ifndef GUARD_BATTLE_FRONTIER_2_H
-#define GUARD_BATTLE_FRONTIER_2_H
+#ifndef GUARD_FRONTIER_UTIL_H
+#define GUARD_FRONTIER_UTIL_H
#define FRONTIER_BEFORE_TEXT 0
-#define FRONTIER_WIN_TEXT 1
-#define FRONTIER_LOSE_TEXT 2
+#define FRONTIER_PLAYER_LOST_TEXT 1
+#define FRONTIER_PLAYER_WON_TEXT 2
void CopyFrontierTrainerText(u8 whichText, u16 trainerId);
void sub_81A8934(u8);
@@ -15,5 +15,8 @@ void sub_81AA078(u16*, u8);
void sub_81A4C30(void);
bool8 sub_81A6BF4(void);
u8 sub_81A6CA8(u8, u8);
+void sub_81A3908(void);
+u32 GetCurrentFacilityWinStreak(void);
+void ClearnRankingHallRecords(void);
-#endif // GUARD_BATTLE_FRONTIER_2_H
+#endif // GUARD_FRONTIER_UTIL_H
diff --git a/include/global.h b/include/global.h
index 0cff281e7..c2b139e7a 100644
--- a/include/global.h
+++ b/include/global.h
@@ -137,6 +137,7 @@ enum LanguageId
#define BAG_BERRIES_COUNT 46
#define PYRAMID_BAG_ITEMS_COUNT 10
+#define HALL_FACILITIES_COUNT 9 // 7 facilities for single mode + tower double mode + tower multi mode.
// string lengths
#define ITEM_NAME_LENGTH 14
@@ -331,8 +332,8 @@ struct EmeraldBattleTowerRecord
/*0x04*/ u8 name[PLAYER_NAME_LENGTH + 1];
/*0x0C*/ u8 trainerId[4];
/*0x10*/ u16 greeting[6];
- /*0x1C*/ u16 unk1C[6];
- /*0x28*/ u16 unk28[6];
+ /*0x1C*/ u16 speechWon[6];
+ /*0x28*/ u16 speechLost[6];
/*0x34*/ struct UnknownPokemonStruct party[4];
/*0xE4*/ u8 language;
/*0xE8*/ u32 checksum;
@@ -400,14 +401,11 @@ struct BattleFrontier
/*0xCB2*/ u16 curChallengeBattleNum; // In case of battle pyramid, the floor.
/*0xCB4*/ u16 field_CB4[20];
/*0xCDC*/ u32 field_CDC;
- /*0xCE0*/ u16 winStreaks[4][2];
- /*0xCF0*/ u16 field_CF0[2];
- /*0xCF4*/ u16 field_CF4[2];
- /*0xCF8*/ u16 field_CF8[2];
- /*0xCFC*/ u16 field_CFC[2];
- /*0xD06*/ u16 field_D00;
- /*0xD06*/ u16 field_D02;
- /*0xD06*/ u16 field_D04;
+ /*0xCE0*/ u16 towerWinStreaks[4][2];
+ /*0xCF0*/ u16 towerRecordWinStreaks[4][2];
+ /*0xD00*/ u16 field_D00;
+ /*0xD02*/ u16 field_D02;
+ /*0xD04*/ u16 field_D04;
/*0xD06*/ u8 field_D06;
/*0xD07*/ u8 field_D07;
/*0xD08*/ u8 field_D08_0:1;
@@ -421,43 +419,37 @@ struct BattleFrontier
/*0xD09*/ u8 filler_D09;
/*0xD0A*/ u8 field_D0A;
/*0xD0B*/ u8 field_D0B;
- /*0xD0C*/ u16 field_D0C[2][2];
- /*0xD14*/ u16 field_D14[2][2];
- /*0xD1C*/ u16 field_D1C[2][2];
+ /*0xD0C*/ u16 domeWinStreaks[2][2];
+ /*0xD14*/ u16 domeRecordWinStreaks[2][2];
+ /*0xD1C*/ u16 domeTotalChampionships[2][2];
/*0xD24*/ struct BattleDomeTrainer domeTrainers[DOME_TOURNAMENT_TRAINERS_COUNT];
- /*0xD64*/ u16 domeMonId[DOME_TOURNAMENT_TRAINERS_COUNT][3];
+ /*0xD64*/ u16 domeMonIds[DOME_TOURNAMENT_TRAINERS_COUNT][3];
/*0xD64*/ u16 field_DC4[2];
- /*0xDC8*/ u16 field_DC8[2][2];
- /*0xDD0*/ u16 field_DD0[2][2];
+ /*0xDC8*/ u16 palaceWinStreaks[2][2];
+ /*0xDD0*/ u16 palaceRecordWinStreaks[2][2];
/*0xDD8*/ u16 field_DD8;
- /*0xDDA*/ u16 field_DDA[2];
- /*0xDDE*/ u16 field_DDE[2];
- /*0xDE2*/ u16 field_DE2[2][2];
- /*0xDEA*/ u16 field_DEA[2];
- /*0xDEE*/ u16 field_DEE;
- /*0xDF0*/ u16 field_DF0;
- /*0xDF2*/ u16 field_DF2;
- /*0xDF4*/ u16 field_DF4;
- /*0xDF6*/ u16 field_DF6;
- /*0xDF8*/ u16 field_DF8;
- /*0xDFA*/ u16 field_DFA;
- /*0xDFC*/ u16 field_DFC;
- /*0xDFE*/ u16 field_DFE;
- /*0xE00*/ u16 field_E00;
+ /*0xDDA*/ u16 arenaWinStreaks[2];
+ /*0xDDE*/ u16 arenaRecordStreaks[2];
+ /*0xDE2*/ u16 factoryWinStreaks[2][2];
+ /*0xDEA*/ u16 factoryRecordWinStreaks[2][2];
+ /*0xDF6*/ u16 factoryRentsCount[2][2];
+ /*0xDFA*/ u16 factoryRecordRentsCount[2][2];
/*0xE02*/ u16 field_E02;
- /*0xE04*/ u16 field_E04[2];
- /*0xE08*/ u16 field_E08[9];
- /*0xE1A*/ u16 field_E1A[2];
- /*0xE1E*/ u16 field_E1E[7];
+ /*0xE04*/ u16 pikeWinStreaks[2];
+ /*0xE08*/ u16 pikeRecordStreaks[2];
+ /*0xE0C*/ u16 pikeTotalStreaks[2];
+ /*0xE10*/ u16 field_E10[5];
+ /*0xE1A*/ u16 pyramidWinStreaks[2];
+ /*0xE1E*/ u16 pyramidRecordStreaks[2];
+ /*0xE1E*/ u16 field_E1F[5];
/*0xE2C*/ struct PyramidBag pyramidBag;
/*0xE58*/ u16 field_E58;
/*0xE6A*/ u16 field_E6A;
/*0xE6C*/ u16 field_E6C;
/*0xE6E*/ u16 field_E6E;
/*0xE70*/ struct Struct_field_E70 field_E70[6];
- /*0xEB8*/ u16 frontierBattlePoints;
- /*0xEBA*/ u8 field_EBA;
- /*0xEBB*/ u8 field_EBB;
+ /*0xEB8*/ u16 battlePoints;
+ /*0xEBA*/ u16 field_EBA;
/*0xEBC*/ u32 battlesCount;
/*0xEC0*/ u16 field_EC0[16];
/*0xEE0*/ u8 field_EE0;
@@ -491,6 +483,24 @@ struct PlayersApprentice
/*0xB8*/ struct Sav2_B8 field_B8[9];
};
+struct RankingHall1P
+{
+ u8 id[4];
+ u16 winStreak;
+ u8 name[PLAYER_NAME_LENGTH + 1];
+ u8 language;
+};
+
+struct RankingHall2P
+{
+ u8 id1[4];
+ u8 id2[4];
+ u16 winStreak;
+ u8 name1[PLAYER_NAME_LENGTH + 1];
+ u8 name2[PLAYER_NAME_LENGTH + 1];
+ u8 language;
+};
+
struct SaveBlock2
{
/*0x00*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
@@ -515,12 +525,13 @@ struct SaveBlock2
/*0xA8*/ u32 field_A8;
/*0xAC*/ u32 encryptionKey;
/*0xB0*/ struct PlayersApprentice playerApprentice;
- /*0xDC*/ struct Apprentice apprentices[4];
+ /*0xDC*/ struct Apprentice apprentices[4]; // From record mixing.
/*0x1EC*/ struct BerryCrush berryCrush;
/*0x1FC*/ struct PokemonJumpResults pokeJump;
/*0x20C*/ struct BerryPickingResults berryPick;
- /*0x21C*/ u8 field_21C[1032];
- /*0x624*/ u16 contestLinkResults[20]; // 4 positions for 5 categories, possibly a struct or a 2d array
+ /*0x21C*/ struct RankingHall1P hallRecords1P[HALL_FACILITIES_COUNT][2][3]; // From record mixing.
+ /*0x57C*/ struct RankingHall2P hallRecords2P[2][3]; // From record mixing.
+ /*0x624*/ u16 contestLinkResults[5][4]; // 4 positions for 5 categories.
/*0x64C*/ struct BattleFrontier frontier;
}; // sizeof=0xF2C
diff --git a/include/menu.h b/include/menu.h
index d105eb5ec..175eabc07 100644
--- a/include/menu.h
+++ b/include/menu.h
@@ -26,7 +26,6 @@ u16 RunTextPrintersAndIsPrinter0Active(void);
void sub_81973A4(void);
void NewMenuHelpers_DrawDialogueFrame(u8, u8);
void sub_819746C(u8 windowId, bool8 copyToVram);
-void NewMenuHelpers_DrawStdWindowFrame(u8, u8);
u16 AddTextPrinterParameterized2(u8 windowId, u8 fontId, const u8 *str, u8 speed, void (*callback)(struct TextSubPrinter *, u16), u8 fgColor, u8 bgColor, u8 shadowColor);
void PrintPlayerNameOnWindow(u8, const u8*, u16, u16);
void DisplayItemMessageOnField(u8 taskId, const u8 *src, TaskFunc callback);
diff --git a/include/record_mixing.h b/include/record_mixing.h
index f1b74c143..0d50f46f9 100644
--- a/include/record_mixing.h
+++ b/include/record_mixing.h
@@ -1,35 +1,13 @@
#ifndef GUARD_RECORD_MIXING_H
#define GUARD_RECORD_MIXING_H
-// Exported type declarations
-struct UnkRecordMixingStruct2a
+struct PlayerHallRecords
{
- u8 playerId[4];
- u16 field_4;
- u8 playerName[PLAYER_NAME_LENGTH + 1];
- u8 language;
+ struct RankingHall1P onePlayer[9][2];
+ struct RankingHall2P twoPlayers[2];
};
-struct UnkRecordMixingStruct2b
-{
- u8 playerId1[4];
- u8 playerId2[4];
- u16 field_8;
- u8 playerName1[PLAYER_NAME_LENGTH + 1];
- u8 playerName2[PLAYER_NAME_LENGTH + 1];
- u8 language;
-};
-
-struct UnkRecordMixingStruct2
-{
- struct UnkRecordMixingStruct2a field_0[9][2];
- struct UnkRecordMixingStruct2b field_120[2];
-};
-
-// Exported RAM declarations
-
-// Exported ROM declarations
void sub_80E6BE8(void);
-void sub_80E8260(struct UnkRecordMixingStruct2 *arg0);
+void GetPlayerHallRecords(struct PlayerHallRecords *dst);
#endif //GUARD_RECORD_MIXING_H
diff --git a/include/save.h b/include/save.h
index a87e31e99..a5f014904 100644
--- a/include/save.h
+++ b/include/save.h
@@ -94,7 +94,7 @@ u16 CalculateChecksum(void *data, u16 size);
void UpdateSaveAddresses(void);
u8 HandleSavingData(u8 saveType);
u8 TrySavingData(u8 saveType);
-u8 sub_8153380(void);
+bool8 sub_8153380(void);
bool8 sub_81533AC(void);
u8 sub_81533E0(void);
u8 sub_8153408(void);
diff --git a/include/strings.h b/include/strings.h
index c563353ec..9338ae624 100644
--- a/include/strings.h
+++ b/include/strings.h
@@ -877,4 +877,47 @@ extern const u8 gText_PokemonOnHook[];
extern const u8 gText_NotEvenANibble[];
extern const u8 gText_ItGotAway[];
+// Frontier records.
+extern const u8 gText_WinStreak[];
+extern const u8 gText_Record[];
+extern const u8 gText_Current[];
+extern const u8 gText_RoomsCleared[];
+extern const u8 gText_Prev[];
+extern const u8 gText_SingleBattleRoomResults[];
+extern const u8 gText_DoubleBattleRoomResults[];
+extern const u8 gText_MultiBattleRoomResults[];
+extern const u8 gText_LinkMultiBattleRoomResults[];
+extern const u8 gText_Lv502[];
+extern const u8 gText_OpenLv[];
+extern const u8 gText_RentalSwap[];
+extern const u8 gText_ClearStreak[];
+extern const u8 gText_Total[];
+extern const u8 gText_Championships[];
+extern const u8 gText_SingleBattleTourneyResults[];
+extern const u8 gText_DoubleBattleTourneyResults[];
+extern const u8 gText_SingleBattleHallResults[];
+extern const u8 gText_DoubleBattleHallResults[];
+extern const u8 gText_BattleChoiceResults[];
+extern const u8 gText_TimesCleared[];
+extern const u8 gText_KOsInARow[];
+extern const u8 gText_SetKOTourneyResults[];
+extern const u8 gText_TimesVar1[];
+extern const u8 gText_BattleSwapSingleResults[];
+extern const u8 gText_BattleSwapDoubleResults[];
+extern const u8 gText_FloorsCleared[];
+extern const u8 gText_BattleQuestResults[];
+extern const u8 gText_LinkContestResults[];
+extern const u8 gText_4th[];
+extern const u8 gText_3rd[];
+extern const u8 gText_2nd[];
+extern const u8 gText_1st[];
+extern const u8 gText_SpaceAndSpace[];
+extern const u8 gText_CommaSpace[];
+extern const u8 gText_NewLine[];
+extern const u8 gText_ScrollTextUp[];
+extern const u8 gText_Space2[];
+extern const u8 gText_Are[];
+extern const u8 gText_Are2[];
+extern const u8 gText_123Dot[][3];
+
#endif //GUARD_STRINGS_H
diff --git a/include/tv.h b/include/tv.h
index 4f1d7730f..5528bada7 100644
--- a/include/tv.h
+++ b/include/tv.h
@@ -51,5 +51,7 @@ void BravoTrainerPokemonProfile_BeforeInterview1(u16 move);
void UpdateTVScreensOnMap(int, int);
void TV_PrintIntToStringVar(u8 varIdx, int value);
void SaveRecordedItemPurchasesForTVShow(void);
+bool8 sub_80EE818(void);
+void sub_80EE8C8(u16 winStreak, u8 facilityAndMode);
#endif //GUARD_TV_H