Manage graphics group configurations in a Rom. More...
#include <gfx_group_editor.h>

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) |
| Rom * | rom () const |
| void | SetGameData (zelda3::GameData *data) |
| zelda3::GameData * | game_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::SnesPalette * | current_palette_ = nullptr |
| std::array< gui::Canvas, 8 > | blockset_canvases_ |
| std::array< gui::Canvas, 4 > | roomset_canvases_ |
| std::array< gui::Canvas, 4 > | spriteset_canvases_ |
| Rom * | rom_ = nullptr |
| zelda3::GameData * | game_data_ = nullptr |
Manage graphics group configurations in a Rom.
Provides a UI for viewing and editing:
Features palette preview controls for viewing sheets with different palettes.
Definition at line 26 of file gfx_group_editor.h.
| absl::Status yaze::editor::GfxGroupEditor::Update | ( | ) |
Definition at line 84 of file gfx_group_editor.cc.
References DrawBlocksetViewer(), DrawPaletteControls(), DrawRoomsetViewer(), DrawSpritesetViewer(), yaze::gui::InputHexByte(), yaze::Rom::resource_label(), rom(), yaze::project::ResourceLabelManager::SelectableLabelWithNameEdit(), selected_blockset_, selected_roomset_, and selected_spriteset_.
Referenced by yaze::editor::OverworldEditor::DrawOverworldProperties(), and yaze::editor::OverworldEditor::UpdateGfxGroupEditor().
| void yaze::editor::GfxGroupEditor::DrawBlocksetViewer | ( | bool | sheet_only = false | ) |
Definition at line 126 of file gfx_group_editor.cc.
References blockset_canvases_, current_palette_, game_data(), yaze::gfx::Arena::Get(), yaze::gui::InputHexByte(), yaze::zelda3::GameData::main_blockset_ids, yaze::gfx::Arena::mutable_gfx_sheets(), yaze::gfx::Arena::NotifySheetModified(), selected_blockset_, use_custom_palette_, and view_scale_.
Referenced by Update().
| void yaze::editor::GfxGroupEditor::DrawRoomsetViewer | ( | ) |
Definition at line 182 of file gfx_group_editor.cc.
References current_palette_, game_data(), yaze::gfx::Arena::Get(), yaze::gui::InputHexByte(), yaze::gfx::Arena::mutable_gfx_sheets(), yaze::gfx::Arena::NotifySheetModified(), yaze::zelda3::GameData::room_blockset_ids, roomset_canvases_, selected_roomset_, use_custom_palette_, and view_scale_.
Referenced by Update().
| void yaze::editor::GfxGroupEditor::DrawSpritesetViewer | ( | bool | sheet_only = false | ) |
Definition at line 253 of file gfx_group_editor.cc.
References current_palette_, game_data(), yaze::gfx::Arena::Get(), yaze::gui::InputHexByte(), yaze::gfx::Arena::mutable_gfx_sheets(), yaze::gfx::Arena::NotifySheetModified(), selected_spriteset_, spriteset_canvases_, yaze::zelda3::GameData::spriteset_ids, use_custom_palette_, and view_scale_.
Referenced by Update().
| void yaze::editor::GfxGroupEditor::DrawPaletteControls | ( | ) |
Definition at line 333 of file gfx_group_editor.cc.
References current_palette_, yaze::gfx::SnesPalette::empty(), game_data(), ICON_MD_PALETTE, ICON_MD_ZOOM_IN, yaze::gui::InputHexByte(), selected_palette_category_, selected_palette_index_, UpdateCurrentPalette(), use_custom_palette_, and view_scale_.
Referenced by Update().

|
inline |
Definition at line 35 of file gfx_group_editor.h.
References selected_blockset_.
|
inline |
Definition at line 36 of file gfx_group_editor.h.
References selected_roomset_.
|
inline |
Definition at line 37 of file gfx_group_editor.h.
References selected_spriteset_.
|
inline |
Definition at line 40 of file gfx_group_editor.h.
Referenced by yaze::editor::PaletteEditor::Load(), and yaze::editor::OverworldEditor::OverworldEditor().

|
inline |
Definition at line 41 of file gfx_group_editor.h.
References rom_.
|
inline |
Definition at line 42 of file gfx_group_editor.h.
References game_data_.
Referenced by yaze::editor::PaletteEditor::Load(), yaze::editor::OverworldEditor::SetGameData(), and yaze::editor::PaletteEditor::SetGameData().
|
inline |
Definition at line 43 of file gfx_group_editor.h.
References game_data_.
Referenced by DrawBlocksetViewer(), DrawPaletteControls(), DrawRoomsetViewer(), DrawSpritesetViewer(), and 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().

|
private |
Definition at line 49 of file gfx_group_editor.h.
Referenced by DrawBlocksetViewer(), SetSelectedBlockset(), and Update().
|
private |
Definition at line 50 of file gfx_group_editor.h.
Referenced by DrawRoomsetViewer(), SetSelectedRoomset(), and Update().
|
private |
Definition at line 51 of file gfx_group_editor.h.
Referenced by DrawSpritesetViewer(), SetSelectedSpriteset(), and Update().
|
private |
Definition at line 54 of file gfx_group_editor.h.
Referenced by DrawBlocksetViewer(), DrawPaletteControls(), DrawRoomsetViewer(), and DrawSpritesetViewer().
|
private |
Definition at line 57 of file gfx_group_editor.h.
Referenced by DrawPaletteControls(), and UpdateCurrentPalette().
|
private |
Definition at line 59 of file gfx_group_editor.h.
Referenced by DrawPaletteControls(), and UpdateCurrentPalette().
|
private |
Definition at line 60 of file gfx_group_editor.h.
Referenced by DrawBlocksetViewer(), DrawPaletteControls(), DrawRoomsetViewer(), and DrawSpritesetViewer().
|
private |
Definition at line 61 of file gfx_group_editor.h.
Referenced by DrawBlocksetViewer(), DrawPaletteControls(), DrawRoomsetViewer(), DrawSpritesetViewer(), and UpdateCurrentPalette().
|
private |
Definition at line 64 of file gfx_group_editor.h.
Referenced by DrawBlocksetViewer().
|
private |
Definition at line 65 of file gfx_group_editor.h.
Referenced by DrawRoomsetViewer().
|
private |
Definition at line 66 of file gfx_group_editor.h.
Referenced by DrawSpritesetViewer().
|
private |
Definition at line 68 of file gfx_group_editor.h.
|
private |
Definition at line 69 of file gfx_group_editor.h.
Referenced by game_data(), and SetGameData().