From c3c8fb40cfab23b5db845ce4b2bd3e626a5506dc Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 3 Oct 2019 01:16:22 -0400 Subject: Move trade data, some trade.c clean up documentation --- include/constants/trade.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 include/constants/trade.h (limited to 'include/constants') diff --git a/include/constants/trade.h b/include/constants/trade.h new file mode 100644 index 000000000..1afa3b263 --- /dev/null +++ b/include/constants/trade.h @@ -0,0 +1,13 @@ +#ifndef GUARD_CONSTANTS_TRADE_H +#define GUARD_CONSTANTS_TRADE_H + +#define TRADE_PLAYER 0 +#define TRADE_PARTNER 1 +#define TRADE_PARTICIPANT_COUNT 2 + +#define INGAME_TRADE_SEEDOT 0 +#define INGAME_TRADE_PLUSLE 1 +#define INGAME_TRADE_HORSEA 2 +#define INGAME_TRADE_MEOWTH 3 + +#endif //GUARD_CONSTANTS_TRADE_H -- cgit v1.2.3 From 4a7f06188557e4bbc7bdcfa6656d9e8dec29929a Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 3 Oct 2019 19:39:37 -0400 Subject: Document some of trade --- include/constants/trade.h | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'include/constants') diff --git a/include/constants/trade.h b/include/constants/trade.h index 1afa3b263..a12ee7fca 100644 --- a/include/constants/trade.h +++ b/include/constants/trade.h @@ -3,11 +3,40 @@ #define TRADE_PLAYER 0 #define TRADE_PARTNER 1 -#define TRADE_PARTICIPANT_COUNT 2 #define INGAME_TRADE_SEEDOT 0 #define INGAME_TRADE_PLUSLE 1 #define INGAME_TRADE_HORSEA 2 #define INGAME_TRADE_MEOWTH 3 +#define INGAME_TRADE_MAIL_LENGTH 9 + +#define PLAYER_MON_INVALID 0 +#define PLAYER_MON_VALID 1 +#define PARTNER_MON_INVALID 2 + +#define MON_VALID 0 + + +#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 MENU_ACTION_SUMMARY 0 +#define MENU_ACTION_TRADE 1 + +#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 + + #endif //GUARD_CONSTANTS_TRADE_H -- cgit v1.2.3 From 6b556900f81b8f99920012f58060e4eccec70aed Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 4 Oct 2019 17:24:03 -0400 Subject: Move union room data, more trade doc --- include/constants/trade.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'include/constants') diff --git a/include/constants/trade.h b/include/constants/trade.h index a12ee7fca..dbaefcdc3 100644 --- a/include/constants/trade.h +++ b/include/constants/trade.h @@ -15,9 +15,6 @@ #define PLAYER_MON_VALID 1 #define PARTNER_MON_INVALID 2 -#define MON_VALID 0 - - #define TRADE_ACTION_TEXT_CANCEL 0 #define TRADE_ACTION_TEXT_CHOOSE_MON 1 #define TRADE_ACTION_TEXT_SUMMARY 2 @@ -28,6 +25,7 @@ #define MENU_ACTION_SUMMARY 0 #define MENU_ACTION_TRADE 1 +// Message indexes for sTradeMessages #define TRADE_MSG_STANDBY 0 #define TRADE_MSG_CANCELED 1 #define TRADE_MSG_ONLY_MON1 2 @@ -38,5 +36,17 @@ #define TRADE_MSG_EGG_CANT_BE_TRADED 7 #define TRADE_MSG_FRIENDS_MON_CANT_BE_TRADED 8 +// 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 + #endif //GUARD_CONSTANTS_TRADE_H -- cgit v1.2.3 From dadb1cb9f14a19cf0e483d4b15122b9d9cfb4baa Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 4 Oct 2019 23:31:25 -0400 Subject: More trade/union room doc, incidental party_menu doc --- include/constants/trade.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/constants') diff --git a/include/constants/trade.h b/include/constants/trade.h index dbaefcdc3..54e58f922 100644 --- a/include/constants/trade.h +++ b/include/constants/trade.h @@ -48,5 +48,10 @@ #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 -- cgit v1.2.3 From 66a68159b17f3c4c5f62219fc4bd0ec636d772b5 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 5 Oct 2019 10:41:37 -0400 Subject: Continue trade doc --- include/constants/trade.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'include/constants') diff --git a/include/constants/trade.h b/include/constants/trade.h index 54e58f922..bd66a16aa 100644 --- a/include/constants/trade.h +++ b/include/constants/trade.h @@ -9,8 +9,6 @@ #define INGAME_TRADE_HORSEA 2 #define INGAME_TRADE_MEOWTH 3 -#define INGAME_TRADE_MAIL_LENGTH 9 - #define PLAYER_MON_INVALID 0 #define PLAYER_MON_VALID 1 #define PARTNER_MON_INVALID 2 @@ -26,15 +24,15 @@ #define MENU_ACTION_TRADE 1 // 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 +#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 // Message indexes for sUnionRoomTradeMessages #define UR_TRADE_MSG_NONE 0 @@ -53,5 +51,7 @@ #define CANT_REGISTER_MON 1 #define CANT_REGISTER_EGG 2 +#define LINK_TRADE_TIMEOUT 300 + #endif //GUARD_CONSTANTS_TRADE_H -- cgit v1.2.3 From d1bcd60b58dafea5b8e48cc615460a8039ae6c4b Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 6 Oct 2019 22:58:25 -0400 Subject: Document more trade.c --- include/constants/trade.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'include/constants') diff --git a/include/constants/trade.h b/include/constants/trade.h index bd66a16aa..f03ced677 100644 --- a/include/constants/trade.h +++ b/include/constants/trade.h @@ -4,6 +4,7 @@ #define TRADE_PLAYER 0 #define TRADE_PARTNER 1 +// In-game Trade IDs #define INGAME_TRADE_SEEDOT 0 #define INGAME_TRADE_PLUSLE 1 #define INGAME_TRADE_HORSEA 2 @@ -13,6 +14,21 @@ #define PLAYER_MON_VALID 1 #define PARTNER_MON_INVALID 2 +// Flag IDs for sending link data +#define CHOSE_VALID_MON 1 +#define CHOSE_INVALID_MON 2 +#define WANTS_TO_TRADE 1 +#define WANTS_TO_CANCEL 2 + +// Return values for CanTradeSelectedMon +#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 + +// Indexes for sTradeActionTexts #define TRADE_ACTION_TEXT_CANCEL 0 #define TRADE_ACTION_TEXT_CHOOSE_MON 1 #define TRADE_ACTION_TEXT_SUMMARY 2 @@ -34,6 +50,21 @@ #define TRADE_MSG_EGG_CANT_BE_TRADED 7 #define TRADE_MSG_FRIENDS_MON_CANT_BE_TRADED 8 +// Queue actions +#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 + +// Queue delays +#define QUEUE_DELAY_MSG 3 +#define QUEUE_DELAY_DATA 5 + // Message indexes for sUnionRoomTradeMessages #define UR_TRADE_MSG_NONE 0 #define UR_TRADE_MSG_NOT_MON_PARTNER_WANTS 1 -- cgit v1.2.3 From 2c062dc76478c5e6ce126310ece41355d4156c42 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 9 Oct 2019 05:56:44 -0400 Subject: More trade documentation --- include/constants/trade.h | 46 ++++++++++++++++++++++++++++++++++++---------- 1 file changed, 36 insertions(+), 10 deletions(-) (limited to 'include/constants') 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 -- cgit v1.2.3 From 32aa87c7e126357165e1efa2f6e1ed3d3aadbdf8 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 9 Oct 2019 09:55:06 -0400 Subject: More trade doc, fix switch indentations --- include/constants/trade.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/constants') diff --git a/include/constants/trade.h b/include/constants/trade.h index 7f61c88e8..8a2626c9a 100644 --- a/include/constants/trade.h +++ b/include/constants/trade.h @@ -21,6 +21,8 @@ #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 #define CAN_TRADE_MON 0 -- cgit v1.2.3 From 07fa82c911c5a22f0671a4ea798056b8de3c0a80 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 10 Oct 2019 03:50:51 -0400 Subject: Last non-anim trade.c doc --- include/constants/trade.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'include/constants') diff --git a/include/constants/trade.h b/include/constants/trade.h index 8a2626c9a..4fb8966d0 100644 --- a/include/constants/trade.h +++ b/include/constants/trade.h @@ -12,10 +12,6 @@ #define INGAME_TRADE_HORSEA 2 #define INGAME_TRADE_MEOWTH 3 -#define PLAYER_MON_INVALID 0 -#define PLAYER_MON_VALID 1 -#define PARTNER_MON_INVALID 2 - // Flag IDs for sending link data #define INITIATE_TRADE 1 #define CANCEL_TRADE 2 @@ -24,7 +20,7 @@ #define READY_FINISH_TRADE 1 #define FINISH_TRADE 2 -// Return values for CanTradeSelectedMon +// Return values for CanTradeSelectedMon and CanTradeSelectedPartyMenuMon #define CAN_TRADE_MON 0 #define CANT_TRADE_LAST_MON 1 #define CANT_TRADE_NATIONAL 2 @@ -32,6 +28,16 @@ #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 @@ -40,12 +46,7 @@ #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 +// Checked to confirm DrawTradeMenuParty has reached final state #define DRAW_PARTY_FINISH 5 // Message indexes for sTradeMessages @@ -59,7 +60,7 @@ #define TRADE_MSG_EGG_CANT_BE_TRADED 7 #define TRADE_MSG_FRIENDS_MON_CANT_BE_TRADED 8 -// Queue actions +// IDs for QueueAction #define QUEUE_SEND_DATA 0 #define QUEUE_STANDBY 1 #define QUEUE_ONLY_MON1 2 @@ -70,7 +71,6 @@ #define QUEUE_EGG_CANT_BE_TRADED 7 #define QUEUE_FRIENDS_MON_CANT_BE_TRADED 8 -// Queue delays #define QUEUE_DELAY_MSG 3 #define QUEUE_DELAY_DATA 5 -- cgit v1.2.3 From 1b7607bd91a9bdf9ee5e2ccbf895727bc53f9254 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 11 Oct 2019 04:14:09 -0400 Subject: Document cable_club.inc --- include/constants/cable_club.h | 15 +++++++++++++++ include/constants/vars.h | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 include/constants/cable_club.h (limited to 'include/constants') 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/vars.h b/include/constants/vars.h index 72b15654e..3fde9cc11 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. Presumably meant to be set externally by Mystery Gift distribution #define VAR_DAYS 0x4040 #define VAR_FANCLUB_UNKNOWN_1 0x4041 #define VAR_FANCLUB_UNKNOWN_2 0x4042 -- cgit v1.2.3 From 4e2be7ff5e4e4f6b7f664bfee4f1d4433c7f238f Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 11 Oct 2019 22:23:05 -0400 Subject: Review changes for #835 --- include/constants/vars.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/constants') diff --git a/include/constants/vars.h b/include/constants/vars.h index 3fde9cc11..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_DISTRIBUTE_EON_TICKET 0x403F // This var is read and written, but is always zero. Presumably meant to be set externally by Mystery Gift distribution +#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 -- cgit v1.2.3