yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
catalog_tile_transfer.cc File Reference
#include "app/editor/graphics/catalog_tile_transfer.h"
#include <algorithm>
#include <array>
#include <cctype>
#include <filesystem>
#include <fstream>
#include <iterator>
#include <map>
#include <memory>
#include <set>
#include <utility>
#include "app/editor/graphics/graphics_editor_state.h"
#include "app/editor/graphics/graphics_sheet_sync.h"
#include "app/editor/graphics/graphics_undo_actions.h"
#include "app/editor/registry/undo_manager.h"
#include "app/gfx/types/snes_tile.h"
#include "core/source_artifact_publisher.h"
#include "nlohmann/json.hpp"
#include "util/indexed_png.h"
#include "util/macro.h"
#include "zelda3/gfx_sheet_storage.h"
#include "zelda3/graphics_sheet_store.h"

Go to the source code of this file.

Namespaces

namespace  yaze
 
namespace  yaze::editor
 Editors are the view controllers for the application.
 
namespace  yaze::editor::anonymous_namespace{catalog_tile_transfer.cc}
 

Typedefs

using yaze::editor::anonymous_namespace{catalog_tile_transfer.cc}::Json = nlohmann::json
 

Functions

absl::Status yaze::editor::anonymous_namespace{catalog_tile_transfer.cc}::ValidatePixels (const std::vector< uint8_t > &pixels)
 
absl::Status yaze::editor::anonymous_namespace{catalog_tile_transfer.cc}::ValidateDestination (uint16_t sheet)
 
absl::StatusOr< std::string > yaze::editor::anonymous_namespace{catalog_tile_transfer.cc}::ReadFile (const std::filesystem::path &path, bool sheet=false, size_t maximum=64 *1024 *1024)
 
absl::Status yaze::editor::anonymous_namespace{catalog_tile_transfer.cc}::CheckHash (const std::string &bytes, std::string expected)
 
size_t yaze::editor::anonymous_namespace{catalog_tile_transfer.cc}::PixelOffset (int tile, int x, int y)
 
absl::StatusOr< std::string > yaze::editor::anonymous_namespace{catalog_tile_transfer.cc}::Text (const Json &value)
 
absl::StatusOr< int > yaze::editor::anonymous_namespace{catalog_tile_transfer.cc}::Integer (const Json &value, int minimum, int maximum)
 
std::string yaze::editor::anonymous_namespace{catalog_tile_transfer.cc}::OptionalText (const Json &reference, const char *key)
 
CatalogResourceKind yaze::editor::anonymous_namespace{catalog_tile_transfer.cc}::ResolveResourceKind (const Json &reference, const std::string &category)
 
absl::Status yaze::editor::anonymous_namespace{catalog_tile_transfer.cc}::CheckResourcesUnbound (const Json &reference)
 
void yaze::editor::anonymous_namespace{catalog_tile_transfer.cc}::ReadResearchProvenance (const Json &reference, CatalogSheetSource &source)
 
absl::StatusOr< std::filesystem::path > yaze::editor::anonymous_namespace{catalog_tile_transfer.cc}::ContainedPath (const std::filesystem::path &root, const std::string &name)
 
absl::Status yaze::editor::anonymous_namespace{catalog_tile_transfer.cc}::ValidatePage (const CatalogSheetSource &source)
 
absl::Status yaze::editor::anonymous_namespace{catalog_tile_transfer.cc}::ValidateAssembly (const CatalogSheetSource &source)
 
absl::Status yaze::editor::anonymous_namespace{catalog_tile_transfer.cc}::CheckPlanarPage (const Json &page, const std::filesystem::path &root, CatalogSheetSource &source)
 
absl::Status yaze::editor::anonymous_namespace{catalog_tile_transfer.cc}::LoadIndexedReference (const Json &reference, const std::filesystem::path &root, const std::string &id, const std::string &title, std::vector< CatalogSheetSource > &sources)
 
bool yaze::editor::anonymous_namespace{catalog_tile_transfer.cc}::ContainsFolded (std::string value, std::string needle)
 
const char * yaze::editor::CatalogResourceKindName (CatalogResourceKind kind)
 
bool yaze::editor::CatalogSourceMatches (const CatalogSheetSource &source, const CatalogSourceFilter &filter)
 
absl::Status yaze::editor::ValidateCatalogSourceForRomSheet (const CatalogSheetSource &source)
 
absl::StatusOr< std::vector< CatalogSheetSource > > yaze::editor::LoadCatalogSheetSources (const std::string &filename)
 
absl::StatusOr< CatalogAssetPreview > yaze::editor::AssembleCatalogAsset (const std::vector< CatalogSheetSource > &sources, const std::string &asset_id)
 
absl::StatusOr< CatalogTileTransferPlan > yaze::editor::PreviewCatalogTileTransfer (uint16_t destination_sheet, const std::vector< uint8_t > &destination_pixels, const std::vector< uint8_t > &source_pixels, const std::vector< int > &source_tiles, int first_destination_tile, bool preserve_layout)
 
absl::Status yaze::editor::ApplyCatalogTileTransfer (const CatalogTileTransferPlan &plan, GraphicsEditorState &state, UndoManager *undo_manager)
 

Variables

constexpr size_t yaze::editor::anonymous_namespace{catalog_tile_transfer.cc}::kPixels = 128 * 32
 
constexpr size_t yaze::editor::anonymous_namespace{catalog_tile_transfer.cc}::kMaxCatalogBytes = 4 * 1024 * 1024
 
constexpr size_t yaze::editor::anonymous_namespace{catalog_tile_transfer.cc}::kMaxSources = 4096
 
constexpr int yaze::editor::anonymous_namespace{catalog_tile_transfer.cc}::kMaxAssetPages = 256
 
constexpr int yaze::editor::anonymous_namespace{catalog_tile_transfer.cc}::kMaxAssetDimension = 2048
 
constexpr size_t yaze::editor::anonymous_namespace{catalog_tile_transfer.cc}::kMaxAssetPixels = 1024 * 1024