summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/drawgfx.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/drawgfx.h')
-rw-r--r--src/emu/drawgfx.h72
1 files changed, 37 insertions, 35 deletions
diff --git a/src/emu/drawgfx.h b/src/emu/drawgfx.h
index 4d3f4d0e0c9..16902a6c932 100644
--- a/src/emu/drawgfx.h
+++ b/src/emu/drawgfx.h
@@ -152,7 +152,7 @@ public:
gfx_element();
#endif
gfx_element(device_palette_interface *palette, const gfx_layout &gl, const u8 *srcdata, u32 xormask, u32 total_colors, u32 color_base);
- gfx_element(device_palette_interface *palette, u8 *base, u16 width, u16 height, u32 rowbytes, u32 total_colors, u32 color_base, u32 color_granularity);
+ gfx_element(device_palette_interface *palette, const u8 *base, u32 total, u16 width, u16 height, u32 rowbytes, u32 total_colors, u32 color_base, u32 color_granularity);
// getters
device_palette_interface &palette() const { return *m_palette; }
@@ -173,6 +173,7 @@ public:
// setters
void set_layout(const gfx_layout &gl, const u8 *srcdata);
void set_raw_layout(const u8 *srcdata, u32 width, u32 height, u32 total, u32 linemod, u32 charmod);
+ void set_raw_layout(const u16 *srcdata, u32 width, u32 height, u32 total, u32 linemod, u32 charmod);
void set_source(const u8 *source);
void set_source_and_total(const u8 *source, u32 total);
void set_xormask(u32 xormask) { m_layout_xormask = xormask; }
@@ -186,7 +187,7 @@ public:
void mark_dirty(u32 code) { if (code < elements()) { m_dirty[code] = 1; m_dirtyseq++; } }
void mark_all_dirty() { memset(&m_dirty[0], 1, elements()); }
- const u8 *get_data(u32 code)
+ const u16 *get_data(u32 code)
{
assert(code < elements());
if (code < m_dirty.size() && m_dirty[code]) decode(code);
@@ -270,39 +271,40 @@ private:
void decode(u32 code);
// internal state
- device_palette_interface *m_palette; // palette used for drawing (optional when used as a pure decoder)
-
- u16 m_width; // current pixel width of each element (changeable with source clipping)
- u16 m_height; // current pixel height of each element (changeable with source clipping)
- u16 m_startx; // current source clip X offset
- u16 m_starty; // current source clip Y offset
-
- u16 m_origwidth; // starting pixel width of each element
- u16 m_origheight; // staring pixel height of each element
- u32 m_total_elements; // total number of decoded elements
-
- u32 m_color_base; // base color for rendering
- u16 m_color_depth; // number of colors each pixel can represent
- u16 m_color_granularity; // number of colors for each color code
- u32 m_total_colors; // number of color codes
-
- u32 m_line_modulo; // bytes between each row of data
- u32 m_char_modulo; // bytes between each element
- const u8 * m_srcdata; // pointer to the source data for decoding
- u32 m_dirtyseq; // sequence number; incremented each time a tile is dirtied
-
- u8 * m_gfxdata; // pointer to decoded pixel data, 8bpp
- std::vector<u8> m_gfxdata_allocated; // allocated decoded pixel data, 8bpp
- std::vector<u8> m_dirty; // dirty array for detecting chars that need decoding
- std::vector<u32> m_pen_usage; // bitmask of pens that are used (pens 0-31 only)
-
- bool m_layout_is_raw; // raw layout?
- u8 m_layout_planes; // bit planes in the layout
- u32 m_layout_xormask; // xor mask applied to each bit offset
- u32 m_layout_charincrement; // per-character increment in source data
- std::vector<u32> m_layout_planeoffset;// plane offsets
- std::vector<u32> m_layout_xoffset; // X offsets
- std::vector<u32> m_layout_yoffset; // Y offsets
+ device_palette_interface *m_palette; // palette used for drawing (optional when used as a pure decoder)
+
+ u16 m_width; // current pixel width of each element (changeable with source clipping)
+ u16 m_height; // current pixel height of each element (changeable with source clipping)
+ u16 m_startx; // current source clip X offset
+ u16 m_starty; // current source clip Y offset
+
+ u16 m_origwidth; // starting pixel width of each element
+ u16 m_origheight; // staring pixel height of each element
+ u32 m_total_elements; // total number of decoded elements
+
+ u32 m_color_base; // base color for rendering
+ u16 m_color_depth; // number of colors each pixel can represent
+ u16 m_color_granularity; // number of colors for each color code
+ u32 m_total_colors; // number of color codes
+
+ u32 m_line_modulo; // bytes between each row of data
+ u32 m_char_modulo; // bytes between each element
+ const u8 * m_srcdata; // pointer to the source data for decoding
+ u32 m_dirtyseq; // sequence number; incremented each time a tile is dirtied
+
+ u16 * m_gfxdata; // pointer to decoded pixel data, 16bpp
+ std::vector<u16> m_gfxdata_allocated; // allocated decoded pixel data, 8bpp
+ std::vector<u8> m_dirty; // dirty array for detecting chars that need decoding
+ std::vector<u32> m_pen_usage; // bitmask of pens that are used (pens 0-31 only)
+
+ bool m_layout_is_raw; // raw layout?
+ bool m_layout_is_16bpp; // 16bpp raw layout?
+ u8 m_layout_planes; // bit planes in the layout
+ u32 m_layout_xormask; // xor mask applied to each bit offset
+ u32 m_layout_charincrement; // per-character increment in source data
+ std::vector<u32> m_layout_planeoffset; // plane offsets
+ std::vector<u32> m_layout_xoffset; // X offsets
+ std::vector<u32> m_layout_yoffset; // Y offsets
};