| 464 | // Note animation mode for comparison charts will update the second chart. |
| 465 | |
| 466 | void Animate(int mode, int toadd) |
| 467 | { |
| 468 | if (((gi.nMode == gAstroGraph || gi.nMode == gSphere) && gs.fAnimMap) || |
| 469 | ((gi.nMode == gWorldMap || gi.nMode == gGlobe || gi.nMode == gPolar) && |
| 470 | (gs.fAlt || gs.fAnimMap))) { |
| 471 | gs.rRot += (real)toadd; |
| 472 | if (gs.rRot >= rDegMax) // For animating map displays, add in |
| 473 | gs.rRot -= rDegMax; // appropriate degree value. |
| 474 | else if (gs.rRot < 0.0) |
| 475 | gs.rRot += rDegMax; |
| 476 | return; |
| 477 | } |
| 478 | |
| 479 | mode = NAbs(mode); |
| 480 | if (mode == iAnimNow) { |
| 481 | #ifdef TIME |
| 482 | // For the continuous chart update to present moment animation mode, go |
| 483 | // get whatever time it is now. |
| 484 | FInputData(szNowCore); |
| 485 | #else |
| 486 | mode = 1; |
| 487 | goto LNotNow; |
| 488 | #endif |
| 489 | } else { // Otherwise add on appropriate time vector to chart info. |
| 490 | #ifndef TIME |
| 491 | LNotNow: |
| 492 | #endif |
| 493 | if (us.nRel == rcDual || us.nRel <= rcTransit) |
| 494 | ciCore = ciTwin; |
| 495 | else if (us.fProgress || us.fTransit || us.fTransitInf || us.fTransitGra) |
| 496 | ciCore = ciTran; |
| 497 | else |
| 498 | ciCore = ciMain; |
| 499 | AddTime(&ciCore, mode, toadd); |
| 500 | } |
| 501 | if (us.nRel == rcDual || us.nRel <= rcTransit) { |
| 502 | ciTwin = ciCore; |
| 503 | ciCore = ciMain; |
| 504 | } else if (us.fProgress || us.fTransit || us.fTransitInf || us.fTransitGra) { |
| 505 | ciTran = ciCore; |
| 506 | ciCore = ciMain; |
| 507 | if (us.fProgress) |
| 508 | is.JDp = MdytszToJulian(MonT, DayT, YeaT, TimT, ciDefa.dst, ciDefa.zon); |
| 509 | } else |
| 510 | ciMain = ciCore; |
| 511 | if (us.nRel) |
| 512 | CastRelation(); |
| 513 | else |
| 514 | CastChart(0); |
| 515 | } |
| 516 | |
| 517 | |
| 518 | #ifndef WIN |
no test coverage detected