summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ecs.cpp1
-rw-r--r--src/game.cpp1
-rw-r--r--tests/pke-test-asset-manager.cpp2
-rw-r--r--tests/pke-test-dummy.cpp3
-rw-r--r--tests/pke-test-serialization.cpp2
-rw-r--r--tests/pke-test-static-ui.cpp2
6 files changed, 10 insertions, 1 deletions
diff --git a/src/ecs.cpp b/src/ecs.cpp
index 227db5d..1ffd9f2 100644
--- a/src/ecs.cpp
+++ b/src/ecs.cpp
@@ -623,7 +623,6 @@ pk_bkt_arr *ECS_GetEvManagers() {
}
void ECS_Teardown() {
- pk_ev_teardown();
pk_arr_reset(&EntitiesWithExcessInstances);
pk_arr_reset(&entitiesYetToBeRemoved);
pk_arr_reset(&EntitiesToBeRemoved);
diff --git a/src/game.cpp b/src/game.cpp
index cbaf56a..edcfecc 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -319,6 +319,7 @@ GAME_SHUTDOWN:
AM_DebugPrint();
AM_Teardown();
PkeThreads_Teardown();
+ pk_ev_teardown();
Game_Teardown();
// TODO debug print buckets after shutdown
fprintf(stdout, "Game_Main Exiting\n");
diff --git a/tests/pke-test-asset-manager.cpp b/tests/pke-test-asset-manager.cpp
index 82e1345..180d134 100644
--- a/tests/pke-test-asset-manager.cpp
+++ b/tests/pke-test-asset-manager.cpp
@@ -7,6 +7,7 @@
#include "thread-pool.hpp"
void pke_test_asset_manager_spinup() {
+ pk_ev_init(nullptr);
PkeThreads_Init();
AM_Init();
ECS_Init();
@@ -18,6 +19,7 @@ void pke_test_asset_manager_teardown() {
ECS_Teardown();
AM_Teardown();
PkeThreads_Teardown();
+ pk_ev_teardown();
};
int pke_test_asset_manager_001() {
diff --git a/tests/pke-test-dummy.cpp b/tests/pke-test-dummy.cpp
index 0caa865..8fdc146 100644
--- a/tests/pke-test-dummy.cpp
+++ b/tests/pke-test-dummy.cpp
@@ -5,11 +5,13 @@
#include "camera.hpp"
#include "ecs.hpp"
#include "physics.hpp"
+#include "pk.h"
#include "scene.hpp"
#include "static-ui.hpp"
#include "thread-pool.hpp"
int pke_test_dummy_001() {
+ pk_ev_init(nullptr);
Physics_Init();
PkeThreads_Init();
AM_Init();
@@ -34,6 +36,7 @@ int pke_test_dummy_001() {
AM_Teardown();
PkeThreads_Teardown();
Physics_Teardown();
+ pk_ev_teardown();
return 0;
}
diff --git a/tests/pke-test-serialization.cpp b/tests/pke-test-serialization.cpp
index 7a9ec41..ebc7177 100644
--- a/tests/pke-test-serialization.cpp
+++ b/tests/pke-test-serialization.cpp
@@ -48,6 +48,7 @@ const pk_uuid uuid_n[] = {
void pke_test_serialization_spinup() {
// pk_funcinstr_init();
pkeSettings.isSimulationPaused = true;
+ pk_ev_init(nullptr);
Physics_Init();
PkeThreads_Init();
AM_Init();
@@ -76,6 +77,7 @@ void pke_test_serialization_teardown() {
AM_Teardown();
PkeThreads_Teardown();
Physics_Teardown();
+ pk_ev_teardown();
bkt = nullptr;
// pk_funcinstr_teardown();
};
diff --git a/tests/pke-test-static-ui.cpp b/tests/pke-test-static-ui.cpp
index ad9673d..a826587 100644
--- a/tests/pke-test-static-ui.cpp
+++ b/tests/pke-test-static-ui.cpp
@@ -23,6 +23,7 @@ struct pke_ui_flex_params {
void pke_test_static_ui_setup() {
Extent.width = 1920;
Extent.height = 1080;
+ pk_ev_init(nullptr);
ECS_Init();
pke_ui_init();
}
@@ -30,6 +31,7 @@ void pke_test_static_ui_setup() {
void pke_test_static_ui_teardown() {
pke_ui_teardown();
ECS_Teardown();
+ pk_ev_teardown();
}
// test static