Represents a single session, containing a ROM and its associated editors. More...
#include <session_types.h>
Public Member Functions | |
| void | CaptureRomIdentity (bool preserve_editing_source=false) |
| void | ReloadGraphicsDisplay () |
| void | ActivateGraphicsDisplay () |
| void | ResetGraphicsDisplay () |
| bool | HasPendingGfxGroupChanges () const |
| RomSession ()=default | |
| RomSession (UserSettings *user_settings, size_t session_id, EditorRegistry *editor_registry=nullptr) | |
| RomSession (Rom &&r, UserSettings *user_settings=nullptr, size_t session_id=0, EditorRegistry *editor_registry=nullptr) | |
| ~RomSession () | |
| size_t | session_id () const |
| std::string | GetDisplayName () const |
Public Attributes | |
| Rom | rom |
| std::optional< RomBaselineIdentity > | rom_baseline |
| zelda3::GameData | game_data |
| EditorSet | editors |
| std::string | custom_name |
| std::string | filepath |
| core::FeatureFlags::Flags | feature_flags |
| std::optional< project::YazeProject > | project_context |
| bool | project_dirty = false |
| bool | backup_restore_pending = false |
| ProjectFileEditorState | project_file_editor_state |
| std::unique_ptr< core::VersionManager > | version_manager |
| bool | game_data_loaded = false |
| std::array< bool, kEditorTypeCount > | editor_initialized {} |
| std::array< bool, kEditorTypeCount > | editor_assets_loaded {} |
Private Attributes | |
| std::unique_ptr< std::array< gfx::Bitmap, zelda3::kNumGfxSheets > > | graphics_display_ |
Represents a single session, containing a ROM and its associated editors.
Definition at line 178 of file session_types.h.
|
default |
| yaze::editor::RomSession::RomSession | ( | UserSettings * | user_settings, |
| size_t | session_id, | ||
| EditorRegistry * | editor_registry = nullptr ) |
Definition at line 401 of file session_types.cc.
|
explicit |
Definition at line 406 of file session_types.cc.
References CaptureRomIdentity(), feature_flags, yaze::Rom::filename(), filepath, and rom.

| yaze::editor::RomSession::~RomSession | ( | ) |
Definition at line 463 of file session_types.cc.
References game_data, yaze::gfx::PaletteManager::Get(), yaze::gfx::PaletteManager::ReleaseSession(), and ResetGraphicsDisplay().

| void yaze::editor::RomSession::CaptureRomIdentity | ( | bool | preserve_editing_source = false | ) |
Definition at line 416 of file session_types.cc.
References yaze::util::ComputeRomIdentityHashes(), yaze::Rom::data(), yaze::Rom::filename(), yaze::Rom::is_loaded(), rom, rom_baseline, and yaze::Rom::size().
Referenced by RomSession().
| void yaze::editor::RomSession::ReloadGraphicsDisplay | ( | ) |
Definition at line 431 of file session_types.cc.
References ActivateGraphicsDisplay(), game_data, yaze::zelda3::GameData::gfx_bitmaps, graphics_display_, yaze::zelda3::GraphicsSheetStore::HasSheet(), ResetGraphicsDisplay(), yaze::zelda3::GraphicsSheetStore::Sheet(), and yaze::zelda3::GraphicsSheetStoreHolder::sheet_store.

| void yaze::editor::RomSession::ActivateGraphicsDisplay | ( | ) |
Definition at line 447 of file session_types.cc.
References yaze::gfx::Arena::BindGraphicsSheets(), game_data, yaze::gfx::Arena::Get(), and graphics_display_.
Referenced by yaze::editor::EditorManager::HandleSessionSwitched(), and ReloadGraphicsDisplay().

| void yaze::editor::RomSession::ResetGraphicsDisplay | ( | ) |
Definition at line 451 of file session_types.cc.
References game_data, yaze::gfx::Arena::Get(), and graphics_display_.
Referenced by ReloadGraphicsDisplay(), yaze::editor::EditorManager::ResetAssetState(), and ~RomSession().

| bool yaze::editor::RomSession::HasPendingGfxGroupChanges | ( | ) | const |
Definition at line 311 of file session_types.cc.
References yaze::zelda3::DiffGfxGroups(), game_data, game_data_loaded, yaze::Rom::is_loaded(), and rom.

|
inline |
Definition at line 231 of file session_types.h.
References editors, and yaze::editor::EditorSet::session_id().
Referenced by yaze::editor::EditorManager::HandleSessionCreated(), yaze::editor::EditorManager::HandleSessionSwitched(), yaze::editor::EditorManager::RestoreEditorLayoutAfterAssets(), and yaze::editor::EditorManager::RestoreProjectContextForSession().

| std::string yaze::editor::RomSession::GetDisplayName | ( | ) | const |
Definition at line 468 of file session_types.cc.
References custom_name, rom, and yaze::Rom::title().

| Rom yaze::editor::RomSession::rom |
Definition at line 179 of file session_types.h.
Referenced by yaze::editor::RomLifecycleManager::ActivateRomIdentity(), CaptureRomIdentity(), yaze::editor::EditorManager::CompactPendingUnsavedWorkLabel(), yaze::editor::EditorManager::ConfigureSession(), yaze::editor::EditorManager::DescribePendingUnsavedWork(), GetDisplayName(), yaze::editor::EditorManager::HandleSessionSwitched(), HasPendingGfxGroupChanges(), yaze::editor::SessionCoordinator::NotifySessionRomLoaded(), and RomSession().
| std::optional<RomBaselineIdentity> yaze::editor::RomSession::rom_baseline |
Definition at line 182 of file session_types.h.
Referenced by yaze::editor::RomLifecycleManager::ActivateRomIdentity(), and CaptureRomIdentity().
| zelda3::GameData yaze::editor::RomSession::game_data |
Definition at line 185 of file session_types.h.
Referenced by ActivateGraphicsDisplay(), yaze::editor::EditorManager::HandleSessionClosed(), yaze::editor::EditorManager::HandleSessionCreated(), yaze::editor::EditorManager::HandleSessionSwitched(), HasPendingGfxGroupChanges(), ReloadGraphicsDisplay(), ResetGraphicsDisplay(), and ~RomSession().
| EditorSet yaze::editor::RomSession::editors |
Definition at line 193 of file session_types.h.
Referenced by yaze::editor::EditorManager::ConfigureSession(), yaze::editor::EditorManager::HandleSessionSwitched(), and session_id().
| std::string yaze::editor::RomSession::custom_name |
Definition at line 194 of file session_types.h.
Referenced by GetDisplayName().
| std::string yaze::editor::RomSession::filepath |
Definition at line 195 of file session_types.h.
Referenced by yaze::editor::SessionCoordinator::NotifySessionRomLoaded(), and RomSession().
| core::FeatureFlags::Flags yaze::editor::RomSession::feature_flags |
Definition at line 196 of file session_types.h.
Referenced by yaze::editor::EditorManager::BindProjectContextToSession(), yaze::editor::EditorManager::CaptureActiveProjectContext(), yaze::editor::EditorManager::CaptureRuntimeFeatureFlags(), yaze::editor::EditorManager::GetCurrentFeatureFlags(), yaze::editor::EditorManager::HandleSessionSwitched(), yaze::editor::EditorManager::LoadProjectWithRom(), yaze::editor::EditorManager::OpenRomOrProjectInternal(), yaze::editor::EditorManager::RestoreProjectContextForSession(), and RomSession().
| std::optional<project::YazeProject> yaze::editor::RomSession::project_context |
Definition at line 199 of file session_types.h.
Referenced by yaze::editor::EditorManager::BindProjectContextToSession(), yaze::editor::EditorManager::HandleSessionCreated(), yaze::editor::EditorManager::HandleSessionSwitched(), yaze::editor::EditorManager::LoadProjectWithRom(), and yaze::editor::EditorManager::RestoreProjectContextForSession().
| bool yaze::editor::RomSession::project_dirty = false |
Definition at line 200 of file session_types.h.
Referenced by yaze::editor::EditorManager::CaptureActiveProjectEditingState(), and yaze::editor::EditorManager::RestoreProjectEditingStateForSession().
| bool yaze::editor::RomSession::backup_restore_pending = false |
Definition at line 208 of file session_types.h.
| ProjectFileEditorState yaze::editor::RomSession::project_file_editor_state |
Definition at line 209 of file session_types.h.
Referenced by yaze::editor::EditorManager::RestoreProjectEditingStateForSession().
| std::unique_ptr<core::VersionManager> yaze::editor::RomSession::version_manager |
Definition at line 213 of file session_types.h.
Referenced by yaze::editor::EditorManager::BindProjectContextToSession(), and yaze::editor::EditorManager::RestoreProjectContextForSession().
| bool yaze::editor::RomSession::game_data_loaded = false |
Definition at line 214 of file session_types.h.
Referenced by HasPendingGfxGroupChanges(), and yaze::editor::EditorManager::ResetAssetState().
| std::array<bool, kEditorTypeCount> yaze::editor::RomSession::editor_initialized {} |
| std::array<bool, kEditorTypeCount> yaze::editor::RomSession::editor_assets_loaded {} |
Definition at line 216 of file session_types.h.
Referenced by yaze::editor::EditorManager::MarkEditorLoaded(), and yaze::editor::EditorManager::ResetAssetState().
|
private |
Definition at line 228 of file session_types.h.
Referenced by ActivateGraphicsDisplay(), ReloadGraphicsDisplay(), and ResetGraphicsDisplay().