Compare commits
5 Commits
debug
...
workaround
| Author | SHA1 | Date | |
|---|---|---|---|
| e9414f42b6 | |||
| ef992feb63 | |||
| 17a7e7b738 | |||
| 7a03b079d8 | |||
| 6a3c097741 |
@@ -101,7 +101,6 @@ impl<R:BinReaderExt> File<R>{
|
||||
}
|
||||
let block_start=self.header.block_location[block_id.get() as usize];
|
||||
let block_end=self.header.block_location[block_id.get() as usize+1];
|
||||
//println!("reading from {} to {}",block_start,block_end);
|
||||
self.data.seek(std::io::SeekFrom::Start(block_start)).map_err(Error::Seek)?;
|
||||
Ok(self.as_mut().take_seek(block_end-block_start))
|
||||
}
|
||||
|
||||
185
src/map.rs
185
src/map.rs
@@ -163,114 +163,6 @@ struct MapHeader{
|
||||
render_configs:Vec<newtypes::model::RenderConfig>,
|
||||
}
|
||||
|
||||
fn read_vec<'a,R:BinReaderExt,T:binrw::BinRead>(len:usize,input:&mut R)->Result<Vec<T>,binrw::Error>
|
||||
where
|
||||
<T as binrw::BinRead>::Args<'a>: Default
|
||||
{
|
||||
let mut vec=Vec::with_capacity(len);
|
||||
for _ in 0..len{
|
||||
vec.push(input.read_le()?);
|
||||
}
|
||||
Ok(vec)
|
||||
}
|
||||
|
||||
fn read_stage<R:BinReaderExt>(input:&mut R)->Result<newtypes::gameplay_modes::Stage,binrw::Error>{
|
||||
let spawn=input.read_le()?;
|
||||
let ordered_checkpoints_count=input.read_le()?;
|
||||
let unordered_checkpoints_count=input.read_le()?;
|
||||
//println!("ordered_checkpoints_count={ordered_checkpoints_count}");
|
||||
//println!("unordered_checkpoints_count={unordered_checkpoints_count}");
|
||||
let ordered_checkpoints=read_vec(ordered_checkpoints_count as usize,input)?;
|
||||
let unordered_checkpoints=read_vec(unordered_checkpoints_count as usize,input)?;
|
||||
Ok(newtypes::gameplay_modes::Stage{
|
||||
spawn,
|
||||
ordered_checkpoints_count,
|
||||
unordered_checkpoints_count,
|
||||
ordered_checkpoints,
|
||||
unordered_checkpoints,
|
||||
})
|
||||
}
|
||||
|
||||
fn read_stages<R:BinReaderExt>(len:usize,input:&mut R)->Result<Vec<newtypes::gameplay_modes::Stage>,binrw::Error>{
|
||||
let mut vec=Vec::with_capacity(len);
|
||||
for _ in 0..len{
|
||||
vec.push(read_stage(input)?);
|
||||
}
|
||||
Ok(vec)
|
||||
}
|
||||
|
||||
fn read_mode<R:BinReaderExt>(input:&mut R)->Result<newtypes::gameplay_modes::Mode,binrw::Error>{
|
||||
//println!("read_mode pos={}",input.stream_position().unwrap());
|
||||
let header:newtypes::gameplay_modes::ModeHeader=input.read_le()?;
|
||||
//println!("mode.header pos={}",input.stream_position().unwrap());
|
||||
let style=input.read_le()?;
|
||||
//println!("mode.style pos={}",input.stream_position().unwrap());
|
||||
let start=input.read_le()?;
|
||||
//println!("mode.start pos={}",input.stream_position().unwrap());
|
||||
let zones=read_vec(header.zones as usize,input)?;
|
||||
//println!("mode.zones pos={}",input.stream_position().unwrap());
|
||||
let stages=read_stages(header.stages as usize,input)?;
|
||||
//println!("mode.stages pos={}",input.stream_position().unwrap());
|
||||
let elements=read_vec(header.elements as usize,input)?;
|
||||
Ok(newtypes::gameplay_modes::Mode{
|
||||
header,
|
||||
style,
|
||||
start,
|
||||
zones,
|
||||
stages,
|
||||
elements,
|
||||
})
|
||||
}
|
||||
|
||||
fn read_modes<R:BinReaderExt>(len:usize,input:&mut R)->Result<Vec<newtypes::gameplay_modes::Mode>,binrw::Error>{
|
||||
let mut vec=Vec::with_capacity(len);
|
||||
for _ in 0..len{
|
||||
vec.push(read_mode(input)?);
|
||||
}
|
||||
Ok(vec)
|
||||
}
|
||||
|
||||
fn read_map_header<R:BinReaderExt>(input:&mut R)->Result<MapHeader,binrw::Error>{
|
||||
let p=input.stream_position().unwrap();
|
||||
println!("read_map_header pos={}",p);
|
||||
let num_spacial_blocks:u32=input.read_le()?;
|
||||
println!("map_header.num_spacial_blocks pos={}",input.stream_position().unwrap()-p);
|
||||
let num_resource_blocks:u32=input.read_le()?;
|
||||
println!("map_header.num_resource_blocks pos={}",input.stream_position().unwrap()-p);
|
||||
//let num_resources_external:u32=input.read_le()?;
|
||||
let num_modes:u32=input.read_le()?;
|
||||
println!("map_header.num_modes pos={}",input.stream_position().unwrap()-p);
|
||||
let num_attributes:u32=input.read_le()?;
|
||||
println!("map_header.num_attributes pos={}",input.stream_position().unwrap()-p);
|
||||
let num_render_configs:u32=input.read_le()?;
|
||||
println!("map_header.num_render_configs pos={}",input.stream_position().unwrap()-p);
|
||||
let spacial_blocks:Vec<SpacialBlockHeader>=read_vec(num_spacial_blocks as usize,input)?;
|
||||
println!("map_header.spacial_blocks pos={}",input.stream_position().unwrap()-p);
|
||||
let resource_blocks:Vec<ResourceBlockHeader>=read_vec(num_resource_blocks as usize,input)?;
|
||||
println!("map_header.resource_blocks pos={}",input.stream_position().unwrap()-p);
|
||||
//let external_resources:Vec<ResourceExternalHeader>=read_vec(num_resources_external as usize,input)?;
|
||||
let modes:Vec<newtypes::gameplay_modes::Mode>=read_modes(num_modes as usize,input)?;
|
||||
println!("map_header.modes pos={}",input.stream_position().unwrap()-p);
|
||||
let attributes:Vec<newtypes::gameplay_attributes::CollisionAttributes>=read_vec(num_attributes as usize,input)?;
|
||||
println!("map_header.attributes pos={} len={}",input.stream_position().unwrap()-p,num_attributes);
|
||||
let render_configs:Vec<newtypes::model::RenderConfig>=read_vec(num_render_configs as usize,input)?;
|
||||
println!("map_header.render_configs pos={} len={}",input.stream_position().unwrap()-p,num_render_configs);
|
||||
Ok(MapHeader{
|
||||
num_spacial_blocks,
|
||||
num_resource_blocks,
|
||||
//num_resources_external,
|
||||
num_modes,
|
||||
num_attributes,
|
||||
num_render_configs,
|
||||
spacial_blocks,
|
||||
resource_blocks,
|
||||
//external_resources,
|
||||
modes,
|
||||
attributes,
|
||||
render_configs,
|
||||
})
|
||||
}
|
||||
|
||||
#[binrw]
|
||||
#[brw(little)]
|
||||
struct Region{
|
||||
@@ -321,12 +213,7 @@ pub struct StreamableMap<R:BinReaderExt>{
|
||||
impl<R:BinReaderExt> StreamableMap<R>{
|
||||
pub(crate) fn new(mut file:crate::file::File<R>)->Result<Self,Error>{
|
||||
//assume the file seek is in the right place to start reading a map header
|
||||
let mut f=file.as_mut();
|
||||
//let mut f=file.block_reader(BlockId::new(0)).map_err(Error::File)?;
|
||||
println!("file header end position={}",f.stream_position().unwrap());
|
||||
//let header:MapHeader=f.read_le().map_err(Error::InvalidHeader)?;
|
||||
let header=read_map_header(&mut f).map_err(Error::InvalidHeader)?;
|
||||
println!("map header end position={}",f.stream_position().unwrap());
|
||||
let header:MapHeader=file.as_mut().read_le().map_err(Error::InvalidHeader)?;
|
||||
let modes=header.modes.into_iter().map(Into::into).collect();
|
||||
let attributes=header.attributes.into_iter().map(Into::into).collect();
|
||||
let render_configs=header.render_configs.into_iter().map(Into::into).collect();
|
||||
@@ -418,58 +305,6 @@ impl<R:BinReaderExt> StreamableMap<R>{
|
||||
}
|
||||
}
|
||||
|
||||
use binrw::BinWrite;
|
||||
|
||||
fn write_mode<W:std::io::Seek+std::io::Write>(mode:&newtypes::gameplay_modes::Mode,output:&mut W)->Result<(),binrw::Error>{
|
||||
//println!("write_mode pos={}",output.stream_position().unwrap());
|
||||
mode.header.write_le(output)?;
|
||||
//println!("mode.header pos={}",output.stream_position().unwrap());
|
||||
mode.style.write_le(output)?;
|
||||
//println!("mode.style pos={}",output.stream_position().unwrap());
|
||||
mode.start.write_le(output)?;
|
||||
//println!("mode.start pos={}",output.stream_position().unwrap());
|
||||
mode.zones.write_le(output)?;
|
||||
//println!("mode.zones pos={}",output.stream_position().unwrap());
|
||||
mode.stages.write_le(output)?;
|
||||
//println!("mode.stages pos={}",output.stream_position().unwrap());
|
||||
mode.elements.write_le(output)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn write_modes<W:std::io::Seek+std::io::Write>(modes:&Vec<newtypes::gameplay_modes::Mode>,output:&mut W)->Result<(),binrw::Error>{
|
||||
for mode in modes{
|
||||
write_mode(mode,output)?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn write_map_header<W:std::io::Seek+std::io::Write>(map_header:&MapHeader,output:&mut W)->Result<(),binrw::Error>{
|
||||
println!("write_map_header pos={}",output.stream_position().unwrap());
|
||||
map_header.num_spacial_blocks.write_le(output)?;
|
||||
println!("map_header.num_spacial_blocks pos={}",output.stream_position().unwrap());
|
||||
map_header.num_resource_blocks.write_le(output)?;
|
||||
println!("map_header.num_resource_blocks pos={}",output.stream_position().unwrap());
|
||||
//map_header.num_resources_external.write_le(output)?;
|
||||
map_header.num_modes.write_le(output)?;
|
||||
println!("map_header.num_modes pos={}",output.stream_position().unwrap());
|
||||
map_header.num_attributes.write_le(output)?;
|
||||
println!("map_header.num_attributes pos={}",output.stream_position().unwrap());
|
||||
map_header.num_render_configs.write_le(output)?;
|
||||
println!("map_header.num_render_configs pos={}",output.stream_position().unwrap());
|
||||
map_header.spacial_blocks.write_le(output)?;
|
||||
println!("map_header.spacial_blocks pos={}",output.stream_position().unwrap());
|
||||
map_header.resource_blocks.write_le(output)?;
|
||||
println!("map_header.resource_blocks pos={}",output.stream_position().unwrap());
|
||||
//map_header.external_resources.write_le(output)?;
|
||||
write_modes(&map_header.modes,output)?;
|
||||
println!("map_header.modes pos={}",output.stream_position().unwrap());
|
||||
map_header.attributes.write_le(output)?;
|
||||
println!("map_header.attributes pos={}",output.stream_position().unwrap());
|
||||
map_header.render_configs.write_le(output)?;
|
||||
println!("map_header.render_configs pos={}",output.stream_position().unwrap());
|
||||
Ok(())
|
||||
}
|
||||
|
||||
const BVH_NODE_MAX_WEIGHT:usize=64*1024;//64 kB
|
||||
fn collect_spacial_blocks(
|
||||
block_location:&mut Vec<u64>,
|
||||
@@ -538,7 +373,6 @@ pub fn write_map<W:BinWriterExt>(mut writer:W,map:strafesnet_common::map::Comple
|
||||
let mut cursor_to_data=std::io::Cursor::new(&mut sequential_block_data);
|
||||
collect_spacial_blocks(&mut block_location,&mut spacial_blocks,&mut cursor_to_data,bvh)?;
|
||||
let mut block_count=spacial_blocks.len() as u32+1;//continue block id
|
||||
println!("spacial_blocks={}",block_count);
|
||||
let mut resource_blocks=Vec::new();//for map header
|
||||
//meshes
|
||||
for mesh in map.meshes.into_iter(){
|
||||
@@ -551,8 +385,6 @@ pub fn write_map<W:BinWriterExt>(mut writer:W,map:strafesnet_common::map::Comple
|
||||
binrw::BinWrite::write_le(&serializable_mesh,&mut cursor_to_data).map_err(Error::InvalidData)?;
|
||||
block_location.push(cursor_to_data.position());
|
||||
}
|
||||
let aaa=block_count;
|
||||
println!("mesh_blocks={}",block_count-(spacial_blocks.len() as u32));
|
||||
//textures
|
||||
for mut texture in map.textures.into_iter(){
|
||||
resource_blocks.push(ResourceBlockHeader{
|
||||
@@ -563,7 +395,6 @@ pub fn write_map<W:BinWriterExt>(mut writer:W,map:strafesnet_common::map::Comple
|
||||
sequential_block_data.append(&mut texture);
|
||||
block_location.push(sequential_block_data.len() as u64);
|
||||
}
|
||||
println!("texture_blocks={}",block_count-aaa);
|
||||
//build header
|
||||
let map_header=MapHeader{
|
||||
num_spacial_blocks:spacial_blocks.len() as u32,
|
||||
@@ -591,7 +422,7 @@ pub fn write_map<W:BinWriterExt>(mut writer:W,map:strafesnet_common::map::Comple
|
||||
let mut file_header_data=Vec::new();
|
||||
binrw::BinWrite::write_le(&file_header,&mut std::io::Cursor::new(&mut file_header_data)).map_err(Error::InvalidData)?;
|
||||
let mut map_header_data=Vec::new();
|
||||
write_map_header(&map_header,&mut std::io::Cursor::new(&mut map_header_data)).map_err(Error::InvalidData)?;
|
||||
binrw::BinWrite::write_le(&map_header,&mut std::io::Cursor::new(&mut map_header_data)).map_err(Error::InvalidData)?;
|
||||
|
||||
//update file header according to probe data
|
||||
let mut offset=file_header_data.len() as u64;
|
||||
@@ -602,18 +433,6 @@ pub fn write_map<W:BinWriterExt>(mut writer:W,map:strafesnet_common::map::Comple
|
||||
*position+=offset;
|
||||
}
|
||||
|
||||
//debug
|
||||
println!("block_count={}",file_header.block_count);
|
||||
println!("block_locations[0..10]={:?}",&file_header.block_location[0..10]);
|
||||
println!("file header len={}",file_header_data.len());
|
||||
println!("map header len={}",map_header_data.len());
|
||||
println!("num_spacial_blocks={}",map_header.num_spacial_blocks);
|
||||
println!("num_resource_blocks={}",map_header.num_resource_blocks);
|
||||
//println!("num_resources_external={}",map_header.num_resources_external);
|
||||
println!("num_modes={}",map_header.num_modes);
|
||||
println!("num_attributes={}",map_header.num_attributes);
|
||||
println!("num_render_configs={}",map_header.num_render_configs);
|
||||
|
||||
//write (updated) file header
|
||||
writer.write_le(&file_header).map_err(Error::InvalidData)?;
|
||||
//write map header
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
mod common;
|
||||
pub mod aabb;
|
||||
pub mod model;
|
||||
pub mod integer;
|
||||
|
||||
26
src/newtypes/common.rs
Normal file
26
src/newtypes/common.rs
Normal file
@@ -0,0 +1,26 @@
|
||||
pub const fn flag(b:bool,mask:u8)->u8{
|
||||
(-(b as i8) as u8)&mask
|
||||
}
|
||||
|
||||
#[binrw::binrw]
|
||||
#[brw(little,repr=u8)]
|
||||
pub enum Boolio{
|
||||
True,
|
||||
False
|
||||
}
|
||||
impl Into<bool> for Boolio{
|
||||
fn into(self)->bool{
|
||||
match self{
|
||||
Boolio::True=>true,
|
||||
Boolio::False=>false,
|
||||
}
|
||||
}
|
||||
}
|
||||
impl From<bool> for Boolio{
|
||||
fn from(value:bool)->Self{
|
||||
match value{
|
||||
true=>Boolio::True,
|
||||
false=>Boolio::False,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,28 +1,6 @@
|
||||
use super::common::{flag,Boolio};
|
||||
use super::integer::{Time,Planar64,Planar64Vec3};
|
||||
|
||||
#[binrw::binrw]
|
||||
#[brw(little,repr=u8)]
|
||||
pub enum Boolio{
|
||||
True,
|
||||
False
|
||||
}
|
||||
impl Into<bool> for Boolio{
|
||||
fn into(self)->bool{
|
||||
match self{
|
||||
Boolio::True=>true,
|
||||
Boolio::False=>false,
|
||||
}
|
||||
}
|
||||
}
|
||||
impl From<bool> for Boolio{
|
||||
fn from(value:bool)->Self{
|
||||
match value{
|
||||
true=>Boolio::True,
|
||||
false=>Boolio::False,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[binrw::binrw]
|
||||
#[brw(little)]
|
||||
pub struct ContactingLadder{
|
||||
@@ -316,50 +294,48 @@ impl From<strafesnet_common::gameplay_attributes::Wormhole> for Wormhole{
|
||||
}
|
||||
}
|
||||
|
||||
#[binrw::binrw]
|
||||
#[brw(little)]
|
||||
pub struct GeneralAttributesHeader{
|
||||
pub booster:u8,
|
||||
pub trajectory:u8,
|
||||
pub wormhole:u8,
|
||||
pub accelerator:u8,
|
||||
}
|
||||
#[binrw::binrw]
|
||||
#[brw(little)]
|
||||
pub struct GeneralAttributes{
|
||||
pub header:GeneralAttributesHeader,
|
||||
#[br(count=header.booster)]
|
||||
pub booster:Vec<Booster>,
|
||||
#[br(count=header.trajectory)]
|
||||
pub trajectory:Vec<SetTrajectory>,
|
||||
#[br(count=header.wormhole)]
|
||||
pub wormhole:Vec<Wormhole>,
|
||||
#[br(count=header.accelerator)]
|
||||
pub accelerator:Vec<Accelerator>,
|
||||
pub header:u8,
|
||||
#[br(if(header&Self::BOOSTER!=0))]
|
||||
pub booster:Option<Booster>,
|
||||
#[br(if(header&Self::TRAJECTORY!=0))]
|
||||
pub trajectory:Option<SetTrajectory>,
|
||||
#[br(if(header&Self::WORMHOLE!=0))]
|
||||
pub wormhole:Option<Wormhole>,
|
||||
#[br(if(header&Self::ACCELERATOR!=0))]
|
||||
pub accelerator:Option<Accelerator>,
|
||||
}
|
||||
impl GeneralAttributes{
|
||||
const BOOSTER:u8=1<<0;
|
||||
const TRAJECTORY:u8=1<<1;
|
||||
const WORMHOLE:u8=1<<2;
|
||||
const ACCELERATOR:u8=1<<3;
|
||||
}
|
||||
impl Into<strafesnet_common::gameplay_attributes::GeneralAttributes> for GeneralAttributes{
|
||||
fn into(mut self)->strafesnet_common::gameplay_attributes::GeneralAttributes{
|
||||
fn into(self)->strafesnet_common::gameplay_attributes::GeneralAttributes{
|
||||
strafesnet_common::gameplay_attributes::GeneralAttributes{
|
||||
booster:self.booster.pop().map(Into::into),
|
||||
trajectory:self.trajectory.pop().map(Into::into),
|
||||
wormhole:self.wormhole.pop().map(Into::into),
|
||||
accelerator:self.accelerator.pop().map(Into::into),
|
||||
booster:self.booster.map(Into::into),
|
||||
trajectory:self.trajectory.map(Into::into),
|
||||
wormhole:self.wormhole.map(Into::into),
|
||||
accelerator:self.accelerator.map(Into::into),
|
||||
}
|
||||
}
|
||||
}
|
||||
impl From<strafesnet_common::gameplay_attributes::GeneralAttributes> for GeneralAttributes{
|
||||
fn from(value:strafesnet_common::gameplay_attributes::GeneralAttributes)->Self{
|
||||
let header=
|
||||
flag(value.booster.is_some(),GeneralAttributes::BOOSTER)
|
||||
|flag(value.trajectory.is_some(),GeneralAttributes::TRAJECTORY)
|
||||
|flag(value.wormhole.is_some(),GeneralAttributes::WORMHOLE)
|
||||
|flag(value.accelerator.is_some(),GeneralAttributes::ACCELERATOR);
|
||||
Self{
|
||||
header:GeneralAttributesHeader{
|
||||
booster:value.booster.is_some() as u8,
|
||||
trajectory:value.trajectory.is_some() as u8,
|
||||
wormhole:value.wormhole.is_some() as u8,
|
||||
accelerator:value.accelerator.is_some() as u8,
|
||||
},
|
||||
booster:super::gameplay_style::stupid(value.booster.map(Into::into)),
|
||||
trajectory:super::gameplay_style::stupid(value.trajectory.map(Into::into)),
|
||||
wormhole:super::gameplay_style::stupid(value.wormhole.map(Into::into)),
|
||||
accelerator:super::gameplay_style::stupid(value.accelerator.map(Into::into)),
|
||||
header,
|
||||
booster:value.booster.map(Into::into),
|
||||
trajectory:value.trajectory.map(Into::into),
|
||||
wormhole:value.wormhole.map(Into::into),
|
||||
accelerator:value.accelerator.map(Into::into),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -367,22 +343,25 @@ impl From<strafesnet_common::gameplay_attributes::GeneralAttributes> for General
|
||||
#[binrw::binrw]
|
||||
#[brw(little)]
|
||||
pub struct ContactingAttributes{
|
||||
pub contact_behaviour_enabled:u8,
|
||||
#[br(count=contact_behaviour_enabled)]
|
||||
pub contact_behaviour:Vec<ContactingBehaviour>,
|
||||
pub header:u8,
|
||||
#[br(if(header&Self::CONTACTING_BEHAVIOUR!=0))]
|
||||
pub contact_behaviour:Option<ContactingBehaviour>,
|
||||
}
|
||||
impl ContactingAttributes{
|
||||
const CONTACTING_BEHAVIOUR:u8=1<<0;
|
||||
}
|
||||
impl Into<strafesnet_common::gameplay_attributes::ContactingAttributes> for ContactingAttributes{
|
||||
fn into(mut self)->strafesnet_common::gameplay_attributes::ContactingAttributes{
|
||||
fn into(self)->strafesnet_common::gameplay_attributes::ContactingAttributes{
|
||||
strafesnet_common::gameplay_attributes::ContactingAttributes{
|
||||
contact_behaviour:self.contact_behaviour.pop().map(Into::into),
|
||||
contact_behaviour:self.contact_behaviour.map(Into::into),
|
||||
}
|
||||
}
|
||||
}
|
||||
impl From<strafesnet_common::gameplay_attributes::ContactingAttributes> for ContactingAttributes{
|
||||
fn from(value:strafesnet_common::gameplay_attributes::ContactingAttributes)->Self{
|
||||
Self{
|
||||
contact_behaviour_enabled:value.contact_behaviour.is_some() as u8,
|
||||
contact_behaviour:super::gameplay_style::stupid(value.contact_behaviour.map(Into::into)),
|
||||
header:flag(value.contact_behaviour.is_some(),ContactingAttributes::CONTACTING_BEHAVIOUR),
|
||||
contact_behaviour:value.contact_behaviour.map(Into::into),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -390,22 +369,25 @@ impl From<strafesnet_common::gameplay_attributes::ContactingAttributes> for Cont
|
||||
#[binrw::binrw]
|
||||
#[brw(little)]
|
||||
pub struct IntersectingAttributes{
|
||||
pub water_enabled:u8,
|
||||
#[br(count=water_enabled)]
|
||||
pub water:Vec<IntersectingWater>,
|
||||
pub header:u8,
|
||||
#[br(if(header&Self::INTERSECTING_WATER!=0))]
|
||||
pub water:Option<IntersectingWater>,
|
||||
}
|
||||
impl IntersectingAttributes{
|
||||
const INTERSECTING_WATER:u8=1<<0;
|
||||
}
|
||||
impl Into<strafesnet_common::gameplay_attributes::IntersectingAttributes> for IntersectingAttributes{
|
||||
fn into(mut self)->strafesnet_common::gameplay_attributes::IntersectingAttributes{
|
||||
fn into(self)->strafesnet_common::gameplay_attributes::IntersectingAttributes{
|
||||
strafesnet_common::gameplay_attributes::IntersectingAttributes{
|
||||
water:self.water.pop().map(Into::into),
|
||||
water:self.water.map(Into::into),
|
||||
}
|
||||
}
|
||||
}
|
||||
impl From<strafesnet_common::gameplay_attributes::IntersectingAttributes> for IntersectingAttributes{
|
||||
fn from(value:strafesnet_common::gameplay_attributes::IntersectingAttributes)->Self{
|
||||
Self{
|
||||
water_enabled:value.water.is_some() as u8,
|
||||
water:super::gameplay_style::stupid(value.water.map(Into::into)),
|
||||
header:flag(value.water.is_some(),IntersectingAttributes::INTERSECTING_WATER),
|
||||
water:value.water.map(Into::into),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,68 +1,60 @@
|
||||
#[binrw::binrw]
|
||||
#[brw(little,repr=u8)]
|
||||
pub enum StageElementBehaviour{
|
||||
SpawnAt,//must be standing on top to get effect. except cancollide false
|
||||
Trigger,
|
||||
Teleport,
|
||||
Platform,
|
||||
//Check(point) acts like a trigger if you haven't hit all the checkpoints on previous stages yet.
|
||||
//Note that all stage elements act like this, this is just the isolated behaviour.
|
||||
Check,
|
||||
Checkpoint,//this is a combined behaviour for Ordered & Unordered in case a model is used multiple times or for both.
|
||||
}
|
||||
impl Into<strafesnet_common::gameplay_modes::StageElementBehaviour> for StageElementBehaviour{
|
||||
fn into(self)->strafesnet_common::gameplay_modes::StageElementBehaviour{
|
||||
match self{
|
||||
StageElementBehaviour::SpawnAt=>strafesnet_common::gameplay_modes::StageElementBehaviour::SpawnAt,
|
||||
StageElementBehaviour::Trigger=>strafesnet_common::gameplay_modes::StageElementBehaviour::Trigger,
|
||||
StageElementBehaviour::Teleport=>strafesnet_common::gameplay_modes::StageElementBehaviour::Teleport,
|
||||
StageElementBehaviour::Platform=>strafesnet_common::gameplay_modes::StageElementBehaviour::Platform,
|
||||
StageElementBehaviour::Check=>strafesnet_common::gameplay_modes::StageElementBehaviour::Check,
|
||||
StageElementBehaviour::Checkpoint=>strafesnet_common::gameplay_modes::StageElementBehaviour::Checkpoint,
|
||||
}
|
||||
}
|
||||
}
|
||||
impl From<strafesnet_common::gameplay_modes::StageElementBehaviour> for StageElementBehaviour{
|
||||
fn from(value:strafesnet_common::gameplay_modes::StageElementBehaviour)->Self{
|
||||
match value{
|
||||
strafesnet_common::gameplay_modes::StageElementBehaviour::SpawnAt=>StageElementBehaviour::SpawnAt,
|
||||
strafesnet_common::gameplay_modes::StageElementBehaviour::Trigger=>StageElementBehaviour::Trigger,
|
||||
strafesnet_common::gameplay_modes::StageElementBehaviour::Teleport=>StageElementBehaviour::Teleport,
|
||||
strafesnet_common::gameplay_modes::StageElementBehaviour::Platform=>StageElementBehaviour::Platform,
|
||||
strafesnet_common::gameplay_modes::StageElementBehaviour::Check=>StageElementBehaviour::Check,
|
||||
strafesnet_common::gameplay_modes::StageElementBehaviour::Checkpoint=>StageElementBehaviour::Checkpoint,
|
||||
}
|
||||
}
|
||||
}
|
||||
use super::common::flag;
|
||||
|
||||
#[binrw::binrw]
|
||||
#[brw(little)]
|
||||
pub struct StageElement{
|
||||
pub stage_id:u32,//which stage spawn to send to
|
||||
pub behaviour:StageElementBehaviour,
|
||||
pub jump_limit_enabled:u8,
|
||||
#[br(count=jump_limit_enabled)]
|
||||
pub jump_limit:Vec<u8>,
|
||||
pub force:super::gameplay_attributes::Boolio,//allow setting to lower spawn id i.e. 7->3
|
||||
pub header:u8,
|
||||
pub stage_id:u32,
|
||||
#[br(if(header&Self::JUMP_LIMIT!=0))]
|
||||
pub jump_limit:Option<u8>,
|
||||
}
|
||||
impl StageElement{
|
||||
const BEHAVIOUR:u8=0b00111;
|
||||
const JUMP_LIMIT:u8=1<<3;
|
||||
const FORCE:u8=1<<4;
|
||||
const fn behaviour(&self)->Option<strafesnet_common::gameplay_modes::StageElementBehaviour>{
|
||||
match self.header&Self::BEHAVIOUR{
|
||||
0=>Some(strafesnet_common::gameplay_modes::StageElementBehaviour::SpawnAt),
|
||||
1=>Some(strafesnet_common::gameplay_modes::StageElementBehaviour::Trigger),
|
||||
2=>Some(strafesnet_common::gameplay_modes::StageElementBehaviour::Teleport),
|
||||
3=>Some(strafesnet_common::gameplay_modes::StageElementBehaviour::Platform),
|
||||
4=>Some(strafesnet_common::gameplay_modes::StageElementBehaviour::Check),
|
||||
5=>Some(strafesnet_common::gameplay_modes::StageElementBehaviour::Checkpoint),
|
||||
_=>None,
|
||||
}
|
||||
}
|
||||
const fn force(&self)->bool{
|
||||
self.header&Self::FORCE!=0
|
||||
}
|
||||
}
|
||||
impl Into<strafesnet_common::gameplay_modes::StageElement> for StageElement{
|
||||
fn into(mut self)->strafesnet_common::gameplay_modes::StageElement{
|
||||
fn into(self)->strafesnet_common::gameplay_modes::StageElement{
|
||||
strafesnet_common::gameplay_modes::StageElement::new(
|
||||
strafesnet_common::gameplay_modes::StageId::new(self.stage_id),
|
||||
self.force.into(),
|
||||
self.behaviour.into(),
|
||||
self.jump_limit.pop(),
|
||||
self.force(),
|
||||
self.behaviour().unwrap(),
|
||||
self.jump_limit,
|
||||
)
|
||||
}
|
||||
}
|
||||
impl From<strafesnet_common::gameplay_modes::StageElement> for StageElement{
|
||||
fn from(value:strafesnet_common::gameplay_modes::StageElement)->Self{
|
||||
let behaviour=match value.behaviour(){
|
||||
strafesnet_common::gameplay_modes::StageElementBehaviour::SpawnAt=>0,
|
||||
strafesnet_common::gameplay_modes::StageElementBehaviour::Trigger=>1,
|
||||
strafesnet_common::gameplay_modes::StageElementBehaviour::Teleport=>2,
|
||||
strafesnet_common::gameplay_modes::StageElementBehaviour::Platform=>3,
|
||||
strafesnet_common::gameplay_modes::StageElementBehaviour::Check=>4,
|
||||
strafesnet_common::gameplay_modes::StageElementBehaviour::Checkpoint=>5,
|
||||
};
|
||||
let header=
|
||||
behaviour
|
||||
|flag(value.jump_limit().is_some(),StageElement::JUMP_LIMIT)
|
||||
|flag(value.force(),StageElement::FORCE);
|
||||
Self{
|
||||
header,
|
||||
stage_id:value.stage_id().get(),
|
||||
behaviour:value.behaviour().into(),
|
||||
jump_limit_enabled:value.jump_limit().is_some() as u8,
|
||||
jump_limit:super::gameplay_style::stupid(value.jump_limit()),
|
||||
force:value.force().into(),
|
||||
jump_limit:value.jump_limit(),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -117,8 +109,7 @@ impl From<strafesnet_common::gameplay_modes::Stage> for Stage{
|
||||
}
|
||||
|
||||
#[binrw::binrw]
|
||||
#[brw(little,repr=u32)]
|
||||
#[repr(u32)]
|
||||
#[brw(little,repr=u8)]
|
||||
pub enum Zone{
|
||||
Start,
|
||||
Finish,
|
||||
@@ -145,7 +136,6 @@ impl From<strafesnet_common::gameplay_modes::Zone> for Zone{
|
||||
|
||||
#[binrw::binrw]
|
||||
#[brw(little)]
|
||||
#[derive(Debug)]
|
||||
pub struct ModeHeader{
|
||||
pub zones:u32,
|
||||
pub stages:u32,
|
||||
|
||||
@@ -1,53 +1,51 @@
|
||||
use super::common::flag;
|
||||
use super::integer::{Time,Ratio64,Planar64,Planar64Vec3};
|
||||
|
||||
pub type Controls=u32;
|
||||
|
||||
#[binrw::binrw]
|
||||
#[brw(little)]
|
||||
pub struct StyleModifiersHeader{
|
||||
pub strafe:u8,
|
||||
pub rocket:u8,
|
||||
pub jump:u8,
|
||||
pub walk:u8,
|
||||
pub ladder:u8,
|
||||
pub swim:u8,
|
||||
}
|
||||
|
||||
#[binrw::binrw]
|
||||
#[brw(little)]
|
||||
pub struct StyleModifiers{
|
||||
pub header:StyleModifiersHeader,
|
||||
pub header:u8,
|
||||
pub controls_mask:Controls,
|
||||
pub controls_mask_state:Controls,
|
||||
#[br(count=header.strafe)]
|
||||
pub strafe:Vec<StrafeSettings>,
|
||||
#[br(count=header.rocket)]
|
||||
pub rocket:Vec<PropulsionSettings>,
|
||||
#[br(count=header.jump)]
|
||||
pub jump:Vec<JumpSettings>,
|
||||
#[br(count=header.walk)]
|
||||
pub walk:Vec<WalkSettings>,
|
||||
#[br(count=header.ladder)]
|
||||
pub ladder:Vec<LadderSettings>,
|
||||
#[br(count=header.swim)]
|
||||
pub swim:Vec<PropulsionSettings>,
|
||||
#[br(if(header&Self::STRAFE!=0))]
|
||||
pub strafe:Option<StrafeSettings>,
|
||||
#[br(if(header&Self::ROCKET!=0))]
|
||||
pub rocket:Option<PropulsionSettings>,
|
||||
#[br(if(header&Self::JUMP!=0))]
|
||||
pub jump:Option<JumpSettings>,
|
||||
#[br(if(header&Self::WALK!=0))]
|
||||
pub walk:Option<WalkSettings>,
|
||||
#[br(if(header&Self::LADDER!=0))]
|
||||
pub ladder:Option<LadderSettings>,
|
||||
#[br(if(header&Self::SWIM!=0))]
|
||||
pub swim:Option<PropulsionSettings>,
|
||||
pub gravity:Planar64Vec3,
|
||||
pub hitbox:Hitbox,
|
||||
pub camera_offset:Planar64Vec3,
|
||||
pub mass:Planar64,
|
||||
}
|
||||
impl StyleModifiers{
|
||||
const STRAFE:u8=1<<0;
|
||||
const ROCKET:u8=1<<1;
|
||||
const JUMP:u8=1<<2;
|
||||
const WALK:u8=1<<3;
|
||||
const LADDER:u8=1<<4;
|
||||
const SWIM:u8=1<<5;
|
||||
}
|
||||
impl Into<strafesnet_common::gameplay_style::StyleModifiers> for StyleModifiers{
|
||||
fn into(mut self)->strafesnet_common::gameplay_style::StyleModifiers{
|
||||
fn into(self)->strafesnet_common::gameplay_style::StyleModifiers{
|
||||
strafesnet_common::gameplay_style::StyleModifiers{
|
||||
//TODO: fail gracefully in binrw instead of panicing here
|
||||
controls_mask:strafesnet_common::controls_bitflag::Controls::from_bits(self.controls_mask).unwrap(),
|
||||
controls_mask_state:strafesnet_common::controls_bitflag::Controls::from_bits(self.controls_mask_state).unwrap(),
|
||||
strafe:self.strafe.pop().map(Into::into),
|
||||
rocket:self.rocket.pop().map(Into::into),
|
||||
jump:self.jump.pop().map(Into::into),
|
||||
walk:self.walk.pop().map(Into::into),
|
||||
ladder:self.ladder.pop().map(Into::into),
|
||||
swim:self.swim.pop().map(Into::into),
|
||||
strafe:self.strafe.map(Into::into),
|
||||
rocket:self.rocket.map(Into::into),
|
||||
jump:self.jump.map(Into::into),
|
||||
walk:self.walk.map(Into::into),
|
||||
ladder:self.ladder.map(Into::into),
|
||||
swim:self.swim.map(Into::into),
|
||||
gravity:strafesnet_common::integer::Planar64Vec3::raw_array(self.gravity),
|
||||
hitbox:self.hitbox.into(),
|
||||
camera_offset:strafesnet_common::integer::Planar64Vec3::raw_array(self.camera_offset),
|
||||
@@ -55,31 +53,25 @@ impl Into<strafesnet_common::gameplay_style::StyleModifiers> for StyleModifiers{
|
||||
}
|
||||
}
|
||||
}
|
||||
pub(crate) fn stupid<T>(o:Option<T>)->Vec<T>{
|
||||
match o{
|
||||
Some(v)=>vec![v],
|
||||
None=>Vec::new(),
|
||||
}
|
||||
}
|
||||
impl From<strafesnet_common::gameplay_style::StyleModifiers> for StyleModifiers{
|
||||
fn from(value:strafesnet_common::gameplay_style::StyleModifiers)->Self{
|
||||
let header=
|
||||
flag(value.strafe.is_some(),StyleModifiers::STRAFE)
|
||||
|flag(value.rocket.is_some(),StyleModifiers::ROCKET)
|
||||
|flag(value.jump.is_some(),StyleModifiers::JUMP)
|
||||
|flag(value.walk.is_some(),StyleModifiers::WALK)
|
||||
|flag(value.ladder.is_some(),StyleModifiers::LADDER)
|
||||
|flag(value.swim.is_some(),StyleModifiers::SWIM);
|
||||
Self{
|
||||
header:StyleModifiersHeader{
|
||||
strafe:value.strafe.is_some() as u8,
|
||||
rocket:value.rocket.is_some() as u8,
|
||||
jump:value.jump.is_some() as u8,
|
||||
walk:value.walk.is_some() as u8,
|
||||
ladder:value.ladder.is_some() as u8,
|
||||
swim:value.swim.is_some() as u8,
|
||||
},
|
||||
header,
|
||||
controls_mask:value.controls_mask.bits(),
|
||||
controls_mask_state:value.controls_mask_state.bits(),
|
||||
strafe:stupid(value.strafe.map(Into::into)),
|
||||
rocket:stupid(value.rocket.map(Into::into)),
|
||||
jump:stupid(value.jump.map(Into::into)),
|
||||
walk:stupid(value.walk.map(Into::into)),
|
||||
ladder:stupid(value.ladder.map(Into::into)),
|
||||
swim:stupid(value.swim.map(Into::into)),
|
||||
strafe:value.strafe.map(Into::into),
|
||||
rocket:value.rocket.map(Into::into),
|
||||
jump:value.jump.map(Into::into),
|
||||
walk:value.walk.map(Into::into),
|
||||
ladder:value.ladder.map(Into::into),
|
||||
swim:value.swim.map(Into::into),
|
||||
gravity:value.gravity.get().to_array(),
|
||||
hitbox:value.hitbox.into(),
|
||||
camera_offset:value.camera_offset.get().to_array(),
|
||||
@@ -114,8 +106,7 @@ impl From<strafesnet_common::gameplay_style::JumpCalculation> for JumpCalculatio
|
||||
}
|
||||
}
|
||||
|
||||
#[binrw::binrw]
|
||||
#[brw(little)]
|
||||
//TODO: test this
|
||||
pub enum JumpImpulse{
|
||||
FromTime(Time),
|
||||
FromHeight(Planar64),
|
||||
@@ -172,19 +163,22 @@ impl From<strafesnet_common::gameplay_style::ControlsActivation> for ControlsAct
|
||||
#[binrw::binrw]
|
||||
#[brw(little)]
|
||||
pub struct StrafeSettings{
|
||||
header:u8,
|
||||
enable:ControlsActivation,
|
||||
mv:Planar64,
|
||||
air_accel_limit_enabled:u8,
|
||||
#[br(count=air_accel_limit_enabled)]
|
||||
air_accel_limit:Vec<Planar64>,
|
||||
#[br(if(header&Self::AIR_ACCEL_LIMIT!=0))]
|
||||
air_accel_limit:Option<Planar64>,
|
||||
tick_rate:Ratio64,
|
||||
}
|
||||
impl StrafeSettings{
|
||||
const AIR_ACCEL_LIMIT:u8=1<<0;
|
||||
}
|
||||
impl Into<strafesnet_common::gameplay_style::StrafeSettings> for StrafeSettings{
|
||||
fn into(mut self)->strafesnet_common::gameplay_style::StrafeSettings{
|
||||
fn into(self)->strafesnet_common::gameplay_style::StrafeSettings{
|
||||
strafesnet_common::gameplay_style::StrafeSettings::new(
|
||||
self.enable.into(),
|
||||
strafesnet_common::integer::Planar64::raw(self.mv),
|
||||
self.air_accel_limit.pop().map(strafesnet_common::integer::Planar64::raw),
|
||||
self.air_accel_limit.map(strafesnet_common::integer::Planar64::raw),
|
||||
self.tick_rate.into(),
|
||||
)
|
||||
}
|
||||
@@ -192,11 +186,12 @@ impl Into<strafesnet_common::gameplay_style::StrafeSettings> for StrafeSettings{
|
||||
impl From<strafesnet_common::gameplay_style::StrafeSettings> for StrafeSettings{
|
||||
fn from(value:strafesnet_common::gameplay_style::StrafeSettings)->Self{
|
||||
let (enable,mv,air_accel_limit,tick_rate)=value.into_inner();
|
||||
let header=flag(air_accel_limit.is_some(),StrafeSettings::AIR_ACCEL_LIMIT);
|
||||
Self{
|
||||
header,
|
||||
enable:enable.into(),
|
||||
mv:mv.get(),
|
||||
air_accel_limit_enabled:air_accel_limit.is_some() as u8,
|
||||
air_accel_limit:stupid(air_accel_limit.map(|a|a.get())),
|
||||
air_accel_limit:air_accel_limit.map(|a|a.get()),
|
||||
tick_rate:tick_rate.into(),
|
||||
}
|
||||
}
|
||||
@@ -225,23 +220,58 @@ impl From<strafesnet_common::gameplay_style::PropulsionSettings> for PropulsionS
|
||||
#[binrw::binrw]
|
||||
#[brw(little)]
|
||||
pub struct JumpSettings{
|
||||
impulse:JumpImpulse,
|
||||
calculation:JumpCalculation,
|
||||
header:u8,
|
||||
impulse:i64,
|
||||
}
|
||||
impl JumpSettings{
|
||||
const IMPULSE:u8=0b0011;
|
||||
const CALCULATION:u8=0b1100;
|
||||
const fn impulse(&self)->Option<strafesnet_common::gameplay_style::JumpImpulse>{
|
||||
match self.header&Self::IMPULSE{
|
||||
0=>Some(strafesnet_common::gameplay_style::JumpImpulse::FromTime(strafesnet_common::integer::Time::raw(self.impulse))),
|
||||
1=>Some(strafesnet_common::gameplay_style::JumpImpulse::FromHeight(strafesnet_common::integer::Planar64::raw(self.impulse))),
|
||||
2=>Some(strafesnet_common::gameplay_style::JumpImpulse::FromDeltaV(strafesnet_common::integer::Planar64::raw(self.impulse))),
|
||||
3=>Some(strafesnet_common::gameplay_style::JumpImpulse::FromEnergy(strafesnet_common::integer::Planar64::raw(self.impulse))),
|
||||
_=>None,
|
||||
}
|
||||
}
|
||||
const fn calculation(&self)->Option<strafesnet_common::gameplay_style::JumpCalculation>{
|
||||
match (self.header&Self::CALCULATION)>>2{
|
||||
0=>Some(strafesnet_common::gameplay_style::JumpCalculation::Capped),
|
||||
1=>Some(strafesnet_common::gameplay_style::JumpCalculation::Energy),
|
||||
2=>Some(strafesnet_common::gameplay_style::JumpCalculation::Linear),
|
||||
_=>None,
|
||||
}
|
||||
}
|
||||
}
|
||||
impl Into<strafesnet_common::gameplay_style::JumpSettings> for JumpSettings{
|
||||
fn into(self)->strafesnet_common::gameplay_style::JumpSettings{
|
||||
strafesnet_common::gameplay_style::JumpSettings::new(
|
||||
self.impulse.into(),
|
||||
self.calculation.into(),
|
||||
self.impulse().unwrap(),
|
||||
self.calculation().unwrap(),
|
||||
)
|
||||
}
|
||||
}
|
||||
impl From<strafesnet_common::gameplay_style::JumpSettings> for JumpSettings{
|
||||
fn from(value:strafesnet_common::gameplay_style::JumpSettings)->Self{
|
||||
let (impulse,calculation)=value.into_inner();
|
||||
let (impulse_enum,calculation)=value.into_inner();
|
||||
let (impulse,impulse_header)=match impulse_enum{
|
||||
strafesnet_common::gameplay_style::JumpImpulse::FromTime(impulse)=>(impulse.get(),0),
|
||||
strafesnet_common::gameplay_style::JumpImpulse::FromHeight(impulse)=>(impulse.get(),1),
|
||||
strafesnet_common::gameplay_style::JumpImpulse::FromDeltaV(impulse)=>(impulse.get(),2),
|
||||
strafesnet_common::gameplay_style::JumpImpulse::FromEnergy(impulse)=>(impulse.get(),3),
|
||||
};
|
||||
let calculation_header=match calculation{
|
||||
strafesnet_common::gameplay_style::JumpCalculation::Capped=>0,
|
||||
strafesnet_common::gameplay_style::JumpCalculation::Energy=>1,
|
||||
strafesnet_common::gameplay_style::JumpCalculation::Linear=>2,
|
||||
};
|
||||
let header=
|
||||
impulse_header
|
||||
|(calculation_header<<2);
|
||||
Self{
|
||||
impulse:impulse.into(),
|
||||
calculation:calculation.into(),
|
||||
header,
|
||||
impulse,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
use super::common::flag;
|
||||
use strafesnet_common::model::PolygonIter;
|
||||
|
||||
use super::integer::{Planar64Vec3,Planar64Affine3};
|
||||
@@ -60,22 +61,26 @@ impl From<strafesnet_common::model::PolygonGroup> for PolygonGroup{
|
||||
#[binrw::binrw]
|
||||
#[brw(little)]
|
||||
pub struct RenderConfig{
|
||||
pub texture_enabled:u8,
|
||||
#[br(count=texture_enabled)]
|
||||
pub texture:Vec<u32>,
|
||||
pub header:u8,
|
||||
#[br(if(header&Self::TEXTURE!=0))]
|
||||
pub texture:Option<u32>,
|
||||
}
|
||||
impl RenderConfig{
|
||||
const TEXTURE:u8=1<<0;
|
||||
}
|
||||
impl Into<strafesnet_common::model::RenderConfig> for RenderConfig{
|
||||
fn into(mut self)->strafesnet_common::model::RenderConfig{
|
||||
fn into(self)->strafesnet_common::model::RenderConfig{
|
||||
strafesnet_common::model::RenderConfig{
|
||||
texture:self.texture.pop().map(strafesnet_common::model::TextureId::new),
|
||||
texture:self.texture.map(strafesnet_common::model::TextureId::new),
|
||||
}
|
||||
}
|
||||
}
|
||||
impl From<strafesnet_common::model::RenderConfig> for RenderConfig{
|
||||
fn from(value:strafesnet_common::model::RenderConfig)->Self{
|
||||
let header=flag(value.texture.is_some(),RenderConfig::TEXTURE);
|
||||
Self{
|
||||
texture_enabled:value.texture.is_some() as u8,
|
||||
texture:super::gameplay_style::stupid(value.texture.map(|texture_id|texture_id.get())),
|
||||
header,
|
||||
texture:value.texture.map(|texture_id|texture_id.get()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user