Document record mixing mail swap
This commit is contained in:
@@ -17,11 +17,6 @@
|
||||
#define FACILITY_UNION_ROOM 8
|
||||
#define FACILITY_MULTI_OR_EREADER 9 // Direct Corner multi battles, multi battle with Steven, and e-Reader battles
|
||||
|
||||
// Battle Frontier lvl modes.
|
||||
#define FRONTIER_LVL_50 0
|
||||
#define FRONTIER_LVL_OPEN 1
|
||||
#define FRONTIER_LVL_TENT 2
|
||||
|
||||
// Battle Frontier battle modes.
|
||||
#define FRONTIER_MODE_SINGLES 0
|
||||
#define FRONTIER_MODE_DOUBLES 1
|
||||
@@ -53,28 +48,28 @@
|
||||
|
||||
// These sets of facility ids would be redundant if the order was consistent
|
||||
// The order is important for this set so that all the non-link records can be continuous
|
||||
#define RANKING_HALL_BATTLE_TOWER_SINGLES 0
|
||||
#define RANKING_HALL_BATTLE_TOWER_DOUBLES 1
|
||||
#define RANKING_HALL_BATTLE_TOWER_MULTIS 2
|
||||
#define RANKING_HALL_BATTLE_DOME 3
|
||||
#define RANKING_HALL_BATTLE_PALACE 4
|
||||
#define RANKING_HALL_BATTLE_ARENA 5
|
||||
#define RANKING_HALL_BATTLE_FACTORY 6
|
||||
#define RANKING_HALL_BATTLE_PIKE 7
|
||||
#define RANKING_HALL_BATTLE_PYRAMID 8
|
||||
#define RANKING_HALL_BATTLE_TOWER_LINK 9
|
||||
#define RANKING_HALL_TOWER_SINGLES 0
|
||||
#define RANKING_HALL_TOWER_DOUBLES 1
|
||||
#define RANKING_HALL_TOWER_MULTIS 2
|
||||
#define RANKING_HALL_DOME 3
|
||||
#define RANKING_HALL_PALACE 4
|
||||
#define RANKING_HALL_ARENA 5
|
||||
#define RANKING_HALL_FACTORY 6
|
||||
#define RANKING_HALL_PIKE 7
|
||||
#define RANKING_HALL_PYRAMID 8
|
||||
#define RANKING_HALL_TOWER_LINK 9
|
||||
|
||||
#define FRONTIER_MANIAC_BATTLE_TOWER_SINGLES 0
|
||||
#define FRONTIER_MANIAC_BATTLE_TOWER_DOUBLES 1
|
||||
#define FRONTIER_MANIAC_BATTLE_TOWER_MULTIS 2
|
||||
#define FRONTIER_MANIAC_BATTLE_TOWER_LINK 3
|
||||
#define FRONTIER_MANIAC_BATTLE_DOME 4
|
||||
#define FRONTIER_MANIAC_BATTLE_FACTORY 5
|
||||
#define FRONTIER_MANIAC_BATTLE_PALACE 6
|
||||
#define FRONTIER_MANIAC_BATTLE_ARENA 7
|
||||
#define FRONTIER_MANIAC_BATTLE_PIKE 8
|
||||
#define FRONTIER_MANIAC_BATTLE_PYRAMID 9
|
||||
#define FRONTIER_MANIAC_FACILITY_COUNT 10
|
||||
#define FRONTIER_MANIAC_TOWER_SINGLES 0
|
||||
#define FRONTIER_MANIAC_TOWER_DOUBLES 1
|
||||
#define FRONTIER_MANIAC_TOWER_MULTIS 2
|
||||
#define FRONTIER_MANIAC_TOWER_LINK 3
|
||||
#define FRONTIER_MANIAC_DOME 4
|
||||
#define FRONTIER_MANIAC_FACTORY 5
|
||||
#define FRONTIER_MANIAC_PALACE 6
|
||||
#define FRONTIER_MANIAC_ARENA 7
|
||||
#define FRONTIER_MANIAC_PIKE 8
|
||||
#define FRONTIER_MANIAC_PYRAMID 9
|
||||
#define FRONTIER_MANIAC_FACILITY_COUNT 10
|
||||
|
||||
#define FRONTIER_MANIAC_MESSAGE_COUNT 3
|
||||
|
||||
|
||||
@@ -53,9 +53,19 @@
|
||||
#define UNION_ROOM_KB_ROW_COUNT 10
|
||||
#define GIFT_RIBBONS_COUNT 11
|
||||
#define SAVED_TRENDS_COUNT 5
|
||||
|
||||
#define PYRAMID_BAG_ITEMS_COUNT 10
|
||||
#define HALL_FACILITIES_COUNT 9 // 7 facilities for single mode + tower double mode + tower multi mode.
|
||||
|
||||
// Number of facilities for Ranking Hall.
|
||||
// 7 facilities for single mode + tower double mode + tower multi mode.
|
||||
// Excludes link modes. See RANKING_HALL_* in include/constants/battle_frontier.h
|
||||
#define HALL_FACILITIES_COUNT 9
|
||||
#define HALL_RECORDS_COUNT 3
|
||||
|
||||
// Battle Frontier level modes.
|
||||
#define FRONTIER_LVL_50 0
|
||||
#define FRONTIER_LVL_OPEN 1
|
||||
#define FRONTIER_LVL_MODE_COUNT 2
|
||||
#define FRONTIER_LVL_TENT FRONTIER_LVL_MODE_COUNT // Special usage for indicating Battle Tent
|
||||
|
||||
#define TRAINER_ID_LENGTH 4
|
||||
#define MAX_MON_MOVES 4
|
||||
|
||||
@@ -3,10 +3,17 @@
|
||||
|
||||
#include "constants/daycare.h"
|
||||
|
||||
struct RecordMixingDaycareMail
|
||||
{
|
||||
struct DaycareMail mail[DAYCARE_MON_COUNT];
|
||||
u32 numDaycareMons;
|
||||
bool16 cantHoldItem[DAYCARE_MON_COUNT];
|
||||
};
|
||||
|
||||
u8 *GetMonNickname2(struct Pokemon *mon, u8 *dest);
|
||||
u8 *GetBoxMonNickname(struct BoxPokemon *mon, u8 *dest);
|
||||
u8 CountPokemonInDaycare(struct DayCare *daycare);
|
||||
void InitDaycareMailRecordMixing(struct DayCare *daycare, struct RecordMixingDaycareMail *daycareMail);
|
||||
void InitDaycareMailRecordMixing(struct DayCare *daycare, struct RecordMixingDaycareMail *mixMail);
|
||||
void StoreSelectedPokemonInDaycare(void);
|
||||
u16 TakePokemonFromDaycare(void);
|
||||
void GetDaycareCost(void);
|
||||
|
||||
@@ -208,11 +208,10 @@ struct BerryPickingResults
|
||||
u8 field_F;
|
||||
};
|
||||
|
||||
// two arrays for lvl50 and open level
|
||||
struct PyramidBag
|
||||
{
|
||||
u16 itemId[2][PYRAMID_BAG_ITEMS_COUNT];
|
||||
u8 quantity[2][PYRAMID_BAG_ITEMS_COUNT];
|
||||
u16 itemId[FRONTIER_LVL_MODE_COUNT][PYRAMID_BAG_ITEMS_COUNT];
|
||||
u8 quantity[FRONTIER_LVL_MODE_COUNT][PYRAMID_BAG_ITEMS_COUNT];
|
||||
};
|
||||
|
||||
struct BerryCrush
|
||||
@@ -353,8 +352,8 @@ struct BattleFrontier
|
||||
/*0xCB2*/ u16 curChallengeBattleNum; // Battle number / room number (Pike) / floor number (Pyramid)
|
||||
/*0xCB4*/ u16 trainerIds[20];
|
||||
/*0xCDC*/ u32 winStreakActiveFlags;
|
||||
/*0xCE0*/ u16 towerWinStreaks[4][2];
|
||||
/*0xCF0*/ u16 towerRecordWinStreaks[4][2];
|
||||
/*0xCE0*/ u16 towerWinStreaks[4][FRONTIER_LVL_MODE_COUNT];
|
||||
/*0xCF0*/ u16 towerRecordWinStreaks[4][FRONTIER_LVL_MODE_COUNT];
|
||||
/*0xD00*/ u16 battledBrainFlags;
|
||||
/*0xD02*/ u16 towerSinglesStreak; // Never read
|
||||
/*0xD04*/ u16 towerNumWins; // Increments to MAX_STREAK but never read otherwise
|
||||
@@ -371,33 +370,33 @@ struct BattleFrontier
|
||||
/*0xD09*/ u8 domeUnused;
|
||||
/*0xD0A*/ u8 domeLvlMode;
|
||||
/*0xD0B*/ u8 domeBattleMode;
|
||||
/*0xD0C*/ u16 domeWinStreaks[2][2];
|
||||
/*0xD14*/ u16 domeRecordWinStreaks[2][2];
|
||||
/*0xD1C*/ u16 domeTotalChampionships[2][2];
|
||||
/*0xD0C*/ u16 domeWinStreaks[2][FRONTIER_LVL_MODE_COUNT];
|
||||
/*0xD14*/ u16 domeRecordWinStreaks[2][FRONTIER_LVL_MODE_COUNT];
|
||||
/*0xD1C*/ u16 domeTotalChampionships[2][FRONTIER_LVL_MODE_COUNT];
|
||||
/*0xD24*/ struct BattleDomeTrainer domeTrainers[DOME_TOURNAMENT_TRAINERS_COUNT];
|
||||
/*0xD64*/ u16 domeMonIds[DOME_TOURNAMENT_TRAINERS_COUNT][FRONTIER_PARTY_SIZE];
|
||||
/*0xDC4*/ u16 unused_DC4;
|
||||
/*0xDC6*/ u16 palacePrize;
|
||||
/*0xDC8*/ u16 palaceWinStreaks[2][2];
|
||||
/*0xDD0*/ u16 palaceRecordWinStreaks[2][2];
|
||||
/*0xDC8*/ u16 palaceWinStreaks[2][FRONTIER_LVL_MODE_COUNT];
|
||||
/*0xDD0*/ u16 palaceRecordWinStreaks[2][FRONTIER_LVL_MODE_COUNT];
|
||||
/*0xDD8*/ u16 arenaPrize;
|
||||
/*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];
|
||||
/*0xDDA*/ u16 arenaWinStreaks[FRONTIER_LVL_MODE_COUNT];
|
||||
/*0xDDE*/ u16 arenaRecordStreaks[FRONTIER_LVL_MODE_COUNT];
|
||||
/*0xDE2*/ u16 factoryWinStreaks[2][FRONTIER_LVL_MODE_COUNT];
|
||||
/*0xDEA*/ u16 factoryRecordWinStreaks[2][FRONTIER_LVL_MODE_COUNT];
|
||||
/*0xDF6*/ u16 factoryRentsCount[2][FRONTIER_LVL_MODE_COUNT];
|
||||
/*0xDFA*/ u16 factoryRecordRentsCount[2][FRONTIER_LVL_MODE_COUNT];
|
||||
/*0xE02*/ u16 pikePrize;
|
||||
/*0xE04*/ u16 pikeWinStreaks[2];
|
||||
/*0xE08*/ u16 pikeRecordStreaks[2];
|
||||
/*0xE0C*/ u16 pikeTotalStreaks[2];
|
||||
/*0xE04*/ u16 pikeWinStreaks[FRONTIER_LVL_MODE_COUNT];
|
||||
/*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;
|
||||
/*0xE12*/ u16 pikeHeldItemsBackup[FRONTIER_PARTY_SIZE];
|
||||
/*0xE18*/ u16 pyramidPrize;
|
||||
/*0xE1A*/ u16 pyramidWinStreaks[2];
|
||||
/*0xE1E*/ u16 pyramidRecordStreaks[2];
|
||||
/*0xE1A*/ u16 pyramidWinStreaks[FRONTIER_LVL_MODE_COUNT];
|
||||
/*0xE1E*/ u16 pyramidRecordStreaks[FRONTIER_LVL_MODE_COUNT];
|
||||
/*0xE22*/ u16 pyramidRandoms[4];
|
||||
/*0xE2A*/ u8 pyramidTrainerFlags;
|
||||
/*0xE2C*/ struct PyramidBag pyramidBag;
|
||||
@@ -411,8 +410,8 @@ struct BattleFrontier
|
||||
/*0xEBC*/ u32 battlesCount;
|
||||
/*0xEC0*/ u16 domeWinningMoves[DOME_TOURNAMENT_TRAINERS_COUNT];
|
||||
/*0xEE0*/ u8 trainerFlags;
|
||||
/*0xEE1*/ u8 opponentNames[2][PLAYER_NAME_LENGTH + 1];
|
||||
/*0xEF1*/ u8 opponentTrainerIds[2][TRAINER_ID_LENGTH];
|
||||
/*0xEE1*/ u8 opponentNames[FRONTIER_LVL_MODE_COUNT][PLAYER_NAME_LENGTH + 1];
|
||||
/*0xEF1*/ u8 opponentTrainerIds[FRONTIER_LVL_MODE_COUNT][TRAINER_ID_LENGTH];
|
||||
/*0xEF9*/ u8 unk_EF9:7; // Never read
|
||||
/*0xEF9*/ u8 savedGame:1;
|
||||
/*0xEFA*/ u8 unused_EFA;
|
||||
@@ -488,8 +487,8 @@ struct SaveBlock2
|
||||
/*0x1EC*/ struct BerryCrush berryCrush;
|
||||
/*0x1FC*/ struct PokemonJumpRecords pokeJump;
|
||||
/*0x20C*/ struct BerryPickingResults berryPick;
|
||||
/*0x21C*/ struct RankingHall1P hallRecords1P[HALL_FACILITIES_COUNT][2][3]; // From record mixing.
|
||||
/*0x57C*/ struct RankingHall2P hallRecords2P[2][3]; // From record mixing.
|
||||
/*0x21C*/ struct RankingHall1P hallRecords1P[HALL_FACILITIES_COUNT][FRONTIER_LVL_MODE_COUNT][HALL_RECORDS_COUNT]; // From record mixing.
|
||||
/*0x57C*/ struct RankingHall2P hallRecords2P[FRONTIER_LVL_MODE_COUNT][HALL_RECORDS_COUNT]; // From record mixing.
|
||||
/*0x624*/ u16 contestLinkResults[CONTEST_CATEGORIES_COUNT][CONTESTANT_COUNT];
|
||||
/*0x64C*/ struct BattleFrontier frontier;
|
||||
}; // sizeof=0xF2C
|
||||
@@ -597,15 +596,6 @@ struct DewfordTrend
|
||||
u16 words[2];
|
||||
}; /*size = 0x8*/
|
||||
|
||||
struct MailStruct
|
||||
{
|
||||
/*0x00*/ u16 words[MAIL_WORDS_COUNT];
|
||||
/*0x12*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x1A*/ u8 trainerId[TRAINER_ID_LENGTH];
|
||||
/*0x1E*/ u16 species;
|
||||
/*0x20*/ u16 itemId;
|
||||
};
|
||||
|
||||
struct MauvilleManCommon
|
||||
{
|
||||
u8 id;
|
||||
@@ -671,20 +661,6 @@ typedef union OldMan
|
||||
u8 filler[0x40];
|
||||
} OldMan;
|
||||
|
||||
struct RecordMixing_UnknownStructSub
|
||||
{
|
||||
u32 unk0;
|
||||
u8 data[0x34];
|
||||
//u8 data[0x38];
|
||||
};
|
||||
|
||||
struct RecordMixing_UnknownStruct
|
||||
{
|
||||
struct RecordMixing_UnknownStructSub data[2];
|
||||
u32 unk70;
|
||||
u16 unk74[0x2];
|
||||
};
|
||||
|
||||
#define LINK_B_RECORDS_COUNT 5
|
||||
|
||||
struct LinkBattleRecord
|
||||
@@ -727,10 +703,19 @@ struct ContestWinner
|
||||
u8 contestRank;
|
||||
};
|
||||
|
||||
struct Mail
|
||||
{
|
||||
/*0x00*/ u16 words[MAIL_WORDS_COUNT];
|
||||
/*0x12*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x1A*/ u8 trainerId[TRAINER_ID_LENGTH];
|
||||
/*0x1E*/ u16 species;
|
||||
/*0x20*/ u16 itemId;
|
||||
};
|
||||
|
||||
struct DaycareMail
|
||||
{
|
||||
struct MailStruct message;
|
||||
u8 OT_name[PLAYER_NAME_LENGTH + 1];
|
||||
struct Mail message;
|
||||
u8 otName[PLAYER_NAME_LENGTH + 1];
|
||||
u8 monName[POKEMON_NAME_LENGTH + 1];
|
||||
u8 gameLanguage:4;
|
||||
u8 monLanguage:4;
|
||||
@@ -750,13 +735,6 @@ struct DayCare
|
||||
u8 stepCounter;
|
||||
};
|
||||
|
||||
struct RecordMixingDaycareMail
|
||||
{
|
||||
struct DaycareMail mail[DAYCARE_MON_COUNT];
|
||||
u32 numDaycareMons;
|
||||
bool16 holdsItem[DAYCARE_MON_COUNT];
|
||||
};
|
||||
|
||||
struct LilycoveLadyQuiz
|
||||
{
|
||||
/*0x000*/ u8 id;
|
||||
@@ -1019,7 +997,7 @@ struct SaveBlock1
|
||||
/*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];
|
||||
/*0x2BE0*/ struct Mail mail[MAIL_COUNT];
|
||||
/*0x2E20*/ u8 additionalPhrases[8]; // bitfield for 33 additional phrases in easy chat system
|
||||
/*0x2E28*/ OldMan oldMan;
|
||||
/*0x2e64*/ struct DewfordTrend dewfordTrends[SAVED_TRENDS_COUNT];
|
||||
|
||||
@@ -15,16 +15,16 @@
|
||||
|| itemId == ITEM_RETRO_MAIL))
|
||||
|
||||
// mail.h
|
||||
void ReadMail(struct MailStruct *mail, void (*callback)(void), bool8 flag);
|
||||
void ReadMail(struct Mail *mail, void (*callback)(void), bool8 flag);
|
||||
|
||||
// mail_data.h
|
||||
void ClearMailData(void);
|
||||
void ClearMailStruct(struct MailStruct *mail);
|
||||
void ClearAllMail(void);
|
||||
void ClearMail(struct Mail *mail);
|
||||
bool8 MonHasMail(struct Pokemon *mon);
|
||||
u8 GiveMailToMon(struct Pokemon *mon, u16 itemId);
|
||||
u8 GiveMailToMonByItemId(struct Pokemon *mon, u16 itemId);
|
||||
u16 SpeciesToMailSpecies(u16 species, u32 personality);
|
||||
u16 MailSpeciesToSpecies(u16 mailSpecies, u16 *buffer);
|
||||
u8 GiveMailToMon2(struct Pokemon *mon, struct MailStruct *mail);
|
||||
u8 GiveMailToMon(struct Pokemon *mon, struct Mail *mail);
|
||||
void TakeMailFromMon(struct Pokemon *mon);
|
||||
void ClearMailItemId(u8 mailId);
|
||||
u8 TakeMailFromMon2(struct Pokemon *mon);
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
struct PlayerHallRecords
|
||||
{
|
||||
struct RankingHall1P onePlayer[9][2];
|
||||
struct RankingHall2P twoPlayers[2];
|
||||
struct RankingHall1P onePlayer[HALL_FACILITIES_COUNT][FRONTIER_LVL_MODE_COUNT];
|
||||
struct RankingHall2P twoPlayers[FRONTIER_LVL_MODE_COUNT];
|
||||
};
|
||||
|
||||
void RecordMixingPlayerSpotTriggered(void);
|
||||
|
||||
@@ -4,13 +4,9 @@
|
||||
#include "link_rfu.h"
|
||||
#include "constants/trade.h"
|
||||
|
||||
// Exported type declarations
|
||||
|
||||
// Exported RAM declarations
|
||||
extern struct MailStruct gTradeMail[PARTY_SIZE];
|
||||
extern struct Mail gTradeMail[PARTY_SIZE];
|
||||
extern u8 gSelectedTradeMonPositions[2];
|
||||
|
||||
// Exported ROM declarations
|
||||
extern const struct WindowTemplate gTradeEvolutionSceneYesNoWindowTemplate;
|
||||
|
||||
s32 GetGameProgressForLinkTrade(void);
|
||||
|
||||
Reference in New Issue
Block a user