summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar angelosa <salese_corp_ltd@email.it>2018-01-18 02:26:11 +0100
committerGravatarGravatar angelosa <salese_corp_ltd@email.it>2018-01-18 02:27:39 +0100
commitb6450aa0ae3a8d8c09df01aa641c024bf14a9b43 (patch) (github)
tree1e8670002d74a48ad7c2ce0db19577d1f6512dac
parent07304b6670b9fb34544034f3d76771f1ce58d202 (diff)
downloadmame-b6450aa0ae3a8d8c09df01aa641c024bf14a9b43.tar.bz2
mame-b6450aa0ae3a8d8c09df01aa641c024bf14a9b43.zip
Cleaned up video function (nw)
-rw-r--r--src/mame/video/blockout.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/mame/video/blockout.cpp b/src/mame/video/blockout.cpp
index 4846691d47e..cc97fb44c26 100644
--- a/src/mame/video/blockout.cpp
+++ b/src/mame/video/blockout.cpp
@@ -115,17 +115,11 @@ uint32_t blockout_state::screen_update_blockout(screen_device &screen, bitmap_in
for (x = 0; x < 320; x += 8)
{
int d = m_frontvideoram[y * 64 + (x / 8)];
-
- if (d)
+ int xi;
+ for(xi=0;xi<8;xi++)
{
- if (d & 0x80) bitmap.pix16(y, x + 0) = color;
- if (d & 0x40) bitmap.pix16(y, x + 1) = color;
- if (d & 0x20) bitmap.pix16(y, x + 2) = color;
- if (d & 0x10) bitmap.pix16(y, x + 3) = color;
- if (d & 0x08) bitmap.pix16(y, x + 4) = color;
- if (d & 0x04) bitmap.pix16(y, x + 5) = color;
- if (d & 0x02) bitmap.pix16(y, x + 6) = color;
- if (d & 0x01) bitmap.pix16(y, x + 7) = color;
+ if(d & 1 << (7-xi))
+ bitmap.pix16(y, x + xi) = color;
}
}
}