Beispiel #1
0
 /// <summary>
 /// Copy constructor
 /// </summary>
 public IDXEntry(IDXEntry entry)
 {
     Filename = entry.Filename;
     AFSIndex = entry.AFSIndex;
     Unknown  = entry.Unknown;
     Unknown2 = entry.Unknown2;
     Unknown3 = entry.Unknown3;
     IDXType  = entry.IDXType;
 }
Beispiel #2
0
 public void Read(BinaryReader reader, IDX.IDXType type)
 {
     IDXType = type;
     if (type == IDX.IDXType.HUMANS)
     {
         byte[] buffer = reader.ReadBytes(4);
         Filename = Encoding.ASCII.GetString(buffer).Replace("\0", "");
     }
     else if (type == IDX.IDXType.IDXD)
     {
         Unknown = reader.ReadUInt32();
         byte[] buffer = reader.ReadBytes(4);
         Filename = Encoding.ASCII.GetString(buffer).Replace("\0", "");
     }
     else if (type == IDX.IDXType.IDXC)
     {
         Unknown = reader.ReadUInt32();
         byte[] buffer = reader.ReadBytes(4);
         Filename = Encoding.ASCII.GetString(buffer).Replace("\0", "");
         Unknown2 = reader.ReadUInt32();
     }
     else if (type == IDX.IDXType.IDXB)
     {
         Unknown = reader.ReadUInt32();
         byte[] buffer = reader.ReadBytes(4);
         Filename = Encoding.ASCII.GetString(buffer).Replace("\0", "");
         Unknown2 = reader.ReadUInt32();
         Unknown3 = reader.ReadUInt32();
     }
     else if (type == IDX.IDXType.IDX0)
     {
         byte[] buffer = reader.ReadBytes(12);
         Filename     = m_shiftJis.GetString(buffer).Replace("\0", "");
         AFSIndex     = reader.ReadUInt16();
         AFSLastIndex = reader.ReadUInt16();
         Unknown      = reader.ReadUInt32();
     }
 }
Beispiel #3
0
 public IDXEntry(BinaryReader reader, IDX.IDXType type)
 {
     Read(reader, type);
 }