[][src]Function movingai::parser::parse_scen

pub fn parse_scen(contents: &str) -> Result<Vec<SceneRecord>>

Parse a string representing a MovingAI .scen.

Arguments

  • contents the string representing the .scen file.

Returns

It returns the parsed map as a Vec<SceneRecord> or an Err.

Panics

For the time, it panics if the map format it is not correct.

Errors

Return errors if it is not possible to open the specified file.

Examples

use std::path::Path;
use movingai::parser::parse_scen;

let scen = parse_scen("version 1\n0	maps/dao/arena.map	49	49	1	11	1	12	1").unwrap();