wii_anal_lcd.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #ifndef WII_ANAL_LCD_H_
  2. #define WII_ANAL_LCD_H_
  3. //----------------------------------------------------------------------------- ----------------------------------------
  4. // A couple of monospaced hex fonts
  5. //
  6. #include "gfx/images.h"
  7. extern const image_t* img_6x8[];
  8. extern const image_t* img_5x7[];
  9. //============================================================================= ========================================
  10. // macros to draw only two sides of a box
  11. // these are used for drawing the wires on the WAIT screen
  12. //
  13. #define BOX_TL(x1, y1, x2, y2) \
  14. do { \
  15. canvas_draw_frame(canvas, x1, y1, x2 - x1 + 1, 2); \
  16. canvas_draw_frame(canvas, x1, y1 + 2, 2, y2 - y1 + 1 - 2); \
  17. } while(0)
  18. #define BOX_BL(x1, y1, x2, y2) \
  19. do { \
  20. canvas_draw_frame(canvas, x1, y2 - 1, x2 - x1 + 1, 2); \
  21. canvas_draw_frame(canvas, x1, y1, 2, y2 - y1 + 1 - 2); \
  22. } while(0)
  23. //============================================================================= ========================================
  24. // Function prototypes
  25. //
  26. void patBacklight(state_t* state);
  27. void showHex(
  28. Canvas* const canvas,
  29. uint8_t x,
  30. uint8_t y,
  31. const uint32_t val,
  32. const uint8_t cnt,
  33. const int b);
  34. void showPeakHold(state_t* const state, Canvas* const canvas, const int hold);
  35. void showJoy(
  36. Canvas* const canvas,
  37. const uint8_t x,
  38. const uint8_t y, // x,y is the CENTRE of the Joystick
  39. const uint8_t xMin,
  40. const uint8_t xMid,
  41. const uint8_t xMax,
  42. const uint8_t yMin,
  43. const uint8_t yMid,
  44. const uint8_t yMax,
  45. const uint8_t xPos,
  46. const uint8_t yPos,
  47. const uint8_t bits);
  48. #endif //WII_ANAL_LCD_H_