Factor out editor special segment drawing
This commit is contained in:
parent
7064fcccba
commit
8a30fc656b
|
@ -584,37 +584,39 @@ static void draw_mine_all(int automap_flag)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void draw_listed_segments(count_segment_array_t &s)
|
||||||
|
{
|
||||||
|
range_for (const auto &ss, s)
|
||||||
|
{
|
||||||
|
const auto &&segp = vcsegptr(ss);
|
||||||
|
if (segp->segnum != segment_none)
|
||||||
|
draw_segment(segp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void draw_selected_segments(void)
|
static void draw_selected_segments(void)
|
||||||
{
|
{
|
||||||
gr_setcolor(SELECT_COLOR);
|
gr_setcolor(SELECT_COLOR);
|
||||||
range_for (const auto &ss, Selected_segs)
|
draw_listed_segments(Selected_segs);
|
||||||
if (Segments[ss].segnum != segment_none)
|
|
||||||
draw_segment(&Segments[ss]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void draw_found_segments(void)
|
static void draw_found_segments(void)
|
||||||
{
|
{
|
||||||
gr_setcolor(FOUND_COLOR);
|
gr_setcolor(FOUND_COLOR);
|
||||||
range_for (const auto &fs, Found_segs)
|
draw_listed_segments(Found_segs);
|
||||||
if (Segments[fs].segnum != segment_none)
|
|
||||||
draw_segment(&Segments[fs]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void draw_warning_segments(void)
|
static void draw_warning_segments(void)
|
||||||
{
|
{
|
||||||
gr_setcolor(WARNING_COLOR);
|
gr_setcolor(WARNING_COLOR);
|
||||||
range_for (const auto &ws, Warning_segs)
|
draw_listed_segments(Warning_segs);
|
||||||
if (Segments[ws].segnum != segment_none)
|
|
||||||
draw_segment(&Segments[ws]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void draw_group_segments(void)
|
static void draw_group_segments(void)
|
||||||
{
|
{
|
||||||
if (current_group > -1) {
|
if (current_group > -1) {
|
||||||
gr_setcolor(GROUP_COLOR);
|
gr_setcolor(GROUP_COLOR);
|
||||||
range_for (const auto &gs, GroupList[current_group].segments)
|
draw_listed_segments(GroupList[current_group].segments);
|
||||||
if (Segments[gs].segnum != segment_none)
|
|
||||||
draw_segment(&Segments[gs]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue