Versão:
3.10
Data:
22/05/2011
Log:
- Adicionando suporte de texturas até 4096 pixel (Requisitado por Jamie Woodhouse);
- Corrigindo a compilação para o encode iso8859;
3.10
22/05/2011
Como usar o F2IBuilder em suas aplicações.
/* * F2IBuilder - Font to Image Builder * Example with SDL - Loading fonts generated for F2IBuilder * Exemplo com SDL - Carregando fontes geradas pelo F2IBuilder */
void write(const char * WORDS, int X, int Y)
{
int i,t=strlen(WORDS);
unsigned char l;
position.x=X; //screen x
position.y=Y; //screen y
for (i=0; i<t; i++){
l=WORDS[i];
width.x=(l%16)*sizeChar.w; width.w=width[l];
width.y=(l/16)*sizeChar.h; width.h=sizeChar.h;
gsScreen->blitSurface(image,&width,&position);
position.y=Y;
position.x=position.x+width[l];
}
}
//Global our member of class
char width[256];
void load(std::string fileimage)
{
FILE *file;
std::string txt="";
image = IMG_Load(fileimage.c_str());
if (image!=NULL){
txt=fileimage.substr(0,fileimage.length()-4);
txt+=".dat";
file = fopen(txt.c_str(),"rb");
fread(&width, 256, 1, file);
fclose(file);
}
}
| © 2011 F2IBuilder - Font to Image Builder - Free Software. | DukItan Software & Games | Suffusion theme by Sayontan Sinha |