public NitroFile(NitroROM rom, ushort id) { if (id >= 0xF000) { throw new Exception("NitroFile: invalid file ID"); } if (Program.m_IsROMFolder) { m_ROM = rom; m_ID = id; m_Name = m_ROM.GetFileNameFromID(id); if (!m_Name.EndsWith(".narc")) { m_Data = Ndst.Helper.ReadROMFile(m_Name, Program.m_ROMBasePath, Program.m_ROMPatchPath); } return; } m_ROM = rom; m_ID = id; m_Name = m_ROM.GetFileNameFromID(id); m_Data = m_ROM.ExtractFile(m_ID); if (m_Data.Length >= 4 && Read32(0x0) == 0x37375A4C) { LZ77.Decompress(ref m_Data, true); } }
public void Decompress() { if (Program.m_IsROMFolder) { return; // Ndst takes care of compression. } LZ77.Decompress(ref m_Data, true); }
public NitroFile(NitroROM rom, ushort id) { if (id >= 0xF000) { throw new Exception("NitroFile: invalid file ID"); } m_ROM = rom; m_ID = id; m_Name = m_ROM.GetFileNameFromID(id); m_Data = m_ROM.ExtractFile(m_ID); if (m_Data.Length >= 4 && Read32(0x0) == 0x37375A4C) { LZ77.Decompress(ref m_Data, true); } }
public NARCFile(NARC arc, ushort id) : base() { if (id >= 0xF000) { throw new Exception("NARCFile: invalid file ID"); } m_Narc = arc; m_ID = id; m_Name = m_Narc.GetFileNameFromID(id); m_Data = m_Narc.ExtractFile(m_ID); if (Read32(0x0) == 0x37375A4C) { LZ77.Decompress(ref m_Data, true); } }
public void Decompress() { LZ77.Decompress(ref m_Data, true); }
public void ForceDecompression() { LZ77.Decompress(ref m_Data, false); }