Graphics.h 879 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef INCLUDE_GRAPHICS_H
  2. #define INCLUDE_GRAPHICS_H
  3. #include <cstdint>
  4. #include "utility/Rect.h"
  5. namespace WalrusRPG
  6. {
  7. namespace Graphics
  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 lcd_vsync();
  21. void vsync_isr();
  22. /*
  23. * Drawing
  24. */
  25. void draw_pixel(int x, int y, uint16_t color);
  26. void draw_sprite_sheet(const uint16_t *sheet, int x, int y,
  27. const WalrusRPG::Utils::Rect &window);
  28. /*
  29. * Sprite manipulation
  30. */
  31. uint16_t sprite_pixel_get(const uint16_t *sprite, uint32_t x, uint32_t y);
  32. }
  33. }
  34. #endif