Пример #1
0
 public EditorHXMFile(HXMFile baseFile, EditorHAMFile baseHAM)
 {
     this.BaseFile         = baseFile;
     this.BaseHAM          = baseHAM;
     ReplacedRobots        = new List <Robot>();
     ReplacedJoints        = new List <JointPos>();
     ReplacedModels        = new List <Polymodel>();
     ReplacedObjBitmaps    = new List <ReplacedBitmapElement>();
     ReplacedObjBitmapPtrs = new List <ReplacedBitmapElement>();
 }
Пример #2
0
        public EditorVHAMFile(VHAMFile baseFile, EditorHAMFile baseHAM)
        {
            BaseFile = baseFile;
            BaseHAM  = baseHAM;

            Robots            = new List <Robot>();
            Weapons           = new List <Weapon>();
            Models            = new List <Polymodel>();
            Joints            = new List <JointPos>();
            ObjBitmaps        = new List <ushort>();
            ObjBitmapPointers = new List <ushort>();
        }
Пример #3
0
        /// <summary>
        /// Creates a deep copy of the EditorHAMFile.
        /// </summary>
        /// <returns></returns>
        public EditorHAMFile Clone()
        {
            EditorHAMFile datafile = (EditorHAMFile)MemberwiseClone();

            datafile.BaseFile = BaseFile.Clone();

            //CreateLocalLists and TranslateData will create deep copies of the generated lists, but new lists still need to be created
            datafile.EClipNameMapping   = new Dictionary <string, EClip>();
            datafile.ObjBitmapMapping   = new Dictionary <string, int>();
            datafile.multiplayerBitmaps = new ushort[multiplayerBitmaps.Length];
            datafile.Textures           = new List <ushort>();
            datafile.TMapInfo           = new List <TMAPInfo>();
            datafile.VClips             = new List <VClip>();
            datafile.EClips             = new List <EClip>();
            datafile.WClips             = new List <WClip>();
            datafile.Robots             = new List <Robot>();
            datafile.Joints             = new List <JointPos>();
            datafile.Weapons            = new List <Weapon>();
            datafile.Models             = new List <Polymodel>();
            datafile.Gauges             = new List <ushort>();
            datafile.GaugesHires        = new List <ushort>();
            datafile.ObjBitmaps         = new List <ushort>();
            datafile.ObjBitmapPointers  = new List <ushort>();
            datafile.Cockpits           = new List <ushort>();
            datafile.Reactors           = new List <Reactor>();
            datafile.Powerups           = new List <Powerup>();
            datafile.BitmapXLATData     = new ushort[2620];
            datafile.Sounds             = new byte[254];
            datafile.AltSounds          = new byte[254];
            datafile.SoundNames         = new List <string>();

            datafile.CreateLocalLists();
            datafile.TranslateData();

            foreach (string name in SoundNames)
            {
                datafile.SoundNames.Add(name);
            }

            return(datafile);
        }
Пример #4
0
 public EditorHXMFile(EditorHAMFile baseHAM) : this(new HXMFile(), baseHAM)
 {
 }