home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 047.lha / WbLander / dumpsprite.c < prev    next >
C/C++ Source or Header  |  1986-11-20  |  685b  |  28 lines

  1. #include <intuition/intuition.h>
  2. #define INTUITION_REV 1 
  3. struct IntuitionBase *IntuitionBase;
  4.  
  5. main()
  6. {
  7.     struct Preferences prefs;
  8.     int i;
  9.  
  10.     IntuitionBase = (struct IntuitionBase *)OpenLibrary("intuition.library", INTUITION_REV);
  11.     if( IntuitionBase == NULL )
  12.     {
  13.         puts("can't open intuition\n");
  14.         exit(-1);
  15.     }
  16.  
  17.     GetPrefs(&prefs, sizeof prefs);
  18.     printf("USHORT sprite_colors[3] = { 0x%04x, 0x%04x, 0x%04x };\n",
  19.         prefs.color17, prefs.color18, prefs.color19);
  20.     printf("USHORT sprite[%d] = {\n", POINTERSIZE);
  21.     for(i = 0; i < POINTERSIZE; i += 2)
  22.         printf("\t0x%04x, 0x%04x%s\n",
  23.             prefs.PointerMatrix[i],
  24.             prefs.PointerMatrix[i+1],
  25.             (i+2<POINTERSIZE)?",":"");
  26.     printf("};\n");
  27. }
  28.