Previous 15994 Revisions Next

r2035 Friday 21st March, 2008 at 01:11:22 UTC by Robbbert
[POCKETC] Fixed palette and special indicators but needs more work
[src/mess/drivers]pocketc.c
[src/mess/video]pocketc.c

src/mess/video/pocketc.c
r2034r2035
3131
3232PALETTE_INIT( pocketc )
3333{
34   int i;
34   UINT8 i=0, r, b, g, color_count = 6;
3535
36   for ( i = 0; i < sizeof(pocketc_palette) / 3; i++ ) {
37      palette_set_color_rgb(machine, i, pocketc_palette[i*3], pocketc_palette[i*3+1], pocketc_palette[i*3+2]);
36   machine->colortable = colortable_alloc(machine, color_count);
37
38   while (color_count--)
39   {
40      r = pocketc_palette[i++]; g = pocketc_palette[i++]; b = pocketc_palette[i++];
41      colortable_palette_set_color(machine->colortable, 5 - color_count, MAKE_RGB(r, g, b));
3842   }
43
44   for( i = 0; i < 8; i++ )
45   {
46      colortable_entry_set_value(machine->colortable, i*2, pocketc_colortable[i][0]);
47      colortable_entry_set_value(machine->colortable, i*2+1, pocketc_colortable[i][1]);
48   }
3949}
4050
4151
r2034r2035
4656}
4757
4858
49void pocketc_draw_special(bitmap_t *bitmap,
50                    int x, int y, const POCKETC_FIGURE fig, int color)
59void pocketc_draw_special(bitmap_t *bitmap, int x, int y, const POCKETC_FIGURE fig, int color)
5160{
5261   int i,j;
53   for (i=0;fig[i];i++,y++) {
54      for (j=0;fig[i][j]!=0;j++) {
55         switch(fig[i][j]) {
62   for (i=0; fig[i]; i++, y++)
63   {
64      for (j=0; fig[i][j]!=0; j++)
65      {
66         switch(fig[i][j])
67         {
5668         case '1':
57            *BITMAP_ADDR16(bitmap, y, x+j) = color;
69            *BITMAP_ADDR16(bitmap, y, x+j) = color<<2;
5870            break;
59         case 'e': return;
71         case 'e':
72            return;
6073         }
6174      }
6275   }
src/mess/drivers/pocketc.c
r2034r2035
530530//  MDRV_SCREEN_SIZE(640, 273)
531531//  MDRV_SCREEN_VISIBLE_AREA(0, 640-1, 0, 273-1)
532532   MDRV_GFXDECODE( pc1401 )
533   MDRV_PALETTE_LENGTH(248 + 32768)
533   MDRV_PALETTE_LENGTH(8*2)
534534   MDRV_PALETTE_INIT( pocketc )
535535
536536   MDRV_VIDEO_START( pocketc )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team