diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/constants/trade.h | 46 | ||||
-rw-r--r-- | include/graphics.h | 2 | ||||
-rw-r--r-- | include/link.h | 54 | ||||
-rw-r--r-- | include/link_rfu.h | 2 | ||||
-rw-r--r-- | include/pokeball.h | 2 | ||||
-rw-r--r-- | include/pokemon_icon.h | 2 | ||||
-rw-r--r-- | include/trade.h | 2 |
7 files changed, 69 insertions, 41 deletions
diff --git a/include/constants/trade.h b/include/constants/trade.h index f03ced677..7f61c88e8 100644 --- a/include/constants/trade.h +++ b/include/constants/trade.h @@ -4,6 +4,8 @@ #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 @@ -15,8 +17,8 @@ #define PARTNER_MON_INVALID 2 // Flag IDs for sending link data -#define CHOSE_VALID_MON 1 -#define CHOSE_INVALID_MON 2 +#define INITIATE_TRADE 1 +#define CANCEL_TRADE 2 #define WANTS_TO_TRADE 1 #define WANTS_TO_CANCEL 2 @@ -29,15 +31,20 @@ #define CANT_TRADE_EGG2 5 // Indexes for sTradeActionTexts -#define TRADE_ACTION_TEXT_CANCEL 0 -#define TRADE_ACTION_TEXT_CHOOSE_MON 1 -#define TRADE_ACTION_TEXT_SUMMARY 2 -#define TRADE_ACTION_TEXT_TRADE 3 -#define TRADE_ACTION_TEXT_CANCEL_TRADE 4 -#define TRADE_ACTION_TEXT_JP_QUIT 5 +#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 #define MENU_ACTION_SUMMARY 0 #define MENU_ACTION_TRADE 1 +#define MENU_ACTION_CONFIRM_TRADE 0 +#define MENU_ACTION_CANCEL_TRADE 1 + +#define DRAW_PARTY_BEGIN 1 +#define DRAW_PARTY_FINISH 5 // Message indexes for sTradeMessages #define TRADE_MSG_STANDBY 0 @@ -65,6 +72,27 @@ #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 @@ -82,7 +110,5 @@ #define CANT_REGISTER_MON 1 #define CANT_REGISTER_EGG 2 -#define LINK_TRADE_TIMEOUT 300 - #endif //GUARD_CONSTANTS_TRADE_H diff --git a/include/graphics.h b/include/graphics.h index 967af3d6a..a08d3760f 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -4853,7 +4853,7 @@ 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 u16 gTradeMenuMonBox_Tilemap[]; extern const u8 gTradeButtons_Gfx[]; extern const u16 gUnknown_08DDB444[]; diff --git a/include/link.h b/include/link.h index 4d6e4593c..c4033d05a 100644 --- a/include/link.h +++ b/include/link.h @@ -48,31 +48,30 @@ #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_0xAABB 0xAABB // used in trade -#define LINKCMD_INIT_BLOCK 0xBBBB -#define LINKCMD_0xBBCC 0xBBCC // used in trade -#define LINKCMD_SEND_HELD_KEYS_2 0xCAFE -#define LINKCMD_0xCCCC 0xCCCC -#define LINKCMD_0xCCDD 0xCCDD // all below linkcmds used in trade -#define LINKCMD_0xDDDD 0xDDDD -#define LINKCMD_0xDDEE 0xDDEE -#define LINKCMD_0xEEAA 0xEEAA -#define LINKCMD_0xEEBB 0xEEBB -#define LINKCMD_0xEECC 0xEECC - -#define LINKCMD_0xABCD 0xABCD -#define LINKCMD_0xDCBA 0xDCBA +#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 // used in trade +#define LINKCMD_0xABCD 0xABCD // used in trade +#define LINKCMD_INIT_BLOCK 0xBBBB +#define LINKCMD_SET_CANCEL_TRADE 0xBBCC // used in trade +#define LINKCMD_SEND_HELD_KEYS_2 0xCAFE +#define LINKCMD_0xCCCC 0xCCCC +#define LINKCMD_START_TRADE 0xCCDD // all below linkcmds used in trade +#define LINKCMD_0xDCBA 0xDCBA +#define LINKCMD_SET_MONS_TO_TRADE 0xDDDD +#define LINKCMD_0xDDEE 0xDDEE +#define LINKCMD_REQUEST_CANCEL 0xEEAA +#define LINKCMD_0xEEBB 0xEEBB +#define LINKCMD_PARTNER_WANTS_TRADE 0xEECC struct LinkStatus @@ -132,7 +131,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 hasClearedGame, 0xF0 is hasNationalDex + /* 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 3284aba88..533e515c5 100644 --- a/include/link_rfu.h +++ b/include/link_rfu.h @@ -228,7 +228,7 @@ 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/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 efc0028a1..5018de37c 100644 --- a/include/pokemon_icon.h +++ b/include/pokemon_icon.h @@ -21,7 +21,7 @@ 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 UpdateTradeMonIconFrame(struct Sprite *sprite); void SetPartyHPBarSprite(struct Sprite *sprite, u8 animNum); u8 GetMonIconPaletteIndexFromSpecies(u16 species); diff --git a/include/trade.h b/include/trade.h index 9d48f6b23..a0385297e 100644 --- a/include/trade.h +++ b/include/trade.h @@ -14,7 +14,7 @@ extern u8 gSelectedTradeMonPositions[2]; extern const struct WindowTemplate gTradeEvolutionSceneYesNoWindowTemplate; s32 sub_807A728(void); -void sub_80773AC(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); |