コード例 #1
0
ファイル: FSHelpers.cs プロジェクト: vtsingaras/WindEditor
        public static HalfRotation ReadHalfRot(byte[] data, uint offset)
        {
            HalfRotation rot = new HalfRotation();

            rot.X = Read16(data, (int)offset + 0x0);
            rot.Y = Read16(data, (int)offset + 0x2);
            rot.Z = Read16(data, (int)offset + 0x4);

            return(rot);
        }
コード例 #2
0
            public override void LoadData(byte[] data, ref int srcOffset)
            {
                Name = FSHelpers.ReadString(data, srcOffset, 8);
                EventIndex = FSHelpers.Read8(data, srcOffset + 8);
                Unknown1 = FSHelpers.Read8(data, srcOffset + 9);
                SpawnType = FSHelpers.Read8(data, srcOffset + 10);
                RoomNumber = FSHelpers.Read8(data, srcOffset + 11);

                Vector3 position = new Vector3();
                position.X = FSHelpers.ConvertIEEE754Float((uint)FSHelpers.Read32(data, srcOffset + 12));
                position.Y = FSHelpers.ConvertIEEE754Float((uint)FSHelpers.Read32(data, srcOffset + 16));
                position.Z = FSHelpers.ConvertIEEE754Float((uint)FSHelpers.Read32(data, srcOffset + 20));
                Transform.Position = position;

                srcOffset += 24;
                Rotation = new HalfRotation(data, ref srcOffset); //There's no Z rotation

                srcOffset -= 1;

                ID = FSHelpers.Read8(data, srcOffset++);
   
                srcOffset += 2; //Two bytes Padding
            }
コード例 #3
0
            public override void LoadData(byte[] data, ref int srcOffset)
            {
                Name = FSHelpers.ReadString(data, srcOffset, 8);
                Unknown1 = FSHelpers.Read8(data, srcOffset + 8);
                RpatIndex = FSHelpers.Read8(data, srcOffset + 9);
                Unknown2 = FSHelpers.Read8(data, srcOffset + 10);
                BehaviorType = FSHelpers.Read8(data, srcOffset + 11);

                Transform.Position.X = FSHelpers.ConvertIEEE754Float((uint)FSHelpers.Read32(data, srcOffset + 12));
                Transform.Position.Y = FSHelpers.ConvertIEEE754Float((uint)FSHelpers.Read32(data, srcOffset + 16));
                Transform.Position.Z = FSHelpers.ConvertIEEE754Float((uint)FSHelpers.Read32(data, srcOffset + 20));

                srcOffset += 24;
                Rotation = new HalfRotation(data, ref srcOffset);
                //srcOffset += 6; //ToDo: Fix me

                EnemyNumber = (ushort)FSHelpers.Read16(data, srcOffset);

                srcOffset += 2; //Already got +24 from earlier, then +6 from HalfRotation.
            }
コード例 #4
0
 public override void LoadData(byte[] data, ref int srcOffset)
 {
     Transform.Position.X = FSHelpers.ConvertIEEE754Float((uint)FSHelpers.Read32(data, srcOffset + 0));
     Transform.Position.Y = FSHelpers.ConvertIEEE754Float((uint)FSHelpers.Read32(data, srcOffset + 4));
     Transform.Position.Z = FSHelpers.ConvertIEEE754Float((uint)FSHelpers.Read32(data, srcOffset + 8));
     srcOffset += 12;
     
     Rotation = new HalfRotation(data, ref srcOffset);
     Padding = (ushort)FSHelpers.Read16(data, srcOffset);
     srcOffset += 2;
 }
コード例 #5
0
ファイル: FSHelpers.cs プロジェクト: CryZe/WindEditor
        public static HalfRotation ReadHalfRot(byte[] data, uint offset)
        {
            HalfRotation rot = new HalfRotation();
            rot.X = Read16(data, (int) offset + 0x0);
            rot.Y = Read16(data, (int)offset + 0x2);
            rot.Z = Read16(data, (int)offset + 0x4);

            return rot;
        }