home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / library / dos / tegl_ii / svga / grphdrvr.inc < prev    next >
Encoding:
Text File  |  1991-04-06  |  4.3 KB  |  140 lines

  1.  
  2. ;******************************************************************************}
  3. ;                TEGL Windows ToolKit II                   }
  4. ;           Copyright (C) 1990, TEGL Systems Corporation            }
  5. ;                 All Rights Reserved.                   }
  6. ;******************************************************************************}
  7.  
  8. TEGLFontInfo    struc
  9.      Fontsignature     dw  ?        ;signature byte
  10.      FontHeight      db  ?        ;font height
  11.      FontWidth         db  ?        ;font width (fixed)
  12.      FontAsciiStart     db  ?        ;ascii range start
  13.      FontAsciiEnd     db  ?        ;ascii range end
  14.      FontTop         db  ?        ;top line
  15.      FontBase         db  ?        ;base line
  16.      FontBottom      db  ?        ;bottom line
  17.      FontByteWidth     db  ?        ;font width  (number in bytes)
  18. TEGLFontInfo    ends
  19.  
  20. TEGLVideoInfo    struc
  21.      vmodename         db  22 dup(?)    ; Mode String Name
  22.      vmodenum         dw  ?        ; Mode Number
  23.      vmaxx         dw  ?        ; Device Full Resolution in X
  24.      vmaxy         dw  ?        ; Device Full Resolution in Y
  25.      vstdchrwidth     dw  ?        ; Standard char size X
  26.      vstdchrheight     dw  ?        ; Standard char size Y
  27.      vmaxcolor         dw  ?        ; Number of colors
  28.      vmaxpages         dw  ?        ; Number of pages
  29.      vmaxpalette     dw  ?        ; Maximum palette
  30.      activepage      dw  ?        ; buffer offset for 2 page
  31.      vscreenseg      dw  ?        ; Screen Segment
  32.      vbytesperline     dw  ?        ; bytes per line
  33.      vaspectx         dw  ?        ; aspect ratio x * 1000
  34.      vaspecty         dw  ?        ; aspect ratio y * 1000
  35.      vdriverptr      dd  ?        ; video driver start address
  36.      vdrivername     dd  ?        ; video driver name ptr
  37.      vjumptable      dd  ?        ; video driver jump table
  38.      vgraphbuffer     dd  ?        ; graphics work buffer
  39.      vgraphbuffsize     dw  ?        ; graphics work buffer size
  40.      rmwbits         dw  ?        ; Read/Write modes
  41.      transparency     db  ?        ; transparency on-$00/off-$ff
  42.      jagged         db  ?        ; jagged characters on-1/off-0
  43.      fonttable         dd  ?        ; pointer to font table
  44.      paletteflag     db  ?        ; allow EGA palette changes
  45.      paletteRGBflag     db  ?        ; allow VGA 256 palette changes
  46.      proportionalfont     db  ?        ; proportional font switch
  47.      teglfillmask     dw  ?        ; fillmask for lines
  48.      wminx         dw  ?        ; viewport - minx
  49.      wminy         dw  ?        ; viewport - miny
  50.      wmaxx         dw  ?        ; viewport - maxx
  51.      wmaxy         dw  ?        ; viewport - maxy
  52.      clipped         db  ?        ; viewport - clipping on/off
  53.      mousecolor      dw  ?        ; Mouse color
  54.      mousehotspot_xofs     dw  ?        ; Mouse hotspot
  55.      mousehotspot_yofs     dw  ?        ; Mouse hotspot
  56.      mousemask         dd  ?        ; Mouse Cursor Mask
  57. ;    mousemask         dw  32 dup (?) ; Mouse Cursor Mask
  58.      vnextvi         dd  ?        ; Next VideoMode
  59. TEGLVideoInfo    ends
  60.  
  61. TEGLJumpTable    struc
  62.      tg_initvideomode     dw  ?        ; initvideomode
  63.      tg_setxlattable     dw  ?        ; setcolorxlattable
  64.      tg_setvideotable     dw  ?        ; setvideotable
  65.      tg_getvideotable     dw  ?        ; getvideotable
  66.      tg_imagesize     dw  ?        ; imagesize
  67.      tg_fastline     dw  ?        ; fastline
  68.      tg_scanborder     dw  ?        ; scanborder
  69.      tg_putpixs      dw  ?        ; putpixs
  70.      tg_getpixs      dw  ?        ; getpixs
  71.      tg_getbiti      dw  ?        ; getbiti
  72.      tg_putbiti      dw  ?        ; putbiti
  73.      tg_extractimg     dw  ?        ; extractimg
  74.      tg_overlayimg     dw  ?        ; overlayimg
  75.      tg_extractpixs     dw  ?        ; extractpixs
  76.      tg_wrtchar      dw  ?        ; wrtchar
  77.      tg_mcursoroff     dw  ?        ; mcursoroff
  78.      tg_mcursoron     dw  ?        ; mcursoron
  79.      tg_msetpos      dw  ?        ; msetpos
  80.      tg_movevideopixels  dw  ?        ; movevideopixels
  81.      tg_setteglvpage     dw  ?        ; setteglvpage
  82.      tg_setteglapage     dw  ?        ; setteglapage
  83. TEGLJumpTable    ends
  84.  
  85. normalize    macro    _segment_,_offset_,_tmp_
  86.         local    notovr2
  87.  
  88. IFNB <_TMP_>
  89.         test    _offset_,8000h
  90.         jz    notovr2
  91.  
  92.         push    _offset_
  93.         shr    _offset_,1
  94.         shr    _offset_,1
  95.         shr    _offset_,1
  96.         shr    _offset_,1
  97.  
  98.         mov    _tmp_,_segment_
  99.         add    _tmp_,_offset_
  100.         mov    _segment_,_tmp_
  101.  
  102.         pop    _offset_
  103.         and    _offset_,0fh
  104. notovr2:
  105. ELSE
  106.         push    _offset_
  107.         push    ax
  108.         shr    _offset_,1
  109.         shr    _offset_,1
  110.         shr    _offset_,1
  111.         shr    _offset_,1
  112.  
  113.         mov    ax,_segment_
  114.         add    ax,_offset_
  115.         mov    _segment_,ax
  116.  
  117.         pop    ax
  118.         pop    _offset_
  119.         and    _offset_,0fh
  120. ENDIF
  121.         endm
  122.  
  123. colorxlat    macro    color
  124.         local    notrans
  125.         lds    bx,cs:XLTable
  126.         mov    ax,ds
  127.         or    ax,ax
  128.         jz    notrans
  129.         mov    al,byte ptr [color]  ; al := pixel value
  130.         xlat
  131.         mov    byte ptr [color],al  ; al := pixel value
  132. notrans:
  133.         endm
  134.  
  135.  
  136. ;        .model large,pascal
  137.       .model tpascal
  138.  
  139.  
  140.