forked from smallbasic/smallbasic.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path110.bas
More file actions
56 lines (48 loc) · 865 Bytes
/
Copy path110.bas
File metadata and controls
56 lines (48 loc) · 865 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
'''How to display seld defined symbols
''with ZOOM
''for SmallBasic
''(c) 02.11.2004 by Carsten
''Contact: smallbasic homepage
''
CLS
?"Demo for displaying self-defined symbols"
i=xmax/2:dx=5
never=0:ever=1
repeat
showsymbol i,99,3
showsymbol i,49,2
delay 12
clear i,99,3
clear i,49,2
i=i+dx
if i>xmax then dx=(0-dx)
if i<0 then dx=abs(dx)
until never=ever
end
sub showsymbol(sx,sy,zoom)
local i,j
restore Symbol
if zoom=0 then zoom=1
for j=0 to 7
for i=0 to 7
read w
if w>0 then rect sx+(i*zoom),sy+(j*zoom),sx+((i+1)*zoom),sy+((j+1)*zoom),0 filled
next j
next i
end
sub clear(sx,sy,zoom)
local bz
if zoom=0 then zoom=1
bz=zoom*8
rect sx,sy,sx+bz,sy+bz,15 filled
end
label Symbol
data 0,0,1,1,1,1,0,0
data 0,1,1,1,1,1,1,0
data 0,1,1,0,1,0,1,0
data 0,1,1,1,1,1,1,0
data 0,1,0,1,1,0,1,0
data 0,1,1,0,0,1,1,0
data 0,1,1,1,1,1,1,0
data 0,1,0,1,0,1,1,0
'