void lay_font(char * textptr)
{
int i, j;//
BYTE pixelData[5]; // Stores character data
for(i=0; textptr[i] != '\0'; ++i ) // Loop through the passed string
{
if(textptr[i] == '#')//textptr khai bao vi tri con tro
break;
if(textptr[i] < 'S') //ky tu nam o mang text
memcpy(pixelData, TEXT[textptr[i]-' '], 5);//copy 5 byte gia tri text[textptr[i]-'' vao pixeldata
else if(textptr[i] <= '~') // ky tu nam o mang text2
memcpy(pixelData, TEXT2[textptr[i]-'S'], 5);//copy 5 byte gia tri text2[textptr[i]-'s' vao pixeldata
else
memcpy(pixelData, TEXT[0], 5); // khoang trang
for(j=0;j<=4;j++)
{
hien_thi[chieu_dai]=(pixelData[j]);//hien thi 5 byte da copy
chieu_dai++;
mình giải thích vậy hợp lý không tdm
còn 1 dòng mình không hiểu là
BYTE pixelData[5]; // Stores character data
nghĩa là gì vậy tdm
với khai báo char * textptr nghĩa là gì vậy
|