home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 18 / CD_ASCQ_18_111294_W.iso / dos / prg / pas / gfxfx / scroll.pas < prev    next >
Pascal/Delphi Source File  |  1994-06-22  |  4KB  |  108 lines

  1.  
  2. program Oldy;
  3. { very fast moving, oldy-based (meaing: a-la c64) 'smooth' scrolling text
  4.   scroll, by Bas van Gaalen, Holland, PD }
  5. uses
  6.   crt, tpfast;
  7.  
  8. procedure Scroll;
  9.  
  10. const
  11.   UpperLine  : string = ('   ▄███▄ ████▄ ▄████ ████▄ █████ █████'+
  12.                          ' ▄███▄ ██ ██ ██ █████ ██ ██ ██    █'+
  13.                          '█▄ ▄██ ████▄ ▄███▄ ████▄ ▄███▄ ████'+
  14.                          '▄ ▄████ ████▄ ██ ██ ██ ██ ██   ██ █'+
  15.                          '█ ██ ██ ██ █████ ▄███▄ ███  ████▄ █'+
  16.                          '███▄ ██ ██ █████ ▄████ █████ ▄███▄ '+
  17.                          '▄███▄        ▄█▀ ▄█▀▄█▀ ██ ▄███▄');
  18.  
  19.   MiddleLine : string = ('   ██▄██ ██▄█▀ ██    ██ ██ ██▄▄  ██▄▄ '+
  20.                          ' ██ ▄▄ ██▄██ ██    ██ ██▄█▀ ██    █'+
  21.                          '█▀█▀██ ██ ██ ██ ██ ██▄█▀ ██ ██ ██▄█'+
  22.                          '▀ ▀█▄▄     ██ ██ ██ ██ ██ ██▄█▄██ ▀'+
  23.                          '█▄█▀ ▀█▄██  ▄▄█▀ ██ ██  ██   ▄▄█▀  '+
  24.                          '▄▄█▀ ██▄██ ██▄▄  ██▄▄     ██ ▀█▄█▀ '+
  25.                          '▀█▄██                   ██  ▄▄█▀');
  26.  
  27.   LowerLine  : string = ('   ██ ██ ██▄██ ▀█▄▄▄ ██▄█▀ ██▄▄▄ ██   '+
  28.                          ' ▀█▄█▀ ██ ██ ██ ▄▄▄█▀ ██ ██ ██▄▄▄ █'+
  29.                          '█   ██ ██ ██ ▀█▄█▀ ██    ▀█▄██ ██ ██'+
  30.                          ' ▄▄▄█▀    ██ ▀█▄█▀  ▀█▀  ██▀ ▀██ ██'+
  31.                          ' ██ ▄▄▄█▀ ██▄▄▄ ▀█▄█▀ ▄██▄ ██▄▄▄ ▄▄'+
  32.                          '▄█▀    ██ ▄▄▄█▀ ▀█▄█▀    ██ ▀█▄█▀ ▄'+
  33.                          '▄▄█▀ ██ ▄█▀            ▄▄  ▄▄');
  34.  
  35.   PosTable : array[1..90] of byte = (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  36.  
  37.                      1,238,231,0,0,0,0,227,0,0,0,0,223,0,220,0,161,167,172,
  38.                    { 32 !   "           '           ,     .     0   1   2 }
  39.  
  40.                      178,184,190,196,202,208,214,0,0,0,0,0,241,0,
  41.                    {  3   4   5   6   7   8   9             ?   }
  42.  
  43.                      4,10,16,22,28,34,40,46,52,55,61,67,73,81,87,93,99,105,
  44.                    { A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R }
  45.  
  46.                      111,117,123,129,135,143,149,155);
  47.                    {  S   T   U   V   W   X   Y   Z }
  48.  
  49.   LenTable : array[1..90] of byte = (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  50.  
  51.                      3,3,7,0,0,0,0,4,0,0,0,0,4,0,3,0,6,5,6,
  52.                    {[ ]! "         '         ,   .   0 1 2 }
  53.  
  54.                      6,6,6,6,6,6,6,0,0,0,0,0,6,0,
  55.                    { 3 4 5 6 7 8 9           ?   }
  56.  
  57.                      6,6,6,6,6,6,6,6,3,6,6,6,8,6,6,6,6,6,
  58.                    { A B C D E F G H I J K L M N O P Q R }
  59.  
  60.                      6,6,6,6,8,6,6,6);
  61.                    { S T U V W X Y Z }
  62.  
  63.   Texts    : string = ('   brain made productions proudly presents...   caller maintenance v1.3...   '+
  64.                        'hi to the beta and supportteam, sven van heel, mischa van schaijk and other '+
  65.                        'people who know me...   now, press a key to enter the world of users...    ');
  66.  
  67. var
  68.   PosCounter : word;
  69.   CurChar,
  70.   CharCounter,
  71.   ScrHigh,
  72.   Pos,
  73.   Len        : byte;
  74.  
  75. begin
  76.   cursoroff;
  77.   ScrHigh := (hi(windmax)+1) div 2;
  78.   fillscreen(' ',1,ScrHigh-2,80,5,black);
  79.   repeat
  80.     PosCounter := 1;
  81.     repeat
  82.       CurChar := ord(Texts[PosCounter]);
  83.       if CurChar > 90 then CurChar := CurChar-32;
  84.       Pos := PosTable[CurChar];
  85.       Len := LenTable[CurChar];
  86.       CharCounter := Len;
  87.       repeat
  88.         while (port[$3da] and 8) <> 0 do;
  89.         while (port[$3da] and 8) = 0 do;
  90.         scrollx('l',1,ScrHigh-1,80,3,2,white);
  91.         dspat(UpperLine[Pos+CharCounter-Len],80,ScrHigh-1,lightcyan);
  92.         dspat(MiddleLine[Pos+CharCounter-Len],80,ScrHigh,lightcyan);
  93.         dspat(LowerLine[Pos+CharCounter-Len],80,ScrHigh+1,lightcyan);
  94.         dspat(UpperLine[Pos+CharCounter-Len],79,ScrHigh-1,lightcyan);
  95.         dspat(MiddleLine[Pos+CharCounter-Len],79,ScrHigh,lightcyan);
  96.         dspat(LowerLine[Pos+CharCounter-Len],79,ScrHigh+1,lightcyan);
  97.         dec(Len);
  98.       until Len = 0;
  99.       inc(PosCounter);
  100.     until (PosCounter = length(Texts)) or keypressed;
  101.   until keypressed;
  102.   cursoron;
  103. end;
  104.  
  105. begin
  106.   Scroll;
  107. end.
  108.