This wasn't ready yet. Reversing

This commit is contained in:
Zsolt Vasvari 2008-02-01 15:07:12 +00:00
parent dea8c5257d
commit 7d30fb91df
2 changed files with 17 additions and 14 deletions

View file

@ -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)

View file

@ -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;
}