The code I have written is as follows:
void Load_Media(){
int imgnum =0;
dbSetDir( "Media" );
dbFindFirst();
for( int a = 0; a < 51; a++ ) //50 is max capacity for the GUI_Images array
{
GUI_Images[a] = a;
};
while( dbGetFileType() > -1 )
{
if( dbGetFileType() == 0 )
{
if( dbFindSubString( dbUpper( dbGetFileName() ), ".png" ) > 0 )
{
dbLoadImage( dbGetFileName(), GUI_Images[imgnum] );
imgnum++;
};
};
dbFindNext();
};
};
The problem is that it doesn't seem to really be reading any of the images and storing them properly in the array I have. A little help would be greatly appreciated.
Thanks