up to building the map

This commit is contained in:
2026-06-10 02:32:01 -07:00
parent fa7a6ac176
commit 4032a5ea76
5 changed files with 93 additions and 2 deletions
+34
View File
@@ -0,0 +1,34 @@
package game
import rl "vendor:raylib"
Tile_Kind :: enum {
Blocked,
Path,
Build,
}
Map :: struct {
tiles: [MAP_H][MAP_W]Tile_Kind,
}
tile_color :: proc(kind: Tile_Kind) -> rl.Color {
switch kind {
case .Blocked:
return {35, 95, 35, 255}
case .Path:
return {130, 85, 45, 255}
case .Build:
return {50, 130, 50, 255}
}
return rl.MAGENTA
}
init_map :: proc(world_map: ^Map) {
for y in 0 ..< MAP_H {
for x in 0 ..< MAP_W {
world_map.tiles[y][x] = .Blocked
}
}
}