mirror of
https://github.com/holub/mame
synced 2025-10-04 16:34:53 +03:00
Made gfx_element::decode() private; fixed drivers that were calling it directly [Alex Jackson]
This commit is contained in:
parent
9f691da5f3
commit
b6db6a39a2
3
.gitignore
vendored
3
.gitignore
vendored
@ -7,8 +7,7 @@
|
|||||||
/.cproject
|
/.cproject
|
||||||
/.project
|
/.project
|
||||||
/cfg
|
/cfg
|
||||||
/depend_emu.mak
|
/depend_*.mak
|
||||||
/depend_mess.mak
|
|
||||||
/diff
|
/diff
|
||||||
/nvram
|
/nvram
|
||||||
/obj
|
/obj
|
||||||
|
@ -169,7 +169,6 @@ public:
|
|||||||
// operations
|
// operations
|
||||||
void mark_dirty(UINT32 code) { if (code < elements()) { m_dirty[code] = 1; m_dirtyseq++; } }
|
void mark_dirty(UINT32 code) { if (code < elements()) { m_dirty[code] = 1; m_dirtyseq++; } }
|
||||||
void mark_all_dirty() { memset(&m_dirty[0], 1, elements()); }
|
void mark_all_dirty() { memset(&m_dirty[0], 1, elements()); }
|
||||||
void decode(UINT32 code);
|
|
||||||
|
|
||||||
const UINT8 *get_data(UINT32 code)
|
const UINT8 *get_data(UINT32 code)
|
||||||
{
|
{
|
||||||
@ -251,6 +250,9 @@ public:
|
|||||||
void alphastore(palette_device &palette, bitmap_rgb32 &dest, const rectangle &cliprect,UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,int fixedalpha, UINT8 *alphatable);
|
void alphastore(palette_device &palette, bitmap_rgb32 &dest, const rectangle &cliprect,UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,int fixedalpha, UINT8 *alphatable);
|
||||||
void alphatable(palette_device &palette, bitmap_rgb32 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, int fixedalpha ,UINT8 *alphatable);
|
void alphatable(palette_device &palette, bitmap_rgb32 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, int fixedalpha ,UINT8 *alphatable);
|
||||||
private:
|
private:
|
||||||
|
// internal helpers
|
||||||
|
void decode(UINT32 code);
|
||||||
|
|
||||||
// internal state
|
// internal state
|
||||||
palette_device *m_palette; // palette used for drawing
|
palette_device *m_palette; // palette used for drawing
|
||||||
|
|
||||||
|
@ -368,7 +368,7 @@ void aristmk4_state::video_start()
|
|||||||
int tile;
|
int tile;
|
||||||
for (tile = 0; tile < m_gfxdecode->gfx(0)->elements(); tile++)
|
for (tile = 0; tile < m_gfxdecode->gfx(0)->elements(); tile++)
|
||||||
{
|
{
|
||||||
m_gfxdecode->gfx(0)->decode(tile);
|
m_gfxdecode->gfx(0)->get_data(tile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -424,7 +424,7 @@ UINT32 aristmk4_state::screen_update_aristmk4(screen_device &screen, bitmap_ind1
|
|||||||
tile = (m_mkiv_vram[count+1]|m_mkiv_vram[count]<<8) & 0x3ff;
|
tile = (m_mkiv_vram[count+1]|m_mkiv_vram[count]<<8) & 0x3ff;
|
||||||
bgtile = (m_mkiv_vram[count+1]|m_mkiv_vram[count]<<8) & 0xff; // first 256 tiles
|
bgtile = (m_mkiv_vram[count+1]|m_mkiv_vram[count]<<8) & 0xff; // first 256 tiles
|
||||||
uBackgroundColour(); // read sw7
|
uBackgroundColour(); // read sw7
|
||||||
gfx->decode(bgtile); // force the machine to update only the first 256 tiles.
|
gfx->mark_dirty(bgtile); // force the machine to update only the first 256 tiles.
|
||||||
// as we only update the background, not the entire display.
|
// as we only update the background, not the entire display.
|
||||||
flipx = ((m_mkiv_vram[count]) & 0x04);
|
flipx = ((m_mkiv_vram[count]) & 0x04);
|
||||||
flipy = ((m_mkiv_vram[count]) & 0x08);
|
flipy = ((m_mkiv_vram[count]) & 0x08);
|
||||||
|
@ -644,7 +644,7 @@ static const gfx_layout spritelayout =
|
|||||||
static const gfx_layout tilelayout =
|
static const gfx_layout tilelayout =
|
||||||
{
|
{
|
||||||
16,16,
|
16,16,
|
||||||
16+1, /* 16 tiles (+1 empty tile used in the half-width bg tilemaps) */
|
16,
|
||||||
3,
|
3,
|
||||||
{ 2*16*16*16+4, 2*16*16*16+0, 4 },
|
{ 2*16*16*16+4, 2*16*16*16+0, 4 },
|
||||||
{ STEP4(3*16*8,1), STEP4(2*16*8,1), STEP4(1*16*8,1), STEP4(0*16*8,1) },
|
{ STEP4(3*16*8,1), STEP4(2*16*8,1), STEP4(1*16*8,1), STEP4(0*16*8,1) },
|
||||||
|
@ -212,7 +212,8 @@ UINT32 srmp5_state::screen_update_srmp5(screen_device &screen, bitmap_rgb32 &bit
|
|||||||
{
|
{
|
||||||
if (m_tileduty[i] == 1)
|
if (m_tileduty[i] == 1)
|
||||||
{
|
{
|
||||||
m_gfxdecode->gfx(0)->decode(i);
|
m_gfxdecode->gfx(0)->mark_dirty(i);
|
||||||
|
m_gfxdecode->gfx(0)->get_data(i);
|
||||||
m_tileduty[i] = 0;
|
m_tileduty[i] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -60,6 +60,7 @@ public:
|
|||||||
tilemap_t *m_fg_tilemap;
|
tilemap_t *m_fg_tilemap;
|
||||||
tilemap_t *m_bg_tilemap_l;
|
tilemap_t *m_bg_tilemap_l;
|
||||||
tilemap_t *m_bg_tilemap_r;
|
tilemap_t *m_bg_tilemap_r;
|
||||||
|
UINT8 m_empty_tile[16*16];
|
||||||
INT32 m_watchdog_count;
|
INT32 m_watchdog_count;
|
||||||
INT32 m_watchdog_flip;
|
INT32 m_watchdog_flip;
|
||||||
INT32 m_color_missiles;
|
INT32 m_color_missiles;
|
||||||
|
@ -201,18 +201,22 @@ TILE_GET_INFO_MEMBER(decocass_state::get_bg_l_tile_info)
|
|||||||
{
|
{
|
||||||
int color = (m_color_center_bot >> 7) & 1;
|
int color = (m_color_center_bot >> 7) & 1;
|
||||||
SET_TILE_INFO_MEMBER(2,
|
SET_TILE_INFO_MEMBER(2,
|
||||||
(0x80 == (tile_index & 0x80)) ? 16 : m_bgvideoram[tile_index] >> 4,
|
m_bgvideoram[tile_index] >> 4,
|
||||||
color,
|
color,
|
||||||
0);
|
0);
|
||||||
|
if (tile_index & 0x80)
|
||||||
|
tileinfo.pen_data = m_empty_tile;
|
||||||
}
|
}
|
||||||
|
|
||||||
TILE_GET_INFO_MEMBER(decocass_state::get_bg_r_tile_info )
|
TILE_GET_INFO_MEMBER(decocass_state::get_bg_r_tile_info )
|
||||||
{
|
{
|
||||||
int color = (m_color_center_bot >> 7) & 1;
|
int color = (m_color_center_bot >> 7) & 1;
|
||||||
SET_TILE_INFO_MEMBER(2,
|
SET_TILE_INFO_MEMBER(2,
|
||||||
(0x00 == (tile_index & 0x80)) ? 16 : m_bgvideoram[tile_index] >> 4,
|
m_bgvideoram[tile_index] >> 4,
|
||||||
color,
|
color,
|
||||||
TILE_FLIPY);
|
TILE_FLIPY);
|
||||||
|
if (!(tile_index & 0x80))
|
||||||
|
tileinfo.pen_data = m_empty_tile;
|
||||||
}
|
}
|
||||||
|
|
||||||
TILE_GET_INFO_MEMBER(decocass_state::get_fg_tile_info )
|
TILE_GET_INFO_MEMBER(decocass_state::get_fg_tile_info )
|
||||||
@ -676,9 +680,8 @@ void decocass_state::video_start()
|
|||||||
m_gfxdecode->gfx(2)->set_source(m_tileram);
|
m_gfxdecode->gfx(2)->set_source(m_tileram);
|
||||||
m_gfxdecode->gfx(3)->set_source(m_objectram);
|
m_gfxdecode->gfx(3)->set_source(m_objectram);
|
||||||
|
|
||||||
/* This should ensure that the fake 17th tile is left blank
|
/* create an empty tile */
|
||||||
* now that dirty-tile tracking is handled by the core */
|
memset(m_empty_tile, 0, sizeof(m_empty_tile));
|
||||||
m_gfxdecode->gfx(2)->decode(16);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT32 decocass_state::screen_update_decocass(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
UINT32 decocass_state::screen_update_decocass(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||||
|
@ -2390,9 +2390,9 @@ void namcos22_state::init_tables()
|
|||||||
|
|
||||||
m_pointram = auto_alloc_array_clear(machine(), UINT32, 0x20000);
|
m_pointram = auto_alloc_array_clear(machine(), UINT32, 0x20000);
|
||||||
|
|
||||||
// textures
|
// force all texture tiles to be decoded now
|
||||||
for (int i = 0; i < m_gfxdecode->gfx(1)->elements(); i++)
|
for (int i = 0; i < m_gfxdecode->gfx(1)->elements(); i++)
|
||||||
m_gfxdecode->gfx(1)->decode(i);
|
m_gfxdecode->gfx(1)->get_data(i);
|
||||||
|
|
||||||
m_texture_tilemap = (UINT16 *)memregion("textilemap")->base();
|
m_texture_tilemap = (UINT16 *)memregion("textilemap")->base();
|
||||||
m_texture_tiledata = (UINT8 *)m_gfxdecode->gfx(1)->get_data(0);
|
m_texture_tiledata = (UINT8 *)m_gfxdecode->gfx(1)->get_data(0);
|
||||||
|
Loading…
Reference in New Issue
Block a user