home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / progm / clock.zip / CLKSIZ.C < prev    next >
Text File  |  1987-01-03  |  2KB  |  51 lines

  1. /***************************************************** CLKSIZ.C
  2.  * NAME:    CLKSIZ
  3.  *
  4.  * FUNCTION:    Determines clock size, colors, and location
  5.  *
  6.  * EXAMPLE:    CLKSIZ();
  7.  *
  8.  * INPUTS:    determined from global definitions
  9.  *
  10.  * OUTPUT:    placed into global definitions
  11.  *
  12.  **************************************************************
  13.  * 11/22/86 -RBM- original implementation
  14.  **************************************************************/
  15. #define XTRNALGLOBALS 1        /* globals externally defined    */
  16. #include "E:CLKGBL.H"        /* setup global storage */
  17.  
  18. /**************************************************************
  19.  * BEGIN ROUTINE
  20.  **************************************************************/
  21.  
  22. clksiz()
  23. {
  24. extern struct ACTIMAGE handef[8*HANDSZ]; /* hand definition table */
  25. int    i,j;            /* loop counter, table pointers      */
  26.  
  27. if (clocksize <= 100)
  28.     {
  29.     for (i=1; i<=8; i++)
  30.         {
  31.         j = i*HANDSZ-4; /* downsize clock face control*/
  32.         handef[j-4].row = (handef[j].row * clocksize) / 100;
  33.         handef[j-4].col = (handef[j].col * clocksize) / 100;
  34.  
  35.         j++;        /* downsize hour hand control    */
  36.         handef[j-4].row = (handef[j].row * clocksize) / 100;
  37.         handef[j-4].col = ((handef[j].col * clocksize)/100) - 1;
  38.  
  39.         j++;        /* downsize minute hand control    */
  40.         handef[j-4].row = (handef[j].row * clocksize) / 100;
  41.         handef[j-4].col = ((handef[j].col * clocksize)/100) - 1;
  42.  
  43.         j++;        /* downsize second hand control    */
  44.         handef[j-4].row = (handef[j].row * clocksize) / 100;
  45.         handef[j-4].col = ((handef[j].col * clocksize)/100) - 1;
  46.  
  47.         };
  48.     };
  49.  
  50. }                /***** end of routine ******/
  51.