Amos Professional Manual  Contents  Index

Screen Effects


Fade effects are executed using interrupts, so it is sensible to wait until the fade has ended before going on to the next program instruction. The length of wait required can be calculated with this formula:

wait = fade speed * 15

So that last example is sure to work with the rest of your program if the third line is changed to this:

E> Fade 5 : Wait 75

By adding a list of colour values, the fade effect will generate a new palette directly from your list, and it is used like this:

E> Flash Off : Curs Off
   Centre "RED SKY AT NIGHT"
   Fade 10,$100,$F00,$300
   Wait 150

Any number of new colours can be set up like this, depending on the maximum number allowed in your current screen mode. Any settings that are omitted will leave those colours completely unaffected by the fade, as long as you include the right number of commas. For example:

E> Fade 5,,$100,,,$200,$300

There is an even more powerful use of the FADE command, which takes the palette from another screen and fades it into the colours of the current screen. Set the speed of the fade as usual, then give the number of the screen whose palette is to be accessed. By using a negative number instead of a screen number, the palette from the sprite bank will be loaded instead.

There is one more parameter that can be added, and this creates a mask that only permits certain colours to be faded in. Each colour is associated with a single bit in the pattern, numbered from 0 to 15, and any bit that is set to 1 will be affected by a colour change. For example:

E> Load "AMOSPro_Tutorial:Objects/Bobs.Abk"
   Screen Open 1,320,90,16,Lowres
   Flash Off : Get Object Palette
   Paste Bob 100,0,1
   Wait 100
   Fade 1 To 0,%01111000011001010
   Wait 15

Flashing colours
You will already be aware that colour index number 3 is pre-set to flash on and off, and is the

Back    Next
06.03.02