This commit is contained in:
n0ffie 2025-02-12 23:24:58 +01:00
parent 2dbfa1b99e
commit b1230534c5
22 changed files with 547 additions and 429 deletions

View file

@ -0,0 +1,36 @@
#ifndef ALPATH_H_INCLUDED
#define ALPATH_H_INCLUDED
#ifdef __cplusplus
extern "C" {
#endif
#include "../types.h"
typedef struct {
char type[4 + 1];
char group[26 + 1];
char* name;
char* path;
} alyson_path_t, *ALPath;
/*
* @function: demangle_path
* @description: Demangles a path
* @param path: path to resource
* @return: ALPath
*/
ALPath al_demangle_path(const char* path);
char* al_mangle_path(const ALPath path);
ALPath al_create_path(
const char* type,
const char* path,
const char* name,
const char* group
);
void al_destroy_path(ALPath path);
#ifdef __cplusplus
}
#endif
#endif // ALPATH_H_INCLUDED

View file

@ -0,0 +1,26 @@
#ifndef ALRESOURCE_H_INCLUDED
#define ALRESOURCE_H_INCLUDED
#ifdef __cplusplus
extern "C" {
#endif
#include "../types.h"
#include "alpath.h"
typedef struct {
usx id;
alyson_path_t path;
} alyson_resource_t, *ALResource;
ALResource al_resource_create(ALPath path);
ALResource al_resource_create_from_file(char* name, char* path);
void al_resource_destroy(ALResource resource);
#ifdef __cplusplus
}
#endif
#endif // ALRESOURCE_H_INCLUDED