aboutsummaryrefslogtreecommitdiff
path: root/crates/fparkan-runtime/src/satellite_contacts.rs
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-12-02 00:04:24 +0300
committerValentin Popov <valentin@popov.link>2026-12-02 00:04:24 +0300
commit752d34af83acf9a818e22c621fb034913079acff (patch)
tree65b0f47859be8f8a33b8e37fecad81cfd660739c /crates/fparkan-runtime/src/satellite_contacts.rs
parent029297446ec0b235602b4f4d9197786a3466a6fe (diff)
downloadfparkan-752d34af83acf9a818e22c621fb034913079acff.tar.xz
fparkan-752d34af83acf9a818e22c621fb034913079acff.zip
feat(ui): plot local detections on the cockpit radar
Draw each current detection from the occupied unit sensor in camera-relative coordinates, with the original range scale, clan color and screen-pixel marks. Check stock Two Fortresses before and after a free-look turn and exercise the native rectangle and line callbacks.
Diffstat (limited to 'crates/fparkan-runtime/src/satellite_contacts.rs')
-rw-r--r--crates/fparkan-runtime/src/satellite_contacts.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/fparkan-runtime/src/satellite_contacts.rs b/crates/fparkan-runtime/src/satellite_contacts.rs
index 12b45037..68957250 100644
--- a/crates/fparkan-runtime/src/satellite_contacts.rs
+++ b/crates/fparkan-runtime/src/satellite_contacts.rs
@@ -7,7 +7,7 @@ use fparkan_world::{
TransformState,
};
-const OWN_TINT: [u8; 3] = [128, 128, 255];
+pub(super) const OWN_TINT: [u8; 3] = [128, 128, 255];
/// The original icon crop and position within the 256-pixel satellite image.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
@@ -202,7 +202,7 @@ fn unit_class(class: u32) -> bool {
class & crate::autodemo::MOBILE_UNIT != 0 || class == crate::projectile::ANIMAL_UNIT_CLASS
}
-fn clan_tint(mode: u32, relation: Option<i32>) -> [u8; 3] {
+pub(super) fn clan_tint(mode: u32, relation: Option<i32>) -> [u8; 3] {
// iron3d+0x658a0 selects the observed clan's relation to the viewer.
match (mode, relation) {
(0, _) => [255, 255, 0],