more probably useless things pog

This commit is contained in:
bgkillas 2025-08-18 13:45:53 -04:00
parent c93f6dfd82
commit 525b5dfba2
3 changed files with 24 additions and 1 deletions

View file

@ -309,6 +309,12 @@ impl<T> StdVec<T> {
cap: self.cap,
}
}
pub fn iter(&self) -> impl Iterator<Item = &T> {
self.as_ref().iter()
}
pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut T> {
self.as_mut().iter_mut()
}
pub fn capacity(&self) -> usize {
unsafe { self.cap.offset_from_unsigned(self.start) }
}

View file

@ -424,10 +424,25 @@ impl BitSet<8> {
#[repr(C)]
#[derive(Debug, Default)]
pub struct ComponentSystemManager {
pub list: StdVec<&'static ComponentSystem>,
pub update_order: StdVec<&'static ComponentSystem>,
pub component_updaters: StdVec<&'static ComponentUpdater>,
pub map: StdMap<StdString, [*const usize; 4]>,
pub unk: [*const usize; 8],
pub unk2: StdVec<*const usize>,
pub unk3: [*const usize; 7],
}
#[repr(C)]
#[derive(Debug)]
pub struct ComponentUpdater {
pub vtable: &'static ComponentUpdaterVTable,
pub name: StdString,
pub unk: [*const usize; 8],
}
#[repr(C)]
#[derive(Debug)]
pub struct ComponentUpdaterVTable {}
#[repr(C)]
#[derive(Debug)]
pub struct ComponentSystem {
pub vtable: &'static ComponentSystemVTable,
pub unk: [*const usize; 2],

View file

@ -756,6 +756,7 @@ pub struct EntityManager {
pub entities: StdVec<*mut Entity>,
pub entity_buckets: StdVec<StdVec<*mut Entity>>,
pub component_buffers: StdVec<*mut ComponentBuffer>,
pub unk: usize,
}
impl Default for EntityManager {
fn default() -> Self {
@ -766,6 +767,7 @@ impl Default for EntityManager {
entities: Default::default(),
entity_buckets: Default::default(),
component_buffers: Default::default(),
unk: 0,
}
}
}