Previous 15994 Revisions Next

r4883 Saturday 30th May, 2009 at 11:42:20 UTC by Robbbert
Fixed cassette animation broken since 0.114. Using ascii art.
[src/mess/devices]cassette.c

src/mess/devices/cassette.c
r4882r4883
327327   double position, length;
328328   cassette_state uistate;
329329   const device_config *device;
330   UINT8 shapes[8] = { 0x2d, 0x5c, 0x7c, 0x2f, 0x2d, 0x20, 0x20, 0x20 };
330331
331332   /* abort if we should not be showing the image */
332333   if (!image_exists(image))
r4882r4883
354355   y *= ui_get_line_height();
355356   /* choose which frame of the animation we are at */
356357   n = ((int) position / ANIMATION_FPS) % ANIMATION_FRAMES;
357
358#if 0
359   /* THE ANIMATION HASN'T WORKED SINCE 0.114 - LEFT HERE FOR REFERENCE */
360   /* NEVER SEEN THE PLAY / RECORD ICONS */
358361   /* character pairs 2-3, 4-5, 6-7, 8-9 form little tape cassette images */
359362   snprintf(buf, sizeof(buf) / sizeof(buf[0]), "%c%c %c %02d:%02d (%04d) [%02d:%02d (%04d)]",
360363      n * 2 + 2,                        /* cassette icon left */
361364      n * 2 + 3,                        /* cassette icon right */
362365      (uistate == CASSETTE_PLAY) ? 16 : 14,   /* play or record icon */
366#endif
367   /* Since you can have anything in a BDF file, we will use crude ascii characters instead */
368   snprintf(buf, sizeof(buf) / sizeof(buf[0]), "%c%c %c %02d:%02d (%04d) [%02d:%02d (%04d)]",
369      shapes[n],               /* cassette icon left */
370      shapes[n|4],               /* cassette icon right */
371      (uistate == CASSETTE_PLAY) ? 0x50 : 0x52,   /* play (P) or record (R) */
363372      ((int) position / 60),
364373      ((int) position % 60),
365374      (int) position,

Previous 15994 Revisions Next


© 1998-2018 The MESS Team