mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-21 00:25:44 +00:00
25 lines
833 B
C++
25 lines
833 B
C++
#pragma once
|
|
#include "AssetLoading/IAssetLoadingManager.h"
|
|
#include "AssetLoading/IZoneAssetLoaderState.h"
|
|
|
|
class PartClassificationState final : public IZoneAssetLoaderState
|
|
{
|
|
// TODO: Use MP part classifications when building an mp fastfile
|
|
static constexpr auto PART_CLASSIFICATION_FILE = "partclassification.csv";
|
|
|
|
static constexpr auto HITLOC_NONE = 0u;
|
|
|
|
public:
|
|
PartClassificationState();
|
|
|
|
bool Load(const char** hitLocNames, size_t hitLocNameCount, const IAssetLoadingManager& manager);
|
|
|
|
[[nodiscard]] unsigned GetPartClassificationForBoneName(const std::string& boneName) const;
|
|
|
|
private:
|
|
bool LoadRow(const char** hitLocStart, const char** hitLocEnd, unsigned rowIndex, std::vector<std::string>& row);
|
|
|
|
bool m_loaded;
|
|
std::unordered_map<std::string, unsigned> m_part_classifications;
|
|
};
|