Jeśli chcesz wziąć udział w dyskusjach na forum - zaloguj się. Jeżeli nie masz loginu - poproś o członkostwo.
Vanilla 1.1.4 jest produktem Lussumo. Więcej informacji: Dokumentacja, Forum.
5 GRAPHICS 8: COLOR 1: H=159
10 X=128: Y=88: REM PIERWSZY PUNKT
15 K=2: REM KROK RYSOWANIA
20 P=INT(RND(0)*4)+1: REM LICZBA PRZYPADKOWA
25 A=PEEK(764)
30 IF P=1 THEN X=X+K
35 IF P=2 THEN X=X-K
40 IF P=3 THEN Y=Y+K
45 IF P=4 THEN Y=Y-K
50 IF A<>255 THEN POKE 764,255: GOSUB 1000: REM ZMIANA KOLORU
54 REM POZA EKRANEM ?
55 IF X>319 OR X<0 OR Y>H OR Y<0 THEN X=INT(RND(0)*319)+1: Y=INT(RND(0)*H)+1
60 PLOT X,Y: REM RYSUJ PUNKT
65 POKE 77,0
70 GOTO 20: REM KOLEJNY CYKL
1000 PRINT "KOLOR MORZA (0-15) ";: INPUT KT
1010 PRINT "KOLOR ZIEMI (0-15) ";: INPUT KU
1020 SETCOLOR 1,0,KT
1030 SETCOLOR 2,0,KU
1040 RETURN
5 GRAPHICS 8+16: COLOR 1: H=191
10 X=128: Y=88: REM PIERWSZY PUNKT
15 K=2: REM KROK RYSOWANIA
20 P=INT(RND(0)*4)+1: REM LICZBA PRZYPADKOWA
25 A=PEEK(764)
30 IF P=1 THEN X=X+K
35 IF P=2 THEN X=X-K
40 IF P=3 THEN Y=Y+K
45 IF P=4 THEN Y=Y-K
50 IF A<>255 THEN POKE 764,255: END: GOSUB 1000: REM ZMIANA KOLORU
54 REM POZA EKRANEM ?
55 IF X>319 OR X<0 OR Y>H OR Y<0 THEN X=INT(RND(0)*319)+1: Y=INT(RND(0)*H)+1
60 PLOT X,Y: REM RYSUJ PUNKT
65 POKE 77,0
70 GOTO 20: REM KOLEJNY CYKL
1000 PRINT "KOLOR MORZA (0-15) ";: INPUT KT
1010 PRINT "KOLOR ZIEMI (0-15) ";: INPUT KU
1020 SETCOLOR 1,0,KT
1030 SETCOLOR 2,0,KU
1040 RETURN
5 GRAPHICS 8+16: COLOR 1: H=191
10 X=128: Y=88: REM PIERWSZY PUNKT
15 K=2: REM KROK RYSOWANIA
20 P=INT(RND(0)*4)+1: REM LICZBA PRZYPADKOWA
25 A=PEEK(764)
30 IF P=1 THEN X=X+K
35 IF P=2 THEN X=X-K
40 IF P=3 THEN Y=Y+K
45 IF P=4 THEN Y=Y-K
54 REM POZA EKRANEM ?
55 IF X>319 OR X<0 OR Y>H OR Y<0 THEN X=INT(RND(0)*319)+1: Y=INT(RND(0)*H)+1
60 PLOT X,Y: REM RYSUJ PUNKT
65 POKE 77,0
70 GOTO 20: REM KOLEJNY CYKL
program map;
uses fastgraph;
const
K = 2;
W = 319;
H = 191;
var
x: smallInt = 128;
y: smallInt = 88;
p: byte;
begin
Randomize;
InitGraph(8 + 16);
SetColor(1);
repeat
p := Random(4) + 1;
case p of
1: x := x + K;
2: x := x - K;
3: y := y + K;
4: y := y - K;
end;
if (x < 0) or (x > W) then x := Random(W);
if (y < 0) or (y > H) then y := Random(H);
PutPixel(x, y);
until false;
end.
10 K=%2:W=319:H=191:GRAPHICS 8+16:COLOR %1
20 DO
30 P=RAND(4)+%1
40 ON P GOSUB 60,70,80,90
50 GO# NXT
60 X=X+K:RETURN
70 X=X-K:RETURN
80 Y=Y+K:RETURN
90 Y=Y-K:RETURN
100 # NXT
110 IF X<0 OR X>W THEN X=RAND(W)
120 IF Y<0 OR Y>H THEN Y=RAND(H)
130 PLOT X,Y
140 LOOP
10 K=%2:W=619:H=191:OPEN #6,12,4,"S2:":C=%1
20 DO
30 P=RAND(4)+%1
40 ON P GOSUB 60,70,80,90
50 GO# NXT
60 X=X+K:RETURN
70 X=X-K:RETURN
80 Y=Y+K:RETURN
90 Y=Y-K:RETURN
100 # NXT
110 IF X<0 OR X>W THEN X=RAND(W):C=C+%1
120 IF Y<0 OR Y>H THEN Y=RAND(H):C=C+%1
125 IF C>254 THEN C=%1
130 COLOR C:PLOT X,Y
140 LOOP
10 # L1:CLOSE :K=%2:W=619:H=191:OPEN #6,12,4,"S2:":C=%1
20 DO
30 P=INT(RND(0)*4)+%1
40 ON P EXEC X1,X2,Y1,Y2
50 GO# NXT
60 PROC X1:X=X+K:ENDPROC
70 PROC X2:X=X-K:ENDPROC
80 PROC Y1:Y=Y+K:ENDPROC
90 PROC Y2:Y=Y-K:ENDPROC
100 # NXT
110 IF X<0 OR X>W THEN X=INT(RND(0)*W):C=C+%1:K=RAND(8)+%1
120 IF Y<0 OR Y>H THEN Y=INT(RND(0)*H):C=C+%1:K=RAND(8)+%1
125 IF C>254 THEN EXIT
130 COLOR C:PLOT X,Y
140 LOOP
150 POKE 77,%0:GO# L1
program map;
uses graph;
const
K = 1;
W = 159;
H = 191;
var
x: smallInt = 79;
y: smallInt = 95;
p: byte;
procedure rndColor;
begin
SetColor(Random(4));
end;
begin
Randomize;
InitGraph(15 + 16);
poke(708,$b4);
poke(709,$c8);
poke(710,$da);
poke(712,$84);
rndColor;
repeat
p := Random(4) + 1;
case p of
1: x := x + K;
2: x := x - K;
3: y := y + K;
4: y := y - K;
end;
if (x < 0) or (x > W) then begin
x := Random(W);
rndColor;
end;
if (y < 0) or (y > H) then begin
y := Random(H);
rndColor;
end;
PutPixel(x, y);
until false;
end.
Pin:
ehhh, to dodawanie plików to niezła masakra.;generator mapy, AtariFan, 210227
BYTE
X,Y,K,R,
KEY =$02FC,
COLPF0S =$02C4,
COLPF1S =$02C5,
COLPF2S =$02C6
PROC MAIN()
GRAPHICS(31)
COLOR=1
COLPF0S=$B4
COLPF1S=$C8
COLPF2S=$DA
K=2
X=79 Y=95
KEY=255
WHILE KEY=255
DO
R=RAND(5)
IF R=1 THEN X==-K FI
IF R=2 THEN X==+K FI
IF R=3 THEN Y==-K FI
IF R=4 THEN Y==+K FI
IF X<0 OR X>159 THEN
X=RAND(159) COLOR=RAND(4) FI
IF Y<0 OR Y>191 THEN
Y=RAND(191) COLOR=RAND(4) FI
PLOT(X,Y)
OD
RETURN
program map;
uses atari, graph, gr10pp;
const
K = 1;
W = 79;
H = 69;
DISPLAY_LIST_ADDRESS = $5000;
var
x: smallInt = 39;
y: smallInt = 34;
p: byte;
procedure rndColor;
begin
SetColor(Random(9));
end;
begin
Randomize;
InitGraph(10);
Gr10Init(DISPLAY_LIST_ADDRESS, savmsc, H + 1, 3, 2);
pcolr0 := $84; // background
pcolr3 := $a4;
pcolr1 := $b6;
color2 := $c8;
pcolr2 := $da;
color1 := $ec;
color0 := $fa;
color4 := $18;
color3 := $26;
rndColor;
repeat
p := Random(4) + 1;
case p of
1: x := x + K;
2: x := x - K;
3: y := y + K;
4: y := y - K;
end;
if (x < 0) or (x > W) then begin
x := Random(W);
rndColor;
end;
if (y < 0) or (y > H) then begin
y := Random(H);
rndColor;
end;
PutPixel(x, y);
until false;
end.