os_dependent.h 1.1 KB

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