Exemplo n.º 1
0
        private static void WriteCLPSToXML(XmlWriter writer)
        {
            writer.WriteStartElement("CLPS");

            uint clps_addr = m_Overlay.ReadPointer(0x60);
            uint clps_num  = m_Overlay.Read16(clps_addr + 0x06);
            uint clps_size = (uint)(8 + (clps_num * 8));

            byte[][] entries = new byte[clps_num][];
            uint     entry   = clps_addr + 0x08;

            for (int i = 0; i < clps_num; i++)
            {
                entries[i] = new byte[8];

                for (int j = 0; j < 8; j++)
                {
                    entries[i][j] = m_Overlay.Read8((uint)(entry + (j)));
                }

                entry += 8;
            }

            for (int i = 0; i < entries.Length; i++)
            {
                writer.WriteStartElement("Entry");
                writer.WriteStartElement("Value");
                for (int j = 0; j < entries[i].Length; j++)
                {
                    writer.WriteElementString("Byte", entries[i][j].ToString());
                }

                writer.WriteEndElement();
                writer.WriteEndElement();
            }

            writer.WriteEndElement();
        }
Exemplo n.º 2
0
        public DL_Editor(LevelEditorForm lf)
        {
            InitializeComponent();

            this.availableTree.Nodes.Clear();
            ROMFileSelect.LoadFileList(this.availableTree);
            this.lf   = lf;
            no        = new NitroOverlay(Program.m_ROM, (uint)(103 + lf.m_LevelID));
            tableAddr = no.Read32(0x30);

            uint count = no.Read16(tableAddr);

            for (uint i = 0; i < count; i++)
            {
                currentTree.Nodes.Add(Program.m_ROM.GetFileNameFromID(Program.m_ROM.GetFileIDFromInternalID(no.Read16(i * 2 + tableAddr + 2))));
            }
        }