yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::editor::GfxGroupEditor Class Reference

Manage graphics group configurations in a Rom. More...

#include <gfx_group_editor.h>

Collaboration diagram for yaze::editor::GfxGroupEditor:

Public Member Functions

absl::Status Update ()
 
void DrawBlocksetViewer (bool sheet_only=false)
 
void DrawRoomsetViewer ()
 
void DrawSpritesetViewer (bool sheet_only=false)
 
void DrawPaletteControls ()
 
void SetSelectedBlockset (uint8_t blockset)
 
void SetSelectedRoomset (uint8_t roomset)
 
void SetSelectedSpriteset (uint8_t spriteset)
 
void SetRom (Rom *rom)
 
Romrom () const
 
void SetGameData (zelda3::GameData *data)
 
zelda3::GameDatagame_data () const
 
void SetWorkspaceState (GfxGroupWorkspaceState *state)
 
void SetHostSurfaceHint (std::string hint)
 
const GfxGroupWorkspaceStateworkspace_state () const
 

Private Member Functions

void UpdateCurrentPalette ()
 
GfxGroupWorkspaceStateWs ()
 
const GfxGroupWorkspaceStateWs () const
 

Private Attributes

GfxGroupWorkspaceStateworkspace_ = nullptr
 
GfxGroupWorkspaceState fallback_ {}
 
std::array< gui::Canvas, 8 > blockset_canvases_
 
std::array< gui::Canvas, 4 > roomset_canvases_
 
std::array< gui::Canvas, 4 > spriteset_canvases_
 
Romrom_ = nullptr
 
zelda3::GameDatagame_data_ = nullptr
 
gfx::SnesPalettecurrent_palette_ = nullptr
 
std::string host_surface_hint_
 

Detailed Description

Manage graphics group configurations in a Rom.

Provides a UI for viewing and editing:

  • Blocksets (8 sheets per blockset)
  • Roomsets (4 sheets that override blockset slots 4-7)
  • Spritesets (4 sheets for enemy/NPC graphics)

Features palette preview controls for viewing sheets with different palettes.

When SetWorkspaceState is set (typically from EditorSet), selection and preview palette UI fields are shared with other GfxGroupEditor instances for the same ROM session. Canvases remain per-instance.

Definition at line 32 of file gfx_group_editor.h.

Member Function Documentation

◆ Update()

◆ DrawBlocksetViewer()

◆ DrawRoomsetViewer()

◆ DrawSpritesetViewer()

◆ DrawPaletteControls()

◆ SetSelectedBlockset()

void yaze::editor::GfxGroupEditor::SetSelectedBlockset ( uint8_t blockset)
inline

Definition at line 41 of file gfx_group_editor.h.

References yaze::editor::GfxGroupWorkspaceState::selected_blockset, and Ws().

Here is the call graph for this function:

◆ SetSelectedRoomset()

void yaze::editor::GfxGroupEditor::SetSelectedRoomset ( uint8_t roomset)
inline

Definition at line 44 of file gfx_group_editor.h.

References yaze::editor::GfxGroupWorkspaceState::selected_roomset, and Ws().

Here is the call graph for this function:

◆ SetSelectedSpriteset()

void yaze::editor::GfxGroupEditor::SetSelectedSpriteset ( uint8_t spriteset)
inline

Definition at line 45 of file gfx_group_editor.h.

References yaze::editor::GfxGroupWorkspaceState::selected_spriteset, and Ws().

Here is the call graph for this function:

◆ SetRom()

void yaze::editor::GfxGroupEditor::SetRom ( Rom * rom)
inline

Definition at line 48 of file gfx_group_editor.h.

References rom(), and rom_.

Referenced by yaze::editor::OverworldEditor::OverworldEditor().

Here is the call graph for this function:

◆ rom()

Rom * yaze::editor::GfxGroupEditor::rom ( ) const
inline

Definition at line 49 of file gfx_group_editor.h.

References rom_.

Referenced by SetRom(), and Update().

◆ SetGameData()

void yaze::editor::GfxGroupEditor::SetGameData ( zelda3::GameData * data)
inline

Definition at line 50 of file gfx_group_editor.h.

References game_data_.

Referenced by yaze::editor::OverworldEditor::SetGameData().

◆ game_data()

zelda3::GameData * yaze::editor::GfxGroupEditor::game_data ( ) const
inline

◆ SetWorkspaceState()

void yaze::editor::GfxGroupEditor::SetWorkspaceState ( GfxGroupWorkspaceState * state)
inline

Definition at line 53 of file gfx_group_editor.h.

References workspace_.

Referenced by yaze::editor::OverworldEditor::SetDependencies().

◆ SetHostSurfaceHint()

void yaze::editor::GfxGroupEditor::SetHostSurfaceHint ( std::string hint)
inline

Subdued line at top of the panel (per-surface messaging).

Definition at line 56 of file gfx_group_editor.h.

References host_surface_hint_.

Referenced by yaze::editor::OverworldEditor::Initialize().

◆ workspace_state()

const GfxGroupWorkspaceState & yaze::editor::GfxGroupEditor::workspace_state ( ) const
inline

Definition at line 60 of file gfx_group_editor.h.

References Ws().

Here is the call graph for this function:

◆ UpdateCurrentPalette()

void yaze::editor::GfxGroupEditor::UpdateCurrentPalette ( )
private

Definition at line 401 of file gfx_group_editor.cc.

References current_palette_, game_data(), yaze::zelda3::GameData::palette_groups, and Ws().

Referenced by DrawPaletteControls().

Here is the call graph for this function:

◆ Ws() [1/2]

◆ Ws() [2/2]

const GfxGroupWorkspaceState & yaze::editor::GfxGroupEditor::Ws ( ) const
inlineprivate

Definition at line 66 of file gfx_group_editor.h.

References fallback_, and workspace_.

Member Data Documentation

◆ workspace_

GfxGroupWorkspaceState* yaze::editor::GfxGroupEditor::workspace_ = nullptr
private

Definition at line 70 of file gfx_group_editor.h.

Referenced by SetWorkspaceState(), Ws(), and Ws().

◆ fallback_

GfxGroupWorkspaceState yaze::editor::GfxGroupEditor::fallback_ {}
private

Definition at line 71 of file gfx_group_editor.h.

Referenced by Ws(), and Ws().

◆ blockset_canvases_

std::array<gui::Canvas, 8> yaze::editor::GfxGroupEditor::blockset_canvases_
private

Definition at line 74 of file gfx_group_editor.h.

Referenced by DrawBlocksetViewer().

◆ roomset_canvases_

std::array<gui::Canvas, 4> yaze::editor::GfxGroupEditor::roomset_canvases_
private

Definition at line 75 of file gfx_group_editor.h.

Referenced by DrawRoomsetViewer().

◆ spriteset_canvases_

std::array<gui::Canvas, 4> yaze::editor::GfxGroupEditor::spriteset_canvases_
private

Definition at line 76 of file gfx_group_editor.h.

Referenced by DrawSpritesetViewer().

◆ rom_

Rom* yaze::editor::GfxGroupEditor::rom_ = nullptr
private

Definition at line 78 of file gfx_group_editor.h.

Referenced by rom(), and SetRom().

◆ game_data_

zelda3::GameData* yaze::editor::GfxGroupEditor::game_data_ = nullptr
private

Definition at line 79 of file gfx_group_editor.h.

Referenced by game_data(), and SetGameData().

◆ current_palette_

gfx::SnesPalette* yaze::editor::GfxGroupEditor::current_palette_ = nullptr
private

◆ host_surface_hint_

std::string yaze::editor::GfxGroupEditor::host_surface_hint_
private

Definition at line 81 of file gfx_group_editor.h.

Referenced by SetHostSurfaceHint(), and Update().


The documentation for this class was generated from the following files: