yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
dungeon_collision_commands.cc File Reference
#include "cli/handlers/game/dungeon_collision_commands.h"
#include <algorithm>
#include <array>
#include <atomic>
#include <cerrno>
#include <chrono>
#include <cstdint>
#include <filesystem>
#include <fstream>
#include <ios>
#include <limits>
#include <sstream>
#include <string>
#include <system_error>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#include "absl/flags/declare.h"
#include "absl/flags/flag.h"
#include "absl/status/status.h"
#include "absl/strings/ascii.h"
#include "absl/strings/str_format.h"
#include "absl/strings/str_split.h"
#include "absl/strings/string_view.h"
#include "absl/types/span.h"
#include "cli/util/hex_util.h"
#include "nlohmann/json.hpp"
#include "rom/rom.h"
#include "rom/transaction.h"
#include "util/macro.h"
#include "zelda3/dungeon/custom_collision.h"
#include "zelda3/dungeon/dungeon_rom_addresses.h"
#include "zelda3/dungeon/oracle_rom_safety_preflight.h"
#include "zelda3/dungeon/room.h"
#include "zelda3/dungeon/water_fill_zone.h"
#include <fcntl.h>
#include <unistd.h>

Go to the source code of this file.

Classes

struct  yaze::cli::handlers::anonymous_namespace{dungeon_collision_commands.cc}::PendingArtifactPublication
 
struct  yaze::cli::handlers::anonymous_namespace{dungeon_collision_commands.cc}::ResolvedExportArtifactPaths
 

Namespaces

namespace  yaze
 
namespace  yaze::cli
 Namespace for the command line interface.
 
namespace  yaze::cli::handlers
 
namespace  yaze::cli::handlers::anonymous_namespace{dungeon_collision_commands.cc}
 

Typedefs

using yaze::cli::handlers::anonymous_namespace{dungeon_collision_commands.cc}::json = nlohmann::json
 

Functions

 ABSL_DECLARE_FLAG (bool, sandbox)
 
absl::StatusOr< std::unordered_set< int > > yaze::cli::handlers::anonymous_namespace{dungeon_collision_commands.cc}::ParseTileFilter (const resources::ArgumentParser &parser)
 
absl::StatusOr< int > yaze::cli::handlers::anonymous_namespace{dungeon_collision_commands.cc}::ParseRoomIdToken (absl::string_view token)
 
absl::StatusOr< std::vector< int > > yaze::cli::handlers::anonymous_namespace{dungeon_collision_commands.cc}::ParseRoomSelection (const resources::ArgumentParser &parser)
 
absl::StatusOr< std::string > yaze::cli::handlers::anonymous_namespace{dungeon_collision_commands.cc}::ReadTextFile (const std::string &path)
 
absl::StatusOr< std::filesystem::path > yaze::cli::handlers::anonymous_namespace{dungeon_collision_commands.cc}::ResolveStableArtifactPath (const std::filesystem::path &path)
 
std::filesystem::path yaze::cli::handlers::anonymous_namespace{dungeon_collision_commands.cc}::NextArtifactTempPath (const std::filesystem::path &target_path)
 
absl::StatusOr< std::filesystem::path > yaze::cli::handlers::anonymous_namespace{dungeon_collision_commands.cc}::WriteExclusiveArtifactTemp (const std::filesystem::path &target_path, absl::string_view content)
 
absl::Status yaze::cli::handlers::anonymous_namespace{dungeon_collision_commands.cc}::ReplaceArtifactFromTemp (const std::filesystem::path &temp_path, const std::filesystem::path &target_path)
 
absl::Status yaze::cli::handlers::anonymous_namespace{dungeon_collision_commands.cc}::ValidatePublishTarget (const std::filesystem::path &target_path)
 
absl::StatusOr< std::optional< std::filesystem::path > > yaze::cli::handlers::anonymous_namespace{dungeon_collision_commands.cc}::CreateArtifactRollbackCopy (const std::filesystem::path &target_path)
 
void yaze::cli::handlers::anonymous_namespace{dungeon_collision_commands.cc}::CleanupPendingArtifactFiles (const std::vector< PendingArtifactPublication > &artifacts)
 
absl::Status yaze::cli::handlers::anonymous_namespace{dungeon_collision_commands.cc}::RollBackPublishedArtifacts (std::vector< PendingArtifactPublication > *artifacts, const absl::Status &publication_failure)
 
absl::Status yaze::cli::handlers::anonymous_namespace{dungeon_collision_commands.cc}::RejectArtifactSetAliasesAfterPublication (const std::vector< PendingArtifactPublication > &artifacts)
 
absl::Status yaze::cli::handlers::anonymous_namespace{dungeon_collision_commands.cc}::PublishArtifactSetAtomically (std::vector< PendingArtifactPublication > artifacts)
 
absl::Status yaze::cli::handlers::anonymous_namespace{dungeon_collision_commands.cc}::PublishResolvedTextFileAtomically (const std::filesystem::path &target_path, absl::string_view content)
 
absl::Status yaze::cli::handlers::anonymous_namespace{dungeon_collision_commands.cc}::PublishExportArtifactsAtomically (const std::filesystem::path &out_path, absl::string_view out_content, const std::optional< std::filesystem::path > &report_path, absl::string_view report_content)
 
absl::Status yaze::cli::handlers::anonymous_namespace{dungeon_collision_commands.cc}::ValidateImportArguments (const resources::ArgumentParser &parser, absl::string_view command_name)
 
absl::Status yaze::cli::handlers::anonymous_namespace{dungeon_collision_commands.cc}::ValidateExportArguments (const resources::ArgumentParser &parser, absl::string_view command_name)
 
absl::StatusOr< std::filesystem::path > yaze::cli::handlers::anonymous_namespace{dungeon_collision_commands.cc}::NormalizedAbsolutePath (const std::filesystem::path &path)
 
absl::StatusOr< bool > yaze::cli::handlers::anonymous_namespace{dungeon_collision_commands.cc}::PathsAlias (const std::filesystem::path &lhs, const std::filesystem::path &rhs)
 
absl::Status yaze::cli::handlers::anonymous_namespace{dungeon_collision_commands.cc}::RejectArtifactRomAliases (absl::string_view option_name, const std::filesystem::path &artifact_path, const resources::CommandInvocationContext &invocation_context)
 
absl::StatusOr< ResolvedExportArtifactPathsyaze::cli::handlers::anonymous_namespace{dungeon_collision_commands.cc}::ResolveExportArtifactPaths (const resources::ArgumentParser &parser, const resources::CommandInvocationContext &invocation_context)
 
absl::StatusOr< std::optional< std::filesystem::path > > yaze::cli::handlers::anonymous_namespace{dungeon_collision_commands.cc}::ResolveReportArtifactPath (const resources::ArgumentParser &parser, const Rom *rom)
 
std::string yaze::cli::handlers::anonymous_namespace{dungeon_collision_commands.cc}::StatusCodeName (absl::StatusCode code)
 
json yaze::cli::handlers::anonymous_namespace{dungeon_collision_commands.cc}::BuildBaseReport (absl::string_view command_name, bool dry_run)
 
void yaze::cli::handlers::anonymous_namespace{dungeon_collision_commands.cc}::AddStructuredError (resources::OutputFormatter &formatter, const absl::Status &status)
 
absl::Status yaze::cli::handlers::anonymous_namespace{dungeon_collision_commands.cc}::FinalizeWithReport (const std::optional< std::filesystem::path > &resolved_report_path, json report, const absl::Status &status)
 
absl::Status yaze::cli::handlers::anonymous_namespace{dungeon_collision_commands.cc}::FinalizeExportWithReport (const ResolvedExportArtifactPaths &artifact_paths, json report, const absl::Status &status)
 
json yaze::cli::handlers::anonymous_namespace{dungeon_collision_commands.cc}::BuildPreflightJson (const zelda3::OracleRomSafetyPreflightResult &preflight)
 
template<typename Serializer >
absl::Status yaze::cli::handlers::anonymous_namespace{dungeon_collision_commands.cc}::SerializeAndPersistImport (Rom *rom, const resources::ArgumentParser &parser, json *report, Serializer &&serializer)
 
std::vector< int > yaze::cli::handlers::anonymous_namespace{dungeon_collision_commands.cc}::RequiredCollisionRoomsForImportedWaterFillZones (const std::vector< zelda3::WaterFillZoneEntry > &zones)
 

Variables

constexpr int yaze::cli::handlers::anonymous_namespace{dungeon_collision_commands.cc}::kCollisionGridSize = 64
 

Function Documentation

◆ ABSL_DECLARE_FLAG()

ABSL_DECLARE_FLAG ( bool ,
sandbox  )