summaryrefslogtreecommitdiffstats
path: root/src/emu/render.cpp
diff options
context:
space:
mode:
author Antonio Giner <estudio@antonioginer.com>2016-03-18 22:41:17 +0100
committer Antonio Giner <estudio@antonioginer.com>2016-03-18 22:41:17 +0100
commite39daaf5bdcf21d64abf239e1133963643dc6df1 (patch)
tree1f1b5f333e84bf056ce82c27bebdbad933f26c0d /src/emu/render.cpp
parent421656e108e7091ee9e1b14c84f0a3f6efc2ad2e (diff)
parentb79020559ea3617b2d6bd4c92041d314045e2938 (diff)
Merge remote-tracking branch 'refs/remotes/mamedev/master'
Diffstat (limited to 'src/emu/render.cpp')
-rw-r--r--src/emu/render.cpp30
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);