Skip to content

Instantly share code, notes, and snippets.

@arantius
Created October 19, 2011 04:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arantius/1297491 to your computer and use it in GitHub Desktop.
Save arantius/1297491 to your computer and use it in GitHub Desktop.
A "final project" for my high school programming class, circa May 1996
'Tony Lieuallen Computer Science, Period 2
'Programming Problem Chapter 11, Level 2, Number 5
DEFINT A-Z 'integer default variable type
DECLARE SUB ScrollText ()
COMMON SHARED Delay
SCREEN 13
DIM DiskPic(9900) AS INTEGER
S = -1
LINE (100, 60)-(210, 150), 1, BF
LINE (125, 120)-(185, 150), 25, BF
LINE (133, 125)-(150, 145), 1, BF
PSET (125, 120), 1
PSET (185, 120), 1
PSET (100, 150), 0
PSET (100, 149), 0
PSET (101, 150), 0
LINE (103, 65)-(106, 63), 0, BF
LINE (204, 65)-(207, 63), 0, BF
LINE (110, 60)-(200, 115), 15, BF
PSET (110, 115), 1
PSET (110, 114), 1
PSET (111, 115), 1
PSET (200, 115), 1
PSET (200, 114), 1
PSET (199, 115), 1
COLOR 64
LOCATE 1, 1: PRINT "WackyWare"
COLOR 15
GET (0, 0)-(9 * 8, 8), DiskPic
PUT (120, 85), DiskPic, XOR
GET (100, 60)-(210, 150), DiskPic
PUT (100, 60), DiskPic, OR
GET (100, 60)-(210, 150), DiskPic
CLS
FOR X = 64 TO 127
OUT &H3C8, X
OUT &H3C9, X - 63
OUT &H3C9, 0
OUT &H3C9, 0
NEXT
Delay = 14
Clr = 65
S = 1
FOR X = 200 TO 0 STEP -1
Clr = Clr + 1
IF Clr = 128 THEN Clr = 64
CIRCLE (160, 100), X, Clr
PAINT (160, 100), Clr, Clr
NEXT
PUT (105, 55), DiskPic, PSET
LOCATE 25, 1: PRINT " Press spacebar to toggle music!! ";
PLAY ON
PLAY "MB t150 o1 l8 eefF#4af#aF#f#febo1ee4"
Y = 64
DO
Y = Y + 1
IF Y > 63 THEN Y = 1
FOR X = 64 TO 127
OUT &H3C8, X
OUT &H3C9, X + Y - 63
OUT &H3C9, 0
OUT &H3C9, 0
NEXT
CALL ScrollText
ON PLAY(1) GOSUB PlayMus
Key$ = INKEY$
IF Key$ = " " THEN
S = S * -1
IF S > 0 THEN
PLAY ON
ELSE
PLAY STOP
END IF
ELSEIF Key$ <> "" THEN
SYSTEM
END IF
LOOP
DATA "Hello! Welcome to the WackyWare demo/logo by Tony Lieuallen! This is a demonstration of some really cool things most people think QBasic can't do. In addition to the cool scrolling tunnel (With a graphic on top of it.), there is background music. The background music is (part of) a nirvana song. Well, I hope you like it!! (If you press spacebar, then it will turn off the music, press again and it's back!)"
SYSTEM 'end program and close files
PlayMus:
PLAY "MB befF#4af#aF#f#febo1ee4"
RETURN
SUB ScrollText
STATIC StringPos, Delay
Delay = Delay + 1
IF Delay = 15 THEN
StringPos = StringPos + 1
RESTORE
READ Text$
StringLen = LEN(Text$) + 45
IF StringPos = StringLen + 10 THEN StringPos = 1
Text$ = SPACE$(45) + Text$ + SPACE$(45)
LOCATE 1, 1
PRINT MID$(Text$, StringPos, 40)
Delay = 0
END IF
END SUB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment