yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
scratch_color_id_command.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_GRAPHICS_SCRATCH_COLOR_ID_COMMAND_H_
2#define YAZE_APP_EDITOR_GRAPHICS_SCRATCH_COLOR_ID_COMMAND_H_
3
4#include <cstdint>
5#include <vector>
6
7#include "absl/status/status.h"
8#include "absl/status/statusor.h"
11
12namespace yaze::editor {
13
14// Scratch assets are the writable 2/3/4bpp backing for detached and BIN-bound
15// pages; each asset is one range keyed by its library ID.
17 uint64_t asset_id = 0;
18 uint16_t tile_index = 0;
19 uint64_t pixel_mask = ~uint64_t{0};
20 bool hflip = false;
21 bool vflip = false;
22};
23
26 // edit range i addresses asset_ids[i].
27 std::vector<uint64_t> asset_ids;
28};
29
30std::vector<ScratchColorIdTarget> WholeScratchAssetSelection(uint64_t asset_id);
31
32absl::StatusOr<ScratchColorIdPlan> PlanScratchColorIdPermutation(
33 const GraphicsScratchLibrary& library,
34 const std::vector<ScratchColorIdTarget>& targets,
35 const ColorIdPermutation& permutation);
36
37// All affected assets change or none do. Assets must still hold the planned
38// prior pixels and depth.
40 const ScratchColorIdPlan& plan);
41
42} // namespace yaze::editor
43
44#endif // YAZE_APP_EDITOR_GRAPHICS_SCRATCH_COLOR_ID_COMMAND_H_
Editors are the view controllers for the application.
std::vector< ScratchColorIdTarget > WholeScratchAssetSelection(uint64_t asset_id)
absl::StatusOr< ScratchColorIdPlan > PlanScratchColorIdPermutation(const GraphicsScratchLibrary &library, const std::vector< ScratchColorIdTarget > &targets, const ColorIdPermutation &permutation)
absl::Status ApplyScratchColorIdPlan(GraphicsScratchLibrary &library, const ScratchColorIdPlan &plan)