forked from Dynamitos/Seele
Formatted EVERYTHING
This commit is contained in:
1 parent
f18bf8acbe
commit
d95dab850c
265 files changed
+8002
-12310
No files matched your search
@@ -1,54 +1,46 @@
|
||||
#include "AssetImporter.h"
|
||||
#include "FontLoader.h"
|
||||
#include "TextureLoader.h"
|
||||
#include "Graphics/Graphics.h"
|
||||
#include "MaterialLoader.h"
|
||||
#include "MeshLoader.h"
|
||||
#include "Graphics/Graphics.h"
|
||||
#include "TextureLoader.h"
|
||||
|
||||
|
||||
using namespace Seele;
|
||||
|
||||
void AssetImporter::importMesh(MeshImportArgs args)
|
||||
{
|
||||
if (get().registry->getOrCreateFolder(args.importPath)->meshes.contains(args.filePath.stem().string()))
|
||||
{
|
||||
void AssetImporter::importMesh(MeshImportArgs args) {
|
||||
if (get().registry->getOrCreateFolder(args.importPath)->meshes.contains(args.filePath.stem().string())) {
|
||||
// skip importing duplicates
|
||||
return;
|
||||
}
|
||||
get().meshLoader->importAsset(args);
|
||||
}
|
||||
|
||||
void AssetImporter::importTexture(TextureImportArgs args)
|
||||
{
|
||||
if (get().registry->getOrCreateFolder(args.importPath)->textures.contains(args.filePath.stem().string()))
|
||||
{
|
||||
void AssetImporter::importTexture(TextureImportArgs args) {
|
||||
if (get().registry->getOrCreateFolder(args.importPath)->textures.contains(args.filePath.stem().string())) {
|
||||
// skip importing duplicates
|
||||
return;
|
||||
}
|
||||
get().textureLoader->importAsset(args);
|
||||
}
|
||||
|
||||
void AssetImporter::importFont(FontImportArgs args)
|
||||
{
|
||||
if (get().registry->getOrCreateFolder(args.importPath)->fonts.contains(args.filePath.stem().string()))
|
||||
{
|
||||
void AssetImporter::importFont(FontImportArgs args) {
|
||||
if (get().registry->getOrCreateFolder(args.importPath)->fonts.contains(args.filePath.stem().string())) {
|
||||
// skip importing duplicates
|
||||
return;
|
||||
}
|
||||
get().fontLoader->importAsset(args);
|
||||
}
|
||||
|
||||
void AssetImporter::importMaterial(MaterialImportArgs args)
|
||||
{
|
||||
if (get().registry->getOrCreateFolder(args.importPath)->materials.contains(args.filePath.stem().string()))
|
||||
{
|
||||
void AssetImporter::importMaterial(MaterialImportArgs args) {
|
||||
if (get().registry->getOrCreateFolder(args.importPath)->materials.contains(args.filePath.stem().string())) {
|
||||
// skip importing duplicates
|
||||
return;
|
||||
}
|
||||
get().materialLoader->importAsset(args);
|
||||
}
|
||||
|
||||
void AssetImporter::init(Gfx::PGraphics graphics)
|
||||
{
|
||||
void AssetImporter::init(Gfx::PGraphics graphics) {
|
||||
get().registry = AssetRegistry::getInstance();
|
||||
get().meshLoader = new MeshLoader(graphics);
|
||||
get().textureLoader = new TextureLoader(graphics);
|
||||
@@ -56,9 +48,7 @@ void AssetImporter::init(Gfx::PGraphics graphics)
|
||||
get().fontLoader = new FontLoader(graphics);
|
||||
}
|
||||
|
||||
AssetImporter& AssetImporter::get()
|
||||
{
|
||||
AssetImporter& AssetImporter::get() {
|
||||
static AssetImporter instance;
|
||||
return instance;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user