2D Run-and-gun shooter inspired by One Man's Doomsday, Counter-Strike, and Metal Slug.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

53 行
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. #endif
  22. #include "../compat/IZ_compat.h"
  23. #include <stdbool.h>
  24. #include <stdarg.h>
  25. #include <stdio.h>
  26. #include <time.h>
  27. #include <stdlib.h>
  28. #include "../timer/IZ_timer.h"
  29. #include "../io/IZ_io.h"
  30. #include "../stdinc/IZ_string.h"
  31. typedef enum {
  32. IZ_LOG_CATEGORY_INPUT,
  33. IZ_LOG_CATEGORY_GLOBAL,
  34. IZ_LOG_CATEGORY_GENERIC,
  35. } IZ_LogCategory;
  36. static FILE* stdout_dest;
  37. static FILE* stderr_dest;
  38. void IZ_LogInitialize(const char*, bool);
  39. void IZ_LogError(const char*, const char*, ...);
  40. void IZ_LogInfo(IZ_LogCategory, const char*, const char*, ...);
  41. void IZ_LogWarn(bool, const char*, const char*, ...);
  42. void IZ_Log(const char*, const char*, ...);
  43. void IZ_LogTeardown(void);
  44. #endif