mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-06-06 08:42:35 +00:00
chorse: groundwork for implementing zombies maps
This commit is contained in:
@@ -117,6 +117,7 @@ namespace BSP
|
||||
{
|
||||
std::string name;
|
||||
std::string bspName;
|
||||
bool isZombiesMap;
|
||||
|
||||
BSPWorld gfxWorld;
|
||||
BSPWorld colWorld;
|
||||
|
||||
@@ -1038,7 +1038,7 @@ namespace
|
||||
|
||||
namespace BSP
|
||||
{
|
||||
std::unique_ptr<BSPData> createBSPData(std::string& mapName, ISearchPath& searchPath)
|
||||
std::unique_ptr<BSPData> createBSPData(std::string& mapName, ISearchPath& searchPath, bool isZombiesMap)
|
||||
{
|
||||
bool seperateColFile = true;
|
||||
bool isGfxFileGltf = true;
|
||||
@@ -1075,6 +1075,7 @@ namespace BSP
|
||||
std::unique_ptr<BSPData> bsp = std::make_unique<BSPData>();
|
||||
bsp->name = mapName;
|
||||
bsp->bspName = "maps/mp/" + mapName + ".d3dbsp";
|
||||
bsp->isZombiesMap = isZombiesMap;
|
||||
|
||||
BSPLoader loader(bsp.get());
|
||||
if (isGfxFileGltf)
|
||||
|
||||
@@ -5,5 +5,5 @@
|
||||
|
||||
namespace BSP
|
||||
{
|
||||
std::unique_ptr<BSPData> createBSPData(std::string& mapName, ISearchPath& searchPath);
|
||||
std::unique_ptr<BSPData> createBSPData(std::string& mapName, ISearchPath& searchPath, bool isZombiesMap);
|
||||
}; // namespace BSP
|
||||
|
||||
@@ -11,10 +11,11 @@ namespace
|
||||
class BSPLoader final : public IAssetCreator
|
||||
{
|
||||
public:
|
||||
BSPLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone)
|
||||
BSPLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone, ZoneDefinitionMapType mapType)
|
||||
: m_memory(memory),
|
||||
m_search_path(searchPath),
|
||||
m_zone(zone)
|
||||
m_zone(zone),
|
||||
m_mapType(mapType)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -32,7 +33,7 @@ namespace
|
||||
|
||||
bool FinalizeZone(AssetCreationContext& context) override
|
||||
{
|
||||
std::unique_ptr<BSPData> bsp = BSP::createBSPData(m_zone.m_name, m_search_path);
|
||||
std::unique_ptr<BSPData> bsp = BSP::createBSPData(m_zone.m_name, m_search_path, m_mapType == ZoneDefinitionMapType::ZM);
|
||||
if (bsp == nullptr)
|
||||
return false;
|
||||
|
||||
@@ -48,13 +49,14 @@ namespace
|
||||
MemoryManager& m_memory;
|
||||
ISearchPath& m_search_path;
|
||||
Zone& m_zone;
|
||||
ZoneDefinitionMapType m_mapType;
|
||||
};
|
||||
} // namespace
|
||||
|
||||
namespace BSP
|
||||
{
|
||||
std::unique_ptr<IAssetCreator> CreateLoaderT6(MemoryManager& memory, ISearchPath& searchPath, Zone& zone)
|
||||
std::unique_ptr<IAssetCreator> CreateLoaderT6(MemoryManager& memory, ISearchPath& searchPath, Zone& zone, ZoneDefinitionMapType mapType)
|
||||
{
|
||||
return std::make_unique<BSPLoader>(memory, searchPath, zone);
|
||||
return std::make_unique<BSPLoader>(memory, searchPath, zone, mapType);
|
||||
}
|
||||
} // namespace BSP
|
||||
|
||||
@@ -4,10 +4,11 @@
|
||||
#include "Game/T6/T6.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
#include "Utils/MemoryManager.h"
|
||||
#include "Zone/Definition/ZoneDefinition.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace BSP
|
||||
{
|
||||
std::unique_ptr<IAssetCreator> CreateLoaderT6(MemoryManager& memory, ISearchPath& searchPath, Zone& zone);
|
||||
std::unique_ptr<IAssetCreator> CreateLoaderT6(MemoryManager& memory, ISearchPath& searchPath, Zone& zone, ZoneDefinitionMapType mapType);
|
||||
} // namespace BSP
|
||||
|
||||
Reference in New Issue
Block a user