From ecf02943d4a46a4e7e5c69e53c6a9d4162560d62 Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Wed, 27 Jul 2022 01:40:48 -0700 Subject: [PATCH] more ep3 formats research --- src/CommandFormats.hh | 51 ++++++++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 17 deletions(-) diff --git a/src/CommandFormats.hh b/src/CommandFormats.hh index f22c3875..77caa691 100644 --- a/src/CommandFormats.hh +++ b/src/CommandFormats.hh @@ -1815,10 +1815,11 @@ struct C_SetBlockedSenders_V3_BB_C6 { // CC (S->C): Unknown (Episode 3) -struct S_Unknown_GC_Ep3_CC { - parray unknown_a1; +struct S_ConfirmTournamentEntry_GC_Ep3_CC { + ptext tournament_name; parray unknown_a2; - parray unknown_a3; + ptext server_name; + ptext start_time; // e.g. "15:09:30" struct Entry { parray unknown_a1; parray unknown_a2; @@ -2034,6 +2035,9 @@ struct C_Unknown_BB_07DF { }; // E0 (S->C): Tournament list (Episode 3) +// The client will send 09 and 10 commands to inspect or enter a tournament. The +// server should respond to an 09 command with an E3 command; the server should +// respond to a 10 command with an E2 04 command. // header.flag is the count of filled-in entries. struct S_TournamentList_GC_Ep3_E0 { @@ -2041,12 +2045,13 @@ struct S_TournamentList_GC_Ep3_E0 { le_uint32_t menu_id; le_uint32_t item_id; parray unknown_a1; - le_uint32_t unknown_a2; - parray unknown_a3; - parray unknown_a4; + le_uint32_t start_time; // In seconds since Unix epoch + ptext name; + le_uint16_t num_teams; + le_uint16_t max_teams; + parray unknown_a3; }; Entry entries[0x20]; - uint8_t unknown_a1[4]; }; // E0 (C->S): Request team and key config (BB) @@ -2066,7 +2071,13 @@ struct S_Unknown_GC_Ep3_E1 { // header.flag = 03 => create tournament spectator team // header.flag = 04 => join tournament spectator team -// E2 (S->C): Tournament entry control (Episode 3) +// E2 (S->C): Tournament entry list (Episode 3) +// Client may send 09 commands if the player presses X. It's not clear what the +// server should respond with in this case. +// If the player selects an entry slot, client will respond with a long-form 10 +// command (the Flag03 variant); in this case, unknown_a1 is the team name, and +// password is the team password. The server should respond to that with a CC +// command. struct S_TournamentControl_GC_Ep3_E2 { le_uint16_t unknown_a1; @@ -2075,7 +2086,7 @@ struct S_TournamentControl_GC_Ep3_E2 { le_uint32_t menu_id; le_uint32_t item_id; parray unknown_a1; - parray unknown_a2; + ptext team_name; }; Entry entries[0x20]; }; @@ -2083,19 +2094,25 @@ struct S_TournamentControl_GC_Ep3_E2 { // E2 (S->C): Team and key config (BB) // See KeyAndTeamConfigBB in Player.hh for format -// E3 (S->C): Unknown (Episode 3) +// E3 (S->C): Tournament info (Episode 3) -struct S_Unknown_GC_Ep3_E3 { +struct S_TournamentInfo_GC_Ep3_E3 { struct Entry { - parray unknown_a1; + le_uint16_t unknown_a1; le_uint16_t unknown_a2; - le_uint16_t unknown_a3; + ptext team_name; }; - parray unknown_a1; + + ptext name; + ptext map_name; + Ep3BattleRules rules; Entry entries[0x20]; - parray unknown_a2; - parray unknown_a3; - parray unknown_a4; + parray unknown_a2; + le_uint16_t max_entries; + le_uint16_t unknown_a3; + le_uint16_t unknown_a4; + le_uint16_t unknown_a5; + parray unknown_a6; }; // E3 (C->S): Player preview request (BB)