Example #1
0
 public static ResourceData[] Create(DataFormat format)
 {
     ResourceData[] result = format.AllocResourceData();
     for (int i = 0; i < format.Format.Length; i++)
     {
         if (format.Format[i].Type == ResourceFile.DataType.Len || format.Format[i].Type == ResourceFile.DataType.String)
         {
             result[i] = new ResourceData(null, format.Format[i], format.Format[i + 1]);
             i++;
         }
         else
         {
             result[i] = new ResourceData(null, format.Format[i]);
         }
     }
     return(result);
 }