src/mess/video/pocketc.c
| r2034 | r2035 | |
| 31 | 31 | |
| 32 | 32 | PALETTE_INIT( pocketc ) |
| 33 | 33 | { |
| 34 | | int i; |
| 34 | UINT8 i=0, r, b, g, color_count = 6; |
| 35 | 35 | |
| 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)); |
| 38 | 42 | } |
| 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 | } |
| 39 | 49 | } |
| 40 | 50 | |
| 41 | 51 | |
| r2034 | r2035 | |
| 46 | 56 | } |
| 47 | 57 | |
| 48 | 58 | |
| 49 | | void pocketc_draw_special(bitmap_t *bitmap, |
| 50 | | int x, int y, const POCKETC_FIGURE fig, int color) |
| 59 | void pocketc_draw_special(bitmap_t *bitmap, int x, int y, const POCKETC_FIGURE fig, int color) |
| 51 | 60 | { |
| 52 | 61 | 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 | { |
| 56 | 68 | case '1': |
| 57 | | *BITMAP_ADDR16(bitmap, y, x+j) = color; |
| 69 | *BITMAP_ADDR16(bitmap, y, x+j) = color<<2; |
| 58 | 70 | break; |
| 59 | | case 'e': return; |
| 71 | case 'e': |
| 72 | return; |
| 60 | 73 | } |
| 61 | 74 | } |
| 62 | 75 | } |