equal
deleted
inserted
replaced
37 gear_entries: Vec<GearEntry>, |
37 gear_entries: Vec<GearEntry>, |
38 data_path: PathBuf, |
38 data_path: PathBuf, |
39 } |
39 } |
40 |
40 |
41 impl World { |
41 impl World { |
42 pub fn new() -> Self { |
42 pub fn new(data_path: &Path) -> Self { |
43 Self { |
43 Self { |
44 random_numbers_gen: LaggedFibonacciPRNG::new(&[]), |
44 random_numbers_gen: LaggedFibonacciPRNG::new(&[]), |
45 feature_size: 5, |
45 feature_size: 5, |
46 preview: None, |
46 preview: None, |
47 game_state: None, |
47 game_state: None, |
48 map_renderer: None, |
48 map_renderer: None, |
49 gear_renderer: None, |
49 gear_renderer: None, |
50 camera: Camera::new(), |
50 camera: Camera::new(), |
51 gear_entries: vec![], |
51 gear_entries: vec![], |
52 data_path: PathBuf::from("../../share/hedgewars/Data"), |
52 data_path: data_path.to_owned(), |
53 } |
53 } |
54 } |
54 } |
55 |
55 |
56 pub fn create_renderer(&mut self, width: u16, height: u16) { |
56 pub fn create_renderer(&mut self, width: u16, height: u16) { |
57 let land_tile_size = Size::square(512); |
57 let land_tile_size = Size::square(512); |