use binrw::binrw;
use crate::{
common_file_operations::{read_bool_from, write_bool_as},
layer::Color,
string_heap::{HeapPointer, HeapString, StringHeap},
};
#[binrw]
#[br(import(string_heap: &StringHeap, heap_pointer: HeapPointer))]
#[bw(import(string_heap: &mut StringHeap))]
#[derive(Debug, PartialEq)]
pub struct VFXInstanceObject {
#[br(args(heap_pointer, string_heap))]
#[bw(args(string_heap))]
pub asset_path: HeapString,
#[brw(pad_after = 4)] pub soft_particle_fade_range: f32,
pub color: Color,
#[br(map = read_bool_from::<u8>)]
#[bw(map = write_bool_as::<u8>)]
pub auto_play: bool,
#[br(map = read_bool_from::<u8>)]
#[bw(map = write_bool_as::<u8>)]
#[brw(pad_after = 2)] pub no_far_clip: bool,
pub fade_near_start: f32,
pub fade_near_end: f32,
pub fade_far_start: f32,
pub fade_far_end: f32,
pub z_correct: f32,
}
#[binrw]
#[brw(repr = i32)]
#[repr(C)]
#[derive(Debug, PartialEq, Clone, Copy)]
pub enum LineStyle {
Red = 0x1,
Blue = 0x2,
}
#[binrw]
#[derive(Debug, PartialEq)]
pub struct LineVFXInstanceObject {
pub line_style: LineStyle,
padding: [u32; 2],
}