summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/render.cpp
Commit message (Collapse)AuthorAgeFilesLines
* -emu/render.cpp: Always translate coordinates if container is found (fixes ↵ Vas Crabb2024-09-271-14/+7
| | | | | | | | | | | | | GitHub #12817). -ui/videoopt.cpp, ui/ui.cpp: Allow pressing UI Clear to restore default pointer timeout settings. - midway/starrider.cpp: Added PROTO 3 program ROMs. New clones marked not working ----------------------------- Star Rider (PROTO 3) [Matt Ownby]
* Fixed a few class memory access warnings. Vas Crabb2024-04-141-1/+2
|
* Initial touch input support: Vas Crabb2024-04-121-98/+338
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Feed mouse/pen/touch pointer events through UI input manager with Win32 and SDL. * Started migrating UI code to use new API and reworking mouse/touch interaction. * emu/render.cpp: Support pressing multiple clickable layout items simultaneously. * emu/render.cpp: Allow UI elements to be drawn in any window. * emu/rendlay.cpp, luaengine_render.cpp: Added layout view events for pointer input. * ui/ui.cpp: Allow the UI handler to control pointer display. * ui/analogipt.cpp: Added mouse/touch and more keys for navigating field state list. * ui/menu.cpp: Use vertical swipe to scroll and horizontal swipe to adjust. * ui/menu.cpp: Draw after processing input - greatly improves responsiveness. * ui/menu.cpp: Ignore keyboard/gamepad input during pointer actions. * ui/selmenu.cpp: Made left/right info pane arrows repeat when held. * ui/selmenu.cpp: Use middle click to move keyboard focus. * ui/selmenu.cpp: Let filter list scroll if it's too tall, and use a bit of horizontal padding. * ui/selmenu.cpp: Improved divider sizing. * ui/state.cpp: Don't allow clicks to pass through the confirm deletion prompt to the menu. * ui/simpleselgame.cpp: Fixed error message display and graphics/sound status not showing. * ui/simpleselgame.cpp: Allow tap/click to dismiss error message. * ui/utils.cpp: Show UI for choice filters when there are no choices - it's less confusing. * modules/input/input_sdl.cpp: Made scaling for mouse scroll better match RawInput and DirectInput. * modules/input/input_rawinput.cpp: Added support for horizontal scroll axis. * modules/input/input_win32.cpp: Added support for scroll axes and more buttons to mouse/lightgun. * modules/debugger/debugimgui.cpp: Don't fight over events with the UI manager - it breaks menus. * osd/windows/window.cpp: Translate mouse position to window cooridinates for scroll wheel events. * osd/sdl/window.cpp: Supply last mouse position for scroll wheel events if possible. * scripts/build/complay.py: Made zero input mask an error - it was only being used to block clicks.
* util/ioprocs.cpp: Added wrappers for common patterns. (#11608) Vas Crabb2024-02-251-4/+3
| | | | | emu/diimage.h: Removed fread overloads that allocate memory for output. util/core_file.cpp: Changed output size of load to size_t.
* render.cpp: Nuke previous scaler when releasing a render_texture in case it ↵ AJR2023-10-191-0/+1
| | | | gets recycled later. This fixes occasional bad downcasts in debug builds when trying to bring up the tilemap viewer in certain drivers.
* render.cpp: Use std::clamp for clamping aspect ratio AJR2023-08-161-6/+1
|
* ui/info.cpp: Get decimal separator from C++ locale. Also random cleanup. Vas Crabb2023-08-171-1/+1
| | | | | * emu/machine.cpp, emu/render.cpp: Catch exceptions by const reference. * Various spacing and #include order cleanup.
* Miscellaneous cleanup: Vas Crabb2023-03-211-20/+22
| | | | | | | | | render/bgfx/chainmanager.cpp: Only treat source file or more sepecific INI as higher priority than CFG file for setting screen chains. sega/model2.cpp, taito/taitocchip.cpp: Got rid of bankdev. Adjusted some doucmentation files.
* Major D3D and BGFX code refactoring and bug fixes: (#10858) [Ryan Holtz] MooglyGuy2023-01-291-0/+1
| | | | | | | | | | | * render/bgfx: Improved clearing and blending. Added prescale support. Fixes MT07586, MT07587, MT08084. * render/bgfx: Fixed blend and tint handling. (Fixes Github #1953). * render/bgfx/blendreader.cpp: Support non-separated blend mode specification for BGFX effects. * render/bgfx: Reworked how horizontally-padded screen textures are handled. Likely fixes MT08512 and MT08505. * render/bgfx: Ensure that a texture's width margin is updated in all cases. * render/d3d/d3dhlsl.cpp: Fixed tinting in HLSL post-processing mode. * render/d3d/d3dhlsl.cpp: Avoid most redundant state-setting calls. Reduces D3D API calls by about 90% on fruit machine drivers. * render/d3d/d3dhlsl.cpp: Assign SourceDims and QuadDims uniforms to only those effects that use them. * machine/laserdsc.cpp: Always add video quad to screen container, adjust tint based on m_videoenable instead.
* -osd: Better XInput and SDL game controller input enhancements: Vas Crabb2023-01-121-3/+3
| | | | | | | | | | | | | | | * Added initial support for XInput controller subtypes, starting with driving, arcade and flight controllers. * Check XInput capabilities to ignore buttons and hats that aren't present. * Added preliminary SDL Game Controller joystick provider. Reconnection and mixed Game Controller/Joystick devices are unsupported. * Show the input token for the highlighted control on input device menus. -ui: Allow menus to set required space above and below menu when metrics change. Fixes the initial bad layout on the system selecton menu, or bad layout after resizing windows.
* Patched up some gaps in functionality and fixed some bugs. Vas Crabb2022-09-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ui: Added some missing functionality: * Added an option to copy input device IDs to the relevant menus. * Added an item for setting the software lists files path (-hashpath) to the folder setup menu. * Allow pasting text from clipboard in most places that allow typing (searching, entering filenames, entering barcodes). * Changed the software selection menu heading to be a bit less misleading. * Made barcode menu less eager to rebuild itself unnecessarily, and removed some confusing and apparently pointless code. Exposed more Lua bindings: * Added low-level palette objects. * Added indexed bitmap types. * Added a bitmap method for extracting pixels from a rectangular area as a packed binary string. * Changed screen device pixels method to return width and height in addition to the pixels. osd: Added some functionality and cleaned up a little: * Added a function for copying text to the clipboard. * Moved function for converting Windows error codes to standard error conditions to winutil.cpp so it can be used from more places. * Removed duplicate declaration of osd_get_clipboard_text and made the function noexcept (including fixing implementations). * Made macOS implementation of osd_get_clipboard_text skip the encoding conversion if it finds UTF-8 text first. * Changed the default -uimodekey setting so it doesn't lose the "not shift" that stops the default from interfering with UI paste. Various bug fixes: * util/unicode.cpp: Fixed the version of utf8_from_uchar that returns std::string blowing up on invalid codepoints. * util/bitmap.h: Fixed wrapping constructors for indexed bitmaps taking the wrong parameter type (nothing was using them before). * util/bitmap.cpp: Fixed potential use-after-free issues with bitmap palettes. * emu/input.cpp, emu/inputdev.cpp: Log 1-based device numbers, matching what's shown in the internal UI and used in tokens in CFG files. * emu/emumem.cpp: Added the bank tag to a fatal error message where it was missing. docs: Reworked and expanded documentation on configuring stable controller IDs. For translators, the changes are quite minor: * There's a menu item for copying a device ID to the clipboard, and associated success/failure messages. * There's the menu item for setting the software list file search path. * One of the lines in the software selection menu heading has changes as it could be interpreted as implying it showed a software list name.
* render: give cloneof ext artwork priority over internal artwork hap2022-08-211-8/+8
|
* Remove fileio.h from emu.h AJR2022-02-111-0/+1
|
* rendutil.cpp: API cleanup + minor related OSD render cleanups AJR2022-01-221-6/+6
|
* emu/render.cpp: Improved scale factor selection. (#8961) antonioginer2022-01-061-41/+81
| | | Fixes aspect related issues, undesired overscan, etc. (GitHub #8209, GitHub #8387, MT08110)
* -emu/render.cpp: Get the initial view check off the hot path (fixes MT08159). Vas Crabb2021-12-241-11/+27
| | | | -Tidied up a few things, reduced bloat in a few more slots layouts.
* render.cpp: Use simple_list instead of std::list for containers; remove old ↵ AJR2021-11-211-101/+34
| | | | remnants of "internal" debugger
* -emu/render.cpp: Fixed texture size calculation for oblong items. Vas Crabb2021-11-191-4/+4
| | | | -bfm_sc2.cpp: Removed reel components from sc2prem2 layout.
* emu/render.cpp, emu/rendlay.cpp: Added scroll support for all elements. Vas Crabb2021-11-181-21/+64
|
* -frontend: Refactored menu event handling and fixed a number of issues. (#8777) Vas Crabb2021-10-311-12/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Moved common code for drawing about box, info viewer, and other text box menus to a base class; removed the last of the info viewer logic and the multi-line item hack from the base menu class. * Added previous/next group navigation for general inputs and plugin input selection menus. * Moved message catalog logic to lib/util, allowing osd and emu to use localised messages. * Made the base menu class use the UI manager’s feature for holding session state rather than a static map and mutex. * Improved menu event handling model, and fixed many issues, particularly with menus behaving badly when hidden/shown. * Added better support for menus that don’t participate in the usual menu stack, like the menuless sliders and the save/load state menus. * Made a number of menus refresh state when being shown after being hidden (fixes MT08121 among other issues). * Fixed indication of mounted slot option in the slot option details menu. * Improved appearance of background menus when emulation isn't running - draw all menus in the stack, and darken the background menus to make the edges of the active menu clearer. * Fixed locale issues in -listxml. -debugger: Made GUI debuggers more uniform. * Added new memory view features to Win32 debugger. * Fixed spelling of hexadecimal in Cocoa debugger and added decimal address option. * Fixed duplicate keyboard shortcut in Cocoa debugger (Shift-Cmd-D was both new device window and 64-bit float format). * Made keyboard shortcuts slightly more consistent across debuggers. -plugins: Moved input selection menu and sequence polling code to a common library. Fixed the issue that prevented keyboard inputs being mapped with -steadykey on. -docs: Started adding some documentation for MAME's internal UI, and updated the list of example front-ends. -Regenerated message catalog sources. For translators, the new strings are mostly: * The names of the inputs provided by the OS-dependent layer for things like fullscreen and video features. These show up in the user interface inputs menu. * The names for automatically generated views. These show up in the video options menu - test with a system with a lot of screens to see more variants. * The input macro plugin UI. * A few format strings for analog input assignments. * A few strings for the about box header.
* More miscellaneous cleanup: Vas Crabb2021-08-301-39/+36
| | | | | | | | | | | | | emu/render.cpp: Use I/O filter for zlib decompression, avoiding the need to use zlib directly. audo/bally.cpp: Moved several constructors out of the header, fixed a save state issue, and made outputs use finders. exidy.cpp: Split up state class and reduced reliance on driver init functions. Changed various drivers to use output finders.
* formats, osd, util: Started refactoring file I/O stuff. (#8456) Vas Crabb2021-08-221-2/+3
| | | | | | | | | Added more modern generic I/O interfaces with implementation backed by stdio, osd_file and core_file, replacing io_generic. Also replaced core_file's build-in zlib compression with a filter. unzip.cpp, un7z.cpp: Added option to supply abstract I/O interface rather than filename. Converted osd_file, core_file, archive_file, chd_file and device_image_interface to use std::error_condition rather than their own error enums. Allow mounting TI-99 RPK from inside archives.
* emu/render.cpp: Fixed automatic sizing of snapshots/recordings. (#8397) antonioginer2021-08-061-13/+22
| | | This fixes bad scaling on snapshots and recording when using -uesx and forced scale factors.
* API cleanups and miscellaneous fixes. Vas Crabb2021-07-151-6/+9
| | | | | | | | | | | | | | | | emu/ioport.cpp: Allow controller files to override input sequences for inputs that don't use defaults, and to override the toggle setting for digital inputs. emu/config.cpp: Expose configuration level (mostly matters for controller files), improved verbose diagnostic messages, and moved a few things out of the global and preprocessor namespaces. docs: Added documentation for some controller configuration file features. The device mapping feature documentation will be merged in at some point. util/unicode.cpp, emu/input.cpp: API cleanups.
* Correctly apply -keepaspect with -unevenstretchx/y. (#8209) antonioginer2021-07-021-17/+35
| | | | * Correctly apply -keepaspect with -unevenstretchx/y. Initialize window at the correct size when -intscalex/y is used. * Get correct window size upon maximizing/minimizing with integer scaling.
* Eliminate ARRAY_LENGTH template in favor of C++17's std::size AJR2021-02-141-5/+5
| | | | | | | | | | * osdcomm.h: Move definition of EQUIVALENT_ARRAY to coretmpl.h * sharc.cpp, gt64xxx.cpp, ym2413.cpp, gb_lcd.cpp, snes_ppu.cpp: Use STRUCT_MEMBER for save state registration * gio/newport.cpp, megadrive/svp.cpp, nes_ctrl/bcbattle.cpp, arm7.cpp, tms9995.cpp, pckeybrd.cpp, sa1110.cpp, sa1111.cpp, jangou_blitter.cpp, vic4567.cpp: Use std::fill(_n) instead of memset * emucore.h: Remove obsolete typedef
* Use std::clamp in various core functions AJR2021-02-031-2/+2
|
* Much more core std::string_view modernization AJR2021-01-201-0/+1
| | | | | | | | | | | | | | | - Remove corestr.h from emu.h; update a few source files to not use it at all - Change strtrimspace, strtrimrightspace and core_filename_extract_* to be pure functions taking a std::string_view by value and returning the same type - Change strmakeupper and strmakelower to be pure functions taking a std::string_view and constructing a std::string - Remove the string-modifying version of zippath_parent - Change tag-based lookup functions in device_t to take std::string_view instead of const std::string & or const char * - Remove the subdevice tag cache from device_t (since device finders are now recommended) and replace it with a map covering directly owned subdevices only - Move the working directory setup method out of device_image_interface (only the UI seems to actually use the full version of this) - Change output_manager to use std::string_view for output name arguments - Change core_options to accept std::string_view for most name and value arguments (return values are still C strings for now) - Change miscellaneous other functions to accept std::string_view arguments - Remove a few string accessor macros from romload.h - Remove many unnecessary c_str() calls from logging/error messages
* render.h, rendlay.h: Dependency refactoring AJR2021-01-041-25/+22
| | | | | - render.h: Split out layout class declarations into rendlay.h, with some adjustments for the resulting incomplete types (std::reference_wrapper unfortunately does not allow these by C++17 rules) - rendlay.h: Move old header contents to layout/generic.h
* Fix some oversights and emergent behaviour with view selection. Vas Crabb2020-12-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Exposed the "native snapview" option on the video manager. Trying to use presence of a single view is a poor proxy that breaks with multi-screen systems. Allow rotation to be changed for native snapshot views, and disable the zoom to screen area control when it has no effect on the selected view. Treat an empty string identically to "auto" for view selectction. Previously this was being used for prefix matching so it would force the first view. (This caused the bad snapshot view selection. It had been relying on "internal" not being a common view name prefix so it fell through to automatic selection, but when changed to an empty string it forced the first view.) Documented "auto" as well as "native" for the -snapview option and changed the default to auto rather than an empty string for consistency with the -viewN options. Added [w]string_view handlers to the stuff that's instantiated in strformat.cpp since we'll be increasingly using them. Cleaned up and updated some documentation.
* More Lua engine clean-up and documentation, resulting in core cleanup. Vas Crabb2020-12-181-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | More Lua interface cleanup, additional properties and methods, and documentation migration/expansion. Emulated switch inputs can have "not" codes applied to host input axis directions. It works the same way as host switch inputs - push twice for a "not" prefix. Input polling helpers no longer need to store state in the input device items. There’s less leakage, and less chance of things interfering with each other. Allow snapshot view options to be configured through the internal UI via the video options menu. Made video options menus place initial focus on the currently selected view item. Removed some crud from the menu base class. Fixed the description of the "snapview" option. The value to get raw screen pixels was changed to "native" a long time ago but the description was never updated. Re-arranged the Golden Poker button lamps so that the 6-button layouts for Jolli Witch and Wild Witch make sense. In 6-button mode, the hold buttons double as bonus game and bet buttons, but the lamp outputs don't change. The simplest way to deal with this without requiring the user to switch views or using layout scripting is to place the dedicated buttons directly below the hold buttons that correspond to them. Removed some software list data that was redundantly copied into device_image_interface (m_supported was never even set, so it didn't even work), and made crc() work better (previously it wasn't recalculuated after unloading and loading another image). Made strformat.h and devcb.h play nicer with C++17 and pre-standard C++20. Format precision now correctly limits the length of string views. Confirmed that strformat.{h,cpp} works with pre-standard C++20 support in GCC 9. Removed an auto_alloc from cpu/arm7.
* -luaengine.cpp: Clean up render classes and expose screen image adjustments. Vas Crabb2020-12-131-7/+3
| | | | | | | | | | | | | | | | | | | | | * Started moving Lua class reference to docs. Expecting people to find the class reference material in the source isn’t going to help make it approachable. The docs allow longer explanations, better formatting, and cross reference links. * Added another layout scripting example to the docs. -goldnpkr.cpp: Minor clean-up. * Improved the short names for Witch Card and Witch Game clone sets. * Made Witch Up & Down artwork clickable. * Added working Video Klein sets where the parent is a working Video Klein set to the tiny subtarget. * Removed history from the header comment - we have version control for a readon.
* Expose enough of the layout system to Lua to allow position and colour to be ↵ Vas Crabb2020-12-051-0/+1
| | | | animated.
* Fairly significant overhaul of Lua engine and some cleanup. Vas Crabb2020-11-251-17/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The things that were previously called device iterators are not iterators in the C++ sense of the word. This is confusing for newcomers. These have been renamed to be device enumerators. Several Lua methods and properties that previously returned tables now return lightweight wrappers for the underlying objects. This means creating them is a lot faster, but you can't modify them, and the performance characteristics of different operations varies. The render manager's target list uses 1-based indexing to be more like idiomatic Lua. It's now possible to create a device enumerator on any device, and then get subdevices (or sibling devices) using a relative tag. Much more render/layout functionality has been exposed to Lua. Layout scripts now have access to the layout file and can directly set the state of an item with no bindings, or register callbacks to obtain state. Some things that were previously methods are now read-only properties. Layout files are no longer required to supply a "name". This was problematic because the same layout file could be loaded for multiple instances of the same device, and each instance of the layout file should use the correct inputs (and in the future outputs) for the device instance it's associated with. This should also fix video output with MSVC builds by avoiding delegates that return things that don't fit in a register.
* -unidasm: Allow input piped from stdin by specifying a bare hyphen as the ↵ Vas Crabb2020-11-181-1/+1
| | | | | | | | | | filename. [AJR, Vas Crabb] -netlist: Give devices the C++17 namespace treatment. -Tidied up compiler warning options for 3rdparty. -emu/render.cpp: Exposed a few information view item properties.
* rendlay.cpp: Set initial value for bounds callback, it can be called before ↵ Vas Crabb2020-11-131-2/+2
| | | | tags are resolved.
* -render.cpp: Fixed issue causing elements to be clipped on bottom/right. Vas Crabb2020-10-141-9/+3
| | | | | | -rendlay.cpp: Tidied up and optimised ellipse drawing code a little. -Reduced space between LEDs on several systems with matrix displays.
* -emu/render.cpp: Load from all external artwork paths. Vas Crabb2020-10-131-38/+36
| | | | | | -emu/rendlay.cpp: Made real component drawing code a bit less gross. -emu/debugcon.cpp: Less screaming now that things aren't macros.
* Various improvements to image file handling: Vas Crabb2020-10-081-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | Moved MS DIB parser out of ICO file reader and made it available for artwork and layout images. Added more efficient I/O and better error checking for JPEG file loading (MAME will no longer exit immediately on a bad JPEG file). Made caller responsible for opening files for loading images, to avoid decompressing images used in ZIP/7z artwork multiple times. Added support for JPEG and Windows DIB to picture_image_device. Added support for SVG image files in external artwork. Added support for using I/O port value for animation state and masking animation state values. Made bounds elements more flexible in layouts. Reworked headers to reduce dependencies. Updated layout file format documentation.
* -emu/rendlay.cpp: Allow item animation. Vas Crabb2020-10-051-17/+19
| | | | -cgang.cpp: Make internal artwork more fun.
* emu/rendlay.cpp: Pre-load image components when changing video options. Vas Crabb2020-10-031-27/+32
|
* emu/render.cpp: Consider that screens can be hidden when choosing a default ↵ Vas Crabb2020-10-031-18/+15
| | | | view.
* Got rid of global_alloc/global_free. Vas Crabb2020-10-031-36/+22
| | | | | | | | | | | | | | | | | | | | | | | | | The global_alloc/global_free functions have outlived their usefulness. They don't allow consistently overriding the default memory allocation behaviour because they aren't used consistently, and we don't have standard library allocator wrappers for them that we'd need to use them consistently with all the standard library containers we're using. If you need to change the default allocator behaviour, you can override the new/delete operators, and there are ways to get more fine-grained control that way. We're already doing that to pre-fill memory in debug builds. Code was already starting to depend on global_alloc/global_free wrapping new/delete. For example some parts of the code (including the UI and Windows debugger) was putting the result of global_alloc in a std::unique_ptr wrappers without custom deleters, and the SPU sound device was assuming it could use global_free to release memory allocated with operator new. There was also code misunderstanding the behaviour of global_alloc, for example the GROM port cartridge code was checking for nullptr when a failure will actually throw std::bad_alloc. As well as substituting new/delete, I've made several things use smart pointers to reduce the chance of leaks, and fixed a couple of leaks, too.
* Cleaned up bitmap API. Vas Crabb2020-09-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Made const-qualified pixel accessors (pix, pixt, raw_pixptr) return const-qualified references/pointers to pixesl, and added non-const versions. This makes bitmap more like standard library containers where const protects the content as well as the dimensions. Made the templated pixt accessor protected - having it public makes it too easy to inadvertently get a pointer to the wrong location. Removed the pix(8|16|32|64) accessors from the specific bitmaps. You could only use the "correct" one anyway, and having the "incorrect" ones available prevented explicit instantiations of the class template because the static assertions would fail. You can still see the pixel type in the bitmap class names, and you can't assign the result of &pix(y, x) to the wrong kind of pointer without a cast. Added fill member functions to the specific bitmap template, and added a explicit instantiations. This allows the bitmap size check to be skipped on most bitmap fills, although the clipping check is still there. Also fixed a couple of places that were trying to fill an indexed 16-bit bitmap with rgb_t::black() exposed by this (replaced with zero to get the same net effect). The explicit template instantiations in the .cpp file mean the compiler can inline the function if necessary, but don't need to generate a local out-of-line body if it chooses not to. Extended the size of the fill value parameter in the base bitmap class to 64 bits so it works correctly for 64-bit bitmaps. Fixed places where IE15 and VGM visualiser weren't accounting for row bytes potentially being larger than width. Fixed an off-by-one in an HP-DIO card where it was treating the Topcat cursor right edge as exclusive. Updated everything to work with the API changes, reduced the scope of many variables, added more const, and replaced a few fill/copy loops with stuff from <algorithm>.
* emu/rendlay.cpp: Added parameter animation and state masks. Vas Crabb2020-09-161-4/+2
| | | | | | | | | | | | | | | | | | | Components may have multiple bounds and/or color child elements with state attributes, allowing for piecewise linear position/size/colour animation. Components may have a statemask attribute, allowing for things like using external images to draw a multi-segment LED/VFD display without requiring dozens of outputs for the individual lines or thousands of images for all possible states. (Texture caching still never releases anything, so MAME can still exceed the maximum number of textures, but that’s a separate issue.) Image components with alpha now blend over previously drawn components. Layouts have been changed to use yes/no for inputraw to match what's used for flipx/flipy. External layouts with 1/0 will still work, but complay.py will complain.
* emu/render.cpp: Apply target orientation when mapping points to layout elements. Vas Crabb2020-09-121-76/+115
| | | | | | | | | Addresses MT07375. Also increase efficiency when layouts contain large numbers of non-interactive elements (e.g. thousands of matrix display dots). Also includes work in progress for future improvements.
* -Fixed issue that automatically generated unnecessary internal views. Vas Crabb2020-09-071-2/+13
| | | | | | | -Updated a few more internal layouts, mostly bezel-only ones. * brkball wasn't using the DMD dots at all (it has a screen). * The Aristocrat layouts could use collections to allow buttons and tower lamps to be enabled/disabled independently.
* Finished adding new mechanism for allowing parts of views to be hidden. Vas Crabb2020-09-071-28/+21
| | | | | | | | | | | | | | | | | | | | | | Changed name of element to "collection" and initial visibility attribute to "visible", and added them to documentation. Also added them to complay.py. Fixed issue with collection inside group, and improved initial view selection behaviour. Updated some internal layouts to demonstrate new features, including et3400, irrmaze, ltcasino, mekd3/mekd4, seawolf and vgmplay. Removed all uses of cpanel, marquee and overlay from internal layouts and removed them from complay.py to actively discourage use. Also cleaned up view names in layouts that were using them in place of spaces, and removed some superfluous name attributes on elements that won't do anything useful with an output value anyway. Made vgmplay cycle visualiser modes when visualiser screen is clicked. Fixed a copy/paste error in bus/rs232/hlemouse.cpp while I'm at it.
* render.cpp: May need to recompute selected view when loading visibility ↵ Vas Crabb2020-09-061-0/+3
| | | | toggle configuration.
* -util/xmlfile: Escape attribute and element content. Vas Crabb2020-09-061-120/+196
| | | | | | | | | | | | | | | | | | | | The previous behaviour was unintuitive - parsing an XML file and writing it out immediately would produce invalid XML if the file contained any characters that needed escaping. It makes far more sense to escape on writing rather than expecting the user to escape input. -Add preliminary support for visibility toggles to artwork system. This allows the user to show/hide related elements in a view, with nesting. The view can specify whether elements are shown or hidden by default. Settings are saved per host window/screen per view. There is no way to set the initial visibility state on the command line. Legacy "Space Invaders cabinet model" layers are mapped onto visibility toggles. This is not stable yet. In particular, the XML element/attribute names have not been finalised. The new features have not been added to complay.py to prevent them from being used before they're finalised.