summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/render.h
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-09-29 08:02:58 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-09-29 08:02:58 +0000
commit296347baab97261f619af60b114ad1e17e48fcd8 (patch)
tree90ae7f9571afbb410dae51044331729658e63e4c /src/emu/render.h
parentef2fa89e4417b3b6d2f722a6552cc1160013201a (diff)
Plumbed machine parameters through the renderer. Removed need for
deprecat.h. Changed render_texture_set_bitmap() to accept a palette object instead of a palette index. The renderer remains optimized for the system palette but will work if objects have their own palette as well. Changed renderer to permit palettes for RGB and YUY textures. If specified, these palettes specify a 32-entry (RGB15) or 256-entry (others) lookup for applying additional brightness/contrast/gamma on a per-texture basis. Removed rescale notification. It never really worked that well and violated proper layering. Renamed palette_set_brightness() to palette_set_pen_contrast() for clarity. Changed palette objects to support global brightness/contrast/gamma in addition to per-group and per-entry controls.
Diffstat (limited to 'src/emu/render.h')
-rw-r--r--src/emu/render.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/emu/render.h b/src/emu/render.h
index 1fee7b48b28..f8f61531f28 100644
--- a/src/emu/render.h
+++ b/src/emu/render.h
@@ -88,22 +88,22 @@ enum
/* texture formats */
enum
{
- TEXFORMAT_UNDEFINED = 0, /* require a format to be specified */
- TEXFORMAT_PALETTE16, /* 16bpp palettized, alpha ignored */
- TEXFORMAT_PALETTEA16, /* 16bpp palettized, alpha respected */
- TEXFORMAT_RGB15, /* 16bpp 5-5-5 RGB */
- TEXFORMAT_RGB32, /* 32bpp 8-8-8 RGB */
- TEXFORMAT_ARGB32, /* 32bpp 8-8-8-8 ARGB */
- TEXFORMAT_YUY16 /* 16bpp 8-8 Y/Cb, Y/Cr in sequence */
+ TEXFORMAT_UNDEFINED = 0, /* require a format to be specified */
+ TEXFORMAT_PALETTE16, /* 16bpp palettized, alpha ignored */
+ TEXFORMAT_PALETTEA16, /* 16bpp palettized, alpha respected */
+ TEXFORMAT_RGB15, /* 16bpp 5-5-5 RGB */
+ TEXFORMAT_RGB32, /* 32bpp 8-8-8 RGB */
+ TEXFORMAT_ARGB32, /* 32bpp 8-8-8-8 ARGB */
+ TEXFORMAT_YUY16 /* 16bpp 8-8 Y/Cb, Y/Cr in sequence */
};
/* blending modes */
enum
{
- BLENDMODE_NONE = 0, /* no blending */
- BLENDMODE_ALPHA, /* standard alpha blend */
- BLENDMODE_RGB_MULTIPLY, /* apply source alpha to source pix, then multiply RGB values */
- BLENDMODE_ADD /* apply source alpha to source pix, then add to destination */
+ BLENDMODE_NONE = 0, /* no blending */
+ BLENDMODE_ALPHA, /* standard alpha blend */
+ BLENDMODE_RGB_MULTIPLY, /* apply source alpha to source pix, then multiply RGB values */
+ BLENDMODE_ADD /* apply source alpha to source pix, then add to destination */
};
@@ -350,7 +350,7 @@ int render_input_hit_test(render_target *target, INT32 target_x, INT32 target_y,
/* ----- render target management ----- */
/* allocate a new render target */
-render_target *render_target_alloc(const char *layout, UINT32 flags);
+render_target *render_target_alloc(running_machine *machine, const char *layout, UINT32 flags);
/* free memory for a render target */
void render_target_free(render_target *target);
@@ -424,7 +424,7 @@ render_texture *render_texture_alloc(texture_scaler_func scaler, void *param);
void render_texture_free(render_texture *texture);
/* set a new source bitmap */
-void render_texture_set_bitmap(render_texture *texture, bitmap_t *bitmap, const rectangle *sbounds, UINT32 palettebase, int format);
+void render_texture_set_bitmap(render_texture *texture, bitmap_t *bitmap, const rectangle *sbounds, int format, palette_t *palette);
/* generic high quality resampling scaler */
void render_texture_hq_scale(bitmap_t *dest, const bitmap_t *source, const rectangle *sbounds, void *param);