From e7291bc1e3dfff7793a22e5350f74584947bb459 Mon Sep 17 00:00:00 2001 From: San Jacobs Date: Thu, 2 Oct 2025 13:32:38 +0200 Subject: Adjustments --- res/Inter_24pt-Medium.ttf | Bin 342936 -> 0 bytes src/main.odin | 2 +- src/tafl/Inter_24pt-Medium.ttf | Bin 0 -> 342936 bytes src/tafl/tafl.odin | 10 +++++----- 4 files changed, 6 insertions(+), 6 deletions(-) delete mode 100644 res/Inter_24pt-Medium.ttf create mode 100644 src/tafl/Inter_24pt-Medium.ttf diff --git a/res/Inter_24pt-Medium.ttf b/res/Inter_24pt-Medium.ttf deleted file mode 100644 index 5c88739..0000000 Binary files a/res/Inter_24pt-Medium.ttf and /dev/null differ diff --git a/src/main.odin b/src/main.odin index 7533cab..334ac08 100644 --- a/src/main.odin +++ b/src/main.odin @@ -5,7 +5,7 @@ import t "tafl" main :: proc() { - width, height : i32 = 1920, 1080 + width, height : int = 1920, 1080 t.start_window(width, height, "tafl test") diff --git a/src/tafl/Inter_24pt-Medium.ttf b/src/tafl/Inter_24pt-Medium.ttf new file mode 100644 index 0000000..5c88739 Binary files /dev/null and b/src/tafl/Inter_24pt-Medium.ttf differ diff --git a/src/tafl/tafl.odin b/src/tafl/tafl.odin index a83be1e..2b3993e 100644 --- a/src/tafl/tafl.odin +++ b/src/tafl/tafl.odin @@ -6,7 +6,7 @@ import "core:strings" import rl "vendor:raylib" import "core:c" -__DEFAULT_FONT_FILE :: #load("../../res/Inter_24pt-Medium.ttf") +__DEFAULT_FONT_FILE :: #load("Inter_24pt-Medium.ttf") tafl_elements : [4096]Tafl tafl_elements_count : int @@ -496,11 +496,11 @@ position_pass :: proc() { } } -start_window :: proc(width, height : i32, title : cstring, fps_target : int = 60) { +start_window :: proc(width, height : int, title : cstring, fps_target : int = 60) { rl.SetWindowMinSize(800,600) rl.SetTargetFPS(60) rl.SetConfigFlags({.WINDOW_RESIZABLE}) - rl.InitWindow(width, height, title) + rl.InitWindow(i32(width), i32(height), title) DEFAULT_FONT = rl.LoadFontFromMemory(".ttf", raw_data(__DEFAULT_FONT_FILE), i32(len(__DEFAULT_FONT_FILE)), i32(FONT_SIZE), nil, 0) } @@ -512,8 +512,8 @@ resized :: proc() -> (resized: bool) { return rl.IsWindowResized() } -get_window_size :: proc() -> (i32, i32) { - return rl.GetScreenWidth(), rl.GetScreenHeight() +get_window_size :: proc() -> (int, int) { + return int(rl.GetScreenWidth()), int(rl.GetScreenHeight()) } process_features :: proc() { -- cgit v1.2.1