mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-11-23 05:12:05 +00:00
chore: do not make filename constants separate variables
This commit is contained in:
@@ -198,9 +198,8 @@ namespace BSP
|
||||
{
|
||||
std::unique_ptr<BSPData> createBSPData(const std::string& mapName, ISearchPath& searchPath)
|
||||
{
|
||||
std::string gfxFbxFileName = "map_gfx.fbx";
|
||||
std::string gfxFbxPath = BSPUtil::getFileNameForBSPAsset(gfxFbxFileName);
|
||||
auto gfxFile = searchPath.Open(gfxFbxPath);
|
||||
const auto gfxFbxPath = BSPUtil::getFileNameForBSPAsset("map_gfx.fbx");
|
||||
const auto gfxFile = searchPath.Open(gfxFbxPath);
|
||||
if (!gfxFile.IsOpen())
|
||||
{
|
||||
con::error("Failed to open map gfx fbx file: {}", gfxFbxPath);
|
||||
@@ -228,8 +227,7 @@ namespace BSP
|
||||
}
|
||||
|
||||
ufbx_scene* colScene;
|
||||
std::string colFbxFileName = "map_col.fbx";
|
||||
const auto colFbxPath = BSPUtil::getFileNameForBSPAsset(colFbxFileName);
|
||||
const auto colFbxPath = BSPUtil::getFileNameForBSPAsset("map_col.fbx");
|
||||
const auto colFile = searchPath.Open(colFbxPath);
|
||||
if (!colFile.IsOpen())
|
||||
{
|
||||
|
||||
@@ -717,8 +717,7 @@ namespace BSP
|
||||
gfxWorld.outdoorLookupMatrix[3].z = zScale;
|
||||
gfxWorld.outdoorLookupMatrix[3].w = 1.0f;
|
||||
|
||||
const std::string outdoorImageName = std::string("$outdoor");
|
||||
auto outdoorImageAsset = m_context.LoadDependency<AssetImage>(outdoorImageName);
|
||||
const auto outdoorImageAsset = m_context.LoadDependency<AssetImage>("$outdoor");
|
||||
if (!outdoorImageAsset)
|
||||
{
|
||||
con::error("ERROR! unable to find outdoor image $outdoor!");
|
||||
|
||||
@@ -79,8 +79,7 @@ namespace BSP
|
||||
try
|
||||
{
|
||||
json entJs;
|
||||
std::string entityFileName = "entities.json";
|
||||
std::string entityFilePath = BSPUtil::getFileNameForBSPAsset(entityFileName);
|
||||
const auto entityFilePath = BSPUtil::getFileNameForBSPAsset("entities.json");
|
||||
const auto entFile = m_search_path.Open(entityFilePath);
|
||||
if (!entFile.IsOpen())
|
||||
{
|
||||
@@ -96,8 +95,7 @@ namespace BSP
|
||||
return nullptr;
|
||||
|
||||
json spawnJs;
|
||||
std::string spawnFileName = "spawns.json";
|
||||
std::string spawnFilePath = BSPUtil::getFileNameForBSPAsset(spawnFileName);
|
||||
const auto spawnFilePath = BSPUtil::getFileNameForBSPAsset("spawns.json");
|
||||
const auto spawnFile = m_search_path.Open(spawnFilePath);
|
||||
if (!spawnFile.IsOpen())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user