home *** CD-ROM | disk | FTP | other *** search
- /*
- ** AGA Colourlist Demo
- ** -------------------
- ** Displays an AGA colourlist (24 bit colour lines).
- **
- ** To exit the demo, press the left mouse button.
- */
-
- #include <proto/games.h>
- #include <proto/exec.h>
-
- struct GMSBase *GMSBase;
- extern struct ExecBase *SysBase;
-
- LONG ColourList[257];
-
- LONG RasterList[] = {
- COL24LIST(0,1,0,ColourList),
- RASTEND
- };
-
- /*=========================================================================*/
-
- void main(void)
- {
- struct GameScreen *GameScreen;
- UWORD i;
-
- if (GMSBase = (struct GMSBase *) OpenLibrary("games.library",0)) {
- SetUserPrefs(0);
-
- /* Generate our colourlist */
-
- for (i=0; i<257; i++) {
- ColourList[i] = i<<16;
- } ColourList[i] = -1;
-
- /* Initialise our screen */
-
- if (GameScreen = AddScreenTags(TAGS,NULL,
- GSA_Planes,1,
- GSA_RasterList,RasterList,
- GSA_ScrMode,LORES|COL24BIT,
- GSA_ScrWidth,320,
- GSA_ScrHeight,256,
- GSA_ScrType,ILBM,
- TAGEND)) {
-
- ShowScreen(GameScreen);
- WaitLMB();
- DeleteScreen(GameScreen);
- }
- CloseLibrary((struct Library *)GMSBase);
- }
- }
-
- /*=========================================================================*/
-
-