From c978f746058497ddd9ddc9cf3e156c4453e487f1 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Fri, 15 Feb 2013 15:28:42 -0500 Subject: Add resource manager and move src/image.*. --- (limited to 'src/image.c') diff --git a/src/image.c b/src/image.c deleted file mode 100644 index 557e1de..0000000 --- a/src/image.c +++ /dev/null @@ -1,22 +0,0 @@ -#include -#include -#include "logging.h" -#include "image.h" - -SDL_Surface * -load_png(const char *path) -{ - SDL_RWops *rwops; - SDL_Surface *img; - - debug("Loading PNG image \"%s\"...", path); - - rwops = SDL_RWFromFile(path, "rb"); - img = IMG_LoadPNG_RW(rwops); - if (!img) { - err(1, "Failed to load image \"%s\" (%s)", - path, IMG_GetError()); - } - - return img; -} -- cgit v0.9.1