Advertisement
Guest User

Untitled

a guest
May 27th, 2015
280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.04 KB | None | 0 0
  1. //--------------------------------------
  2. //--- 010 Editor v3.2.2 Script File
  3. //
  4. // File:
  5. // Author:
  6. // Revision:
  7. // Purpose:Copies collision data from one m2 to another.
  8. //--------------------------------------
  9.  
  10. char sFile[], tFile[];
  11. int sIndex, tIndex;
  12. //int64 rPos;
  13.  
  14. sFile = InputOpenFileName("Select source file...");
  15. tFile = InputOpenFileName("Select destination file...");
  16.  
  17. sIndex = FileOpen(sFile);
  18. if(sIndex < 0)
  19.     return;
  20.  
  21. RunTemplate("M2Template1.bt");
  22.  
  23. uint bt = M2_file.nBoundingTriangles;
  24. uint bv = M2_file.nBoundingVertices;
  25. uint bn = M2_file.nBoundingNormals;
  26.  
  27. FileClose();
  28.  
  29. tIndex = FileOpen(tFile);
  30. if(tIndex < 0)
  31.     return;
  32.  
  33. RunTemplate("M2Template1.bt");
  34.  
  35. M2_file.nBoundingTriangles = bt;
  36. M2_file.nBoundingVertices = bv;
  37. M2_file.nBoundingNormals = bn;
  38.  
  39. //rPos = FTell();
  40. //Printf( "Ending offset = %Ldr", rPos );
  41.  
  42. //int64 getPos(FILE *file)
  43.  {
  44. int64 file_end;
  45.  fseek(file, 0, SEEK_END);
  46.  file_end = FTell();
  47.  return file_end;
  48. }
  49. Printf( "Ending offset = %Ldr", file_end );
  50.  
  51. FileSave();
  52. FileClose();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement