From 6c9fe794cda795b101825091aee4644efd9422f8 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Wed, 2 Dec 2026 01:39:12 +0400 Subject: feat(ui): show installed warbot weapons in the cockpit Resolve each selected mount through the original objects.dlb short name and render the live weapon bank after boarding. On a stock Fireline start the medium warbot shows the laser and both separate missile racks. Firing the selected rack reduces its ammunition from 18 to 17 while the other still reads 18. --- crates/fparkan-font/src/bitmap.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'crates/fparkan-font/src/bitmap.rs') diff --git a/crates/fparkan-font/src/bitmap.rs b/crates/fparkan-font/src/bitmap.rs index c28ce7f4..039e3b9f 100644 --- a/crates/fparkan-font/src/bitmap.rs +++ b/crates/fparkan-font/src/bitmap.rs @@ -128,6 +128,16 @@ impl BitmapFont { if unmappable { return Err("game text contains characters outside CP1251".into()); } + self.centered_line_bytes(&bytes, width, height) + } + + /// Composes a single line from a game resource's original CP1251 bytes. + pub fn centered_line_bytes( + &self, + bytes: &[u8], + width: u16, + height: u16, + ) -> Result { let (width, height) = (usize::from(width), usize::from(height)); if height < self.glyph_height || width == 0 { return Err("game text rectangle is too small".into()); -- cgit v1.2.3