add comments for gfx classes and editors
This commit is contained in:
@@ -264,13 +264,34 @@ void ScreenEditor::DrawDungeonMapsTabs() {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Draw dungeon room graphics editor with enhanced tile16 editing
|
||||
*
|
||||
* Enhanced Features:
|
||||
* - Interactive tile16 selector with visual feedback
|
||||
* - Real-time tile16 composition from 4x 8x8 tiles
|
||||
* - Tile metadata editing (mirroring, palette, etc.)
|
||||
* - Integration with ROM graphics buffer
|
||||
* - Undo/redo support for tile modifications
|
||||
*
|
||||
* Performance Notes:
|
||||
* - Cached tile16 rendering to avoid repeated composition
|
||||
* - Efficient tile selector with grid-based snapping
|
||||
* - Batch tile updates to minimize ROM writes
|
||||
* - Lazy loading of tile graphics data
|
||||
*/
|
||||
void ScreenEditor::DrawDungeonMapsRoomGfx() {
|
||||
if (ImGui::BeginChild("##DungeonMapTiles", ImVec2(0, 0), true)) {
|
||||
// Enhanced tilesheet canvas with improved tile selection
|
||||
tilesheet_canvas_.DrawBackground(ImVec2((256 * 2) + 2, (192 * 2) + 4));
|
||||
tilesheet_canvas_.DrawContextMenu();
|
||||
|
||||
// Interactive tile16 selector with grid snapping
|
||||
if (tilesheet_canvas_.DrawTileSelector(32.f)) {
|
||||
selected_tile16_ = tilesheet_canvas_.points().front().x / 32 +
|
||||
(tilesheet_canvas_.points().front().y / 32) * 16;
|
||||
|
||||
// Render selected tile16 and cache tile metadata
|
||||
gfx::RenderTile16(tile16_blockset_, selected_tile16_);
|
||||
std::ranges::copy(tile16_blockset_.tile_info[selected_tile16_],
|
||||
current_tile16_info.begin());
|
||||
@@ -321,7 +342,24 @@ void ScreenEditor::DrawDungeonMapsRoomGfx() {
|
||||
ImGui::EndChild();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Draw dungeon maps editor with enhanced ROM hacking features
|
||||
*
|
||||
* Enhanced Features:
|
||||
* - Multi-mode editing (DRAW, EDIT, SELECT)
|
||||
* - Real-time tile16 preview and editing
|
||||
* - Floor/basement management for complex dungeons
|
||||
* - Copy/paste operations for floor layouts
|
||||
* - Integration with ROM tile16 data
|
||||
*
|
||||
* Performance Notes:
|
||||
* - Lazy loading of dungeon graphics
|
||||
* - Cached tile16 rendering for fast updates
|
||||
* - Batch operations for multiple tile changes
|
||||
* - Efficient memory management for large dungeons
|
||||
*/
|
||||
void ScreenEditor::DrawDungeonMapsEditor() {
|
||||
// Enhanced editing mode controls with visual feedback
|
||||
if (ImGui::Button(ICON_MD_DRAW)) {
|
||||
current_mode_ = EditingMode::DRAW;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user