/* * author: Patrick-Christopher Mattulat * e-mail: webmaster@lynarstudios.com */ #include #include #include #include #include #include using ls::atlantis::core::StatusCodeOk; using ls::atlantis::core::StatusCodeWindowApiLoadingFailed; using ls::atlantis::interfaces::AStatusCode; using ls::atlantis::interfaces::ISdlApi; using ls::std::core::NullPointerArgumentEvaluator; using ls::atlantis::window::SdlApi; using ls::atlantis::window::SdlWindowApi; using ::std::make_shared; using ::std::shared_ptr; SdlWindowApi::SdlWindowApi() : SdlWindowApi(make_shared()) {} SdlWindowApi::SdlWindowApi(const shared_ptr &_sdlApi) : sdlApi(_sdlApi) { NullPointerArgumentEvaluator(_sdlApi).evaluate(); } SdlWindowApi::~SdlWindowApi() { sdlApi->Quit(); } shared_ptr SdlWindowApi::init() { return SdlWindowApi::_initApi(); } shared_ptr SdlWindowApi::_createWindow() { return make_shared(); } shared_ptr SdlWindowApi::_initApi() { shared_ptr statusCode = make_shared(); if (!sdlApi->Init(SDL_INIT_VIDEO)) { statusCode = make_shared(); } return statusCode; }