X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp%2Finit.hpp;h=42a4176af29ba02f03665ac0981f071222748e88;hb=c0a5ece0f6bacea1b85157a908d710070fb0affd;hp=13bffa1f30e8886087ac441319f0f9af766f8aa3;hpb=7c2a8b8285278b8a3077b311d82f05ea0463a96e;p=blank.git diff --git a/src/app/init.hpp b/src/app/init.hpp index 13bffa1..42a4176 100644 --- a/src/app/init.hpp +++ b/src/app/init.hpp @@ -1,41 +1,34 @@ #ifndef BLANK_APP_INIT_HPP_ #define BLANK_APP_INIT_HPP_ +#include "error.hpp" + #include #include -#include -#include namespace blank { -class AlutError -: public std::runtime_error { +class InitSDL { public: - explicit AlutError(ALenum); - AlutError(ALenum, const std::string &); - -}; - -class SDLError -: public std::runtime_error { + InitSDL(); + ~InitSDL(); -public: - SDLError(); - explicit SDLError(const std::string &); + InitSDL(const InitSDL &) = delete; + InitSDL &operator =(const InitSDL &) = delete; }; -class InitSDL { +class InitVideo { public: - InitSDL(); - ~InitSDL(); + InitVideo(); + ~InitVideo(); - InitSDL(const InitSDL &) = delete; - InitSDL &operator =(const InitSDL &) = delete; + InitVideo(const InitVideo &) = delete; + InitVideo &operator =(const InitVideo &) = delete; }; @@ -52,6 +45,18 @@ public: }; +class InitNet { + +public: + InitNet(); + ~InitNet(); + + InitNet(const InitNet &) = delete; + InitNet &operator =(const InitNet &) = delete; + +}; + + class InitTTF { public: @@ -68,7 +73,7 @@ class InitAL { public: InitAL(); - ~InitAL(); + ~InitAL() throw(AlutError); InitAL(const InitAL &) = delete; InitAL &operator =(const InitAL &) = delete; @@ -138,11 +143,20 @@ public: }; +struct InitHeadless { + + InitHeadless(); + + InitSDL init_sdl; + InitNet init_net; + +}; + struct Init { Init(bool double_buffer = true, int sample_size = 1); - InitSDL init_sdl; + InitVideo init_video; InitIMG init_img; InitTTF init_ttf; InitAL init_al;