#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");
}
