summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2024-01-11 11:13:15 -0500
committerJonathan Bradley <jcb@pikum.xyz>2024-01-11 11:13:15 -0500
commitcce568a7f56861d6249d7445f51d0ed27c560a5c (patch)
treedc16d597f2b5ba37935993add262bff28dc2ca44 /src/game.cpp
parentf07294ca65143fac8b1b426d1854212403721226 (diff)
checkpoint - mostly working condition after changes
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 97bc247..4d556b2 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -15,6 +15,7 @@
#include "player-input.hpp"
#include "plugins.hpp"
#include "project.hpp"
+#include "thread_pool.hpp"
#include "vendor/glm_include.hpp"
#include "window.hpp"
@@ -252,7 +253,7 @@ void ParseInstance(Entity_Base *parentEntity, std::ifstream &stream) {
if (etPtr->createInstanceCallback.func != nullptr) {
reinterpret_cast<void(*)()>(etPtr->createInstanceCallback.func)();
} else {
- EntityType_CreateGenericInstance(etPtr, &comp);
+ EntityType_CreateGenericInstance(etPtr, &comp, &instPos);
fprintf(stdout ,"[Game::ParseInstance] No callback func to create instance.");
}
break;
@@ -497,14 +498,16 @@ void Game_Main(PKEWindowProperties windowProps, const char *executablePath) {
pkeSettings.executablePath = executablePath;
fprintf(stdout, "Game_Main Entering\n");
try {
+ PkeThreads_Init();
AM_Init();
+ PkeLevel_Init();
PkeCamera_Init();
Physics_Init();
Game_Init();
ECS_Init();
+ CreateWindow(windowProps);
EntityType_Init();
PkeProject_Load(pkeSettings.args.projectPath);
- CreateWindow(windowProps);
PkeInput_Init();
if (pkeSettings.args.pluginPath != nullptr) {
PkePlugin_Load(pkeSettings.args.pluginPath);
@@ -619,6 +622,7 @@ void Game_Main(PKEWindowProperties windowProps, const char *executablePath) {
AM_DebugPrint();
AM_Teardown();
DestroyWindow();
+ PkeThreads_Teardown();
Pke_DebugPrint();
fprintf(stdout, "Game_Main Exiting\n");
}