os_dependent.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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) 2002-2019 986-Studio.
  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. void vsync(void);
  19. typedef struct Palette_t
  20. {
  21. uint8_t r, g, b, a;
  22. } Palette;
  23. int getKeyStatus(int key);
  24. /* Sound related functions */
  25. /* IO functions */
  26. void *LoadFilePtr(char *filename);
  27. /* Console functions */
  28. typedef enum ConsoleLevel_t
  29. {
  30. Console_Error = 0,
  31. Console_Warning,
  32. Console_Alert,
  33. Console_Default,
  34. Console_Verbose,
  35. Console_Debug,
  36. } ConsoleLevel;
  37. int console_init(ConsoleLevel DefaultLevel);
  38. int console_printf(const ConsoleLevel level, const char *format, ...);
  39. int console_printf_d(const char *format, ...);
  40. #endif /* OS_DEPENDENT_H */