fix PC NTE menu item flags

This commit is contained in:
Martin Michelsen
2023-12-17 23:49:20 -08:00
parent e8431225d0
commit 58fa32b95b
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -98,7 +98,7 @@ struct MenuItem {
enum Flag { enum Flag {
// For menu items to be visible on DC NTE, they must not have either of the // For menu items to be visible on DC NTE, they must not have either of the
// following two flags. (The INVISIBLE_ON_GC_NTE flag behaves similarly.) // following two flags. (The INVISIBLE_ON_GC_NTE flag behaves similarly.)
INVISIBLE_ON_DC_NTE = 0x001, INVISIBLE_ON_DC_PROTOS = 0x001,
INVISIBLE_ON_DC = 0x002, INVISIBLE_ON_DC = 0x002,
INVISIBLE_ON_PC_NTE = 0x004, INVISIBLE_ON_PC_NTE = 0x004,
INVISIBLE_ON_PC = 0x008, INVISIBLE_ON_PC = 0x008,
+4 -4
View File
@@ -220,13 +220,13 @@ static void send_main_menu(shared_ptr<Client> c) {
}, },
0); 0);
main_menu->items.emplace_back(MainMenuItemID::INFORMATION, "Information", main_menu->items.emplace_back(MainMenuItemID::INFORMATION, "Information",
"View server\ninformation", MenuItem::Flag::INVISIBLE_ON_DC_NTE | MenuItem::Flag::REQUIRES_MESSAGE_BOXES); "View server\ninformation", MenuItem::Flag::INVISIBLE_ON_DC_PROTOS | MenuItem::Flag::REQUIRES_MESSAGE_BOXES);
uint32_t proxy_destinations_menu_item_flags = uint32_t proxy_destinations_menu_item_flags =
// DC NTE and the 11/2000 prototype don't support multiple ship select // DC NTE and the 11/2000 prototype don't support multiple ship select
// menus without changing servers via a 19 command apparently (the client // menus without changing servers via a 19 command apparently (the client
// sends nothing when the player makes a choice in the second menu) // sends nothing when the player makes a choice in the second menu)
MenuItem::Flag::INVISIBLE_ON_DC_NTE | MenuItem::Flag::INVISIBLE_ON_DC_PROTOS | MenuItem::Flag::INVISIBLE_ON_PC_NTE |
(s->proxy_destinations_dc.empty() ? MenuItem::Flag::INVISIBLE_ON_DC : 0) | (s->proxy_destinations_dc.empty() ? MenuItem::Flag::INVISIBLE_ON_DC : 0) |
(s->proxy_destinations_pc.empty() ? MenuItem::Flag::INVISIBLE_ON_PC : 0) | (s->proxy_destinations_pc.empty() ? MenuItem::Flag::INVISIBLE_ON_PC : 0) |
(s->proxy_destinations_gc.empty() ? MenuItem::Flag::INVISIBLE_ON_GC : 0) | (s->proxy_destinations_gc.empty() ? MenuItem::Flag::INVISIBLE_ON_GC : 0) |
@@ -236,7 +236,7 @@ static void send_main_menu(shared_ptr<Client> c) {
"Connect to another\nserver through the\nproxy", proxy_destinations_menu_item_flags); "Connect to another\nserver through the\nproxy", proxy_destinations_menu_item_flags);
main_menu->items.emplace_back(MainMenuItemID::DOWNLOAD_QUESTS, "Download quests", main_menu->items.emplace_back(MainMenuItemID::DOWNLOAD_QUESTS, "Download quests",
"Download quests", MenuItem::Flag::INVISIBLE_ON_DC_NTE | MenuItem::Flag::INVISIBLE_ON_PC_NTE | MenuItem::Flag::INVISIBLE_ON_BB); "Download quests", MenuItem::Flag::INVISIBLE_ON_DC_PROTOS | MenuItem::Flag::INVISIBLE_ON_PC_NTE | MenuItem::Flag::INVISIBLE_ON_BB);
if (!s->is_replay) { if (!s->is_replay) {
if (!s->function_code_index->patch_menu_empty(c->config.specific_version)) { if (!s->function_code_index->patch_menu_empty(c->config.specific_version)) {
main_menu->items.emplace_back(MainMenuItemID::PATCHES, "Patches", main_menu->items.emplace_back(MainMenuItemID::PATCHES, "Patches",
@@ -251,7 +251,7 @@ static void send_main_menu(shared_ptr<Client> c) {
"Disconnect", 0); "Disconnect", 0);
main_menu->items.emplace_back(MainMenuItemID::CLEAR_LICENSE, "Clear license", main_menu->items.emplace_back(MainMenuItemID::CLEAR_LICENSE, "Clear license",
"Disconnect with an\ninvalid license error\nso you can enter a\ndifferent serial\nnumber, access key,\nor password", "Disconnect with an\ninvalid license error\nso you can enter a\ndifferent serial\nnumber, access key,\nor password",
MenuItem::Flag::INVISIBLE_ON_DC_NTE | MenuItem::Flag::INVISIBLE_ON_PC_NTE | MenuItem::Flag::INVISIBLE_ON_XB | MenuItem::Flag::INVISIBLE_ON_BB); MenuItem::Flag::INVISIBLE_ON_DC_PROTOS | MenuItem::Flag::INVISIBLE_ON_PC_NTE | MenuItem::Flag::INVISIBLE_ON_XB | MenuItem::Flag::INVISIBLE_ON_BB);
send_menu(c, main_menu); send_menu(c, main_menu);
} }
+1 -1
View File
@@ -1267,7 +1267,7 @@ void send_menu_t(shared_ptr<Client> c, shared_ptr<const Menu> menu, bool is_info
switch (c->version()) { switch (c->version()) {
case Version::DC_NTE: case Version::DC_NTE:
case Version::DC_V1_11_2000_PROTOTYPE: case Version::DC_V1_11_2000_PROTOTYPE:
is_visible &= !(item.flags & MenuItem::Flag::INVISIBLE_ON_DC_NTE); is_visible &= !(item.flags & MenuItem::Flag::INVISIBLE_ON_DC_PROTOS);
[[fallthrough]]; [[fallthrough]];
case Version::DC_V1: case Version::DC_V1:
case Version::DC_V2: case Version::DC_V2: