summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/video/cesblit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/video/cesblit.cpp')
-rw-r--r--src/devices/video/cesblit.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/devices/video/cesblit.cpp b/src/devices/video/cesblit.cpp
index 4cea7aef4f5..7e0e6a2085b 100644
--- a/src/devices/video/cesblit.cpp
+++ b/src/devices/video/cesblit.cpp
@@ -213,8 +213,6 @@ void cesblit_device::do_blit()
// Draw
bitmap_ind16 &bitmap = m_bitmap[layer][buffer];
- int x,y;
- uint16_t pen;
switch (mode & 0x20)
{
@@ -227,17 +225,17 @@ void cesblit_device::do_blit()
uint8_t dst_pen = (m_color >> 8) & 0xff;
uint8_t src_pen = (m_color >> 0) & 0xff;
- for (y = y0; y != y1; y += dy)
+ for (int y = y0; y != y1; y += dy)
{
- for (x = x0; x != x1; x += dx)
+ for (int x = x0; x != x1; x += dx)
{
- pen = m_space->read_byte(addr);
+ uint16_t pen = m_space->read_byte(addr);
if (pen == src_pen)
pen = dst_pen;
if (pen != 0xff)
- bitmap.pix16((sy + y) & 0x1ff, (sx + x) & 0x1ff) = pen + color;
+ bitmap.pix((sy + y) & 0x1ff, (sx + x) & 0x1ff) = pen + color;
++addr;
}
@@ -247,14 +245,14 @@ void cesblit_device::do_blit()
{
// copy from ROM as is
- for (y = y0; y != y1; y += dy)
+ for (int y = y0; y != y1; y += dy)
{
- for (x = x0; x != x1; x += dx)
+ for (int x = x0; x != x1; x += dx)
{
- pen = m_space->read_byte(addr);
+ uint16_t pen = m_space->read_byte(addr);
if (pen != 0xff)
- bitmap.pix16((sy + y) & 0x1ff, (sx + x) & 0x1ff) = pen + color;
+ bitmap.pix((sy + y) & 0x1ff, (sx + x) & 0x1ff) = pen + color;
++addr;
}
@@ -263,16 +261,18 @@ void cesblit_device::do_blit()
break;
case 0x20: // solid fill
- pen = ((m_addr_hi >> 8) & 0xff) + color;
+ {
+ uint16_t pen = ((m_addr_hi >> 8) & 0xff) + color;
- if ((pen & 0xff) == 0xff)
- pen = 0xff;
+ if ((pen & 0xff) == 0xff)
+ pen = 0xff;
- for (y = y0; y != y1; y += dy)
- {
- for (x = x0; x != x1; x += dx)
+ for (int y = y0; y != y1; y += dy)
{
- bitmap.pix16((sy + y) & 0x1ff, (sx + x) & 0x1ff) = pen;
+ for (int x = x0; x != x1; x += dx)
+ {
+ bitmap.pix((sy + y) & 0x1ff, (sx + x) & 0x1ff) = pen;
+ }
}
}
break;