From 2f5791c59692beda3c948d3f9efd6557a32f4913 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Wed, 2 Dec 2026 08:20:34 +0400 Subject: feat(ui): show original designer equipment categories Use the original atlas, resource captions, and list geometry from iron3d.dll. Group Unit DAT records by their stored part roles while keeping the record index for each installed mount. Checked the stock start of mission 4 in the Vulkan window. Scrolling the systems list and changing one ammunition mount leaves the other mount intact, and the factory accepts the edited project. --- apps/fparkan-game/src/robot_designer.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'apps/fparkan-game/src/robot_designer.rs') diff --git a/apps/fparkan-game/src/robot_designer.rs b/apps/fparkan-game/src/robot_designer.rs index 2d1be0d0..0b4590cc 100644 --- a/apps/fparkan-game/src/robot_designer.rs +++ b/apps/fparkan-game/src/robot_designer.rs @@ -5,7 +5,8 @@ use super::{ DirectoryVfs, EnvironmentGpuRange, StaticPreviewScene, VulkanSmokeRenderer, }; use fparkan_assets::designer_screen::{ - DesignerFileView, DesignerLabels, DesignerPicture, DesignerScreen, EXTENT, FILE_ROWS, + DesignerCategory, DesignerFileView, DesignerLabels, DesignerPicture, DesignerScreen, EXTENT, + FILE_ROWS, }; use fparkan_platform_winit::text::StringResources; use fparkan_runtime::{factory_design_parts, factory_project_components, Engine}; @@ -36,6 +37,12 @@ impl RobotDesignerPanel { .get(id) .ok_or_else(|| format!("missing designer label {id:#06x}")) }; + let categories = DesignerCategory::ALL + .into_iter() + .map(|category| read(u32::from(category.label_id()))) + .collect::, _>>()? + .try_into() + .map_err(|_| "designer category label count mismatch")?; let assets = DesignerScreen::load( &DirectoryVfs::new(root), DesignerLabels { @@ -46,6 +53,9 @@ impl RobotDesignerPanel { load: read(0x614)?, filename: read(0xbf0)?, exit: read(0x615)?, + categories, + parts_panel: read(0xbe9)?, + model_panel: read(0xbea)?, }, )?; let screen = [0.0, 0.0, 640.0, 480.0]; @@ -179,6 +189,8 @@ impl RobotDesignerPanel { (slot, name, modified.as_deref().unwrap_or(parts)) }), first_part: designer.first_part, + first_variant: designer.first_variant, + category: designer.category, variants: designer .variants .as_ref() -- cgit v1.2.3