home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
047.lha
/
WbLander
/
dumpsprite.c
< prev
next >
Wrap
C/C++ Source or Header
|
1986-11-20
|
685b
|
28 lines
#include <intuition/intuition.h>
#define INTUITION_REV 1
struct IntuitionBase *IntuitionBase;
main()
{
struct Preferences prefs;
int i;
IntuitionBase = (struct IntuitionBase *)OpenLibrary("intuition.library", INTUITION_REV);
if( IntuitionBase == NULL )
{
puts("can't open intuition\n");
exit(-1);
}
GetPrefs(&prefs, sizeof prefs);
printf("USHORT sprite_colors[3] = { 0x%04x, 0x%04x, 0x%04x };\n",
prefs.color17, prefs.color18, prefs.color19);
printf("USHORT sprite[%d] = {\n", POINTERSIZE);
for(i = 0; i < POINTERSIZE; i += 2)
printf("\t0x%04x, 0x%04x%s\n",
prefs.PointerMatrix[i],
prefs.PointerMatrix[i+1],
(i+2<POINTERSIZE)?",":"");
printf("};\n");
}