예제 #1
0
        /// <summary>
        /// Update the film's Player Table
        /// </summary>
        public void UpdatePlayerTable()
        {
            foreach (PlayerChunk player in _filmPlayers)
            {
                long currentEntryOffset = player.EntryStartLocation;

                _filmStream.SeekTo(currentEntryOffset + 0x0F);
                _filmStream.WriteUTF16(player.Gamertag);

                _filmStream.SeekTo(currentEntryOffset + 0x45);
                _filmStream.WriteUTF16(player.ServiceTag);

                _filmStream.SeekTo(currentEntryOffset + 0x40);
                _filmStream.WriteByte((byte)player.Character);
                _filmStream.WriteByte((byte)player.HelmetOn);

                _filmStream.SeekTo(currentEntryOffset + 0x30);
                _filmStream.WriteByte((byte)player.PlayerVisuals.ArmourPrimary);
                _filmStream.WriteByte((byte)player.PlayerVisuals.ArmourDetail);
                _filmStream.Skip(0x03);
                _filmStream.WriteByte((byte)player.PlayerVisuals.EmblemForeground);
                _filmStream.WriteByte((byte)player.PlayerVisuals.EmblemBackground);
                _filmStream.WriteByte((byte)player.PlayerVisuals.EmblemForegroundToggle);
                _filmStream.WriteByte((byte)player.PlayerVisuals.EmblemForegroundColour);
                _filmStream.WriteByte((byte)player.PlayerVisuals.EmblemSecondaryColour);
                _filmStream.WriteByte((byte)player.PlayerVisuals.EmblemBackgroundColour);

                _filmStream.SeekTo(currentEntryOffset + 0x20F);
                _filmStream.WriteUTF16(player.Gamertag);
            }
        }
예제 #2
0
 public void Update(EndianStream stream)
 {
     stream.SeekTo(Offset);
     stream.WriteInt32(Ident);
     stream.WriteByte(RunTimeMinimium);
     stream.WriteByte(RunTimeMaximium);
     stream.WriteByte(CountOnMap);
     stream.WriteByte(DesignTimeMaximium);
     stream.WriteFloat(Cost);
 }
예제 #3
0
 public void Update(EndianStream stream)
 {
     stream.SeekTo(Offset);
     stream.WriteInt16((Int16)ChunkType);
     stream.SeekTo(stream.Position + 0x0A);
     stream.WriteInt32(TagIndex);
     stream.WriteFloat(SpawnCoords.X);
     stream.WriteFloat(SpawnCoords.Y);
     stream.WriteFloat(SpawnCoords.Z);
     stream.WriteFloat(SpawnCoords.Pitch);
     stream.WriteFloat(SpawnCoords.Yaw);
     stream.WriteFloat(SpawnCoords.Roll);
     stream.SeekTo(stream.Position + 0x16);
     stream.Skip(0x01);
     stream.WriteByte(Team);
     stream.WriteByte(SpareClips);
     stream.WriteByte(RespawnTime);
     stream.SeekTo(stream.Position + 0x12);
 }
예제 #4
0
            public void Update(EndianStream stream)
            {
                stream.SeekTo(Offset + 0x0C);
                stream.WriteInt32(TagIndex);

                stream.WriteFloat(SpawnCoordinates.X);
                stream.WriteFloat(SpawnCoordinates.Y);
                stream.WriteFloat(SpawnCoordinates.Z);
                stream.WriteFloat(SpawnPosition.Right.X);
                stream.WriteFloat(SpawnPosition.Right.Y);
                stream.WriteFloat(SpawnPosition.Right.Z);
                stream.WriteFloat(SpawnPosition.Up.X);
                stream.WriteFloat(SpawnPosition.Up.Y);
                stream.WriteFloat(SpawnPosition.Up.Z);

                stream.SeekTo(stream.Position + 0x0B);
                stream.WriteByte(Team);

                stream.SeekTo(stream.Position + 0x01);
                stream.WriteByte(RespawnTime);

                stream.SeekTo(stream.Position + 0x12);
            }
예제 #5
0
        /// <summary>
        /// Update the gpd's Player Visuals
        /// </summary>
        public void UpdatePlayerVisuals()
        {
            _gpdStream.SeekTo(0x25B4);
            _gpdStream.WriteUTF16(_gpdPlayerVisuals.ServiceTag);
            _gpdStream.SeekTo(0x35BE);
            _gpdStream.WriteUTF16(_gpdPlayerVisuals.ServiceTag);

            _gpdStream.SeekTo(0x35E1);
            _gpdStream.WriteByte((byte)_gpdPlayerVisuals.HelmetOn);
            _gpdStream.SeekTo(0x35DF);
            _gpdStream.WriteByte((byte)_gpdPlayerVisuals.Character);

            _gpdStream.SeekTo(0x35AC);
            _gpdStream.WriteByte((byte)_gpdPlayerVisuals.EmblemForeground);
            _gpdStream.WriteByte((byte)_gpdPlayerVisuals.EmblemBackground);
            _gpdStream.WriteByte((byte)_gpdPlayerVisuals.EmblemToggle);

            _gpdStream.SeekTo(0x35AF);
            _gpdStream.WriteByte((byte)_gpdPlayerVisuals.EmblemForegroundColour);
            _gpdStream.WriteByte((byte)_gpdPlayerVisuals.EmblemSecondaryColour);
            _gpdStream.WriteByte((byte)_gpdPlayerVisuals.EmblemBackgroundColour);

            _gpdStream.SeekTo(0x359F);
            _gpdStream.WriteByte((byte)_gpdPlayerVisuals.ArmourPrimaryColour);
            _gpdStream.SeekTo(0x35A3);
            _gpdStream.WriteByte((byte)_gpdPlayerVisuals.ArmourDetailColour);
        }
예제 #6
0
        /// <summary>
        /// Update the film's MachineID Table
        /// </summary>
        public void UpdateMachineIDTable()
        {
            _filmStream.SeekTo(_filmMachineIDTable.MachineIDTableStartPosition);
            for (int i = 0; i < _filmMachineIDs.Count; i++)
            {
                _filmStream.WriteBlock(new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
            }
            _filmStream.WriteByte(0x00);

            _filmStream.SeekTo(_filmMachineIDTable.MachineIDTableStartPosition);
            foreach (byte[] machineID in _filmMachineIDs)
            {
                _filmStream.WriteBlock(machineID);
            }
        }
예제 #7
0
        /// <summary>
        /// Update the gpd's Player Visuals
        /// </summary>
        public void UpdatePlayerVisuals()
        {
            _gpdStream.SeekTo(0x35C7);
            _gpdStream.WriteByte((byte)_gpdPlayerVisuals.PlayerSpecies);
            if (_gpdPlayerVisuals.PlayerSpecies == Species.Spartan)
            {
                _gpdStream.WriteByte((byte)_gpdPlayerVisuals.PlayerSpartan.SpartanHelmet);
                _gpdStream.WriteByte((byte)_gpdPlayerVisuals.PlayerSpartan.SpartanLeftShoulder);
                _gpdStream.WriteByte((byte)_gpdPlayerVisuals.PlayerSpartan.SpartanRightShoulder);
                _gpdStream.WriteByte((byte)_gpdPlayerVisuals.PlayerSpartan.SpartanChest);
            }
            else
            {
                _gpdStream.WriteByte((byte)_gpdPlayerVisuals.PlayerElite.EliteHelmet);
                _gpdStream.WriteByte((byte)_gpdPlayerVisuals.PlayerElite.EliteLeftShoulder);
                _gpdStream.WriteByte((byte)_gpdPlayerVisuals.PlayerElite.EliteRightShoulder);
                _gpdStream.WriteByte((byte)_gpdPlayerVisuals.PlayerElite.EliteChest);
            }

            _gpdStream.SeekTo(0x358F);
            _gpdStream.WriteByte((byte)_gpdPlayerVisuals.PrimaryArmourColour);
            _gpdStream.SeekTo(0x3593);
            _gpdStream.WriteByte((byte)_gpdPlayerVisuals.SecondaryArmourColour);
            _gpdStream.SeekTo(0x3597);
            _gpdStream.WriteByte((byte)_gpdPlayerVisuals.DetailArmourColour);

            _gpdStream.SeekTo(0x359B);
            _gpdStream.WriteByte((byte)_gpdPlayerVisuals.EmblemToggle);
            _gpdStream.WriteByte((byte)_gpdPlayerVisuals.EmblemForeground);
            _gpdStream.WriteByte((byte)_gpdPlayerVisuals.EmblemBackground);

            _gpdStream.SeekTo(0x359B);
            _gpdStream.WriteByte((byte)_gpdPlayerVisuals.PrimaryEmblemColour);
            _gpdStream.WriteByte((byte)_gpdPlayerVisuals.SecondaryEmblemColour);
            _gpdStream.WriteByte((byte)_gpdPlayerVisuals.BackgroundEmblemColour);

            _gpdStream.SeekTo(0x35A4);
            _gpdStream.WriteUTF16(_gpdPlayerVisuals.ServiceTag);
            _gpdStream.SeekTo(0x35AC);
            _gpdStream.WriteUTF16(_gpdPlayerVisuals.ServiceTag);
        }
예제 #8
0
        /// <summary>
        /// Update the film's Player Table
        /// </summary>
        public void UpdatePlayerTable()
        {
            foreach (Player player in _filmPlayers)
            {
                long EntryStartLocation = player.EntryStartLocation;
                long EntryIndex         = player.EntryIndex;

                // Write Gamertag 1/2
                _filmStream.SeekTo(EntryStartLocation + 0x0F);
                _filmStream.WriteUTF16(player.Gamertag);
                _filmStream.SeekTo(EntryStartLocation + 0xC7);
                _filmStream.WriteUTF16(player.Gamertag);

                // Write Service Tag
                _filmStream.SeekTo(EntryStartLocation + 0x53);
                _filmStream.WriteUTF16(player.ServiceTag);

                // Write Species
                _filmStream.SeekTo(EntryStartLocation + 0x3B);
                _filmStream.WriteByte((byte)player.PlayerSpecies);

                // Write Gender
                _filmStream.SeekTo(EntryStartLocation + 0x37);
                _filmStream.WriteByte((byte)player.SpartanProperties.SpartanGender);

                // Write Visor Colour
                _filmStream.SeekTo(EntryStartLocation + 0x3A);
                _filmStream.WriteByte((byte)player.SpartanProperties.VisorColour);

                // Write Elite/Visuals/Spartan shit
                _filmStream.SeekTo(EntryStartLocation + 0x47);
                _filmStream.WriteByte((byte)player.SpartanProperties.Helmet);
                _filmStream.WriteByte((byte)player.SpartanProperties.LeftShoulder);
                _filmStream.WriteByte((byte)player.SpartanProperties.RightShoulder);
                _filmStream.WriteByte((byte)player.SpartanProperties.Chest);
                _filmStream.WriteByte((byte)player.SpartanProperties.Wrist);
                _filmStream.WriteByte((byte)player.SpartanProperties.Utility);
                _filmStream.WriteByte((byte)player.SpartanProperties.KneeGuards);
                _filmStream.WriteByte((byte)player.EliteProperties.EliteMilitaryRank);
                _filmStream.WriteByte((byte)player.PlayerVisuals.ArmourEffect);
                _filmStream.WriteByte((byte)player.PlayerVisuals.ArmourEffect);
                _filmStream.WriteByte((byte)player.PlayerVisuals.FirefightVoice);

                // Write Emblem/Colours
                _filmStream.SeekTo(EntryStartLocation + 0x38);
                _filmStream.WriteByte((byte)player.PlayerVisuals.ArmourPrimaryColour);
                _filmStream.WriteByte((byte)player.PlayerVisuals.ArmourSecondaryColour);
                _filmStream.SeekTo(EntryStartLocation + 0x3F);
                _filmStream.WriteByte((byte)player.PlayerVisuals.EmblemForeground);
                _filmStream.WriteByte((byte)player.PlayerVisuals.EmblemBackground);
                _filmStream.WriteByte((byte)player.PlayerVisuals.EmblemForegroundToggle);
                _filmStream.WriteByte((byte)player.PlayerVisuals.EmblemPrimaryColour);
                _filmStream.WriteByte((byte)player.PlayerVisuals.EmblemSecondaryColour);
                _filmStream.WriteByte((byte)player.PlayerVisuals.EmblemBackgroundColour);
            }
        }