2014-12-15 16:47:30 +01:00
|
|
|
/*
|
|
|
|
* =====================================================================================
|
|
|
|
*
|
|
|
|
* Filename: main.cpp
|
|
|
|
*
|
2018-06-05 01:24:54 +02:00
|
|
|
* Description:
|
2014-12-15 16:47:30 +01:00
|
|
|
*
|
|
|
|
* Version: 1.0
|
|
|
|
* Created: 13/12/2014 20:49:00
|
|
|
|
* Revision: none
|
|
|
|
* Compiler: gcc
|
|
|
|
*
|
|
|
|
* Author: Quentin BAZIN, <quent42340@gmail.com>
|
2018-06-05 01:24:54 +02:00
|
|
|
* Company:
|
2014-12-15 16:47:30 +01:00
|
|
|
*
|
|
|
|
* =====================================================================================
|
|
|
|
*/
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
#include "Application.hpp"
|
|
|
|
#include "Exception.hpp"
|
2015-07-17 17:08:53 +02:00
|
|
|
#include "SDLLoader.hpp"
|
2014-12-15 16:47:30 +01:00
|
|
|
|
2018-06-05 01:47:15 +02:00
|
|
|
int main(int, char *[]) {
|
2015-07-17 17:08:53 +02:00
|
|
|
SDLLoader sdlLoader;
|
2018-06-05 16:51:58 +02:00
|
|
|
|
2014-12-15 16:47:30 +01:00
|
|
|
try {
|
2015-07-17 17:08:53 +02:00
|
|
|
sdlLoader.load();
|
2018-06-05 01:24:54 +02:00
|
|
|
|
2015-07-17 17:08:53 +02:00
|
|
|
Application app;
|
2018-06-05 01:24:54 +02:00
|
|
|
|
2014-12-15 16:47:30 +01:00
|
|
|
app.run();
|
|
|
|
}
|
2015-07-17 17:08:53 +02:00
|
|
|
catch(const Exception &e) {
|
|
|
|
std::cerr << "Fatal error " << e.what() << std::endl;
|
2014-12-15 16:47:30 +01:00
|
|
|
return 1;
|
|
|
|
}
|
2018-06-13 03:47:20 +02:00
|
|
|
// catch(const std::exception &e) {
|
|
|
|
// std::cerr << "Exception caught: " << e.what() << std::endl;
|
|
|
|
// return 1;
|
|
|
|
// }
|
|
|
|
// catch(...) {
|
|
|
|
// std::cerr << "Fatal error: Unknown error." << std::endl;
|
|
|
|
// return 1;
|
|
|
|
// }
|
2018-06-05 01:24:54 +02:00
|
|
|
|
2014-12-15 16:47:30 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|