diff --git a/SHADE_Engine/src/Assets/Asset Types/SHMeshAsset.h b/SHADE_Engine/src/Assets/Asset Types/SHMeshAsset.h index 8babfa67..a927d54b 100644 --- a/SHADE_Engine/src/Assets/Asset Types/SHMeshAsset.h +++ b/SHADE_Engine/src/Assets/Asset Types/SHMeshAsset.h @@ -18,6 +18,8 @@ namespace SHADE SHMeshAssetHeader header; + std::string meshName; + std::vector vertexPosition; std::vector texCoords; std::vector vertexTangent; diff --git a/SHADE_Engine/src/Assets/SHAssetMacros.h b/SHADE_Engine/src/Assets/SHAssetMacros.h index 0b82a0f0..4a90cd58 100644 --- a/SHADE_Engine/src/Assets/SHAssetMacros.h +++ b/SHADE_Engine/src/Assets/SHAssetMacros.h @@ -40,10 +40,10 @@ typedef FMOD::Sound* SHSound; #define ASSET_META_VER "1.0" // Asset type enum -enum class AssetType : int +enum class AssetType : uint8_t { - INVALID = -1, - AUDIO = 0, + INVALID = 0, + AUDIO = 1, SHADER, MATERIAL, IMAGE, @@ -52,7 +52,8 @@ enum class AssetType : int SCRIPT, SCENE, PREFAB, - AUDIO_WAV + AUDIO_WAV, + DDS }; //Directory diff --git a/SHADE_Engine/src/Assets/SHAssetManager.h b/SHADE_Engine/src/Assets/SHAssetManager.h index acd89454..99ad602b 100644 --- a/SHADE_Engine/src/Assets/SHAssetManager.h +++ b/SHADE_Engine/src/Assets/SHAssetManager.h @@ -30,7 +30,7 @@ namespace SHADE /**************************************************************************** * \brief Static function to generate resource ID. ****************************************************************************/ - static AssetID GenerateAssetID() noexcept; + static AssetID GenerateAssetID(AssetType type) noexcept; static AssetPath GenerateLocalPath(AssetPath path) noexcept; @@ -121,7 +121,7 @@ namespace SHADE static bool IsRecognised(char const*) noexcept; // Specialised load calls - void LoadGLTF(SHAsset asset) noexcept; + static void LoadGLTF(SHAsset asset) noexcept; static FMOD::System* audioSystem; static std::unordered_map* audioSoundList; diff --git a/SHADE_Engine/src/Assets/SHAssetMetaHandler.cpp b/SHADE_Engine/src/Assets/SHAssetMetaHandler.cpp index d9cc73e1..aabb0dc0 100644 --- a/SHADE_Engine/src/Assets/SHAssetMetaHandler.cpp +++ b/SHADE_Engine/src/Assets/SHAssetMetaHandler.cpp @@ -42,6 +42,8 @@ namespace SHADE return static_cast(i); } } + + return AssetType::INVALID; } /****************************************************************************