rust/lib-hwengine-future/src/lib.rs
changeset 16065 33f09636018b
parent 16062 288df7b85efc
child 16073 5d302b12d837
equal deleted inserted replaced
16064:07cb6dbc8444 16065:33f09636018b
   101     let template_type: &str = CStr::from_ptr(template_type).to_str().unwrap();
   101     let template_type: &str = CStr::from_ptr(template_type).to_str().unwrap();
   102 
   102 
   103     let mut random_numbers_gen = LaggedFibonacciPRNG::new(seed.as_bytes());
   103     let mut random_numbers_gen = LaggedFibonacciPRNG::new(seed.as_bytes());
   104 
   104 
   105     let yaml_templates =
   105     let yaml_templates =
   106         fs::read_to_string(data_path.join(Path::new("wfc_templates.yaml")).as_path())
   106         fs::read_to_string(data_path.join(Path::new("wfc_templates.toml")).as_path())
   107             .expect("Error reading map templates file");
   107             .expect("Error reading map templates file");
   108     let mut map_gen = MapGenerator::<WfcTemplate>::new(data_path);
   108     let mut map_gen = MapGenerator::<WfcTemplate>::new(data_path);
   109     map_gen.import_yaml_templates(&yaml_templates);
   109     map_gen.import_yaml_templates(&yaml_templates);
   110 
   110 
   111     let template = map_gen
   111     let template = map_gen