mirror of
https://github.com/AlexAltea/nucleus.git
synced 2024-05-31 18:38:01 -04:00
39 lines
762 B
C++
39 lines
762 B
C++
/**
|
|
* (c) 2014-2016 Alexandro Sanchez Bach. All rights reserved.
|
|
* Released under GPL v2 license. Read LICENSE for more details.
|
|
*/
|
|
|
|
#include "window.h"
|
|
|
|
// Nucleus
|
|
#include "nucleus/nucleus.h"
|
|
#include "nucleus/core/config.h"
|
|
|
|
#include <thread>
|
|
|
|
int main(int argc, char **argv) {
|
|
// Load configuration
|
|
nucleusConfigure(argc, argv);
|
|
|
|
// Using UI
|
|
if (!config.console) {
|
|
unsigned int width = 960;
|
|
unsigned int height = 544;
|
|
Window window("Nucleus", width, height);
|
|
|
|
nucleusInitialize(window.hwnd, window.hdc, width, height);
|
|
auto thread = std::thread([]{
|
|
nucleusStart();
|
|
});
|
|
|
|
window.loop();
|
|
}
|
|
|
|
// Using console
|
|
else {
|
|
nucleusStart();
|
|
}
|
|
|
|
return 0;
|
|
}
|