mirror of
https://github.com/JanNeuendorf/SVC16.git
synced 2025-06-03 01:50:18 +00:00
Restarting now reloads the file
This commit is contained in:
parent
dab743dafc
commit
defac087c7
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -539,7 +539,7 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
|
||||
|
||||
[[package]]
|
||||
name = "svc16"
|
||||
version = "0.9.1"
|
||||
version = "0.9.2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap",
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "svc16"
|
||||
version = "0.9.1"
|
||||
version = "0.9.2"
|
||||
edition = "2021"
|
||||
authors = ["Jan Neuendorf"]
|
||||
description = "An emulator for a simple virtual computer"
|
||||
|
@ -43,8 +43,7 @@ async fn main() -> Result<()> {
|
||||
}
|
||||
|
||||
let mut raw_buffer = [0 as u16; 256 * 256];
|
||||
let initial_state = read_u16s_from_file(&cli.program)?;
|
||||
let mut engine = Engine::new(initial_state.clone());
|
||||
let mut engine = Engine::new(read_u16s_from_file(&cli.program)?);
|
||||
let mut paused = false;
|
||||
let mut ipf = 0;
|
||||
|
||||
@ -63,7 +62,7 @@ async fn main() -> Result<()> {
|
||||
paused = !paused;
|
||||
}
|
||||
if is_key_pressed(KeyCode::R) {
|
||||
engine = Engine::new(initial_state.clone());
|
||||
engine = Engine::new(read_u16s_from_file(&cli.program)?);
|
||||
paused = false;
|
||||
}
|
||||
if is_key_pressed(KeyCode::V) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user