diff --git a/src/fot/entitylist.rs b/src/fot/entitylist.rs index 498ab96..703ef3d 100644 --- a/src/fot/entitylist.rs +++ b/src/fot/entitylist.rs @@ -18,6 +18,7 @@ pub struct EntityList { encoding: EntityEncoding, entity_file_tag: Option, entity_tag: Option, + unk1: u32, enc_size: usize, types: Vec, @@ -57,6 +58,7 @@ impl DecoderCtx for EntityList { encoding: ctx, entity_file_tag: None, entity_tag: None, + unk1: 0, enc_size: 0, types: Vec::new(), entities: Vec::new() @@ -81,7 +83,18 @@ impl DecoderCtx for EntityList { }, EntityEncoding::World => { + ent_list.entity_file_tag = Some(rd.read(0)?); + let n = rd.read_u32()?; + for _ in 0..n { + ent_list.types.push(rd.read(0)?); + } + let m = rd.read_u16()?; + ent_list.unk1 = rd.read_u32()?; + for _ in 0..m { + let ent: Entity = rd.read_opt(0, &mut ent_list)?; + ent_list.entities.push(ent); + } ent_list.enc_size = rd.offset() - offset; ent_list