X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp%2Finit.hpp;h=9385d44979b815078f609e332cf9617b08607e3c;hb=d2f4c8720ae2326fac4203fa4984d835e875b355;hp=13bffa1f30e8886087ac441319f0f9af766f8aa3;hpb=7c2a8b8285278b8a3077b311d82f05ea0463a96e;p=blank.git diff --git a/src/app/init.hpp b/src/app/init.hpp index 13bffa1..9385d44 100644 --- a/src/app/init.hpp +++ b/src/app/init.hpp @@ -27,6 +27,15 @@ public: }; +class NetError +: public std::runtime_error { + +public: + NetError(); + explicit NetError(const std::string &); + +}; + class InitSDL { @@ -40,6 +49,18 @@ public: }; +class InitVideo { + +public: + InitVideo(); + ~InitVideo(); + + InitVideo(const InitVideo &) = delete; + InitVideo &operator =(const InitVideo &) = delete; + +}; + + class InitIMG { public: @@ -52,6 +73,18 @@ public: }; +class InitNet { + +public: + InitNet(); + ~InitNet(); + + InitNet(const InitNet &) = delete; + InitNet &operator =(const InitNet &) = delete; + +}; + + class InitTTF { public: @@ -68,7 +101,7 @@ class InitAL { public: InitAL(); - ~InitAL(); + ~InitAL() throw(AlutError); InitAL(const InitAL &) = delete; InitAL &operator =(const InitAL &) = delete; @@ -138,11 +171,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;