From c2d4e3c018051e9a850e9da80431a0ec1c0ca5a8 Mon Sep 17 00:00:00 2001 From: ImJezze Date: Sun, 13 Mar 2016 17:11:08 +0100 Subject: Cleanup (nw) - options are reset to loaded preset when game is closed - changed default values of options to result in no effects activated - init_slider_list() does not returns but sets g_slider_list directly - removed unnecessary oriented_vector_texcoords --- src/emu/render.cpp | 34 +++++++--------------------------- 1 file changed, 7 insertions(+), 27 deletions(-) (limited to 'src/emu/render.cpp') diff --git a/src/emu/render.cpp b/src/emu/render.cpp index 0a7fc00c151..04ffe6add60 100644 --- a/src/emu/render.cpp +++ b/src/emu/render.cpp @@ -102,7 +102,7 @@ struct object_transform // GLOBAL VARIABLES //************************************************************************** -// precomputed UV coordinates for raster primitive with various orientations +// precomputed UV coordinates for various orientations static const render_quad_texuv oriented_texcoords[8] = { { { 0,0 }, { 1,0 }, { 0,1 }, { 1,1 } }, // 0 @@ -115,12 +115,6 @@ static const render_quad_texuv oriented_texcoords[8] = { { 1,1 }, { 1,0 }, { 0,1 }, { 0,0 } } // ORIENTATION_SWAP_XY | ORIENTATION_FLIP_X | ORIENTATION_FLIP_Y }; -// precomputed UV coordinates for vector primitive -static const render_quad_texuv oriented_vector_texcoords[1] = -{ - { { 0,0 }, { 1,0 }, { 0,1 }, { 1,1 } } -}; - // layer orders static const int layer_order_standard[] = { ITEM_LAYER_SCREEN, ITEM_LAYER_OVERLAY, ITEM_LAYER_BACKDROP, ITEM_LAYER_BEZEL, ITEM_LAYER_CPANEL, ITEM_LAYER_MARQUEE }; static const int layer_order_alternate[] = { ITEM_LAYER_BACKDROP, ITEM_LAYER_SCREEN, ITEM_LAYER_OVERLAY, ITEM_LAYER_BEZEL, ITEM_LAYER_CPANEL, ITEM_LAYER_MARQUEE }; @@ -1776,28 +1770,14 @@ void render_target::add_container_primitives(render_primitive_list &list, const ? PRIMFLAG_BLENDMODE(blendmode) : PRIMFLAG_BLENDMODE(PRIMFLAG_GET_BLENDMODE(curitem->flags())); } - else if (curitem->flags() & PRIMFLAG_VECTORBUF_MASK) - { - // 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); - - // determine UV coordinates - prim->texcoords = oriented_vector_texcoords[0]; - - // apply clipping - clipped = render_clip_quad(&prim->bounds, &cliprect, &prim->texcoords); - - // no texture - prim->texture.base = nullptr; - - // set the basic flags - prim->flags = (curitem->flags() & ~PRIMFLAG_BLENDMODE_MASK) - | PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA); - } 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); -- cgit v1.2.3-70-g09d2