bms_sm/
intellivibe_data.rs1use crate::MemoryFile;
4
5#[repr(C)]
6#[derive(Debug, Default)]
7pub struct IntellivibeData {
8 pub aa_missile_fired: u8,
9 pub ag_missile_fired: u8,
10 pub bomb_dropped: u8,
11 pub flare_dropped: u8,
12 pub chaff_dropped: u8,
13 pub bullets_fired: u8,
14 pub collision_counter: i32,
15 pub firing_gun: bool,
16 pub end_flight: bool,
17 pub ejecting: bool,
18 pub in_3d: bool,
19 pub paused: bool,
20 pub frozen: bool,
21 pub over_g: bool,
22 pub on_ground: bool,
23 pub exit_game: bool,
24 pub g_force: f32,
25 pub eyes_x: f32,
26 pub eyes_y: f32,
27 pub eyes_z: f32,
28 pub last_damage: i32,
29 pub damage_force: f32,
30 pub when_damage: i32,
31}
32
33unsafe impl Send for IntellivibeData {}
34unsafe impl Sync for IntellivibeData {}
35
36impl IntellivibeData {
37 pub fn new<'a>() -> Result<MemoryFile<'a, Self>, Box<dyn std::error::Error + Send + Sync>> {
38 let file = unsafe { MemoryFile::<'a, Self>::new("FalconIntellivibeSharedMemoryArea")? };
39 Ok(file)
40 }
41}