use std::{marker::PhantomData, ptr::NonNull};
use shared::StepperStates;
use crate::UnkDLTree;
use crate::dlkr::DLAllocator;
use crate::dltx::DLString;
use crate::fd4::FD4Time;
pub type FD4StepBase<Subject, Base, States> = FD4StepTemplateBase<Subject, Base, States>;
#[repr(C)]
pub struct FD4StepTemplateBase<Subject, Base, States: StepperStates> {
base: FD4StepTemplateInterface<Base, Subject>,
pub stepper_fns: NonNull<States::StepperFnArray<StepperFn<Subject>>>,
pub attach: FD4ComponentAttachSystem_Step,
pub current_state: States,
pub requested_state: States,
unk48: u8,
pub allocator: &'static DLAllocator,
unk58: usize,
unk60: i8,
unk61: bool,
unk68: DLString,
pub debug_state_label: *const u16,
unka0: bool,
unka4: i32,
}
#[repr(C)]
pub struct FD4StepTemplateInterface<Base, Subject> {
base: Base,
_phantom_data: PhantomData<Subject>,
}
#[repr(C)]
pub struct FD4StepBaseInterface {
vftable: *const (),
}
#[repr(C)]
pub struct StepperFn<T> {
pub executor: extern "C" fn(&mut T, &FD4Time),
pub name: *const u16,
}
#[repr(C)]
pub struct FD4ComponentAttachSystem {
vftable: *const (),
unk8: UnkDLTree<()>,
pub allocator: &'static DLAllocator,
}
#[allow(non_camel_case_types)]
#[repr(C)]
pub struct FD4ComponentAttachSystem_Step {
pub base: FD4ComponentAttachSystem,
pub allocator: &'static DLAllocator,
}