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

Allows the user to edit sprites. More...

#include <sprite_editor.h>

Inheritance diagram for yaze::editor::SpriteEditor:

Classes

struct  OAMConfig
 

Public Member Functions

 SpriteEditor (Rom *rom=nullptr)
 
void Initialize () override
 
absl::Status Load () override
 
absl::Status Update () override
 
absl::Status Undo () override
 
absl::Status Redo () override
 
absl::Status Cut () override
 
absl::Status Copy () override
 
absl::Status Paste () override
 
absl::Status Find () override
 
absl::Status Save () override
 
void SetDependencies (const EditorDependencies &deps) override
 
absl::Status ReloadSpriteCatalog ()
 
absl::Status OpenCatalogSource (const zelda3::SpriteSourceBinding &binding)
 
const std::optional< zelda3::SpriteCatalog > & sprite_catalog () const
 
const std::optional< zelda3::SpriteSourceDocument > & catalog_source () const
 
absl::Status ImportCatalogDraw (const zelda3::SpriteSourceBinding &binding, const std::string &catalog_key="")
 
absl::Status OpenSpriteAsset (const std::string &path)
 
absl::Status SaveSpriteAsset (const std::string &path)
 
absl::Status ReloadProjectSpriteAssets ()
 
absl::Status CheckCurrentSpriteSource ()
 
absl::StatusOr< std::string > ExportCurrentSpriteDraw ()
 
absl::Status SetSpriteBehavior (const project::SpriteBehavior &behavior)
 
absl::Status BindOracleBehaviorProfile ()
 
absl::StatusOr< std::string > ExportCurrentSpriteBehavior (const std::string &prefix)
 
absl::Status SetSpriteGraphics (const std::array< uint8_t, 8 > &sheets, const std::array< project::SpritePaletteBinding, 8 > &rows)
 
const project::SpriteAssetBinding * current_sprite_binding () const
 
const zsprite::ZSprite * current_custom_sprite () const
 
void set_rom (Rom *rom)
 
Rom * rom () const
 
- Public Member Functions inherited from yaze::editor::Editor
 Editor ()=default
 
virtual ~Editor ()=default
 
virtual void SetGameData (zelda3::GameData *game_data)
 
virtual absl::Status BeginSaveTransaction ()
 
virtual void RollbackSaveTransaction ()
 
virtual void CommitSaveTransaction ()
 
virtual void PrepareForSessionTeardown ()
 
virtual std::string GetUndoDescription () const
 
virtual std::string GetRedoDescription () const
 
const UndoManager & undo_manager () const
 
virtual absl::Status Clear ()
 
virtual bool CanUndo () const
 
virtual bool CanRedo () const
 
virtual bool CanCut () const
 
virtual bool CanCopy () const
 
virtual bool CanPaste () const
 
virtual bool CanFind () const
 
virtual void ContributeStatus (StatusBar *)
 
virtual EditorContextSnapshot BuildContextSnapshot () const
 
EditorType type () const
 
bool * active ()
 
void set_active (bool active)
 
void toggle_active ()
 
virtual bool IsRomLoaded () const
 
virtual std::string GetRomStatus () const
 
Rom * rom () const
 
zelda3::GameData * game_data () const
 
project::YazeProject * project () const
 
core::VersionManager * version_manager () const
 
EditorContext context () const
 
bool HasContext () const
 

Private Member Functions

void DrawSpriteAssetBindings ()
 
void DrawSpriteBehaviorPanel ()
 
void ApplyCurrentSpriteBinding ()
 
void DrawSpriteCatalog ()
 
void RefreshCatalogIfChanged ()
 
void HandleEditorShortcuts ()
 
void SelectVanillaSprite (int sprite_id)
 
const zelda3::SpriteOamLayout * CurrentPreviewLayout () const
 
void DrawVanillaSpriteEditor ()
 
void DrawSpritesList ()
 
void DrawSpriteCanvas ()
 
void DrawCurrentSheets ()
 
void DrawToolset ()
 
void DrawCustomSprites ()
 
void DrawCustomSpritesMetadata ()
 
void CreateNewZSprite ()
 
void LoadZsmFile (const std::string &path)
 
void SaveZsmFile (const std::string &path)
 
void SaveZsmFileAs ()
 
void EnsureCustomSpritePaths ()
 
const std::string & GetCurrentZsmPath () const
 
void SetCurrentZsmPath (const std::string &path)
 
void DrawSpritePropertiesPanel ()
 
void DrawBooleanProperties ()
 
void DrawStatProperties ()
 
void DrawAnimationPanel ()
 
void DrawAnimationList ()
 
void DrawFrameEditor ()
 
void UpdateAnimationPlayback (float delta_time)
 
void DrawUserRoutinesPanel ()
 
void RenderZSpriteFrame (int frame_index)
 
void DrawZSpriteOnCanvas ()
 
void RefreshSpritePreviewGraphics (bool use_asset_binding)
 
void LoadSpriteGraphicsBuffer ()
 
void LoadSpritePalettes (bool use_asset_binding=true)
 
void RenderVanillaSprite (const zelda3::SpriteOamLayout &layout)
 
SpriteSnapshot CaptureCurrentSpriteSnapshot () const
 
void RestoreFromSnapshot (const SpriteSnapshot &snapshot)
 
void BeginUndoTransaction ()
 
void CommitUndoTransaction ()
 
void MarkSpriteMutated ()
 
void DrawSpritesetPicker ()
 
void ApplySpritesetToSheets (int spriteset)
 
void DrawFrameTileWarnings ()
 
absl::Status OpenSelectedOamGraphics ()
 

Private Attributes

std::optional< zsprite::Frame > frame_clipboard_
 
absl::Status draw_export_status_
 
int selected_behavior_action_ = 0
 
char behavior_prefix_ [65] = "Sprite_CustomBehavior"
 
std::string behavior_candidate_
 
absl::Status behavior_status_
 
std::vector< project::SpriteAssetBinding > custom_sprite_bindings_
 
absl::Status asset_load_status_
 
absl::Status palette_binding_status_
 
absl::Status graphics_binding_status_
 
absl::Status source_check_status_
 
bool source_checked_ = false
 
std::optional< zelda3::SpriteCatalog > sprite_catalog_
 
std::optional< zelda3::SpriteSourceDocument > catalog_source_
 
absl::Status catalog_status_
 
absl::Status catalog_source_status_
 
const project::YazeProject * catalog_project_ = nullptr
 
size_t catalog_session_id_ = 0
 
std::string catalog_path_
 
std::string catalog_source_root_
 
int catalog_family_index_ = 0
 
int catalog_raw_subtype_ = 0
 
ImGuiTextFilter catalog_filter_
 
bool catalog_scroll_to_label_ = false
 
ImVector< int > active_sprites_
 
int current_sprite_id_ = 0
 
int pending_sprite_tab_ = -1
 
uint8_t current_sheets_ [8] = {0x73, 0x74, 0x79, 0x7A, 0x73, 0x73, 0x73, 0x73}
 
bool sheets_loaded_ = false
 
OAMConfig oam_config_
 
gfx::Bitmap oam_bitmap_
 
gfx::Bitmap vanilla_preview_bitmap_
 
bool vanilla_preview_needs_update_ = true
 
std::vector< zsprite::ZSprite > custom_sprites_
 
std::vector< std::string > custom_sprite_paths_
 
int current_custom_sprite_index_ = -1
 
bool zsm_dirty_ = false
 
bool animation_playing_ = false
 
int current_frame_ = 0
 
int current_animation_index_ = 0
 
float frame_timer_ = 0.0f
 
float last_frame_time_ = 0.0f
 
int selected_routine_index_ = -1
 
int selected_tile_index_ = -1
 
bool show_tile_grid_ = true
 
gfx::Bitmap sprite_preview_bitmap_
 
bool preview_needs_update_ = true
 
SpriteDrawer sprite_drawer_
 
std::vector< uint8_t > sprite_gfx_buffer_
 
gfx::PaletteGroup sprite_palettes_
 
bool gfx_buffer_loaded_ = false
 
const zelda3::GameData * preview_graphics_owner_ = nullptr
 
std::array< uint8_t, 8 > loaded_preview_sheets_ {}
 
std::array< uint64_t, 8 > loaded_preview_revisions_ {}
 
uint64_t preview_palette_revision_ = 0
 
absl::Status graphics_context_status_
 
int preview_spriteset_ = 0
 
uint16_t preview_room_ = 0
 
bool preview_use_room_palette_ = false
 
std::optional< gfx::PaletteGroup > room_palette_cache_
 
int room_palette_cache_room_ = -1
 
std::optional< std::map< int, zelda3::OverworldAreaGfxInfo > > usage_areas_
 
std::optional< std::map< int, zelda3::RoomGfxInfo > > usage_rooms_
 
const Rom * usage_rom_ = nullptr
 
std::string tile_check_key_
 
std::vector< zelda3::SpriteTileIssue > tile_issues_
 
size_t tile_check_count_ = 0
 
gui::Canvas sprite_canvas_
 
gui::Canvas graphics_sheet_canvas_
 
bool undo_snapshot_pending_ = false
 
bool sprite_mutated_this_frame_ = false
 
SpriteSnapshot undo_before_snapshot_
 
absl::Status status_
 
Rom * rom_
 

Friends

class AuthoringSaveWorkflowTestPeer
 
struct SpriteEditorPreviewTestPeer
 

Additional Inherited Members

- Protected Member Functions inherited from yaze::editor::Editor
std::string MakePanelTitle (const std::string &base_title) const
 
std::string MakeWindowId (const std::string &base_id) const
 
template<typename T >
absl::StatusOr< T > SafeRomAccess (std::function< T()> accessor, const std::string &operation="") const
 
- Protected Attributes inherited from yaze::editor::Editor
bool active_ = false
 
EditorType type_
 
EditorDependencies dependencies_
 
UndoManager undo_manager_
 

Detailed Description

Allows the user to edit sprites.

This class provides functionality for updating the sprite editor, drawing the editor table, drawing the sprite canvas, and drawing the current sheets. Supports both vanilla ROM sprites and custom ZSM format sprites.

Definition at line 49 of file sprite_editor.h.

Constructor & Destructor Documentation

◆ SpriteEditor()

yaze::editor::SpriteEditor::SpriteEditor ( Rom * rom = nullptr)
inlineexplicit

Definition at line 54 of file sprite_editor.h.

References yaze::editor::kSprite, and yaze::editor::Editor::type_.

Member Function Documentation

◆ Initialize()

void yaze::editor::SpriteEditor::Initialize ( )
overridevirtual

◆ Load()

◆ Update()

absl::Status yaze::editor::SpriteEditor::Update ( )
overridevirtual

Implements yaze::editor::Editor.

Definition at line 115 of file sprite_editor.cc.

References CommitUndoTransaction(), HandleEditorShortcuts(), last_frame_time_, rom(), sheets_loaded_, status_, and UpdateAnimationPlayback().

Here is the call graph for this function:

◆ Undo()

absl::Status yaze::editor::SpriteEditor::Undo ( )
inlineoverridevirtual

Implements yaze::editor::Editor.

Definition at line 61 of file sprite_editor.h.

References yaze::editor::UndoManager::Undo(), and yaze::editor::Editor::undo_manager_.

Here is the call graph for this function:

◆ Redo()

absl::Status yaze::editor::SpriteEditor::Redo ( )
inlineoverridevirtual

Implements yaze::editor::Editor.

Definition at line 62 of file sprite_editor.h.

References yaze::editor::UndoManager::Redo(), and yaze::editor::Editor::undo_manager_.

Here is the call graph for this function:

◆ Cut()

◆ Copy()

absl::Status yaze::editor::SpriteEditor::Copy ( )
overridevirtual

Implements yaze::editor::Editor.

Definition at line 779 of file sprite_editor.cc.

References current_custom_sprite_index_, current_frame_, custom_sprites_, and frame_clipboard_.

Referenced by Cut().

◆ Paste()

absl::Status yaze::editor::SpriteEditor::Paste ( )
overridevirtual

◆ Find()

absl::Status yaze::editor::SpriteEditor::Find ( )
inlineoverridevirtual

Implements yaze::editor::Editor.

Definition at line 66 of file sprite_editor.h.

◆ Save()

absl::Status yaze::editor::SpriteEditor::Save ( )
overridevirtual

Implements yaze::editor::Editor.

Definition at line 169 of file sprite_editor.cc.

References current_custom_sprite_index_, custom_sprites_, GetCurrentZsmPath(), SaveZsmFile(), SaveZsmFileAs(), and status_.

Here is the call graph for this function:

◆ SetDependencies()

void yaze::editor::SpriteEditor::SetDependencies ( const EditorDependencies & deps)
overridevirtual

Reimplemented from yaze::editor::Editor.

Definition at line 53 of file sprite_editor_catalog.cc.

References RefreshCatalogIfChanged(), and yaze::editor::Editor::SetDependencies().

Here is the call graph for this function:

◆ ReloadSpriteCatalog()

◆ OpenCatalogSource()

absl::Status yaze::editor::SpriteEditor::OpenCatalogSource ( const zelda3::SpriteSourceBinding & binding)

Definition at line 106 of file sprite_editor_catalog.cc.

References catalog_scroll_to_label_, catalog_source_, catalog_source_root_, catalog_source_status_, and yaze::zelda3::ReadSpriteSource().

Referenced by DrawSpriteCatalog(), and ImportCatalogDraw().

Here is the call graph for this function:

◆ sprite_catalog()

const std::optional< zelda3::SpriteCatalog > & yaze::editor::SpriteEditor::sprite_catalog ( ) const
inline

Definition at line 73 of file sprite_editor.h.

References sprite_catalog_.

◆ catalog_source()

const std::optional< zelda3::SpriteSourceDocument > & yaze::editor::SpriteEditor::catalog_source ( ) const
inline

Definition at line 76 of file sprite_editor.h.

References catalog_source_.

◆ ImportCatalogDraw()

◆ OpenSpriteAsset()

absl::Status yaze::editor::SpriteEditor::OpenSpriteAsset ( const std::string & path)

◆ SaveSpriteAsset()

absl::Status yaze::editor::SpriteEditor::SaveSpriteAsset ( const std::string & path)

Definition at line 80 of file sprite_editor_assets.cc.

References current_custom_sprite(), SaveZsmFile(), and status_.

Here is the call graph for this function:

◆ ReloadProjectSpriteAssets()

absl::Status yaze::editor::SpriteEditor::ReloadProjectSpriteAssets ( )

Definition at line 89 of file sprite_editor_assets.cc.

References OpenSpriteAsset(), yaze::editor::Editor::project(), yaze::project::YazeProject::sprite_assets, and status_.

Referenced by Load().

Here is the call graph for this function:

◆ CheckCurrentSpriteSource()

◆ ExportCurrentSpriteDraw()

absl::StatusOr< std::string > yaze::editor::SpriteEditor::ExportCurrentSpriteDraw ( )

◆ SetSpriteBehavior()

◆ BindOracleBehaviorProfile()

◆ ExportCurrentSpriteBehavior()

◆ SetSpriteGraphics()

absl::Status yaze::editor::SpriteEditor::SetSpriteGraphics ( const std::array< uint8_t, 8 > & sheets,
const std::array< project::SpritePaletteBinding, 8 > & rows )

◆ current_sprite_binding()

◆ current_custom_sprite()

◆ set_rom()

void yaze::editor::SpriteEditor::set_rom ( Rom * rom)
inline

Definition at line 104 of file sprite_editor.h.

References rom(), and rom_.

Here is the call graph for this function:

◆ rom()

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

Definition at line 105 of file sprite_editor.h.

References rom_.

Referenced by DrawSpritesList(), set_rom(), and Update().

◆ DrawSpriteAssetBindings()

void yaze::editor::SpriteEditor::DrawSpriteAssetBindings ( )
private

◆ DrawSpriteBehaviorPanel()

◆ ApplyCurrentSpriteBinding()

void yaze::editor::SpriteEditor::ApplyCurrentSpriteBinding ( )
private

◆ DrawSpriteCatalog()

◆ RefreshCatalogIfChanged()

void yaze::editor::SpriteEditor::RefreshCatalogIfChanged ( )
private

◆ HandleEditorShortcuts()

void yaze::editor::SpriteEditor::HandleEditorShortcuts ( )
private

Definition at line 138 of file sprite_editor.cc.

References animation_playing_, current_frame_, current_sprite_id_, preview_needs_update_, and SelectVanillaSprite().

Referenced by Update().

Here is the call graph for this function:

◆ SelectVanillaSprite()

void yaze::editor::SpriteEditor::SelectVanillaSprite ( int sprite_id)
private

◆ CurrentPreviewLayout()

const zelda3::SpriteOamLayout * yaze::editor::SpriteEditor::CurrentPreviewLayout ( ) const
private

◆ DrawVanillaSpriteEditor()

◆ DrawSpritesList()

◆ DrawSpriteCanvas()

◆ DrawCurrentSheets()

◆ DrawToolset()

void yaze::editor::SpriteEditor::DrawToolset ( )
private

Definition at line 182 of file sprite_editor.cc.

◆ DrawCustomSprites()

void yaze::editor::SpriteEditor::DrawCustomSprites ( )
private

Definition at line 657 of file sprite_editor.cc.

References DrawCurrentSheets(), DrawCustomSpritesMetadata(), and DrawZSpriteOnCanvas().

Referenced by Initialize().

Here is the call graph for this function:

◆ DrawCustomSpritesMetadata()

◆ CreateNewZSprite()

◆ LoadZsmFile()

◆ SaveZsmFile()

void yaze::editor::SpriteEditor::SaveZsmFile ( const std::string & path)
private

◆ SaveZsmFileAs()

void yaze::editor::SpriteEditor::SaveZsmFileAs ( )
private

Definition at line 910 of file sprite_editor.cc.

References current_custom_sprite_index_, SaveZsmFile(), and yaze::util::FileDialogWrapper::ShowSaveFileDialog().

Referenced by DrawCustomSpritesMetadata(), and Save().

Here is the call graph for this function:

◆ EnsureCustomSpritePaths()

void yaze::editor::SpriteEditor::EnsureCustomSpritePaths ( )
private

Definition at line 1858 of file sprite_editor.cc.

References custom_sprite_paths_, and custom_sprites_.

Referenced by SetCurrentZsmPath().

◆ GetCurrentZsmPath()

const std::string & yaze::editor::SpriteEditor::GetCurrentZsmPath ( ) const
private

Definition at line 1864 of file sprite_editor.cc.

References current_custom_sprite_index_, and custom_sprite_paths_.

Referenced by DrawCustomSpritesMetadata(), and Save().

◆ SetCurrentZsmPath()

void yaze::editor::SpriteEditor::SetCurrentZsmPath ( const std::string & path)
private

Definition at line 1874 of file sprite_editor.cc.

References current_custom_sprite_index_, custom_sprite_paths_, and EnsureCustomSpritePaths().

Referenced by SaveZsmFile().

Here is the call graph for this function:

◆ DrawSpritePropertiesPanel()

void yaze::editor::SpriteEditor::DrawSpritePropertiesPanel ( )
private

Definition at line 924 of file sprite_editor.cc.

References current_custom_sprite_index_, custom_sprites_, DrawBooleanProperties(), DrawStatProperties(), and MarkSpriteMutated().

Referenced by DrawCustomSpritesMetadata().

Here is the call graph for this function:

◆ DrawBooleanProperties()

void yaze::editor::SpriteEditor::DrawBooleanProperties ( )
private

Definition at line 996 of file sprite_editor.cc.

References current_custom_sprite_index_, custom_sprites_, and MarkSpriteMutated().

Referenced by DrawSpritePropertiesPanel().

Here is the call graph for this function:

◆ DrawStatProperties()

void yaze::editor::SpriteEditor::DrawStatProperties ( )
private

Definition at line 953 of file sprite_editor.cc.

References current_custom_sprite_index_, custom_sprites_, and MarkSpriteMutated().

Referenced by DrawSpritePropertiesPanel().

Here is the call graph for this function:

◆ DrawAnimationPanel()

◆ DrawAnimationList()

void yaze::editor::SpriteEditor::DrawAnimationList ( )
private

◆ DrawFrameEditor()

◆ UpdateAnimationPlayback()

void yaze::editor::SpriteEditor::UpdateAnimationPlayback ( float delta_time)
private

◆ DrawUserRoutinesPanel()

void yaze::editor::SpriteEditor::DrawUserRoutinesPanel ( )
private

Definition at line 1389 of file sprite_editor.cc.

References current_custom_sprite_index_, custom_sprites_, HOVER_HINT, ICON_MD_ADD, MarkSpriteMutated(), and selected_routine_index_.

Referenced by DrawCustomSpritesMetadata().

Here is the call graph for this function:

◆ RenderZSpriteFrame()

◆ DrawZSpriteOnCanvas()

◆ RefreshSpritePreviewGraphics()

◆ LoadSpriteGraphicsBuffer()

◆ LoadSpritePalettes()

◆ RenderVanillaSprite()

◆ CaptureCurrentSpriteSnapshot()

◆ RestoreFromSnapshot()

◆ BeginUndoTransaction()

void yaze::editor::SpriteEditor::BeginUndoTransaction ( )
private

◆ CommitUndoTransaction()

◆ MarkSpriteMutated()

◆ DrawSpritesetPicker()

◆ ApplySpritesetToSheets()

◆ DrawFrameTileWarnings()

◆ OpenSelectedOamGraphics()

Friends And Related Symbol Documentation

◆ AuthoringSaveWorkflowTestPeer

friend class AuthoringSaveWorkflowTestPeer
friend

Definition at line 50 of file sprite_editor.h.

◆ SpriteEditorPreviewTestPeer

friend struct SpriteEditorPreviewTestPeer
friend

Definition at line 51 of file sprite_editor.h.

Member Data Documentation

◆ frame_clipboard_

std::optional<zsprite::Frame> yaze::editor::SpriteEditor::frame_clipboard_
private

Definition at line 108 of file sprite_editor.h.

Referenced by Copy(), and Paste().

◆ draw_export_status_

absl::Status yaze::editor::SpriteEditor::draw_export_status_
private

Definition at line 109 of file sprite_editor.h.

Referenced by DrawAnimationPanel().

◆ selected_behavior_action_

int yaze::editor::SpriteEditor::selected_behavior_action_ = 0
private

Definition at line 112 of file sprite_editor.h.

Referenced by DrawSpriteBehaviorPanel().

◆ behavior_prefix_

char yaze::editor::SpriteEditor::behavior_prefix_[65] = "Sprite_CustomBehavior"
private

Definition at line 113 of file sprite_editor.h.

Referenced by DrawSpriteBehaviorPanel().

◆ behavior_candidate_

std::string yaze::editor::SpriteEditor::behavior_candidate_
private

◆ behavior_status_

absl::Status yaze::editor::SpriteEditor::behavior_status_
private

Definition at line 115 of file sprite_editor.h.

Referenced by ApplyCurrentSpriteBinding(), and DrawSpriteBehaviorPanel().

◆ custom_sprite_bindings_

◆ asset_load_status_

absl::Status yaze::editor::SpriteEditor::asset_load_status_
private

Definition at line 118 of file sprite_editor.h.

Referenced by DrawCustomSpritesMetadata(), and Load().

◆ palette_binding_status_

absl::Status yaze::editor::SpriteEditor::palette_binding_status_
private

◆ graphics_binding_status_

absl::Status yaze::editor::SpriteEditor::graphics_binding_status_
private

◆ source_check_status_

absl::Status yaze::editor::SpriteEditor::source_check_status_
private

◆ source_checked_

bool yaze::editor::SpriteEditor::source_checked_ = false
private

◆ sprite_catalog_

std::optional<zelda3::SpriteCatalog> yaze::editor::SpriteEditor::sprite_catalog_
private

Definition at line 125 of file sprite_editor.h.

Referenced by DrawSpriteCatalog(), ReloadSpriteCatalog(), and sprite_catalog().

◆ catalog_source_

std::optional<zelda3::SpriteSourceDocument> yaze::editor::SpriteEditor::catalog_source_
private

◆ catalog_status_

absl::Status yaze::editor::SpriteEditor::catalog_status_
private

Definition at line 127 of file sprite_editor.h.

Referenced by DrawSpriteCatalog(), and ReloadSpriteCatalog().

◆ catalog_source_status_

absl::Status yaze::editor::SpriteEditor::catalog_source_status_
private

Definition at line 128 of file sprite_editor.h.

Referenced by DrawSpriteCatalog(), OpenCatalogSource(), and ReloadSpriteCatalog().

◆ catalog_project_

const project::YazeProject* yaze::editor::SpriteEditor::catalog_project_ = nullptr
private

Definition at line 129 of file sprite_editor.h.

Referenced by RefreshCatalogIfChanged(), and ReloadSpriteCatalog().

◆ catalog_session_id_

size_t yaze::editor::SpriteEditor::catalog_session_id_ = 0
private

Definition at line 130 of file sprite_editor.h.

Referenced by RefreshCatalogIfChanged(), and ReloadSpriteCatalog().

◆ catalog_path_

std::string yaze::editor::SpriteEditor::catalog_path_
private

◆ catalog_source_root_

std::string yaze::editor::SpriteEditor::catalog_source_root_
private

◆ catalog_family_index_

int yaze::editor::SpriteEditor::catalog_family_index_ = 0
private

Definition at line 133 of file sprite_editor.h.

Referenced by DrawSpriteCatalog(), and ReloadSpriteCatalog().

◆ catalog_raw_subtype_

int yaze::editor::SpriteEditor::catalog_raw_subtype_ = 0
private

Definition at line 134 of file sprite_editor.h.

Referenced by DrawSpriteCatalog(), and ReloadSpriteCatalog().

◆ catalog_filter_

ImGuiTextFilter yaze::editor::SpriteEditor::catalog_filter_
private

Definition at line 135 of file sprite_editor.h.

Referenced by DrawSpriteCatalog(), and ReloadSpriteCatalog().

◆ catalog_scroll_to_label_

bool yaze::editor::SpriteEditor::catalog_scroll_to_label_ = false
private

Definition at line 136 of file sprite_editor.h.

Referenced by DrawSpriteCatalog(), OpenCatalogSource(), and ReloadSpriteCatalog().

◆ active_sprites_

ImVector<int> yaze::editor::SpriteEditor::active_sprites_
private

Definition at line 205 of file sprite_editor.h.

Referenced by DrawVanillaSpriteEditor(), and SelectVanillaSprite().

◆ current_sprite_id_

int yaze::editor::SpriteEditor::current_sprite_id_ = 0
private

◆ pending_sprite_tab_

int yaze::editor::SpriteEditor::pending_sprite_tab_ = -1
private

Definition at line 207 of file sprite_editor.h.

Referenced by DrawVanillaSpriteEditor(), and SelectVanillaSprite().

◆ current_sheets_

uint8_t yaze::editor::SpriteEditor::current_sheets_[8] = {0x73, 0x74, 0x79, 0x7A, 0x73, 0x73, 0x73, 0x73}
private

◆ sheets_loaded_

bool yaze::editor::SpriteEditor::sheets_loaded_ = false
private

Definition at line 209 of file sprite_editor.h.

Referenced by DrawVanillaSpriteEditor(), Load(), and Update().

◆ oam_config_

OAMConfig yaze::editor::SpriteEditor::oam_config_
private

Definition at line 221 of file sprite_editor.h.

◆ oam_bitmap_

gfx::Bitmap yaze::editor::SpriteEditor::oam_bitmap_
private

Definition at line 222 of file sprite_editor.h.

◆ vanilla_preview_bitmap_

gfx::Bitmap yaze::editor::SpriteEditor::vanilla_preview_bitmap_
private

Definition at line 223 of file sprite_editor.h.

Referenced by DrawSpriteCanvas(), and RenderVanillaSprite().

◆ vanilla_preview_needs_update_

bool yaze::editor::SpriteEditor::vanilla_preview_needs_update_ = true
private

◆ custom_sprites_

◆ custom_sprite_paths_

std::vector<std::string> yaze::editor::SpriteEditor::custom_sprite_paths_
private

◆ current_custom_sprite_index_

◆ zsm_dirty_

bool yaze::editor::SpriteEditor::zsm_dirty_ = false
private

◆ animation_playing_

bool yaze::editor::SpriteEditor::animation_playing_ = false
private

◆ current_frame_

◆ current_animation_index_

◆ frame_timer_

float yaze::editor::SpriteEditor::frame_timer_ = 0.0f
private

◆ last_frame_time_

float yaze::editor::SpriteEditor::last_frame_time_ = 0.0f
private

Definition at line 239 of file sprite_editor.h.

Referenced by Update().

◆ selected_routine_index_

int yaze::editor::SpriteEditor::selected_routine_index_ = -1
private

◆ selected_tile_index_

int yaze::editor::SpriteEditor::selected_tile_index_ = -1
private

◆ show_tile_grid_

bool yaze::editor::SpriteEditor::show_tile_grid_ = true
private

Definition at line 244 of file sprite_editor.h.

Referenced by RenderZSpriteFrame().

◆ sprite_preview_bitmap_

gfx::Bitmap yaze::editor::SpriteEditor::sprite_preview_bitmap_
private

Definition at line 247 of file sprite_editor.h.

Referenced by RenderZSpriteFrame().

◆ preview_needs_update_

◆ sprite_drawer_

SpriteDrawer yaze::editor::SpriteEditor::sprite_drawer_
private

◆ sprite_gfx_buffer_

std::vector<uint8_t> yaze::editor::SpriteEditor::sprite_gfx_buffer_
private

◆ sprite_palettes_

gfx::PaletteGroup yaze::editor::SpriteEditor::sprite_palettes_
private

◆ gfx_buffer_loaded_

bool yaze::editor::SpriteEditor::gfx_buffer_loaded_ = false
private

◆ preview_graphics_owner_

const zelda3::GameData* yaze::editor::SpriteEditor::preview_graphics_owner_ = nullptr
private

Definition at line 257 of file sprite_editor.h.

Referenced by RefreshSpritePreviewGraphics().

◆ loaded_preview_sheets_

std::array<uint8_t, 8> yaze::editor::SpriteEditor::loaded_preview_sheets_ {}
private

Definition at line 258 of file sprite_editor.h.

Referenced by RefreshSpritePreviewGraphics().

◆ loaded_preview_revisions_

std::array<uint64_t, 8> yaze::editor::SpriteEditor::loaded_preview_revisions_ {}
private

Definition at line 259 of file sprite_editor.h.

Referenced by RefreshSpritePreviewGraphics().

◆ preview_palette_revision_

uint64_t yaze::editor::SpriteEditor::preview_palette_revision_ = 0
private

Definition at line 260 of file sprite_editor.h.

Referenced by RefreshSpritePreviewGraphics().

◆ graphics_context_status_

absl::Status yaze::editor::SpriteEditor::graphics_context_status_
private

Definition at line 271 of file sprite_editor.h.

Referenced by DrawFrameEditor().

◆ preview_spriteset_

int yaze::editor::SpriteEditor::preview_spriteset_ = 0
private

Definition at line 272 of file sprite_editor.h.

Referenced by DrawSpritesetPicker(), Load(), and OpenSelectedOamGraphics().

◆ preview_room_

uint16_t yaze::editor::SpriteEditor::preview_room_ = 0
private

◆ preview_use_room_palette_

bool yaze::editor::SpriteEditor::preview_use_room_palette_ = false
private

◆ room_palette_cache_

std::optional<gfx::PaletteGroup> yaze::editor::SpriteEditor::room_palette_cache_
private

◆ room_palette_cache_room_

int yaze::editor::SpriteEditor::room_palette_cache_room_ = -1
private

Definition at line 276 of file sprite_editor.h.

Referenced by LoadSpritePalettes().

◆ usage_areas_

std::optional<std::map<int, zelda3::OverworldAreaGfxInfo> > yaze::editor::SpriteEditor::usage_areas_
private

Definition at line 277 of file sprite_editor.h.

Referenced by DrawSpritesetPicker().

◆ usage_rooms_

std::optional<std::map<int, zelda3::RoomGfxInfo> > yaze::editor::SpriteEditor::usage_rooms_
private

Definition at line 278 of file sprite_editor.h.

Referenced by DrawSpritesetPicker().

◆ usage_rom_

const Rom* yaze::editor::SpriteEditor::usage_rom_ = nullptr
private

Definition at line 279 of file sprite_editor.h.

Referenced by DrawSpritesetPicker().

◆ tile_check_key_

std::string yaze::editor::SpriteEditor::tile_check_key_
private

Definition at line 280 of file sprite_editor.h.

Referenced by DrawFrameTileWarnings().

◆ tile_issues_

std::vector<zelda3::SpriteTileIssue> yaze::editor::SpriteEditor::tile_issues_
private

Definition at line 281 of file sprite_editor.h.

Referenced by DrawFrameTileWarnings().

◆ tile_check_count_

size_t yaze::editor::SpriteEditor::tile_check_count_ = 0
private

Definition at line 282 of file sprite_editor.h.

Referenced by DrawFrameTileWarnings().

◆ sprite_canvas_

gui::Canvas yaze::editor::SpriteEditor::sprite_canvas_
private
Initial value:
{"SpriteCanvas", ImVec2(0x200, 0x200),

Definition at line 287 of file sprite_editor.h.

Referenced by DrawSpriteCanvas(), DrawZSpriteOnCanvas(), and RenderZSpriteFrame().

◆ graphics_sheet_canvas_

gui::Canvas yaze::editor::SpriteEditor::graphics_sheet_canvas_
private
Initial value:
{"GraphicsSheetCanvas",
ImVec2(0x80 * 2 + 2, 0x40 * 8 + 2),

Definition at line 290 of file sprite_editor.h.

Referenced by DrawCurrentSheets().

◆ undo_snapshot_pending_

bool yaze::editor::SpriteEditor::undo_snapshot_pending_ = false
private

Definition at line 297 of file sprite_editor.h.

Referenced by BeginUndoTransaction(), and CommitUndoTransaction().

◆ sprite_mutated_this_frame_

bool yaze::editor::SpriteEditor::sprite_mutated_this_frame_ = false
private

Definition at line 298 of file sprite_editor.h.

Referenced by CommitUndoTransaction(), and MarkSpriteMutated().

◆ undo_before_snapshot_

SpriteSnapshot yaze::editor::SpriteEditor::undo_before_snapshot_
private

Definition at line 299 of file sprite_editor.h.

Referenced by BeginUndoTransaction(), and CommitUndoTransaction().

◆ status_

absl::Status yaze::editor::SpriteEditor::status_
private

◆ rom_

Rom* yaze::editor::SpriteEditor::rom_
private

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