diff --git a/Ragnarokkr b/Ragnarokkr index fcd9061..4a0095e 100755 Binary files a/Ragnarokkr and b/Ragnarokkr differ diff --git a/main.odin b/main.odin index 47c75ec..6b9a97a 100644 --- a/main.odin +++ b/main.odin @@ -3,9 +3,12 @@ package main import rl "vendor:raylib" import "core:path/filepath" import "core:strings" +import "core:fmt" vec3 :: [3]f32 +vec3i :: [3]i32 vec2 :: [2]f32 +vec2i :: [2]i32 vec3right := vec3{1, 0, 0} vec3left := vec3{-1, 0, 0} vec3up := vec3{0, 1, 0} @@ -17,6 +20,8 @@ vec3backward := vec3{0, 0, -1} WSize := [2]f32{} WSizei := [2]i32{} +WSizeLast := vec2i{} + WindowShouldExit := false NeedTutorial := true @@ -131,14 +136,13 @@ load_resources :: proc() { Res.Music.Second = load_music("alexander-nakarada-the-northern-path.mp3", 0.7) } -Fullscreen := true - main :: proc() { - rl.SetConfigFlags(rl.ConfigFlags{.MSAA_4X_HINT, .FULLSCREEN_MODE, .VSYNC_HINT, .WINDOW_RESIZABLE}) +// rl.SetConfigFlags(rl.ConfigFlags{.MSAA_4X_HINT, .FULLSCREEN_MODE, .VSYNC_HINT, .WINDOW_RESIZABLE}) + rl.SetConfigFlags(rl.ConfigFlags{.VSYNC_HINT, .WINDOW_RESIZABLE}) - rl.InitWindow(0, 0, "Ragnarøkkr") + rl.InitWindow(800, 600, "Ragnarøkkr") rl.InitAudioDevice() - rl.SetWindowMinSize(800, 480) + rl.SetWindowMinSize(800, 600) rl.HideCursor() Cursor = rl.LoadTexture("./assets/gfx/crosshair.png") @@ -176,3 +180,14 @@ main :: proc() { rl.EndDrawing() } } + +Fullscreen := false + +toggle_fullscreen :: proc() { + monitor := rl.GetCurrentMonitor() + rl.ToggleBorderlessWindowed() + Fullscreen = !Fullscreen + + +// rl.ToggleFullscreen() +} diff --git a/menu.odin b/menu.odin index 04f95c0..9ca88e4 100644 --- a/menu.odin +++ b/menu.odin @@ -75,8 +75,8 @@ menu_button_pressed :: proc(state: ^GameState, el: Menu_Buttons) { KeyboardOnly = !KeyboardOnly NeedTutorial = true case .FULLSCREEN: - rl.ToggleFullscreen() - Fullscreen = rl.IsWindowFullscreen() + toggle_fullscreen() +// Fullscreen = rl.IsWindowFullscreen() case .EXIT: WindowShouldExit = true