diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/battle_anim.h | 2 | ||||
-rw-r--r-- | include/constants/cable_club.h | 15 | ||||
-rwxr-xr-x | include/constants/event_object_movement_constants.h | 4 | ||||
-rw-r--r-- | include/constants/trade.h | 116 | ||||
-rw-r--r-- | include/constants/vars.h | 2 | ||||
-rw-r--r-- | include/dodrio_berry_picking.h | 4 | ||||
-rw-r--r-- | include/global.fieldmap.h | 41 | ||||
-rw-r--r-- | include/graphics.h | 8 | ||||
-rw-r--r-- | include/librfu.h | 10 | ||||
-rw-r--r-- | include/link.h | 69 | ||||
-rw-r--r-- | include/link_rfu.h | 6 | ||||
-rw-r--r-- | include/party_menu.h | 9 | ||||
-rw-r--r-- | include/pokeball.h | 2 | ||||
-rw-r--r-- | include/pokemon_icon.h | 4 | ||||
-rw-r--r-- | include/pokemon_jump.h | 6 | ||||
-rw-r--r-- | include/pokemon_storage_system.h | 2 | ||||
-rw-r--r-- | include/trade.h | 27 | ||||
-rw-r--r-- | include/union_room.h | 6 |
18 files changed, 253 insertions, 80 deletions
diff --git a/include/battle_anim.h b/include/battle_anim.h index a7b71bd85..90104fe9c 100644 --- a/include/battle_anim.h +++ b/include/battle_anim.h @@ -151,7 +151,7 @@ void sub_80A78AC(struct Sprite *sprite); void sub_80A6BFC(struct BattleAnimBgData *unk, u8 unused); u8 sub_80A8394(u16 species, bool8 isBackpic, u8 a3, s16 x, s16 y, u8 subpriority, u32 personality, u32 trainerId, u32 battlerId, u32 a10); void sub_80A749C(struct Sprite *sprite); -void sub_80A6DEC(struct Sprite *sprite); +void TradeMenuBouncePartySprites(struct Sprite *sprite); void DestroyAnimVisualTaskAndDisableBlend(u8 taskId); void DestroySpriteAndFreeResources_(struct Sprite *sprite); void SetBattlerSpriteYOffsetFromOtherYScale(u8 spriteId, u8 otherSpriteId); diff --git a/include/constants/cable_club.h b/include/constants/cable_club.h new file mode 100644 index 000000000..f2aa4120c --- /dev/null +++ b/include/constants/cable_club.h @@ -0,0 +1,15 @@ +#ifndef GUARD_CONSTANTS_CABLE_CLUB_H +#define GUARD_CONSTANTS_CABLE_CLUB_H + +// States for VAR_CABLE_CLUB_STATE +#define USING_SINGLE_BATTLE 1 +#define USING_DOUBLE_BATTLE 2 +#define USING_TRADE_CENTER 3 +#define USING_RECORD_CORNER 4 +#define USING_MULTI_BATTLE 5 +#define USING_UNION_ROOM 6 +#define USING_BERRY_CRUSH 7 +#define USING_MINIGAME 8 +#define USING_BATTLE_TOWER 9 + +#endif //GUARD_CONSTANTS_CABLE_CLUB_H diff --git a/include/constants/event_object_movement_constants.h b/include/constants/event_object_movement_constants.h index b1f9b4cb5..ed6f6c7fb 100755 --- a/include/constants/event_object_movement_constants.h +++ b/include/constants/event_object_movement_constants.h @@ -179,8 +179,8 @@ #define MOVEMENT_ACTION_CLEAR_FIXED_PRIORITY 0x5D #define MOVEMENT_ACTION_INIT_AFFINE_ANIM 0x5E #define MOVEMENT_ACTION_CLEAR_AFFINE_ANIM 0x5F -#define MOVEMENT_ACTION_UNKNOWN1 0x60 -#define MOVEMENT_ACTION_UNKNOWN2 0x61 +#define MOVEMENT_ACTION_HIDE_REFLECTION 0x60 +#define MOVEMENT_ACTION_SHOW_REFLECTION 0x61 #define MOVEMENT_ACTION_WALK_DOWN_START_AFFINE 0x62 #define MOVEMENT_ACTION_WALK_DOWN_AFFINE 0x63 #define MOVEMENT_ACTION_ACRO_WHEELIE_FACE_DOWN 0x64 diff --git a/include/constants/trade.h b/include/constants/trade.h new file mode 100644 index 000000000..4fb8966d0 --- /dev/null +++ b/include/constants/trade.h @@ -0,0 +1,116 @@ +#ifndef GUARD_CONSTANTS_TRADE_H +#define GUARD_CONSTANTS_TRADE_H + +#define TRADE_PLAYER 0 +#define TRADE_PARTNER 1 + +#define LINK_TRADE_TIMEOUT 300 + +// In-game Trade IDs +#define INGAME_TRADE_SEEDOT 0 +#define INGAME_TRADE_PLUSLE 1 +#define INGAME_TRADE_HORSEA 2 +#define INGAME_TRADE_MEOWTH 3 + +// Flag IDs for sending link data +#define INITIATE_TRADE 1 +#define CANCEL_TRADE 2 +#define WANTS_TO_TRADE 1 +#define WANTS_TO_CANCEL 2 +#define READY_FINISH_TRADE 1 +#define FINISH_TRADE 2 + +// Return values for CanTradeSelectedMon and CanTradeSelectedPartyMenuMon +#define CAN_TRADE_MON 0 +#define CANT_TRADE_LAST_MON 1 +#define CANT_TRADE_NATIONAL 2 +#define CANT_TRADE_EGG 3 +#define CANT_TRADE_INVALID_MON 4 +#define CANT_TRADE_EGG2 5 + +// Return values for CheckValidityOfTradeMons +#define PLAYER_MON_INVALID 0 +#define BOTH_MONS_VALID 1 +#define PARTNER_MON_INVALID 2 + +// Return values for GetGameProgressForLinkTrade +#define TRADE_BOTH_PLAYERS_READY 0 +#define TRADE_PLAYER_NOT_READY 1 +#define TRADE_PARTNER_NOT_READY 2 + +// Indexes for sTradeActionTexts +#define TRADE_TEXT_CANCEL 0 +#define TRADE_TEXT_CHOOSE_MON 1 +#define TRADE_TEXT_SUMMARY 2 +#define TRADE_TEXT_TRADE 3 +#define TRADE_TEXT_CANCEL_TRADE 4 +#define TRADE_TEXT_JP_QUIT 5 + +// Checked to confirm DrawTradeMenuParty has reached final state +#define DRAW_PARTY_FINISH 5 + +// Message indexes for sTradeMessages +#define TRADE_MSG_STANDBY 0 +#define TRADE_MSG_CANCELED 1 +#define TRADE_MSG_ONLY_MON1 2 +#define TRADE_MSG_ONLY_MON2 3 +#define TRADE_MSG_WAITING_FOR_FRIEND 4 +#define TRADE_MSG_FRIEND_WANTS_TO_TRADE 5 +#define TRADE_MSG_MON_CANT_BE_TRADED 6 +#define TRADE_MSG_EGG_CANT_BE_TRADED 7 +#define TRADE_MSG_FRIENDS_MON_CANT_BE_TRADED 8 + +// IDs for QueueAction +#define QUEUE_SEND_DATA 0 +#define QUEUE_STANDBY 1 +#define QUEUE_ONLY_MON1 2 +#define QUEUE_ONLY_MON2 3 +#define QUEUE_UNUSED1 4 +#define QUEUE_UNUSED2 5 +#define QUEUE_MON_CANT_BE_TRADED 6 +#define QUEUE_EGG_CANT_BE_TRADED 7 +#define QUEUE_FRIENDS_MON_CANT_BE_TRADED 8 + +#define QUEUE_DELAY_MSG 3 +#define QUEUE_DELAY_DATA 5 + +// IDs for CallTradeMenuFunc +#define TRADEMENUFUNC_MAIN_MENU 0 +#define TRADEMENUFUNC_SELECTED_MON 1 +#define TRADEMENUFUNC_SHOW_MON_SUMMARY 2 +#define TRADEMENUFUNC_CONFIRM_OR_CANCEL_TRADE 3 +#define TRADEMENUFUNC_CANCEL_TRADE_PROMPT 4 +#define TRADEMENUFUNC_UNUSED_5 5 +#define TRADEMENUFUNC_BOTH_MONS_SELECTED 6 +#define TRADEMENUFUNC_CONFIRM_TRADE_PROMPT 7 +#define TRADEMENUFUNC_REDRAW_MAIN_MENU 8 +#define TRADEMENUFUNC_LINK_TRADE_FADE_OUT 9 +#define TRADEMENUFUNC_LINK_TRADE_WAIT_FADE 10 +#define TRADEMENUFUNC_CANCEL_TRADE_1 11 +#define TRADEMENUFUNC_CANCEL_TRADE_2 12 +#define TRADEMENUFUNC_START_LINK_TRADE 13 +#define TRADEMENUFUNC_DELAY_TRADE_CONFIRM 14 +#define TRADEMENUFUNC_UNUSED_15 15 +#define TRADEMENUFUNC_LINK_TRADE_WAIT_QUEUE 16 +#define TRADEMENUFUNC_PARTNER_MON_INVALID 17 +#define TRADEMENUFUNC_STANDBY 100 + +// Message indexes for sUnionRoomTradeMessages +#define UR_TRADE_MSG_NONE 0 +#define UR_TRADE_MSG_NOT_MON_PARTNER_WANTS 1 +#define UR_TRADE_MSG_NOT_EGG 2 +#define UR_TRADE_MSG_MON_CANT_BE_TRADED_1 3 +#define UR_TRADE_MSG_MON_CANT_BE_TRADED_2 4 +#define UR_TRADE_MSG_PARTNERS_MON_CANT_BE_TRADED 5 +#define UR_TRADE_MSG_EGG_CANT_BE_TRADED 6 +#define UR_TRADE_MSG_PARTNER_CANT_ACCEPT_MON 7 +#define UR_TRADE_MSG_CANT_TRADE_WITH_PARTNER_1 8 +#define UR_TRADE_MSG_CANT_TRADE_WITH_PARTNER_2 9 + +// Return values for CanRegisterMonForTradingBoard +#define CAN_REGISTER_MON 0 +#define CANT_REGISTER_MON 1 +#define CANT_REGISTER_EGG 2 + + +#endif //GUARD_CONSTANTS_TRADE_H diff --git a/include/constants/vars.h b/include/constants/vars.h index 72b15654e..3030581c6 100644 --- a/include/constants/vars.h +++ b/include/constants/vars.h @@ -77,7 +77,7 @@ #define VAR_REGICE_STEPS_2 0x403C #define VAR_REGICE_STEPS_3 0x403D #define VAR_ALTERING_CAVE_WILD_SET 0x403E -#define VAR_ALWAYS_ZERO_0x403F 0x403F // This var is read and written, but is always zero. +#define VAR_DISTRIBUTE_EON_TICKET 0x403F // This var is read and written, but is always zero. The only way to obtain the Eon Ticket in Emerald is via Record Mixing #define VAR_DAYS 0x4040 #define VAR_FANCLUB_UNKNOWN_1 0x4041 #define VAR_FANCLUB_UNKNOWN_2 0x4042 diff --git a/include/dodrio_berry_picking.h b/include/dodrio_berry_picking.h index 55e8fa880..9995decc2 100644 --- a/include/dodrio_berry_picking.h +++ b/include/dodrio_berry_picking.h @@ -2,7 +2,7 @@ #define GUARD_DODRIO_BERRY_PICKING_H void sub_802493C(u16 a0, void (*callback)(void)); -void sub_8027A5C(void); -void sub_8027AAC(void); +void IsDodrioInParty(void); +void ShowDodrioBerryPickingRecords(void); #endif // GUARD_DODRIO_BERRY_PICKING_H diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index a17180589..de08fd1ec 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -65,7 +65,7 @@ struct EventObjectTemplate /*0x0E*/ u16 trainerRange_berryTreeId; /*0x10*/ const u8 *script; /*0x14*/ u16 flagId; -}; /*size = 0x18*/ +}; struct WarpEvent { @@ -82,7 +82,6 @@ struct CoordEvent u8 elevation; u16 trigger; u16 index; - u8 filler_A[0x2]; u8 *script; }; @@ -90,20 +89,14 @@ struct BgEvent { u16 x, y; u8 elevation; - u8 kind; - union { // carried over from diego's FR/LG work, seems to be the same struct - // in gen 3, "kind" (0x3 in BgEvent struct) determines the method to read the union. + u8 kind; // The "kind" field determines how to access bgUnion union below. + union { u8 *script; - - // hidden item type struct { u16 item; - u16 hiddenItemId; // flag offset to determine flag lookup + u16 hiddenItemId; } hiddenItem; - - // secret base type u32 secretBaseId; - } bgUnion; }; @@ -113,7 +106,6 @@ struct MapEvents u8 warpCount; u8 coordEventCount; u8 bgEventCount; - struct EventObjectTemplate *eventObjects; struct WarpEvent *warps; struct CoordEvent *coordEvents; @@ -122,10 +114,10 @@ struct MapEvents struct MapConnection { - /*0x00*/ u8 direction; - /*0x01*/ u32 offset; - /*0x05*/ u8 mapGroup; - /*0x06*/ u8 mapNum; + u8 direction; + u32 offset; + u8 mapGroup; + u8 mapNum; }; struct MapConnections @@ -180,7 +172,7 @@ struct EventObject /*0x03*/ u32 spriteAffineAnimPausedBackup:1; u32 disableJumpLandingGroundEffect:1; u32 fixedPriority:1; - u32 unk3_3:1; + u32 hideReflection:1; /*0x04*/ u8 spriteId; /*0x05*/ u8 graphicsId; /*0x06*/ u8 movementType; @@ -267,7 +259,20 @@ enum enum { - COLLISION_LEDGE_JUMP = 6 + COLLISION_NONE, + COLLISION_OUTSIDE_RANGE, + COLLISION_IMPASSABLE, + COLLISION_ELEVATION_MISMATCH, + COLLISION_EVENT_OBJECT, + COLLISION_STOP_SURFING, + COLLISION_LEDGE_JUMP, + COLLISION_PUSHED_BOULDER, + COLLISION_ROTATING_GATE, + COLLISION_WHEELIE_HOP, + COLLISION_ISOLATED_VERTICAL_RAIL, + COLLISION_ISOLATED_HORIZONTAL_RAIL, + COLLISION_VERTICAL_RAIL, + COLLISION_HORIZONTAL_RAIL, }; // player running states diff --git a/include/graphics.h b/include/graphics.h index 5f5c579d2..a08d3760f 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -4848,13 +4848,13 @@ extern const u32 gCableCarCord_Gfx[]; extern const u16 gCableCar_Pal[]; // Trade -extern const u16 gUnknown_08DDB3E4[]; -extern const u8 gUnknown_08DDB464[]; +extern const u16 gTradeMenu_Pal[]; +extern const u8 gTradeMenu_Gfx[]; extern const u16 gUnknown_08DDCF04[]; extern const u16 gTradeGba2_Pal[]; extern const u8 gTradeGba_Gfx[]; -extern const u16 gUnknown_08DDD704[]; -extern const u8 gUnknown_08DDC6E4[]; +extern const u16 gTradeMenuMonBox_Tilemap[]; +extern const u8 gTradeButtons_Gfx[]; extern const u16 gUnknown_08DDB444[]; // Party menu diff --git a/include/librfu.h b/include/librfu.h index 38c819835..55b5d264c 100644 --- a/include/librfu.h +++ b/include/librfu.h @@ -76,10 +76,10 @@ struct UnkLinkRfuStruct_02022B14Substruct u16 unk_00_4:1; u16 unk_00_5:1; u16 unk_00_6:1; - u16 unk_00_7:1; - u16 unk_01_0:1; - u16 unk_01_1:1; - u16 unk_01_2:4; + u16 isChampion:1; + u16 hasNationalDex:1; + u16 gameClear:1; // never read, redundant with isChampion + u16 unk_01_2:4; // always 3? u16 unk_01_6:2; u8 playerTrainerId[2]; }; @@ -93,7 +93,7 @@ struct __attribute__((packed, aligned(2))) UnkLinkRfuStruct_02022B14 u8 unk_0a_0:7; u8 unk_0a_7:1; u8 playerGender:1; - u8 unk_0b_1:7; + u8 level:7; u8 unk_0c; }; diff --git a/include/link.h b/include/link.h index c14084066..499405fc1 100644 --- a/include/link.h +++ b/include/link.h @@ -48,20 +48,52 @@ #define EXTRACT_LINK_ERRORS(status) \ (((status) & LINK_STAT_ERRORS) >> LINK_STAT_ERRORS_SHIFT) -#define LINKCMD_SEND_LINK_TYPE 0x2222 -#define LINKCMD_0x2FFE 0x2FFE -#define LINKCMD_SEND_HELD_KEYS 0x4444 -#define LINKCMD_0x5555 0x5555 -#define LINKCMD_0x5566 0x5566 -#define LINKCMD_0x5FFF 0x5FFF -#define LINKCMD_0x6666 0x6666 -#define LINKCMD_0x7777 0x7777 -#define LINKCMD_CONT_BLOCK 0x8888 -#define LINKCMD_0xAAAA 0xAAAA -#define LINKCMD_0xAAAB 0xAAAB -#define LINKCMD_INIT_BLOCK 0xBBBB -#define LINKCMD_SEND_HELD_KEYS_2 0xCAFE -#define LINKCMD_0xCCCC 0xCCCC +#define LINKCMD_SEND_LINK_TYPE 0x2222 +#define LINKCMD_0x2FFE 0x2FFE +#define LINKCMD_SEND_HELD_KEYS 0x4444 +#define LINKCMD_0x5555 0x5555 +#define LINKCMD_0x5566 0x5566 +#define LINKCMD_0x5FFF 0x5FFF +#define LINKCMD_0x6666 0x6666 +#define LINKCMD_0x7777 0x7777 +#define LINKCMD_CONT_BLOCK 0x8888 +#define LINKCMD_0xAAAA 0xAAAA +#define LINKCMD_0xAAAB 0xAAAB +#define LINKCMD_READY_TO_TRADE 0xAABB +#define LINKCMD_READY_FINISH_TRADE 0xABCD +#define LINKCMD_INIT_BLOCK 0xBBBB +#define LINKCMD_READY_CANCEL_TRADE 0xBBCC +#define LINKCMD_SEND_HELD_KEYS_2 0xCAFE +#define LINKCMD_0xCCCC 0xCCCC +#define LINKCMD_START_TRADE 0xCCDD +#define LINKCMD_CONFIRM_FINISH_TRADE 0xDCBA +#define LINKCMD_SET_MONS_TO_TRADE 0xDDDD +#define LINKCMD_0xDDEE 0xDDEE +#define LINKCMD_REQUEST_CANCEL 0xEEAA +#define LINKCMD_CANCEL_TRADE 0xEEBB +#define LINKCMD_0xEECC 0xEECC + +#define LINKTYPE_0x1111 0x1111 // trade +#define LINKTYPE_0x1122 0x1122 // trade +#define LINKTYPE_0x1133 0x1133 // trade +#define LINKTYPE_0x1144 0x1144 // trade +#define LINKTYPE_BATTLE 0x2211 +#define LINKTYPE_0x2222 0x2222 // unused battle? +#define LINKTYPE_SINGLE_BATTLE 0x2233 +#define LINKTYPE_DOUBLE_BATTLE 0x2244 +#define LINKTYPE_MULTI_BATTLE 0x2255 +#define LINKTYPE_BATTLE_TOWER_50 0x2266 +#define LINKTYPE_BATTLE_TOWER_OPEN 0x2277 +#define LINKTYPE_0x2288 0x2288 // battle? +#define LINKTYPE_0x3311 0x3311 +#define LINKTYPE_0x3322 0x3322 +#define LINKTYPE_0x4411 0x4411 +#define LINKTYPE_BERRY_BLENDER 0x4422 +#define LINKTYPE_0x5501 0x5501 // mystery event +#define LINKTYPE_0x5502 0x5502 // unused? +#define LINKTYPE_0x5503 0x5503 // eReader +#define LINKTYPE_0x6601 0x6601 +#define LINKTYPE_0x6602 0x6602 struct LinkStatus { @@ -95,8 +127,8 @@ enum EXCHANGE_COMPLETE, EXCHANGE_TIMED_OUT, EXCHANGE_IN_PROGRESS, - EXCHANGE_STAT_4, - EXCHANGE_STAT_5, + EXCHANGE_PLAYER_NOT_READY, + EXCHANGE_PARTNER_NOT_READY, EXCHANGE_STAT_6, EXCHANGE_STAT_7 }; @@ -120,7 +152,10 @@ struct LinkPlayer /* 0x00 */ u16 version; /* 0x02 */ u16 lp_field_2; /* 0x04 */ u32 trainerId; - /* 0x08 */ u8 name[11]; + /* 0x08 */ u8 name[PLAYER_NAME_LENGTH + 1]; + /* 0x10 */ u8 progressFlags; // (& 0x0F) is hasNationalDex, (& 0xF0) is hasClearedGame + /* 0x11 */ u8 neverRead; + /* 0x12 */ u8 progressFlagsCopy; /* 0x13 */ u8 gender; /* 0x14 */ u32 linkType; /* 0x18 */ u16 id; // battler id in battles diff --git a/include/link_rfu.h b/include/link_rfu.h index d6e1009e1..533e515c5 100644 --- a/include/link_rfu.h +++ b/include/link_rfu.h @@ -128,7 +128,7 @@ struct UnkRfuStruct_Sub_Unused struct UnkRfuStruct_2 { - /* 0x000 */ void (*unk_00)(void); + /* 0x000 */ void (*linkRfuCallback)(void); /* 0x004 */ u16 unk_04; /* 0x006 */ u8 filler_06[4]; /* 0x00a */ u16 unk_0a; @@ -224,11 +224,11 @@ void sub_800F804(void); void sub_800F850(void); u8 sub_800FCD8(void); bool32 sub_800FE84(const u8 *src, size_t size); -void Rfu_set_zero(void); +void ClearLinkRfuCallback(void); u8 sub_80104F4(void); u8 rfu_get_multiplayer_id(void); bool8 sub_8010100(u8 a0); -bool8 sub_8010500(void); +bool8 IsLinkRfuTaskFinished(void); bool8 Rfu_IsMaster(void); void task_add_05_task_del_08FA224_when_no_RfuFunc(void); void sub_8010434(void); diff --git a/include/party_menu.h b/include/party_menu.h index 84b6c1ad8..a26cdb4cd 100644 --- a/include/party_menu.h +++ b/include/party_menu.h @@ -38,17 +38,17 @@ u8 GetCursorSelectionMonId(void); u8 sub_81B1360(void); void sub_81B1370(u8 taskId); u8* GetMonNickname(struct Pokemon *mon, u8 *dest); -u8 sub_81B1B5C(const u8* str, u8 b); +u8 DisplayPartyMenuMessage(const u8* str, u8 b); bool8 sub_81B1BD4(void); void sub_81B1F18(u8 taskId, u8 slot, s8 c, s16 HPDifference, TaskFunc func); u8 pokemon_ailments_get_primary(u32 status); u8 GetMonAilment(struct Pokemon *mon); -void display_pokemon_menu_message(u32 stringID); +void DisplayPartyMenuStdMessage(u32 stringID); void sub_81B47E0(u8 taskId); bool8 FieldCallback_PrepareFadeInFromMenu(void); void sub_81B58A8(void); void LoadHeldItemIcons(void); -void sub_81B5D4C(u8 *a, u8 *b, u8 c); +void DrawHeldItemIconsForTrade(u8 *a, u8 *b, u8 c); void sub_81B617C(void); void ItemUseCB_Medicine(u8 taskId, TaskFunc task); void sub_81B67C8(u8 taskId, TaskFunc task); @@ -69,7 +69,8 @@ void InitChooseHalfPartyForBattle(u8 unused); void sub_81B8558(void); void sub_81B8904(u8 initArg, MainCallback callback); void OpenPartyMenuForMoveTutor(void); -void sub_81B8958(void); +void ChooseMonForWirelessMinigame(void); +void ChooseMonForWirelessMinigame(void); void OpenPartyMenuInBattle(u8 arg); void sub_81B89F0(void); void sub_81B8C68(void); diff --git a/include/pokeball.h b/include/pokeball.h index 8e1d8b8ec..12b9b1eff 100644 --- a/include/pokeball.h +++ b/include/pokeball.h @@ -25,7 +25,7 @@ extern const struct SpriteTemplate gBallSpriteTemplates[]; u8 DoPokeballSendOutAnimation(s16 pan, u8 kindOfThrow); void CreatePokeballSpriteToReleaseMon(u8 monSpriteId, u8 battler, u8 x, u8 y, u8 oamPriority, u8 subpriortiy, u8 g, u32 h, u16 species); -u8 sub_807671C(u8 a, u8 b, u8 x, u8 y, u8 oamPriority, u8 subPriority, u8 g, u32 h); +u8 CreateTradePokeballSprite(u8 a, u8 b, u8 x, u8 y, u8 oamPriority, u8 subPriority, u8 g, u32 h); void sub_8076918(u8 battler); void DoHitAnimHealthboxEffect(u8 battler); void LoadBallGfx(u8 ballId); diff --git a/include/pokemon_icon.h b/include/pokemon_icon.h index 8af43c753..5018de37c 100644 --- a/include/pokemon_icon.h +++ b/include/pokemon_icon.h @@ -21,8 +21,8 @@ u8 CreateMonIcon(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u u8 UpdateMonIconFrame(struct Sprite *sprite); void LoadMonIconPalette(u16 species); void sub_80D328C(struct Sprite *sprite); -void sub_80D3014(struct Sprite *sprite); -void sub_80D32C8(struct Sprite *sprite, u8 animNum); +void UpdateTradeMonIconFrame(struct Sprite *sprite); +void SetPartyHPBarSprite(struct Sprite *sprite, u8 animNum); u8 GetMonIconPaletteIndexFromSpecies(u16 species); #endif // GUARD_POKEMON_ICON_H diff --git a/include/pokemon_jump.h b/include/pokemon_jump.h index 28b19f9b1..dde59aac5 100644 --- a/include/pokemon_jump.h +++ b/include/pokemon_jump.h @@ -4,10 +4,10 @@ #include "main.h" void sub_802A9A8(u16 monId, MainCallback callback); -bool32 sub_802C908(u16 species); -void sub_802C920(void); +bool32 IsSpeciesAllowedInPokemonJump(u16 species); +void IsPokemonJumpSpeciesInParty(void); void ResetPokeJumpResults(void); -void sub_802E3C4(void); +void ShowPokemonJumpRecords(void); void sub_802EB24(s16 tileTag, s16 palTag, s16 x, s16 y, u8 subpriority); bool32 sub_802EB84(void); diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index 4c319e59d..7b6a38678 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -25,7 +25,7 @@ struct PokemonStorage extern struct PokemonStorage *gPokemonStoragePtr; -void sub_80C6D80(const u8 *string, void *dst, u8 arg2, u8 arg3, s32 arg4); +void DrawTextWindowAndBufferTiles(const u8 *string, void *dst, u8 arg2, u8 arg3, s32 bytesToBuffer); u8 CountMonsInBox(u8 boxId); s16 GetFirstFreeBoxSpot(u8 boxId); u8 CountPartyAliveNonEggMonsExcept(u8 slotToIgnore); diff --git a/include/trade.h b/include/trade.h index 0c95e1e81..42bfc1482 100644 --- a/include/trade.h +++ b/include/trade.h @@ -2,25 +2,26 @@ #define GUARD_TRADE_H #include "link_rfu.h" +#include "constants/trade.h" // Exported type declarations // Exported RAM declarations -extern struct MailStruct gUnknown_020321C0[PARTY_SIZE]; -extern u8 gUnknown_02032298[2]; +extern struct MailStruct gTradeMail[PARTY_SIZE]; +extern u8 gSelectedTradeMonPositions[2]; // Exported ROM declarations -extern const struct WindowTemplate gUnknown_0833900C; +extern const struct WindowTemplate gTradeEvolutionSceneYesNoWindowTemplate; -s32 sub_807A728(void); -void sub_80773AC(void); -void sub_807AE50(void); -int sub_807A8D0(struct UnkLinkRfuStruct_02022B14Substruct a0, u16, u16, u8); -int sub_807A7E0(struct UnkLinkRfuStruct_02022B14Substruct a0, struct UnkLinkRfuStruct_02022B14Substruct a1, u16 a2, u16 a3, u8 a4, u16 a5, u8 a6); -int sub_807A918(struct Pokemon*, u16); -void sub_807B140(void); -void sub_807B154(void); -void sub_807F19C(void); -void sub_807F1A8(u8, const u8 *, u8); +s32 GetGameProgressForLinkTrade(void); +void CB2_StartCreateTradeMenu(void); +void CB2_LinkTrade(void); +int CanRegisterMonForTradingBoard(struct UnkLinkRfuStruct_02022B14Substruct a0, u16, u16, u8); +int GetUnionRoomTradeMessageId(struct UnkLinkRfuStruct_02022B14Substruct a0, struct UnkLinkRfuStruct_02022B14Substruct a1, u16 a2, u16 a3, u8 a4, u16 a5, u8 a6); +int CanTradeSelectedPartyMenuMon(struct Pokemon*, u16); +void InitTradeSequenceBgGpuRegs(void); +void LinkTradeDrawWindow(void); +void InitTradeBg(void); +void DrawTextOnTradeWindow(u8, const u8 *, u8); #endif //GUARD_TRADE_H diff --git a/include/union_room.h b/include/union_room.h index facc63986..54f09cbeb 100644 --- a/include/union_room.h +++ b/include/union_room.h @@ -135,7 +135,7 @@ union UnkUnion_Main struct UnkStruct_URoom *uRoom; }; -struct TradeUnkStruct +struct UnionRoomTrade { u16 field_0; u16 type; @@ -156,8 +156,8 @@ extern u8 gUnknown_02022C2C; extern union UnkUnion_Main gUnknown_02022C30; extern struct UnkLinkRfuStruct_02022B14Substruct gUnknown_02022C38; -extern u16 gUnknown_02022C3C; -extern u8 gUnknown_02022C3E; +extern u16 gUnionRoomOfferedSpecies; +extern u8 gUnionRoomRequestedMonType; // Exported ROM declarations |