rust/lib-hedgewars-engine/src/world.rs
changeset 14714 4df1aac5f090
parent 14711 40809bfd44af
child 14715 e519802076e9
--- a/rust/lib-hedgewars-engine/src/world.rs	Fri Mar 22 22:26:41 2019 +0300
+++ b/rust/lib-hedgewars-engine/src/world.rs	Fri Mar 22 23:45:59 2019 +0300
@@ -41,7 +41,8 @@
     }
 
     pub fn create_renderer(&mut self, width: u16, height: u16) {
-        self.renderer = Some(MapRenderer::new(512, 512));
+        let land_tile_size = Size::square(512);
+        self.renderer = Some(MapRenderer::new(land_tile_size));
         self.camera = Camera::with_size(Size::new(width as usize, height as usize));
 
         use mapgen::{theme::Theme, MapGenerator};
@@ -49,7 +50,7 @@
 
         if let Some(ref state) = self.game_state {
             self.camera.position = state.land.play_box().center();
-            
+
             let theme =
                 Theme::load(Path::new("../../share/hedgewars/Data/Themes/Cheese/")).unwrap();
             let texture = MapGenerator::new().make_texture(&state.land, &theme);