GameBoy (Color) port of the GTA San Andreas arcade game Duality
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

gbprinter.h 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * gbprinter.h
  3. * Duality
  4. *
  5. * Based on the gbprinter example from gbdk-2020:
  6. * https://github.com/gbdk-2020/gbdk-2020/tree/develop/gbdk-lib/examples/gb/gbprinter
  7. *
  8. * Copyright (C) 2025 Thomas Buck <thomas@xythobuz.de>
  9. *
  10. * This program is free software: you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License as published by
  12. * the Free Software Foundation, either version 3 of the License, or
  13. * (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * See <http://www.gnu.org/licenses/>.
  21. */
  22. #ifndef __GBPRINTER_H_INCLUDE__
  23. #define __GBPRINTER_H_INCLUDE__
  24. #include <gbdk/platform.h>
  25. #include <stdint.h>
  26. #define PRN_STATUS_OK 0x00
  27. #define PRINTER_DETECT_TIMEOUT 10
  28. uint8_t gbprinter_detect(uint8_t delay) BANKED;
  29. uint8_t gbprinter_print_image(const uint8_t *image_map, const uint8_t *image,
  30. int8_t pos_x, uint8_t width, uint8_t height) BANKED;
  31. uint8_t gbprinter_screenshot(void) BANKED;
  32. uint8_t gbprinter_error(uint8_t status, char *buff);
  33. BANKREF_EXTERN(gbprinter)
  34. BANKREF_EXTERN(gbprinter_error)
  35. #endif // __GBPRINTER_H_INCLUDE__