Exemplo n.º 1
0
static void
draw_minimap_traffic(minimap_t *minimap, frame_t *frame)
{
	for (int row = 0; row < game.map.rows; row++) {
		for (int col = 0; col < game.map.cols; col++) {
			int pos = MAP_POS(col, row);
			if (MAP_IDLE_SERF(pos)) {
				int color = game.player[MAP_OWNER(pos)]->color;
				draw_minimap_point(minimap, col, row, color,
						   minimap->scale, frame);
			}
		}
	}
}
Exemplo n.º 2
0
static void
draw_minimap_traffic(minimap_t *minimap, 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++) {
			int pos = MAP_POS(col, row);
			if (MAP_IDLE_SERF(pos)) {
				int color = player_colors[MAP_OWNER(pos)];
				draw_minimap_point(minimap, col, row, color,
						   minimap->scale, frame);
			}
		}
	}
}