home *** CD-ROM | disk | FTP | other *** search
- { copyright(1992) Roberts Reef Tech. }
- {***************************************************************************}
- {* 01-06-92 linked bgi and font in ;01-12-92 stopped mouse from flashing *}
- {* 01-20-92 added timer and tweaking for speed ;01-26-92 tweaked entry *}
- {* 02-02-92 keyboard buffer flushing added;02-06-92 BUTTON BUG WASTED *}
- {* 02-10-92 added in Graphic demos; *}
- {* *}
- {* last revised:02-06-92 filename:TCMS10B.PAS *}
- {***************************************************************************}
- program GUI_From_RRT;
- uses crt, graph, dos, bobmouse,BGIDriv,BGIFont;
- {$I a:hand.pas}
- var
- Ahour, hour,
- Aminute, minute,
- Asecond, second,
- Asec100, sec100 : word;
- HourPassed, MinutePassed, SecondPassed : integer;
- name : string;
- swing, Horz, Vert, options, sysgraphadapter, sysgraphmode, graphdriver
- , graphmode,x,y,P,D, c2,i,x1,y1,x2,y2 : integer;
- width, crest, ypos, MSSize, SIZE, pointerX, pointerY, mx,my : word;
- MSFile :file;
- quit,right,both,left,lb,rb,bb, continue : boolean;
- ch : char;
- POINT,exitsave,buffer : POINTER;
- {-------------------------------------------------------------------------}
- PROCEDURE CheckForMouse;
-
- BEGIN
- x1 := wherex;
- y1 := wherey;
- TextBackground(0);
- TextColor(15);
- write(' Checking for a mouse...'); { 24 char}
- delay(750);
- If not MouseIsInstalled then
- begin
- writeln(' This demo requires a mouse.');
- writeln(' No mouse driver could be detected.');
- halt(2);
- end
- else
- begin
- gotoxy(x1,y1);
-
- write(' A mouse is installed...'); { 24 char}
- delay(750);
- end;
- writeln;
- end;
-
-
-
- {-------------------------------------------------------------------------}
- PROCEDURE CheckForFiles;
- var
- S: PATHSTR;
- BEGIN
- x1 := wherex;
- y1 := wherey;
- TextBackground(0);
- TextColor(15);
- write(' Checking for files...');
- delay(750);
- S := FSEARCH('box9.tps',GETENV('PATH'));
- IF S = '' THEN
-
- begin
- writeln;
- writeln(' This demo requires a file.');
- writeln(' The file Box9.tps could not be found.');
- halt(2);
- end
- else
- begin
- gotoxy(x1,y1);
-
- write(' All files found... ');
- delay(750);
- end;
- writeln;
- end;
- {-------------------------------------------------------------------------}
- function EGAthere: boolean;
-
- begin
- detectgraph(sysgraphadapter, sysgraphmode);
- if sysgraphadapter = 3 or 9 then EGAthere := true; {ega or vga}
- end;
- {-------------------------------------------------------------------------}
- PROCEDURE CheckForEGA;
-
- BEGIN
- x1 := wherex;
- y1 := wherey;
- write(' Checking for EGA... ');
- delay(800); { the delay is just to give the user }
- If not EGAthere then { time to read the screen }
- begin
- writeln(' This demo requires EGA 640x350x16 graphics.');
- writeln(' EGA or capatible graphics could not be detected.');
- halt(2);
- end
- else
- begin
- gotoxy(x1,y1);
-
- write(' EGA is installed...');
- delay(800);
- end;
- writeln;
- end;
- {-------------------------------------------------------------------------}
- procedure Abort(Msg : string);
- begin
- Writeln(Msg, ': ', GraphErrorMsg(GraphResult));
- Halt(1);
- end;
- {-------------------------------------------------------------------------}
- procedure startthetimer (message : string);
- begin
- writeln;
- writeln(message);
- gettime( Ahour, Aminute,Asecond,Asec100);
- end;
-
- {-------------------------------------------------------------------------}
-
- procedure endthetimer(message : string);
- begin
- gettime(hour,minute,second,sec100);
- HourPassed := hour - Ahour;
- Minutepassed := minute - Aminute;
- Secondpassed := second - Asecond;
- if hour < Ahour then
- Hourpassed := hourpassed + 24;
- if minute < Aminute then begin
- minutepassed := minutepassed + 60;
- Hourpassed := hourpassed -1;
- end;
- if Second < Asecond then begin
- secondpassed := secondpassed + 60;
- minutepassed := minutepassed -1;
- end;
- writeln;
- TextBackground(1);
- TextColor(15);
- if Hourpassed > 0 then
- write(Message,'Active for ',hourpassed,' Hour(s) ',minutepassed,' Minute(s) ',secondpassed,' Second(s).');
- if Hourpassed = 0 then
- Begin
- if Minutepassed > 0 then
- write(Message,'Active for ',minutepassed,' Minute(s) ',secondpassed,' Second(s).',#13);
- if Minutepassed = 0 then
- write(Message,'Active for ',secondpassed,' Second(s).',#13);
- end;
- normvideo;
- sound(10000);
- delay(100);
- nosound;
- writeln;
- end;
- {----------------------------------------------------------------------------}
- PROCEDURE FlushKey;
-
- VAR
- Regs : Registers; { USES DOS unit! }
-
- BEGIN
- Regs.AH := $01; { AH=1: Check for keystroke }
- Intr($16,Regs); { Interrupt $16: Keyboard services}
- IF (Regs.Flags AND $0040) = 0 THEN { If chars in buffer }
- REPEAT
- Regs.AH := 0; { Char is ready; go read it... }
- Intr($16,Regs); { ...using AH = 0: Read Char }
- Regs.AH := $01; { Check for another keystroke... }
- Intr($16,Regs); { ...using AH = 1 }
- UNTIL (Regs.Flags AND $0040) <> 0;
- END;
- {--------------------------------------------------------------------------}
-
- procedure initega;
- { Initializes EGA 640x350x16 graphics if an EGA or VGA card is detected. }
- var
- grapherror : integer;
-
- begin
-
- if EGAthere then
- begin
- if RegisterBGIfont(@SansSerifFontProc) < 0 then
- Abort('SansSerif');
- if RegisterBGIdriver(@EGAVGADriverProc) < 0 then
- Abort('EGA/VGA');
- graphdriver := 3;
- graphmode := 1;
- initgraph(graphdriver, Graphmode,'');
- highvideo;
- Grapherror := graphresult;
- if grapherror <> 0 then
- begin
- writeln('Error initializing graphics:',Grapherrormsg(grapherror));
- halt(1);
- end;
- end;
- end;
- {-------------------------------------------------------------------------}
- {$F+}
- procedure mcedemoexit;
- begin
- exitproc := exitsave;
- hidemouse;
- closegraph;
- textbackground(0);
- endthetimer(' BGI DEMO ');
- end;
- {$F-}
- {-----------------------------------------------------------------------------}
-
- Procedure Idle;
- Begin
- Options := 0;
- continue := false;
- repeat
-
- pollmouse(mx,my,lb,rb,bb);
-
-
- if lb then {start of Example one button}
- begin
- case my of
- 40..65 :
- begin
- case mx of
- 10..35 : begin
- setcolor(1);
- setfillstyle(1,9); {9}
- hidemouse;
- bar3d(10,40,34,65,1,topoff);
- delay(2000);
-
- continue := true;
- options := 7;
- end;
- else continue := false;
-
- end; {case mx}
- end;
- else continue := false;
- end; {case my}
- end;{if lb and open button }
- {*******************************************2222222*******}
- if lb then {start Example two button }
- begin
- case my of
- 70..95:
- begin
- case mx of
- 10..35 : begin
- setcolor(1);
- setfillstyle(1,9); {9}
- hidemouse;
- bar3d(10,70,34,95,1,topoff);
- delay(2000);
-
- continue := true;
- options := 8;
- end;
- else continue := false;
-
- end; {case mx}
- end;
- else continue := false;
- end; {case my}
- end;{if lb and two button }
- {*******************************************3333333***************}
- if lb then {start Example three button }
- begin
- case my of
- 100..125:
- begin
- case mx of
- 10..35 : begin
- setcolor(1);
- setfillstyle(1,9); {9}
- hidemouse;
- bar3d(10,100,34,125,1,topoff);
- delay(2000);
-
- continue := true;
- options := 9;
- end;
- else continue := false;
-
- end; {case mx}
- end;
- else continue := false;
- end; {case my}
- end;{if lb and three button }
- {********************************************444444************}
- if lb then {start of Example four button }
- begin
- case my of
- 130..155:
- begin
- case mx of
- 10..35 : begin
- setcolor(1);
- setfillstyle(1,9); {9}
- hidemouse;
- bar3d(10,130,34,155,1,topoff);
- delay(2000);
-
- continue := true;
- options := 10;
- end;
- else continue := false;
- end; {case mx}
- end;
- else continue := false;
- end; {case my}
- end;{if lb and abort button }
- {*****************************************555555***************}
- if lb then {start example 5 button }
- begin
- case my of
- 160..185:
- begin
- case mx of
- 10..35 : begin
- setcolor(1);
- setfillstyle(1,9); {9}
- hidemouse;
- bar3d(10,160,34,185,1,topoff);
- delay(2000);
-
- continue := true;
- options := 11;
- end;
- else continue := false;
- end; {case mx}
- end;
- else continue := false;
- end; {case my}
- end;{if lb and quit button }
- {*********************************************}
- {*****************************************666666***************}
- if lb then {start example 6 button }
- begin
- case my of
- 190..215:
- begin
- case mx of
- 10..35 : begin
- setcolor(1);
- setfillstyle(1,9); {9}
- hidemouse;
- bar3d(10,190,34,215,1,topoff);
- delay(2000);
-
- continue := true;
- options := 12;
- end;
- else continue := false;
- end; {case mx}
- end;
- else continue := false;
- end; {case my}
- end;{if lb and quit button }
- {*********************************************}
- {*****************************************777777***************}
- if lb then {start example 7 button }
- begin
- case my of
- 220..245:
- begin
- case mx of
- 10..35 : begin
- setcolor(1);
- setfillstyle(1,9); {9}
- hidemouse;
- bar3d(10,220,34,245,1,topoff);
- delay(2000);
-
- continue := true;
- options := 14;
- end;
- else continue := false;
- end; {case mx}
- end;
- else continue := false;
- end; {case my}
- end;{if lb and quit button }
- {*********************************************}
- {*****************************************888888***************}
- if lb then {start example 8 button }
- begin
- case my of
- 250..275:
- begin
- case mx of
- 10..35 : begin
- setcolor(1);
- setfillstyle(1,9); {9}
- hidemouse;
- bar3d(10,250,34,275,1,topoff);
- delay(2000);
-
- continue := true;
- options := 2;
- end;
- else continue := false;
- end; {case mx}
- end;
- else continue := false;
- end; {case my}
- end;{if lb and quit button }
- {*********************************************}
- {*****************************************999999***************}
- if lb then {start example 9 button }
- begin
- case my of
- 280..305:
- begin
- case mx of
- 10..35 : begin
- setcolor(1);
- setfillstyle(1,9); {9}
- hidemouse;
- bar3d(10,280,34,305,1,topoff);
- delay(2000);
-
- continue := true;
- options := 4;
- end;
- else continue := false;
- end; {case mx}
- end;
- else continue := false;
- end; {case my}
- end;{if lb and quit button }
- {*********************************************}
- {*****************************************1010101010***********}
- if lb then {start of example 10 button }
- begin
- case my of
- 310..335:
- begin
- case mx of
- 10..35 : begin
- setcolor(1);
- setfillstyle(1,9); {9}
- hidemouse;
- bar3d(10,310,34,335,1,topoff);
- delay(2000);
-
- continue := true;
- options := 5;
- end;
- else continue := false;
- end; {case mx}
- end;
- else continue := false;
- end; {case my}
- end;{if lb and quit button }
- {*********************************************}
-
- until options >=1 ;
- end;
- {-------------------------------------------------------------------------}
- procedure fglass;
- VAR
- I,Color : Integer;
- Palette : PaletteType;
- ch : char;
-
- BEGIN
- Randomize;
- GetPalette(Palette);
- FOR Color := 0 TO 2000 DO
- BEGIN
- SetColor(Random(Palette.Size));
- Line(Random(GetMaxX),Random(GetMaxY),Random(GetMaxX),Random(GetMaxY));
- REPEAT I := Random(Palette.Size) UNTIL I <> 0;
- SetPalette(I,Random(Palette.Size));
-
- END;
-
-
-
-
-
- END;
-
- procedure LoadMysprite;
- begin
- Assign(MSFile,'box9.TPS');
- reset(MSFILE,1);
- MSSize:=ImageSize(0,0,24,24);{this file only maxsize}
- GetMem(buffer,MSSize);
- BlockRead(MSFile,buffer^,MSSize);
- Close(MSFile);
- end;
-
- {-------------------------------------------------------------------------}
- procedure rrtbox; {revised 01-06-92}
- var
- RRTLeft, RRTVert : integer;
- page:word;
-
- begin
- RRTleft := 10;
- RRTVert := 10;
- setvisualpage(1);
- setactivepage(0);
- setcolor(4);
- Rectangle(0,0, 310, 345 );
- setfillstyle(solidfill,Darkgray);
- floodfill(5,5,red);
- { PutImage(RRTLeft,RRTVert,buffer^,normalput);} {one}
- PutImage(RRTLeft,RRTVert+30,buffer^,normalput); {two}
- PutImage(RRTLeft,RRTVert+60,buffer^,normalput); {three}
- PutImage(RRTLeft,RRTVert+90,buffer^,normalput); {four}
- PutImage(RRTLeft,RRTVert+120,buffer^,normalput); {five}
- PutImage(RRTLeft,RRTVert+150,buffer^,normalput); {six}
- PutImage(RRTLeft,RRTVert+180,buffer^,normalput); {seven}
- PutImage(RRTLeft,RRTVert+210,buffer^,normalput); {eight}
- PutImage(RRTLeft,RRTVert+240,buffer^,normalput); {nine}
- PutImage(RRTLeft,RRTVert+270,buffer^,normalput); {ten}
- PutImage(RRTLeft,RRTVert+300,buffer^,normalput); {eleven}
-
-
- setcolor(15);
- Rectangle(rrtleft+30,rrtvert,rrtleft+280, rrtvert+324 );
- line(40,37,290,37);
- line(40,67,290,67);
- line(40,97,290,97);
- line(40,127,290,127);
- line(40,157,290,157);
- line(40,187,290,187);
- line(40,217,290,217);
- line(40,247,290,247);
- line(40,277,290,277);
- line(40,307,290,307);
- setcolor(14);
- SetTextStyle(sansserifFont, HorizDir, 4);
- moveto(50,2);
- outtext(' BGI DEMO ');
- MOVETO(50,30);
- OUTTEXT('Sectors');
- MOVETO(50,60);
- OUTTEXT('Writemode');
- MOVETO(50,90);
- OUTTEXT('Ellipse');
- MOVETO(50,120);
- OUTTEXT('CRT');
- MOVETO(50,150);
- OUTTEXT('Putpixel');
- MOVETO(50,180);
- OUTTEXT('Circles');
- MOVETO(50,210);
- OUTTEXT('AspectRatio');
- MOVETO(50,240);
- OUTTEXT('Fiberglass');
- MOVETO(50,270);
- OUTTEXT('Helix');
- MOVETO(50,300);
- OUTTEXT('Exit');
-
- setvisualpage(0);
- end;
- {---------------------------------------------------------------------------}
- procedure helix;
- begin
-
- ypos := getmaxy div 2;
- crest := getmaxy div 8;
- width := getmaxx;
- for i := 0 to width do begin
- swing := round(crest * sin(10*pi*i / width ) );
- putpixel (i,ypos + swing, i mod 25 );
- putpixel (i,ypos - swing, (getpixel( i, ypos + swing ) +8 ) mod 15 );
- end;
-
- end;
- {-------------------------------------------------------------------------}
- procedure AspectRatioPlay;
- { Demonstrate SetAspectRatio command }
- var
- ViewInfo : ViewPortType;
- CenterX : integer;
- CenterY : integer;
- Radius : word;
- Xasp, Yasp : word;
- i : integer;
- RadiusStep : word;
- begin
-
- GetViewSettings(ViewInfo);
- with ViewInfo do
- begin
- CenterX := (x2-x1) div 2;
- CenterY := (y2-y1) div 2;
- Radius := 3*((y2-y1) div 5);
- end;
- RadiusStep := (Radius div 30);
- Circle(CenterX, CenterY, Radius);
- GetAspectRatio(Xasp, Yasp);
- for i := 1 to 30 do
- begin
- SetAspectRatio(Xasp, Yasp+(I*GetMaxX)); { Increase Y aspect factor }
- Circle(CenterX, CenterY, Radius);
- Dec(Radius, RadiusStep); { Shrink radius }
- end;
- Inc(Radius, RadiusStep*30);
- for i := 1 to 30 do
- begin
- SetAspectRatio(Xasp+(I*GetMaxX), Yasp); { Increase X aspect factor }
- if Radius > RadiusStep then
- Dec(Radius, RadiusStep); { Shrink radius }
- Circle(CenterX, CenterY, Radius);
- end;
- SetAspectRatio(Xasp, Yasp); { back to original aspect }
- delay(6000);
- end; { AspectRatioPlay }
-
- {---------------------------------------------------------------------------}
- function RandColor : word;
- { Returns a Random non-zero color value that is within the legal
- color range for the selected device driver and graphics mode.
- MaxColor is set to GetMaxColor by Initialize }
- var
- MaxColor : word;
- begin
- RandColor := Random(MaxColor)+1;
- end; { RandColor }
-
- procedure CirclePlay;
- { Draw random circles on the screen }
- var
- MaxRadius : word;
- MaxX, MaxY : word;
- begin
- maxx := 640;
- maxy := 350;
-
- MaxRadius := MaxY div 10;
- SetLineStyle(SolidLn, 0, NormWidth);
- repeat
- SetColor(RandColor);
- Circle(Random(MaxX), Random(MaxY), Random(MaxRadius));
- until KeyPressed;
- Delay(6000);
- end; { CirclePlay }
-
- procedure SectorPlay;
- { Draw random sectors on the screen }
- const
- MaxFillStyles = 12; { patterns 0..11 }
- var
- MaxRadius : word;
- FillColor : integer;
- EndAngle : integer;
- maxx,maxy : word;
- begin
- randomize;
- maxx := 640;
- maxy := 350;
- MaxRadius := MaxY div 17;
- SetLineStyle(SolidLn, 0, NormWidth);
- repeat
- FillColor := RandColor;
- SetColor(FillColor);
- SetFillStyle(Random(MaxFillStyles), FillColor);
- EndAngle := Random(360);
- Sector(Random(MaxX), Random(MaxY), Random(EndAngle), EndAngle,
- Random(MaxRadius), Random(MaxRadius));
- until KeyPressed;
- delay(6000);
- end; { SectorPlay }
-
-
- procedure WriteModePlay;
- { Demonstrate the SetWriteMode procedure for XOR lines }
- const
- DelayValue = 5; { milliseconds to delay }
- var
- ViewInfo : ViewPortType;
- Color : word;
- Left, Top : integer;
- Right, Bottom : integer;
- Step : integer; { step for rectangle shrinking }
- begin
-
- GetViewSettings(ViewInfo);
- Left := 0;
- Top := 0;
- with ViewInfo do
- begin
- Right := x2-x1;
- Bottom := y2-y1;
- end;
- Step := Bottom div 25;
- SetColor(GetMaxColor);
- Line(Left, Top, Right, Bottom);
- Line(Left, Bottom, Right, Top);
- SetWriteMode(XORPut); { Set XOR write mode }
- repeat
- Line(Left, Top, Right, Bottom); { Draw XOR lines }
- Line(Left, Bottom, Right, Top);
- Rectangle(Left, Top, Right, Bottom); { Draw XOR rectangle }
- Delay(DelayValue); { Wait }
- Line(Left, Top, Right, Bottom); { Erase lines }
- Line(Left, Bottom, Right, Top);
- Rectangle(Left, Top, Right, Bottom); { Erase rectangle }
- if (Left+Step < Right) and (Top+Step < Bottom) then
- begin
- Inc(Left, Step); { Shrink rectangle }
- Inc(Top, Step);
- Dec(Right, Step);
- Dec(Bottom, Step);
- end
- else
- begin
- Color := RandColor; { New color }
- SetColor(Color);
- Left := 0; { Original large rectangle }
- Top := 0;
- with ViewInfo do
- begin
- Right := x2-x1;
- Bottom := y2-y1;
- end;
- end;
- until KeyPressed;
- SetWriteMode(CopyPut); { back to overwrite mode }
- Delay(60);
- end; { WriteModePlay }
-
- procedure FillEllipsePlay;
- { Random filled ellipse demonstration }
- const
- MaxFillStyles = 12; { patterns 0..11 }
- var
- MaxRadius : word;
- FillColor : integer;
- maxx,maxy : word;
-
- begin
- maxx := 640;
- maxy := 350;
- MaxRadius := MaxY div 10;
- SetLineStyle(SolidLn, 0, NormWidth);
- repeat
- FillColor := RandColor;
- SetColor(FillColor);
- SetFillStyle(Random(MaxFillStyles), FillColor);
- FillEllipse(Random(MaxX), Random(MaxY),
- Random(MaxRadius), Random(MaxRadius));
- until KeyPressed;
- delay(5000);
- end; { FillEllipsePlay }
-
- procedure PutPixelPlay;
- { Demonstrate the PutPixel and GetPixel commands }
- const
- Seed = 1962; { A seed for the random number generator }
- NumPts = 2000; { The number of pixels plotted }
- Esc = #27;
- var
- I : word;
- X, Y, Color : word;
- XMax, YMax : integer;
- ViewInfo : ViewPortType;
- begin
-
-
- GetViewSettings(ViewInfo);
- with ViewInfo do
- begin
- XMax := (x2-x1-1);
- YMax := (y2-y1-1);
- end;
-
- while not KeyPressed do
- begin
- { Plot random pixels }
- RandSeed := Seed;
- I := 0;
- while (not KeyPressed) and (I < NumPts) do
- begin
- Inc(I);
- PutPixel(Random(XMax)+1, Random(YMax)+1, RandColor);
- end;
-
- { Erase pixels }
- RandSeed := Seed;
- I := 0;
- while (not KeyPressed) and (I < NumPts) do
- begin
- Inc(I);
- X := Random(XMax)+1;
- Y := Random(YMax)+1;
- Color := GetPixel(X, Y);
- if Color = RandColor then
- PutPixel(X, Y, 0);
- end;
- end;
- delay(5000);
- end; { PutPixelPlay }
-
-
- {---------------------------------------------------------------------------}
-
- procedure dooptions;
- begin
- flushkey;
-
- if options = 7 then
- begin
- setactivepage(1);
- setvisualpage(1);
- clearviewport;
- Sectorplay;
- delay(999);
- sound(4000);
- delay(100);
- nosound;
- clearviewport;
- setactivepage(0);
- setvisualpage(0);
-
-
-
- end;
- if options = 8 then
- begin
- setactivepage(1);
- setvisualpage(1);
- clearviewport;
- writemodeplay;
- delay(999);
- sound(4000);
- delay(100);
- nosound;
- clearviewport;
- setactivepage(0);
- setvisualpage(0);
-
-
- end;
- if options = 9 then
- begin
- setactivepage(1);
- setvisualpage(1);
- clearviewport;
- fillellipseplay;
- delay(999);
- sound(4000);
- delay(100);
- nosound;
- clearviewport;
- setactivepage(0);
- setvisualpage(0);
-
-
-
- end;
- if options = 10 then
- begin
-
- clearviewport;
- RestoreCRTMode;
- writeln('This is text mode .......!');
- writeln('press enter to exit ');
- readln;
-
-
-
-
-
- end;
- if options = 11 then
- begin
- setactivepage(1);
- setvisualpage(1);
- clearviewport;
- putpixelplay;
- delay(999);
- sound(4000);
- delay(100);
- nosound;
- clearviewport;
- setactivepage(0);
- setvisualpage(0);
-
-
- end;
- if options = 12 then {six}
- begin
- setactivepage(1);
- setvisualpage(1);
- clearviewport;
- Circleplay;
- delay(999);
- sound(4000);
- delay(100);
- nosound;
- clearviewport;
- setactivepage(0);
- setvisualpage(0);
-
-
- end;
- if options = 14 then {seven}
- begin
- setactivepage(1);
- setvisualpage(1);
- clearviewport;
- aspectratioplay;
- delay(999);
- sound(4000);
- delay(100);
- nosound;
- clearviewport;
- setactivepage(0);
- setvisualpage(0);
-
-
-
- end;
- if options = 2 then
- begin
- setactivepage(1);
- setvisualpage(1);
- clearviewport;
- fglass;
- delay(999);
- sound(4000);
- delay(100);
- nosound;
- clearviewport;
- setactivepage(0);
- setvisualpage(0);
-
-
-
- end;
-
-
- if options = 4 then
- begin
- setactivepage(1);
- setvisualpage(1);
- clearviewport;
- helix;
- delay(999);
- sound(4000);
- delay(100);
- nosound;
- clearviewport;
- setactivepage(0);
- setvisualpage(0);
-
-
- end;
- if options = 5 then
- begin
- sound(300);
- delay(100);
- nosound;
-
- exit;
- end;
-
-
-
- repeat
-
- setgraphmode(graphmode);
- rrtbox;
- showmouse;
- handmouse;
- idle;
- dooptions;
- until options = 5 ;
- end;
- {-------------------------------------------------------------------------}
- { copyright(1992) Roberts Reef Tech. }
- Begin
- startthetimer(' ');
- clrscr;
- Checkformouse;
- CheckforEGa;
- CheckforFiles;
- Initega;
- LoadMysprite;
- rrtbox;
- mousereset;
- showmouse;
- handmouse;
- idle;
- dooptions;
- exitsave := exitproc; { Saves current exit procedure. }
- exitproc := @mcedemoexit; { Installs my exit procedure. }
- end.