diff options
Diffstat (limited to 'src/emu/rendlay.cpp')
-rw-r--r-- | src/emu/rendlay.cpp | 52 |
1 files changed, 11 insertions, 41 deletions
diff --git a/src/emu/rendlay.cpp b/src/emu/rendlay.cpp index b312637c0a9..88cc161e22f 100644 --- a/src/emu/rendlay.cpp +++ b/src/emu/rendlay.cpp @@ -2465,7 +2465,6 @@ public: // construction/destruction led7seg_component(environment &env, util::xml::data_node const &compnode) : component(env, compnode) - , m_alpha(std::clamp(env.get_attribute_float(compnode, "alpha", 0.125F), 0.0F, 1.0F)) { } @@ -2476,7 +2475,7 @@ protected: virtual void draw_aligned(running_machine &machine, bitmap_argb32 &dest, const rectangle &bounds, int state) override { rgb_t const onpen = rgb_t(0xff, 0xff, 0xff, 0xff); - rgb_t const offpen = rgb_t(m_alpha * 0xff, 0xff, 0xff, 0xff); + rgb_t const offpen = rgb_t(0x20, 0xff, 0xff, 0xff); // sizes for computation int const bmwidth = 250; @@ -2518,10 +2517,6 @@ protected: // resample to the target size render_resample_argb_bitmap_hq(dest, tempbitmap, color(state)); } - -private: - // internal state - float m_alpha; // opacity for off-segments }; @@ -2532,7 +2527,6 @@ public: // construction/destruction led8seg_gts1_component(environment &env, util::xml::data_node const &compnode) : component(env, compnode) - , m_alpha(std::clamp(env.get_attribute_float(compnode, "alpha", 0.125F), 0.0F, 1.0F)) { } @@ -2543,7 +2537,7 @@ protected: virtual void draw_aligned(running_machine &machine, bitmap_argb32 &dest, const rectangle &bounds, int state) override { rgb_t const onpen = rgb_t(0xff, 0xff, 0xff, 0xff); - rgb_t const offpen = rgb_t(m_alpha * 0xff, 0xff, 0xff, 0xff); + rgb_t const offpen = rgb_t(0x20, 0xff, 0xff, 0xff); rgb_t const backpen = rgb_t(0x00, 0x00, 0x00, 0x00); // sizes for computation @@ -2591,10 +2585,6 @@ protected: // resample to the target size render_resample_argb_bitmap_hq(dest, tempbitmap, color(state)); } - -private: - // internal state - float m_alpha; // opacity for off-segments }; @@ -2605,7 +2595,6 @@ public: // construction/destruction led14seg_component(environment &env, util::xml::data_node const &compnode) : component(env, compnode) - , m_alpha(std::clamp(env.get_attribute_float(compnode, "alpha", 0.125F), 0.0F, 1.0F)) { } @@ -2616,7 +2605,7 @@ protected: virtual void draw_aligned(running_machine &machine, bitmap_argb32 &dest, const rectangle &bounds, int state) override { rgb_t const onpen = rgb_t(0xff, 0xff, 0xff, 0xff); - rgb_t const offpen = rgb_t(m_alpha * 0xff, 0xff, 0xff, 0xff); + rgb_t const offpen = rgb_t(0x20, 0xff, 0xff, 0xff); // sizes for computation int const bmwidth = 250; @@ -2708,10 +2697,6 @@ protected: // resample to the target size render_resample_argb_bitmap_hq(dest, tempbitmap, color(state)); } - -private: - // internal state - float m_alpha; // opacity for off-segments }; @@ -2722,7 +2707,6 @@ public: // construction/destruction led16seg_component(environment &env, util::xml::data_node const &compnode) : component(env, compnode) - , m_alpha(std::clamp(env.get_attribute_float(compnode, "alpha", 0.125F), 0.0F, 1.0F)) { } @@ -2732,14 +2716,14 @@ protected: virtual void draw_aligned(running_machine &machine, bitmap_argb32 &dest, const rectangle &bounds, int state) override { - rgb_t const onpen = rgb_t(0xff, 0xff, 0xff, 0xff); - rgb_t const offpen = rgb_t(m_alpha * 0xff, 0xff, 0xff, 0xff); + const rgb_t onpen = rgb_t(0xff, 0xff, 0xff, 0xff); + const rgb_t offpen = rgb_t(0x20, 0xff, 0xff, 0xff); // sizes for computation - int const bmwidth = 250; - int const bmheight = 400; - int const segwidth = 40; - int const skewwidth = 40; + int bmwidth = 250; + int bmheight = 400; + int segwidth = 40; + int skewwidth = 40; // allocate a temporary bitmap for drawing bitmap_argb32 tempbitmap(bmwidth + skewwidth, bmheight); @@ -2835,10 +2819,6 @@ protected: // resample to the target size render_resample_argb_bitmap_hq(dest, tempbitmap, color(state)); } - -private: - // internal state - float m_alpha; // opacity for off-segments }; @@ -2849,7 +2829,6 @@ public: // construction/destruction led14segsc_component(environment &env, util::xml::data_node const &compnode) : component(env, compnode) - , m_alpha(std::clamp(env.get_attribute_float(compnode, "alpha", 0.125F), 0.0F, 1.0F)) { } @@ -2860,7 +2839,7 @@ protected: virtual void draw_aligned(running_machine &machine, bitmap_argb32 &dest, const rectangle &bounds, int state) override { rgb_t const onpen = rgb_t(0xff, 0xff, 0xff, 0xff); - rgb_t const offpen = rgb_t(m_alpha * 0xff, 0xff, 0xff, 0xff); + rgb_t const offpen = rgb_t(0x20, 0xff, 0xff, 0xff); // sizes for computation int const bmwidth = 250; @@ -2963,10 +2942,6 @@ protected: // resample to the target size render_resample_argb_bitmap_hq(dest, tempbitmap, color(state)); } - -private: - // internal state - float m_alpha; // opacity for off-segments }; @@ -2977,7 +2952,6 @@ public: // construction/destruction led16segsc_component(environment &env, util::xml::data_node const &compnode) : component(env, compnode) - , m_alpha(std::clamp(env.get_attribute_float(compnode, "alpha", 0.125F), 0.0F, 1.0F)) { } @@ -2988,7 +2962,7 @@ protected: virtual void draw_aligned(running_machine &machine, bitmap_argb32 &dest, const rectangle &bounds, int state) override { rgb_t const onpen = rgb_t(0xff, 0xff, 0xff, 0xff); - rgb_t const offpen = rgb_t(m_alpha * 0xff, 0xff, 0xff, 0xff); + rgb_t const offpen = rgb_t(0x20, 0xff, 0xff, 0xff); // sizes for computation int const bmwidth = 250; @@ -3100,10 +3074,6 @@ protected: // resample to the target size render_resample_argb_bitmap_hq(dest, tempbitmap, color(state)); } - -private: - // internal state - float m_alpha; // opacity for off-segments }; |