aboutsummaryrefslogtreecommitdiff
path: root/crates/fparkan-assets/src/strategic_roster
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-12-02 11:12:06 +0300
committerValentin Popov <valentin@popov.link>2026-12-02 11:12:06 +0300
commit733f9d92e0d4e40ed40db42fa6cd11294e49eb7b (patch)
tree824dde369c5fbb7b3180c42899c4f0555929ca4b /crates/fparkan-assets/src/strategic_roster
parent61208d874cb3d9bf93e9f7c60aceebc287454b62 (diff)
downloadfparkan-733f9d92e0d4e40ed40db42fa6cd11294e49eb7b.tar.xz
fparkan-733f9d92e0d4e40ed40db42fa6cd11294e49eb7b.zip
feat(ui): show native strategic waypoint cursors
Read the animated cursor strips and their hotspots from the installed UI atlas. Use the native Land.map areal flag and chassis selector for both the preview cursor and waypoint input. In stock Two Fortresses, compared one accepted and one rejected map point against the original and checked the return to the cockpit with Vulkan validation.
Diffstat (limited to 'crates/fparkan-assets/src/strategic_roster')
-rw-r--r--crates/fparkan-assets/src/strategic_roster/orders.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/fparkan-assets/src/strategic_roster/orders.rs b/crates/fparkan-assets/src/strategic_roster/orders.rs
index 743b4801..4ea7d8d8 100644
--- a/crates/fparkan-assets/src/strategic_roster/orders.rs
+++ b/crates/fparkan-assets/src/strategic_roster/orders.rs
@@ -33,6 +33,12 @@ fn panel_top(count: usize) -> u32 {
ROW_TOP + count.min(19) as u32 * ROW_PITCH
}
+pub(super) fn covers_pointer([x, y]: [f32; 2], count: usize) -> bool {
+ let y_top = panel_top(count);
+ let y_bottom = (y_top + (ORDERS.len() as u32 + 1) * ROW_PITCH).min(480);
+ (LEFT as f32..RIGHT as f32).contains(&x) && (y_top as f32..y_bottom as f32).contains(&y)
+}
+
pub(super) struct OrderImages {
stub: RgbaImage,
disabled: RgbaImage,