Addedo control paths for font compilation and loading
This commit is contained in:
parent
92ddc3f1eb
commit
786e15771c
|
@ -67,8 +67,9 @@ constexpr std::string_view ASSET_ROOT {"../../Assets"};
|
|||
constexpr std::string_view BUILT_IN_ASSET_ROOT{ "../../Built_In" };
|
||||
#endif
|
||||
|
||||
// COMPILER PATHS
|
||||
// COMPILER EXE
|
||||
constexpr std::string_view MODEL_COMPILER_EXE{ "ModelCompiler.exe" };
|
||||
constexpr std::string_view FONT_COMPILER_EXE{ "FontCompiler.exe" };
|
||||
|
||||
// INTERNAL ASSET PATHS
|
||||
constexpr std::string_view SCENE_FOLDER{ "/Scenes/" };
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "Libraries/Loaders/SHTextureLoader.h"
|
||||
#include "Libraries/Loaders/SHShaderSourceLoader.h"
|
||||
#include "Libraries/Loaders/SHTextBasedLoader.h"
|
||||
#include "Libraries/Loaders/SHFontLoader.h"
|
||||
|
||||
//#include "Libraries/Compilers/SHMeshCompiler.h"
|
||||
#include "Libraries/Compilers/SHTextureCompiler.h"
|
||||
|
@ -398,6 +399,16 @@ namespace SHADE
|
|||
}
|
||||
newPath = pathGen.value();
|
||||
}
|
||||
else if (ext == TTF_EXTENSION.data())
|
||||
{
|
||||
std::string command = FONT_COMPILER_EXE.data();
|
||||
command += " " + path.string();
|
||||
std::system(command.c_str());
|
||||
|
||||
std::string fontPath = path.string().substr(0, path.string().find_last_of('.'));
|
||||
fontPath += FONT_EXTENSION;
|
||||
newPath = fontPath;
|
||||
}
|
||||
else
|
||||
{
|
||||
SHLOG_WARNING("File Type compilation not yet Implemented: {}", path.string());
|
||||
|
@ -450,6 +461,8 @@ namespace SHADE
|
|||
loaders[static_cast<size_t>(AssetType::PREFAB)] = loaders[static_cast<size_t>(AssetType::SCENE)];
|
||||
loaders[static_cast<size_t>(AssetType::MATERIAL)] = loaders[static_cast<size_t>(AssetType::SCENE)];
|
||||
loaders[static_cast<size_t>(AssetType::MESH)] = nullptr;
|
||||
loaders[static_cast<size_t>(AssetType::SCRIPT)] = nullptr;
|
||||
loaders[static_cast<size_t>(AssetType::FONT)] = dynamic_cast<SHAssetLoader*>(new SHFontLoader());
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
|
Loading…
Reference in New Issue