This commit is contained in:
2025-05-13 03:10:33 +03:00
parent 5f03062f42
commit e5e3172b0f
80 changed files with 9655 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEngine;
public class PtgFile {
private List<TimFile> _timData = new List<TimFile>();
public List<TimFile> Textures {
get { return _timData; }
}
public static PtgFile Parse(byte[] data) {
PtgFile result = new PtgFile();
MemoryStream src = new MemoryStream(data);
BinaryReader r = new BinaryReader(src);
var texCount = r.ReadInt32();
var texSize = (data.Length - 4) / texCount;
for (int i = 0; i < texCount; ++i) {
var texData = r.ReadBytes(texSize);
result._timData.Add(TimFile.Parse(texData));
}
return result;
}
}