summaryrefslogtreecommitdiff
path: root/src/main.odin
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.odin')
-rw-r--r--src/main.odin52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/main.odin b/src/main.odin
new file mode 100644
index 0000000..f4d2238
--- /dev/null
+++ b/src/main.odin
@@ -0,0 +1,52 @@
+package main
+
+import rl "vendor:raylib"
+import "core:fmt"
+
+
+main :: proc() {
+ fmt.println("Hello")
+
+ // Initialization
+ //--------------------------------------------------------------------------------------
+
+ origin : rl.Vector2 = { 0.0, 0.0 }
+
+ rotation : f32 = 0.0
+
+ cameraX : f32 = 0.0
+ cameraY : f32 = 0.0
+ camera : rl.Camera2D
+
+ rl.InitWindow(1920, 1080, "BSC 2025 Presentation")
+ rl.SetTargetFPS(60)
+ // Main game loop // Detect window close button or ESC key
+ for !rl.WindowShouldClose() {
+ // Input
+ //----------------------------------------------------------------------------------
+ mousePosition := rl.GetMousePosition()
+ left_clicked := rl.IsMouseButtonDown(rl.MouseButton(0))
+ right_clicked := rl.IsMouseButtonDown(rl.MouseButton(1))
+
+
+ // Process
+ //----------------------------------------------------------------------------------
+
+
+
+ // Draw
+ //----------------------------------------------------------------------------------
+ rl.BeginDrawing()
+ rl.ClearBackground(rl.RED)
+
+ rl.BeginMode2D(camera)
+
+ rl.EndMode2D()
+
+ rl.DrawFPS(rl.GetScreenWidth() - 95, 10)
+ rl.EndDrawing()
+ //----------------------------------------------------------------------------------
+ }
+
+ rl.CloseWindow()
+} \ No newline at end of file