| 2096 | // DrawMap() except for 3D wireframe format. |
| 2097 | |
| 2098 | void WireDrawGlobe(flag fSky, real deg) |
| 2099 | { |
| 2100 | int rz, unit = 12*gi.nScale, x, y, z, xold, yold, zold, |
| 2101 | m, n, o, u, v, w, i, j, k, l; |
| 2102 | real planet1[objMax], planet2[objMax], x1, y1, rT; |
| 2103 | ES es; |
| 2104 | |
| 2105 | // Set up some variables. |
| 2106 | rz = Min(gs.xWin/2, gs.yWin/2); |
| 2107 | if (gi.nMode == gSphere) |
| 2108 | rz -= 7*gi.nScale; |
| 2109 | |
| 2110 | // Draw the map (either a constellation map, or a world map). |
| 2111 | |
| 2112 | rT = fSky ? rDegMax - deg : deg; |
| 2113 | #ifdef CONSTEL |
| 2114 | if (fSky) |
| 2115 | EnumConstelLines(NULL, NULL, NULL, NULL, NULL); |
| 2116 | else |
| 2117 | #endif |
| 2118 | EnumWorldLines(NULL, NULL, NULL, NULL, NULL); |
| 2119 | while ( |
| 2120 | #ifdef CONSTEL |
| 2121 | fSky ? EnumConstelLines(&xold, &yold, &x, &y, &i) : |
| 2122 | #endif |
| 2123 | EnumWorldLines(&xold, &yold, &x, &y, &i)) { |
| 2124 | if (fSky) { |
| 2125 | if (i > 0) |
| 2126 | DrawColor(gi.nMode == gSphere || !gs.fAlt ? gi.kiGray : kDkGreenB); |
| 2127 | else |
| 2128 | DrawColor(gi.nMode == gSphere ? kPurpleB : |
| 2129 | (gs.fAlt ? kBlueB : kDkBlueB)); |
| 2130 | } else { |
| 2131 | if (i >= 0) |
| 2132 | DrawColor(!gs.fAlt && !gs.fColorHouse ? gi.kiGray : |
| 2133 | (i ? kRainbowB[i] : kDkBlueB)); |
| 2134 | } |
| 2135 | // For globes, have to do a complicated transformation. |
| 2136 | WireGlobeCalc((real)xold, (real)yold, &m, &n, &o, rz, rT); |
| 2137 | #ifdef CONSTEL |
| 2138 | if (fSky && i > 0) { |
| 2139 | gi.zDefault = o; |
| 2140 | DrawSz(szCnstlAbbrev[i], m, n, dtCent | dtScale2); |
| 2141 | continue; |
| 2142 | } |
| 2143 | #endif |
| 2144 | WireGlobeCalc((real)x, (real)y, &u, &v, &w, rz, rT); |
| 2145 | WireLine(m, n, o, u, v, w); |
| 2146 | } |
| 2147 | |
| 2148 | // Now, if in an appropriate bonus chart mode, draw each planet at its |
| 2149 | // zenith or visible location on the globe, if not hidden. |
| 2150 | |
| 2151 | if (gs.fAlt || gi.nMode == gAstroGraph || gi.nMode == gSphere) |
| 2152 | return; |
| 2153 | rT = gs.fConstel ? rDegHalf : Lon; |
| 2154 | if (rT < 0.0) |
| 2155 | rT += rDegMax; |
no test coverage detected