Dimitry
Still Fresh
My firts post, my first help wanted....
I'm learning to program gp32 and by now i'm using Linux for this job.
Now i'm trying to insert images on my programs, but there is no way, i allways get different kinds of scum on the display :angry:
Using C files:
To pass from png file to .c file i've used The Gimp, first i made a conversion from png to bmp and the from bmp to .c file . I got a C structure like this :
then on the gpmain.c i have this code:
and allways the same , like a "magic eye" picture
Using gpg files:
I didn't found a program to create this kind of files, i thing i will have to use wine ...
:unsure:
I tried with a created gpg file, but i use geepee32 emulator and seems file strctucture doesn't work on the PC .. is that right ?
Thanks you in advance
I'm learning to program gp32 and by now i'm using Linux for this job.
Now i'm trying to insert images on my programs, but there is no way, i allways get different kinds of scum on the display :angry:
Using C files:
To pass from png file to .c file i've used The Gimp, first i made a conversion from png to bmp and the from bmp to .c file . I got a C structure like this :
Code:
unsigned char thin[]={
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x34, 0x34, 0x34, 0x34, ......
Code:
[..]
GpGraphicModeSet(8, t);
for(i = 0; i < 1; i++)
{
GpLcdSurfaceGet(&gpDraw[i], i);
}
GpSurfaceSet(&gpDraw[0]);
GpLcdEnable();
h_pal = GpPaletteCreate(256, (GP_PALETTEENTRY*)PicPal);
GpPaletteSelect(h_pal);
GpPaletteRealize();
h_pal = NULL;
GpBitBlt(NULL,&gpDraw[1],0,0,320,240,(unsigned char*)thin,0, 0,320,240);
GpBitBlt(NULL,&gpDraw[0],0,0,320,240,(unsigned char*)thin,0, 0,320,240);
while(1)
{
GpBitBlt(NULL,&gpDraw[1],0,0,320,240,(unsigned char*)thin,0, 0,320,240);
GpBitBlt(NULL,&gpDraw[0],0,0,320,240,(unsigned char*)thin,0, 0,320,240);
}
[..]
and allways the same , like a "magic eye" picture
Using gpg files:
I didn't found a program to create this kind of files, i thing i will have to use wine ...
:unsure:
I tried with a created gpg file, but i use geepee32 emulator and seems file strctucture doesn't work on the PC .. is that right ?
Thanks you in advance