You want to generate what kind of image?
Say you want to generate them into 20x20 image.
First of all, you need to know the ASCII code for the initial character. If you want to start from A, then it's 65 (if I'm not mistaken).
- Code: Select all
void GenerateImage(char str[256], int startX, int startY)
{
int i,j;
for(i=0;i<strlen(str);i++)
{
j=(int)str[i];
CreateActor("ImageActor", "Animation", "(none)", "(none)", startX+i*20, startY, true);
ImageActor.animpos=j-65;
}
}
Usage:
- Code: Select all
GenerateImage("Hello", view.x+20, view.y+20);
The string should produce images depending on what image you use and their animpos.