mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-09 22:38:06 -05:00
chore: parse includes and assetlists while parsing zone definition
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
#include "Game/IW3/StringTable/AssetLoaderStringTableIW3.h"
|
||||
|
||||
#include "Game/IW3/GameIW3.h"
|
||||
#include "Mock/MockSearchPath.h"
|
||||
#include "Pool/ZoneAssetPools.h"
|
||||
#include "SearchPath/MockSearchPath.h"
|
||||
#include "Utils/MemoryManager.h"
|
||||
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include "Game/IW4/CommonIW4.h"
|
||||
#include "Game/IW4/GameIW4.h"
|
||||
#include "Mock/MockSearchPath.h"
|
||||
#include "SearchPath/MockSearchPath.h"
|
||||
#include "Utils/MemoryManager.h"
|
||||
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
@ -1,8 +1,8 @@
|
||||
#include "Game/IW4/Menu/LoaderMenuListIW4.h"
|
||||
|
||||
#include "Game/IW4/GameIW4.h"
|
||||
#include "Mock/MockSearchPath.h"
|
||||
#include "Parsing/Menu/MenuFileReader.h"
|
||||
#include "SearchPath/MockSearchPath.h"
|
||||
#include "Utils/MemoryManager.h"
|
||||
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "Game/IW5/StringTable/LoaderStringTableIW5.h"
|
||||
|
||||
#include "Game/IW5/GameIW5.h"
|
||||
#include "Mock/MockSearchPath.h"
|
||||
#include "SearchPath/MockSearchPath.h"
|
||||
#include "Utils/MemoryManager.h"
|
||||
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "Game/T5/StringTable/LoaderStringTableT5.h"
|
||||
|
||||
#include "Game/T5/GameT5.h"
|
||||
#include "Mock/MockSearchPath.h"
|
||||
#include "SearchPath/MockSearchPath.h"
|
||||
#include "Utils/MemoryManager.h"
|
||||
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "Game/T6/StringTable/LoaderStringTableT6.h"
|
||||
|
||||
#include "Game/T6/GameT6.h"
|
||||
#include "Mock/MockSearchPath.h"
|
||||
#include "SearchPath/MockSearchPath.h"
|
||||
#include "Utils/MemoryManager.h"
|
||||
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
@ -1,26 +0,0 @@
|
||||
#include "MockSearchPath.h"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
void MockSearchPath::AddFileData(std::string fileName, std::string fileData)
|
||||
{
|
||||
m_file_data_map.emplace(std::make_pair(std::move(fileName), std::move(fileData)));
|
||||
}
|
||||
|
||||
SearchPathOpenFile MockSearchPath::Open(const std::string& fileName)
|
||||
{
|
||||
const auto foundFileData = m_file_data_map.find(fileName);
|
||||
|
||||
if (foundFileData == m_file_data_map.end())
|
||||
return {};
|
||||
|
||||
return {std::make_unique<std::istringstream>(foundFileData->second), foundFileData->second.size()};
|
||||
}
|
||||
|
||||
const std::string& MockSearchPath::GetPath()
|
||||
{
|
||||
const static std::string NAME = "MockFiles";
|
||||
return NAME;
|
||||
}
|
||||
|
||||
void MockSearchPath::Find(const SearchPathSearchOptions& options, const std::function<void(const std::string&)>& callback) {}
|
@ -1,16 +0,0 @@
|
||||
#pragma once
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
|
||||
#include <map>
|
||||
|
||||
class MockSearchPath final : public ISearchPath
|
||||
{
|
||||
std::map<std::string, std::string> m_file_data_map;
|
||||
|
||||
public:
|
||||
void AddFileData(std::string fileName, std::string fileData);
|
||||
|
||||
SearchPathOpenFile Open(const std::string& fileName) override;
|
||||
const std::string& GetPath() override;
|
||||
void Find(const SearchPathSearchOptions& options, const std::function<void(const std::string&)>& callback) override;
|
||||
};
|
Reference in New Issue
Block a user