#include "commun.h"

extern unsigned short EWRAM_DATA PaletteNormale[512], PaletteEau[512];
extern unsigned short EWRAM_DATA PaletteNormaleSauv[512], PaletteEauSauv[512];

extern int sauve_saved;
extern int sauve_sonX, sauve_sonY, sauve_temps;
extern int niveau_reel_eau, niveau_reel;

extern void IWRAM_CODE EcritCarSave(int c);
extern void EcritDataSave(void *donnees, int taille);
extern void IWRAM_CODE LitDataSave(void *donnees, int taille);
extern void SaveState(SONIC *s);
extern void LoadState(SONIC *s);

//Méthode: Alpha-blend
//extern void CreePaletteSousEau();
extern void CreePaletteSousEau(unsigned short *src, unsigned short *dst1, unsigned short *dst2, int taille);
extern void GereSonicMort(SONIC *s);

extern int fade;
extern void Quitte();

extern void AssombritPalette(unsigned short *dst, unsigned short *src, s32 valeur);
extern void FadeOut(unsigned short *dst, unsigned short *src, s32 taille);
extern void FadeIn(unsigned short *dst, unsigned short *src, s32 taille);
extern void GereFade();
extern void GereFadeBlanc();

extern u32 IWRAM_CODE AjPalette(const unsigned short *palette);
extern void GestionnairePalette();
extern void InitSysPalettes();
extern void MajSysPalettes();
