equal
deleted
inserted
replaced
46 |
46 |
47 use mapgen::{theme::Theme, MapGenerator}; |
47 use mapgen::{theme::Theme, MapGenerator}; |
48 use std::path::Path; |
48 use std::path::Path; |
49 |
49 |
50 if let Some(ref state) = self.game_state { |
50 if let Some(ref state) = self.game_state { |
|
51 self.camera.position = state.land.play_box().center(); |
|
52 |
51 let theme = |
53 let theme = |
52 Theme::load(Path::new("../../share/hedgewars/Data/Themes/Cheese/")).unwrap(); |
54 Theme::load(Path::new("../../share/hedgewars/Data/Themes/Cheese/")).unwrap(); |
53 let texture = MapGenerator::new().make_texture(&state.land, &theme); |
55 let texture = MapGenerator::new().make_texture(&state.land, &theme); |
54 if let Some(ref mut renderer) = self.renderer { |
56 if let Some(ref mut renderer) = self.renderer { |
55 renderer.init(&texture); |
57 renderer.init(&texture); |