From ff7031544aabb4a9ca5e477b59578153a76b7041 Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Wed, 13 Jul 2022 17:20:17 -0700 Subject: [PATCH] more format documentation updates --- src/CommandFormats.hh | 26 ++++++++++---------------- src/SendCommands.cc | 4 ++-- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/src/CommandFormats.hh b/src/CommandFormats.hh index e9360960..62f74002 100644 --- a/src/CommandFormats.hh +++ b/src/CommandFormats.hh @@ -347,10 +347,10 @@ template struct S_UpdateClientConfig { le_uint32_t player_tag; le_uint32_t guild_card_number; - // The ClientConfig structure (defined in Client.hh) describes how newserv - // uses this command; other servers do not use the same format for the - // following 0x20 bytes (or may not use it at all). The cfg field is opaque to - // the client; it will send back the contents verbatim in its next 9E command. + // The ClientConfig structure describes how newserv uses this command; other + // servers do not use the same format for the following 0x20 or 0x28 bytes (or + // may not use it at all). The cfg field is opaque to the client; it will send + // back the contents verbatim in its next 9E command. ClientConfigT cfg; }; @@ -366,7 +366,7 @@ struct S_UpdateClientConfig_BB_04 : S_UpdateClientConfig { }; // struct to make parsing easier. struct C_Chat_06 { - uint64_t unused; + parray unused; union { char dcgc[0]; char16_t pcbb[0]; @@ -385,8 +385,8 @@ struct S_MenuEntry { le_uint16_t flags; // should be 0x0F04 ptext text; }; -struct S_MenuEntry_PC_BB_07 : S_MenuEntry { }; -struct S_MenuEntry_DC_GC_07 : S_MenuEntry { }; +struct S_MenuEntry_PC_BB_07_1F : S_MenuEntry { }; +struct S_MenuEntry_DC_GC_07_1F : S_MenuEntry { }; // 08 (C->S): Request game list // No arguments @@ -458,27 +458,21 @@ struct C_MenuSelection_10_Flag00 { }; template -struct C_MenuSelection_10_Flag01 { - le_uint32_t menu_id; - le_uint32_t item_id; +struct C_MenuSelection_10_Flag01 : C_MenuSelection_10_Flag00 { ptext unknown_a1; }; struct C_MenuSelection_DC_GC_10_Flag01 : C_MenuSelection_10_Flag01 { }; struct C_MenuSelection_PC_BB_10_Flag01 : C_MenuSelection_10_Flag01 { }; template -struct C_MenuSelection_10_Flag02 { - le_uint32_t menu_id; - le_uint32_t item_id; +struct C_MenuSelection_10_Flag02 : C_MenuSelection_10_Flag00 { ptext password; }; struct C_MenuSelection_DC_GC_10_Flag02 : C_MenuSelection_10_Flag02 { }; struct C_MenuSelection_PC_BB_10_Flag02 : C_MenuSelection_10_Flag02 { }; template -struct C_MenuSelection_10_Flag03 { - le_uint32_t menu_id; - le_uint32_t item_id; +struct C_MenuSelection_10_Flag03 : C_MenuSelection_10_Flag00 { ptext unknown_a1; ptext password; }; diff --git a/src/SendCommands.cc b/src/SendCommands.cc index 0298e954..e8544454 100644 --- a/src/SendCommands.cc +++ b/src/SendCommands.cc @@ -739,9 +739,9 @@ void send_menu(shared_ptr c, const u16string& menu_name, uint32_t menu_id, const vector& items, bool is_info_menu) { if (c->version == GameVersion::PC || c->version == GameVersion::PATCH || c->version == GameVersion::BB) { - send_menu_t(c, menu_name, menu_id, items, is_info_menu); + send_menu_t(c, menu_name, menu_id, items, is_info_menu); } else { - send_menu_t(c, menu_name, menu_id, items, is_info_menu); + send_menu_t(c, menu_name, menu_id, items, is_info_menu); } }