diff options
Diffstat (limited to 'src/sandbox/sprite_gif.c')
-rw-r--r-- | src/sandbox/sprite_gif.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/sandbox/sprite_gif.c b/src/sandbox/sprite_gif.c index 28c57aa..48657df 100644 --- a/src/sandbox/sprite_gif.c +++ b/src/sandbox/sprite_gif.c @@ -92,7 +92,7 @@ void my_SDL_init_or_die(char title[], SDL_Rect win_pos, Uint32 init_flags, Uint3 Uint32 tf; res=SDL_Init(init_flags); - mpl_check( + MPL_CHECK( res==0, // Expression to evaluate {exit(1);} , // Code to execute if expression is not true SDL_LOG_PRIORITY_CRITICAL, // SDL_LogPriority (_CRITICAL, _ERROR, _WARN, _INFO, DEBUG, _VERBOSE) @@ -101,7 +101,7 @@ void my_SDL_init_or_die(char title[], SDL_Rect win_pos, Uint32 init_flags, Uint3 *win=SDL_CreateWindow(title,win_pos.x,win_pos.y,win_pos.w,win_pos.h,win_flags); - mpl_check( + MPL_CHECK( *win, // Just put the pointer if you want to check if it's not NULL {SDL_Quit(); exit(2);}, SDL_LOG_PRIORITY_CRITICAL, @@ -114,7 +114,7 @@ void my_SDL_init_or_die(char title[], SDL_Rect win_pos, Uint32 init_flags, Uint3 ); *rend=SDL_CreateRenderer(*win,-1, rend_flags); - mpl_check( + MPL_CHECK( *rend, {SDL_DestroyWindow(*win);SDL_Quit(); exit(3);}, SDL_LOG_PRIORITY_CRITICAL, @@ -122,7 +122,7 @@ void my_SDL_init_or_die(char title[], SDL_Rect win_pos, Uint32 init_flags, Uint3 ); res=SDL_GetRendererInfo(*rend, rend_info); - mpl_check( + MPL_CHECK( res==0, {SDL_DestroyRenderer(*rend);SDL_DestroyWindow(*win);SDL_Quit(); exit(4);}, SDL_LOG_PRIORITY_CRITICAL, @@ -175,7 +175,7 @@ SDL_Texture * my_sdl_load_texture(SDL_Renderer *rend, char *giffilepath, SDL_Rec s = IMG_LoadGIF_RW(rwop); SDL_RWclose(rwop); - mpl_check( + MPL_CHECK( s, {return NULL;}, SDL_LOG_PRIORITY_WARN, @@ -183,7 +183,7 @@ SDL_Texture * my_sdl_load_texture(SDL_Renderer *rend, char *giffilepath, SDL_Rec ); t = SDL_CreateTextureFromSurface(rend, s); - mpl_check( + MPL_CHECK( t, {SDL_FreeSurface(s); return NULL;}, SDL_LOG_PRIORITY_WARN, |