mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-12-29 05:21:50 +00:00
refactor: only refer to game id in zone
This commit is contained in:
@@ -562,7 +562,8 @@ namespace
|
||||
if (!mtlFile)
|
||||
return;
|
||||
|
||||
const auto writer = obj::CreateMtlWriter(*mtlFile, context.m_zone.m_game->GetShortName(), context.m_zone.m_name);
|
||||
const auto* game = IGame::GetGameById(context.m_zone.m_game_id);
|
||||
const auto writer = obj::CreateMtlWriter(*mtlFile, game->GetShortName(), context.m_zone.m_name);
|
||||
DistinctMapper<Material*> materialMapper(model->numsurfs);
|
||||
|
||||
writer->Write(common);
|
||||
@@ -576,8 +577,9 @@ namespace
|
||||
if (!assetFile)
|
||||
return;
|
||||
|
||||
const auto* game = IGame::GetGameById(context.m_zone.m_game_id);
|
||||
const auto writer =
|
||||
obj::CreateObjWriter(*assetFile, std::format("{}.mtl", model->name), context.m_zone.m_game->GetShortName(), context.m_zone.m_name);
|
||||
obj::CreateObjWriter(*assetFile, std::format("{}.mtl", model->name), game->GetShortName(), context.m_zone.m_name);
|
||||
DistinctMapper<Material*> materialMapper(model->numsurfs);
|
||||
|
||||
writer->Write(common);
|
||||
@@ -591,7 +593,8 @@ namespace
|
||||
if (!assetFile)
|
||||
return;
|
||||
|
||||
const auto writer = xmodel_export::CreateWriterForVersion6(*assetFile, context.m_zone.m_game->GetShortName(), context.m_zone.m_name);
|
||||
const auto* game = IGame::GetGameById(context.m_zone.m_game_id);
|
||||
const auto writer = xmodel_export::CreateWriterForVersion6(*assetFile, game->GetShortName(), context.m_zone.m_name);
|
||||
writer->Write(common);
|
||||
}
|
||||
|
||||
@@ -603,7 +606,8 @@ namespace
|
||||
if (!assetFile)
|
||||
return;
|
||||
|
||||
const auto writer = xmodel_bin::CreateWriterForVersion7(*assetFile, context.m_zone.m_game->GetShortName(), context.m_zone.m_name);
|
||||
const auto* game = IGame::GetGameById(context.m_zone.m_game_id);
|
||||
const auto writer = xmodel_bin::CreateWriterForVersion7(*assetFile, game->GetShortName(), context.m_zone.m_name);
|
||||
writer->Write(common);
|
||||
}
|
||||
|
||||
@@ -617,8 +621,9 @@ namespace
|
||||
if (!assetFile)
|
||||
return;
|
||||
|
||||
const auto* game = IGame::GetGameById(context.m_zone.m_game_id);
|
||||
const auto output = std::make_unique<T>(*assetFile);
|
||||
const auto writer = gltf::Writer::CreateWriter(output.get(), context.m_zone.m_game->GetShortName(), context.m_zone.m_name);
|
||||
const auto writer = gltf::Writer::CreateWriter(output.get(), game->GetShortName(), context.m_zone.m_name);
|
||||
|
||||
writer->Write(common);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user