Rename world directory to map

This commit is contained in:
2023-11-09 12:22:56 +01:00
parent 8edcf9305c
commit dd96b23d32
7 changed files with 18 additions and 8 deletions

View File

@@ -20,6 +20,7 @@ typedef struct BzAppDesc {
BzAppDeinitFunc deinit;
bool useNuklear;
bool useFlecs;
void *userData;
} BzAppDesc;
@@ -30,8 +31,10 @@ extern bool bzMain(BzAppDesc *appDesc, int argc, const char **argv);
#ifdef BZ_ENTRYPOINT
#include <raylib-nuklear.h>
#include <flecs.h>
struct nk_context *NK = NULL;
ecs_world_t *ECS = NULL;
// https://www.raylib.com/examples/core/loader.html?name=core_custom_logging
static void bzRaylibLogger(int msgType, const char *text, va_list args) {
@@ -94,6 +97,9 @@ int main(int argc, const char **argv) {
if (appDesc.useNuklear) {
NK = InitNuklear(16);
}
if (appDesc.useFlecs) {
ECS = ecs_init();
}
// User initialize
if (appDesc.init && !appDesc.init(appDesc.userData)) {
@@ -119,6 +125,10 @@ int main(int argc, const char **argv) {
appDesc.deinit(appDesc.userData);
// Deinitialize modules
if (ECS) {
ecs_fini(ECS);
ECS = NULL;
}
if (NK) {
UnloadNuklear(NK);
NK = NULL;