home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
sourcecode
/
various
/
d10.amos
/
d10.amosSourceCode
Wrap
AMOS Source Code
|
1990-10-14
|
6KB
|
210 lines
'
' Scroll maker v1.1 by Jurgen Valks
'
'
'---------------------------------------------------------------
Shared Z,TEKST$,FONTNR,TLENGTE,T$,TELLER,YPOS,SPEED,PAUZE
Shared S1,S2,SC1
YPOS=247
FONTNR=2
SPEED=-1
S1=$0 : S2=$0 : SC1=$FFF
Proc INIT_SCREEN
Proc INIT_MENU
Do
If Mouse Click=1 Then LEES_MUIS
Loop
'---------------------------------------------------------------
'
Procedure INIT_SCREEN
Break Off
Get Rom Fonts : Change Mouse 2
Screen Open 0,320,200,16,Lowres
Screen Open 1,400,260,4,Lowres
Palette S1,S2,SC1 : Curs Off : Flash Off
Proc INIT_SCROLL_ZONE
Screen Open 2,640,100,4,Hires : Flash Off : Curs Off
Screen Display 2,,50,,
Palette $999,$999,$0
End Proc
'
Procedure INIT_SCROLL_ZONE
Def Scroll 1,0,238 To 355,249,SPEED,0
End Proc
'
Procedure INIT_MENU
Screen 2
Cls : Curs Off : Reserve Zone 10 : Colour 3,$A
Locate 1,0 : Centre "* Scroll maker v1.1 by Jurgen Valks *"
Pen 3
Locate 15,3 : Print Border$(Zone$(" Edit Text ",1),1)
Locate 15,6 : Print Border$(Zone$(" Load Text ",2),1)
Locate 15,9 : Print Border$(Zone$(" Set Font ",3),1)
Locate 29,3 : Print Border$(Zone$(" Set Scroll Speed ",4),1)
Locate 29,6 : Print Border$(Zone$(" Set Screen Color ",5),1)
Locate 29,9 : Print Border$(Zone$(" Set Scroll Color ",6),1)
Locate 50,3 : Print Border$(Zone$(" View Text ",7),1)
Locate 50,6 : Print Border$(Zone$(" View Scroll ",8),1)
Locate 50,9 : Print Border$(Zone$(" Save All.. ",9),1)
Locate 0,0 : Print Zone$("Quit",10)
End Proc
'
Procedure LEES_MUIS
Z=Mouse Zone
If Z=1 Then Proc ED_TEKST : Proc INIT_MENU
If Z=2 Then Proc LAAD_TEKST : Proc INIT_MENU
If Z=3 Then Proc KIES_FONT : Proc INIT_MENU
If Z=4 Then Proc ZET_SPEED : Proc INIT_MENU
If Z=5 Then Proc SCHERM_KLEUR : Proc INIT_MENU
If Z=6 Then Proc TEKST_KLEUR : Proc INIT_MENU
If Z=7 Then Proc LAAT_TEKST_ZIEN : Proc INIT_MENU
If Z=8 Then Proc TEST_SCROLL : Proc INIT_MENU
If Z=9 Then Proc BEWAAR_TEKST : Proc INIT_MENU
If Z=10 Then Proc EINDE
End Proc
'
Procedure ED_TEKST
Cls : Curs On
TEKST$=""
Locate 1,0 : Centre "* EDIT SCROLL TEXT *"
Locate 1,2 : Line Input "> ";TEKST$
End Proc
'
Procedure LAAD_TEKST
Cls
E=Exist("scroll.txt")
If E=0
Locate 1,1 : Centre "No scroll file on this disk !"
Locate 1,3 : Centre "Press left mouse button"
Repeat
Until Mouse Click=1 : Pop Proc
End If
Open In 1,"scroll.txt"
Line Input #1,TEKST$
Line Input #1,SPEED
Line Input #1,FONTNR
Line Input #1,YPOS
Line Input #1,S1
Line Input #1,S2
Line Input #1,SC1
Close 1
Screen 1 : Palette S1,S2,SC1 : Proc INIT_SCROLL_ZONE
Set Font FONTNR
Screen 2
Locate 1,1 : Centre "Text file now loaded !"
Locate 1,3 : Centre "Press left mouse button"
Repeat
Until Mouse Click=1
End Proc
'
Procedure BEWAAR_TEKST
Cls
Open Out 1,"scroll.txt"
Print #1,TEKST$
Print #1,SPEED
Print #1,FONTNR
Print #1,YPOS
Print #1,S1
Print #1,S2
Print #1,SC1
Close 1
Locate 1,1 : Centre "Text now saved on disk !"
Locate 1,3 : Centre "Press left mouse button"
Repeat
Until Mouse Click=1
End Proc
'
Procedure KIES_FONT
Cls
Locate 1,0 : Centre "* SET FONT *"
Locate 1,2 : Print "Default = ";Font$(FONTNR)
Locate 1,4 : Input "New number 1 or 2 > ";FONTNR
If FONTNR>2 or FONTNR<1 Then KIES_FONT
End Proc
'
Procedure LAAT_TEKST_ZIEN
Cls
Locate 1,0 : Centre "* VIEW SCROLL TEXT * "
Locate 1,3 : Print TEKST$
Locate 1,10 : Centre "Press left mouse button"
Repeat
Until Mouse Click=1
End Proc
'
Procedure TEST_SCROLL
Screen Hide 2 : Screen 1
Set Font FONTNR
If SPEED=-1 Then PAUZE=10
If SPEED=-2 Then PAUZE=5
If SPEED=-3 Then PAUZE=3
If SPEED=-4 Then PAUZE=2
TLENGTE=Len(TEKST$)
Repeat
Inc TELLER : If TELLER>TLENGTE Then TELLER=1
T$=Mid$(TEKST$,TELLER,1)
Text 345,YPOS,T$
For J=1 To PAUZE
Scroll 1 : Multi Wait
Next J
Until Mouse Click=1
TELLER=0 : TLENGTE=0 : Cls
Screen Show 2 : Screen 2
End Proc
'
Procedure ZET_SPEED
Cls
Locate 1,0 : Centre "* SET SCROLL SPEED *"
If SPEED=-1 Then SP=1
If SPEED=-2 Then SP=2
If SPEED=-3 Then SP=3
If SPEED=-4 Then SP=4
Locate 1,3 : Print "Default = ";SP
Locate 1,5 : Input "Give new number [1-4] > ";SP
If SP<1 or SP>4 Then Proc ZET_SPEED
If SP=1 Then SPEED=-1
If SP=2 Then SPEED=-2
If SP=3 Then SPEED=-3
If SP=4 Then SPEED=-4
Proc INIT_SCROLL_ZONE
End Proc
'
Procedure SCHERM_KLEUR
Cls
Locate 1,0 : Centre "* SET SCREEN COLOR *"
Locate 1,3 : Print "Just type a value like ff0 or 90a"
Locate 1,4 : Print "Don't type a $ before the value!"
Locate 1,7 : Print "Border = ";Hex$(S1)
Locate 1,8 : Print "Screen = ";Hex$(S2)
Locate 14,7 : Input "> ";C1$
Locate 14,8 : Input "> ";C2$
KL1$="$"+C1$ : KL2$="$"+C2$
S1=Val(KL1$) : S2=Val(KL2$)
Screen 1 : Palette S1,S2,
End Proc
'
Procedure TEKST_KLEUR
Cls
Locate 1,0 : Centre "* SET SCROLL TEXT COLOR *"
Locate 1,3 : Print "Just type a value like ff0 or 30a"
Locate 1,4 : Print "Don't type a $ before the value!"
Locate 1,7 : Print "Default color ";Hex$(SC1)
Locate 18,7 : Input "> ";C3$
KL3$="$"+C3$ : SC1=Val(KL3$)
Screen 1 : Palette ,,SC1
End Proc
'
Procedure EINDE
Cls
Locate 1,0 : Centre "* LAST INSTRUCTIONS *"
Locate 1,2 : Print "Now load the program called SCROLL.AMOS and see !"
Locate 1,3 : Print "The file SCROLL.TXT must be on the same disc where the program SCROLL.AMOS "
Locate 1,4 : Print "stands, put it in the root, or else it won't work. Watch out for the new "
Locate 1,5 : Print "version of this program...Version 2 will have:"
Locate 1,7 : Print "* Plays music * Vu-meters * Color effects * Bouncing Scrolls *"
Locate 1,8 : Print "* More scrolls * More Fonts * Vertical Scrolls * And FREE !! *"
Locate 1,10 : Print "Press right mouse button to quit"
Repeat
Until Mouse Click=2
Cls : Screen Close 2 : Screen Close 1
Run "menu.AMOS"
End Proc