Guest User

Untitled

a guest
Jan 21st, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. List<AnimSet> list = new List<AnimSet>();
  2. var fullpath = path + "AnimSet\\";
  3. foreach (string s in Directory.EnumerateFiles(fullpath))
  4. {
  5.  
  6. AnimSet a = new AnimSet();
  7. a.Animations = new List<Animation>();
  8. FileStream fs = File.OpenRead(s);
  9. fs.Seek(16, SeekOrigin.Begin);
  10. int AnimSetSNO = ReadInt32(fs);
  11. a.AnimsetSNO = AnimSetSNO;
  12. fs.Position = 352;
  13. int NumAnimations = ReadInt32(fs);
  14. a.NumAnimations = NumAnimations;
  15. for (int i = 0; i <= NumAnimations; i++)
  16. {
  17. fs.Position += 4;
  18. int TagID = ReadInt32(fs);
  19. int AniSNO = ReadInt32(fs);
  20. Animation ani = new Animation();
  21. ani.AniSNO = AniSNO;
  22. ani.AniTagID = TagID;
  23. a.Animations.Add(ani);
  24. }
  25. list.Add(a);
  26. fs.Close();
  27.  
  28. }
  29. return list;
Add Comment
Please, Sign In to add comment