home *** CD-ROM | disk | FTP | other *** search
/ CD-X 1 / cdx_01.iso / games / doomino / setup.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1995-03-05  |  4.2 KB  |  141 lines

  1. program setup1;
  2.  uses dos,crt,graph;
  3.   type sat=record
  4.      param  : integer;
  5.     end;
  6.   var
  7.   gd,gm,a,b,c,d : integer;
  8.   regs : registers;
  9.   utvonal,dd : string;
  10.   hset:sat ;
  11.   satup:file of sat;
  12.   cg      : char;
  13.  procedure nemirhato;
  14.    begin
  15.     cleardevice;settextjustify(centertext,centertext);
  16.     setcolor(lightred);settextstyle(1,0,10);outtextxy(320,50,'Baj van!');
  17.     settextstyle(1,0,5);outtextxy(320,170,'A programot tartalmazó');
  18.     outtextxy(320,220,'adathordozó nem irható!');
  19.     outtextxy(320,320,'Irásvédett lemez vagy CD.');
  20.     repeat until keypressed;
  21.     cleardevice;closegraph;halt;
  22.    end;
  23. {---------------------------------------------------------------------------}
  24.   label 1,2,3,4,5,6,7,8,9,10,11;
  25.  begin  {fô}
  26.   gd:=vga;gm:=vgahi;getdir(0,utvonal);if copy(utvonal,length(utvonal),1)<>'\' then utvonal:=utvonal+'\';
  27.   initgraph(gd,gm,utvonal);
  28.   setbkcolor(darkgray);cleardevice;{géptipus}
  29.   settextstyle(1,0,8);setcolor(lightgray);
  30.   outtextxy(180,80,'AT-286');
  31.   outtextxy(180,180,'AT-386');
  32.   outtextxy(180,280,'AT-486');
  33.   a:=1;
  34.   2:
  35.   setcolor(lightgray);setlinestyle(0,3,3);
  36.   rectangle(170,90,470,170);
  37.   rectangle(170,190,470,270);
  38.   rectangle(170,290,470,370);
  39.   setcolor(red);rectangle(170,a*100-10,470,a*100+70);
  40.   cg:=readkey;
  41.   if cg=#13 then goto 1;
  42.   if cg=#72 then a:=a-1;
  43.   if cg=#80 then a:=a+1;
  44.   if a>3 then a:=a-3;
  45.   if a<1 then a:=a+3;
  46.   goto 2;
  47.   1:
  48.   setbkcolor(darkgray);cleardevice; {eszközök}
  49.   settextstyle(1,0,6);setcolor(lightgray);
  50.   outtextxy(208,50,'Keyboard');
  51.   outtextxy(250,150,'Mouse');
  52.   outtextxy(212,250,'Joystick');
  53.   outtextxy(250,350,'Voice');
  54.   regs.ax:=0;intr($33,regs);if regs.ax=0 then b:=1
  55.                                          else b:=2;
  56.   4:
  57.    setcolor(lightgray);setlinestyle(0,3,3);
  58.   rectangle(200,50,440,120);rectangle(200,150,440,220);
  59.   rectangle(200,250,440,320);rectangle(200,350,440,420);
  60.   setcolor(red);rectangle(200,b*100-50,440,b*100+20);
  61.   cg:=readkey;
  62.   if cg=#13 then goto 3;
  63.   if cg=#72 then b:=b-1;
  64.   if cg=#80 then b:=b+1;
  65.   if b>2 then b:=b-2;
  66.   if b<1 then b:=b+2;
  67.   goto 4;
  68.   3:
  69.    setbkcolor(darkgray);cleardevice; {hangkártyák}
  70.   settextstyle(1,0,5);setcolor(lightgray);
  71.   outtextxy(208,50,'PC Speaker');
  72.   outtextxy(260,125,'Adlib');
  73.   outtextxy(190,200,'Soundblaster');
  74.   outtextxy(150,275,'Soundblaster Pro');
  75.   outtextxy(140,350,'Gravis Ultrasound');
  76.   c:=1;
  77.   6:
  78.    setcolor(lightgray);setlinestyle(0,3,3);
  79.   rectangle(130,50,510,100);
  80.   rectangle(130,125,510,175);
  81.   rectangle(130,200,510,250);
  82.   rectangle(130,275,510,325);
  83.   rectangle(130,350,510,400);
  84.   setcolor(red);rectangle(130,c*75-25,510,c*75+25);
  85.   cg:=readkey;
  86.   if cg=#13 then goto 5;
  87.   if cg=#72 then c:=c-1;
  88.   if cg=#80 then c:=c+1;
  89.   if c>5 then c:=c-5;
  90.   if c<1 then c:=c+5;
  91.    c:=1;
  92.   goto 6;
  93.   5:
  94.      setbkcolor(darkgray);cleardevice; {órahang}
  95.   settextstyle(1,0,7);setcolor(lightgray);
  96.   outtextxy(125,200,'Orahang  Be');
  97.   outtextxy(138,140,',');
  98.   d:=1;
  99.   setcolor(lightgray);setlinestyle(0,3,3);
  100.   rectangle(97,190,530,290);
  101.   8:
  102.   cg:=readkey;
  103.   if cg=#13 then goto 7;
  104.   if cg=#72 then d:=0;
  105.   if cg=#80 then d:=1;
  106.   if d=0 then dd:='Ki';
  107.   if d=1 then dd:='Be';
  108.   setfillstyle(1,darkgray);bar(430,210,510,270);
  109.   outtextxy(443,200,dd);
  110.   goto 8;
  111.   7:
  112.   setbkcolor(darkgray);cleardevice; {mentsem-e?}
  113.   settextstyle(1,0,5);setcolor(lightgreen);
  114.   outtextxy(60,180,'Mentsem a beállitásokat?');
  115.   outtextxy(210,270,'Igen  Nem');
  116.   setcolor(red);outtextxy(210,270,'I');outtextxy(336,270,'N');
  117.   9:
  118.   cg:=readkey;
  119.   if cg='i' then goto 10;
  120.   if cg='n' then goto 11;
  121.   goto 9;
  122.  10:
  123.  {lemezre a,b,c,d}
  124.  getdir(0,utvonal);if copy(utvonal,length(utvonal),1)<>'\' then utvonal:=utvonal+'\';
  125.  assign(satup,utvonal+'setup.dat');
  126.   {$I-} rewrite(satup);
  127.   if ioresult<>0 then nemirhato;
  128.    close(satup);sound(500);delay(20);nosound;
  129.    assign(satup,utvonal+'setup.dat');
  130.     reset(satup);
  131.      with hset do
  132.                begin
  133.                 param:=a;write(satup,hset);
  134.                 param:=b;write(satup,hset);
  135.                 param:=c;write(satup,hset);
  136.                 param:=d;write(satup,hset);
  137.                end;
  138.     close(satup);
  139.  11:
  140.  cleardevice;closegraph;
  141.  end.