57 lines
1.4 KiB
C++
57 lines
1.4 KiB
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
#include <filesystem>
|
|
#include <fstream>
|
|
#include <unordered_map>
|
|
|
|
#include <SQLiteCpp/SQLiteCpp.h>
|
|
#include <nlohmann/json.hpp>
|
|
|
|
#include "assets/asset_base.hpp"
|
|
#include "assets/scene.hpp"
|
|
#include "configs/items.h"
|
|
#include "configs/loot.h"
|
|
#include "configs/harvestables.h"
|
|
#include "configs/npcs.h"
|
|
#include "configs/shops.h"
|
|
#include "configs/achievements.h"
|
|
|
|
struct AssetPath
|
|
{
|
|
std::filesystem::path path{};
|
|
AssetGUID GUID{};
|
|
};
|
|
|
|
namespace cursebreaker {
|
|
|
|
struct ParsedProject
|
|
{
|
|
std::filesystem::path m_projectRoot;
|
|
|
|
std::vector<AssetPath> m_scriptFiles;
|
|
std::vector<AssetPath> m_imageFiles;
|
|
std::vector<AssetPath> m_meshFiles;
|
|
std::vector<AssetPath> m_sceneFiles;
|
|
std::vector<AssetPath> m_prefabFiles;
|
|
|
|
std::vector<PrefabAsset> m_prefabAssets;
|
|
std::vector<SceneAsset> m_sceneAssets;
|
|
|
|
std::unordered_map<AssetGUID, PrefabAsset*> m_prefabsMap;
|
|
std::unordered_map<AssetGUID, uint32_t> m_scriptToClassHash;
|
|
|
|
std::unordered_map<uint16_t, Item> m_items;
|
|
std::unordered_map<uint16_t, LootTable> m_lootTables;
|
|
std::unordered_map<uint16_t, Harvestable> m_harvestables;
|
|
std::unordered_map<uint16_t, NPC> m_npcs;
|
|
std::unordered_map<uint16_t, Shop> m_shops;
|
|
std::unordered_map<uint16_t, Achievement> m_achievements;
|
|
};
|
|
|
|
void ParseProject(const std::filesystem::path& projectRoot);
|
|
|
|
extern ParsedProject g_parsedProject;
|
|
|
|
} // namespace cursebreaker
|