Implemented Asset foundation

Signed-off-by: Robear Selwans <robear.selwans@outlook.com>
This commit is contained in:
2021-05-31 11:41:02 +02:00
parent 97fa6cd6f4
commit 5ccbacd25f
13 changed files with 237 additions and 5 deletions

View File

@@ -0,0 +1,16 @@
#define TYPE_MODULE evmod_assets
#include <evol/meta/type_import.h>
#include "../LoaderCommon.h"
#include "TextLoader.h"
TextAsset
ev_textloader_loadasset(
AssetHandle handle)
{
const Asset *asset = ev_asset_getfromhandle(handle);
return (TextAsset) {
.text = asset->data,
.length = asset->size
};
}