Hi friends,
i have a function in my program to dispaly the character with color whatever i put..
i am using this in my game boy program..
by this function i can display the character with color..
but i want to display my character as big size..how to i display my character in the screen as big size then now..
is there any function to make character big to display..
is there any formula to display the character as big then now.??
please if u have any example coding or any information regarding this..
please forward me..
this is quite urgent..
the code is following..
--------------------------------------------------------------------------------------------
Code:
void printfC(u32 address, u8 x, u8 y, char *str, enum COLOUR colour)
//address - destination address (i.e.: map address)
//x, y - co-ordinate determines location in array
// (0,0) = 0; (1,0) = 1; ... (29,0) = 29; (30,0) = 30; (31,0) = 31;
// (0,1) = 32; (1,1) = 33; ... (29,1) = 61; (30,1) = 62; (31,1) = 63;
// (0,2) = 64; (1,2) = 65; ... (29,2) = 93; (30,2) = 94; (31,2) = 95;
// (0,3) = 96; (1,3) = 97; ... (29,3) = 125; (30,3) = 126; (31,3) = 127;
// so (x,y) = (x + (y * 32));
{
if (strlen(str) == 0)
return;
u16 *pDst;
pDst = (u16*)address;
u16 location;
location = (x + (y * 32));
u16 len = strlen(str) + location;
u8 value;
for (u16 i = location; i < len; i++)
{
if (*str == 32)
value = (*str - 32);
else if (((*str) >= 48) && ((*str) <= 57))
{
value = *str;
switch (colour)
{
case GREEN:
value += 73; //121 - 48
break;
case RED:
value += 109;
break;
case BLUE:
value += 145;
break;
}
}
else
{
value = *str;
switch (colour)
{
case GREEN:
value += 30; //95 - 65
break;
case RED:
value += 66;
break;
case BLUE:
value += 102;
break;
}
}
pDst[i] = value;
str++;
}
}
waiting for your valuable reply..
with regarding,
karthi..