home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / Samples / C-ASM_VI.ARJ / PROGC.ZIP / PROGC083.C < prev    next >
Text File  |  1988-04-10  |  823b  |  19 lines

  1.  
  2. /************************************************************************/
  3. /* Clear screen and then draw 16 boxes                                  */
  4. /************************************************************************/
  5.  
  6. solid_box16()
  7.         {
  8.         int     i, j, x, y, color;
  9.         solid_box(0,0,640,350,0);               /* Clear screen         */
  10.         for (j = 0; j < 4; j++)                 /* Loop over rows of b's*/
  11.                 for (i = 0; i < 4; i++)         /* Loop over columns    */
  12.                         {
  13.                         y     = j * 200/4;      /* Draw the box         */
  14.                         x     = i * 640/4;
  15.                         color = i + j * 4;
  16.                         solid_box(x, y, x + 640/4, y + 200/4, color);
  17.                         }
  18.         }
  19.