From 8d775c601f492e8f1e2ec1a28835f1ab3a37b076 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Tue, 1 Dec 2026 22:44:16 +0400 Subject: feat(ui): show owned buildings on the satellite map Use the original landscape projection and building sprites. Resolve ownership from live registered objects so a captured building appears at its existing location. Checked the original DLL and verified the factory and storage icons in the stock Field Camp window. --- crates/fparkan-assets/src/satellite_map.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'crates/fparkan-assets/src') diff --git a/crates/fparkan-assets/src/satellite_map.rs b/crates/fparkan-assets/src/satellite_map.rs index 9a18f2bd..39af61bf 100644 --- a/crates/fparkan-assets/src/satellite_map.rs +++ b/crates/fparkan-assets/src/satellite_map.rs @@ -8,10 +8,11 @@ use fparkan_texm::{decode_mip_rgba8, decode_texm, RgbaImage}; use fparkan_vfs::Vfs; use std::sync::Arc; -/// The mission map and compass cut from the original interface texture atlas. +/// The mission map, compass and contact atlas from the installed game. pub struct SatelliteMapAssets { pub background: RgbaImage, pub compass: RgbaImage, + pub icons: RgbaImage, } /// Resolves `minimap` through the mission CFG and the compass through the game UI CFG. @@ -63,9 +64,17 @@ pub fn load_satellite_map( [number(&icon, "OFFSET_X")?, number(&icon, "OFFSET_Y")?], [number(&icon, "WIDTH")?, number(&icon, "HEIGHT")?], )?; + let icon_page = pages + .payload(EntryId(number(&textures, "ICONS")?)) + .map_err(|error| error.to_string())?; + let icons = texture(icon_page)?; + if icons.width != 256 || icons.height != 256 { + return Err("unexpected satellite icon atlas dimensions".into()); + } Ok(Some(SatelliteMapAssets { background, compass, + icons, })) } -- cgit v1.2.3