diff options
| author | 2015-02-23 14:51:32 -0500 | |
|---|---|---|
| committer | 2015-02-23 14:51:32 -0500 | |
| commit | afa3796da8fea3b7acff8bcafb7c413db2da23ae (patch) | |
| tree | df55385d47b1433750628eba82d8db3c4223455f /src/osd | |
| parent | 9c92d07fb57bda853f5ef0939197f676c579960f (diff) | |
render.c: render_containers now always make their own copy of the emulation palette for paletted textures, whether or not there are custom brightness/contrast/gamma settings. Fixes -mt color issues in driftout, raphero, etc. without the additional complexity introduced in fde220f4a7e955343c3b25a562d6884f94c63bdc (which has been reverted) (nw)
Diffstat (limited to 'src/osd')
| -rw-r--r-- | src/osd/sdl/blit13.h | 4 | ||||
| -rw-r--r-- | src/osd/sdl/draw13.c | 4 | ||||
| -rw-r--r-- | src/osd/sdl/drawogl.c | 18 | ||||
| -rw-r--r-- | src/osd/windows/drawd3d.c | 14 |
4 files changed, 20 insertions, 20 deletions
diff --git a/src/osd/sdl/blit13.h b/src/osd/sdl/blit13.h index 1fe4eb4aeb2..ad935941036 100644 --- a/src/osd/sdl/blit13.h +++ b/src/osd/sdl/blit13.h @@ -139,7 +139,7 @@ struct blit_texcopy : public blit_base blit_texcopy() : blit_base(sizeof(_dest_type) / _len_div, false, false) { } void texop(const texture_info *texture, const render_texinfo *texsource) const { - ATTR_UNUSED const rgb_t *palbase = texsource->palette(); + ATTR_UNUSED const rgb_t *palbase = texsource->palette; int x, y; /* loop over Y */ for (y = 0; y < texsource->height; y++) { @@ -166,7 +166,7 @@ struct blit_texrot : public blit_base blit_texrot() : blit_base(sizeof(_dest_type), true, false) { } void texop(const texture_info *texture, const render_texinfo *texsource) const { - ATTR_UNUSED const rgb_t *palbase = texsource->palette(); + ATTR_UNUSED const rgb_t *palbase = texsource->palette; int x, y; const quad_setup_data *setup = &texture->m_setup; int dudx = setup->dudx; diff --git a/src/osd/sdl/draw13.c b/src/osd/sdl/draw13.c index 25579aa57c3..d75e2ca0b2b 100644 --- a/src/osd/sdl/draw13.c +++ b/src/osd/sdl/draw13.c @@ -874,7 +874,7 @@ texture_info::texture_info(SDL_Renderer *renderer, const render_texinfo &texsour m_format = SDL_TEXFORMAT_ARGB32; break; case TEXFORMAT_RGB32: - m_format = texsource.palette() ? SDL_TEXFORMAT_RGB32_PALETTED : SDL_TEXFORMAT_RGB32; + m_format = texsource.palette ? SDL_TEXFORMAT_RGB32_PALETTED : SDL_TEXFORMAT_RGB32; break; case TEXFORMAT_PALETTE16: m_format = SDL_TEXFORMAT_PALETTE16; @@ -883,7 +883,7 @@ texture_info::texture_info(SDL_Renderer *renderer, const render_texinfo &texsour m_format = SDL_TEXFORMAT_PALETTE16A; break; case TEXFORMAT_YUY16: - m_format = texsource.palette() ? SDL_TEXFORMAT_YUY16_PALETTED : SDL_TEXFORMAT_YUY16; + m_format = texsource.palette ? SDL_TEXFORMAT_YUY16_PALETTED : SDL_TEXFORMAT_YUY16; break; default: diff --git a/src/osd/sdl/drawogl.c b/src/osd/sdl/drawogl.c index 47dacb01aa9..09bcf9479eb 100644 --- a/src/osd/sdl/drawogl.c +++ b/src/osd/sdl/drawogl.c @@ -1816,7 +1816,7 @@ void sdl_info_ogl::texture_compute_type_subroutine(const render_texinfo *texsour if ( texture_copy_properties[texture->format][SDL_TEXFORMAT_SRC_EQUALS_DEST] && !texture_copy_properties[texture->format][SDL_TEXFORMAT_SRC_HAS_PALETTE] && texture->xprescale == 1 && texture->yprescale == 1 && - !texture->borderpix && !texsource->palette() && + !texture->borderpix && !texsource->palette && texsource->rowpixels <= m_texture_max_width ) { texture->nocopy = TRUE; @@ -2263,7 +2263,7 @@ texture_info *sdl_info_ogl::texture_create(const render_texinfo *texsource, UINT texture->format = SDL_TEXFORMAT_ARGB32; break; case TEXFORMAT_RGB32: - if (texsource->palette() != NULL) + if (texsource->palette != NULL) texture->format = SDL_TEXFORMAT_RGB32_PALETTED; else texture->format = SDL_TEXFORMAT_RGB32; @@ -2275,7 +2275,7 @@ texture_info *sdl_info_ogl::texture_create(const render_texinfo *texsource, UINT texture->format = SDL_TEXFORMAT_PALETTE16A; break; case TEXFORMAT_YUY16: - if (texsource->palette() != NULL) + if (texsource->palette != NULL) texture->format = SDL_TEXFORMAT_YUY16_PALETTED; else texture->format = SDL_TEXFORMAT_YUY16; @@ -2717,23 +2717,23 @@ static void texture_set_data(texture_info *texture, const render_texinfo *texsou switch (PRIMFLAG_GET_TEXFORMAT(flags)) { case TEXFORMAT_PALETTE16: - copyline_palette16((UINT32 *)dst, (UINT16 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette(), texture->borderpix, texture->xprescale); + copyline_palette16((UINT32 *)dst, (UINT16 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette, texture->borderpix, texture->xprescale); break; case TEXFORMAT_PALETTEA16: - copyline_palettea16((UINT32 *)dst, (UINT16 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette(), texture->borderpix, texture->xprescale); + copyline_palettea16((UINT32 *)dst, (UINT16 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette, texture->borderpix, texture->xprescale); break; case TEXFORMAT_RGB32: - copyline_rgb32((UINT32 *)dst, (UINT32 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette(), texture->borderpix, texture->xprescale); + copyline_rgb32((UINT32 *)dst, (UINT32 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette, texture->borderpix, texture->xprescale); break; case TEXFORMAT_ARGB32: - copyline_argb32((UINT32 *)dst, (UINT32 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette(), texture->borderpix, texture->xprescale); + copyline_argb32((UINT32 *)dst, (UINT32 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette, texture->borderpix, texture->xprescale); break; case TEXFORMAT_YUY16: - copyline_yuy16_to_argb((UINT32 *)dst, (UINT16 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette(), texture->borderpix, texture->xprescale); + copyline_yuy16_to_argb((UINT32 *)dst, (UINT16 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette, texture->borderpix, texture->xprescale); break; default: @@ -2806,7 +2806,7 @@ static int compare_texture_primitive(const texture_info *texture, const render_p texture->texinfo.width == prim->texture.width && texture->texinfo.height == prim->texture.height && texture->texinfo.rowpixels == prim->texture.rowpixels && - /* texture->texinfo.palette() == prim->texture.palette() && */ + /* texture->texinfo.palette == prim->texture.palette && */ ((texture->flags ^ prim->flags) & (PRIMFLAG_BLENDMODE_MASK | PRIMFLAG_TEXFORMAT_MASK)) == 0) return 1; else diff --git a/src/osd/windows/drawd3d.c b/src/osd/windows/drawd3d.c index d1d209a101c..9fe0a65ea17 100644 --- a/src/osd/windows/drawd3d.c +++ b/src/osd/windows/drawd3d.c @@ -2544,28 +2544,28 @@ void texture_info::set_data(const render_texinfo *texsource, UINT32 flags) switch (PRIMFLAG_GET_TEXFORMAT(flags)) { case TEXFORMAT_PALETTE16: - copyline_palette16((UINT32 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette(), m_xborderpix); + copyline_palette16((UINT32 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette, m_xborderpix); break; case TEXFORMAT_PALETTEA16: - copyline_palettea16((UINT32 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette(), m_xborderpix); + copyline_palettea16((UINT32 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette, m_xborderpix); break; case TEXFORMAT_RGB32: - copyline_rgb32((UINT32 *)dst, (UINT32 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette(), m_xborderpix); + copyline_rgb32((UINT32 *)dst, (UINT32 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette, m_xborderpix); break; case TEXFORMAT_ARGB32: - copyline_argb32((UINT32 *)dst, (UINT32 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette(), m_xborderpix); + copyline_argb32((UINT32 *)dst, (UINT32 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette, m_xborderpix); break; case TEXFORMAT_YUY16: if (m_texture_manager->get_yuv_format() == D3DFMT_YUY2) - copyline_yuy16_to_yuy2((UINT16 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette(), m_xborderpix); + copyline_yuy16_to_yuy2((UINT16 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette, m_xborderpix); else if (m_texture_manager->get_yuv_format() == D3DFMT_UYVY) - copyline_yuy16_to_uyvy((UINT16 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette(), m_xborderpix); + copyline_yuy16_to_uyvy((UINT16 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette, m_xborderpix); else - copyline_yuy16_to_argb((UINT32 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette(), m_xborderpix); + copyline_yuy16_to_argb((UINT32 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette, m_xborderpix); break; default: |
