Commit Graph

56 Commits

Author SHA1 Message Date
Vas Crabb
c38a3395e9 Make layout format more flexible:
* There is no longer a concept of "layers" - there are only screens and elements.
* Elements are now instantiated with <element ref="...">
* Screens and elements can have explicit blending mode specified with blend="..."
* Default blending mode for screens is "add" and default for other elements is "alpha"
* Other supported modes are "none" and "multiply"
* This removes the options to enable/disable layers individually - use views instead
* Legacy layouts can still be loaded, and support won't be removed for at least a year

The current artwork model is over-stretched.  It's based on a Space
Invaders cabinet model, and isn't applicable to a lot of the systems
MAME emulates now.  The fact that MAME has to switch to an "alternate"
mode to deal with games like Golly! Ghost! without requiring pre-matted
bitmaps shows that the Space Invaders model wasn't even adequate for
general arcade use.  It shows in that for a lot of the systems that
heavily depend on artwork, people just seem to randomly choose layers
for elements until they get something that works.  Also, the fact that
MAME will switch to an alternate (Golly! Ghost!) mode depending on the
combination of elements is a trap for people learning to make artwork.

There are cases that the current approach of implying the blending mode
from the layer doesn't work with.  Examples include LEDs behind
diffusers (requires additive blending for layout elements), and mutliple
stacked LCD panels (requires RGB multiplication for screens).

For configurability, it's now a lot easier to make multiple views using
groups.  For example, if you want to make it possible to hide the
control panel section of your layout, you can put the control panel
elements in a group and create views with and without it.

I will gradually migrate the internal artwork to use the new approach.
I have an XSLT stylesheet that helps with this, but I'm not comfortable
adding it because it isn't a complete solution and it still requires
manul steps.

I wanted to get the re-worked pointer handling done sooner so I could
push them both at the same time, but unfortunately various things have
prevented me from progressing as quickly as I wanted to.  Sorry guys,
that stuff's going to have to wait.
2019-07-06 00:23:20 +10:00
Vas Crabb
97b6717027 (nw) Clean up the mess on master
This effectively reverts b380514764 and
c24473ddff, restoring the state at
598cd52272.

Before pushing, please check that what you're about to push is sane.
Check your local commit log and ensure there isn't anything out-of-place
before pushing to mainline.  When things like this happen, it wastes
everyone's time.  I really don't need this in a week when real work™ is
busting my balls and I'm behind where I want to be with preparing for
MAME release.
2019-03-26 11:13:37 +11:00
andreasnaive
b380514764 Revert "conflict resolution (nw)"
This reverts commit c24473ddff, reversing
changes made to 009cba4fb8.
2019-03-25 23:13:40 +01:00
hap
465f5d42aa complay: spaces instead of tabs for indentation? (nw) 2019-03-24 22:48:13 +01:00
hap
5ec1befa63 complay: add inputraw (nw) 2019-03-24 22:43:46 +01:00
Vas Crabb
6ea9ff9042 (nw) Further layout work:
* Allow <orientation> and <color> to work on group references
* Fix some corner cases where group bounds could be miscalculated
* Fix a corner case where MAME could incorrectly refuse to instantiate groups
* Add more checks to complay.py
* Document more of the layout format
2018-08-02 23:11:17 +10:00
Vas Crabb
0ce07a8a1e (nw) more render work:
* Clean up some corner cases in layouts with repeating blocks
* Make complay.py validate many more elements and attributes
* Make complay.py easier to use for just validating a layout
* Remove redundant view from Sega VMU layout
* Make buttons visually respond to input in whousetc.lay
* Add view with LED displays as well as terminal for aim65_40 and use repeats
* Clean up some outdated "game" terminology in clifront.cpp
* Initiaise a couple of members in tap/tun network module
* Start documenting layout format
2018-07-31 04:18:28 +10:00
Vas Crabb
6669489679 allow repeating elements and groups - useful if you need e.g. a lot of numbered labels, but it limits complay.py's ability to check for invalid references as it can't evaluate expressions (nw) 2018-07-22 09:52:50 +10:00
Vas Crabb
dce955c68d rendlay: allow user variables and repetition in layouts, also add a few more predefined variables 2018-07-22 03:22:31 +10:00
Vas Crabb
f18c7cd65f Allow per-device internal layouts and remove some more MCFG_ macros.
Input and screen tags are now resolved relative to a layout's owner
device.

Easy way to demonstrate is with: mame64 intlc440 -tty ie15

Previously you'd only get the IE15 terminal's layout and you'd be unable
to use the INTELLEC 4/40 front panel.  Now you'll get the choice of
layouts from both the system and the terminal device in video options.
2018-07-16 16:26:01 +10:00
Vas Crabb
82c6d7dbc5 Allow layouts to specify screen tags rather than indices - makes order of instantiation irrelevant in Model 1 etc. 2018-07-10 04:26:57 +10:00
smf-
78f0aff27f Apply same flags when building with SOURCES= as when building normally. This fixes the issue which prompted "model1: clear up some memory issues with very recent gcc (nw)" (which only occurred in a SOURCES= build). (nw) 2018-03-15 15:54:37 +00:00
Julian Sikorski
eba66fbab8 Fix build failure with SOURCES defined (#3187)
* Fixed building using system utf8proc

* Fixed building using system portaudio

* Allow using system-wide asio headers (1.11.0 or higher required).

* Allow using system-wide glm headers

* Allow using system-wide rapidjson headers

* Put all ext_includedir calls together

* Fixed build failure when SOURCES is defined
2018-02-10 22:58:29 +01:00
hap
2069183658 doc: update MAME short description (nw) 2017-11-05 18:12:28 +01:00
hap
2c1b285889 windows rc: use emulator name for description (this is the application title that shows up on task manager for example) (nw) 2017-11-05 14:58:09 +01:00
hap
7d7c2c5507 make emulator description generic (nw) 2017-11-05 01:50:16 +01:00
Vas Crabb
3a5c5d15c7 Add support for layout item groups, replace simple_list with more
appropriate containers, remove misleading const qualifiers, reduce
repeated XML walking.

(nw) Groups aren't parameterised, so they aren't as useful as they could
be (yes, it's on my TODO list).  However, it's already useful for
putting a common set of elements in multiple views, potentially at
different locations/scales.  See intlc44.lay and intlc440.lay for
examples of the level of copypasta this can eliminate.  Be aware that
groups with explicit bounds don't clip thair content, it's only used for
calucating the transform matrix.
2017-07-29 15:17:14 +10:00
Vas Crabb
3353592d00 remove vestigial exception class (nw) 2017-07-11 03:00:24 +10:00
Vas Crabb
9ed831e0a6 (nw) notes, coverity complaints, INTELLEC 4/MOD 4 layout, detect duplicate bounds/color in layouts 2017-07-09 01:50:54 +10:00
Vas Crabb
1eb3ffe15c work around python version differences (nw) 2017-07-09 00:12:58 +10:00
Vas Crabb
d97c4f9d9f Do substantial validation of internal layouts at build time 2017-07-08 18:30:43 +10:00
Vas Crabb
fb087b6c92 Cherry-pick some features from self-registering drivers PoC:
* Use size_t for sizes and <algorithm> for algorithms
* Fix up some files that were getting linked into multiple libs
* Add missing virtual method to sh2 peripheral class
* Put shortname in driver struct for locality
* Use shared pointers in config LRU cache for safety
2017-02-16 12:20:35 +11:00
Vas Crabb
be26ac9abf coretmpl: add an associative LRU cache with map-like behaviour
selmenu: use LRU cache so icons don't all need to be reloaded on scroll

uismall.bdf: set default character for missing glyphs

rendfont.cpp:
* encapsulate many BDF and BDC handling details
* make file I/O 64-bit clean, check for allocation errors
* more solid BDF parser with error messages and trace logging
* fix heap smash when building bitmaps for BDF fonts
* extend BDC format to support high planes and default character
* render default character if glyph not found for BDF/BDC
2016-12-15 17:00:34 +11:00
Miodrag Milanovic
d718d3cc3d Made ldplayer regular driver, same as vgmplay (nw) 2016-11-23 14:26:04 +01:00
Vas Crabb
19621e2156 python why are you incompatible (nw) 2016-11-23 07:53:30 +11:00
Vas Crabb
5eefcfdb68 Rewrite complay.py to parse/minify layout XML
Doesn't make much difference to executable size, but it catches XML errors at build time rather than waiting for you to try the system (nw)
2016-11-20 20:54:10 +11:00
Miodrag Milanovic
ddb290d5f6 NOTICE (TYPE NAME CONSOLIDATION)
Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8
also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
2016-10-22 13:13:17 +02:00
Miodrag Milanovic
4f84793a05 made proper formats compiled only if needed (nw) 2016-08-12 18:27:54 +02:00
Miodrag Milanovic
99f69920ac Fix dependency resolving (nw) 2016-05-01 11:01:27 +02:00
Mike Naberezny
b4408c2906 complay.py: Python 3 compat. (nw) 2016-03-30 21:06:12 -07:00
Miodrag Milanovic
9353a1ccb3 Compressed internal layouts [David Haywood] 2016-03-30 20:40:05 +02:00
Miodrag Milanovic
fe5c894890 added line back removed by mistake (nw) 2016-03-29 15:48:24 +02:00
Miodrag Milanovic
5cab7dbd8b fix per source build (nw) 2016-03-29 10:58:01 +02:00
balr0g
822c2689b0 (nw) 2016-03-26 09:53:59 -04:00
balr0g
22e5ebfbe2 Proper msgfmt fix for Python 2.6 (nw) 2016-03-26 09:46:01 -04:00
balr0g
4a47aa234e oops (nw) 2016-03-26 09:02:41 -04:00
balr0g
1f6688b967 Bugfixes to msgfmt, charset parsing broken on Python 2.6 for inexplicable reasons but does not cause failure (nw) 2016-03-26 09:01:45 -04:00
balr0g
b79f9db981 (nw) 2016-03-25 15:48:57 -04:00
balr0g
9fbc939781 Make msgfmt also Python2 compatible and fix several bugs (nw) 2016-03-25 15:42:35 -04:00
balr0g
66e5f75c22 Import current msgfmt.py from Python 3 tree (nw) 2016-03-25 15:42:35 -04:00
balr0g
ee68c9aab3 Convert msgfmt script to UTF-8 (nw) 2016-03-24 09:40:23 -04:00
Jeffrey Clark
b1182ed63b fix build errors (nw) 2016-03-05 14:37:49 -06:00
Miodrag Milanovic
6cc3a6cc90 Support for filtering exceptions (nw) 2016-03-05 11:55:22 +01:00
Miodrag Milanovic
b489eb202c made sources build use info from mame.lst (nw) 2016-03-02 14:21:26 +01:00
Miodrag Milanovic
8a84dd2232 Added mame.lst as main list, it is now generated, and should be updated manually (nw)
Filtering for subtargets are done by flt files now
2016-03-02 12:49:37 +01:00
Olivier Galibert
9740102e64 fix makedep when encoutering GAMEL (nw) 2016-02-23 19:26:50 +01:00
Miodrag Milanovic
be7cc43b08 Placed official version, and removed other files since work only with parsing python (nw) 2016-02-21 14:45:38 +01:00
Miodrag Milanovic
78ada55150 Add other python tools for gettext replacement (nw) 2016-02-21 14:16:28 +01:00
Miodrag Milanovic
cc687bcd95 Added python replacement for msgfmt (nw) 2016-02-21 14:09:48 +01:00
Miodrag Milanovic
f5e8c864c2 fix issue with SOURCES=src/mame/drivers/namcops2.cpp (nw) 2016-02-13 19:54:01 +01:00