diff --git a/src/game.rs b/src/game.rs index a2ed02a..07941ae 100644 --- a/src/game.rs +++ b/src/game.rs @@ -118,7 +118,7 @@ impl From for Game { text_direction = TextDirection::RightToLeft; } else if segment.starts_with("PAL") { palettes.push(Palette::from(segment)); - } else if segment.starts_with("ROOM") { + } else if segment.starts_with("ROOM") || segment.starts_with("SET") { rooms.push(Room::from(segment)); } else if segment.starts_with("TIL") { tiles.push(Tile::from(segment)); diff --git a/src/room.rs b/src/room.rs index 4383dc5..4199e0a 100644 --- a/src/room.rs +++ b/src/room.rs @@ -29,9 +29,10 @@ impl Room { impl From for Room { fn from(string: String) -> Room { - // todo handle room_format? + let string = string.replace("ROOM ", ""); + let string = string.replace("SET ", ""); let mut lines: Vec<&str> = string.lines().collect(); - let id = from_base36(&lines[0].replace("ROOM ", "")); + let id = from_base36(&lines[0]); let mut name = None; let mut palette_id = 0; let mut items: Vec = Vec::new();