2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-11-23 13:12:06 +00:00

WIP: Updating code to follow laupentin's code review.

Done:
- Moved custom map structures to their own objcommon header file
- Updated GfxLightGridRow struct
- Reverted shader_bin file path
- Renamed Project Creator to BSP Creator
- Removed model loading from BSP creator
- Cleaned up BSP Creator and updated the names of structs
WIP:
- Update BSP calculation code to be more readable and use unique/shared ptrs
This commit is contained in:
LJW-Dev
2025-10-20 18:04:03 +08:00
parent 15918506c3
commit e19a3a142a
10 changed files with 165 additions and 339 deletions

View File

@@ -1,5 +1,7 @@
#include "Game/T6/Maps/CustomMaps.h"
#include "LoaderCustomMapT6.h"
#include "ProjectCreator.h"
#include "BSPCreator.h"
#include "CustomMapLinker.h"
#include "Game/T6/T6.h"
@@ -27,18 +29,16 @@ namespace
if (!mapGfxFile.IsOpen())
return AssetCreationResult::NoAction();
// create map info from the fbx file
customMapInfo* mapInfo = ProjectCreator::createCustomMapInfo(m_zone.m_name, m_search_path);
if (mapInfo == NULL)
CustomMapBSP* mapBSP = BSPCreator::createCustomMapBSP(m_zone.m_name, m_search_path);
if (mapBSP == NULL)
return AssetCreationResult::Failure();
// linker will add all the assets needed
CustomMapLinker* linker = new CustomMapLinker(m_memory, m_search_path, m_zone, context);
bool result = linker->linkCustomMap(mapInfo);
bool result = linker->linkCustomMap(mapBSP);
if (result)
{
auto gfxWorldAsset = context.LoadDependency<AssetGfxWorld>(mapInfo->bspName);
auto gfxWorldAsset = context.LoadDependency<AssetGfxWorld>(mapBSP->bspName);
_ASSERT(gfxWorldAsset != NULL);
return AssetCreationResult::Success(gfxWorldAsset);
}