Category : C Source Code
Archive   : $2MENU18.ZIP
Filename : DRAWBOX.C

 
Output of file : DRAWBOX.C contained in archive : $2MENU18.ZIP

extern unsigned int far *scrnptr; /* INITSCRN.C */
extern int cols_per_row; /* INITSCRN.C */

unsigned char *boxchar[] = {
" ", /* style 0 */
"ÚÄ¿³³ÀÄÙ", /* style 1 */
"ÉÍ»ººÈͼ", /* style 2 */
"Õ͸³³Ô;", /* style 3 */
"ÖÄ·ººÓĽ", /* style 4 */
"ÜÜÜÝÞßßß" /* style 5 */
};

/***********
* drawbox *
***********/
void drawbox(int x1, int y1, int x2, int y2,
int style, int att)
{
/* draw a box on screen */

unsigned int far *p;
int x,y;

x1--; y1--; x2--; y2--;
att = att << 8;
p = scrnptr + (y1*cols_per_row);
*(p+x1) = att + boxchar[style][0];
for (x = x1+1; x < x2; x++)
*(p+x) = att + boxchar[style][1];
*(p+x2) = att + boxchar[style][2];
for (y = y1+1; y < y2; y++)
{
p = scrnptr + (y*cols_per_row);
*(p+x1) = att + boxchar[style][3];
*(p+x2) = att + boxchar[style][4];
}
p = scrnptr + (y2*cols_per_row);
*(p+x1) = att + boxchar[style][5];
for (x = x1+1; x < x2; x++)
*(p+x) = att + boxchar[style][6];
*(p+x2) = att + boxchar[style][7];
}




  3 Responses to “Category : C Source Code
Archive   : $2MENU18.ZIP
Filename : DRAWBOX.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/