ImGui panel for Mesen2-OoS debugging integration. More...
#include <mesen_debug_panel.h>

Public Member Functions | |
| MesenDebugPanel () | |
| ~MesenDebugPanel () | |
| void | Draw () |
| Draw the panel. | |
| void | SetClient (std::shared_ptr< emu::mesen::MesenSocketClient > client) |
| Set the socket client for Mesen2 communication. | |
| bool | IsConnected () const |
| Get connection status. | |
| void | Connect () |
| Attempt to connect to Mesen2. | |
| void | ConnectToPath (const std::string &socket_path) |
| void | Disconnect () |
| Disconnect from Mesen2. | |
Private Member Functions | |
| void | DrawConnectionHeader () |
| void | DrawLinkState () |
| void | DrawSpriteList () |
| void | DrawGameMode () |
| void | DrawControlButtons () |
| void | DrawOverlayControls () |
| void | DrawStateControls () |
| void | RefreshSocketList () |
| void | RefreshState () |
Private Attributes | |
| std::shared_ptr< emu::mesen::MesenSocketClient > | client_ |
| emu::mesen::GameState | game_state_ |
| std::vector< emu::mesen::SpriteInfo > | sprites_ |
| emu::mesen::MesenState | emu_state_ |
| emu::mesen::CpuState | cpu_state_ |
| bool | auto_refresh_ = true |
| float | refresh_interval_ = 0.1f |
| float | time_since_refresh_ = 0.0f |
| bool | show_all_sprites_ = false |
| bool | show_cpu_state_ = false |
| std::string | connection_error_ |
| std::vector< std::string > | socket_paths_ |
| int | selected_socket_index_ = -1 |
| char | socket_path_buffer_ [256] = {} |
| std::string | status_message_ |
| bool | collision_overlay_enabled_ = false |
| int | collision_map_index_ = 0 |
| int | save_state_slot_ = 0 |
| bool | link_expanded_ = true |
| bool | sprites_expanded_ = true |
| bool | game_mode_expanded_ = true |
| bool | cpu_expanded_ = false |
ImGui panel for Mesen2-OoS debugging integration.
Displays real-time ALTTP game state from a running Mesen2 emulator, including Link position, health, active sprites, and game mode.
Definition at line 19 of file mesen_debug_panel.h.
| yaze::editor::MesenDebugPanel::MesenDebugPanel | ( | ) |
Definition at line 45 of file mesen_debug_panel.cc.
References client_, yaze::emu::mesen::MesenClientRegistry::GetOrCreate(), RefreshSocketList(), selected_socket_index_, socket_path_buffer_, and socket_paths_.

|
default |
| void yaze::editor::MesenDebugPanel::Draw | ( | ) |
Draw the panel.
Definition at line 146 of file mesen_debug_panel.cc.
References auto_refresh_, DrawConnectionHeader(), DrawControlButtons(), DrawGameMode(), DrawLinkState(), DrawSpriteList(), IsConnected(), yaze::editor::AgentUI::PopPanelStyle(), yaze::editor::AgentUI::PushPanelStyle(), refresh_interval_, RefreshSocketList(), RefreshState(), and time_since_refresh_.
| void yaze::editor::MesenDebugPanel::SetClient | ( | std::shared_ptr< emu::mesen::MesenSocketClient > | client | ) |
Set the socket client for Mesen2 communication.
Definition at line 56 of file mesen_debug_panel.cc.
References client_, and yaze::emu::mesen::MesenClientRegistry::SetClient().

| bool yaze::editor::MesenDebugPanel::IsConnected | ( | ) | const |
Get connection status.
Definition at line 62 of file mesen_debug_panel.cc.
References client_.
Referenced by Draw(), DrawConnectionHeader(), DrawControlButtons(), DrawOverlayControls(), DrawStateControls(), and RefreshState().
| void yaze::editor::MesenDebugPanel::Connect | ( | ) |
Attempt to connect to Mesen2.
Definition at line 66 of file mesen_debug_panel.cc.
References client_, connection_error_, yaze::emu::mesen::MesenClientRegistry::GetOrCreate(), RefreshState(), and yaze::emu::mesen::MesenClientRegistry::SetClient().
Referenced by DrawConnectionHeader().

| void yaze::editor::MesenDebugPanel::ConnectToPath | ( | const std::string & | socket_path | ) |
Definition at line 80 of file mesen_debug_panel.cc.
References client_, connection_error_, yaze::emu::mesen::MesenClientRegistry::GetOrCreate(), RefreshState(), and yaze::emu::mesen::MesenClientRegistry::SetClient().
Referenced by DrawConnectionHeader().

| void yaze::editor::MesenDebugPanel::Disconnect | ( | ) |
Disconnect from Mesen2.
Definition at line 94 of file mesen_debug_panel.cc.
References client_.
Referenced by DrawConnectionHeader().
|
private |
Definition at line 182 of file mesen_debug_panel.cc.
References auto_refresh_, Connect(), connection_error_, ConnectToPath(), Disconnect(), yaze::editor::AgentUI::GetTheme(), ICON_MD_AUTO_MODE, ICON_MD_BUG_REPORT, ICON_MD_CHECK_CIRCLE, ICON_MD_ERROR, ICON_MD_LINK, ICON_MD_LINK_OFF, ICON_MD_REFRESH, IsConnected(), refresh_interval_, RefreshSocketList(), selected_socket_index_, socket_path_buffer_, socket_paths_, and status_message_.
Referenced by Draw().
|
private |
Definition at line 276 of file mesen_debug_panel.cc.
References game_state_, yaze::editor::AgentUI::GetTheme(), ICON_MD_FAVORITE, ICON_MD_FAVORITE_BORDER, ICON_MD_PERSON, yaze::emu::mesen::GameState::items, yaze::emu::mesen::GameState::link, and link_expanded_.
Referenced by Draw().

|
private |
Definition at line 347 of file mesen_debug_panel.cc.
References yaze::editor::AgentUI::GetTheme(), ICON_MD_PEST_CONTROL, show_all_sprites_, sprites_, and sprites_expanded_.
Referenced by Draw().

|
private |
Definition at line 403 of file mesen_debug_panel.cc.
References yaze::emu::mesen::CpuState::A, cpu_state_, yaze::emu::mesen::CpuState::D, yaze::emu::mesen::CpuState::DBR, emu_state_, yaze::emu::mesen::MesenState::fps, yaze::emu::mesen::MesenState::frame, yaze::emu::mesen::GameState::game, game_mode_expanded_, game_state_, yaze::editor::AgentUI::GetTheme(), ICON_MD_GAMEPAD, yaze::emu::mesen::CpuState::K, yaze::emu::mesen::CpuState::P, yaze::emu::mesen::CpuState::PC, show_cpu_state_, yaze::emu::mesen::CpuState::SP, yaze::emu::mesen::CpuState::X, and yaze::emu::mesen::CpuState::Y.
Referenced by Draw().

|
private |
Definition at line 457 of file mesen_debug_panel.cc.
References client_, DrawOverlayControls(), DrawStateControls(), emu_state_, ICON_MD_FAST_FORWARD, ICON_MD_PAUSE, ICON_MD_PLAY_ARROW, ICON_MD_REFRESH, ICON_MD_SKIP_NEXT, IsConnected(), yaze::emu::mesen::MesenState::paused, and RefreshState().
Referenced by Draw().

|
private |
Definition at line 498 of file mesen_debug_panel.cc.
References client_, collision_map_index_, collision_overlay_enabled_, IsConnected(), and status_message_.
Referenced by DrawControlButtons().

|
private |
Definition at line 528 of file mesen_debug_panel.cc.
References client_, ICON_MD_PHOTO_CAMERA, ICON_MD_SAVE, ICON_MD_UPLOAD, IsConnected(), save_state_slot_, and status_message_.
Referenced by DrawControlButtons().

|
private |
Definition at line 100 of file mesen_debug_panel.cc.
References yaze::emu::mesen::MesenSocketClient::ListAvailableSockets(), selected_socket_index_, socket_path_buffer_, and socket_paths_.
Referenced by Draw(), DrawConnectionHeader(), and MesenDebugPanel().

|
private |
Definition at line 116 of file mesen_debug_panel.cc.
References client_, cpu_state_, emu_state_, game_state_, IsConnected(), show_all_sprites_, show_cpu_state_, and sprites_.
Referenced by Connect(), ConnectToPath(), Draw(), and DrawControlButtons().

|
private |
Definition at line 61 of file mesen_debug_panel.h.
Referenced by Connect(), ConnectToPath(), Disconnect(), DrawControlButtons(), DrawOverlayControls(), DrawStateControls(), IsConnected(), MesenDebugPanel(), RefreshState(), and SetClient().
|
private |
Definition at line 64 of file mesen_debug_panel.h.
Referenced by DrawGameMode(), DrawLinkState(), and RefreshState().
|
private |
Definition at line 65 of file mesen_debug_panel.h.
Referenced by DrawSpriteList(), and RefreshState().
|
private |
Definition at line 66 of file mesen_debug_panel.h.
Referenced by DrawControlButtons(), DrawGameMode(), and RefreshState().
|
private |
Definition at line 67 of file mesen_debug_panel.h.
Referenced by DrawGameMode(), and RefreshState().
|
private |
Definition at line 70 of file mesen_debug_panel.h.
Referenced by Draw(), and DrawConnectionHeader().
|
private |
Definition at line 71 of file mesen_debug_panel.h.
Referenced by Draw(), and DrawConnectionHeader().
|
private |
Definition at line 72 of file mesen_debug_panel.h.
Referenced by Draw().
|
private |
Definition at line 73 of file mesen_debug_panel.h.
Referenced by DrawSpriteList(), and RefreshState().
|
private |
Definition at line 74 of file mesen_debug_panel.h.
Referenced by DrawGameMode(), and RefreshState().
|
private |
Definition at line 75 of file mesen_debug_panel.h.
Referenced by Connect(), ConnectToPath(), and DrawConnectionHeader().
|
private |
Definition at line 76 of file mesen_debug_panel.h.
Referenced by DrawConnectionHeader(), MesenDebugPanel(), and RefreshSocketList().
|
private |
Definition at line 77 of file mesen_debug_panel.h.
Referenced by DrawConnectionHeader(), MesenDebugPanel(), and RefreshSocketList().
|
private |
Definition at line 78 of file mesen_debug_panel.h.
Referenced by DrawConnectionHeader(), MesenDebugPanel(), and RefreshSocketList().
|
private |
Definition at line 79 of file mesen_debug_panel.h.
Referenced by DrawConnectionHeader(), DrawOverlayControls(), and DrawStateControls().
|
private |
Definition at line 81 of file mesen_debug_panel.h.
Referenced by DrawOverlayControls().
|
private |
Definition at line 82 of file mesen_debug_panel.h.
Referenced by DrawOverlayControls().
|
private |
Definition at line 83 of file mesen_debug_panel.h.
Referenced by DrawStateControls().
|
private |
Definition at line 86 of file mesen_debug_panel.h.
Referenced by DrawLinkState().
|
private |
Definition at line 87 of file mesen_debug_panel.h.
Referenced by DrawSpriteList().
|
private |
Definition at line 88 of file mesen_debug_panel.h.
Referenced by DrawGameMode().
|
private |
Definition at line 89 of file mesen_debug_panel.h.