add mirror and marble sprites
This commit is contained in:
parent
d4f9be5bff
commit
de09b785d0
5 changed files with 7 additions and 4 deletions
BIN
assets/tiles/marble.png
Normal file
BIN
assets/tiles/marble.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 183 B |
BIN
assets/tiles/mirror_back.png
Normal file
BIN
assets/tiles/mirror_back.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 204 B |
BIN
assets/tiles/mirror_forward.png
Normal file
BIN
assets/tiles/mirror_forward.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 205 B |
|
@ -15,7 +15,7 @@ fn main() {
|
||||||
.build();
|
.build();
|
||||||
rl.set_target_fps(60);
|
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 pos_offset = Vector2::zero();
|
||||||
let mut machine = marble_engine::Machine::new(board, "Vec::new()".bytes().collect());
|
let mut machine = marble_engine::Machine::new(board, "Vec::new()".bytes().collect());
|
||||||
|
|
||||||
|
|
|
@ -101,11 +101,14 @@ impl Tile {
|
||||||
) {
|
) {
|
||||||
let tex_name = match self {
|
let tex_name = match self {
|
||||||
Tile::Blank => "",
|
Tile::Blank => "",
|
||||||
Tile::Block => "",
|
Tile::Block => "block",
|
||||||
Tile::Comment(_) => "",
|
Tile::Comment(_) => "",
|
||||||
Tile::Marble { value, dir } => "todo!()",
|
Tile::Marble { value: _, dir: _ } => "marble",
|
||||||
Tile::Digit(_) => "",
|
Tile::Digit(_) => "",
|
||||||
Tile::Mirror(_) => "",
|
Tile::Mirror(mirror) => match mirror {
|
||||||
|
MirrorType::Forward => "mirror_forward",
|
||||||
|
MirrorType::Back => "mirror_back",
|
||||||
|
},
|
||||||
Tile::Arrow(dir) => match dir {
|
Tile::Arrow(dir) => match dir {
|
||||||
Direction::Up => "up",
|
Direction::Up => "up",
|
||||||
Direction::Down => "down",
|
Direction::Down => "down",
|
||||||
|
|
Loading…
Reference in a new issue