feat: Introduce Layout Override Feature in DungeonCanvasViewer

- Added a new "Layout Override" section in the DungeonCanvasViewer, allowing users to enable or disable layout overrides for dungeon rooms.
- Implemented a checkbox to toggle the override and a slider to select the layout ID when enabled.
- Removed the previously disabled room layout drawing code to streamline the rendering process.
- Updated the layout management to ensure proper handling of layout IDs and visibility settings.
- Enhanced the overall user interface for better control over dungeon layout visualization.
This commit is contained in:
scawful
2025-10-10 10:14:50 -04:00
parent db517abbb3
commit b64ef74b10
17 changed files with 258 additions and 1980 deletions

View File

@@ -104,7 +104,6 @@ class DungeonCanvasViewer {
void CalculateWallDimensions(const zelda3::RoomObject& object, int& width, int& height);
// Visualization
void DrawRoomLayout(zelda3::Room& room); // Non-const to call LoadLayout
void DrawObjectPositionOutlines(const zelda3::Room& room);
// Room graphics management
@@ -155,13 +154,14 @@ class DungeonCanvasViewer {
std::vector<ObjectRenderCache> object_render_cache_;
uint64_t last_palette_hash_ = 0;
// Debug state (persistent between frames for debug windows)
// Debug state flags
bool show_room_debug_info_ = false;
bool show_texture_debug_ = false;
bool show_object_bounds_ = false;
bool show_layer_info_ = false;
// Object outline category toggles
int layout_override_ = -1; // -1 for no override
// Object outline filtering toggles
struct ObjectOutlineToggles {
bool show_type1_objects = true; // Standard objects (0x00-0xFF)
bool show_type2_objects = true; // Extended objects (0x100-0x1FF)