[ C++ RCOS Home | RCOS.java Home | RCOS Home | David's Home ]

RCOS C++ CRC for class DiskAnim

Name:

DiskAnim

Comment:

A class to render and animate a disk unit. Units are drawn in unit ID order, left to right, with one pixel per track - so limit instances to 80 tracks max, please..

Collaborators:

WinPainter

Responsibilities:

  class DiskAnim : public WinPainter {
    point  PtSpinPos;           // centre of disk platter
    point  PtIndexPos;          // current index hole location
    INT16  nHeadPosY;           // current graphic head position
    UINT16 nLid;                // "our" logical unit ID (0 = "A:" etc)
    UINT16 nTracks;             // 0 < nTracks <= 80
    UINT16 nDiskRad;            // calculated platter radius in pixels
  public:
    DiskAnim (UINT16, UINT16);
   ~DiskAnim (void) { }
    void Paint (void);          // mandatory WinPainter member
    void PaintTQ (void);        // full draw of queue box
    void DiskSeek (INT16);      // head missile animator
    void DiskSpin (UINT16);     // index hole animator
    void RefreshTQ (TransQ*, INT16 = 0);        // queue update
  };