home *** CD-ROM | disk | FTP | other *** search
- <<* GENHUE.INC *>>
- <<#
-
- function AtrCode( atr : integer ) : string
- string hilite,blink,hues,atrstrg
- integer hinib,lonib
- begin
- hues := 'N ,B ,G ,BG,R ,BR,GR,W '
- if (atr and 8) = 8
- hilite := '+'
- endif
- if (atr and 128) = 128
- blink := '*'
- endif
- lonib := (atr and 7)
- hinib := ((atr shr 4) and 7)
- atrstrg := rtrim( substr( hues,(lonib * 3) + 1,2 ) ) + blink + hilite + '/'
- atrstrg := atrstrg + rtrim( substr( hues,(hinib * 3) + 1,2 ) )
- RETURN atrstrg
- end <<*AtrCode*>>
-
-
- procedure GenColorAtr
- integer lastatr
- begin
- if fldsay
- lastatr := forecolor
- else
- lastatr := backcolor
- endif
- if (fldatr <> lastatr)
- gen( 'SET COLOR TO ' )
- if fldget
- gen( ',' )
- endif
- genln( AtrCode(fldatr) )
- if fldsay
- forecolor := fldatr
- else
- backcolor := fldatr
- endif
- endif
- end <<*GenColorAtr*>>
-
-
- <<*
- procedure GenColorHue
- begin
- if (fldhue <> lasthue)
- genln( 'SET COLOR TO ',AtrCode( fldhue ) )
- lasthue := fldhue
- endif
- end GenColorHue
- *>>
-
- <<* EOF: GENHUE.INC *>>
- #>>