#ifndef _TEXT_H_
#define _TEXT_H_

#ifdef _TEXT_INTERNAL_
	// Character height
	#define HAUTEUR 11
	extern const unsigned char txt_tailles[];
	extern const unsigned char txt_texte[];

	//Move a pointer vertically or horizontaly on the sprite plane
	#define HLINES(y)        (((y) << 3) * txt_hauteur)
	#define HTILES(y)        ((y) * txt_hauteur)
#endif

//#define CLS() memset((void*)SCREEN_BASE_BLOCK(28),0,(256*256*2)/(8*8))
#define CLS() _memset((void*)SCREEN_BASE_BLOCK(28),&zero,(256*256*2)/(8*8))

extern void DessTexte(int x, int y, char *texte);
extern void printf_xy(int x, int y, const char *format, ...);
extern void Message(int ligne, const char *format, ...);
extern void Alerte(const char *format, ...);
extern void Bloque(const char *format, ...);
extern void Attention(const char *format, ...);

#define Debug Alerte

extern void Texte_init(u32 x, u32 y, u32 largeur, u32 hauteur, u16 *map, u32 offset);
extern void IWRAM_CODE EcritCar(u32 x, u32 y, const u8 *motifs, u32 couleur);
extern void IWRAM_CODE DrawText(u32 x, u32 y, const char *chne, u32 couleur);

extern const unsigned char txt_tailles[];
extern const unsigned char txt_texte[];
extern u32 *txt_adresse;
//Width, height of the sprite plane (in tiles).
extern int txt_largeur, txt_hauteur;
extern u8 EWRAM_DATA txt_buffer[600*32];
extern void ErreurFatale(const char *endroit, const char *format, ...);

// Faster than sprintf
extern void formatString(char *dest, const char *format, ...);

#endif
