mirror of
https://github.com/holub/mame
synced 2025-07-04 17:38:08 +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_char_modulo(0),
|
||||||
m_srcdata(base),
|
m_srcdata(base),
|
||||||
m_dirtyseq(1),
|
m_dirtyseq(1),
|
||||||
m_gfxdata(NULL),
|
m_gfxdata(base),
|
||||||
m_layout_is_raw(false),
|
m_layout_is_raw(true),
|
||||||
m_layout_planes(0),
|
m_layout_planes(0),
|
||||||
m_layout_charincrement(0),
|
m_layout_charincrement(0),
|
||||||
m_machine(machine)
|
m_machine(machine)
|
||||||
|
@ -156,7 +156,7 @@ public:
|
|||||||
const UINT8 *get_data(UINT32 code)
|
const UINT8 *get_data(UINT32 code)
|
||||||
{
|
{
|
||||||
assert(code < elements());
|
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;
|
return m_gfxdata + code * m_char_modulo + m_starty * m_line_modulo + m_startx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user