/* * author: Patrick-Christopher Mattulat * e-mail: webmaster@lynarstudios.com */ #include #include #include #include #include using ls::atlantis::cycle::Engine; using ls::atlantis::cycle::EngineParameter; using ls::atlantis::glossary::KeyboardKeys; using ls::atlantis::glossary::StatusCodes; using ls::atlantis::glossary::WindowApiTypes; using ls::atlantis::interfaces::AStatusCode; /* * This example application opens a fullscreen window, which can be closed via Escape-Keyboard-Key. */ int main() { EngineParameter parameter{}; parameter.setWindowApiType(WindowApiTypes::SDL_WINDOW_API); const Engine engine{parameter}; const AStatusCode statusCode = engine.init(); while (engine.isRunning()) { engine.beginFrame(); // customized game logic if (engine.getData()->getKeyboard()->isPressed(KeyboardKeys::ESCAPE)) { engine.quit(); } // draw and ending frame engine.endFrame(); } return statusCode.getCode() == StatusCodes::OK ? EXIT_SUCCESS : EXIT_FAILURE; }