' This is a scroller that uses Amiga fonts. Fonts sizes greater than ~28
' will flicker. Warning: This prog closes the Workbench so you will have
' boot out of it.
' Here are limits on the font size. (Written on a A1000 with 3 megs)
' Colours Font size
' Hires. 4 17
' 2 24
' Lowres 32 15
' 16 20
' 8 24
' 4 28
' 2 36
' Robert Farnsworth
' 1 Vidovic Ave, Mildura, 3500
' December 1990.
' THIS IS A MUST FOR SMOOTH SCROLLING
Close Workbench
TXT$="This is a Scroller routine that uses the standard AMIGA fonts. It works in HIRES or LOWRES, and has selectable scroll speed. R. G. Farnsworth, December 1990."
' Make the screen about 100 pixels wider than SCRWIDTH (the viewable screen).
' More if some characters are really wide - like "W" and "M".
SCRWIDTH=320
Screen Open 0,SCRWIDTH+150,256,16,Lowres
Screen Display 0,128,42,SCRWIDTH,
Flash Off : Curs Off
Get Fonts
LF=1
While Font$(LF)<>"" : Inc LF : Wend
Print " AMIGA-FONTS SCROLLER"
Print
Print " (Press Spacebar to pause)"
For F=1 To LF-1
SP=Rnd(9)+1
Locate 0,7 : Cline : Print "Font:";F;" Speed:";SP
Print At(0,10);Font$(F)
SCRL[TXT$,F,SP,SCRWIDTH]
Next
End
Procedure SCRL[T$,FONT,SPEED,SWIDTH]
' This is a scroller routine that uses Amiga fonts, any size,
' proportional and non proportional. It will work with both
' Hires and Lowres screens. Scrolling is very smooth for fonts
' sizes upto about 36, depending on the resolution used and the
' number of bitplanes used. The Workbench MUST be closed if you want
' smooth scrolling (also eliminate any background tasks, such as POPCLI).
' T$ - The text string to be scrolled.
' FONT - The number of the font to be used.
' SWIDTH - The viewable width of the screen, usually 320 or 640.
' (The screen must be approx 100 pixels wider than SWIDTH.)
' SPEED - The scrolling speed - 1 is slow, 3 about right, 8 is fast.
SPEED=Max(1,SPEED) : FONT=Max(1,FONT)
Set Font FONT
FONTHEIGHT=Val(Mid$(Font$(FONT),30,3))
Def Scroll 1,1,Screen Height-FONTHEIGHT To Screen Width,Screen Height,-SPEED,0