//TODO WHAT THE EVERLOVING CRAP IS THIS DOING HERE
        private void WriteHogLump(string filename, int id)
        {
            BinaryWriter bw = new BinaryWriter(File.Open(filename, FileMode.Create));

            bw.Write(datafile.GetLumpData(id));
            bw.Flush();
            bw.Close();
        }
        private void PaletteComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            ComboBox paletteComboBox = (ComboBox)sender;

            byte[] data = hogFile.GetLumpData(hogFile.GetLumpNum(paletteComboBox.Text));
            if (data != null)
            {
                currentPalette = new Palette(data);
                panel.SetPalette(currentPalette);
                panel.ChangeImageToSelected();
            }
        }