I'm making this text demo for the GBA. Anways I'm making this function to convert ASCII character to my characters. For some reason when I try to generate a string using this function all of my image data gets overwritten. Well, here is the code for that function:
u16 and u8 are just typdefs for unsigned short and unsigned char. Is there anything here that is kinda funny? I know the problem isn't my method of writing the data since I converted some strings manually and everything went just fine. Thanks for your help!Code:u16 * ascii_to_mine(const char * str, const u8 len) { u16 * mstr = new u16[len]; u16 loop; for (loop = 0; loop < len; loop++) mstr[loop] = (u16)(str[loop] - 32); }



LinkBack URL
About LinkBacks


