aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
m---------YAGE0
-rw-r--r--src/game.cpp14
-rw-r--r--src/main.cpp32
3 files changed, 23 insertions, 23 deletions
diff --git a/YAGE b/YAGE
-Subproject 61e7d329c6bafaf269a619ffb2bb80a24b1fb21
+Subproject 85fe87aa7a52733dc80f61617bf65f22b2d98cc
diff --git a/src/game.cpp b/src/game.cpp
index ae78d17..2bc0f74 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -4,11 +4,8 @@
#include <GL/glew.h>
#include <glm/glm.hpp>
-#include <SDL2/SDL.h>
-#include <YAGE/texture.hpp>
-#include <YAGE/resourcemanager.hpp>
-#include <YAGE/vertex.hpp>
+#include <YAGE/yage.hpp>
#include <stdexcept>
#include <iostream>
@@ -21,7 +18,7 @@ Game::Game(int screen_width/*=1280*/, int screen_height/*=720*/) :
Game::~Game()
{
- SDL_Quit();
+ yage::quit();
}
void Game::run()
@@ -33,8 +30,11 @@ void Game::run()
void Game::initSystems()
{
- if(SDL_Init(SDL_INIT_VIDEO))
- throw std::runtime_error("SDL_Init failed");
+ if(yage::init())
+ {
+ throw std::runtime_error("Failed initialization");
+ }
+
window_.create("Arider", screen_width_, screen_height_, yage::WindowFlags::SHOWN);
initShaders();
diff --git a/src/main.cpp b/src/main.cpp
index b6cde15..5f6e8a1 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -8,23 +8,23 @@
int main()
{
- std::cout<<"Arider\nVersion: "<<ARIDER_MAJOR_VERSION<<"."<<ARIDER_MINOR_VERSION
- <<"."<<ARIDER_PATCH_VERSION<<'\n';
+ std::cout<<"Arider\nVersion: "<<ARIDER_MAJOR_VERSION<<"."<<ARIDER_MINOR_VERSION
+ <<"."<<ARIDER_PATCH_VERSION<<'\n';
- Game game;
+ Game game;
- try
- {
- game.run();
- }
- catch(std::exception &e)
- {
- std::cerr<<"Error : "<<e.what()<<'\n';
- }
- catch(...)
- {
- std::cerr<<"Error : Exception occured\n";
- }
+ try
+ {
+ game.run();
+ }
+ catch(std::exception &e)
+ {
+ std::cerr<<"Error : "<<e.what()<<'\n';
+ }
+ catch(...)
+ {
+ std::cerr<<"Error : Exception occured\n";
+ }
- return 0;
+ return 0;
}