summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2022-02-28 13:27:50 +0100
committer hap <happppp@users.noreply.github.com>2022-02-28 13:28:04 +0100
commitfba39f5b01b9b7c15a4744d7c478a0ab4bec8390 (patch)
tree8a8da2c6be1cafe123f5d4b477b265c87b382748
parentfbbb9151ab6939801f3166ee10d9de92993e7eac (diff)
rendlay: fix possible color overflow on disk element
-rw-r--r--src/emu/rendlay.cpp14
-rw-r--r--src/mame/drivers/conic_cchess3.cpp4
-rw-r--r--src/mame/layout/v4in1eg.lay4
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
</repeat>
<repeat count="4">
- <param name="x" start="1.25" increment="8.333" />
+ <param name="x" start="6.25" increment="8.333" />
<param name="i" start="1" increment="1" />
- <element ref="text_l~i~"><bounds x="~x~" y="2" width="22" height="1.75" /></element>
+ <element ref="text_l~i~"><bounds x="~x~" y="2" width="12" height="1.75" /></element>
</repeat>
<repeat count="12">