Setting up groundwork for vehicle (car) and pathfinding implementation

This commit is contained in:
2026-04-26 16:53:46 +02:00
parent ae5e68e2a5
commit 533b6b1c00
8 changed files with 131 additions and 24 deletions

View File

@@ -5,12 +5,15 @@ import rl "vendor:raylib"
import "common"
import "core:fmt"
import inf "infrastructure"
import v "vehicles"
Simulator :: struct {
// Stores all nodes
nodes: [dynamic]inf.Node,
// Stores all roads
roads: [dynamic]inf.Road,
// Stores all cars
cars: [dynamic]v.Car,
// Tracks the temporary node location
temp_node: Maybe(u32),
// Tracks the selected road
@@ -34,6 +37,7 @@ deinit :: proc(self: ^Simulator) {
inf.node_deinit(&node)
}
delete(self.nodes)
delete(self.cars)
}
// Functionality that runs every tick regardless of input