yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
pixel_index_command.cc File Reference
#include "app/editor/graphics/pixel_index_command.h"
#include <algorithm>
#include <map>
#include <memory>
#include <set>
#include <string>
#include <tuple>
#include <utility>
#include "app/editor/graphics/graphics_editor_state.h"
#include "app/editor/registry/undo_manager.h"
#include "util/macro.h"
#include "zelda3/game_data.h"
#include "zelda3/gfx_sheet_storage.h"
#include "zelda3/graphics_sheet_store.h"

Go to the source code of this file.

Classes

class  yaze::editor::anonymous_namespace{pixel_index_command.cc}::PixelIndexAction
 

Namespaces

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

Typedefs

using yaze::editor::anonymous_namespace{pixel_index_command.cc}::TileKey = std::pair<uint16_t, uint16_t>
 
using yaze::editor::anonymous_namespace{pixel_index_command.cc}::PixelOffsets = std::map<uint16_t, std::set<uint16_t>>
 
using yaze::editor::anonymous_namespace{pixel_index_command.cc}::SourceCellKey = std::tuple<int, int, size_t, bool, bool>
 

Functions

absl::Status yaze::editor::anonymous_namespace{pixel_index_command.cc}::ValidatePermutation (const PixelIndexPermutation &permutation)
 
uint64_t yaze::editor::anonymous_namespace{pixel_index_command.cc}::PhysicalMask (const PixelIndexTarget &target)
 
bool yaze::editor::anonymous_namespace{pixel_index_command.cc}::IsRaw3bpp (absl::Span< const uint8_t > pixels)
 
void yaze::editor::anonymous_namespace{pixel_index_command.cc}::RefreshSelectionPixels (GraphicsEditorState &state)
 
absl::StatusOr< PixelOffsets > yaze::editor::anonymous_namespace{pixel_index_command.cc}::SelectionOffsets (const PixelIndexPlan &plan)
 
absl::StatusOr< std::vector< SourceCellKey > > yaze::editor::anonymous_namespace{pixel_index_command.cc}::SelectedSourceCells (const GraphicsEditContext &source, const std::set< TileKey > &selected)
 
absl::Status yaze::editor::anonymous_namespace{pixel_index_command.cc}::CheckLiveSource (const PixelIndexPlan &plan)
 
absl::Status yaze::editor::anonymous_namespace{pixel_index_command.cc}::CaptureSourceGuard (const GraphicsEditorState &state, PixelIndexPlan &plan)
 
absl::StatusOr< std::vector< PixelIndexTarget > > yaze::editor::MakePixelIndexRectangleSelection (uint16_t sheet_id, int x, int y, int width, int height)
 
absl::StatusOr< PixelIndexPlan > yaze::editor::PlanPixelIndexPermutation (const GraphicsEditorState &state, const std::vector< PixelIndexTarget > &targets, const PixelIndexPermutation &permutation)
 
absl::StatusOr< PixelIndexPlan > yaze::editor::PlanPixelIndexReplacement (const GraphicsEditorState &state, const std::vector< PixelIndexTarget > &targets, const std::map< uint16_t, std::vector< uint8_t > > &after_sheets, std::string description)
 
absl::Status yaze::editor::ExecutePixelIndexPlan (GraphicsEditorState &state, const PixelIndexPlan &plan, PixelIndexExecution execution, const std::function< absl::Status(size_t)> &after_sheet_write)
 
absl::Status yaze::editor::ApplyPixelIndexPlan (GraphicsEditorState &state, UndoManager &history, const PixelIndexPlan &plan)
 
absl::Status yaze::editor::ApplyPixelIndexPermutation (GraphicsEditorState &state, UndoManager &history, const std::vector< PixelIndexTarget > &targets, const PixelIndexPermutation &permutation)
 
absl::StatusOr< PixelIndexPlan > yaze::editor::PlanColorIdPermutation (const GraphicsEditorState &state, const std::vector< PixelIndexTarget > &targets, const ColorIdPermutation &permutation)
 
absl::Status yaze::editor::ApplyColorIdPermutation (GraphicsEditorState &state, UndoManager &history, const std::vector< PixelIndexTarget > &targets, const ColorIdPermutation &permutation)
 

Variables

constexpr int yaze::editor::anonymous_namespace{pixel_index_command.cc}::kSheetWidth = zelda3::GraphicsSheetStore::kSheetWidth
 
constexpr int yaze::editor::anonymous_namespace{pixel_index_command.cc}::kSheetHeight = zelda3::GraphicsSheetStore::kSheetHeight
 
constexpr int yaze::editor::anonymous_namespace{pixel_index_command.cc}::kTilesPerRow = kSheetWidth / 8
 
constexpr int yaze::editor::anonymous_namespace{pixel_index_command.cc}::kTilesPerSheet = kSheetWidth * kSheetHeight / 64