diff --git a/assets/tiles/marble.png b/assets/tiles/marble.png new file mode 100644 index 0000000..1f24d7e Binary files /dev/null and b/assets/tiles/marble.png differ diff --git a/assets/tiles/mirror_back.png b/assets/tiles/mirror_back.png new file mode 100644 index 0000000..543dacc Binary files /dev/null and b/assets/tiles/mirror_back.png differ diff --git a/assets/tiles/mirror_forward.png b/assets/tiles/mirror_forward.png new file mode 100644 index 0000000..a333771 Binary files /dev/null and b/assets/tiles/mirror_forward.png differ diff --git a/src/main.rs b/src/main.rs index e5dc30a..9bd8656 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,7 +15,7 @@ fn main() { .build(); rl.set_target_fps(60); - let board = parse(&read_to_string("boards/counter.mbl").unwrap()); + let board = parse(&read_to_string("boards/adder.mbl").unwrap()); let mut pos_offset = Vector2::zero(); let mut machine = marble_engine::Machine::new(board, "Vec::new()".bytes().collect()); diff --git a/src/marble_engine/tile.rs b/src/marble_engine/tile.rs index 439ece1..6e59097 100644 --- a/src/marble_engine/tile.rs +++ b/src/marble_engine/tile.rs @@ -101,11 +101,14 @@ impl Tile { ) { let tex_name = match self { Tile::Blank => "", - Tile::Block => "", + Tile::Block => "block", Tile::Comment(_) => "", - Tile::Marble { value, dir } => "todo!()", + Tile::Marble { value: _, dir: _ } => "marble", Tile::Digit(_) => "", - Tile::Mirror(_) => "", + Tile::Mirror(mirror) => match mirror { + MirrorType::Forward => "mirror_forward", + MirrorType::Back => "mirror_back", + }, Tile::Arrow(dir) => match dir { Direction::Up => "up", Direction::Down => "down",