public CLPS_Form(CLPS CLPS) { InitializeComponent(); this.m_CLPS = CLPS; for (int i = 0; i < 52; i++) { cbxLevels.Items.Add(i + " - " + Strings.LevelNames[i]); } LoadCLPSData(); }
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; } }
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(); }