*/
Want to see what people are talking about? See the latest forum posts.
*/

View \MATRIX5.INC

Full Source Code To Vision Bbs System

Submitted By: WEBMASTER
Rating: (Not rated) (Rate It)


(*
   The first of the User/Arrow-Key Interface by Crimson Blade
   Thanks to the HavokTeam for the frame of this matrix..
*)

var num_command : integer;
    k           : char;
    i           : integer;

function mc(le_color:byte;background:boolean):string;
var s:string;
begin
 if le_color>7 then le_color:=le_color-8;
 if le_color<=0 then le_color:=4;
 case le_color of
  1:s:='34m';
  2:s:='32m';
  3:s:='36m';
  4:s:='31m';
  5:s:='35m';
  6:s:='33m';
  7:s:='37m';
 end;
 if background then s[1]:=chr(ord(s[1])+1);
 mc:=s;
end;
procedure hi_1;
begin
 urec.config:=urec.config+[ansigraphics];
 ColorFB(5,4);
end;
procedure lo_1;
begin
 urec.config:=urec.config+[ansigraphics];
 ColorFB(5,4)
end;
procedure hi_2;
var s:string;
begin
 urec.config:=urec.config+[ansigraphics];
 ColorFB(5,4);
end;
procedure lo_2;
begin
 urec.config:=urec.config+[ansigraphics];
 ColorFB(5,4);
end;
procedure set_up_pulls;
var b:byte;z:integer;

procedure Shadow1;
Begin
  ANSiCOLOR(8);
  WriteLn(' ?');
End;

procedure wc_a(a:string;b:string);
begin
  urec.config:=urec.config+[ansigraphics];
  colorFB(9,0);Write(a);
  ColorFB(9,1);Write(b);
End;

procedure wc_2(a:string;c:string;s:string;t:string);
begin
urec.config:=urec.config+[ansigraphics];
(*hi_2*) colorfb(9,0);write(a);
(*lo_1*) colorfb(3,1);write(c);
(*hi_1*) write(' ? ');
(*lo_2*) write(s);
(*hi_2*) colorfb(9,0);write(t);
end;
begin
 urec.config:=urec.config+[ansigraphics];
 ANSiCLS;
 if M_Line_1<>'' then begin
  ColorFb(3,1);
  if length(m_line_1)>=21 then
   write('') (* (m_line_1) *) else begin
    b:=round((21-length(m_line_1))/2);
    for z:=1 to b do write('');
    write(''); (* (m_line_1); *)
  end;
  end else writeln;
 Write(^M^M^M^M);
 wc_a('                          ?','????????????????????????'^M);
 wc_a('                          ?',' ViSiON Pulldowns v1.0 ?');Shadow1;
 wc_a('                          ?','????????????????????????');Shadow1;ANSiCOLOR(8);
 Write('                                                   ');Shadow1;
 wc_a('                          ?','????????????????????????');Shadow1;
 wc_2('                          ?',' 1','Logon to System   ','?');Shadow1;
 wc_2('                          ?',' 2','System Number 2   ','?');Shadow1;
 wc_2('                          ?',' 3','System Number 3   ','?');Shadow1;
 wc_2('                          ?',' 4','Check for Access  ','?');Shadow1;
 wc_2('                          ?',' 5','Apply for Access  ','?');Shadow1;
 wc_2('                          ?',' 6','Feedback to Sysop ','?');Shadow1;
 wc_2('                          ?',' 7','Chat with Sysop   ','?');Shadow1;
 wc_2('                          ?',' 8','Goodbye           ','?');Shadow1;
 wc_a('                          ?','????????????????????????');Shadow1;ANSiCOLOR(8);
 WriteLn('                            ?????????????????????????');
 ColorFB(14,0);
end;

procedure write_command;
begin
 urec.config:=urec.config+[ansigraphics];
 case num_command of
  1:begin Goxy(33,10);Write('Logon to System');end;
  2:begin Goxy(33,11);Write('System Number 2');end;
  3:begin Goxy(33,12);Write('System Number 3');end;
  4:begin Goxy(33,13);Write('Check for Access');end;
  5:begin Goxy(33,14);Write('Apply for Access');end;
  6:begin Goxy(33,15);Write('Feedback to Sysop');end;
  7:begin Goxy(33,16);Write('Chat with Sysop');end;
  8:begin Goxy(33,17);Write('Goodbye');end;
 end;
end;

procedure put_box;
begin
 urec.config:=urec.config+[ansigraphics];
 write(#27+'[',(num_command+2),';5H');
 Write(#27+'[0;',mc(m_col_1,true));
 hi_2;
 hi_2;
 ColorFB(14,4);
 write_command;
 ColorFB(1,0);
end;

procedure pop_box;
begin
 urec.config:=urec.config+[ansigraphics];
 write(#27+'[',(num_command+2),';5H');
 write(#27+'[0m');
 lo_2;
 ColorFb(3,1);
 write_command;
end;

if matrixtype = 4 then begin
      set_up_pulls;
      num_command:=1;
      put_box;
      clearbreak;
      nobreak:=True;
      repeat
       if local then begin
        repeat
         k:=#255;
         k:=readkey;
        until k<>#255;
        if k = #0 then k:=readkey;
       end else
       k:=waitforchar;

       if (k=#27) and not(local) then begin
        Repeat
         k:=waitforchar;
        Until (k<>'[') Or hungupon
        End;

       if k = #32 then set_up_pulls else
        if k in ['1'..'6'] then
         begin
          i:=ord(k)-48;
          if i<>num_command
          then begin
           pop_box;
           num_command:=i;
           put_box;
          end;
         end else if

         (k='A') or (k='D') or (k='K') or (k='H') then
           begin
            pop_box;
            if num_command=1 then num_command:=9;
            num_command:=num_command-1;
            put_box;
           end else if
          (k='B') or (k='C') or (k='M') or (k='P') then
           begin
            pop_box;
            if num_command=8 then num_command:=0;
            num_command:=num_command+1;
            put_box;
         end else
         if k = #13 then begin
          write(#27+'[0m');
          ansicls;
          case num_command of
           1 : system1;
           2 : system2;
           3 : system3;
           5 : matrixnewuser;
           4 : matrixcheck;
           6 : matrixfeedback;
           7 : matrixchat;
           8 : matrixlogoff;
          end;
          if (PCBMover<>'IN') and (tries<=matrixinput) and not(hungupon)
           then begin
            set_up_pulls;
            put_box;
           end;
          end;
       Until (PCBMover='IN') Or (tries>MatrixInput) Or hungupon;
       If (tries>MatrixInput) And ( PCBMover <> 'IN') Then disconnect;
       If hungupon Then unum:=-999;
      end;
     end;

corner
© 1996-2008 CommunityHeaven LLC. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
North American business development: Nicolai Wadstrom. Publisher: Lars Hagelin.