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
 

Private Member Functions

void UpdateCurrentPalette ()
 

Private Attributes

uint8_t selected_blockset_ = 0
 
uint8_t selected_roomset_ = 0
 
uint8_t selected_spriteset_ = 0
 
float view_scale_ = 2.0f
 
gfx::PaletteCategory selected_palette_category_
 
uint8_t selected_palette_index_ = 0
 
bool use_custom_palette_ = false
 
gfx::SnesPalettecurrent_palette_ = nullptr
 
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
 

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.

Definition at line 26 of file gfx_group_editor.h.

Member Function Documentation

◆ Update()

◆ DrawBlocksetViewer()

◆ DrawRoomsetViewer()

◆ DrawSpritesetViewer()

◆ DrawPaletteControls()

void yaze::editor::GfxGroupEditor::DrawPaletteControls ( )

◆ SetSelectedBlockset()

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

Definition at line 35 of file gfx_group_editor.h.

References selected_blockset_.

◆ SetSelectedRoomset()

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

Definition at line 36 of file gfx_group_editor.h.

References selected_roomset_.

◆ SetSelectedSpriteset()

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

Definition at line 37 of file gfx_group_editor.h.

References selected_spriteset_.

◆ SetRom()

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

Definition at line 40 of file gfx_group_editor.h.

References rom(), and rom_.

Referenced by yaze::editor::PaletteEditor::Load(), and yaze::editor::OverworldEditor::OverworldEditor().

Here is the call graph for this function:

◆ rom()

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

Definition at line 41 of file gfx_group_editor.h.

References rom_.

Referenced by SetRom(), and Update().

◆ SetGameData()

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

◆ game_data()

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

◆ UpdateCurrentPalette()

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

Definition at line 388 of file gfx_group_editor.cc.

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

Referenced by DrawPaletteControls().

Here is the call graph for this function:

Member Data Documentation

◆ selected_blockset_

uint8_t yaze::editor::GfxGroupEditor::selected_blockset_ = 0
private

Definition at line 49 of file gfx_group_editor.h.

Referenced by DrawBlocksetViewer(), SetSelectedBlockset(), and Update().

◆ selected_roomset_

uint8_t yaze::editor::GfxGroupEditor::selected_roomset_ = 0
private

Definition at line 50 of file gfx_group_editor.h.

Referenced by DrawRoomsetViewer(), SetSelectedRoomset(), and Update().

◆ selected_spriteset_

uint8_t yaze::editor::GfxGroupEditor::selected_spriteset_ = 0
private

Definition at line 51 of file gfx_group_editor.h.

Referenced by DrawSpritesetViewer(), SetSelectedSpriteset(), and Update().

◆ view_scale_

float yaze::editor::GfxGroupEditor::view_scale_ = 2.0f
private

◆ selected_palette_category_

gfx::PaletteCategory yaze::editor::GfxGroupEditor::selected_palette_category_
private
Initial value:

Definition at line 57 of file gfx_group_editor.h.

Referenced by DrawPaletteControls(), and UpdateCurrentPalette().

◆ selected_palette_index_

uint8_t yaze::editor::GfxGroupEditor::selected_palette_index_ = 0
private

Definition at line 59 of file gfx_group_editor.h.

Referenced by DrawPaletteControls(), and UpdateCurrentPalette().

◆ use_custom_palette_

bool yaze::editor::GfxGroupEditor::use_custom_palette_ = false
private

◆ current_palette_

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

◆ blockset_canvases_

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

Definition at line 64 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 65 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 66 of file gfx_group_editor.h.

Referenced by DrawSpritesetViewer().

◆ rom_

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

Definition at line 68 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 69 of file gfx_group_editor.h.

Referenced by game_data(), and SetGameData().


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