Implemented Asset foundation
Signed-off-by: Robear Selwans <robear.selwans@outlook.com>
This commit is contained in:
@@ -0,0 +1 @@
|
||||
EV_CONFIG_VAR(resource_directory, STRING, ".")
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
EV_NS_DEF_BEGIN(Asset)
|
||||
EV_NS_DEF_FN(AssetHandle, load, (CONST_STR, path))
|
||||
EV_NS_DEF_FN(AssetHandle, cloneHandle, (AssetHandle, handle))
|
||||
EV_NS_DEF_FN(void, free, (AssetHandle, handle))
|
||||
EV_NS_DEF_END(Asset)
|
||||
|
||||
|
||||
EV_NS_DEF_BEGIN(AssetManager)
|
||||
EV_NS_DEF_FN(void, mount, (CONST_STR, path), (CONST_STR, as))
|
||||
EV_NS_DEF_END(AssetManager)
|
||||
|
||||
/* #include LOADERS_NAMESPACES_H */
|
||||
|
||||
EV_NS_DEF_BEGIN(TextLoader)
|
||||
|
||||
EV_NS_DEF_FN(TextAsset, loadAsset, (AssetHandle, handle))
|
||||
|
||||
EV_NS_DEF_END(TextLoader)
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
TYPE(AssetHandle, GenericHandle)
|
||||
|
||||
/* #include LOADERS_TYPES_H */
|
||||
|
||||
TYPE(TextAsset, struct {
|
||||
CONST_STR text;
|
||||
U64 length;
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user