REM vector scroller v.2
REM iPhone 6 plus / 8.3 b1
REM .2 - added scrollspeed and borders
'touch up or down to adjust the size
'touch left or right to adjust the width
'sorry for the messy code. I was in a rush!
'enjoy...
'I need help with the touch screen commands.
graphics
a$="^^THE^QUICK^BROWN^FOX^JUMPS^OVER^THE^LAZY^DOG"
a$=a$&"^^the^quick^brown^fox^jumps^over^the^lazy^dog^^"
pi=3.1415
sw=Screen_Width()
sh=Screen_Height()
s=.45 'size
h=2.5 'height - is upside down!
w=0
m=sw
scrollspeed=5
ang=PI/360
GOSUB LoadFont
loop:
refresh off
graphics clear 0,0,0
GOSUB controlls
x=40*s
FOR a=1 TO LEN(a$)-1
IF x+m+(CharacterWidth*s)>-sw*2 AND x+m+(CharacterWidth*s)<sw THEN
char$=MID$(a$,a,1)
xx=(x+m)
yy=y
ss=s
GOSUB PrintCharacter
'fake function (MID$(a$,a,1), x+m, y,s)
ENDIF
IF m<-(LEN(a$)*40*s) THEN
m=sw
END IF
x=x+(CharacterWidth*s)
NEXT a
m=m-scrollspeed
GOSUB border
refresh on
GOTO loop
border:
fill COLOR 0,0,250/255
'top
fill RECT 0,0 to sw,20
'bottom
fill RECT 0,sh to sw,sh-20
'left
fill RECT 0,0 to 20,sh
'left
fill RECT sw-20,0 to sw,sh
RETURN
controlls:
IF Touch(0) = 1 THEN
IF TouchY(0) > sh/2 THEN
s=s+.01
END IF
IF TouchY(0) < sh/2 THEN
s=s-.01
END IF
IF TouchX(0) < sw/2 THEN
w=w-.01
END IF
IF TouchX(0) > sw/2 THEN
w=w+.01
END IF
IF w<0 THEN
w=0
END IF
END IF
'x=40*s
RETURN
LoadFont:
MAX_CHARACTERS = 256
DIM Start(501)
DIM Count(501)
DIM x1(501), y1(501),x2(501), y2(501)
READ NumCharacters
READ CharacterWidth
READ CharacterHeight
TotalLines = 1
FOR ch = 1 TO NumCharacters
READ Ascii$
READ NumLines
Ascii = ASC(Ascii$)
Start(Ascii) = TotalLines
Count(Ascii) = NumLines
FOR l = 1 TO NumLines
READ x1(TotalLines), y1(TotalLines ), x2(TotalLines), y2(TotalLines)
TotalLines = TotalLines + 1
NEXT l
NEXT ch
RETURN
PrintCharacter: '(char$, xx, yy, ss)
ch = ASC(MID$(char$,0,1))
FOR i=Start(ch) TO Start(ch)+Count(ch)-1
z=(y1(i)-yy)*w
z1=(y2(i)-yy)*w
y=SIN((xx+m)*ang)*200*s+300
draw COLOR xx/255,y/255,z/255
draw LINE xx+x1(i)*s-z, y+y1(i)*s*h to xx+x2(i)*s-z1, y+y2(i)*s*h
NEXT i
RETURN
DATA 69 'NumCharacters
DATA 40 'CharacterWidth
DATA 60 'CharacterHeight
DATA "A", 3
DATA -18, 00, 00,-40
DATA 00,-40, 18, 00
DATA -13,-11, 13,-11
DATA "B", 10
DATA -17, 00, -17,-40
DATA -17, 00, 07, 00
DATA -17,-20, 07,-20
DATA -17,-40, 07,-40
DATA 12,-35, 12,-25
DATA 12,-15, 12,-05
DATA 07,-40, 12,-35
DATA 07,-20, 12,-25
DATA 07,-20, 12,-15
DATA 07, 00, 12,-05
DATA "C", 7
DATA -15,-05, -15,-35
DATA -10, 00, 10, 00
DATA -10,-40, 10,-40
DATA -15,-35, -10,-40
DATA -15,-05, -10, 00
DATA 10,-40, 15,-35
DATA 10, 00, 15,-05
DATA "D", 6
DATA -15,-40, -15, 00
DATA -15,-40, 07,-40
DATA -15, 00, 07, 00
DATA 12,-35, 12,-05
DATA 07,-40, 12,-35
DATA 07, 00, 12,-05
DATA "E", 4
DATA -17, 00, -17,-40
DATA -17,-40, 15,-40
DATA -17, 00, 15, 00
DATA -17,-20, 12,-20
DATA "F", 3
DATA -17, 00, -17,-40
DATA -17,-40, 17,-40
DATA -17,-20, 10,-20
DATA "G", 10
DATA -17,-35, -17,-05
DATA -12,-40, 12,-40
DATA -12, 00, 12, 00
DATA 17,-05, 17,-20
DATA 17,-35, 17,-30
DATA 17,-20, 07,-20
DATA -17,-35, -12,-40
DATA -17,-05, -12, 00
DATA 12,-40, 17,-35
DATA 12, 00, 17,-05
DATA "H", 3
DATA -15, 00, -15,-40
DATA 15, 00, 15,-40
DATA -15,-20, 15,-20
DATA "I", 3
DATA 00, 00, 00,-40
DATA -10, 00, 10, 00
DATA -10,-40, 10,-40
DATA "J", 5
DATA 00,-40, 00,-05
DATA -10,-40, 10,-40
DATA -17,-05, -12, 00
DATA 00,-05, -05, 00
DATA -05, 00, -12, 00
DATA "K", 3
DATA -15, 00, -15,-40
DATA 15,-40, -15,-15
DATA 15, 00, -10,-18
DATA "L", 2
DATA -15, 00, -15,-40
DATA -15, 00, 10, 00
DATA "M", 4
DATA -17, 00, -17,-40
DATA 17, 00, 17,-40
DATA -17,-40, 00, 00
DATA 17,-40, 00, 00
DATA "N", 3
DATA -15, 00, -15,-40
DATA -15,-40, 15, 00
DATA 15, 00, 15,-40
DATA "O", 8
DATA -15,-05, -15,-35
DATA 15,-05, 15,-35
DATA -10,-40, 10,-40
DATA -10, 00, 10, 00
DATA -15,-35, -10,-40
DATA -15,-05, -10, 00
DATA 15,-35, 10,-40
DATA 15,-05, 10, 00
DATA "P", 6
DATA -17, 00, -17,-40
DATA -17,-40, 10,-40
DATA -17,-15, 10,-15
DATA 15,-35, 15,-20
DATA 10,-40, 15,-35
DATA 10,-15, 15,-20
DATA "Q", 9
DATA -15,-05, -15,-35
DATA 15,-05, 15,-35
DATA -10,-40, 10,-40
DATA -10, 00, 10, 00
DATA -15,-35, -10,-40
DATA -15,-05, -10, 00
DATA 15,-35, 10,-40
DATA 15,-05, 10, 00
DATA 15, 00, 05,-10
DATA "R", 7
DATA -17, 00, -17,-40
DATA -17,-40, 10,-40
DATA -17,-15, 10,-15
DATA 15,-35, 15,-20
DATA 10,-40, 15,-35
DATA 10,-15, 15,-20
DATA 17, 00, 05,-15
DATA "S", 11
DATA -12, 00, 12, 00
DATA -12,-20, 12,-20
DATA -12,-40, 12,-40
DATA -17,-25, -17,-35
DATA 17,-05, 17,-15
DATA -17,-35, -12,-40
DATA -17,-05, -12, 00
DATA 17,-35, 12,-40
DATA 17,-05, 12, 00
DATA -17,-25, -12,-20
DATA 17,-15, 12,-20
DATA "T", 2
DATA 00, 40, 00,-40
DATA -15,-40, 15,-40
DATA "U", 5
DATA -15,-05, -15,-40
DATA -15,-05, -10, 00
DATA -10, 00, 10, 00
DATA 10, 00, 15,-05
DATA 15,-05, 15,-40
DATA "V", 2
DATA -17,-40, 00, 00
DATA 00, 00, 17,-40
DATA "W", 4
DATA -20,-40, -10, 00
DATA -10, 00, 00,-40
DATA 00,-40, 10, 00
DATA 10, 00, 20,-40
DATA "X", 2
DATA -15,-40, 15, 00
DATA -15, 00, 15,-40
DATA "Y", 3
DATA -15,-40, 00,-15
DATA 15,-40, 00,-15
DATA 00,-15, 00, 00
DATA "Z", 3
DATA -15,-40, 15,-40
DATA 15,-40, -15, 00
DATA -15, 00, 15, 00
DATA "?", 12
DATA -07,-40, 07,-40
DATA -07,-40,-12,-35
DATA 07,-40, 12,-35
DATA 12,-35, 12,-25
DATA 12,-25, 07,-20
DATA 07,-20, 05,-20
DATA 05,-20, 00,-15
DATA 00,-15, 00,-07
DATA -01,-02, 01, 00
DATA -01, 00, 01,-02
DATA 00, 00, 00,-02
DATA -01,-01, 01,-01
DATA ".", 4
DATA -01,-02, 01, 00
DATA -01, 00, 01,-02
DATA 00, 00, 00,-02
DATA -01,-01, 01,-01
DATA "!", 5
DATA 00,-07, 00,-40
DATA -01,-02, 01, 00
DATA -01, 00, 01,-02
DATA 00, 00, 00,-02
DATA -01,-01, 01,-01
DATA "-", 1
DATA -07,-20, 07,-20
DATA "'", 6
DATA -01,-40, 01,-38
DATA -01,-38, 01,-40
DATA 00,-38, 00,-38
DATA -01,-39, 01,-39
DATA -01,-38,-02,-35
DATA -02,-35, 01,-38
DATA ",", 6
DATA -01,-02, 01, 00
DATA -01, 00, 01,-02
DATA 00, 00, 00, 00
DATA -01,-01, 01,-01
DATA -01, 00,-02, 03
DATA -02, 03, 01, 00
DATA "1", 3
DATA 00, 00, 00,-40
DATA 00,-40,-05,-35
DATA -05, 00, 05, 00
DATA "2", 9
DATA -15,-35,-10,-40
DATA -10,-40, 10,-40
DATA 10,-40, 15,-35
DATA 15,-35, 15,-22
DATA 15,-22, 10,-17
DATA 10,-17,-10,-17
DATA -10,-17,-15,-12
DATA -15,-12,-15, 00
DATA -15, 00, 15, 00
DATA "3",11
DATA -15,-35,-10,-40
DATA -10,-40, 10,-40
DATA 10,-40, 15,-35
DATA 15,-35, 15,-25
DATA 15,-25, 10,-20
DATA 10,-20, 15,-15
DATA 15,-15, 15,-05
DATA 15,-05, 10, 00
DATA 10, 00,-10, 00
DATA -10, 00,-15,-05
DATA 00,-20, 10,-20
DATA "4", 4
DATA 07, 00, 07,-40
DATA 07,-40,-15,-15
DATA -15,-15,-15,-10
DATA -15,-10, 17,-10
DATA "5", 8
DATA 15,-40,-15,-40
DATA -15,-40,-15,-22
DATA -15,-22, 10,-22
DATA 10,-22, 15,-17
DATA 15,-17, 15,-05
DATA 15,-05, 10, 00
DATA 10, 00,-10, 00
DATA -10, 00,-15,-05
DATA "6",11
DATA 15,-35, 10,-40
DATA 10,-40,-10,-40
DATA -10,-40,-15,-35
DATA -15,-35,-15,-05
DATA -15,-05,-10, 00
DATA -10, 00, 10, 00
DATA 10, 00, 15,-05
DATA 15,-05, 15,-17
DATA 15,-17, 10,-22
DATA 10,-22,-10,-22
DATA -10,-22,-15,-15
DATA "7", 2
DATA -15,-40, 15,-40
DATA 15,-40,-02, 00
DATA "8",15
DATA -15,-35,-10,-40
DATA -10,-40, 10,-40
DATA 10,-40, 15,-35
DATA 15,-35, 15,-25
DATA 15,-25, 10,-20
DATA 10,-20, 15,-15
DATA 15,-15, 15,-05
DATA 15,-05, 10, 00
DATA 10, 00,-10, 00
DATA -10, 00,-15,-05
DATA -15,-05,-15,-15
DATA -15,-15,-10,-20
DATA -10,-20,-15,-25
DATA -15,-25,-15,-35
DATA -10,-20, 10,-20
DATA "9",11
DATA 15,-22,10,-17
DATA 10,-17,-10,-17
DATA -10,-17,-15,-22
DATA -15,-22,-15,-35
DATA -15,-35,-10,-40
DATA -10,-40, 10,-40
DATA 10,-40, 15,-35
DATA 15,-35, 15,-05
DATA 15,-05, 10, 00
DATA 10, 00,-10, 00
DATA -10, 00,-15,-05
DATA "0", 9
DATA -15,-35,-10,-40
DATA -10,-40, 10,-40
DATA 10,-40, 15,-35
DATA 15,-35, 15,-05
DATA 15,-05, 10, 00
DATA 10, 00,-10, 00
DATA -10, 00,-15,-05
DATA -15,-05,-15,-35
DATA -10,-40, 10, 00
DATA "a",12
DATA -15,-20,-10,-25
DATA -10,-25, 10,-25
DATA 10,-25, 15,-20
DATA 15,-20, 15,-05
DATA 15,-05, 20, 00
DATA 15,-12, 10,-17
DATA 10,-17,-10,-17
DATA -10,-17,-15,-12
DATA -15,-12,-15,-05
DATA -15,-05,-10, 00
DATA -10, 00, 10, 00
DATA 10, 00, 15,-05
DATA "b", 10
DATA -10,-40,-15,-35
DATA -15,-35,-15,-05
DATA -15,-05,-20, 00
DATA -15,-20,-10,-25
DATA -10,-25, 10,-25
DATA 10,-25, 15,-20
DATA 15,-20, 15,-05
DATA 15,-05, 10, 00
DATA 10, 00,-10, 00
DATA -10, 00,-15,-05
DATA "c", 7
DATA 15,-20, 10,-25
DATA 10,-25,-10,-25
DATA -10,-25,-15,-20
DATA -15,-20,-15,-05
DATA -15,-05,-10, 00
DATA -10, 00, 10, 00
DATA 10, 00, 15,-05
DATA "d",10
DATA 15,-20, 10,-25
DATA 10,-25,-10,-25
DATA -10,-25,-15,-20
DATA -15,-20,-15,-05
DATA -15,-05,-10, 00
DATA -10, 00, 10, 00
DATA 10, 00, 15,-05
DATA 10,-40, 15,-35
DATA 15,-35, 15,-05
DATA 15,-05, 20, 00
DATA "e", 9
DATA 15,-05, 10, 00
DATA 10, 00,-10, 00
DATA -10, 00,-15,-05
DATA -15,-05,-15,-20
DATA -15,-20,-10,-25
DATA -10,-25, 10,-25
DATA 10,-25, 15,-20
DATA 15,-20, 15,-12
DATA 15,-12,-15,-12
DATA "f", 5
DATA 15,-35, 10,-40
DATA 10,-40, 00,-40
DATA 00,-40,-05,-35
DATA -05,-35,-05, 00
DATA -15,-20, 05,-20
DATA "g",11
DATA 15,-20, 10,-25
DATA 10,-25,-10,-25
DATA -10,-25,-15,-20
DATA -15,-20,-15,-05
DATA -15,-05,-10, 00
DATA -10, 00, 10, 00
DATA 10, 00, 15,-05
DATA 15,-20, 15, 10
DATA 15, 10, 10, 15
DATA 10, 15,-10, 15
DATA -10, 15,-15, 10
DATA "h", 6
DATA -10,-40,-15,-35
DATA -15,-35,-15, 00
DATA -15,-20,-10,-25
DATA -10,-25, 10,-25
DATA 10,-25, 15,-20
DATA 15,-20, 15, 00
DATA "i", 5
DATA 00, 00, 00,-25
DATA -01,-32, 01,-30
DATA -01,-30, 01,-32
DATA 00,-30, 00,-32
DATA -01,-31, 01,-31
DATA "j", 9
DATA 00, 00, 00,-25
DATA 00,-25, 00, 10
DATA 00, 10,-05, 15
DATA -05, 15,-10, 15
DATA -10, 15,-15, 10
DATA -01,-32, 01,-30
DATA -01,-30, 01,-32
DATA 00,-30, 00,-32
DATA -01,-31, 01,-31
DATA "k", 4
DATA -10,-40,-15,-35
DATA -15,-35,-15, 00
DATA 10,-25,-15,-10
DATA 10, 00,-08,-14
DATA "l", 2
DATA 00,-40,-05,-35
DATA -05,-35,-05, 00
DATA "m", 9
DATA -15,-25,-15, 00
DATA -15,-20,-10,-25
DATA -10,-25,-05,-25
DATA -05,-25, 00,-20
DATA 00,-20, 00, 00
DATA 00,-20, 05,-25
DATA 05,-25, 10,-25
DATA 10,-25, 15,-20
DATA 15,-20, 15, 00
DATA "n",5
DATA -15,-25,-15, 00
DATA -15,-20,-10,-25
DATA -10,-25, 10,-25
DATA 10,-25, 15,-20
DATA 15,-20, 15, 00
DATA "o", 8
DATA 15,-20, 10,-25
DATA 10,-25,-10,-25
DATA -10,-25,-15,-20
DATA -15,-20,-15,-05
DATA -15,-05,-10, 00
DATA -10, 00, 10, 00
DATA 10, 00, 15,-05
DATA 15,-05, 15,-20
DATA "p", 8
DATA -15,-25,-15, 20
DATA -15,-20,-10,-25
DATA -10,-25, 10,-25
DATA 10,-25, 15,-20
DATA 15,-20, 15,-05
DATA 15,-05, 10, 00
DATA 10, 00,-10, 00
DATA -10, 00,-15,-05
DATA "q", 8
DATA 15,-25, 15, 20
DATA 15,-20, 10,-25
DATA 10,-25,-10,-25
DATA -10,-25,-15,-20
DATA -15,-20,-15,-05
DATA -15,-05,-10, 00
DATA -10, 00, 10, 00
DATA 10, 00, 15,-05
DATA "r", 4
DATA -15,-25,-15, 00
DATA -15,-20,-10,-25
DATA -10,-25, 10,-25
DATA 10,-25, 15,-20
DATA "s",11
DATA 15,-20, 10,-25
DATA 10,-25,-10,-25
DATA -10,-25,-15,-20
DATA -15,-20,-15,-18
DATA -15,-18,-10,-13
DATA -10,-13, 10,-13
DATA 10,-13, 15,-10
DATA 15,-10, 15,-05
DATA 15,-05, 10, 00
DATA 10, 00,-10, 00
DATA -10, 00,-15,-05
DATA "t", 3
DATA -05,-40,-05,-05
DATA -05,-05, 00, 00
DATA -10,-25, 05,-25
DATA "u", 5
DATA -15,-25,-15,-05
DATA -15,-05,-10, 00
DATA -10, 00, 10, 00
DATA 10, 00, 15,-05
DATA 15, 00, 15,-25
DATA "v", 2
DATA -13,-25, 00, 00
DATA 00, 00, 13,-25
DATA "w", 4
DATA -15,-25,-08, 00
DATA -08, 00, 00,-25
DATA 00,-25, 08, 00
DATA 08, 00, 15,-25
DATA "x", 2
DATA -10,-25, 10, 00
DATA -10, 00, 10,-25
DATA "y", 8
DATA -15,-25,-15,-05
DATA -15,-05,-10, 00
DATA -10, 00, 10, 00
DATA 10, 00, 15,-05
DATA 15,-25, 15, 10
DATA 15, 10, 10, 15
DATA 10, 15,-10, 15
DATA -10, 15,-15, 10
DATA "z", 3
DATA -13,-25, 13,-25
DATA 13,-25,-13, 00
DATA -13, 00, 13, 00
DATA "^",28
DATA -04,-35, 04,-35
DATA 04,-35, 11,-31
DATA 11,-31, 15,-24
DATA 15,-24, 15,-16
DATA 15,-16, 11,-09
DATA 11,-09, 04,-05
DATA 04,-05,-04,-05
DATA -04,-05,-11,-09
DATA -11,-09,-15,-16
DATA -15,-16,-15,-24
DATA -15,-24,-11,-31
DATA -11,-31,-04,-35
DATA -06,-26,-04,-26
DATA -07,-25,-03,-25
DATA -08,-24,-02,-24
DATA -08,-23,-02,-23
DATA -07,-22,-03,-22
DATA -06,-21,-04,-21
DATA 04,-26, 06,-26
DATA 03,-25, 07,-25
DATA 02,-24, 08,-24
DATA 02,-23, 08,-23
DATA 03,-22, 07,-22
DATA 04,-21, 06,-21
DATA -09,-17,-06,-14
DATA -06,-14, 00,-12
DATA 00,-12, 06,-14
DATA 06,-14, 09,-17
Vector Scoller
-
- Posts: 167
- Joined: Wed Oct 22, 2014 3:26 pm
- My devices: iPhone 4 to 6+,iPad mini to iPad air 2
Vector Scoller
- Attachments
-
- image.jpg (130.15 KiB) Viewed 1071 times
-
- image.jpg (127.93 KiB) Viewed 1071 times
-
- image.jpg (126.17 KiB) Viewed 1073 times
-
- image.jpg (133.83 KiB) Viewed 1073 times
-
- image.jpg (138.75 KiB) Viewed 1073 times
-
- Posts: 167
- Joined: Wed Oct 22, 2014 3:26 pm
- My devices: iPhone 4 to 6+,iPad mini to iPad air 2
Re: Vector Scoller
Add the lines below to rotate the text.
dh=.1
loop:
h=h+dh
if h< -2.45 or h >2.45 then dh=-dh
dh=.1
loop:
h=h+dh
if h< -2.45 or h >2.45 then dh=-dh
- Attachments
-
- image.jpg (112.49 KiB) Viewed 1070 times
-
- image.jpg (130.13 KiB) Viewed 1070 times
-
- image.jpg (107.47 KiB) Viewed 1070 times