summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2012-09-10 06:25:03 +0000
committer Aaron Giles <aaron@aarongiles.com>2012-09-10 06:25:03 +0000
commit7b9f849da1a3242f32f74a216deaa33716b6631c (patch)
tree9e815ca0daeb74594246e3ef71c631cf512294e3 /src
parent81ef83361952d3c7eb31abd281fde89efbae17c7 (diff)
Fix gfx_element behaviors for dynamically created single-
element raw objects used in offbeat drivers like metro.c.
Diffstat (limited to 'src')
-rw-r--r--src/emu/drawgfx.c4
-rw-r--r--src/emu/drawgfx.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/emu/drawgfx.c b/src/emu/drawgfx.c
index a5a84a7f1f4..ccca202a711 100644
--- a/src/emu/drawgfx.c
+++ b/src/emu/drawgfx.c
@@ -250,8 +250,8 @@ gfx_element::gfx_element(running_machine &machine, UINT8 *base, UINT32 width, UI
m_char_modulo(0),
m_srcdata(base),
m_dirtyseq(1),
- m_gfxdata(NULL),
- m_layout_is_raw(false),
+ m_gfxdata(base),
+ m_layout_is_raw(true),
m_layout_planes(0),
m_layout_charincrement(0),
m_machine(machine)
diff --git a/src/emu/drawgfx.h b/src/emu/drawgfx.h
index a91bbace350..4c6df80f1cf 100644
--- a/src/emu/drawgfx.h
+++ b/src/emu/drawgfx.h
@@ -156,7 +156,7 @@ public:
const UINT8 *get_data(UINT32 code)
{
assert(code < elements());
- if (m_dirty[code]) decode(code);
+ if (code < m_dirty.count() && m_dirty[code]) decode(code);
return m_gfxdata + code * m_char_modulo + m_starty * m_line_modulo + m_startx;
}