From ae6a55f07554860fb4050ef21df16af7579cd12e Mon Sep 17 00:00:00 2001 From: dankan1890 Date: Sat, 13 Feb 2016 02:42:38 +0100 Subject: [PATCH] Grouped display of DAT file information in a single view. (WIP) nw --- src/emu/inpttype.h | 6 +- src/emu/ioport.h | 6 +- src/emu/ui/datfile.cpp | 27 +- src/emu/ui/datfile.h | 13 + src/emu/ui/datmenu.cpp | 621 ++++++++++++---------------------------- src/emu/ui/datmenu.h | 77 ++--- src/emu/ui/mainmenu.cpp | 69 +---- src/emu/ui/mainmenu.h | 9 +- src/emu/ui/menu.cpp | 271 +++++++++++++----- src/emu/ui/menu.h | 13 +- src/emu/ui/selgame.cpp | 88 +----- src/emu/ui/selsoft.cpp | 11 +- src/emu/ui/toolbar.h | 69 ----- src/emu/ui/utils.h | 4 +- 14 files changed, 459 insertions(+), 825 deletions(-) diff --git a/src/emu/inpttype.h b/src/emu/inpttype.h index 504a9e4aa8d..96395a60e7c 100644 --- a/src/emu/inpttype.h +++ b/src/emu/inpttype.h @@ -755,12 +755,8 @@ void construct_core_types_UI(simple_list &typelist) INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_LOAD_STATE, "Load State", input_seq(KEYCODE_F7, input_seq::not_code, KEYCODE_LSHIFT) ) INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_TAPE_START, "UI (First) Tape Start", input_seq(KEYCODE_F2, input_seq::not_code, KEYCODE_LSHIFT) ) INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_TAPE_STOP, "UI (First) Tape Stop", input_seq(KEYCODE_F2, KEYCODE_LSHIFT) ) - INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_HISTORY, "UI Show History", input_seq(KEYCODE_LALT, KEYCODE_H) ) - INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_MAMEINFO, "UI Show Mame/Messinfo", input_seq(KEYCODE_LALT, KEYCODE_M) ) - INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_COMMAND, "UI Show Command Info", input_seq(KEYCODE_LALT, KEYCODE_C) ) - INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_SYSINFO, "UI Show Sysinfo", input_seq(KEYCODE_LALT, KEYCODE_S) ) + INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_DATS, "UI External DAT View", input_seq(KEYCODE_LALT, KEYCODE_D) ) INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_FAVORITES, "UI Add/Remove favorites",input_seq(KEYCODE_LALT, KEYCODE_F) ) - INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_STORY, "UI Show Story.dat", input_seq(KEYCODE_LALT, KEYCODE_T) ) INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_UP_FILTER, NULL, input_seq() ) INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_DOWN_FILTER, NULL, input_seq() ) INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_LEFT_PANEL, NULL, input_seq() ) diff --git a/src/emu/ioport.h b/src/emu/ioport.h index 6048f52e9c0..d398a8df2c1 100644 --- a/src/emu/ioport.h +++ b/src/emu/ioport.h @@ -371,12 +371,8 @@ enum ioport_type IPT_UI_LOAD_STATE, IPT_UI_TAPE_START, IPT_UI_TAPE_STOP, - IPT_UI_HISTORY, - IPT_UI_MAMEINFO, - IPT_UI_COMMAND, - IPT_UI_SYSINFO, + IPT_UI_DATS, IPT_UI_FAVORITES, - IPT_UI_STORY, IPT_UI_UP_FILTER, IPT_UI_DOWN_FILTER, IPT_UI_LEFT_PANEL, diff --git a/src/emu/ui/datfile.cpp b/src/emu/ui/datfile.cpp index 5e8af15b335..9171242d072 100644 --- a/src/emu/ui/datfile.cpp +++ b/src/emu/ui/datfile.cpp @@ -165,6 +165,21 @@ void datfile_manager::init_command() osd_printf_verbose("Command.dat games found = %i\n", count); } +bool datfile_manager::has_software(std::string &softlist, std::string &softname, std::string &parentname) +{ + // Find software in software list index + if (m_swindex.find(softlist) == m_swindex.end()) + return false; + + m_itemsiter = m_swindex[softlist].find(softname); + if (m_itemsiter == m_swindex[softlist].end() && !parentname.empty()) + m_itemsiter = m_swindex[softlist].find(parentname); + + if (m_itemsiter == m_swindex[softlist].end()) + return false; + + return true; +} //------------------------------------------------- // load software info //------------------------------------------------- @@ -174,18 +189,10 @@ void datfile_manager::load_software_info(std::string &softlist, std::string &buf if (!m_swindex.empty() && parseopen("history.dat")) { // Find software in software list index - if (m_swindex.find(softlist) == m_swindex.end()) + if (!has_software(softlist, softname, parentname)) return; - drvindex::iterator itemsiter; - itemsiter = m_swindex[softlist].find(softname); - if (itemsiter == m_swindex[softlist].end() && !parentname.empty()) - itemsiter = m_swindex[softlist].find(parentname); - - if (itemsiter == m_swindex[softlist].end()) - return; - - long s_offset = (*itemsiter).second; + long s_offset = (*m_itemsiter).second; char rbuf[64 * 1024]; fseek(fp, s_offset, SEEK_SET); std::string readbuf; diff --git a/src/emu/ui/datfile.h b/src/emu/ui/datfile.h index 959419eb0f7..8002a26daf4 100644 --- a/src/emu/ui/datfile.h +++ b/src/emu/ui/datfile.h @@ -31,13 +31,25 @@ public: void load_software_info(std::string &softlist, std::string &buffer, std::string &softname, std::string &parentname); void command_sub_menu(const game_driver *drv, std::vector &menuitems); void reset_run() { first_run = true; } + bool has_software(std::string &softlist, std::string &softname, std::string &parentname); std::string rev_history() const { return m_history_rev; } std::string rev_mameinfo() const { return m_mame_rev; } std::string rev_messinfo() const { return m_mess_rev; } std::string rev_sysinfo() const { return m_sysinfo_rev; } std::string rev_storyinfo() const { return m_story_rev; } + + bool has_history(const game_driver *driver) { return (m_histidx.find(driver) != m_histidx.end()); } + bool has_mameinfo(const game_driver *driver) { return (m_mameidx.find(driver) != m_mameidx.end()); } + bool has_messinfo(const game_driver *driver) { return (m_messidx.find(driver) != m_messidx.end()); } + bool has_command(const game_driver *driver) { return (m_cmdidx.find(driver) != m_cmdidx.end()); } + bool has_sysinfo(const game_driver *driver) { return (m_sysidx.find(driver) != m_sysidx.end()); } + bool has_story(const game_driver *driver) { return (m_storyidx.find(driver) != m_storyidx.end()); } + bool has_data(const game_driver *d) + { + return (has_history(d) || has_mameinfo(d) || has_messinfo(d) || has_command(d) || has_sysinfo(d) || has_story(d)); + } private: using drvindex = std::unordered_map; using dataindex = std::unordered_map; @@ -63,6 +75,7 @@ private: int index_mame_mess_info(dataindex &index, drvindex &index_drv, int &drvcount); int index_datafile(dataindex &index, int &swcount); void index_menuidx(const game_driver *drv, dataindex &idx, drvindex &index); + drvindex::iterator m_itemsiter; void load_data_text(const game_driver *drv, std::string &buffer, dataindex &idx, std::string &tag); void load_driver_text(const game_driver *drv, std::string &buffer, drvindex &idx, std::string &tag); diff --git a/src/emu/ui/datmenu.cpp b/src/emu/ui/datmenu.cpp index 72ab7509ae0..5e2d574edc0 100644 --- a/src/emu/ui/datmenu.cpp +++ b/src/emu/ui/datmenu.cpp @@ -18,236 +18,11 @@ #include "ui/utils.h" #include "softlist.h" -/************************************************** - MENU COMMAND -**************************************************/ //------------------------------------------------- // ctor / dtor //------------------------------------------------- -ui_menu_command::ui_menu_command(running_machine &machine, render_container *container, const game_driver *driver) : ui_menu(machine, container) -{ - m_driver = (driver == nullptr) ? &machine.system() : driver; -} - -ui_menu_command::~ui_menu_command() -{ -} - -//------------------------------------------------- -// populate -//------------------------------------------------- - -void ui_menu_command::populate() -{ - std::vector text; - machine().datfile().command_sub_menu(m_driver, text); - - if (!text.empty()) - { - for (size_t menu_items = 0; menu_items < text.size(); menu_items++) - item_append(text[menu_items].c_str(), nullptr, 0, (void *)(FPTR)menu_items); - } - else - item_append("No available Command for this machine.", nullptr, MENU_FLAG_DISABLE, nullptr); - - item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); - customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER; - -} - -//------------------------------------------------- -// handle -//------------------------------------------------- - -void ui_menu_command::handle() -{ - // process the menu - const ui_menu_event *m_event = process(0); - - if (m_event != nullptr && m_event->iptkey == IPT_UI_SELECT) - { - std::string m_title(item[selected].text); - ui_menu::stack_push(global_alloc_clear(machine(), container, m_title, m_driver)); - } -} - -//------------------------------------------------- -// perform our special rendering -//------------------------------------------------- - -void ui_menu_command::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2) -{ - float width; - ui_manager &mui = machine().ui(); - std::string tempbuf = std::string("Command Info - Game: ").append(m_driver->description); - - // get the size of the text - mui.draw_text_full(container, tempbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, - DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); - width += (2.0f * UI_BOX_LR_BORDER) + 0.01f; - float maxwidth = MAX(width, origx2 - origx1); - - // compute our bounds - float x1 = 0.5f - 0.5f * maxwidth; - float x2 = x1 + maxwidth; - float y1 = origy1 - top; - float y2 = origy1 - UI_BOX_TB_BORDER; - - // draw a box - mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR); - - // take off the borders - x1 += UI_BOX_LR_BORDER; - x2 -= UI_BOX_LR_BORDER; - y1 += UI_BOX_TB_BORDER; - - // draw the text within it - mui.draw_text_full(container, tempbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, - DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); - -} - -//------------------------------------------------- -// ctor / dtor -//------------------------------------------------- - -ui_menu_command_content::ui_menu_command_content(running_machine &machine, render_container *container, std::string p_title, const game_driver *driver) : ui_menu(machine, container) -{ - m_driver = (driver == nullptr) ? &machine.system() : driver; - m_title = p_title; -} - -ui_menu_command_content::~ui_menu_command_content() -{ -} - -//------------------------------------------------- -// handle -//------------------------------------------------- - -void ui_menu_command_content::handle() -{ - // process the menu - process(0); -} - -//------------------------------------------------- -// populate -//------------------------------------------------- - -void ui_menu_command_content::populate() -{ - machine().pause(); - std::string buffer; - machine().datfile().load_command_info(buffer, m_title); - float line_height = machine().ui().get_line_height(); - - if (!buffer.empty()) - { - float gutter_width = 0.52f * line_height * machine().render().ui_aspect(); - std::vector xstart; - std::vector xend; - convert_command_glyph(buffer); - int total_lines = machine().ui().wrap_text(container, buffer.c_str(), 0.0f, 0.0f, - 1.0f - (2.0f * UI_BOX_LR_BORDER) - 0.02f - (2.0f * gutter_width), xstart, xend); - for (int r = 0; r < total_lines; r++) - { - std::string tempbuf(buffer.substr(xstart[r], xend[r] - xstart[r])); - int first_dspace = tempbuf.find(" "); - if (first_dspace > 0 ) - { - std::string first_part(tempbuf.substr(0, first_dspace)); - std::string last_part(tempbuf.substr(first_dspace)); - strtrimspace(last_part); - item_append(first_part.c_str(), last_part.c_str(), MENU_FLAG_UI_HISTORY, nullptr); - } - else - item_append(tempbuf.c_str(), nullptr, MENU_FLAG_UI_HISTORY, nullptr); - } - item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); - } - - machine().resume(); - customtop = custombottom = line_height + 3.0f * UI_BOX_TB_BORDER; -} - -//------------------------------------------------- -// perform our special rendering -//------------------------------------------------- - -void ui_menu_command_content::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2) -{ - float width; - ui_manager &mui = machine().ui(); - - // get the size of the text - mui.draw_text_full(container, m_title.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, - DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); - width += (2.0f * UI_BOX_LR_BORDER) + 0.01f; - float maxwidth = MAX(width, origx2 - origx1); - - // compute our bounds - float x1 = 0.5f - 0.5f * maxwidth; - float x2 = x1 + maxwidth; - float y1 = origy1 - top; - float y2 = origy1 - UI_BOX_TB_BORDER; - - // draw a box - mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR); - - // take off the borders - x1 += UI_BOX_LR_BORDER; - x2 -= UI_BOX_LR_BORDER; - y1 += UI_BOX_TB_BORDER; - - // draw the text within it - mui.draw_text_full(container, m_title.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, - DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); - - std::string tempbuf = std::string("Command Info - Game: ").append(m_driver->description); - - mui.draw_text_full(container, tempbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, - DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); - width += 2 * UI_BOX_LR_BORDER; - maxwidth = MAX(origx2 - origx1, width); - - // compute our bounds - x1 = 0.5f - 0.5f * maxwidth; - x2 = x1 + maxwidth; - y1 = origy2 + UI_BOX_TB_BORDER; - y2 = origy2 + bottom; - - // draw a box - mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR); - - // take off the borders - x1 += UI_BOX_LR_BORDER; - x2 -= UI_BOX_LR_BORDER; - y1 += UI_BOX_TB_BORDER; - - // draw the text within it - mui.draw_text_full(container, tempbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, - DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); -} - -/************************************************** - MENU SOFTWARE HISTORY -**************************************************/ -//------------------------------------------------- -// ctor / dtor -//------------------------------------------------- - -ui_menu_history_sw::ui_menu_history_sw(running_machine &machine, render_container *container, ui_software_info *swinfo, const game_driver *driver) : ui_menu(machine, container) -{ - m_list = swinfo->listname; - m_short = swinfo->shortname; - m_long = swinfo->longname; - m_parent = swinfo->parentname; - m_driver = (driver == nullptr) ? &machine.system() : driver; -} - -ui_menu_history_sw::ui_menu_history_sw(running_machine &machine, render_container *container, const game_driver *driver) : ui_menu(machine, container) +ui_menu_dats_view::ui_menu_dats_view(running_machine &machine, render_container *container, const game_driver *driver) : ui_menu(machine, container) { image_interface_iterator iter(machine.root_device()); for (device_image_interface *image = iter.first(); image != nullptr; image = iter.next()) @@ -261,9 +36,36 @@ ui_menu_history_sw::ui_menu_history_sw(running_machine &machine, render_containe } } m_driver = (driver == nullptr) ? &machine.system() : driver; + + init_items(); } -ui_menu_history_sw::~ui_menu_history_sw() +//------------------------------------------------- +// ctor +//------------------------------------------------- + +ui_menu_dats_view::ui_menu_dats_view(running_machine &machine, render_container *container, ui_software_info *swinfo, const game_driver *driver) : ui_menu(machine, container) +{ + m_list = swinfo->listname; + m_short = swinfo->shortname; + m_long = swinfo->longname; + m_parent = swinfo->parentname; + m_driver = (driver == nullptr) ? &machine.system() : driver; + m_swinfo = swinfo; + + issoft = true; + + if (machine.datfile().has_software(m_list, m_short, m_parent)) + m_items_list.emplace_back("Software History", UI_HISTORY_LOAD, machine.datfile().rev_history()); + if (swinfo && !swinfo->usage.empty()) + m_items_list.emplace_back("Software Usage", 0, ""); +} + +//------------------------------------------------- +// dtor +//------------------------------------------------- + +ui_menu_dats_view::~ui_menu_dats_view() { } @@ -271,223 +73,69 @@ ui_menu_history_sw::~ui_menu_history_sw() // handle //------------------------------------------------- -void ui_menu_history_sw::handle() +void ui_menu_dats_view::handle() { - // process the menu - process(0); + const ui_menu_event *m_event = process(MENU_FLAG_UI_DATS); + if (m_event != nullptr) + { + if (m_event->iptkey == IPT_UI_LEFT && actual > 0) + { + actual--; + reset(UI_MENU_RESET_SELECT_FIRST); + } + + if (m_event->iptkey == IPT_UI_RIGHT && actual < m_items_list.size() - 1) + { + actual++; + reset(UI_MENU_RESET_SELECT_FIRST); + } + } } //------------------------------------------------- // populate //------------------------------------------------- -void ui_menu_history_sw::populate() +void ui_menu_dats_view::populate() { machine().pause(); - std::string buffer; - machine().datfile().load_software_info(m_list, buffer, m_short, m_parent); - float line_height = machine().ui().get_line_height(); - - if (!buffer.empty()) - { - float gutter_width = 0.52f * line_height * machine().render().ui_aspect(); - std::vector xstart; - std::vector xend; - int total_lines = machine().ui().wrap_text(container, buffer.c_str(), 0.0f, 0.0f, 1.0f - (2.0f * UI_BOX_LR_BORDER) - 0.02f - (2.0f * gutter_width), - xstart, xend); - - for (int r = 0; r < total_lines; r++) - { - std::string tempbuf(buffer.substr(xstart[r], xend[r] - xstart[r])); - item_append(tempbuf.c_str(), nullptr, MENU_FLAG_UI_HISTORY, nullptr); - } - } + if (!issoft) + get_data(); else - item_append("No available History for this software.", nullptr, MENU_FLAG_DISABLE, nullptr); + get_data_sw(); + item_append(MENU_SEPARATOR_ITEM, nullptr, (MENU_FLAG_UI_DATS | MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW), nullptr); + customtop = 2.0f * machine().ui().get_line_height() + 4.0f * UI_BOX_TB_BORDER; + custombottom = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER; machine().resume(); - - item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); - customtop = custombottom = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER; } //------------------------------------------------- // perform our special rendering //------------------------------------------------- -void ui_menu_history_sw::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2) +void ui_menu_dats_view::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2) { - float width; - std::string tempbuf = std::string("Software info - ").append(m_long); ui_manager &mui = machine().ui(); + float maxwidth = origx2 - origx1; + float width; + std::string driver; - // get the size of the text - mui.draw_text_full(container, tempbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, - DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); - width += (2.0f * UI_BOX_LR_BORDER) + 0.01f; - float maxwidth = MAX(width, origx2 - origx1); + if (issoft) + driver = m_swinfo->longname; + else + driver = m_driver->description; - // compute our bounds - float x1 = 0.5f - 0.5f * maxwidth; - float x2 = x1 + maxwidth; - float y1 = origy1 - top; - float y2 = origy1 - UI_BOX_TB_BORDER; - - // draw a box - mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR); - - // take off the borders - x1 += UI_BOX_LR_BORDER; - x2 -= UI_BOX_LR_BORDER; - y1 += UI_BOX_TB_BORDER; - - // draw the text within it - mui.draw_text_full(container, tempbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, - DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); - - tempbuf.assign("System driver: ").append(m_driver->description); - - mui.draw_text_full(container, tempbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, - DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + mui.draw_text_full(container, driver.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); width += 2 * UI_BOX_LR_BORDER; maxwidth = MAX(origx2 - origx1, width); - // compute our bounds - x1 = 0.5f - 0.5f * maxwidth; - x2 = x1 + maxwidth; - y1 = origy2 + UI_BOX_TB_BORDER; - y2 = origy2 + bottom; - - // draw a box - mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR); - - // take off the borders - x1 += UI_BOX_LR_BORDER; - x2 -= UI_BOX_LR_BORDER; - y1 += UI_BOX_TB_BORDER; - - // draw the text within it - mui.draw_text_full(container, tempbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, - DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); -} - -/************************************************** - MENU DATS -**************************************************/ -//------------------------------------------------- -// ctor / dtor -//------------------------------------------------- - -ui_menu_dats::ui_menu_dats(running_machine &machine, render_container *container, int _flags, const game_driver *driver) : ui_menu(machine, container) -{ - m_driver = (driver == nullptr) ? &machine.system() : driver; - m_flags = _flags; -} - -ui_menu_dats::~ui_menu_dats() -{ -} - -//------------------------------------------------- -// handle -//------------------------------------------------- - -void ui_menu_dats::handle() -{ - // process the menu - process(0); -} - -//------------------------------------------------- -// populate -//------------------------------------------------- - -void ui_menu_dats::populate() -{ - machine().pause(); - switch (m_flags) - { - case UI_HISTORY_LOAD: - if (!get_data(m_driver, m_flags)) - item_append("No available History for this machine.", nullptr, MENU_FLAG_DISABLE, nullptr); - break; - - case UI_MAMEINFO_LOAD: - if (!get_data(m_driver, m_flags)) - item_append("No available MameInfo for this machine.", nullptr, MENU_FLAG_DISABLE, nullptr); - break; - - case UI_MESSINFO_LOAD: - if (!get_data(m_driver, m_flags)) - item_append("No available MessInfo for this machine.", nullptr, MENU_FLAG_DISABLE, nullptr); - break; - - case UI_STORY_LOAD: - if (!get_data(m_driver, UI_STORY_LOAD)) - item_append("No available Mamescore for this machine.", nullptr, MENU_FLAG_DISABLE, nullptr); - break; - - case UI_SYSINFO_LOAD: - if (!get_data(m_driver, UI_SYSINFO_LOAD)) - item_append("No available Sysinfo for this machine.", nullptr, MENU_FLAG_DISABLE, nullptr); - break; - } - - machine().resume(); - item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); - customtop = custombottom = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER; -} - -//------------------------------------------------- -// perform our special rendering -//------------------------------------------------- - -void ui_menu_dats::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2) -{ - float width; - std::string tempbuf, revision; - datfile_manager &datfile = machine().datfile(); - ui_manager &mui = machine().ui(); - - switch (m_flags) - { - case UI_HISTORY_LOAD: - tempbuf.assign("History - Game / System: ").append(m_driver->description); - revision.assign("History.dat Revision: ").append(datfile.rev_history()); - break; - - case UI_MESSINFO_LOAD: - tempbuf.assign("MessInfo - System: ").append(m_driver->description); - revision.assign("Messinfo.dat Revision: ").append(datfile.rev_messinfo()); - break; - - case UI_MAMEINFO_LOAD: - tempbuf.assign("MameInfo - Game: ").append(m_driver->description); - revision.assign("Mameinfo.dat Revision: ").append(datfile.rev_mameinfo()); - break; - - case UI_SYSINFO_LOAD: - tempbuf.assign("Sysinfo - System: ").append(m_driver->description); - revision.assign("Sysinfo.dat Revision: ").append(datfile.rev_sysinfo()); - break; - - case UI_STORY_LOAD: - tempbuf.assign("MAMESCORE - Game: ").append(m_driver->description); - revision.assign("Story.dat Revision: ").append(machine().datfile().rev_storyinfo()); - break; - } - - // get the size of the text - mui.draw_text_full(container, tempbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, - DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); - width += (2.0f * UI_BOX_LR_BORDER) + 0.01f; - float maxwidth = MAX(width, origx2 - origx1); - // compute our bounds float x1 = 0.5f - 0.5f * maxwidth; float x2 = x1 + maxwidth; float y1 = origy1 - top; - float y2 = origy1 - UI_BOX_TB_BORDER; + float y2 = origy1 - 2.0f * UI_BOX_TB_BORDER - mui.get_line_height(); // draw a box mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR); @@ -497,10 +145,58 @@ void ui_menu_dats::custom_render(void *selectedref, float top, float bottom, flo x2 -= UI_BOX_LR_BORDER; y1 += UI_BOX_TB_BORDER; - // draw the text within it - mui.draw_text_full(container, tempbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, - DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + mui.draw_text_full(container, driver.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + + // take off the borders + x1 -= UI_BOX_LR_BORDER; + x2 += UI_BOX_LR_BORDER; + y1 -= UI_BOX_TB_BORDER; + + maxwidth = 0; + for (auto & elem : m_items_list) + { + mui.draw_text_full(container, elem.label.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + maxwidth += width; + } + + float space = (1.0f - maxwidth) / (m_items_list.size() * 2); + + // compute our bounds + y1 = y2 + UI_BOX_TB_BORDER; + y2 += mui.get_line_height() + 2.0f * UI_BOX_TB_BORDER; + + // draw a box + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR); + + // take off the borders + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + + // draw the text within it + int x = 0; + for (auto & elem : m_items_list) + { + x1 += space; + rgb_t fcolor = (actual == x) ? rgb_t(0xff, 0xff, 0xff, 0x00) : UI_TEXT_COLOR; + rgb_t bcolor = (actual == x) ? rgb_t(0xff, 0xff, 0xff, 0xff) : UI_TEXT_BG_COLOR; + mui.draw_text_full(container, elem.label.c_str(), x1, y1, 1.0f, JUSTIFY_LEFT, WRAP_NEVER, + DRAW_NONE, fcolor, bcolor, &width, nullptr); + if (bcolor != UI_TEXT_BG_COLOR) + mui.draw_textured_box(container, x1 - (space / 2), y1, x1 + width + (space / 2), y2, bcolor, rgb_t(255, 43, 43, 43), + hilight_main_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE)); + + mui.draw_text_full(container, elem.label.c_str(), x1, y1, 1.0f, JUSTIFY_LEFT, WRAP_NEVER, + DRAW_NORMAL, fcolor, bcolor, &width, nullptr); + x1 += width + space; + ++x; + } + + // bottom + std::string revision; + revision.assign("Revision: ").append(m_items_list[actual].revision); mui.draw_text_full(container, revision.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); width += 2 * UI_BOX_LR_BORDER; @@ -529,36 +225,79 @@ void ui_menu_dats::custom_render(void *selectedref, float top, float bottom, flo // load data from DATs //------------------------------------------------- -bool ui_menu_dats::get_data(const game_driver *driver, int flags) +void ui_menu_dats_view::get_data() { - std::string buffer; - machine().datfile().load_data_info(driver, buffer, flags); - - if (buffer.empty()) - return false; - - float line_height = machine().ui().get_line_height(); - float gutter_width = 0.52f * line_height * machine().render().ui_aspect(); std::vector xstart; std::vector xend; - int tlines = machine().ui().wrap_text(container, buffer.c_str(), 0.0f, 0.0f, 1.0f - (2.0f * UI_BOX_LR_BORDER) - 0.02f - (2.0f * gutter_width), xstart, xend); - for (int r = 0; r < tlines; r++) + std::string buffer; + std::vector m_item; + if (m_items_list[actual].option == UI_COMMAND_LOAD) { - std::string tempbuf(buffer.substr(xstart[r], xend[r] - xstart[r])); - // special case for mamescore - if (flags == UI_STORY_LOAD) + machine().datfile().command_sub_menu(m_driver, m_item); + if (!m_item.empty()) { - size_t last_underscore = tempbuf.find_last_of('_'); - if (last_underscore != std::string::npos) + for (size_t x = 0; x < m_item.size(); ++x) { - std::string last_part(tempbuf.substr(last_underscore + 1)); - int primary = tempbuf.find("___"); - std::string first_part(tempbuf.substr(0, primary)); - item_append(first_part.c_str(), last_part.c_str(), MENU_FLAG_UI_HISTORY, nullptr); + std::string t_buffer; + buffer.append(m_item[x]).append("\n"); + machine().datfile().load_command_info(t_buffer, m_item[x]); + if (!t_buffer.empty()) + buffer.append(t_buffer).append("\n"); } + convert_command_glyph(buffer); } - else - item_append(tempbuf.c_str(), nullptr, MENU_FLAG_UI_HISTORY, nullptr); } - return true; + else + machine().datfile().load_data_info(m_driver, buffer, m_items_list[actual].option); + + int totallines = machine().ui().wrap_text(container, buffer.c_str(), 0.0f, 0.0f, 1.0f - (4.0f * UI_BOX_LR_BORDER), xstart, xend); + for (int x = 0; x < totallines; ++x) + { + std::string tempbuf(buffer.substr(xstart[x], xend[x] - xstart[x])); + item_append(tempbuf.c_str(), nullptr, (MENU_FLAG_UI_DATS | MENU_FLAG_DISABLE), (void *)(FPTR)(x + 1)); + + } } + +void ui_menu_dats_view::get_data_sw() +{ + std::vector xstart; + std::vector xend; + std::string buffer; + std::vector m_item; + if (m_items_list[actual].option == 0) + buffer = m_swinfo->usage; + else + { + if (m_swinfo->startempty == 1) + machine().datfile().load_data_info(m_swinfo->driver, buffer, UI_HISTORY_LOAD); + else + machine().datfile().load_software_info(m_swinfo->listname, buffer, m_swinfo->shortname, m_swinfo->parentname); + } + + int totallines = machine().ui().wrap_text(container, buffer.c_str(), 0.0f, 0.0f, 1.0f - (4.0f * UI_BOX_LR_BORDER), xstart, xend); + for (int x = 0; x < totallines; ++x) + { + std::string tempbuf(buffer.substr(xstart[x], xend[x] - xstart[x])); + item_append(tempbuf.c_str(), nullptr, (MENU_FLAG_UI_DATS | MENU_FLAG_DISABLE), (void *)(FPTR)(x + 1)); + + } +} + +void ui_menu_dats_view::init_items() +{ + datfile_manager &datfile = machine().datfile(); + if (datfile.has_history(m_driver)) + m_items_list.emplace_back("History", UI_HISTORY_LOAD, datfile.rev_history()); + if (datfile.has_mameinfo(m_driver)) + m_items_list.emplace_back("Mameinfo", UI_MAMEINFO_LOAD, datfile.rev_mameinfo()); + if (datfile.has_messinfo(m_driver)) + m_items_list.emplace_back("Messinfo", UI_MESSINFO_LOAD, datfile.rev_messinfo()); + if (datfile.has_sysinfo(m_driver)) + m_items_list.emplace_back("Sysinfo", UI_SYSINFO_LOAD, datfile.rev_sysinfo()); + if (datfile.has_story(m_driver)) + m_items_list.emplace_back("Mamescore", UI_STORY_LOAD, datfile.rev_storyinfo()); + if (datfile.has_command(m_driver)) + m_items_list.emplace_back("Command", UI_COMMAND_LOAD, ""); +} + diff --git a/src/emu/ui/datmenu.h b/src/emu/ui/datmenu.h index 652c6492c43..f799e5fa7d0 100644 --- a/src/emu/ui/datmenu.h +++ b/src/emu/ui/datmenu.h @@ -20,74 +20,33 @@ struct ui_software_info; // class dats menu //------------------------------------------------- -class ui_menu_dats : public ui_menu +class ui_menu_dats_view : public ui_menu { public: - ui_menu_dats(running_machine &machine, render_container *container, int _flags, const game_driver *driver = nullptr); - virtual ~ui_menu_dats(); + ui_menu_dats_view(running_machine &machine, render_container *container, ui_software_info *swinfo, const game_driver *driver = nullptr); + ui_menu_dats_view(running_machine &machine, render_container *container, const game_driver *driver = nullptr); + virtual ~ui_menu_dats_view(); virtual void populate() override; virtual void handle() override; virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override; private: + int actual; const game_driver *m_driver; - int m_flags; - - bool get_data(const game_driver *driver, int flags); -}; - -//------------------------------------------------- -// class command data menu -//------------------------------------------------- - -class ui_menu_command : public ui_menu -{ -public: - ui_menu_command(running_machine &machine, render_container *container, const game_driver *driver = nullptr); - virtual ~ui_menu_command(); - virtual void populate() override; - virtual void handle() override; - virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override; - -private: - const game_driver *m_driver; -}; - -//------------------------------------------------- -// class command content data menu -//------------------------------------------------- - -class ui_menu_command_content : public ui_menu -{ -public: - ui_menu_command_content(running_machine &machine, render_container *container, std::string title, const game_driver *driver = nullptr); - virtual ~ui_menu_command_content(); - virtual void populate() override; - virtual void handle() override; - virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override; - -private: - const game_driver *m_driver; - std::string m_title; -}; - -//------------------------------------------------- -// class software history menu -//------------------------------------------------- - -class ui_menu_history_sw : public ui_menu -{ -public: - ui_menu_history_sw(running_machine &machine, render_container *container, ui_software_info *swinfo, const game_driver *driver = nullptr); - ui_menu_history_sw(running_machine &machine, render_container *container, const game_driver *driver = nullptr); - virtual ~ui_menu_history_sw(); - virtual void populate() override; - virtual void handle() override; - virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override; - -private: + ui_software_info *m_swinfo; std::string m_list, m_short, m_long, m_parent; - const game_driver *m_driver; + void get_data(); + void get_data_sw(); + void init_items(); + bool issoft; + struct list_items + { + list_items(std::string l, int i, std::string rev) { label = l; option = i; revision = rev; } + std::string label; + int option; + std::string revision; + }; + std::vector m_items_list; }; #endif /* __UI_DATMENU_H__ */ diff --git a/src/emu/ui/mainmenu.cpp b/src/emu/ui/mainmenu.cpp index 9ea41a3963d..3ea29398fd2 100644 --- a/src/emu/ui/mainmenu.cpp +++ b/src/emu/ui/mainmenu.cpp @@ -136,45 +136,9 @@ void ui_menu_main::populate() if (machine().options().cheat() && machine().cheat().first() != nullptr) item_append("Cheat", nullptr, 0, (void *)CHEAT); - /* add history menu */ - if (machine().ui().options().enabled_dats()) - item_append("History Info", nullptr, 0, (void *)HISTORY); - - // add software history menu - if ((machine().system().flags & MACHINE_TYPE_ARCADE) == 0 && machine().ui().options().enabled_dats()) - { - image_interface_iterator iter(machine().root_device()); - for (device_image_interface *image = iter.first(); image != nullptr; image = iter.next()) - { - const char *name = image->filename(); - if (name != nullptr) - { - item_append("Software History Info", nullptr, 0, (void *)SW_HISTORY); - break; - } - } - } - - /* add mameinfo / messinfo menu */ - if (machine().ui().options().enabled_dats()) - { - if ((machine().system().flags & MACHINE_TYPE_ARCADE) != 0) - item_append("MameInfo", nullptr, 0, (void *)MAMEINFO); - else if ((machine().system().flags & MACHINE_TYPE_ARCADE) == 0) - item_append("MessInfo", nullptr, 0, (void *)MAMEINFO); - } - - /* add sysinfo menu */ - if ((machine().system().flags & MACHINE_TYPE_ARCADE) == 0 && machine().ui().options().enabled_dats()) - item_append("SysInfo", nullptr, 0, (void *)SYSINFO); - - /* add command list menu */ - if ((machine().system().flags & MACHINE_TYPE_ARCADE) != 0 && machine().ui().options().enabled_dats()) - item_append("Commands Info", nullptr, 0, (void *)COMMAND); - - /* add story menu */ - if ((machine().system().flags & MACHINE_TYPE_ARCADE) != 0 && machine().ui().options().enabled_dats()) - item_append("Mamescores", nullptr, 0, (void *)STORYINFO); + // add dats menu + if (machine().ui().options().enabled_dats() && machine().datfile().has_data(&machine().system())) + item_append("External DAT View", nullptr, 0, (void *)EXTERNAL_DATS); item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); @@ -300,27 +264,8 @@ void ui_menu_main::handle() ui_menu::stack_push(global_alloc_clear(machine(), container, nullptr)); break; - case HISTORY: - ui_menu::stack_push(global_alloc_clear(machine(), container, UI_HISTORY_LOAD)); - break; - - case MAMEINFO: - if ((machine().system().flags & MACHINE_TYPE_ARCADE) != 0) - ui_menu::stack_push(global_alloc_clear(machine(), container, UI_MAMEINFO_LOAD)); - else - ui_menu::stack_push(global_alloc_clear(machine(), container, UI_MESSINFO_LOAD)); - break; - - case SYSINFO: - ui_menu::stack_push(global_alloc_clear(machine(), container, UI_SYSINFO_LOAD)); - break; - - case COMMAND: - ui_menu::stack_push(global_alloc_clear(machine(), container)); - break; - - case STORYINFO: - ui_menu::stack_push(global_alloc_clear(machine(), container, UI_STORY_LOAD)); + case EXTERNAL_DATS: + ui_menu::stack_push(global_alloc_clear(machine(), container)); break; case ADD_FAVORITE: @@ -333,10 +278,6 @@ void ui_menu_main::handle() reset(UI_MENU_RESET_REMEMBER_POSITION); break; - case SW_HISTORY: - ui_menu::stack_push(global_alloc_clear(machine(), container)); - break; - case QUIT_GAME: ui_menu::stack_pop(machine()); machine().ui().request_quit(); diff --git a/src/emu/ui/mainmenu.h b/src/emu/ui/mainmenu.h index ca697558dbd..59c937d853f 100644 --- a/src/emu/ui/mainmenu.h +++ b/src/emu/ui/mainmenu.h @@ -46,16 +46,13 @@ private: BIOS_SELECTION, BARCODE_READ, PTY_INFO, - HISTORY, - MAMEINFO, - SYSINFO, + EXTERNAL_DATS, ADD_FAVORITE, REMOVE_FAVORITE, - COMMAND, - STORYINFO, - SW_HISTORY, QUIT_GAME }; + + bool submenu; }; #endif /* __UI_MAINMENU_H__ */ diff --git a/src/emu/ui/menu.cpp b/src/emu/ui/menu.cpp index cfd81dc9787..f831ffa725f 100644 --- a/src/emu/ui/menu.cpp +++ b/src/emu/ui/menu.cpp @@ -59,9 +59,13 @@ static const ui_arts_info arts_info[] = { nullptr } }; -static const char *hover_msg[] = { "Add or remove favorites", "Export displayed list to file", "Show history.dat info", - "Show mameinfo.dat / messinfo.dat info", "Show command.dat info", "Setup directories", - "Configure options" }; +static const char *hover_msg[] = { + "Add or remove favorites", + "Export displayed list to file", + "Show DATs view", + "Setup directories", + "Configure options" +}; /*************************************************************************** GLOBAL VARIABLES @@ -340,6 +344,8 @@ const ui_menu_event *ui_menu::process(UINT32 flags) draw_select_game(flags & UI_MENU_PROCESS_NOINPUT); else if ((item[0].flags & MENU_FLAG_UI_PALETTE ) != 0) draw_palette_menu(); + else if ((item[0].flags & MENU_FLAG_UI_DATS) != 0) + draw_dats_menu(); else draw(flags & UI_MENU_PROCESS_CUSTOM_ONLY, flags & UI_MENU_PROCESS_NOIMAGE, flags & UI_MENU_PROCESS_NOINPUT); @@ -463,7 +469,6 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput) int itemnum, linenum; bool mouse_hit, mouse_button; float mouse_x = -1, mouse_y = -1; - bool history_flag = ((item[0].flags & MENU_FLAG_UI_HISTORY) != 0); if (machine().ui().options().use_background_image() && &machine().system() == &GAME_NAME(___empty) && bgrnd_bitmap->valid() && !noimage) container->add_quad(0.0f, 0.0f, 1.0f, 1.0f, ARGB_WHITE, bgrnd_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); @@ -528,14 +533,7 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput) if (top_line < 0 || selected == 0) top_line = 0; if (top_line + visible_lines >= item.size()) - { - if (history_flag) - selected = item.size() - 1; top_line = item.size() - visible_lines; - } - - if (history_flag && selected != item.size() - 1) - selected = top_line + visible_lines / 2; // determine effective positions taking into account the hilighting arrows float effective_width = visible_width - 2.0f * gutter_width; @@ -572,12 +570,11 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput) float line_y1 = line_y + line_height; // set the hover if this is our item - if (mouse_hit && line_x0 <= mouse_x && line_x1 > mouse_x && line_y0 <= mouse_y && line_y1 > mouse_y && pitem.is_selectable() - && (pitem.flags & MENU_FLAG_UI_HISTORY) == 0) + if (mouse_hit && line_x0 <= mouse_x && line_x1 > mouse_x && line_y0 <= mouse_y && line_y1 > mouse_y && pitem.is_selectable()) hover = itemnum; // if we're selected, draw with a different background - if (itemnum == selected && (pitem.flags & MENU_FLAG_UI_HISTORY) == 0) + if (itemnum == selected) { fgcolor = UI_SELECTED_COLOR; bgcolor = UI_SELECTED_BG_COLOR; @@ -586,8 +583,7 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput) } // else if the mouse is over this item, draw with a different background - else if (itemnum == hover && (((pitem.flags & MENU_FLAG_UI_HISTORY) == 0) || (linenum == 0 && top_line != 0) - || (linenum == visible_lines - 1 && itemnum != item.size() - 1))) + else if (itemnum == hover && ((linenum == 0 && top_line != 0) || (linenum == visible_lines - 1 && itemnum != item.size() - 1))) { fgcolor = UI_MOUSEOVER_COLOR; bgcolor = UI_MOUSEOVER_BG_COLOR; @@ -631,11 +627,6 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput) else if (strcmp(itemtext, MENU_SEPARATOR_ITEM) == 0) container->add_line(visible_left, line_y + 0.5f * line_height, visible_left + visible_width, line_y + 0.5f * line_height, UI_LINE_WIDTH, UI_BORDER_COLOR, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); - // draw the subitem left-justified - else if (pitem.subtext == nullptr && (pitem.flags & MENU_FLAG_UI_HISTORY) != 0) - machine().ui().draw_text_full(container, itemtext, effective_left, line_y, effective_width, - JUSTIFY_LEFT, WRAP_TRUNCATE, DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr); - // if we don't have a subitem, just draw the string centered else if (pitem.subtext == nullptr) machine().ui().draw_text_full(container, itemtext, effective_left, line_y, effective_width, @@ -818,7 +809,6 @@ void ui_menu::handle_events(UINT32 flags) { bool stop = false; ui_event local_menu_event; - bool historyflag = ((item[0].flags & MENU_FLAG_UI_HISTORY) != 0); // loop while we have interesting events while (!stop && machine().ui_input().pop_event(&local_menu_event)) @@ -833,6 +823,11 @@ void ui_menu::handle_events(UINT32 flags) selected = hover; else if (hover == HOVER_ARROW_UP) { + if ((flags & MENU_FLAG_UI_DATS) != 0) + { + top_line -= visitems - (top_line + visible_lines == item.size() - 1); + return; + } selected -= visitems; if (selected < 0) selected = 0; @@ -840,6 +835,11 @@ void ui_menu::handle_events(UINT32 flags) } else if (hover == HOVER_ARROW_DOWN) { + if ((flags & MENU_FLAG_UI_DATS) != 0) + { + top_line += visible_lines - 2; + return; + } selected += visible_lines - 2 + (selected == 0); if (selected > item.size() - 1) selected = item.size() - 1; @@ -869,16 +869,23 @@ void ui_menu::handle_events(UINT32 flags) { if (local_menu_event.zdelta > 0) { - if (historyflag && selected == item.size() - 1) - selected -= visitems + 1; - else - selected -= local_menu_event.num_lines; + if ((flags & MENU_FLAG_UI_DATS) != 0) + { + top_line -= local_menu_event.num_lines; + return; + } + selected -= local_menu_event.num_lines; validate_selection(-1); if (selected < top_line + (top_line != 0)) top_line -= local_menu_event.num_lines; } else { + if ((flags & MENU_FLAG_UI_DATS) != 0) + { + top_line += local_menu_event.num_lines; + return; + } selected += local_menu_event.num_lines; validate_selection(1); if (selected > item.size() - 1) @@ -917,8 +924,6 @@ void ui_menu::handle_keys(UINT32 flags) // bail if no items if (item.empty()) return; - bool historyflag = ((item[0].flags & MENU_FLAG_UI_HISTORY) != 0); - // if we hit select, return TRUE or pop the stack, depending on the item if (exclusive_input_pressed(IPT_UI_SELECT, 0)) @@ -950,6 +955,9 @@ void ui_menu::handle_keys(UINT32 flags) bool ignoreleft = ((item[selected].flags & MENU_FLAG_LEFT_ARROW) == 0); bool ignoreright = ((item[selected].flags & MENU_FLAG_RIGHT_ARROW) == 0); + if ((item[0].flags & MENU_FLAG_UI_DATS) != 0) + ignoreleft = ignoreright = false; + // accept left/right keys as-is with repeat if (!ignoreleft && exclusive_input_pressed(IPT_UI_LEFT, (flags & UI_MENU_PROCESS_LR_REPEAT) ? 6 : 0)) return; @@ -959,23 +967,12 @@ void ui_menu::handle_keys(UINT32 flags) // up backs up by one item if (exclusive_input_pressed(IPT_UI_UP, 6)) { - if (historyflag) + if ((item[0].flags & MENU_FLAG_UI_DATS) != 0) { - if (selected <= (visitems / 2)) - return; - else if (visitems == item.size()) - { - selected = item.size() - 1; - return; - } - else if (selected == item.size() - 1) - selected = (item.size() - 1) - (visitems / 2); - } - - if (selected == 0) + top_line--; return; - - selected--; + } + (selected == 0) ? selected = top_line = item.size() - 1 : --selected; validate_selection(-1); top_line -= (selected == top_line && top_line != 0); } @@ -983,21 +980,12 @@ void ui_menu::handle_keys(UINT32 flags) // down advances by one item if (exclusive_input_pressed(IPT_UI_DOWN, 6)) { - if (historyflag) + if ((item[0].flags & MENU_FLAG_UI_DATS) != 0) { - if (selected < visitems / 2) - selected = visitems / 2; - else if (selected + (visitems / 2) >= item.size()) - { - selected = item.size() - 1; - return; - } - } - - if (selected == item.size() - 1) + top_line++; return; - - selected++; + } + (selected == item.size() - 1) ? selected = top_line = 0 : ++selected; top_line += (selected == top_line + visitems + (top_line != 0)); } @@ -1939,19 +1927,9 @@ void ui_menu::handle_main_events(UINT32 flags) menu_event.iptkey = IPT_UI_EXPORT; stop = true; } - else if (hover == HOVER_B_HISTORY) + else if (hover == HOVER_B_DATS) { - menu_event.iptkey = IPT_UI_HISTORY; - stop = true; - } - else if (hover == HOVER_B_MAMEINFO) - { - menu_event.iptkey = IPT_UI_MAMEINFO; - stop = true; - } - else if (hover == HOVER_B_COMMAND) - { - menu_event.iptkey = IPT_UI_COMMAND; + menu_event.iptkey = IPT_UI_DATS; stop = true; } else if (hover == HOVER_B_SETTINGS) @@ -2050,7 +2028,6 @@ float ui_menu::draw_right_box_title(float x1, float y1, float x2, float y2) float midl = (x2 - x1) * 0.5f; // add outlined box for options - //machine().ui().draw_outlined_box(container, x1, y1, x2, y2, rgb_t(0xEF, 0x12, 0x47, 0x7B)); mui.draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR); // add separator line @@ -2089,7 +2066,7 @@ float ui_menu::draw_right_box_title(float x1, float y1, float x2, float y2) mui.draw_text_full(container, buffer[cells].c_str(), x1 + UI_LINE_WIDTH, y1, midl - UI_LINE_WIDTH, JUSTIFY_CENTER, WRAP_NEVER, DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr); - x1 = x1 + midl; + x1 += midl; } return (y1 + line_height + UI_LINE_WIDTH); @@ -2450,7 +2427,7 @@ void ui_menu::info_arrow(int ub, float origx1, float origx2, float oy1, float li } //------------------------------------------------- -// draw - draw a menu +// draw - draw palette menu //------------------------------------------------- void ui_menu::draw_palette_menu() @@ -2559,14 +2536,14 @@ void ui_menu::draw_palette_menu() hover = itemnum; // if we're selected, draw with a different background - if (itemnum == selected && (pitem.flags & MENU_FLAG_UI_HISTORY) == 0) + if (itemnum == selected) { fgcolor = UI_SELECTED_COLOR; bgcolor = UI_SELECTED_BG_COLOR; } // else if the mouse is over this item, draw with a different background - else if (itemnum == hover && (pitem.flags & MENU_FLAG_UI_HISTORY) == 0) + else if (itemnum == hover) { fgcolor = UI_MOUSEOVER_COLOR; bgcolor = UI_MOUSEOVER_BG_COLOR; @@ -2636,4 +2613,152 @@ void ui_menu::draw_palette_menu() // return the number of visible lines, minus 1 for top arrow and 1 for bottom arrow visitems = visible_lines - (top_line != 0) - (top_line + visible_lines != item.size()); +} + +//------------------------------------------------- +// draw - draw dats menu +//------------------------------------------------- + +void ui_menu::draw_dats_menu() +{ + float line_height = machine().ui().get_line_height(); + float ud_arrow_width = line_height * machine().render().ui_aspect(); + float gutter_width = 0.52f * line_height * machine().render().ui_aspect(); + mouse_x = -1, mouse_y = -1; + float visible_width = 1.0f - 2.0f * UI_BOX_LR_BORDER; + float visible_left = (1.0f - visible_width) * 0.5f; + ui_manager &mui = machine().ui(); + + // draw background image if available + if (machine().ui().options().use_background_image() && bgrnd_bitmap->valid()) + container->add_quad(0.0f, 0.0f, 1.0f, 1.0f, ARGB_WHITE, bgrnd_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); + + hover = item.size() + 1; + visible_items = item.size() - 2; + float extra_height = 2.0f * line_height; + float visible_extra_menu_height = customtop + custombottom + extra_height; + + // locate mouse + mouse_hit = false; + mouse_button = false; + mouse_target = machine().ui_input().find_mouse(&mouse_target_x, &mouse_target_y, &mouse_button); + if (mouse_target != nullptr) + if (mouse_target->map_point_container(mouse_target_x, mouse_target_y, *container, mouse_x, mouse_y)) + mouse_hit = true; + + // account for extra space at the top and bottom + float visible_main_menu_height = 1.0f - 2.0f * UI_BOX_TB_BORDER - visible_extra_menu_height; + visible_lines = floor(visible_main_menu_height / line_height); + visible_main_menu_height = (float)(visible_lines * line_height); + + // compute top/left of inner menu area by centering + float visible_top = (1.0f - (visible_main_menu_height + visible_extra_menu_height)) * 0.5f; + + // if the menu is at the bottom of the extra, adjust + visible_top += customtop; + + // compute left box size + float x1 = visible_left; + float y1 = visible_top - UI_BOX_TB_BORDER; + float x2 = x1 + visible_width; + float y2 = visible_top + visible_main_menu_height + UI_BOX_TB_BORDER + extra_height; + float line = visible_top + (float)(visible_lines * line_height); + + //machine().ui().draw_outlined_box(container, x1, y1, x2, y2, rgb_t(0xEF, 0x12, 0x47, 0x7B)); + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR); + + if (visible_items < visible_lines) + visible_lines = visible_items; + if (top_line < 0) + top_line = 0; + if (top_line + visible_lines >= visible_items) + top_line = visible_items - visible_lines; + + // determine effective positions taking into account the hilighting arrows + float effective_width = visible_width - 2.0f * gutter_width; + float effective_left = visible_left + gutter_width; + + int n_loop = (visible_items >= visible_lines) ? visible_lines : visible_items; + + for (int linenum = 0; linenum < n_loop; linenum++) + { + float line_y = visible_top + (float)linenum * line_height; + int itemnum = top_line + linenum; + const ui_menu_item &pitem = item[itemnum]; + const char *itemtext = pitem.text; + rgb_t fgcolor = UI_TEXT_COLOR; + rgb_t bgcolor = UI_TEXT_BG_COLOR; + float line_x0 = x1 + 0.5f * UI_LINE_WIDTH; + float line_y0 = line_y; + float line_x1 = x2 - 0.5f * UI_LINE_WIDTH; + float line_y1 = line_y + line_height; + + // if we're on the top line, display the up arrow + if (linenum == 0 && top_line != 0) + { + draw_arrow(container, 0.5f * (x1 + x2) - 0.5f * ud_arrow_width, line_y + 0.25f * line_height, + 0.5f * (x1 + x2) + 0.5f * ud_arrow_width, line_y + 0.75f * line_height, fgcolor, ROT0); + + if (mouse_hit && line_x0 <= mouse_x && line_x1 > mouse_x && line_y0 <= mouse_y && line_y1 > mouse_y) + { + fgcolor = UI_MOUSEOVER_COLOR; + bgcolor = UI_MOUSEOVER_BG_COLOR; + highlight(container, line_x0, line_y0, line_x1, line_y1, bgcolor); + hover = HOVER_ARROW_UP; + } + } + // if we're on the bottom line, display the down arrow + else if (linenum == visible_lines - 1 && itemnum != visible_items - 1) + { + draw_arrow(container, 0.5f * (x1 + x2) - 0.5f * ud_arrow_width, line_y + 0.25f * line_height, + 0.5f * (x1 + x2) + 0.5f * ud_arrow_width, line_y + 0.75f * line_height, fgcolor, ROT0 ^ ORIENTATION_FLIP_Y); + + if (mouse_hit && line_x0 <= mouse_x && line_x1 > mouse_x && line_y0 <= mouse_y && line_y1 > mouse_y) + { + fgcolor = UI_MOUSEOVER_COLOR; + bgcolor = UI_MOUSEOVER_BG_COLOR; + highlight(container, line_x0, line_y0, line_x1, line_y1, bgcolor); + hover = HOVER_ARROW_DOWN; + } + } + + // draw dats text + else if (pitem.subtext == nullptr) + { + mui.draw_text_full(container, itemtext, effective_left, line_y, effective_width, JUSTIFY_LEFT, WRAP_NEVER, + DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr); + } + } + + for (size_t count = visible_items; count < item.size(); count++) + { + const ui_menu_item &pitem = item[count]; + const char *itemtext = pitem.text; + float line_x0 = x1 + 0.5f * UI_LINE_WIDTH; + float line_y0 = line; + float line_x1 = x2 - 0.5f * UI_LINE_WIDTH; + float line_y1 = line + line_height; + rgb_t fgcolor = UI_SELECTED_COLOR; + rgb_t bgcolor = UI_SELECTED_BG_COLOR; + + if (mouse_hit && line_x0 <= mouse_x && line_x1 > mouse_x && line_y0 <= mouse_y && line_y1 > mouse_y && pitem.is_selectable()) + hover = count; + + if (strcmp(itemtext, MENU_SEPARATOR_ITEM) == 0) + container->add_line(visible_left, line + 0.5f * line_height, visible_left + visible_width, line + 0.5f * line_height, + UI_LINE_WIDTH, UI_TEXT_COLOR, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); + else + { + highlight(container, line_x0, line_y0, line_x1, line_y1, bgcolor); + mui.draw_text_full(container, itemtext, effective_left, line, effective_width, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr); + } + line += line_height; + } + + // if there is something special to add, do it by calling the virtual method + custom_render((selected >= 0 && selected < item.size()) ? item[selected].ref : nullptr, customtop, custombottom, x1, y1, x2, y2); + + // return the number of visible lines, minus 1 for top arrow and 1 for bottom arrow + visitems = visible_lines - (top_line != 0) - (top_line + visible_lines != visible_items); } \ No newline at end of file diff --git a/src/emu/ui/menu.h b/src/emu/ui/menu.h index 174d2866fac..512436dc232 100644 --- a/src/emu/ui/menu.h +++ b/src/emu/ui/menu.h @@ -28,7 +28,7 @@ #define MENU_FLAG_REDTEXT (1 << 4) #define MENU_FLAG_DISABLE (1 << 5) #define MENU_FLAG_UI (1 << 6) -#define MENU_FLAG_UI_HISTORY (1 << 7) +#define MENU_FLAG_UI_DATS (1 << 7) #define MENU_FLAG_UI_SWLIST (1 << 8) #define MENU_FLAG_UI_FAVORITE (1 << 9) #define MENU_FLAG_UI_PALETTE (1 << 10) @@ -250,10 +250,12 @@ protected: static std::unique_ptr snapx_bitmap; static render_texture *snapx_texture; + static std::unique_ptr hilight_main_bitmap; + static render_texture *hilight_main_texture; private: static std::unique_ptr no_avail_bitmap, bgrnd_bitmap, star_bitmap; - static std::unique_ptr hilight_main_bitmap; - static render_texture *hilight_main_texture, *bgrnd_texture, *star_texture; +// static std::unique_ptr hilight_main_bitmap; + static render_texture *bgrnd_texture, *star_texture; static bitmap_argb32 *icons_bitmap[]; static render_texture *icons_texture[]; @@ -264,9 +266,12 @@ private: // draw game list void draw_select_game(bool noinput); - // draw game list + // draw palette menu void draw_palette_menu(); + // draw dats menu + void draw_dats_menu(); + void get_title_search(std::string &title, std::string &search); // handle keys diff --git a/src/emu/ui/selgame.cpp b/src/emu/ui/selgame.cpp index e911f948945..0945c6a4fda 100644 --- a/src/emu/ui/selgame.cpp +++ b/src/emu/ui/selgame.cpp @@ -371,14 +371,14 @@ void ui_menu_select_game::handle() reset(UI_MENU_RESET_SELECT_FIRST); } - // handle UI_HISTORY - else if (m_event->iptkey == IPT_UI_HISTORY && enabled_dats) + // handle UI_DATS + else if (m_event->iptkey == IPT_UI_DATS && enabled_dats) { if (!isfavorite()) { const game_driver *driver = (const game_driver *)m_event->itemref; if ((FPTR)driver > 3) - ui_menu::stack_push(global_alloc_clear(machine(), container, UI_HISTORY_LOAD, driver)); + ui_menu::stack_push(global_alloc_clear(machine(), container, driver)); } else { @@ -386,91 +386,13 @@ void ui_menu_select_game::handle() if ((FPTR)swinfo > 3) { if (swinfo->startempty == 1) - ui_menu::stack_push(global_alloc_clear(machine(), container, UI_HISTORY_LOAD, swinfo->driver)); + ui_menu::stack_push(global_alloc_clear(machine(), container, swinfo->driver)); else - ui_menu::stack_push(global_alloc_clear(machine(), container, swinfo)); + ui_menu::stack_push(global_alloc_clear(machine(), container, swinfo)); } } } - // handle UI_MAMEINFO - else if (m_event->iptkey == IPT_UI_MAMEINFO && enabled_dats) - { - if (!isfavorite()) - { - const game_driver *driver = (const game_driver *)m_event->itemref; - if ((FPTR)driver > 3) - { - if ((driver->flags & MACHINE_TYPE_ARCADE) != 0) - ui_menu::stack_push(global_alloc_clear(machine(), container, UI_MAMEINFO_LOAD, driver)); - else - ui_menu::stack_push(global_alloc_clear(machine(), container, UI_MESSINFO_LOAD, driver)); - } - } - else - { - ui_software_info *swinfo = (ui_software_info *)m_event->itemref; - if ((FPTR)swinfo > 3 && swinfo->startempty == 1) - { - if ((swinfo->driver->flags & MACHINE_TYPE_ARCADE) != 0) - ui_menu::stack_push(global_alloc_clear(machine(), container, UI_MAMEINFO_LOAD, swinfo->driver)); - else - ui_menu::stack_push(global_alloc_clear(machine(), container, UI_MESSINFO_LOAD, swinfo->driver)); - } - } - } - - // handle UI_STORY - else if (m_event->iptkey == IPT_UI_STORY && enabled_dats) - { - if (!isfavorite()) - { - const game_driver *driver = (const game_driver *)m_event->itemref; - if ((FPTR)driver > 3) - ui_menu::stack_push(global_alloc_clear(machine(), container, UI_STORY_LOAD, driver)); - } - else - { - ui_software_info *swinfo = (ui_software_info *)m_event->itemref; - if ((FPTR)swinfo > 3 && swinfo->startempty == 1) - ui_menu::stack_push(global_alloc_clear(machine(), container, UI_STORY_LOAD, swinfo->driver)); - } - } - - // handle UI_SYSINFO - else if (m_event->iptkey == IPT_UI_SYSINFO && enabled_dats) - { - if (!isfavorite()) - { - const game_driver *driver = (const game_driver *)m_event->itemref; - if ((FPTR)driver > 3) - ui_menu::stack_push(global_alloc_clear(machine(), container, UI_SYSINFO_LOAD, driver)); - } - else - { - ui_software_info *swinfo = (ui_software_info *)m_event->itemref; - if ((FPTR)swinfo > 3 && swinfo->startempty == 1) - ui_menu::stack_push(global_alloc_clear(machine(), container, UI_SYSINFO_LOAD, swinfo->driver)); - } - } - - // handle UI_COMMAND - else if (m_event->iptkey == IPT_UI_COMMAND && enabled_dats) - { - if (!isfavorite()) - { - const game_driver *driver = (const game_driver *)m_event->itemref; - if ((FPTR)driver > 3) - ui_menu::stack_push(global_alloc_clear(machine(), container, driver)); - } - else - { - ui_software_info *swinfo = (ui_software_info *)m_event->itemref; - if ((FPTR)swinfo > 3 && swinfo->startempty == 1) - ui_menu::stack_push(global_alloc_clear(machine(), container, swinfo->driver)); - } - } - // handle UI_FAVORITES else if (m_event->iptkey == IPT_UI_FAVORITES) { diff --git a/src/emu/ui/selsoft.cpp b/src/emu/ui/selsoft.cpp index 5d1acb27c34..95a113189cd 100644 --- a/src/emu/ui/selsoft.cpp +++ b/src/emu/ui/selsoft.cpp @@ -211,13 +211,18 @@ void ui_menu_select_software::handle() } } - // handle UI_HISTORY - else if (m_event->iptkey == IPT_UI_HISTORY && machine().ui().options().enabled_dats()) + // handle UI_DATS + else if (m_event->iptkey == IPT_UI_DATS && machine().ui().options().enabled_dats()) { ui_software_info *ui_swinfo = (ui_software_info *)m_event->itemref; if ((FPTR)ui_swinfo > 1) - ui_menu::stack_push(global_alloc_clear(machine(), container, ui_swinfo, m_driver)); + { + if (ui_swinfo->startempty == 1) + ui_menu::stack_push(global_alloc_clear(machine(), container, ui_swinfo->driver)); + else + ui_menu::stack_push(global_alloc_clear(machine(), container, ui_swinfo)); + } } // handle UI_UP_FILTER diff --git a/src/emu/ui/toolbar.h b/src/emu/ui/toolbar.h index f15f4499229..095aa0e3cdd 100644 --- a/src/emu/ui/toolbar.h +++ b/src/emu/ui/toolbar.h @@ -106,75 +106,6 @@ static const UINT32 toolbar_bitmap_bmp[][1024] = { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x07999999, 0x2D999999, 0x50999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x72407283, 0x6626687D, 0x22467584, 0x800B5C76, 0x1A0A5B75, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, -{ - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0E999999, 0x59999999, 0x9E999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0x8B999999, 0x41999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x0F999999, 0xC8AEAEAE, 0xFFDADADA, 0xFFF7F7F7, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFF1F1F1, 0xFFCDCDCD, 0x7BA1A1A1, 0x08999999, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x5B999999, 0xFFDADADA, 0xFFF8F8F8, 0xFFF2F2F2, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFF0F0F0, 0xFFF3F3F3, 0xFFFAFAFA, 0xD8BFBFBF, 0x2E999999, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0xA3999999, 0xFFEEEEEE, 0xFFF0F0F0, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFF2F2F2, 0xFCD1D1D1, 0x53999999, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFD1D1D1, 0x55999999, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFEDEDED, 0xFFEDEDED, 0xFFEDEDED, 0xFFB5B5B5, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF9A9A9A, 0xFFD3D3D3, 0xFFEDEDED, 0xFFEDEDED, 0xFFD1D1D1, 0x55999999, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFEDEDED, 0xFFEDEDED, 0xFFEDEDED, 0xFFDADADA, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFE4E4E4, 0xFFEDEDED, 0xFFEDEDED, 0xFFD1D1D1, 0x55999999, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFD0D0D0, 0x55999999, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFCFCFCF, 0x55999999, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFEAEAEA, 0xFFEAEAEA, 0xFFEAEAEA, 0xFFD8D8D8, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFE1E1E1, 0xFFEAEAEA, 0xFFEAEAEA, 0xFFCFCFCF, 0x55999999, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE9E9E9, 0xFFE9E9E9, 0xFFE9E9E9, 0xFFB4B4B4, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF9A9A9A, 0xFFD0D0D0, 0xFFE9E9E9, 0xFFE9E9E9, 0xFFCECECE, 0x55999999, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFCDCDCD, 0x55999999, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFCDCDCD, 0x55999999, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFCCCCCC, 0x55999999, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFCBCBCB, 0x55999999, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFB2B2B2, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF9A9A9A, 0xFFCCCCCC, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFCBCBCB, 0x55999999, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFD2D2D2, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFDBDBDB, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFCACACA, 0x55999999, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFBAC5A7, 0xFFB5C29F, 0xFFD6D8D1, 0xFF9AB077, 0xFFD1D5CA, 0xFFC9C9C9, 0x55999999, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFDCDDDA, 0xFFB2C09C, 0xFFB9C3A7, 0xFF95B06E, 0xFF99BE65, 0xFF94AE6B, 0xFF91B959, 0xFFB3C09D, 0xFF9EAD84, 0x5C778B57, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFDADBD8, 0xFFC9CEBF, 0xFF90AE62, 0xFF93BE57, 0xFF8EB853, 0xFF97C060, 0xFFA2C86F, 0xFF94BE5D, 0xFF89B24D, 0xFF8DB852, 0x6B678E2C, 0x0E446804, 0x03466A06, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDFDFDF, 0xFFDFDFDF, 0xFFDFDFDF, 0xFFC0C0C0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFDDDEDC, 0xFFA5B68A, 0xFF92B263, 0xFF86AD4F, 0xFF8FB957, 0xFF8BB551, 0xFFB8D295, 0xFFEAF2E1, 0xFFB4D08F, 0xFF8DB754, 0xFF89B350, 0xCE76A038, 0xA16E962E, 0x27517612, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFBFBFBF, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFDEDEDE, 0xFFB2BC9F, 0xFF81AA47, 0xFF87B14F, 0xFF84AE4C, 0xFF80AB46, 0xFFC7DAAE, 0xFFFFFFFF, 0xFFC3D8A8, 0xFF84AE4B, 0xFF85AF4D, 0xFF8AB552, 0xBE6F9633, 0x1A466B07, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFB4BFA1, 0xFF8FAA64, 0xFF7BA53F, 0xFF7FA845, 0xFF7EA745, 0xFF7BA53F, 0xFFC0D4A4, 0xFFFFFFFF, 0xFFBAD09D, 0xFF7DA743, 0xFF7EA745, 0xFF80A946, 0xD9709931, 0x815C831C, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFAAB893, 0xFF7C9F48, 0xFF779F3C, 0xFF769F3B, 0xFF769F3B, 0xFF739C37, 0xFFB4CA93, 0xFFFEFEFD, 0xFFA9C284, 0xFF739D38, 0xFF769F3B, 0xFF769E3B, 0xFB769E3B, 0xBE628925, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFCBCFC5, 0xFF7D9A4F, 0xFF729935, 0xFF709834, 0xFF709734, 0xFF6E9631, 0xFFA7BF82, 0xFFFDFDFC, 0xFF9BB670, 0xFF6D9530, 0xFF709734, 0xFF709835, 0xF268902A, 0x5E517611, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFF98A979, 0xFF6A8F2F, 0xFF678E2A, 0xFF688F2A, 0xFF688F2A, 0xFF678E29, 0xFF90AC63, 0xFFE7EDDE, 0xFF7FA04C, 0xFF668D27, 0xFF688F2A, 0xFF678E2A, 0xFB688F2A, 0xDC5A801A, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFCACEC4, 0xFFA3B28B, 0xFF5E8420, 0xFF618824, 0xFF618823, 0xFF618823, 0xFF678C2B, 0xFF83A153, 0xFF618824, 0xFF608723, 0xFF618823, 0xFF628924, 0xBC557A16, 0x434E730F, - 0x00000000, 0x00000000, 0x00000000, 0x91999999, 0xFFD2D2D2, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD8D8D7, 0xFF93A575, 0xFF5A811C, 0xFF597F1A, 0xFF597F1A, 0xFF567D15, 0xFFA1B77D, 0xFFF3F6EF, 0xFF98B072, 0xFF587E18, 0xFF597F1A, 0xFD59801A, 0xCF547A14, 0x27476B07, - 0x00000000, 0x00000000, 0x00000000, 0x45999999, 0xFFBCBCBC, 0xFFD8D8D8, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD8D8D7, 0xFFB3BDA3, 0xFF9BAC80, 0xFF658430, 0xFF557B16, 0xFF517810, 0xFF91A968, 0xFFDAE2CC, 0xFF8BA560, 0xFF527913, 0xFA537914, 0x9B4D720D, 0x5C4C710D, 0x15476C08, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x7B9C9C9C, 0xD7B1B1B1, 0xFAC1C1C1, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFB8BBB3, 0xFF6E8744, 0xFF5E7A2D, 0xFF54761A, 0xFD4C720C, 0xF64C720C, 0xFB4C720B, 0xC54B700B, 0xD94C720D, 0x53496E0A, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x07999999, 0x2D999999, 0x50999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55969793, 0x55728354, 0x557E8A69, 0xAB52731A, 0xBC4A6E0A, 0x70486C0A, 0xE0496D08, 0x41466B06, 0x2F476B07, 0x16476B07, 0x00000000, 0x00000000 -}, - -{ - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0E999999, 0x59999999, 0x9E999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0x8B999999, 0x41999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x0F999999, 0xC8AEAEAE, 0xFFDADADA, 0xFFF7F7F7, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFF1F1F1, 0xFFCDCDCD, 0x7BA1A1A1, 0x08999999, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x5B999999, 0xFFDADADA, 0xFFF8F8F8, 0xFFF2F2F2, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFF0F0F0, 0xFFF3F3F3, 0xFFFAFAFA, 0xD8BFBFBF, 0x2E999999, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0xA3999999, 0xFFEEEEEE, 0xFFF0F0F0, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFF2F2F2, 0xFCD1D1D1, 0x53999999, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFD1D1D1, 0x55999999, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFEDEDED, 0xFFEDEDED, 0xFFEDEDED, 0xFFB5B5B5, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF9A9A9A, 0xFFD3D3D3, 0xFFEDEDED, 0xFFEDEDED, 0xFFD1D1D1, 0x55999999, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFEDEDED, 0xFFEDEDED, 0xFFEDEDED, 0xFFDADADA, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFE4E4E4, 0xFFEDEDED, 0xFFEDEDED, 0xFFD1D1D1, 0x55999999, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFD0D0D0, 0x55999999, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFCFCFCF, 0x55999999, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFEAEAEA, 0xFFEAEAEA, 0xFFEAEAEA, 0xFFD8D8D8, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFE1E1E1, 0xFFEAEAEA, 0xFFEAEAEA, 0xFFCFCFCF, 0x55999999, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE9E9E9, 0xFFE9E9E9, 0xFFE9E9E9, 0xFFB4B4B4, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF9A9A9A, 0xFFD0D0D0, 0xFFE9E9E9, 0xFFE9E9E9, 0xFFCECECE, 0x55999999, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFCDCDCD, 0x55999999, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFCDCDCD, 0x55999999, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFCCCCCC, 0x55999999, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFCBCBCB, 0x55999999, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFB2B2B2, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF9A9A9A, 0xFFCCCCCC, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFCBCBCB, 0x55999999, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFD2D2D2, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFC6B7B1, 0xFFC6B5B0, 0xFFDBDBDA, 0xFFDAB9AF, 0xFFE1DBD9, 0xFFCACACA, 0x55999999, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE1DFDE, 0xFFDEC9C0, 0xFFDDCDC7, 0xFFDB9673, 0xFFE49259, 0xFFDAA68E, 0xFFE4803C, 0xFFDCBAAC, 0xFFCAB2A9, 0x59A68679, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFDED6D3, 0xFFDD8F62, 0xFFE78F50, 0xFFE8813C, 0xFFF0852D, 0xFFEB7D2A, 0xFFF0832C, 0xFFE2884F, 0xFFE38341, 0x63CF612D, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0DFDE, 0xFFDAB7AA, 0xFFDC9D7E, 0xFFDE7B42, 0xFFEB7F2A, 0xFFEA7C27, 0xFFED9D5F, 0xFFF6CFB1, 0xFFEE9A5B, 0xFFEB7E28, 0xFFE67729, 0xA4D76225, 0x66D55A22, 0x18C5461C, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDFDFDF, 0xFFDFDFDF, 0xFFDFDFDF, 0xFFC0C0C0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFDFDEDE, 0xFFD59F8C, 0xFFE77426, 0xFFE87627, 0xFFE47426, 0xFFE46F1E, 0xFFF3C09C, 0xFFFFFFFF, 0xFFF2B992, 0xFFE37324, 0xFFE67426, 0xFDE87727, 0xD1DC6523, 0x28C3441C, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFBFBFBF, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFDBC8C1, 0xFFD9A08A, 0xFFDE6521, 0xFFE06B21, 0xFFE06B21, 0xFFDF661A, 0xFFF0B794, 0xFFFFFFFF, 0xFFEEB28D, 0xFFE0691F, 0xFFDF6B21, 0xFFE06B21, 0xBED85A1F, 0x46CF4F1D, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFD3947C, 0xFFDC6527, 0xFFDE631D, 0xFFDB621D, 0xFFDC621D, 0xFFDB5E17, 0xFFECAD89, 0xFFFFFEFE, 0xFFEAA37A, 0xFFDB5F1A, 0xFFDC621D, 0xFFDC621D, 0xFBE1641E, 0xDED2541C, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFD9CFCD, 0xFFD17857, 0xFFD75819, 0xFFD65719, 0xFFD65719, 0xFFD55414, 0xFFE69A75, 0xFFFEFDFC, 0xFFE38C61, 0xFFD55313, 0xFFD65719, 0xFFD65719, 0xF2D45319, 0x5EC6451A, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFD39B89, 0xFFD85925, 0xFFD35015, 0xFFD24F15, 0xFFD24F15, 0xFFD14D12, 0xFFE18B65, 0xFFFEFBF9, 0xFFDC784C, 0xFFD14B11, 0xFFD24F15, 0xFFD24E15, 0xFBD85015, 0xC0D04917, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFD5B9B1, 0xFFCC7D64, 0xFFCC4513, 0xFFCD4410, 0xFFCD4410, 0xFFCD440F, 0xFFD15425, 0xFFE08F71, 0xFFCE4917, 0xFFCD430F, 0xFFCD4410, 0xFFCE4410, 0xD7C84315, 0x7CC34118, - 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFD1A598, 0xFFCD3E0E, 0xFFC93C0C, 0xFFC93C0D, 0xFFC83A0A, 0xFFD66B47, 0xFFEAB4A0, 0xFFD4633C, 0xFFC93B0B, 0xFFC93C0D, 0xFFCB3D0B, 0xBDCB3E12, 0x19BF3E19, - 0x00000000, 0x00000000, 0x00000000, 0x91999999, 0xFFD2D2D2, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD8D7D6, 0xFFCE9383, 0xFFC96A4E, 0xFFC4451F, 0xFFC53408, 0xFFC32E03, 0xFFDF907A, 0xFFF8E9E4, 0xFFDD8B72, 0xFFC43206, 0xFCC5350A, 0xCAC23911, 0x99C23B13, 0x24C03D18, - 0x00000000, 0x00000000, 0x00000000, 0x45999999, 0xFFBCBCBC, 0xFFD8D8D8, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD8D5D4, 0xFFD5C6C1, 0xFFC55A3D, 0xFFC1320B, 0xFFC13109, 0xFFC53D18, 0xFFCE5A3C, 0xFFC43B17, 0xF9C1310B, 0xFCC13109, 0x62BF3812, 0x0ABD3E1B, 0x02BE3E1A, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x7B9C9C9C, 0xD7B1B1B1, 0xFAC1C1C1, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC2BEBD, 0xFFBA9185, 0xFFBDA19A, 0xFFBC5F46, 0xF2BB3D1C, 0xCBB84A2B, 0xE9BE2E09, 0x52BE3915, 0x5FBE3B17, 0x2BBE3A16, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x07999999, 0x2D999999, 0x50999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x72B05D46, 0x66B74B2D, 0x22AE644F, 0x80BE3814, 0x1ABE3C18, 0x00000000, 0x00000000, 0x00000000, 0x00000000 -}, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, diff --git a/src/emu/ui/utils.h b/src/emu/ui/utils.h index 81c509f9958..232fb3ccb41 100644 --- a/src/emu/ui/utils.h +++ b/src/emu/ui/utils.h @@ -129,9 +129,7 @@ enum HOVER_ARROW_DOWN, HOVER_B_FAV, HOVER_B_EXPORT, - HOVER_B_HISTORY, - HOVER_B_MAMEINFO, - HOVER_B_COMMAND, + HOVER_B_DATS, HOVER_B_FOLDERS, HOVER_B_SETTINGS, HOVER_RPANEL_ARROW,