Guest User

Untitled

a guest
Jul 23rd, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. void test_can_load_tons_of_images_from_packfiles_quickly()
  2. {
  3. MountVFile("\\dev\\kotg\\img.vpk");
  4. assert(filesmounted == 1);
  5. mountstruct* packfile = &pack[0];
  6. clock_t start, end;
  7. start = clock();
  8. for (int i = 0; i < packfile->numfiles; i++)
  9. {
  10. filestruct* file = &packfile->files[i];
  11. std::string filename = (const char*)file->fname;
  12. if (boost::algorithm::iends_with(filename, ".gif"))
  13. {
  14. xLoadImage8(filename.c_str());
  15. }
  16. }
  17. end = clock();
  18. err("Took %f seconds", (float)(end - start) / CLOCKS_PER_SEC);
  19. }
Add Comment
Please, Sign In to add comment