void RadarScreen::DisplayPlanes (Traffic *Traff_i) { EifIterator PlaneIt; Plane *CrntPlane; Select (); PlaneIt = Traff_i->AirborneIterator(); while (!PlaneIt.Finished()) { CrntPlane = Traff_i->Airborne (PlaneIt); if (CrntPlane->CurPos().inField()) { GotoFieldPosition (CrntPlane->CurPos()); if (CrntPlane->PType() == Jet) { textcolor (JET_COLOUR); } else { assert (CrntPlane->PType() == Prop); textcolor (PROP_COLOUR); } } else { GotoFieldPosition (CrntPlane->CurPos().NextMove (CrntPlane->CurHead() + D180)); textcolor (LAST_POS_COLOUR); } cprintf ("%c%d", CrntPlane->Id(), CrntPlane->CurAlt()); PlaneIt.Forth(); } }
void RadarScreen::UnDisplayPlanes (Traffic *Traff_i) { EifIterator PlaneIt; Plane *CrntPlane; Select(); PlaneIt = Traff_i->AirborneIterator(); while (!PlaneIt.Finished()) { CrntPlane = Traff_i->Airborne (PlaneIt); PrintBackPosition (CrntPlane->CurPos()); PlaneIt.Forth(); } }