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"
5
#include "
app/editor/graphics/catalog_tile_transfer.h
"
6
#include "
app/editor/graphics/pixel_index_command.h
"
7
8
namespace
yaze::editor
{
9
10
class
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.
14
struct
CatalogArtRect
{
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.
30
absl::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_
catalog_tile_transfer.h
yaze::editor::GraphicsEditorState
Shared state between GraphicsEditor panel components.
Definition
graphics_editor_state.h:96
yaze::editor
Editors are the view controllers for the application.
Definition
patch_export_usage.cc:9
yaze::editor::PlanCatalogObjectTransfer
absl::StatusOr< PixelIndexPlan > PlanCatalogObjectTransfer(const GraphicsEditorState &state, const CatalogAssetPreview &asset, const CatalogArtRect &crop)
Definition
catalog_object_transfer.cc:45
pixel_index_command.h
yaze::editor::CatalogArtRect
Definition
catalog_object_transfer.h:14
yaze::editor::CatalogArtRect::y
int y
Definition
catalog_object_transfer.h:16
yaze::editor::CatalogArtRect::width
int width
Definition
catalog_object_transfer.h:17
yaze::editor::CatalogArtRect::x
int x
Definition
catalog_object_transfer.h:15
yaze::editor::CatalogArtRect::height
int height
Definition
catalog_object_transfer.h:18
yaze::editor::CatalogAssetPreview
Definition
catalog_tile_transfer.h:89
src
app
editor
graphics
catalog_object_transfer.h
Generated by
1.10.0