Effects

[Texture mapping] [Fading] [Moving Plasma] [Plasma] [Waterfall]

This page contains source code demonstrating certain special effects such as those found in the demos of old.

Affine texture mapping

Screen shot

This source code demonstrates how to project a bitmap onto a four-side polygon. Note: this is not the fastest, nor best code for this. Just an example so you can see how it works and use it as a guide to building your own. It was made for readability rather than speed.

To download the Pascal source code (2k), click here.
To download the C source code (2k), click here.

Fading

Source code to fade out the current palette or fade in another one.
Note: If you use Microsoft C, please download the Delay routine.

To download the Pascal source code (1k), click here.
To download the DJGPP/C(++) source code (1k), click here.

Moving plasma

Screen shot

Some code to generate the swirly "plasma patterns".

To download the Pascal source code (2k), click here.
To download the C source code (2k), click here.

Plasma clouds

Screen shot

Some code to generate the cloud-like "plasma fractals" used for clouds, heightscapes and the like.

To download the Pascal source code (2k), click here.
To download the C source code (2k), click here.

"Waterfalls"

Screen shot

Source code to display something looking a bit like rain or a waterfall.
Thanks to Jose Luis Perandones Colino for helping in the conversion to DJGPP.

To download the Pascal source code (1k), click here.
To download the DJGPP/C(++) source code (1k), click here.