redraw a bunch of sprites, tweak some ui colours
|
@ -92,12 +92,12 @@ logic mostly like https://git.crispypin.cc/CrispyPin/marble
|
|||
### intro, basic mechanics
|
||||
- output a zero (marble, io)
|
||||
- output multiple numbers in sequence (digits)
|
||||
- output zeroes forever (looping, trigger, bag output)
|
||||
- output zeroes forever (looping, button, silo output)
|
||||
- copy the input (input)
|
||||
- copy only odd input numbers (comparator, math, flipper)
|
||||
### 0-terminated list processing
|
||||
- copy the second list
|
||||
- calculate list length (math, bag input)
|
||||
- calculate list length (math, silo input)
|
||||
- count instances of 5 in a list
|
||||
- reverse a list (bouncing)
|
||||
### user-friendly numbers
|
||||
|
|
Before Width: | Height: | Size: 200 B |
Before Width: | Height: | Size: 190 B |
BIN
assets/tiles/button_off.png
Normal file
After Width: | Height: | Size: 188 B |
BIN
assets/tiles/button_on.png
Normal file
After Width: | Height: | Size: 175 B |
Before Width: | Height: | Size: 209 B After Width: | Height: | Size: 240 B |
Before Width: | Height: | Size: 200 B After Width: | Height: | Size: 240 B |
BIN
assets/tiles/silo_off.png
Normal file
After Width: | Height: | Size: 223 B |
BIN
assets/tiles/silo_on.png
Normal file
After Width: | Height: | Size: 300 B |
Before Width: | Height: | Size: 147 B |
Before Width: | Height: | Size: 148 B |
Before Width: | Height: | Size: 189 B After Width: | Height: | Size: 168 B |
Before Width: | Height: | Size: 188 B After Width: | Height: | Size: 168 B |
Before Width: | Height: | Size: 126 B After Width: | Height: | Size: 111 B |
Before Width: | Height: | Size: 125 B After Width: | Height: | Size: 110 B |
Before Width: | Height: | Size: 136 B After Width: | Height: | Size: 124 B |
Before Width: | Height: | Size: 127 B After Width: | Height: | Size: 124 B |
|
@ -786,8 +786,8 @@ impl Editor {
|
|||
|
||||
if !hide_tile_tools {
|
||||
tool_button((0, 0), "block", Tool::SetTile(Tile::from_char('#')));
|
||||
tool_button((0, 1), "bag_off", Tool::SetTile(Tile::from_char('B')));
|
||||
tool_button((0, 2), "trigger_off", Tool::SetTile(Tile::from_char('*')));
|
||||
tool_button((0, 1), "silo_off", Tool::SetTile(Tile::from_char('B')));
|
||||
tool_button((0, 2), "button_off", Tool::SetTile(Tile::from_char('*')));
|
||||
tool_button((0, 3), "io_tile_off", Tool::SetTile(Tile::from_char('I')));
|
||||
tool_button((0, 4), "flipper_off", Tool::SetTile(Tile::from_char('F')));
|
||||
tool_button((0, 5), "digit_tool", Tool::Digits(None));
|
||||
|
|
|
@ -319,7 +319,6 @@ impl Machine {
|
|||
}
|
||||
}
|
||||
|
||||
// let mut triggers_activated = Vec::new();
|
||||
let mut removed_marbles = Vec::new();
|
||||
// move marbles
|
||||
for (i, pos) in self.marbles[..old_marbles].iter_mut().enumerate() {
|
||||
|
|
|
@ -177,9 +177,9 @@ impl Tile {
|
|||
Tile::Arrow(dir) => dir.arrow_tile_texture_name(),
|
||||
Tile::Button(state) => {
|
||||
if *state {
|
||||
"trigger_on"
|
||||
"button_on"
|
||||
} else {
|
||||
"trigger_off"
|
||||
"button_off"
|
||||
}
|
||||
}
|
||||
Tile::Wire(wire, state) => {
|
||||
|
@ -193,7 +193,7 @@ impl Tile {
|
|||
let root = match tile {
|
||||
PTile::Gate(gate) => gate.texture_name(),
|
||||
PTile::Math(math_op) => math_op.texture_name(),
|
||||
PTile::Silo => "bag",
|
||||
PTile::Silo => "silo",
|
||||
PTile::Flipper => "flipper",
|
||||
PTile::IO => "io_tile",
|
||||
};
|
||||
|
|
|
@ -3,9 +3,10 @@ use raylib::prelude::*;
|
|||
pub const BG_DARK: Color = gray(32);
|
||||
pub const BG_MEDIUM: Color = gray(48);
|
||||
pub const BG_LIGHT: Color = gray(64);
|
||||
pub const BG_WIDGET: Color = gray(96);
|
||||
pub const BG_WIDGET: Color = gray(64);
|
||||
pub const BG_WIDGET_ACTIVE: Color = rgb(80, 120, 180);
|
||||
pub const FG_MARBLE_VALUE: Color = rgb(255, 80, 40);
|
||||
pub const FG_TOGGLE_ENABLED: Color = gray(200);
|
||||
|
||||
pub const fn widget_bg(highlight: bool) -> Color {
|
||||
if highlight {
|
||||
|
|
|
@ -68,7 +68,7 @@ pub fn simple_toggle_button(
|
|||
y + margin,
|
||||
width - margin * 2,
|
||||
height - margin * 2,
|
||||
BG_DARK,
|
||||
FG_TOGGLE_ENABLED,
|
||||
);
|
||||
}
|
||||
if hover && d.is_mouse_button_pressed(MouseButton::MOUSE_BUTTON_LEFT) {
|
||||
|
|