yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
catalog_object_transfer.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_GRAPHICS_CATALOG_OBJECT_TRANSFER_H_
2#define YAZE_APP_EDITOR_GRAPHICS_CATALOG_OBJECT_TRANSFER_H_
3
4#include "absl/status/statusor.h"
7
8namespace yaze::editor {
9
10class GraphicsEditorState;
11
12// A source-art crop in pixels. The selected, tile-aligned crop is placed at
13// the current object's pattern origin; no object or room is placed here.
15 int x = 0;
16 int y = 0;
17 int width = 0;
18 int height = 0;
19};
20
21// Pure artwork staging. Actual object cells supply physical sheet/tile IDs and
22// H/V orientation. A smaller crop preserves the other pattern cells, including
23// aliases. Conflicting demands for one physical glyph are refused rather than
24// silently changing another cell. Other objects' uses of shared source glyphs
25// remain part of the existing shared-source edit scope.
26//
27// The returned plan belongs to ApplyPixelIndexPlan and its normal Undo path.
28// Explicit replacement can add or erase index-zero pixels; palette colors,
29// object identity, geometry, behavior and ROM bytes are not changed here.
30absl::StatusOr<PixelIndexPlan> PlanCatalogObjectTransfer(
31 const GraphicsEditorState& state, const CatalogAssetPreview& asset,
32 const CatalogArtRect& crop);
33
34} // namespace yaze::editor
35
36#endif // YAZE_APP_EDITOR_GRAPHICS_CATALOG_OBJECT_TRANSFER_H_
Shared state between GraphicsEditor panel components.
Editors are the view controllers for the application.
absl::StatusOr< PixelIndexPlan > PlanCatalogObjectTransfer(const GraphicsEditorState &state, const CatalogAssetPreview &asset, const CatalogArtRect &crop)