//Defines
#define powerups_tiles                Pal_2_16x16_tiles
#define powerups2_tiles                (Pal_2_32x32_tiles + 5 * 32 * 16)
#define piquant_tiles                Pal_2_8x8_tiles
#define pont_tiles                        Pal_3_16x16_tiles
#define pf_croulante_tiles        (Pal_3_8x8_tiles + 64 * 16)

//Variables
//extern int perso_ancienX, perso_ancienY;
//Handlers
extern void hRoller(SONIC *s, PERSO *p, u32 msg);
extern void hPont(SONIC *s, PERSO *p, u32 msg);
extern void hBumper(SONIC *s, PERSO *p, u32 msg);
extern void hPlateForme(SONIC *s, PERSO *p, u32 msg);
extern void hPFCroulante(SONIC *s, PERSO *p, u32 msg);
extern void hExplosion(SONIC *s, PERSO *p, u32 msg);
extern void hBaguePrise(SONIC *s, PERSO *p, u32 msg);
extern void hBaguePerdue(SONIC *s, PERSO *p, u32 msg);
extern void hBague(SONIC *s, PERSO *p, u32 msg);
extern void hPiques(SONIC *s, PERSO *p, u32 msg);
extern void hBalancier(SONIC *s, PERSO *p, u32 msg);
extern void hPABalancier(SONIC *s, PERSO *p, u32 msg);
extern void hPFBalancier(SONIC *s, PERSO *p, u32 msg);
extern void hTele(SONIC *s, PERSO *p, u32 msg);
extern void hTelePrise(SONIC *s, PERSO *p, u32 msg);
extern void hNul(SONIC *s, PERSO *p, u32 msg);
extern void hBorne(SONIC *s, PERSO *p, u32 msg);
extern void hBuzzbomber(SONIC *s, PERSO *p, u32 msg);
extern void hEnboule(SONIC *s, PERSO *p, u32 msg);
extern void hRocher(SONIC *s, PERSO *p, u32 message);
extern void hCrabbot(SONIC *s, PERSO *p, u32 message);
extern void hPirhanabot(SONIC *s, PERSO *p, u32 message);
extern void hBumperHoriz(SONIC *s, PERSO *p, u32 message);
extern void hGHPoteauMD(SONIC *s, PERSO *p, u32 message);
extern void hCameleon(SONIC *s, PERSO *p, u32 message);
extern void hCameleon2(SONIC *s, PERSO *p, u32 message);
extern void hPiqueBois(SONIC *s, PERSO *p, u32 message);
extern void hCameraViewport(SONIC *s, PERSO *p, u32 message);
extern void hCameraViewportEtendu(SONIC *s, PERSO *p, u32 message);
extern void hBossGHZ(SONIC *s, PERSO *p, u32 message);
extern void hArrivee(SONIC *s, PERSO *p, u32 message);
extern void hColonneARZ(SONIC *s, PERSO *p, u32 message);
extern void hHandrill(SONIC *s, PERSO *p, u32 message);
extern void hLanceFleches(SONIC *s, PERSO *p, u32 message);
extern void hHandrillCreux(SONIC *s, PERSO *p, u32 message);
extern void hMinibumperARZ(SONIC *s, PERSO *p, u32 message);

#define DECLARE(nom)        extern void nom(SONIC * s, PERSO * p, u32 message)
DECLARE(hBunBun);
DECLARE(hPirhana);
DECLARE(hPFCroulanteARZ);
DECLARE(hColonneTombante);
DECLARE(hBoutColonneTombante);
DECLARE(hBulleAir);
DECLARE(hBulleSousEau);
DECLARE(hPlafEau);
DECLARE(hBoutColonne);
DECLARE(hPlateFormePlus);
DECLARE(hSpiner);
DECLARE(hBalancierRond);
DECLARE(hBossARZ);
DECLARE(hExplosionBotnik2);
extern void DessineEau();

//hr -> Handlers rotation
extern void hrBague(SONIC *s, PERSO *p, u32 message);

extern void DetruitPerso(PERSO *p);
extern void InserePerso(int nombre);
extern void Perso_creve(PERSO *p);
extern u32 gcNul(PERSO *p, SONIC *s, u32 type);
extern u32 gcEnnemiSimple(PERSO *p, SONIC *s, u32 type);
extern void InitCollisions(PERSO *p);
extern void hCollision(SONIC *s, PERSO *p, u32 (*Gestionnaire) (PERSO *, SONIC *, u32), u32 masque);

extern s16 cameraViewportPriorite, cameraViewportHighestPriorite;
extern void FinDeNiveau(SONIC *s, int cpt);

#define CalcVirgule(x, virgule) \
        if (virgule <= -256) \
        { \
                x += (virgule) / 256; \
                virgule = (virgule) % 256; \
        } \
        if (virgule >= 256) \
        { \
                x += (virgule) >> 8; \
                virgule &= 0xff; \
        }
