rust/lib-hedgewars-engine/src/world.rs
changeset 14734 cc6ab1e3f7d5
parent 14732 40809bfd44af
child 14736 e519802076e9
equal deleted inserted replaced
14733:57293f34ce59 14734:cc6ab1e3f7d5
    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();
    51             self.camera.position = state.land.play_box().center();
    52             
    52 
    53             let theme =
    53             let theme =
    54                 Theme::load(Path::new("../../share/hedgewars/Data/Themes/Cheese/")).unwrap();
    54                 Theme::load(Path::new("../../share/hedgewars/Data/Themes/Cheese/")).unwrap();
    55             let texture = MapGenerator::new().make_texture(&state.land, &theme);
    55             let texture = MapGenerator::new().make_texture(&state.land, &theme);
    56             if let Some(ref mut renderer) = self.renderer {
    56             if let Some(ref mut renderer) = self.renderer {
    57                 renderer.init(&texture);
    57                 renderer.init(&texture);