yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
terrain_catalog.h
Go to the documentation of this file.
1#ifndef YAZE_CORE_TERRAIN_CATALOG_H_
2#define YAZE_CORE_TERRAIN_CATALOG_H_
3
4#include <string>
5#include <string_view>
6#include <vector>
7
8#include "absl/status/statusor.h"
9#include "nlohmann/json.hpp"
10
11namespace yaze::core {
12
13// Game-independent project metadata. Adapters supply opaque, content-derived
14// definition/profile fingerprints; the catalog never reads or writes ROMs.
16 public:
17 static absl::StatusOr<TerrainCatalog> Parse(std::string_view text);
18 const nlohmann::json& document() const { return document_; }
19 std::vector<nlohmann::json> Resolve(std::string_view adapter, int tile_id,
20 std::string_view definition,
21 std::string_view profile) const;
22
23 private:
24 nlohmann::json document_;
25};
26
27// Stable change detector, not a cryptographic integrity guarantee.
28std::string TerrainFingerprint(std::string_view bytes);
29
30} // namespace yaze::core
31#endif
const nlohmann::json & document() const
std::vector< nlohmann::json > Resolve(std::string_view adapter, int tile_id, std::string_view definition, std::string_view profile) const
static absl::StatusOr< TerrainCatalog > Parse(std::string_view text)
std::string TerrainFingerprint(std::string_view bytes)