Advertisement
Guest User

Untitled

a guest
Mar 24th, 2014
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. void ParsMapFiles()
  2. {
  3. char fn[512];
  4. //char id_filename[64];
  5. char id[10];
  6. for (unsigned int i=0; i<map_count; ++i)
  7. {
  8. sprintf(id,"%03u",map_ids[i].id);
  9. sprintf(fn,"World\\Maps\\%s\\%s.wdt", map_ids[i].name, map_ids[i].name);
  10. WDTFile WDT(fn,map_ids[i].name);
  11. if(WDT.init(id, map_ids[i].id))
  12. {
  13.  
  14.  
  15. // ################ Crash goes at this part here #################
  16. printf("Processing Map %u\n[", map_ids[i].id);
  17. for (int x=0; x<64; ++x)
  18. {
  19. for (int y=0; y<64; ++y)
  20. {
  21. if (ADTFile *ADT = WDT.GetMap(x,y))
  22. {
  23. //sprintf(id_filename,"%02u %02u %03u",x,y,map_ids[i].id);//!!!!!!!!!
  24. ADT->init(map_ids[i].id, x, y);
  25. delete ADT;
  26. }
  27. }
  28. printf("#");
  29. fflush(stdout);
  30. }
  31. printf("]\n");
  32. }
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement