feat: Enhance emulator functionality with card registration and UI improvements

- Registered multiple emulator cards (CPU Debugger, Memory Viewer, PPU Viewer, Audio Mixer) with the EditorCardManager for improved access and organization.
- Updated EditorManager to support the new Emulator editor type in context-sensitive card controls.
- Improved GraphicsEditor loading process with enhanced logging and palette management for graphics sheets.
- Refactored MessageEditor to streamline font bitmap creation and texture queuing, ensuring better performance and clarity in the rendering loop.
This commit is contained in:
scawful
2025-10-09 10:54:11 -04:00
parent 0b0be64d2b
commit fdb0f18d6a
6 changed files with 117 additions and 27 deletions

View File

@@ -114,12 +114,17 @@ void MessageEditor::Initialize() {
}
message_preview_.font_gfx16_data_ =
gfx::SnesTo8bppSheet(raw_font_gfx_data_, /*bpp=*/2, /*num_sheets=*/2);
// Create bitmap and queue texture creation
// Create bitmap for font graphics
font_gfx_bitmap_.Create(kFontGfxMessageSize, kFontGfxMessageSize,
kFontGfxMessageDepth, message_preview_.font_gfx16_data_);
font_gfx_bitmap_.SetPalette(font_preview_colors_);
// Queue texture creation - will be processed in render loop
gfx::Arena::Get().QueueTextureCommand(
gfx::Arena::TextureCommandType::CREATE, &font_gfx_bitmap_);
printf("[MessageEditor] Font bitmap created and texture queued\n");
*current_font_gfx16_bitmap_.mutable_palette() = font_preview_colors_;
auto load_font = LoadFontGraphics(*rom());