summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2025-11-07 11:47:36 -0500
committerJonathan Bradley <jcb@pikum.xyz>2025-11-07 11:47:36 -0500
commitc7c3180bfe1c091e61b9c38376c22996537af2f3 (patch)
tree8ed6a9441568de5748ab32e4fc5398752e734ed3
parentf65db3c166ee1f41a7a33b0c19296f46babb09a5 (diff)
pke-at: use new pke init funcs
-rw-r--r--src/main.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 7da12ee..04e62d6 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2,9 +2,7 @@
#include <csignal>
#include <pke/pke.hpp>
-#include "pke-at-settings.hpp"
#include "pke-at.hpp"
-#include "pke/pk.h"
struct PKEPluginInterface pke_at_plugin {
.OnInit = pke_at_init,
@@ -23,16 +21,11 @@ void signal_handler(int signal_num) {
int main(int argc, char *argv[]) {
signal(SIGTERM, signal_handler);
fprintf(stdout, "PKE_AT ENTERING\n");
- {
- g_at.mem.bkt = pk_mem_bucket_create("pke-at main", PK_MEM_DEFAULT_BUCKET_SIZE, PK_MEMBUCKET_FLAG_NONE);
- g_at.mem.bkt_transient = pk_mem_bucket_create("pke-at transient", PK_MEM_DEFAULT_BUCKET_SIZE, PK_MEMBUCKET_FLAG_TRANSIENT);
- pk_mem_bucket_set_client_mem_bucket(g_at.mem.bkt);
- pk_arr_append_t(&LoadedPkePlugins, pke_at_plugin);
- }
PkeArgs_Parse(argc, argv);
- Game_Main({}, argv[0]);
- pk_mem_bucket_destroy(g_at.mem.bkt_transient);
- pk_mem_bucket_destroy(g_at.mem.bkt);
+ pke_game_main_init({}, argv[0], &pke_at_plugin, 1);
+ pke_game_main_load();
+ pke_game_main_run();
+ pke_game_main_teardown();
fprintf(stdout, "PKE_AT EXITING\n");
return 0;
}