From 6adc5080154819eb7543cb35328082280804fb07 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Wed, 16 Sep 2020 02:55:04 +1000 Subject: emu/rendlay.cpp: Added parameter animation and state masks. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- src/emu/render.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/emu/render.cpp') diff --git a/src/emu/render.cpp b/src/emu/render.cpp index 221ce9fc929..46123a02b3f 100644 --- a/src/emu/render.cpp +++ b/src/emu/render.cpp @@ -2511,15 +2511,13 @@ void render_target::add_container_primitives(render_primitive_list &list, const void render_target::add_element_primitives(render_primitive_list &list, const object_transform &xform, layout_element &element, int state, int blendmode) { - // if we're out of range, bail - if (state > element.maxstate()) - return; + // limit state range to non-negative values if (state < 0) state = 0; // get a pointer to the relevant texture render_texture *texture = element.state_texture(state); - if (texture != nullptr) + if (texture) { render_primitive *prim = list.alloc(render_primitive::QUAD); -- cgit v1.2.3-70-g09d2