Hi,
I have a problem to display images, while for others it works.
Here is the image I want to see:
by:
and here is my function:
and when I work mode step by step, I realized that it took as the value of "w" and "h" the value "0".
Have you any idea? because I tried everything and nothing happens, it always does, and I think it is that it takes an image of size 0x0.
Thank you in advance.
I have a problem to display images, while for others it works.
Here is the image I want to see:
Code:
const rom unsigned char UP_BUTTON[]={
40 /*width */,
9 /* height */,
0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xE7,
0xFF , 0xFF , 0xFF , 0xFF , 0xC3 , 0xFF , 0xFF , 0xFF,
0xFF , 0x81 , 0xFF , 0xFF , 0xFF , 0xFF , 0x00 , 0xFF,
0xFF , 0xFF , 0xFF , 0xE7 , 0xFF , 0xFF , 0xFF , 0xFF,
0xE7 , 0xFF , 0xFF , 0xFF , 0xFF , 0xE7 , 0xFF , 0xFF,
0xFF , 0xFF , 0xFF , 0xFF , 0xFF
};
by:
Code:
PutLogo((rom char*)UP_BUTTON);
and here is my function:
Code:
void PutLogo(char rom *logo){
unsigned char w,h,bitcount,Byte;
w=*logo++;
h=*logo++;
bitcount=0;
do{
for(i=0;i<w;i++){
if(bitcount==0){
bitcount=8;
Byte=*logo++;
}
if(Byte&1) plot(XPos,YPos);
XPos++;
Byte/=2;
bitcount--;
}
YPos++;
XPos-=w;
}while(--h);
}
and when I work mode step by step, I realized that it took as the value of "w" and "h" the value "0".
Have you any idea? because I tried everything and nothing happens, it always does, and I think it is that it takes an image of size 0x0.
Thank you in advance.