rust/lib-hwengine-future/src/lib.rs
branchtransitional_engine
changeset 16053 3402b2185698
parent 15953 d46ad15c6dec
child 16055 ce4b50823a95
--- a/rust/lib-hwengine-future/src/lib.rs	Wed Aug 28 17:16:23 2024 +0200
+++ b/rust/lib-hwengine-future/src/lib.rs	Thu Aug 29 12:56:16 2024 +0200
@@ -64,7 +64,7 @@
     let yaml_templates =
         fs::read_to_string(data_path.join(Path::new("wfc_templates.yaml")).as_path())
             .expect("Error reading map templates file");
-    let mut map_gen = MapGenerator::<WfcTemplate>::new();
+    let mut map_gen = MapGenerator::<WfcTemplate>::new(data_path);
     map_gen.import_yaml_templates(&yaml_templates);
 
     let distance_divisor = feature_size.pow(2) / 8 + 10;
@@ -96,7 +96,7 @@
     let data_path = Path::new(&data_path);
 
     let theme_name: &str = unsafe { CStr::from_ptr(theme_name) }.to_str().unwrap();
-    let map_gen = MapGenerator::<()>::new();
+    let map_gen = MapGenerator::<()>::new(data_path);
 
     let theme = Theme::load(
         data_path