亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? vglfonts.c

?? 在DOS13號中斷下開發圖形顯示程序的例程
?? C
字號:
/*****************************************************************************
 VGLFONTS.C

 Routines to add bitmapped font capabilities.  Read the comments for each
 routine for instructions on how to use them.  They're pretty straight
 forward.

 Mark
 morley@camosun.bc.ca
*****************************************************************************/

#include <stdio.h>
#include <dos.h>
#include <dir.h>
#include "vgl.h"

static VGLFONT       header;            /* The current font info.           */
static unsigned char buffer[4096];      /* All bitmaps for a font must fit  */
                                        /* within this buffer.  This does   */
                                        /* not include the header data, so  */
                                        /* all the fonts I included with    */
                                        /* this package will fit just fine. */

static int cx = 0;                      /* The current X and Y position of  */
static int cy = 0;                      /* the invisible "cursor".  This is */
                                        /* where the next character will be */
                                        /* drawn.  X is the leftmost column */
                                        /* of the character, but Y is *NOT* */
                                        /* the topmost row!  Y is the row   */
                                        /* that lines up with the char's    */
                                        /* *BASELINE*                       */

static int color = 15;                  /* Default color for text is white  */
static int shcolor = 1;                 /* Shadow color is blue             */
static int uncolor = 1;                 /* Underline color is blue          */
static int bold = 0;                    /* Bolding is off                   */
static int shadow = 0;                  /* Shadows are off                  */
static int italic = 0;                  /* Italics are off                  */
static int underline = 0;               /* Underlining is off               */

/*****************************************************************************
  Turns bolding off.
*****************************************************************************/
vglBoldOff()
{
   bold = 0;
   return;
}

/*****************************************************************************
  Turns bolding on.
*****************************************************************************/
vglBoldOn()
{
   bold = 1;
   return;
}

/*****************************************************************************
  Returns the current X position.  Remember that X represents the column that
  will match the leftmost column of the next character.
*****************************************************************************/
vglGetX()
{
   return cx;
}

/*****************************************************************************
  Turns the current Y position.  Remember that Y represents the row that will
  match the BASELINE of the next character!
*****************************************************************************/
vglGetY()
{
   return cy;
}

/*****************************************************************************
  Goto X,Y.  See the above two functions for an explanation of the X and Y
  meanings.
*****************************************************************************/
vglGotoXY( int x, int y )
{
   cx = x;
   cy = y;
   if( cy < header.vspace )
      cy = header.vspace;
   return;
}

/*****************************************************************************
  Turns italics on.  I'm afraid my "italics" are not the nicest.  I simply
  shear the character to the right, one pixel per scan line.  This is
  perhaps a little *too* italicised.
*****************************************************************************/
vglItalicsOn()
{
   italic = 1;
   return;
}

/*****************************************************************************
  Turns italics off.
*****************************************************************************/
vglItalicsOff()
{
   italic = 0;
   return;
}

/*****************************************************************************
  Loads a font from disk.  If the font can be read it returns 1, else it
  returns 0.  Only one font can be in memory at a time, but since fonts are
  generally small due to the font file format, you can load them pretty
  quickly.
*****************************************************************************/
vglLoadFont( char* font )
{
   FILE* fp;

   fp = fopen( font, "rb" );
   if( !fp )
      return 0;
   fread( &header, sizeof(VGLFONT), 1, fp );
   fread( buffer, header.data, 1, fp );
   fclose( fp );
   return 1;
}

/*****************************************************************************
  The kernel of the font engine.  Messy Marvin time.  Oh well, whaddya expect
  for a 2 hour hack?  Anyway, this is the routine that actually draws a
  character on the screen at the current X,Y location.  It advances the X,Y
  position and wraps across and down the screen as necessary.  At the end of
  the screen it will wrap back to the top left corner.  If you try and
  display a carriage return or newline, they will work just like they would
  in a printf() call.

  The routine works by drawing the character into a tiny buffer, then calling
  the vglPutSprite() routine to display it.  This means that you cannot use
  the color 0 for text, underlines, or shadows because it will be transparent.
  If you want black shadows, use another palette entry!

  This routine, along with the font file format, was created in about 2
  hours.  I HAVEN'T FULLY TESTED IT!!!  It works for me (so far), and
  hopefully you will find it useful.

  WARNING: This ain't no speed demon!  I was more interested in having a
  small font file format.  I also wanted the font to take up minimal RAM
  when loaded.  These means more processing.

  I hope to add other text effects (eg: outline), but who knows?
*****************************************************************************/
vglPutc( int c )
{
   register       x, y;
   int            bit, oy;
   unsigned char* off;
   unsigned char  rast[2048];
   unsigned char* b;
   int            h, w, rw, o, oo;
   int            wid, hit;

   if( header.flags & FONT_UPPERCASE && c >= 'a' && c <= 'z' )
      c -= 32;
   if( c < 33 )
   {
      switch( c )
      {
         case '\r'      : cx = 0;
                          break;
         case '\n'      : cy += header.vspace;
                          break;
         case ' '       : if( underline )
                          {
                             for( y = 1; y <= underline; y++ )
                                vglLine( cx, cy + y, cx + header.wswid, cy + y, uncolor );
                          }
                          cx += header.wswid;
                          break;
      }
      return;
   }
   if( header.chwid[c] == 0 )
      return;
   h = header.chhit[c];
   w = header.chwid[c];
   if( italic )
      oo = h / 2;
   else
      oo = 0;
   o = oo;
   rw = w + bold + shadow + o;
   if( cx + rw > 319 )
   {
      cx = 0;
      cy += header.vspace;
   }
   if( cy > 199 )
   {
      cx = 0;
      cy = header.vspace;
   }
   off = buffer + header.choff[c];
   oy = cy - header.chbas[c] + 1;
   memset( rast, 0, 2048 );
   b = rast;
   wid = rw;
   hit = h + shadow;
   if( underline )
   {
      for( y = 1; y <= underline; y++ )
         vglLine( cx, cy + y, cx + rw + header.hspace, cy + y, uncolor );
   }
   for( y = 0; y < h; y++ )
   {
      bit = 1;
      b += o;
      for( x = 0; x < w; x++, bit <<= 1 )
      {
         if( bit == 256 )
         {
            bit = 1;
            off++;
         }
         if( *off & bit )
         {
            *b = color;
            if( shadow )
               *(b + shadow + rw * shadow) = shcolor;
            if( bold )
            {
               *(b + 1) = color;
               if( shadow )
                  *(b + 1 + shadow + rw * shadow) = shcolor;
            }
         }
         b++;
      }
      b += bold + shadow + (oo - o);
      if( italic && (y & 1) )
         o--;
      off++;
   }
   vglPutSprite( cx, oy, wid, hit, (char far*)rast );
   cx += w + bold;
   cx += header.hspace;
   return;
}

/*****************************************************************************
  Displays a string.  To display a formatted string (like printf) you should
  first use sprintf to print into a buffer, then pass that buffer to vglPuts
*****************************************************************************/
vglPuts( char* s )
{
   while( *s )
      vglPutc( *s++ );
   return;
}

/*****************************************************************************
  Sets the shadow color.  This does *not* turn shadows on!
*****************************************************************************/
vglShadowColor( int c )
{
   shcolor = c;
   return;
}

/*****************************************************************************
  Turns shadows off.
*****************************************************************************/
vglShadowOff()
{
   shadow = 0;
   return;
}

/*****************************************************************************
  Turns shadows on.  The "depth" of the shadow is specified in pixels.
  Normally a value of 1 or 2 looks good.
*****************************************************************************/
vglShadowOn( int s )
{
   if( s > 10 )
      s = 10;
   else if( s < 1 )
      s = 1;
   shadow = s;
   return;
}

/*****************************************************************************
  Sets the text color.
*****************************************************************************/
vglTextColor( int c )
{
   color = c;
   return;
}

/*****************************************************************************
  Sets the underline color.
*****************************************************************************/
vglUnderlineColor( int c )
{
   uncolor = c;
   return;
}

/*****************************************************************************
  Turns on underlining.  The thickness of the underlining is specified in
  pixels.  A value of 1 or 2 usually looks good.
*****************************************************************************/
vglUnderlineOn( int n )
{
   if( n > 10 )
      n = 10;
   else if( n < 1 )
      n = 1;
   underline = n;
   return;
}

/*****************************************************************************
  Turns off underlining.
*****************************************************************************/
vglUnderlineOff()
{
   underline = 0;
   return;
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久亚洲综合| eeuss鲁片一区二区三区在线观看| 一色屋精品亚洲香蕉网站| 精品久久久久久综合日本欧美| 91精品国产综合久久香蕉的特点| 在线成人免费观看| 91精品一区二区三区久久久久久 | 精品久久免费看| 欧美一区日韩一区| 精品国产乱码久久久久久免费| 日韩欧美不卡在线观看视频| 精品国产在天天线2019| 久久久99久久| 中文字幕一区不卡| 一区二区日韩av| 青青草97国产精品免费观看| 国产毛片精品视频| 不卡一区二区在线| 日本韩国视频一区二区| 欧美午夜电影在线播放| 制服丝袜在线91| 久久综合色播五月| 亚洲婷婷综合久久一本伊一区| 亚洲国产一区二区三区| 天天影视涩香欲综合网| 国产一区啦啦啦在线观看| 不卡的电视剧免费网站有什么| 99久久99久久综合| 日韩丝袜情趣美女图片| 国产精品久久久久久久第一福利| 一区二区三区在线免费观看| 蜜臀久久99精品久久久久久9| 国产成人精品aa毛片| 欧美综合一区二区三区| 精品国产伦一区二区三区免费| 日韩一区在线看| 五月天网站亚洲| 国产成人精品一区二区三区四区| 欧美亚洲尤物久久| 久久久综合视频| 亚洲国产wwwccc36天堂| 国产在线精品一区二区三区不卡 | 亚洲精品日产精品乱码不卡| 琪琪久久久久日韩精品| 99re成人在线| 久久综合999| 国产精品一区二区久久不卡| 日本丶国产丶欧美色综合| 欧美成人性福生活免费看| 亚洲精品视频观看| 国产精品一区二区免费不卡| 在线不卡一区二区| 亚洲天堂免费看| 国产一区二区中文字幕| 日韩一级完整毛片| 午夜久久久影院| 色综合久久综合中文综合网| 久久久久免费观看| 蜜桃在线一区二区三区| 欧美色区777第一页| 亚洲人成亚洲人成在线观看图片 | 懂色av噜噜一区二区三区av | 日本三级韩国三级欧美三级| 国产一区二区在线看| 777午夜精品视频在线播放| 日本一区二区三级电影在线观看 | av成人动漫在线观看| 日韩免费观看2025年上映的电影| 亚洲色图在线视频| 国产精品自拍av| 欧美一区二区三区电影| 日韩中文字幕亚洲一区二区va在线 | 国产亚洲精品7777| 老司机午夜精品| 欧美性高清videossexo| 中文字幕一区二区三区在线播放| 国产在线一区观看| 久久久99久久| 国产成人免费视频网站| 久久久.com| 国产成人精品三级| 日韩欧美在线观看一区二区三区| 日韩精品一二三四| 欧美mv日韩mv国产网站app| 久久激情五月激情| 亚洲精品在线观看网站| 国产一区不卡视频| 国产亚洲欧美色| av亚洲精华国产精华精华| 亚洲欧美经典视频| 欧美丰满高潮xxxx喷水动漫| 午夜精品在线视频一区| 欧美三级视频在线观看| 一区二区三区美女| 欧美日韩一区高清| 奇米色777欧美一区二区| 日韩久久久久久| 久久99九九99精品| 国产精品欧美一区喷水| 一本色道久久综合亚洲aⅴ蜜桃| 洋洋成人永久网站入口| 日韩天堂在线观看| 成人av综合在线| 亚洲永久精品大片| 久久综合九色欧美综合狠狠| 99精品久久久久久| 日韩主播视频在线| 国产精品妹子av| 欧美日韩一级黄| 精品亚洲成a人在线观看| 国产精品不卡在线| 欧美一区二区不卡视频| 成人av手机在线观看| 午夜视频在线观看一区二区三区| 欧美mv日韩mv亚洲| 欧美性大战久久| 日韩av中文在线观看| 久久香蕉国产线看观看99| 波多野结衣视频一区| 日韩在线a电影| 欧美电影免费观看高清完整版在线 | 99精品视频在线免费观看| ㊣最新国产の精品bt伙计久久| 欧美午夜不卡视频| 波多野洁衣一区| 天天影视网天天综合色在线播放| 亚洲国产精品v| 91精品国产91久久久久久最新毛片| 成人免费视频网站在线观看| 蜜臀99久久精品久久久久久软件| 亚洲精品欧美综合四区| 国产精品午夜在线| 日韩欧美综合在线| 欧美疯狂做受xxxx富婆| 日本韩国欧美三级| jiyouzz国产精品久久| 狠狠色伊人亚洲综合成人| 午夜精品福利在线| 亚洲精品日产精品乱码不卡| 国产欧美一区二区在线观看| 精品国产区一区| 欧美一区二区三区视频| 欧美日韩久久久久久| 色哟哟一区二区三区| www.亚洲在线| 丁香桃色午夜亚洲一区二区三区| 国产一区二区调教| 日韩精品一二区| 亚洲国产综合91精品麻豆| 亚洲精品中文在线观看| 亚洲欧美一区二区在线观看| 国产精品久久久久久久久免费相片 | 日产国产欧美视频一区精品| 午夜精品久久久久久久| 婷婷开心久久网| 午夜一区二区三区在线观看| 亚洲综合另类小说| 亚洲成人你懂的| 亚洲一区二区三区四区在线免费观看| 亚洲人成小说网站色在线 | 亚洲成在人线在线播放| 亚洲小说欧美激情另类| 图片区日韩欧美亚洲| 日韩av在线发布| 久久精品国产澳门| 国产精品一区二区三区四区 | 午夜电影网亚洲视频| 亚洲一区在线观看网站| 午夜精品久久久久久久| 久久99久久99精品免视看婷婷| 久久黄色级2电影| 懂色中文一区二区在线播放| 99精品久久久久久| 欧美视频一二三区| 日韩欧美一二三四区| 久久久精品国产免大香伊| 国产精品欧美极品| 亚洲影视在线观看| 蜜臀av性久久久久蜜臀aⅴ四虎 | 亚洲激情欧美激情| 日韩av成人高清| 国产电影精品久久禁18| 91美女视频网站| 欧美一二三区在线观看| 国产亚洲成年网址在线观看| 亚洲精品第1页| 美女视频黄 久久| 成人精品免费视频| 欧美区在线观看| 欧美—级在线免费片| 天堂av在线一区| 成人免费视频播放| 在线播放视频一区| 国产欧美视频在线观看| 亚洲动漫第一页| 成人性生交大片免费看视频在线| 欧美久久久久久久久中文字幕| 久久久久久亚洲综合影院红桃| 亚洲精品视频在线观看网站| 精品亚洲免费视频|