71 lines
1.1 KiB
Odin
71 lines
1.1 KiB
Odin
package game
|
|
|
|
import rl "vendor:raylib"
|
|
import "core:math/rand"
|
|
|
|
Tile :: struct #packed {
|
|
tilemap_pos: Vec2i,
|
|
color: [4]u8,
|
|
type: TileType,
|
|
interaction: InteractionType,
|
|
resource: ResourceType,
|
|
}
|
|
|
|
TileType :: enum u8 {
|
|
NOTHING,
|
|
SOLID,
|
|
FOLIAGE,
|
|
WATER,
|
|
}
|
|
|
|
ResourceType :: enum u8 {
|
|
NOTHING,
|
|
TREE,
|
|
}
|
|
|
|
InteractionType :: enum u8 {
|
|
NOTHING,
|
|
RESOURCE,
|
|
ENEMY,
|
|
}
|
|
|
|
nothing_tile := Tile {
|
|
type = .NOTHING,
|
|
tilemap_pos = {0,0},
|
|
color = {0,0,0,255},
|
|
interaction = .NOTHING,
|
|
resource = .NOTHING
|
|
}
|
|
|
|
grass_tile := Tile {
|
|
type = .FOLIAGE,
|
|
tilemap_pos = {5,0},
|
|
color = {50,120,25,255},
|
|
interaction = .NOTHING,
|
|
resource = .NOTHING
|
|
}
|
|
|
|
tree_tile := Tile {
|
|
type = .SOLID,
|
|
tilemap_pos = {0,1},
|
|
color = {10,60,15,255},
|
|
resource = .TREE,
|
|
interaction = .RESOURCE,
|
|
}
|
|
|
|
bricks_tile := Tile {
|
|
type = .SOLID,
|
|
tilemap_pos = {10,17},
|
|
color = {140,30,10,255},
|
|
resource = .NOTHING,
|
|
interaction = .NOTHING,
|
|
}
|
|
|
|
water_tile := Tile {
|
|
type = .WATER,
|
|
tilemap_pos = {19,1},
|
|
color = {5,40,80,255},
|
|
resource = .NOTHING,
|
|
interaction = .NOTHING,
|
|
}
|