summaryrefslogtreecommitdiff
path: root/src/tile.c
blob: 45d7eff1f758725e966e736c088186f32357bfc3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
NAME(tile);

DRAW {
	if (!this->tile)
		return;
	fgcolor();
	const auto pos =
	    v2_sub(POS, v2(cfg.tile_width / 2., cfg.tile_height / 2.));
	auto tile = this->tile;
	if (this->flip_x)
		tile ^= tiled_flip_x;
	if (this->flip_y)
		tile ^= tiled_flip_y;
	tile_draw(tile, v2_unpack(pos));
}