Browse Source

Fix 7 segment order.

Segments for bits 4 and 5 were swapped with respect to the standard order.
master
Juergen Stuber 2 years ago
parent
commit
3158928015
2 changed files with 4 additions and 4 deletions
  1. +2
    -2
      src/bin/dualmaze/main.rs
  2. +2
    -2
      src/bin/maze/main.rs

+ 2
- 2
src/bin/dualmaze/main.rs View File

@ -154,10 +154,10 @@ impl Board {
self.draw_horizontal_segment(pos + v2d(1, 2 * delta), hsize);
}
if (segments & (1 << 4)) != 0 {
self.draw_vertical_segment(pos + v2d(0, 1), vsize);
self.draw_vertical_segment(pos + v2d(0, delta + 1), vsize);
}
if (segments & (1 << 5)) != 0 {
self.draw_vertical_segment(pos + v2d(0, delta + 1), vsize);
self.draw_vertical_segment(pos + v2d(0, 1), vsize);
}
if (segments & (1 << 6)) != 0 {
self.draw_horizontal_segment(pos + v2d(1, delta), hsize);


+ 2
- 2
src/bin/maze/main.rs View File

@ -156,10 +156,10 @@ impl Board {
self.draw_horizontal_segment(pos + v2d(1, 2 * delta), hsize);
}
if (segments & (1 << 4)) != 0 {
self.draw_vertical_segment(pos + v2d(0, 1), vsize);
self.draw_vertical_segment(pos + v2d(0, delta + 1), vsize);
}
if (segments & (1 << 5)) != 0 {
self.draw_vertical_segment(pos + v2d(0, delta + 1), vsize);
self.draw_vertical_segment(pos + v2d(0, 1), vsize);
}
if (segments & (1 << 6)) != 0 {
self.draw_horizontal_segment(pos + v2d(1, delta), hsize);


Loading…
Cancel
Save