Added texture data format support

This commit is contained in:
2023-06-20 08:35:28 -07:00
parent 9aa6a0f529
commit 0b26b5a06a
20 changed files with 156 additions and 43 deletions

View File

@ -16,17 +16,24 @@ void SceneAssetGenerator::generate(
std::string tabs
) {
std::string assetType = "";
asset->usageName = "asset" + std::to_string(assetNumber++);
if(asset->ref.empty()) {
asset->usageName = "asset" + std::to_string(assetNumber++);
} else {
asset->usageName = asset->ref;
}
switch(asset->type) {
case SCENE_ASSET_TYPE_TEXTURE:
assetType = "TextureAsset";
assetMap[asset->fileName] = "&" + asset->usageName + "->texture";
assetMap[asset->usageName] = "&" + asset->usageName + "->texture";
break;
case SCENE_ASSET_TYPE_TRUETYPE_FONT:
assetType = "TrueTypeAsset";
assetMap[asset->fileName] = "&" + asset->usageName + "->font";
assetMap[asset->usageName] = "&" + asset->usageName + "->font";
break;
default: