commonlibsse_ng\re\d/
DecalData.rs

1use crate::re::Color::Color;
2
3#[repr(u8)]
4#[derive(Debug, Clone, Copy, PartialEq, Eq)]
5pub enum Flag {
6    None = 0,
7    Parallax = 1 << 0,
8    AlphaBlending = 1 << 1,
9    AlphaTesting = 1 << 2,
10    NoSubtextures = 1 << 3,
11}
12
13#[repr(C)]
14#[derive(Debug, Clone, PartialEq)]
15pub struct DECAL_DATA_DATA {
16    pub decalMinWidth: f32,  // 0x00
17    pub decalMaxWidth: f32,  // 0x04
18    pub decalMinHeight: f32, // 0x08
19    pub decalMaxHeight: f32, // 0x0C
20    pub depth: f32,          // 0x10
21    pub shininess: f32,      // 0x14
22    pub parallaxScale: f32,  // 0x18
23    pub parallaxPasses: i8,  // 0x1C
24    pub flags: u8,           // 0x1D (Flag as u8, or use newtype wrapper)
25    pub pad1E: u16,          // 0x1E
26    pub color: Color,        // 0x20
27}
28const _: () = assert!(std::mem::size_of::<DECAL_DATA_DATA>() == 0x24);
29
30#[repr(C)]
31#[derive(Debug, Clone, PartialEq)]
32pub struct DecalData {
33    pub data: DECAL_DATA_DATA, // 00
34}
35const _: () = assert!(std::mem::size_of::<DecalData>() == 0x24);