summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/irobot.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/irobot.cpp')
-rw-r--r--src/mame/video/irobot.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/mame/video/irobot.cpp b/src/mame/video/irobot.cpp
index 1ff2031e48e..c1a7f83a7f1 100644
--- a/src/mame/video/irobot.cpp
+++ b/src/mame/video/irobot.cpp
@@ -39,21 +39,20 @@
***************************************************************************/
-PALETTE_INIT_MEMBER(irobot_state, irobot)
+void irobot_state::irobot_palette(palette_device &palette) const
{
- const uint8_t *color_prom = memregion("proms")->base();
- int i;
+ uint8_t const *const color_prom = memregion("proms")->base();
- /* convert the color prom for the text palette */
- for (i = 0; i < 32; i++)
+ // convert the color prom for the text palette
+ for (unsigned i = 0; i < 32; i++)
{
- int intensity = color_prom[i] & 0x03;
+ int const intensity = color_prom[i] & 0x03;
- int r = 28 * ((color_prom[i] >> 6) & 0x03) * intensity;
- int g = 28 * ((color_prom[i] >> 4) & 0x03) * intensity;
- int b = 28 * ((color_prom[i] >> 2) & 0x03) * intensity;
+ int const r = 28 * ((color_prom[i] >> 6) & 0x03) * intensity;
+ int const g = 28 * ((color_prom[i] >> 4) & 0x03) * intensity;
+ int const b = 28 * ((color_prom[i] >> 2) & 0x03) * intensity;
- int swapped_i = bitswap<8>(i,7,6,5,4,3,0,1,2);
+ int const swapped_i = bitswap<8>(i,7,6,5,4,3,0,1,2);
palette.set_pen_color(swapped_i + 64, rgb_t(r, g, b));
}