Previous 15994 Revisions Next

r2138 Saturday 29th March, 2008 at 14:13:21 UTC by Firewave
More Machine -> machine cleanups
[src/mess]mscommon.c mscommon.h
[src/mess/drivers]mpf1.c

src/mess/mscommon.c
r2137r2138
176176
177177***************************************************************************/
178178
179void draw_led(bitmap_t *bitmap, const char *led, int valueorcolor, int x, int y)
179void draw_led(running_machine *machine, bitmap_t *bitmap, const char *led, int valueorcolor, int x, int y)
180180{
181181   char c;
182182   int i, xi, yi, mask, color;
r2137r2138
191191      else if (c >= 'a')
192192      {
193193         mask = 1 << (c - 'a');
194         color = Machine->pens[(valueorcolor & mask) ? 1 : 0];
194         color = machine->pens[(valueorcolor & mask) ? 1 : 0];
195195         *BITMAP_ADDR16(bitmap, y+yi, x+xi) = color;
196196      }
197197      if (c != '\r')
src/mess/drivers/mpf1.c
r2137r2138
146146   //fillbitmap(bitmap, get_black_pen(), NULL);
147147
148148   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);
150150
151151   // 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);
153153
154154   // halt-LED; the red one, is turned on when the processor is halted
155155   // TODO: processor seems to halt, but restarts(?) at 0x0000 after a while -> fix
156156   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);
158158   return 0;
159159}
160160
src/mess/mscommon.h
r2137r2138
5252 * the value of 'valueorcolor' is a mask when lowercase letters are in the led
5353 * string or is a color when '1' characters are in the led string
5454 */
55void draw_led(bitmap_t *bitmap, const char *led, int valueorcolor, int x, int y);
55void draw_led(running_machine *machine, bitmap_t *bitmap, const char *led, int valueorcolor, int x, int y);
5656
5757/* a radius two led:
5858 *

Previous 15994 Revisions Next


© 1998-2018 The MESS Team