Category : C Source Code
Archive   : WTWG12B.ZIP
Filename : WFRAME.C

 
Output of file : WFRAME.C contained in archive : WTWG12B.ZIP
/*! wframe
*
*
* draw a box on the screen using direct video RAM access
*
*/
#include "wsys.h"



void wframe ( int left, int top, int right, int bottom,
int boxtype, unsigned char box_attr)
{
int x,y;
struct WBOX_PATTERN box;

/* copy the box to local memory,
* so it can be accessed without using index methods
* and faster in LARGE model.
*/
box = wbox[boxtype];


/* draw top of box */
wputcabs ( left, top, box.nw, box_attr, WGOVERWRITE );
for ( x = left+1; x {
wputcabs ( x, top, box.horiz, box_attr,
WGOVERWRITE );
}
wputcabs ( right, top, box.ne, box_attr, WGOVERWRITE );

/* draw lines with vertical edge borders and clear centers */
for ( y = top+1; y < bottom; ++y )
{
/* one loop iteration per horizontal line */

/* draw left hand edge of box */
wputcabs ( left, y, box.vert, box_attr, WGOVERWRITE );

/* draw right-hand edge of box */
wputcabs ( right, y, box.vert, box_attr, WGOVERWRITE);
} /*end of loop to draw lines with vertical edges */


/* draw bottom edge of box */
wputcabs ( left, bottom, box.sw, box_attr, WGOVERWRITE );
for ( x = left+1; x {
wputcabs ( x, bottom, box.horiz, box_attr,
WGOVERWRITE );
}
wputcabs ( right, bottom, box.se, box_attr, WGOVERWRITE );





return; /* end of wframe */
}



  3 Responses to “Category : C Source Code
Archive   : WTWG12B.ZIP
Filename : WFRAME.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/