home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
401-425
/
apd410
/
rainnbowed.amos.pp
/
rainnbowed.amos
/
rainnbowed.amosSourceCode
< prev
next >
Wrap
AMOS Source Code
|
1992-05-17
|
8KB
|
364 lines
'
'rainbow editor v1.
'storm 1992
'
RAS
Procedure RAS
Dim RED(15),GREEN(15),BLUE(15),DNA(280),DNA$(280)
STORM
Shift Off
Screen Open 0,320,270,8,Lowres
Screen Display 0,140,40,320,270
Curs Off : Pen 1 : Paper 0 : Flash Off : Cls 0 : Hide
Colour 1,$FF
Flash 1,"(011,4)(022,4)(044,4)(066,4)(088,4)(0aa,4)(0cc,4)(0ee,4)(0cc,4)(0aa,4)(088,4)(066,4)(044,4)(022,4)"
Gosub TITLE
Set Rainbow 1,0,280,"","",""
Rainbow 1,0,0,280
For I=0 To 279
Rain(1,I)=0
Next I : View
SCN=0
RF=0 : GF=0 : BF=0
FC=2 : BC=8
Do
Locate 0,1 : Print "scanline :";SCN;" ";
Locate 0,2 : Print "red :";Hex$(RED/256);" ";
Locate 0,3 : Print "green :";Hex$(GREEN/16);" ";
Locate 0,4 : Print "blue :";Hex$(BLUE);" ";
Locate 0,5 : Print "total hue :";Hex$(MIX);" ";
If Key State(29)=True Then Gosub RDS
If Key State(30)=True Then Gosub GRN
If Key State(31)=True Then Gosub BLE
If Key State(45)=True Then Gosub RDS2
If Key State(46)=True Then Gosub GRN2
If Key State(47)=True Then Gosub BLE2
If Key State(69)=True Then Gosub FRESH
If Key State(80)=True Then Gosub BUB
If Key State(81)=True Then Gosub SUB
If Key State(95)=True Then Gosub QUIT
If Key State(89)=True Then Gosub PRN
If Key State(76)=True Then Gosub SCU
If Key State(77)=True Then Gosub SCD
View
Wait Vbl
Loop
'
'
'
SCU:
If SCN=<0 Then Return
SCN=SCN-1
Rain(1,SCN)=MIX
Bob 1,100,SCN-12,5
Return
'
'
'
SCD:
If SCN=>279 Then Return
SCN=SCN+1
Rain(1,SCN)=MIX
Bob 1,100,SCN-12,5
Return
'
'
'
BUB:
SCN=0
Rain(1,SCN)=MIX
Bob 1,100,SCN-12,5
Return
'
'
'
SUB:
SCN=279
Rain(1,SCN)=MIX
Bob 1,100,SCN-12,5
Return
'
'
'
RDS:
If RED=>3840 Then Return
Add RED,256
MIX=RED+GREEN+BLUE
Rain(1,SCN)=MIX
View
Return
'
'
'
GRN:
If GREEN=>240 Then Return
Add GREEN,16
MIX=RED+GREEN+BLUE
Rain(1,SCN)=MIX
View
Return
'
'
'
BLE:
If BLUE=>15 Then Return
Add BLUE,1
MIX=RED+GREEN+BLUE
Rain(1,SCN)=MIX
View
Return
'
'
'
RDS2:
If RED=<0 Then Return
Add RED,-256
MIX=RED+GREEN+BLUE
Rain(1,SCN)=MIX
View
Return
'
'
'
GRN2:
If GREEN=<0 Then Return
Add GREEN,-16
MIX=RED+GREEN+BLUE
Rain(1,SCN)=MIX
View
Return
'
'
'
BLE2:
If BLUE=<0 Then Return
Add BLUE,-1
MIX=RED+GREEN+BLUE
Rain(1,SCN)=MIX
View
Return
'
'
'
HEXER:
Restore CDAT
For I=0 To 15
'Read RED$(I)
Next I
For I=0 To 15
'Read GREEN$(I)
Next I
For I=0 To 15
'Read BLUE$(I)
Next I
Return
CDAT:
Data "0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"
Data "0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"
Data "0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"
FRESH:
Set Rainbow 1,0,280,"","",""
Rainbow 1,0,0,280
For I=0 To 279
Rain(1,I)=0
Next I : View
Return
'
'
'
PRN:
E=0
For I=0 To 279
DNA(I)=Rain(1,I)
Next I
Cls 0
Home
Print
Show On
FL$=Fsel$("*.asc",".asc","Save rainbow proc as:")
If FL$="" Then Gosub TITLE : Hide On : Return
Open Out 1,FL$
JAZZ:
Print #1,"'";Chr$(13)
Print #1,"'";Chr$(13)
Print #1,"'";Chr$(13)
Print #1,"Procedure STORM";Chr$(13)
Print #1,"Rem *******************************************";Chr$(13)
Print #1,"Rem ** produced with storm rainbow editor v1 **";Chr$(13)
Print #1,"Rem ** storm rainbow! **";Chr$(13)
Print #1,"Rem ** copyright 1992 **";Chr$(13)
Print #1,"Rem *******************************************";Chr$(13)
Print #1,"Restore MAGICCOLOURS";Chr$(13)
Print #1,"Set Rainbow 1,0,280,";Chr$(34);Chr$(34);",";Chr$(34);Chr$(34);",";Chr$(34);Chr$(34);Chr$(13)
Print #1,"Rainbow 1,0,0,280";Chr$(13)
Print #1,"For I=0 To 279";Chr$(13)
Print #1,"Read A : Rain(1,I)=A";Chr$(13)
Print #1,"Next I : View";Chr$(13)
Print #1,"MAGICCOLOURS:";Chr$(13)
For I=0 To 279 Step 8
Print #1,"data ";Hex$(DNA(I));",";
Print #1,"";Hex$(DNA(I+1));",";
Print #1,"";Hex$(DNA(I+2));",";
Print #1,"";Hex$(DNA(I+3));",";
Print #1,"";Hex$(DNA(I+4));",";
Print #1,"";Hex$(DNA(I+5));",";
Print #1,"";Hex$(DNA(I+6));",";
Print #1,"";Hex$(DNA(I+7));Chr$(13)
Wait Vbl
Print
Next I
Print #1,"REM ** storm 92 **";Chr$(13)
Print #1,"End proc";Chr$(13)
Close 1
Hide On
Gosub TITLE
Return
'
'
'
NAME:
Wait 7
Clear Key
Cls 0
Curs Off
L1=%1111111
L2=%11100
L3=%1000
L4=%0
Set Curs L4,L4,L4,L4,L4,L3,L2,L1
Centre "file exists!?..New filename please"
Print
Line Input "Filename:";A$
Open Out 1,A$
Curs Off
Return
'
'
'
QUIT:
Cls 0
L1=%1111111
L2=%11100
L3=%1000
L4=%0
Set Curs L4,L4,L4,L4,L4,L3,L2,L1
DEF:
Centre "Are you sure (y/n)"
Do
If Key State(21)=True Then Gosub EAD :
If Key State(54)=True Then Gosub TITLE : Return
Loop
'
'
'
TITLE:
Cls 0
Home
Centre "STORM RAINBOW EDITOR"
Locate 17,1 : Print "f1=top f2=bottom"
Locate 17,2 : Print "esc=clear f10=save"
Locate 17,3 : Print "arrow up arrow down"
Locate 17,4 : Print "rUP=1 gUP=2 bUP=3"
Locate 17,5 : Print "rDN=4 gDN=5 bDN=6"
Return
'
'
'
EAD:
Cls 0
Home
Print : Print : Print : Print : Print : Print : Print : Print : Print
Print : Print : Print : Print : Print
Centre "Bye Bye...call again soon!!!" : Print
Centre "storm 1992" : Print
Print : Print : Print : Print
Centre "A NEW BEGINING!.."
For I=256 To 100 Step -1
Screen Display 0,140,40,320,I
Wait 1
Next I
Screen Close 0
End
End Proc
Procedure STORM
Rem *******************************************
Rem ** produced with storm rainbow editor v1 **
Rem ** storm rainbow! **
Rem ** copyright 1992 **
Rem *******************************************
Screen Open 0,320,256,32,Lowres
Curs Off : Paper 0 : Pen 12 : Cls 0 : Hide
'Break Off
Unpack 16 To 0
Screen Display 0,140,40,320,150
'Break Off
Pen 12 : Paper 0
Restore MAGICCOLOURS
Set Rainbow 1,12,280,"","",""
Rainbow 1,0,0,280
For I=0 To 279
Read A : Rain(1,I)=A
Next I : View
Centre "THE STORM RAINBOW EDITOR!" : Print
Centre "-------------------------" : Print
Centre "WRITTEN IN ONE DAY BY" : Print
Centre "EJBER OZKAN!" : Print
Centre "INFO:" : Print : Print
Centre "USE ARROW KEYS TO MOVE BETWEEN EACH" : Print
Centre "INDIVDUAL SCANLINE!" : Print
Centre "USE THE KEYPAD KEYS TO CHANGE COLOURS!" : Print
Centre "1 - 4 RED - 2 - 5 GREEN - 3 - 6 BLUE" : Print
Centre "esc clears everything!" : Print
Centre "help quits" : Print
Centre "f1 moves to top of screen" : Print
Centre "f2 moves to bottom of screen" : Print
Centre "and f10 SAVES in ASCII format" : Print
Centre "FILENAME IS "+Chr$(34)+"RASTER.ASC"+Chr$(34) : Print
Centre "HAVE FUN! PRESS MOUSE" : Print
For I=0 To 31
Colour I,$0
Next I
Colour 1,$777
Shift Up 1,1,8,1
Repeat
Until Mouse Key=1
Clear Key
Pop Proc
MAGICCOLOURS:
Data $0,$0,$0,$0,$100,$100,$100,$200
Data $200,$200,$300,$300,$300,$400,$400,$400
Data $500,$500,$500,$500,$600,$600,$600,$700
Data $700,$700,$800,$800,$900,$A00,$A00,$B00
Data $B00,$B00,$C00,$C00,$C00,$D00,$D00,$D00
Data $E00,$E00,$E00,$E10,$E20,$E20,$E30,$E30
Data $E40,$E50,$E50,$E60,$E60,$E60,$E60,$E70
Data $E70,$E70,$E80,$E80,$E80,$E90,$E90,$E90
Data $EA0,$EB0,$EC0,$ED0,$EE0,$EF0,$EF0,$FF0
Data $FF0,$FF0,$FF0,$FF0,$FF0,$FF0,$FF0,$FF0
Data $FF0,$FF0,$FF0,$FF0,$FF0,$FF0,$FF0,$FF0
Data $FF0,$FF0,$FF0,$FF0,$FF0,$FF0,$FF1,$FF2
Data $FF2,$FF3,$FF3,$FF3,$FF4,$FF4,$FF4,$FF5
Data $FF5,$FF5,$FF6,$FF6,$FF7,$FF7,$FF7,$FF8
Data $FF8,$FF9,$FFA,$FFA,$FFB,$FFB,$FFC,$FFC
Data $FFC,$FFD,$FFD,$FFD,$FFE,$FFE,$FFE,$FFF
Data $FFF,$FFF,$FFF,$FFF,$FFF,$FFF,$FFF,$FFF
Data $FFF,$FFF,$FFF,$FFF,$FFF,$FFF,$FFF,$FFF
Data $FFF,$FFF,$FFF,$EFF,$EEF,$EEF,$DDF,$DDF
Data $DDF,$CCE,$CCE,$BBD,$BBD,$BBD,$BBD,$BBD
Data $BBD,$AAC,$AAC,$99C,$99C,$88B,$88B,$77A
Data $77A,$77A,$66A,$66A,$559,$559,$559,$449
Data $449,$338,$338,$338,$338,$338,$227,$227
Data $227,$116,$116,$5,$5,$5,$4,$4
Data $3,$3,$3,$2,$2,$2,$2,$1
Data $1,$1,$1,$1,$1,$0,$0,$0
Data $0,$0,$0,$0,$0,$0,$0,$0
Data $101,$101,$101,$201,$302,$302,$403,$503
Data $503,$604,$604,$605,$706,$706,$807,$807
Data $807,$908,$908,$908,$A09,$A09,$A09,$A09
Data $A09,$A09,$908,$808,$708,$607,$607,$506
Data $506,$506,$405,$405,$405,$304,$304,$303
Data $303,$303,$303,$303,$303,$303,$303,$203
Data $203,$203,$102,$102,$102,$1,$1,$1
Data $0,$0,$0,$0,$0,$0,$0,$0
Rem ** storm 92 **
End Proc