2D Run-and-gun shooter inspired by One Man's Doomsday, Counter-Strike, and Metal Slug.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

27 lines
590 B

  1. #include "IZ_io.h"
  2. int IZ_sprintf(char* buffer, size_t buffer_size, const char* format, ...) {
  3. #if defined IZ_WIN64
  4. va_list args;
  5. va_start(args, format);
  6. int result = sprintf_s(buffer, buffer_size, format, args);
  7. va_end(args);
  8. return result;
  9. #else
  10. va_list args;
  11. va_start(args, format);
  12. int result = sprintf(buffer, format, args);
  13. va_end(args);
  14. return result;
  15. #endif
  16. }
  17. errno_t IZ_fopen(FILE** file, const char* filename, const char* mode) {
  18. #if defined IZ_WIN64
  19. return fopen_s(file, filename, mode);
  20. #else
  21. *file = fopen(filename, mode);
  22. return *file == NULL ? 1 : 0;
  23. #endif
  24. }