home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turbo Toolbox
/
Turbo_Toolbox.iso
/
1990
/
09
/
tricks
/
spacedem.pas
< prev
Wrap
Pascal/Delphi Source File
|
1990-08-03
|
3KB
|
85 lines
(* ------------------------------------------------------ *)
(* SPACEDEMO.PAS *)
(* Demoprogramm für Unit SPACE.PAS *)
(* (c) 1990 Andreas Heinemann & TOOLBOX *)
(* ------------------------------------------------------ *)
PROGRAM spacedemo;
USES Crt, Graph, space;
CONST bgi_path = '';
ux1 = 100; { Koordinaten des 1.Fensters }
uy1 = 50;
ux2 = 250;
uy2 = 200;
ax1 = 300; { Koordinaten des 2.Fensters }
ay1 = 50;
ax2 = 700;
ay2 = 300;
VAR Gd, Gm : INTEGER;
i : INTEGER;
p1, p2 : space_data_Ptr; { Verwaltungsdaten der }
{ beiden Fenster }
BEGIN
Gd := Detect;
InitGraph(Gd, Gm, bgi_path);
New(p1); { Fenster 1 Verwaltungsdaten initialisieren }
WITH p1^ DO BEGIN
x1 := ux1 + 1; x2 := ux2 - 1;
y1 := uy1 + 1; y2 := uy2 - 1;
color := 1;
FOR i := 1 TO max_layers DO BEGIN
layer_stars[i] := i * 10;
layer_jmp[i] := i;
END;
END;
Rectangle(ux1, uy1, ux2, uy2);
New(p2); { Fenster 2 Verwaltungsdaten initialisieren }
WITH p2^ DO BEGIN
x1 := ax1 + 1; x2 := ax2 - 1;
y1 := ay1 + 1; y2 := ay2 - 1;
color := 1;
FOR i := 1 TO max_layers DO BEGIN
layer_stars[i] := i * 10;
layer_jmp[i] := - i;
END;
layer_jmp[1] := 1;
layer_jmp[3] := 3;
END;
Rectangle(ax1, ay1, ax2, ay2);
SetFillStyle(WideDotFill, white);
Bar (ax1 + 50, ay1 + 100, ax2 - 50, ay2 - 100);
OutTextXY(1, 1, 'Bitte [Return] druecken ...');
init_space(p1); { Fenster 1 initialisieren }
init_space(p2); { Fenster 1 initialisieren }
put_Space(p1); { Fenster 1 Weltraum auf den Monitor }
put_Space(p2); { Fenster 2 Weltraum auf den Monitor }
REPEAT Move_space(p1); { Fenster 1 : Weltraum bewegen }
Move_space(p2); { Fenster 2 : Weltraum bewegen }
UNTIL KeyPressed;
IF ReadKey = '*' THEN ; { überflüssiges Zeichen
aus TastaturBuffer }
Dispose_space(p1); { Fenster 1 abmelden }
Dispose_space(p2); { Fenster 2 abmelden }
Dispose(p1); { Verwaltungsdaten beider Fenster freigeben }
Dispose(p2);
CloseGraph;
END.