GP32 Bliting from files


jlebrech

UFO Robot
Joined
Feb 25, 2003
Messages
899
Age
41
I would like to know how to load external files into the buffer!

Thank you. :D


currently i try that:


void GpMain (void * arg)
{

/* HANDLES and stuff */
F_HANDLE imagefile; // File Handle
char * imgbuff;
ulong prc;

/* Open File */
GpFileOpen( "myst/base0.raw", OPEN_R, &imagefile );

/* Copy HANDLE to buffer */
GpFileRead( imagefile /*external file*/, &imgbuff /*thepicture*/, 320 * 240 /*screen size*/, &prc);



but al i get is a blank screen when i use the buffer
 
I wont help you because i am not a developer :) but as i remember, screen size is 240x320 (its then flipped). Maybe this cause the problem ?
 
Thanks hando, i can do it.

it was GpFileRead(

GpFileRead( imagefile, &imgbuff, sizeof(imgbuff), sizeof(imgbuff)); //instead
 
Back
Top