fix(editor): undo now covers texture painting, fix stale buffer bug

- Extend undo/redo to snapshot alpha maps and texture layers alongside
  heights — texture painting operations are now fully undoable
- Bracket paint mode with beginStroke/endStroke like sculpt mode
- Fix stale static char buffer in quest objective loop (showed wrong
  objective's description when editing multiple objectives)
- Zero-initialize all quest UI text buffers for null termination safety
- Fix unused variable warnings in terrain_editor.cpp
This commit is contained in:
Kelsi 2026-05-05 12:58:11 -07:00
parent 617228559a
commit 4e2f704124
5 changed files with 44 additions and 22 deletions

View file

@ -400,12 +400,12 @@ void EditorApp::processEvents() {
}
} else {
painting_ = true;
if (mode_ == EditorMode::Sculpt)
if (mode_ == EditorMode::Sculpt || mode_ == EditorMode::Paint)
terrainEditor_.beginStroke();
}
} else if (event.type == SDL_MOUSEBUTTONUP) {
painting_ = false;
if (mode_ == EditorMode::Sculpt)
if (mode_ == EditorMode::Sculpt || mode_ == EditorMode::Paint)
terrainEditor_.endStroke();
}
}