comparison examples/stdrenderer.rs @ 701:b6c351ca0a35

anm0: return the nom IResult and the list of Anm0s.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Fri, 23 Aug 2019 15:34:03 +0200
parents ccb739c5b66c
children bca515da9047
comparison
equal deleted inserted replaced
700:ccb739c5b66c 701:b6c351ca0a35
130 let buf = load_file_into_vec(std_filename); 130 let buf = load_file_into_vec(std_filename);
131 let (_, stage) = Stage::from_slice(&buf).unwrap(); 131 let (_, stage) = Stage::from_slice(&buf).unwrap();
132 132
133 // Open the ANM file. 133 // Open the ANM file.
134 let buf = load_file_into_vec(anm_filename); 134 let buf = load_file_into_vec(anm_filename);
135 let anm0 = Anm0::from_slice(&buf).unwrap(); 135 let (_, mut anms) = Anm0::from_slice(&buf).unwrap();
136 let anm0 = anms.pop().unwrap();
136 137
137 // TODO: seed this PRNG with a valid seed. 138 // TODO: seed this PRNG with a valid seed.
138 let prng = Rc::new(RefCell::new(Prng::new(0))); 139 let prng = Rc::new(RefCell::new(Prng::new(0)));
139 140
140 assert_eq!(std::mem::size_of::<Vertex>(), std::mem::size_of::<FakeVertex>()); 141 assert_eq!(std::mem::size_of::<Vertex>(), std::mem::size_of::<FakeVertex>());