(1 / 1)
Date: June 07, 1990 12:28
From: BERT::SHOOZ
To: @SYS$MAIL:ENGINEER
We have created what I believe to be a fairly useful general utility to do color animation (flashing & rotate) in a very painless yet speedy fashion. If you are interested, the set of routines you need will allow to start an individual color flashing in any palette, or a contiguous group of colors rotating in any palette. The rate of update and, for rotates, the direction of rotation can be set at initialization. Multiple animations can be going on in the same or different palettes. The rotuine to be called during VBLANK is written in assembly and optimized for speed. Starting an animation requires only one C level function call. Individual animations can be killed by a C level call, or all current animations can be killed by one call. All necessary initialization routines have been provided. The flashing routines are set up for IRGB where: I is bit 15 of the color word R is bits 14-10 of the color word G is bits 9-5 of the color word B is bits 4-0 of the color word This code is easily modified for other color configurations. The code assumes that each entry in any palette is one word (16 bits). It should work for any size palette with slight modification, but it has only been tested on 16 color palettes. The C rotuines need to have typdefs for U8 ... S32, as well as approriate hardware locations. The asm code needs to have the definitions for SWITCH1 and SLFTST. You need the following three files, all which are in ee$ useridsk:[shooz] canim.c structs.h canimasm.asm Good Luck, - Ed -
Jun 07, 1990