summaryrefslogtreecommitdiff
path: root/src/pke-at.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pke-at.cpp')
-rw-r--r--src/pke-at.cpp23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/pke-at.cpp b/src/pke-at.cpp
index 70625ba..65acedf 100644
--- a/src/pke-at.cpp
+++ b/src/pke-at.cpp
@@ -1,8 +1,12 @@
-#include <pke/pke.hpp>
-
-#include "pke-at.hpp"
+#include "embedded-sql.hpp"
#include "level-init.hpp"
+#include "pke-at-setlist-types.hpp"
+#include "pke-at-settings.hpp"
+#include "pke-at-storage-sql.hpp"
+#include "pke-at.hpp"
+
+#include <pke/pke.hpp>
struct pke_at_master {
struct pke_at_master_states {
@@ -14,7 +18,20 @@ void pke_at_tick(double delta) {
}
void pke_at_init() {
+ uint64_t i;
pkeSettings.rt.nextLevel = pke_at_level_init_create();
+
+ for (i = 0; i < embedded_sql_count; ++i) {
+ embedded_sql[i].handle = AM_Register_Static(embedded_sql[i].key, PKE_ASSET_TYPE_UNSET, embedded_sql[i].data, embedded_sql[i].size);
+ }
+
+ for (i = 0; i < PKE_AT_SECTION_TYPE_INDEX_COUNT; ++i) {
+ if (g_section_types[i].title_key[0] == '\0') continue;
+ g_section_types[i].title_handle = AM_GetHandle(g_section_types[i].title_key);
+ }
+
+ g_at.storage = pk_new<pke_at_storage_sql>();
+ g_at.storage->init();
}
void pke_at_teardown() {