04-22-2022, 05:57 PM
From the Archives of The QJurassic Forum, via TheBOB, 2003
Code: (Select All)
'*******************
'STARS and STRIPES
'By TheBOB / 2003
'*******************
_TITLE "Stars and Strips by Bob Seguin"
DEFINT A-Z
SCREEN 12
OUT &H3C8, 4
OUT &H3C9, 63
OUT &H3C9, 0
OUT &H3C9, 0
OUT &H3C8, 5
OUT &H3C9, 0
OUT &H3C9, 0
OUT &H3C9, 25
OUT &H3C8, 8
OUT &H3C9, 60
OUT &H3C9, 60
OUT &H3C9, 63
PSET (113, 98), 15
DRAW "ta216 r18 ta72 r18 ta288 r18 ta144 r18 ta0 r18"
PAINT (0, 0), 4, 15
PAINT (105, 105), 14, 4
PAINT (0, 0), 0, 14
PSET (98, 109), 14
PSET (100, 108), 14
FOR x = 97 TO 114
FOR y = 102 TO 109
IF POINT(x, y) = 14 THEN PSET (x, y), 6
NEXT y
NEXT x
DIM StarBOX(140)
GET (95, 90)-(115, 110), StarBOX()
PAINT (0, 0), 5
FOR y = 60 TO 372 STEP 52
LINE (50, y)-(589, y + 24), 4, BF
IF y < 372 THEN LINE (50, y + 25)-(589, y + 51), 15, BF
NEXT y
LINE (50, 60)-(290, 240), 1, BF
FOR x = 64 TO 254 STEP 38
FOR y = 70 TO 206 STEP 34
PUT (x, y), StarBOX()
IF x < 254 AND y < 206 THEN PUT (x + 19, y + 17), StarBOX()
NEXT y
NEXT x
'Initialize "wave" variables
x1 = 0
x3 = 215
x5 = 430
DO
Count = Count + 1
x = INT(RND * 6)
y = INT(RND * 5)
x = x * 38 + 64
y = y * 34 + 70
IF x < 254 AND y < 206 AND Count MOD 2 THEN x = x + 19: y = y + 17
LINE (x, y)-(x + 18, y + 19), 1, BF
StartTIME# = TIMER
DO: LOOP WHILE TIMER < StartTIME# + 0
PUT (x, y), StarBOX()
'Add extra twinkle effect
IF Count MOD 3 THEN
PAINT (x + 9, y + 14), 11, 1
WAIT &H3DA, 8
WAIT &H3DA, 8, 8
PAINT (x + 9, y + 14), 15, 1
WAIT &H3DA, 8
WAIT &H3DA, 8, 8
PAINT (x + 9, y + 14), 1, 1
PUT (x, y), StarBOX()
END IF
'Increment 'wave' variables
x1 = x1 + 1
x2 = x1 + 80
x3 = x3 + 1
x4 = x3 + 80
x5 = x5 + 1
x6 = x5 + 80
'reset "wave" variables to left of screen when indicated
IF x1 = 600 THEN x1 = -45
IF x3 = 600 THEN x3 = -45
IF x5 = 600 THEN x5 = -45
'Draw "waves"
FOR y = 60 TO 372
IF POINT(x1, y) = 8 THEN PSET (x1, y), 15
IF POINT(x2, y) = 15 THEN PSET (x2, y), 8
IF POINT(x3, y) = 8 THEN PSET (x3, y), 15
IF POINT(x4, y) = 15 THEN PSET (x4, y), 8
IF POINT(x5, y) = 8 THEN PSET (x5, y), 15
IF POINT(x6, y) = 15 THEN PSET (x6, y), 8
NEXT y
IF Count = 32767 THEN Count = 1
LOOP WHILE INKEY$ = ""
SYSTEM