diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/constants/battle_frontier.h | 49 | ||||
-rwxr-xr-x | include/constants/event_object_movement.h | 73 | ||||
-rw-r--r-- | include/constants/global.h | 15 | ||||
-rw-r--r-- | include/constants/metatile_labels.h | 1 | ||||
-rw-r--r-- | include/daycare.h | 9 | ||||
-rw-r--r-- | include/field_player_avatar.h | 4 | ||||
-rw-r--r-- | include/global.fieldmap.h | 21 | ||||
-rw-r--r-- | include/global.h | 94 | ||||
-rw-r--r-- | include/mail.h | 10 | ||||
-rw-r--r-- | include/record_mixing.h | 4 | ||||
-rw-r--r-- | include/trade.h | 6 |
11 files changed, 176 insertions, 110 deletions
diff --git a/include/constants/battle_frontier.h b/include/constants/battle_frontier.h index 68c5a42ef..b6d15e6b2 100644 --- a/include/constants/battle_frontier.h +++ b/include/constants/battle_frontier.h @@ -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 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 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_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 diff --git a/include/constants/event_object_movement.h b/include/constants/event_object_movement.h index 13e91c415..4ffb869e4 100755 --- a/include/constants/event_object_movement.h +++ b/include/constants/event_object_movement.h @@ -245,4 +245,77 @@ #define MOVEMENT_ACTION_STEP_END 0xFE #define MOVEMENT_ACTION_NONE 0xFF +#define ANIM_STD_FACE_SOUTH 0 +#define ANIM_STD_FACE_NORTH 1 +#define ANIM_STD_FACE_WEST 2 +#define ANIM_STD_FACE_EAST 3 +#define ANIM_STD_GO_SOUTH 4 +#define ANIM_STD_GO_NORTH 5 +#define ANIM_STD_GO_WEST 6 +#define ANIM_STD_GO_EAST 7 +#define ANIM_STD_GO_FAST_SOUTH 8 +#define ANIM_STD_GO_FAST_NORTH 9 +#define ANIM_STD_GO_FAST_WEST 10 +#define ANIM_STD_GO_FAST_EAST 11 +#define ANIM_STD_GO_FASTER_SOUTH 12 +#define ANIM_STD_GO_FASTER_NORTH 13 +#define ANIM_STD_GO_FASTER_WEST 14 +#define ANIM_STD_GO_FASTER_EAST 15 +#define ANIM_STD_GO_FASTEST_SOUTH 16 +#define ANIM_STD_GO_FASTEST_NORTH 17 +#define ANIM_STD_GO_FASTEST_WEST 18 +#define ANIM_STD_GO_FASTEST_EAST 19 +#define ANIM_STD_COUNT 20 + +#define ANIM_RUN_SOUTH (ANIM_STD_COUNT + 0) +#define ANIM_RUN_NORTH (ANIM_STD_COUNT + 1) +#define ANIM_RUN_WEST (ANIM_STD_COUNT + 2) +#define ANIM_RUN_EAST (ANIM_STD_COUNT + 3) + +#define ANIM_BUNNY_HOPPY_BACK_WHEEL_SOUTH (ANIM_STD_COUNT + 0) +#define ANIM_BUNNY_HOPPY_BACK_WHEEL_NORTH (ANIM_STD_COUNT + 1) +#define ANIM_BUNNY_HOPPY_BACK_WHEEL_WEST (ANIM_STD_COUNT + 2) +#define ANIM_BUNNY_HOPPY_BACK_WHEEL_EAST (ANIM_STD_COUNT + 3) +#define ANIM_BUNNY_HOPPY_FRONT_WHEEL_SOUTH (ANIM_STD_COUNT + 4) +#define ANIM_BUNNY_HOPPY_FRONT_WHEEL_NORTH (ANIM_STD_COUNT + 5) +#define ANIM_BUNNY_HOPPY_FRONT_WHEEL_WEST (ANIM_STD_COUNT + 6) +#define ANIM_BUNNY_HOPPY_FRONT_WHEEL_EAST (ANIM_STD_COUNT + 7) +#define ANIM_STANDING_WHEELIE_BACK_WHEEL_SOUTH (ANIM_STD_COUNT + 8) +#define ANIM_STANDING_WHEELIE_BACK_WHEEL_NORTH (ANIM_STD_COUNT + 9) +#define ANIM_STANDING_WHEELIE_BACK_WHEEL_WEST (ANIM_STD_COUNT + 10) +#define ANIM_STANDING_WHEELIE_BACK_WHEEL_EAST (ANIM_STD_COUNT + 11) +#define ANIM_STANDING_WHEELIE_FRONT_WHEEL_SOUTH (ANIM_STD_COUNT + 12) +#define ANIM_STANDING_WHEELIE_FRONT_WHEEL_NORTH (ANIM_STD_COUNT + 13) +#define ANIM_STANDING_WHEELIE_FRONT_WHEEL_WEST (ANIM_STD_COUNT + 14) +#define ANIM_STANDING_WHEELIE_FRONT_WHEEL_EAST (ANIM_STD_COUNT + 15) +#define ANIM_MOVING_WHEELIE_SOUTH (ANIM_STD_COUNT + 16) +#define ANIM_MOVING_WHEELIE_NORTH (ANIM_STD_COUNT + 17) +#define ANIM_MOVING_WHEELIE_WEST (ANIM_STD_COUNT + 18) +#define ANIM_MOVING_WHEELIE_EAST (ANIM_STD_COUNT + 19) + +#define ANIM_GET_ON_OFF_POKEMON_SOUTH (ANIM_STD_COUNT + 0) +#define ANIM_GET_ON_OFF_POKEMON_NORTH (ANIM_STD_COUNT + 1) +#define ANIM_GET_ON_OFF_POKEMON_WEST (ANIM_STD_COUNT + 2) +#define ANIM_GET_ON_OFF_POKEMON_EAST (ANIM_STD_COUNT + 3) + +#define ANIM_NURSE_BOW (ANIM_STD_COUNT + 0) + +#define ANIM_FIELD_MOVE 0 + +#define ANIM_STAY_STILL 0 +#define ANIM_REMOVE_OBSTACLE 1 + +#define ANIM_TAKE_OUT_ROD_SOUTH 0 +#define ANIM_TAKE_OUT_ROD_NORTH 1 +#define ANIM_TAKE_OUT_ROD_WEST 2 +#define ANIM_TAKE_OUT_ROD_EAST 3 +#define ANIM_PUT_AWAY_ROD_SOUTH 4 +#define ANIM_PUT_AWAY_ROD_NORTH 5 +#define ANIM_PUT_AWAY_ROD_WEST 6 +#define ANIM_PUT_AWAY_ROD_EAST 7 +#define ANIM_HOOKED_POKEMON_SOUTH 8 +#define ANIM_HOOKED_POKEMON_NORTH 9 +#define ANIM_HOOKED_POKEMON_WEST 10 +#define ANIM_HOOKED_POKEMON_EAST 11 + #endif // GUARD_CONSTANTS_EVENT_OBJECT_MOVEMENT_H diff --git a/include/constants/global.h b/include/constants/global.h index bd73d7999..ef7861e9e 100644 --- a/include/constants/global.h +++ b/include/constants/global.h @@ -53,9 +53,20 @@ #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 +// Received via record mixing, 1 for each player other than yourself +#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 diff --git a/include/constants/metatile_labels.h b/include/constants/metatile_labels.h index b4ee3eacf..519120082 100644 --- a/include/constants/metatile_labels.h +++ b/include/constants/metatile_labels.h @@ -352,6 +352,7 @@ #define METATILE_InsideShip_IntactDoor_Bottom_Interior 0x297 // gTileset_BattlePike +#define METATILE_BattlePike_CurtainFrames_Start 0x201 #define METATILE_BattlePike_Curtain_Stage0_Tile0 0x24A #define METATILE_BattlePike_Curtain_Stage0_Tile1 0x251 #define METATILE_BattlePike_Curtain_Stage0_Tile2 0x252 diff --git a/include/daycare.h b/include/daycare.h index d6c0d4201..62a7918ff 100644 --- a/include/daycare.h +++ b/include/daycare.h @@ -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); diff --git a/include/field_player_avatar.h b/include/field_player_avatar.h index 903fe6ef1..e9174d589 100644 --- a/include/field_player_avatar.h +++ b/include/field_player_avatar.h @@ -32,10 +32,10 @@ void PlayerOnBikeCollideWithFarawayIslandMew(u8 direction); u8 CheckForObjectEventCollision(struct ObjectEvent *a, s16 b, s16 c, u8 d, u8 e); u8 PlayerGetZCoord(void); void SetPlayerAvatarTransitionFlags(u16 a); -void sub_808BCE8(void); +void CancelPlayerForcedMovement(void); void InitPlayerAvatar(s16 a, s16 b, u8 c, u8 d); void PlayerFreeze(void); -void sub_808BCF4(void); +void StopPlayerAvatar(void); void SetSpinStartFacingDir(u8); void GetXYCoordsOneStepInFrontOfPlayer(s16 *xPtr, s16 *yPtr); u8 GetRivalAvatarGraphicsIdByStateIdAndGender(u8, u8); diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index 41b8539ff..71ccd7068 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -11,6 +11,11 @@ #define METATILE_ID(tileset, name) (METATILE_##tileset##_##name) +// Rows of metatiles do not actually have a strict width. +// This constant is used for calculations for finding the next row of metatiles +// for constructing large tiles, such as the Battle Pike's curtain tile. +#define METATILE_ROW_WIDTH 8 + enum { CONNECTION_INVALID = -1, @@ -241,14 +246,14 @@ enum { PLAYER_AVATAR_STATE_WATERING, }; -#define PLAYER_AVATAR_FLAG_ON_FOOT (1 << 0) -#define PLAYER_AVATAR_FLAG_MACH_BIKE (1 << 1) -#define PLAYER_AVATAR_FLAG_ACRO_BIKE (1 << 2) -#define PLAYER_AVATAR_FLAG_SURFING (1 << 3) -#define PLAYER_AVATAR_FLAG_UNDERWATER (1 << 4) -#define PLAYER_AVATAR_FLAG_5 (1 << 5) -#define PLAYER_AVATAR_FLAG_FORCED_MOVE (1 << 6) -#define PLAYER_AVATAR_FLAG_DASH (1 << 7) +#define PLAYER_AVATAR_FLAG_ON_FOOT (1 << 0) +#define PLAYER_AVATAR_FLAG_MACH_BIKE (1 << 1) +#define PLAYER_AVATAR_FLAG_ACRO_BIKE (1 << 2) +#define PLAYER_AVATAR_FLAG_SURFING (1 << 3) +#define PLAYER_AVATAR_FLAG_UNDERWATER (1 << 4) +#define PLAYER_AVATAR_FLAG_CONTROLLABLE (1 << 5) +#define PLAYER_AVATAR_FLAG_FORCED_MOVE (1 << 6) +#define PLAYER_AVATAR_FLAG_DASH (1 << 7) enum { diff --git a/include/global.h b/include/global.h index 03b023024..dd02a1790 100644 --- a/include/global.h +++ b/include/global.h @@ -207,11 +207,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 @@ -352,8 +351,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 @@ -370,33 +369,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; @@ -410,8 +409,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; @@ -487,8 +486,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 @@ -596,15 +595,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; @@ -670,20 +660,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 @@ -726,10 +702,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; @@ -749,13 +734,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; @@ -1002,7 +980,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]; diff --git a/include/mail.h b/include/mail.h index 042586653..8236811cb 100644 --- a/include/mail.h +++ b/include/mail.h @@ -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); diff --git a/include/record_mixing.h b/include/record_mixing.h index 4cd231e8a..fec4952b8 100644 --- a/include/record_mixing.h +++ b/include/record_mixing.h @@ -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); diff --git a/include/trade.h b/include/trade.h index 05a905ab3..a0cb320a8 100644 --- a/include/trade.h +++ b/include/trade.h @@ -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); |