| 2012 | // Add a fixed star to the current wireframe file. |
| 2013 | |
| 2014 | void WireStar(int x, int y, int z, ES *pes) |
| 2015 | { |
| 2016 | char *pch = pes->sz; |
| 2017 | int n; |
| 2018 | |
| 2019 | // Determine star color. |
| 2020 | if (gs.fColor) { |
| 2021 | if (pes->ki != kDefault) |
| 2022 | n = pes->ki; |
| 2023 | else { |
| 2024 | n = 255 - (int)((pes->mag - rStarLite) / rStarSpan * 224.0); |
| 2025 | n = Min(n, 255); n = Max(n, 32); |
| 2026 | n = -(int)Rgb(n, n, n); |
| 2027 | } |
| 2028 | DrawColor(n); |
| 2029 | } |
| 2030 | |
| 2031 | // Draw star point. |
| 2032 | if (!FOdd(gs.nAllStar)) |
| 2033 | WireSpot(x, y, z); |
| 2034 | else |
| 2035 | WireOctahedron(x, y, z, 3 * gi.nScaleT); |
| 2036 | |
| 2037 | // Draw star's name label. |
| 2038 | if (!gs.fLabel || gs.nAllStar < 2) |
| 2039 | return; |
| 2040 | gi.zDefault = z + 8*gi.nScaleT; |
| 2041 | DrawSz(pes->pchBest, x, y, dtCent); |
| 2042 | } |
| 2043 | |
| 2044 | |
| 2045 | // Given longitude and latitude values on a globe, return the 3D pixel |
no test coverage detected