summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main.cpp b/src/main.cpp
index f99e8ca..3627c9c 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -18,6 +18,7 @@
#include <thread>
#include "core.hpp"
+
cg_sCore cg_core;
int main(int argc, char *argv[])
@@ -28,7 +29,7 @@ int main(int argc, char *argv[])
SDL_Event event;
// Random numbers
- random_number_generator.seed(random_seed());
+ BluCat::random_number_generator.seed(BluCat::random_seed());
cg_core.game_file = argv[1];
cg_core.mrb = mrb_open();
@@ -36,7 +37,7 @@ int main(int argc, char *argv[])
try{ cg_sCore::loader.execute(nullptr); }
catch(const CommandError &error)
{
- cg_core.log.message(Log::Level::Fatal, error.what());
+ BluCat::core.log.message(Log::Level::Fatal, error.what());
mrb_close(cg_core.mrb);
return 1;
}
@@ -92,16 +93,15 @@ int main(int argc, char *argv[])
}
else
{
- cg_core.vk_renderer->draw();
+ BluCat::core.vk_renderer->draw();
- // Timer
- {
+ { // Timer
auto frame_stop = steady_clock::now();
auto frame_duration = frame_stop - frame_start;
// If frame take less time than maximum allowed.
- if(cg_core.max_frame_duration > frame_duration)
- sleep_for(cg_core.max_frame_duration - frame_duration);
+ if(BluCat::core.max_frame_duration > frame_duration)
+ sleep_for(BluCat::core.max_frame_duration - frame_duration);
frame_start = frame_stop;
}