home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
551-575
/
apd558
/
amoner1
/
start.amos
/
start.amosSourceCode
< prev
Wrap
AMOS Source Code
|
1993-11-29
|
4KB
|
171 lines
Set Buffer 14
Screen Open 0,320,200,16,Lowres
Close Editor
Close Workbench
Dim ARTICLE$(2,150),LASTLINE(2)
TEXREAD[1,"editor.txt"] : Rem Read Editorial text
TEXREAD[2,"policy.txt"] : Rem Read Policy text
GAMES=0 : Rem Games menu inactive
Rem
Rem Start up program for Amoner Issue 1.
Rem By Gal-on Broner
Rem
Rem First, we unfold the opening screen.
Unpack 15 To 0
Rem
Rem Now, we declare a few zones.
Rem
ZONR:
Reserve Zone : Wait Vbl
Reserve Zone 8
Set Zone 1,10,60 To 80,90 : Rem Editorial
Set Zone 2,10,93 To 80,115 : Rem Policy
Set Zone 3,10,117 To 80,140 : Rem Games
Set Zone 4,10,145 To 80,170 : Rem Graphics
Set Zone 5,2,173 To 95,210 : Rem Puzzle
Set Zone 6,101,51 To 189,213 : Rem Feature Picture
Set Zone 7,190,51 To 290,120 : Rem Fortron
Set Zone 8,190,135 To 290,200 : Rem Jigsaw Puzzle
Rem
Rem detect mouse
Rem
CHECKER:
Repeat : Until Mouse Click
If Mouse Zone=1
DISPLAY[1]
Goto ZONR
End If
If Mouse Zone=2
DISPLAY[2]
Goto ZONR
End If
If Mouse Zone=3
Ink 0
Bar 191,51 To 290,210
Paste Icon 190,51,5
GAMES=1 : Rem games menu activated
End If
If Mouse Zone=4
MANDEL
GAMES=0
End If
If Mouse Zone=5
Run "Knight.amos"
End If
If Mouse Zone=6
End If
If Mouse Zone=7 and GAMES=1
Run "Forins.Amos"
End If
If Mouse Zone=8 and GAMES=1
Run "Jigins.Amos"
End If
Goto CHECKER
Procedure MANDEL
STIMER=Timer : Get Palette 0 : Ink 0 : Bar 101,51 To 189,213
Bar 191,51 To 290,210
Ink 7,0
Text 200,66,"Mini - Frac"
Text 200,77,""
Text 200,88,"Algorithm"
Text 200,99,"Of Fractal"
Text 200,110,"in Program:"
Text 200,121,"Frac.Amos"
Text 200,143,"Try it out!"
Text 200,165,"Takes 41"
Text 200,175,"min to"
Text 200,186,"Compleate."
XP=101 : YP=51 : NUM_OF_COLOR=16 : WIDTH=88 : HEIGHT=162
XMIN#=-2 : XMAX#=0.5 : YMIN#=-1.25 : YMAX#=1.25
For X#=XMIN# To XMAX# Step((XMAX#-XMIN#)/WIDTH)
For Y#=YMIN# To YMAX# Step((YMAX#-YMIN#)/HEIGHT)
REP=0 : ZX#=0 : ZY#=0
CALC:
TEMP#=ZX# : ZX#=ZX#^2-ZY#^2+X# : ZY#=2*TEMP#*ZY#+Y#
Inc REP
If((REP<50) and((ZX#^2+ZY#^2)<4)) Then Goto CALC
CT=Int((REP*NUM_OF_COLOR)/50) : Plot XP,YP,CT : Inc YP
Next Y#
YP=51 : Inc XP
Next X#
' Print(Timer-STIMER)/3000
End Proc
Procedure TEXREAD[ARTICLE,FILENAME$]
Shared ARTICLE$(),LASTLINE()
LINE=1
Set Input 10,-1
Open In 1,FILENAME$
SEREAD:
Line Input #1,ARTICLE$(ARTICLE,LINE)
If Left$(ARTICLE$(ARTICLE,LINE),6)="end..." Then Goto CLFILE
LINE=LINE+1
Goto SEREAD
CLFILE:
Close 1
ARTICLE$(ARTICLE,LINE)=""
LASTLINE(ARTICLE)=LINE-1
End Proc
Procedure DISPLAY[ARTICLE]
Shared ARTICLE$(),LASTLINE()
Screen Open 1,620,140,16,Hires
Get Icon Palette
Screen Display 1,130,100,,
Cls 2 : Paper 2 : Pen 0 : Ink 0,2 : Cls 2
LINE=1
Rem
Rem design display screen
Rem
Reserve Zone : Wait Vbl
Reserve Zone 3
Set Zone 1,0,102 To 74,139
Set Zone 2,75,102 To 148,139
Set Zone 3,160,115 To 218,122
Draw 0,100 To 640,100
Draw 230,100 To 230,140
Text 240,116," Text-Reader "
Text 240,130," By Gal-on Broner, Barbarian Minds 1991."
Rem
Rem display text on screen
Rem
TXTDISPLAY:
Locate 1,1
For LINECLEAN=1 To 9
Print Space$(74)
Next LINECLEAN
Locate 1,1
For LINETEXT=LINE To LINE+8
Print ARTICLE$(ARTICLE,LINETEXT)
Next LINETEXT
Rem
Rem Display icons
Rem
Paste Icon 0,102,1
Paste Icon 160,115,4
Rem
Rem Detect mouse on icons.
Rem
CLICKER:
Repeat : Until Mouse Click
If Mouse Zone=1
Paste Icon 0,102,2
LINE=LINE+9
If LINE>LASTLINE(ARTICLE)
LINE=LINE-9
End If
Goto TXTDISPLAY
End If
If Mouse Zone=2
Paste Icon 90,102,3
LINE=LINE-9
If LINE<1
LINE=LINE+9
End If
Goto TXTDISPLAY
End If
If Mouse Zone=3
Screen Close 1
Get Palette 0
Pop Proc
End If
Goto CLICKER
End Proc