diff options
author | Arne Sund <arnels@samfundet.no> | 2015-02-21 11:22:34 +0100 |
---|---|---|
committer | Arne Sund <arnels@samfundet.no> | 2015-02-21 11:22:34 +0100 |
commit | 39bce25b25b9de9ad613aaba5f85fc3f19793089 (patch) | |
tree | 60ee6bafb1f78cff42c826925ef8a7c4d464f947 /planning | |
parent | 88341b6250d1e42ade2c37d7f670c290f5f869fe (diff) |
Added support for more colors
Diffstat (limited to 'planning')
-rw-r--r-- | planning/planning.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/planning/planning.cpp b/planning/planning.cpp index dd06179..a952d02 100644 --- a/planning/planning.cpp +++ b/planning/planning.cpp @@ -560,7 +560,11 @@ void Planner::print_switch(const Graph &g, int i, int distro) logprintf("(XXXX)"); #endif } else { - logprintf("[%u;22m%u ", distro + 32, distro); + if(distro >= 6) + logprintf("[%u;1m%u ", distro + 32 - 7, distro); + else + logprintf("[%u;22m%u ", distro + 32, distro); + int this_distance = find_distance(switches[i], distro); #if TRUNCATE_METRIC @@ -615,10 +619,16 @@ int Planner::do_work(int distro_placements[NUM_DISTRO]) char distro_marker_right[16] = " "; for (int d = 0; d < NUM_DISTRO; ++d) { if (int(row) == distro_placements[d]) { - sprintf(distro_marker_left, "[%u;1m*", d + 32); + if(d >= 6) + sprintf(distro_marker_left, "[%u;1m*", d + 32 - 7); + else + sprintf(distro_marker_left, "[%u;22m*", d + 32); } if (int(row) == -distro_placements[d]) { - sprintf(distro_marker_right, "[%u;1m*", d + 32); + if(d >= 6) + sprintf(distro_marker_right, "[%u;22m*", d + 32 - 7); + else + sprintf(distro_marker_right, "[%u;1m*", d + 32); } } |