Exemplo n.º 1
0
static void
draw_minimap_ownership(minimap_t *minimap, int density, frame_t *frame)
{
	for (int row = 0; row < game.map.rows; row++) {
		for (int col = 0; col < game.map.cols; col++) {
			map_pos_t pos = MAP_POS(col, row);
			if (MAP_HAS_OWNER(pos)) {
				int color = game.player[MAP_OWNER(pos)]->color;
				draw_minimap_point(minimap, col, row, color,
						   density, frame);
			}
		}
	}
}
Exemplo n.º 2
0
static void
draw_minimap_ownership(minimap_t *minimap, int density, frame_t *frame)
{
	const int player_colors[] = {
		64, 72, 68, 76
	};

	for (int row = 0; row < game.map.rows; row++) {
		for (int col = 0; col < game.map.cols; col++) {
			map_pos_t pos = MAP_POS(col, row);
			if (MAP_HAS_OWNER(pos)) {
				int color = player_colors[MAP_OWNER(pos)];
				draw_minimap_point(minimap, col, row, color,
						   density, frame);
			}
		}
	}
}