}
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) {
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();
// 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);