Rename world directory to map
This commit is contained in:
@@ -27,10 +27,10 @@ set(BreezeSources
|
||||
breeze/core/memory.c
|
||||
breeze/core/module_system.c
|
||||
|
||||
breeze/utils/tokenizer.c
|
||||
breeze/map/map.c
|
||||
breeze/map/tileset.c
|
||||
|
||||
breeze/world/map.c
|
||||
breeze/world/tileset.c
|
||||
breeze/utils/tokenizer.c
|
||||
)
|
||||
|
||||
set(BreezeHeaders
|
||||
@@ -39,12 +39,12 @@ set(BreezeHeaders
|
||||
|
||||
breeze/math/vec2i.h
|
||||
|
||||
breeze/map/map.h
|
||||
breeze/map/tileset.h
|
||||
|
||||
breeze/utils/string.h
|
||||
breeze/utils/tokenizer.h
|
||||
|
||||
breeze/world/map.h
|
||||
breeze/world/tileset.h
|
||||
|
||||
breeze/defines.h
|
||||
breeze/game.h
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
#include "breeze/utils/string.h"
|
||||
#include "breeze/utils/tokenizer.h"
|
||||
|
||||
#include "breeze/world/map.h"
|
||||
#include "breeze/world/tileset.h"
|
||||
#include "breeze/map/map.h"
|
||||
#include "breeze/map/tileset.h"
|
||||
|
||||
#include "breeze/defines.h"
|
||||
#include "breeze/game.h"
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user