tilemap.get_info_debug: don't access invalid gfxnum

This commit is contained in:
hap 2022-11-11 16:19:04 +01:00
parent 5ee5881e54
commit 2e5a0c183f
3 changed files with 12 additions and 7 deletions

View file

@ -1559,10 +1559,14 @@ void tilemap_t::get_info_debug(u32 col, u32 row, u8 &gfxnum, u32 &code, u32 &col
// get the GFX number and code
gfxnum = m_tileinfo.gfxnum;
code = m_tileinfo.code;
color = m_tileinfo.palette_base;
if (gfxnum != 0xff)
{
// work back from the palette base to get the color
const gfx_element &gfx = *m_tileinfo.decoder->gfx(gfxnum);
color = (m_tileinfo.palette_base - gfx.colorbase()) / gfx.granularity();
color = (color - gfx.colorbase()) / gfx.granularity();
}
}

View file

@ -30,8 +30,8 @@ TODO:
+ ridgerac waving flag shadowing
+ cybrcomm enemies should flash white when you shoot them, probably lighting related
+ timecris helicopter, car, grenade boxes should flash white when you shoot them (similar to cybrcomm)
- improve ss22 spot, used in dirtdash, alpinesa, testmode, not understood well:
+ does not work at all on alpinesa highscore entry
- improve ss22 spot, used in dirtdash, alpinesa, testmode - not understood well:
+ does not work at all on alpinesa highscore entry (maybe not spotram related?)
+ should be done before global fade, see dirtdash when starting at jungle level
+ should not apply to some of the sprites in dirtdash jungle level (eg. time/position)
+ how is it enabled exactly? the enable bit in spotram is set in tokyowar too(which doesn't use spot)
@ -41,6 +41,7 @@ TODO:
- PDP command 0xfff9, used in alpinr2b to modify titlescreen logo animation in pointram (should show a snow melting effect)
- support for text layer video partial updates after posirq, alpinesa does raster effects on it
- alpha blended sprite/poly with priority over alpha blended text doesn't work right
- alpinesa sprites on selection screen should not be fully alpha blended, only the drop shadow should
- ss22 poly translucency is probably more limited than currently emulated, not supporting stacked layers
- there's a sprite limit per scanline, eg. timecris submarine explosion smoke partially erases sprites on real hardware
- cybrcycc speed dial needle polygon is missing

View file

@ -135,8 +135,6 @@ void thepit_state::video_start()
m_dummy_tile = make_unique_clear<uint8_t[]>(8*8);
m_graphics_bank = 0; /* only used in intrepid */
m_vsync_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(thepit_state::vsync_callback), this));
save_item(NAME(m_graphics_bank));
@ -319,5 +317,7 @@ uint32_t thepit_state::screen_update_desertdan(screen_device &screen, bitmap_ind
m_graphics_bank = 1;
draw_sprites(bitmap, m_flip_y ? spritevisibleareaflipx : spritevisiblearea, 1);
m_graphics_bank = 0;
return 0;
}