home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
201-225
/
apd217
/
behindbars.amos
/
behindbars.amosSourceCode
< prev
next >
Wrap
AMOS Source Code
|
1991-02-26
|
3KB
|
149 lines
Rem Behind Bars Demo
Rem by JAG of FANATIX
Rem
Proc BEHINDBARS
Procedure BEHINDBARS
Screen Open 0,320,256,8,Lowres : Flash Off : Curs Off : Hide On : Cls 0
Break Off : Close Workbench : Close Editor : Led Off : Music 1
If Exist("Df1:SeeYou.AMOS")=0 Then Goto LAMER
If Exist("Df0:Intro.AMOS")=0 Then Goto LAMER
If Exist("Df0:Starscape.AMOS")=0 Then Goto LAMER
Dim C(360) : Dim CY(360)
T$=Space$(1094) : For F=Start(8) To Start(8)+1094 : Poke Varptr(T$)+F-Start(8),Peek(F) : Next F
Dim L$(50) : Dim X(50) : Dim Y(50) : Q=0 : F=0
SC=8 : CH=1 : SCAR=0 : LETTER$="0123456789abcdefghijklmnopqrstuvwxyz�,!.:?/+-()' "
Gosub VARLOAD
Degree
For F=1 To 360
C(F)=(Sin(F)*100)+25 : CY(F)=(Sin(F)*50)+80
Next F
Screen Open 1,320,256,8,Lowres : Curs Off : Flash Off : Hide On : Cls 0
Screen Open 2,400,35,8,Lowres : Curs Off : Flash Off : Hide On : Cls 0
Screen Display 2,125,250,,
Screen To Front 2
Screen Open 3,320,256,8,Lowres : Curs Off : Flash Off : Hide On : Cls 0
Screen To Back 3
Auto View Off
Unpack 9 To 3
Screen 3 : Colour 1,$0
Screen To Back 3
Screen 2 : Get Palette 3
Unpack 6 To 1
Unpack 7 To 0
Screen 0
Colour 8,$0 : Colour 9,$8 : Colour 10,$F : Colour 11,$22F
Colour 12,$999 : Colour 13,$666 : Colour 14,$555 : Colour 15,$333
Dual Playfield 0,1
Colour 1,$0
Screen 1
Auto View On
Double Buffer : Synchro Off
Def Scroll 1,0,0 To 390,50,-4,0
Screen To Front 1 : Screen To Front 0 : Screen To Front 2
Screen 0 : Double Buffer : Synchro Off
Rem ********* Main Routine *********
Do
Screen 2
Scroll 1
Inc SCAR : If SCAR=SC Then SCAR=0 : Inc CH : Gosub PCHAR
Gosub OBJECTS
Wait Vbl
If Mouse Key=1 Then Goto DIE
Loop
Rem ********* New Character ********
PCHAR:
If CH=Len(T$) Then CH=0 : Return
S$=Mid$(T$,CH,1)
P=Instr(LETTER$,S$)
Screen Copy 3,X(P),Y(P),(X(P))+31,(Y(P))+31 To 2,354,2
Return
Rem ********* Bob Updates **********
OBJECTS:
Screen 1
F=F+3 : If F>360 Then F=1
Q=Q+2 : If Q>360 Then Q=1
Bob 1,C(F),CY(Q),1
Synchro : Wait Vbl
Return
Rem ********* Data Statements ******
VARLOAD:
Restore SCDATA
For F=1 To 49
Read A$ : Read A : Read B
L$(F)=A$ : X(F)=A : Y(F)=B
Next F
Return
SCDATA:
Data "0",0,0
Data "1",32,0
Data "2",64,0
Data "3",96,0
Data "4",128,0
Data "5",160,0
Data "6",192,0
Data "7",224,0
Data "8",256,0
Data "9",288,0
Data "a",0,32
Data "b",32,32
Data "c",64,32
Data "d",96,32
Data "e",128,32
Data "f",160,32
Data "g",192,32
Data "h",224,32
Data "i",256,32
Data "j",288,32
Data "k",0,64
Data "l",32,64
Data "m",64,64
Data "n",96,64
Data "o",128,64
Data "p",160,64
Data "q",192,64
Data "r",224,64
Data "s",256,64
Data "t",288,64
Data "u",0,96
Data "v",32,96
Data "w",64,96
Data "x",96,96
Data "y",128,96
Data "z",160,96
Data "�",192,96
Data ",",224,96
Data "!",256,96
Data ".",288,96
Data ":",0,128
Data "?",32,128
Data "/",64,128
Data "+",96,128
Data "-",128,128
Data "(",160,128
Data ")",192,128
Data "'",224,128
Data " ",256,128
Rem ********* End The Demo ********
LAMER:
Screen Open 0,640,512,2,Hires : Hide On : Curs Off : Cls 0 : Colour 1,$FFF : Ink 1 : Paper 0
Print
Print "Somebody has tampered with this disk. I have now"
Print "locked up your machine!"
Print
Print "Leave peoples disks alone in future...."
Do
Loop
DIE:
Screen 2 : Fade 5 : Wait 75
Screen Close 3
Screen 0 : Fade 5 : Wait 10
For F=63 To 0 Step -1
Mvolume F
For T=0 To 1000
Next T
Next F
Screen Close 2
Screen Close 0
Screen Close 1
Music Off
End Proc