Previous 15994 Revisions Next

r2100 Tuesday 25th March, 2008 at 08:58:38 UTC by Robbbert
[CGENIE] Fixed palette (bug 1545).
[src/mess/drivers]cgenie.c

src/mess/drivers/cgenie.c
r2099r2100
268268   GFXDECODE_ENTRY( REGION_GFX2, 0, cgenie_gfxlayout, 3*16*2, 3*4 )
269269GFXDECODE_END
270270
271static const unsigned char cgenie_palette[] = {
271static const unsigned char cgenie_colors[] = {
272272    0*4,  0*4,  0*4,  /* background   */
273273
274274/* this is the 'RGB monitor' version, strong and clean */
r2099r2100
327327
328328};
329329
330static const unsigned short cgenie_colortable[] =
330static const unsigned short cgenie_palette[] =
331331{
332332   0, 1, 0, 2, 0, 3, 0, 4, /* RGB monitor set of text colors */
333333   0, 5, 0, 6, 0, 7, 0, 8,
r2099r2100
352352/* Initialise the palette */
353353static PALETTE_INIT( cgenie )
354354{
355   int i;
355   UINT8 i, r, g, b;
356356
357   for ( i = 0; i < sizeof(cgenie_palette) / 3; i++ ) {
358      palette_set_color_rgb(machine, i, cgenie_palette[i*3], cgenie_palette[i*3+1], cgenie_palette[i*3+2]);
357   machine->colortable = colortable_alloc(machine, 49);
358
359   for ( i = 0; i < 49; i++ )
360   {
361      r = cgenie_colors[i*3]; g = cgenie_colors[i*3+1]; b = cgenie_colors[i*3+2];
362      colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b));
359363   }
364
365   for(i=0; i<108; i++)
366      colortable_entry_set_value(machine->colortable, i, cgenie_palette[i]);
360367}
361368
362369
r2099r2100
390397   MDRV_SCREEN_SIZE(48*8, (32)*8)
391398   MDRV_SCREEN_VISIBLE_AREA(0*8, 48*8-1,0*8,32*8-1)
392399   MDRV_GFXDECODE( cgenie )
393   MDRV_PALETTE_LENGTH(sizeof(cgenie_palette) / sizeof(cgenie_palette[0]) / 3)
400   MDRV_PALETTE_LENGTH(108)
394401   MDRV_PALETTE_INIT( cgenie )
395402
396403   MDRV_VIDEO_START( cgenie )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team