home *** CD-ROM | disk | FTP | other *** search
-
- ;******************************************************************************}
- ; TEGL Windows ToolKit II }
- ; Copyright (C) 1990, TEGL Systems Corporation }
- ; All Rights Reserved. }
- ;******************************************************************************}
-
- TEGLFontInfo struc
- Fontsignature dw ? ;signature byte
- FontHeight db ? ;font height
- FontWidth db ? ;font width (fixed)
- FontAsciiStart db ? ;ascii range start
- FontAsciiEnd db ? ;ascii range end
- FontTop db ? ;top line
- FontBase db ? ;base line
- FontBottom db ? ;bottom line
- FontByteWidth db ? ;font width (number in bytes)
- TEGLFontInfo ends
-
- TEGLVideoInfo struc
- vmodename db 22 dup(?) ; Mode String Name
- vmodenum dw ? ; Mode Number
- vmaxx dw ? ; Device Full Resolution in X
- vmaxy dw ? ; Device Full Resolution in Y
- vstdchrwidth dw ? ; Standard char size X
- vstdchrheight dw ? ; Standard char size Y
- vmaxcolor dw ? ; Number of colors
- vmaxpages dw ? ; Number of pages
- vmaxpalette dw ? ; Maximum palette
- activepage dw ? ; buffer offset for 2 page
- vscreenseg dw ? ; Screen Segment
- vbytesperline dw ? ; bytes per line
- vaspectx dw ? ; aspect ratio x * 1000
- vaspecty dw ? ; aspect ratio y * 1000
- vdriverptr dd ? ; video driver start address
- vdrivername dd ? ; video driver name ptr
- vjumptable dd ? ; video driver jump table
- vgraphbuffer dd ? ; graphics work buffer
- vgraphbuffsize dw ? ; graphics work buffer size
- rmwbits dw ? ; Read/Write modes
- transparency db ? ; transparency on-$00/off-$ff
- jagged db ? ; jagged characters on-1/off-0
- fonttable dd ? ; pointer to font table
- paletteflag db ? ; allow EGA palette changes
- paletteRGBflag db ? ; allow VGA 256 palette changes
- proportionalfont db ? ; proportional font switch
- teglfillmask dw ? ; fillmask for lines
- wminx dw ? ; viewport - minx
- wminy dw ? ; viewport - miny
- wmaxx dw ? ; viewport - maxx
- wmaxy dw ? ; viewport - maxy
- clipped db ? ; viewport - clipping on/off
- mousecolor dw ? ; Mouse color
- mousehotspot_xofs dw ? ; Mouse hotspot
- mousehotspot_yofs dw ? ; Mouse hotspot
- mousemask dd ? ; Mouse Cursor Mask
- ; mousemask dw 32 dup (?) ; Mouse Cursor Mask
- vnextvi dd ? ; Next VideoMode
- TEGLVideoInfo ends
-
- TEGLJumpTable struc
- tg_initvideomode dw ? ; initvideomode
- tg_setxlattable dw ? ; setcolorxlattable
- tg_setvideotable dw ? ; setvideotable
- tg_getvideotable dw ? ; getvideotable
- tg_imagesize dw ? ; imagesize
- tg_fastline dw ? ; fastline
- tg_scanborder dw ? ; scanborder
- tg_putpixs dw ? ; putpixs
- tg_getpixs dw ? ; getpixs
- tg_getbiti dw ? ; getbiti
- tg_putbiti dw ? ; putbiti
- tg_extractimg dw ? ; extractimg
- tg_overlayimg dw ? ; overlayimg
- tg_extractpixs dw ? ; extractpixs
- tg_wrtchar dw ? ; wrtchar
- tg_mcursoroff dw ? ; mcursoroff
- tg_mcursoron dw ? ; mcursoron
- tg_msetpos dw ? ; msetpos
- tg_movevideopixels dw ? ; movevideopixels
- tg_setteglvpage dw ? ; setteglvpage
- tg_setteglapage dw ? ; setteglapage
- TEGLJumpTable ends
-
- normalize macro _segment_,_offset_,_tmp_
- local notovr2
-
- IFNB <_TMP_>
- test _offset_,8000h
- jz notovr2
-
- push _offset_
- shr _offset_,1
- shr _offset_,1
- shr _offset_,1
- shr _offset_,1
-
- mov _tmp_,_segment_
- add _tmp_,_offset_
- mov _segment_,_tmp_
-
- pop _offset_
- and _offset_,0fh
- notovr2:
- ELSE
- push _offset_
- push ax
- shr _offset_,1
- shr _offset_,1
- shr _offset_,1
- shr _offset_,1
-
- mov ax,_segment_
- add ax,_offset_
- mov _segment_,ax
-
- pop ax
- pop _offset_
- and _offset_,0fh
- ENDIF
- endm
-
- colorxlat macro color
- local notrans
- lds bx,cs:XLTable
- mov ax,ds
- or ax,ax
- jz notrans
- mov al,byte ptr [color] ; al := pixel value
- xlat
- mov byte ptr [color],al ; al := pixel value
- notrans:
- endm
-
-
- ; .model large,pascal
- .model tpascal
-
-
-