yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
gfx_group_editor.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_GFX_GROUP_EDITOR_H
2#define YAZE_APP_EDITOR_GFX_GROUP_EDITOR_H
3
4#include <array>
5#include <string>
6
7#include "absl/status/status.h"
11#include "rom/rom.h"
12#include "zelda3/game_data.h"
13
14namespace yaze {
15namespace editor {
16
33 public:
34 absl::Status Update();
35
36 void DrawBlocksetViewer(bool sheet_only = false);
37 void DrawRoomsetViewer();
38 void DrawSpritesetViewer(bool sheet_only = false);
40
41 void SetSelectedBlockset(uint8_t blockset) {
42 Ws().selected_blockset = blockset;
43 }
44 void SetSelectedRoomset(uint8_t roomset) { Ws().selected_roomset = roomset; }
45 void SetSelectedSpriteset(uint8_t spriteset) {
46 Ws().selected_spriteset = spriteset;
47 }
48 void SetRom(Rom* rom) { rom_ = rom; }
49 Rom* rom() const { return rom_; }
50 void SetGameData(zelda3::GameData* data) { game_data_ = data; }
52
54
56 void SetHostSurfaceHint(std::string hint) {
57 host_surface_hint_ = std::move(hint);
58 }
59
60 const GfxGroupWorkspaceState& workspace_state() const { return Ws(); }
61
62 private:
64
66 const GfxGroupWorkspaceState& Ws() const {
68 }
69
72
73 // Individual canvases for each sheet slot to avoid ID conflicts
74 std::array<gui::Canvas, 8> blockset_canvases_;
75 std::array<gui::Canvas, 4> roomset_canvases_;
76 std::array<gui::Canvas, 4> spriteset_canvases_;
77
78 Rom* rom_ = nullptr;
81 std::string host_surface_hint_;
82};
83
84} // namespace editor
85} // namespace yaze
86#endif // YAZE_APP_EDITOR_GFX_GROUP_EDITOR_H
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Definition rom.h:28
Manage graphics group configurations in a Rom.
const GfxGroupWorkspaceState & Ws() const
void SetSelectedSpriteset(uint8_t spriteset)
void SetSelectedRoomset(uint8_t roomset)
std::array< gui::Canvas, 8 > blockset_canvases_
zelda3::GameData * game_data() const
GfxGroupWorkspaceState * workspace_
std::array< gui::Canvas, 4 > roomset_canvases_
GfxGroupWorkspaceState & Ws()
gfx::SnesPalette * current_palette_
void SetSelectedBlockset(uint8_t blockset)
GfxGroupWorkspaceState fallback_
void DrawSpritesetViewer(bool sheet_only=false)
void SetWorkspaceState(GfxGroupWorkspaceState *state)
std::array< gui::Canvas, 4 > spriteset_canvases_
void SetHostSurfaceHint(std::string hint)
const GfxGroupWorkspaceState & workspace_state() const
void DrawBlocksetViewer(bool sheet_only=false)
void SetGameData(zelda3::GameData *data)
Represents a palette of colors for the Super Nintendo Entertainment System (SNES).
Per-ROM-session UI state shared by all GfxGroupEditor surfaces.