os_dependent.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * OS Dependent functions - The peTI-NESulator Project
  3. * os_dependent.h
  4. *
  5. * Created by Manoël TRAPIER on 08/05/08.
  6. * Copyright (c) 2003-2018 986-Studio. All rights reserved.
  7. *
  8. */
  9. #ifndef OS_DEPENDENT_H
  10. #define OS_DEPENDENT_H
  11. #include <stdint.h>
  12. /* File related functions */
  13. /* Graphics related functions */
  14. int graphics_init();
  15. int graphics_drawpixel(long x, long y, long color);
  16. int graphics_blit(long x, long y, long w, long h);
  17. int graphics_drawline(long x, long y, long x1, long y1, long color);
  18. typedef struct Palette_t
  19. {
  20. uint8_t r, g, b, a;
  21. } Palette;
  22. int getKeyStatus(int key);
  23. /* Sound related functions */
  24. /* IO functions */
  25. void *LoadFilePtr(char *filename);
  26. /* Console functions */
  27. typedef enum ConsoleLevel_t
  28. {
  29. Console_Error = 0,
  30. Console_Warning,
  31. Console_Alert,
  32. Console_Default,
  33. Console_Verbose,
  34. Console_Debug,
  35. } ConsoleLevel;
  36. int console_init(ConsoleLevel DefaultLevel);
  37. int console_printf(const ConsoleLevel level, const char *format, ...);
  38. int console_printf_d(const char *format, ...);
  39. #endif /* OS_DEPENDENT_H */