summaryrefslogtreecommitdiff
path: root/src/main.odin
blob: f4d2238b16dd094b5e6c2ed61abc0ff3647fc052 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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()
}