Пример #1
0
func (t *t_renderer) drawAgent(x, y int) {
	var rect sdl.Rect
	rect.X = 10 + int32(x*TILE_SIZE)
	rect.Y = 10 + int32(y*TILE_SIZE)
	rect.W = 30
	rect.H = 30

	t.renderer.SetDrawColor(0, 0, 255, 255)
	t.renderer.FillRect(&rect)
}
Пример #2
0
func (t *t_renderer) drawTile(x, y int, r, g, b, a uint8) {
	x = TILE_SIZE * x
	y = TILE_SIZE * y

	t.renderer.SetDrawColor(r, g, b, a)

	var rect sdl.Rect
	rect.X = int32(x)
	rect.Y = int32(y)
	rect.W = TILE_SIZE
	rect.H = TILE_SIZE

	t.renderer.FillRect(&rect)
}