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

DRAW {
	if (!this->tile)
		return;
	TZR_DrawSetColor(1, 1, 1);
	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));
}