mirror of
https://github.com/libretro/mame2016-libretro.git
synced 2025-03-03 15:48:02 +00: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
|
||||
/.project
|
||||
/cfg
|
||||
/depend_emu.mak
|
||||
/depend_mess.mak
|
||||
/depend_*.mak
|
||||
/diff
|
||||
/nvram
|
||||
/obj
|
||||
|
@ -169,7 +169,6 @@ public:
|
||||
// operations
|
||||
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 decode(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 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:
|
||||
// internal helpers
|
||||
void decode(UINT32 code);
|
||||
|
||||
// internal state
|
||||
palette_device *m_palette; // palette used for drawing
|
||||
|
||||
|
@ -368,7 +368,7 @@ void aristmk4_state::video_start()
|
||||
int 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;
|
||||
bgtile = (m_mkiv_vram[count+1]|m_mkiv_vram[count]<<8) & 0xff; // first 256 tiles
|
||||
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.
|
||||
flipx = ((m_mkiv_vram[count]) & 0x04);
|
||||
flipy = ((m_mkiv_vram[count]) & 0x08);
|
||||
|
@ -644,7 +644,7 @@ static const gfx_layout spritelayout =
|
||||
static const gfx_layout tilelayout =
|
||||
{
|
||||
16,16,
|
||||
16+1, /* 16 tiles (+1 empty tile used in the half-width bg tilemaps) */
|
||||
16,
|
||||
3,
|
||||
{ 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) },
|
||||
|
@ -212,7 +212,8 @@ UINT32 srmp5_state::screen_update_srmp5(screen_device &screen, bitmap_rgb32 &bit
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -60,6 +60,7 @@ public:
|
||||
tilemap_t *m_fg_tilemap;
|
||||
tilemap_t *m_bg_tilemap_l;
|
||||
tilemap_t *m_bg_tilemap_r;
|
||||
UINT8 m_empty_tile[16*16];
|
||||
INT32 m_watchdog_count;
|
||||
INT32 m_watchdog_flip;
|
||||
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;
|
||||
SET_TILE_INFO_MEMBER(2,
|
||||
(0x80 == (tile_index & 0x80)) ? 16 : m_bgvideoram[tile_index] >> 4,
|
||||
m_bgvideoram[tile_index] >> 4,
|
||||
color,
|
||||
0);
|
||||
if (tile_index & 0x80)
|
||||
tileinfo.pen_data = m_empty_tile;
|
||||
}
|
||||
|
||||
TILE_GET_INFO_MEMBER(decocass_state::get_bg_r_tile_info )
|
||||
{
|
||||
int color = (m_color_center_bot >> 7) & 1;
|
||||
SET_TILE_INFO_MEMBER(2,
|
||||
(0x00 == (tile_index & 0x80)) ? 16 : m_bgvideoram[tile_index] >> 4,
|
||||
m_bgvideoram[tile_index] >> 4,
|
||||
color,
|
||||
TILE_FLIPY);
|
||||
if (!(tile_index & 0x80))
|
||||
tileinfo.pen_data = m_empty_tile;
|
||||
}
|
||||
|
||||
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(3)->set_source(m_objectram);
|
||||
|
||||
/* This should ensure that the fake 17th tile is left blank
|
||||
* now that dirty-tile tracking is handled by the core */
|
||||
m_gfxdecode->gfx(2)->decode(16);
|
||||
/* create an empty tile */
|
||||
memset(m_empty_tile, 0, sizeof(m_empty_tile));
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
// textures
|
||||
// force all texture tiles to be decoded now
|
||||
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_tiledata = (UINT8 *)m_gfxdecode->gfx(1)->get_data(0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user