Initial commit
This commit is contained in:
27
main.odin
Normal file
27
main.odin
Normal file
@@ -0,0 +1,27 @@
|
||||
package main
|
||||
|
||||
import rl "vendor:raylib"
|
||||
|
||||
import "common"
|
||||
|
||||
main :: proc() {
|
||||
rl.SetConfigFlags({.MSAA_4X_HINT, .WINDOW_HIGHDPI})
|
||||
rl.InitWindow(common.WIDTH, common.HEIGHT, "Base Road Network")
|
||||
defer rl.CloseWindow()
|
||||
|
||||
rl.SetWindowMonitor(common.MONITOR)
|
||||
rl.SetTargetFPS(rl.GetMonitorRefreshRate(common.MONITOR))
|
||||
|
||||
sim := init()
|
||||
defer deinit(&sim)
|
||||
|
||||
for !rl.WindowShouldClose() {
|
||||
rl.BeginDrawing()
|
||||
defer rl.EndDrawing()
|
||||
|
||||
pos := rl.GetMousePosition()
|
||||
handle_input(&sim, pos)
|
||||
|
||||
draw(&sim, pos)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user