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/link.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'include/link.h') diff --git a/include/link.h b/include/link.h index c14084066..4d6e4593c 100644 --- a/include/link.h +++ b/include/link.h @@ -48,7 +48,7 @@ #define EXTRACT_LINK_ERRORS(status) \ (((status) & LINK_STAT_ERRORS) >> LINK_STAT_ERRORS_SHIFT) -#define LINKCMD_SEND_LINK_TYPE 0x2222 +#define LINKCMD_SEND_LINK_TYPE 0x2222 #define LINKCMD_0x2FFE 0x2FFE #define LINKCMD_SEND_HELD_KEYS 0x4444 #define LINKCMD_0x5555 0x5555 @@ -59,9 +59,21 @@ #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 + struct LinkStatus { -- 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/link.h | 54 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 26 deletions(-) (limited to 'include/link.h') 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 -- 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/link.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/link.h') diff --git a/include/link.h b/include/link.h index c4033d05a..f149f8a92 100644 --- a/include/link.h +++ b/include/link.h @@ -60,13 +60,13 @@ #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_READY_FINISH_TRADE 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_CONFIRM_FINISH_TRADE 0xDCBA #define LINKCMD_SET_MONS_TO_TRADE 0xDDDD #define LINKCMD_0xDDEE 0xDDEE #define LINKCMD_REQUEST_CANCEL 0xEEAA -- 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/link.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/link.h') diff --git a/include/link.h b/include/link.h index f149f8a92..04efc973c 100644 --- a/include/link.h +++ b/include/link.h @@ -106,8 +106,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 }; @@ -132,7 +132,7 @@ struct LinkPlayer /* 0x02 */ u16 lp_field_2; /* 0x04 */ u32 trainerId; /* 0x08 */ u8 name[PLAYER_NAME_LENGTH + 1]; - /* 0x10 */ u8 progressFlags; // 0x0F is hasClearedGame, 0xF0 is hasNationalDex + /* 0x10 */ u8 progressFlags; // (& 0x0F) is hasNationalDex, (& 0xF0) is hasClearedGame /* 0x11 */ u8 neverRead; /* 0x12 */ u8 progressFlagsCopy; /* 0x13 */ u8 gender; -- cgit v1.2.3 From 3514f9dd6b48f1a0c42a4ea6cb1ab5317fa88c50 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 10 Oct 2019 18:46:42 -0400 Subject: Clean up trade.c doc --- include/link.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'include/link.h') diff --git a/include/link.h b/include/link.h index 04efc973c..cecc7a3f7 100644 --- a/include/link.h +++ b/include/link.h @@ -59,19 +59,19 @@ #define LINKCMD_CONT_BLOCK 0x8888 #define LINKCMD_0xAAAA 0xAAAA #define LINKCMD_0xAAAB 0xAAAB -#define LINKCMD_READY_TO_TRADE 0xAABB // used in trade -#define LINKCMD_READY_FINISH_TRADE 0xABCD // used in trade +#define LINKCMD_READY_TO_TRADE 0xAABB +#define LINKCMD_READY_FINISH_TRADE 0xABCD #define LINKCMD_INIT_BLOCK 0xBBBB -#define LINKCMD_SET_CANCEL_TRADE 0xBBCC // used in trade +#define LINKCMD_READY_CANCEL_TRADE 0xBBCC #define LINKCMD_SEND_HELD_KEYS_2 0xCAFE #define LINKCMD_0xCCCC 0xCCCC -#define LINKCMD_START_TRADE 0xCCDD // all below linkcmds used in trade +#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_0xEEBB 0xEEBB -#define LINKCMD_PARTNER_WANTS_TRADE 0xEECC +#define LINKCMD_CANCEL_TRADE 0xEEBB +#define LINKCMD_0xEECC 0xEECC struct LinkStatus -- 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/link.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'include/link.h') diff --git a/include/link.h b/include/link.h index c14084066..847ea38ba 100644 --- a/include/link.h +++ b/include/link.h @@ -48,6 +48,28 @@ #define EXTRACT_LINK_ERRORS(status) \ (((status) & LINK_STAT_ERRORS) >> LINK_STAT_ERRORS_SHIFT) +#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 + #define LINKCMD_SEND_LINK_TYPE 0x2222 #define LINKCMD_0x2FFE 0x2FFE #define LINKCMD_SEND_HELD_KEYS 0x4444 -- cgit v1.2.3 From af83b41dd19a49121f23d188015959d8072e4d7f Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 10 Nov 2019 10:59:15 -0500 Subject: Document Contest Hall berry blenders and misc --- include/link.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/link.h') diff --git a/include/link.h b/include/link.h index 499405fc1..32dfaf51e 100644 --- a/include/link.h +++ b/include/link.h @@ -87,7 +87,7 @@ #define LINKTYPE_0x2288 0x2288 // battle? #define LINKTYPE_0x3311 0x3311 #define LINKTYPE_0x3322 0x3322 -#define LINKTYPE_0x4411 0x4411 +#define LINKTYPE_BERRY_BLENDER_SETUP 0x4411 #define LINKTYPE_BERRY_BLENDER 0x4422 #define LINKTYPE_0x5501 0x5501 // mystery event #define LINKTYPE_0x5502 0x5502 // unused? @@ -290,7 +290,7 @@ void sub_800AF18(u32 status, u8 lastSendQueueCount, u8 lastRecvQueueCount, u8 un void sub_800B348(void); void sub_800B3A4(u32 who); bool32 sub_800A07C(void); -void sub_800AB98(void); +void ResetLinkPlayerCount(void); void sub_800AA04(u8 a0); void sub_800B4C0(void); bool32 sub_800B504(void); -- cgit v1.2.3 From ef8370566f14c22b9927db09b8ff69a98049c796 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 10 Nov 2019 21:54:00 -0500 Subject: Document Contest scripts --- include/link.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/link.h') diff --git a/include/link.h b/include/link.h index 32dfaf51e..4d6771a03 100644 --- a/include/link.h +++ b/include/link.h @@ -92,8 +92,8 @@ #define LINKTYPE_0x5501 0x5501 // mystery event #define LINKTYPE_0x5502 0x5502 // unused? #define LINKTYPE_0x5503 0x5503 // eReader -#define LINKTYPE_0x6601 0x6601 -#define LINKTYPE_0x6602 0x6602 +#define LINKTYPE_CONTEST_GMODE 0x6601 +#define LINKTYPE_CONTEST_EMODE 0x6602 struct LinkStatus { -- cgit v1.2.3 From 6a470ddfdaf4480190792823464fcc05df8704f7 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 8 Jan 2020 04:26:26 -0500 Subject: Some script clean up, document secret base secrets show --- include/link.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/link.h') diff --git a/include/link.h b/include/link.h index 4d6771a03..f41161d23 100644 --- a/include/link.h +++ b/include/link.h @@ -84,7 +84,7 @@ #define LINKTYPE_MULTI_BATTLE 0x2255 #define LINKTYPE_BATTLE_TOWER_50 0x2266 #define LINKTYPE_BATTLE_TOWER_OPEN 0x2277 -#define LINKTYPE_0x2288 0x2288 // battle? +#define LINKTYPE_BATTLE_TOWER 0x2288 #define LINKTYPE_0x3311 0x3311 #define LINKTYPE_0x3322 0x3322 #define LINKTYPE_BERRY_BLENDER_SETUP 0x4411 -- cgit v1.2.3