CXfb.h 837 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef INCLUDE_CXFB_H
  2. #define INCLUDE_CXFB_H
  3. #include <cstdint>
  4. #include "utility/Rect.h"
  5. namespace Nspire
  6. {
  7. namespace CXfb
  8. {
  9. /*
  10. * Buffer management
  11. */
  12. void buffer_allocate();
  13. void buffer_free();
  14. void buffer_swap_screen();
  15. void buffer_swap_render();
  16. void buffer_fill(uint16_t color);
  17. /*
  18. * Misc LCD functions
  19. */
  20. void vsync_isr();
  21. /*
  22. * Drawing
  23. */
  24. void draw_pixel(int x, int y, uint16_t color);
  25. void draw_sprite_sheet(const uint16_t *sheet, int x, int y,
  26. const WalrusRPG::Utils::Rect &window);
  27. /*
  28. * Sprite manipulation
  29. */
  30. uint16_t sprite_pixel_get(const uint16_t *sprite, uint32_t x, uint32_t y);
  31. }
  32. }
  33. #endif