yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
graphics_palette_preview.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_GRAPHICS_GRAPHICS_PALETTE_PREVIEW_H_
2#define YAZE_APP_EDITOR_GRAPHICS_GRAPHICS_PALETTE_PREVIEW_H_
3
4#include <optional>
5
6#include "absl/status/status.h"
7#include "absl/status/statusor.h"
9
10namespace yaze::editor {
11
13 gfx::SnesPalette colors; // Eight displayed indices, including transparency.
15 int row_count = 0;
16};
17
18absl::StatusOr<GraphicsPalettePreview> ResolveGraphicsPreviewPalette(
19 zelda3::GameData& data, const GraphicsPaletteSelection& selection);
20
21// Updates only the owning session's display copy. Null restores loaded colors.
22// Invalid selections leave both the previous choice and display unchanged.
23absl::Status SetGraphicsPreviewPalette(
24 GraphicsEditorState& state, uint16_t sheet,
25 std::optional<GraphicsPaletteSelection> selection);
26
27// Restores choices after the session's Arena sheets are reloaded and reflects
28// source palette edits without changing authored pixels or their history.
30
31} // namespace yaze::editor
32#endif
Shared state between GraphicsEditor panel components.
Represents a palette of colors for the Super Nintendo Entertainment System (SNES).
Editors are the view controllers for the application.
absl::Status SetGraphicsPreviewPalette(GraphicsEditorState &state, uint16_t sheet, std::optional< GraphicsPaletteSelection > selection)
absl::StatusOr< GraphicsPalettePreview > ResolveGraphicsPreviewPalette(zelda3::GameData &data, const GraphicsPaletteSelection &selection)
void RefreshGraphicsPreviewPalettes(GraphicsEditorState &state)