From fba39f5b01b9b7c15a4744d7c478a0ab4bec8390 Mon Sep 17 00:00:00 2001 From: hap Date: Mon, 28 Feb 2022 13:27:50 +0100 Subject: rendlay: fix possible color overflow on disk element --- src/emu/rendlay.cpp | 14 +++++++------- src/mame/drivers/conic_cchess3.cpp | 4 ++-- src/mame/layout/v4in1eg.lay | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/emu/rendlay.cpp b/src/emu/rendlay.cpp index 3151fccc5ed..ffe680fa625 100644 --- a/src/emu/rendlay.cpp +++ b/src/emu/rendlay.cpp @@ -2109,7 +2109,7 @@ protected: } else if (c.a) { - // compute premultiplied colors + // compute premultiplied color u32 const a(c.a * 255.0F); u32 const r(u32(c.r * (255.0F * 255.0F)) * a); u32 const g(u32(c.g * (255.0F * 255.0F)) * a); @@ -2145,9 +2145,9 @@ public: render_color const c(color(state)); u32 const f(rgb_t(u8(c.r * 255), u8(c.g * 255), u8(c.b * 255))); u32 const a(c.a * 255.0F); - u32 const r(c.r * c.a * (255.0F * 255.0F * 255.0F)); - u32 const g(c.g * c.a * (255.0F * 255.0F * 255.0F)); - u32 const b(c.b * c.a * (255.0F * 255.0F * 255.0F)); + u32 const r(c.r * (255.0F * 255.0F) * a); + u32 const g(c.g * (255.0F * 255.0F) * a); + u32 const b(c.b * (255.0F * 255.0F) * a); u32 const inva(255 - a); if (!a) return; @@ -3109,7 +3109,7 @@ protected: // shift the reels a bit based on this param, allows fine tuning int use_state = (state + m_stateoffset) % max_state_used; - // compute premultiplied colors + // compute premultiplied color render_color const c(color(state)); u32 const r = c.r * 255.0f; u32 const g = c.g * 255.0f; @@ -3261,7 +3261,7 @@ private: // shift the reels a bit based on this param, allows fine tuning int use_state = (state + m_stateoffset) % max_state_used; - // compute premultiplied colors + // compute premultiplied color render_color const c(color(state)); u32 const r = c.r * 255.0f; u32 const g = c.g * 255.0f; @@ -3679,7 +3679,7 @@ void layout_element::component::draw_text( int align, const render_color &color) { - // compute premultiplied colors + // compute premultiplied color u32 const r(color.r * 255.0f); u32 const g(color.g * 255.0f); u32 const b(color.b * 255.0f); diff --git a/src/mame/drivers/conic_cchess3.cpp b/src/mame/drivers/conic_cchess3.cpp index 243278c67cf..f269e3472e9 100644 --- a/src/mame/drivers/conic_cchess3.cpp +++ b/src/mame/drivers/conic_cchess3.cpp @@ -142,8 +142,8 @@ void cchess3_state::cncchess3(machine_config &config) ROM_START( cncchess3 ) ROM_REGION( 0x4000, "maincpu", 0 ) - ROM_LOAD("c107013-1", 0x2000, 0x1000, CRC(3251a529) SHA1(729b22d7653761ff0951ce1da58fdfcd474a700d) ) // AMI 2332 - ROM_LOAD("c107013-2", 0x3000, 0x1000, CRC(0f38dcef) SHA1(f8fb7e12b41753fe52dd2eb2edb843211b5ca7c1) ) // " + ROM_LOAD("ci07013-1", 0x2000, 0x1000, CRC(3251a529) SHA1(729b22d7653761ff0951ce1da58fdfcd474a700d) ) // AMI 2332 + ROM_LOAD("ci07013-2", 0x3000, 0x1000, CRC(0f38dcef) SHA1(f8fb7e12b41753fe52dd2eb2edb843211b5ca7c1) ) // " ROM_REGION( 0x0800, "mcu", 0 ) ROM_LOAD("msm5840h-41rs", 0x0000, 0x0800, NO_DUMP ) diff --git a/src/mame/layout/v4in1eg.lay b/src/mame/layout/v4in1eg.lay index 246893307b6..744b3a3c3bc 100644 --- a/src/mame/layout/v4in1eg.lay +++ b/src/mame/layout/v4in1eg.lay @@ -35,10 +35,10 @@ license:CC0 - + - + -- cgit v1.2.3