예제 #1
0
 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>");
     }
 }
예제 #2
0
    //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");
    }
예제 #3
0
파일: Extensions.cs 프로젝트: regneq/OpenEQ
 public static Reference <T> ReadRef <T>(this BinaryReader br, Wld wld) where T : class => new Reference <T>(wld, br.ReadInt32());
예제 #4
0
파일: Wld.cs 프로젝트: regneq/OpenEQ
 public Reference(Wld wld, int @ref)
 {
     Wld = wld;
     Ref = wld.PreResolveRef(@ref);
 }
예제 #5
0
 public static void OutputHTML(Wld wld)
 {
     foreach (var frag in wld.Fragments)
     {
     }
 }