home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Rat's Nest 1
/
ratsnest1.iso
/
incoming
/
pas_sors.arj
/
KRU$H01.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1996-12-22
|
15KB
|
466 lines
program bullshit_graphics1;
{ This is version 0.01ß of BullShit_graphics1. }
{ It has been made by me to help all those trying }
{ to learn TP7. The code is pretty simple. Hope }
{ your computer supports SVGA at 800x600x256... }
{ Please do not distribute this program if you have }
{ altered it at all. -Kru$H 94 }
uses crt, dos, graph;
Var size, limit1, heit, count2, count : Integer;
a, b, c, gT, gM, diff, ally : Integer;
x1, y1, x2, y2, x3, y3, x4, y4 : Word;
what : Char;
Type DacPalette256 = array[0..255] of array[0..2] of Byte;
Const
x = 400 ;
y = 300 ;
car: Array[1..1028] Of Byte = (
31,0,31,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,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,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,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,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,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,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,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,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,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,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,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,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,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,0,0,0,0,0,0,0,0,0,0,0,43,43,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,43,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,42,44,42,44,42,44,42,44,0,0,0,0,0,43,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,42,44,42,44,42,43,42,43,42,43,0,0,0,43,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,42,44,42,44,42,43,42,43,42,43,42,0,0,0,43,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,42,44,42,44,42,43,42,43,42,43,42,43,42,0,42,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,42,44,42,43,42,43,42,43,42,43,42,43,42,43,0,43,0,0,0,0,0,0,0,
0,0,0,0,0,44,43,14,43,44,42,43,42,43,42,43,42,43,42,43,42,43,42,43,42,43,0,0,0,0,0,0,
0,0,0,0,44,43,42,43,42,43,42,42,43,42,43,42,43,42,43,42,42,42,43,42,43,42,0,0,0,0,0,0,
0,0,0,42,43,42,42,12,12,12,42,42,42,43,42,43,42,42,42,42,12,12,12,43,42,43,42,0,0,0,0,0,
0,0,44,43,42,42,12,12,39,39,39,42,42,42,42,42,42,42,42,12,12,12,12,39,43,42,43,42,0,0,0,0,
0,42,43,42,42,12,12,12,39,41,39,39,42,42,42,42,42,42,12,12,12,39,41,41,39,43,42,43,0,0,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,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,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,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,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,0,0,0,0,0,0,0,29,29,29,29,28,28,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,29,29,28,28,28,28,25,25,26,26,26,26,26,26,26,26,26,26,26,26,0,0,0,
0,0,0,0,0,0,0,0,0,28,26,26,26,25,26,26,26,25,25,25,25,25,25,25,25,25,25,25,25,0,0,0,
0,0,0,0,0,0,0,0,26,28,26,27,26,25,26,27,26,26,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,26,25,26,26,26,25,26,26,26,26,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,29,29,29,29,28,28,25,25,25,25,27,27,27,27,27,27,28,28,29,29,29,29,29,29,28,28,0,0,0,
0,0,29,29,28,25,25,25,25,25,27,27,27,27,27,27,27,27,27,27,27,28,29,29,29,28,28,28,27,27,27,0,
0,28,28,28,25,27,27,27,27,27,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,27,27,0,
0,28,25,25,25,25,25,25,25,25,25,25,26,26,26,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,0,
0,0,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,0,0,
0,0,23,27,23,27,23,27,23,27,23,27,23,27,23,27,23,27,23,27,23,27,23,27,23,27,23,27,23,0,0,0,
0,27,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,27,0,0,
0,0,27,23,27,23,27,23,27,23,27,23,27,23,27,23,27,23,27,23,27,23,27,23,27,23,27,23,27,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,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,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,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,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,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,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,0,0,0,0,0,0,0,0,0,0
);
SVGA320x200x256 = 0; { 320x200x256 Standard VGA }
SVGA640x400x256 = 1; { 640x400x256 Svga }
SVGA640x480x256 = 2; { 640x480x256 Svga }
SVGA800x600x256 = 3; { 800x600x256 Svga }
SVGA1024x768x256 = 4; { 1024x768x256 Svga }
TRANS_COPY_PIX = 8;
procedure menu_system; forward;
procedure SetVGAPalette256(PalBuf : DacPalette256);
var
Reg : Registers;
begin
reg.ax := $1012;
reg.bx := 0;
reg.cx := 256;
reg.es := Seg(PalBuf);
reg.dx := Ofs(PalBuf);
intr($10,reg);
end;
procedure graphic_stuff;
begin
gM := detect;
gT := 3;
InitGraph (gM, GT, 'c:\kielet\tp70');
setcolor(15);
randomize;
end;
procedure moveA(startx,ally,endx,bkgr,txt : integer;letter : string);
var curx:integer;
begin
setbkcolor(bkgr);
setcolor(txt);
if startx<endx then begin
for curx:=startx to endx do begin
outtextxy(curx,ally,letter);
if (curx>startx) and (curx<endx) then begin
setcolor(bkgr);
outtextxy(curx-1,ally,letter);
setcolor(txt);
end;
delay(0);
end;
end;
if startx>endx then begin
for curx:=startx downto endx do begin
outtextxy(curx,ally,letter);
if (curx<startx) and (curx>endx) then begin
setcolor(bkgr);
outtextxy(curx+1,ally,letter);
setcolor(txt);
end;
delay(0);
end;
end;
end;
procedure repeat_it(count, limit1, heit, diff : integer);
begin
count2:=0;
repeat
setcolor(count);
OutTextXY(diff+(count2*10+30), heit, '█');
count2:=count2+1;
count:=count+1;
until count=limit1;
end;
procedure SVGA_colorchart;
begin
ClearViewPort;
count:=0;
setcolor(15);
settextjustify(lefttext,toptext);
OutTextXY ( 10, 20, 'SVGA 256 color chart');
OutTextXY ( 10, 40, 'Basic colors [0-15] :');
OutTextXY ( 10, 55, 'White to black [16-31] :');
OutTextXY ( 10, 70, 'SVGA colors [32-256] :');
repeat_it(count, 16, 40, 231); count:=16;
repeat_it(count, 32, 55, 220); count:=32;
repeat_it(count, 104, 85, 0); count:=104;
repeat_it(count, 176, 100, 0); count:=176;
repeat_it(count, 248, 115, 0); count:=248;
repeat_it(count, 257, 130, 0);
readkey;
end;
procedure glow_text;
procedure inout;
begin
setcolor(count);
OutTextXY(400,300,'This is only a test, please do not be alarmed.');
delay(50);
end;
begin
ClearViewPort;
setTextJustify (centertext, centertext);
repeat
for count:=16 to 31 do inout;
for count:=31 downto 16 do inout;
until keypressed;
end;
procedure fades;
procedure circle_it(count, a, b, limit1:integer);
begin
repeat
for count:=a to b do begin
setcolor(count);
circle(x,y,limit1);
limit1:=limit1-1;
end;
for count:=b downto a do begin
setcolor(count);
circle(x,y,limit1);
limit1:=limit1-1;
end;
until limit1<2;
end;
procedure circle_fade;
begin
limit1:=500;
circle_it(count, 32, 65, limit1);
readkey;
end;
procedure bw_circle_fade;
begin
limit1:=500;
Circle_It(count, 16, 31, limit1);
readkey;
end;
procedure Wipe_fade;
var outX, outY : Integer;
begin
Randomize;
setcolor(32+random(20));
X1 := 300+random(200);
Y1 := 200+random(200);
OutX := 800;
OutY := 0;
for OutY := OutY to 600 do Line ( X, Y, OutX, OutY);
for OutX := OutX downto 0 do Line ( X, Y, OutX, OutY);
for OutY := OutY downto 0 do Line ( X, Y, OutX, OutY);
for OutX := OutX to 800 do Line ( X, Y, OutX, OutY);
end;
procedure Wipe_fade2;
var x2, y2 : Integer;
begin
ClearViewPort;
a:=31;
repeat
a:=a+1;
begin
x1:=100; y1:=0;
x2:=700; y2:=0;
repeat
y1:=y1+1; x2:=x2-1;
SetColor(a); Line(x,y,x1,y1);
SetColor(0); Line(x,y,x2,y2);
until y1=600;
repeat
x1:=x1+1; y2:=y2+1;
SetColor(a); Line(x,y,x1,y1);
SetColor(0); Line(x,y,x2,y2);
until x1=700;
repeat
y1:=y1-1; x2:=x2+1;
SetColor(a); Line(x,y,x1,y1);
SetColor(0); Line(x,y,x2,y2);
until y1=0;
repeat
x1:=x1-1; y2:=y2-1;
SetColor(a); Line(x,y,x1,y1);
SetColor(0); Line(x,y,x2,y2);
until x1=100;
end;
until keypressed;
end;
procedure dot_it;
begin
setcolor(count);
x1:= random(800);
y1:= random(600);
OutTextXY(x1,y1,'█');
end;
procedure color_fade;
begin
repeat
for count:=32 to 60 do dot_it;
for count:=60 downto 32 do dot_it;
until keypressed;
end;
procedure bw_fade;
begin
repeat
for count:=16 to 31 do dot_it;
for count:=31 downto 16 do dot_it;
until keypressed;
end;
procedure pixel_fade;
begin
repeat
PutPixel(random(800), random(600), 32+random(30));
until keypressed;
end;
begin
ClearViewPort;
setcolor(38);
rectangle ( 97, 97,703,503); setcolor(36);
rectangle (100,100,700,500); setcolor(42);
OutTextXY (x,y-160,'Choose:'); setcolor(41);
OutTextXY (x,y-120,'[A] : Color Fade'); setcolor(40);
OutTextXY (x,y-100,'[B] : Gray Fade'); setcolor(39);
OutTextXY (x,y-80,'[C] : Wipe Fade'); setcolor(38);
OutTextXY (x,y-60,'[D] : Weird Wipe'); setcolor(37);
OutTextXY (x,y-40,'[E] : Circle Fade'); setcolor(36);
OutTextXY (x,y-20,'[F] : B/W Circle Fade'); setcolor(35);
OutTextXY (x, y,'[G] : Pixel Fade'); setcolor(34);
OutTextXY (x,y+20,'[Q] : Quit to Main'); setcolor(33);
OutTextXY (620,490,'Kru$H Productions');
What := readkey;
If (what='a') or (what='A') then color_fade;
If (what='b') or (what='B') then bw_fade;
If (what='c') or (what='C') then wipe_fade;
If (what='d') or (what='D') then wipe_fade2;
If (what='e') or (what='E') then circle_fade;
If (what='f') or (what='F') then bw_circle_fade;
If (what='g') or (what='G') then pixel_fade;
if (what='q') or (what='Q') then menu_system else fades;
end;
procedure tiny_intro;
begin
for count:= 0 to 20 do begin
ClearViewPort;
SetColor (32+(random(18)));
settextstyle(0,0,5);
OutTextXY ( x, y,'Kru$H Productions');
delay(10);
settextstyle(0,0,1);
end;
for count:=5 downto 0 do begin
setcolor(black);
OutTextXY( x, y,'Kru$H Productions');
settextstyle(0,0,count);
setcolor(red);
OutTextXY( x, y,'Kru$H Productions');
delay(40);
end;
repeat
count:=count+1;
x1:=Random(800);
y1:=Random(600);
if getpixel(x1,y1)=black then putpixel(x1,y1,32+random(40));
until count=3000;
OutTextXY (x,y,'Kru$H Productions');
readkey;
end;
procedure move_it;
begin
a:=800 ; b:=170 ; c:=470;
ClearViewPort;
moveA(a,b,172,0,33,'I'); moveA(0,c,428,0,62,'s');
moveA(a,b,180,0,34,'s'); moveA(0,c,420,0,60,'n');
moveA(a,b,196,0,35,'t'); moveA(0,c,412,0,58,'o');
moveA(a,b,204,0,36,'h'); moveA(0,c,404,0,56,'i');
moveA(a,b,212,0,37,'i'); moveA(0,c,396,0,54,'t');
moveA(a,b,220,0,38,'s'); moveA(0,c,388,0,52,'c');
moveA(a,b,236,0,39,'n'); moveA(0,c,380,0,50,'u');
moveA(a,b,244,0,40,'e'); moveA(0,c,372,0,48,'d');
moveA(a,b,252,0,41,'a'); moveA(0,c,364,0,46,'o');
moveA(a,b,260,0,42,'t'); moveA(0,c,356,0,44,'r');
moveA(a,b,276,0,43,'o'); moveA(0,c,348,0,42,'P');
moveA(a,b,284,0,44,'r'); moveA(0,c,332,0,40,'H');
moveA(a,b,300,0,45,'w'); moveA(0,c,324,0,38,'$');
moveA(a,b,308,0,46,'h'); moveA(0,c,316,0,36,'u');
moveA(a,b,316,0,47,'a'); moveA(0,c,308,0,34,'r');
moveA(a,b,324,0,48,'t'); moveA(0,c,300,0,32,'K');
moveA(a,b,340,0,49,'?');
readkey;
end;
procedure sprite_x2;
begin
ClearViewPort; y1:=800;
for count:=0 to 1600 do begin
PutImage(y1, 350, car, 0);
PutImage(count div 2, 200, tank1, 0);
if x1<>1 then y1:=y1-1;
if y1=0 then x1:=1;
if x1=1 then y1:=y1+1;
end;
clearviewport;
end;
procedure ending;
begin
ClearViewPort;
SetTextStyle(0,0,2);
OutTextXY(x,y,'The End');
delay(250);
end;
procedure menu_system;
begin
clearviewport;
settextjustify(1,1); setcolor(38);
rectangle ( 97, 97,703,503); setcolor(36);
rectangle (100,100,700,500); setcolor(42);
OutTextXY (x,y-160,'Choose:'); setcolor(41);
OutTextXY (x,y-120,'[A] : Tiny Intro'); setcolor(40);
OutTextXY (x,y-100,'[B] : Svga Colorchart'); setcolor(39);
OutTextXY (x,y-80,'[C] : Text Glow'); setcolor(38);
OutTextXY (x,y-60,'[D] : Fades'); setcolor(37);
OutTextXY (x,y-40,'[E] : Sprite Movement'); setcolor(36);
OutTextXY (x,y-20,'[F] : Text Movement'); setcolor(35);
OutTextXY (x,y ,'[Q] : Quit'); setcolor(34);
OutTextXY (620,490,'Kru$H Productions');
What := readkey;
If (what='a') or (what='A') then tiny_intro;
If (what='b') or (what='B') then SVGA_colorchart;
If (what='c') or (what='C') then glow_text;
If (what='d') or (what='D') then fades;
if (what='e') or (what='E') then sprite_x2;
if (what='f') or (what='F') then move_it;
if (what='q') or (what='Q') then ending else menu_system;
end;
begin
graphic_stuff;
menu_system;
closegraph;
end.