home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / progm / clock.zip / CLKMNH.C < prev    next >
Text File  |  1986-12-22  |  1KB  |  48 lines

  1. /***************************************************** CLKMNH.C
  2.  * NAME:    CLKMNH
  3.  *
  4.  * FUNCTION:    Computes minute hand
  5.  *
  6.  * EXAMPLE:    CLKMNH();
  7.  *
  8.  * INPUTS:    determined from global definitions
  9.  *        lastmn, thismn, mncol, mnwth    
  10.  *
  11.  * OUTPUT:    placed into global definitions
  12.  *        acbmn, acdmn
  13.  **************************************************************
  14.  * 11/22/86 -RBM- original implementation
  15.  **************************************************************/
  16. #define XTRNALGLOBALS 1        /* globals externally defined    */
  17. #include "E:CLKGBL.H"        /* setup global storage */
  18.  
  19. /**************************************************************
  20.  * BEGIN ROUTINE
  21.  **************************************************************/
  22.  
  23. CLKMNH()
  24. {
  25. int    i;            /* temporary counter            */
  26. int    blkhnd;            /* blanking hand (area to blank out)    */
  27. struct    ACTIMAGE *imgptr;    /* pointer to hand image structure    */
  28.  
  29. if (lastmn != thismn)        /* active only when min changes        */
  30.     {
  31.     change = 1;        /* show change                */
  32.  
  33.     /*--- determine which hand to use ---*/
  34.     actmn = thismn;
  35.  
  36.     /*--- determine what to blank --------*/
  37.     blkhnd = actmn - 1;
  38.     if (blkhnd < 0) blkhnd = 59;
  39.  
  40.     /*--- build minute hand images ---------*/
  41.     imgptr = &acbmn[0];
  42.     clkimgh (imgptr, blkhnd);    /* image blanking    */
  43.     imgptr = &acdmn[0];
  44.     clkimgh (imgptr, actmn);    /* image drawing    */
  45.     };
  46.  
  47. }                /***** end of routine ******/
  48.