home *** CD-ROM | disk | FTP | other *** search
AMOS Source Code | 1995-08-01 | 4.3 KB | 181 lines |
- '
- ' PLAZMAR 1.0
- ' By Andrew "yawn yawn" Campbell
- ' (adapted from some simple plasma source code by... er... ?)
- '
- ' Check out the HELP screen, then press HELP again
- ' for a nice pattern. Toggle the HELP screen so you
- ' know which keys to press next time to alter the
- ' pattern, palette, etc.
- '
- ' Not a brilliant program, but the Fx can be nice.
- ' Note: When the border is WHITE the program is WORKING!
- '
- ' Have fun - AJC
- '
- Global CYC
-
- Screen Open 0,320,256,32,Lowres
- Curs Off : Flash Off : Hide On
- Cls 0
- Auto View Off
- CYC=6
- _CYCLE
- Shift Up 4,0,30,1
-
- Screen Open 1,320,256,32,Lowres
- Curs Off : Flash Off : Hide On
- Cls 0
-
- Auto View On
- View
-
- _HELP
-
- RESE:
-
- V=-15
- CO=0
- KAK=1
- TIM=2
- CYC=7
-
- GIMP:
- Colour Back $FFF
- Cls 0
- Get Palette 0
- Screen To Back 1
- '
- Screen 1
- '
- Degree
- '
- For X=0 To 320 Step KAK
- Ink CO
- Draw X,0 To X,256
- If TIM=10
- Inc CO
- TIM=0
- End If
- If CO>30
- CO=0
- End If
- Inc TIM
- Next X
- '
- For Y=0 To 256
- P#=Sin(POS#)*V
- Screen Copy 1,0,Y,320,Y+1 To 0,P#,Y
- POS#=POS#+5
- Next Y
- '
- Screen Copy 0,0,0,320,256 To 1,0,0
- '
- For X=0 To 320
- P#=Sin(POS#)*V
- Screen Copy 1,X,0,X+1,256 To 0,X,P#
- POS#=POS#+5
- Next X
-
- Screen 0
- Colour Back $0
- Update
- Auto View On
- View
-
- Do
- If Key State(95) : _HELP : End If
- If Key State(1) : Add V,10 : Goto GIMP : End If
- If Key State(2) : Add V,-10 : Goto GIMP : End If
- If Key State(3) : Add KAK,2 : Goto GIMP : End If
- If Key State(4) : Add KAK,-2 : Goto GIMP : End If
- If Key State(5) : Add TIM,5 : Goto GIMP : End If
- If Key State(6) : Add TIM,-5 : Goto GIMP : End If
- If Key State(19) : Goto RESE : End If
- If Key State(51) : _CYCLE : End If
- If Key State(16) : Screen 0 : Fade 3 : Wait 100 : Edit : End If
- Loop
-
- Goto GIMP
-
- Procedure _HELP
-
- Auto View Off
- Screen Open 7,640,266,2,Hires
- Curs Off : Flash Off : Cls 0 : Hide On
- Screen Display 7,,500,,
-
- Gosub REPRINT
-
- Auto View On
- View
- Palette 0,$FFF,
-
- For I=500 To 40 Step -1
- Update
- Screen Display 7,,I,,
- Next I
-
- MFFF:
- Do
- If Key State(95)
- Screen Close 7
- Wait 3
- Pop Proc
- End If
- Loop
-
- REPRINT:
- Locate 0,1 : Centre "PLAZMAR v1.0 >>HELP<< SCREEN"
- Locate 0,2 : Centre "(Press HELP and THEN use these functions!)"
- Locate 0,4 : Centre "Increase Plazma Formula #1............................press 1"
- Locate 0,5 : Centre "Decrease Plazma Formula #1............................press 2"
- Locate 0,7 : Centre "Increase Plazma Formula #2............................press 3"
- Locate 0,8 : Centre "Decrease Plazma Formula #2............................press 4"
- Locate 0,10 : Centre "Increase Plazma Formula #3............................press 5"
- Locate 0,11 : Centre "Decrease Plazma Formula #3............................press 6"
- Locate 0,13 : Centre "Reset All Values......................................press R"
- Locate 0,15 : Centre "Cycle Through Colour Schemes..........................press C"
- Locate 0,17 : Centre "Quit The Program......................................press Q"
- Locate 0,19 : Centre "TOGGLE THIS SCREEN.................................press HELP"
-
- Return
-
- End Proc
- Procedure _CYCLE
-
- Inc CYC
-
- If CYC>8
- CYC=1
- End If
-
- If CYC=1
- Palette $0,$1,$2,$3,$4,$5,$6,$7,$8,$9,$A,$B,$C,$D,$E,$F,$E,$D,$C,$B,$A,$9,$8,$7,$6,$5,$4,$3,$2,$1,$0
- End If
- If CYC=2
- Palette $0,$11,$22,$33,$44,$55,$66,$77,$88,$99,$AA,$BB,$CC,$DD,$EE,$FF,$EE,$DD,$CC,$BB,$AA,$99,$88,$77,$66,$55,$44,$33,$22,$11,$0
- End If
- If CYC=3
- Palette $0,$1,$2,$3,$4,$5,$6,$7,$8,$9,$A,$B,$C,$D,$E,$F,$1E,$2D,$3C,$4B,$5A,$69,$78,$87,$96,$A5,$B4,$C3,$D2,$E1,$F0
- End If
- If CYC=4
- Palette $11,$122,$233,$344,$455,$566,$677,$788,$899,$9AA,$ABB,$BCC,$CDD,$DEE,$EFF,$FEE,$EDD,$DCC,$CBB,$BAA,$A99,$988,$877,$766,$655,$544,$433,$322,$211,$100,$0
- End If
- If CYC=5
- Palette $0,$111,$222,$333,$444,$555,$666,$777,$888,$999,$AAA,$BBB,$CCC,$DDD,$EEE,$FFF,$EE1,$DD2,$CC3,$BB4,$AA5,$996,$887,$778,$669,$55A,$449,$338,$227,$116,$5
- End If
- If CYC=6
- Palette $0,$110,$220,$330,$440,$550,$660,$770,$880,$990,$AA0,$BB0,$CC0,$DD0,$EE0,$FF0,$E0E,$D0D,$C0C,$B0B,$A0A,$909,$808,$707,$606,$505,$404,$303,$202,$101,$0
- End If
- If CYC=7
- Palette $0,$FFF,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
- End If
- If CYC=8
- Palette $0,$990,$880,$770,$660,$550,$440,$330,$220,$110,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
- End If
-
- Wait 10
-
-
- End Proc