28 lines
535 B
Odin
28 lines
535 B
Odin
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: Simulator
|
|
defer deinit(&sim)
|
|
|
|
for !rl.WindowShouldClose() {
|
|
rl.BeginDrawing()
|
|
defer rl.EndDrawing()
|
|
|
|
pos := rl.GetMousePosition()
|
|
update(&sim, pos)
|
|
handle_input(&sim, pos)
|
|
|
|
draw(&sim, pos)
|
|
}
|
|
} |