Screen Fade Routines
by Phill Kent, J H Mudd and Glynn Clements

This program demonstrates a number of routines for changing between two screens. When run, the program clears the screen, then repeatedly changes between two screens using a number of special fades.

The program initially selects mode 12, sets the palette !Fade.Palette and loads in the two screens contained in the files !Fade.Screen1 and !Fade.Screen2. These screens are raw data files (obtained by *SAVEing the screen memory), not sprite files. The program !Fade.Convert converts sprite files into raw data files.

The program then repeatedly runs through a sequence of fades until Escape is pressed; the program will terminate after the current fade has been completed.

The Scroll and Bounce fades are described in this month's magazine (RISC User, Volume 4 Issue 6, page 30). The Sizzle fade is assembled by PROCassemble2, and called by PROCsizzle(new%), where new% is the start address of the screen to be faded in.

The Crossfade is assembled by PROCassemble3, and called by PROCxfade(new%, step%, delay%), where new% is the start address of the screen to be faded in, step% controls the appearance of the fade, and delay% controls the speed. The fade works by replacing a byte of screen memory with a byte from the new screen, then advancing the pointer by step% bytes. The effect of this is that if step% and the screen size (81920 bytes) have any common factors, the fade will not be complete.

The pictures are courtesy of Clares' Artisan.
