home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
351-375
/
apd375
/
progs
/
parallax_scroll.amos
/
parallax_scroll.amosSourceCode
Wrap
AMOS Source Code
|
1992-05-23
|
28KB
|
687 lines
'DATE: 14/01/92
'TIME: 20:21
'NAME: PARALLAX_SCROLL.AMOS
'CODE: UNCLE SIME
'NOTE: YOU NEED THE CTEXT EXTENSIONS TO RUN THE INTRO PART UN_COMPILED
' IF YOU HAVEN'T GOT CTEXT (GET IT) COMMENT OUT LINES 1 & 2 IN THE
' MODULE LEVEL CODE SECTION.
'THOUGHT FOR THE DAY: Time Keeps On Slippin, Sllippin, Slippin,
' Into The Future.
' Loads of fun this one! As usual anyone that requires help drop me a
' note and I will try to help. INCLUDE RETURN POSTAGE OR YOU WILL NOT
' GET A REPLY!
' The Address: Uncle Simes
' The Warehouse,
' 118 Hiltingbury Rd,
' Chandlers Ford,
' Eastleigh,
' Hants.
' SO5 1NT
' This is a quick message to Paul Townsend of Technical Fred software.
' Hi Paul...The weird phone call you recieved last Saturday (25/01/92), where
' The caller asked to speak to Len was infact me, I called your number by
' mistake and completely failed to realise that I had called You until later in
' the day, sorry about that. Liked your revolving Amos bob very nice. Must
' Have a natter sometime, cheers Sime.
' WHEN YOU SEE # IT MEANS LOOK IN THE REFERENCED PROCEDURE FOR EXPLINATION
' * DATA SECTION (YEUCH! COBOL) - VARIABLES ETC *
' 1] Set the correct disk / directory path
' 2] Kill the system environment
' 3] Declare a 1D array called Cloud$ with 4 elements
Dir$="SIMES_PROGS1:"
Close Workbench
Close Editor
Screen Close 0
Dim CLOUD$(4)
' * MODULE LEVEL CODE *
' 1] Initialise the system for the intro
' 2] Do the intro thing
' 3] Initialise the system for the demo
' 4] Do the demo thing
' 5] End of prog
INITIALISE_INTRO
MAIN_INTRO
' No CTEXT then comment out above 2 lines
INITIALISE_DEMO
MAIN_DEMO
End
' * INTRO PROCEDURE LEVEL CODE *
Procedure MAIN_INTRO
' This is the main intro procedure. i.e it controlls everything that
' goes on once the initialisation process has been completed. First
' I initialise all requited variables and strings. I then define a
' scroll zone for the scroll text. Next I make each of the screens
' visible. I then activate amal wich causes any amal programs to
' become active, I then change the autoback mode to 1 (half automatic
' screen copying mode Amos manual pages 158-161) finally I set Synchro
' off. This means that I must execute my Amal programs myself using a
' loop with a call to Synchro (Amos manual page 202).
' We then enter the main loop. This loop controls the scroll text and
' the animation of the bobs over the rainbows to create the vu-meter effect.
' For a total description of how the scrolly text works see my program
' DUAL_PLAY.AMOS. The procedure stops when the end of TTEXT$ is reached
' as this causes FINI to become = to 1 and results in the repeat until
' loop finishing.
' Once the scroll finishes I delete all rainbows, close all screens
' fade out the music, erase any remaning memory banks and kill any bobs
' the procedure then ends and I start the initialisation process for the
' demo.
'
TTEXT$=" AAAAAAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGGG!!!!!!!!!!!! "
TTEXT$=TTEXT$+"WOTCHER GUYZ! I'M BACK..................YES UNCLE SIMES (THE OLD FART!) "
TTEXT$=TTEXT$+"IS BACK WITH ANOTHER PRODUCTION FOR ALL YOU CRAZED AMOS LOONIES TO RIP TO SHREDS "
TTEXT$=TTEXT$+"SO YOU CAN GET TO GRIPS WITH THIS AWESOME LANGUAGE!..........THIS IS AN INTRO "
TTEXT$=TTEXT$+"TO THE MAIN DEMO JUST SO THAT I CAN SAY A FEW HELLOS ETC. FIRST OF ALL EVERYTHING "
TTEXT$=TTEXT$+"ABOUT THIS INTRO AND THE MAIN DEMO IS EXPLAINED IN THE CODE....SO I WON'T "
TTEXT$=TTEXT$+"BOTHER EXPLANING ANYTHING HERE...................INSTEAD I WANT TO SAY THAT STING "
TTEXT$=TTEXT$+"HAS LOST HIS MARBLES AND STARTED SHOWING STRANGE FEELINGS OF AFFECTION "
TTEXT$=TTEXT$+"TOWARDS 386 BASED PC'S! SNAP OUT OF IT STING! YOUR WORKING TOO HARD MATE! REEEEEEEEEEELLLLLLAX "
TTEXT$=TTEXT$+"AND YOU WILL GET BETTER SOON (OTHERWISE IT'S BACK TO THE SCIENCE LAB!). "
TTEXT$=TTEXT$+"GREETINGS GO TO....AARON (WOTCHER CHIEF HOW'S LIFE DOWN THERE IN CIDER LAND?)."
TTEXT$=TTEXT$+"....SANDRA (GOOD TALKING TO YOU ON THE PHONE....GOT MY DISKS TA!)....ANNE AND LEN "
TTEXT$=TTEXT$+"(OVER WORKED AND UNDER PAID! HOPE YOU LIKE THIS ONE)....SOME OF THE POLY CREW...."
TTEXT$=TTEXT$+"MUM (THE MOT FAILURE....OOPS!)....SKIDDY AND SWEET CHEEKS....MATTY....JO....PACIFIC....RICK....JIM CAD...."
TTEXT$=TTEXT$+"JAX....ZOE....SAM....SARAH....MAJIC MUSHROOM....COLIN. GREETS TO....SYNTEX (BRILLIANT)....BITMAP...."
TTEXT$=TTEXT$+"HANISSIS V....BENSON....SPAGE....GARY (NICE ASSEMBLER GARRY 100 PERCENT! REAL SHAME ABOUT THE DOCS THOUGH!!!) "
TTEXT$=TTEXT$+"....RAY AT AMIGANUTS (GOT MY DISKS THANKS!) MARK MEANY ETC OF ACC (NOW THEY ARE REALLLLLLLY GOOD!!!) "
TTEXT$=TTEXT$+"..........HERE COMES THE NEXT BIT (LEFT BUTTOCK TO QUIT DEMO)....GOT TO DO SOME LOADING SO BE PATIENT! "
TTEXT$=TTEXT$+"SIMES OUT! "
LOCATION=0
SCRCOUNT=0
SCRSPEED=4
FINI=0
Screen 0
Def Scroll 1,0,0 To 384,22,-SCRSPEED,0
Wait Vbl
For SCR=0 To 2
Screen Show SCR
Next SCR
Amal On
Autoback 1
Synchro Off
Wait Vbl
Repeat
Scroll 1
Add SCRCOUNT,SCRSPEED
If SCRCOUNT>22
Inc LOCATION
SCRCOUNT=0
If LOCATION>Len(TTEXT$)
FINI=1
End If
Extension_8_0006 349,22,Mid$(TTEXT$,LOCATION,1)
End If
Wait Vbl
Synchro
Until FINI=1
Wait Vbl
Rainbow Del
For SCR=0 To 2
Screen Close SCR
Next SCR
MUZAK_DOWN
Erase 10
Erase 1
Bob Off
End Proc
Procedure INITIALISE_INTRO
' This procedure initialises the intro sequence. The following occurs
' 1] I call the MUSIC_UP[PARAM1,PARAM2] procedure so that we get some sounds.
' Notice that I have passed 2 parammeters to the procedure this time.
' The parameters are:-
' PARAM1] The name of the music file I wish to load "IN QUOTES".
' PARAM2] The tempo at which I want the music to be played #.
' 2] I call the procedure SET_INTRO_SCROLL. #
' 3] I call the procedure AMOS_INTRO_LOGO. #
' 4] I call the procedure SET_INTRO_VU_METERS. #
' 5] I call the procedure MOVE_INTRO_VU_METERS. #
Dreg(0)=Execall(-132)
MUZAK_UP["MUSIC/FAST_MUZAK.ABK",18]
SET_INTRO_SCROLL
AMOS_INTRO_LOGO
SET_INTRO_VU_METERS
MOVE_INTRO_VU_METERS
End Proc
Procedure SET_INTRO_SCROLL
' Ok first of all put a nice rainbow effect on the screen. This
' rainbow is set up so that it will show through any parts of the
' font that are in colour 1. See SET RAINBOW command Page 139
' of your Amos manual. You will note the colour value in the instruction
' if you set this to 0 then the rainbow will show anywhere that is colour 0
' and so on, obviously you shouldnt set this to 32 if you have only opened
' a 16 colour screen.
' Next I put a rainbow infront of the scroll to give the illusion of depth.
' Word of warning:- In Amos you CAN NOT have 2 different rainbows on the
' same scan line if you try to do this one of your rainbows will vanish.
' Now I open a screen 348(X) long by 22(Y) wide with 8 colours and hide it.
' I then call SET_SCREEN # to initialise the screen and then the FONT_SET #
' procedure to setup the CTEXT font. Finally I position the screen.
SCROL_RBOW
VU_FOREGROUND_RBOW
Screen Open 0,384,22,8,0
Screen Hide 0
SET_SCREEN
FONT_SET
Screen Display 0,128,240,320,
End Proc
Procedure AMOS_INTRO_LOGO
' I have done this in a slightly wierd way because I was lazy!
' First I load a SPRITE / BOB bank. I then open a screen & hide it
' I then call SET_SCREEN #. Next I get the palette of colours associated
' with the sprite bank. I then put a rainbow on the screen that only
' shows through colour 1 (see SET_INTRO_SCROLL procedure). I then paste
' individual BOBS onto the screen.
' I should have loaded this a a picture (either .IFF or .ABK) but as I
' had each letter in a sprite file I didn't bother converting them back
' to picture format. This however will give you the chance to see if you
' write some AMAL strings to bounce the letters up and down. Be careful
' or the scroll will flicker!
Load Dir$+"SPRITES/SIMES3_SPRITES.ABK"
Screen Open 1,320,48,8,0
Screen Hide 1
SET_SCREEN
Get Sprite Palette
AMOS_RBOW
Paste Bob 20,1,1
Paste Bob 57,1,2
Paste Bob 97,1,3
Paste Bob 134,1,4
Paste Bob 181,1,5
Paste Bob 218,1,3
Paste Bob 262,1,6
Paste Bob 290,21,7
End Proc
Procedure SET_INTRO_VU_METERS
' This simply opens a screen and positions it. The bit to notice is
' where the vu bob is actually drawn and grabbed off of the current
' screen and placed into the sprite bank as BOB number 8.
Screen Open 2,320,42,2,0
Screen Hide 2
Screen Display 2,128,136,320,
Palette $0,$0
Ink 1
Bar 0,0 To 160,18
Get Bob 8,0,0 To 160,18
SET_SCREEN
End Proc
Procedure MOVE_INTRO_VU_METERS
' This bit of code was originally written by CAPT Hickman in his
' AMOS DEMO II program. I have adapted it slightly to meet my
' requirements (NICE ONE SIR!).
' Right bit more complex this (don't panic). First Amreg(0) is set to
' = 12. Amreg like what's that..? ok Amos manual pages 193-194. Read them?
' ok so there are 26 registers (EXTERNAL REGISTERS 0-25) where Amreg(0)=RA,
' Amreg(1)=RB.......Amreg(25)=RZ. By Setting an amiga register to a specific
' value it becomes possible for us to reference the value from within an Amal
' string. Notice the Amal Move command (Manual Page 187) in each of the strings
' below. In every case the strings refrences RA/2 we know that RA=Amreg(0)
' we also know that in this case Amreg(0)=12, which means that every time
' the interpreter comes across RA/2 it substitutes the value 12 for RA and
' devides it by 2 which just happens to = 6. Why not just put 6 in the string
' instead? Well it's easier to change the Amreg(0)= command than to have to change
' 4 amal strings.
' Right I could go on to do a tutorial in amal at this point but I'm not going
' to unless enough people ask for one. If you have trouble understanding the
' Amal strings below read the chapter on amal in your manual, if your still
' stuck then write to me and I'll try to help.
' Final point DO NOT CONFUSE EXTERNAL REGISTERS WITH INTERNAL REGISTERS see Amos
' manual pages 181-182
' After setting up the amal strings I put 4 bobs on the screen and assign
' them an Animation channel. I then assign each channel one of the 4 amal
' strings to execute.
' Finally I put a rainbow on the screen. This is the rainbow over which the
' bobs move to produce the vu meter effect.
Amreg(0)=12
VU_1$=" Begin: Pause; Let R0=V(0);If R0=0 Jump Begin;"
VU_1$=VU_1$+"Move R0*2,0,RA/2; Move 0-R0*2,0,RA/2; ;P;P;P;P;P;P; Jump Begin;"
VU_2$=" Begin: Pause; Let R1=V(1);If R1=0 Jump Begin;"
VU_2$=VU_2$+"Move 0-R1*2,0,RA/2; Move R1*2,0,RA/2; ;P;P;P;P;P;P; Jump Begin;"
VU_3$=" Begin: Pause; Let R2=V(2);If R0=2 Jump Begin;"
VU_3$=VU_3$+"Move R2*2,0,RA/2; Move 0-R2*2,0,RA/2; ;P;P;P;P;P;P; Jump Begin;"
VU_4$=" Begin: Pause; Let R3=V(3);If R3=0 Jump Begin;"
VU_4$=VU_4$+"Move 0-R3*2,0,RA/2; Move R3*2,0,RA/2; ;P;P;P;P;P;P; Jump Begin;"
Bob 0,0,0,8
Bob 1,160,0,8
Bob 2,0,22,8
Bob 3,160,22,8
For LOP=0 To 3
Channel LOP To Bob LOP
Next LOP
Amal 0,VU_1$
Amal 1,VU_2$
Amal 2,VU_3$
Amal 3,VU_4$
VU_INTRO_RBOW
End Proc
' * MAIN DEMO PROCEDURE LEVEL CODE *
Procedure MAIN_DEMO
' This is the control loop for the main demo. The following occurs
' Set half-automatic screen copying mode. Make each screen visible
' and wait 100 * 1/50 of a second between showing each screen. Turn
' off automatic bob updating. Move screen 6 to front of the display
' (Amos manual page 129). Execute amal programs directly (synchro on
' Amos manual page 202). Activate all amal programs.
' The main loop deals with updating of the vu-meter and sime bobs. This
' is a double buffered display and conciquently requires manual synchro
' to produce a flicker free display in conjunction with all the amal programs
' (Amos manual pages 158-161).
' The process continues until the left mouse button is pressed. The system
' is then cleaned up, screens closed, memory banks erased and music
' turned off. The procedure then finishes and control returns to the main
' module where the End statement is encountered.
Wait Vbl
Wait Vbl
Autoback 1
For LOP=0 To 6
Screen Show LOP
Wait 100
Next LOP
Wait Vbl
Bob Update Off
Wait Vbl
Screen To Front 6
Wait Vbl
Synchro On
Wait Vbl
Amal On
Wait Vbl
Repeat
Screen Swap
Wait Vbl
Bob Clear
Bob Draw
Until Mouse Key=1
Amal Off
Rainbow Del
For LOP=0 To 6
Screen Close LOP
Wait Vbl
Next LOP
Wait Vbl
MUZAK_DOWN
Erase 1
Dreg(0)=Execall(-138)
End Proc
Procedure INITIALISE_DEMO
' This procedure sets up the environment ready to run the main demo.
' First I deactivate automatic bob updating (Amos manual page 161). I then
' Load some music and fade it in by calling MUSIC_UP[] # Procedure. The next
' next 4 procedure calls are to a procedure called SET_CLOUDS[]. This procedure
' is called with 4 parameters. The parameters are as follows.
' 1] FILE NAME "IN QUOTES"
' 2] SCREEN NUMBER
' 3] HEIGHT OF SCREEN (i.e Y value)
' 4] Y POSITION OF SCREEN (i.e display 15 down 40 down etc)
' I then set up the dual playfield that displays the Totally Amos logo
' and the mountains. I then animate the clouds by calling the procedure
' MOVE_CLOUDS. I then animate the dual playfield by calling MOVE_D_PLAY_FIELD
' finally I set up and animate the vu-meters. See each procedure for
' appropriate explination.
Bob Update Off
MUZAK_UP["MUSIC/TRUEFAITH_MUZAK.ABK",18]
SET_CLOUDS["PICS/CLOUDS_1.ABK",2,24,40]
SET_CLOUDS["PICS/CLOUDS_2.ABK",3,13,64]
SET_CLOUDS["PICS/CLOUDS_3.ABK",4,16,77]
SET_CLOUDS["PICS/CLOUDS_4.ABK",5,11,93]
SET_D_PLAYFIELD
MOVE_CLOUDS
MOVE_D_PLAY_FIELD
SET_VU_METERS
MOVE_VU_METERS
End Proc
Procedure SET_CLOUDS[FILE$,SCR,SCR_Y,SCR_DISPLAY_Y]
' This procedure is a good demonstration of just how usefull the
' ability to pass parameters can be, instead of having to write
' four seperate procedures I have done the job with one procedure
' and four IN PARAMETERS that is to say the parameters are passed
' into the procedure. Some of you may be confused about now so here
' is a quick explination of parameter passing.
' In the procedure INITIALISE_DEMO you will see the following line:-
' 1) SET_CLOUDS["CLOUDS_1.ABK",2,24,40]
' This is a call to this procedure (SET_CLOUDS) if you now look at the
' procedure declaration above you will notice some square brackets []
' in which there are a load of variable names separated by commas (,)
' i.e this :-
' 2) Procedure SET_CLOUDS[FILE$,SCR,SCR_Y,SCR_DISPLAY_Y].
' The values in the procedure call (1) are substituted into the empty
' variables in the procedure (2) in the order in which they appear!
' Diagramatically this can be represented thus:-
' 1) CLOUDS["CLOUDS_1.ABK",2 ,24 ,40]
' | | | |
' | | | |
' | | | |
' | | | |
' * * * *
' 2) Procedure SET_CLOUDS[FILE$ ,SCR,SCR_Y,SCR_DISPLAY_Y].
' Notice also that the receiving variavles have MEANINGFULL names it
' may seem a good idea to call your variables A1,A2,A3 etc but in 3
' weeks time you won't have a clue what they do and anyone reading
' your code will have a hell of a time trying to work out what you
' are doing!
' The procedure then uses the data held in these variables to carry
' out its job neat huh!. If anyone is still confused let Len or myself know
' and I'll do a tutorial on this subject.
' The actual job of this procedure is to load the correct cloud file
' and screen copy the data to the correct screen and display it at the
' correct screen position.
Load Dir$+FILE$,15
Unpack 15 To 7
Screen Hide 7
Screen Open SCR,640,SCR_Y,4,0
Screen Hide SCR
SET_SCREEN
Get Palette(7)
Screen Copy 7,0,0,320,30 To SCR,0,0
Screen Copy 7,0,0,320,30 To SCR,320,0
Erase 15
Screen Close 7
Screen Display SCR,128,SCR_DISPLAY_Y,320,
End Proc
Procedure SET_D_PLAYFIELD
' This procedure is my standard way of setting up a dual playfield
' for a good explination see my programs TRANS_SCROLL.AMOS &
' DUAL_PLAY.AMOS
Load Dir$+"PICS/MOUNTAINS2.ABK",15
Unpack 15 To 7
Screen Hide 7
Screen Open 0,640,54,8,0
Screen Hide 0
SET_SCREEN
Screen Copy 7,0,0,320,54 To 0,0,0
Screen Copy 7,0,0,320,54 To 0,320,0
Erase 15
Screen Close 7
Load Dir$+"PICS/TOT_AMOS.ABK",15
Unpack 15 To 7
Screen Hide 7
Screen Open 1,640,54,4,0
SET_SCREEN
Screen Copy 7,0,0,320,54 To 1,0,0
Screen Copy 7,0,0,320,54 To 1,320,0
Erase 15
Screen Close 7
Screen Display 0,128,104,320,
Screen Display 1,128,104,320,
Wait Vbl
Dual Playfield 0,1
Dual Priority 1,0
Screen 0
Palette $0,$FFF,$CDF,$AAF,$88F,$55F,$33F,$0,$0,$0,$0,$0
Wait Vbl
SKY_RBOW
End Proc
Procedure SET_VU_METERS
' This procedure is almost identicle to the procedure SET_INTRO_VU_METERS
' see that procedure for an explination of whats happening
Screen Open 6,218,64,2,0
Screen Hide 6
Screen Display 6,184,198,,64
Load Dir$+"SPRITES/PARALLAX_BOBS.ABK"
Wait Vbl
Palette $0,$0
Ink 1
Bar 0,0 To 48,64
Get Bob 2,0,0 To 48,64
SET_SCREEN
Double Buffer
VU_RBOW
VU_FOREGROUND_RBOW
End Proc
Procedure MOVE_CLOUDS
Shared CLOUD$()
' This procedure scrolls the clouds at the top of the screen. Notice that
' the same Amal string is assigned to each screen but a different speed
' is assigned each time. The speed is read from the data statement at the
' bottom of the procedure. Note Str$ converts the number held in
' in SCROLL_SPEED to a string (Amos manual page 59).
For LOP=0 To 3
Read SCROL_SPEED
Channel LOP+2 To Screen Offset LOP+2
CLOUD$(LOP)="Begin:Let X=320;Loop: Let X=X-"+Str$(SCROL_SPEED)+"Pause;"
CLOUD$(LOP)=CLOUD$(LOP)+"If X>0 Jump Loop; Jump Begin;"
Amal LOP+2,CLOUD$(LOP)
Next LOP
Data 8,5,4,2
End Proc
Procedure MOVE_D_PLAY_FIELD
' Previously I have moved dual playfields using hardware scrolling well
' this time I have used Amal to animate both the screens. Fairly self
' explinatory really.
MOUNTAIN$="Begin: Let X=320; Loop: Let X=X-1; Pause; If X>0 Jump Loop; Jump Begin;"
T_AMOS$="Begin:Let X=1; Loop: Let X=X+8; Pause; If X<320 Jump Loop; Jump Begin;"
Channel 0 To Screen Offset 0
Amal 0,MOUNTAIN$
Channel 1 To Screen Offset 1
Amal 1,T_AMOS$
End Proc
Procedure MOVE_VU_METERS
' See the procedure MOVE_INTO_VU_METERS for explination of this one.
' Note difference in Amal string Move command. ( X=0 here got it!)
Amreg(0)=10
VU_1$=" Begin: P; Let R0=V(0);If R0=0 Jump Begin;"
VU_1$=VU_1$+"Move 0,0-R0,RA/2; Move 0,R0,RA/2 ;P;P;P;P;P; Jump Begin;"
VU_2$=" Begin: P; Let R1=V(1);If R1=0 Jump Begin;"
VU_2$=VU_2$+"Move 0,0-R1,RA/2; Move 0,R1,RA/2; P;P;P;P;P; Jump Begin;"
VU_3$=" Begin: P; Let R2=V(2);If R0=2 Jump Begin;"
VU_3$=VU_3$+"Move 0,0-R2,RA/2; Move 0,R2,RA/2; P;P;P;P;P; Jump Begin;"
VU_4$=" Begin: P; Let R3=V(3);If R3=0 Jump Begin;"
VU_4$=VU_4$+"Move 0,0-R3,RA/2; Move 0,R3,RA/2; P;P;P;P;P; Jump Begin;"
' The 2 Amal strings Sime1$ and Sime2$ are responsible for the animated
' sime bob that appears infront of the vu meters (infront of the vu bobs
' because they have a higher priority than the vu bobs. Amos manual page
' 174.
SIME1$=" Begin: Move 154,0,20; Move -154,0,20; Move 77,0,20;"
SIME1$=SIME1$+"For RB=1 To 50; Pause; Next RB; Move 0,-25,12;"
SIME1$=SIME1$+"Move 0,50,12; Move 0,-50,12; Move 0,25,12;"
SIME1$=SIME1$+"Move -77,0,20; Pause; Pause; Jump Begin;"
SIME2$=" Begin: Move -154,0,20; Move 154,0,20; Move -77,0,20;"
SIME2$=SIME2$+"For RB=1 To 50; Pause; Next RB; Move 0,25,12;"
SIME2$=SIME2$+"Move 0,-50,12; Move 0,50,12; Move 0,-25,12;"
SIME2$=SIME2$+"Move 77,0,20 ;Pause; Pause; Jump Begin;"
Hot Spot 1,$11
Bob 0,32,32,1
Bob 1,186,32,1
Bob 2,5,62,2
Bob 3,58,62,2
Bob 4,111,62,2
Bob 5,164,62,2
For LOP=0 To 5
Channel LOP+6 To Bob LOP
Next LOP
Amal 6,SIME1$
Amal 7,SIME2$
Amal 8,VU_1$
Amal 9,VU_2$
Amal 10,VU_3$
Amal 11,VU_4$
End Proc
' * GENERAL PROCEDURE LEVEL CODE *
Procedure MUZAK_UP[NAME$,TMPO]
' Loads the piece of music passed to it in the string NAME$ and plays
' it at the tempo passed to it in the variable TMPO. Gradually fades
' the music in.
Load Dir$+NAME$
Wait 1
Mvolume 0
Music 1
Led Off
Tempo TMPO
For VOL=0 To 63
Wait 6
Mvolume VOL
Next VOL
End Proc
Procedure MUZAK_DOWN
' Slowly fades out the current piece of music.
For VOL=63 To 0 Step -1
Wait 3
Mvolume VOL
Next VOL
Music Off
Erase 3
Wait Vbl
End Proc
Procedure SET_SCREEN
' Simple screen set procedure. stops flash effects, turns the cursor off
' hides the mouse pointer and clears the screen to colour 0
Flash Off
Curs Off
Hide On
Cls 0
End Proc
Procedure FONT_SET
' This procedure sets up the system so it can use CTEXT fonts. If you
' want to know more about CTEXT get a copy of Feburary 1992's Amiga
' Shopper, turn to page 109 and read Phil South's AMOS ACTION collum.
Load Dir$+"FONTS/TRANS_FNT2.ABK"
No Icon Mask
Get Icon Palette
Bank Swap 2,10
Wait 1
Bload Dir$+"FONTS/TRANS_FNT2.ABK.CFNT", Extension_8_0044
Extension_8_0016 0,0
Erase 2
Wait Vbl
End Proc
Procedure SCROL_RBOW
' Rainbow for intro scroll text will appear on screen anywhere that
' colour 1 is used. Created using Spages Rainbow Warrior Prog.
Set Rainbow 0,1,36,"","",""
Rainbow 0,0,226,36
Colour Back 0
Restore RDATA
For C=0 To 35
Read CVA
Rain(0,C)=CVA
Next C
View
RDATA:
Data $0,$0,$0,$0,$0,$0,$D5F,$D5F
Data $D5F,$D5F,$C5F,$C5F,$C5F,$C5F,$B5F,$B5F
Data $B5F,$B5F,$A5F,$A5F,$A5F,$A5F,$95F,$95F
Data $95F,$95F,$85F,$85F,$85F,$85F,$75F,$75F
Data $75F,$75F,$65F,$65F
End Proc
Procedure AMOS_RBOW
' Rainbow for AMOS NO 1. Logo in intro will appear on screen
' anywhere that colour 1 is used. Created using Spages Rainbow Warrior
' prog.
Set Rainbow 1,1,115,"","",""
Rainbow 1,0,0,100
Colour Back 0
Restore RDATA
For C=0 To 114
Read CVA
Rain(1,C)=CVA
Next C
View
RDATA:
Data $EFF,$EFF,$EFF,$DFF,$DFF,$CFF,$CFF,$BFF
Data $BFF,$AFF,$AFF,$9FF,$9FF,$8FF,$8FF,$7FF
Data $7FF,$6FF,$6FF,$5FF,$5FF,$4FF,$4FF,$3FF
Data $3FF,$2FF,$2FF,$1FF,$1FF,$EF,$EF,$DF
Data $DF,$CF,$CF,$BF,$BF,$AF,$AF,$9F
Data $9F,$8F,$8F,$7F,$7F,$6F,$6F,$5F
Data $5F,$4F,$4F,$3F,$3F,$2F,$2F,$1F
Data $1F,$1F,$12F,$1F,$1F,$1F,$2F,$2F
Data $3F,$3F,$4F,$4F,$5F,$5F,$6F,$6F
Data $7F,$7F,$8F,$8F,$9F,$9F,$AF,$AF
Data $BF,$BF,$CF,$CF,$DF,$DF,$EF,$EF
Data $1FF,$1FF,$2FF,$2FF,$3FF,$3FF,$4FF,$4FF
Data $5FF,$5FF,$6FF,$6FF,$7FF,$7FF,$8FF,$8FF
Data $9FF,$9FF,$AFF,$AFF,$BFF,$BFF,$CFF,$CFF
Data $DFF,$DFF,$EFF,$EFF,$EFF,$0,$0,$0
End Proc
Procedure SKY_RBOW
' Rainbow for background of dual playfield in main demo will appear on
' screen anywhere that colour 0 is used. Created using Spages Rainbow
' Warrior prog and changed by hand.
Set Rainbow 0,7,56,"","",""
Rainbow 0,0,103,56
Colour Back 0
Restore RDATA
For C=0 To 55
Read CVA
Rain(0,C)=CVA
Next C
View
RDATA:
Data $11E,$11E,$11E,$11E,$22E,$22E,$22E,$22E
Data $33E,$33E,$33E,$33E,$44E,$44E,$44E,$44E
Data $55E,$55E,$55E,$55E,$66E,$66E,$66E,$66E
Data $77E,$77E,$77E,$77E,$88E,$88E,$88E,$88E
Data $99E,$99E,$99E,$99E,$AAE,$AAE,$AAE,$AAE
Data $BBE,$BBE,$BBE,$BBE,$CCF,$CCF,$CCF,$CCF
Data $DDE,$DDE,$DDE,$DDE,$EEF,$EEF,$EEF,$EEF
End Proc
'
Procedure VU_RBOW
' Rainbow for vu-meters in main demo will appear on screen anywhere
' that colour 1 is used i.e bobs are drawn in colour 1. Created using
' Spages Rainbow Warrior prog.
Set Rainbow 1,1,64,"","",""
Rainbow 1,0,198,64
Colour Back 0
Restore RDATA
For C=0 To 63
Read CVA
Rain(1,C)=CVA
Next C
View
RDATA:
Data $F6F,$F6F
Data $F5F,$F5F,$F5F,$F5F,$F3F,$F3F,$F3F,$F3F
Data $F2F,$F2F,$F2F,$F2F,$F1F,$F1F,$F1F,$F1F
Data $F0F,$F0F,$F0F,$E0F,$E0F,$E0F,$E0F,$D0F
Data $D0F,$D0F,$C0F,$C0F,$C0F,$C0F,$C0F,$B0F
Data $B0F,$B0F,$B0F,$A0F,$A0F,$A0F,$A0F,$90F
Data $90F,$90F,$90F,$80F,$80F,$80F,$80F,$70F
Data $70F,$70F,$70F,$60F,$60F,$60F,$60F,$50F
Data $50F,$50F,$40F,$40F,$40F,$40F
End Proc
Procedure VU_INTRO_RBOW
' Rainbow for vu-meters in in will appear on screen anywhere
' that colour 0 is used i.e bobs are drawn in colour 1 placed over
' the top of the rainbow so it can not be seen. When annimated the bobs
' move off the rainbow which as a result appears on the screen. Created
' using Spages Rainbow Warrior prog.
Set Rainbow 3,0,42,"","",""
Rainbow 3,0,135,42
Colour Back 0
Restore RDATA
For C=0 To 41
Read CVA
Rain(3,C)=CVA
Next C
View
RDATA:
Data $0,$0,$406,$507,$608,$709,$80A,$90B
Data $A0C,$B0D,$B0D,$A0C,$90B,$80A,$709,$608
Data $507,$406,$0,$0,$0,$0,$0,$5
Data $6,$7,$8,$109,$20A,$30B,$40C,$50D
Data $50D,$40C,$30B,$20A,$109,$8,$7,$6
Data $5,$0,$0,$0,$0,$0,$0,$0
End Proc
Procedure VU_FOREGROUND_RBOW
' Used to display rainbow effect in foreground of main demo to give
' illusion of depth. Appears through colour 0. Created using Spages
' Rainbow Warrior Prog.
Set Rainbow 2,0,58,"","",""
Rainbow 2,0,262,58
Colour Back 0
Restore RDATA
For C=0 To 57
Read CVA
Rain(2,C)=CVA
Next C
View
RDATA:
Data $9,$A,$A,$A,$A,$B,$B,$B
Data $B,$11C,$11C,$11C,$11C,$22D,$22D,$22D
Data $22D,$33E,$33E,$33E,$44F,$44F,$44F,$44F
Data $55F,$55F,$55F,$55F,$66F,$66F,$66F,$66F
Data $77F,$77F,$77F,$77F,$88F,$88F,$88F,$88F
Data $99F,$99F,$99F,$99F,$AAF,$AAF,$AAF,$AAF
Data $BBF,$BBF,$BBF,$BBF,$CCF,$CCF,$CCF,$CCF
Data $DDF,$DDF
End Proc