src/mess/mscommon.c
| r2137 | r2138 | |
| 176 | 176 | |
| 177 | 177 | ***************************************************************************/ |
| 178 | 178 | |
| 179 | | void draw_led(bitmap_t *bitmap, const char *led, int valueorcolor, int x, int y) |
| 179 | void draw_led(running_machine *machine, bitmap_t *bitmap, const char *led, int valueorcolor, int x, int y) |
| 180 | 180 | { |
| 181 | 181 | char c; |
| 182 | 182 | int i, xi, yi, mask, color; |
| r2137 | r2138 | |
| 191 | 191 | else if (c >= 'a') |
| 192 | 192 | { |
| 193 | 193 | mask = 1 << (c - 'a'); |
| 194 | | color = Machine->pens[(valueorcolor & mask) ? 1 : 0]; |
| 194 | color = machine->pens[(valueorcolor & mask) ? 1 : 0]; |
| 195 | 195 | *BITMAP_ADDR16(bitmap, y+yi, x+xi) = color; |
| 196 | 196 | } |
| 197 | 197 | if (c != '\r') |
src/mess/drivers/mpf1.c
| r2137 | r2138 | |
| 146 | 146 | //fillbitmap(bitmap, get_black_pen(), NULL); |
| 147 | 147 | |
| 148 | 148 | for(x = 0; x < 6; x++) |
| 149 | | draw_led(bitmap, leddisplay, leddigit[x], xpositions[x], 377); |
| 149 | draw_led(screen->machine, bitmap, leddisplay, leddigit[x], xpositions[x], 377); |
| 150 | 150 | |
| 151 | 151 | // tone-LED; the green one |
| 152 | | draw_led(bitmap, radius_7_led, led_tone * 2, 277, 375); |
| 152 | draw_led(screen->machine, bitmap, radius_7_led, led_tone * 2, 277, 375); |
| 153 | 153 | |
| 154 | 154 | // halt-LED; the red one, is turned on when the processor is halted |
| 155 | 155 | // TODO: processor seems to halt, but restarts(?) at 0x0000 after a while -> fix |
| 156 | 156 | led_halt = (UINT8) cpunum_get_info_int(0, CPUINFO_INT_REGISTER + Z80_HALT); |
| 157 | | draw_led(bitmap, radius_7_led, led_halt, 277, 394); |
| 157 | draw_led(screen->machine, bitmap, radius_7_led, led_halt, 277, 394); |
| 158 | 158 | return 0; |
| 159 | 159 | } |
| 160 | 160 | |
src/mess/mscommon.h
| r2137 | r2138 | |
| 52 | 52 | * the value of 'valueorcolor' is a mask when lowercase letters are in the led |
| 53 | 53 | * string or is a color when '1' characters are in the led string |
| 54 | 54 | */ |
| 55 | | void draw_led(bitmap_t *bitmap, const char *led, int valueorcolor, int x, int y); |
| 55 | void draw_led(running_machine *machine, bitmap_t *bitmap, const char *led, int valueorcolor, int x, int y); |
| 56 | 56 | |
| 57 | 57 | /* a radius two led: |
| 58 | 58 | * |