Big refactor and new run script
This commit is contained in:
parent
5796b78695
commit
a54fa90edc
68 changed files with 769 additions and 336 deletions
9
Examples/snake/config.toml
Normal file
9
Examples/snake/config.toml
Normal file
|
@ -0,0 +1,9 @@
|
|||
Libraries = [
|
||||
"Arduboy2",
|
||||
"ArduboyTones",
|
||||
#"ArduboyFX",
|
||||
#"ArdVoice",
|
||||
#"Serial",
|
||||
"EEPROM",
|
||||
"Arduino",
|
||||
]
|
|
@ -257,11 +257,8 @@ pub unsafe extern "C" fn loop_() {
|
|||
State::Win => (),
|
||||
State::Pause => {
|
||||
let msg = "[ Break ]\0";
|
||||
let l = msg.len() as u8 * FONT_SIZE / 2;
|
||||
arduboy.set_cursor(
|
||||
((WIDTH / 2) as u16 - l as u16).try_into().unwrap(),
|
||||
((HEIGHT / 2) as u16).try_into().unwrap(),
|
||||
);
|
||||
let l = msg.len() as i16 * FONT_WIDTH / 2;
|
||||
arduboy.set_cursor(WIDTH / 2 - l, HEIGHT / 2);
|
||||
snake.render();
|
||||
snake.boarder();
|
||||
arduboy.print(msg);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue