2022-10-19 18:37:27 +08:00
|
|
|
/******************************************************************************
|
|
|
|
* \file SHAssetMacros.h
|
|
|
|
* \author Loh Xiao Qi
|
|
|
|
* \brief Macros and typedefs for assets
|
|
|
|
*
|
|
|
|
* \copyright Copyright (c) 2022 Digipen Institute of Technology. Reproduction
|
|
|
|
* or disclosure of this file or its contents without the prior
|
|
|
|
* written consent of Digipen Institute of Technology is prohibited
|
|
|
|
******************************************************************************/
|
|
|
|
#ifndef SH_ASSET_MACROS_H
|
|
|
|
#define SH_ASSET_MACROS_H
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
#include <string>
|
|
|
|
#include <filesystem>
|
|
|
|
|
|
|
|
// Typedefs
|
|
|
|
typedef uint32_t AssetID;
|
|
|
|
typedef std::string AssetName;
|
|
|
|
typedef std::filesystem::path AssetPath;
|
|
|
|
typedef unsigned char* AssetData;
|
|
|
|
typedef std::string AssetMetaVersion;
|
|
|
|
typedef std::string AssetExtension;
|
2022-10-31 14:16:35 +08:00
|
|
|
typedef size_t AssetTypeMeta;
|
2022-10-19 18:37:27 +08:00
|
|
|
|
|
|
|
//Directory
|
|
|
|
#ifdef _PUBLISH
|
2022-10-31 14:16:35 +08:00
|
|
|
constexpr std::string_view ASSET_ROOT{ "Assets" };
|
|
|
|
constexpr std::string_view BUILT_IN_ASSET_ROOT{ "Built_In" };
|
2022-10-19 18:37:27 +08:00
|
|
|
#else
|
2022-10-31 14:16:35 +08:00
|
|
|
constexpr std::string_view ASSET_ROOT{ "../../Assets" };
|
|
|
|
constexpr std::string_view BUILT_IN_ASSET_ROOT{ "../../Built_In" };
|
2022-10-19 18:37:27 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
// ASSET EXTENSIONS
|
2022-10-31 14:16:35 +08:00
|
|
|
constexpr std::string_view TEXTURE_EXTENSION {".shtex"};
|
|
|
|
constexpr std::string_view MESH_EXTENSION {".shmesh"};
|
|
|
|
|
|
|
|
// EXTERNAL EXTENSIONS
|
|
|
|
constexpr std::string_view FBX_EXTENSION{ ".fbx" };
|
|
|
|
constexpr std::string_view GLTF_EXTENSION{ ".gltf" };
|
2022-10-19 18:37:27 +08:00
|
|
|
|
2022-10-31 14:16:35 +08:00
|
|
|
constexpr std::string_view EXTERNALS[] = {
|
2022-10-19 18:37:27 +08:00
|
|
|
FBX_EXTENSION,
|
|
|
|
GLTF_EXTENSION
|
|
|
|
};
|
|
|
|
|
|
|
|
// Error flags
|
2022-10-31 14:16:35 +08:00
|
|
|
constexpr std::string_view FILE_NOT_FOUND_ERR {"FILE NOT FOUND"};
|
|
|
|
constexpr std::string_view META_NOT_FOUND_ERR {"META NOT FOUND"};
|
|
|
|
constexpr std::string_view ASSET_NOT_FOUND_ERR {"ASSET NOT FOUND"};
|
|
|
|
constexpr std::string_view EXT_DOES_NOT_EXIST {"TYPE DOES NOT HAVE EXTENSION DEFINED"};
|
2022-10-19 18:37:27 +08:00
|
|
|
|
|
|
|
#endif // !SH_ASSET_MACROS_H
|