add mirror and marble sprites

This commit is contained in:
Crispy 2024-10-04 10:00:07 +02:00
parent d4f9be5bff
commit de09b785d0
5 changed files with 7 additions and 4 deletions

BIN
assets/tiles/marble.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 B

View file

@ -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());

View file

@ -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",