small updates to test cases
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Tue, 23 Nov 2021 05:01:55 +0000 (23:01 -0600)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Tue, 23 Nov 2021 05:01:55 +0000 (23:01 -0600)
tests/minesweeper.onyx
tests/simp.onyx

index 08e200c470ac00081b006bfef147c9efdc3ad611..96b5d57344b7dc82df04829ee6bf55738bbd6942 100644 (file)
@@ -186,7 +186,18 @@ load :: () {
     }
 
     init_board(^board, 30, 20);
-    generate_board(^board, 80);
+
+    thread_data :: struct {
+        board: ^Board;
+        mine_count: i32;
+    }
+    
+    t: thread.Thread;
+    data := thread_data.{ ^board, 80 };
+    thread.spawn(^t, ^data, (d) => {
+        println("Generating board...");
+        generate_board(d.board, d.mine_count);
+    });
 }
 
 update :: (dt: f32) {
index 0462e7eff20b646448afeb0e260dec06bf9df966..0c63e0dd06540350375a599ead7bf8f510fd71bc 100644 (file)
@@ -26,7 +26,7 @@ load :: () {
 
     printf("Width is: {}\n", hb.graphics.getTextWidth("Hello, World!"));
 
-    better_font := hb.graphics.newFont("/usr/share/fonts/TTF/InputSerif-Regular.ttf", 32);
+    better_font := hb.graphics.newFont("C:\\Windows\\Fonts\\calibri.ttf", 32);
     assert(better_font != 0, "Failed to load font!");
     hb.graphics.setFont(better_font);
     // hb.graphics.setFont();
@@ -34,7 +34,7 @@ load :: () {
     // hb.window.setDimensions(1200, 900);
     
     #persist dummy_thread: thread.Thread;
-    thread.spawn(^dummy_thread, null, (_) => {
+    thread.spawn(^dummy_thread, cast(^void) null, (_) => {
         while true {
             println("Loop");
             hb.thread.sleep(1000);