home *** CD-ROM | disk | FTP | other *** search
- /*
- ** AGA Fade Demo
- ** -------------
- ** Fades in a 32 colour AGA picture (24 bit colour). Then up to a specified
- ** colour (greenish yellow), and then out to black.
- */
-
- #include <proto/games.h>
- #include <proto/exec.h>
-
- struct GMSBase *GMSBase;
- extern struct ExecBase *SysBase;
-
- #define AMT_PLANES 5
-
- ULONG Palette[] =
- {
- 0x000000,0x080808,0x101010,0x191919,0x212121,0x292929,0x313131,
- 0x3A3A3A,0x424242,0x4A4A4A,0x525252,0x5A5A5A,0x636363,0x6B6B6B,
- 0x737373,0x7B7B7B,0x848484,0x8C8C8C,0x949494,0x9C9C9C,0xA5A5A5,
- 0xADADAD,0xB5B5B5,0xBDBDBD,0xC5C5C5,0xCECECE,0xD6D6D6,0x7F7F7F,
- 0x9B9B9B,0x707070,0x444444,0x1E1E1E
- };
-
- struct Picture GamePic =
- {
- PCV1, /* Version header */
- 0, /* Destination */
- 320,0,256, /* Width, Height */
- AMT_PLANES, /* Amount of Planes */
- 32, /* Amount of colours */
- Palette, /* Palette */
- LORES|COL24BIT, /* Screen mode */
- 0, /* Destination */
- 0, /* Parameters */
- "GAMESLIB:data/IFF.Loading"
- };
-
- /*=========================================================================*/
-
- void main(void)
- {
- int FState=0;
- struct GameScreen *GameScreen;
-
- GMSBase = (struct GMSBase *) OpenLibrary("games.library", 0);
- SetUserPrefs(0);
-
- if (GameScreen = AddScreenTags(TAGS,NULL,
- GSA_Planes,AMT_PLANES,
- GSA_ScrMode,LORES|COL24BIT,
- GSA_ScrWidth,320,
- GSA_ScrHeight,256,
- GSA_ScrType,INTERLEAVED,
- TAGEND)) {
-
- GamePic.Data = GameScreen->MemPtr1;
- GamePic.ScrType = GameScreen->ScrType;
- if (LoadPic(&GamePic) == NULL) {
- ShowScreen(GameScreen);
-
- do
- {
- WaitSVBL();
- FState = ColourToPalette(GameScreen,FState,2,0,32,Palette,0x000000);
- } while (FState != NULL);
-
- do
- {
- WaitSVBL();
- FState = PaletteToColour(GameScreen,FState,2,0,32,Palette,0xa5f343);
- } while (FState != NULL);
-
- do
- {
- WaitSVBL();
- FState = ColourMorph(GameScreen,FState,2,0,32,0xa5f343,0x000000);
- } while (FState != NULL);
-
- }
- DeleteScreen(GameScreen);
- }
- CloseLibrary((struct Library *)GMSBase);
- }
-
-