summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Zsolt Vasvari <zsoltvas@mamedev.org>2008-02-01 15:07:12 +0000
committer Zsolt Vasvari <zsoltvas@mamedev.org>2008-02-01 15:07:12 +0000
commit7d30fb91dfc5f4cb43336cd813045de0c0e71caf (patch)
tree299dd43dba174b5afac73e79898370839c5e2cd5 /src
parentdea8c5257d60e148da6d0a3eecdcbc08f2294bef (diff)
This wasn't ready yet. Reversing
Diffstat (limited to 'src')
-rw-r--r--src/mame/drivers/irobot.c3
-rw-r--r--src/mame/video/irobot.c30
2 files changed, 18 insertions, 15 deletions
diff --git a/src/mame/drivers/irobot.c b/src/mame/drivers/irobot.c
index 60aba654e48..fa6883fba45 100644
--- a/src/mame/drivers/irobot.c
+++ b/src/mame/drivers/irobot.c
@@ -313,7 +313,8 @@ static MACHINE_DRIVER_START( irobot )
MDRV_SCREEN_SIZE(32*8, 32*8)
MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 29*8-1)
MDRV_GFXDECODE(irobot)
- MDRV_PALETTE_LENGTH(64 + 32) /* 64 for polygons, 32 for text */
+ MDRV_PALETTE_LENGTH(64 + 32)
+ MDRV_COLORTABLE_LENGTH(64 + 32) /* 64 for polygons, 32 for text */
MDRV_PALETTE_INIT(irobot)
MDRV_VIDEO_START(irobot)
diff --git a/src/mame/video/irobot.c b/src/mame/video/irobot.c
index fb7b21025a4..9ae04452499 100644
--- a/src/mame/video/irobot.c
+++ b/src/mame/video/irobot.c
@@ -73,7 +73,9 @@ PALETTE_INIT( irobot )
/* text */
for (i = 0;i < TOTAL_COLORS(0);i++)
+ {
COLOR(0,i) = ((i & 0x18) | ((i & 0x01) << 2) | ((i & 0x06) >> 1)) + 64;
+ }
}
@@ -91,7 +93,7 @@ WRITE8_HANDLER( irobot_paletteram_w )
g = 12 * bits * intensity;
bits = (color >> 7) & 0x03;
r = 12 * bits * intensity;
- palette_set_color(Machine,(offset >> 1) & 0x3f,MAKE_RGB(r,g,b));
+ palette_set_color(Machine,(offset >> 1) & 0x3F,MAKE_RGB(r,g,b));
}
@@ -370,20 +372,20 @@ VIDEO_UPDATE( irobot )
for (y = cliprect->min_y; y <= cliprect->max_y; y++)
draw_scanline8(bitmap, 0, y, BITMAP_WIDTH, &bitmap_base[y * BITMAP_WIDTH], machine->pens, -1);
- /* redraw the characters in the alpha layer */
+ /* redraw the non-zero characters in the alpha layer */
for (y = offs = 0; y < 32; y++)
for (x = 0; x < 32; x++, offs++)
- {
- int code = videoram[offs] & 0x3f;
- int color = ((videoram[offs] & 0xc0) >> 6) | (irobot_alphamap >> 3);
- int transp = color + 64;
-
- drawgfx(bitmap,machine->gfx[0],
- code, color,
- 0,0,
- 8*x,8*y,
- cliprect,TRANSPARENCY_COLOR,transp);
- }
-
+ if (videoram[offs] != 0)
+ {
+ int code = videoram[offs] & 0x3f;
+ int color = ((videoram[offs] & 0xC0) >> 6) | (irobot_alphamap >> 3);
+ int transp=color + 64;
+
+ drawgfx(bitmap,machine->gfx[0],
+ code, color,
+ 0,0,
+ 8*x,8*y,
+ cliprect,TRANSPARENCY_COLOR,transp);
+ }
return 0;
}