diff options
author | 2021-11-06 15:35:24 +0100 | |
---|---|---|
committer | 2021-11-06 15:35:36 +0100 | |
commit | f03bb5dc9899751d73e6029506c0d05a3eb582db (patch) | |
tree | 9ce6c58b983a9f33df1079f86a2af2aba98a22db | |
parent | b0ac175b4942e4b29098823773ff2d50b6ac35a9 (diff) |
cps1: fix small issue with stars palette cycling [Loïc Petit]
-rw-r--r-- | src/mame/video/cps1.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mame/video/cps1.cpp b/src/mame/video/cps1.cpp index f4cb04b4947..3f54d6215d4 100644 --- a/src/mame/video/cps1.cpp +++ b/src/mame/video/cps1.cpp @@ -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++) { int col = stars_rom[8 * offs + 4]; - if (col != 0x0f) + if ((col & 0x1f) != 0x0f) { int sx = (offs / 256) * 32; int sy = (offs % 256); @@ -3176,7 +3176,8 @@ void cps_state::cps1_render_stars( screen_device &screen, bitmap_ind16 &bitmap, 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)) 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++) { int col = stars_rom[8*offs]; - if (col != 0x0f) + if ((col & 0x1f) != 0x0f) { int sx = (offs / 256) * 32; int sy = (offs % 256); @@ -3201,7 +3202,8 @@ void cps_state::cps1_render_stars( screen_device &screen, bitmap_ind16 &bitmap, 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)) bitmap.pix(sy, sx) = 0x800 + col; |