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
11
namespace
yaze::core
{
12
13
// Game-independent project metadata. Adapters supply opaque, content-derived
14
// definition/profile fingerprints; the catalog never reads or writes ROMs.
15
class
TerrainCatalog
{
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.
28
std::string
TerrainFingerprint
(std::string_view bytes);
29
30
}
// namespace yaze::core
31
#endif
yaze::core::TerrainCatalog
Definition
terrain_catalog.h:15
yaze::core::TerrainCatalog::document
const nlohmann::json & document() const
Definition
terrain_catalog.h:18
yaze::core::TerrainCatalog::Resolve
std::vector< nlohmann::json > Resolve(std::string_view adapter, int tile_id, std::string_view definition, std::string_view profile) const
Definition
terrain_catalog.cc:76
yaze::core::TerrainCatalog::Parse
static absl::StatusOr< TerrainCatalog > Parse(std::string_view text)
Definition
terrain_catalog.cc:19
yaze::core::TerrainCatalog::document_
nlohmann::json document_
Definition
terrain_catalog.h:24
yaze::core
Definition
dungeon_render_context.h:12
yaze::core::TerrainFingerprint
std::string TerrainFingerprint(std::string_view bytes)
Definition
terrain_catalog.cc:98
src
core
terrain_catalog.h
Generated by
1.10.0