Exemplo n.º 1
0
        public int MakeF3D(ROM rom)
        {
            int start = rom.offset;

            foreach (UInt64 cmd in header)
            {
                rom.Write64(cmd);
                rom.AddOffset(8);
            }

            List <TextureDescription> tds = map.Keys.ToList();

            tds.Sort(new TextureDescriptionComp());

            foreach (TextureDescription td in tds)
            {
                foreach (UInt64 cmd in (List <UInt64>)td)
                {
                    rom.Write64(cmd);
                    rom.AddOffset(8);
                }

                VerticesDescription vd = map[td];
                vd.MakeF3D(rom);
            }
            foreach (UInt64 cmd in footer)
            {
                rom.Write64(cmd);
                rom.AddOffset(8);
            }
            return(rom.offset - start);
        }
Exemplo n.º 2
0
        public void AddTriangle(TextureDescription td, UInt64 vertexCmd, UInt64 triCmd)
        {
            VerticesDescription set = null;

            if (!map.TryGetValue(td, out set))
            {
                set     = new VerticesDescription();
                map[td] = set;
            }

            set.Add(vertexCmd, triCmd);
        }