home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
17 Bit Software 1: Collection A
/
17Bit_Collection_A.iso
/
files
/
989.dms
/
989.adf
/
FlowerGarden
/
Flower_Garden
(
.txt
)
< prev
next >
Wrap
AmigaBASIC Source Code
|
1990-04-30
|
9KB
|
329 lines
'Flower Garden by Marianne Gillis
' 78 Tufnell Drive
' Winnipeg, Canada
' R2N 1J8
'Copyright 1988
ON BREAK GOSUB ender: BREAK ON
SCREEN 1,320,200,5,1: WINDOW 2,,,16,1
PALETTE 0,0.55,0.55,0.55 'grey
PALETTE 1,0.01,0.01,0.01 'transparent black
PALETTE 2,1,1,1 'white
PALETTE 3,0.92,0.43,0.18 'orange
PALETTE 4,0,0,0.8 'sky blue
PALETTE 5,1,0.23,0.56 'violet
PALETTE 6,0,1,0 'lime
PALETTE 7,0.8,0,0 'red
PALETTE 8,0,0.42,0 'moss
PALETTE 9,0.32,0.38,0.92 'light blue
PALETTE 10,0.66,0.2,0.72 'purple
PALETTE 11,0.93,0.96,0.37 'yellow
PALETTE 12,0.02,0.02,0.02 'black borders
PALETTE 13,0,0,0
x=20:y=20
dx= 80 :dy=180
ax=120 :ay=180
tx=160 :ty=180
Border:
LINE (35,20)-(269,160),3,bf: LINE (35,20)-(269,160),12,b
LINE (39,24)-(265,156),8,bf: LINE (39,24)-(265,156),12,b
Brush:
COLOR 12,0
CIRCLE (286,134),4,12,3.1,6.28: LINE (290,134)-(290,128),12
LINE (282,134)-(282,128),12: LINE (290,128)-(282,128),12
LINE (285,128)-(285,131),12: LINE (288,128)-(288,131),12
LINE (285,138)-(285,143),12: LINE (287,138)-(287,143),12
LINE (285,143)-(287,143),12: PAINT (286,142),12,12
Smallpencil:
LINE (276,98)-(296,98): LINE (273,100)-(276,98)
LINE (276,102)-(296,102): LINE (273,100)-(276,102)
LINE (296,98)-(296,102): LINE (295,98)-(295,102)
LINE (278,98)-(278,102): PSET (278,99),0:PSET (278,101),0
Bigpencil:
LINE (277,66)-(297,66): LINE (272,70)-(277,66)
LINE (277,74)-(297,74): LINE (272,70)-(277,74)
LINE (297,66)-(297,74): LINE (296,66)-(296,74)
LINE (279,66)-(279,74):PSET(279,68),0:PSET(279,70),0
PSET(279,72),0
Mower:
LINE (278,182)-(306,188),13,b
LINE (286,176)-(298,182),13,b
CIRCLE (282,187),4,12 : PAINT (282,187),0,12
CIRCLE (302,187),4,12 : PAINT (302,187),0,12
CIRCLE (282,187),1,12
CIRCLE (302,187),1,12
LINE (291,185)-(251,169),12
LINE (293,185)-(253,169),12
Makeobjects:
OPEN "Bee.spr" FOR INPUT AS 1
OBJECT.SHAPE 1, INPUT$(LOF(1),1)
CLOSE 1
OBJECT.X 1,280: OBJECT.Y 1,10
OBJECT.ON 1
Headings:
LOCATE 2,12: PRINT "FLOWER GARDEN"
Placecircles:
WAVE 0,SIN
SOUND 329.63,3,150,0
SOUND 349.23,3,150,0
SOUND 392,6,200,0
SOUND 261.63,6,150,0
SOUND 293.66,6,200,0
SOUND 349.23,6,150,0
SOUND 329.63,9,200,0
SOUND 293.66,3,150,0
SOUND 261.63,12,180,0
FOR p = 2 TO 12
CIRCLE (x,y),6,12: PAINT (x,y),p,12
y=y+15
NEXT p
p=7 : d=0
PAINT (294,100),p,12
Masterbouquet:
b=2 : RANDOMIZE TIMER
FOR n=1 TO 20 STEP 4
r=CINT(RND*4)
b=b+1: IF b=8 THEN b=9
IF b=12 THEN b=2
CIRCLE (200+n,173+r),2,13: PAINT (200+n,173+r),b,13
CIRCLE (200+n,173+r),2,12
LINE (200+n,173+r+2)-(200+n,173+r+10),12
r=CINT(RND*4)
b=b+1: IF b=8 THEN b=9
IF b=12 THEN b=2
CIRCLE (220-n,173-r),2,13: PAINT (220-n,173-r),b,13
CIRCLE (220-n,173-r),2,12
LINE (220-n,173-r+2)-(220-n,173-r+10),12
NEXT n
MasterDaisy:
CIRCLE (dx,dy),4,12
CIRCLE (dx,dy-6),4,12: CIRCLE (dx,dy+6),4,12
CIRCLE (dx-7,dy),4,12: CIRCLE (dx+7,dy),4,12
CIRCLE (dx-6,dy-4),4,12: CIRCLE (dx+6,dy-4),4,12
CIRCLE (dx-6,dy+4),4,12: CIRCLE (dx+6,dy+4),4,12
CIRCLE (dx,dy),6,0
PAINT (80,180),11,12: PAINT (80,186),7,12
MasterAster:
LINE (ax-10,ay)-(ax+10,ay),12
LINE (ax,ay+8)-(ax,ay-8),12
LINE (ax-7,ay+6)-(ax+7,ay-6),12: LINE (ax-7,ay-6)-(ax+7,ay+6),12
LINE (ax-9,ay-3)-(ax+9,ay+3),12: LINE (ax+9,ay-3)-(ax-9,ay+3),12
LINE (ax-4,ay+7)-(ax+4,ay-7),12: LINE (ax+4,ay+7)-(ax-4,ay-7),12
CIRCLE (ax,ay),4,1
PAINT (ax,ay),0,1
CIRCLE (ax,ay),4,12
PAINT (ax,ay),11,12
MasterTulip:
CIRCLE (tx,ty),6,12,3.1,6.28
LINE (tx-7,ty)-(tx-8,ty-10),12: LINE (tx+7,ty)-(tx+8,ty-10),12
LINE (tx-4,ty-6)-(tx-8,ty-10),12: LINE (tx-4,ty-6)-(tx,ty-10),12
LINE (tx+4,ty-6)-(tx+8,ty-10),12: LINE (tx+4,ty-6)-(tx,ty-10),12
PAINT (160,180),7,12
Flowers:
IF ABS(x1-120)<20 THEN GOSUB Aster
IF ABS(x1-160)<20 THEN GOSUB Tulip
IF ABS(x1- 80)<20 THEN GOSUB Daisy
IF ABS(x1-210)<25 THEN GOSUB Bouquet
x1=50:y1=100 'reset
Smalldraw:
IF d=1 GOTO Bigdraw
IF p = 12 THEN p=1
PAINT (294,70),0,12
PAINT (294,100),p,12
IF p = 1 THEN p=12
WHILE MOUSE(0)=0: WEND
WHILE MOUSE(0)<0
x1=MOUSE(3): y1=MOUSE(4)
WHILE MOUSE(0)<0
x2=MOUSE(5)-1: y2=MOUSE(6)
IF (ABS(MOUSE(1)-20)<6) GOTO Pickcolor
IF (ABS(x1-153)>112) OR (ABS(x2-152)>112) GOTO Checkpoint
IF (ABS(y1- 90)> 65) OR (ABS(y2- 90)> 65) GOTO Checkpoint
LINE (x1,y1)-(x2,y2),p: x1=x2: y1=y2
WEND: WEND
Bigdraw:
IF d=0 GOTO Smalldraw
IF p=12 THEN p=1
PAINT (294,100),0,12
PAINT (294,70),p,12
IF p=1 THEN p=12
WHILE MOUSE(0)=0: WEND
WHILE MOUSE(0)<0
x1=MOUSE(3): y1=MOUSE(4)
WHILE MOUSE(0)<0
x2=MOUSE(5): y2=MOUSE(6)
IF (ABS(MOUSE(1)-20)<6) GOTO Pickcolor
IF (ABS(x1-153)>111) OR (ABS(x2-153)>111) GOTO Checkpoint
IF (ABS(y1- 90)> 65) OR (ABS(y2- 90)> 64) GOTO Checkpoint
LINE (x1-1,y1)-(x2-1,y2),p
LINE (x1,y1)-(x2,y2),p
LINE (x1,y1-1)-(x2,y2-1),p
LINE (x1,y1+1)-(x2,y2+1),p
x1=x2: y1=y2
WEND: WEND
Checkpoint:
IF p=12 THEN p=1
IF (ABS(y1-180)<10 AND ABS(x1-285)>20) GOTO Flowers
IF (ABS(x1-285)<20 AND ABS(y1-40)<15)GOTO Movebee
IF ABS(x1-286)<15 THEN
IF ABS(y1-135)<25 THEN PAINT(286,135),p,12:SOUND 3000,0.1,250,0:GOTO Colour
IF ABS(y1-100)<20 THEN d=0:GOTO Smalldraw
IF ABS(y1-70)<20 THEN d=1:GOTO Bigdraw
IF ABS(y1-180)<20 THEN GOSUB UseMower
END IF
GOTO Bigdraw
Colour:
WHILE MOUSE(0)>-1: WEND
x1=MOUSE(3):y1=MOUSE(4)
IF (ABS(x1-152)>112) GOTO Bigdraw
IF (ABS(y1- 90)> 65) GOTO Bigdraw
PAINT (x1,y1),p,12
PAINT (286,135),0,12 'renewcolor
GOTO Bigdraw
Pickcolor:
SOUND 3000,0.1,250,0
p=CINT((y2-5)/15 +1): IF p=12 THEN p=1
PAINT (80,186),p,12: PAINT (160,180),p,12
GOTO Bigdraw
Movebee:
WHILE MOUSE(0)=0:WEND
LOCATE 5,36: PRINT"BEE"
WHILE MOUSE(0)<0
x1=MOUSE(1): y1=MOUSE(2)
OBJECT.OFF 1
OBJECT.X 1,x1-5:OBJECT.Y 1,(y1-40):OBJECT.ON 1
GOTO Movebee
WEND
GOTO Bigdraw
Aster:
SOUND 3000,0.1,250,0
ax=(RND*194)+55:ay=(RND*60)+80
LINE (ax-10,ay)-(ax+10,ay),p
LINE (ax,ay+8)-(ax,ay-8),p
LINE (ax-7,ay+6)-(ax+7,ay-6),p: LINE (ax-7,ay-6)-(ax+7,ay+6),p
LINE (ax-9,ay-3)-(ax+9,ay+3),p: LINE (ax+9,ay-3)-(ax-9,ay+3),p
LINE (ax-4,ay+7)-(ax+4,ay-7),p: LINE (ax+4,ay+7)-(ax-4,ay-7),p
CIRCLE (ax,ay),4,1
PAINT (ax,ay),11,1
CIRCLE (ax,ay),4,p
RETURN
Tulip:
SOUND 3000,0.1,250,0
tx=(RND*194)+55:ty=(RND*60)+80
CIRCLE (tx,ty),6,13,3.1,6.28
LINE (tx-7,ty)-(tx-8,ty-10),13: LINE (tx+7,ty)-(tx+8,ty-10),13
LINE (tx-4,ty-6)-(tx-8,ty-10),13: LINE (tx-4,ty-6)-(tx,ty-10),13
LINE (tx+4,ty-6)-(tx+8,ty-10),13: LINE (tx+4,ty-6)-(tx,ty-10),13
PAINT (tx,ty+3),p,13
CIRCLE (tx,ty),6,12,3.1,6.28
LINE (tx-7,ty)-(tx-8,ty-10),12: LINE (tx+7,ty)-(tx+8,ty-10),12
LINE (tx-4,ty-6)-(tx-8,ty-10),12: LINE (tx-4,ty-6)-(tx,ty-10),12
LINE (tx+4,ty-6)-(tx+8,ty-10),12: LINE (tx+4,ty-6)-(tx,ty-10),12
PAINT (tx,ty+3),p,12
RETURN
Daisy:
SOUND 3000,0.1,250,0
dx=(RND*194)+55:dy=(RND*60)+80
CIRCLE (dx,dy),4,13
CIRCLE (dx,dy-6),4,13: CIRCLE (dx,dy+6),4,13
CIRCLE (dx-7,dy),4,13: CIRCLE (dx+7,dy),4,13
CIRCLE (dx-6,dy-4),4,13: CIRCLE (dx+6,dy-4),4,13
CIRCLE (dx-6,dy+4),4,13: CIRCLE (dx+6,dy+4),4,13
CIRCLE (dx,dy),6,1
PAINT (dx,dy),11,13
PAINT (dx-5,dy),p,13
CIRCLE (dx,dy),4,12
CIRCLE (dx,dy-6),4,12: CIRCLE (dx,dy+6),4,12
CIRCLE (dx-7,dy),4,12: CIRCLE (dx+7,dy),4,12
CIRCLE (dx-6,dy-4),4,12: CIRCLE (dx+6,dy-4),4,12
CIRCLE (dx-6,dy+4),4,12: CIRCLE (dx+6,dy+4),4,12
RETURN
Bouquet:
startp = p
FOR p=2 TO 11
IF p = 8 THEN p = 9
GOSUB Aster
GOSUB Daisy
GOSUB Tulip
NEXT p
p=startp
RETURN
UseMower:
FOR k = 262 TO 40 STEP -3 '<------
SOUND 250,0.3,200,0
SOUND 250,0.5,0.1,0
LINE (k,155)-(k+2,133),8,bf
NEXT k
FOR m= 40 TO 262 STEP 3
SOUND 250,0.3,200,0
SOUND 250,0.5,0.1,0
LINE (m,132)-(m+2,111),8,bf
NEXT m
FOR n = 262 TO 40 STEP -3
SOUND 250,0.3,200,0
SOUND 250,0.5,0.1,0
LINE (n,110)-(n+2,89),8,bf
NEXT n
FOR t= 40 TO 262 STEP 3
SOUND 250,0.3,200,0
SOUND 250,0.5,0.1,0
LINE (t,88)-(t+2,66),8,bf
NEXT t
FOR s = 262 TO 40 STEP -3
SOUND 250,0.3,200,0
SOUND 250,0.5,0.1,0
LINE (s,65)-(s+2,44),8,bf
NEXT s
FOR q= 40 TO 262 STEP 3
SOUND 250,0.3,200,0
SOUND 250,0.5,0.1,0
LINE (q,43)-(q+2,25),8,bf
NEXT q
x1=50:y1=100 'reset
RETURN
Loop:
GOTO Loop
ender:
CLEAR, 25000
WINDOW CLOSE 2
SCREEN CLOSE 1
SYSTEM
END