MCPcopy Create free account
hub / github.com/CruiserOne/Astrolog / XChartSphere

Function XChartSphere

xcharts1.cpp:4229–4647  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4227// switch. This is similar to Astrolog's local horizon charts.
4228
4229void XChartSphere()
4230{
4231 char sz[cchSzDef], chT;
4232 int zGlyph, zGlyph2, zGlyphS, cChart, iChart, xo = 0, yo = 0, xp, yp,
4233 xp2, yp2, i, j, k, k2, nSav;
4234 flag fHouse3D = !us.fHouse3D, fDir = !gs.fSouth, fAny = !gs.fAlt,
4235 fNoHorizon, fSav, f;
4236 real rLat, rT;
4237 CIRC cr, cr2;
4238 CONST CP *pcp;
4239 CP cpSav;
4240 ObjDraw rgod[objMax];
4241 byte ignoreSav[objMax];
4242 ES es;
4243#ifdef SWISS
4244 ES *pes1, *pes2;
4245#endif
4246
4247 // Initialize variables.
4248 if (gs.fText && gs.fDoSidebar)
4249 gs.xWin -= xSideT;
4250
4251 fNoHorizon = ignorez[0] && ignorez[1] && ignorez[2] && ignorez[3];
4252 zGlyph = Max(7*gi.nScale,
4253 (gs.fText && !gs.fDoSidebar)*Max(12, yFont*gi.nScaleText/2)*gi.nScaleT);
4254 zGlyph2 = 14*gi.nScale; zGlyphS = 9*gi.nScaleT;
4255 cr.xc = gs.xWin >> 1; cr.yc = gs.yWin >> 1;
4256 cr.xr = cr.xc - zGlyph; cr.yr = cr.yc - zGlyph;
4257 cr2 = cr;
4258 cr2.xr += zGlyph >> 1; cr2.yr += zGlyph >> 1;
4259 if (!(us.nRel <= rcTransit))
4260 cChart = 1 - (FBetween(us.nRel, rcHexaWheel, rcDual) ? us.nRel : 0);
4261 else {
4262 cChart = 2;
4263 CopyRgb(ignore, ignoreSav, sizeof(ignore));
4264 }
4265 fSav = us.fRefract; us.fRefract = fFalse;
4266
4267 if (us.nRel < rcNone)
4268 CastChart(1);
4269
4270 // Avoid default alignments of sphere that don't look as good.
4271 if (us.fSmartSave && !gi.fDidSphere && gs.rRot == 0.0 && gs.rTilt == 0.0) {
4272 gs.rRot = 7.0;
4273 gs.rTilt = -7.0;
4274 }
4275 gi.fDidSphere = fTrue;
4276
4277 // Draw constellations.
4278 if (gs.fConstel) {
4279 neg(gs.rTilt);
4280 DrawMap(fTrue, fTrue, gs.rRot);
4281 neg(gs.rTilt);
4282 }
4283
4284 // Draw horizon.
4285 if (!fNoHorizon || (!gs.fHouseExtra && fHouse3D)) {
4286 if (!gs.fColorHouse)

Callers 1

DrawChartXFunction · 0.85

Calls 15

CopyRgbFunction · 0.85
CastChartFunction · 0.85
DrawColorFunction · 0.85
FSphereLocalFunction · 0.85
DrawPointFunction · 0.85
FSphereEarthFunction · 0.85
FSpherePrimeFunction · 0.85
ModFunction · 0.85
FSphereMeridianFunction · 0.85
FSphereZodiacFunction · 0.85
DrawSignFunction · 0.85
MidpointFunction · 0.85

Tested by

no test coverage detected