public static void OutputHTML(Wld wld) { foreach (var(name, frag) in wld.Fragments) { WriteLine($"<li>{(string.IsNullOrEmpty(name) ? "" : $"<i>{Escape(name)}</i> - ")}{Escape(frag?.ToString() ?? "NULL")}</li>"); } }
//Loads the first bmp found in the pack, by default uses befallen.s3d void Start() { Debug.Log("Loading s3d"); var archive = EQArchive.Load(GamePath + ArchiveName); Debug.Log("File count: " + archive.Files.Count); string extension = ""; //Vector3[] newVertices; //Vector2[] newUV; //int[] newTriangles; //Mesh mesh = new Mesh(); cube.GetComponent <MeshFilter>().mesh = CreateMesh(1, 2); //mesh.vertices = newVertices; //mesh.uv = newUV; //mesh.triangles = newTriangles; foreach (var file in archive.Files) { // Debug.Log(file.Key); if (!LoadFirstMesh) { if (file.Key.ToLower() == MeshToLoad.ToLower()) { //byte[] contents = file.Value.GetContents(); return; } continue; } extension = System.IO.Path.GetExtension(file.Key); if (extension == ".wld") { Debug.Log("Loading " + file.Key); byte[] contents = file.Value.GetContents(); try { Wld wld = new Wld(contents); Debug.Log(wld); } catch (Exception e) { Debug.LogError("Failed to load World: " + e.Message); return; } return; } continue; } Debug.Log("Done"); }
public static Reference <T> ReadRef <T>(this BinaryReader br, Wld wld) where T : class => new Reference <T>(wld, br.ReadInt32());
public Reference(Wld wld, int @ref) { Wld = wld; Ref = wld.PreResolveRef(@ref); }
public static void OutputHTML(Wld wld) { foreach (var frag in wld.Fragments) { } }