aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSan Jacobs2025-10-02 13:32:38 +0200
committerSan Jacobs2025-10-02 13:32:38 +0200
commite7291bc1e3dfff7793a22e5350f74584947bb459 (patch)
treef65c6f11a084d784be205ba597c7c5addc110823
parent44c9db3ff6445cf9e58dd5f18a33a95581fbdd14 (diff)
downloadtafl-e7291bc1e3dfff7793a22e5350f74584947bb459.tar.gz
tafl-e7291bc1e3dfff7793a22e5350f74584947bb459.tar.bz2
tafl-e7291bc1e3dfff7793a22e5350f74584947bb459.zip
Adjustments
-rw-r--r--src/main.odin2
-rw-r--r--src/tafl/Inter_24pt-Medium.ttf (renamed from res/Inter_24pt-Medium.ttf)bin342936 -> 342936 bytes
-rw-r--r--src/tafl/tafl.odin10
3 files changed, 6 insertions, 6 deletions
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/res/Inter_24pt-Medium.ttf b/src/tafl/Inter_24pt-Medium.ttf
index 5c88739..5c88739 100644
--- a/res/Inter_24pt-Medium.ttf
+++ b/src/tafl/Inter_24pt-Medium.ttf
Binary files 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() {