feat: Introduce Dungeon Object Emulator Preview and Object Drawing Enhancements

- Added DungeonObjectEmulatorPreview for rendering dungeon objects using the SNES emulator, allowing real-time visualization of object graphics.
- Implemented ObjectDrawer class to handle drawing of various object types to background buffers, utilizing game-specific patterns.
- Updated DungeonCanvasViewer to integrate object rendering and improve background layer management.
- Enhanced DungeonEditorV2 to support the new emulator preview, providing a more interactive editing experience.
- Improved error handling and logging for better debugging during object rendering operations.
This commit is contained in:
scawful
2025-10-06 23:39:45 -04:00
parent 7f71fd9e80
commit eda582f740
13 changed files with 757 additions and 56 deletions

View File

@@ -767,6 +767,7 @@ class Cpu {
}
auto mutable_log_instructions() -> bool* { return &log_instructions_; }
bool stopped() const { return stopped_; }
private:
void compare(uint16_t register_value, uint16_t memory_value) {

View File

@@ -321,7 +321,6 @@ class Ppu {
// Set pixel output format (0 = BGRX, 1 = XBGR)
void SetPixelFormat(uint8_t format) { pixelOutputFormat = format; }
private:
int GetPixelForMode7(int x, int layer, bool priority);
const int cyclesPerScanline = 341; // SNES PPU has 341 cycles per scanline
@@ -343,6 +342,9 @@ class Ppu {
// cgram access
uint16_t cgram[0x100];
private:
uint8_t cgram_pointer_;
bool cgram_second_write_;
uint8_t cgram_buffer_;