SectrPrototype/code/launch.odin

43 lines
1.0 KiB
Odin
Raw Normal View History

2024-01-21 08:16:12 -08:00
package sectr
import "core:strings"
2024-01-21 08:16:12 -08:00
import rl "vendor:raylib"
2024-01-21 08:16:12 -08:00
Path_Assets :: "../assets/"
2024-01-21 08:16:12 -08:00
WindowState :: struct {
2024-01-21 08:16:12 -08:00
}
2024-01-21 08:16:12 -08:00
main :: proc()
{
// Rough setup of window with rl stuff
screen_width : i32 = 1280
screen_height : i32 = 1000
win_title : cstring = "Sectr Prototype"
rl.InitWindow( screen_width, screen_height, win_title )
defer {
rl.CloseWindow()
}
monitor_id := rl.GetCurrentMonitor()
monitor_refresh_rate := rl.GetMonitorRefreshRate( monitor_id )
rl.SetTargetFPS( monitor_refresh_rate )
// Basic Font Setup
{
2024-01-21 08:16:12 -08:00
path_rec_mono_semicasual_reg := strings.concatenate( { Path_Assets, "RecMonoSemicasual-Regular-1.084.ttf" } )
cstr := strings.clone_to_cstring(path_rec_mono_semicasual_reg)
font_rec_mono_semicasual_reg = rl.LoadFontEx( cstr, 24, nil, 0 )
delete( cstr )
rl.GuiSetFont( font_rec_mono_semicasual_reg ) // TODO(Ed) : Does this do anything?
default_font = font_rec_mono_semicasual_reg
2024-01-21 08:16:12 -08:00
}
running : b32 = true
run_cycle( & running )
2024-01-21 08:16:12 -08:00
}