#define MAX_PATH_LEN 255 /* Macro for error checking and logging */ #define MPL_CHECK(expr, fail_code, priority, ...) \ if (! (expr)) { \ SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION,priority,__VA_ARGS__); \ SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION,priority, \ "-> last SDL error : %s\n", SDL_GetError()); \ fail_code; \ } /* Macro that check and set NULL texture pointer when destroying */ #define DESTROYTEXTURE_SAFE(t) \ if (t != NULL) { \ SDL_DestroyTexture(t); \ t=NULL; \ }