diff options
Diffstat (limited to 'src/emu/drawgfx.h')
-rw-r--r-- | src/emu/drawgfx.h | 252 |
1 files changed, 126 insertions, 126 deletions
diff --git a/src/emu/drawgfx.h b/src/emu/drawgfx.h index 71b480d0b17..762025b48c8 100644 --- a/src/emu/drawgfx.h +++ b/src/emu/drawgfx.h @@ -32,7 +32,7 @@ For example, to draw a sprite that appears over tilemap1, but under opaque pixels of tilemap2, tilemap3, and tilemap4: - UINT32 pmask = GFX_PMASK_2 | GFX_PMASK_4 | GFX_PMASK_8; + uint32_t pmask = GFX_PMASK_2 | GFX_PMASK_4 | GFX_PMASK_8; gfx->prio_transpen(bitmap, cliprect, code, color, flipx, flipy, @@ -74,7 +74,7 @@ a sprite over the first four tilemaps but under the higher numbered ones: - UINT32 pmask = (~1) << 4; + uint32_t pmask = (~1) << 4; gfx->prio_transpen(bitmap, cliprect, code, color, flipx, flipy, @@ -151,48 +151,48 @@ public: #ifdef UNUSED_FUNCTION gfx_element(); #endif - gfx_element(palette_device &palette, const gfx_layout &gl, const UINT8 *srcdata, UINT32 xormask, UINT32 total_colors, UINT32 color_base); - gfx_element(palette_device &palette, UINT8 *base, UINT16 width, UINT16 height, UINT32 rowbytes, UINT32 total_colors, UINT32 color_base, UINT32 color_granularity); + gfx_element(palette_device &palette, const gfx_layout &gl, const uint8_t *srcdata, uint32_t xormask, uint32_t total_colors, uint32_t color_base); + gfx_element(palette_device &palette, uint8_t *base, uint16_t width, uint16_t height, uint32_t rowbytes, uint32_t total_colors, uint32_t color_base, uint32_t color_granularity); // getters palette_device &palette() const { return *m_palette; } - UINT16 width() const { return m_width; } - UINT16 height() const { return m_height; } - UINT32 elements() const { return m_total_elements; } - UINT32 colorbase() const { return m_color_base; } - UINT16 depth() const { return m_color_depth; } - UINT16 granularity() const { return m_color_granularity; } - UINT32 colors() const { return m_total_colors; } - UINT32 rowbytes() const { return m_line_modulo; } + uint16_t width() const { return m_width; } + uint16_t height() const { return m_height; } + uint32_t elements() const { return m_total_elements; } + uint32_t colorbase() const { return m_color_base; } + uint16_t depth() const { return m_color_depth; } + uint16_t granularity() const { return m_color_granularity; } + uint32_t colors() const { return m_total_colors; } + uint32_t rowbytes() const { return m_line_modulo; } bool has_pen_usage() const { return !m_pen_usage.empty(); } // used by tilemaps - UINT32 dirtyseq() const { return m_dirtyseq; } + uint32_t dirtyseq() const { return m_dirtyseq; } // setters - void set_layout(const gfx_layout &gl, const UINT8 *srcdata); - void set_raw_layout(const UINT8 *srcdata, UINT32 width, UINT32 height, UINT32 total, UINT32 linemod, UINT32 charmod); - void set_source(const UINT8 *source); - void set_source_and_total(const UINT8 *source, UINT32 total); - void set_xormask(UINT32 xormask) { m_layout_xormask = xormask; } + void set_layout(const gfx_layout &gl, const uint8_t *srcdata); + void set_raw_layout(const uint8_t *srcdata, uint32_t width, uint32_t height, uint32_t total, uint32_t linemod, uint32_t charmod); + void set_source(const uint8_t *source); + void set_source_and_total(const uint8_t *source, uint32_t total); + void set_xormask(uint32_t xormask) { m_layout_xormask = xormask; } void set_palette(palette_device &palette) { m_palette = &palette; } - void set_colors(UINT32 colors) { m_total_colors = colors; } - void set_colorbase(UINT16 colorbase) { m_color_base = colorbase; } - void set_granularity(UINT16 granularity) { m_color_granularity = granularity; } - void set_source_clip(UINT32 xoffs, UINT32 width, UINT32 yoffs, UINT32 height); + void set_colors(uint32_t colors) { m_total_colors = colors; } + void set_colorbase(uint16_t colorbase) { m_color_base = colorbase; } + void set_granularity(uint16_t granularity) { m_color_granularity = granularity; } + void set_source_clip(uint32_t xoffs, uint32_t width, uint32_t yoffs, uint32_t height); // operations - void mark_dirty(UINT32 code) { if (code < elements()) { m_dirty[code] = 1; m_dirtyseq++; } } + void mark_dirty(uint32_t code) { if (code < elements()) { m_dirty[code] = 1; m_dirtyseq++; } } void mark_all_dirty() { memset(&m_dirty[0], 1, elements()); } - const UINT8 *get_data(UINT32 code) + const uint8_t *get_data(uint32_t code) { assert(code < elements()); if (code < m_dirty.size() && m_dirty[code]) decode(code); return m_gfxdata + code * m_char_modulo + m_starty * m_line_modulo + m_startx; } - UINT32 pen_usage(UINT32 code) + uint32_t pen_usage(uint32_t code) { assert(code < m_pen_usage.size()); if (m_dirty[code]) decode(code); @@ -202,106 +202,106 @@ public: // ----- core graphics drawing ----- // specific drawgfx implementations for each transparency type - void opaque(bitmap_ind16 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty); - void opaque(bitmap_rgb32 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty); - void transpen(bitmap_ind16 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 transpen); - void transpen(bitmap_rgb32 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 transpen); - void transpen_raw(bitmap_ind16 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 transpen); - void transpen_raw(bitmap_rgb32 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 transpen); - void transmask(bitmap_ind16 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 transmask); - void transmask(bitmap_rgb32 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 transmask); - void transtable(bitmap_ind16 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, const UINT8 *pentable); - void transtable(bitmap_rgb32 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, const UINT8 *pentable); - void alpha(bitmap_rgb32 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 transpen, UINT8 alpha); + void opaque(bitmap_ind16 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty); + void opaque(bitmap_rgb32 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty); + void transpen(bitmap_ind16 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, uint32_t transpen); + void transpen(bitmap_rgb32 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, uint32_t transpen); + void transpen_raw(bitmap_ind16 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, uint32_t transpen); + void transpen_raw(bitmap_rgb32 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, uint32_t transpen); + void transmask(bitmap_ind16 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, uint32_t transmask); + void transmask(bitmap_rgb32 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, uint32_t transmask); + void transtable(bitmap_ind16 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, const uint8_t *pentable); + void transtable(bitmap_rgb32 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, const uint8_t *pentable); + void alpha(bitmap_rgb32 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, uint32_t transpen, uint8_t alpha); // ----- zoomed graphics drawing ----- // specific zoom implementations for each transparency type - void zoom_opaque(bitmap_ind16 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley); - void zoom_opaque(bitmap_rgb32 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley); - void zoom_transpen(bitmap_ind16 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, UINT32 transpen); - void zoom_transpen(bitmap_rgb32 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, UINT32 transpen); - void zoom_transpen_raw(bitmap_ind16 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, UINT32 transpen); - void zoom_transpen_raw(bitmap_rgb32 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, UINT32 transpen); - void zoom_transmask(bitmap_ind16 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, UINT32 transmask); - void zoom_transmask(bitmap_rgb32 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, UINT32 transmask); - void zoom_transtable(bitmap_ind16 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, const UINT8 *pentable); - void zoom_transtable(bitmap_rgb32 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, const UINT8 *pentable); - void zoom_alpha(bitmap_rgb32 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, UINT32 transpen, UINT8 alpha); + void zoom_opaque(bitmap_ind16 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, uint32_t scalex, uint32_t scaley); + void zoom_opaque(bitmap_rgb32 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, uint32_t scalex, uint32_t scaley); + void zoom_transpen(bitmap_ind16 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, uint32_t scalex, uint32_t scaley, uint32_t transpen); + void zoom_transpen(bitmap_rgb32 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, uint32_t scalex, uint32_t scaley, uint32_t transpen); + void zoom_transpen_raw(bitmap_ind16 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, uint32_t scalex, uint32_t scaley, uint32_t transpen); + void zoom_transpen_raw(bitmap_rgb32 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, uint32_t scalex, uint32_t scaley, uint32_t transpen); + void zoom_transmask(bitmap_ind16 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, uint32_t scalex, uint32_t scaley, uint32_t transmask); + void zoom_transmask(bitmap_rgb32 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, uint32_t scalex, uint32_t scaley, uint32_t transmask); + void zoom_transtable(bitmap_ind16 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, uint32_t scalex, uint32_t scaley, const uint8_t *pentable); + void zoom_transtable(bitmap_rgb32 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, uint32_t scalex, uint32_t scaley, const uint8_t *pentable); + void zoom_alpha(bitmap_rgb32 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, uint32_t scalex, uint32_t scaley, uint32_t transpen, uint8_t alpha); // ----- priority masked graphics drawing ----- // specific prio implementations for each transparency type - void prio_opaque(bitmap_ind16 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_ind8 &priority, UINT32 pmask); - void prio_opaque(bitmap_rgb32 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_ind8 &priority, UINT32 pmask); - void prio_transpen(bitmap_ind16 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_ind8 &priority, UINT32 pmask, UINT32 transpen); - void prio_transpen(bitmap_rgb32 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_ind8 &priority, UINT32 pmask, UINT32 transpen); - void prio_transpen_raw(bitmap_ind16 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_ind8 &priority, UINT32 pmask, UINT32 transpen); - void prio_transpen_raw(bitmap_rgb32 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_ind8 &priority, UINT32 pmask, UINT32 transpen); - void prio_transmask(bitmap_ind16 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_ind8 &priority, UINT32 pmask, UINT32 transmask); - void prio_transmask(bitmap_rgb32 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_ind8 &priority, UINT32 pmask, UINT32 transmask); - void prio_transtable(bitmap_ind16 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_ind8 &priority, UINT32 pmask, const UINT8 *pentable); - void prio_transtable(bitmap_rgb32 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_ind8 &priority, UINT32 pmask, const UINT8 *pentable); - void prio_alpha(bitmap_rgb32 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_ind8 &priority, UINT32 pmask, UINT32 transpen, UINT8 alpha); + void prio_opaque(bitmap_ind16 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, bitmap_ind8 &priority, uint32_t pmask); + void prio_opaque(bitmap_rgb32 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, bitmap_ind8 &priority, uint32_t pmask); + void prio_transpen(bitmap_ind16 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, bitmap_ind8 &priority, uint32_t pmask, uint32_t transpen); + void prio_transpen(bitmap_rgb32 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, bitmap_ind8 &priority, uint32_t pmask, uint32_t transpen); + void prio_transpen_raw(bitmap_ind16 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, bitmap_ind8 &priority, uint32_t pmask, uint32_t transpen); + void prio_transpen_raw(bitmap_rgb32 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, bitmap_ind8 &priority, uint32_t pmask, uint32_t transpen); + void prio_transmask(bitmap_ind16 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, bitmap_ind8 &priority, uint32_t pmask, uint32_t transmask); + void prio_transmask(bitmap_rgb32 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, bitmap_ind8 &priority, uint32_t pmask, uint32_t transmask); + void prio_transtable(bitmap_ind16 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, bitmap_ind8 &priority, uint32_t pmask, const uint8_t *pentable); + void prio_transtable(bitmap_rgb32 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, bitmap_ind8 &priority, uint32_t pmask, const uint8_t *pentable); + void prio_alpha(bitmap_rgb32 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, bitmap_ind8 &priority, uint32_t pmask, uint32_t transpen, uint8_t alpha); // ----- priority masked zoomed graphics drawing ----- // specific prio_zoom implementations for each transparency type - void prio_zoom_opaque(bitmap_ind16 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_ind8 &priority, UINT32 pmask); - void prio_zoom_opaque(bitmap_rgb32 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_ind8 &priority, UINT32 pmask); - void prio_zoom_transpen(bitmap_ind16 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_ind8 &priority, UINT32 pmask, UINT32 transpen); - void prio_zoom_transpen(bitmap_rgb32 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_ind8 &priority, UINT32 pmask, UINT32 transpen); - void prio_zoom_transpen_raw(bitmap_ind16 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_ind8 &priority, UINT32 pmask, UINT32 transpen); - void prio_zoom_transpen_raw(bitmap_rgb32 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_ind8 &priority, UINT32 pmask, UINT32 transpen); - void prio_zoom_transmask(bitmap_ind16 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_ind8 &priority, UINT32 pmask, UINT32 transmask); - void prio_zoom_transmask(bitmap_rgb32 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_ind8 &priority, UINT32 pmask, UINT32 transmask); - void prio_zoom_transtable(bitmap_ind16 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_ind8 &priority, UINT32 pmask, const UINT8 *pentable); - void prio_zoom_transtable(bitmap_rgb32 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_ind8 &priority, UINT32 pmask, const UINT8 *pentable); - void prio_zoom_alpha(bitmap_rgb32 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_ind8 &priority, UINT32 pmask, UINT32 transpen, UINT8 alpha); + void prio_zoom_opaque(bitmap_ind16 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, uint32_t scalex, uint32_t scaley, bitmap_ind8 &priority, uint32_t pmask); + void prio_zoom_opaque(bitmap_rgb32 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, uint32_t scalex, uint32_t scaley, bitmap_ind8 &priority, uint32_t pmask); + void prio_zoom_transpen(bitmap_ind16 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, uint32_t scalex, uint32_t scaley, bitmap_ind8 &priority, uint32_t pmask, uint32_t transpen); + void prio_zoom_transpen(bitmap_rgb32 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, uint32_t scalex, uint32_t scaley, bitmap_ind8 &priority, uint32_t pmask, uint32_t transpen); + void prio_zoom_transpen_raw(bitmap_ind16 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, uint32_t scalex, uint32_t scaley, bitmap_ind8 &priority, uint32_t pmask, uint32_t transpen); + void prio_zoom_transpen_raw(bitmap_rgb32 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, uint32_t scalex, uint32_t scaley, bitmap_ind8 &priority, uint32_t pmask, uint32_t transpen); + void prio_zoom_transmask(bitmap_ind16 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, uint32_t scalex, uint32_t scaley, bitmap_ind8 &priority, uint32_t pmask, uint32_t transmask); + void prio_zoom_transmask(bitmap_rgb32 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, uint32_t scalex, uint32_t scaley, bitmap_ind8 &priority, uint32_t pmask, uint32_t transmask); + void prio_zoom_transtable(bitmap_ind16 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, uint32_t scalex, uint32_t scaley, bitmap_ind8 &priority, uint32_t pmask, const uint8_t *pentable); + void prio_zoom_transtable(bitmap_rgb32 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, uint32_t scalex, uint32_t scaley, bitmap_ind8 &priority, uint32_t pmask, const uint8_t *pentable); + void prio_zoom_alpha(bitmap_rgb32 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, uint32_t scalex, uint32_t scaley, bitmap_ind8 &priority, uint32_t pmask, uint32_t transpen, uint8_t alpha); // implementations moved here from specific drivers - void prio_transpen_additive(bitmap_rgb32 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_ind8 &priority, UINT32 pmask, UINT32 trans_pen); - void prio_zoom_transpen_additive(bitmap_rgb32 &dest, const rectangle &cliprect,UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,UINT32 scalex, UINT32 scaley, bitmap_ind8 &priority, UINT32 pmask,UINT32 trans_pen); - void alphastore(bitmap_rgb32 &dest, const rectangle &cliprect,UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,int fixedalpha, UINT8 *alphatable); - void alphatable(bitmap_rgb32 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, int fixedalpha ,UINT8 *alphatable); + void prio_transpen_additive(bitmap_rgb32 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, bitmap_ind8 &priority, uint32_t pmask, uint32_t trans_pen); + void prio_zoom_transpen_additive(bitmap_rgb32 &dest, const rectangle &cliprect,uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty,uint32_t scalex, uint32_t scaley, bitmap_ind8 &priority, uint32_t pmask,uint32_t trans_pen); + void alphastore(bitmap_rgb32 &dest, const rectangle &cliprect,uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty,int fixedalpha, uint8_t *alphatable); + void alphatable(bitmap_rgb32 &dest, const rectangle &cliprect, uint32_t code, uint32_t color, int flipx, int flipy, int32_t destx, int32_t desty, int fixedalpha ,uint8_t *alphatable); private: // internal helpers - void decode(UINT32 code); + void decode(uint32_t code); // internal state palette_device *m_palette; // palette used for drawing - UINT16 m_width; // current pixel width of each element (changeable with source clipping) - UINT16 m_height; // current pixel height of each element (changeable with source clipping) - UINT16 m_startx; // current source clip X offset - UINT16 m_starty; // current source clip Y offset + uint16_t m_width; // current pixel width of each element (changeable with source clipping) + uint16_t m_height; // current pixel height of each element (changeable with source clipping) + uint16_t m_startx; // current source clip X offset + uint16_t m_starty; // current source clip Y offset - UINT16 m_origwidth; // starting pixel width of each element - UINT16 m_origheight; // staring pixel height of each element - UINT32 m_total_elements; // total number of decoded elements + uint16_t m_origwidth; // starting pixel width of each element + uint16_t m_origheight; // staring pixel height of each element + uint32_t m_total_elements; // total number of decoded elements - UINT32 m_color_base; // base color for rendering - UINT16 m_color_depth; // number of colors each pixel can represent - UINT16 m_color_granularity; // number of colors for each color code - UINT32 m_total_colors; // number of color codes + uint32_t m_color_base; // base color for rendering + uint16_t m_color_depth; // number of colors each pixel can represent + uint16_t m_color_granularity; // number of colors for each color code + uint32_t m_total_colors; // number of color codes - UINT32 m_line_modulo; // bytes between each row of data - UINT32 m_char_modulo; // bytes between each element - const UINT8 * m_srcdata; // pointer to the source data for decoding - UINT32 m_dirtyseq; // sequence number; incremented each time a tile is dirtied + uint32_t m_line_modulo; // bytes between each row of data + uint32_t m_char_modulo; // bytes between each element + const uint8_t * m_srcdata; // pointer to the source data for decoding + uint32_t m_dirtyseq; // sequence number; incremented each time a tile is dirtied - UINT8 * m_gfxdata; // pointer to decoded pixel data, 8bpp - std::vector<UINT8> m_gfxdata_allocated; // allocated decoded pixel data, 8bpp - std::vector<UINT8> m_dirty; // dirty array for detecting chars that need decoding - std::vector<UINT32> m_pen_usage; // bitmask of pens that are used (pens 0-31 only) + uint8_t * m_gfxdata; // pointer to decoded pixel data, 8bpp + std::vector<uint8_t> m_gfxdata_allocated; // allocated decoded pixel data, 8bpp + std::vector<uint8_t> m_dirty; // dirty array for detecting chars that need decoding + std::vector<uint32_t> m_pen_usage; // bitmask of pens that are used (pens 0-31 only) bool m_layout_is_raw; // raw layout? - UINT8 m_layout_planes; // bit planes in the layout - UINT32 m_layout_xormask; // xor mask applied to each bit offset - UINT32 m_layout_charincrement; // per-character increment in source data - std::vector<UINT32> m_layout_planeoffset;// plane offsets - std::vector<UINT32> m_layout_xoffset; // X offsets - std::vector<UINT32> m_layout_yoffset; // Y offsets + uint8_t m_layout_planes; // bit planes in the layout + uint32_t m_layout_xormask; // xor mask applied to each bit offset + uint32_t m_layout_charincrement; // per-character increment in source data + std::vector<uint32_t> m_layout_planeoffset;// plane offsets + std::vector<uint32_t> m_layout_xoffset; // X offsets + std::vector<uint32_t> m_layout_yoffset; // Y offsets }; @@ -312,44 +312,44 @@ private: // ----- scanline copying ----- // copy pixels from an 8bpp buffer to a single scanline of a bitmap -void draw_scanline8(bitmap_ind16 &bitmap, INT32 destx, INT32 desty, INT32 length, const UINT8 *srcptr, const pen_t *paldata); -void draw_scanline8(bitmap_rgb32 &bitmap, INT32 destx, INT32 desty, INT32 length, const UINT8 *srcptr, const pen_t *paldata); +void draw_scanline8(bitmap_ind16 &bitmap, int32_t destx, int32_t desty, int32_t length, const uint8_t *srcptr, const pen_t *paldata); +void draw_scanline8(bitmap_rgb32 &bitmap, int32_t destx, int32_t desty, int32_t length, const uint8_t *srcptr, const pen_t *paldata); // copy pixels from a 16bpp buffer to a single scanline of a bitmap -void draw_scanline16(bitmap_ind16 &bitmap, INT32 destx, INT32 desty, INT32 length, const UINT16 *srcptr, const pen_t *paldata); -void draw_scanline16(bitmap_rgb32 &bitmap, INT32 destx, INT32 desty, INT32 length, const UINT16 *srcptr, const pen_t *paldata); +void draw_scanline16(bitmap_ind16 &bitmap, int32_t destx, int32_t desty, int32_t length, const uint16_t *srcptr, const pen_t *paldata); +void draw_scanline16(bitmap_rgb32 &bitmap, int32_t destx, int32_t desty, int32_t length, const uint16_t *srcptr, const pen_t *paldata); // copy pixels from a 32bpp buffer to a single scanline of a bitmap -void draw_scanline32(bitmap_ind16 &bitmap, INT32 destx, INT32 desty, INT32 length, const UINT32 *srcptr, const pen_t *paldata); -void draw_scanline32(bitmap_rgb32 &bitmap, INT32 destx, INT32 desty, INT32 length, const UINT32 *srcptr, const pen_t *paldata); +void draw_scanline32(bitmap_ind16 &bitmap, int32_t destx, int32_t desty, int32_t length, const uint32_t *srcptr, const pen_t *paldata); +void draw_scanline32(bitmap_rgb32 &bitmap, int32_t destx, int32_t desty, int32_t length, const uint32_t *srcptr, const pen_t *paldata); // ----- scanline extraction ----- // copy pixels from a single scanline of a bitmap to an 8bpp buffer -void extract_scanline8(const bitmap_ind16 &bitmap, INT32 srcx, INT32 srcy, INT32 length, UINT8 *destptr); -void extract_scanline8(const bitmap_rgb32 &bitmap, INT32 srcx, INT32 srcy, INT32 length, UINT8 *destptr); +void extract_scanline8(const bitmap_ind16 &bitmap, int32_t srcx, int32_t srcy, int32_t length, uint8_t *destptr); +void extract_scanline8(const bitmap_rgb32 &bitmap, int32_t srcx, int32_t srcy, int32_t length, uint8_t *destptr); // copy pixels from a single scanline of a bitmap to a 16bpp buffer -void extract_scanline16(const bitmap_ind16 &bitmap, INT32 srcx, INT32 srcy, INT32 length, UINT16 *destptr); -void extract_scanline16(const bitmap_rgb32 &bitmap, INT32 srcx, INT32 srcy, INT32 length, UINT16 *destptr); +void extract_scanline16(const bitmap_ind16 &bitmap, int32_t srcx, int32_t srcy, int32_t length, uint16_t *destptr); +void extract_scanline16(const bitmap_rgb32 &bitmap, int32_t srcx, int32_t srcy, int32_t length, uint16_t *destptr); // copy pixels from a single scanline of a bitmap to a 32bpp buffer -void extract_scanline32(const bitmap_ind16 &bitmap, INT32 srcx, INT32 srcy, INT32 length, UINT32 *destptr); -void extract_scanline32(const bitmap_rgb32 &bitmap, INT32 srcx, INT32 srcy, INT32 length, UINT32 *destptr); +void extract_scanline32(const bitmap_ind16 &bitmap, int32_t srcx, int32_t srcy, int32_t length, uint32_t *destptr); +void extract_scanline32(const bitmap_rgb32 &bitmap, int32_t srcx, int32_t srcy, int32_t length, uint32_t *destptr); // ----- bitmap copying ----- // copy from one bitmap to another, copying all unclipped pixels -void copybitmap(bitmap_ind16 &dest, const bitmap_ind16 &src, int flipx, int flipy, INT32 destx, INT32 desty, const rectangle &cliprect); -void copybitmap(bitmap_rgb32 &dest, const bitmap_rgb32 &src, int flipx, int flipy, INT32 destx, INT32 desty, const rectangle &cliprect); +void copybitmap(bitmap_ind16 &dest, const bitmap_ind16 &src, int flipx, int flipy, int32_t destx, int32_t desty, const rectangle &cliprect); +void copybitmap(bitmap_rgb32 &dest, const bitmap_rgb32 &src, int flipx, int flipy, int32_t destx, int32_t desty, const rectangle &cliprect); // copy from one bitmap to another, copying all unclipped pixels except those that match transpen -void copybitmap_trans(bitmap_ind16 &dest, const bitmap_ind16 &src, int flipx, int flipy, INT32 destx, INT32 desty, const rectangle &cliprect, UINT32 transpen); -void copybitmap_trans(bitmap_rgb32 &dest, const bitmap_rgb32 &src, int flipx, int flipy, INT32 destx, INT32 desty, const rectangle &cliprect, UINT32 transpen); +void copybitmap_trans(bitmap_ind16 &dest, const bitmap_ind16 &src, int flipx, int flipy, int32_t destx, int32_t desty, const rectangle &cliprect, uint32_t transpen); +void copybitmap_trans(bitmap_rgb32 &dest, const bitmap_rgb32 &src, int flipx, int flipy, int32_t destx, int32_t desty, const rectangle &cliprect, uint32_t transpen); /* Copy a bitmap onto another with scroll and wraparound. @@ -364,12 +364,12 @@ void copybitmap_trans(bitmap_rgb32 &dest, const bitmap_rgb32 &src, int flipx, in */ // copy from one bitmap to another, copying all unclipped pixels, and applying scrolling to one or more rows/columns -void copyscrollbitmap(bitmap_ind16 &dest, const bitmap_ind16 &src, UINT32 numrows, const INT32 *rowscroll, UINT32 numcols, const INT32 *colscroll, const rectangle &cliprect); -void copyscrollbitmap(bitmap_rgb32 &dest, const bitmap_rgb32 &src, UINT32 numrows, const INT32 *rowscroll, UINT32 numcols, const INT32 *colscroll, const rectangle &cliprect); +void copyscrollbitmap(bitmap_ind16 &dest, const bitmap_ind16 &src, uint32_t numrows, const int32_t *rowscroll, uint32_t numcols, const int32_t *colscroll, const rectangle &cliprect); +void copyscrollbitmap(bitmap_rgb32 &dest, const bitmap_rgb32 &src, uint32_t numrows, const int32_t *rowscroll, uint32_t numcols, const int32_t *colscroll, const rectangle &cliprect); // copy from one bitmap to another, copying all unclipped pixels except those that match transpen, and applying scrolling to one or more rows/columns -void copyscrollbitmap_trans(bitmap_ind16 &dest, const bitmap_ind16 &src, UINT32 numrows, const INT32 *rowscroll, UINT32 numcols, const INT32 *colscroll, const rectangle &cliprect, UINT32 transpen); -void copyscrollbitmap_trans(bitmap_rgb32 &dest, const bitmap_rgb32 &src, UINT32 numrows, const INT32 *rowscroll, UINT32 numcols, const INT32 *colscroll, const rectangle &cliprect, UINT32 transpen); +void copyscrollbitmap_trans(bitmap_ind16 &dest, const bitmap_ind16 &src, uint32_t numrows, const int32_t *rowscroll, uint32_t numcols, const int32_t *colscroll, const rectangle &cliprect, uint32_t transpen); +void copyscrollbitmap_trans(bitmap_rgb32 &dest, const bitmap_rgb32 &src, uint32_t numrows, const int32_t *rowscroll, uint32_t numcols, const int32_t *colscroll, const rectangle &cliprect, uint32_t transpen); /* Copy a bitmap applying rotation, zooming, and arbitrary distortion. @@ -401,12 +401,12 @@ void copyscrollbitmap_trans(bitmap_rgb32 &dest, const bitmap_rgb32 &src, UINT32 */ // copy from one bitmap to another, with zoom and rotation, copying all unclipped pixels -void copyrozbitmap(bitmap_ind16 &dest, const rectangle &cliprect, const bitmap_ind16 &src, INT32 startx, INT32 starty, INT32 incxx, INT32 incxy, INT32 incyx, INT32 incyy, int wraparound); -void copyrozbitmap(bitmap_rgb32 &dest, const rectangle &cliprect, const bitmap_rgb32 &src, INT32 startx, INT32 starty, INT32 incxx, INT32 incxy, INT32 incyx, INT32 incyy, int wraparound); +void copyrozbitmap(bitmap_ind16 &dest, const rectangle &cliprect, const bitmap_ind16 &src, int32_t startx, int32_t starty, int32_t incxx, int32_t incxy, int32_t incyx, int32_t incyy, int wraparound); +void copyrozbitmap(bitmap_rgb32 &dest, const rectangle &cliprect, const bitmap_rgb32 &src, int32_t startx, int32_t starty, int32_t incxx, int32_t incxy, int32_t incyx, int32_t incyy, int wraparound); // copy from one bitmap to another, with zoom and rotation, copying all unclipped pixels whose values do not match transpen -void copyrozbitmap_trans(bitmap_ind16 &dest, const rectangle &cliprect, const bitmap_ind16 &src, INT32 startx, INT32 starty, INT32 incxx, INT32 incxy, INT32 incyx, INT32 incyy, int wraparound, UINT32 transparent_color); -void copyrozbitmap_trans(bitmap_rgb32 &dest, const rectangle &cliprect, const bitmap_rgb32 &src, INT32 startx, INT32 starty, INT32 incxx, INT32 incxy, INT32 incyx, INT32 incyy, int wraparound, UINT32 transparent_color); +void copyrozbitmap_trans(bitmap_ind16 &dest, const rectangle &cliprect, const bitmap_ind16 &src, int32_t startx, int32_t starty, int32_t incxx, int32_t incxy, int32_t incyx, int32_t incyy, int wraparound, uint32_t transparent_color); +void copyrozbitmap_trans(bitmap_rgb32 &dest, const rectangle &cliprect, const bitmap_rgb32 &src, int32_t startx, int32_t starty, int32_t incxx, int32_t incxy, int32_t incyx, int32_t incyy, int wraparound, uint32_t transparent_color); @@ -419,7 +419,7 @@ void copyrozbitmap_trans(bitmap_rgb32 &dest, const rectangle &cliprect, const bi // 5-5-5 RGB pixels //------------------------------------------------- -inline UINT32 alpha_blend_r16(UINT32 d, UINT32 s, UINT8 level) +inline uint32_t alpha_blend_r16(uint32_t d, uint32_t s, uint8_t level) { int alphad = 256 - level; return ((((s & 0x001f) * level + (d & 0x001f) * alphad) >> 8)) | @@ -433,7 +433,7 @@ inline UINT32 alpha_blend_r16(UINT32 d, UINT32 s, UINT8 level) // 8-8-8 RGB pixels //------------------------------------------------- -inline UINT32 alpha_blend_r32(UINT32 d, UINT32 s, UINT8 level) +inline uint32_t alpha_blend_r32(uint32_t d, uint32_t s, uint8_t level) { int alphad = 256 - level; return ((((s & 0x0000ff) * level + (d & 0x0000ff) * alphad) >> 8)) | @@ -454,7 +454,7 @@ class gfxdecode_device : public device_t, public device_gfx_interface { public: // construction/destruction - gfxdecode_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + gfxdecode_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); protected: virtual void device_start() override {}; |