mirror of
https://github.com/holub/mame
synced 2025-06-05 12:26:35 +03:00
taito/taito_f3_v.cpp: Eliminated game-specific tilemap palette hack. (#11788) [ywy, 12Me21]
This commit is contained in:
parent
b0d156ea39
commit
59ae6c1602
@ -348,32 +348,19 @@ template<unsigned Layer>
|
||||
TILE_GET_INFO_MEMBER(taito_f3_state::get_tile_info)
|
||||
{
|
||||
const u32 tile = (m_pf_data[Layer][tile_index * 2 + 0] << 16) | (m_pf_data[Layer][tile_index * 2 + 1] & 0xffff);
|
||||
const u8 abtype = (tile >> (16 + 9)) & 1;
|
||||
// tiles can be configured to use 4, 5, or 6 bpp data.
|
||||
const u8 extra_planes = ((tile >> (16 + 10)) & 3); // 0 = 4bpp, 1 = 5bpp, 2 = unused?, 3 = 6bpp
|
||||
const u16 palette_code = BIT(tile, 16, 9);
|
||||
const u8 abtype = BIT(tile, 25, 1);
|
||||
const u8 extra_planes = BIT(tile, 26, 2); // 0 = 4bpp, 1 = 5bpp, 2 = unused?, 3 = 6bpp
|
||||
|
||||
// FIXME: some (5bpp?) games need the bottom bits of the color code to be masked out.
|
||||
// (mt00895 arabian magic stage 6 rain (color 0x105->104), mt01925 rayforce explosion, mt01917 rayforce ships, mt00900 kaiser knuckle azteca throw)
|
||||
// however, there are (6bpp) cases which *don't* want any adjustment that this breaks:
|
||||
// (quizhuhu fade palette 0x7, landmakrj win message palette 0xBE)
|
||||
// special case until better understood.
|
||||
if (m_game == LANDMAKR || m_game == QUIZHUHU)
|
||||
{
|
||||
tileinfo.set(3,
|
||||
tile & 0xffff,
|
||||
(tile >> 16) & 0x1ff,
|
||||
TILE_FLIPYX(tile >> 30));
|
||||
}
|
||||
else
|
||||
{
|
||||
tileinfo.set(3,
|
||||
tile & 0xffff,
|
||||
(tile >> 16) & 0x1ff & (~extra_planes),
|
||||
TILE_FLIPYX(tile >> 30));
|
||||
}
|
||||
tileinfo.set(3,
|
||||
tile & 0xffff,
|
||||
palette_code,
|
||||
TILE_FLIPYX(BIT(tile, 30, 2)));
|
||||
|
||||
tileinfo.category = abtype & 1; /* alpha blending type */
|
||||
tileinfo.pen_mask = (extra_planes << 4) | 0x0f;
|
||||
tileinfo.category = abtype & 1; // alpha blending type
|
||||
// gfx extra planes and palette code set the same bits of color address
|
||||
// we need to account for tilemap.h combining using "+" instead of "|"
|
||||
tileinfo.pen_mask = ((extra_planes & ~palette_code) << 4) | 0x0f;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user