LibGame v0.4.0
The LG Game Engine - Copyright (C) 2024-2026 ETMSoftware
Loading...
Searching...
No Matches
lg_path.h
1/*
2 * LibGame - Copyright (C) Emmanuel Thomas-Maurin 2011-2026
3 * All rights reserved
4 */
5
6#ifndef LG_PATH_H
7#define LG_PATH_H
8
9/* LG_path */
10#define LG_PATH_MAX_LEN (512 - 1 - 1) /* 2nd "-1" to keep LG_Path size at 512 */
11
12typedef int8_t lg_path_type;
13
14enum {IN_ASSETS, IN_APP_WR_DIR, FULL, NAME_ONLY, UNSPECIFIED};
15
16/* sizeof(LG_Path) = 512 bytes */
17typedef struct __attribute__((packed, aligned(4))) {
18 char s[LG_PATH_MAX_LEN + 1];
19 lg_path_type t;
20} LG_Path;
21
22LG_Path lg_path(const char *, lg_path_type);
23
24const char *lg_path_resolve(const LG_Path *);
25
27
29
31
32lg_path_type lg_path_get_type_from_fullpath_string(const char *);
33
34zboolean lg_path_string_resolve(char *);
35
36const char *lg_path_type_get_string(lg_path_type);
37
38zboolean lg_path_are_equal(const LG_Path *, const LG_Path *);
39
40void lg_path_info(LG_Path *);
41
43
44#endif /* LG_PATH_H */
zboolean lg_path_are_equal(const LG_Path *path1, const LG_Path *path2)
Definition lg_path.c:464
zboolean lg_path_string_resolve(char *path)
Definition lg_path.c:281
void lg_path_info(LG_Path *path)
Definition lg_path.c:474
const char * lg_path_resolve(const LG_Path *path)
Definition lg_path.c:80
const char * lg_path_type_get_string(lg_path_type type)
Definition lg_path.c:445
lg_path_type lg_path_get_type_from_fullpath_string(const char *full_path)
Definition lg_path.c:191
LG_Path lg_path_in_assets_from_fullpath_string(const char *full_path)
Definition lg_path.c:130
LG_Path lg_path(const char *s, lg_path_type t)
Definition lg_path.c:46
void lg_resolved_path0_free_buffer()
Definition lg_path.c:491
LG_Path lg_path_from_fullpath_string(const char *full_path)
Definition lg_path.c:166
LG_Path lg_path_in_wrdir_from_fullpath_string(const char *full_path)
Definition lg_path.c:147
Definition lg_path.h:17