aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--src/main.rs26
2 files changed, 27 insertions, 1 deletions
diff --git a/README.md b/README.md
index d251d3d..32d8026 100644
--- a/README.md
+++ b/README.md
@@ -45,3 +45,5 @@ if you would like to use this under another license, contact me.
the Hope system uses Pedantic Versioning: every new release is a new major version.
### 0.0.0
+
+- wrote the damn thing
diff --git a/src/main.rs b/src/main.rs
index f328e4d..424f3fc 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1 +1,25 @@
-fn main() {}
+use std::time::Duration;
+
+use minifb::{Key, Window, WindowOptions};
+
+const WIDTH: usize = 1600;
+const HEIGHT: usize = 900;
+
+fn main() {
+ let mut buffer: Vec<u32> = vec![0; WIDTH * HEIGHT];
+
+ let mut window = Window::new(
+ "the Hope system",
+ WIDTH,
+ HEIGHT,
+ WindowOptions::default()
+ ).unwrap();
+
+ window.limit_update_rate(Some(Duration::from_millis(16)));
+
+ while window.is_open() && !window.is_key_down(Key::Escape) {
+ window
+ .update_with_buffer(&buffer, WIDTH, HEIGHT)
+ .unwrap();
+ }
+}