90 lines
1.8 KiB
C
90 lines
1.8 KiB
C
#pragma once
|
|
#ifndef ALYSON_HPP
|
|
#define ALYSON_HPP
|
|
|
|
#ifndef ASSETS_PATH
|
|
#define ASSETS_PATH "./assets/"
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include <stddef.h>
|
|
|
|
#include "types.h"
|
|
|
|
#define ALYSIS_ENGINE_WINDOW_TITLE "Alyson Engine"
|
|
|
|
#include "alargs.h"
|
|
|
|
#include "resources/alpath.h"
|
|
|
|
#include "resources/alresource.h"
|
|
|
|
#if defined(RAYLIB_BACKEND)
|
|
#include <raylib.h>
|
|
#include <raymath.h>
|
|
|
|
#include <rlyson.h>
|
|
#endif
|
|
|
|
|
|
/* TODO : implement
|
|
typedef struct {
|
|
ALResource* resources;
|
|
usx count;
|
|
usx capacity;
|
|
} alyson_resource_manager_t, *ALResourceManager;
|
|
|
|
ALResourceManager al_resource_manager_create();
|
|
void al_resource_manager_destroy(ALResourceManager manager);
|
|
|
|
void al_resource_manager_add(ALResourceManager manager, ALResource resource);
|
|
void al_resource_manager_remove(ALResourceManager manager, usx id);
|
|
void al_resource_manager_clear(ALResourceManager manager);
|
|
|
|
|
|
|
|
typedef struct {
|
|
ALResourceManager resources_manager;
|
|
usx id;
|
|
char* name;
|
|
usx width;
|
|
usx height;
|
|
} alyson_window_t, *ALWindow;
|
|
|
|
ALWindow al_window_create(char* name, int width, int height);
|
|
void al_window_destroy(ALWindow window);
|
|
|
|
|
|
#include <flecs.h>
|
|
|
|
typedef struct {
|
|
ALWindow wnd;
|
|
ecs_world_t* engine;
|
|
ecs_world_t* ui;
|
|
} alyson_engine_t, *ALEngine;
|
|
|
|
ALEngine al_engine_create(ALArgs args, ALWindow wnd = NULL);
|
|
void al_engine_destroy(ALEngine engine);
|
|
|
|
void al_engine_run(ALEngine engine);
|
|
void al_engine_stop(ALEngine engine);
|
|
bool al_engine_is_running(ALEngine engine);
|
|
bool al_engine_is_stopped(ALEngine engine);
|
|
|
|
void al_engine_update(ALEngine engine);
|
|
void al_engine_draw(ALEngine engine);
|
|
void al_engine_draw_ui(ALEngine engine);
|
|
|
|
void al_engine_set_window(ALEngine engine, ALWindow wnd);
|
|
ALWindow al_engine_get_window(ALEngine engine);
|
|
|
|
*/
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif // ALYSON_HPP
|