summary refs log tree commit diff stats
path: root/sdl.h
diff options
context:
space:
mode:
Diffstat (limited to 'sdl.h')
-rw-r--r--sdl.h20
1 files changed, 0 insertions, 20 deletions
diff --git a/sdl.h b/sdl.h index 46d1fa4..4335ed2 100644 --- a/sdl.h +++ b/sdl.h
@@ -2,7 +2,6 @@
2#define SDL_H_A2226476 2#define SDL_H_A2226476
3 3
4#include <SDL.h> 4#include <SDL.h>
5#include <SDL_net.h>
6#include <SDL_ttf.h> 5#include <SDL_ttf.h>
7 6
8#include <memory> 7#include <memory>
@@ -17,11 +16,6 @@ class ttf_error : public std::logic_error {
17 ttf_error() : std::logic_error(TTF_GetError()) {} 16 ttf_error() : std::logic_error(TTF_GetError()) {}
18}; 17};
19 18
20class net_error : public std::logic_error {
21 public:
22 net_error() : std::logic_error(SDLNet_GetError()) {}
23};
24
25class sdl_wrapper { 19class sdl_wrapper {
26 public: 20 public:
27 sdl_wrapper() { 21 sdl_wrapper() {
@@ -50,20 +44,6 @@ class ttf_wrapper {
50 ~ttf_wrapper() { TTF_Quit(); } 44 ~ttf_wrapper() { TTF_Quit(); }
51}; 45};
52 46
53class net_wrapper {
54 public:
55 net_wrapper() {
56 if (SDLNet_Init() == -1) {
57 net_error ex;
58 SDLNet_Quit();
59
60 throw ex;
61 }
62 }
63
64 ~net_wrapper() { SDLNet_Quit(); }
65};
66
67class window_deleter { 47class window_deleter {
68 public: 48 public:
69 void operator()(SDL_Window* ptr) { SDL_DestroyWindow(ptr); } 49 void operator()(SDL_Window* ptr) { SDL_DestroyWindow(ptr); }