diff options
Diffstat (limited to 'apps/fparkan-game/src/robot_designer.rs')
| -rw-r--r-- | apps/fparkan-game/src/robot_designer.rs | 14 |
1 files changed, 13 insertions, 1 deletions
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::<Result<Vec<_>, _>>()? + .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() |
