[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
const
  bw40                      = 0;{40x25 b/w on cga}
  co40                      = 1;{40x25 color on cga}
  bw80                      = 2;{80x25 b/w on cga}
  co80                      = 3;{80x25 color on cga}
  mono                      = 7;{80x25 b/w on mda or hgc}
  font8x8                   = 256;{43-/50-line mode ega/vga}
  co132x25                  = 85;{color 132x25 line mode ega paradise 480}
  co132x43                  = 84;{color 132x43 line mode ega paradise 480}
  mo132x25                  = 86;{mono 132x25 line mode ega paradise 480}
  mo132x43                  = 87;{mono 132x43 line mode ega paradise 480}
  c40                       = co40;{for 3.0 compatibility}
  c80                       = co80;{for 3.0 compatibility}

  black                     = $00;
  blue                      = $01;
  green                     = $02;
  cyan                      = $03;
  red                       = $04;
  magenta                   = $05;
  brown                     = $06;
  lightgray                 = $07;
  darkgray                  = $08;
  lightblue                 = $09;
  lightgreen                = $0a;
  lightcyan                 = $0b;
  lightred                  = $0c;
  lightmagenta              = $0d;
  yellow                    = $0e;
  white                     = $0f;
  blink                     = $80;

  blackbg                   = $00;
  bluebg                    = $10;
  greenbg                   = $20;
  cyanbg                    = $30;
  redbg                     = $40;
  magentabg                 = $50;
  brownbg                   = $60;
  lightgraybg               = $70;


type
  adaptertype = (
    none,mda,hercules,cga,egamono,egacolor,mcgamono,mcgacolor,
    vgamono,vgacolor
  );

  charset     = set of char; {makkelijk}

  stscreen    = string[132]; {max screen lengte i know is possible}
  bordertypes               = (nobrdr,
                               spacebrdr,singlebrdr,doublebrdr,
                               horizdoublevertsinglebrdr,
                               horizsinglevertdoublebrdr,
                               hatch1brdr,hatch2brdr,hatch3brdr);

  borders                   = (horiztop, horizbottom,
                               vertleft, vertright, horizborders,
                               vertborders, allborders);
  borderparts               = (tl,tr,bl,br,ht,hb,vr,vl,lc,rc,tc,bc,cc);
  borderarray               = array[tl..cc] of char;

const
  borderst : array [spacebrdr..hatch3brdr] of borderarray = (
    '#############',
    '++++--||||--+',
    '++++--||||--+',
    '++++--||-|--+',
    '++++--||-|-++',
    '#############',
    '#############',
    '#############'
   );

type
  largearray     = array [1..32000] of word;

  savescrptr     = savescrrec;
  savescrrec     = record
   screensize   : word;
   savedscr     : largearray;
  end;

  quickwindowptr = quickwindowrec;
  quickwindowrec = record
   previous      : quickwindowptr; { is nil when last window }
   windowinfo    : savescrptr; { window size,saved screen }
   x1,y1,
   x2,y2         : byte; { absolute screen coordiantes }
   bt            : bordertypes;
   sscrolllock   : boolean; { saved scrolllock status }
   signorewindow : boolean; { saved ignorewindow }
   sscanlines    : word; { cursor scan lines }
   sx,sy         : byte; { cursor position }
   swindmin,
   swindmax      : word; { saved previous window }
   stextattr     : byte; { saved textattr }
  end;


var
  checksnow          : boolean absolute eco_adpt.checksnow;{for snow on cga}
  textattr           : byte;{back and foreground color}
  windmin            : word;{window coordinaten}
  windmax            : word;
  lastmode           : word absolute eco_adpt.currenttextmode;

  (* extra vars not in borland's CRT *)
  videopage          : byte absolute eco_adpt.videopage;{video page number}
  videocard          : adaptertype absolute eco_adpt.videocard; {video kaart}
  maxrows            : byte absolute eco_adpt.maxrows;{current max number }
  maxcols            : byte absolute eco_adpt.maxcols;{ of colums and lines}
  videoofs           : word absolute eco_adpt.videoofs;{offset video memory}
  videoseg           : word absolute eco_adpt.videoseg;{start video memory}
  videoptr           : pointer absolute eco_adpt.videoptr;
  scrolllockscreen   : boolean;{scroll screen;normaal is false}
  startupmode        : word absolute eco_adpt.startupmode;{videomode at startup time}
  startupcursorsize  : word absolute eco_adpt.startupcursorsize;
  ignorewindow       : boolean; { if true abs screen coordinates are in use }
  visiblequickwindow : quickwindowptr; { active quick window }


  procedure textmode(mode : integer);

  procedure window(x1,y1,x2,y2 : byte);
  procedure clrscr;
  procedure clrline(y : byte);
  procedure clreol;

  procedure delline;
  procedure insline;

  procedure normvideo;
  procedure lowvideo;
  procedure highvideo;

  procedure textbackground(color : byte);
  procedure textcolor(color : byte);

  procedure gotoxy(x,y : byte);
  function  wherey : byte;
  function  wherex : byte;
  procedure gotoxyabs(x,y : byte);
  function  whereyabs : byte;
  function  wherexabs : byte;

  function  windowcols : byte;
  function  windowrows : byte;

  function  readword : word;
   inline($b8/$00/$00/           { mov ax,0        }
          $cd/$16);              { int 16h         }

  function  readkey : char;
  function  keypressed : boolean;

  procedure delay(ms : word);
  procedure sound(hz : word);
  procedure nosound;

  procedure assigncrt(var f : text);

  function  location(x,y : byte) : word;
  procedure fillword(var dest;width,value : word);

  procedure scrollup(x1,y1,x2,y2,color : byte);
  procedure scrolldown(x1,y1,x2,y2,color : byte);

  procedure fastwrite(x,y,attr : byte;st : stscreen);
  procedure fastpwrite(x,y : byte;st : stscreen);
  procedure changeattr(x,y,attr,len : byte);
  procedure titleengine(x1,y1,x2,y2 : byte;bt : bordertypes;
                        var title : stscreen);
  procedure boxengine(x1,y1,x2,y2,attr : byte;
                      bordertype : bordertypes;filled : boolean);

  procedure movefromscreen(var source,dest;length : word);
  procedure movetoscreen(var source,dest;length : word);

  (* cursor manipulation *)
  procedure normalcursor;
  procedure insertcursor;
  procedure halfcursor;
  procedure hidecursor;

  (* screen save/restore procedures *)
  function  savepartscreen(x1,y1,x2,y2 : byte) : savescrptr;
  procedure restorepartscreen(var scrptr : savescrptr;x1,y1,x2,y2 : byte);
  procedure disposepartscreen(var scrptr : savescrptr);

  (* quick window interface *)
  procedure quickopenwindow(x1,y1,x2,y2,attr : byte;bt : bordertypes;
                            st : stscreen);
  procedure quickmovewindow(x,y : byte);
  procedure quickclosewindow;

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson