]> git.localhorst.tv Git - l2e.git/blob - src/sdl/InitImage.cpp
added spell selection battle state
[l2e.git] / src / sdl / InitImage.cpp
1 /*
2  * InitImage.cpp
3  *
4  *  Created on: Aug 6, 2012
5  *      Author: holy
6  */
7
8 #include "InitImage.h"
9
10 #include <SDL_image.h>
11 #include <stdexcept>
12
13 using std::runtime_error;
14
15 namespace sdl {
16
17 InitImage::InitImage(int flags) {
18         if (IMG_Init(flags) != flags) {
19                 throw runtime_error(IMG_GetError());
20         }
21 }
22
23 InitImage::~InitImage() {
24         IMG_Quit();
25 }
26
27 }