fn inner_render(config: &crate::cli::Config, iter: GroupMapSquareIterator) -> CacheResult<()> {
    let location_definitions = LocationConfig::dump_all(config)?;

    #[cfg(any(feature = "rs3", feature = "osrs"))]
    let overlay_definitions = Overlay::dump_all(config)?;
    #[cfg(any(feature = "rs3", feature = "osrs"))]
    let underlay_definitions = Underlay::dump_all(config)?;

    #[cfg(any(feature = "rs3", feature = "2009_1_shim"))]
    let mapscenes = MapScene::dump_all(config)?;

    #[cfg(any(feature = "rs3", feature = "2009_1_shim"))]
    let sprites = sprites::dumps(
        CONFIG.scale,
        mapscenes.values().filter_map(|mapscene| mapscene.sprite_id).collect::<Vec<_>>(),
        config,
    )?;

    let folder = path!(config.output / "mapsquares");

    #[cfg(all(feature = "osrs", not(feature = "2009_1_shim")))]
    let sprites = sprites::dumps(CONFIG.scale, vec![317], config)?; // 317 is the sprite named "mapscene"

    #[cfg(feature = "legacy")]
    let sprites: BTreeMap<(u32, u32), Sprite> = sprites::get_mapscenes(CONFIG.scale, config)?;

    #[cfg(feature = "legacy")]
    let flos = Flo::dump_all(config)?;

    iter.progress().par_bridge().for_each(|gsq| {
        render_tile(
            &folder,
            gsq,
            &location_definitions,
            #[cfg(any(feature = "rs3", feature = "osrs"))]
            &overlay_definitions,
            #[cfg(any(feature = "rs3", feature = "osrs"))]
            &underlay_definitions,
            #[cfg(any(feature = "rs3", feature = "2009_1_shim"))]
            &mapscenes,
            #[cfg(feature = "legacy")]
            &flos,
            &sprites,
        );
    });
    Ok(())
}
// Separated for use in tests.
Separated for use in tests.
Separated for use in tests .
fn inner_render(config: &crate::cli::Config, iter: GroupMapSquareIterator) -> CacheResult<()> {
    let location_definitions = LocationConfig::dump_all(config)?;
    #[cfg(any(feature = "rs3", feature = "osrs"))]
    let overlay_definitions = Overlay::dump_all(config)?;
    #[cfg(any(feature = "rs3", feature = "osrs"))]
    let underlay_definitions = Underlay::dump_all(config)?;
    #[cfg(any(feature = "rs3", feature = "2009_1_shim"))]
    let mapscenes = MapScene::dump_all(config)?;
    #[cfg(any(feature = "rs3", feature = "2009_1_shim"))]
    let sprites = sprites::dumps(
        CONFIG.scale,
        mapscenes.values().filter_map(|mapscene| mapscene.sprite_id).collect::<Vec<_>>(),
        config,
    )?;
    let folder = path!(config.output / "mapsquares");
    #[cfg(all(feature = "osrs", not(feature = "2009_1_shim")))]
    let sprites = sprites::dumps(CONFIG.scale, vec![317], config)?; // 317 is the sprite named "mapscene"
    #[cfg(feature = "legacy")]
    let sprites: BTreeMap<(u32, u32), Sprite> = sprites::get_mapscenes(CONFIG.scale, config)?;
    #[cfg(feature = "legacy")]
    let flos = Flo::dump_all(config)?;
    iter.progress().par_bridge().for_each(|gsq| {
        render_tile(
            &folder,
            gsq,
            &location_definitions,
            #[cfg(any(feature = "rs3", feature = "osrs"))]
            &overlay_definitions,
            #[cfg(any(feature = "rs3", feature = "osrs"))]
            &underlay_definitions,
            #[cfg(any(feature = "rs3", feature = "2009_1_shim"))]
            &mapscenes,
            #[cfg(feature = "legacy")]
            &flos,
            &sprites,
        );
    });
    Ok(())
}
fn inner_render ( config : & crate :: cli :: Config , iter : GroupMapSquareIterator ) -> CacheResult < ( ) > { let location_definitions = LocationConfig :: dump_all ( config ) ? ; # [ cfg ( any ( feature " " feature " " ) ) ] let overlay_definitions = Overlay :: dump_all ( config ) ? ; # [ cfg ( any ( feature " " feature " " ) ) ] let underlay_definitions = Underlay :: dump_all ( config ) ? ; # [ cfg ( any ( feature " " feature " " ) ) ] let mapscenes = MapScene :: dump_all ( config ) ? ; # [ cfg ( any ( feature " " feature " " ) ) ] let sprites = sprites :: dumps ( CONFIG . scale , mapscenes . values ( ) . filter_map ( | mapscene | mapscene . sprite_id ) . collect :: < Vec < _ > > ( ) , config , ) ? ; let folder = path ! ( config output " " ) ; # [ cfg ( all ( feature " " not ( feature " " ) ) ) ] let sprites = sprites :: dumps ( CONFIG . scale , vec ! [ 317 ] , config ) ? ; // 317 is the sprite named "mapscene" # [ cfg ( feature " " ) ] let sprites : BTreeMap < ( u32 , u32 ) , Sprite > = sprites :: get_mapscenes ( CONFIG . scale , config ) ? ; # [ cfg ( feature " " ) ] let flos = Flo :: dump_all ( config ) ? ; iter . progress ( ) . par_bridge ( ) . for_each ( | gsq | { render_tile ( & folder , gsq , & location_definitions , # [ cfg ( any ( feature " " feature " " ) ) ] & overlay_definitions , # [ cfg ( any ( feature " " feature " " ) ) ] & underlay_definitions , # [ cfg ( any ( feature " " feature " " ) ) ] & mapscenes , # [ cfg ( feature " " ) ] & flos , & sprites , ) ; } ) ; Ok ( ( ) ) }
Separated for use in tests.
Separated for use in tests .
config
&crate::cli::Config
iter
GroupMapSquareIterator
config
&crate::cli::Config
iter
GroupMapSquareIterator