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

Checklist for proving each dungeon object draws like the game. More...

#include <object_coverage_panel.h>

Inheritance diagram for yaze::editor::ObjectCoveragePanel:

Public Types

using NavigateCallback
 

Public Member Functions

 ObjectCoveragePanel ()=default
 
std::string GetId () const override
 Unique identifier for this panel.
 
std::string GetDisplayName () const override
 Human-readable name shown in menus and title bars.
 
std::string GetIcon () const override
 Material Design icon for this panel.
 
std::string GetEditorCategory () const override
 Editor category this panel belongs to.
 
int GetPriority () const override
 Get display priority for menu ordering.
 
std::string GetWorkflowGroup () const override
 Optional workflow group for hack-centric actions.
 
void Draw (bool *p_open) override
 Draw the panel content.
 
void SetProject (project::YazeProject *project)
 
void SetRooms (DungeonRoomStore *rooms)
 
void SetNavigateCallback (NavigateCallback callback)
 
void FocusObject (int object_id, int room_id)
 
void MarkRoomsDirty ()
 
- Public Member Functions inherited from yaze::editor::WindowContent
virtual ~WindowContent ()=default
 
virtual void OnFirstDraw ()
 Called once before the first Draw() in a session.
 
virtual bool RequiresLazyInit () const
 Whether this panel uses lazy initialization.
 
void InvalidateLazyInit ()
 Reset lazy init state so OnFirstDraw() runs again.
 
virtual void OnOpen ()
 Called when panel becomes visible.
 
virtual void OnClose ()
 Called when panel is hidden.
 
virtual void OnFocus ()
 Called when panel receives focus.
 
virtual WindowLifecycle GetWindowLifecycle () const
 Get the lifecycle category for this window.
 
virtual WindowContextScope GetContextScope () const
 Optional context binding for this window (room/selection/etc)
 
virtual WindowScope GetScope () const
 Get the registration scope for this window.
 
virtual WindowPresentationPolicy GetPresentationPolicy () const
 How this content is hosted and advertised by workspace chrome.
 
virtual bool IsEnabled () const
 Check if this panel is currently enabled.
 
virtual std::string GetDisabledTooltip () const
 Get tooltip text when panel is disabled.
 
virtual std::string GetShortcutHint () const
 Get keyboard shortcut hint for display.
 
virtual std::string GetWorkflowLabel () const
 Optional workflow label for menus/command palette.
 
virtual std::string GetWorkflowDescription () const
 Optional workflow description for menus/command palette.
 
virtual int GetWorkflowPriority () const
 Optional workflow ordering priority (lower sorts first).
 
virtual float GetPreferredWidth () const
 Get preferred width for this panel (optional)
 
virtual bool HasExactPreferredWidth () const
 Whether GetPreferredWidth() is an exact content width.
 
virtual float GetPreferredHeight () const
 Get preferred height for this panel (optional)
 
virtual bool PrefersFloating () const
 
virtual bool PreferAutoHideTabBar () const
 Whether the dock node hosting this panel should auto-hide its tab bar.
 
virtual bool IsVisibleByDefault () const
 Whether this panel should be visible by default.
 
virtual std::string GetParentPanelId () const
 Get parent panel ID for cascade behavior.
 
virtual bool CascadeCloseChildren () const
 Whether closing this panel should close child panels.
 
void DrawWithLazyInit (bool *p_open)
 Execute lazy initialization if needed, then call Draw()
 

Private Member Functions

void RebuildIndex ()
 
void EnsureEvidenceLoaded ()
 
void SetVerdict (int object_id, ObjectEvidenceState state)
 
void SaveEvidence ()
 
void GoToOccurrence (int object_id, const ObjectOccurrence &occurrence)
 
void GoToNextObject ()
 
void DrawAutomaticCheck ()
 
void DrawAutomaticCheckResults ()
 
void SetCaptureDir (const std::string &dir)
 
void ReloadManifest ()
 
void StartAutomaticCheck ()
 
void StepAutomaticCheck ()
 
void CheckRoomAgainstGame (int room_id)
 
void ApplyAutomaticVerdicts (ObjectEvidenceState state)
 
void DrawSummary ()
 
void DrawFilters ()
 
void DrawObjectTable (float height)
 
void DrawDetails ()
 
void DrawVerdictEditor (int object_id)
 
void DrawObjectOccurrences (int object_id)
 
bool PassesFilters (int object_id) const
 
std::string EvidenceContextName () const
 

Private Attributes

project::YazeProject * project_ = nullptr
 
DungeonRoomStore * rooms_ = nullptr
 
NavigateCallback navigate_
 
ObjectUsageIndex usage_
 
std::map< int, ObjectCustomDrawCode > custom_code_
 
std::vector< int > review_order_
 
std::string rom_sha1_
 
bool index_dirty_ = true
 
ObjectEvidenceStore evidence_
 
std::filesystem::path evidence_path_
 
std::string loaded_context_
 
std::string status_message_
 
bool status_is_error_ = false
 
std::optional< int > selected_object_
 
bool scroll_to_selected_ = false
 
std::map< int, int > last_room_for_object_
 
char note_buffer_ [512] = {}
 
std::optional< int > note_buffer_object_
 
std::optional< GameCaptureManifest > manifest_
 
std::string manifest_error_
 
std::string manifest_dir_
 
ObjectAutoCheckResults auto_results_
 
std::vector< int > auto_queue_
 
size_t auto_next_ = 0
 
bool auto_running_ = false
 
std::vector< std::string > auto_room_errors_
 
bool only_auto_differences_ = false
 
char filter_text_ [64] = {}
 
int state_filter_ = -1
 
bool only_placed_ = true
 
bool only_focus_ = false
 

Friends

class ObjectCoveragePanelTestPeer
 

Additional Inherited Members

- Protected Member Functions inherited from yaze::editor::WindowContent
void InvalidateCache ()
 Invalidate all cached computations.
 
template<typename T >
T & GetCached (const std::string &key, std::function< T()> compute)
 Get or compute a cached value.
 
bool IsCacheValid () const
 Check if cache has been invalidated.
 
void ClearCache ()
 Clear all cached values (more aggressive than InvalidateCache)
 

Detailed Description

Checklist for proving each dungeon object draws like the game.

Lists every object the draw-routine registry maps, which rooms place it, and a verdict per object (see ObjectEvidenceState). "Next object to check" picks the next unchecked object in release-focus order and opens a room that uses it with the object selected, so a review session is: compare, set the verdict, press Next.

Verdicts are saved as JSON under the app data directory, one file per project (or per ROM SHA-1 when no project is open), so vanilla and Oracle results stay separate.

Definition at line 35 of file object_coverage_panel.h.

Member Typedef Documentation

◆ NavigateCallback

Initial value:
std::function<void(int room_id, size_t object_index, int object_id)>

Definition at line 39 of file object_coverage_panel.h.

Constructor & Destructor Documentation

◆ ObjectCoveragePanel()

yaze::editor::ObjectCoveragePanel::ObjectCoveragePanel ( )
default

Member Function Documentation

◆ GetId()

std::string yaze::editor::ObjectCoveragePanel::GetId ( ) const
inlineoverridevirtual

Unique identifier for this panel.

Returns
Panel ID in format "{category}.{name}" (e.g., "dungeon.room_selector")

IDs should be:

  • Lowercase with underscores
  • Prefixed with editor category
  • Unique across all panels

Implements yaze::editor::WindowContent.

Definition at line 44 of file object_coverage_panel.h.

◆ GetDisplayName()

std::string yaze::editor::ObjectCoveragePanel::GetDisplayName ( ) const
inlineoverridevirtual

Human-readable name shown in menus and title bars.

Returns
Display name (e.g., "Room Selector")

Implements yaze::editor::WindowContent.

Definition at line 45 of file object_coverage_panel.h.

◆ GetIcon()

std::string yaze::editor::ObjectCoveragePanel::GetIcon ( ) const
inlineoverridevirtual

Material Design icon for this panel.

Returns
Icon constant (e.g., ICON_MD_LIST)

Implements yaze::editor::WindowContent.

Definition at line 46 of file object_coverage_panel.h.

References ICON_MD_FACT_CHECK.

◆ GetEditorCategory()

std::string yaze::editor::ObjectCoveragePanel::GetEditorCategory ( ) const
inlineoverridevirtual

Editor category this panel belongs to.

Returns
Category name matching EditorType (e.g., "Dungeon", "Overworld")

Implements yaze::editor::WindowContent.

Definition at line 47 of file object_coverage_panel.h.

◆ GetPriority()

int yaze::editor::ObjectCoveragePanel::GetPriority ( ) const
inlineoverridevirtual

Get display priority for menu ordering.

Returns
Priority value (lower = higher in list, default 50)

Reimplemented from yaze::editor::WindowContent.

Definition at line 48 of file object_coverage_panel.h.

◆ GetWorkflowGroup()

std::string yaze::editor::ObjectCoveragePanel::GetWorkflowGroup ( ) const
inlineoverridevirtual

Optional workflow group for hack-centric actions.

Returns
Non-empty group name to surface this panel in hack workflows.

Reimplemented from yaze::editor::WindowContent.

Definition at line 49 of file object_coverage_panel.h.

◆ Draw()

void yaze::editor::ObjectCoveragePanel::Draw ( bool * p_open)
overridevirtual

Draw the panel content.

Parameters
p_openPointer to visibility flag (nullptr if not closable)

Called by WorkspaceWindowManager when the panel is visible. Do NOT call ImGui::Begin/End - the PanelWindow wrapper handles that. Just draw your content directly.

Implements yaze::editor::WindowContent.

Definition at line 432 of file object_coverage_panel.cc.

References DrawAutomaticCheck(), DrawDetails(), DrawFilters(), DrawObjectTable(), DrawSummary(), EnsureEvidenceLoaded(), index_dirty_, yaze::Rom::is_loaded(), RebuildIndex(), yaze::editor::DungeonRoomStore::rom(), rooms_, and StepAutomaticCheck().

◆ SetProject()

void yaze::editor::ObjectCoveragePanel::SetProject ( project::YazeProject * project)

◆ SetRooms()

void yaze::editor::ObjectCoveragePanel::SetRooms ( DungeonRoomStore * rooms)

Definition at line 126 of file object_coverage_panel.cc.

References index_dirty_, and rooms_.

Referenced by yaze::editor::DungeonEditorV2::RefreshRomBackedState().

◆ SetNavigateCallback()

void yaze::editor::ObjectCoveragePanel::SetNavigateCallback ( NavigateCallback callback)
inline

Definition at line 55 of file object_coverage_panel.h.

References navigate_.

◆ FocusObject()

void yaze::editor::ObjectCoveragePanel::FocusObject ( int object_id,
int room_id )

◆ MarkRoomsDirty()

void yaze::editor::ObjectCoveragePanel::MarkRoomsDirty ( )
inline

Definition at line 62 of file object_coverage_panel.h.

References index_dirty_.

◆ RebuildIndex()

◆ EnsureEvidenceLoaded()

◆ SetVerdict()

◆ SaveEvidence()

void yaze::editor::ObjectCoveragePanel::SaveEvidence ( )
private

◆ GoToOccurrence()

void yaze::editor::ObjectCoveragePanel::GoToOccurrence ( int object_id,
const ObjectOccurrence & occurrence )
private

◆ GoToNextObject()

void yaze::editor::ObjectCoveragePanel::GoToNextObject ( )
private

◆ DrawAutomaticCheck()

◆ DrawAutomaticCheckResults()

◆ SetCaptureDir()

◆ ReloadManifest()

void yaze::editor::ObjectCoveragePanel::ReloadManifest ( )
private

◆ StartAutomaticCheck()

void yaze::editor::ObjectCoveragePanel::StartAutomaticCheck ( )
private

Definition at line 251 of file object_coverage_panel.cc.

References auto_next_, auto_queue_, auto_results_, auto_room_errors_, auto_running_, yaze::editor::ObjectAutoCheckResults::Clear(), and manifest_.

Referenced by DrawAutomaticCheck().

Here is the call graph for this function:

◆ StepAutomaticCheck()

void yaze::editor::ObjectCoveragePanel::StepAutomaticCheck ( )
private

Definition at line 262 of file object_coverage_panel.cc.

References auto_next_, auto_queue_, auto_running_, and CheckRoomAgainstGame().

Referenced by Draw().

Here is the call graph for this function:

◆ CheckRoomAgainstGame()

◆ ApplyAutomaticVerdicts()

void yaze::editor::ObjectCoveragePanel::ApplyAutomaticVerdicts ( ObjectEvidenceState state)
private

◆ DrawSummary()

◆ DrawFilters()

void yaze::editor::ObjectCoveragePanel::DrawFilters ( )
private

◆ DrawObjectTable()

◆ DrawDetails()

◆ DrawVerdictEditor()

◆ DrawObjectOccurrences()

◆ PassesFilters()

◆ EvidenceContextName()

std::string yaze::editor::ObjectCoveragePanel::EvidenceContextName ( ) const
private

Definition at line 131 of file object_coverage_panel.cc.

References yaze::project::YazeProject::name, project_, and rom_sha1_.

Referenced by EnsureEvidenceLoaded().

Friends And Related Symbol Documentation

◆ ObjectCoveragePanelTestPeer

friend class ObjectCoveragePanelTestPeer
friend

Definition at line 65 of file object_coverage_panel.h.

Member Data Documentation

◆ project_

project::YazeProject* yaze::editor::ObjectCoveragePanel::project_ = nullptr
private

◆ rooms_

DungeonRoomStore* yaze::editor::ObjectCoveragePanel::rooms_ = nullptr
private

Definition at line 96 of file object_coverage_panel.h.

Referenced by CheckRoomAgainstGame(), Draw(), RebuildIndex(), and SetRooms().

◆ navigate_

NavigateCallback yaze::editor::ObjectCoveragePanel::navigate_
private

Definition at line 97 of file object_coverage_panel.h.

Referenced by GoToOccurrence(), and SetNavigateCallback().

◆ usage_

ObjectUsageIndex yaze::editor::ObjectCoveragePanel::usage_
private

◆ custom_code_

std::map<int, ObjectCustomDrawCode> yaze::editor::ObjectCoveragePanel::custom_code_
private

Definition at line 102 of file object_coverage_panel.h.

Referenced by DrawDetails(), DrawObjectTable(), and RebuildIndex().

◆ review_order_

std::vector<int> yaze::editor::ObjectCoveragePanel::review_order_
private

◆ rom_sha1_

std::string yaze::editor::ObjectCoveragePanel::rom_sha1_
private

◆ index_dirty_

bool yaze::editor::ObjectCoveragePanel::index_dirty_ = true
private

Definition at line 105 of file object_coverage_panel.h.

Referenced by Draw(), DrawSummary(), MarkRoomsDirty(), RebuildIndex(), and SetRooms().

◆ evidence_

◆ evidence_path_

std::filesystem::path yaze::editor::ObjectCoveragePanel::evidence_path_
private

Definition at line 108 of file object_coverage_panel.h.

Referenced by DrawSummary(), EnsureEvidenceLoaded(), and SaveEvidence().

◆ loaded_context_

std::string yaze::editor::ObjectCoveragePanel::loaded_context_
private

Definition at line 109 of file object_coverage_panel.h.

Referenced by EnsureEvidenceLoaded(), RebuildIndex(), and SetProject().

◆ status_message_

std::string yaze::editor::ObjectCoveragePanel::status_message_
private

◆ status_is_error_

bool yaze::editor::ObjectCoveragePanel::status_is_error_ = false
private

◆ selected_object_

std::optional<int> yaze::editor::ObjectCoveragePanel::selected_object_
private

Definition at line 113 of file object_coverage_panel.h.

Referenced by DrawDetails(), DrawObjectTable(), FocusObject(), and GoToNextObject().

◆ scroll_to_selected_

bool yaze::editor::ObjectCoveragePanel::scroll_to_selected_ = false
private

Definition at line 114 of file object_coverage_panel.h.

Referenced by DrawObjectTable(), FocusObject(), and GoToNextObject().

◆ last_room_for_object_

std::map<int, int> yaze::editor::ObjectCoveragePanel::last_room_for_object_
private

Definition at line 116 of file object_coverage_panel.h.

Referenced by FocusObject(), GoToOccurrence(), and SetVerdict().

◆ note_buffer_

char yaze::editor::ObjectCoveragePanel::note_buffer_[512] = {}
private

Definition at line 117 of file object_coverage_panel.h.

Referenced by DrawVerdictEditor().

◆ note_buffer_object_

std::optional<int> yaze::editor::ObjectCoveragePanel::note_buffer_object_
private

Definition at line 118 of file object_coverage_panel.h.

Referenced by DrawVerdictEditor().

◆ manifest_

std::optional<GameCaptureManifest> yaze::editor::ObjectCoveragePanel::manifest_
private

◆ manifest_error_

std::string yaze::editor::ObjectCoveragePanel::manifest_error_
private

Definition at line 121 of file object_coverage_panel.h.

Referenced by DrawAutomaticCheck(), and ReloadManifest().

◆ manifest_dir_

std::string yaze::editor::ObjectCoveragePanel::manifest_dir_
private

Definition at line 122 of file object_coverage_panel.h.

Referenced by CheckRoomAgainstGame(), and ReloadManifest().

◆ auto_results_

◆ auto_queue_

std::vector<int> yaze::editor::ObjectCoveragePanel::auto_queue_
private

◆ auto_next_

size_t yaze::editor::ObjectCoveragePanel::auto_next_ = 0
private

◆ auto_running_

bool yaze::editor::ObjectCoveragePanel::auto_running_ = false
private

◆ auto_room_errors_

std::vector<std::string> yaze::editor::ObjectCoveragePanel::auto_room_errors_
private

◆ only_auto_differences_

bool yaze::editor::ObjectCoveragePanel::only_auto_differences_ = false
private

Definition at line 128 of file object_coverage_panel.h.

Referenced by DrawFilters(), and PassesFilters().

◆ filter_text_

char yaze::editor::ObjectCoveragePanel::filter_text_[64] = {}
private

Definition at line 130 of file object_coverage_panel.h.

Referenced by DrawFilters(), FocusObject(), and PassesFilters().

◆ state_filter_

int yaze::editor::ObjectCoveragePanel::state_filter_ = -1
private

Definition at line 131 of file object_coverage_panel.h.

Referenced by DrawFilters(), FocusObject(), and PassesFilters().

◆ only_placed_

bool yaze::editor::ObjectCoveragePanel::only_placed_ = true
private

Definition at line 132 of file object_coverage_panel.h.

Referenced by DrawFilters(), FocusObject(), and PassesFilters().

◆ only_focus_

bool yaze::editor::ObjectCoveragePanel::only_focus_ = false
private

Definition at line 133 of file object_coverage_panel.h.

Referenced by DrawFilters(), FocusObject(), and PassesFilters().


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