12-06-2022, 06:20 PM
Latest version....it's a playable game now. I tried adding beeps but I didn't like it so it's a silent game for now.
More stuff to add. The 'fuse' for example.
Press ESC to quit any time. The game starts off easy and gets more difficult each level.
More stuff to add. The 'fuse' for example.
Press ESC to quit any time. The game starts off easy and gets more difficult each level.
Code: (Select All)
_Title "QB64 Qix"
'james2464 - December 2022
'controls : arrow keys to move
' : left CTRL for fast draw (blue)
' : left ALT for slow draw (red)
'_FullScreen
'_MouseHide
Option _Explicit
_DisplayOrder _Software , _Hardware
Dim Shared scx, scy, scxb, scxb2, scyb, scyb2, scw, sch
Dim Shared scxb3, scyb3
scx = 520: scy = 600
scxb = 60: scyb = 120
scxb2 = 61: scyb2 = 121
scw = 400: sch = 400
scxb3 = scxb + scw - 1
scyb3 = scyb + sch - 1
Screen _NewImage(scx, scy, 32)
Const PI = 3.141592654#
Randomize Timer
Dim Shared c(100) As Long
colour1
Dim Shared bg&, bg2&, dbg&, title&
bg& = _NewImage(scx, scy, 32) 'main background
bg2& = _NewImage(scx, scy, 32) 'main background copy
dbg& = _NewImage(scx, scy, 32) 'drawing background
title& = _NewImage(250, 100, 32) 'Qix title
Dim Shared spark&(4)
spark&(1) = _NewImage(12, 12, 32)
spark&(2) = _NewImage(12, 12, 32)
spark&(3) = _NewImage(12, 12, 32)
spark&(4) = _NewImage(12, 12, 32)
createsparks
Dim Shared cursor&(3)
cursor&(1) = _NewImage(20, 100, 32)
cursor&(2) = _NewImage(20, 100, 32)
cursor&(3) = _NewImage(20, 100, 32)
createcursors
qixtitle
Dim Shared xx, yy, t, olddir, x, y, h, hd, fl, fl2, ct, a1, a2, font
Dim Shared sdinprocess, fdinprocess As Integer
Dim Shared qpath, flag, n, movepermit, flagrestart As Integer
Dim Shared qixtot, qxv, qyv, f, pmove, pfast, pslow, oldpx, oldpy, ps, drawoldx, drawoldy
Dim Shared j, k, checkx1, checkx2, checky1, checky2, totpct, btot, rtot, oldbt, oldrt, levelstart, levelno
Dim Shared bluetot, redtot As _Integer64
Dim Shared ct2, ct3, ct4, basedir, dist, d2, rp 'for newlife and youdead subs
Dim Shared mp, mp2 'for sparks
Dim Shared pts1, pts2
font = _LoadFont("arialbd.ttf", 16, "monospace")
_Font font
'origin
xx = 250: yy = 270
Type player
x As Single
y As Single
lives As Integer
points As _Integer64
skill As Integer
End Type
Dim Shared pl As player
Type spark
x As Single
y As Single
End Type
Dim Shared spx(10) As spark
Type qix
dir As Single
x1 As Integer
x2 As Integer
y1 As Integer
y2 As Integer
xx As Single
yy As Single
len1 As Single
c1 As Integer
c2 As Integer
c3 As Integer
End Type
Dim Shared q(7) As qix
Dim Shared qd(7) As qix 'for newlife and youdead subs
qixtot = 7: qpath = 0: f = 1
ps = 5
pl.lives = 3
pl.skill = 1
pl.points = 0
levelno = 1
Do
'start
levelstart = 40 'for newlife sub
pl.x = scxb + scw / 2: pl.y = scyb + sch
flagrestart = 0
totpct = 0
For t = 1 To qixtot
q(t).xx = xx: q(t).yy = yy: q(t).len1 = 40
Next t
Cls
'screen setup
Line (scxb, scyb)-(scxb + scw, scyb + sch), c(1), B 'outer border
Paint (2, 2), c(6), c(1)
_PutImage (81, 31)-(205, 80), title&, 0 'draw Qix title
bluetot = 0: redtot = 0
_PutImage (0, 0)-(scx, scy), 0, bg&, (1, 1)-(scx - 1, scy - 1) 'take snapshot of screen
bg2& = _CopyImage(bg&, 33)
Do
_Limit 30
_PutImage (0, 0)-(scx, scy), bg&, 0, (1, 1)-(scx - 1, scy - 1) 'show main
'player cursor =======================================================================================
If levelstart < 90 Then
levelstart = levelstart - 1
End If
If levelstart < 0 Then
'get keyboard input
pmove = arrowkey
pfast = fastdraw
pslow = slowdraw
oldpx = pl.x: oldpy = pl.y
oldbt = bluetot: oldrt = redtot
If pfast + pslow = 0 Then normalmove
If pfast > pslow Then
If sdinprocess = 0 Then
fastdrawmove
End If
End If
a1 = levelstart Mod 2
If a1 = 0 Then
If pfast < pslow Then
If fdinprocess = 0 Then
slowdrawmove
End If
End If
End If
End If
'qix movement
qixmoves
'sparks movement
sparkmoves
'====================================================================================================
'====================================================================================================
'====================================================================================================
'====================================================================================================
Cls
_PutImage (0, 0)-(scx - 1, scy - 1), bg&, 0 'draw background
If pl.lives > 0 Then
_PutImage (scxb + scw - 40, 20)-(scxb + scw - 20, 121), cursor&(pl.lives), 0 'display lives remaining
Else
_PutImage (scxb + scw - 40, 20)-(scxb + scw - 20, 121), cursor&(1), 0 'display lives remaining
End If
'display qix
For t = 1 To qixtot
c(9) = _RGB(q(t).c1, q(t).c2, q(t).c3)
Line (q(t).x1, q(t).y1)-(q(t).x2, q(t).y2), c(9)
Next t
'display player cursor
Line (pl.x - ps, pl.y)-(pl.x, pl.y - ps), c(7)
Line (pl.x, pl.y - ps)-(pl.x + ps, pl.y), c(7)
Line (pl.x + ps, pl.y)-(pl.x, pl.y + ps), c(7)
Line (pl.x, pl.y + ps)-(pl.x - ps, pl.y), c(7)
PSet (pl.x, pl.y), c(2)
If spx(1).x > 10 And spx(1).x < scx - 10 Then
a2 = Abs(levelstart): a2 = a2 Mod 4: a2 = a2 + 1
_PutImage (spx(1).x - 9, spx(1).y - 9)-(spx(1).x + 9, spx(1).y + 9), spark&(a2), 0 'draw sparks
End If
'TRACK PERCENTAGES Of SCREEN FILL
btot = Int(bluetot / (scw * sch * .0099)) 'do not alter
rtot = Int(redtot / (scw * sch * .0099)) 'do not alter
totpct = Int(btot + rtot) '<--- used to determine level completed
'points and score display ======================================
pts1 = Int((bluetot - oldbt) / 50)
pts2 = Int((redtot - oldrt) / 25)
pts1 = Int(pts1 * 10)
pts2 = Int(pts2 * 10)
pl.points = pl.points + pts1 + pts2
Locate 7, 7
Color c(4), c(6)
Print "LEVEL"; levelno
Locate 4, 20
Color c(4), c(0)
Print Using "#######"; pl.points
Color c(4), c(6)
Locate 7, 17
Print Using "##%"; totpct
Color c(4), c(0)
'===============================================================
If levelstart <= 35 Then
newlife
End If
_Display
If sdinprocess < 0 Then
_Delay .8
sdinprocess = 0
End If
If fdinprocess < 0 Then
_Delay .8
fdinprocess = 0
End If
If pl.lives < 1 Then
flagrestart = 1
End If
If totpct > 74 Then
endlevel
pl.skill = pl.skill + 1
levelno = levelno + 1
flagrestart = 1
End If
If _KeyDown(15104) Then
endlevel
flagrestart = 1
End If
If _KeyDown(27) Then
System
End If
Loop Until flagrestart = 1
oldbt = 0: oldrt = 0
If pl.lives < 1 Then
'Cls
Color c(2), c(6)
Locate 35, 14
Print "GAME OVER"
_Display
Color c(4), c(0)
Sleep
pl.lives = 3
pl.skill = 1
pl.points = 0
levelno = 1
End If
Loop Until pl.lives < 0
End
Function keydisplay1
keydisplay1 = 0
If _KeyDown(100305) Then ' IF right CTRL key was pressed
keydisplay1 = 1
End If
End Function
Function arrowkey
arrowkey = 0
If _KeyDown(18432) Then ' IF up arrow key was pressed
arrowkey = 1 '
End If
If _KeyDown(20480) Then ' IF down arrow key was pressed
arrowkey = 2 '
End If
If _KeyDown(19200) Then ' IF left arrow key was pressed
arrowkey = 3 '
End If
If _KeyDown(19712) Then ' IF right arrow key was pressed
arrowkey = 4 '
End If
End Function
Function fastdraw
fastdraw = 0
If _KeyDown(100306) Then ' IF L-CTRL key was pressed
fastdraw = 1 '
End If
End Function
Function slowdraw
slowdraw = 0
If _KeyDown(100308) Then ' IF L-ALT key was pressed
slowdraw = 1 '
End If
End Function
'-----------------------------------------------------------------------------------------------------------------
Sub normalmove
Select Case pmove
Case 1
pl.y = pl.y - 4
c(19) = Point(pl.x, pl.y)
c(20) = Point(pl.x + 1, pl.y)
c(21) = Point(pl.x - 1, pl.y)
c(22) = Point(pl.x, pl.y + 1)
c(23) = Point(pl.x, pl.y - 1)
c(24) = Point(pl.x + 1, pl.y + 1)
c(25) = Point(pl.x - 1, pl.y - 1)
c(26) = Point(pl.x - 1, pl.y + 1)
c(27) = Point(pl.x + 1, pl.y - 1)
c(28) = Point(pl.x, pl.y + 2)
fl2 = 0
For fl = 20 To 27 Step 1
If c(fl) = c(0) Then fl2 = 1
Next fl
movepermit = 0
While movepermit = 0
If c(19) = c(1) And c(28) = c(1) And fl2 > 0 Then
movepermit = 1
Else
pl.y = pl.y + 2
c(19) = Point(pl.x, pl.y)
c(20) = Point(pl.x + 1, pl.y)
c(21) = Point(pl.x - 1, pl.y)
c(22) = Point(pl.x, pl.y + 1)
c(23) = Point(pl.x, pl.y - 1)
c(24) = Point(pl.x + 1, pl.y + 1)
c(25) = Point(pl.x - 1, pl.y - 1)
c(26) = Point(pl.x - 1, pl.y + 1)
c(27) = Point(pl.x + 1, pl.y - 1)
fl2 = 0
For fl = 20 To 27 Step 1
If c(fl) = c(0) Then fl2 = 1
Next fl
If c(19) = c(1) And fl2 > 0 Then
movepermit = 1
Else
pl.y = pl.y + 2
movepermit = -1
End If
End If
Wend
Case 2
pl.y = pl.y + 4
c(19) = Point(pl.x, pl.y)
c(20) = Point(pl.x + 1, pl.y)
c(21) = Point(pl.x - 1, pl.y)
c(22) = Point(pl.x, pl.y + 1)
c(23) = Point(pl.x, pl.y - 1)
c(24) = Point(pl.x + 1, pl.y + 1)
c(25) = Point(pl.x - 1, pl.y - 1)
c(26) = Point(pl.x - 1, pl.y + 1)
c(27) = Point(pl.x + 1, pl.y - 1)
c(28) = Point(pl.x, pl.y - 2)
fl2 = 0
For fl = 20 To 27 Step 1
If c(fl) = c(0) Then fl2 = 1
Next fl
movepermit = 0
While movepermit = 0
If c(19) = c(1) And c(28) = c(1) And fl2 > 0 Then
movepermit = 1
Else
pl.y = pl.y - 2
c(19) = Point(pl.x, pl.y)
c(20) = Point(pl.x + 1, pl.y)
c(21) = Point(pl.x - 1, pl.y)
c(22) = Point(pl.x, pl.y + 1)
c(23) = Point(pl.x, pl.y - 1)
c(24) = Point(pl.x + 1, pl.y + 1)
c(25) = Point(pl.x - 1, pl.y - 1)
c(26) = Point(pl.x - 1, pl.y + 1)
c(27) = Point(pl.x + 1, pl.y - 1)
fl2 = 0
For fl = 20 To 27 Step 1
If c(fl) = c(0) Then fl2 = 1
Next fl
If c(19) = c(1) And fl2 > 0 Then
movepermit = 1
Else
pl.y = pl.y - 2
movepermit = -1
End If
End If
Wend
Case 3
pl.x = pl.x - 4
c(19) = Point(pl.x, pl.y)
c(20) = Point(pl.x + 1, pl.y)
c(21) = Point(pl.x - 1, pl.y)
c(22) = Point(pl.x, pl.y + 1)
c(23) = Point(pl.x, pl.y - 1)
c(24) = Point(pl.x + 1, pl.y + 1)
c(25) = Point(pl.x - 1, pl.y - 1)
c(26) = Point(pl.x - 1, pl.y + 1)
c(27) = Point(pl.x + 1, pl.y - 1)
c(28) = Point(pl.x + 2, pl.y)
fl2 = 0
For fl = 20 To 27 Step 1
If c(fl) = c(0) Then fl2 = 1
Next fl
movepermit = 0
While movepermit = 0
If c(19) = c(1) And c(28) = c(1) And fl2 > 0 Then
movepermit = 1
Else
pl.x = pl.x + 2
c(19) = Point(pl.x, pl.y)
c(20) = Point(pl.x + 1, pl.y)
c(21) = Point(pl.x - 1, pl.y)
c(22) = Point(pl.x, pl.y + 1)
c(23) = Point(pl.x, pl.y - 1)
c(24) = Point(pl.x + 1, pl.y + 1)
c(25) = Point(pl.x - 1, pl.y - 1)
c(26) = Point(pl.x - 1, pl.y + 1)
c(27) = Point(pl.x + 1, pl.y - 1)
fl2 = 0
For fl = 20 To 27 Step 1
If c(fl) = c(0) Then fl2 = 1
Next fl
If c(19) = c(1) And fl2 > 0 Then
movepermit = 1
Else
pl.x = pl.x + 2
movepermit = -1
End If
End If
Wend
Case 4
pl.x = pl.x + 4
c(19) = Point(pl.x, pl.y)
c(20) = Point(pl.x + 1, pl.y)
c(21) = Point(pl.x - 1, pl.y)
c(22) = Point(pl.x, pl.y + 1)
c(23) = Point(pl.x, pl.y - 1)
c(24) = Point(pl.x + 1, pl.y + 1)
c(25) = Point(pl.x - 1, pl.y - 1)
c(26) = Point(pl.x - 1, pl.y + 1)
c(27) = Point(pl.x + 1, pl.y - 1)
c(28) = Point(pl.x - 2, pl.y)
fl2 = 0
For fl = 20 To 27 Step 1
If c(fl) = c(0) Then fl2 = 1
Next fl
movepermit = 0
While movepermit = 0
If c(19) = c(1) And c(28) = c(1) And fl2 > 0 Then
movepermit = 1
Else
pl.x = pl.x - 2
c(19) = Point(pl.x, pl.y)
c(20) = Point(pl.x + 1, pl.y)
c(21) = Point(pl.x - 1, pl.y)
c(22) = Point(pl.x, pl.y + 1)
c(23) = Point(pl.x, pl.y - 1)
c(24) = Point(pl.x + 1, pl.y + 1)
c(25) = Point(pl.x - 1, pl.y - 1)
c(26) = Point(pl.x - 1, pl.y + 1)
c(27) = Point(pl.x + 1, pl.y - 1)
fl2 = 0
For fl = 20 To 27 Step 1
If c(fl) = c(0) Then fl2 = 1
Next fl
If c(19) = c(1) And fl2 > 0 Then
movepermit = 1
Else
pl.x = pl.x - 2
movepermit = -1
End If
End If
Wend
End Select
End Sub
Sub fastdrawmove
Select Case pmove
Case 1
pl.y = pl.y - 4
If pl.y < scyb Then pl.y = scyb
c(19) = Point(pl.x, pl.y)
c(18) = Point(pl.x, pl.y + 2)
movepermit = 0
While movepermit = 0
If c(19) = c(0) Or c(19) = c(1) Then
If c(18) = c(0) Then
movepermit = 1
Else
pl.y = pl.y + 4
movepermit = -1
End If
Else
pl.y = pl.y + 2
If c(19) = c(0) Or c(19) = c(1) Then
movepermit = 1
Else
pl.y = pl.y + 2
movepermit = -1
End If
End If
Wend
Case 2
pl.y = pl.y + 4
If pl.y > scyb + sch Then pl.y = scyb + sch
c(19) = Point(pl.x, pl.y)
c(18) = Point(pl.x, pl.y - 2)
movepermit = 0
While movepermit = 0
If c(19) = c(0) Or c(19) = c(1) Then
If c(18) = c(0) Then
movepermit = 1
Else
pl.y = pl.y - 4
movepermit = -1
End If
Else
pl.y = pl.y - 2
If c(19) = c(0) Or c(19) = c(1) Then
movepermit = 1
Else
pl.y = pl.y - 2
movepermit = -1
End If
End If
Wend
Case 3
pl.x = pl.x - 4
If pl.x < scxb Then pl.x = scxb
c(19) = Point(pl.x, pl.y)
c(18) = Point(pl.x + 2, pl.y)
movepermit = 0
While movepermit = 0
If c(19) = c(0) Or c(19) = c(1) Then
If c(18) = c(0) Then
movepermit = 1
Else
pl.x = pl.x + 4
movepermit = -1
End If
Else
pl.x = pl.x + 2
If c(19) = c(0) Or c(19) = c(1) Then
movepermit = 1
Else
pl.x = pl.x + 2
movepermit = -1
End If
End If
Wend
Case 4
pl.x = pl.x + 4
If pl.x > scxb + scw Then pl.x = scxb + scw
c(19) = Point(pl.x, pl.y)
c(18) = Point(pl.x - 2, pl.y)
movepermit = 0
While movepermit = 0
If c(19) = c(0) Or c(19) = c(1) Then
If c(18) = c(0) Then
movepermit = 1
Else
pl.x = pl.x - 4
movepermit = -1
End If
Else
pl.x = pl.x - 2
If c(19) = c(0) Or c(19) = c(1) Then
movepermit = 1
Else
pl.x = pl.x - 2
movepermit = -1
End If
End If
Wend
End Select
c(19) = Point(pl.x, pl.y)
If c(19) = c(0) Then
Cls
_PutImage (0, 0)-(scx - 1, scy - 1), bg&, 0 'draw background screen
If fdinprocess = 0 Then
drawoldx = oldpx: drawoldy = oldpy
_PutImage (0, 0)-(scx, scy), 0, dbg&, (1, 1)-(scx - 1, scy - 1) 'take snapshot of screen - in case of death
End If
Line (oldpx, oldpy)-(pl.x, pl.y), c(44)
If fdinprocess = 0 Then
PSet (oldpx, oldpy), c(1)
End If
fdinprocess = 1
_PutImage (0, 0)-(scx, scy), 0, bg&, (1, 1)-(scx - 1, scy - 1) 'take snapshot of screen
End If
If fdinprocess = 1 Then
c(19) = Point(pl.x, pl.y)
If c(19) = c(1) Then 'fast draw completed
'Sound 300, 1
Cls
_PutImage (0, 0)-(scx - 1, scy - 1), bg&, 0 'draw background screen
Line (oldpx, oldpy)-(pl.x, pl.y), c(44)
PSet (pl.x, pl.y), c(1)
fdinprocess = -1
claimlinefast
claimfillfast
_PutImage (0, 0)-(scx, scy), 0, bg&, (1, 1)-(scx - 1, scy - 1) 'take snapshot of screen
End If
End If
End Sub
Sub slowdrawmove
Select Case pmove
Case 1
pl.y = pl.y - 4
If pl.y < scyb Then pl.y = scyb
c(19) = Point(pl.x, pl.y)
c(18) = Point(pl.x, pl.y + 2)
movepermit = 0
While movepermit = 0
If c(19) = c(0) Or c(19) = c(1) Then
If c(18) = c(0) Then
movepermit = 1
Else
pl.y = pl.y + 4
movepermit = -1
End If
Else
pl.y = pl.y + 2
If c(19) = c(0) Or c(19) = c(1) Then
movepermit = 1
Else
pl.y = pl.y + 2
movepermit = -1
End If
End If
Wend
Case 2
pl.y = pl.y + 4
If pl.y > scyb + sch Then pl.y = scyb + sch
c(19) = Point(pl.x, pl.y)
c(18) = Point(pl.x, pl.y - 2)
movepermit = 0
While movepermit = 0
If c(19) = c(0) Or c(19) = c(1) Then
If c(18) = c(0) Then
movepermit = 1
Else
pl.y = pl.y - 4
movepermit = -1
End If
Else
pl.y = pl.y - 2
If c(19) = c(0) Or c(19) = c(1) Then
movepermit = 1
Else
pl.y = pl.y - 2
movepermit = -1
End If
End If
Wend
Case 3
pl.x = pl.x - 4
If pl.x < scxb Then pl.x = scxb
c(19) = Point(pl.x, pl.y)
c(18) = Point(pl.x + 2, pl.y)
movepermit = 0
While movepermit = 0
If c(19) = c(0) Or c(19) = c(1) Then
If c(18) = c(0) Then
movepermit = 1
Else
pl.x = pl.x + 4
movepermit = -1
End If
Else
pl.x = pl.x + 2
If c(19) = c(0) Or c(19) = c(1) Then
movepermit = 1
Else
pl.x = pl.x + 2
movepermit = -1
End If
End If
Wend
Case 4
pl.x = pl.x + 4
If pl.x > scxb + scw Then pl.x = scxb + scw
c(19) = Point(pl.x, pl.y)
c(18) = Point(pl.x - 2, pl.y)
movepermit = 0
While movepermit = 0
If c(19) = c(0) Or c(19) = c(1) Then
If c(18) = c(0) Then
movepermit = 1
Else
pl.x = pl.x - 4
movepermit = -1
End If
Else
pl.x = pl.x - 2
If c(19) = c(0) Or c(19) = c(1) Then
movepermit = 1
Else
pl.x = pl.x - 2
movepermit = -1
End If
End If
Wend
End Select
c(19) = Point(pl.x, pl.y)
If c(19) = c(0) Then
Cls
_PutImage (0, 0)-(scx - 1, scy - 1), bg&, 0 'draw background screen
If sdinprocess = 0 Then
drawoldx = oldpx: drawoldy = oldpy
_PutImage (0, 0)-(scx, scy), 0, dbg&, (1, 1)-(scx - 1, scy - 1) 'take snapshot of screen
End If
Line (oldpx, oldpy)-(pl.x, pl.y), c(45)
If sdinprocess = 0 Then
PSet (oldpx, oldpy), c(1)
End If
sdinprocess = 1
_PutImage (0, 0)-(scx, scy), 0, bg&, (1, 1)-(scx - 1, scy - 1) 'take snapshot of screen
End If
If sdinprocess = 1 Then
c(19) = Point(pl.x, pl.y)
If c(19) = c(1) Then 'slow draw completed
'Sound 200, 1
Cls
_PutImage (0, 0)-(scx - 1, scy - 1), bg&, 0 'draw background screen
Line (oldpx, oldpy)-(pl.x, pl.y), c(45)
PSet (pl.x, pl.y), c(1)
sdinprocess = -1
claimlineslow
claimfillslow
_PutImage (0, 0)-(scx, scy), 0, bg&, (1, 1)-(scx - 1, scy - 1) 'take snapshot of screen
End If
End If
End Sub
Sub claimlinefast
'scan board for blue line
For j = scyb2 To scyb3
For k = scxb2 To scxb3
c(19) = Point(k, j)
n = 0
If c(19) = c(44) Then 'blue pixel found
c(20) = Point(k - 1, j)
c(21) = Point(k + 1, j)
c(22) = Point(k, j - 1)
c(23) = Point(k, j + 1)
c(24) = Point(k, j + 2)
c(25) = Point(k, j - 2)
c(26) = Point(k + 2, j)
'horizontal line
If c(22) = c(0) Then 'look above
If c(23) = c(0) Then n = Int(2) 'look below
End If
'upper left corner
If n = 0 Then
'look below 2 pixels
If c(23) = c(44) Then
If c(24) = c(44) Then
If c(20) = c(0) Then
n = Int(2)
End If
End If
End If
End If
'upper right corner
If n = 0 Then
'look below 2 pixels
If c(23) = c(44) Then
If c(24) = c(44) Then
If c(21) = c(0) Then
n = Int(2)
End If
End If
End If
End If
'lower left corner
If n = 0 Then
'look to the right 2 pixels
If c(21) = c(44) Then
If c(26) = c(44) Then
If c(23) = c(0) Then
n = Int(2)
End If
End If
End If
End If
'lower right corner
If n = 0 Then
'look above 2 pixels
If c(22) = c(1) Then
If c(25) = c(1) Then
If c(23) = c(0) Then
n = Int(2)
End If
End If
End If
End If
'if part of vertical line
If c(20) = c(0) Then
If c(21) = c(0) Then n = Int(2)
End If
If n = 2 Then
PSet (k, j), c(1) 'change blue pixel to white
End If
End If
Next k
Next j
End Sub
Sub claimlineslow
'scan board for red line
For j = scyb2 To scyb3
For k = scxb2 To scxb3
c(19) = Point(k, j)
n = 0
If c(19) = c(45) Then 'red pixel found
c(20) = Point(k - 1, j)
c(21) = Point(k + 1, j)
c(22) = Point(k, j - 1)
c(23) = Point(k, j + 1)
c(24) = Point(k, j + 2)
c(25) = Point(k, j - 2)
c(26) = Point(k + 2, j)
'horizontal line
If c(22) = c(0) Then 'look above
If c(23) = c(0) Then n = Int(2) 'look below
End If
'upper left corner
If n = 0 Then
'look below 2 pixels
If c(23) = c(45) Then
If c(24) = c(45) Then
If c(20) = c(0) Then
n = Int(2)
End If
End If
End If
End If
'upper right corner
If n = 0 Then
'look below 2 pixels
If c(23) = c(45) Then
If c(24) = c(45) Then
If c(21) = c(0) Then
n = Int(2)
End If
End If
End If
End If
'if lower left corner
If n = 0 Then
'look to the right 2 pixels
If c(21) = c(45) Then
If c(26) = c(45) Then
If c(23) = c(0) Then
n = Int(2)
End If
End If
End If
End If
'if lower right corner
If n = 0 Then
'look above 2 pixels
If c(22) = c(1) Then
If c(25) = c(1) Then
If c(23) = c(0) Then
n = Int(2)
End If
End If
End If
End If
'if part of vertical line
If c(20) = c(0) Then
If c(21) = c(0) Then n = Int(2)
End If
If n = 2 Then
PSet (k, j), c(1) 'change red pixel to white
End If
End If
Next k
Next j
End Sub
Sub claimfillfast 'using paint for flood fills
'start at qix
c(14) = _RGB(30, 30, 30)
k = q(1).xx: j = q(1).yy
Paint (k, j), c(14), c(1)
'fill black with blue
For j = scyb2 To scyb3
For k = scxb2 To scxb3
c(16) = Point(k, j)
If c(16) = c(0) Then
PSet (k, j), c(4)
bluetot = bluetot + 1
End If
Next k
Next j
'fill gray with black
k = q(1).xx: j = q(1).yy
Paint (k, j), c(0), c(1)
End Sub
Sub claimfillslow 'using paint for flood fills
'start at qix
c(14) = _RGB(30, 30, 30)
k = q(1).xx: j = q(1).yy
Paint (k, j), c(14), c(1)
'fill black with red
For j = scyb2 To scyb3
For k = scxb2 To scxb3
c(16) = Point(k, j)
If c(16) = c(0) Then
PSet (k, j), c(5)
redtot = redtot + 1
End If
Next k
Next j
'fill gray with black
k = q(1).xx: j = q(1).yy
Paint (k, j), c(0), c(1)
End Sub
Sub qixmoves
If qpath < 1 Then
If qpath = 0 Then
'_Delay 1.
qpath = Int(Rnd * 11) + 1
qxv = Rnd * (2 * pl.skill + 2) - ((2 * pl.skill + 2) / 2)
qyv = Rnd * (2 * pl.skill + 2) - ((2 * pl.skill + 2) / 2)
olddir = q(1).dir: q(1).dir = olddir + Rnd * PI - PI / 2
End If
If qpath = -1 Then 'after a collision with a wall
qpath = (Rnd * 22) + 1
qxv = Rnd * (2 * pl.skill + 2) - ((2 * pl.skill + 2) / 2)
qyv = Rnd * (2 * pl.skill + 2) - ((2 * pl.skill + 2) / 2)
olddir = q(1).dir
If olddir > PI Then
q(1).dir = olddir - PI
Else
q(1).dir = olddir + PI
End If
End If
End If
qpath = Int(qpath - 1)
'update trailing lines -----------------------------------------------------
For t = 7 To 2 Step -1
q(t).xx = q(t - 1).xx: q(t).yy = q(t - 1).yy
q(t).x1 = q(t - 1).x1: q(t).x2 = q(t - 1).x2
q(t).y1 = q(t - 1).y1: q(t).y2 = q(t - 1).y2
q(t).len1 = q(t - 1).len1
q(t).c1 = q(t - 1).c1: q(t).c2 = q(t - 1).c2: q(t).c3 = q(t - 1).c3
Next t
'collision detection -------------------------------------------------------
If flag > 1 Then
levelstart = 41 'for newlife sub
End If
flag = 0 'collision - assume none to start
q(1).xx = q(1).xx + qxv
q(1).yy = q(1).yy + qyv
q(1).dir = q(1).dir + Rnd * .9 - .45
q(1).len1 = q(1).len1 + Rnd * 10 - 4.4
If q(1).len1 > 33 Then q(1).len1 = 33
If q(1).len1 < 5 Then q(1).len1 = 5
x = Cos(q(1).dir) * q(1).len1
y = Sin(q(1).dir) * q(1).len1
q(1).x1 = q(1).xx + x: q(1).x2 = q(1).xx - x
q(1).y1 = q(1).yy - y: q(1).y2 = q(1).yy + y
'scan background colour along line
For j = 0 To q(1).len1
x = Cos(q(1).dir) * j: y = Sin(q(1).dir) * j
checkx1 = q(1).xx + x: checkx2 = q(1).xx - x
checky1 = q(1).yy - y: checky2 = q(1).yy + y
c(19) = Point(checkx1, checky1)
c(20) = Point(checkx2, checky2)
If c(19) <> c(0) Then
Select Case c(19)
Case c(1)
flag = 1
Case q(2).c1, q(3).c1, q(4).c1, q(5).c1, q(6).c1, q(7).c1
flag = 1
Case c(44), c(7)
If fdinprocess = 1 Then
flag = 2
End If
Case c(45), c(7)
If sdinprocess = 1 Then
flag = 2
End If
End Select
End If
If c(20) <> c(0) Then
Select Case c(20)
Case c(1)
flag = 1
Case q(2).c1, q(3).c1, q(4).c1, q(5).c1, q(6).c1, q(7).c1
flag = 1
Case c(44), c(7)
If fdinprocess = 1 Then
flag = 2
End If
Case c(45), c(7)
If sdinprocess = 1 Then
flag = 2
End If
End Select
End If
Next j
'check for skipped/crossed line
h = _Hypot(qyv, qxv)
hd = _Atan2(-qxv, -qyv)
For j = 0 To Int(h) Step .5
x = Sin(-hd) * j: y = Cos(hd) * j
checkx2 = q(1).xx - x
checky2 = q(1).yy + y
c(20) = Point(checkx2, checky2)
If c(20) <> c(0) Then
Select Case c(20)
Case c(1)
flag = 1
Case q(2).c1, q(3).c1, q(4).c1, q(5).c1, q(6).c1, q(7).c1
flag = 1
Case c(4), c(7)
If fdinprocess = 1 Then
flag = 2
End If
Case c(5), c(7)
If sdinprocess = 1 Then
flag = 2
End If
End Select
End If
Next j
'changing colour
q(1).c1 = q(1).c1 + Rnd * 60 - 30
If q(1).c1 < 80 Then q(1).c1 = 80
If q(1).c1 > 255 Then q(1).c1 = 255
q(1).c2 = q(1).c2 + Rnd * 60 - 30
If q(1).c2 < 80 Then q(1).c2 = 80
If q(1).c2 > 255 Then q(1).c2 = 255
q(1).c3 = q(1).c3 + Rnd * 60 - 30
If q(1).c3 < 80 Then q(1).c3 = 80
If q(1).c3 > 255 Then q(1).c3 = 255
'if collision detected...
If flag = 1 Then
qpath = -1 'new path needed - reverse direction
q(1).xx = q(3).xx: q(1).yy = q(3).yy
q(1).x1 = q(3).x1: q(1).x2 = q(3).x2
q(1).y1 = q(3).y1: q(1).y2 = q(3).y2
q(1).len1 = q(3).len1 - 3 'shorter line
End If
If flag = 2 Then 'qix collided with drawing line or player cursor
youdead
spx(1).x = 1: spx(1).y = 1
pl.lives = pl.lives - 1
_PutImage (0, 0)-(scx, scy), dbg&, bg&, (1, 1)-(scx - 1, scy - 1)
End If
End Sub
Sub sparkmoves
'Sparks ---------------------------------------------------------
If sdinprocess = 1 Or fdinprocess = 1 Then
_PutImage (0, 0)-(scx - 1, scy - 1), dbg&, 0 'draw background
End If
If levelstart < -100 Then
If levelstart > -102 Then
spx(1).x = scxb + scw / 2: spx(1).y = scyb
End If
'=========== which way? =============
'check surroundings
c(16) = Point(spx(1).x + 4, spx(1).y)
c(17) = Point(spx(1).x, spx(1).y + 4)
c(18) = Point(spx(1).x - 4, spx(1).y)
c(19) = Point(spx(1).x, spx(1).y - 4)
c(20) = Point(spx(1).x + 4, spx(1).y - 4)
c(21) = Point(spx(1).x + 4, spx(1).y + 4)
c(22) = Point(spx(1).x - 4, spx(1).y + 4)
c(23) = Point(spx(1).x - 4, spx(1).y - 4)
c(24) = Point(spx(1).x + 2, spx(1).y - 2)
c(25) = Point(spx(1).x + 2, spx(1).y + 2)
c(26) = Point(spx(1).x - 2, spx(1).y + 2)
c(27) = Point(spx(1).x - 2, spx(1).y - 2)
mp = 0
If c(16) = c(1) Then 'move east
If c(20) <> c(0) And c(21) = c(0) And c(22) <> c(0) And c(23) <> c(0) Then
spx(1).x = spx(1).x + 4: mp = 1: mp2 = 1
End If
If c(20) <> c(0) And c(21) = c(0) And c(22) = c(0) And c(23) = c(0) Then
spx(1).x = spx(1).x + 4: mp = 2: mp2 = 1
End If
If c(20) <> c(0) And c(21) = c(0) And c(22) = c(0) And c(23) <> c(0) Then
spx(1).x = spx(1).x + 4: mp = 3: mp2 = 1
End If
If c(20) <> c(0) And c(21) = c(1) And c(22) = c(0) And c(23) <> c(0) Then
spx(1).x = spx(1).x + 4: mp = 4: mp2 = 1
End If
End If
If c(17) = c(1) Then 'move south
If c(20) <> c(0) And c(21) <> c(0) And c(22) = c(0) And c(23) <> c(0) Then
spx(1).y = spx(1).y + 4: mp = 11: mp2 = 2
End If
If c(20) = c(0) And c(21) <> c(0) And c(22) = c(0) And c(23) = c(0) Then
spx(1).y = spx(1).y + 4: mp = 12: mp2 = 2
End If
If c(20) <> c(0) And c(21) <> c(0) And c(22) = c(0) And c(23) = c(0) Then
spx(1).y = spx(1).y + 4: mp = 13: mp2 = 2
End If
If c(20) <> c(0) And c(21) <> c(0) And c(22) = c(1) And c(23) = c(0) Then
spx(1).y = spx(1).y + 4: mp = 14: mp2 = 2
End If
End If
If c(18) = c(1) Then 'move west
If c(20) <> c(0) And c(21) <> c(0) And c(22) <> c(0) And c(23) = c(0) Then
spx(1).x = spx(1).x - 4: mp = 21: mp2 = 3
End If
If c(20) = c(0) And c(21) = c(0) And c(22) <> c(0) And c(23) = c(0) Then
spx(1).x = spx(1).x - 4: mp = 22: mp2 = 3
End If
If c(20) = c(0) And c(21) <> c(0) And c(22) <> c(0) And c(23) = c(0) And c(27) = c(0) Then
spx(1).x = spx(1).x - 4: mp = 23: mp2 = 3
End If
If c(20) = c(0) And c(21) <> c(0) And c(22) <> c(0) And c(23) = c(1) Then
spx(1).x = spx(1).x - 4: mp = 24: mp2 = 3
End If
End If
If c(19) = c(1) Then 'move north
If c(20) = c(0) And c(21) <> c(0) And c(22) <> c(0) And c(23) <> c(0) Then
spx(1).y = spx(1).y - 4: mp = 31: mp2 = 4
End If
If c(20) = c(0) And c(21) = c(0) And c(22) = c(0) And c(23) <> c(0) Then
spx(1).y = spx(1).y - 4: mp = 32: mp2 = 4
End If
If c(20) = c(0) And c(21) = c(0) And c(22) <> c(0) And c(23) <> c(0) Then
spx(1).y = spx(1).y - 4: mp = 33: mp2 = 4
End If
If c(20) = c(1) And c(21) = c(0) And c(22) <> c(0) And c(23) <> c(0) Then
spx(1).y = spx(1).y - 4: mp = 34: mp2 = 4
End If
If c(20) = c(0) And c(21) <> c(0) And c(22) <> c(0) And c(27) <> c(0) Then
spx(1).y = spx(1).y - 4: mp = 34: mp2 = 4
End If
End If
If mp = 0 Then
Select Case mp2
Case 1
If c(16) = c(1) Then
spx(1).x = spx(1).x + 4
Else
spx(1).y = spx(1).y + 4
mp2 = 2
End If
Case 2
If c(17) = c(1) Then
spx(1).y = spx(1).y + 4
Else
spx(1).x = spx(1).x - 4
mp2 = 3
End If
Case 3
If c(18) = c(1) Then
spx(1).x = spx(1).x - 4
Else
spx(1).y = spx(1).y - 4
mp2 = 4
End If
Case 4
If c(19) = c(1) Then
spx(1).y = spx(1).y - 4
Else
spx(1).x = spx(1).x + 4
mp2 = 1
End If
End Select
End If
End If
If spx(1).x = pl.x Then
If spx(1).y = pl.y Then 'spark collided with drawing line or player cursor
spx(1).x = 1: spx(1).y = 1
pl.lives = pl.lives - 1
drawoldx = pl.x
drawoldy = pl.y
youdead
flag = 2
End If
End If
End Sub
Sub endlevel
Dim bonus1
'fill black
For j = scxb2 To scxb3
For k = scyb3 To scyb2 Step -1
PSet (j, k), c(0)
Next k
_Display
_Delay .005
Next j
spx(1).x = 1: spx(1).y = 1
'calculate and display bonus points
Locate 12, 10
Print "Level"; levelno; "Complete"
Locate 16, 19
Print Using "##%"; btot
Locate 20, 19
Print Using "##%"; rtot
Line (scxb + 170, scyb + 110)-(scxb + 200, scyb + 140), c(1), B
Paint (scxb + 180, scyb + 120), c(4), c(1)
Line (scxb + 170, scyb + 175)-(scxb + 200, scyb + 205), c(1), B
Paint (scxb + 180, scyb + 185), c(5), c(1)
bonus1 = totpct - 75
If bonus1 < 1 Then bonus1 = 0
If bonus1 > 0 Then
bonus1 = Int(bonus1 * bonus1)
bonus1 = Int(bonus1 * 100)
bonus1 = Int(bonus1 * levelno)
End If
Locate 24, 10
Print "Bonus ="; bonus1
pl.points = pl.points + bonus1
_Display
Sleep
End Sub
Sub youdead 'animation of white lines
Dim ct2, ct3, ct4, basedir, dist, d2, rp
basedir = .785
dist = 10
d2 = 10
qd(1).xx = pl.x + 5: qd(1).yy = pl.y - 5
qd(1).len1 = 3
qd(1).dir = basedir
For ct = 1 To 35
Cls
_PutImage (0, 0)-(scx - 1, scy - 1), bg&, 0 'draw background screen
dist = dist + 10
rp = ct
If rp > 7 Then rp = 7
qd(1).dir = basedir
qd(1).len1 = qd(1).len1 + 1.5
If rp > 1 Then
For ct4 = 2 To rp
qd(ct4).len1 = qd(ct4 - 1).len1 - 1.5
qd(ct4).dir = basedir
Next ct4
End If
For ct2 = 1 To rp
For ct3 = 1 To 4
Select Case ct3
Case 1
qd(ct2).xx = pl.x + (dist - ct2 * d2): qd(ct2).yy = pl.y - (dist - ct2 * d2)
Case 2
qd(ct2).xx = pl.x + (dist - ct2 * d2): qd(ct2).yy = pl.y + (dist - ct2 * d2)
Case 3
qd(ct2).xx = pl.x - (dist - ct2 * d2): qd(ct2).yy = pl.y + (dist - ct2 * d2)
Case 4
qd(ct2).xx = pl.x - (dist - ct2 * d2): qd(ct2).yy = pl.y - (dist - ct2 * d2)
End Select
qd(ct2).dir = qd(ct2).dir + (PI / 2)
x = Cos(qd(ct2).dir) * qd(ct2).len1
y = Sin(qd(ct2).dir) * qd(ct2).len1
qd(ct2).x1 = qd(ct2).xx + x: qd(ct2).x2 = qd(ct2).xx - x
qd(ct2).y1 = qd(ct2).yy - y: qd(ct2).y2 = qd(ct2).yy + y
Line (qd(ct2).x1, qd(ct2).y1)-(qd(ct2).x2, qd(ct2).y2), c(1)
Next ct3
Next ct2
_Display
_Delay .04
Next ct
_Delay 1.
sdinprocess = 0
fdinprocess = 0
pl.x = drawoldx: pl.y = drawoldy
End Sub
Sub newlife 'animation of white lines
If levelstart > 34 Then
newlifeset
End If
ct = levelstart
dist = dist - 10
rp = ct
If rp > 7 Then rp = 7
qd(1).dir = basedir
qd(1).len1 = qd(1).len1 - 1.5
If rp > 1 Then
For ct4 = 2 To rp
qd(ct4).len1 = qd(ct4 - 1).len1 - 1.5
qd(ct4).dir = basedir
Next ct4
End If
For ct2 = 1 To rp
For ct3 = 1 To 4
Select Case ct3
Case 1
qd(ct2).xx = pl.x + (dist - ct2 * d2): qd(ct2).yy = pl.y - (dist - ct2 * d2)
Case 2
qd(ct2).xx = pl.x + (dist - ct2 * d2): qd(ct2).yy = pl.y + (dist - ct2 * d2)
Case 3
qd(ct2).xx = pl.x - (dist - ct2 * d2): qd(ct2).yy = pl.y + (dist - ct2 * d2)
Case 4
qd(ct2).xx = pl.x - (dist - ct2 * d2): qd(ct2).yy = pl.y - (dist - ct2 * d2)
End Select
qd(ct2).dir = qd(ct2).dir + (PI / 2)
x = Cos(qd(ct2).dir) * qd(ct2).len1
y = Sin(qd(ct2).dir) * qd(ct2).len1
qd(ct2).x1 = qd(ct2).xx + x: qd(ct2).x2 = qd(ct2).xx - x
qd(ct2).y1 = qd(ct2).yy - y: qd(ct2).y2 = qd(ct2).yy + y
Line (qd(ct2).x1, qd(ct2).y1)-(qd(ct2).x2, qd(ct2).y2), c(1)
Next ct3
Next ct2
End Sub
Sub newlifeset
basedir = .785
dist = 370
d2 = 10
qd(1).xx = pl.x + 300: qd(1).yy = pl.y - 300
qd(1).len1 = 57
qd(1).dir = basedir
End Sub
Sub colour1
c(0) = _RGB(0, 0, 0)
c(1) = _RGB(200, 200, 210) 'outside border
c(2) = _RGB(255, 255, 255) 'cursor white dot
c(3) = _RGB(200, 200, 0) 'yellow
c(4) = _RGB(50, 120, 150) 'fast zone (fill)
c(5) = _RGB(180, 60, 30) 'slow zone (fill)
c(6) = _RGB(30, 30, 30) 'screen border
c(7) = _RGB(255, 0, 0) 'cursor red
c(44) = _RGB(50, 120, 155) 'fast zone (drawing lines)
c(45) = _RGB(185, 60, 30) 'slow zone (drawing lines)
c(71) = _RGB(250, 250, 250) 'white
c(72) = _RGB(250, 250, 0) 'yellow
c(73) = _RGB(200, 0, 0) 'red
c(74) = _RGB(250, 150, 0) 'red
c(75) = _RGB(150, 150, 0) 'orange
End Sub
Sub createsparks 'create spark images with clear background
Dim c1, t1, tx1, ty1, d$(4), ct1
d$(1) = "bdfghgfhgeddfdcgcdeahfhj112332451425"
d$(2) = "fddahedcbhfgjeceehfjgfeb533541234512"
d$(3) = "bchjcdefjfeghedcbhgeghac543241234521"
d$(4) = "ceejchgedfghedfhcfeiegda212432123134"
Cls
For ct1 = 1 To 4
Cls
For t1 = 1 To 12
tx1 = Asc(Mid$(d$(ct1), t1, 1)) - 96
ty1 = Asc(Mid$(d$(ct1), t1 + 12, 1)) - 96
c1 = Val(Mid$(d$(ct1), t1 + 24, 1))
PSet (tx1, ty1), c(70 + c1)
Next t1
_PutImage (0, 0)-(12, 12), 0, spark&(ct1), (0, 0)-(12, 12)
_ClearColor c(0), spark&(ct1)
Next ct1
End Sub
Sub createcursors 'create 3x cursors image with clear background
Cls
Line (5, 25)-(10, 20), c(7)
Line (10, 20)-(15, 25), c(7)
Line (15, 25)-(10, 30), c(7)
Line (10, 30)-(5, 25), c(7)
Line (5, 50)-(10, 45), c(7)
Line (10, 45)-(15, 50), c(7)
Line (15, 50)-(10, 55), c(7)
Line (10, 55)-(5, 50), c(7)
Line (5, 75)-(10, 70), c(2)
Line (10, 70)-(15, 75), c(2)
Line (15, 75)-(10, 80), c(2)
Line (10, 80)-(5, 75), c(2)
_PutImage (0, 0)-(20, 100), 0, cursor&(1), (0, 0)-(20, 100)
_ClearColor c(0), cursor&(1)
Cls
Line (5, 25)-(10, 20), c(7)
Line (10, 20)-(15, 25), c(7)
Line (15, 25)-(10, 30), c(7)
Line (10, 30)-(5, 25), c(7)
Line (5, 50)-(10, 45), c(2)
Line (10, 45)-(15, 50), c(2)
Line (15, 50)-(10, 55), c(2)
Line (10, 55)-(5, 50), c(2)
Line (5, 75)-(10, 70), c(7)
Line (10, 70)-(15, 75), c(7)
Line (15, 75)-(10, 80), c(7)
Line (10, 80)-(5, 75), c(7)
_PutImage (0, 0)-(20, 100), 0, cursor&(2), (0, 0)-(20, 100)
_ClearColor c(0), cursor&(2)
Cls
Line (5, 25)-(10, 20), c(2)
Line (10, 20)-(15, 25), c(2)
Line (15, 25)-(10, 30), c(2)
Line (10, 30)-(5, 25), c(2)
Line (5, 50)-(10, 45), c(7)
Line (10, 45)-(15, 50), c(7)
Line (15, 50)-(10, 55), c(7)
Line (10, 55)-(5, 50), c(7)
Line (5, 75)-(10, 70), c(7)
Line (10, 70)-(15, 75), c(7)
Line (15, 75)-(10, 80), c(7)
Line (10, 80)-(5, 75), c(7)
_PutImage (0, 0)-(20, 100), 0, cursor&(3), (0, 0)-(20, 100)
_ClearColor c(0), cursor&(3)
End Sub
Sub qixtitle 'create Qix title image
Dim x1
Cls
Line (10, 10)-(75, 80), c(1), BF
Line (95, 10)-(120, 80), c(1), BF
Line (135, 10)-(160, 80), c(1), BF
Line (195, 10)-(202, 80), c(1), BF
Line (211, 10)-(215, 80), c(1), BF
Line (225, 10)-(228, 80), c(1), BF
Line (237, 10)-(239, 80), c(1), BF
Line (35, 20)-(65, 70), c(0), BF
For x1 = 1 To 6 Step .5
Line (10 + x1, 9)-(x1, 19), c(0)
Next x1
For x1 = 1 To 6 Step .5
Line (10 + x1, 81)-(x1, 71), c(0)
Next x1
For x1 = 1 To 6 Step .5
Line (75 - x1, 9)-(85 - x1, 19), c(0)
Next x1
For x1 = 1 To 6 Step .5
Line (75 - x1, 81)-(85 - x1, 71), c(0)
Next x1
Line (46, 64)-(56, 64), c(1)
Line (46, 64)-(72, 93), c(1)
Line (56, 64)-(75, 85), c(1)
Paint (51, 66), c(1)
Line (75, 85)-(239, 85), c(1)
Line (72, 93)-(239, 93), c(1)
Line (240, 85)-(239, 93), c(1)
Paint (237, 90), c(1)
Line (160, 41)-(195, 49), c(1), BF
For x1 = 1 To 10 Step .5
Line (134 + x1, 55 - x1)-(134 + x1, 35 + x1), c(0)
Next x1
For x1 = 1 To 10 Step .5
Line (160 + x1, 55 - x1)-(160 + x1, 35 + x1), c(1)
Next x1
For x1 = 1 To 10 Step .5
Line (185 + x1, 44 + x1)-(185 + x1, 46 - x1), c(1)
Next x1
For x1 = 1 To 10 Step .5
Line (196 + x1, 44 + x1)-(196 + x1, 46 - x1), c(0)
Next x1
For x1 = 1 To 8 Step .5
Line (203 + x1, 43 + x1)-(203 + x1, 45 - x1), c(1)
Next x1
For x1 = 1 To 8 Step .5
Line (210 + x1, 43 + x1)-(210 + x1, 45 - x1), c(0)
Next x1
For x1 = 1 To 8 Step .5
Line (217 + x1, 42 + x1)-(217 + x1, 44 - x1), c(1)
Next x1
For x1 = 1 To 8 Step .5
Line (223 + x1, 42 + x1)-(223 + x1, 44 - x1), c(0)
Next x1
For x1 = 1 To 8 Step .5
Line (230 + x1, 41 + x1)-(230 + x1, 43 - x1), c(1)
Next x1
For x1 = 1 To 8 Step .5
Line (234 + x1, 41 + x1)-(234 + x1, 43 - x1), c(0)
Next x1
_PutImage (0, 0)-(250, 100), 0, title&, (0, 0)-(250, 100)
_ClearColor c(0), title&
End Sub