JPG loading August 30, 2010 12:26PM | Registered: 13 years ago Posts: 29 |
Re: JPG loading August 30, 2010 02:43PM | Registered: 14 years ago Posts: 552 |
Re: JPG loading August 30, 2010 04:24PM | Registered: 15 years ago Posts: 175 |
Re: JPG loading August 31, 2010 08:59AM | Registered: 13 years ago Posts: 29 |
Re: JPG loading August 31, 2010 03:26PM | Registered: 15 years ago Posts: 175 |
Re: JPG loading September 01, 2010 09:18AM | Registered: 13 years ago Posts: 29 |
Re: JPG loading September 01, 2010 03:38PM | Registered: 15 years ago Posts: 175 |
Re: JPG loading September 02, 2010 12:01PM | Registered: 13 years ago Posts: 29 |
int countfiles() { DIR* smalldir = opendir("sd:/daylily pics/small"); DIR* bigdir = opendir("sd:/daylily pics/big"); int filebig=0, filesmall=0; if ((smalldir != NULL)&&(bigdir != NULL)) { while(true) { struct dirent* pent = readdir(smalldir); if(pent == NULL) break; if(strcmp(".", pent->d_name) != 0 && strcmp("..", pent->d_name) != 0) { char dnbuf[260]; sprintf(dnbuf, "%s/%s", "sd:/daylily pics/small", pent->d_name); struct stat statbuf; stat(dnbuf, &statbuf); if(!S_ISDIR(statbuf.st_mode))filesmall++; GRRLIB_FillScreen(0x00FFFFFF); GRRLIB_Printf(10,10,font,0xFFFFFFFF,1,"loading %i,%i",filesmall,filebig); GRRLIB_Render(); } } closedir(smalldir); while(true) { struct dirent* pent = readdir(bigdir); if(pent == NULL) break; if(strcmp(".", pent->d_name) != 0 && strcmp("..", pent->d_name) != 0) { char dnbuf[260]; sprintf(dnbuf, "%s/%s", "sd:/daylily pics/small", pent->d_name); struct stat statbuf; stat(dnbuf, &statbuf); if(!S_ISDIR(statbuf.st_mode))filebig++; GRRLIB_Printf(10,10,font,0xFFFFFFFF,1,"loading %i,%i",filesmall,filebig); GRRLIB_Render(); } } closedir(bigdir); } else { exit(0); } if(filesmall==filebig) { return filesmall; } else { exit(0); return -1; //for sake of compiler error } } int main() { WPAD_Init(); WPAD_SetDataFormat(WPAD_CHAN_ALL, WPAD_FMT_BTNS_ACC_IR); WPAD_SetVRes(WPAD_CHAN_ALL, 640, 480); fatInitDefault(); GRRLIB_Init(); font = GRRLIB_LoadTexture(font_png); GRRLIB_InitTileSet(font, 26 , 36, 0); srand(time(0)); int i=0,j=0; int filecount=countfiles(); string picnames[filecount]; DIR* smalldir = opendir("sd:/daylily pics/small"); GRRLIB_texImg *jpegtest=GRRLIB_LoadTextureJPGEx(elizabeth_hay_jpg, 0x32F6); //other stuff exits before doing anything here }
Re: JPG loading September 02, 2010 04:44PM | Registered: 15 years ago Posts: 175 |
Re: JPG loading September 03, 2010 08:30AM | Registered: 13 years ago Posts: 29 |
Re: JPG loading September 06, 2010 06:59AM | Registered: 13 years ago Posts: 29 |
Re: JPG loading September 06, 2010 08:14PM | Registered: 15 years ago Posts: 175 |
Re: JPG loading September 07, 2010 09:30AM | Registered: 13 years ago Posts: 29 |
Re: JPG loading September 07, 2010 03:10PM | Registered: 14 years ago Posts: 552 |
Re: JPG loading September 07, 2010 05:03PM | Registered: 15 years ago Posts: 175 |
Re: JPG loading September 07, 2010 09:36PM | Registered: 14 years ago Posts: 552 |
Re: JPG loading September 08, 2010 02:13PM | Registered: 13 years ago Posts: 29 |
Re: JPG loading September 08, 2010 04:50PM | Registered: 15 years ago Posts: 175 |
Re: JPG loading September 09, 2010 02:23PM | Registered: 13 years ago Posts: 29 |