コード例 #1
0
ファイル: Parser.cs プロジェクト: LazyBone152/XV2-Tools
        List <Type_5> GetType5(short count, int offset, List <Type_5> Type5, int idx)
        {
            if (Type5 == null)
            {
                Type5 = new List <Type_5>();
            }

            for (int i = 0; i < count; i++)
            {
                Type5.Add(new Type_5()
                {
                    Idx  = idx,
                    I_00 = BitConverter.ToUInt16(rawBytes, offset + 0),
                    I_02 = (ushort)(BitConverter.ToUInt16(rawBytes, offset + 2) - BitConverter.ToUInt16(rawBytes, offset + 0)),
                    I_04 = BitConverter.ToUInt16(rawBytes, offset + 4),
                    I_06 = BitConverter.ToUInt16(rawBytes, offset + 6),
                    I_08 = BitConverter.ToUInt16(rawBytes, offset + 8),
                    I_10 = BitConverter.ToUInt16(rawBytes, offset + 10),
                    I_12 = BitConverter.ToUInt16(rawBytes, offset + 12),
                    I_14 = BitConverter.ToUInt16(rawBytes, offset + 14),
                    I_16 = BitConverter_Ex.ToInt32Array(rawBytes, offset + 16, 12)
                });

                offset += 64;
            }

            return(Type5);
        }
コード例 #2
0
 public static Unknown_Indexes Read(byte[] rawBytes, int offset)
 {
     return(new Unknown_Indexes()
     {
         Indexes = BitConverter_Ex.ToInt32Array(rawBytes, offset, FPF_File.UnknownIndexListCount).ToList()
     });
 }
コード例 #3
0
        //Skeleton

        private void ParseSkeleton(int offset)
        {
            //Init
            boneCount = BitConverter.ToInt16(rawBytes, offset);
            int unk1Offset = BitConverter.ToInt32(rawBytes, offset + 20) + offset;
            int unk2Offset = BitConverter.ToInt32(rawBytes, offset + 24) + offset;

            //Skeleton init
            eanFile.Skeleton = new ESK_Skeleton()
            {
                I_02     = BitConverter.ToInt16(rawBytes, offset + 2),
                I_28     = BitConverter_Ex.ToInt32Array(rawBytes, offset + 28, 2),
                Unk1     = ESK_Unk1.Read(rawBytes, unk1Offset),
                UseUnk2  = (unk2Offset != 0) ? true : false,
                ESKBones = new ObservableCollection <ESK_Bone>()
            };

            //Setting the offsets for the initial loop to use
            int[] offsets               = GetBoneOffset(0, offset);
            int   boneIndexOffset       = offsets[0];
            int   nameOffset            = offsets[1];
            int   skinningMatrixOffset  = offsets[2];
            int   transformMatrixOffset = offsets[3];

            while (true)
            {
                int idx = eanFile.Skeleton.ESKBones.Count;
                eanFile.Skeleton.ESKBones.Add(ESK_Bone.Read(bytes, rawBytes, offsets));
                if (BitConverter.ToInt16(rawBytes, boneIndexOffset + 2) != -1)
                {
                    eanFile.Skeleton.ESKBones[idx].ESK_Bones = ParseChildrenBones(BitConverter.ToInt16(rawBytes, boneIndexOffset + 2), offset);
                }

                //Loop management
                if (BitConverter.ToInt16(rawBytes, boneIndexOffset + 4) != -1)
                {
                    //There is a sibling
                    offsets              = GetBoneOffset(BitConverter.ToInt16(rawBytes, boneIndexOffset + 4), offset);
                    boneIndexOffset      = offsets[0];
                    nameOffset           = offsets[1];
                    skinningMatrixOffset = offsets[2];
                    //transformMatrixOffset = offsets[3];
                }
                else
                {
                    //There is no sibling. End loop.
                    break;
                }
            }
        }
コード例 #4
0
ファイル: Parser.cs プロジェクト: LazyBone152/XV2-Tools
        private int ParseSection2(int currentOffset)
        {
            while (EndOfSectionCheck(currentOffset) == false)
            {
                int _pos        = tsd_File.Events.Count();
                int addedOffset = 0;

                tsd_File.Events.Add(new TSD_Event());

                tsd_File.Events[_pos].Index = BitConverter.ToInt32(rawBytes, currentOffset + 0).ToString();
                tsd_File.Events[_pos].I_04  = BitConverter.ToInt32(rawBytes, currentOffset + 4);
                addedOffset += 12;


                int stringSize = BitConverter.ToInt32(rawBytes, currentOffset + addedOffset - 4);

                tsd_File.Events[_pos].Str1 = StringEx.GetString(rawBytes, currentOffset + addedOffset, false, StringEx.EncodingType.UTF8, BitConverter.ToInt32(rawBytes, currentOffset + addedOffset - 4), false);
                addedOffset += stringSize + 4;

                stringSize = BitConverter.ToInt32(rawBytes, currentOffset + addedOffset - 4);
                tsd_File.Events[_pos].Str2 = StringEx.GetString(rawBytes, currentOffset + addedOffset, false, StringEx.EncodingType.UTF8, BitConverter.ToInt32(rawBytes, currentOffset + addedOffset - 4), false);
                addedOffset += stringSize + 4;

                stringSize = BitConverter.ToInt32(rawBytes, currentOffset + addedOffset - 4);
                tsd_File.Events[_pos].Str3 = StringEx.GetString(rawBytes, currentOffset + addedOffset, false, StringEx.EncodingType.UTF8, BitConverter.ToInt32(rawBytes, currentOffset + addedOffset - 4), false);
                addedOffset += stringSize + 4;

                stringSize = BitConverter.ToInt32(rawBytes, currentOffset + addedOffset - 4);
                tsd_File.Events[_pos].Str4 = StringEx.GetString(rawBytes, currentOffset + addedOffset, false, StringEx.EncodingType.UTF8, BitConverter.ToInt32(rawBytes, currentOffset + addedOffset - 4), false);
                addedOffset += stringSize + 4;

                stringSize = BitConverter.ToInt32(rawBytes, currentOffset + addedOffset - 4);
                string args = StringEx.GetString(rawBytes, currentOffset + addedOffset, false, StringEx.EncodingType.UTF8, BitConverter.ToInt32(rawBytes, currentOffset + addedOffset - 4), false);
                tsd_File.Events[_pos].Arguments = EventArguments.Read(args);
                addedOffset += stringSize + 4;

                //Read TNL ID array
                int        count  = BitConverter.ToInt32(rawBytes, currentOffset + addedOffset - 4);
                List <int> tnlIds = BitConverter_Ex.ToInt32Array(rawBytes, currentOffset + addedOffset, count).ToList();
                addedOffset += (4 * count);
                tsd_File.Events[_pos].TNL_IDs = ArrayConvert.ConvertToStringList(tnlIds);

                currentOffset += addedOffset;
            }
            return(currentOffset);
        }
コード例 #5
0
        private List <IBD_Effect> ParseEffect(int offset)
        {
            List <IBD_Effect> effects = new List <IBD_Effect>();

            for (int i = 0; i < 3; i++)
            {
                effects.Add(new IBD_Effect()
                {
                    I_00  = BitConverter.ToInt32(rawBytes, offset + 0),
                    I_04  = BitConverter.ToInt32(rawBytes, offset + 4),
                    I_08  = BitConverter.ToInt32(rawBytes, offset + 8),
                    F_12  = BitConverter.ToSingle(rawBytes, offset + 12),
                    F_16  = BitConverter_Ex.ToFloat32Array(rawBytes, offset + 16, 6),
                    I_40  = BitConverter.ToInt32(rawBytes, offset + 40),
                    I_44  = BitConverter.ToInt32(rawBytes, offset + 44),
                    F_48  = BitConverter_Ex.ToFloat32Array(rawBytes, offset + 48, 6),
                    I_72  = BitConverter_Ex.ToInt32Array(rawBytes, offset + 72, 6),
                    F_96  = BitConverter.ToSingle(rawBytes, offset + 96),
                    F_100 = BitConverter.ToSingle(rawBytes, offset + 100),
                    F_104 = BitConverter.ToSingle(rawBytes, offset + 104),
                    F_108 = BitConverter.ToSingle(rawBytes, offset + 108),
                    F_112 = BitConverter.ToSingle(rawBytes, offset + 112),
                    F_116 = BitConverter.ToSingle(rawBytes, offset + 116),
                    F_120 = BitConverter.ToSingle(rawBytes, offset + 120),
                    F_124 = BitConverter.ToSingle(rawBytes, offset + 124),
                    F_128 = BitConverter.ToSingle(rawBytes, offset + 128),
                    F_132 = BitConverter.ToSingle(rawBytes, offset + 132),
                    F_136 = BitConverter.ToSingle(rawBytes, offset + 136),
                    F_140 = BitConverter.ToSingle(rawBytes, offset + 140),
                    F_144 = BitConverter.ToSingle(rawBytes, offset + 144),
                    F_148 = BitConverter.ToSingle(rawBytes, offset + 148),
                    F_152 = BitConverter.ToSingle(rawBytes, offset + 152),
                    F_156 = BitConverter_Ex.ToFloat32Array(rawBytes, offset + 156, 17)
                });
                offset += 224;
            }

            return(effects);
        }
コード例 #6
0
ファイル: Parser.cs プロジェクト: LazyBone152/XV2-Tools
        private void ParseBac()
        {
            int offset = BitConverter.ToInt32(rawBytes, 16);
            int count  = BitConverter.ToInt32(rawBytes, 8);

            bacFile.I_20       = BitConverter_Ex.ToInt32Array(rawBytes, 20, 3);
            bacFile.F_32       = BitConverter_Ex.ToFloat32Array(rawBytes, 32, 12);
            bacFile.I_80       = BitConverter_Ex.ToInt32Array(rawBytes, 80, 4);
            bacFile.BacEntries = AsyncObservableCollection <BAC_Entry> .Create();

            for (int i = 0; i < count; i++)
            {
                int typeListOffset = BitConverter.ToInt32(rawBytes, offset + 8);
                int typeListCount  = BitConverter.ToInt16(rawBytes, offset + 4);

                bacFile.BacEntries.Add(new BAC_Entry()
                {
                    Flag  = (BAC_Entry.Flags)BitConverter.ToUInt32(rawBytes, offset + 0),
                    Index = i.ToString()
                });

                for (int a = 0; a < typeListCount; a++)
                {
                    int thisType       = BitConverter.ToInt16(rawBytes, typeListOffset + 0);
                    int thisTypeCount  = BitConverter.ToInt16(rawBytes, typeListOffset + 2);
                    int thisTypeOffset = BitConverter.ToInt32(rawBytes, typeListOffset + 8);


                    if (thisTypeOffset != 0)
                    {
                        switch (thisType)
                        {
                        case 0:
                            bacFile.BacEntries[i].Type0 = BAC_Type0.Read(rawBytes, bytes, thisTypeOffset, thisTypeCount);
                            break;

                        case 1:
                            bacFile.BacEntries[i].Type1 = BAC_Type1.Read(rawBytes, bytes, thisTypeOffset, thisTypeCount);
                            break;

                        case 2:
                            bacFile.BacEntries[i].Type2 = BAC_Type2.Read(rawBytes, bytes, thisTypeOffset, thisTypeCount);
                            break;

                        case 3:
                            bacFile.BacEntries[i].Type3 = BAC_Type3.Read(rawBytes, bytes, thisTypeOffset, thisTypeCount);
                            break;

                        case 4:
                            bacFile.BacEntries[i].Type4 = BAC_Type4.Read(rawBytes, bytes, thisTypeOffset, thisTypeCount);
                            break;

                        case 5:
                            bacFile.BacEntries[i].Type5 = BAC_Type5.Read(rawBytes, bytes, thisTypeOffset, thisTypeCount);
                            break;

                        case 6:
                            bacFile.BacEntries[i].Type6 = BAC_Type6.Read(rawBytes, bytes, thisTypeOffset, thisTypeCount);
                            break;

                        case 7:
                            bacFile.BacEntries[i].Type7 = BAC_Type7.Read(rawBytes, bytes, thisTypeOffset, thisTypeCount);
                            break;

                        case 8:
                            bacFile.BacEntries[i].Type8 = BAC_Type8.Read(rawBytes, bytes, thisTypeOffset, thisTypeCount);
                            break;

                        case 9:
                            bacFile.BacEntries[i].Type9 = BAC_Type9.Read(rawBytes, bytes, thisTypeOffset, thisTypeCount);
                            break;

                        case 10:
                            bacFile.BacEntries[i].Type10 = BAC_Type10.Read(rawBytes, bytes, thisTypeOffset, thisTypeCount);
                            break;

                        case 11:
                            bacFile.BacEntries[i].Type11 = BAC_Type11.Read(rawBytes, bytes, thisTypeOffset, thisTypeCount);
                            break;

                        case 12:
                            bacFile.BacEntries[i].Type12 = BAC_Type12.Read(rawBytes, bytes, thisTypeOffset, thisTypeCount);
                            break;

                        case 13:
                            bacFile.BacEntries[i].Type13 = BAC_Type13.Read(rawBytes, bytes, thisTypeOffset, thisTypeCount);
                            break;

                        case 14:
                            bacFile.BacEntries[i].Type14 = BAC_Type14.Read(rawBytes, bytes, thisTypeOffset, thisTypeCount);
                            break;

                        case 15:
                            bacFile.BacEntries[i].Type15 = BAC_Type15.Read(rawBytes, bytes, thisTypeOffset, thisTypeCount);
                            break;

                        case 16:
                            bacFile.BacEntries[i].Type16 = BAC_Type16.Read(rawBytes, bytes, thisTypeOffset, thisTypeCount);
                            break;

                        case 17:
                            bacFile.BacEntries[i].Type17 = BAC_Type17.Read(rawBytes, bytes, thisTypeOffset, thisTypeCount, IsType17Small(thisTypeOffset, thisTypeCount, i));
                            break;

                        case 18:
                            bacFile.BacEntries[i].Type18 = BAC_Type18.Read(rawBytes, bytes, thisTypeOffset, thisTypeCount);
                            break;

                        case 19:
                            bacFile.BacEntries[i].Type19 = BAC_Type19.Read(rawBytes, bytes, thisTypeOffset, thisTypeCount);
                            break;

                        case 20:
                            bacFile.BacEntries[i].Type20 = BAC_Type20.Read(rawBytes, bytes, thisTypeOffset, thisTypeCount);
                            break;

                        case 21:
                            bacFile.BacEntries[i].Type21 = BAC_Type21.Read(rawBytes, bytes, thisTypeOffset, thisTypeCount);
                            break;

                        case 22:
                            bacFile.BacEntries[i].Type22 = BAC_Type22.Read(rawBytes, bytes, thisTypeOffset, thisTypeCount);
                            break;

                        case 23:
                            bacFile.BacEntries[i].Type23 = BAC_Type23.Read(rawBytes, bytes, thisTypeOffset, thisTypeCount);
                            break;

                        case 24:
                            bacFile.BacEntries[i].Type24 = BAC_Type24.Read(rawBytes, bytes, thisTypeOffset, thisTypeCount);
                            break;

                        case 25:
                            bacFile.BacEntries[i].Type25 = BAC_Type25.Read(rawBytes, bytes, thisTypeOffset, thisTypeCount);
                            break;

                        case 26:
                            bacFile.BacEntries[i].Type26 = BAC_Type26.Read(rawBytes, bytes, thisTypeOffset, thisTypeCount);
                            break;

                        case 27:
                            bacFile.BacEntries[i].Type27 = BAC_Type27.Read(rawBytes, bytes, thisTypeOffset, thisTypeCount);
                            break;

                        default:
                            throw new InvalidDataException(String.Format("Parse failed. Unknown BacType encountered ({0})\nOffset: {1}\nCount: {2}.", thisType, thisTypeOffset, thisTypeCount));
                        }
                    }
                    else
                    {
                        if (bacFile.BacEntries[i].TypeDummy == null)
                        {
                            bacFile.BacEntries[i].TypeDummy = new List <int>();
                        }
                        bacFile.BacEntries[i].TypeDummy.Add(thisType);
                    }


                    typeListOffset += 16;
                }


                offset += 16;
            }
        }
コード例 #7
0
ファイル: Parser.cs プロジェクト: LazyBone152/XV2-Tools
        private void ParseBsa()
        {
            int count  = BitConverter.ToInt16(rawBytes, 18);
            int offset = BitConverter.ToInt32(rawBytes, 20);

            bsaFile.I_08        = BitConverter.ToInt64(rawBytes, 8);
            bsaFile.I_16        = BitConverter.ToInt16(rawBytes, 16);
            bsaFile.BSA_Entries = new List <BSA_Entry>();


            for (int i = 0; i < count; i++)
            {
                int entryOffset = BitConverter.ToInt32(rawBytes, offset);

                if (entryOffset != 0)
                {
                    bsaFile.BSA_Entries.Add(new BSA_Entry()
                    {
                        Index            = i.ToString(),
                        I_00             = BitConverter.ToInt32(rawBytes, entryOffset + 0),
                        I_16_a           = Int4Converter.ToInt4(rawBytes[entryOffset + 16])[0],
                        I_16_b           = Int4Converter.ToInt4(rawBytes[entryOffset + 16])[1],
                        I_17             = rawBytes[entryOffset + 17],
                        I_18             = BitConverter.ToInt32(rawBytes, entryOffset + 18),
                        I_22             = BitConverter.ToUInt16(rawBytes, entryOffset + 22),
                        I_24             = BitConverter.ToUInt16(rawBytes, entryOffset + 24),
                        Expires          = BitConverter.ToUInt16(rawBytes, entryOffset + 26),
                        ImpactProjectile = BitConverter.ToUInt16(rawBytes, entryOffset + 28),
                        ImpactEnemy      = BitConverter.ToUInt16(rawBytes, entryOffset + 30),
                        ImpactGround     = BitConverter.ToUInt16(rawBytes, entryOffset + 32),
                        I_40             = BitConverter_Ex.ToInt32Array(rawBytes, entryOffset + 40, 3)
                    });
                    int thisEntry = bsaFile.BSA_Entries.Count() - 1;
                    int Unk1Count = BitConverter.ToInt16(rawBytes, entryOffset + 4);
                    int Unk2Count = BitConverter.ToInt16(rawBytes, entryOffset + 6);

                    if (Unk1Count != 0 || Unk2Count != 0)
                    {
                        bsaFile.BSA_Entries[thisEntry].SubEntries = new BSA_SubEntries()
                        {
                            CollisionEntries  = ParseUnk1(BitConverter.ToInt16(rawBytes, entryOffset + 8) + entryOffset, BitConverter.ToInt16(rawBytes, entryOffset + 4)),
                            ExpirationEntries = ParseUnk2(BitConverter.ToInt16(rawBytes, entryOffset + 12) + entryOffset, BitConverter.ToInt16(rawBytes, entryOffset + 6))
                        };
                    }

                    //Types
                    int typesOffset = BitConverter.ToInt16(rawBytes, entryOffset + 36) + entryOffset;
                    int typesCount  = BitConverter.ToInt16(rawBytes, entryOffset + 34);

                    if (typesCount > 0)
                    {
                        for (int a = 0; a < typesCount; a++)
                        {
                            int type       = BitConverter.ToInt16(rawBytes, typesOffset + 0);
                            int hdrOffset  = BitConverter.ToInt32(rawBytes, typesOffset + 8) + typesOffset;
                            int dataOffset = BitConverter.ToInt32(rawBytes, typesOffset + 12) + typesOffset;

                            switch (type)
                            {
                            case 0:
                                bsaFile.BSA_Entries[thisEntry].Type0 = ParseType0(hdrOffset, dataOffset, BitConverter.ToInt16(rawBytes, typesOffset + 6));
                                break;

                            case 1:
                                bsaFile.BSA_Entries[thisEntry].Type1 = ParseType1(hdrOffset, dataOffset, BitConverter.ToInt16(rawBytes, typesOffset + 6));
                                break;

                            case 2:
                                bsaFile.BSA_Entries[thisEntry].Type2 = ParseType2(hdrOffset, dataOffset, BitConverter.ToInt16(rawBytes, typesOffset + 6));
                                break;

                            case 3:
                                bsaFile.BSA_Entries[thisEntry].Type3 = ParseType3(hdrOffset, dataOffset, BitConverter.ToInt16(rawBytes, typesOffset + 6));
                                break;

                            case 4:
                                bsaFile.BSA_Entries[thisEntry].Type4 = ParseType4(hdrOffset, dataOffset, BitConverter.ToInt16(rawBytes, typesOffset + 6));
                                break;

                            case 6:
                                bsaFile.BSA_Entries[thisEntry].Type6 = ParseType6(hdrOffset, dataOffset, BitConverter.ToInt16(rawBytes, typesOffset + 6));
                                break;

                            case 7:
                                bsaFile.BSA_Entries[thisEntry].Type7 = ParseType7(hdrOffset, dataOffset, BitConverter.ToInt16(rawBytes, typesOffset + 6));
                                break;

                            case 8:
                                bsaFile.BSA_Entries[thisEntry].Type8 = ParseType8(hdrOffset, dataOffset, BitConverter.ToInt16(rawBytes, typesOffset + 6));
                                break;

                            default:
                                Console.WriteLine(String.Format("Undefined BSA Type encountered: {0}, at offset: {1}", type, typesOffset));
                                Console.ReadLine();
                                break;
                            }

                            typesOffset += 16;
                        }
                    }
                }
                offset += 4;
            }
        }
コード例 #8
0
        void ParseQuestData()
        {
            int offset = questsOffset;

            for (int i = 0; i < questsCount; i++)
            {
                //counts & offsets
                int msgEntryCount       = BitConverter.ToInt32(rawBytes, offset + 32);
                int equipRewardCount    = BitConverter.ToInt32(rawBytes, offset + 160);
                int skillRewardCount    = BitConverter.ToInt32(rawBytes, offset + 168);
                int unk1count           = BitConverter.ToInt32(rawBytes, offset + 88);
                int unk2Count           = BitConverter.ToInt32(rawBytes, offset + 96);
                int charaUnlockCount    = BitConverter.ToInt32(rawBytes, offset + 176);
                int stagePortraitCount  = BitConverter.ToInt32(rawBytes, offset + 184);
                int qedFileCount        = BitConverter.ToInt32(rawBytes, offset + 112);
                int msgEntryOffset      = BitConverter.ToInt32(rawBytes, offset + 36);
                int equipRewardOffset   = BitConverter.ToInt32(rawBytes, offset + 164);
                int skillRewardOffset   = BitConverter.ToInt32(rawBytes, offset + 172);
                int unk1Offset          = BitConverter.ToInt32(rawBytes, offset + 92);
                int unk2Offset          = BitConverter.ToInt32(rawBytes, offset + 100);
                int charaUnlockOffset   = BitConverter.ToInt32(rawBytes, offset + 180);
                int stagePortraitOffset = BitConverter.ToInt32(rawBytes, offset + 188);
                int qedFileOffset       = BitConverter.ToInt32(rawBytes, offset + 116);

                qxd_File.Quests.Add(new Quest_Data());
                qxd_File.Quests[i].Name = StringEx.GetString(bytes, offset, false, StringEx.EncodingType.ASCII, 16);

                qxd_File.Quests[i].Index = BitConverter.ToInt32(rawBytes, offset + 16).ToString();
                qxd_File.Quests[i].I_20  = BitConverter.ToInt32(rawBytes, offset + 20);
                qxd_File.Quests[i].I_24  = BitConverter.ToInt32(rawBytes, offset + 24);
                qxd_File.Quests[i].I_28  = BitConverter.ToInt32(rawBytes, offset + 28);
                qxd_File.Quests[i].I_40  = BitConverter.ToInt16(rawBytes, offset + 40);
                qxd_File.Quests[i].I_42  = BitConverter.ToInt16(rawBytes, offset + 42);
                qxd_File.Quests[i].I_44  = BitConverter.ToInt16(rawBytes, offset + 44);
                qxd_File.Quests[i].I_46  = BitConverter.ToInt16(rawBytes, offset + 46);
                qxd_File.Quests[i].I_64  = BitConverter.ToInt32(rawBytes, offset + 64);
                qxd_File.Quests[i].I_104 = BitConverter.ToInt16(rawBytes, offset + 104);
                qxd_File.Quests[i].I_106 = BitConverter.ToInt16(rawBytes, offset + 106);
                qxd_File.Quests[i].I_108 = BitConverter.ToInt16(rawBytes, offset + 108);
                qxd_File.Quests[i].I_110 = BitConverter.ToInt16(rawBytes, offset + 110);
                qxd_File.Quests[i].I_120 = BitConverter.ToInt32(rawBytes, offset + 120);
                qxd_File.Quests[i].I_124 = BitConverter.ToInt32(rawBytes, offset + 124);
                qxd_File.Quests[i].I_128 = BitConverter.ToInt32(rawBytes, offset + 128);
                qxd_File.Quests[i].I_132 = BitConverter.ToInt32(rawBytes, offset + 132);
                qxd_File.Quests[i].I_136 = BitConverter.ToInt32(rawBytes, offset + 136);
                qxd_File.Quests[i].I_140 = BitConverter.ToInt32(rawBytes, offset + 140);
                qxd_File.Quests[i].I_144 = BitConverter.ToInt32(rawBytes, offset + 144);
                qxd_File.Quests[i].I_148 = BitConverter.ToInt32(rawBytes, offset + 148);
                qxd_File.Quests[i].I_152 = BitConverter.ToInt32(rawBytes, offset + 152);
                qxd_File.Quests[i].I_156 = BitConverter.ToInt32(rawBytes, offset + 156);
                qxd_File.Quests[i].I_192 = BitConverter.ToInt32(rawBytes, offset + 192);
                qxd_File.Quests[i].I_248 = BitConverter.ToInt32(rawBytes, offset + 248);
                qxd_File.Quests[i].I_252 = BitConverter.ToInt32(rawBytes, offset + 252);
                qxd_File.Quests[i].I_256 = (QxdUpdate)BitConverter.ToInt32(rawBytes, offset + 256);
                qxd_File.Quests[i].I_260 = (QxdDlc)BitConverter.ToInt32(rawBytes, offset + 260);
                qxd_File.Quests[i].I_264 = BitConverter.ToInt32(rawBytes, offset + 264);
                qxd_File.Quests[i].I_268 = BitConverter.ToInt16(rawBytes, offset + 268);
                qxd_File.Quests[i].I_270 = BitConverter.ToInt16(rawBytes, offset + 270);
                qxd_File.Quests[i].I_272 = BitConverter.ToInt16(rawBytes, offset + 272);
                qxd_File.Quests[i].I_274 = BitConverter.ToInt16(rawBytes, offset + 274);
                qxd_File.Quests[i].F_276 = BitConverter.ToSingle(rawBytes, offset + 276);
                qxd_File.Quests[i].I_280 = BitConverter.ToInt32(rawBytes, offset + 280);


                qxd_File.Quests[i].I_48 = BitConverter_Ex.ToInt32Array(rawBytes, offset + 48, 4);
                qxd_File.Quests[i].I_68 = BitConverter_Ex.ToInt32Array(rawBytes, offset + 68, 5);

                qxd_File.Quests[i].I_232 = BitConverter_Ex.ToInt16Array(rawBytes, offset + 232, 8);

                if (unk1count > 0)
                {
                    int tempOffset = unk1Offset;
                    qxd_File.Quests[i].UnknownNum1 = new List <UnkNum1>();
                    for (int a = 0; a < unk1count; a++)
                    {
                        qxd_File.Quests[i].UnknownNum1.Add(new UnkNum1()
                        {
                            I_00 = BitConverter_Ex.ToInt16Array(rawBytes, tempOffset, 16)
                        });

                        tempOffset += 32;
                    }
                }
                if (unk2Count > 0)
                {
                    int tempOffset = unk2Offset;
                    qxd_File.Quests[i].UnknownNum2 = new List <UnkNum2>();
                    for (int a = 0; a < unk2Count; a++)
                    {
                        qxd_File.Quests[i].UnknownNum2.Add(new UnkNum2()
                        {
                            I_00 = BitConverter_Ex.ToInt16Array(rawBytes, tempOffset, 16)
                        });

                        tempOffset += 32;
                    }
                }

                if (equipRewardCount > 0)
                {
                    qxd_File.Quests[i].EquipReward = new List <EquipmentReward>();
                    int equipOffset = equipRewardOffset;
                    for (int b = 0; b < equipRewardCount; b++)
                    {
                        qxd_File.Quests[i].EquipReward.Add(new EquipmentReward()
                        {
                            I_00 = (QxdItemType)BitConverter.ToInt32(rawBytes, equipOffset),
                            I_04 = BitConverter.ToInt32(rawBytes, equipOffset + 4),
                            I_08 = BitConverter.ToInt32(rawBytes, equipOffset + 8),
                            I_12 = BitConverter.ToInt32(rawBytes, equipOffset + 12),
                            I_16 = BitConverter.ToInt32(rawBytes, equipOffset + 16),
                            I_20 = BitConverter.ToInt16(rawBytes, equipOffset + 20),
                            F_24 = BitConverter.ToSingle(rawBytes, equipOffset + 24),
                            I_28 = BitConverter.ToInt32(rawBytes, equipOffset + 28)
                        });

                        equipOffset += 32;
                    }
                }

                if (skillRewardCount > 0)
                {
                    qxd_File.Quests[i].Skill_Reward = new List <SkillReward>();
                    int skillOffset = skillRewardOffset;
                    for (int b = 0; b < skillRewardCount; b++)
                    {
                        qxd_File.Quests[i].Skill_Reward.Add(new SkillReward()
                        {
                            I_00 = (QxdSkillType)BitConverter.ToInt32(rawBytes, skillOffset + 0),
                            I_04 = BitConverter.ToInt32(rawBytes, skillOffset + 4),
                            I_08 = BitConverter.ToInt32(rawBytes, skillOffset + 8),
                            I_12 = BitConverter.ToInt32(rawBytes, skillOffset + 12),
                            F_16 = BitConverter.ToSingle(rawBytes, skillOffset + 16)
                        });
                        skillOffset += 20;
                    }
                }



                if (charaUnlockCount > 0)
                {
                    qxd_File.Quests[i].Chara_Unlock = new List <CharaUnlock>();
                    int charaOffset = charaUnlockOffset;
                    for (int b = 0; b < charaUnlockCount; b++)
                    {
                        qxd_File.Quests[i].Chara_Unlock.Add(new CharaUnlock()
                        {
                            ShortName    = StringEx.GetString(bytes, charaOffset, false, StringEx.EncodingType.ASCII, 3),
                            CostumeIndex = BitConverter.ToInt16(rawBytes, charaOffset + 4),
                            I_06         = BitConverter.ToInt16(rawBytes, charaOffset + 6)
                        });
                        charaOffset += 8;
                    }
                }

                int portraitOffset = 196;
                qxd_File.Quests[i].EnemyPortraitDisplay = new List <EnemyPortrait>();
                for (int b = 0; b < 6; b++)
                {
                    qxd_File.Quests[i].EnemyPortraitDisplay.Add(new EnemyPortrait());
                    qxd_File.Quests[i].EnemyPortraitDisplay[b].CharaID      = BitConverter.ToInt16(rawBytes, offset + portraitOffset);
                    qxd_File.Quests[i].EnemyPortraitDisplay[b].CostumeIndex = BitConverter.ToInt16(rawBytes, offset + portraitOffset + 2);
                    qxd_File.Quests[i].EnemyPortraitDisplay[b].State        = BitConverter.ToInt16(rawBytes, offset + portraitOffset + 4);
                    portraitOffset += 6;
                }

                if (stagePortraitCount > 0)
                {
                    qxd_File.Quests[i].StageDisplay = new List <short>();
                    for (int j = 0; j < 32; j += 2)
                    {
                        qxd_File.Quests[i].StageDisplay.Add(BitConverter.ToInt16(rawBytes, stagePortraitOffset + j));
                    }
                }

                if (msgEntryCount > 0)
                {
                    qxd_File.Quests[i].MsgFiles = new List <string>();
                    int msgOffset = msgEntryOffset;
                    for (int j = 0; j < msgEntryCount; j++)
                    {
                        qxd_File.Quests[i].MsgFiles.Add(StringEx.GetString(bytes, msgOffset, false, StringEx.EncodingType.ASCII, 32));
                        msgOffset += 32;
                    }
                }

                if (qedFileCount > 0)
                {
                    qxd_File.Quests[i].QedFiles = new List <string>();
                    int qedOffset = qedFileOffset;
                    for (int j = 0; j < qedFileCount; j++)
                    {
                        qxd_File.Quests[i].QedFiles.Add(StringEx.GetString(bytes, qedOffset, false, StringEx.EncodingType.ASCII, 32));
                        qedOffset += 32;
                    }
                }
                offset += 284;
            }
        }