#include "commun.h"

extern unsigned short *adresse_palettes[12] EWRAM_DATA;
extern char pal_utilisees[12] EWRAM_DATA;

u32 IWRAM_CODE AjPalette(const unsigned short *palette)
{
	u32 i;
	for (i = 0; i < 12; i++)
	{
		if (adresse_palettes[i] == palette)
		{
			pal_utilisees[i] = 2;
			return i;
		}
	}

	return CreeNouvellePalette(palette, -1);
}

