2D Run-and-gun shooter inspired by One Man's Doomsday, Counter-Strike, and Metal Slug.
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 
 

55 righe
1.2 KiB

  1. #ifndef IZ_LOG_H
  2. #define IZ_LOG_H
  3. #define BOLD "\x1B[0;1m" // Bold White
  4. #define RED "\x1B[0;31m"
  5. #define GRN "\x1B[0;32m"
  6. #define YEL "\x1B[0;33m"
  7. #define BLU "\x1B[0;34m"
  8. #define MAG "\x1B[0;35m"
  9. #define CYN "\x1B[0;36m"
  10. #define WHT "\x1B[0;37m"
  11. #define RESET "\x1B[0m"
  12. #define IZ_LOG_LEVEL_FLAG_DEBUG
  13. #define IZ_LOG_LEVEL_FLAG_INFO
  14. #define IZ_LOG_LEVEL_FLAG_WARN
  15. #define IZ_LOG_LEVEL_FLAG_ERROR
  16. #if defined IZ_WINDOWS
  17. #include <io.h>
  18. #include <SDL_syswm.h>
  19. #elif defined IZ_MACOS
  20. #include <unistd.h>
  21. #elif defined IZ_UNIX
  22. #include <unistd.h>
  23. #endif
  24. #include "../compat/IZ_compat.h"
  25. #include <stdbool.h>
  26. #include <stdarg.h>
  27. #include <stdio.h>
  28. #include <time.h>
  29. #include <stdlib.h>
  30. #include "../timer/IZ_timer.h"
  31. #include "../io/IZ_io.h"
  32. #include "../stdinc/IZ_string.h"
  33. typedef enum {
  34. IZ_LOG_CATEGORY_INPUT,
  35. IZ_LOG_CATEGORY_GLOBAL,
  36. IZ_LOG_CATEGORY_GENERIC,
  37. } IZ_LogCategory;
  38. static FILE* stdout_dest;
  39. static FILE* stderr_dest;
  40. void IZ_LogInitialize(const char*, bool);
  41. void IZ_LogError(const char*, const char*, ...);
  42. void IZ_LogInfo(IZ_LogCategory, const char*, const char*, ...);
  43. void IZ_LogWarn(bool, const char*, const char*, ...);
  44. void IZ_Log(const char*, const char*, ...);
  45. void IZ_LogTeardown(void);
  46. #endif