yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::zelda3::atlas Namespace Reference

Namespaces

namespace  anonymous_namespace{atlas_annotations.cc}
 
namespace  anonymous_namespace{atlas_json.cc}
 
namespace  anonymous_namespace{dungeon_atlas.cc}
 
namespace  anonymous_namespace{dungeon_door_edges.cc}
 

Classes

struct  AreaAnnotation
 
struct  AtlasAnnotations
 
struct  AtlasArea
 
struct  AtlasBadges
 
struct  AtlasColor
 
struct  AtlasDoor
 
struct  AtlasDoorFact
 
struct  AtlasItemIds
 
struct  AtlasKeyTableRow
 
struct  AtlasLink
 
struct  AtlasPlan
 
struct  AtlasRomIdentity
 
struct  AtlasSymbolRead
 
struct  DoorEdge
 
struct  DungeonAnnotation
 
struct  DungeonAtlas
 
struct  DungeonAtlasCollectOptions
 
struct  DungeonAtlasCounts
 
struct  DungeonAtlasInput
 
struct  DungeonAtlasJsonContext
 
struct  DungeonAtlasRoom
 
struct  DungeonAtlasRoomExtras
 
struct  LinkAnnotation
 
struct  Origin
 
struct  OverworldAnnotations
 
struct  OverworldEdgeAnnotation
 
struct  OverworldGateAnnotation
 
struct  OverworldMapAnnotation
 
struct  OverworldRegionAnnotation
 
struct  OverworldSectionAnnotation
 
struct  PlanAnnotation
 
struct  RoomAnnotation
 
struct  SymbolLinkAnnotation
 
struct  VanillaDungeonDefault
 

Enumerations

enum class  Provenance : uint8_t {
  kRom , kRegistry , kAnnotation , kSymbol ,
  kDefault
}
 
enum class  AtlasView : uint8_t { kDungeon , kOverworld }
 
enum class  AnnotationFormat : uint8_t { kAtlasV1 , kOracleRoomV0 , kOracleOverworldV0 }
 
enum class  RoomStatus : uint8_t {
  kInUse , kFree , kReclaimable , kOrphan ,
  kReserved
}
 
enum class  LinkKind : uint8_t {
  kEntrance , kHole , kSpawn , kStair ,
  kPit , kWarpTiles , kWarpTag , kPitDamage ,
  kTagPit , kAnnotation , kSymbol
}
 
enum class  DoorCategory : uint8_t {
  kOpen , kOneSided , kShutter , kKey ,
  kBigKey , kBomb , kExit , kKeyStairs ,
  kOther , kIgnore
}
 

Functions

const char * AnnotationFormatName (AnnotationFormat format)
 
std::optional< int > ParseAtlasId (const std::string &text)
 
absl::Status MergeAtlasAnnotationText (const std::string &text, const std::string &file_label, AtlasAnnotations *out, AnnotationFormat *format)
 
absl::Status MergeAtlasAnnotationFile (const std::string &path, AtlasAnnotations *out, AnnotationFormat *format)
 
void ApplyVanillaAtlasDefaults (AtlasAnnotations *out)
 
absl::StatusOr< AtlasAnnotations > LoadAtlasAnnotations (const std::vector< std::string > &files, const std::string &defaults)
 
const std::vector< AtlasColor > & AtlasAreaPalette ()
 
const std::vector< VanillaDungeonDefault > & VanillaDungeonDefaults ()
 
std::string DungeonAtlasToJson (const DungeonAtlas &atlas, const DungeonAtlasJsonContext &context, int indent)
 
const char * RoomStatusName (RoomStatus status)
 
const char * LinkKindName (LinkKind kind)
 
absl::StatusOr< std::map< std::string, uint32_t > > ReadWlaSymbols (const std::string &path)
 
absl::StatusOr< DungeonAtlasInput > CollectDungeonAtlasInput (Rom *rom, const DungeonAtlasCollectOptions &options)
 
DungeonAtlas BuildDungeonAtlas (const DungeonAtlasInput &input, const AtlasAnnotations &annotations)
 
const char * DoorCategoryName (DoorCategory category)
 
DoorCategory DoorCategoryForType (int door_type)
 
std::vector< AtlasDoor > OuterWallDoors (const std::vector< AtlasDoorFact > &doors)
 
std::vector< DoorEdge > PairDoorEdges (const std::vector< std::vector< AtlasDoor > > &doors_by_room)
 

Variables

constexpr int kAtlasRoomCount = 0x128
 
constexpr int kAtlasMapCount = 0xA0
 
constexpr AtlasColor kAtlasOtherColor {120, 120, 132}
 
constexpr AtlasColor kAtlasNoOwnerColor {30, 33, 40}
 
constexpr AtlasColor kAtlasInteriorColor {86, 90, 102}
 
constexpr char kDungeonAtlasJsonSchema [] = "yaze.atlas.dungeon/1"
 

Enumeration Type Documentation

◆ Provenance

enum class yaze::zelda3::atlas::Provenance : uint8_t
strong
Enumerator
kRom 
kRegistry 
kAnnotation 
kSymbol 
kDefault 

Definition at line 50 of file atlas_annotations.h.

◆ AtlasView

enum class yaze::zelda3::atlas::AtlasView : uint8_t
strong
Enumerator
kDungeon 
kOverworld 

Definition at line 103 of file atlas_annotations.h.

◆ AnnotationFormat

enum class yaze::zelda3::atlas::AnnotationFormat : uint8_t
strong
Enumerator
kAtlasV1 
kOracleRoomV0 
kOracleOverworldV0 

Definition at line 222 of file atlas_annotations.h.

◆ RoomStatus

enum class yaze::zelda3::atlas::RoomStatus : uint8_t
strong
Enumerator
kInUse 
kFree 
kReclaimable 
kOrphan 
kReserved 

Definition at line 38 of file dungeon_atlas.h.

◆ LinkKind

enum class yaze::zelda3::atlas::LinkKind : uint8_t
strong
Enumerator
kEntrance 
kHole 
kSpawn 
kStair 
kPit 
kWarpTiles 
kWarpTag 
kPitDamage 
kTagPit 
kAnnotation 
kSymbol 

Definition at line 48 of file dungeon_atlas.h.

◆ DoorCategory

enum class yaze::zelda3::atlas::DoorCategory : uint8_t
strong
Enumerator
kOpen 
kOneSided 
kShutter 
kKey 
kBigKey 
kBomb 
kExit 
kKeyStairs 
kOther 
kIgnore 

Definition at line 16 of file dungeon_door_edges.h.

Function Documentation

◆ AnnotationFormatName()

const char * yaze::zelda3::atlas::AnnotationFormatName ( AnnotationFormat format)

Definition at line 1316 of file atlas_annotations.cc.

References kAtlasV1, kOracleOverworldV0, and kOracleRoomV0.

◆ ParseAtlasId()

std::optional< int > yaze::zelda3::atlas::ParseAtlasId ( const std::string & text)

◆ MergeAtlasAnnotationText()

absl::Status yaze::zelda3::atlas::MergeAtlasAnnotationText ( const std::string & text,
const std::string & file_label,
AtlasAnnotations * out,
AnnotationFormat * format )

Definition at line 1341 of file atlas_annotations.cc.

References yaze::zelda3::atlas::AtlasAnnotations::files, kAtlasV1, kOracleOverworldV0, kOracleRoomV0, and yaze::Json::parse().

Referenced by MergeAtlasAnnotationFile().

Here is the call graph for this function:

◆ MergeAtlasAnnotationFile()

absl::Status yaze::zelda3::atlas::MergeAtlasAnnotationFile ( const std::string & path,
AtlasAnnotations * out,
AnnotationFormat * format )

Definition at line 1383 of file atlas_annotations.cc.

References MergeAtlasAnnotationText().

Referenced by LoadAtlasAnnotations().

Here is the call graph for this function:

◆ ApplyVanillaAtlasDefaults()

◆ LoadAtlasAnnotations()

absl::StatusOr< AtlasAnnotations > yaze::zelda3::atlas::LoadAtlasAnnotations ( const std::vector< std::string > & files,
const std::string & defaults )

Definition at line 1412 of file atlas_annotations.cc.

References ApplyVanillaAtlasDefaults(), and MergeAtlasAnnotationFile().

Referenced by yaze::cli::handlers::AtlasRenderCommandHandler::ExecuteWithContext().

Here is the call graph for this function:

◆ AtlasAreaPalette()

const std::vector< AtlasColor > & yaze::zelda3::atlas::AtlasAreaPalette ( )

Definition at line 5 of file atlas_defaults.cc.

Referenced by BuildDungeonAtlas(), and VanillaDungeonDefaults().

◆ VanillaDungeonDefaults()

const std::vector< VanillaDungeonDefault > & yaze::zelda3::atlas::VanillaDungeonDefaults ( )

Definition at line 16 of file atlas_defaults.cc.

References AtlasAreaPalette(), and kAtlasInteriorColor.

Referenced by ApplyVanillaAtlasDefaults().

Here is the call graph for this function:

◆ DungeonAtlasToJson()

std::string yaze::zelda3::atlas::DungeonAtlasToJson ( const DungeonAtlas & atlas,
const DungeonAtlasJsonContext & context,
int indent )

◆ RoomStatusName()

const char * yaze::zelda3::atlas::RoomStatusName ( RoomStatus status)

Definition at line 81 of file dungeon_atlas.cc.

References kFree, kInUse, kOrphan, kReclaimable, and kReserved.

Referenced by DungeonAtlasToJson().

◆ LinkKindName()

const char * yaze::zelda3::atlas::LinkKindName ( LinkKind kind)

◆ ReadWlaSymbols()

absl::StatusOr< std::map< std::string, uint32_t > > yaze::zelda3::atlas::ReadWlaSymbols ( const std::string & path)

Definition at line 125 of file dungeon_atlas.cc.

References yaze::zelda3::name.

Referenced by CollectDungeonAtlasInput().

◆ CollectDungeonAtlasInput()

absl::StatusOr< DungeonAtlasInput > yaze::zelda3::atlas::CollectDungeonAtlasInput ( Rom * rom,
const DungeonAtlasCollectOptions & options )

Definition at line 161 of file dungeon_atlas.cc.

References yaze::zelda3::atlas::DungeonAtlasInput::census, yaze::zelda3::CollectRoomCensusInput(), yaze::util::ComputeSha1Hex(), yaze::Rom::data(), yaze::zelda3::atlas::AtlasDoorFact::direction, yaze::core::ProjectRegistry::dungeons, yaze::zelda3::atlas::DungeonAtlasInput::extras, yaze::Rom::filename(), yaze::Rom::is_loaded(), yaze::zelda3::atlas::DungeonAtlasCollectOptions::manifest, yaze::zelda3::RoomCensusOptions::manifest, yaze::zelda3::atlas::AtlasRomIdentity::name, yaze::zelda3::RoomCensusOptions::project, ReadWlaSymbols(), yaze::zelda3::atlas::DungeonAtlasCollectOptions::registry, yaze::zelda3::atlas::DungeonAtlasInput::registry_room_names, yaze::zelda3::atlas::DungeonAtlasInput::rom, yaze::zelda3::RoomCensusOptions::room_visitor, yaze::zelda3::atlas::AtlasRomIdentity::sha1, yaze::Rom::size(), yaze::zelda3::atlas::AtlasRomIdentity::size, yaze::zelda3::atlas::DungeonAtlasCollectOptions::symbol_links, yaze::zelda3::atlas::DungeonAtlasInput::symbol_reads, yaze::zelda3::atlas::DungeonAtlasInput::symbols_path, yaze::zelda3::atlas::DungeonAtlasCollectOptions::symbols_path, yaze::zelda3::atlas::AtlasDoorFact::tile_x, yaze::zelda3::atlas::AtlasDoorFact::tile_y, yaze::zelda3::atlas::AtlasDoorFact::type, yaze::zelda3::atlas::AtlasDoorFact::type_name, yaze::zelda3::atlas::DungeonAtlasCollectOptions::vanilla_rom, yaze::zelda3::RoomCensusOptions::vanilla_rom, and yaze::Rom::vector().

Referenced by yaze::cli::handlers::AtlasRenderCommandHandler::ExecuteWithContext().

◆ BuildDungeonAtlas()

DungeonAtlas yaze::zelda3::atlas::BuildDungeonAtlas ( const DungeonAtlasInput & input,
const AtlasAnnotations & annotations )

Definition at line 250 of file dungeon_atlas.cc.

References yaze::zelda3::atlas::DungeonAtlas::annotation_files, yaze::zelda3::atlas::DungeonAtlasRoom::area, yaze::zelda3::atlas::DungeonAtlasRoom::area_origin, yaze::zelda3::atlas::AtlasAnnotations::areas, yaze::zelda3::atlas::DungeonAtlas::areas, AtlasAreaPalette(), yaze::zelda3::atlas::DungeonAtlasRoom::badges, yaze::zelda3::atlas::AtlasBadges::big_chest, yaze::zelda3::atlas::AtlasBadges::bk_chest, yaze::zelda3::atlas::AtlasBadges::bk_drop, yaze::zelda3::atlas::DungeonAtlasRoom::blockset, yaze::zelda3::BuildRoomCensus(), yaze::zelda3::atlas::AtlasBadges::c, yaze::zelda3::atlas::DungeonAtlasInput::census, yaze::zelda3::atlas::DungeonAnnotation::code, yaze::zelda3::atlas::AtlasArea::code, yaze::zelda3::CollectRoomLinks(), yaze::zelda3::atlas::DungeonAnnotation::color, yaze::zelda3::atlas::AtlasArea::color, yaze::zelda3::atlas::AtlasPlan::color, yaze::zelda3::atlas::DungeonAnnotation::color_origin, yaze::zelda3::atlas::AtlasArea::color_origin, yaze::zelda3::atlas::DungeonAtlas::counts, yaze::zelda3::atlas::Origin::Default(), yaze::zelda3::atlas::DungeonAtlasRoom::doors, yaze::zelda3::atlas::AtlasAnnotations::dungeons, yaze::zelda3::atlas::DungeonAtlas::edges, yaze::zelda3::atlas::DungeonAtlasRoom::empty, yaze::zelda3::RoomCensusEntry::empty, yaze::zelda3::atlas::AtlasLink::entrance, yaze::zelda3::RoomCensusInput::entrances, yaze::zelda3::atlas::DungeonAtlas::expanded_entrance_tables, yaze::zelda3::RoomCensus::expanded_entrance_tables, yaze::zelda3::atlas::DungeonAtlasInput::extras, yaze::zelda3::atlas::AtlasAnnotations::files, yaze::zelda3::atlas::AtlasSymbolRead::found, yaze::zelda3::atlas::DungeonAtlasCounts::free, yaze::zelda3::atlas::AtlasLink::from, yaze::zelda3::atlas::AtlasPlan::has_color, yaze::zelda3::RoomLinkFacts::hole_sprite, yaze::zelda3::atlas::DungeonAtlasCounts::in_use, yaze::zelda3::atlas::AtlasLink::index, yaze::zelda3::atlas::DungeonAtlasRoom::interior, yaze::zelda3::atlas::DungeonAtlasCounts::interior, yaze::zelda3::RoomCensusEntry::interior, yaze::zelda3::IsDungeonRoomId(), chest::item, yaze::zelda3::atlas::AtlasAnnotations::items, yaze::zelda3::atlas::AtlasBadges::k_chest, yaze::zelda3::atlas::AtlasBadges::k_drop, yaze::zelda3::atlas::AtlasBadges::k_pot, kAnnotation, kAtlasInteriorColor, kAtlasNoOwnerColor, kAtlasOtherColor, kDefault, kDungeon, kEntrance, yaze::zelda3::kEntrance, yaze::zelda3::atlas::AtlasPlan::key, yaze::zelda3::atlas::DungeonAtlas::key_table, kFree, yaze::zelda3::kFree, kHole, yaze::zelda3::kHole, yaze::zelda3::kHolewarp, yaze::zelda3::atlas::Origin::kind, yaze::zelda3::atlas::AtlasLink::kind, yaze::zelda3::atlas::AtlasArea::kind, kInUse, yaze::zelda3::kInUse, yaze::zelda3::kNone, kOrphan, kPit, kPitDamage, yaze::zelda3::kPits, kReclaimable, yaze::zelda3::kReclaimable, kReserved, kSpawn, yaze::zelda3::kSpawn, yaze::zelda3::kSprite, kStair, yaze::zelda3::kStair, kSymbol, yaze::zelda3::kTag, kTagPit, kWarpTag, yaze::zelda3::kWarpTag, kWarpTiles, yaze::zelda3::kWarpTiles, yaze::zelda3::atlas::AtlasLink::label, yaze::zelda3::atlas::AtlasPlan::label, yaze::zelda3::atlas::DungeonAtlas::legend_notes, yaze::zelda3::atlas::AtlasAnnotations::legend_notes_dungeon, yaze::zelda3::atlas::AtlasAnnotations::links, yaze::zelda3::atlas::DungeonAtlasRoom::links_in, yaze::zelda3::atlas::DungeonAtlasRoom::links_out, yaze::zelda3::atlas::AtlasBadges::m, yaze::zelda3::atlas::DungeonAnnotation::name, yaze::zelda3::atlas::DungeonAtlasRoom::name, yaze::zelda3::atlas::AtlasArea::name, yaze::zelda3::atlas::AtlasPlan::name, yaze::zelda3::atlas::DungeonAtlasRoom::name_origin, yaze::zelda3::atlas::AtlasLink::note, yaze::zelda3::atlas::DungeonAtlasRoom::note, yaze::zelda3::atlas::AtlasPlan::note, yaze::zelda3::RoomCensusEntry::object_count, yaze::zelda3::atlas::DungeonAtlasRoom::objects, yaze::zelda3::atlas::DungeonAnnotation::origin, yaze::zelda3::atlas::AtlasLink::origin, yaze::zelda3::atlas::AtlasArea::origin, yaze::zelda3::atlas::AtlasPlan::origin, yaze::zelda3::atlas::DungeonAtlasCounts::orphan, yaze::zelda3::RoomCensusEntry::orphan, yaze::zelda3::atlas::AtlasBadges::other, OuterWallDoors(), yaze::zelda3::atlas::AtlasLink::ow_map, yaze::zelda3::atlas::DungeonAtlasRoom::owner, yaze::zelda3::atlas::AtlasArea::owner, yaze::zelda3::RoomCensusEntry::owner_index, yaze::zelda3::atlas::DungeonAtlasRoom::owner_name, yaze::zelda3::RoomCensus::owners, yaze::zelda3::atlas::DungeonAtlas::owners_from_project, yaze::zelda3::RoomCensus::owners_from_project, PairDoorEdges(), yaze::zelda3::atlas::DungeonAtlasRoom::pit_damage, yaze::zelda3::atlas::AtlasAnnotations::plans, yaze::zelda3::atlas::DungeonAtlas::plans, yaze::zelda3::atlas::DungeonAtlasRoom::reached, yaze::zelda3::RoomCensusEntry::reached, yaze::zelda3::atlas::DungeonAtlasRoom::reasons, yaze::zelda3::RoomCensusEntry::reasons, yaze::zelda3::atlas::DungeonAtlasCounts::reclaimable, yaze::zelda3::atlas::Origin::Registry(), yaze::zelda3::atlas::DungeonAtlasInput::registry_room_names, yaze::zelda3::atlas::DungeonAtlasCounts::reserved, yaze::zelda3::atlas::Origin::Rom(), yaze::zelda3::atlas::DungeonAtlas::rom, yaze::zelda3::atlas::DungeonAtlasInput::rom, yaze::zelda3::atlas::DungeonAtlasRoom::room_id, yaze::zelda3::atlas::AtlasAnnotations::rooms, yaze::zelda3::atlas::AtlasPlan::rooms, yaze::zelda3::atlas::DungeonAtlas::rooms, yaze::zelda3::RoomCensusInput::rooms, yaze::zelda3::RoomCensus::rooms, yaze::zelda3::RoomCensusEntry::sprite_count, yaze::zelda3::atlas::DungeonAtlasRoom::sprites, yaze::zelda3::RoomLinkFacts::stair_slot_estimated, yaze::zelda3::atlas::DungeonAtlasRoom::status, yaze::zelda3::atlas::AtlasPlan::status, yaze::zelda3::RoomCensusEntry::status, yaze::zelda3::atlas::DungeonAtlasRoom::status_origin, yaze::zelda3::atlas::AtlasLink::style, yaze::zelda3::atlas::Origin::Symbol(), yaze::zelda3::atlas::AtlasAnnotations::symbol_links, yaze::zelda3::atlas::DungeonAtlasInput::symbol_reads, yaze::zelda3::atlas::DungeonAtlas::symbols, yaze::zelda3::atlas::DungeonAtlasInput::symbols_path, yaze::zelda3::atlas::DungeonAtlasRoom::tag1, yaze::zelda3::atlas::DungeonAtlasRoom::tag2, yaze::zelda3::atlas::AtlasAnnotations::title, yaze::zelda3::atlas::DungeonAtlas::title, yaze::zelda3::atlas::AtlasAnnotations::title_origin, yaze::zelda3::atlas::DungeonAtlas::title_origin, yaze::zelda3::atlas::AtlasLink::to, yaze::zelda3::atlas::AtlasSymbolRead::values, yaze::zelda3::RoomCensus::vanilla_owner_names, yaze::zelda3::atlas::DungeonAtlasRoom::vanilla_similarity, yaze::zelda3::RoomCensusEntry::vanilla_similarity, yaze::zelda3::atlas::DungeonAtlas::warnings, and yaze::zelda3::RoomCensusInput::warp_tag_ids.

Referenced by yaze::cli::handlers::AtlasRenderCommandHandler::ExecuteWithContext().

◆ DoorCategoryName()

const char * yaze::zelda3::atlas::DoorCategoryName ( DoorCategory category)

◆ DoorCategoryForType()

DoorCategory yaze::zelda3::atlas::DoorCategoryForType ( int door_type)

Definition at line 93 of file dungeon_door_edges.cc.

References kBigKey, kBomb, kExit, kIgnore, kKey, kKeyStairs, kOneSided, kOpen, kOther, and kShutter.

Referenced by OuterWallDoors().

◆ OuterWallDoors()

std::vector< AtlasDoor > yaze::zelda3::atlas::OuterWallDoors ( const std::vector< AtlasDoorFact > & doors)

◆ PairDoorEdges()

Variable Documentation

◆ kAtlasRoomCount

◆ kAtlasMapCount

◆ kAtlasOtherColor

constexpr AtlasColor yaze::zelda3::atlas::kAtlasOtherColor {120, 120, 132}
inlineconstexpr

Definition at line 27 of file atlas_defaults.h.

Referenced by BuildDungeonAtlas().

◆ kAtlasNoOwnerColor

constexpr AtlasColor yaze::zelda3::atlas::kAtlasNoOwnerColor {30, 33, 40}
inlineconstexpr

Definition at line 28 of file atlas_defaults.h.

Referenced by BuildDungeonAtlas().

◆ kAtlasInteriorColor

constexpr AtlasColor yaze::zelda3::atlas::kAtlasInteriorColor {86, 90, 102}
inlineconstexpr

Definition at line 29 of file atlas_defaults.h.

Referenced by BuildDungeonAtlas(), and VanillaDungeonDefaults().

◆ kDungeonAtlasJsonSchema

constexpr char yaze::zelda3::atlas::kDungeonAtlasJsonSchema[] = "yaze.atlas.dungeon/1"
inlineconstexpr