summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/render.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2020-09-16 02:55:04 +1000
committer Vas Crabb <vas@vastheman.com>2020-09-16 02:55:04 +1000
commit6adc5080154819eb7543cb35328082280804fb07 (patch)
tree7212c7a3869d9d3c6b92a955b0d856f20b08b0a6 /src/emu/render.cpp
parent523b1f11cffd7bfebb8ed0a7f35204f871dadeb0 (diff)
emu/rendlay.cpp: Added parameter animation and state masks.
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.
Diffstat (limited to 'src/emu/render.cpp')
-rw-r--r--src/emu/render.cpp6
1 files changed, 2 insertions, 4 deletions
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);