mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
Fix gfx_element behaviors for dynamically created single-
element raw objects used in offbeat drivers like metro.c.
This commit is contained in:
parent
81ef833619
commit
7b9f849da1
@ -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)
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user