diff options
Diffstat (limited to 'src/emu/render.cpp')
-rw-r--r-- | src/emu/render.cpp | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/src/emu/render.cpp b/src/emu/render.cpp index ec84b67a741..abe7ee87cc7 100644 --- a/src/emu/render.cpp +++ b/src/emu/render.cpp @@ -1768,29 +1768,39 @@ void render_target::add_container_primitives(render_primitive_list &list, const // set the palette prim->texture.palette = curitem->texture()->get_adjusted_palette(container); - // determine UV coordinates and apply clipping + // determine UV coordinates prim->texcoords = oriented_texcoords[finalorient]; + + // apply clipping clipped = render_clip_quad(&prim->bounds, &cliprect, &prim->texcoords); // apply the final orientation from the quad flags and then build up the final flags - prim->flags = (curitem->flags() & ~(PRIMFLAG_TEXORIENT_MASK | PRIMFLAG_BLENDMODE_MASK | PRIMFLAG_TEXFORMAT_MASK)) | - PRIMFLAG_TEXORIENT(finalorient) | - PRIMFLAG_TEXFORMAT(curitem->texture()->format()); - if (blendmode != -1) - prim->flags |= PRIMFLAG_BLENDMODE(blendmode); - else - prim->flags |= PRIMFLAG_BLENDMODE(PRIMFLAG_GET_BLENDMODE(curitem->flags())); + prim->flags = (curitem->flags() & ~(PRIMFLAG_TEXORIENT_MASK | PRIMFLAG_BLENDMODE_MASK | PRIMFLAG_TEXFORMAT_MASK)) + | PRIMFLAG_TEXORIENT(finalorient) + | PRIMFLAG_TEXFORMAT(curitem->texture()->format()); + prim->flags |= blendmode != -1 + ? PRIMFLAG_BLENDMODE(blendmode) + : PRIMFLAG_BLENDMODE(PRIMFLAG_GET_BLENDMODE(curitem->flags())); } else { + if (curitem->flags() & PRIMFLAG_VECTORBUF_MASK) + { + // determine UV coordinates + prim->texcoords = oriented_texcoords[0]; + } + // adjust the color for brightness/contrast/gamma prim->color.r = container.apply_brightness_contrast_gamma_fp(prim->color.r); prim->color.g = container.apply_brightness_contrast_gamma_fp(prim->color.g); prim->color.b = container.apply_brightness_contrast_gamma_fp(prim->color.b); - // no texture -- set the basic flags + // no texture prim->texture.base = nullptr; - prim->flags = (curitem->flags() &~ PRIMFLAG_BLENDMODE_MASK) | PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA); + + // set the basic flags + prim->flags = (curitem->flags() & ~PRIMFLAG_BLENDMODE_MASK) + | PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA); // apply clipping clipped = render_clip_quad(&prim->bounds, &cliprect, nullptr); |