Rename world directory to map
This commit is contained in:
@@ -27,10 +27,10 @@ set(BreezeSources
|
|||||||
breeze/core/memory.c
|
breeze/core/memory.c
|
||||||
breeze/core/module_system.c
|
breeze/core/module_system.c
|
||||||
|
|
||||||
breeze/utils/tokenizer.c
|
breeze/map/map.c
|
||||||
|
breeze/map/tileset.c
|
||||||
|
|
||||||
breeze/world/map.c
|
breeze/utils/tokenizer.c
|
||||||
breeze/world/tileset.c
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set(BreezeHeaders
|
set(BreezeHeaders
|
||||||
@@ -39,12 +39,12 @@ set(BreezeHeaders
|
|||||||
|
|
||||||
breeze/math/vec2i.h
|
breeze/math/vec2i.h
|
||||||
|
|
||||||
|
breeze/map/map.h
|
||||||
|
breeze/map/tileset.h
|
||||||
|
|
||||||
breeze/utils/string.h
|
breeze/utils/string.h
|
||||||
breeze/utils/tokenizer.h
|
breeze/utils/tokenizer.h
|
||||||
|
|
||||||
breeze/world/map.h
|
|
||||||
breeze/world/tileset.h
|
|
||||||
|
|
||||||
breeze/defines.h
|
breeze/defines.h
|
||||||
breeze/game.h
|
breeze/game.h
|
||||||
|
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
#include "breeze/utils/string.h"
|
#include "breeze/utils/string.h"
|
||||||
#include "breeze/utils/tokenizer.h"
|
#include "breeze/utils/tokenizer.h"
|
||||||
|
|
||||||
#include "breeze/world/map.h"
|
#include "breeze/map/map.h"
|
||||||
#include "breeze/world/tileset.h"
|
#include "breeze/map/tileset.h"
|
||||||
|
|
||||||
#include "breeze/defines.h"
|
#include "breeze/defines.h"
|
||||||
#include "breeze/game.h"
|
#include "breeze/game.h"
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ typedef struct BzAppDesc {
|
|||||||
BzAppDeinitFunc deinit;
|
BzAppDeinitFunc deinit;
|
||||||
|
|
||||||
bool useNuklear;
|
bool useNuklear;
|
||||||
|
bool useFlecs;
|
||||||
|
|
||||||
void *userData;
|
void *userData;
|
||||||
} BzAppDesc;
|
} BzAppDesc;
|
||||||
@@ -30,8 +31,10 @@ extern bool bzMain(BzAppDesc *appDesc, int argc, const char **argv);
|
|||||||
|
|
||||||
#ifdef BZ_ENTRYPOINT
|
#ifdef BZ_ENTRYPOINT
|
||||||
#include <raylib-nuklear.h>
|
#include <raylib-nuklear.h>
|
||||||
|
#include <flecs.h>
|
||||||
|
|
||||||
struct nk_context *NK = NULL;
|
struct nk_context *NK = NULL;
|
||||||
|
ecs_world_t *ECS = NULL;
|
||||||
|
|
||||||
// https://www.raylib.com/examples/core/loader.html?name=core_custom_logging
|
// https://www.raylib.com/examples/core/loader.html?name=core_custom_logging
|
||||||
static void bzRaylibLogger(int msgType, const char *text, va_list args) {
|
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) {
|
if (appDesc.useNuklear) {
|
||||||
NK = InitNuklear(16);
|
NK = InitNuklear(16);
|
||||||
}
|
}
|
||||||
|
if (appDesc.useFlecs) {
|
||||||
|
ECS = ecs_init();
|
||||||
|
}
|
||||||
|
|
||||||
// User initialize
|
// User initialize
|
||||||
if (appDesc.init && !appDesc.init(appDesc.userData)) {
|
if (appDesc.init && !appDesc.init(appDesc.userData)) {
|
||||||
@@ -119,6 +125,10 @@ int main(int argc, const char **argv) {
|
|||||||
appDesc.deinit(appDesc.userData);
|
appDesc.deinit(appDesc.userData);
|
||||||
|
|
||||||
// Deinitialize modules
|
// Deinitialize modules
|
||||||
|
if (ECS) {
|
||||||
|
ecs_fini(ECS);
|
||||||
|
ECS = NULL;
|
||||||
|
}
|
||||||
if (NK) {
|
if (NK) {
|
||||||
UnloadNuklear(NK);
|
UnloadNuklear(NK);
|
||||||
NK = NULL;
|
NK = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user