mirror of
https://github.com/mamedev/mame.git
synced 2024-11-16 07:48:32 +01:00
cps1: fix small issue with stars palette cycling [Loïc Petit]
This commit is contained in:
parent
b0ac175b49
commit
f03bb5dc98
1 changed files with 6 additions and 4 deletions
|
@ -3164,7 +3164,7 @@ void cps_state::cps1_render_stars( screen_device &screen, bitmap_ind16 &bitmap,
|
||||||
for (int offs = 0; offs < m_stars_rom_size / 2; offs++)
|
for (int offs = 0; offs < m_stars_rom_size / 2; offs++)
|
||||||
{
|
{
|
||||||
int col = stars_rom[8 * offs + 4];
|
int col = stars_rom[8 * offs + 4];
|
||||||
if (col != 0x0f)
|
if ((col & 0x1f) != 0x0f)
|
||||||
{
|
{
|
||||||
int sx = (offs / 256) * 32;
|
int sx = (offs / 256) * 32;
|
||||||
int sy = (offs % 256);
|
int sy = (offs % 256);
|
||||||
|
@ -3176,7 +3176,8 @@ void cps_state::cps1_render_stars( screen_device &screen, bitmap_ind16 &bitmap,
|
||||||
sy = 256 - sy;
|
sy = 256 - sy;
|
||||||
}
|
}
|
||||||
|
|
||||||
col = ((col & 0xe0) >> 1) + (screen.frame_number() / 16 & 0x0f);
|
int cnt = ((screen.frame_number() / 16 ) % ((col & 0x80) ? 15 : 16));
|
||||||
|
col = ((col & 0xe0) >> 1) + cnt;
|
||||||
|
|
||||||
if (cliprect.contains(sx, sy))
|
if (cliprect.contains(sx, sy))
|
||||||
bitmap.pix(sy, sx) = 0xa00 + col;
|
bitmap.pix(sy, sx) = 0xa00 + col;
|
||||||
|
@ -3189,7 +3190,7 @@ void cps_state::cps1_render_stars( screen_device &screen, bitmap_ind16 &bitmap,
|
||||||
for (int offs = 0; offs < m_stars_rom_size / 2; offs++)
|
for (int offs = 0; offs < m_stars_rom_size / 2; offs++)
|
||||||
{
|
{
|
||||||
int col = stars_rom[8*offs];
|
int col = stars_rom[8*offs];
|
||||||
if (col != 0x0f)
|
if ((col & 0x1f) != 0x0f)
|
||||||
{
|
{
|
||||||
int sx = (offs / 256) * 32;
|
int sx = (offs / 256) * 32;
|
||||||
int sy = (offs % 256);
|
int sy = (offs % 256);
|
||||||
|
@ -3201,7 +3202,8 @@ void cps_state::cps1_render_stars( screen_device &screen, bitmap_ind16 &bitmap,
|
||||||
sy = 256 - sy;
|
sy = 256 - sy;
|
||||||
}
|
}
|
||||||
|
|
||||||
col = ((col & 0xe0) >> 1) + (screen.frame_number() / 16 & 0x0f);
|
int cnt = ((screen.frame_number() / 16 ) % ((col & 0x80) ? 15 : 16));
|
||||||
|
col = ((col & 0xe0) >> 1) + cnt;
|
||||||
|
|
||||||
if (cliprect.contains(sx, sy))
|
if (cliprect.contains(sx, sy))
|
||||||
bitmap.pix(sy, sx) = 0x800 + col;
|
bitmap.pix(sy, sx) = 0x800 + col;
|
||||||
|
|
Loading…
Reference in a new issue