예제 #1
0
파일: CLPS_Form.cs 프로젝트: awiebe/SM64DSe
        private void btnAdd_Click(object sender, EventArgs e)
        {
            CLPS.Entry clps = new CLPS.Entry();
            clps.flags = 0x000000ff00000fc0;

            if (gridCLPSData.SelectedRows.Count == 0)
            {
                m_CLPS.Add(clps);
            }
            else
            {
                m_CLPS.m_Entries.Insert(gridCLPSData.SelectedRows[0].Index, clps);
            }

            // Reload data
            LoadCLPSData();
        }
예제 #2
0
        private void LoadCLPS(NitroOverlay ovl)
        {
            uint clpsAddr  = ovl.ReadPointer(0x60);
            int  numCLPSes = ovl.Read16(clpsAddr + 0x06);

            m_CLPS = new CLPS();

            clpsAddr += 8;
            for (int i = 0; i < numCLPSes; ++i)
            {
                CLPS.Entry clps = new CLPS.Entry();
                clps.flags  = ovl.Read32(clpsAddr);
                clps.flags |= (ulong)ovl.Read32(clpsAddr + 4) << 32;
                m_CLPS.Add(clps);
                clpsAddr += 8;
            }
        }
예제 #3
0
파일: CLPS_Form.cs 프로젝트: awiebe/SM64DSe
        private void CopyCLPS(int sourceLevel)
        {
            NitroOverlay otherOVL = new NitroOverlay(Program.m_ROM, Program.m_ROM.GetLevelOverlayID(sourceLevel));

            uint   other_clps_addr = otherOVL.ReadPointer(0x60);
            ushort other_clps_num  = otherOVL.Read16(other_clps_addr + 0x06);
            uint   other_clps_size = (uint)(8 + (other_clps_num * 8));

            m_CLPS = new CLPS();
            for (int i = 0; i < other_clps_num; ++i)
            {
                ulong flags = otherOVL.Read32((uint)(other_clps_addr + 8 + 8 * i + 0));
                flags |= (ulong)otherOVL.Read32((uint)(other_clps_addr + 8 + 8 * i + 4)) << 32;
                CLPS.Entry clps = new CLPS.Entry();
                clps.flags = flags;
                m_CLPS.Add(clps);
            }

            LoadCLPSData();
        }