From: Brendan Hansen Date: Tue, 23 Nov 2021 05:01:55 +0000 (-0600) Subject: small updates to test cases X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=73c06d97c707fb218a0814a1c0c217a123110fc7;p=heartbreak.git small updates to test cases --- diff --git a/tests/minesweeper.onyx b/tests/minesweeper.onyx index 08e200c..96b5d57 100644 --- a/tests/minesweeper.onyx +++ b/tests/minesweeper.onyx @@ -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) { diff --git a/tests/simp.onyx b/tests/simp.onyx index 0462e7e..0c63e0d 100644 --- a/tests/simp.onyx +++ b/tests/simp.onyx @@ -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);