feat: wire shell placeholders to backend actions #12

Merged
moldybits merged 11 commits from feat/terrain-gen-abstraction into main 2026-05-17 19:30:57 -04:00
4 changed files with 28 additions and 2 deletions
Showing only changes of commit 224ca6f807 - Show all commits
+6 -1
View File
@@ -29,7 +29,12 @@ cargo run --features app --bin openvistapro_app
```
The optional app shell is gated behind the `app` feature so default CLI builds stay GPU-free.
It opens an `eframe`/`egui` window titled `OpenVistaPro` with scene controls, file/status chrome, script/path placeholders, and a CPU-rendered terrain preview.
It opens an `eframe`/`egui` window titled `OpenVistaPro` arranged as a docked shell: a left
panel with terrain, scene/camera, and render controls; a right scripts/paths panel; a top
project bar and a bottom status bar for file/status chrome; and a central CPU-rendered
terrain preview. Still-planned actions — heightmap import, run script, make path, and file
new/open/save — appear as disabled placeholders, and legacy menus/dialogs remain on the
roadmap. The shell is still CPU-only; there is no GPU viewport yet.
Importer status:
+6
View File
@@ -19,6 +19,12 @@ Start simple, then split into crates when module boundaries stabilize.
- `src/script.rs`: parse and execute OpenVistaPro script commands.
- `src/colormap.rs`: palettes and elevation/biome color mapping.
- `src/bin/openvistapro.rs` or current `src/main.rs`: CLI entry point.
- `src/app_state.rs` and `src/app.rs`: optional `app`-feature desktop shell.
`app_state.rs` keeps UI state plus `AppAction` reducers testable without a window;
`app.rs` builds the docked `eframe`/`egui` shell — left terrain/scene/camera/render
controls, a right scripts/paths panel, a top project bar, a bottom status bar, and the
central CPU preview — with disabled placeholders for still-planned import/script/path
and file actions. It remains CPU-only until the WGPU backend lands.
## Suggested technology choices
+1 -1
View File
@@ -34,7 +34,7 @@ Notes:
| Script language parser | MakePath guide and VistaPro manual describe scripts and “Run Script” workflows. | Partial | `src/script.rs` parser, tests in `src/script.rs`, `README.md` script section. | Parser exists, but script execution is intentionally deferred. |
| Script execution and animation frames | MakePath guide says scripts should render full animations and VistaPro can run scripts from the Script menu. | Planned | No script runner or frame-sequencing engine exists yet. | Add execution semantics once the command model is stable. |
| MakePath-style path generation and motion models | MakePath guide describes spline nodes, previewing a path, and vehicle models (jet, glider, dune buggy, motorcycle, helicopter, cruise missile, custom). | Planned | No path generator or motion-model layer exists yet. | This is a separate planner/animation feature, not just a script parser. |
| Modern UI shell, menus, dialogs, and numeric gadgets | VistaPro screenshots/manuals show dense menus, dialogs, map tools, and numeric gadgets. | Partial | `src/app.rs`, `src/app_state.rs`, `src/bin/openvistapro_app.rs`, `docs/knowledgebase/ui-panel-map.md`. | Current UI is a dockable egui CPU-preview shell with terrain, scene/camera, render, viewport, file/status, and scripts/paths surfaces; import/path execution and legacy dialogs remain disabled or planned. |
| Modern UI shell, menus, dialogs, and numeric gadgets | VistaPro screenshots/manuals show dense menus, dialogs, map tools, and numeric gadgets. | Partial | `src/app.rs`, `src/app_state.rs`, `src/bin/openvistapro_app.rs`, `docs/knowledgebase/ui-panel-map.md`. | Current UI is a docked egui CPU-preview shell — left scene/terrain/render controls, a right scripts/paths panel, a top project bar, and a bottom status bar around the central viewport preview. Still-planned actions (heightmap import, run script, make path, file new/open/save) are wired as disabled placeholders; legacy menus/dialogs and numeric-gadget surfaces remain planned. |
| Legacy image / landscape export formats | VistaPro manuals mention saving rendered images and landscapes in formats like IFF/IFF24/RGB and DEM/binary landscape files. | Planned | Current output is PNG plus project-owned `.ovp.toml` scenes. | Add separate compatibility/export work only after the clean internal pipeline is stable. |
## Current reconciliation summary
+15
View File
@@ -717,6 +717,21 @@ Expected: generated script parses successfully.
## Milestone G: WGPU/egui application after CLI stability
**Status:** Tasks G1G4 have landed. `src/app_state.rs` holds testable app state and
`AppAction` reducers; `src/app.rs` and `src/bin/openvistapro_app.rs` provide the
`app`-feature `eframe`/`egui` shell. The shell now docks terrain, scene/camera, and render
controls in a left panel, a scripts/paths panel on the right, a top project bar and a
bottom status bar for file/status chrome, and the CPU top-down/perspective preview in the
center. Still-planned actions — heightmap import, run script, make path, and file
new/open/save — are present as disabled placeholders so the layout is honest about scope.
The shell map is tracked in [`docs/knowledgebase/ui-panel-map.md`](../knowledgebase/ui-panel-map.md).
Remaining UI roadmap: Task G5 (WGPU renderer backend) plus the still-open gaps — wiring
file/import/script/path actions to their backend modules, legacy menus/dialogs,
orientation and lens/range controls, vertical exaggeration, a palette editor, and
hydrology controls. All of it stays clean-room: no proprietary VistaPro assets, menus, or
screenshots enter the repository.
### Task G1: Create app-state crate/module without a window
**Objective:** Separate UI state from rendering and file formats before adding WGPU.